gnumeric r17218 - in trunk: . src



Author: mortenw
Date: Tue Mar 17 20:12:07 2009
New Revision: 17218
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17218&view=rev

Log:
2009-03-17  Morten Welinder  <terra gnome org>

	* src/wbc-gtk.c (sheet_menu_label_run): Toss the sheets into a
	submenu and display it regardless of how many sheets we have.



Modified:
   trunk/ChangeLog
   trunk/src/wbc-gtk.c

Modified: trunk/src/wbc-gtk.c
==============================================================================
--- trunk/src/wbc-gtk.c	(original)
+++ trunk/src/wbc-gtk.c	Tue Mar 17 20:12:07 2009
@@ -487,11 +487,12 @@
 		gtk_widget_show (item);
 	}
 
-	g_object_get (scg->wbcg->bnotebook, "scrollable", &scrollable, NULL);
-	if (scrollable) {
+	if (1) {
 		GSList *l, *scgs = get_all_scgs (scg->wbcg);
+		GtkWidget *submenu = gtk_menu_new ();
 
-		item = gtk_separator_menu_item_new ();
+		item = gtk_menu_item_new_with_label (_("Select"));
+		gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
 		gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
 		gtk_widget_show (item);
 
@@ -504,7 +505,7 @@
 			item = gtk_menu_item_new_with_label (sheet->name_unquoted);
 			g_signal_connect_swapped (G_OBJECT (item), "activate",
 						  G_CALLBACK (cb_show_sheet), scg1);
-			gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+			gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item);
 			gtk_widget_show (item);
 		}
 



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