[gnome-boxes/behavior-of-ctrl-plus-n: 2/4] app-window, topbar: Launch VM creation dialog with Ctrl + N



commit fa2b64e0c4d27e50bea17dee048d27f8333b1a96
Author: Felipe Borges <felipeborges gnome org>
Date:   Mon Jan 20 16:33:15 2020 +0100

    app-window, topbar: Launch VM creation dialog with Ctrl + N
    
    Instead of just popping up the menu popover.
    
    Fixes #459

 src/app-window.vala         | 2 +-
 src/collection-toolbar.vala | 4 ----
 src/topbar.vala             | 5 -----
 3 files changed, 1 insertion(+), 10 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 0e99fec1..f1000cd0 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -416,7 +416,7 @@ public bool on_key_pressed (Widget widget, Gdk.EventKey event) {
             return true;
         } else if (event.keyval == Gdk.Key.n &&
                    (event.state & default_modifiers) == Gdk.ModifierType.CONTROL_MASK) {
-            topbar.click_new_button ();
+            show_vm_assistant ();
 
             return true;
         } else if (event.keyval == Gdk.Key.f &&
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 281058a9..6497dd7e 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -56,10 +56,6 @@ public void click_back_button () {
         back_btn.clicked ();
     }
 
-    public void click_new_button () {
-        new_btn.clicked ();
-    }
-
     public void click_search_button () {
         search_btn.clicked ();
     }
diff --git a/src/topbar.vala b/src/topbar.vala
index d8d63ff9..05c3687d 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -40,11 +40,6 @@ public void click_cancel_button () {
             window.selection_mode = false;
     }
 
-    public void click_new_button () {
-        if (window.ui_state == UIState.COLLECTION)
-            collection_toolbar.click_new_button ();
-    }
-
     public void click_search_button () {
         if (window.ui_state == UIState.COLLECTION)
             collection_toolbar.click_search_button ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]