[PATCH] Don't constrain sidebar size, don't save back 1 px width



The attached patch is meant to fix bug 331475 [1].

[1] http://bugzilla.gnome.org/show_bug.cgi?id=331475

-- 
Christian Neumair <chris gnome-de org>
Index: src/nautilus-navigation-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-navigation-window.c,v
retrieving revision 1.442
diff -u -p -r1.442 nautilus-navigation-window.c
--- src/nautilus-navigation-window.c	20 Dec 2005 09:11:07 -0000	1.442
+++ src/nautilus-navigation-window.c	18 Feb 2006 09:12:45 -0000
@@ -95,10 +95,6 @@
  */
 #include "nautilus-desktop-window.h"
 
-/* FIXME bugzilla.gnome.org 41245: hardwired sizes */
-#define SIDE_PANE_MINIMUM_WIDTH 1
-#define SIDE_PANE_MINIMUM_HEIGHT 400
-
 #define MAX_TITLE_LENGTH 180
 
 #define MENU_PATH_BOOKMARKS_PLACEHOLDER			"/MenuBar/Other Menus/Bookmarks/Bookmarks Placeholder"
@@ -115,7 +111,7 @@ enum {
 	ARG_APP
 };
 
-static int side_pane_width_auto_value = SIDE_PANE_MINIMUM_WIDTH;
+static int side_pane_width_auto_value = 0;
 
 static void add_sidebar_panels                       (NautilusNavigationWindow *window);
 static void load_view_as_menu                        (NautilusWindow           *window);
@@ -434,7 +430,7 @@ side_pane_size_allocate_callback (GtkWid
 		if (eel_preferences_key_is_writable (NAUTILUS_PREFERENCES_SIDEBAR_WIDTH)) {
 			eel_preferences_set_integer
 				(NAUTILUS_PREFERENCES_SIDEBAR_WIDTH, 
-				 allocation->width);
+				 allocation->width <= 1 ? 0 : allocation->width);
 		}
 	}
 }
@@ -1438,19 +1432,6 @@ real_window_close (NautilusWindow *windo
 	nautilus_navigation_window_save_geometry (NAUTILUS_NAVIGATION_WINDOW (window));
 }
 
-static void 
-real_get_default_size (NautilusWindow *window,
-		       guint *default_width, guint *default_height)
-{
-	if (default_width) {
-		*default_width = NAUTILUS_NAVIGATION_WINDOW_DEFAULT_WIDTH;
-	}
-	
-	if (default_height) {
-		*default_height = NAUTILUS_NAVIGATION_WINDOW_DEFAULT_HEIGHT;	
-	}
-}
-
 static void
 nautilus_navigation_window_class_init (NautilusNavigationWindowClass *class)
 {
@@ -1468,6 +1449,5 @@ nautilus_navigation_window_class_init (N
 	NAUTILUS_WINDOW_CLASS (class)->set_search_mode = real_set_search_mode;
 	NAUTILUS_WINDOW_CLASS (class)->set_title = real_set_title;
 	NAUTILUS_WINDOW_CLASS (class)->get_icon_name = real_get_icon_name;
-	NAUTILUS_WINDOW_CLASS (class)->get_default_size = real_get_default_size;
 	NAUTILUS_WINDOW_CLASS (class)->close = real_window_close;
 }

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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