summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Laß <bevan@bi-co.net>2013-08-18 22:14:34 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-08-23 12:38:39 -0400
commitcbb9d743bd55790aecf27f05404c734fce61144c (patch)
tree4e55b7e43d91cdb3ef73c74dd367edbfc19ab51b
parentb4063d4e8e0fbbfdb67bce5a7422f11fba8b6893 (diff)
gnome-ask-password-agent: make icon visible _after_ notification was closed
This fixes an issue where the tray icon disappears after the notification is closed, though no action has been triggered and there is still a password to enter.
-rw-r--r--src/gnome-ask-password-agent.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala
index 8a5346d3..4d852c24 100644
--- a/src/gnome-ask-password-agent.vala
+++ b/src/gnome-ask-password-agent.vala
@@ -80,6 +80,7 @@ public class MyStatusIcon : StatusIcon {
string socket;
PasswordDialog password_dialog;
+ Notification n;
public MyStatusIcon() throws GLib.Error {
GLib.Object(icon_name : "dialog-password");
@@ -182,10 +183,11 @@ public class MyStatusIcon : StatusIcon {
}
set_from_icon_name(icon);
- set_visible(true);
-
- Notification n = new Notification(title, message, icon);
+ n = new Notification(title, message, icon);
n.set_timeout(5000);
+ n.closed.connect(() => {
+ set_visible(true);
+ });
n.show();
return true;