public MyStatusIcon() throws GLib.Error {
GLib.Object(icon_name : "dialog-password");
- set_title("System Password");
+ set_title("System Password Request");
- directory = File.new_for_path("/dev/.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);
if (current == null)
set_visible(false);
-
}
bool load_password() throws GLib.Error {
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");
} catch (GLib.Error e) {
message = "Please Enter System Password!";
}
+
set_tooltip_text(message);
try {
null);
OutputStream stream = new UnixOutputStream(to_process, true);
-
-#if LIBNOTIFY07
+#if VALA_0_12
stream.write(password.data, null);
#else
stream.write(password, password.length, null);