forked from cromer/pamac-classic
fix #34
This commit is contained in:
parent
99d827def6
commit
83bd32c279
@ -34,6 +34,7 @@ namespace Pamac {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public class TrayIcon: Gtk.Application {
|
public class TrayIcon: Gtk.Application {
|
||||||
|
Notify.Notification notification;
|
||||||
Daemon daemon;
|
Daemon daemon;
|
||||||
bool locked;
|
bool locked;
|
||||||
uint refresh_timeout_id;
|
uint refresh_timeout_id;
|
||||||
@ -93,16 +94,16 @@ namespace Pamac {
|
|||||||
|
|
||||||
void execute_updater () {
|
void execute_updater () {
|
||||||
try {
|
try {
|
||||||
Process.spawn_async(null, new string[]{"/usr/bin/pamac-updater"}, null, SpawnFlags.SEARCH_PATH, null, null);
|
Process.spawn_command_line_async ("pamac-updater");
|
||||||
} catch (Error e) {
|
} catch (SpawnError e) {
|
||||||
print(e.message);
|
print(e.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void execute_manager () {
|
void execute_manager () {
|
||||||
try {
|
try {
|
||||||
Process.spawn_async(null, new string[]{"/usr/bin/pamac-manager"}, null, SpawnFlags.SEARCH_PATH, null, null);
|
Process.spawn_command_line_async ("pamac-manager");
|
||||||
} catch (Error e) {
|
} catch (SpawnError e) {
|
||||||
print(e.message);
|
print(e.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,7 +149,7 @@ namespace Pamac {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void show_notification (string info) {
|
void show_notification (string info) {
|
||||||
//~ var notification = new Notification (_("Update Manager"));
|
//~ notification = new Notification (_("Update Manager"));
|
||||||
//~ notification.set_body (info);
|
//~ notification.set_body (info);
|
||||||
//~ Gtk.IconTheme icon_theme = Gtk.IconTheme.get_default ();
|
//~ Gtk.IconTheme icon_theme = Gtk.IconTheme.get_default ();
|
||||||
//~ Gdk.Pixbuf icon = icon_theme.load_icon ("system-software-update", 32, 0);
|
//~ Gdk.Pixbuf icon = icon_theme.load_icon ("system-software-update", 32, 0);
|
||||||
@ -159,7 +160,7 @@ namespace Pamac {
|
|||||||
//~ notification.add_button (_("Show available updates"), "app.update");
|
//~ notification.add_button (_("Show available updates"), "app.update");
|
||||||
//~ this.send_notification (_("Update Manager"), notification);
|
//~ this.send_notification (_("Update Manager"), notification);
|
||||||
try {
|
try {
|
||||||
var notification = new Notify.Notification (_("Update Manager"), info, "system-software-update");
|
notification = new Notify.Notification (_("Update Manager"), info, "system-software-update");
|
||||||
notification.add_action ("update", _("Show available updates"), execute_updater);
|
notification.add_action ("update", _("Show available updates"), execute_updater);
|
||||||
notification.show ();
|
notification.show ();
|
||||||
} catch (Error e) {
|
} catch (Error e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user