X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-syntax-window.c;h=2b4c5b5e4ae871384bd6beb625e336b8c3411c8a;hb=b48a20de787a6374000174949dcd8f9666ecc51c;hp=31f4966ef33948495e7d65898059776c7314bf79;hpb=deb4fd96c0c171fc8eb64f7f1e7f5c2af4931416;p=pspp-builds.git diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index 31f4966e..2b4c5b5e 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -18,7 +18,6 @@ #include #include -#include #include "helper.h" #include @@ -485,9 +484,9 @@ extern struct source_stream *the_source_stream ; static void psppire_syntax_window_init (PsppireSyntaxWindow *window) { - GladeXML *xml = XML_NEW ("syntax-editor.glade"); + GtkBuilder *xml = builder_new ("syntax-editor.ui"); GtkWidget *box = gtk_vbox_new (FALSE, 0); - + GtkWidget *menubar = get_widget_assert (xml, "menubar2"); GtkWidget *sw = get_widget_assert (xml, "scrolledwindow8"); @@ -501,7 +500,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window) g_signal_connect (window->buffer, "changed", G_CALLBACK (on_text_changed), window); - connect_help (xml); + // connect_help (xml); gtk_container_add (GTK_CONTAINER (window), box); @@ -518,74 +517,78 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window) gtk_widget_show_all (box); - g_signal_connect (get_widget_assert (xml,"file_new_syntax"), + g_signal_connect (get_object_assert (xml,"file_new_syntax"), "activate", G_CALLBACK (create_syntax_window), NULL); - g_signal_connect (get_widget_assert (xml,"file_open_syntax"), + g_signal_connect (get_object_assert (xml,"file_open_syntax"), "activate", G_CALLBACK (open_syntax_window), window); #if 0 - g_signal_connect (get_widget_assert (xml,"file_new_data"), + g_signal_connect (get_object_assert (xml,"file_new_data"), "activate", G_CALLBACK (create_data_window), window); #endif - g_signal_connect (get_widget_assert (xml,"help_about"), + g_signal_connect (get_object_assert (xml,"help_about"), "activate", G_CALLBACK (about_new), window); - g_signal_connect (get_widget_assert (xml,"help_reference"), + g_signal_connect (get_object_assert (xml,"help_reference"), "activate", G_CALLBACK (reference_manual), NULL); - g_signal_connect (get_widget_assert (xml, "file_save"), + g_signal_connect (get_object_assert (xml, "file_save"), "activate", G_CALLBACK (on_syntax_save), window); - g_signal_connect (get_widget_assert (xml, "file_save_as"), + g_signal_connect (get_object_assert (xml, "file_save_as"), "activate", G_CALLBACK (on_syntax_save_as), window); - g_signal_connect (get_widget_assert (xml,"file_quit"), + g_signal_connect (get_object_assert (xml,"file_quit"), "activate", G_CALLBACK (on_quit), window); - g_signal_connect (get_widget_assert (xml,"run_all"), + g_signal_connect (get_object_assert (xml,"run_all"), "activate", G_CALLBACK (on_run_all), window); - g_signal_connect (get_widget_assert (xml,"run_selection"), + g_signal_connect (get_object_assert (xml,"run_selection"), "activate", G_CALLBACK (on_run_selection), window); - g_signal_connect (get_widget_assert (xml,"run_current_line"), + g_signal_connect (get_object_assert (xml,"run_current_line"), "activate", G_CALLBACK (on_run_current_line), window); - g_signal_connect (get_widget_assert (xml,"run_to_end"), + g_signal_connect (get_object_assert (xml,"run_to_end"), "activate", G_CALLBACK (on_run_to_end), window); - g_signal_connect (get_widget_assert (xml,"windows_minimise_all"), + g_signal_connect (get_object_assert (xml,"windows_minimise_all"), "activate", G_CALLBACK (psppire_window_minimise_all), NULL); - PSPPIRE_WINDOW (window)->menu = GTK_MENU_SHELL (get_widget_assert (xml,"windows_menu")); + GtkUIManager *uim = GTK_UI_MANAGER (get_object_assert (xml, "uimanager1")); + + PSPPIRE_WINDOW (window)->menu = + GTK_MENU_SHELL (GTK_WIDGET (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all"))->parent); + g_object_unref (xml);