diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/nautilus-navigation-window.c | 14 | ||||
-rw-r--r-- | src/nautilus-spatial-window.c | 12 | ||||
-rw-r--r-- | src/nautilus-window-private.h | 7 | ||||
-rw-r--r-- | src/nautilus-window.c | 12 | ||||
-rw-r--r-- | src/nautilus-window.h | 1 |
6 files changed, 49 insertions, 6 deletions
@@ -1,3 +1,12 @@ +2003-12-01 Sivaiah Nallagatla <snallagatla@novell.com> + + * src/nautilus-navigation-window.c (real_get_default_size) (nautilus_navigation_window_class_init) + * src/nautilus-spatial-window.c (real_get_default_size) (nautilus_spatial_window_class_init) + * src/nautilus-window-private.h + * src/nautilus-window.c (set_initial_window_geometry) + * src/nautilus-window.h : make default size of navigation window bigger and different from that + of spatial window. #127604 in b.g.o + 2003-11-26 Sebastien Bacher <seb128@debian.org> * libnautilus-private/apps_nautilus_preferences.schemas.in: Fix diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c index cea7542ff..479686ee9 100644 --- a/src/nautilus-navigation-window.c +++ b/src/nautilus-navigation-window.c @@ -1458,6 +1458,19 @@ nautilus_navigation_window_show (GtkWidget *widget) GTK_WIDGET_CLASS (parent_class)->show (widget); } +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) { @@ -1473,4 +1486,5 @@ nautilus_navigation_window_class_init (NautilusNavigationWindowClass *class) NAUTILUS_WINDOW_CLASS (class)->set_throbber_active = real_set_throbber_active; NAUTILUS_WINDOW_CLASS (class)->prompt_for_location = real_prompt_for_location; NAUTILUS_WINDOW_CLASS (class)->set_title = real_set_title; + NAUTILUS_WINDOW_CLASS(class)->get_default_size = real_get_default_size; } diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c index cf608a71b..b0794d199 100644 --- a/src/nautilus-spatial-window.c +++ b/src/nautilus-spatial-window.c @@ -312,6 +312,17 @@ real_delete_event (GtkWidget *window, GdkEventAny *event) return FALSE; } +static void +real_get_default_size(NautilusWindow *window, guint *default_width, guint *default_height) +{ + if(default_width) { + *default_width = NAUTILUS_SPATIAL_WINDOW_DEFAULT_WIDTH; + } + if(default_height) { + *default_height = NAUTILUS_SPATIAL_WINDOW_DEFAULT_HEIGHT; + } +} + static void nautilus_spatial_window_instance_init (NautilusSpatialWindow *window) { @@ -346,4 +357,5 @@ nautilus_spatial_window_class_init (NautilusSpatialWindowClass *class) real_set_content_view_widget; GTK_WIDGET_CLASS (class)->delete_event = real_delete_event; + NAUTILUS_WINDOW_CLASS(class)->get_default_size = real_get_default_size; } diff --git a/src/nautilus-window-private.h b/src/nautilus-window-private.h index 6ddd7d85d..5222da470 100644 --- a/src/nautilus-window-private.h +++ b/src/nautilus-window-private.h @@ -139,8 +139,11 @@ struct _NautilusNavigationWindowDetails { #define NAUTILUS_WINDOW_MIN_WIDTH 200 #define NAUTILUS_WINDOW_MIN_HEIGHT 200 -#define NAUTILUS_WINDOW_DEFAULT_WIDTH 500 -#define NAUTILUS_WINDOW_DEFAULT_HEIGHT 300 +#define NAUTILUS_SPATIAL_WINDOW_DEFAULT_WIDTH 500 +#define NAUTILUS_SPATIAL_WINDOW_DEFAULT_HEIGHT 300 + +#define NAUTILUS_NAVIGATION_WINDOW_DEFAULT_WIDTH 800 +#define NAUTILUS_NAVIGATION_WINDOW_DEFAULT_HEIGHT 550 typedef void (*NautilusBookmarkFailedCallback) (NautilusWindow *window, NautilusBookmark *bookmark); diff --git a/src/nautilus-window.c b/src/nautilus-window.c index 17960e276..44e894fff 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -563,7 +563,8 @@ set_initial_window_geometry (NautilusWindow *window) { GdkScreen *screen; guint max_width_for_screen, max_height_for_screen; - + guint default_width, default_height; + screen = gtk_window_get_screen (GTK_WINDOW (window)); /* Don't let GTK determine the minimum size @@ -590,11 +591,14 @@ set_initial_window_geometry (NautilusWindow *window) max_width_for_screen), MIN (NAUTILUS_WINDOW_MIN_HEIGHT, max_height_for_screen)); - + + EEL_CALL_METHOD (NAUTILUS_WINDOW_CLASS, window, + get_default_size, (window , &default_width, &default_height)); + gtk_window_set_default_size (GTK_WINDOW (window), - MIN (NAUTILUS_WINDOW_DEFAULT_WIDTH, + MIN (default_width, max_width_for_screen), - MIN (NAUTILUS_WINDOW_DEFAULT_HEIGHT, + MIN (default_height, max_height_for_screen)); } diff --git a/src/nautilus-window.h b/src/nautilus-window.h index 747dec215..c5622b025 100644 --- a/src/nautilus-window.h +++ b/src/nautilus-window.h @@ -75,6 +75,7 @@ typedef struct { void (* set_throbber_active) (NautilusWindow *window, gboolean active); void (* prompt_for_location) (NautilusWindow *window); + void (* get_default_size) ( NautilusWindow *window, guint *default_width, guint *default_height); } NautilusWindowClass; typedef enum { |