diff options
author | Clement Lefebvre <[email protected]> | 2017-08-16 02:30:35 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-11-06 14:47:36 +0100 |
commit | 9fadd2486c2d9fae7057207bca9143fc9421b97b (patch) | |
tree | 6c35301af58de67c78b143fb6dd7f363331e03a4 /applets | |
parent | 6535fefbddb1d2dd6cb93a60789e3a73c57d7fb0 (diff) | |
download | mate-panel-9fadd2486c2d9fae7057207bca9143fc9421b97b.tar.bz2 mate-panel-9fadd2486c2d9fae7057207bca9143fc9421b97b.tar.xz |
Add a gsettings key to enable/disable SNI Support (#600)
Diffstat (limited to 'applets')
-rw-r--r-- | applets/notification_area/main.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c index f4de7d01..9e489932 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 |