[gnome-boxes] properties-toolbar: Content for file chooser view
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] properties-toolbar: Content for file chooser view
- Date: Fri, 5 Dec 2014 22:00:17 +0000 (UTC)
commit 3a60e4f91b31a51de5299b802b25b34eb942f20b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Dec 3 17:31:11 2014 +0000
properties-toolbar: Content for file chooser view
The properties topbar should provide a different set of controls and
title when file chooser view is visible in the properties window.
https://bugzilla.gnome.org/show_bug.cgi?id=741047
data/ui/properties-toolbar.ui | 35 +++++++++++++++++++++++++++++++++++
src/properties-toolbar.vala | 5 +++++
2 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/data/ui/properties-toolbar.ui b/data/ui/properties-toolbar.ui
index 6e858ed..dee634c 100644
--- a/data/ui/properties-toolbar.ui
+++ b/data/ui/properties-toolbar.ui
@@ -122,5 +122,40 @@
</packing>
</child>
+ <!-- File chooser page -->
+ <child>
+ <object class="GtkHeaderBar" id="file_chooser">
+ <property name="visible">True</property>
+ <property name="show-close-button">True</property>
+ <property name="title" translatable="yes">Select a device or ISO file</property>
+ <style>
+ <class name="titlebar"/>
+ </style>
+
+ <child>
+ <object class="GtkButton" id="file_chooser_cancel_button">
+ <property name="visible">True</property>
+ <property name="valign">center</property>
+ <property name="use-underline">True</property>
+ <property name="label" translatable="yes">_Cancel</property>
+ <signal name="clicked" handler="on_file_chooser_cancel_clicked"/>
+ <style>
+ <class name="text-button"/>
+ </style>
+
+ </object>
+
+ <packing>
+ <property name="pack-type">start</property>
+ </packing>
+ </child>
+
+ </object>
+
+ <packing>
+ <property name="name">file_chooser</property>
+ </packing>
+ </child>
+
</template>
</interface>
diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala
index d84d613..07641eb 100644
--- a/src/properties-toolbar.vala
+++ b/src/properties-toolbar.vala
@@ -65,6 +65,11 @@ private class Boxes.PropertiesToolbar: Gtk.Stack {
}
[GtkCallback]
+ private void on_file_chooser_cancel_clicked () requires (page == PropsWindowPage.FILE_CHOOSER) {
+ props_window.page = PropsWindowPage.MAIN;
+ }
+
+ [GtkCallback]
private void on_title_entry_changed () {
window.current_item.name = title_entry.text;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]