]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit '0c0ed6c1a75ce05a91209fdf3ad8378a7b7e7f6a' into master-merge
authorThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 04:05:15 +0000 (06:05 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 04:05:15 +0000 (06:05 +0200)
1  2 
radiant/mainframe.cpp
radiant/texwindow.cpp

Simple merge
index 4068f27b551b7ebab1314e0361edb0d021ad5d3b,6eab79a4d26ee7c2f92698ac57fbd3ab38171340..c2319f2348ff318f0c2bc4aa93d4fb2fed614264
@@@ -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 ) ));
                        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();
                        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});
                }
                        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});
                }