]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/gtkutil/dialog.cpp
GTK: wrap gtk_widget_set_size_request
[xonotic/netradiant.git] / libs / gtkutil / dialog.cpp
index c826731050b00a731b80cb41f62bdb3929951c7a..6200ba64e62c7c6ce057086c182f188b8d411e8d 100644 (file)
@@ -58,7 +58,7 @@ ui::Table create_dialog_table( unsigned int rows, unsigned int columns, unsigned
 
 ui::Button create_dialog_button( const char* label, GCallback func, gpointer data ){
        auto button = ui::Button( label );
-       gtk_widget_set_size_request( button , 64, -1 );
+       button.dimensions(64, -1);
        button.show();
        button.connect( "clicked", func, data );
        return button;
@@ -118,7 +118,7 @@ ui::Window create_fixedsize_modal_dialog_window( ui::Window parent, const char*
 
        window_remove_minmax( window );
 
-       //gtk_widget_set_size_request(window, width, height);
+       //window.dimensions(width, height);
        //gtk_window_set_default_size(window, width, height);
        //gtk_window_resize(window, width, height);
        //GdkGeometry geometry = { width, height, -1, -1, width, height, -1, -1, -1, -1, GDK_GRAVITY_STATIC, };
@@ -251,17 +251,13 @@ ui::Table DialogRow_new( const char* name, ui::Widget widget ){
        gtk_table_set_col_spacings( table, 4 );
        gtk_table_set_row_spacings( table, 0 );
 
-       gtk_table_attach( table, DialogLabel_new( name  ), 0, 1, 0, 1,
-                                         (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
-                                         (GtkAttachOptions) ( 0 ), 0, 0 );
+    table.attach(DialogLabel_new(name), {0, 1, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
 
-       gtk_table_attach( table, widget, 1, 3, 0, 1,
-                                         (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
-                                         (GtkAttachOptions) ( 0 ), 0, 0 );
+    table.attach(widget, {1, 3, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
 
        return table;
 }
 
-void DialogVBox_packRow( ui::VBox vbox, ui::Widget row ){
+void DialogVBox_packRow( ui::Box vbox, ui::Widget row ){
        vbox.pack_start( row, FALSE, FALSE, 0 );
 }