]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mru.cpp
Wrap more GTK
[xonotic/netradiant.git] / radiant / mru.cpp
index 085ca953501350424cd44b4da19c71d7f2755aa7..3a01d142ef7297069db4e5870d595693672081ee 100644 (file)
@@ -121,7 +121,7 @@ void MRU_AddFile( const char *str ){
 
        MRU_SetText( 0, str );
        gtk_widget_set_sensitive( GTK_WIDGET( MRU_items[0] ), TRUE );
-       gtk_widget_show( GTK_WIDGET( MRU_items[MRU_used - 1] ) );
+       ui::Widget(GTK_WIDGET( MRU_items[MRU_used - 1] )).show();
 }
 
 void MRU_Init(){
@@ -136,7 +136,7 @@ void MRU_AddWidget( GtkMenuItem *widget, std::size_t pos ){
                if ( pos < MRU_used ) {
                        MRU_updateWidget( pos, MRU_GetText( pos ) );
                        gtk_widget_set_sensitive( GTK_WIDGET( MRU_items[0] ), TRUE );
-                       gtk_widget_show( GTK_WIDGET( MRU_items[pos] ) );
+                       ui::Widget(GTK_WIDGET( MRU_items[pos] )).show();
                }
        }
 }
@@ -159,7 +159,8 @@ void MRU_Activate( std::size_t index ){
                        MRU_SetText( i, MRU_GetText( i + 1 ) );
 
                if ( MRU_used == 0 ) {
-                       gtk_label_set_text( GTK_LABEL( gtk_bin_get_child(GTK_BIN( MRU_items[0] )) ), "Recent Files" );
+                       auto label = ui::Label(GTK_LABEL(gtk_bin_get_child(GTK_BIN(MRU_items[0] )) ));
+                       label.text("Recent Files");
                        gtk_widget_set_sensitive( GTK_WIDGET( MRU_items[0] ), FALSE );
                }
                else