[Epiphany] Patch to always show tabs



The attached patch sets it so that tabs are always displayed - accept it
if you wish!

It also includes my tab-crash patch from a few days ago since I can't
work out how to exclude those changes from my diff :)

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/epiphany/ChangeLog,v
retrieving revision 1.49
diff -u -r1.49 ChangeLog
--- ChangeLog	23 Jan 2003 13:52:58 -0000	1.49
+++ ChangeLog	24 Jan 2003 08:43:39 -0000
@@ -1,3 +1,12 @@
+2003-01-24  Lee Willis <lwillis@plus.net>
+
+	* lib/ephy/ephy-notebook.c:
+	* src/ephy-window.c: Always show tabs
+
+2003-01-23  Lee Willis <lwillis@plus.net>
+
+	* src/ephy-window.c: Don't crash on tab change
+
 2003-01-23  Marco Pesenti Gritti  <marco@it.gnome.org>
 
 	* TODO:
Index: lib/widgets/ephy-notebook.c
===================================================================
RCS file: /cvs/gnome/epiphany/lib/widgets/ephy-notebook.c,v
retrieving revision 1.2
diff -u -r1.2 ephy-notebook.c
--- lib/widgets/ephy-notebook.c	4 Jan 2003 20:08:24 -0000	1.2
+++ lib/widgets/ephy-notebook.c	24 Jan 2003 08:43:41 -0000
@@ -702,25 +702,6 @@
 	return hbox;
 }
 
-/*
- * update_tabs_visibility: Hide tabs if there is only one tab
- * and the pref is not set.
- * HACK We need to show tabs before inserting the second. Otherwise
- * gtknotebook go crazy.
- */
-static void
-update_tabs_visibility (EphyNotebook *nb, gboolean before_inserting)
-{
-	gboolean show_tabs;
-	guint tabs_num = 1;
-
-	if (before_inserting) tabs_num--;
-
-	show_tabs = gtk_notebook_get_nth_page (GTK_NOTEBOOK (nb), tabs_num) > 0;
-
-	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (nb), show_tabs);
-}
-
 void
 ephy_notebook_insert_page (EphyNotebook *nb,
 			  GtkWidget *child,
@@ -731,8 +712,6 @@
 
 	tab_hbox = tab_build_label (nb, child);
 
-	update_tabs_visibility (nb, TRUE);
-
 	if (position == EPHY_NOTEBOOK_INSERT_GROUPED)
 	{
 		/* Keep a list of newly opened tabs, if the list is empty open the new
@@ -829,8 +808,6 @@
 	}
 
 	gtk_notebook_remove_page (GTK_NOTEBOOK (nb), position);
-
-	update_tabs_visibility (nb, FALSE);
 }
 
 void
Index: src/ephy-window.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-window.c,v
retrieving revision 1.13
diff -u -r1.13 ephy-window.c
--- src/ephy-window.c	23 Jan 2003 13:22:17 -0000	1.13
+++ src/ephy-window.c	24 Jan 2003 08:43:42 -0000
@@ -497,7 +497,7 @@
 	notebook = GTK_NOTEBOOK (ephy_notebook_new ());
 	gtk_notebook_set_scrollable (notebook, TRUE);
 	gtk_notebook_set_show_border (notebook, FALSE);
-	gtk_notebook_set_show_tabs (notebook, FALSE);
+	gtk_notebook_set_show_tabs (notebook, TRUE);
 
 	g_signal_connect_after (G_OBJECT (notebook), "switch_page",
 				G_CALLBACK (
@@ -1366,7 +1366,6 @@
 
 	location = toolbar_get_location (window->priv->toolbar);
 	ephy_tab_set_location (tab, location);
-	g_free (location);
 }
 
 static void

Thanks
Lee
-- 
| Lee Willis                                  Unmetered & ADSL solutions 
| Products and Services Development Co-ordinator     for Home & Business 
| PlusNet Technologies Ltd.                        @ http://www.plus.net
+------------ My Referrals - It pays to recommend PlusNet --------------


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