]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit '89c4e25e26ba634d5911fd596597387876f2e636' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Tue, 26 May 2020 14:46:18 +0000 (16:46 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 26 May 2020 14:46:18 +0000 (16:46 +0200)
1  2 
radiant/mainframe.cpp
radiant/multimon.cpp
radiant/points.cpp
radiant/selection.cpp
radiant/xywindow.cpp

index b7dbcc49e2c667e3773e3385716c6fac32a49cbe,68fb2b618f3c2711f994ec7e3a8ce27ede4ec322..784e9c4552f389891c144e9a1f9d201c89193f8c
@@@ -3667,32 -3497,34 +3677,34 @@@ void MainFrame_Construct()
        Patch_registerCommands();
        XYShow_registerCommands();
  
 -      typedef FreeCaller1<const Selectable&, ComponentMode_SelectionChanged> ComponentModeSelectionChangedCaller;
 +      typedef FreeCaller<void(const Selectable&), ComponentMode_SelectionChanged> ComponentModeSelectionChangedCaller;
        GlobalSelectionSystem().addSelectionChangeCallback( ComponentModeSelectionChangedCaller() );
  
 -      GlobalPreferenceSystem().registerPreference( "DetachableMenus", BoolImportStringCaller( g_Layout_enableDetachableMenus.m_latched ), BoolExportStringCaller( g_Layout_enableDetachableMenus.m_latched ) );
 -      GlobalPreferenceSystem().registerPreference( "MainToolBar", BoolImportStringCaller( g_Layout_enableMainToolbar.m_latched ), BoolExportStringCaller( g_Layout_enableMainToolbar.m_latched ) );
 -      GlobalPreferenceSystem().registerPreference( "PatchToolBar", BoolImportStringCaller( g_Layout_enablePatchToolbar.m_latched ), BoolExportStringCaller( g_Layout_enablePatchToolbar.m_latched ) );
 -      GlobalPreferenceSystem().registerPreference( "PluginToolBar", BoolImportStringCaller( g_Layout_enablePluginToolbar.m_latched ), BoolExportStringCaller( g_Layout_enablePluginToolbar.m_latched ) );
 -      GlobalPreferenceSystem().registerPreference( "FilterToolBar", BoolImportStringCaller( g_Layout_enableFilterToolbar.m_latched ), BoolExportStringCaller( g_Layout_enableFilterToolbar.m_latched ) );
 -      GlobalPreferenceSystem().registerPreference( "QE4StyleWindows", IntImportStringCaller( g_Layout_viewStyle.m_latched ), IntExportStringCaller( g_Layout_viewStyle.m_latched ) );
 -      GlobalPreferenceSystem().registerPreference( "XYHeight", IntImportStringCaller( g_layout_globals.nXYHeight ), IntExportStringCaller( g_layout_globals.nXYHeight ) );
 -      GlobalPreferenceSystem().registerPreference( "XYWidth", IntImportStringCaller( g_layout_globals.nXYWidth ), IntExportStringCaller( g_layout_globals.nXYWidth ) );
 -      GlobalPreferenceSystem().registerPreference( "CamWidth", IntImportStringCaller( g_layout_globals.nCamWidth ), IntExportStringCaller( g_layout_globals.nCamWidth ) );
 -      GlobalPreferenceSystem().registerPreference( "CamHeight", IntImportStringCaller( g_layout_globals.nCamHeight ), IntExportStringCaller( g_layout_globals.nCamHeight ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "State", IntImportStringCaller( g_layout_globals.nState ), IntExportStringCaller( g_layout_globals.nState ) );
 -      GlobalPreferenceSystem().registerPreference( "PositionX", IntImportStringCaller( g_layout_globals.m_position.x ), IntExportStringCaller( g_layout_globals.m_position.x ) );
 -      GlobalPreferenceSystem().registerPreference( "PositionY", IntImportStringCaller( g_layout_globals.m_position.y ), IntExportStringCaller( g_layout_globals.m_position.y ) );
 -      GlobalPreferenceSystem().registerPreference( "Width", IntImportStringCaller( g_layout_globals.m_position.w ), IntExportStringCaller( g_layout_globals.m_position.w ) );
 -      GlobalPreferenceSystem().registerPreference( "Height", IntImportStringCaller( g_layout_globals.m_position.h ), IntExportStringCaller( g_layout_globals.m_position.h ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "CamWnd", WindowPositionTrackerImportStringCaller( g_posCamWnd ), WindowPositionTrackerExportStringCaller( g_posCamWnd ) );
 -      GlobalPreferenceSystem().registerPreference( "XYWnd", WindowPositionTrackerImportStringCaller( g_posXYWnd ), WindowPositionTrackerExportStringCaller( g_posXYWnd ) );
 -      GlobalPreferenceSystem().registerPreference( "YZWnd", WindowPositionTrackerImportStringCaller( g_posYZWnd ), WindowPositionTrackerExportStringCaller( g_posYZWnd ) );
 -      GlobalPreferenceSystem().registerPreference( "XZWnd", WindowPositionTrackerImportStringCaller( g_posXZWnd ), WindowPositionTrackerExportStringCaller( g_posXZWnd ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "EnginePath", CopiedStringImportStringCaller( g_strEnginePath ), CopiedStringExportStringCaller( g_strEnginePath ) );
 -
 -      GlobalPreferenceSystem().registerPreference( "NudgeAfterClone", BoolImportStringCaller( g_bNudgeAfterClone ), BoolExportStringCaller( g_bNudgeAfterClone ) );
 +      GlobalPreferenceSystem().registerPreference( "DetachableMenus", make_property_string( g_Layout_enableDetachableMenus.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "MainToolBar", make_property_string( g_Layout_enableMainToolbar.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "PatchToolBar", make_property_string( g_Layout_enablePatchToolbar.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "PluginToolBar", make_property_string( g_Layout_enablePluginToolbar.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "FilterToolBar", make_property_string( g_Layout_enableFilterToolbar.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "QE4StyleWindows", make_property_string( g_Layout_viewStyle.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "XYHeight", make_property_string( g_layout_globals.nXYHeight ) );
 +      GlobalPreferenceSystem().registerPreference( "XYWidth", make_property_string( g_layout_globals.nXYWidth ) );
 +      GlobalPreferenceSystem().registerPreference( "CamWidth", make_property_string( g_layout_globals.nCamWidth ) );
 +      GlobalPreferenceSystem().registerPreference( "CamHeight", make_property_string( g_layout_globals.nCamHeight ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "State", make_property_string( g_layout_globals.nState ) );
 +      GlobalPreferenceSystem().registerPreference( "PositionX", make_property_string( g_layout_globals.m_position.x ) );
 +      GlobalPreferenceSystem().registerPreference( "PositionY", make_property_string( g_layout_globals.m_position.y ) );
 +      GlobalPreferenceSystem().registerPreference( "Width", make_property_string( g_layout_globals.m_position.w ) );
 +      GlobalPreferenceSystem().registerPreference( "Height", make_property_string( g_layout_globals.m_position.h ) );
 +
 +      GlobalPreferenceSystem().registerPreference( "CamWnd", make_property<WindowPositionTracker_String>(g_posCamWnd) );
 +      GlobalPreferenceSystem().registerPreference( "XYWnd", make_property<WindowPositionTracker_String>(g_posXYWnd) );
 +      GlobalPreferenceSystem().registerPreference( "YZWnd", make_property<WindowPositionTracker_String>(g_posYZWnd) );
 +      GlobalPreferenceSystem().registerPreference( "XZWnd", make_property<WindowPositionTracker_String>(g_posXZWnd) );
 +
 +      GlobalPreferenceSystem().registerPreference( "EnginePath", make_property_string( g_strEnginePath ) );
++
++      GlobalPreferenceSystem().registerPreference( "NudgeAfterClone", make_property_string( g_bNudgeAfterClone ) );
        if ( g_strEnginePath.empty() )
        {
                g_strEnginePath_was_empty_1st_start = true;
  
        Layout_registerPreferencesPage();
        Paths_registerPreferencesPage();
 -      PreferencesDialog_addSettingsPreferences( FreeCaller1<PreferencesPage&, Nudge_constructPreferences>() );
++      PreferencesDialog_addSettingsPreferences( FreeCaller<void(PreferencesPage&), Nudge_constructPreferences>() );
  
 -      g_brushCount.setCountChangedCallback( FreeCaller<QE_brushCountChanged>() );
 -      g_entityCount.setCountChangedCallback( FreeCaller<QE_entityCountChanged>() );
 +      g_brushCount.setCountChangedCallback( makeCallbackF(QE_brushCountChanged) );
 +      g_entityCount.setCountChangedCallback( makeCallbackF(QE_entityCountChanged) );
        GlobalEntityCreator().setCounter( &g_entityCount );
  
        GLWidget_sharedContextCreated = GlobalGL_sharedContextCreated;
index 9a4a4f22a2d572bd9bcf15ffb041c4866554e09e,33ae89f128c3508647389a45b0ebd21adee31b36..abde2ec234331ffe331d6b4b3b3c96248530bbd0
  
  multimon_globals_t g_multimon_globals;
  
- LatchedValue<bool> g_Multimon_enableSysMenuPopups( false, "Floating windows sysmenu icons" );
 -//LatchedBool g_Multimon_enableSysMenuPopups( false, "Floating windows sysmenu icons" );
++//LatchedValue<bool> g_Multimon_enableSysMenuPopups( false, "Floating windows sysmenu icons" );
  
  void MultiMonitor_constructPreferences( PreferencesPage& page ){
 -      GtkWidget* primary_monitor = page.appendCheckBox( "Multi Monitor", "Start on Primary Monitor", g_multimon_globals.m_bStartOnPrimMon );
 -//    GtkWidget* popup = page.appendCheckBox(
 +      ui::CheckButton primary_monitor = page.appendCheckBox( "Multi Monitor", "Start on Primary Monitor", g_multimon_globals.m_bStartOnPrimMon );
-       ui::CheckButton popup = page.appendCheckBox(
-               "", "Disable system menu on popup windows",
-               mkImportExportCallback( g_Multimon_enableSysMenuPopups )
-               );
-       Widget_connectToggleDependency( popup, primary_monitor );
++//    ui::CheckButton popup = page.appendCheckBox(
+ //            "", "Disable system menu on popup windows",
 -//            LatchedBoolImportCaller( g_Multimon_enableSysMenuPopups ),
 -//            BoolExportCaller( g_Multimon_enableSysMenuPopups.m_latched )
++//            mkImportExportCallback( g_Multimon_enableSysMenuPopups )
+ //            );
+ //    Widget_connectToggleDependency( popup, primary_monitor );
  }
  
  #include "preferencesystem.h"
@@@ -86,13 -87,12 +86,13 @@@ void MultiMon_Construct()
                g_multimon_globals.m_bStartOnPrimMon = true;
        }
  
 -      GlobalPreferenceSystem().registerPreference( "StartOnPrimMon", BoolImportStringCaller( g_multimon_globals.m_bStartOnPrimMon ), BoolExportStringCaller( g_multimon_globals.m_bStartOnPrimMon ) );
 -//    GlobalPreferenceSystem().registerPreference( "NoSysMenuPopups", BoolImportStringCaller( g_Multimon_enableSysMenuPopups.m_latched ), BoolExportStringCaller( g_Multimon_enableSysMenuPopups.m_latched ) );
 +      GlobalPreferenceSystem().registerPreference( "StartOnPrimMon", make_property_string( g_multimon_globals.m_bStartOnPrimMon ) );
-       GlobalPreferenceSystem().registerPreference( "NoSysMenuPopups", make_property_string( g_Multimon_enableSysMenuPopups.m_latched ) );
++//    GlobalPreferenceSystem().registerPreference( "NoSysMenuPopups", make_property_string( g_Multimon_enableSysMenuPopups.m_latched ) );
  
      g_Multimon_enableSysMenuPopups.useLatched();
//    g_Multimon_enableSysMenuPopups.useLatched();
  
 -      PreferencesDialog_addInterfacePreferences( FreeCaller1<PreferencesPage&, MultiMonitor_constructPreferences>() );
 +      PreferencesDialog_addInterfacePreferences( makeCallbackF(MultiMonitor_constructPreferences) );
  }
 +
  void MultiMon_Destroy(){
  }
Simple merge
index a608b7412547dc3a0b226cf199e0245cef8c01a7,805b6ed7007f5f5d3bd9dabbb8359a951c6c4718..2b911a0ea4e85d8c4bd60f00ee3a557428fb5628
@@@ -3991,7 -3990,8 +3994,8 @@@ void SelectionSystem_Construct()
  
        GlobalShaderCache().attachRenderable( getSelectionSystem() );
  
 -      GlobalPreferenceSystem().registerPreference( "PreferPointEntsIn2D", BoolImportStringCaller( getSelectionSystem().m_bPreferPointEntsIn2D ), BoolExportStringCaller( getSelectionSystem().m_bPreferPointEntsIn2D ) );
 -      GlobalPreferenceSystem().registerPreference( "LeftMouseClickSelector", BoolImportStringCaller( g_bLeftMouseClickSelector ), BoolExportStringCaller( g_bLeftMouseClickSelector ) );
 +      GlobalPreferenceSystem().registerPreference( "PreferPointEntsIn2D", make_property_string( getSelectionSystem().m_bPreferPointEntsIn2D ) );
++      GlobalPreferenceSystem().registerPreference( "LeftMouseClickSelector", make_property_string( g_bLeftMouseClickSelector ) );
        SelectionSystem_registerPreferencesPage();
  }
  
Simple merge