summaryrefslogtreecommitdiff
path: root/applets/notification_area/main.c
diff options
context:
space:
mode:
authorClement Lefebvre <[email protected]>2017-08-16 02:30:35 +0200
committerMartin Wimpress <[email protected]>2017-08-16 01:30:35 +0100
commit4a25da504204639cee268d0fac1516f03d2fe6bb (patch)
treef2bac3dbb8d50e07f78742b79b227f1ab3520fa3 /applets/notification_area/main.c
parent5094a9b27c8430079199afdcc2f5a32c96089349 (diff)
downloadmate-panel-4a25da504204639cee268d0fac1516f03d2fe6bb.tar.bz2
mate-panel-4a25da504204639cee268d0fac1516f03d2fe6bb.tar.xz
Add a gsettings key to enable/disable SNI Support (#600)
Diffstat (limited to 'applets/notification_area/main.c')
-rw-r--r--applets/notification_area/main.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 6818ce5e..46d8ea48 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -64,15 +64,22 @@ static GfStatusNotifierWatcher *sn_watcher_service = NULL;
static GfStatusNotifierWatcher *
sn_watcher_service_ref (void)
{
- if (sn_watcher_service != NULL)
- g_object_ref (sn_watcher_service);
- else
+ GSettings *settings;
+ settings = g_settings_new ("org.mate.panel");
+
+ if (g_settings_get_boolean (settings, "enable-sni-support") == TRUE)
{
- sn_watcher_service = gf_status_notifier_watcher_new ();
- g_object_add_weak_pointer ((GObject *) sn_watcher_service,
- (gpointer *) &sn_watcher_service);
+ if (sn_watcher_service != NULL)
+ g_object_ref (sn_watcher_service);
+ else
+ {
+ sn_watcher_service = gf_status_notifier_watcher_new ();
+ g_object_add_weak_pointer ((GObject *) sn_watcher_service,
+ (gpointer *) &sn_watcher_service);
+ }
}
+ g_object_unref (settings);
return sn_watcher_service;
}
#endif