[PATCH] Remove "Use Default Background" from folder context menu



Hi,

Luis Villa encouraged me to update an older patch which removes "Use Default Background" from the folder context menu. I hope it will get comitted this time

Patch is attached and in bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=131790

Regards,

Jaap

Index: fm-actions.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-actions.h,v
retrieving revision 1.3
diff -u -r1.3 fm-actions.h
--- fm-actions.h	12 Jan 2005 15:14:32 -0000	1.3
+++ fm-actions.h	22 Jan 2005 23:05:23 -0000
@@ -46,7 +46,6 @@
 #define FM_ACTION_TRASH "Trash"
 #define FM_ACTION_DELETE "Delete"
 #define FM_ACTION_SHOW_HIDDEN_FILES "Show Hidden Files"
-#define FM_ACTION_RESET_BACKGROUND "Reset Background"
 #define FM_ACTION_CONNECT_TO_SERVER_LINK "Connect To Server Link"
 #define FM_ACTION_MOUNT_VOLUME "Mount Volume"
 #define FM_ACTION_UNMOUNT_VOLUME "Unmount Volume"
Index: fm-desktop-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-desktop-icon-view.c,v
retrieving revision 1.215
diff -u -r1.215 fm-desktop-icon-view.c
--- fm-desktop-icon-view.c	22 Nov 2004 15:24:38 -0000	1.215
+++ fm-desktop-icon-view.c	22 Jan 2005 23:05:23 -0000
@@ -678,7 +678,6 @@
 	FMDesktopIconView *desktop_view;
 	GtkUIManager *ui_manager;
 	GtkActionGroup *action_group;
-	GtkAction *action;
 	const char *ui;
 
 	EEL_CALL_PARENT (FM_DIRECTORY_VIEW_CLASS, merge_menus, (view));
@@ -700,12 +699,6 @@
 	ui = nautilus_ui_string_get ("nautilus-desktop-icon-view-ui.xml");
 	desktop_view->details->desktop_merge_id =
 		gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL);
-
-	/* We hide the reset background item on the desktop */
-	action = gtk_ui_manager_get_action (ui_manager,
-					    "/background/After Zoom Items/Background Items/Use Default Background");
-	gtk_action_set_visible (action,
-				FALSE);
 }
 
 static gboolean
Index: fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.654
diff -u -r1.654 fm-directory-view.c
--- fm-directory-view.c	14 Jan 2005 10:40:12 -0000	1.654
+++ fm-directory-view.c	22 Jan 2005 23:05:31 -0000
@@ -347,8 +347,6 @@
 						    gpointer   callback_data);
 static void action_show_hidden_files_callback      (GtkAction *action,
 						    gpointer   callback_data);
-static void action_reset_background_callback       (GtkAction *action,
-						    gpointer   callback_data);
 static void action_paste_files_into_callback       (GtkAction *action,
 						    gpointer   callback_data);
 static void action_connect_to_server_link_callback (GtkAction *action,
@@ -2019,17 +2017,6 @@
 	view->details->loading = FALSE;
 }
 
-static void
-action_reset_background_callback (GtkAction *action,
-				  gpointer callback_data)
-{
-	g_assert (FM_IS_DIRECTORY_VIEW (callback_data));
-
-	eel_background_reset 
-		(fm_directory_view_get_background 
-			(FM_DIRECTORY_VIEW (callback_data)));
-}
-
 typedef struct {
 	GHashTable *debuting_uris;
 	GList	   *added_files;
@@ -5828,10 +5815,6 @@
     N_("Reset View to _Defaults"), NULL,                /* label, accelerator */
     N_("Reset sorting order and zoom level to match preferences for this view"),                   /* tooltip */ 
     G_CALLBACK (action_reset_to_defaults_callback) },
-  { "Reset Background", NULL,                  /* name, stock id */
-    N_("Use _Default Background"), NULL,                /* label, accelerator */
-    N_("Use the default background for this location"),                   /* tooltip */ 
-    G_CALLBACK (action_reset_background_callback) },
   { "Connect To Server Link", NULL,                  /* name, stock id */
     N_("Connect To This Server"), NULL,                /* label, accelerator */
     N_("Make a permanent connection to this server"),                   /* tooltip */ 
@@ -6161,7 +6144,6 @@
 	gboolean show_open_alternate;
 	gboolean can_open;
 	ActivationAction activation_action;
-	EelBackground *background;
 	GtkAction *action;
 
 	selection = fm_directory_view_get_selection (view);
@@ -6297,13 +6279,6 @@
 	action = gtk_action_group_get_action (view->details->dir_action_group,
 					      FM_ACTION_DUPLICATE);
 	gtk_action_set_sensitive (action, can_duplicate_files);
-
-	background = fm_directory_view_get_background (view);
-	action = gtk_action_group_get_action (view->details->dir_action_group,
-					      FM_ACTION_RESET_BACKGROUND);
-	gtk_action_set_sensitive (action, 
-				  background != NULL &&
-				  nautilus_file_background_is_set (background));
 
 	action = gtk_action_group_get_action (view->details->dir_action_group,
 					      FM_ACTION_CREATE_LINK);
Index: nautilus-directory-view-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-directory-view-ui.xml,v
retrieving revision 1.71
diff -u -r1.71 nautilus-directory-view-ui.xml
--- nautilus-directory-view-ui.xml	12 Jan 2005 15:14:32 -0000	1.71
+++ nautilus-directory-view-ui.xml	22 Jan 2005 23:05:34 -0000
@@ -92,11 +92,6 @@
 			<menuitem name="Paste" action="Paste"/>
 		</placeholder>
 	</placeholder>
-	<placeholder name="After Zoom Items">
-		<placeholder name="Background Items">
-			<menuitem name="Use Default Background" action="Reset Background"/>
-		</placeholder>
-	</placeholder>
 </popup>
 <popup name="selection">
 	<placeholder name="Open Placeholder">


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