]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/gtkdlgs.cpp
Wrap GtkTextView
[xonotic/netradiant.git] / radiant / gtkdlgs.cpp
index 91cb00c4f1363f096728c61fd392e2546e865f7f..5c76cf61d73905fe489f143a182c5463d17a11e6 100644 (file)
@@ -253,7 +253,7 @@ ui::Window ProjectSettingsDialog_construct( ProjectSettingsDialog& dialog, Modal
                                        gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
                                }
                                {
-                                       dialog.game_combo.game_select = GTK_COMBO_BOX( gtk_combo_box_new_text() );
+                                       dialog.game_combo.game_select = ui::ComboBoxText();
 
                                        gtk_combo_box_append_text( dialog.game_combo.game_select, globalGameComboConfiguration().basegame );
                                        if ( globalGameComboConfiguration().known[0] != '\0' ) {
@@ -295,7 +295,7 @@ ui::Window ProjectSettingsDialog_construct( ProjectSettingsDialog& dialog, Modal
                                                                          (GtkAttachOptions) ( 0 ), 0, 0 );
                                        gtk_misc_set_alignment( GTK_MISC( label ), 1, 0.5 );
 
-                                       GtkComboBox* combo = GTK_COMBO_BOX( gtk_combo_box_new_text() );
+                                       GtkComboBox* combo = ui::ComboBoxText();
                                        gtk_combo_box_append_text( combo, globalMappingMode().sp_mapping_mode );
                                        gtk_combo_box_append_text( combo, globalMappingMode().mp_mapping_mode );
 
@@ -570,7 +570,7 @@ void DoAbout(){
                                        GtkScrolledWindow* sc_extensions = create_scrolled_window( GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS, 4 );
                                        gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( sc_extensions ) );
                                        {
-                                               ui::Widget text_extensions = ui::Widget(gtk_text_view_new());
+                                               ui::Widget text_extensions = ui::TextView();
                                                gtk_text_view_set_editable( GTK_TEXT_VIEW( text_extensions ), FALSE );
                                                gtk_container_add( GTK_CONTAINER( sc_extensions ), text_extensions );
                                                GtkTextBuffer* buffer = gtk_text_view_get_buffer( GTK_TEXT_VIEW( text_extensions ) );
@@ -749,7 +749,7 @@ static void CreateGtkTextEditor(){
        ui::Widget dlg;
        ui::Widget vbox, hbox, button, scr, text;
 
-       dlg = ui::Widget(gtk_window_new( GTK_WINDOW_TOPLEVEL ));
+       dlg = ui::Window( ui::window_type::TOP );
 
        g_signal_connect( G_OBJECT( dlg ), "delete_event",
                                          G_CALLBACK( editor_delete ), 0 );
@@ -766,7 +766,7 @@ static void CreateGtkTextEditor(){
        gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scr ), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
        gtk_scrolled_window_set_shadow_type( GTK_SCROLLED_WINDOW( scr ), GTK_SHADOW_IN );
 
-       text = ui::Widget(gtk_text_view_new());
+       text = ui::TextView();
        gtk_container_add( GTK_CONTAINER( scr ), text );
        gtk_widget_show( text );
        g_object_set_data( G_OBJECT( dlg ), "text", (gpointer) text );