]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
GTK: wrap gtk_widget_set_size_request
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 30 Dec 2017 04:44:11 +0000 (15:44 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 30 Dec 2017 04:44:11 +0000 (15:44 +1100)
16 files changed:
contrib/camera/dialogs.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/prtview/ConfigDialog.cpp
contrib/prtview/LoadPortalFileDialog.cpp
libs/gtkutil/dialog.cpp
libs/gtkutil/messagebox.cpp
radiant/console.cpp
radiant/dialog.cpp
radiant/entityinspector.cpp
radiant/findtexturedialog.cpp
radiant/gtkdlgs.cpp
radiant/mainframe.cpp
radiant/patchdialog.cpp
radiant/select.cpp
radiant/surfacedialog.cpp
radiant/texwindow.cpp

index 5c998b4917756221265703f0d6bb23f0d40e5817..5bcd984d179cd6a77e8dfb2dd8fcad6cf78703c1 100644 (file)
@@ -1247,7 +1247,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){
        hbox.show();
 
        auto scr = w = ui::ScrolledWindow();
-       gtk_widget_set_size_request( w, 0, 150 );
+       w.dimensions( 0, 150 );
        gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( w ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
        hbox.pack_start( w, TRUE, TRUE, 0 );
        w.show();
index 5f49a545cd5eebb7b1a7d25e0cdbd7154f3777fc..e64a6598b5fc68c5bc63cb8dd8d8d9019dd82a22 100644 (file)
@@ -1474,21 +1474,21 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
     table2.attach(entry, {1, 2, 0, 1});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "wavelength", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &WaveLength );
 
        entry = ui::Entry();
        entry.show();
     table2.attach(entry, {1, 2, 1, 2});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "amplitude", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Amplitude );
 
        entry = ui::Entry();
        entry.show();
        table2.attach(entry, {1, 2, 2, 3});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "roughness", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Roughness );
 
@@ -1497,7 +1497,7 @@ GtkWidget* create_main_dialog(){
        spin = ui::SpinButton( adj, 1, 0 );
        spin.show();
        table2.attach(spin, {1, 2, 3, 4});
-       gtk_widget_set_size_request( spin, 60, -1 );
+       spin.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "random", spin );
 
        vbox = ui::VBox( FALSE, 5 );
@@ -1554,28 +1554,28 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 1, 2});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "hmin", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hll );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {3, 4, 1, 2});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "hmax", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hur );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 2, 3});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "vmin", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vll );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {3, 4, 2, 3});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "vmax", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vur );
 
@@ -1605,7 +1605,7 @@ GtkWidget* create_main_dialog(){
        spin = ui::SpinButton( adj, 1, 0 );
        spin.show();
        table.attach(spin, {1, 2, 0, 1});
-       gtk_widget_set_size_request( spin, 60, -1 );
+       spin.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "nh", spin );
 
        adj = ui::Adjustment( 8, 1, MAX_ROWS, 1, 10, 0 );
@@ -1613,7 +1613,7 @@ GtkWidget* create_main_dialog(){
        spin = ui::SpinButton( adj, 1, 0 );
        spin.show();
        table.attach(spin, {1, 2, 1, 2});
-       gtk_widget_set_size_request( spin, 60, -1 );
+       spin.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "nv", spin );
 
        check = ui::CheckButton( "Use Bezier patches" );
@@ -1633,7 +1633,7 @@ GtkWidget* create_main_dialog(){
        spin = ui::SpinButton( adj, 1, 0 );
        spin.show();
        vbox.pack_start( spin, FALSE, TRUE, 0 );
-       gtk_widget_set_size_request( spin, 60, -1 );
+       spin.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "sp", spin );
        // ^Fishman - End of Snap to grid code.
 
@@ -1685,28 +1685,28 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 0, 1});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "z01", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z01 );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 1, 2});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "z00", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z00 );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {3, 4, 0, 1});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "z11", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z11 );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {3, 4, 1, 2});
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "z10", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z10 );
 
@@ -1754,14 +1754,14 @@ GtkWidget* create_main_dialog(){
        button = ui::Button( "Browse..." );
        button.show();
        hbox2.pack_start( button, FALSE, FALSE, 0 );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_file_browse", button );
        button.connect( "clicked", G_CALLBACK( bitmap_browse ), NULL );
 
        button = ui::Button( "Reload" );
        button.show();
        hbox2.pack_start( button, FALSE, FALSE, 0 );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_reload", button );
        button.connect( "clicked", G_CALLBACK( bitmap_reload ), NULL );
 
@@ -1793,7 +1793,7 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
        hbox2.pack_start( entry, FALSE, FALSE, 0 );
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_black", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.black_value );
 
@@ -1804,7 +1804,7 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
        hbox2.pack_start( entry, FALSE, FALSE, 0 );
-       gtk_widget_set_size_request( entry, 50, -1 );
+       entry.dimensions( 50, -1 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_white", entry );
        entry.connect( "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &gbmp.white_value );
 
@@ -1855,35 +1855,35 @@ GtkWidget* create_main_dialog(){
        spin = ui::SpinButton( adj, 1, 0 );
        spin.show();
        table.attach(spin, {1, 2, 0, 1}, {GTK_EXPAND, GTK_EXPAND});
-       gtk_widget_set_size_request( spin, 60, -1 );
+       spin.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "fix_value", spin );
        spin.connect( "focus_out_event", G_CALLBACK( fix_value_entryfocusout ), NULL );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "fix_range", entry );
        entry.connect( "focus_out_event", G_CALLBACK( fix_range_entryfocusout ), NULL );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "fix_rate", entry );
        entry.connect( "focus_out_event", G_CALLBACK( fix_rate_entryfocusout ), NULL );
 
        button = ui::Button( "Free" );
        button.show();
        table.attach(button, {2, 3, 0, 1}, {GTK_EXPAND, GTK_FILL});
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "fix_free", button );
        button.connect( "clicked", G_CALLBACK( fix_free ), NULL );
 
        button = ui::Button( "Free All" );
        button.show();
        table.attach(button, {2, 3, 1, 2}, {GTK_EXPAND, GTK_FILL});
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "fix_freeall", button );
        button.connect( "clicked", G_CALLBACK( fix_freeall ), NULL );
 
@@ -1920,21 +1920,21 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texture1", entry );
        entry.connect( "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 0 ) );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texture2", entry );
        entry.connect( "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 1 ) );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texture3", entry );
 
        hbox2 = ui::HBox( FALSE, 5 );
@@ -1968,25 +1968,25 @@ GtkWidget* create_main_dialog(){
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texoffsetx", entry );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texoffsety", entry );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {2, 3, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texscalex", entry );
 
        entry = ui::Entry();
        entry.show();
        table.attach(entry, {3, 4, 1, 2}, {GTK_EXPAND | GTK_FILL, GTK_FILL});
-       gtk_widget_set_size_request( entry, 60, -1 );
+       entry.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "texscaley", entry );
 
 
@@ -2017,7 +2017,7 @@ GtkWidget* create_main_dialog(){
        button = ui::Button( "OK" );
        button.show();
        vbox.pack_start( button, FALSE, TRUE, 0 );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions( 60, -1 );
        g_object_set_data( G_OBJECT( dlg ), "go", button );
        button.connect( "clicked", G_CALLBACK( main_go ), NULL );
 
index 64f539c7da33112418f7a8c492d2c8f94aef1e1a..0d3a39206969e99587b03ef97d461365fcc78393 100644 (file)
@@ -398,7 +398,7 @@ void DoConfigDialog(){
        button.show();
        hbox.pack_start( button, FALSE, FALSE, 0 );
        button.connect( "clicked", G_CALLBACK( OnColor2d ), NULL );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        auto aa2check = ui::CheckButton( "Anti-Alias (May not work on some video cards)" );
        aa2check.show();
@@ -423,7 +423,7 @@ void DoConfigDialog(){
        hbox.pack_end(button, FALSE, FALSE, 0);
        button.connect( "clicked",
                                                G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        // initialize dialog
        gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( show2check ), portals.show_2d );
index 0d095a74ccb738aaa8317b94684b17c7ba593646..890658e14733d2929a1d9c627da74ddfe0aad447 100644 (file)
@@ -113,7 +113,7 @@ int DoLoadPortalFileDialog(){
        button.show();
        hbox.pack_end(button, FALSE, FALSE, 0);
        button.connect( "clicked", G_CALLBACK( change_clicked ), entry );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        hbox = ui::HBox( FALSE, 5 );
        hbox.show();
@@ -124,14 +124,14 @@ int DoLoadPortalFileDialog(){
        hbox.pack_end(button, FALSE, FALSE, 0);
        button.connect( "clicked",
                                                G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        button = ui::Button( "OK" );
        button.show();
        hbox.pack_end(button, FALSE, FALSE, 0);
        button.connect( "clicked",
                                                G_CALLBACK( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        strcpy( portals.fn, GlobalRadiant().getMapName() );
        char* fn = strrchr( portals.fn, '.' );
index 4c50e7b904bb31e23853e20a2e7d0e10f350bdfa..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, };
index d71dfadbed0d16587a42625dfb0afcc6e3d62357..56b401318e169d747674c2a4213bbf76e392cbd1 100644 (file)
@@ -30,7 +30,7 @@
 ui::Widget create_padding( int width, int height ){
        ui::Alignment widget = ui::Alignment( 0.0, 0.0, 0.0, 0.0 );
        widget.show();
-       gtk_widget_set_size_request( widget, width, height );
+       widget.dimensions(width, height);
        return widget;
 }
 
index 8c72bcd77b3d107291b5f7b71bda28c49de2379c..e12b4733c4800ccb95c5e741778d66a2bcc046ab 100644 (file)
@@ -111,7 +111,7 @@ ui::Widget Console_constructWindow( ui::Window toplevel ){
 
        {
                auto text = ui::TextView(ui::New);
-               gtk_widget_set_size_request( text, 0, -1 ); // allow shrinking
+               text.dimensions(0, -1); // allow shrinking
                gtk_text_view_set_wrap_mode( text, GTK_WRAP_WORD );
                gtk_text_view_set_editable( text, FALSE );
                scr.add(text);
index 769b4e676157197be0656c09734b9ea3e4ce80e3..c6672ae4c5af9564077f857399b8aa28883b7892 100644 (file)
@@ -50,7 +50,7 @@
 ui::Entry DialogEntry_new(){
        auto entry = ui::Entry(ui::New);
        entry.show();
-       gtk_widget_set_size_request( entry , 64, -1 );
+       entry.dimensions(64, -1);
        return entry;
 }
 
@@ -83,7 +83,7 @@ ui::SpinButton DialogSpinner_new( double value, double lower, double upper, int
        }
        auto spin = ui::SpinButton( ui::Adjustment( value, lower, upper, step, 10, 0 ), step, digits );
        spin.show();
-       gtk_widget_set_size_request( spin , 64, -1 );
+       spin.dimensions(64, -1);
        return spin;
 }
 
index cc523adf7a8d03113492e317610bf8c12c4f2002..8fd73db5d56b52d5f5d1579e01d1ac365485891f 100644 (file)
@@ -1352,7 +1352,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
 
                                {
                                        auto text = ui::TextView(ui::New);
-                                       gtk_widget_set_size_request( text , 0, -1 ); // allow shrinking
+                                       text.dimensions(0, -1); // allow shrinking
                                        gtk_text_view_set_wrap_mode( text, GTK_WRAP_WORD );
                                        gtk_text_view_set_editable( text, FALSE );
                                        text.show();
index 14dc5406a5c4ef5aaadf8086081a88b43409f98c..e4bf2f12a118fb4f74766775ead5ea15aef7b7d8 100644 (file)
@@ -189,14 +189,14 @@ ui::Window FindTextureDialog::BuildDialog(){
        vbox.pack_start( button, FALSE, FALSE, 0 );
        button.connect( "clicked",
                                          G_CALLBACK( OnApply ), 0 );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        button = ui::Button( "Close" );
        button.show();
        vbox.pack_start( button, FALSE, FALSE, 0 );
        button.connect( "clicked",
                                          G_CALLBACK( OnClose ), 0 );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        return dlg;
 }
index fdecfc9920337016f3b0158f4b170268326f2de1..8338c2031e63af34ebce560e0716c76ed40de7a1 100644 (file)
@@ -738,14 +738,14 @@ static void CreateGtkTextEditor(){
        hbox.pack_end(button, FALSE, FALSE, 0);
        button.connect( "clicked",
                                          G_CALLBACK( editor_close ), dlg );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        button = ui::Button( "Save" );
        button.show();
        hbox.pack_end(button, FALSE, FALSE, 0);
        button.connect( "clicked",
                                          G_CALLBACK( editor_save ), dlg );
-       gtk_widget_set_size_request( button, 60, -1 );
+       button.dimensions(60, -1);
 
        text_editor = dlg;
        text_widget = text;
index eae58cddadc99f551ca6258f0c6df905379a30a4..f23f73237c4b29f0fa3cfcdad4079efa29f239a0 100644 (file)
@@ -1631,7 +1631,7 @@ WaitDialog create_wait_dialog( const char* title, const char* text ){
                gtk_misc_set_alignment( GTK_MISC( dialog.m_label ), 0.0, 0.5 );
                gtk_label_set_justify( dialog.m_label, GTK_JUSTIFY_LEFT );
                dialog.m_label.show();
-               gtk_widget_set_size_request( dialog.m_label , 200, -1 );
+               dialog.m_label.dimensions(200, -1);
 
                dialog.m_window.add(dialog.m_label);
        }
@@ -2674,7 +2674,7 @@ ui::Window create_splash(){
        image.show();
        window.add(image);
 
-       gtk_widget_set_size_request( window , -1, -1 );
+       window.dimensions(-1, -1);
        window.show();
 
        return window;
index c38469e347226d558e19fdc0f6c20872db303d30..b4af86de07045c6523188238cab88a6254f95ac6 100644 (file)
@@ -609,7 +609,7 @@ ui::Window PatchInspector::BuildDialog(){
 
                                                                combo.show();
                                 table.attach(combo, {0, 1, 1, 2}, {(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0)}, {0, 0});
-                                                               gtk_widget_set_size_request( combo , 60, -1 );
+                                                               combo.dimensions(60, -1);
                                                                m_pRowCombo = combo;
                                                        }
 
@@ -620,7 +620,7 @@ ui::Window PatchInspector::BuildDialog(){
 
                                                                combo.show();
                                 table.attach(combo, {1, 2, 1, 2}, {(GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0)}, {0, 0});
-                                                               gtk_widget_set_size_request( combo , 60, -1 );
+                                                               combo.dimensions(60, -1);
                                                                m_pColCombo = combo;
                                                        }
                                                }
@@ -806,7 +806,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        button.show();
                             table.attach(button, {3, 4, 2, 3}, {GTK_FILL, 0});
                                                        button.connect( "clicked", G_CALLBACK( OnBtnPatchFlipX ), 0 );
-                                                       gtk_widget_set_size_request( button , 60, -1 );
+                                                       button.dimensions(60, -1);
                                                }
                                                {
                                                        auto label = ui::Label( "Vertical Stretch Step" );
@@ -819,7 +819,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        button.show();
                             table.attach(button, {3, 4, 3, 4}, {GTK_FILL, 0});
                                                        button.connect( "clicked", G_CALLBACK( OnBtnPatchFlipY ), 0 );
-                                                       gtk_widget_set_size_request( button , 60, -1 );
+                                                       button.dimensions(60, -1);
                                                }
                                                {
                                                        auto label = ui::Label( "Rotate Step" );
@@ -831,7 +831,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        auto entry = ui::Entry(ui::New);
                                                        entry.show();
                             table.attach(entry, {0, 1, 0, 1}, {GTK_FILL, 0});
-                                                       gtk_widget_set_size_request( entry , 50, -1 );
+                                                       entry.dimensions(50, -1);
                                                        g_object_set_data( G_OBJECT( window ), "hshift_entry", (void *) entry );
                                                        // we fill in this data, if no patch is selected the widgets are unmodified when the inspector is raised
                                                        // so we need to have at least one initialisation somewhere
@@ -844,14 +844,14 @@ ui::Window PatchInspector::BuildDialog(){
                                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                                        spin.show();
                             table.attach(spin, {1, 2, 0, 1}, {0, 0});
-                                                       gtk_widget_set_size_request( spin , 10, -1 );
+                                                       spin.dimensions(10, -1);
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
                                                        auto entry = ui::Entry(ui::New);
                                                        entry.show();
                             table.attach(entry, {0, 1, 1, 2}, {GTK_FILL, 0});
-                                                       gtk_widget_set_size_request( entry , 50, -1 );
+                                                       entry.dimensions(50, -1);
                                                        entry_set_float( entry, g_pi_globals.shift[1] );
 
                                                        auto adj = ui::Adjustment( 0, -8192, 8192, 1, 1, 0 );
@@ -861,14 +861,14 @@ ui::Window PatchInspector::BuildDialog(){
                                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                                        spin.show();
                             table.attach(spin, {1, 2, 1, 2}, {0, 0});
-                                                       gtk_widget_set_size_request( spin , 10, -1 );
+                                                       spin.dimensions(10, -1);
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
                                                        auto entry = ui::Entry(ui::New);
                                                        entry.show();
                             table.attach(entry, {0, 1, 2, 3}, {GTK_FILL, 0});
-                                                       gtk_widget_set_size_request( entry , 50, -1 );
+                                                       entry.dimensions(50, -1);
                                                        entry_set_float( entry, g_pi_globals.scale[0] );
 
                                                        auto adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 );
@@ -878,14 +878,14 @@ ui::Window PatchInspector::BuildDialog(){
                                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                                        spin.show();
                             table.attach(spin, {1, 2, 2, 3}, {0, 0});
-                                                       gtk_widget_set_size_request( spin , 10, -1 );
+                                                       spin.dimensions(10, -1);
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
                                                        auto entry = ui::Entry(ui::New);
                                                        entry.show();
                             table.attach(entry, {0, 1, 3, 4}, {GTK_FILL, 0});
-                                                       gtk_widget_set_size_request( entry , 50, -1 );
+                                                       entry.dimensions(50, -1);
                                                        entry_set_float( entry, g_pi_globals.scale[1] );
 
                                                        auto adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 );
@@ -895,14 +895,14 @@ ui::Window PatchInspector::BuildDialog(){
                                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                                        spin.show();
                             table.attach(spin, {1, 2, 3, 4}, {0, 0});
-                                                       gtk_widget_set_size_request( spin , 10, -1 );
+                                                       spin.dimensions(10, -1);
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                                {
                                                        auto entry = ui::Entry(ui::New);
                                                        entry.show();
                             table.attach(entry, {0, 1, 4, 5}, {GTK_FILL, 0});
-                                                       gtk_widget_set_size_request( entry , 50, -1 );
+                                                       entry.dimensions(50, -1);
                                                        entry_set_float( entry, g_pi_globals.rotate );
 
                                                        auto adj = ui::Adjustment( 0, -1000, 1000, 1, 1, 0 ); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
@@ -912,7 +912,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                                        spin.show();
                             table.attach(spin, {1, 2, 4, 5}, {0, 0});
-                                                       gtk_widget_set_size_request( spin , 10, -1 );
+                                                       spin.dimensions(10, -1);
                                                        gtk_widget_set_can_focus( spin, false );
                                                }
                                        }
@@ -924,35 +924,35 @@ ui::Window PatchInspector::BuildDialog(){
                                                button.show();
                                                hbox2.pack_end(button, TRUE, FALSE, 0);
                                                button.connect( "clicked", G_CALLBACK( OnBtnPatchAutoCap ), 0 );
-                                               gtk_widget_set_size_request( button , 60, -1 );
+                                               button.dimensions(60, -1);
                                        }
                                        {
                                                auto button = ui::Button( "CAP" );
                                                button.show();
                                                hbox2.pack_end(button, TRUE, FALSE, 0);
                                                button.connect( "clicked", G_CALLBACK( OnBtnPatchdetails ), 0 );
-                                               gtk_widget_set_size_request( button , 60, -1 );
+                                               button.dimensions(60, -1);
                                        }
                                        {
                                                auto button = ui::Button( "Set..." );
                                                button.show();
                                                hbox2.pack_end(button, TRUE, FALSE, 0);
                                                button.connect( "clicked", G_CALLBACK( OnBtnPatchreset ), 0 );
-                                               gtk_widget_set_size_request( button , 60, -1 );
+                                               button.dimensions(60, -1);
                                        }
                                        {
                                                auto button = ui::Button( "Natural" );
                                                button.show();
                                                hbox2.pack_end(button, TRUE, FALSE, 0);
                                                button.connect( "clicked", G_CALLBACK( OnBtnPatchnatural ), 0 );
-                                               gtk_widget_set_size_request( button , 60, -1 );
+                                               button.dimensions(60, -1);
                                        }
                                        {
                                                auto button = ui::Button( "Fit" );
                                                button.show();
                                                hbox2.pack_end(button, TRUE, FALSE, 0);
                                                button.connect( "clicked", G_CALLBACK( OnBtnPatchfit ), 0 );
-                                               gtk_widget_set_size_request( button , 60, -1 );
+                                               button.dimensions(60, -1);
                                        }
                                }
                        }
index 98565705a0cd66be785d818eaac44616444f0bb8..7b4319c6dcf89cc93abee17fcb6586cc20b9d538 100644 (file)
@@ -941,7 +941,7 @@ void DoRotateDlg(){
                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                        spin.show();
                     table.attach(spin, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
-                                       gtk_widget_set_size_request( spin , 64, -1 );
+                    spin.dimensions(64, -1);
                                        gtk_spin_button_set_wrap( spin, TRUE );
 
                                        gtk_widget_grab_focus( spin  );
@@ -953,7 +953,7 @@ void DoRotateDlg(){
                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                        spin.show();
                     table.attach(spin, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
-                                       gtk_widget_set_size_request( spin , 64, -1 );
+                    spin.dimensions(64, -1);
                                        gtk_spin_button_set_wrap( spin, TRUE );
 
                                        g_rotate_dialog.y = spin;
@@ -963,7 +963,7 @@ void DoRotateDlg(){
                                        auto spin = ui::SpinButton( adj, 1, 0 );
                                        spin.show();
                     table.attach(spin, {1, 2, 2, 3}, {GTK_EXPAND | GTK_FILL, 0});
-                                       gtk_widget_set_size_request( spin , 64, -1 );
+                    spin.dimensions(64, -1);
                                        gtk_spin_button_set_wrap( spin, TRUE );
 
                                        g_rotate_dialog.z = spin;
index ccf5663b951317dcfaa4a84b987eb115df6ab709..22e83b27e7db3c64029eef5a1fdfdefaab7ed361 100644 (file)
@@ -637,7 +637,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                m_hshiftSpinner.connect( spin );
                                spin.show();
                                table.attach(spin, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
-                               gtk_widget_set_size_request( spin , 60, -1 );
+                spin.dimensions(60, -1);
                        }
                        {
                                ui::Widget label = ui::Label( "Step" );
@@ -649,7 +649,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                auto entry = ui::Entry(ui::New);
                                entry.show();
                                table.attach(entry, {3, 4, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
-                               gtk_widget_set_size_request( entry , 50, -1 );
+                entry.dimensions(50, -1);
                                m_hshiftIncrement.m_entry = entry;
                                m_hshiftEntry.connect( entry );
                        }
@@ -665,7 +665,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                m_vshiftSpinner.connect( spin );
                                spin.show();
                                table.attach(spin, {1, 2, 1, 2}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( spin , 60, -1 );
+                spin.dimensions(60, -1);
                        }
                        {
                                ui::Widget label = ui::Label( "Step" );
@@ -677,7 +677,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                auto entry = ui::Entry(ui::New);
                                entry.show();
                                table.attach(entry, {3, 4, 1, 2}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( entry , 50, -1 );
+                entry.dimensions(50, -1);
                                m_vshiftIncrement.m_entry = entry;
                                m_vshiftEntry.connect( entry );
                        }
@@ -693,7 +693,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                m_hscaleSpinner.connect( spin );
                                spin.show();
                                table.attach(spin, {1, 2, 2, 3}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( spin , 60, -1 );
+                spin.dimensions(60, -1);
                        }
                        {
                                ui::Widget label = ui::Label( "Step" );
@@ -705,7 +705,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                auto entry = ui::Entry(ui::New);
                                entry.show();
                                table.attach(entry, {3, 4, 2, 3}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( entry , 50, -1 );
+                entry.dimensions(50, -1);
                                m_hscaleIncrement.m_entry = entry;
                                m_hscaleEntry.connect( entry );
                        }
@@ -721,7 +721,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                m_vscaleSpinner.connect( spin );
                                spin.show();
                                table.attach(spin, {1, 2, 3, 4}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( spin , 60, -1 );
+                spin.dimensions(60, -1);
                        }
                        {
                                ui::Widget label = ui::Label( "Step" );
@@ -733,7 +733,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                auto entry = ui::Entry(ui::New);
                                entry.show();
                                table.attach(entry, {3, 4, 3, 4}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( entry , 50, -1 );
+                entry.dimensions(50, -1);
                                m_vscaleIncrement.m_entry = entry;
                                m_vscaleEntry.connect( entry );
                        }
@@ -749,7 +749,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                m_rotateSpinner.connect( spin );
                                spin.show();
                                table.attach(spin, {1, 2, 4, 5}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( spin , 60, -1 );
+                spin.dimensions(60, -1);
                                gtk_spin_button_set_wrap( spin, TRUE );
                        }
                        {
@@ -762,7 +762,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                auto entry = ui::Entry(ui::New);
                                entry.show();
                                table.attach(entry, {3, 4, 4, 5}, {GTK_FILL, 0});
-                               gtk_widget_set_size_request( entry , 50, -1 );
+                entry.dimensions(50, -1);
                                m_rotateIncrement.m_entry = entry;
                                m_rotateEntry.connect( entry );
                        }
@@ -812,7 +812,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        table.attach(button, {0, 1, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
                                        button.connect( "clicked",
                                                                          G_CALLBACK( OnBtnAxial ), 0 );
-                                       gtk_widget_set_size_request( button, 60, -1 );
+                    button.dimensions(60, -1);
                                }
                                {
                                        ui::Widget button = ui::Button( "Fit" );
@@ -820,7 +820,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        table.attach(button, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
                                        button.connect( "clicked",
                                                                          G_CALLBACK( OnBtnFaceFit ), 0 );
-                                       gtk_widget_set_size_request( button, 60, -1 );
+                    button.dimensions(60, -1);
                                }
                                {
                                        ui::Widget button = ui::Button( "CAP" );
@@ -828,7 +828,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        table.attach(button, {0, 1, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
                                        button.connect( "clicked",
                                                                          G_CALLBACK( OnBtnPatchdetails ), 0 );
-                                       gtk_widget_set_size_request( button, 60, -1 );
+                    button.dimensions(60, -1);
                                }
                                {
                                        ui::Widget button = ui::Button( "Set..." );
@@ -836,7 +836,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        table.attach(button, {1, 2, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
                                        button.connect( "clicked",
                                                                          G_CALLBACK( OnBtnPatchreset ), 0 );
-                                       gtk_widget_set_size_request( button, 60, -1 );
+                    button.dimensions(60, -1);
                                }
                                {
                                        ui::Widget button = ui::Button( "Natural" );
@@ -844,7 +844,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        table.attach(button, {2, 3, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
                                        button.connect( "clicked",
                                                                          G_CALLBACK( OnBtnPatchnatural ), 0 );
-                                       gtk_widget_set_size_request( button, 60, -1 );
+                    button.dimensions(60, -1);
                                }
                                {
                                        ui::Widget button = ui::Button( "Fit" );
@@ -852,20 +852,20 @@ ui::Window SurfaceInspector::BuildDialog(){
                                        table.attach(button, {3, 4, 3, 4}, {GTK_EXPAND | GTK_FILL, 0});
                                        button.connect( "clicked",
                                                                          G_CALLBACK( OnBtnPatchFit ), 0 );
-                                       gtk_widget_set_size_request( button, 60, -1 );
+                    button.dimensions(60, -1);
                                }
                                {
                                        auto spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 );
                                        spin.show();
                                        table.attach(spin, {2, 3, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
-                                       gtk_widget_set_size_request( spin, 60, -1 );
+                    spin.dimensions(60, -1);
                                        AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitHorizontal );
                                }
                                {
                                        auto spin = ui::SpinButton( ui::Adjustment( 1, 0, 1 << 16, 1, 10, 0 ), 0, 6 );
                                        spin.show();
                                        table.attach(spin, {3, 4, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
-                                       gtk_widget_set_size_request( spin, 60, -1 );
+                    spin.dimensions(60, -1);
                                        AddDialogData( *GTK_SPIN_BUTTON( spin ), m_fitVertical );
                                }
                        }
@@ -977,7 +977,7 @@ ui::Window SurfaceInspector::BuildDialog(){
                                gtk_widget_set_can_focus( TexTool::g_textoolWin, true );
                                // <-- end stuff...
                                TexTool::g_textoolWin.show();
-                               gtk_widget_set_size_request( TexTool::g_textoolWin, -1, 240 ); //Yeah!
+                               TexTool::g_textoolWin.dimensions( -1, 240 ); //Yeah!
                                frame.add(TexTool::g_textoolWin);
 
                                TexTool::g_textoolWin.connect( "size_allocate", G_CALLBACK( TexTool::size_allocate ), NULL );
index 7607c4b9d821a76ae7acbcd8e28dafcccb642a69..20c5bd9cd5f549b04ea5abd5925a274b320f22b6 100644 (file)
@@ -2182,8 +2182,8 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){
                        m_btn_right.add(m_arrow_right);
 
                        // workaround. the size of the tag frame depends of the requested size of the arrow buttons.
-                       gtk_widget_set_size_request( m_arrow_left, -1, 68 );
-                       gtk_widget_set_size_request( m_arrow_right, -1, 68 );
+                       m_arrow_left.dimensions(-1, 68);
+                       m_arrow_right.dimensions(-1, 68);
 
                        frame_table.attach(m_btn_left, {1, 2, 1, 2}, {GTK_SHRINK, GTK_EXPAND});
                        frame_table.attach(m_btn_right, {1, 2, 2, 3}, {GTK_SHRINK, GTK_EXPAND});