From: Thomas Debesse Date: Tue, 21 Jun 2022 04:05:15 +0000 (+0200) Subject: Merge commit '0c0ed6c1a75ce05a91209fdf3ad8378a7b7e7f6a' into master-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=92fa63af9a1930845a44d86f4ddddcb413390e62;p=xonotic%2Fnetradiant.git Merge commit '0c0ed6c1a75ce05a91209fdf3ad8378a7b7e7f6a' into master-merge --- 92fa63af9a1930845a44d86f4ddddcb413390e62 diff --cc radiant/texwindow.cpp index 4068f27b,6eab79a4..c2319f23 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@@ -2331,8 -2211,9 +2331,10 @@@ ui::Widget TextureBrowser_constructWind TextureBrowser_createTreeViewTree(); - gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tree ), textureBrowser.m_treeViewTree ); - //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tree ), g_TextureBrowser.m_treeViewTree ); - gtk_container_add( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tree ), GTK_WIDGET( g_TextureBrowser.m_treeViewTree ) ); - g_TextureBrowser.m_treeViewTree.show(); ++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tree ), textureBrowser.m_treeViewTree ); ++ gtk_container_add( GTK_CONTAINER( textureBrowser.m_scr_win_tree ), GTK_WIDGET( textureBrowser.m_treeViewTree ) ); ++ + textureBrowser.m_treeViewTree.show(); } { // gl_widget scrollbar auto w = ui::Widget::from(gtk_vscrollbar_new( ui::Adjustment( 0,0,0,1,1,0 ) )); @@@ -2392,21 -2266,25 +2395,26 @@@ auto button = toolbar_append_button( toolbar, "Tags", "texbro_tags.png" ); button.dimensions( 22, 22 ); button.connect( "clicked", G_CALLBACK( Popup_View_Menu ), menu_tags ); + + //to show detached menu over floating tex bro and main wnd... + gtk_menu_attach_to_widget( GTK_MENU( menu_tags ), GTK_WIDGET( button ), NULL ); } { // Tag TreeView - g_TextureBrowser.m_scr_win_tags = ui::ScrolledWindow(ui::New); - gtk_container_set_border_width( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tags ), 0 ); + textureBrowser.m_scr_win_tags = ui::ScrolledWindow(ui::New); + gtk_container_set_border_width( GTK_CONTAINER( textureBrowser.m_scr_win_tags ), 0 ); // vertical only scrolling for treeview - gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tags ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS ); + gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tags ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS ); TextureBrowser_createTreeViewTags(); - auto selection = gtk_tree_view_get_selection(g_TextureBrowser.m_treeViewTags ); + auto selection = gtk_tree_view_get_selection(textureBrowser.m_treeViewTags ); gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE ); - gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tags ), textureBrowser.m_treeViewTags ); - //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tags ), g_TextureBrowser.m_treeViewTags ); - gtk_container_add( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tags ), GTK_WIDGET( g_TextureBrowser.m_treeViewTags ) ); - g_TextureBrowser.m_treeViewTags.show(); ++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tags ), textureBrowser.m_treeViewTags ); ++ gtk_container_add( GTK_CONTAINER( textureBrowser.m_scr_win_tags ), GTK_WIDGET( textureBrowser.m_treeViewTags ) ); ++ + textureBrowser.m_treeViewTags.show(); } { // Texture/Tag notebook TextureBrowser_constructTagNotebook(); @@@ -2450,11 -2328,12 +2458,13 @@@ gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE ); auto column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} ); - gtk_tree_view_append_column(g_TextureBrowser.m_assigned_tree, column ); - g_TextureBrowser.m_assigned_tree.show(); + gtk_tree_view_append_column(textureBrowser.m_assigned_tree, column ); + textureBrowser.m_assigned_tree.show(); scrolled_win.show(); - gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_assigned_tree ); - //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), g_TextureBrowser.m_assigned_tree ); - gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( g_TextureBrowser.m_available_tree ) ); ++ ++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_assigned_tree ); ++ gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( textureBrowser.m_available_tree ) ); frame_table.attach(scrolled_win, {0, 1, 1, 3}, {GTK_FILL, GTK_FILL}); } @@@ -2478,11 -2357,12 +2488,13 @@@ gtk_tree_selection_set_mode( selection, GTK_SELECTION_MULTIPLE ); auto column = ui::TreeViewColumn( "", renderer, {{"text", TAG_COLUMN}} ); - gtk_tree_view_append_column(g_TextureBrowser.m_available_tree, column ); - g_TextureBrowser.m_available_tree.show(); + gtk_tree_view_append_column(textureBrowser.m_available_tree, column ); + textureBrowser.m_available_tree.show(); scrolled_win.show(); - gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_available_tree ); - //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), g_TextureBrowser.m_available_tree ); - gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( g_TextureBrowser.m_available_tree ) ); ++ ++ //gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW( scrolled_win ), textureBrowser.m_available_tree ); ++ gtk_container_add( GTK_CONTAINER( scrolled_win ), GTK_WIDGET( textureBrowser.m_available_tree ) ); frame_table.attach(scrolled_win, {2, 3, 1, 3}, {GTK_FILL, GTK_FILL}); }