]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit '6e687efe8899278a955efd1e3ba4de5300f7949a' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Mon, 11 Feb 2019 07:23:51 +0000 (08:23 +0100)
committerThomas Debesse <dev@illwieckz.net>
Mon, 11 Feb 2019 07:23:51 +0000 (08:23 +0100)
13 files changed:
1  2 
plugins/entity/light.cpp
plugins/shaders/shaders.cpp
radiant/entity.cpp
radiant/gtkdlgs.cpp
radiant/mainframe.cpp
radiant/mru.cpp
radiant/patchmanip.cpp
radiant/preferences.cpp
radiant/surfacedialog.cpp
radiant/watchbsp.cpp
radiant/xywindow.cpp
radiant/xywindow.h
tools/quake3/q3map2/map.c

Simple merge
Simple merge
Simple merge
index a7e3fbce744b6186b970cb5136e720132e191ddd,7bdea67d7ada63463151199f5e8426723e50769b..81b507b71c2b86e331e5a33ac12dd3015c6542cd
@@@ -344,8 -372,8 +344,8 @@@ void DoProjectSettings()
                        ProjectSettingsDialog_ok( dialog );
                }
  
 -              gtk_widget_destroy( GTK_WIDGET( window ) );
 +              window.destroy();
-       }
+       //}
  }
  
  // =============================================================================
@@@ -637,18 -674,18 +637,18 @@@ EMessageBoxReturn DoTextureLayout( floa
                        }
                }
        }
-       
        // Initialize with last used values
        char buf[16];
-       
        sprintf( buf, "%f", last_used_texture_layout_scale_x );
 -      gtk_entry_set_text( x, buf );
 +      x.text( buf );
-       
        sprintf( buf, "%f", last_used_texture_layout_scale_y );
 -      gtk_entry_set_text( y, buf );
 +      y.text( buf );
  
        // Set focus after intializing the values
 -      gtk_widget_grab_focus( GTK_WIDGET( x ) );
 +      gtk_widget_grab_focus(  );
  
        EMessageBoxReturn ret = modal_dialog_show( window, dialog );
        if ( ret == eIDOK ) {
index 5a9f9be6d93a6f82ec2633b0b2d814d96270b3c4,538780545457e1481089b28fb07b9c9e4946b781..30ca62864f0013d5ae3870103a64f9134bd6ecfa
@@@ -1962,12 -1819,12 +1962,12 @@@ ui::MenuItem create_file_menu()
        create_menu_item_with_mnemonic( menu, "_Import...", "ImportMap" );
        create_menu_item_with_mnemonic( menu, "_Save", "SaveMap" );
        create_menu_item_with_mnemonic( menu, "Save _as...", "SaveMapAs" );
 -      create_menu_item_with_mnemonic( menu, "Save s_elected...", "SaveSelected" );
 +      create_menu_item_with_mnemonic( menu, "_Export selected...", "ExportSelected" );
        menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "Save re_gion...", "SaveRegion" );
      menu_separator( menu );
      create_menu_item_with_mnemonic( menu, "_Refresh models", "RefreshReferences" );
      menu_separator( menu );
//    menu_separator( menu );
//    create_menu_item_with_mnemonic( menu, "_Refresh models", "RefreshReferences" );
//    menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "Pro_ject settings...", "ProjectSettings" );
        menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "_Pointfile...", "TogglePointfile" );
@@@ -2004,11 -1863,14 +2006,14 @@@ ui::MenuItem create_edit_menu()
        create_menu_item_with_mnemonic( menu, "Select i_nside", "SelectInside" );
        create_menu_item_with_mnemonic( menu, "Select _touching", "SelectTouching" );
  
-       auto convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" );
-       if ( g_Layout_enableDetachableMenus.m_value ) {
-               menu_tearoff( convert_menu );
-       }
-       create_menu_item_with_mnemonic( convert_menu, "To Whole _Entities", "ExpandSelectionToEntities" );
+       menu_separator( menu );
 -//    GtkMenu* convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" );
++//    auto convert_menu = create_sub_menu_with_mnemonic( menu, "E_xpand Selection" );
+ //    if ( g_Layout_enableDetachableMenus.m_value ) {
+ //            menu_tearoff( convert_menu );
+ //    }
+       create_menu_item_with_mnemonic( menu, "Select All Of Type", "SelectAllOfType" );
+       create_menu_item_with_mnemonic( menu, "_Expand Selection To Entities", "ExpandSelectionToEntities" );
  
        menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "Pre_ferences...", "Preferences" );
diff --cc radiant/mru.cpp
index 37fd9a17a734933c9437363324eb40bedf83f029,24efcf0411093c7ed710677e36954ff77ddb67c9..72660b91109b45a223e403829712ca4d1ae66dc6
@@@ -191,11 -190,16 +191,16 @@@ LoadMRU g_load_mru1( 1 )
  LoadMRU g_load_mru2( 2 );
  LoadMRU g_load_mru3( 3 );
  LoadMRU g_load_mru4( 4 );
+ LoadMRU g_load_mru5( 5 );
+ LoadMRU g_load_mru6( 6 );
+ LoadMRU g_load_mru7( 7 );
+ LoadMRU g_load_mru8( 8 );
+ LoadMRU g_load_mru9( 9 );
  
 -void MRU_constructMenu( GtkMenu* menu ){
 +void MRU_constructMenu( ui::Menu menu ){
        {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_1", LoadMRUCaller( g_load_mru1 ) );
 -              gtk_widget_set_sensitive( GTK_WIDGET( item ), FALSE );
 +              auto item = create_menu_item_with_mnemonic( menu, "_1", LoadMRUCaller( g_load_mru1 ) );
 +              gtk_widget_set_sensitive( item , FALSE );
                MRU_AddWidget( item, 0 );
        }
        {
                MRU_AddWidget( item, 2 );
        }
        {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_4", LoadMRUCaller( g_load_mru4 ) );
 -              gtk_widget_hide( GTK_WIDGET( item ) );
 +              auto item = create_menu_item_with_mnemonic( menu, "_4", LoadMRUCaller( g_load_mru4 ) );
 +              item.hide();
                MRU_AddWidget( item, 3 );
        }
 -              {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_5", LoadMRUCaller( g_load_mru5 ) );
 -              gtk_widget_hide( GTK_WIDGET( item ) );
 -              MRU_AddWidget( item, 4 );
++      {
++              auto item = create_menu_item_with_mnemonic( menu, "_5", LoadMRUCaller( g_load_mru5 ) );
++              item.hide();
++              MRU_AddWidget( item, 3 );
+       }
+       {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_6", LoadMRUCaller( g_load_mru6 ) );
 -              gtk_widget_hide( GTK_WIDGET( item ) );
 -              MRU_AddWidget( item, 5 );
++              auto item = create_menu_item_with_mnemonic( menu, "_6", LoadMRUCaller( g_load_mru6 ) );
++              item.hide();
++              MRU_AddWidget( item, 3 );
+       }
+       {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_7", LoadMRUCaller( g_load_mru7 ) );
 -              gtk_widget_hide( GTK_WIDGET( item ) );
 -              MRU_AddWidget( item, 6 );
++              auto item = create_menu_item_with_mnemonic( menu, "_7", LoadMRUCaller( g_load_mru7 ) );
++              item.hide();
++              MRU_AddWidget( item, 3 );
+       }
 -              {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_8", LoadMRUCaller( g_load_mru8 ) );
 -              gtk_widget_hide( GTK_WIDGET( item ) );
 -              MRU_AddWidget( item, 7 );
++      {
++              auto item = create_menu_item_with_mnemonic( menu, "_8", LoadMRUCaller( g_load_mru8 ) );
++              item.hide();
++              MRU_AddWidget( item, 3 );
+       }
+       {
 -              GtkMenuItem* item = create_menu_item_with_mnemonic( menu, "_9", LoadMRUCaller( g_load_mru9 ) );
 -              gtk_widget_hide( GTK_WIDGET( item ) );
 -              MRU_AddWidget( item, 8 );
++              auto item = create_menu_item_with_mnemonic( menu, "_9", LoadMRUCaller( g_load_mru9 ) );
++              item.hide();
++              MRU_AddWidget( item, 3 );
+       }
  }
  
  #include "preferencesystem.h"
index bd9d378beee07b6bda85c8b517278827648fb7cc,fbb89e056592a79b1a1252674828fbd8c4639ea9..7ae19fb4af6d6b65a8fc133f8ac398014b2bee87
@@@ -614,51 -659,55 +614,55 @@@ void PatchPreferences_construct()
  #include "generic/callback.h"
  
  void Patch_registerCommands(){
 -      GlobalCommands_insert( "InvertCurveTextureX", FreeCaller<Patch_FlipTextureX>(), Accelerator( 'I', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "InvertCurveTextureY", FreeCaller<Patch_FlipTextureY>(), Accelerator( 'I', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "IncPatchColumn", FreeCaller<Patch_InsertInsertColumn>(), Accelerator( GDK_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "IncPatchRow", FreeCaller<Patch_InsertInsertRow>(), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "DecPatchColumn", FreeCaller<Patch_DeleteLastColumn>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "DecPatchRow", FreeCaller<Patch_DeleteLastRow>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "NaturalizePatch", FreeCaller<Patch_NaturalTexture>(), Accelerator( 'N', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "PatchCylinder", FreeCaller<Patch_Cylinder>() );
 -      GlobalCommands_insert( "PatchDenseCylinder", FreeCaller<Patch_DenseCylinder>() );
 -      GlobalCommands_insert( "PatchVeryDenseCylinder", FreeCaller<Patch_VeryDenseCylinder>() );
 -      GlobalCommands_insert( "PatchSquareCylinder", FreeCaller<Patch_SquareCylinder>() );
 -      GlobalCommands_insert( "PatchXactCylinder", FreeCaller<Patch_XactCylinder>() );
 -      GlobalCommands_insert( "PatchXactSphere", FreeCaller<Patch_XactSphere>() );
 -      GlobalCommands_insert( "PatchXactCone", FreeCaller<Patch_XactCone>() );
 -      GlobalCommands_insert( "PatchEndCap", FreeCaller<Patch_Endcap>() );
 -      GlobalCommands_insert( "PatchBevel", FreeCaller<Patch_Bevel>() );
 -      GlobalCommands_insert( "PatchSquareBevel", FreeCaller<Patch_SquareBevel>() );
 -      GlobalCommands_insert( "PatchSquareEndcap", FreeCaller<Patch_SquareEndcap>() );
 -      GlobalCommands_insert( "PatchCone", FreeCaller<Patch_Cone>() );
 -      GlobalCommands_insert( "PatchSphere", FreeCaller<Patch_Sphere>() );
 -      GlobalCommands_insert( "SimplePatchMesh", FreeCaller<Patch_Plane>(), Accelerator( 'P', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "PatchInsertInsertColumn", FreeCaller<Patch_InsertInsertColumn>() );
 -      GlobalCommands_insert( "PatchInsertAddColumn", FreeCaller<Patch_InsertAddColumn>() );
 -      GlobalCommands_insert( "PatchInsertInsertRow", FreeCaller<Patch_InsertInsertRow>() );
 -      GlobalCommands_insert( "PatchInsertAddRow", FreeCaller<Patch_InsertAddRow>() );
 -      GlobalCommands_insert( "PatchDeleteFirstColumn", FreeCaller<Patch_DeleteFirstColumn>() );
 -      GlobalCommands_insert( "PatchDeleteLastColumn", FreeCaller<Patch_DeleteLastColumn>() );
 -      GlobalCommands_insert( "PatchDeleteFirstRow", FreeCaller<Patch_DeleteFirstRow>() );
 -      GlobalCommands_insert( "PatchDeleteLastRow", FreeCaller<Patch_DeleteLastRow>() );
 -      GlobalCommands_insert( "InvertCurve", FreeCaller<Patch_Invert>(), Accelerator( 'I', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "RedisperseRows", FreeCaller<Patch_RedisperseRows>(), Accelerator( 'E', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "RedisperseCols", FreeCaller<Patch_RedisperseCols>(), Accelerator( 'E', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "SmoothRows", FreeCaller<Patch_SmoothRows>(), Accelerator( 'W', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "SmoothCols", FreeCaller<Patch_SmoothCols>(), Accelerator( 'W', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "MatrixTranspose", FreeCaller<Patch_Transpose>(), Accelerator( 'M', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -      GlobalCommands_insert( "CapCurrentCurve", FreeCaller<Patch_Cap>(), Accelerator( 'C', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "CycleCapTexturePatch", FreeCaller<Patch_CycleProjection>(), Accelerator( 'N', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "MakeOverlayPatch", FreeCaller<Patch_OverlayOn>(), Accelerator( 'Y' ) );
 -      GlobalCommands_insert( "ClearPatchOverlays", FreeCaller<Patch_OverlayOff>(), Accelerator( 'L', (GdkModifierType)GDK_CONTROL_MASK ) );
 -}
 -
 -void Patch_constructToolbar( GtkToolbar* toolbar ){
 -      toolbar_append_button( toolbar, "Put caps on the current patch (SHIFT + C)", "curve_cap.bmp", "CapCurrentCurve" );
 -}
 -
 -void Patch_constructMenu( GtkMenu* menu ){
 +      GlobalCommands_insert( "InvertCurveTextureX", makeCallbackF(Patch_FlipTextureX), Accelerator( 'I', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "InvertCurveTextureY", makeCallbackF(Patch_FlipTextureY), Accelerator( 'I', (GdkModifierType)GDK_SHIFT_MASK ) );
++      GlobalCommands_insert( "IncPatchColumn", makeCallbackF(Patch_InsertInsertColumn), Accelerator( GDK_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
++      GlobalCommands_insert( "IncPatchRow", makeCallbackF(Patch_InsertInsertRow), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
++      GlobalCommands_insert( "DecPatchColumn", makeCallbackF(Patch_DeleteLastColumn), Accelerator( GDK_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
++      GlobalCommands_insert( "DecPatchRow", makeCallbackF(Patch_DeleteLastRow), Accelerator( GDK_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "NaturalizePatch", makeCallbackF(Patch_NaturalTexture), Accelerator( 'N', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "PatchCylinder", makeCallbackF(Patch_Cylinder) );
 +      GlobalCommands_insert( "PatchDenseCylinder", makeCallbackF(Patch_DenseCylinder) );
 +      GlobalCommands_insert( "PatchVeryDenseCylinder", makeCallbackF(Patch_VeryDenseCylinder) );
 +      GlobalCommands_insert( "PatchSquareCylinder", makeCallbackF(Patch_SquareCylinder) );
 +      GlobalCommands_insert( "PatchXactCylinder", makeCallbackF(Patch_XactCylinder) );
 +      GlobalCommands_insert( "PatchXactSphere", makeCallbackF(Patch_XactSphere) );
 +      GlobalCommands_insert( "PatchXactCone", makeCallbackF(Patch_XactCone) );
 +      GlobalCommands_insert( "PatchEndCap", makeCallbackF(Patch_Endcap) );
 +      GlobalCommands_insert( "PatchBevel", makeCallbackF(Patch_Bevel) );
 +      GlobalCommands_insert( "PatchSquareBevel", makeCallbackF(Patch_SquareBevel) );
 +      GlobalCommands_insert( "PatchSquareEndcap", makeCallbackF(Patch_SquareEndcap) );
 +      GlobalCommands_insert( "PatchCone", makeCallbackF(Patch_Cone) );
 +      GlobalCommands_insert( "PatchSphere", makeCallbackF(Patch_Sphere) );
 +      GlobalCommands_insert( "SimplePatchMesh", makeCallbackF(Patch_Plane), Accelerator( 'P', (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "PatchInsertInsertColumn", makeCallbackF(Patch_InsertInsertColumn), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "PatchInsertAddColumn", makeCallbackF(Patch_InsertAddColumn) );
 +      GlobalCommands_insert( "PatchInsertInsertRow", makeCallbackF(Patch_InsertInsertRow), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "PatchInsertAddRow", makeCallbackF(Patch_InsertAddRow) );
 +      GlobalCommands_insert( "PatchDeleteFirstColumn", makeCallbackF(Patch_DeleteFirstColumn) );
 +      GlobalCommands_insert( "PatchDeleteLastColumn", makeCallbackF(Patch_DeleteLastColumn), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "PatchDeleteFirstRow", makeCallbackF(Patch_DeleteFirstRow), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "PatchDeleteLastRow", makeCallbackF(Patch_DeleteLastRow) );
 +      GlobalCommands_insert( "InvertCurve", makeCallbackF(Patch_Invert), Accelerator( 'I', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "RedisperseRows", makeCallbackF(Patch_RedisperseRows), Accelerator( 'E', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "RedisperseCols", makeCallbackF(Patch_RedisperseCols), Accelerator( 'E', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "SmoothRows", makeCallbackF(Patch_SmoothRows), Accelerator( 'W', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      GlobalCommands_insert( "SmoothCols", makeCallbackF(Patch_SmoothCols), Accelerator( 'W', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "MatrixTranspose", makeCallbackF(Patch_Transpose), Accelerator( 'M', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "CapCurrentCurve", makeCallbackF(Patch_Cap), Accelerator( 'C', (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "CycleCapTexturePatch", makeCallbackF(Patch_CycleProjection), Accelerator( 'N', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +      GlobalCommands_insert( "MakeOverlayPatch", makeCallbackF(Patch_OverlayOn), Accelerator( 'Y' ) );
 +      GlobalCommands_insert( "ClearPatchOverlays", makeCallbackF(Patch_OverlayOff), Accelerator( 'L', (GdkModifierType)GDK_CONTROL_MASK ) );
 +}
 +
 +void Patch_constructToolbar( ui::Toolbar toolbar ){
 +      toolbar_append_button( toolbar, "Put caps on the current patch (SHIFT + C)", "cap_curve.png", "CapCurrentCurve" );
 +}
 +
 +void Patch_constructMenu( ui::Menu menu ){
        create_menu_item_with_mnemonic( menu, "Cylinder", "PatchCylinder" );
        {
 -              GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "More Cylinders" );
 +              auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "More Cylinders" );
                if ( g_Layout_enableDetachableMenus.m_value ) {
                        menu_tearoff( menu_in_menu );
                }
        create_menu_item_with_mnemonic( menu, "End cap", "PatchEndCap" );
        create_menu_item_with_mnemonic( menu, "Bevel", "PatchBevel" );
        {
-               auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "More End caps, Bevels" );
-               if ( g_Layout_enableDetachableMenus.m_value ) {
-                       menu_tearoff( menu_in_menu );
-               }
-               create_menu_item_with_mnemonic( menu_in_menu, "Square Endcap", "PatchSquareBevel" );
-               create_menu_item_with_mnemonic( menu_in_menu, "Square Bevel", "PatchSquareEndcap" );
 -//            GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "More End caps, Bevels" );
++//            auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "More End caps, Bevels" );
+ //            if ( g_Layout_enableDetachableMenus.m_value ) {
+ //                    menu_tearoff( menu_in_menu );
+ //            }
+               create_menu_item_with_mnemonic( menu, "Square Endcap", "PatchSquareBevel" );
+               create_menu_item_with_mnemonic( menu, "Square Bevel", "PatchSquareEndcap" );
        }
        menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "Cone", "PatchCone" );
                        menu_tearoff( menu_in_menu );
                }
                create_menu_item_with_mnemonic( menu_in_menu, "Invert", "InvertCurve" );
-               auto menu_3 = create_sub_menu_with_mnemonic( menu_in_menu, "Re-disperse" );
-               if ( g_Layout_enableDetachableMenus.m_value ) {
-                       menu_tearoff( menu_3 );
-               }
-               create_menu_item_with_mnemonic( menu_3, "Rows", "RedisperseRows" );
-               create_menu_item_with_mnemonic( menu_3, "Columns", "RedisperseCols" );
-               auto menu_4 = create_sub_menu_with_mnemonic( menu_in_menu, "Smooth" );
-               if ( g_Layout_enableDetachableMenus.m_value ) {
-                       menu_tearoff( menu_4 );
-               }
-               create_menu_item_with_mnemonic( menu_4, "Rows", "SmoothRows" );
-               create_menu_item_with_mnemonic( menu_4, "Columns", "SmoothCols" );
 -              create_menu_item_with_mnemonic( menu_in_menu, "Transpose", "MatrixTranspose" );
 -//            GtkMenu* menu_3 = create_sub_menu_with_mnemonic( menu_in_menu, "Re-disperse" );
++//            auto menu_3 = create_sub_menu_with_mnemonic( menu_in_menu, "Re-disperse" );
+ //            if ( g_Layout_enableDetachableMenus.m_value ) {
+ //                    menu_tearoff( menu_3 );
+ //            }
+               menu_separator( menu_in_menu );
 -              create_menu_item_with_mnemonic( menu_in_menu, "Re-disperse Rows", "RedisperseRows" );
 -              create_menu_item_with_mnemonic( menu_in_menu, "Re-disperse Columns", "RedisperseCols" );
 -//            GtkMenu* menu_4 = create_sub_menu_with_mnemonic( menu_in_menu, "Smooth" );
++              create_menu_item_with_mnemonic( menu, "Rows", "RedisperseRows" );
++              create_menu_item_with_mnemonic( menu, "Columns", "RedisperseCols" );
++//            auto menu_4 = create_sub_menu_with_mnemonic( menu_in_menu, "Smooth" );
+ //            if ( g_Layout_enableDetachableMenus.m_value ) {
+ //                    menu_tearoff( menu_4 );
+ //            }
 -              menu_separator( menu_in_menu );
 -              create_menu_item_with_mnemonic( menu_in_menu, "Smooth Rows", "SmoothRows" );
 -              create_menu_item_with_mnemonic( menu_in_menu, "Smooth Columns", "SmoothCols" );
++              create_menu_item_with_mnemonic( menu, "Rows", "SmoothRows" );
++              create_menu_item_with_mnemonic( menu, "Columns", "SmoothCols" );
 +              create_menu_item_with_mnemonic( menu_in_menu, "Transpose", "MatrixTranspose" );
++
        }
        menu_separator( menu );
        create_menu_item_with_mnemonic( menu, "Cap Selection", "CapCurrentCurve" );
 +      create_menu_item_with_mnemonic( menu, "Cycle Cap Texture", "CycleCapTexturePatch" );
        menu_separator( menu );
 -              GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Texture" );
+       {
++              auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "Texture" );
+               if ( g_Layout_enableDetachableMenus.m_value ) {
+                       menu_tearoff( menu_in_menu );
+               }
+               create_menu_item_with_mnemonic( menu_in_menu, "Cycle Projection", "CycleCapTexturePatch" );
+               create_menu_item_with_mnemonic( menu_in_menu, "Naturalize", "NaturalizePatch" );
+               create_menu_item_with_mnemonic( menu_in_menu, "Invert X", "InvertCurveTextureX" );
+               create_menu_item_with_mnemonic( menu_in_menu, "Invert Y", "InvertCurveTextureY" );
+       }
+       menu_separator( menu );
        {
 -              GtkMenu* menu_in_menu = create_sub_menu_with_mnemonic( menu, "Overlay" );
 +              auto menu_in_menu = create_sub_menu_with_mnemonic( menu, "Overlay" );
                if ( g_Layout_enableDetachableMenus.m_value ) {
                        menu_tearoff( menu_in_menu );
                }
Simple merge
index dbf3666e22264b49b457993eaf3f371acf9c6052,e48f9b0233a8b420817a80da428fcd8acb41ed5d..bb26225dbd0a0528e14ff57f95145effe64a2f6e
@@@ -1415,11 -1505,11 +1415,11 @@@ void SurfaceInspector_registerPreferenc
  }
  
  void SurfaceInspector_registerCommands(){
-       GlobalCommands_insert( "FitTexture", makeCallbackF(SurfaceInspector_FitTexture), Accelerator( 'B', (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "FitTexture", FreeCaller<SurfaceInspector_FitTexture>(), Accelerator( 'F', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "SurfaceInspector", FreeCaller<SurfaceInspector_toggleShown>(), Accelerator( 'S' ) );
++      GlobalCommands_insert( "FitTexture", makeCallbackF(SurfaceInspector_FitTexture), Accelerator( 'F', (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "SurfaceInspector", makeCallbackF(SurfaceInspector_toggleShown), Accelerator( 'S' ) );
  
 -      GlobalCommands_insert( "FaceCopyTexture", FreeCaller<SelectedFaces_copyTexture>() );
 -      GlobalCommands_insert( "FacePasteTexture", FreeCaller<SelectedFaces_pasteTexture>() );
 +      GlobalCommands_insert( "FaceCopyTexture", makeCallbackF(SelectedFaces_copyTexture) );
 +      GlobalCommands_insert( "FacePasteTexture", makeCallbackF(SelectedFaces_pasteTexture) );
  }
  
  
index bbae3fab77af86854c191e8d4656fd249961213e,a598ff51c3a17205f676bd60209fed5a0ca1d87e..50e6456c42ae7ad29563e2339fddd989b4dfe05f
@@@ -774,11 -772,11 +774,11 @@@ void CWatchBSP::DoMonitoringLoop( GPtrA
        if ( m_eState != EIdle ) {
                globalOutputStream() << "WatchBSP got a monitoring request while not idling...\n";
                // prompt the user, should we cancel the current process and go ahead?
-               if ( ui::alert( MainFrame_getWindow(), "I am already monitoring a Build process.\nDo you want me to override and start a new compilation?",
-                                                        "Build process monitoring", ui::alert_type::YESNO ) == ui::alert_response::YES ) {
 -//            if ( gtk_MessageBox( GTK_WIDGET( MainFrame_getWindow() ),  "I am already monitoring a Build process.\nDo you want me to override and start a new compilation?",
 -//                                                     "Build process monitoring", eMB_YESNO ) == eIDYES ) {
++//            if ( ui::alert( MainFrame_getWindow(), "I am already monitoring a Build process.\nDo you want me to override and start a new compilation?",
++//                                                     "Build process monitoring", ui::alert_type::YESNO ) == ui::alert_response::YES ) {
                        // disconnect and set EIdle state
                        Reset();
              }
//            }
        }
        m_pCmd = str_ptr_array_clone( pCmd );
        m_iCurrentStep = 0;
index 54d121f3907975f9205bcc95a43e5e6f21f7264d,471a5572a6d65d91e4c5022a4a445599a2a7df7f..baf3f621c2b71c8bec337f65f881e801eed03807
@@@ -348,6 -346,6 +348,8 @@@ struct xywindow_globals_private_
        bool m_bChaseMouse;
        bool m_bSizePaint;
  
++      bool g_bCrossHairs;
++
        xywindow_globals_private_t() :
                d_showgrid( true ),
  
  
                m_bCamXYUpdate( true ),
                m_bChaseMouse( true ),
--              m_bSizePaint( true ){
++              m_bSizePaint( true ),
++
++              g_bCrossHairs( false ){
        }
  
  };
@@@ -537,9 -534,9 +541,7 @@@ VIEWTYPE GlobalXYWnd_getCurrentViewType
  // =============================================================================
  // variables
  
--bool g_bCrossHairs = false;
--
 -GtkMenu* XYWnd::m_mnuDrop = 0;
 +ui::Menu XYWnd::m_mnuDrop(ui::null);
  
  // this is disabled, and broken
  // http://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=394
@@@ -1360,7 -1357,7 +1362,7 @@@ void XYWnd::XY_MouseMoved( int x, int y
                           << "  z:: " << FloatFormat( m_mousePosition[2], 6, 1 );
                g_pParentWnd->SetStatusText( g_pParentWnd->m_position_status, status.c_str() );
  
--              if ( g_bCrossHairs ) {
++              if ( g_xywindow_globals_private.g_bCrossHairs ) {
                        XYWnd_Update( *this );
                }
  
@@@ -2294,7 -2291,7 +2296,7 @@@ void XYWnd::XY_Draw()
                PaintSizeInfo( nDim1, nDim2, min, max );
        }
  
--      if ( g_bCrossHairs ) {
++      if ( g_xywindow_globals_private.g_bCrossHairs ) {
                glColor4f( 0.2f, 0.9f, 0.2f, 0.8f );
                glBegin( GL_LINES );
                if ( m_viewType == XY ) {
@@@ -2524,7 -2521,7 +2526,7 @@@ void XY_ZoomOut()
  
  
  void ToggleShowCrosshair(){
--      g_bCrossHairs ^= 1;
++      g_xywindow_globals_private.g_bCrossHairs ^= 1;
        XY_UpdateAllWindows();
  }
  
@@@ -2746,41 -2744,42 +2748,42 @@@ void XYWindow_Construct()
        GlobalToggles_insert( "ToggleView", ToggleShown::ToggleCaller( g_xy_top_shown ), ToggleItem::AddCallbackCaller( g_xy_top_shown.m_item ), Accelerator( 'V', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalToggles_insert( "ToggleSideView", ToggleShown::ToggleCaller( g_yz_side_shown ), ToggleItem::AddCallbackCaller( g_yz_side_shown.m_item ) );
        GlobalToggles_insert( "ToggleFrontView", ToggleShown::ToggleCaller( g_xz_front_shown ), ToggleItem::AddCallbackCaller( g_xz_front_shown.m_item ) );
 -      GlobalCommands_insert( "NextView", FreeCaller<XY_Next>(), Accelerator( GDK_Tab, (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "ZoomIn", FreeCaller<XY_ZoomIn>(), Accelerator( GDK_Delete ) );
 -      GlobalCommands_insert( "ZoomOut", FreeCaller<XY_ZoomOut>(), Accelerator( GDK_Insert ) );
 -      GlobalCommands_insert( "ViewTop", FreeCaller<XY_Top>(), Accelerator( GDK_KP_Home ) );
 -      GlobalCommands_insert( "ViewSide", FreeCaller<XY_Side>(), Accelerator( GDK_KP_Page_Down ) );
 -      GlobalCommands_insert( "ViewFront", FreeCaller<XY_Front>(), Accelerator( GDK_KP_End ) );
 -      GlobalCommands_insert( "Zoom100", FreeCaller<XY_Zoom100>() );
 -      GlobalCommands_insert( "CenterXYView", FreeCaller<XY_Focus>(), Accelerator( GDK_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "ClipCaulk", BoolImportStringCaller( g_clip_useCaulk ), BoolExportStringCaller( g_clip_useCaulk ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "NewRightClick", BoolImportStringCaller( g_xywindow_globals.m_bRightClick ), BoolExportStringCaller( g_xywindow_globals.m_bRightClick ) );
 -      GlobalPreferenceSystem().registerPreference( "ChaseMouse", BoolImportStringCaller( g_xywindow_globals_private.m_bChaseMouse ), BoolExportStringCaller( g_xywindow_globals_private.m_bChaseMouse ) );
 -      GlobalPreferenceSystem().registerPreference( "SizePainting", BoolImportStringCaller( g_xywindow_globals_private.m_bSizePaint ), BoolExportStringCaller( g_xywindow_globals_private.m_bSizePaint ) );
 -      GlobalPreferenceSystem().registerPreference( "ShowCrosshair", BoolImportStringCaller( g_bCrossHairs ), BoolExportStringCaller( g_bCrossHairs ) );
 -      GlobalPreferenceSystem().registerPreference( "NoStipple", BoolImportStringCaller( g_xywindow_globals.m_bNoStipple ), BoolExportStringCaller( g_xywindow_globals.m_bNoStipple ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_ShowCoords", BoolImportStringCaller( g_xywindow_globals_private.show_coordinates ), BoolExportStringCaller( g_xywindow_globals_private.show_coordinates ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_ShowOutlines", BoolImportStringCaller( g_xywindow_globals_private.show_outline ), BoolExportStringCaller( g_xywindow_globals_private.show_outline ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_ShowAxis", BoolImportStringCaller( g_xywindow_globals_private.show_axis ), BoolExportStringCaller( g_xywindow_globals_private.show_axis ) );
 -      GlobalPreferenceSystem().registerPreference( "CamXYUpdate", BoolImportStringCaller( g_xywindow_globals_private.m_bCamXYUpdate ), BoolExportStringCaller( g_xywindow_globals_private.m_bCamXYUpdate ) );
 -      GlobalPreferenceSystem().registerPreference( "ShowWorkzone", BoolImportStringCaller( g_xywindow_globals_private.d_show_work ), BoolExportStringCaller( g_xywindow_globals_private.d_show_work ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "SI_AxisColors0", Vector3ImportStringCaller( g_xywindow_globals.AxisColorX ), Vector3ExportStringCaller( g_xywindow_globals.AxisColorX ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_AxisColors1", Vector3ImportStringCaller( g_xywindow_globals.AxisColorY ), Vector3ExportStringCaller( g_xywindow_globals.AxisColorY ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_AxisColors2", Vector3ImportStringCaller( g_xywindow_globals.AxisColorZ ), Vector3ExportStringCaller( g_xywindow_globals.AxisColorZ ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors1", Vector3ImportStringCaller( g_xywindow_globals.color_gridback ), Vector3ExportStringCaller( g_xywindow_globals.color_gridback ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors2", Vector3ImportStringCaller( g_xywindow_globals.color_gridminor ), Vector3ExportStringCaller( g_xywindow_globals.color_gridminor ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors3", Vector3ImportStringCaller( g_xywindow_globals.color_gridmajor ), Vector3ExportStringCaller( g_xywindow_globals.color_gridmajor ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors6", Vector3ImportStringCaller( g_xywindow_globals.color_gridblock ), Vector3ExportStringCaller( g_xywindow_globals.color_gridblock ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors7", Vector3ImportStringCaller( g_xywindow_globals.color_gridtext ), Vector3ExportStringCaller( g_xywindow_globals.color_gridtext ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors8", Vector3ImportStringCaller( g_xywindow_globals.color_brushes ), Vector3ExportStringCaller( g_xywindow_globals.color_brushes ) );
 -      GlobalPreferenceSystem().registerPreference( "SI_Colors14", Vector3ImportStringCaller( g_xywindow_globals.color_gridmajor_alt ), Vector3ExportStringCaller( g_xywindow_globals.color_gridmajor_alt ) );
 -
 -
 -      GlobalPreferenceSystem().registerPreference( "XZVIS", makeBoolStringImportCallback( ToggleShownImportBoolCaller( g_xz_front_shown ) ), makeBoolStringExportCallback( ToggleShownExportBoolCaller( g_xz_front_shown ) ) );
 -      GlobalPreferenceSystem().registerPreference( "YZVIS", makeBoolStringImportCallback( ToggleShownImportBoolCaller( g_yz_side_shown ) ), makeBoolStringExportCallback( ToggleShownExportBoolCaller( g_yz_side_shown ) ) );
 +      GlobalCommands_insert( "NextView", makeCallbackF(XY_Next), Accelerator( GDK_KEY_Tab, (GdkModifierType)GDK_CONTROL_MASK ) ); // fixme: doesn't show its shortcut
 +      GlobalCommands_insert( "ZoomIn", makeCallbackF(XY_ZoomIn), Accelerator( GDK_KEY_Delete ) );
 +      GlobalCommands_insert( "ZoomOut", makeCallbackF(XY_ZoomOut), Accelerator( GDK_KEY_Insert ) );
 +      GlobalCommands_insert( "ViewTop", makeCallbackF(XY_Top), Accelerator( GDK_KEY_KP_Home ) );
 +      GlobalCommands_insert( "ViewSide", makeCallbackF(XY_Side), Accelerator( GDK_KEY_KP_Page_Down ) );
 +      GlobalCommands_insert( "ViewFront", makeCallbackF(XY_Front), Accelerator( GDK_KEY_KP_End ) );
 +      GlobalCommands_insert( "Zoom100", makeCallbackF(XY_Zoom100) );
 +      GlobalCommands_insert( "CenterXYView", makeCallbackF(XY_Focus), Accelerator( GDK_KEY_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "ClipCaulk", make_property_string( g_clip_useCaulk ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "NewRightClick", make_property_string( g_xywindow_globals.m_bRightClick ) );
 +      GlobalPreferenceSystem().registerPreference( "ChaseMouse", make_property_string( g_xywindow_globals_private.m_bChaseMouse ) );
 +      GlobalPreferenceSystem().registerPreference( "SizePainting", make_property_string( g_xywindow_globals_private.m_bSizePaint ) );
++      GlobalPreferenceSystem().registerPreference( "ShowCrosshair", make_property_string( g_xywindow_globals_private.g_bCrossHairs ) );
 +      GlobalPreferenceSystem().registerPreference( "NoStipple", make_property_string( g_xywindow_globals.m_bNoStipple ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_ShowCoords", make_property_string( g_xywindow_globals_private.show_coordinates ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_ShowOutlines", make_property_string( g_xywindow_globals_private.show_outline ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_ShowAxis", make_property_string( g_xywindow_globals_private.show_axis ) );
 +      GlobalPreferenceSystem().registerPreference( "CamXYUpdate", make_property_string( g_xywindow_globals_private.m_bCamXYUpdate ) );
 +      GlobalPreferenceSystem().registerPreference( "ShowWorkzone", make_property_string( g_xywindow_globals_private.d_show_work ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "SI_AxisColors0", make_property_string( g_xywindow_globals.AxisColorX ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_AxisColors1", make_property_string( g_xywindow_globals.AxisColorY ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_AxisColors2", make_property_string( g_xywindow_globals.AxisColorZ ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors1", make_property_string( g_xywindow_globals.color_gridback ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors2", make_property_string( g_xywindow_globals.color_gridminor ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors3", make_property_string( g_xywindow_globals.color_gridmajor ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors6", make_property_string( g_xywindow_globals.color_gridblock ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors7", make_property_string( g_xywindow_globals.color_gridtext ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors8", make_property_string( g_xywindow_globals.color_brushes ) );
 +      GlobalPreferenceSystem().registerPreference( "SI_Colors14", make_property_string( g_xywindow_globals.color_gridmajor_alt ) );
 +
 +
 +      GlobalPreferenceSystem().registerPreference( "XZVIS", make_property_string<ToggleShown_Bool>( g_xz_front_shown ) );
 +      GlobalPreferenceSystem().registerPreference( "YZVIS", make_property_string<ToggleShown_Bool>( g_yz_side_shown ) );
  
        Orthographic_registerPreferencesPage();
        Clipper_registerPreferencesPage();
Simple merge
Simple merge