mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:20:04 +00:00 
			
		
		
		
	Add specific dialog and setting for high privilege warning
This commit is contained in:
		
							parent
							
								
									71f967d536
								
							
						
					
					
						commit
						923dad4e2e
					
				
					 7 changed files with 274 additions and 18 deletions
				
			
		|  | @ -80,6 +80,7 @@ public: | |||
|       warningsProvider_.SetDefault(defaultWarningsProviderValue); | ||||
|       cursorIconAlwaysOn_.SetDefault(false); | ||||
|       radarSiteThreshold_.SetDefault(0.0); | ||||
|       highPrivilegeWarningEnabled_.SetDefault(true); | ||||
| 
 | ||||
|       fontSizes_.SetElementMinimum(1); | ||||
|       fontSizes_.SetElementMaximum(72); | ||||
|  | @ -175,6 +176,8 @@ public: | |||
|    SettingsVariable<std::string> warningsProvider_ {"warnings_provider"}; | ||||
|    SettingsVariable<bool>        cursorIconAlwaysOn_ {"cursor_icon_always_on"}; | ||||
|    SettingsVariable<double>      radarSiteThreshold_ {"radar_site_threshold"}; | ||||
|    SettingsVariable<bool>        highPrivilegeWarningEnabled_ { | ||||
|       "high_privilege_warning_enabled"}; | ||||
| }; | ||||
| 
 | ||||
| GeneralSettings::GeneralSettings() : | ||||
|  | @ -210,7 +213,8 @@ GeneralSettings::GeneralSettings() : | |||
|                       &p->updateNotificationsEnabled_, | ||||
|                       &p->warningsProvider_, | ||||
|                       &p->cursorIconAlwaysOn_, | ||||
|                       &p->radarSiteThreshold_}); | ||||
|                       &p->radarSiteThreshold_, | ||||
|                       &p->highPrivilegeWarningEnabled_}); | ||||
|    SetDefaults(); | ||||
| } | ||||
| GeneralSettings::~GeneralSettings() = default; | ||||
|  | @ -375,6 +379,11 @@ SettingsVariable<double>& GeneralSettings::radar_site_threshold() const | |||
|    return p->radarSiteThreshold_; | ||||
| } | ||||
| 
 | ||||
| SettingsVariable<bool>& GeneralSettings::high_privilege_warning_enabled() const | ||||
| { | ||||
|    return p->highPrivilegeWarningEnabled_; | ||||
| } | ||||
| 
 | ||||
| bool GeneralSettings::Shutdown() | ||||
| { | ||||
|    bool dataChanged = false; | ||||
|  | @ -429,7 +438,9 @@ bool operator==(const GeneralSettings& lhs, const GeneralSettings& rhs) | |||
|               rhs.p->updateNotificationsEnabled_ && | ||||
|            lhs.p->warningsProvider_ == rhs.p->warningsProvider_ && | ||||
|            lhs.p->cursorIconAlwaysOn_ == rhs.p->cursorIconAlwaysOn_ && | ||||
|            lhs.p->radarSiteThreshold_ == rhs.p->radarSiteThreshold_); | ||||
|            lhs.p->radarSiteThreshold_ == rhs.p->radarSiteThreshold_ && | ||||
|            lhs.p->highPrivilegeWarningEnabled_ == | ||||
|               rhs.p->highPrivilegeWarningEnabled_); | ||||
| } | ||||
| 
 | ||||
| } // namespace settings
 | ||||
|  |  | |||
|  | @ -56,6 +56,7 @@ public: | |||
|    SettingsVariable<std::string>& warnings_provider() const; | ||||
|    SettingsVariable<bool>&        cursor_icon_always_on() const; | ||||
|    SettingsVariable<double>&      radar_site_threshold() const; | ||||
|    SettingsVariable<bool>&        high_privilege_warning_enabled() const; | ||||
| 
 | ||||
|    static GeneralSettings& Instance(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak