Description: Remove "Create Launcher" entry option
 "Create launcher" entry from nautilus desktop is deprecated: it's depending
 on a gnome-panel binary, and upstream doesn't have even nautilus drawing the
 icons desktop.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/723861
Bug-Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=654848
Author: Didier Roche <didrocks@ubuntu.com>
Index: nautilus-3.1.3/src/nautilus-desktop-icon-view.c
===================================================================
--- nautilus-3.1.3.orig/src/nautilus-desktop-icon-view.c	2011-07-25 10:11:35.860446889 +0200
+++ nautilus-3.1.3/src/nautilus-desktop-icon-view.c	2011-07-25 10:16:59.834053393 +0200
@@ -708,23 +708,6 @@
 }
 
 static void
-action_new_launcher_callback (GtkAction *action, gpointer data)
-{
-	char *desktop_directory;
-
-        g_assert (NAUTILUS_VIEW (data));
-
-	desktop_directory = nautilus_get_desktop_directory ();
-
-	nautilus_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (data)),
-						  "gnome-desktop-item-edit",
-						  FALSE,
-						  "--create-new", desktop_directory, NULL);
-	g_free (desktop_directory);
-
-}
-
-static void
 action_change_background_callback (GtkAction *action, 
 				   gpointer data)
 {
@@ -789,13 +772,6 @@
 
 	desktop_view = NAUTILUS_DESKTOP_ICON_VIEW (view);
 
-	/* New Launcher */
-	disable_command_line = g_settings_get_boolean (gnome_lockdown_preferences, NAUTILUS_PREFERENCES_LOCKDOWN_COMMAND_LINE);
-	action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
-					      NAUTILUS_ACTION_NEW_LAUNCHER_DESKTOP);
-	gtk_action_set_visible (action,
-				!disable_command_line);
-
 	/* Empty Trash */
 	include_empty_trash = trash_link_is_selection (view);
 	action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
@@ -813,13 +789,6 @@
 
 static const GtkActionEntry desktop_view_entries[] = {
 	/* name, stock id */
-	{ "New Launcher Desktop", NULL,
-	  /* label, accelerator */
-	  N_("Create L_auncher..."), NULL,
-	  /* tooltip */
-	  N_("Create a new launcher"),
-	  G_CALLBACK (action_new_launcher_callback) },
-	/* name, stock id */
 	{ "Change Background", NULL,
 	  /* label, accelerator */
 	  N_("Change Desktop _Background"), NULL,
Index: nautilus-3.1.3/src/nautilus-actions.h
===================================================================
--- nautilus-3.1.3.orig/src/nautilus-actions.h	2011-07-25 10:11:53.776535731 +0200
+++ nautilus-3.1.3/src/nautilus-actions.h	2011-07-25 10:12:40.944769626 +0200
@@ -81,8 +81,6 @@
 #define NAUTILUS_ACTION_COPY_TO_DESKTOP "Copy to Desktop"
 #define NAUTILUS_ACTION_MOVE_TO_DESKTOP "Move to Desktop"
 #define NAUTILUS_ACTION_LOCATION_PASTE_FILES_INTO "LocationPasteFilesInto"
-#define NAUTILUS_ACTION_NEW_LAUNCHER "New Launcher"
-#define NAUTILUS_ACTION_NEW_LAUNCHER_DESKTOP "New Launcher Desktop"
 #define NAUTILUS_ACTION_RENAME "Rename"
 #define NAUTILUS_ACTION_DUPLICATE "Duplicate"
 #define NAUTILUS_ACTION_CREATE_LINK "Create Link"
Index: nautilus-3.1.3/src/nautilus-desktop-icon-view-ui.xml
===================================================================
--- nautilus-3.1.3.orig/src/nautilus-desktop-icon-view-ui.xml	2011-07-25 10:18:00.246352957 +0200
+++ nautilus-3.1.3/src/nautilus-desktop-icon-view-ui.xml	2011-07-25 10:18:31.858509713 +0200
@@ -4,7 +4,6 @@
                 <placeholder name="New Window Items">
                 </placeholder>
                 <placeholder name="New Object Items">
-                        <menuitem name="New Launcher" action="New Launcher Desktop"/>
                 </placeholder>
         </placeholder>
         <placeholder name="After Zoom Items">
Index: nautilus-3.1.3/src/nautilus-view.c
===================================================================
--- nautilus-3.1.3.orig/src/nautilus-view.c	2011-07-25 10:13:00.008864161 +0200
+++ nautilus-3.1.3/src/nautilus-view.c	2011-07-25 10:15:00.337460842 +0200
@@ -391,7 +391,7 @@
  * nautilus_view_get_backing_uri:
  *
  * Returns the URI for the target location of new directory, new file, new
- * link, new launcher, and paste operations.
+ * link and paste operations.
  */
 
 char *
@@ -2108,30 +2108,6 @@
 }
 
 static void
-action_new_launcher_callback (GtkAction *action,
-			      gpointer callback_data)
-{
-	char *parent_uri;
-	NautilusView *view;
-	GtkWindow *window;
-
-	g_assert (NAUTILUS_IS_VIEW (callback_data));
-
-	view = NAUTILUS_VIEW (callback_data);
-
-	parent_uri = nautilus_view_get_backing_uri (view);
-
-	window = nautilus_view_get_containing_window (view);
-	DEBUG ("Create new launcher in window=%p: %s", window, parent_uri);
-	nautilus_launch_application_from_command (gtk_widget_get_screen (GTK_WIDGET (view)),
-						  "gnome-desktop-item-edit",
-						  FALSE,
-						  "--create-new", parent_uri, NULL);
-
-	g_free (parent_uri);
-}
-
-static void
 action_properties_callback (GtkAction *action,
 			    gpointer callback_data)
 {
@@ -6979,10 +6955,6 @@
   /* label, accelerator */       N_("_Empty Document"), NULL,
   /* tooltip */                  N_("Create a new empty document inside this folder"),
 				 G_CALLBACK (action_new_empty_file_callback) },
-  /* name, stock id */         { "New Launcher", NULL,
-  /* label, accelerator */       N_("Create L_auncher..."), NULL,
-  /* tooltip */                  N_("Create a new launcher"),
-				 G_CALLBACK (action_new_launcher_callback) },
   /* name, stock id */         { "Open", NULL,
   /* label, accelerator */       N_("_Open"), "<control>o",
   /* tooltip */                  N_("Open the selected item in this window"),
@@ -8599,10 +8571,6 @@
 	real_update_paste_menu (view, selection, selection_count);
 
 	disable_command_line = g_settings_get_boolean (gnome_lockdown_preferences, NAUTILUS_PREFERENCES_LOCKDOWN_COMMAND_LINE);
-	action = gtk_action_group_get_action (view->details->dir_action_group,
-					      NAUTILUS_ACTION_NEW_LAUNCHER);
-	gtk_action_set_visible (action, vfolder_directory && !disable_command_line);
-	gtk_action_set_sensitive (action, can_create_files);
 
 	real_update_menus_volumes (view, selection, selection_count);
 
Index: nautilus-3.1.3/src/nautilus-directory-view-ui.xml
===================================================================
--- nautilus-3.1.3.orig/src/nautilus-directory-view-ui.xml	2011-07-25 10:25:21.244539747 +0200
+++ nautilus-3.1.3/src/nautilus-directory-view-ui.xml	2011-07-25 10:25:42.176643546 +0200
@@ -13,7 +13,6 @@
 				 <separator name="After New Documents"/>
 				 <menuitem name="New Empty Document" action="New Empty Document"/>
 			</menu>
-			<menuitem name="New Launcher" action="New Launcher"/>
 		</placeholder>
 		<placeholder name="Open Placeholder">
 			<menuitem name="Open" action="Open"/>
@@ -95,7 +94,6 @@
 	<placeholder name="Before Zoom Items">
 		<placeholder name="New Object Items">
 			<menuitem name="New Folder" action="New Folder"/>
-			<menuitem name="New Launcher" action="New Launcher"/>
 			<menu action="New Documents">
 		         	<menuitem name="No Templates" action="No Templates"/>
 			 	<placeholder name="New Documents Placeholder"/>
