summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-08-11 14:46:32 -0400
committerlukefromdc <[email protected]>2017-08-13 14:37:24 -0400
commit4d347a9afca23731a4751f8761b1974e4f1ef16f (patch)
tree1d7c8c3b35e388b95a1a29ba04ede9b5037bd258
parent3394aaf65aca94ed93bba19f5fb4b56a3d33b139 (diff)
downloadmate-panel-4d347a9afca23731a4751f8761b1974e4f1ef16f.tar.bz2
mate-panel-4d347a9afca23731a4751f8761b1974e4f1ef16f.tar.xz
fish: fix adding back after removal
These two "changed" functions get triggered by clearing gsettings values on exit, make them return immediately when this happens. Don't return from dispose on repeat call or applet can't be added back
-rw-r--r--applets/fish/fish.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/applets/fish/fish.c b/applets/fish/fish.c
index 4685b9d6..95b22833 100644
--- a/applets/fish/fish.c
+++ b/applets/fish/fish.c
@@ -995,6 +995,9 @@ static void display_fortune_dialog(FishApplet* fish)
static void name_changed_notify(GSettings* settings, gchar* key, FishApplet* fish)
{
+ if (fish->source_id == 0)
+ return;
+
char *value;
value = g_settings_get_string (settings, key);
@@ -1020,6 +1023,9 @@ static void name_changed_notify(GSettings* settings, gchar* key, FishApplet* fis
static void image_changed_notify(GSettings* settings, gchar* key, FishApplet* fish)
{
+ if (fish->source_id == 0)
+ return;
+
char *value;
value = g_settings_get_string (settings, key);
@@ -1772,9 +1778,6 @@ static void fish_applet_dispose (GObject *object)
{
FishApplet* fish = (FishApplet*) object;
- if (fish->source_id == 0)
- return;
-
if (fish->timeout)
{
g_source_remove (fish->timeout);