From: John Darrington Date: Sun, 9 May 2010 18:57:55 +0000 (+0200) Subject: Move data sheet cases popup menu to GtkBuilder file X-Git-Tag: v0.7.5~25^2~21 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d2d1a1e7036d45c7d02a1ba211e1dd96a88a867;p=pspp-builds.git Move data sheet cases popup menu to GtkBuilder file --- diff --git a/src/ui/gui/data-editor.ui b/src/ui/gui/data-editor.ui index 93bd84cd..a3b7f5da 100644 --- a/src/ui/gui/data-editor.ui +++ b/src/ui/gui/data-editor.ui @@ -608,6 +608,11 @@ + + + + + @@ -621,6 +626,9 @@ True + + True + True diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 757d20e9..c655ece6 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -843,43 +843,6 @@ file_quit (GtkCheckMenuItem *menuitem, gpointer data) } -static GtkWidget * -create_data_sheet_cases_popup_menu (PsppireDataWindow *de) -{ - GtkWidget *menu = gtk_menu_new (); - - GtkWidget *insert_case = - gtk_menu_item_new_with_label (_("Insert Case")); - - GtkWidget *delete_case = - gtk_menu_item_new_with_label (_("Clear")); - - - gtk_action_connect_proxy (de->delete_cases, - delete_case); - - - gtk_menu_shell_append (GTK_MENU_SHELL (menu), insert_case); - - g_signal_connect_swapped (insert_case, "activate", - G_CALLBACK (gtk_action_activate), - de->insert_case); - - - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - gtk_separator_menu_item_new ()); - - - gtk_menu_shell_append (GTK_MENU_SHELL (menu), delete_case); - - - gtk_widget_show_all (menu); - - return menu; -} - - - static void on_recent_data_select (GtkMenuShell *menushell, PsppireWindow *window) @@ -1582,7 +1545,13 @@ psppire_data_window_init (PsppireDataWindow *de) } { - GtkMenu *data_sheet_variable_popup_menu = get_widget_assert (de->builder, + GtkWidget *data_sheet_cases_popup_menu = get_widget_assert (de->builder, + "datasheet-cases-popup"); + + GtkWidget *var_sheet_variable_popup_menu = get_widget_assert (de->builder, + "varsheet-variable-popup"); + + GtkWidget *data_sheet_variable_popup_menu = get_widget_assert (de->builder, "datasheet-variable-popup"); g_signal_connect_swapped (get_action_assert (de->builder, "sort-up"), "activate", @@ -1593,12 +1562,6 @@ psppire_data_window_init (PsppireDataWindow *de) G_CALLBACK (psppire_data_editor_sort_descending), de->data_editor); - GtkMenu *var_sheet_variable_popup_menu = get_widget_assert (de->builder, - "varsheet-variable-popup"); - - GtkMenu *data_sheet_cases_popup_menu = - GTK_MENU (create_data_sheet_cases_popup_menu (de)); - g_object_set (de->data_editor, "datasheet-column-menu", data_sheet_variable_popup_menu, "datasheet-row-menu", data_sheet_cases_popup_menu,