diff options
author | rbuj <[email protected]> | 2019-08-15 12:04:30 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-08-20 16:10:38 +0200 |
commit | 797375812a94286b74397818e20e0c94791ab4d7 (patch) | |
tree | bcce57b8a462f837f50ac01521d56f4a8400ac06 /capplets/time-admin/src/main.c | |
parent | 289fbb8e96997aae9d8241e3783cd5b077766b63 (diff) | |
download | mate-control-center-797375812a94286b74397818e20e0c94791ab4d7.tar.bz2 mate-control-center-797375812a94286b74397818e20e0c94791ab4d7.tar.xz |
time-admin: Simplify date & time displaying
Diffstat (limited to 'capplets/time-admin/src/main.c')
-rw-r--r-- | capplets/time-admin/src/main.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c index 2e31a5af..4a18c5fd 100644 --- a/capplets/time-admin/src/main.c +++ b/capplets/time-admin/src/main.c @@ -158,14 +158,9 @@ static void InitMainWindow(TimeAdmin *ta) struct tm *LocalTime = GetCurrentTime(); ta->UpdateTimeId = 0; ta->ApplyId = 0; - gtk_spin_button_set_value(GTK_SPIN_BUTTON(ta->HourSpin),LocalTime->tm_hour); - gtk_spin_button_set_value(GTK_SPIN_BUTTON(ta->MinuteSpin),LocalTime->tm_min); - char *str = g_strdup_printf ("%02d", LocalTime->tm_sec); - gtk_entry_set_text(GTK_ENTRY(ta->SecondSpin),str); - g_free (str); + ta_refresh_time (ta, LocalTime); /* date */ - gtk_calendar_mark_day (GTK_CALENDAR(ta->Calendar), LocalTime->tm_mday); - ta->OldDay = LocalTime->tm_mday; + ta_refresh_date (ta, LocalTime); Update_Clock_Start(ta); } |