]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Wrap GtkEntry
authorTimePath <andrew.hardaker1995@gmail.com>
Wed, 17 Feb 2016 03:59:25 +0000 (14:59 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Wed, 17 Feb 2016 03:59:25 +0000 (14:59 +1100)
16 files changed:
contrib/bobtoolz/dialogs/dialogs-gtk.cpp
contrib/brushexport/interface.cpp
contrib/camera/dialogs.cpp
contrib/gtkgensurf/gendlgs.cpp
contrib/prtview/LoadPortalFileDialog.cpp
libs/gtkutil/dialog.cpp
libs/uilib/uilib.cpp
libs/uilib/uilib.h
radiant/dialog.cpp
radiant/entityinspector.cpp
radiant/findtexturedialog.cpp
radiant/gtkdlgs.cpp
radiant/map.cpp
radiant/patchdialog.cpp
radiant/select.cpp
radiant/surfacedialog.cpp

index 334aa17d84bc62e14c409e06effd8794aeb72bb1..f5da88c37c68691abee859b6db0fd33e48bdb802 100644 (file)
@@ -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 );
 
index c1aaa07d3a13b4eba1adf3e690ed43e8d7b3c5d0..d2c0410015ed522fa7f738304d6d56616e0fa1f2 100644 (file)
@@ -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 );
index 59ff069ab66e0017e9f225011244454f8d6a0af1..4e2f68cd55b9b6135a56561526d992ba0d48a166 100644 (file)
@@ -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 );
 
index 5bea5b28a447c35fa3c5b697fc397976b7a173d9..f255ae61249b810d5c83f2055393cb9142185a2a 100644 (file)
@@ -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 ),
index 6993f74a43a1169645efe484f1e3a1804e61131b..075bbda8deb74d6c0b88abbe1d0cde2fcffb5463 100644 (file)
@@ -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 );
index 0da7c5872a56c0d8e20707c1fad99e53aaf6172e..19c8f60c92be084d66646b3071e30687a5dfdea3 100644 (file)
@@ -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 );
index 1e7cd9d5c6279b70c800587dc76f2b609451fa02..c74075290df7da799190dcb3a4d14c9c8221b3b9 100644 (file)
@@ -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)))
     { }
 
index 4e4da415965ce0e9d76e1d0ab76675eda9446da5..22bd907439efff3c8946d72a3feaa45ea1fa9902 100644 (file)
@@ -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);
     );
index 56814c928df22bb7c3a8d0b27554273bcdf762ca..6fb5161eb95f3b5c7cb92fb7be9ac5f1c8e3c9a3 100644 (file)
@@ -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;
index c97407c7ab982bf58c17d4fe968c3f34445f15cd..86268e31f647fdb53b821aefa1edebc949d666bb 100644 (file)
@@ -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 ),
index f2126e78a1ce2bb1f9e9650106560604f5f8ec37..f89efa9c771f9dd0abbf8cd5b7ee348ba8ca8abc 100644 (file)
@@ -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 ),
index e809cf5c0adfce901bbfe70f63c781ed32bbd8f2..bfffe8f434f15bb45b85b1db3fa9d8e6c6a2a582 100644 (file)
@@ -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 );
 
index ea6fd8a03b8148fff9e81177fcb56dd3740f5180..07c1f654c9de4c70cde28f8e2d418cc29bc1575e 100644 (file)
@@ -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 ),
index 69dda6d7c90aab976314e44150243440c6719117..8deb5bd9dc8e4aff8b712977e804b3fb207eff35 100644 (file)
@@ -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 ),
index 3c2899b0e57b69f8f0330444d8dcff2642e4eccf..b05bbe0d39bf20fbc71835ca17096d384b732c8a 100644 (file)
@@ -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,
index a1cdeec521127a7dc3d5b932d66d1b2d4a78a719..fceb0ec9ca127191254baa24c49a6212f991dbee 100644 (file)
@@ -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;