]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/uilib/uilib.cpp
radiant: build netradiant as non-PIE binary on Linux to workaround a mime-type bug
[xonotic/netradiant.git] / libs / uilib / uilib.cpp
index 1f4acb1fc7fec334f8501cd33d285bea319d40e3..5caf150d2c9bb16c2218235610c1bce346725f89 100644 (file)
@@ -87,6 +87,16 @@ namespace ui {
     void IWidget::visible(bool shown)
     {
         if (shown) {
+
+#ifdef WORKAROUND_WINDOWS_GTK2_GLWIDGET
+            /* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
+            GtkWidget* glwidget = GTK_WIDGET( g_object_get_data( G_OBJECT( this ), "glwidget" ) );
+            if ( glwidget ){
+                gtk_widget_hide( glwidget );
+                gtk_widget_show( glwidget );
+            }
+#endif // WORKAROUND_WINDOWS_GTK2_GLWIDGET
+
             this.show();
         } else {
             this.hide();
@@ -260,6 +270,11 @@ namespace ui {
         gtk_box_pack_end(this, child, expand, fill, padding);
     }
 
+    void IBox::set_child_packing(ui::Widget child, bool expand, bool fill, unsigned int padding, ui::Packing packing)
+    {
+        gtk_box_set_child_packing(this, child, expand, fill, padding, (GtkPackType) packing);
+    }
+
     IMPL(VBox, GTK_VBOX);
 
     VBox::VBox(bool homogenous, int spacing) : VBox(GTK_VBOX(gtk_vbox_new(homogenous, spacing)))