From: John Darrington Date: Sat, 21 Feb 2009 00:32:24 +0000 (+0900) Subject: Converted output-viewer.glade to GtkBuilder X-Git-Tag: v0.7.3~296^2~6 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a5214467725248b62062664ce6d7fab26e8517b;p=pspp-builds.git Converted output-viewer.glade to GtkBuilder --- diff --git a/src/ui/gui/automake.mk b/src/ui/gui/automake.mk index b9246ccc..0176108d 100644 --- a/src/ui/gui/automake.mk +++ b/src/ui/gui/automake.mk @@ -73,6 +73,7 @@ nodist_src_ui_gui_psppire_DATA = \ $(top_builddir)/src/ui/gui/message-dialog.ui \ $(top_builddir)/src/ui/gui/psppire.ui \ $(top_builddir)/src/ui/gui/oneway.ui \ + $(top_builddir)/src/ui/gui/output-viewer.ui \ $(top_builddir)/src/ui/gui/rank.ui \ $(top_builddir)/src/ui/gui/recode.ui \ $(top_builddir)/src/ui/gui/regression.ui \ diff --git a/src/ui/gui/output-viewer.glade b/src/ui/gui/output-viewer.glade index aeb88793..0b709ee4 100644 --- a/src/ui/gui/output-viewer.glade +++ b/src/ui/gui/output-viewer.glade @@ -72,7 +72,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Windows diff --git a/src/ui/gui/psppire-output-window.c b/src/ui/gui/psppire-output-window.c index 89075424..bd923625 100644 --- a/src/ui/gui/psppire-output-window.c +++ b/src/ui/gui/psppire-output-window.c @@ -18,7 +18,6 @@ #include #include -#include #include "helper.h" #include @@ -182,7 +181,7 @@ on_textview_resize (GtkWidget *widget, static void psppire_output_window_init (PsppireOutputWindow *window) { - GladeXML *xml = XML_NEW ("output-viewer.glade"); + GtkBuilder *xml = builder_new ("output-viewer.ui"); GtkWidget *box = gtk_vbox_new (FALSE, 0); @@ -209,7 +208,7 @@ psppire_output_window_init (PsppireOutputWindow *window) gtk_widget_show_all (box); - connect_help (xml); + // connect_help (xml); window->buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (window->textview)); @@ -233,23 +232,25 @@ psppire_output_window_init (PsppireOutputWindow *window) window->fp = NULL; - 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,"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_ui_manager_get_widget (uim,"/ui/menubar1/windows_menuitem/windows_minimise-all")->parent); g_object_unref (xml); diff --git a/src/ui/gui/psppire-syntax-window.c b/src/ui/gui/psppire-syntax-window.c index 2b4c5b5e..7de62913 100644 --- a/src/ui/gui/psppire-syntax-window.c +++ b/src/ui/gui/psppire-syntax-window.c @@ -587,7 +587,7 @@ psppire_syntax_window_init (PsppireSyntaxWindow *window) 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); + GTK_MENU_SHELL (gtk_ui_manager_get_widget (uim,"/ui/menubar2/windows/windows_minimise_all")->parent); g_object_unref (xml);