Converted output-viewer.glade to GtkBuilder
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 21 Feb 2009 00:32:24 +0000 (09:32 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 21 Feb 2009 00:32:24 +0000 (09:32 +0900)
src/ui/gui/automake.mk
src/ui/gui/output-viewer.glade
src/ui/gui/psppire-output-window.c
src/ui/gui/psppire-syntax-window.c

index b9246ccc49c06384c5a3d038724769a9870f5a2b..0176108d385e3b36923e60e1a51bca78c946084f 100644 (file)
@@ -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 \
index aeb8879340d53912a36cc3efd2a9612d9866e20c..0b709ee4cadee9fc91a8cb53bdc5a05324612169 100644 (file)
@@ -72,7 +72,7 @@
               </widget>
             </child>
             <child>
-              <widget class="GtkMenuItem" id="menuitem3">
+              <widget class="GtkMenuItem" id="windows_menuitem">
                 <property name="visible">True</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">_Windows</property>
index 89075424e0c6a1465098e68f41009cff05ba9147..bd923625859b7c6919fd1db51587a84cfc90b3cc 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <gtk/gtksignal.h>
 #include <gtk/gtkbox.h>
-#include <glade/glade.h>
 #include "helper.h"
 
 #include <libpspp/message.h>
@@ -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);
 
index 2b4c5b5e4ae871384bd6beb625e336b8c3411c8a..7de62913482258153618bf7be23c41597958f594 100644 (file)
@@ -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);