From: Thomas Debesse Date: Tue, 26 May 2020 14:46:18 +0000 (+0200) Subject: Merge commit '89c4e25e26ba634d5911fd596597387876f2e636' into garux-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1644eeece07040927ced5628e3922774576c64c9;p=xonotic%2Fnetradiant.git Merge commit '89c4e25e26ba634d5911fd596597387876f2e636' into garux-merge --- 1644eeece07040927ced5628e3922774576c64c9 diff --cc radiant/mainframe.cpp index b7dbcc49,68fb2b61..784e9c45 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@@ -3667,32 -3497,34 +3677,34 @@@ void MainFrame_Construct() Patch_registerCommands(); XYShow_registerCommands(); - typedef FreeCaller1 ComponentModeSelectionChangedCaller; + typedef FreeCaller 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(g_posCamWnd) ); + GlobalPreferenceSystem().registerPreference( "XYWnd", make_property(g_posXYWnd) ); + GlobalPreferenceSystem().registerPreference( "YZWnd", make_property(g_posYZWnd) ); + GlobalPreferenceSystem().registerPreference( "XZWnd", make_property(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; @@@ -3730,9 -3556,10 +3742,10 @@@ Layout_registerPreferencesPage(); Paths_registerPreferencesPage(); - PreferencesDialog_addSettingsPreferences( FreeCaller1() ); ++ PreferencesDialog_addSettingsPreferences( FreeCaller() ); - g_brushCount.setCountChangedCallback( FreeCaller() ); - g_entityCount.setCountChangedCallback( FreeCaller() ); + g_brushCount.setCountChangedCallback( makeCallbackF(QE_brushCountChanged) ); + g_entityCount.setCountChangedCallback( makeCallbackF(QE_entityCountChanged) ); GlobalEntityCreator().setCounter( &g_entityCount ); GLWidget_sharedContextCreated = GlobalGL_sharedContextCreated; diff --cc radiant/multimon.cpp index 9a4a4f22,33ae89f1..abde2ec2 --- a/radiant/multimon.cpp +++ b/radiant/multimon.cpp @@@ -29,15 -29,16 +29,15 @@@ multimon_globals_t g_multimon_globals; - LatchedValue g_Multimon_enableSysMenuPopups( false, "Floating windows sysmenu icons" ); -//LatchedBool g_Multimon_enableSysMenuPopups( false, "Floating windows sysmenu icons" ); ++//LatchedValue 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() ); + PreferencesDialog_addInterfacePreferences( makeCallbackF(MultiMonitor_constructPreferences) ); } + void MultiMon_Destroy(){ } diff --cc radiant/selection.cpp index a608b741,805b6ed7..2b911a0e --- a/radiant/selection.cpp +++ b/radiant/selection.cpp @@@ -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(); }