From: TimePath Date: Wed, 17 Feb 2016 03:59:25 +0000 (+1100) Subject: Wrap GtkEntry X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=002fff8d33761100ce997e3190b4846c152c5a16;p=xonotic%2Fnetradiant.git Wrap GtkEntry --- diff --git a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp index 334aa17d..f5da88c3 100644 --- a/contrib/bobtoolz/dialogs/dialogs-gtk.cpp +++ b/contrib/bobtoolz/dialogs/dialogs-gtk.cpp @@ -466,7 +466,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- hbox2 ---- - text1 = gtk_entry_new_with_max_length( 256 ); + text1 = ui::Entry( 256 ); gtk_entry_set_text( (GtkEntry*)text1, "3" ); gtk_box_pack_start( GTK_BOX( hbox2 ), text1, FALSE, FALSE, 2 ); gtk_widget_show( text1 ); @@ -484,7 +484,7 @@ EMessageBoxReturn DoPolygonBox( PolygonRS* rs ){ // ---- hbox2 ---- - text2 = gtk_entry_new_with_max_length( 256 ); + text2 = ui::Entry( 256 ); gtk_entry_set_text( (GtkEntry*)text2, "8" ); gtk_box_pack_start( GTK_BOX( hbox2 ), text2, FALSE, FALSE, 2 ); gtk_widget_show( text2 ); @@ -639,7 +639,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textStairHeight = gtk_entry_new_with_max_length( 256 ); + textStairHeight = ui::Entry( 256 ); gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 ); gtk_widget_show( textStairHeight ); @@ -740,7 +740,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textMainTex = gtk_entry_new_with_max_length( 512 ); + textMainTex = ui::Entry( 512 ); gtk_entry_set_text( GTK_ENTRY( textMainTex ), rs->mainTexture ); gtk_box_pack_start( GTK_BOX( hbox ), textMainTex, FALSE, FALSE, 0 ); gtk_widget_show( textMainTex ); @@ -755,7 +755,7 @@ EMessageBoxReturn DoBuildStairsBox( BuildStairsRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textRiserTex = gtk_entry_new_with_max_length( 512 ); + textRiserTex = ui::Entry( 512 ); gtk_box_pack_start( GTK_BOX( hbox ), textRiserTex, FALSE, FALSE, 0 ); gtk_widget_show( textRiserTex ); @@ -886,7 +886,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textFrontBackTex = gtk_entry_new_with_max_length( 512 ); + textFrontBackTex = ui::Entry( 512 ); gtk_entry_set_text( GTK_ENTRY( textFrontBackTex ), rs->mainTexture ); gtk_box_pack_start( GTK_BOX( hbox ), textFrontBackTex, FALSE, FALSE, 0 ); gtk_widget_show( textFrontBackTex ); @@ -901,7 +901,7 @@ EMessageBoxReturn DoDoorsBox( DoorRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textTrimTex = gtk_entry_new_with_max_length( 512 ); + textTrimTex = ui::Entry( 512 ); gtk_box_pack_start( GTK_BOX( hbox ), textTrimTex, FALSE, FALSE, 0 ); gtk_widget_show( textTrimTex ); @@ -1098,7 +1098,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ // ---- hbox ---- - text1 = gtk_entry_new_with_max_length( 256 ); + text1 = ui::Entry( 256 ); gtk_entry_set_text( (GtkEntry*)text1, "25" ); gtk_box_pack_start( GTK_BOX( hbox ), text1, FALSE, FALSE, 2 ); gtk_widget_show( text1 ); @@ -1116,7 +1116,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ // ---- hbox ---- - text2 = gtk_entry_new_with_max_length( 256 ); + text2 = ui::Entry( 256 ); gtk_entry_set_text( (GtkEntry*)text2, "3" ); gtk_box_pack_start( GTK_BOX( hbox ), text2, FALSE, FALSE, 2 ); gtk_widget_show( text2 ); @@ -1139,7 +1139,7 @@ EMessageBoxReturn DoPathPlotterBox( PathPlotterRS* rs ){ // ---- hbox ---- - text3 = gtk_entry_new_with_max_length( 256 ); + text3 = ui::Entry( 256 ); gtk_entry_set_text( (GtkEntry*)text3, "-800" ); gtk_box_pack_start( GTK_BOX( hbox ), text3, FALSE, FALSE, 2 ); gtk_widget_show( text3 ); @@ -1374,7 +1374,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editTexOld = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editTexOld = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editTexOld ), rs->textureName ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editTexOld, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1387,7 +1387,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editTexNew = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editTexNew = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editTexNew ), rs->textureName ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editTexNew, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1422,7 +1422,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editScaleHor = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editScaleHor = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editScaleHor ), "0.5" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editScaleHor, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1443,7 +1443,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editScaleVert = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editScaleVert = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editScaleVert ), "0.5" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editScaleVert, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1478,7 +1478,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editShiftHor = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editShiftHor = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editShiftHor ), "0" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editShiftHor, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1499,7 +1499,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editShiftVert = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editShiftVert = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editShiftVert ), "0" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editShiftVert, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1533,7 +1533,7 @@ EMessageBoxReturn DoResetTextureBox( ResetTextureRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - dlgTexReset.editRotation = gtk_entry_new_with_max_length( 256 ); + dlgTexReset.editRotation = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( dlgTexReset.editRotation ), "0" ); gtk_table_attach( GTK_TABLE( table ), dlgTexReset.editRotation, 2, 3, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1693,7 +1693,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - radiusX = gtk_entry_new_with_max_length( 256 ); + radiusX = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( radiusX ), "100" ); gtk_table_attach( GTK_TABLE( table ), radiusX, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1708,7 +1708,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - radiusY = gtk_entry_new_with_max_length( 256 ); + radiusY = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( radiusY ), "100" ); gtk_table_attach( GTK_TABLE( table ), radiusY, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1736,7 +1736,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - angleStart = gtk_entry_new_with_max_length( 256 ); + angleStart = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( angleStart ), "0" ); gtk_table_attach( GTK_TABLE( table ), angleStart, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1751,7 +1751,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - angleEnd = gtk_entry_new_with_max_length( 256 ); + angleEnd = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( angleEnd ), "90" ); gtk_table_attach( GTK_TABLE( table ), angleEnd, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1778,7 +1778,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - heightStart = gtk_entry_new_with_max_length( 256 ); + heightStart = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( heightStart ), "0" ); gtk_table_attach( GTK_TABLE( table ), heightStart, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1793,7 +1793,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - heightEnd = gtk_entry_new_with_max_length( 256 ); + heightEnd = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( heightEnd ), "0" ); gtk_table_attach( GTK_TABLE( table ), heightEnd, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -1821,7 +1821,7 @@ EMessageBoxReturn DoTrainThingBox( TrainThingRS* rs ){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_widget_show( w ); - numPoints = gtk_entry_new_with_max_length( 256 ); + numPoints = ui::Entry( 256 ); gtk_entry_set_text( GTK_ENTRY( numPoints ), "0" ); gtk_table_attach( GTK_TABLE( table ), numPoints, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_FILL ), @@ -1951,7 +1951,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textlinkNum = gtk_entry_new_with_max_length( 256 ); + textlinkNum = ui::Entry( 256 ); gtk_box_pack_start( GTK_BOX( hbox ), textlinkNum, FALSE, FALSE, 1 ); gtk_widget_show( textlinkNum ); @@ -1965,7 +1965,7 @@ EMessageBoxReturn DoMakeChainBox( MakeChainRS* rs ){ gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); gtk_widget_show( hbox ); - textlinkName = gtk_entry_new_with_max_length( 256 ); + textlinkName = ui::Entry( 256 ); gtk_box_pack_start( GTK_BOX( hbox ), textlinkName, FALSE, FALSE, 0 ); gtk_widget_show( textlinkName ); diff --git a/contrib/brushexport/interface.cpp b/contrib/brushexport/interface.cpp index c1aaa07d..d2c04100 100644 --- a/contrib/brushexport/interface.cpp +++ b/contrib/brushexport/interface.cpp @@ -130,7 +130,7 @@ create_w_plugplug2( void ){ gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( t_materialist ), FALSE ); gtk_tree_view_set_enable_search( GTK_TREE_VIEW( t_materialist ), FALSE ); - ed_materialname = gtk_entry_new(); + ed_materialname = ui::Entry(); gtk_widget_set_name( ed_materialname, "ed_materialname" ); gtk_widget_show( ed_materialname ); gtk_box_pack_start( GTK_BOX( vbox2 ), ed_materialname, FALSE, FALSE, 0 ); diff --git a/contrib/camera/dialogs.cpp b/contrib/camera/dialogs.cpp index 59ff069a..4e2f68cd 100644 --- a/contrib/camera/dialogs.cpp +++ b/contrib/camera/dialogs.cpp @@ -388,7 +388,7 @@ static gint ci_rename( GtkWidget *widget, gpointer data ){ gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - name = gtk_entry_new(); + name = ui::Entry(); gtk_box_pack_start( GTK_BOX( hbox ), name, FALSE, FALSE, 0 ); gtk_widget_show( name ); @@ -507,7 +507,7 @@ static gint ci_add_target( GtkWidget *widget, gpointer data ){ gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - name = gtk_entry_new(); + name = ui::Entry(); gtk_box_pack_start( GTK_BOX( hbox ), name, TRUE, TRUE, 0 ); gtk_widget_show( name ); @@ -882,7 +882,7 @@ static gint ci_add( GtkWidget *widget, gpointer data ){ gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - parameters = gtk_entry_new(); + parameters = ui::Entry(); gtk_box_pack_start( GTK_BOX( hbox ), parameters, TRUE, TRUE, 0 ); gtk_widget_show( parameters ); @@ -1050,7 +1050,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - g_pCamName = gtk_entry_new(); + g_pCamName = ui::Entry(); gtk_box_pack_start( GTK_BOX( hbox ), g_pCamName, FALSE, FALSE, 0 ); gtk_widget_show( g_pCamName ); @@ -1185,7 +1185,7 @@ GtkWidget *CreateCameraInspectorDialog( void ){ gtk_box_pack_start( GTK_BOX( hbox ), w, FALSE, FALSE, 0 ); gtk_widget_show( w ); - g_pSecondsEntry = gtk_entry_new(); + g_pSecondsEntry = ui::Entry(); gtk_box_pack_start( GTK_BOX( hbox ), g_pSecondsEntry, FALSE, FALSE, 0 ); gtk_widget_show( g_pSecondsEntry ); diff --git a/contrib/gtkgensurf/gendlgs.cpp b/contrib/gtkgensurf/gendlgs.cpp index 5bea5b28..f255ae61 100644 --- a/contrib/gtkgensurf/gendlgs.cpp +++ b/contrib/gtkgensurf/gendlgs.cpp @@ -1487,7 +1487,7 @@ GtkWidget* create_main_dialog(){ gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 ); gtk_label_set_justify( GTK_LABEL( label ), GTK_JUSTIFY_RIGHT ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table2 ), entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1496,7 +1496,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "wavelength", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &WaveLength ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table2 ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1505,7 +1505,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "amplitude", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Amplitude ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table2 ), entry, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1587,7 +1587,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1596,7 +1596,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "hmin", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hll ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1605,7 +1605,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "hmax", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Hur ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1614,7 +1614,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "vmin", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Vll ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1742,7 +1742,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1751,7 +1751,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "z01", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z01 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1760,7 +1760,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "z00", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z00 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1769,7 +1769,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "z11", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( doublevariable_entryfocusout ), &Z11 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1813,7 +1813,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); g_object_set_data( G_OBJECT( dlg ), "bmp_text1", label ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -1872,7 +1872,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_box_pack_start( GTK_BOX( hbox2 ), entry, FALSE, FALSE, 0 ); gtk_widget_set_usize( entry, 50, -2 ); @@ -1885,7 +1885,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), 0, 0 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_box_pack_start( GTK_BOX( hbox2 ), entry, FALSE, FALSE, 0 ); gtk_widget_set_usize( entry, 50, -2 ); @@ -1951,7 +1951,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "fix_value", spin ); g_signal_connect( G_OBJECT( spin ), "focus_out_event", G_CALLBACK( fix_value_entryfocusout ), NULL ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND ), @@ -1960,7 +1960,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "fix_range", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( fix_range_entryfocusout ), NULL ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_EXPAND ), @@ -2023,7 +2023,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2032,7 +2032,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "texture1", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 0 ) ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2041,7 +2041,7 @@ GtkWidget* create_main_dialog(){ g_object_set_data( G_OBJECT( dlg ), "texture2", entry ); g_signal_connect( G_OBJECT( entry ), "focus_out_event", G_CALLBACK( texture_entryfocusout ), GINT_TO_POINTER( 1 ) ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 2, 3, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2081,7 +2081,7 @@ GtkWidget* create_main_dialog(){ (GtkAttachOptions) ( GTK_FILL ), (GtkAttachOptions) ( GTK_FILL ), 0, 0 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 0, 1, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2089,7 +2089,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_set_usize( entry, 60, -2 ); g_object_set_data( G_OBJECT( dlg ), "texoffsetx", entry ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2097,7 +2097,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_set_usize( entry, 60, -2 ); g_object_set_data( G_OBJECT( dlg ), "texoffsety", entry ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 2, 3, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2105,7 +2105,7 @@ GtkWidget* create_main_dialog(){ gtk_widget_set_usize( entry, 60, -2 ); g_object_set_data( G_OBJECT( dlg ), "texscalex", entry ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 3, 4, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/contrib/prtview/LoadPortalFileDialog.cpp b/contrib/prtview/LoadPortalFileDialog.cpp index 6993f74a..075bbda8 100644 --- a/contrib/prtview/LoadPortalFileDialog.cpp +++ b/contrib/prtview/LoadPortalFileDialog.cpp @@ -122,7 +122,7 @@ int DoLoadPortalFileDialog(){ gtk_container_add( GTK_CONTAINER( dlg ), vbox ); gtk_container_set_border_width( GTK_CONTAINER( vbox ), 5 ); - entry = gtk_entry_new(); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_entry_set_editable( GTK_ENTRY( entry ), FALSE ); gtk_box_pack_start( GTK_BOX( vbox ), entry, FALSE, FALSE, 0 ); diff --git a/libs/gtkutil/dialog.cpp b/libs/gtkutil/dialog.cpp index 0da7c587..19c8f60c 100644 --- a/libs/gtkutil/dialog.cpp +++ b/libs/gtkutil/dialog.cpp @@ -212,7 +212,7 @@ PathEntry PathEntry_new(){ GtkHBox* hbox = ui::HBox( FALSE, 0 ); gtk_widget_show( GTK_WIDGET( hbox ) ); - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_entry_set_has_frame( entry, FALSE ); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); diff --git a/libs/uilib/uilib.cpp b/libs/uilib/uilib.cpp index 1e7cd9d5..c7407529 100644 --- a/libs/uilib/uilib.cpp +++ b/libs/uilib/uilib.cpp @@ -97,6 +97,12 @@ namespace ui { CheckButton::CheckButton(const char *label) : CheckButton(GTK_CHECK_BUTTON(gtk_check_button_new_with_label(label))) { } + Entry::Entry() : Entry(GTK_ENTRY(gtk_entry_new())) + { } + + Entry::Entry(std::size_t max_length) : Entry(GTK_ENTRY(gtk_entry_new_with_max_length(max_length))) + { } + HBox::HBox(bool homogenous, int spacing) : HBox(GTK_HBOX(gtk_hbox_new(homogenous, spacing))) { } diff --git a/libs/uilib/uilib.h b/libs/uilib/uilib.h index 4e4da415..22bd9074 100644 --- a/libs/uilib/uilib.h +++ b/libs/uilib/uilib.h @@ -7,6 +7,7 @@ using ui_alignment = struct _GtkAlignment; using ui_box = struct _GtkBox; using ui_button = struct _GtkButton; using ui_checkbutton = struct _GtkCheckButton; +using ui_entry = struct _GtkEntry; using ui_evkey = struct _GdkEventKey; using ui_hbox = struct _GtkHBox; using ui_label = struct _GtkLabel; @@ -121,6 +122,11 @@ namespace ui { CheckButton(const char *label); ); + WRAP(Entry, Widget, ui_entry, + Entry(); + Entry(std::size_t max_length); + ); + WRAP(HBox, Box, ui_hbox, HBox(bool homogenous, int spacing); ); diff --git a/radiant/dialog.cpp b/radiant/dialog.cpp index 56814c92..6fb5161e 100644 --- a/radiant/dialog.cpp +++ b/radiant/dialog.cpp @@ -59,7 +59,7 @@ GtkEntry* DialogEntry_new(){ - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_widget_set_size_request( GTK_WIDGET( entry ), 64, -1 ); return entry; diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index c97407c7..86268e31 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -80,7 +80,7 @@ #include "groupdialog.h" GtkEntry* numeric_entry_new(){ - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_widget_set_size_request( GTK_WIDGET( entry ), 64, -1 ); return entry; @@ -183,7 +183,7 @@ StringAttribute( const char* key ) : m_key( key ), m_entry( 0 ), m_nonModal( ApplyCaller( *this ), UpdateCaller( *this ) ){ - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_widget_set_size_request( GTK_WIDGET( entry ), 50, -1 ); @@ -1461,7 +1461,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ gtk_table_set_col_spacings( table, 5 ); { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -1472,7 +1472,7 @@ ui::Widget EntityInspector_constructWindow( ui::Window toplevel ){ } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), diff --git a/radiant/findtexturedialog.cpp b/radiant/findtexturedialog.cpp index f2126e78..f89efa9c 100644 --- a/radiant/findtexturedialog.cpp +++ b/radiant/findtexturedialog.cpp @@ -172,7 +172,7 @@ ui::Window FindTextureDialog::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); - entry = ui::Widget(gtk_entry_new()); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -182,7 +182,7 @@ ui::Window FindTextureDialog::BuildDialog(){ AddDialogData( *GTK_ENTRY( entry ), m_strFind ); GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) ); - entry = ui::Widget(gtk_entry_new()); + entry = ui::Entry(); gtk_widget_show( entry ); gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index e809cf5c..bfffe8f4 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -278,7 +278,7 @@ ui::Window ProjectSettingsDialog_construct( ProjectSettingsDialog& dialog, Modal gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table2, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -398,7 +398,7 @@ void DoSides( int type, int axis ){ gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( entry ), FALSE, FALSE, 0 ); sides_entry = entry; @@ -643,7 +643,7 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -652,7 +652,7 @@ EMessageBoxReturn DoTextureLayout( float *fx, float *fy ){ x = entry; } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -880,7 +880,7 @@ EMessageBoxReturn DoLightIntensityDlg( int *intensity ){ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); @@ -948,7 +948,7 @@ EMessageBoxReturn DoShaderTagDlg( std::string* tag, const char* title ){ gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( label ), FALSE, FALSE, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); diff --git a/radiant/map.cpp b/radiant/map.cpp index ea6fd8a0..07c1f654 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -787,7 +787,7 @@ void DoMapInfo(){ gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 ); { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -797,7 +797,7 @@ void DoMapInfo(){ brushes_entry = entry; } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2031,7 +2031,7 @@ void DoFind(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -2040,7 +2040,7 @@ void DoFind(){ entity = entry; } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), diff --git a/radiant/patchdialog.cpp b/radiant/patchdialog.cpp index 69dda6d7..8deb5bd9 100644 --- a/radiant/patchdialog.cpp +++ b/radiant/patchdialog.cpp @@ -682,7 +682,7 @@ ui::Window PatchInspector::BuildDialog(){ (GtkAttachOptions)( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 0, 1, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -692,7 +692,7 @@ ui::Window PatchInspector::BuildDialog(){ g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -702,7 +702,7 @@ ui::Window PatchInspector::BuildDialog(){ g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 2, 3, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -712,7 +712,7 @@ ui::Window PatchInspector::BuildDialog(){ g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 3, 4, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -722,7 +722,7 @@ ui::Window PatchInspector::BuildDialog(){ g_signal_connect( G_OBJECT( entry ), "key_press_event", G_CALLBACK( OnDialogKey ), 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 4, 5, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -773,7 +773,7 @@ ui::Window PatchInspector::BuildDialog(){ (GtkAttachOptions)( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 1, 2, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -789,7 +789,7 @@ ui::Window PatchInspector::BuildDialog(){ (GtkAttachOptions)( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 1, 2, 2, 3, (GtkAttachOptions)( GTK_EXPAND | GTK_FILL ), @@ -818,7 +818,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); // gtk_entry_set_editable (GTK_ENTRY (entry), false); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( vbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); @@ -891,7 +891,7 @@ ui::Window PatchInspector::BuildDialog(){ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 0, 1, (GtkAttachOptions)( GTK_FILL ), @@ -915,7 +915,7 @@ ui::Window PatchInspector::BuildDialog(){ GTK_WIDGET_UNSET_FLAGS( spin, GTK_CAN_FOCUS ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 1, 2, (GtkAttachOptions)( GTK_FILL ), @@ -936,7 +936,7 @@ ui::Window PatchInspector::BuildDialog(){ GTK_WIDGET_UNSET_FLAGS( spin, GTK_CAN_FOCUS ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 2, 3, (GtkAttachOptions)( GTK_FILL ), @@ -957,7 +957,7 @@ ui::Window PatchInspector::BuildDialog(){ GTK_WIDGET_UNSET_FLAGS( spin, GTK_CAN_FOCUS ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 3, 4, (GtkAttachOptions)( GTK_FILL ), @@ -978,7 +978,7 @@ ui::Window PatchInspector::BuildDialog(){ GTK_WIDGET_UNSET_FLAGS( spin, GTK_CAN_FOCUS ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( table, GTK_WIDGET( entry ), 0, 1, 4, 5, (GtkAttachOptions)( GTK_FILL ), diff --git a/radiant/select.cpp b/radiant/select.cpp index 3c2899b0..b05bbe0d 100644 --- a/radiant/select.cpp +++ b/radiant/select.cpp @@ -1098,7 +1098,7 @@ void DoScaleDlg(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - ui::Widget entry = ui::Widget(gtk_entry_new()); + ui::Widget entry = ui::Entry(); gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" ); gtk_widget_show( entry ); gtk_table_attach( table, entry, 1, 2, 0, 1, @@ -1108,7 +1108,7 @@ void DoScaleDlg(){ g_scale_dialog.x = entry; } { - ui::Widget entry = ui::Widget(gtk_entry_new()); + ui::Widget entry = ui::Entry(); gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" ); gtk_widget_show( entry ); gtk_table_attach( table, entry, 1, 2, 1, 2, @@ -1118,7 +1118,7 @@ void DoScaleDlg(){ g_scale_dialog.y = entry; } { - ui::Widget entry = ui::Widget(gtk_entry_new()); + ui::Widget entry = ui::Entry(); gtk_entry_set_text( GTK_ENTRY( entry ), "1.0" ); gtk_widget_show( entry ); gtk_table_attach( table, entry, 1, 2, 2, 3, diff --git a/radiant/surfacedialog.cpp b/radiant/surfacedialog.cpp index a1cdeec5..fceb0ec9 100644 --- a/radiant/surfacedialog.cpp +++ b/radiant/surfacedialog.cpp @@ -615,7 +615,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_box_pack_start( GTK_BOX( hbox2 ), label, FALSE, TRUE, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( hbox2 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); m_texture = entry; @@ -658,7 +658,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 0, 1, (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ), @@ -694,7 +694,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 1, 2, (GtkAttachOptions) ( GTK_FILL ), @@ -730,7 +730,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 2, 3 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 2, 3, (GtkAttachOptions) ( GTK_FILL ), @@ -766,7 +766,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 3, 4, (GtkAttachOptions) ( GTK_FILL ), @@ -803,7 +803,7 @@ ui::Window SurfaceInspector::BuildDialog(){ (GtkAttachOptions) ( 0 ), 0, 0 ); } { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_table_attach( GTK_TABLE( table ), GTK_WIDGET( entry ), 3, 4, 4, 5, (GtkAttachOptions) ( GTK_FILL ), @@ -1028,7 +1028,7 @@ ui::Window SurfaceInspector::BuildDialog(){ gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( vbox3 ) ); { - GtkEntry* entry = GTK_ENTRY( gtk_entry_new() ); + GtkEntry* entry = ui::Entry(); gtk_widget_show( GTK_WIDGET( entry ) ); gtk_box_pack_start( GTK_BOX( vbox3 ), GTK_WIDGET( entry ), TRUE, TRUE, 0 ); m_valueEntryWidget = entry;