]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Wrap GtkButton
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 17 Feb 2016 03:46:03 +0000 (14:46 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 17 Feb 2016 03:46:03 +0000 (14:46 +1100)
17 files changed:
contrib/bkgrnd2d/dialog.cpp
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
contrib/camera/dialogs.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/hydratoolz/plugin.cpp
contrib/prtview/AboutDialog.cpp
contrib/prtview/ConfigDialog.cpp
contrib/prtview/LoadPortalFileDialog.cpp
contrib/sunplug/sunplug.cpp
libs/gtkutil/dialog.cpp
libs/gtkutil/toolbar.cpp
libs/uilib/uilib.cpp
libs/uilib/uilib.h
plugins/textool/TexTool.cpp
radiant/entityinspector.cpp
radiant/patchdialog.cpp
radiant/texwindow.cpp

index ed3ccc15fd7ec6b354287c2093d4b2eeb2c4d3c0..a8f01769d699813084e4e51c3bd034dc2d75385f 100644 (file)
@@ -214,14 +214,14 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){
 
        gtk_widget_show( m_pFileLabel );
 
-       w = gtk_button_new_with_label( "Browse..." );
+       w = ui::Button( "Browse..." );
        g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( browse_callback ),
                                          ( gpointer ) this );
        gtk_box_pack_start( GTK_BOX( hbox ),w, FALSE, FALSE, 5 );
        gtk_tooltips_set_tip( pTooltips, w, "Select a file", NULL );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Reload" );
+       w = ui::Button( "Reload" );
        g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( reload_callback ),
                                          ( gpointer ) this );
        // TODO disable until we have file
@@ -265,7 +265,7 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){
        gtk_container_add( GTK_CONTAINER( frame ), hbox );
        gtk_container_set_border_width( GTK_CONTAINER( hbox ),4 );
 
-       w = gtk_button_new_with_label( "from selection" );
+       w = ui::Button( "from selection" );
        gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, FALSE, 5 );
        g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( size_sel_callback ),
                                          ( gpointer ) this );
@@ -273,7 +273,7 @@ CBackgroundDialogPage::CBackgroundDialogPage( VIEWTYPE vt ){
        gtk_widget_show( w );
 
        if ( m_vt == XY ) {
-               w = gtk_button_new_with_label( "from map mins/maxs" );
+               w = ui::Button( "from map mins/maxs" );
                gtk_box_pack_start( GTK_BOX( hbox ),w, TRUE, FALSE, 2 );
                g_signal_connect( G_OBJECT( w ), "clicked", G_CALLBACK( size_mm_callback ),
                                                  ( gpointer ) this );
index 0e79ae1a721d88768d53664067e6b696c176183a..334aa17d84bc62e14c409e06effd8794aeb72bb1 100644 (file)
@@ -376,7 +376,7 @@ EMessageBoxReturn DoIntersectBox( IntersectRS* rs ){
 
        // ---- hbox ---- ok/cancel buttons
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
 
@@ -384,7 +384,7 @@ EMessageBoxReturn DoIntersectBox( IntersectRS* rs ){
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -530,7 +530,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){
 
        // ---- hbox ----
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
 
@@ -538,7 +538,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -772,14 +772,14 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "OK" );
+       w = ui::Button( "OK" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -959,7 +959,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){
        tw1.one = textFrontBackTex;
        tw1.two = comboMain;
 
-       buttonSetMain = gtk_button_new_with_label( "Set As Main Texture" );
+       buttonSetMain = ui::Button( "Set As Main Texture" );
        gtk_signal_connect( GTK_OBJECT( buttonSetMain ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback_settex ), &tw1 );
        gtk_box_pack_start( GTK_BOX( hbox ), buttonSetMain, FALSE, FALSE, 0 );
        gtk_widget_show( buttonSetMain );
@@ -979,7 +979,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){
        tw2.one = textTrimTex;
        tw2.two = comboTrim;
 
-       buttonSetTrim = gtk_button_new_with_label( "Set As Trim Texture" );
+       buttonSetTrim = ui::Button( "Set As Trim Texture" );
        gtk_signal_connect( GTK_OBJECT( buttonSetTrim ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback_settex ), &tw2 );
        gtk_box_pack_start( GTK_BOX( hbox ), buttonSetTrim, FALSE, FALSE, 0 );
        gtk_widget_show( buttonSetTrim );
@@ -1017,14 +1017,14 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "OK" );
+       w = ui::Button( "OK" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -1178,7 +1178,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "Enable" );
+       w = ui::Button( "Enable" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
        gtk_widget_show( w );
@@ -1186,12 +1186,12 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
 
-       w = gtk_button_new_with_label( "Disable" );
+       w = ui::Button( "Disable" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDNO ) );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -1269,7 +1269,7 @@ EMessageBoxReturn DoCTFColourChangeBox(){
 
        // ---- hbox ---- ok/cancel buttons
 
-       w = gtk_button_new_with_label( "Red->Blue" );
+       w = ui::Button( "Red->Blue" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
 
@@ -1277,12 +1277,12 @@ EMessageBoxReturn DoCTFColourChangeBox(){
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Blue->Red" );
+       w = ui::Button( "Blue->Red" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -1548,7 +1548,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){
 
        // ---- hbox ----
 
-       w = gtk_button_new_with_label( "Use Selected Brushes" );
+       w = ui::Button( "Use Selected Brushes" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
 
@@ -1556,12 +1556,12 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Use All Brushes" );
+       w = ui::Button( "Use All Brushes" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDYES ) );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -1835,7 +1835,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){
 
        // ---- hbox ----
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
 
@@ -1843,7 +1843,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -1974,14 +1974,14 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){
        gtk_widget_show( w );
 
 
-       w = gtk_button_new_with_label( "OK" );
+       w = ui::Button( "OK" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
index bf9a952f1ad7eaae8d1190b9a0c4e0299f0b0668..59ff069ab66e0017e9f225011244454f8d6a0af1 100644 (file)
@@ -129,7 +129,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        gtk_widget_show( w );
@@ -137,7 +137,7 @@ static gint ci_new( GtkWidget *widget, gpointer data ){
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -411,7 +411,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        gtk_widget_show( w );
@@ -419,7 +419,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -558,7 +558,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        gtk_widget_show( w );
@@ -566,7 +566,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -898,7 +898,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "Ok" );
+       w = ui::Button( "Ok" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDOK ) );
        gtk_widget_show( w );
@@ -906,7 +906,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){
        GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT );
        gtk_widget_grab_default( w );
 
-       w = gtk_button_new_with_label( "Cancel" );
+       w = ui::Button( "Cancel" );
        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( eIDCANCEL ) );
        gtk_widget_show( w );
@@ -1141,12 +1141,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
        gtk_widget_show( hbox );
 
-       w = gtk_button_new_with_label( "Rename..." );
+       w = ui::Button( "Rename..." );
        gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_rename ), NULL );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Add Target..." );
+       w = ui::Button( "Add Target..." );
        gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, TRUE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_add_target ), NULL );
        gtk_widget_show( w );
@@ -1272,12 +1272,12 @@ GtkWidget *CreateCameraInspectorDialog( void ){
        gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 );
        gtk_widget_show( vbox );
 
-       w = gtk_button_new_with_label( "Add..." );
+       w = ui::Button( "Add..." );
        gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_add ), NULL );
        gtk_widget_show( w );
 
-       w = gtk_button_new_with_label( "Del" );
+       w = ui::Button( "Del" );
        gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( ci_del ), NULL );
        gtk_widget_show( w );
index 87d8e573f25e848766b7e8ce3ad17c61018768f1..5bea5b28a447c35fa3c5b697fc397976b7a173d9 100644 (file)
@@ -1827,14 +1827,14 @@ GtkWidget* create_main_dialog(){
                                          (GtkAttachOptions) ( 0 ),
                                          (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 );
 
-       button = gtk_button_new_with_label( "Browse..." );
+       button = ui::Button( "Browse..." );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 );
        gtk_widget_set_usize( button, 60, -2 );
        g_object_set_data( G_OBJECT( dlg ), "bmp_file_browse", button );
        g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( bitmap_browse ), NULL );
 
-       button = gtk_button_new_with_label( "Reload" );
+       button = ui::Button( "Reload" );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( hbox2 ), button, FALSE, FALSE, 0 );
        gtk_widget_set_usize( button, 60, -2 );
@@ -1969,7 +1969,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "fix_rate", entry );
        g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( fix_rate_entryfocusout ), NULL );
 
-       button = gtk_button_new_with_label( "Free" );
+       button = ui::Button( "Free" );
        gtk_widget_show( button );
        gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 0, 1,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
@@ -1978,7 +1978,7 @@ GtkWidget* create_main_dialog(){
        g_object_set_data( G_OBJECT( dlg ), "fix_free", button );
        g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( fix_free ), NULL );
 
-       button = gtk_button_new_with_label( "Free All" );
+       button = ui::Button( "Free All" );
        gtk_widget_show( button );
        gtk_table_attach( GTK_TABLE( table ), button, 2, 3, 1, 2,
                                          (GtkAttachOptions) ( GTK_EXPAND ),
@@ -2138,7 +2138,7 @@ GtkWidget* create_main_dialog(){
        gtk_widget_show( vbox );
        gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, TRUE, 0 );
 
-       button = gtk_button_new_with_label( "OK" );
+       button = ui::Button( "OK" );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
        gtk_widget_set_usize( button, 60, -2 );
@@ -2149,25 +2149,25 @@ GtkWidget* create_main_dialog(){
        gtk_widget_show( label );
        gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, TRUE, 0 );
 
-       button = gtk_button_new_with_label( "Open..." );
+       button = ui::Button( "Open..." );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "open", button );
        g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( main_open ), NULL );
 
-       button = gtk_button_new_with_label( "Save as..." );
+       button = ui::Button( "Save as..." );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "save", button );
        g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( main_save ), NULL );
 
-       button = gtk_button_new_with_label( "Defaults" );
+       button = ui::Button( "Defaults" );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
        g_object_set_data( G_OBJECT( dlg ), "defaults", button );
        g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( main_defaults ), NULL );
 
-       button = gtk_button_new_with_label( "About..." );
+       button = ui::Button( "About..." );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, TRUE, 0 );
        g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( main_about ), NULL );
index c08f7446613f841d6365f9b26eb0c51bfd3db935..703b52adb3d0a85c06e415d353acff71494f8188 100644 (file)
@@ -113,7 +113,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
        gtk_widget_show( hbox );
 
        if ( mode == MB_OK ) {
-               w = gtk_button_new_with_label( "Ok" );
+               w = ui::Button( "Ok" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
@@ -123,7 +123,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                ret = IDOK;
        }
        else if ( mode ==  MB_OKCANCEL ) {
-               w = gtk_button_new_with_label( "Ok" );
+               w = ui::Button( "Ok" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
@@ -131,7 +131,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                gtk_widget_grab_default( w );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "Cancel" );
+               w = ui::Button( "Cancel" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
@@ -139,7 +139,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                ret = IDCANCEL;
        }
        else if ( mode == MB_YESNOCANCEL ) {
-               w = gtk_button_new_with_label( "Yes" );
+               w = ui::Button( "Yes" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
@@ -147,13 +147,13 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                gtk_widget_grab_default( w );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "No" );
+               w = ui::Button( "No" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "Cancel" );
+               w = ui::Button( "Cancel" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
@@ -162,7 +162,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
        }
        else /* if (mode == MB_YESNO) */
        {
-               w = gtk_button_new_with_label( "Yes" );
+               w = ui::Button( "Yes" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
@@ -170,7 +170,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                gtk_widget_grab_default( w );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "No" );
+               w = ui::Button( "No" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
index 6376ec28efbd8cd20597b975c52b7b8356a6d2ad..3d3fce12716e28f339b89f5a59a48dadc83462ad 100644 (file)
@@ -81,7 +81,7 @@ void DoAboutDlg(){
        gtk_widget_show( vbox );
        gtk_box_pack_start( GTK_BOX( hbox ), vbox, FALSE, FALSE, 0 );
 
-       button = gtk_button_new_with_label( "OK" );
+       button = ui::Button( "OK" );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked",
index 31e53e8e31dafda12eef49822781c014a66c853e..a9f2d724e89fdf7b2b68c4fb293a331a8cbee80c 100644 (file)
@@ -291,14 +291,14 @@ void DoConfigDialog(){
        gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
        gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 
-       button = gtk_button_new_with_label( "Color" );
+       button = ui::Button( "Color" );
        gtk_widget_show( button );
        gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 0, 1,
                                          (GtkAttachOptions) ( GTK_FILL ),
                                          (GtkAttachOptions) ( 0 ), 0, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColor3d ), NULL );
 
-       button = gtk_button_new_with_label( "Depth Color" );
+       button = ui::Button( "Depth Color" );
        gtk_widget_show( button );
        gtk_table_attach( GTK_TABLE( table ), button, 0, 1, 1, 2,
                                          (GtkAttachOptions) ( GTK_FILL ),
@@ -439,7 +439,7 @@ void DoConfigDialog(){
        gtk_widget_show( hbox );
        gtk_box_pack_start( GTK_BOX( vbox2 ), hbox, TRUE, FALSE, 0 );
 
-       button = gtk_button_new_with_label( "Color" );
+       button = ui::Button( "Color" );
        gtk_widget_show( button );
        gtk_box_pack_start( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( OnColor2d ), NULL );
@@ -463,7 +463,7 @@ void DoConfigDialog(){
        gtk_widget_show( hbox );
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
 
-       button = gtk_button_new_with_label( "OK" );
+       button = ui::Button( "OK" );
        gtk_widget_show( button );
        gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked",
index dbfcdc90e93df1baa1bf7504f5cab79a301a5631..6993f74a43a1169645efe484f1e3a1804e61131b 100644 (file)
@@ -139,7 +139,7 @@ int DoLoadPortalFileDialog(){
        gtk_widget_show( check2d );
        gtk_box_pack_start( GTK_BOX( hbox ), check2d, FALSE, FALSE, 0 );
 
-       button = gtk_button_new_with_label( "Change" );
+       button = ui::Button( "Change" );
        gtk_widget_show( button );
        gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked", GTK_SIGNAL_FUNC( change_clicked ), entry );
@@ -149,14 +149,14 @@ int DoLoadPortalFileDialog(){
        gtk_widget_show( hbox );
        gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 );
 
-       button = gtk_button_new_with_label( "Cancel" );
+       button = ui::Button( "Cancel" );
        gtk_widget_show( button );
        gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked",
                                                GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
        gtk_widget_set_usize( button, 60, -2 );
 
-       button = gtk_button_new_with_label( "OK" );
+       button = ui::Button( "OK" );
        gtk_widget_show( button );
        gtk_box_pack_end( GTK_BOX( hbox ), button, FALSE, FALSE, 0 );
        gtk_signal_connect( GTK_OBJECT( button ), "clicked",
index 77ef38440fc2423b8ad93023cb03874b3bb65a90..77ce83bde8334ac03b86c9596cb0af0baf087767 100644 (file)
@@ -272,7 +272,7 @@ void about_plugin_window(){
        gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // text align left
        gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, FALSE, 2 ); // insert the label in the box
 
-       button = gtk_button_new_with_label( "OK" ); // create a button with text
+       button = ui::Button( "OK" ); // create a button with text
        g_signal_connect_swapped( G_OBJECT( button ), "clicked", G_CALLBACK( gtk_widget_destroy ), window ); // connect the click event to close the window
        gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 2 ); // insert the button in the box
 
@@ -372,7 +372,7 @@ void MapCoordinator(){
                spinner_adj_MaxX = (GtkAdjustment *)gtk_adjustment_new( map_maxX, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of maximum x value
                spinner_adj_MaxY = (GtkAdjustment *)gtk_adjustment_new( map_maxY, -65536.0, 65536.0, 1.0, 5.0, 0 ); // create adjustment for value and range of maximum y value
 
-               button = gtk_button_new_with_label( "Get optimal mapcoords" ); // create button with text
+               button = ui::Button( "Get optimal mapcoords" ); // create button with text
                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( input_optimal ), NULL ); // connect button with callback function
                gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 2 ); // insert button into vbox
 
@@ -418,11 +418,11 @@ void MapCoordinator(){
                msp.spinner4 = GTK_SPIN_BUTTON( spinnerMaxY );
                msp.worldspawn = theWorldspawn;
 
-               button = gtk_button_new_with_label( "Set" ); // create button with text
+               button = ui::Button( "Set" ); // create button with text
                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( set_coordinates ), NULL ); // connect button with callback function
                gtk_table_attach_defaults( GTK_TABLE( table ), button, 1, 2, 3, 4 ); // insert button into table
 
-               button = gtk_button_new_with_label( "Cancel" ); // create button with text
+               button = ui::Button( "Cancel" ); // create button with text
                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( close_window ), NULL ); // connect button with callback function
                gtk_table_attach_defaults( GTK_TABLE( table ), button, 2, 3, 3, 4 ); // insert button into table
        }
@@ -433,7 +433,7 @@ void MapCoordinator(){
                gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_LEFT ); // text align left
                gtk_box_pack_start( GTK_BOX( vbox ), label, FALSE, FALSE, 2 ); // insert the label in the box
 
-               button = gtk_button_new_with_label( "OK" ); // create a button with text
+               button = ui::Button( "OK" ); // create a button with text
                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( close_window ), NULL ); // connect the click event to close the window
                gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 2 ); // insert the button in the box
        }
index af95003ddedaa19e6f572aa721f1a4acf7de8310..0da7c5872a56c0d8e20707c1fad99e53aaf6172e 100644 (file)
@@ -66,7 +66,7 @@ GtkTable* create_dialog_table( unsigned int rows, unsigned int columns, unsigned
 }
 
 GtkButton* create_dialog_button( const char* label, GCallback func, gpointer data ){
-       GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( label ) );
+       GtkButton* button = ui::Button( label );
        gtk_widget_set_size_request( GTK_WIDGET( button ), 64, -1 );
        gtk_widget_show( GTK_WIDGET( button ) );
        g_signal_connect( G_OBJECT( button ), "clicked", func, data );
@@ -218,7 +218,7 @@ PathEntry PathEntry_new(){
        gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 );
 
        // browse button
-       GtkButton* button = GTK_BUTTON( gtk_button_new() );
+       GtkButton* button = ui::Button();
        button_set_icon( button, "ellipsis.bmp" );
        gtk_widget_show( GTK_WIDGET( button ) );
        gtk_box_pack_end( GTK_BOX( hbox ), GTK_WIDGET( button ), FALSE, FALSE, 0 );
index 3ac74f610451be6cd95ddb7795059774f42c7f7d..ef7c99a4e0ab9e315107eccfffb7020452f2e723 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <gtk/gtktoolbar.h>
 #include <gtk/gtktogglebutton.h>
+#include <uilib/uilib.h>
 
 #include "generic/callback.h"
 
@@ -41,7 +42,7 @@ void toolbar_append( GtkToolbar* toolbar, GtkButton* button, const char* descrip
 }
 
 GtkButton* toolbar_append_button( GtkToolbar* toolbar, const char* description, const char* icon, const Callback& callback ){
-       GtkButton* button = GTK_BUTTON( gtk_button_new() );
+       GtkButton* button = ui::Button();
        button_set_icon( button, icon );
        button_connect_callback( button, callback );
        toolbar_append( toolbar, button, description );
index 3e63601673b4a5ff3c0dbda8a4b7acb262482629..7e10501d08698afd74c68ff0ec8f5f64c839dadf 100644 (file)
@@ -88,6 +88,9 @@ namespace ui {
             : Alignment(GTK_ALIGNMENT(gtk_alignment_new(xalign, yalign, xscale, yscale)))
     { }
 
+    Button::Button() : Button(GTK_BUTTON(gtk_button_new()))
+    { }
+
     Button::Button(const char *label) : Button(GTK_BUTTON(gtk_button_new_with_label(label)))
     { }
 
index d1b9962c846745be045fa86d6ef274ae6570dd8a..bd287b71ce41b8fe6f8d701f75db9c92f6f48cec 100644 (file)
@@ -112,6 +112,7 @@ namespace ui {
     WRAP(Box, Widget, ui_box,);
 
     WRAP(Button, Widget, ui_button,
+         Button();
          Button(const char *label);
     );
 
index eb776255db222d39ffb1584a041148b36a511403..4de2ac5e25e700f0fabd9df857c159763aadbca5 100644 (file)
@@ -83,7 +83,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
        gtk_widget_show( hbox );
 
        if ( mode == MB_OK ) {
-               w = gtk_button_new_with_label( "Ok" );
+               w = ui::Button( "Ok" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
@@ -93,7 +93,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                ret = IDOK;
        }
        else if ( mode ==  MB_OKCANCEL ) {
-               w = gtk_button_new_with_label( "Ok" );
+               w = ui::Button( "Ok" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDOK ) );
@@ -101,7 +101,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                gtk_widget_grab_default( w );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "Cancel" );
+               w = ui::Button( "Cancel" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
@@ -109,7 +109,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                ret = IDCANCEL;
        }
        else if ( mode == MB_YESNOCANCEL ) {
-               w = gtk_button_new_with_label( "Yes" );
+               w = ui::Button( "Yes" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
@@ -117,13 +117,13 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                gtk_widget_grab_default( w );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "No" );
+               w = ui::Button( "No" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "Cancel" );
+               w = ui::Button( "Cancel" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) );
@@ -132,7 +132,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
        }
        else /* if (mode == MB_YESNO) */
        {
-               w = gtk_button_new_with_label( "Yes" );
+               w = ui::Button( "Yes" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) );
@@ -140,7 +140,7 @@ int DoMessageBox( const char* lpText, const char* lpCaption, guint32 uType ){
                gtk_widget_grab_default( w );
                gtk_widget_show( w );
 
-               w = gtk_button_new_with_label( "No" );
+               w = ui::Button( "No" );
                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 );
                gtk_signal_connect( GTK_OBJECT( w ), "clicked",
                                                        GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) );
index 6aeedb322c2d5d9b1839b390ad4bb4d1b81fc719..c97407c7ab982bf58c17d4fe968c3f34445f15cd 100644 (file)
@@ -1507,13 +1507,13 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){
                                        gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox ), FALSE, TRUE, 0 );
 
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Clear All" ) );
+                                               GtkButton* button = ui::Button( "Clear All" );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( EntityInspector_clearAllKeyValues ), 0 );
                                                gtk_box_pack_start( hbox, GTK_WIDGET( button ), TRUE, TRUE, 0 );
                                        }
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Delete Key" ) );
+                                               GtkButton* button = ui::Button( "Delete Key" );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( EntityInspector_clearKeyValue ), 0 );
                                                gtk_box_pack_start( hbox, GTK_WIDGET( button ), TRUE, TRUE, 0 );
index 81a936b241027f0327a668bfbe797e9aecd4b7bd..69dda6d7c90aab976314e44150243440c6719117 100644 (file)
@@ -857,7 +857,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
                                                {
-                                                       GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Flip" ) );
+                                                       GtkButton* button = ui::Button( "Flip" );
                                                        gtk_widget_show( GTK_WIDGET( button ) );
                                                        gtk_table_attach( table, GTK_WIDGET( button ), 3, 4, 2, 3,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
@@ -874,7 +874,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
                                                }
                                                {
-                                                       GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Flip" ) );
+                                                       GtkButton* button = ui::Button( "Flip" );
                                                        gtk_widget_show( GTK_WIDGET( button ) );
                                                        gtk_table_attach( table, GTK_WIDGET( button ), 3, 4, 3, 4,
                                                                                          (GtkAttachOptions)( GTK_FILL ),
@@ -1003,35 +1003,35 @@ ui::Window PatchInspector::BuildDialog(){
                                        gtk_widget_show( GTK_WIDGET( hbox2 ) );
                                        gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( hbox2 ), TRUE, FALSE, 0 );
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Auto Cap" ) );
+                                               GtkButton* button = ui::Button( "Auto Cap" );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchAutoCap ), 0 );
                                                gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
                                        }
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "CAP" ) );
+                                               GtkButton* button = ui::Button( "CAP" );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchdetails ), 0 );
                                                gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
                                        }
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Set..." ) );
+                                               GtkButton* button = ui::Button( "Set..." );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchreset ), 0 );
                                                gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
                                        }
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Natural" ) );
+                                               GtkButton* button = ui::Button( "Natural" );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchnatural ), 0 );
                                                gtk_widget_set_usize( GTK_WIDGET( button ), 60, -1 );
                                        }
                                        {
-                                               GtkButton* button = GTK_BUTTON( gtk_button_new_with_label( "Fit" ) );
+                                               GtkButton* button = ui::Button( "Fit" );
                                                gtk_widget_show( GTK_WIDGET( button ) );
                                                gtk_box_pack_end( GTK_BOX( hbox2 ), GTK_WIDGET( button ), TRUE, FALSE, 0 );
                                                g_signal_connect( G_OBJECT( button ), "clicked", G_CALLBACK( OnBtnPatchfit ), 0 );
index b24f042297d769d47fa16a2a638c86c7c8aa0aef..b4b1180d85faaaaf58b2175d4db75b4561ae9843 100644 (file)
@@ -1882,7 +1882,7 @@ void TextureBrowser_constructSearchButton(){
        GtkTooltips* tooltips = gtk_tooltips_new();
 
        ui::Widget image = ui::Widget(gtk_image_new_from_stock( GTK_STOCK_FIND, GTK_ICON_SIZE_SMALL_TOOLBAR ));
-       g_TextureBrowser.m_search_button = ui::Widget(gtk_button_new());
+       g_TextureBrowser.m_search_button = ui::Button();
        g_signal_connect( G_OBJECT( g_TextureBrowser.m_search_button ), "clicked", G_CALLBACK( TextureBrowser_searchTags ), NULL );
        gtk_tooltips_set_tip( GTK_TOOLTIPS( tooltips ), g_TextureBrowser.m_search_button, "Search with selected tags", "Search with selected tags" );
        gtk_container_add( GTK_CONTAINER( g_TextureBrowser.m_search_button ), image );
@@ -2126,8 +2126,8 @@ ui::Widget TextureBrowser_constructWindow( ui::Window toplevel ){
                        gtk_table_attach( GTK_TABLE( frame_table ), scrolled_win, 2, 3, 1, 3, GTK_FILL, GTK_FILL, 0, 0 );
                }
                { // tag arrow buttons
-                       ui::Widget m_btn_left = ui::Widget(gtk_button_new());
-                       ui::Widget m_btn_right = ui::Widget(gtk_button_new());
+                       ui::Widget m_btn_left = ui::Button();
+                       ui::Widget m_btn_right = ui::Button();
                        ui::Widget m_arrow_left = ui::Widget(gtk_arrow_new( GTK_ARROW_LEFT, GTK_SHADOW_OUT ));
                        ui::Widget m_arrow_right = ui::Widget(gtk_arrow_new( GTK_ARROW_RIGHT, GTK_SHADOW_OUT ));
                        gtk_container_add( GTK_CONTAINER( m_btn_left ), m_arrow_left );