Re: [PATCH] Allow to mount/unmount volume from within target URI



On Tue, 2006-02-07 at 11:38 +0100, Alexander Larsson wrote:
> On Sun, 2006-02-05 at 14:11 +0100, Christian Neumair wrote:
> > The attached patch is meant to allow the user to modify a volume from
> > within its target directory. It's not very well-tested. For instance,
> > I'm not sure whether not setting the volume in
> > libnautilus-private/nautilus-directory-async.c:link_info_done if the
> > volume_id is NULL causes some problems when unmounting a volume.
> 
> The general approach of having the link-to-volume object set the status
> of the destination is wrong. It means the destination will work
> differently depending on if the link to it is shown.

Here we go. This one adds a new volume monitor which only deals with the
target URIs, and adds context menu entries to the file menu, the
background and the location context menu, and also reorders the
selection-related mount/unmount items to be above "Properties" for
consistency reasons. It extremely improves my Nautilus experience and I
really think it's worth to breaking a few freezes.

-- 
Christian Neumair <chris gnome-de org>
Index: libnautilus-private/Makefile.am
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/Makefile.am,v
retrieving revision 1.251
diff -u -p -r1.251 Makefile.am
--- libnautilus-private/Makefile.am	16 Jan 2006 09:30:58 -0000	1.251
+++ libnautilus-private/Makefile.am	10 Feb 2006 21:30:31 -0000
@@ -201,6 +201,8 @@ libnautilus_private_la_SOURCES = \
 	nautilus-view-factory.h \
 	nautilus-view.c \
 	nautilus-view.h \
+	nautilus-volume-monitor.c \
+	nautilus-volume-monitor.h \
 	nautilus-window-info.c \
 	nautilus-window-info.h \
 	$(NULL)
Index: libnautilus-private/nautilus-volume-monitor.c
===================================================================
RCS file: libnautilus-private/nautilus-volume-monitor.c
diff -N libnautilus-private/nautilus-volume-monitor.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ libnautilus-private/nautilus-volume-monitor.c	10 Feb 2006 21:30:39 -0000
@@ -0,0 +1,264 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
+
+   nautilus-volume-monitor.c: singleton that ensures that volumes
+  			      and drives  are associated with their
+			      target URIs.
+
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+  
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+
+   Author: Christian Neumair <chris gnome-de org>
+*/
+
+#include <config.h>
+#include "nautilus-volume-monitor.h"
+#include "nautilus-file.h"
+#include "nautilus-file-private.h"
+
+#include <eel/eel-debug.h>
+#include <eel/eel-gtk-macros.h>
+#include <libgnomevfs/gnome-vfs.h>
+#include <libgnomevfs/gnome-vfs-volume-monitor.h>
+#include <string.h>
+
+static void nautilus_volume_monitor_init       (NautilusVolumeMonitor      *monitor);
+static void nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *class);
+
+G_DEFINE_TYPE (NautilusVolumeMonitor,
+	       nautilus_volume_monitor,
+	       G_TYPE_OBJECT)
+
+#define parent_class nautilus_volume_monitor_parent_class
+
+static NautilusVolumeMonitor *the_volume_monitor = NULL;
+
+struct NautilusVolumeMonitorDetails {
+	unsigned int volume_mounted_id;
+	unsigned int volume_unmounted_id;
+	unsigned int drive_connected_id;
+	unsigned int drive_disconnected_id;
+};
+
+static void
+destroy_volume_monitor (void)
+{
+	if (the_volume_monitor != NULL) {
+		g_object_unref (the_volume_monitor);
+	}
+}
+
+NautilusVolumeMonitor *
+nautilus_volume_monitor_get (void)
+{
+	if (the_volume_monitor == NULL) {
+		g_object_new (NAUTILUS_TYPE_VOLUME_MONITOR, NULL);
+		eel_debug_call_at_shutdown (destroy_volume_monitor);
+	}
+	return the_volume_monitor;
+}
+
+static void
+volume_mounted_callback (GnomeVFSVolumeMonitor *volume_monitor,
+			 GnomeVFSVolume *volume, 
+			 NautilusVolumeMonitor *monitor)
+{
+	NautilusFile *file;
+	const char *activation_uri;
+
+	file = NULL;
+
+	activation_uri = gnome_vfs_volume_get_activation_uri (volume);
+	if (activation_uri != NULL) {
+		file = nautilus_file_get (activation_uri);
+	}
+
+	if (file != NULL) {
+		nautilus_file_set_volume (file, volume);
+	}
+}
+
+
+static void
+volume_unmounted_callback (GnomeVFSVolumeMonitor *volume_monitor,
+			   GnomeVFSVolume *volume, 
+			   NautilusVolumeMonitor *monitor)
+{
+	NautilusFile *file;
+	const char *activation_uri;
+
+	file = NULL;
+
+	activation_uri = gnome_vfs_volume_get_activation_uri (volume);
+	if (activation_uri != NULL) {
+		file = nautilus_file_get (activation_uri);
+	}
+
+	if (file != NULL && nautilus_file_get_volume (file) == volume) {
+		nautilus_file_set_volume (file, NULL);
+	}
+}
+
+static void
+drive_connected_callback (GnomeVFSVolumeMonitor *volume_monitor,
+			  GnomeVFSDrive *drive,
+			  NautilusVolumeMonitor *monitor)
+{
+	NautilusFile *file;
+	const char *activation_uri;
+
+	file = NULL;
+
+	activation_uri = gnome_vfs_drive_get_activation_uri (drive);
+	if (activation_uri != NULL) {
+		file = nautilus_file_get (activation_uri);
+	}
+
+	if (file != NULL) {
+		nautilus_file_set_drive (file, NULL);
+	}
+}
+
+static void
+drive_disconnected_callback (GnomeVFSVolumeMonitor *volume_monitor,
+			     GnomeVFSDrive *drive,
+			     NautilusVolumeMonitor *monitor)
+{
+	NautilusFile *file;
+	const char *activation_uri;
+
+	file = NULL;
+
+	activation_uri = gnome_vfs_drive_get_activation_uri (drive);
+	if (activation_uri != NULL) {
+		file = nautilus_file_get (activation_uri);
+	}
+
+	if (file != NULL && nautilus_file_get_drive (file) == drive) {
+		nautilus_file_set_drive (file, NULL);
+	}
+}
+
+static void
+nautilus_volume_monitor_init (NautilusVolumeMonitor *monitor)
+{
+	GnomeVFSVolumeMonitor *volume_monitor;
+
+	GList *l, *volumes, *drives;
+	GnomeVFSVolume *volume;
+	GnomeVFSDrive *drive;
+
+	NautilusFile *file;
+	const char *activation_uri;
+
+	monitor = NAUTILUS_VOLUME_MONITOR (monitor);
+
+	the_volume_monitor = monitor;
+
+	monitor->details = g_new0 (NautilusVolumeMonitorDetails, 1);
+	volume_monitor = gnome_vfs_get_volume_monitor ();
+
+	volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor);
+
+	for (l = volumes; l != NULL; l = l->next) {
+		volume = l->data;
+
+		file = NULL;
+
+		activation_uri = gnome_vfs_volume_get_activation_uri (volume);
+		if (activation_uri != NULL) {
+			file = nautilus_file_get (activation_uri);
+		}
+
+		if (file != NULL) {
+			nautilus_file_set_volume (file, volume);
+		}
+
+		gnome_vfs_volume_unref (volume);
+	}
+
+	g_list_free (volumes);
+
+	drives = gnome_vfs_volume_monitor_get_connected_drives (volume_monitor);
+
+	for (l = drives; l != NULL; l = l->next) {
+		drive = l->data;
+
+		file = NULL;
+
+		activation_uri = gnome_vfs_drive_get_activation_uri (drive);
+		if (activation_uri != NULL) {
+			file = nautilus_file_get (activation_uri);
+		}
+
+		if (file != NULL) {
+			nautilus_file_set_drive (file, drive);
+		}
+
+		gnome_vfs_drive_unref (drive);
+	}
+
+	g_list_free (drives);
+
+
+	monitor->details->volume_mounted_id = g_signal_connect_object (volume_monitor, "volume_mounted",
+								       G_CALLBACK (volume_mounted_callback), monitor, 0);
+	monitor->details->volume_unmounted_id = g_signal_connect_object (volume_monitor, "volume_unmounted",
+									 G_CALLBACK (volume_unmounted_callback), monitor, 0);
+
+	monitor->details->drive_connected_id = g_signal_connect_object (volume_monitor, "drive_connected",
+									G_CALLBACK (drive_connected_callback), monitor, 0);
+	monitor->details->drive_disconnected_id = g_signal_connect_object (volume_monitor, "drive_disconnected",
+									   G_CALLBACK (drive_disconnected_callback), monitor, 0);
+}
+
+static void
+volume_monitor_finalize (GObject *object)
+{
+	NautilusVolumeMonitor *monitor;
+
+	monitor = NAUTILUS_VOLUME_MONITOR (object);
+
+	if (monitor->details->volume_mounted_id != 0) {
+		g_source_remove (monitor->details->volume_mounted_id);
+	}
+
+	if (monitor->details->volume_unmounted_id != 0) {
+		g_source_remove (monitor->details->volume_unmounted_id);
+	}
+
+	if (monitor->details->drive_connected_id != 0) {
+		g_source_remove (monitor->details->drive_connected_id);
+	}
+
+	if (monitor->details->drive_disconnected_id != 0) {
+		g_source_remove (monitor->details->drive_disconnected_id);
+	}
+
+	g_free (monitor->details);
+
+	EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+}
+
+static void
+nautilus_volume_monitor_class_init (NautilusVolumeMonitorClass *class)
+{
+	GObjectClass *object_class;
+
+	object_class = G_OBJECT_CLASS (class);
+
+	object_class->finalize = volume_monitor_finalize;
+}
Index: libnautilus-private/nautilus-volume-monitor.h
===================================================================
RCS file: libnautilus-private/nautilus-volume-monitor.h
diff -N libnautilus-private/nautilus-volume-monitor.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ libnautilus-private/nautilus-volume-monitor.h	10 Feb 2006 21:30:39 -0000
@@ -0,0 +1,58 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
+
+   nautilus-volume-monitor.h: singleton that ensures that volumes
+  			      and drives  are associated with their
+			      target URIs.
+
+   Copyright (C) 2006 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public
+   License along with this program; if not, write to the
+   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.
+
+   Author: Christian Neumair <chris gnome-de org>
+*/
+
+#ifndef NAUTILUS_VOLUME_MONITOR_H
+#define NAUTILUS_VOLUME_MONITOR_H
+
+#include <glib-object.h>
+
+#define NAUTILUS_TYPE_VOLUME_MONITOR \
+	(nautilus_volume_monitor_get_type ())
+#define NAUTILUS_VOLUME_MONITOR(obj) \
+	(GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_VOLUME_MONITOR, NautilusVolumeMonitor))
+#define NAUTILUS_VOLUME_MONITOR_CLASS(klass) \
+	(GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_VOLUME_MONITOR, NautilusVolumeMonitor))
+#define NAUTILUS_IS_VOLUME_MONITOR(obj) \
+	(GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_VOLUME_MONITOR))
+#define NAUTILUS_IS_VOLUME_MONITOR_CLASS(klass) \
+	(GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_VOLUME_MONITOR))
+
+typedef struct NautilusVolumeMonitorDetails NautilusVolumeMonitorDetails;
+
+typedef struct {
+	GObject parent;
+	NautilusVolumeMonitorDetails *details;
+} NautilusVolumeMonitor;
+
+typedef struct {
+	GObjectClass parent_class;
+} NautilusVolumeMonitorClass;
+
+GType                  nautilus_volume_monitor_get_type (void);
+
+NautilusVolumeMonitor *nautilus_volume_monitor_get      (void);
+
+#endif /* NAUTILUS_VOLUME_MONITOR_H */
Index: src/nautilus-application.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-application.c,v
retrieving revision 1.238
diff -u -p -r1.238 nautilus-application.c
--- src/nautilus-application.c	9 Dec 2005 14:35:32 -0000	1.238
+++ src/nautilus-application.c	10 Feb 2006 21:30:39 -0000
@@ -83,6 +83,7 @@
 #include <libnautilus-private/nautilus-undo-manager.h>
 #include <libnautilus-private/nautilus-desktop-link-monitor.h>
 #include <libnautilus-private/nautilus-directory-private.h>
+#include <libnautilus-private/nautilus-volume-monitor.h>
 #include <bonobo-activation/bonobo-activation.h>
 #ifdef HAVE_STARTUP_NOTIFICATION
 #define SN_API_NOT_YET_FROZEN Yes_i_know_DO_IT
@@ -369,6 +370,9 @@ finish_startup (NautilusApplication *app
 
 	/* Initialize the desktop link monitor singleton */
 	nautilus_desktop_link_monitor_get ();
+
+	/* Initialize the volume monitor singleton */
+	nautilus_volume_monitor_get ();
 }
 
 static void
Index: src/file-manager/fm-actions.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-actions.h,v
retrieving revision 1.10
diff -u -p -r1.10 fm-actions.h
--- src/file-manager/fm-actions.h	12 Dec 2005 16:59:11 -0000	1.10
+++ src/file-manager/fm-actions.h	10 Feb 2006 21:30:39 -0000
@@ -60,6 +60,10 @@
 #define FM_ACTION_UNMOUNT_VOLUME "Unmount Volume"
 #define FM_ACTION_EJECT_VOLUME "Eject Volume"
 #define FM_ACTION_FORMAT_VOLUME "Format Volume"
+#define FM_ACTION_SELF_MOUNT_VOLUME "Self Mount Volume"
+#define FM_ACTION_SELF_UNMOUNT_VOLUME "Self Unmount Volume"
+#define FM_ACTION_SELF_EJECT_VOLUME "Self Eject Volume"
+#define FM_ACTION_SELF_FORMAT_VOLUME "Self Format Volume"
 #define FM_ACTION_SCRIPTS "Scripts"
 #define FM_ACTION_NEW_DOCUMENTS "New Documents"
 #define FM_ACTION_NEW_EMPTY_FILE "New Empty File"
@@ -6286,6 +6308,100 @@ action_eject_volume_callback (GtkAction 
 }
 
 static void
+action_self_mount_volume_callback (GtkAction *action,
+				   gpointer data)
+{
+	NautilusFile *file;
+	GnomeVFSDrive *drive;
+	FMDirectoryView *view;
+
+        view = FM_DIRECTORY_VIEW (data);
+
+	file = fm_directory_view_get_directory_as_file (view);
+	g_return_if_fail (file != NULL);
+
+	drive = nautilus_file_get_drive (file);
+	if (drive != NULL) {
+		gnome_vfs_drive_mount (drive, drive_mounted_callback, NULL);
+	}
+}
+
+static void
+action_self_unmount_volume_callback (GtkAction *action,
+				     gpointer data)
+{
+	NautilusFile *file;
+	GnomeVFSDrive *drive;
+	GnomeVFSVolume *volume;
+	FMDirectoryView *view;
+
+        view = FM_DIRECTORY_VIEW (data);
+
+	file = fm_directory_view_get_directory_as_file (view);
+	g_return_if_fail (file != NULL);
+
+	if (nautilus_file_has_volume (file)) {
+		volume = nautilus_file_get_volume (file);
+		if (volume != NULL) {
+			gnome_vfs_volume_unmount (volume, volume_or_drive_unmounted_callback, NULL);
+		}
+	} else if (nautilus_file_has_drive (file)) {
+		drive = nautilus_file_get_drive (file);
+		if (drive != NULL) {
+			gnome_vfs_drive_unmount (drive, volume_or_drive_unmounted_callback, NULL);
+		}
+	}
+}
+
+static void
+action_self_eject_volume_callback (GtkAction *action,
+				   gpointer data)
+{
+	NautilusFile *file;
+	GnomeVFSDrive *drive;
+	GnomeVFSVolume *volume;
+	FMDirectoryView *view;
+
+        view = FM_DIRECTORY_VIEW (data);
+
+	file = fm_directory_view_get_directory_as_file (view);
+	g_return_if_fail (file != NULL);
+
+	if (nautilus_file_has_volume (file)) {
+		volume = nautilus_file_get_volume (file);
+		if (volume != NULL) {
+			gnome_vfs_volume_eject (volume, volume_or_drive_unmounted_callback, NULL);
+		}
+	} else if (nautilus_file_has_drive (file)) {
+		drive = nautilus_file_get_drive (file);
+		if (drive != NULL) {
+			gnome_vfs_drive_eject (drive, volume_or_drive_unmounted_callback, NULL);
+		}
+	}
+}
+
+static void 
+action_self_format_volume_callback (GtkAction *action,
+				    gpointer   data)
+{
+	NautilusFile *file;
+	GnomeVFSDrive *drive;
+	FMDirectoryView *view;
+
+        view = FM_DIRECTORY_VIEW (data);
+
+	file = fm_directory_view_get_directory_as_file (view);
+	g_return_if_fail (file != NULL);
+
+	if (nautilus_file_has_drive (file)) {
+		drive = nautilus_file_get_drive (file);
+		if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) {
+			g_spawn_command_line_async ("gfloppy", NULL);
+		}
+	}
+}
+
+static void
 connect_to_server_response_callback (GtkDialog *dialog,
 				     int response_id,
 				     gpointer data)
@@ -6682,6 +6798,22 @@ static const GtkActionEntry directory_vi
     N_("_Format"), NULL,                /* label, accelerator */
     N_("Format the selected volume"),                   /* tooltip */ 
     G_CALLBACK (action_format_volume_callback) },
+  { "Self Mount Volume", NULL,                  /* name, stock id */
+    N_("_Mount Volume"), NULL,                /* label, accelerator */
+    N_("Mount the volume associated with the open folder"),                   /* tooltip */ 
+    G_CALLBACK (action_self_mount_volume_callback) },
+  { "Self Unmount Volume", NULL,                  /* name, stock id */
+    N_("_Unmount Volume"), NULL,                /* label, accelerator */
+    N_("Unmount the volume associated with the open folder"),                   /* tooltip */ 
+    G_CALLBACK (action_self_unmount_volume_callback) },
+  { "Self Eject Volume", NULL,                  /* name, stock id */
+    N_("_Eject"), NULL,                /* label, accelerator */
+    N_("Eject the volume associated with the open folder"),                   /* tooltip */ 
+    G_CALLBACK (action_self_eject_volume_callback) },
+  { "Self Format Volume", NULL,                  /* name, stock id */
+    N_("_Format"), NULL,                /* label, accelerator */
+    N_("Format the volume associated with the open folder"),                   /* tooltip */ 
+    G_CALLBACK (action_self_format_volume_callback) },
   { "OpenCloseParent", NULL,                  /* name, stock id */
     N_("Open File and Close window"), "<alt><shift>Down",                /* label, accelerator */
     NULL,                   /* tooltip */ 
@@ -7026,6 +7158,10 @@ real_update_menus_volumes (FMDirectoryVi
 	gboolean show_eject;
 	gboolean show_connect;
 	gboolean show_format;
+	gboolean show_self_mount;
+	gboolean show_self_unmount;
+	gboolean show_self_eject;
+	gboolean show_self_format;
 	GtkAction *action;
 
 	show_mount = (selection != NULL);
@@ -7084,6 +7220,36 @@ real_update_menus_volumes (FMDirectoryVi
 	action = gtk_action_group_get_action (view->details->dir_action_group,
 					      FM_ACTION_FORMAT_VOLUME);
 	gtk_action_set_visible (action, show_format);
+
+	show_self_mount = show_self_unmount = show_self_eject = show_self_format = FALSE;
+
+	file = fm_directory_view_get_directory_as_file (view);
+	if (file != NULL) {
+		gboolean show_self_connect_dummy;
+
+		file_should_show_foreach (file,
+					  &show_self_mount,
+					  &show_self_unmount,
+					  &show_self_eject,
+					  &show_self_connect_dummy,
+					  &show_self_format);
+	}
+
+	action = gtk_action_group_get_action (view->details->dir_action_group,
+					      FM_ACTION_SELF_MOUNT_VOLUME);
+	gtk_action_set_visible (action, show_self_mount);
+
+	action = gtk_action_group_get_action (view->details->dir_action_group,
+					      FM_ACTION_SELF_UNMOUNT_VOLUME);
+	gtk_action_set_visible (action, show_self_unmount);
+
+	action = gtk_action_group_get_action (view->details->dir_action_group,
+					      FM_ACTION_SELF_EJECT_VOLUME);
+	gtk_action_set_visible (action, show_self_eject);
+
+	action = gtk_action_group_get_action (view->details->dir_action_group,
+					      FM_ACTION_SELF_FORMAT_VOLUME);
+	gtk_action_set_visible (action, show_self_format);
 }
 
 static void
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.79
diff -u -p -r1.79 nautilus-directory-view-ui.xml
--- src/file-manager/nautilus-directory-view-ui.xml	12 Dec 2005 16:59:11 -0000	1.79
+++ src/file-manager/nautilus-directory-view-ui.xml	10 Feb 2006 21:30:44 -0000
@@ -35,6 +35,11 @@
 			</menu>
 		</placeholder>
 		<placeholder name="File Items Placeholder">
+			<menuitem name="Self Mount Volume" action="Self Mount Volume"/>
+			<menuitem name="Self Unmount Volume" action="Self Unmount Volume"/>
+			<menuitem name="Self Eject Volume" action="Self Eject Volume"/>
+			<menuitem name="Self Format Volume" action="Self Format Volume"/>
+			<separator name="Properties Separator"/>
 			<menuitem name="Properties" action="Properties"/>
 		</placeholder>
 		<placeholder name="Global File Items Placeholder">
@@ -95,8 +100,14 @@
 			<menuitem name="Paste" action="Paste"/>
 		</placeholder>
 	</placeholder>
+
 	<separator name="Folder Items separator"/>
 	<placeholder name="Folder Items Placeholder">
+		<menuitem name="Self Mount Volume" action="Self Mount Volume"/>
+		<menuitem name="Self Unmount Volume" action="Self Unmount Volume"/>
+		<menuitem name="Self Eject Volume" action="Self Eject Volume"/>
+		<menuitem name="Self Format Volume" action="Self Format Volume"/>
+		<separator name="Properties separator"/>
 		<menuitem name="SelfProperties" action="SelfProperties"/>
 	</placeholder>
 
@@ -142,16 +153,16 @@
 	</placeholder>
 	<separator name="Extension actions separator"/>
 	<placeholder name="Extension Actions"/>
-        <separator name="Properties separator"/>
-        <menuitem name="Properties" action="Properties"/>
 	<separator name="Removable separator"/>
-        <placeholder name="Removable Media Placeholder">
-		<menuitem name="Mount Volume" action="Mount Volume"/>
-                <menuitem name="Unmount Volume" action="Unmount Volume"/>
-                <menuitem name="Eject Volume" action="Eject Volume"/>
-                <menuitem name="Format Volume" action="Format Volume"/>
+	<placeholder name="Removable Media Placeholder">
+		 <menuitem name="Mount Volume" action="Mount Volume"/>
+		 <menuitem name="Unmount Volume" action="Unmount Volume"/>
+		 <menuitem name="Eject Volume" action="Eject Volume"/>
+		 <menuitem name="Format Volume" action="Format Volume"/>
         </placeholder>
         <menuitem name="Connect To Server Link" action="Connect To Server Link"/>
+        <separator name="Properties Separator"/>
+        <menuitem name="Properties" action="Properties"/>
 </popup>
 <popup name="location">
 	<placeholder name="Open Placeholder">
@@ -168,6 +179,12 @@
 		<menuitem name="Delete" action="LocationDelete"/>
 	</placeholder>
 	<separator/>
+
+	<menuitem name="Self Mount Volume" action="Self Mount Volume"/>
+	<menuitem name="Self Unmount Volume" action="Self Unmount Volume"/>
+	<menuitem name="Self Eject Volume" action="Self Eject Volume"/>
+	<menuitem name="Self Format Volume" action="Self Format Volume"/>
+	<separator name="Properties Separator"/>
 	<menuitem name="Properties" action="SelfProperties"/>
 </popup>
 </ui>

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]