[nautilus-actions] Define three new buttons to sort the items list
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Define three new buttons to sort the items list
- Date: Tue, 23 Mar 2010 23:35:00 +0000 (UTC)
commit 758a99693657858f6d825e062a17ee6864939d7c
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Mar 24 00:00:15 2010 +0100
Define three new buttons to sort the items list
ChangeLog | 11 +++
src/nact/Makefile.am | 2 +
src/nact/nact-main-window.c | 5 ++
src/nact/nautilus-actions-config-tool.ui | 109 ++++++++++++++++++++++++------
4 files changed, 107 insertions(+), 20 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f9cbed2..c2c60d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2009-03-23 Pierre Wieser <pwieser trychlos org>
+ Add buttons to sort the list.
+
+ * src/nact/nact-sort-buttons.c:
+ * src/nact/nact-sort-buttons.h: New files.
+
+ * src/nact/Makefile.am:
+ * src/nact/nact-main-window.c: Updated accordingly.
+
+ * src/nact/nautilus-actions-config-tool.ui:
+ Define three new buttons to help to sort the list of items.
+
* src/core/Makefile.am:
No more give a version number to the core library.
diff --git a/src/nact/Makefile.am b/src/nact/Makefile.am
index b4cd1e9..3342203 100644
--- a/src/nact/Makefile.am
+++ b/src/nact/Makefile.am
@@ -126,6 +126,8 @@ nautilus_actions_config_tool_SOURCES = \
nact-providers-list.h \
nact-schemes-list.c \
nact-schemes-list.h \
+ nact-sort-buttons.c \
+ nact-sort-buttons.h \
nact-tree-model.c \
nact-tree-model.h \
nact-tree-model-dnd.c \
diff --git a/src/nact/nact-main-window.c b/src/nact/nact-main-window.c
index 9b639b6..966712d 100644
--- a/src/nact/nact-main-window.c
+++ b/src/nact/nact-main-window.c
@@ -58,6 +58,7 @@
#include "nact-marshal.h"
#include "nact-main-window.h"
#include "nact-confirm-logout.h"
+#include "nact-sort-buttons.h"
/* private class data
*/
@@ -703,6 +704,7 @@ instance_dispose( GObject *window )
na_object_unref_items( self->private->deleted );
nact_iactions_list_dispose( NACT_IACTIONS_LIST( window ));
+ nact_sort_buttons_dispose( self );
nact_iaction_tab_dispose( NACT_IACTION_TAB( window ));
nact_icommand_tab_dispose( NACT_ICOMMAND_TAB( window ));
nact_ifolders_tab_dispose( NACT_IFOLDERS_TAB( window ));
@@ -1024,6 +1026,7 @@ on_base_initial_load_toplevel( NactMainWindow *window, gpointer user_data )
nact_iactions_list_set_management_mode( NACT_IACTIONS_LIST( window ), IACTIONS_LIST_MANAGEMENT_MODE_EDITION );
nact_iactions_list_initial_load_toplevel( NACT_IACTIONS_LIST( window ));
+ nact_sort_buttons_initial_load( window );
nact_iaction_tab_initial_load_toplevel( NACT_IACTION_TAB( window ));
nact_icommand_tab_initial_load_toplevel( NACT_ICOMMAND_TAB( window ));
@@ -1075,6 +1078,7 @@ on_base_runtime_init_toplevel( NactMainWindow *window, gpointer user_data )
/* fill the IActionsList at last so that all signals are connected
*/
nact_iactions_list_runtime_init_toplevel( NACT_IACTIONS_LIST( window ), tree );
+ nact_sort_buttons_runtime_init( window );
/* this to update the title when an item is modified
*/
@@ -1109,6 +1113,7 @@ on_base_all_widgets_showed( NactMainWindow *window, gpointer user_data )
nact_iadvanced_tab_all_widgets_showed( NACT_IADVANCED_TAB( window ));
nact_iactions_list_all_widgets_showed( NACT_IACTIONS_LIST( window ));
+ nact_sort_buttons_all_widgets_showed( window );
}
}
diff --git a/src/nact/nautilus-actions-config-tool.ui b/src/nact/nautilus-actions-config-tool.ui
index 090bbfa..144ea89 100644
--- a/src/nact/nautilus-actions-config-tool.ui
+++ b/src/nact/nautilus-actions-config-tool.ui
@@ -44,13 +44,64 @@
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
- <object class="GtkLabel" id="ActionsListLabel">
+ <object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">4</property>
- <property name="ypad">4</property>
- <property name="label" translatable="yes">Actions _list :</property>
- <property name="use_underline">True</property>
+ <child>
+ <object class="GtkLabel" id="ActionsListLabel">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xpad">4</property>
+ <property name="ypad">4</property>
+ <property name="label" translatable="yes">Actions _list :</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="SortUpButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Sort the list in ascending alphabetical order.</property>
+ <property name="image">ImageUp</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="SortManualButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Do not sort the list, letting you manually reorder the items.</property>
+ <property name="image">ImageManual</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkToggleButton" id="SortDownButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Sort the list in descending alphabetical order.</property>
+ <property name="image">ImageDown</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -162,12 +213,6 @@ Menus are always candidate if they contain at least one action.</property>
</packing>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<object class="GtkCheckButton" id="ActionTargetLocationButton">
<property name="label" translatable="yes">Display item in _location context menu</property>
<property name="visible">True</property>
@@ -185,6 +230,12 @@ Menus are always candidate if they contain at least one action.</property>
<property name="bottom_attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">0</property>
@@ -1359,6 +1410,9 @@ Defining several profiles lets you have several commands, each applying with a d
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="label" translatable="yes">This assistant will guide you through the process of importing items, actions or menus.</property>
@@ -1374,9 +1428,9 @@ Defining several profiles lets you have several commands, each applying with a d
<child>
<object class="GtkFileChooserWidget" id="ImportFileChooser">
<property name="visible">True</property>
+ <property name="select_multiple">True</property>
<property name="use_preview_label">False</property>
<property name="preview_widget_active">False</property>
- <property name="select_multiple">True</property>
<property name="local_only">False</property>
</object>
<packing>
@@ -2154,26 +2208,41 @@ Be warned: this mode may be dangerous. You will not be prompted another time.</p
<property name="visible">True</property>
<property name="stock">gtk-save</property>
</object>
+ <object class="GtkImage" id="ImageDown">
+ <property name="visible">True</property>
+ <property name="stock">gtk-go-down</property>
+ <property name="icon-size">1</property>
+ </object>
+ <object class="GtkImage" id="ImageUp">
+ <property name="visible">True</property>
+ <property name="stock">gtk-go-up</property>
+ <property name="icon-size">1</property>
+ </object>
+ <object class="GtkImage" id="ImageManual">
+ <property name="visible">True</property>
+ <property name="stock">gtk-index</property>
+ <property name="icon-size">1</property>
+ </object>
<object class="GtkSizeGroup" id="CommandLabelSizeGroup">
<widgets>
- <widget name="ProfileLabelLabel"/>
- <widget name="CommandPathLabel"/>
<widget name="CommandParametersLabel"/>
+ <widget name="CommandPathLabel"/>
+ <widget name="ProfileLabelLabel"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="CommandButtonSizeGroup">
<widgets>
- <widget name="CommandPathButton"/>
<widget name="CommandLegendButton"/>
+ <widget name="CommandPathButton"/>
</widgets>
</object>
<object class="GtkSizeGroup" id="ActionLabelSizeGroup">
<widgets>
- <widget name="ActionToolbarLabelLabel"/>
- <widget name="ActionMenuLabelLabel"/>
- <widget name="ActionIdLabel"/>
- <widget name="ActionTooltipLabel"/>
<widget name="ActionIconLabel"/>
+ <widget name="ActionTooltipLabel"/>
+ <widget name="ActionIdLabel"/>
+ <widget name="ActionMenuLabelLabel"/>
+ <widget name="ActionToolbarLabelLabel"/>
</widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]