summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-10-12 01:36:15 -0400
committerraveit65 <[email protected]>2017-11-18 10:14:58 +0100
commit8653bf4960f14810dc347d27f1f7e2d6660399ba (patch)
treedee0e3b24e7897461a858affb8c8668ecc5299a5 /src/main.c
parentbc44ea83888d5fadcea594c5058738f825e8e80d (diff)
downloadmate-polkit-8653bf4960f14810dc347d27f1f7e2d6660399ba.tar.bz2
mate-polkit-8653bf4960f14810dc347d27f1f7e2d6660399ba.tar.xz
Fix reshow/hide icon with statusnotifier
Requires change to mate-panel to work, but without this change the mate-panel change only lets the icon show once
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index f3d5b74..68f34ef 100644
--- a/src/main.c
+++ b/src/main.c
@@ -174,6 +174,10 @@ update_temporary_authorization_icon_real (void)
app_indicator_set_status (app_indicator,
APP_INDICATOR_STATUS_ACTIVE);
}
+ else
+ /*Reshow icon from existing appindicator */
+ app_indicator_set_status (app_indicator,
+ APP_INDICATOR_STATUS_ACTIVE);
#else
if (status_icon == NULL)
@@ -198,10 +202,9 @@ update_temporary_authorization_icon_real (void)
#ifdef HAVE_APPINDICATOR
if (app_indicator != NULL)
{
+ /* keep the app_indicator, hide the icon or it won't come back*/
app_indicator_set_status (app_indicator,
APP_INDICATOR_STATUS_PASSIVE);
- g_object_unref (app_indicator);
- app_indicator = NULL;
}
#else
if (status_icon != NULL)