[gnome-documents/wip/abono/sort-by: 5/5] view-menu: Add sort options in the popover
- From: Alessandro Bono <abono src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/wip/abono/sort-by: 5/5] view-menu: Add sort options in the popover
- Date: Tue, 17 Nov 2015 13:55:28 +0000 (UTC)
commit 8f41d2644ee38a5ec79370ef1b29e26390bd6ff8
Author: Alessandro Bono <abono gnome org>
Date: Tue Nov 10 00:55:22 2015 +0100
view-menu: Add sort options in the popover
https://bugzilla.gnome.org/show_bug.cgi?id=683563
data/ui/view-menu.ui | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/mainToolbar.js | 2 +-
2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/view-menu.ui b/data/ui/view-menu.ui
index 289308f..301b42f 100644
--- a/data/ui/view-menu.ui
+++ b/data/ui/view-menu.ui
@@ -52,6 +52,60 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkSeparator">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Sort</property>
+ <property name="margin-start">12</property>
+ <style>
+ <class name="separator"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">Author</property>
+ <property name="action-name">app.sort-by</property>
+ <property name="action-target">'secondary-text'</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">Date</property>
+ <property name="action-name">app.sort-by</property>
+ <property name="action-target">'mtime'</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkModelButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="text" translatable="yes">Name</property>
+ <property name="action-name">app.sort-by</property>
+ <property name="action-target">'primary-text'</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
</child>
</object>
diff --git a/src/mainToolbar.js b/src/mainToolbar.js
index 27e050b..ea21411 100644
--- a/src/mainToolbar.js
+++ b/src/mainToolbar.js
@@ -151,7 +151,7 @@ const OverviewToolbar = new Lang.Class({
builder.add_from_resource('/org/gnome/Documents/ui/view-menu.ui');
let viewMenu = builder.get_object('viewMenu');
- this._viewMenuButton = new Gtk.MenuButton({ tooltip_text: _("View items as a list or a grid"),
+ this._viewMenuButton = new Gtk.MenuButton({ tooltip_text: _("View Menu"),
popover: viewMenu });
this.toolbar.pack_end(this._viewMenuButton);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]