[f-spot] use a Gtk.Action to create the timeline's popup menu
- From: Stephane Delcroix <sdelcroix src gnome org>
- To: svn-commits-list gnome org
- Subject: [f-spot] use a Gtk.Action to create the timeline's popup menu
- Date: Tue, 7 Jul 2009 09:50:37 +0000 (UTC)
commit b4d6c23e26cbf1e0b6933a0718ce6a880870bf1f
Author: Stephane Delcroix <stephane delcroix org>
Date: Tue Jul 7 11:45:35 2009 +0200
use a Gtk.Action to create the timeline's popup menu
src/GroupSelector.cs | 9 ++-------
src/MainWindow.cs | 3 +++
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/GroupSelector.cs b/src/GroupSelector.cs
index 0ad845b..931683f 100644
--- a/src/GroupSelector.cs
+++ b/src/GroupSelector.cs
@@ -509,15 +509,10 @@ namespace FSpot {
{
Gtk.Menu order_menu = new Gtk.Menu();
- GtkUtil.MakeCheckMenuItem (order_menu, Catalog.GetString ("_Reverse Order"),
- MainWindow.Toplevel.HandleReverseOrder, true, adaptor.OrderAscending, false);
+ order_menu.Append (MainWindow.Toplevel.ReverseOrderAction.CreateMenuItem ());
- if (adaptor is TimeAdaptor && adaptor.Query.Range != null) {
- GtkUtil.MakeMenuSeparator (order_menu);
-
- GtkUtil.MakeMenuItem (order_menu, Catalog.GetString ("_Clear Date Range"),
+ GtkUtil.MakeMenuItem (order_menu, Catalog.GetString ("_Clear Date Range"),
MainWindow.Toplevel.HandleClearDateRange);
- }
if (args != null)
order_menu.Popup (null, null, null, args.Button, args.Time);
diff --git a/src/MainWindow.cs b/src/MainWindow.cs
index aa14f0d..2e044ce 100644
--- a/src/MainWindow.cs
+++ b/src/MainWindow.cs
@@ -100,6 +100,9 @@ public class MainWindow {
[GtkBeans.Builder.Object] Gtk.RadioAction tag_icon_large;
[GtkBeans.Builder.Object] Gtk.ToggleAction reverse_order;
+ public Gtk.ToggleAction ReverseOrderAction {
+ get { return reverse_order; }
+ }
// Find
[GtkBeans.Builder.Object] Gtk.Action clear_date_range;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]