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



Hi,

This is my first contribution, so please tell me if I do something wrong. Ironically my first contribution only removes code.

In order to reduce clutter in the context menu this patch removes "Use Default Background" from the context menu. The user should just select Change Desktop Background and then select the default one.


See also http://bugzilla.gnome.org/show_bug.cgi?id=131790 for a description of this. I attached the patch also overthere.

Cheers,

Jaap

Index: fm-desktop-icon-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-desktop-icon-view.c,v
retrieving revision 1.214
diff -u -r1.214 fm-desktop-icon-view.c
--- fm-desktop-icon-view.c	8 Jun 2004 17:35:10 -0000	1.214
+++ fm-desktop-icon-view.c	29 Aug 2004 12:54:13 -0000
@@ -607,16 +607,6 @@
 	nautilus_file_operations_empty_trash (GTK_WIDGET (data));
 }
 
-static void
-reset_background_callback (BonoboUIComponent *component, 
-			   gpointer data, 
-			   const char *verb)
-{
-	eel_background_reset 
-		(fm_directory_view_get_background 
-		 (FM_DIRECTORY_VIEW (data)));
-}
-
 static gboolean
 trash_link_is_selection (FMDirectoryView *view)
 {
@@ -689,7 +679,6 @@
 		BONOBO_UI_VERB ("Empty Trash Conditional", empty_trash_callback),
 		BONOBO_UI_VERB ("New Terminal", new_terminal_callback),
 		BONOBO_UI_VERB ("New Launcher Desktop", new_launcher_callback),
-		BONOBO_UI_VERB ("Reset Background", reset_background_callback),
 		BONOBO_UI_VERB_END
 	};
 
Index: fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.635
diff -u -r1.635 fm-directory-view.c
--- fm-directory-view.c	27 Aug 2004 11:59:47 -0000	1.635
+++ fm-directory-view.c	29 Aug 2004 12:54:21 -0000
@@ -2031,16 +2031,6 @@
 }
 
 static void
-reset_background_callback (BonoboUIComponent *component, gpointer callback_data, const char *verb)
-{
-	g_assert (FM_IS_DIRECTORY_VIEW (callback_data));
-
-	eel_background_reset 
-		(fm_directory_view_get_background 
-			(FM_DIRECTORY_VIEW (callback_data)));
-}
-
-static void
 zoomable_zoom_in_callback (BonoboZoomable *zoomable, FMDirectoryView *directory_view)
 {
 	fm_directory_view_bump_zoom_level (directory_view, 1);
@@ -5570,7 +5560,6 @@
 		BONOBO_UI_VERB ("Edit Launcher", edit_launcher_callback),
 		BONOBO_UI_VERB ("Paste Files", paste_files_callback),
 		BONOBO_UI_VERB ("Paste Files Into", paste_files_into_callback),
-		BONOBO_UI_VERB ("Reset Background", reset_background_callback),
 		BONOBO_UI_VERB ("Reset to Defaults", reset_to_defaults_callback),
 		BONOBO_UI_VERB ("Select All", bonobo_menu_select_all_callback),
 		BONOBO_UI_VERB ("Select Pattern", bonobo_menu_select_pattern_callback),
@@ -5880,7 +5869,6 @@
 	gboolean show_open_alternate;
 	gboolean can_open;
 	ActivationAction action;
-	EelBackground *background;
 
 	if (view->details->ui == NULL) {
 		return;
@@ -6026,13 +6014,6 @@
 	nautilus_bonobo_set_sensitive (view->details->ui, 
 				       FM_DIRECTORY_VIEW_COMMAND_DUPLICATE,
 				       can_duplicate_files);
-
-	background = fm_directory_view_get_background (view);
-	nautilus_bonobo_set_sensitive (view->details->ui, 
-				       FM_DIRECTORY_VIEW_COMMAND_RESET_BACKGROUND,
-				       background != NULL
-				       && nautilus_file_background_is_set (background));
-
 	nautilus_bonobo_set_label
 		(view->details->ui,
 		 FM_DIRECTORY_VIEW_COMMAND_CREATE_LINK,
Index: fm-directory-view.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.h,v
retrieving revision 1.132
diff -u -r1.132 fm-directory-view.h
--- fm-directory-view.h	6 Jan 2004 13:23:25 -0000	1.132
+++ fm-directory-view.h	29 Aug 2004 12:54:21 -0000
@@ -44,9 +44,6 @@
 typedef struct FMDirectoryViewClass FMDirectoryViewClass;
 
 
-/* Bonobo command paths that are used by subclasses. Others are defined in fm-directory-view.c */
-#define FM_DIRECTORY_VIEW_COMMAND_RESET_BACKGROUND		"/commands/Reset Background"
-
 #define FM_TYPE_DIRECTORY_VIEW			(fm_directory_view_get_type ())
 #define FM_DIRECTORY_VIEW(obj)			(GTK_CHECK_CAST ((obj), FM_TYPE_DIRECTORY_VIEW, FMDirectoryView))
 #define FM_DIRECTORY_VIEW_CLASS(klass)		(GTK_CHECK_CLASS_CAST ((klass), FM_TYPE_DIRECTORY_VIEW, FMDirectoryViewClass))
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.18
diff -u -r1.18 nautilus-desktop-icon-view-ui.xml
--- nautilus-desktop-icon-view-ui.xml	5 Nov 2003 16:20:01 -0000	1.18
+++ nautilus-desktop-icon-view-ui.xml	29 Aug 2004 12:54:21 -0000
@@ -14,9 +14,6 @@
         <cmd name="New Launcher Desktop"
          _label="Create L_auncher"
          _tip="Create a new launcher"/>
-        <cmd name="Reset Background"
-         _label="Use _Default Background"
-         _tip="Use the default desktop background"/>
 </commands>
 <menu>
 	<!-- By re-labelling these submenus to names without underscores, we
@@ -45,7 +42,6 @@
                 </placeholder>
                 <placeholder name="After Zoom Items">
                         <placeholder name="Background Items">
-                                <menuitem name="Use Default Background" verb="Reset Background"/>
                                 <menuitem name="Change Background" verb="Change Background"/>
                         </placeholder>
                 </placeholder>
Index: nautilus-directory-view-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-directory-view-ui.xml,v
retrieving revision 1.68
diff -u -r1.68 nautilus-directory-view-ui.xml
--- nautilus-directory-view-ui.xml	12 Aug 2004 20:12:36 -0000	1.68
+++ nautilus-directory-view-ui.xml	29 Aug 2004 12:54:22 -0000
@@ -45,9 +45,6 @@
 	<cmd name="Reset to Defaults"
          _label="Reset View to _Defaults"
 	 _tip="Reset sorting order and zoom level to match preferences for this view"/>
-	<cmd name="Reset Background"
-         _label="Use _Default Background"
-	 _tip="Use the default background for this location"/>
 	<cmd name="Cut Files"
          _label="Cu_t Files"
 	 _tip="Prepare the selected files to be moved with a Paste Files command"/>
@@ -257,11 +254,6 @@
 				<menuitem name="Paste Files" 
 				 pixtype="stock" pixname="gtk-paste"
 				 verb="Paste Files"/>
-			</placeholder>
-		</placeholder>
-		<placeholder name="After Zoom Items">
-			<placeholder name="Background Items" delimit="none">
-				<menuitem name="Use Default Background" verb="Reset Background"/>
 			</placeholder>
 		</placeholder>
 	</popup>


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