]> granicus.if.org Git - graphviz/commitdiff
Use alternative mechanism for changing menus to work on old Centos5 systems
authorerg <devnull@localhost>
Thu, 7 Oct 2010 19:49:09 +0000 (19:49 +0000)
committererg <devnull@localhost>
Thu, 7 Oct 2010 19:49:09 +0000 (19:49 +0000)
cmd/smyrna/gui/menucallbacks.c
share/gui/smyrna.glade

index 4d3d31618e71e781177a31fbad1ba3ca6429e1a5..d431f75926b3f3fff997f2be0de0c9e22164d7e1 100755 (executable)
@@ -182,13 +182,15 @@ void mShowConsoleSlot(GtkWidget * widget, gpointer user_data)
        menui = (GtkMenuItem*)glade_xml_get_widget(xml, "show_console1");
 
     if (state) {
-       gtk_widget_hide(glade_xml_get_widget(xml, "vbox13"));
-       gtk_menu_item_set_label (menui, "Show Console");
+       gtk_widget_hide (glade_xml_get_widget(xml, "vbox13"));
+       gtk_widget_show (glade_xml_get_widget(xml, "show_console1"));
+       gtk_widget_hide (glade_xml_get_widget(xml, "hide_console1")); 
        state = 0;
     }
     else {
-       gtk_widget_show(glade_xml_get_widget(xml, "vbox13"));
-       gtk_menu_item_set_label (menui, "Hide Console");
+       gtk_widget_show (glade_xml_get_widget(xml, "vbox13"));
+       gtk_widget_hide (glade_xml_get_widget(xml, "show_console1"));
+       gtk_widget_show (glade_xml_get_widget(xml, "hide_console1")); 
        state = 1;
     }
 }
index 2a702a197a66fd6c13cbbae877e05f72925e95ef..022f23e15c9963a3360a7905429b9627e7eb4802 100755 (executable)
                          <signal name="activate" handler="mShowConsoleSlot" last_modification_time="Wed, 22 Jul 2009 16:17:32 GMT"/>
                        </widget>
                      </child>
+                     <child>
+                       <widget class="GtkMenuItem" id="hide_console1">
+                         <property name="visible">False</property>
+                         <property name="label" translatable="yes">Hide Console</property>
+                         <property name="use_underline">True</property>
+                         <signal name="activate" handler="mShowConsoleSlot" last_modification_time="Wed, 22 Jul 2009 16:17:32 GMT"/>
+                       </widget>
+                     </child>
 
                      <child>
                        <widget class="GtkMenuItem" id="view_selected_nodes1">