This commit is contained in:
guinux 2017-06-03 15:22:29 +02:00
parent ea783f09c5
commit 5daa7abd50
2 changed files with 8 additions and 1 deletions

View File

@ -46,11 +46,18 @@ namespace Pamac {
msg.destroy (); msg.destroy ();
} else { } else {
manager_window = new ManagerWindow (this); manager_window = new ManagerWindow (this);
// quit accel
var action = new SimpleAction ("quit", null); var action = new SimpleAction ("quit", null);
action.activate.connect (() => {this.quit ();}); action.activate.connect (() => {this.quit ();});
this.add_action (action); this.add_action (action);
string[] accels = {"<Control>Q", "<Control>W"}; string[] accels = {"<Control>Q", "<Control>W"};
this.set_accels_for_action ("app.quit", accels); this.set_accels_for_action ("app.quit", accels);
// back accel
action = new SimpleAction ("back", null);
action.activate.connect (() => {manager_window.on_button_back_clicked ();});
this.add_action (action);
accels = {"<Alt>Left"};
this.set_accels_for_action ("app.back", accels);
} }
} }

View File

@ -1052,7 +1052,7 @@ namespace Pamac {
} }
[GtkCallback] [GtkCallback]
void on_button_back_clicked () { public void on_button_back_clicked () {
string? pkgname = display_package_queue.pop_tail (); string? pkgname = display_package_queue.pop_tail ();
if (pkgname != null) { if (pkgname != null) {
AlpmPackage pkg = transaction.get_installed_pkg (pkgname); AlpmPackage pkg = transaction.get_installed_pkg (pkgname);