[systemd-commits] 3 commits - src/gnome-ask-password-agent.vala
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Fri Aug 23 09:41:25 PDT 2013
src/gnome-ask-password-agent.vala | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 0bfc54dedd309b3e265fb8d514e58ac1c67811af
Author: Michael Laà <bevan at bi-co.net>
Date: Sun Aug 18 22:14:36 2013 +0200
gnome-ask-password-agent: do not send password when user hits "Cancel"
When the user hits the Cancel button no action should be triggered.
diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala
index ea43b08..571cd94 100644
--- a/src/gnome-ask-password-agent.vala
+++ b/src/gnome-ask-password-agent.vala
@@ -213,7 +213,8 @@ public class MyStatusIcon : StatusIcon {
password_dialog = null;
if (result == ResponseType.REJECT ||
- result == ResponseType.DELETE_EVENT)
+ result == ResponseType.DELETE_EVENT ||
+ result == ResponseType.CANCEL)
return;
Pid child_pid;
commit d622decd21d7beb30155c286e4e9d5587b458050
Author: Michael Laà <bevan at bi-co.net>
Date: Sun Aug 18 22:14:35 2013 +0200
gnome-ask-password-agent: allow user to answer directly to notification
Add a button "Enter password" to the notification, so that the user can
directly react to the notification and does not have to use the tray icon.
diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala
index 4d852c2..ea43b08 100644
--- a/src/gnome-ask-password-agent.vala
+++ b/src/gnome-ask-password-agent.vala
@@ -188,6 +188,7 @@ public class MyStatusIcon : StatusIcon {
n.closed.connect(() => {
set_visible(true);
});
+ n.add_action("enter_pw", "Enter password", status_icon_activate);
n.show();
return true;
commit cbb9d743bd55790aecf27f05404c734fce61144c
Author: Michael Laà <bevan at bi-co.net>
Date: Sun Aug 18 22:14:34 2013 +0200
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.
diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala
index 8a5346d..4d852c2 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;
More information about the systemd-commits
mailing list