chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build-sys: add stub makefiles to subdirs
[elogind.git]
/
src
/
gnome-ask-password-agent.vala
diff --git
a/src/gnome-ask-password-agent.vala
b/src/gnome-ask-password-agent.vala
index 4f89a3e6d8bb8f1c70052fe32b12736e82e03110..e23aedbfee435e22b1db545a742e4cd091b82920 100644
(file)
--- a/
src/gnome-ask-password-agent.vala
+++ b/
src/gnome-ask-password-agent.vala
@@
-37,13
+37,8
@@
public class PasswordDialog : Dialog {
set_default_response(ResponseType.OK);
set_icon_name(icon);
set_default_response(ResponseType.OK);
set_icon_name(icon);
-#if LIBNOTIFY07
add_button(Stock.CANCEL, ResponseType.CANCEL);
add_button(Stock.OK, ResponseType.OK);
add_button(Stock.CANCEL, ResponseType.CANCEL);
add_button(Stock.OK, ResponseType.OK);
-#else
- add_button(STOCK_CANCEL, ResponseType.CANCEL);
- add_button(STOCK_OK, ResponseType.OK);
-#endif
Container content = (Container) get_content_area();
Container content = (Container) get_content_area();
@@
-91,7
+86,7
@@
public class MyStatusIcon : StatusIcon {
GLib.Object(icon_name : "dialog-password");
set_title("System Password Request");
GLib.Object(icon_name : "dialog-password");
set_title("System Password Request");
- directory = File.new_for_path("/
var/
run/systemd/ask-password/");
+ directory = File.new_for_path("/run/systemd/ask-password/");
file_monitor = directory.monitor_directory(0);
file_monitor.changed.connect(file_monitor_changed);
file_monitor = directory.monitor_directory(0);
file_monitor.changed.connect(file_monitor_changed);
@@
-165,7
+160,7
@@
public class MyStatusIcon : StatusIcon {
if (not_after_as_string.scanf("%llu", out not_after) != 1)
return false;
if (not_after_as_string.scanf("%llu", out not_after) != 1)
return false;
- if (not_after < now)
+ if (not_after
> 0 && not_after
< now)
return false;
socket = key_file.get_string("Ask", "Socket");
return false;
socket = key_file.get_string("Ask", "Socket");
@@
-190,12
+185,7
@@
public class MyStatusIcon : StatusIcon {
set_visible(true);
set_visible(true);
-#if LIBNOTIFY07
Notification n = new Notification(title, message, icon);
Notification n = new Notification(title, message, icon);
-#else
- Notification n = new Notification(title, message, icon, null);
- n.attach_to_status_icon(this);
-#endif
n.set_timeout(5000);
n.show();
n.set_timeout(5000);
n.show();