Avoid gtk_widget_reparent which is deprecated
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 4 Jul 2015 17:28:33 +0000 (19:28 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 4 Jul 2015 17:28:33 +0000 (19:28 +0200)
src/ui/gui/output-window.ui
src/ui/gui/psppire-output-window.c

index f89deb10c447951abc076c9b4182bcbcaba6258c..76822d17d88bada97c4aad289e4ab69ce3f83cc1 100644 (file)
   </object>
   <!-- interface-requires gtk+ 2.16 -->
   <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkWindow" id="output-viewer-window">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="default_width">600</property>
-    <property name="default_height">400</property>
-    <child>
       <object class="GtkBox" id="box1">
         <property name="visible">True</property>
        <property name="orientation">GTK_ORIENTATION_VERTICAL</property>
           </packing>
         </child>
       </object>
-    </child>
-  </object>
 </interface>
index 75e3362da8c3653ff09f27d66cd8331ee4dc266c..14df40dbebc461fe17c05a1c338ac2bc211522ca 100644 (file)
@@ -474,11 +474,10 @@ psppire_output_window_export (PsppireOutputWindow *window)
 static void
 psppire_output_window_init (PsppireOutputWindow *window)
 {
-  GtkBuilder *xml;
+  GtkBuilder *xml = builder_new ("output-window.ui");
 
-  xml = builder_new ("output-window.ui");
-
-  gtk_widget_reparent (get_widget_assert (xml, "box1"), GTK_WIDGET (window));
+  GtkWidget *box = get_widget_assert (xml, "box1");
+  gtk_container_add (GTK_CONTAINER (window), box);
 
   window->dispose_has_run = FALSE;