[nautilus] horizontal-splitter: remove, and use a regular GtkPaned instead



commit 1620bd8a4e4ab1760c5c518dd954a4471645ce87
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Oct 12 13:24:18 2010 +0200

    horizontal-splitter: remove, and use a regular GtkPaned instead
    
    The feature it was bringing in (shrink when the paned handle is
    double-clicked) is even confusing.

 libnautilus-private/Makefile.am                    |    2 -
 libnautilus-private/nautilus-horizontal-splitter.c |  293 --------------------
 libnautilus-private/nautilus-horizontal-splitter.h |   70 -----
 src/nautilus-navigation-window.c                   |    8 +-
 src/nautilus-spatial-window.c                      |    1 -
 src/nautilus-window.c                              |    1 -
 6 files changed, 4 insertions(+), 371 deletions(-)
---
diff --git a/libnautilus-private/Makefile.am b/libnautilus-private/Makefile.am
index 5a4556d..af4e97e 100644
--- a/libnautilus-private/Makefile.am
+++ b/libnautilus-private/Makefile.am
@@ -98,8 +98,6 @@ libnautilus_private_la_SOURCES = \
 	nautilus-file.h \
 	nautilus-global-preferences.c \
 	nautilus-global-preferences.h \
-	nautilus-horizontal-splitter.c \
-	nautilus-horizontal-splitter.h \
 	nautilus-icon-canvas-item.c \
 	nautilus-icon-canvas-item.h \
 	nautilus-icon-container.c \
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 6aadb8a..f6bc9ab 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -55,7 +55,6 @@
 #include <libnautilus-private/nautilus-file-utilities.h>
 #include <libnautilus-private/nautilus-file-attributes.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
-#include <libnautilus-private/nautilus-horizontal-splitter.h>
 #include <libnautilus-private/nautilus-icon-info.h>
 #include <libnautilus-private/nautilus-metadata.h>
 #include <libnautilus-private/nautilus-mime-actions.h>
@@ -137,7 +136,7 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window)
 	window->details->header_size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
 	gtk_size_group_set_ignore_hidden (window->details->header_size_group, FALSE);
 
-	window->details->content_paned = nautilus_horizontal_splitter_new ();
+	window->details->content_paned = gtk_hpaned_new ();
 	gtk_table_attach (GTK_TABLE (NAUTILUS_WINDOW (window)->details->table),
 			  window->details->content_paned,
 			  /* X direction */                   /* Y direction */
@@ -147,7 +146,8 @@ nautilus_navigation_window_init (NautilusNavigationWindow *window)
 	gtk_widget_show (window->details->content_paned);
 
 	vbox = gtk_vbox_new (FALSE, 0);
-	nautilus_horizontal_splitter_pack2 (NAUTILUS_HORIZONTAL_SPLITTER (window->details->content_paned), vbox);
+	gtk_paned_pack2 (GTK_PANED (window->details->content_paned), vbox,
+			 TRUE, FALSE);
 	gtk_widget_show (vbox);
 
 	hpaned = gtk_hpaned_new ();
@@ -978,7 +978,7 @@ nautilus_navigation_window_sidebar_showing (NautilusNavigationWindow *window)
 	g_return_val_if_fail (NAUTILUS_IS_NAVIGATION_WINDOW (window), FALSE);
 
 	return (window->sidebar != NULL)
-		&& nautilus_horizontal_splitter_is_hidden (NAUTILUS_HORIZONTAL_SPLITTER (window->details->content_paned));
+		&& gtk_widget_get_visible (gtk_paned_get_child1 (GTK_PANED (window->details->content_paned)));
 }
 
 /**
diff --git a/src/nautilus-spatial-window.c b/src/nautilus-spatial-window.c
index 3efdb38..fb01d1d 100644
--- a/src/nautilus-spatial-window.c
+++ b/src/nautilus-spatial-window.c
@@ -56,7 +56,6 @@
 #include <libnautilus-private/nautilus-ui-utilities.h>
 #include <libnautilus-private/nautilus-file-attributes.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
-#include <libnautilus-private/nautilus-horizontal-splitter.h>
 #include <libnautilus-private/nautilus-metadata.h>
 #include <libnautilus-private/nautilus-mime-actions.h>
 #include <libnautilus-private/nautilus-program-choosing.h>
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index e305bcb..0cac149 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -56,7 +56,6 @@
 #include <libnautilus-private/nautilus-file-utilities.h>
 #include <libnautilus-private/nautilus-file-attributes.h>
 #include <libnautilus-private/nautilus-global-preferences.h>
-#include <libnautilus-private/nautilus-horizontal-splitter.h>
 #include <libnautilus-private/nautilus-metadata.h>
 #include <libnautilus-private/nautilus-mime-actions.h>
 #include <libnautilus-private/nautilus-program-choosing.h>



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