forked from cromer/pamac-classic
add Alt+Left (back) and Ctrl+F (search) keybindings
This commit is contained in:
parent
4c903f3679
commit
31d8491874
@ -50,7 +50,7 @@ namespace Pamac {
|
||||
var action = new SimpleAction ("quit", null);
|
||||
action.activate.connect (() => {this.quit ();});
|
||||
this.add_action (action);
|
||||
string[] accels = {"<Control>Q", "<Control>W"};
|
||||
string[] accels = {"<Ctrl>Q", "<Ctrl>W"};
|
||||
this.set_accels_for_action ("app.quit", accels);
|
||||
// back accel
|
||||
action = new SimpleAction ("back", null);
|
||||
@ -58,6 +58,12 @@ namespace Pamac {
|
||||
this.add_action (action);
|
||||
accels = {"<Alt>Left"};
|
||||
this.set_accels_for_action ("app.back", accels);
|
||||
// search accel
|
||||
action = new SimpleAction ("search", null);
|
||||
action.activate.connect (() => {manager_window.filters_stack.visible_child_name = "search";});
|
||||
this.add_action (action);
|
||||
accels = {"<Ctrl>F"};
|
||||
this.set_accels_for_action ("app.search", accels);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace Pamac {
|
||||
[GtkChild]
|
||||
Gtk.TreeViewColumn aur_state_column;
|
||||
[GtkChild]
|
||||
Gtk.Stack filters_stack;
|
||||
public Gtk.Stack filters_stack;
|
||||
[GtkChild]
|
||||
Gtk.StackSwitcher filters_stackswitcher;
|
||||
[GtkChild]
|
||||
|
@ -46,11 +46,18 @@ namespace Pamac {
|
||||
msg.destroy ();
|
||||
} else {
|
||||
updater_window = new UpdaterWindow (this);
|
||||
// quit accel
|
||||
var action = new SimpleAction ("quit", null);
|
||||
action.activate.connect (() => {this.quit ();});
|
||||
this.add_action (action);
|
||||
string[] accels = {"<Control>Q", "<Control>W"};
|
||||
string[] accels = {"<Ctrl>Q", "<Ctrl>W"};
|
||||
this.set_accels_for_action ("app.quit", accels);
|
||||
// back accel
|
||||
action = new SimpleAction ("back", null);
|
||||
action.activate.connect (() => {updater_window.on_button_back_clicked ();});
|
||||
this.add_action (action);
|
||||
accels = {"<Alt>Left"};
|
||||
this.set_accels_for_action ("app.back", accels);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ namespace Pamac {
|
||||
}
|
||||
|
||||
[GtkCallback]
|
||||
void on_button_back_clicked () {
|
||||
public void on_button_back_clicked () {
|
||||
if (aur_scrolledwindow.visible) {
|
||||
stackswitcher.visible = true;
|
||||
stack.visible_child_name = previous_visible_child_name;
|
||||
|
Loading…
Reference in New Issue
Block a user