[gnome-boxes/split-remote-outta-wizard: 4/7] collection-toolbar: Introduce the box creation popover
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/split-remote-outta-wizard: 4/7] collection-toolbar: Introduce the box creation popover
- Date: Mon, 29 Jul 2019 13:18:59 +0000 (UTC)
commit 9d953bcd0518d65b16e63817b886306877d6844f
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Jul 12 17:00:24 2019 +0200
collection-toolbar: Introduce the box creation popover
This popover now just has a single option: "Create a virtual machine",
but it is going to get new entries in this series with the introduction
of the Remote Connection assistant, a new dialog which is decoupled
from the existing wizard (that is going to be left only for virtual
machines).
Related to #306
data/ui/collection-toolbar.ui | 23 ++++++++++++++++++++---
src/collection-toolbar.vala | 2 +-
2 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/collection-toolbar.ui b/data/ui/collection-toolbar.ui
index bd57cfc0..1ee22c03 100644
--- a/data/ui/collection-toolbar.ui
+++ b/data/ui/collection-toolbar.ui
@@ -15,12 +15,12 @@
</child>
<child>
- <object class="GtkButton" id="new_btn">
+ <object class="GtkMenuButton" id="new_btn">
<property name="visible">True</property>
<property name="valign">center</property>
<property name="use-underline">True</property>
<property name="label" translatable="yes">_New</property>
- <signal name="clicked" handler="on_new_btn_clicked"/>
+ <property name="popover">assistant_menu</property>
<style>
<class name="text-button"/>
</style>
@@ -161,7 +161,6 @@
<property name="pack-type">end</property>
</packing>
</child>
-
<child>
<object class="GtkToggleButton" id="search_btn">
<property name="visible">True</property>
@@ -189,4 +188,22 @@
</packing>
</child>
</template>
+
+ <!-- Assistant Popover -->
+ <object class="GtkPopoverMenu" id="assistant_menu">
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="margin">10</property>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">True</property>
+ <property name="text" translatable="yes">Create a Virtual Machineā¦</property>
+ <signal name="clicked" handler="on_new_vm_btn_clicked"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
</interface>
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 3e2d5b0e..4db11a5f 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -61,7 +61,7 @@ public void click_search_button () {
}
[GtkCallback]
- private void on_new_btn_clicked () {
+ private void on_new_vm_btn_clicked () {
window.set_state (UIState.WIZARD);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]