[PATCH] to add Clear Selection option
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: nautilus-list gnome org
- Subject: [PATCH] to add Clear Selection option
- Date: Mon, 11 Jul 2005 19:17:21 +0200
Hi
The only way to clear the selection is by either selecting a pattern
with no matches, or clicking to an empty space, which does not work in
list view if there are more files that what fits in the screen.
So, this adds a Clear Selection menu item, to deselect all files.
Is it ok to commit?
--
Rodrigo Moya <rodrigo gnome-db org>
? depcomp
? nautilus-folder-handler.desktop
? org.gnome.Nautilus.desktop-service
? org.gnome.Nautilus.service
? org.gnome.Nautilus.service.in
? stamp-h1
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.6587
diff -u -p -r1.6587 ChangeLog
--- ChangeLog 11 Jul 2005 12:10:48 -0000 1.6587
+++ ChangeLog 11 Jul 2005 17:18:51 -0000
@@ -1,3 +1,11 @@
+2005-07-11 Rodrigo Moya <rodrigo novell com>
+
+ * src/file-manager/fm-directory-view.c (action_clear_selection_callback):
+ added 'Clear selection' menu item.
+
+ * src/nautilus-directory-view-ui.xml:
+ * src/file-manager/fm-actions.h: added new action.
+
2005-07-11 Alexander Larsson <alexl redhat com>
* configure.in:
Index: src/file-manager/fm-actions.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-actions.h,v
retrieving revision 1.8
diff -u -p -r1.8 fm-actions.h
--- src/file-manager/fm-actions.h 1 Jul 2005 10:30:33 -0000 1.8
+++ src/file-manager/fm-actions.h 11 Jul 2005 17:18:51 -0000
@@ -47,6 +47,7 @@
#define FM_ACTION_DUPLICATE "Duplicate"
#define FM_ACTION_CREATE_LINK "Create Link"
#define FM_ACTION_SELECT_ALL "Select All"
+#define FM_ACTION_CLEAR_SELECTION "Clear Selection"
#define FM_ACTION_SELECT_PATTERN "Select Pattern"
#define FM_ACTION_TRASH "Trash"
#define FM_ACTION_LOCATION_TRASH "LocationTrash"
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.701
diff -u -p -r1.701 fm-directory-view.c
--- src/file-manager/fm-directory-view.c 11 Jul 2005 10:07:53 -0000 1.701
+++ src/file-manager/fm-directory-view.c 11 Jul 2005 17:18:53 -0000
@@ -982,6 +982,15 @@ action_select_all_callback (GtkAction *a
}
static void
+action_clear_selection_callback (GtkAction *action,
+ gpointer callback_data)
+{
+ g_assert (FM_IS_DIRECTORY_VIEW (callback_data));
+
+ fm_directory_view_set_selection (callback_data, NULL);
+}
+
+static void
pattern_select_response_cb (GtkWidget *dialog, int response, gpointer user_data)
{
FMDirectoryView *view;
@@ -6176,6 +6185,10 @@ static const GtkActionEntry directory_vi
N_("Select _All"), "<control>A", /* label, accelerator */
N_("Select all items in this window"), /* tooltip */
G_CALLBACK (action_select_all_callback) },
+ { "Clear Selection", NULL, /* name, stock id */
+ N_("C_lear Selection"), "<shift><control>A", /* label, accelerator */
+ N_("Clear current selection of files"), /* tooltip */
+ G_CALLBACK (action_clear_selection_callback) },
{ "Select Pattern", NULL, /* name, stock id */
N_("Select _Pattern"), "<control>S", /* label, accelerator */
N_("Select items in this window matching a given pattern"), /* tooltip */
Index: src/file-manager/nautilus-directory-view-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-directory-view-ui.xml,v
retrieving revision 1.76
diff -u -p -r1.76 nautilus-directory-view-ui.xml
--- src/file-manager/nautilus-directory-view-ui.xml 6 Jul 2005 14:02:38 -0000 1.76
+++ src/file-manager/nautilus-directory-view-ui.xml 11 Jul 2005 17:18:53 -0000
@@ -49,6 +49,7 @@
</placeholder>
<placeholder name="Select Items">
<menuitem name="Select All" action="Select All"/>
+ <menuitem name="Clear Selection" action="Clear Selection"/>
<menuitem name="Select Pattern" action="Select Pattern"/>
</placeholder>
<placeholder name="File Items Placeholder">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]