// get ignore list from ui
std::set<std::string> ignore;
- GtkTreeView* view = GTK_TREE_VIEW( lookup_widget( button , "t_materialist" ) );
+ auto view = ui::TreeView::from(lookup_widget(button, "t_materialist"));
ui::ListStore list = ui::ListStore::from(gtk_tree_view_get_model( view ));
GtkTreeIter iter;
const gchar* name = gtk_entry_get_text( edit );
if ( g_utf8_strlen( name, -1 ) > 0 ) {
- ui::ListStore list = ui::ListStore::from( gtk_tree_view_get_model( GTK_TREE_VIEW( lookup_widget( button , "t_materialist" ) ) ) );
+ ui::ListStore list = ui::ListStore::from( gtk_tree_view_get_model(ui::TreeView::from(lookup_widget(button, "t_materialist") )) );
list.append(0, name);
gtk_entry_set_text( edit, "" );
}
}
void OnRemoveMaterial( ui::Button button, gpointer user_data ){
- GtkTreeView* view = GTK_TREE_VIEW( lookup_widget( button , "t_materialist" ) );
+ GtkTreeView* view = ui::TreeView::from(lookup_widget(button, "t_materialist"));
ui::ListStore list = ui::ListStore::from( gtk_tree_view_get_model( view ) );
GtkTreeSelection* sel = gtk_tree_view_get_selection( view );
gtk_widget_set_name( t_materialist, "t_materialist" );
t_materialist.show();
scrolledwindow1.add(t_materialist);
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( t_materialist ), FALSE );
- gtk_tree_view_set_enable_search( GTK_TREE_VIEW( t_materialist ), FALSE );
+ gtk_tree_view_set_headers_visible(t_materialist, FALSE );
+ gtk_tree_view_set_enable_search(t_materialist, FALSE );
auto ed_materialname = ui::Entry(ui::New);
gtk_widget_set_name( ed_materialname, "ed_materialname" );
// column & renderer
GtkTreeViewColumn* col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title( col, "materials" );
- gtk_tree_view_append_column( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), col );
+ auto view = ui::TreeView::from(lookup_widget(wnd, "t_materialist"));
+ gtk_tree_view_append_column(view, col );
auto renderer = ui::CellRendererText(ui::New);
- gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), -1, "", renderer, "text", 0, NULL );
+ gtk_tree_view_insert_column_with_attributes(view, -1, "", renderer, "text", 0, NULL );
// list store
ui::ListStore ignorelist = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
- gtk_tree_view_set_model( GTK_TREE_VIEW( lookup_widget( wnd, "t_materialist" ) ), ignorelist );
+ gtk_tree_view_set_model(view, ignorelist );
ignorelist.unref();
gtk_widget_show_all( wnd );
return FALSE;
}
-gboolean project_key_press( ui::Widget widget, GdkEventKey* event, ProjectList* projectList ){
+gboolean project_key_press( ui::TreeView widget, GdkEventKey* event, ProjectList* projectList ){
Project& project = projectList->m_project;
if ( event->keyval == GDK_KEY_Delete ) {
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( widget ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(widget );
GtkTreeIter iter;
GtkTreeModel* model;
if ( gtk_tree_selection_get_selected( selection, &model, &iter ) ) {
return FALSE;
}
-gboolean commands_key_press( ui::Widget widget, GdkEventKey* event, ui::ListStore store ){
+gboolean commands_key_press( ui::TreeView widget, GdkEventKey* event, ui::ListStore store ){
if ( g_current_build == 0 ) {
return FALSE;
}
Build& build = *g_current_build;
if ( event->keyval == GDK_KEY_Delete ) {
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( widget ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(widget );
GtkTreeIter iter;
GtkTreeModel* model;
if ( gtk_tree_selection_get_selected( selection, &model, &iter ) ) {
ui::Window BuildMenuDialog_construct( ModalDialog& modal, ProjectList& projectList ){
ui::Window window = MainFrame_getWindow().create_dialog_window("Build Menu", G_CALLBACK(dialog_delete_callback ), &modal, -1, 400 );
- ui::Widget buildView{ui::null};
-
{
auto table1 = create_dialog_table( 2, 2, 4, 4, 4 );
window.add(table1);
vbox.pack_start( button, FALSE, FALSE, 0 );
}
}
+ auto buildViewStore = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
+ auto buildView = ui::TreeView( ui::TreeModel( buildViewStore ));
{
auto frame = create_dialog_frame( "Build menu" );
table1.attach(frame, {0, 1, 0, 1});
frame.add(scr);
{
- auto store = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
-
- ui::Widget view = ui::TreeView( ui::TreeModel( store ));
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
+ auto view = buildView;
+ auto store = buildViewStore;
+ gtk_tree_view_set_headers_visible(view, FALSE );
auto renderer = ui::CellRendererText(ui::New);
object_set_boolean_property( G_OBJECT( renderer ), "editable", TRUE );
renderer.connect("edited", G_CALLBACK( project_cell_edited ), &projectList );
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 0}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(view );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
view.show();
- buildView = view;
projectList.m_store = store;
scr.add(view);
frame.add(scr);
{
- ui::ListStore store = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
+ auto store = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
- ui::Widget view = ui::TreeView(ui::TreeModel( store ));
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
+ auto view = ui::TreeView(ui::TreeModel( store ));
+ gtk_tree_view_set_headers_visible(view, FALSE );
auto renderer = ui::CellRendererText(ui::New);
object_set_boolean_property( G_OBJECT( renderer ), "editable", TRUE );
renderer.connect( "edited", G_CALLBACK( commands_cell_edited ), store );
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 0}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(view );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
view.show();
view.connect( "key_press_event", G_CALLBACK( commands_key_press ), store );
- auto sel = ui::TreeSelection(gtk_tree_view_get_selection( GTK_TREE_VIEW( buildView ) ));
+ auto sel = ui::TreeSelection(gtk_tree_view_get_selection(buildView ));
sel.connect( "changed", G_CALLBACK( project_selection_changed ), store );
}
}
auto view = ui::TreeView(ui::TreeModel(store));
dialog.m_list = view;
- gtk_tree_view_set_enable_search( GTK_TREE_VIEW( view ), false ); // annoying
+ gtk_tree_view_set_enable_search(view, false ); // annoying
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Command", renderer, {{"text", 0}, {"weight-set", 2}, {"weight", 3}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
}
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Key", renderer, {{"text", 1}, {"weight-set", 2}, {"weight", 3}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
}
view.show();
ui::ListStore store = ui::ListStore(gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_POINTER ));
auto view = ui::TreeView( ui::TreeModel(store ));
- gtk_tree_view_set_enable_search( GTK_TREE_VIEW( view ), FALSE );
+ gtk_tree_view_set_enable_search(view, FALSE );
gtk_tree_view_set_headers_visible( view, FALSE );
view.connect( "button_press_event", G_CALLBACK( EntityClassList_button_press ), 0 );
view.connect( "key_press_event", G_CALLBACK( EntityClassList_keypress ), 0 );
{
ui::ListStore store = ui::ListStore(gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING ));
- ui::Widget view = ui::TreeView(ui::TreeModel(store ));
- gtk_tree_view_set_enable_search( GTK_TREE_VIEW( view ), FALSE );
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
+ auto view = ui::TreeView(ui::TreeModel(store ));
+ gtk_tree_view_set_enable_search(view, FALSE );
+ gtk_tree_view_set_headers_visible(view, FALSE );
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 0}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
}
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 1}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
}
{
- auto selection = ui::TreeSelection(gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) ));
+ auto selection = ui::TreeSelection(gtk_tree_view_get_selection(view ));
selection.connect( "changed", G_CALLBACK( EntityProperties_selection_changed ), 0 );
}
window.add(scr);
{
- ui::Widget view = ui::TreeView(ui::New);
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
+ auto view = ui::TreeView(ui::New);
+ gtk_tree_view_set_headers_visible(view, FALSE );
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = gtk_tree_view_column_new();
gtk_tree_view_column_pack_start( column, renderer, TRUE );
gtk_tree_view_column_set_cell_data_func( column, renderer, entitylist_treeviewcolumn_celldatafunc, 0, 0 );
- GtkTreeSelection* select = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
+ GtkTreeSelection* select = gtk_tree_view_get_selection(view );
gtk_tree_selection_set_mode( select, GTK_SELECTION_MULTIPLE );
view.connect( "row_expanded", G_CALLBACK( entitylist_treeview_row_expanded ), 0 );
view.connect( "row_collapsed", G_CALLBACK( entitylist_treeview_rowcollapsed ), 0 );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
view.show();
scr.add(view);
- getEntityList().m_tree_view = GTK_TREE_VIEW( view );
+ getEntityList().m_tree_view = view;
}
}
{
ui::ListStore store = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
- ui::Widget view = ui::TreeView(ui::TreeModel(store ));
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
+ auto view = ui::TreeView(ui::TreeModel(store ));
+ gtk_tree_view_set_headers_visible(view, FALSE );
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", 0}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
}
{
- auto selection = ui::TreeSelection(gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) ));
+ auto selection = ui::TreeSelection(gtk_tree_view_get_selection(view ));
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
selection.connect( "changed", G_CALLBACK( feedback_selection_changed ), NULL );
}
{
ui::ListStore store = ui::ListStore(gtk_list_store_new( 2, G_TYPE_STRING, G_TYPE_STRING ));
- ui::Widget view = ui::TreeView(ui::TreeModel(store ));
- gtk_tree_view_set_headers_clickable( GTK_TREE_VIEW( view ), TRUE );
+ auto view = ui::TreeView(ui::TreeModel(store ));
+ gtk_tree_view_set_headers_clickable(view, TRUE );
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Entity", renderer, {{"text", 0}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
gtk_tree_view_column_set_sort_column_id( column, 0 );
}
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Count", renderer, {{"text", 1}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
gtk_tree_view_column_set_sort_column_id( column, 1 );
}
auto store = ui::TreeStore(gtk_tree_store_new( 2, G_TYPE_STRING, G_TYPE_POINTER ));
auto view = ui::TreeView(ui::TreeModel(store));
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
+ gtk_tree_view_set_headers_visible(view, FALSE );
{
auto renderer = ui::CellRendererText(ui::New);
GtkTreeViewColumn* column = ui::TreeViewColumn( "Preferences", renderer, {{"text", 0}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( view ), column );
+ gtk_tree_view_append_column(view, column );
}
{
- auto selection = ui::TreeSelection(gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) ));
+ auto selection = ui::TreeSelection(gtk_tree_view_get_selection(view ));
selection.connect( "changed", G_CALLBACK( treeSelection ), this );
}
}
}
- gtk_tree_view_expand_all( GTK_TREE_VIEW( view ) );
+ gtk_tree_view_expand_all(view );
g_object_unref( G_OBJECT( store ) );
}
ui::Window m_parent{ui::null};
ui::GLArea m_gl_widget{ui::null};
ui::Widget m_texture_scroll{ui::null};
-ui::Widget m_treeViewTree{ui::null};
-ui::Widget m_treeViewTags{ui::null};
+ui::TreeView m_treeViewTree{ui::null};
+ui::TreeView m_treeViewTags{ui::null};
ui::Frame m_tag_frame{ui::null};
ui::ListStore m_assigned_store{ui::null};
ui::ListStore m_available_store{ui::null};
-ui::Widget m_assigned_tree{ui::null};
-ui::Widget m_available_tree{ui::null};
+ui::TreeView m_assigned_tree{ui::null};
+ui::TreeView m_available_tree{ui::null};
ui::Widget m_scr_win_tree{ui::null};
ui::Widget m_scr_win_tags{ui::null};
ui::Widget m_tag_notebook{ui::null};
auto store = ui::TreeStore(gtk_tree_store_new( 1, G_TYPE_STRING ));
TextureGroups_constructTreeModel( groups, store );
- gtk_tree_view_set_model(GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), store);
+ gtk_tree_view_set_model(g_TextureBrowser.m_treeViewTree, store);
g_object_unref( G_OBJECT( store ) );
}
auto store = ui::TreeStore(gtk_tree_store_new( 1, G_TYPE_STRING ));
GtkTreeModel* model = g_TextureBrowser.m_all_tags_list;
- gtk_tree_view_set_model( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), model );
+ gtk_tree_view_set_model(g_TextureBrowser.m_treeViewTags, model );
g_object_unref( G_OBJECT( store ) );
}
void TreeView_onRowActivated( GtkTreeView* treeview, GtkTreePath* path, GtkTreeViewColumn* col, gpointer userdata ){
GtkTreeIter iter;
- GtkTreeModel* model = gtk_tree_view_get_model( GTK_TREE_VIEW( treeview ) );
+ GtkTreeModel* model = gtk_tree_view_get_model(treeview );
if ( gtk_tree_model_get_iter( model, &iter, path ) ) {
gchar dirName[1024];
void TextureBrowser_createTreeViewTree(){
g_TextureBrowser.m_treeViewTree = ui::TreeView(ui::New);
- gtk_tree_view_set_enable_search( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
+ gtk_tree_view_set_enable_search(g_TextureBrowser.m_treeViewTree, FALSE );
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), FALSE );
+ gtk_tree_view_set_headers_visible(g_TextureBrowser.m_treeViewTree, FALSE );
g_TextureBrowser.m_treeViewTree.connect( "row-activated", (GCallback) TreeView_onRowActivated, NULL );
auto renderer = ui::CellRendererText(ui::New);
- gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), -1, "", renderer, "text", 0, NULL );
+ gtk_tree_view_insert_column_with_attributes(g_TextureBrowser.m_treeViewTree, -1, "", renderer, "text", 0, NULL );
TextureBrowser_constructTreeStore();
}
gdk_event_get_time( (GdkEvent*)event ) );
}
-gboolean TreeViewTags_onButtonPressed( ui::Widget treeview, GdkEventButton *event ){
+gboolean TreeViewTags_onButtonPressed( ui::TreeView treeview, GdkEventButton *event ){
if ( event->type == GDK_BUTTON_PRESS && event->button == 3 ) {
GtkTreePath *path;
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( treeview ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(treeview );
- if ( gtk_tree_view_get_path_at_pos( GTK_TREE_VIEW( treeview ), event->x, event->y, &path, NULL, NULL, NULL ) ) {
+ if ( gtk_tree_view_get_path_at_pos(treeview, event->x, event->y, &path, NULL, NULL, NULL ) ) {
gtk_tree_selection_unselect_all( selection );
gtk_tree_selection_select_path( selection, path );
gtk_tree_path_free( path );
void TextureBrowser_createTreeViewTags(){
g_TextureBrowser.m_treeViewTags = ui::TreeView(ui::New);
- gtk_tree_view_set_enable_search( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), FALSE );
+ gtk_tree_view_set_enable_search(g_TextureBrowser.m_treeViewTags, FALSE );
g_TextureBrowser.m_treeViewTags.connect( "button-press-event", (GCallback)TreeViewTags_onButtonPressed, NULL );
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), FALSE );
+ gtk_tree_view_set_headers_visible(g_TextureBrowser.m_treeViewTags, FALSE );
auto renderer = ui::CellRendererText(ui::New);
- gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), -1, "", renderer, "text", 0, NULL );
+ gtk_tree_view_insert_column_with_attributes(g_TextureBrowser.m_treeViewTags, -1, "", renderer, "text", 0, NULL );
TextureBrowser_constructTreeStoreTags();
}
GSList* node;
gchar* tag_assigned;
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_available_tree ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_available_tree );
gtk_tree_selection_selected_foreach( selection, (GtkTreeSelectionForeachFunc)TextureBrowser_tagMoveHelper, &selected );
GSList* node;
gchar* tag;
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_assigned_tree ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_assigned_tree );
gtk_tree_selection_selected_foreach( selection, (GtkTreeSelectionForeachFunc)TextureBrowser_tagMoveHelper, &selected );
char buffer[256];
char tags_searched[256];
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_treeViewTags );
gtk_tree_selection_selected_foreach( selection, (GtkTreeSelectionForeachFunc)TextureBrowser_tagMoveHelper, &selected );
TextureBrowser_createTreeViewTags();
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_treeViewTags );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tags ), g_TextureBrowser.m_treeViewTags );
g_TextureBrowser.m_assigned_tree = ui::TreeView(ui::TreeModel(g_TextureBrowser.m_assigned_store ));
g_TextureBrowser.m_assigned_store.unref();
g_TextureBrowser.m_assigned_tree.connect( "row-activated", (GCallback) TextureBrowser_removeTags, NULL );
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_assigned_tree ), FALSE );
+ gtk_tree_view_set_headers_visible(g_TextureBrowser.m_assigned_tree, FALSE );
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_assigned_tree ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_assigned_tree );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( g_TextureBrowser.m_assigned_tree ), column );
+ gtk_tree_view_append_column(g_TextureBrowser.m_assigned_tree, column );
g_TextureBrowser.m_assigned_tree.show();
scrolled_win.show();
g_TextureBrowser.m_available_tree = ui::TreeView(ui::TreeModel(g_TextureBrowser.m_available_store ));
g_TextureBrowser.m_available_store.unref();
g_TextureBrowser.m_available_tree.connect( "row-activated", (GCallback) TextureBrowser_assignTags, NULL );
- gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( g_TextureBrowser.m_available_tree ), FALSE );
+ gtk_tree_view_set_headers_visible(g_TextureBrowser.m_available_tree, FALSE );
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_available_tree ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_available_tree );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE );
GtkTreeViewColumn* column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} );
- gtk_tree_view_append_column( GTK_TREE_VIEW( g_TextureBrowser.m_available_tree ), column );
+ gtk_tree_view_append_column(g_TextureBrowser.m_available_tree, column );
g_TextureBrowser.m_available_tree.show();
scrolled_win.show();
gtk_list_store_set( g_TextureBrowser.m_available_store, &iter, TAG_COLUMN, tag.c_str(), -1 );
// Select the currently added tag in the available list
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_available_tree ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_available_tree );
gtk_tree_selection_select_iter( selection, &iter );
g_TextureBrowser.m_all_tags_list.append(TAG_COLUMN, tag.c_str());
GSList* selected = NULL;
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_treeViewTags );
gtk_tree_selection_selected_foreach( selection, GtkTreeSelectionForeachFunc( TextureBrowser_selectionHelper ), &selected );
if ( g_slist_length( selected ) == 1 ) { // we only rename a single tag
void TextureBrowser_deleteTag(){
GSList* selected = NULL;
- GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ) );
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(g_TextureBrowser.m_treeViewTags );
gtk_tree_selection_selected_foreach( selection, GtkTreeSelectionForeachFunc( TextureBrowser_selectionHelper ), &selected );
if ( g_slist_length( selected ) == 1 ) { // we only delete a single tag
ScopeDisableScreenUpdates disableScreenUpdates( "Processing...", "Loading Shaders" );
GlobalShaderSystem().refresh();
UpdateAllWindows();
- GtkTreeSelection* selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(GlobalTextureBrowser().m_treeViewTree));
+ GtkTreeSelection* selection = gtk_tree_view_get_selection(GlobalTextureBrowser().m_treeViewTree);
GtkTreeModel* model = NULL;
GtkTreeIter iter;
if ( gtk_tree_selection_get_selected (selection, &model, &iter) )