summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neumair <chris@gnome-de.org>2005-05-16 16:25:03 +0000
committerChristian Neumair <cneumair@src.gnome.org>2005-05-16 16:25:03 +0000
commit12146eaaf67e129be1ebf44ec430cdcb8db0cd50 (patch)
tree52a5d88774edb50709bfc6535415bb604e041463
parentd99b191ff097c258a0c0d3c952ae25a455308c59 (diff)
downloadnautilus-12146eaaf67e129be1ebf44ec430cdcb8db0cd50.tar.gz
Add "Properties" item to background context menu which displays the
2005-05-16 Christian Neumair <chris@gnome-de.org> * src/file-manager/fm-actions.h: * src/file-manager/fm-directory-view.c: (action_self_properties_callback), (real_update_menus): * src/file-manager/nautilus-directory-view-ui.xml: Add "Properties" item to background context menu which displays the properties of the currently displayed folder.
-rw-r--r--ChangeLog9
-rw-r--r--src/file-manager/fm-actions.h1
-rw-r--r--src/file-manager/fm-directory-view.c26
-rw-r--r--src/file-manager/nautilus-directory-view-ui.xml5
4 files changed, 41 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a67545124..4f07440c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-05-16 Christian Neumair <chris@gnome-de.org>
+
+ * src/file-manager/fm-actions.h:
+ * src/file-manager/fm-directory-view.c:
+ (action_self_properties_callback), (real_update_menus):
+ * src/file-manager/nautilus-directory-view-ui.xml:
+ Add "Properties" item to background context menu which displays
+ the properties of the currently displayed folder.
+
2005-05-16 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-bookmark.c:
diff --git a/src/file-manager/fm-actions.h b/src/file-manager/fm-actions.h
index 64b46c244..432a1b2e6 100644
--- a/src/file-manager/fm-actions.h
+++ b/src/file-manager/fm-actions.h
@@ -32,6 +32,7 @@
#define FM_ACTION_NEW_FOLDER "New Folder"
#define FM_ACTION_PROPERTIES "Properties"
#define FM_ACTION_PROPERTIES_ACCEL "PropertiesAccel"
+#define FM_ACTION_SELF_PROPERTIES "SelfProperties"
#define FM_ACTION_NO_TEMPLATES "No Templates"
#define FM_ACTION_EMPTY_TRASH "Empty Trash"
#define FM_ACTION_CUT "Cut"
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 2d0ecfb70..f25d5de4d 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -1134,6 +1134,23 @@ action_properties_callback (GtkAction *action,
nautilus_file_list_free (selection);
}
+static void
+action_self_properties_callback (GtkAction *action,
+ gpointer callback_data)
+{
+ FMDirectoryView *view;
+ GList *files;
+
+ g_assert (FM_IS_DIRECTORY_VIEW (callback_data));
+
+ view = FM_DIRECTORY_VIEW (callback_data);
+ files = g_list_append (NULL, view->details->directory_as_file);
+
+ fm_properties_window_present (files, GTK_WIDGET (view));
+
+ nautilus_file_list_free (files);
+}
+
static gboolean
all_files_in_trash (GList *files)
{
@@ -5800,6 +5817,10 @@ static GtkActionEntry directory_view_entries[] = {
"PropertiesAccel", "<control>I", /* label, accelerator */
NULL, /* tooltip */
G_CALLBACK (action_properties_callback) },
+ { "SelfProperties", GTK_STOCK_PROPERTIES, /* name, stock id */
+ N_("_Properties"), NULL, /* label, accelerator */
+ N_("View or modify the properties of the open folder"), /* tooltip */
+ G_CALLBACK (action_self_properties_callback) },
{ "New Folder", NULL, /* name, stock id */
N_("Create _Folder"), "<control><shift>N", /* label, accelerator */
N_("Create a new empty folder inside this folder"), /* tooltip */
@@ -6392,6 +6413,11 @@ real_update_menus (FMDirectoryView *view)
fm_directory_view_supports_properties (view));
action = gtk_action_group_get_action (view->details->dir_action_group,
+ FM_ACTION_SELF_PROPERTIES);
+ gtk_action_set_sensitive (action,
+ fm_directory_view_supports_properties (view));
+
+ action = gtk_action_group_get_action (view->details->dir_action_group,
FM_ACTION_EMPTY_TRASH);
g_object_set (action,
"label", _("_Empty Trash"),
diff --git a/src/file-manager/nautilus-directory-view-ui.xml b/src/file-manager/nautilus-directory-view-ui.xml
index 8d5b1c492..135a7e480 100644
--- a/src/file-manager/nautilus-directory-view-ui.xml
+++ b/src/file-manager/nautilus-directory-view-ui.xml
@@ -92,6 +92,11 @@
<menuitem name="Paste" action="Paste"/>
</placeholder>
</placeholder>
+ <separator name="Folder Items separator"/>
+ <placeholder name="Folder Items Placeholder">
+ <menuitem name="SelfProperties" action="SelfProperties"/>
+ </placeholder>
+
</popup>
<popup name="selection">
<placeholder name="Open Placeholder">