]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit '71ef2336cbab4cca1d1b228cdb89601f6569c107' into master-merge
authorThomas Debesse <dev@illwieckz.net>
Mon, 20 Jun 2022 02:48:59 +0000 (04:48 +0200)
committerThomas Debesse <dev@illwieckz.net>
Mon, 20 Jun 2022 02:48:59 +0000 (04:48 +0200)
1  2 
libs/gtkutil/window.cpp
radiant/groupdialog.cpp
radiant/mainframe.cpp
radiant/texwindow.cpp

index 80b79738892daabe2590316fc95c1cfa999fa3ba,c1613500d12298de8664e83fe286787ab21de039..c8671a2fbcf0ab25976c5658d26a02d6abf87e44
  
  inline void CHECK_RESTORE( ui::Widget w ){
        if ( gpointer_to_int( g_object_get_data( G_OBJECT( w ), "was_mapped" ) ) != 0 ) {
 +
 +#ifdef WORKAROUND_WINDOWS_GTK2_GLWIDGET
 +              /* workaround for gtk 2.24 issue: not displayed glwidget after toggle */
 +              GtkWidget* glwidget = GTK_WIDGET( g_object_get_data( G_OBJECT( w ), "glwidget" ) );
 +              if ( glwidget ){
 +                      gtk_widget_hide( glwidget );
 +                      gtk_widget_show( glwidget );
 +              }
 +#endif // WORKAROUND_WINDOWS_GTK2_GLWIDGET
 +
                w.show();
+ #define GARUX_GTK_WORKAROUND
+ #ifndef GARUX_GTK_WORKAROUND
+               /* workaround for gtk 2.24 issue: not displayed glwidget after min/restore */
+               GtkWidget* glwidget = GTK_WIDGET( g_object_get_data( G_OBJECT( w ), "glwidget" ) );
+               if ( glwidget ){
+                       gtk_widget_hide( glwidget );
+                       gtk_widget_show( glwidget );
+               }
+ #endif
        }
  }
  
Simple merge
index df57ccb7d3a2da2ea77fce1901ee5fb82b05110b,8581cc4caf8519e771dbcb735e9b1df2bb7e34d8..c413708181aa6dc9a0306064202a9827619b01cb
@@@ -3072,13 -2984,14 +3072,15 @@@ void MainFrame::Create()
  
        window.show();
  
 -      if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft ) {
 +      if ( CurrentStyle() == eRegular || CurrentStyle() == eRegularLeft )
 +      {
                {
                        ui::Widget hsplit = ui::HPaned(ui::New);
-                       m_vSplit = hsplit;
+                       m_hSplit = hsplit;
                        vbox.pack_start( hsplit, TRUE, TRUE, 0 );
                        hsplit.show();
                        {
                                ui::Widget vsplit = ui::VPaned(ui::New);
                                vsplit.show();
index 81d1edc08bdefe15412af379515cd96a3dbb38d0,7a24d67fd18592acbbc7d7ea0a1c97ffe33dbebb..32c4a8137b11db24039989795297b717b2326f8d
@@@ -2303,18 -2213,18 +2329,18 @@@ ui::Widget TextureBrowser_constructWind
                auto tools_item = TextureBrowser_constructToolsMenu( menu_tools );
                gtk_menu_item_set_submenu( GTK_MENU_ITEM( tools_item ), menu_tools );
                gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tools_item );
-               table.attach(menu_bar, {0, 3, 0, 1}, {GTK_FILL, GTK_SHRINK});
-               menu_bar.show();
+ */
+               // table.attach(menu_bar, {0, 3, 0, 1}, {GTK_FILL, GTK_SHRINK});
+               // menu_bar.show();
        }
        { // Texture TreeView
 -              g_TextureBrowser.m_scr_win_tree = ui::ScrolledWindow(ui::New);
 -              gtk_container_set_border_width( GTK_CONTAINER( g_TextureBrowser.m_scr_win_tree ), 0 );
 +              textureBrowser.m_scr_win_tree = ui::ScrolledWindow(ui::New);
 +              gtk_container_set_border_width( GTK_CONTAINER( textureBrowser.m_scr_win_tree ), 0 );
  
                // vertical only scrolling for treeview
 -              gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( g_TextureBrowser.m_scr_win_tree ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
 +              gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( textureBrowser.m_scr_win_tree ), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS );
  
 -              g_TextureBrowser.m_scr_win_tree.show();
 +              textureBrowser.m_scr_win_tree.show();
  
                TextureBrowser_createTreeViewTree();
  
                }
                { // tag menu bar
                        auto menu_tags = ui::Menu(ui::New);
-                       auto tags_item = TextureBrowser_constructTagsMenu( menu_tags );
-                       gtk_menu_item_set_submenu( GTK_MENU_ITEM( tags_item ), menu_tags );
-                       gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tags_item );
+                       // auto tags_item = TextureBrowser_constructTagsMenu( menu_tags );
+                       TextureBrowser_constructTagsMenu( menu_tags );
+                       // gtk_menu_item_set_submenu( GTK_MENU_ITEM( tags_item ), menu_tags );
+                       // gtk_menu_shell_append( GTK_MENU_SHELL( menu_bar ), tags_item );
+                       auto button = toolbar_append_button( toolbar, "Tags", "texbro_tags.png" );
+                       button.dimensions( 22, 22 );
+                       button.connect( "clicked", G_CALLBACK( Popup_View_Menu ), menu_tags );
                }
                { // 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();
  
@@@ -3059,8 -2903,6 +3094,12 @@@ void TextureBrowser_Destroy()
        Textures_setModeChangedNotify( Callback<void()>() );
  }
  
+ ui::Widget TextureBrowser_getGLWidget(){
+       return GlobalTextureBrowser().m_gl_widget;
+ }
++
 +#if WORKAROUND_WINDOWS_GTK2_GLWIDGET
 +ui::GLArea TextureBrowser_getGLWidget(){
 +      return GlobalTextureBrowser().m_gl_widget;
 +}
 +#endif // WORKAROUND_WINDOWS_GTK2_GLWIDGET