]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/entityinspector.cpp
Wrap more GTK
[xonotic/netradiant.git] / radiant / entityinspector.cpp
index ff56706001126681a42a49c2b7e6b4dc4d4110e9..8c67825ebb8419d95b3a3cb467388ab684f39101 100644 (file)
@@ -810,9 +810,7 @@ public:
 EntityClassListStoreAppend( ui::ListStore store_ ) : store( store_ ){
 }
 void visit( EntityClass* e ){
-       GtkTreeIter iter;
-       gtk_list_store_append( store, &iter );
-       gtk_list_store_set( store, &iter, 0, e->name(), 1, e, -1 );
+       store.append(0, e->name(), 1, e);
 }
 };
 
@@ -822,7 +820,7 @@ void EntityClassList_fill(){
 }
 
 void EntityClassList_clear(){
-       gtk_list_store_clear( g_entlist_store );
+       g_entlist_store.clear();
 }
 
 void SetComment( EntityClass* eclass ){
@@ -863,9 +861,9 @@ void SurfaceFlags_setEntityClass( EntityClass* eclass ){
                        auto widget = ui::Widget(GTK_WIDGET(g_entitySpawnflagsCheck[i]));
                        auto label = ui::Label(GTK_LABEL(gtk_bin_get_child(GTK_BIN(widget))));
                        label.text(" ");
-                       gtk_widget_hide( widget );
+                       widget.hide();
                        g_object_ref( widget );
-                       gtk_container_remove( GTK_CONTAINER( g_spawnflagsTable ), widget );
+                       ui::Container(GTK_CONTAINER(g_spawnflagsTable)).remove(widget);
                }
        }
 
@@ -1043,17 +1041,15 @@ void EntityInspector_updateKeyValues(){
        CopiedString strKey( g_entityKeyEntry.text() );
        CopiedString strVal( g_entityValueEntry.text() );
 
-       gtk_list_store_clear( store );
+       store.clear();
        // Walk through list and add pairs
        for ( KeyValues::iterator i = g_selectedKeyValues.begin(); i != g_selectedKeyValues.end(); ++i )
        {
-               GtkTreeIter iter;
-               gtk_list_store_append( store, &iter );
                StringOutputStream key( 64 );
                key << ( *i ).first.c_str();
                StringOutputStream value( 64 );
                value << ( *i ).second.c_str();
-               gtk_list_store_set( store, &iter, 0, key.c_str(), 1, value.c_str(), -1 );
+               store.append(0, key.c_str(), 1, value.c_str());
        }
 
        g_entityKeyEntry.text( strKey.c_str() );