[gnome-boxes] app-window: Add forward & back shortcuts in wizard
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] app-window: Add forward & back shortcuts in wizard
- Date: Tue, 11 Mar 2014 19:02:32 +0000 (UTC)
commit 469ff7e4f76c0e03cbd6f06e1cea1b0dc1e6e96c
Author: Lasse Schuirmann <lasse schuirmann net>
Date: Sat Mar 8 16:20:31 2014 +0100
app-window: Add forward & back shortcuts in wizard
Add Alt+Left and Alt+Right shortcuts in the wizard.
https://bugzilla.gnome.org/show_bug.cgi?id=725062
src/app-window.vala | 4 ++++
src/topbar.vala | 10 ++++++++++
src/wizard.vala | 4 ++--
3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 30fc45b..05a7150 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -177,6 +177,10 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
(event.state & default_modifiers) == Gdk.ModifierType.MOD1_MASK) {
App.window.topbar.click_back_button ();
return true;
+ } else if (event.keyval == Gdk.Key.Right && // ALT + Right -> forward
+ (event.state & default_modifiers) == Gdk.ModifierType.MOD1_MASK) {
+ App.window.topbar.click_forward_button ();
+ return true;
}
return false;
diff --git a/src/topbar.vala b/src/topbar.vala
index 551f36b..7d344c8 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -63,9 +63,19 @@ private class Boxes.Topbar: Gtk.Stack, Boxes.UI {
case UIState.CREDS:
back_btn.clicked ();
break;
+ case UIState.WIZARD:
+ if (App.window.wizard.page != WizardPage.INTRODUCTION)
+ wizard_back_btn.clicked ();
+ break;
}
}
+ // Clicks the appropriate forward button dependent on the ui state.
+ public void click_forward_button () {
+ if (App.window.wizard.page != WizardPage.REVIEW)
+ wizard_continue_btn.clicked ();
+ }
+
public string? _status;
public string? status {
get { return _status; }
diff --git a/src/wizard.vala b/src/wizard.vala
index 9339b38..a1c69a0 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -50,9 +50,9 @@ private class Boxes.Wizard: Gtk.Stack, Boxes.UI {
private LibvirtMachine? libvirt_machine { get { return (machine as LibvirtMachine); } }
private WizardPage _page;
- private WizardPage page {
+ public WizardPage page {
get { return _page; }
- set {
+ private set {
back_button.sensitive = value != WizardPage.INTRODUCTION;
var forwards = value > page;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]