From 0d3c3063d3cbb9563b3a2d4041355cf9d41011c6 Mon Sep 17 00:00:00 2001 From: rbuj Date: Fri, 16 Aug 2019 14:32:08 +0200 Subject: =?UTF-8?q?time-admin:=20Don't=20share=20=C2=ABvoid=20QuitApp(Time?= =?UTF-8?q?Admin=20*ta)=C2=BB=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- capplets/time-admin/src/main.c | 12 ++++++++++++ capplets/time-admin/src/time-share.c | 11 ----------- capplets/time-admin/src/time-share.h | 2 -- 3 files changed, 12 insertions(+), 13 deletions(-) (limited to 'capplets/time-admin/src') diff --git a/capplets/time-admin/src/main.c b/capplets/time-admin/src/main.c index f635c31c..5f0463e3 100644 --- a/capplets/time-admin/src/main.c +++ b/capplets/time-admin/src/main.c @@ -36,6 +36,18 @@ static char *translate(const char *value) return name; } +static void +QuitApp (TimeAdmin *ta) +{ + if (ta->UpdateTimeId > 0) + g_source_remove (ta->UpdateTimeId); + + if (ta->ApplyId > 0) + g_source_remove (ta->ApplyId); + + gtk_main_quit (); +} + static gboolean CheckClockHealth(gpointer data) { TimeAdmin *ta = (TimeAdmin *)data; diff --git a/capplets/time-admin/src/time-share.c b/capplets/time-admin/src/time-share.c index e4069415..c65189b4 100644 --- a/capplets/time-admin/src/time-share.c +++ b/capplets/time-admin/src/time-share.c @@ -42,17 +42,6 @@ int ErrorMessage (const char *Title, return nRet; } -void QuitApp(TimeAdmin *ta) -{ - if(ta->UpdateTimeId > 0) - g_source_remove (ta->UpdateTimeId); - - if(ta->ApplyId > 0) - g_source_remove(ta->ApplyId); - - gtk_main_quit(); -} - void SetTooltip(GtkWidget *box, gboolean mode) { gchar *text = mode ? NULL : _("Network time synchronization has been set up. Manual time/date setting is disabled."); diff --git a/capplets/time-admin/src/time-share.h b/capplets/time-admin/src/time-share.h index 5e1c86c4..b3c26ab4 100644 --- a/capplets/time-admin/src/time-share.h +++ b/capplets/time-admin/src/time-share.h @@ -66,8 +66,6 @@ typedef struct int ErrorMessage (const char *Title, const char *Msg); -void QuitApp (TimeAdmin *ta); - void SetTooltip (GtkWidget *box, gboolean mode); #endif -- cgit v1.2.1