Removed visibility from recent file menuitems, if recent managers aren't
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 8 Jul 2007 11:13:54 +0000 (11:13 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 8 Jul 2007 11:13:54 +0000 (11:13 +0000)
available.

src/ui/gui/data-editor.c
src/ui/gui/data-editor.glade

index 982b6983a8cf8ebe46c2d4e5545716d3816ed700..fd800de68e3b77e7817069e143c2d193db29f3c3 100644 (file)
@@ -130,7 +130,6 @@ static void
 on_recent_data_select (GtkMenuShell *menushell,   gpointer user_data)
 {
   gchar *file;
-
   struct data_editor *de = user_data;
 
   gchar *uri =
@@ -254,8 +253,6 @@ new_data_editor (void)
                    G_CALLBACK (insert_variable), de);
 
 
-
-
   gtk_action_connect_proxy (de->insert_variable,
                            get_widget_assert (de->xml, "button-insert-variable")
                            );
@@ -372,11 +369,16 @@ new_data_editor (void)
     GtkRecentManager *rm = gtk_recent_manager_get_default ();
     GtkWidget *recent_data = get_widget_assert (de->xml, "file_recent-data");
     GtkWidget *recent_files = get_widget_assert (de->xml, "file_recent-files");
+    GtkWidget *recent_separator = get_widget_assert (de->xml, "file_separator1");
 
     GtkWidget *menu = gtk_recent_chooser_menu_new_for_manager (rm);
 
     GtkRecentFilter *filter = gtk_recent_filter_new ();
 
+    gtk_widget_show (recent_data);
+    gtk_widget_show (recent_files);
+    gtk_widget_show (recent_separator);
+
     gtk_recent_filter_add_pattern (filter, "*.sav");
     gtk_recent_filter_add_pattern (filter, "*.SAV");
 
index a4dbe64411995a4f5c3bcf01c427b0e2b3afc743..148219c2250c591c3752542b4f6ca208d38e1844 100644 (file)
                       </widget>
                     </child>
                     <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
-                        <property name="visible">True</property>
+                      <widget class="GtkSeparatorMenuItem" id="file_separator1">
+                        <property name="visible">False</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                       </widget>
                     </child>
                     <child>
                       <widget class="GtkMenuItem" id="file_recent-data">
-                        <property name="visible">True</property>
+                        <property name="visible">False</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="label" translatable="yes">Recently Used Da_ta</property>
                         <property name="use_underline">True</property>
                     </child>
                     <child>
                       <widget class="GtkMenuItem" id="file_recent-files">
-                        <property name="visible">True</property>
+                        <property name="visible">False</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="label" translatable="yes">Recently Used _Files</property>
                         <property name="use_underline">True</property>