Re: [Nautilus-list] [PATCH] Creating launchers



Ooops, here is the patch
Index: nautilus-desktop-icon-view-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-desktop-icon-view-ui.xml,v
retrieving revision 1.9
diff -u -r1.9 nautilus-desktop-icon-view-ui.xml
--- nautilus-desktop-icon-view-ui.xml	24 Mar 2001 01:25:39 -0000	1.9
+++ nautilus-desktop-icon-view-ui.xml	3 Apr 2002 16:13:19 -0000
@@ -11,6 +11,9 @@
         <cmd name="New Terminal"
          _label="New Terminal"
          _tip="Open a new GNOME terminal window"/>
+        <cmd name="New Launcher"
+         _label="New Launcher"
+         _tip="Create a new launcher"/>
         <cmd name="OpenAlternate" hidden="1"/>
         <cmd name="Reset Background"
          _label="Reset Desktop Background"
@@ -36,6 +39,7 @@
                 <placeholder name="Before Zoom Items">
                         <placeholder name="New Items">
                                 <menuitem name="New Terminal" verb="New Terminal"/>
+                                <menuitem name="New Launcher" verb="New Launcher"/>
                         </placeholder>
                         <placeholder name="Volume Items" delimit="top">
                                 <submenu name="Disks" tearoff="0"
Index: fm-desktop-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-desktop-icon-view.c,v
retrieving revision 1.165
diff -u -r1.165 fm-desktop-icon-view.c
--- fm-desktop-icon-view.c	28 Mar 2002 04:02:47 -0000	1.165
+++ fm-desktop-icon-view.c	3 Apr 2002 16:13:20 -0000
@@ -622,6 +622,21 @@
 }
 
 static void
+new_launcher_callback (BonoboUIComponent *component, gpointer data, const char *verb)
+{
+	char *desktop_directory;
+	
+	desktop_directory = nautilus_get_desktop_directory ();
+
+	nautilus_launch_application_from_command ("gnome-desktop-item-edit", 
+						  "gnome-desktop-item-edit --create-new",
+						  desktop_directory, 
+						  FALSE);
+	g_free (desktop_directory);
+
+}
+
+static void
 change_background_callback (BonoboUIComponent *component, 
 	  		    gpointer data, 
 			    const char *verb)
@@ -1200,6 +1215,7 @@
 		BONOBO_UI_VERB ("Change Background", change_background_callback),
 		BONOBO_UI_VERB ("Empty Trash Conditional", empty_trash_callback),
 		BONOBO_UI_VERB ("New Terminal", new_terminal_callback),
+		BONOBO_UI_VERB ("New Launcher", new_launcher_callback),
 		BONOBO_UI_VERB ("Reset Background", reset_background_callback),
 		BONOBO_UI_VERB ("Unmount Volume Conditional", unmount_volume_callback),
 		BONOBO_UI_VERB_END


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