]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.h
Merge commit '70f0925f0000a132c709b935aa5cb0942b5080d9' into master-merge
[xonotic/netradiant.git] / radiant / preferences.h
index f0a84d532256a4dcbc145863ca65173730fe6dca..a7739d4dce474fa6bdae9165e85422097c68d153 100644 (file)
@@ -71,6 +71,12 @@ void appendRadioIcons( const char* name, StringArrayRange icons, Property<int> c
 void appendRadioIcons( const char* name, int& data, StringArrayRange icons ){
        m_dialog.addRadioIcons( m_vbox, name, data, icons );
 }
+ui::Widget appendSpacer( int dimension ){
+       return m_dialog.addSpacer( m_vbox, dimension );
+}
+ui::Widget appendLabel( const char* name, const char* text ){
+       return m_dialog.addLabel( m_vbox, name, text );
+}
 ui::Widget appendEntry( const char* name, Property<int> const &cb ){
        return m_dialog.addIntEntry( m_vbox, name, cb );
 }
@@ -123,6 +129,7 @@ void PreferencesDialog_addDisplayPage( const PreferenceGroupCallback& callback )
 void PreferencesDialog_addSettingsPreferences( const PreferencesPageCallback& callback );
 void PreferencesDialog_addSettingsPage( const PreferenceGroupCallback& callback );
 
+bool PreferencesDialog_isRestartRequired();
 void PreferencesDialog_restartRequired( const char* staticName );
 
 template<typename Value>
@@ -350,9 +357,13 @@ public:
 
 ui::Widget m_notebook{ui::null};
 
-virtual ~PrefsDlg(){
-       g_string_free( m_rc_path, true );
-       g_string_free( m_inipath, true );
+virtual ~PrefsDlg() {
+       if (m_rc_path) {
+               g_string_free( m_rc_path, true );
+       }
+       if (m_inipath) {
+               g_string_free( m_inipath, true );
+       }
 }
 
 /*!
@@ -404,6 +415,8 @@ extern preferences_globals_t g_preferences_globals;
 void PreferencesDialog_constructWindow( ui::Window main_window );
 void PreferencesDialog_destroyWindow();
 
+
+void PreferencesDialog_restartIfRequired();
 void PreferencesDialog_showDialog();
 
 void GlobalPreferences_Init();