mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-31 17:53:28 -05:00
load settings before display pages
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1560 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1c93c63ba4
commit
6df179afa4
@ -50,6 +50,7 @@ RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags)
|
||||
void
|
||||
RSettingsWin::showWindow(int page)
|
||||
{
|
||||
loadSettings();
|
||||
setNewPage(page);
|
||||
QDialog::show();
|
||||
}
|
||||
@ -126,6 +127,17 @@ RSettingsWin::setNewPage(int page)
|
||||
listWidget->setCurrentRow(page);
|
||||
}
|
||||
|
||||
void
|
||||
RSettingsWin::loadSettings()
|
||||
{
|
||||
/* Call each config page's load() method to load its data */
|
||||
int i, count = stackedWidget->count();
|
||||
for (i = 0; i < count; i++) {
|
||||
ConfigPage *page = (ConfigPage *) stackedWidget->widget(i);
|
||||
page->load();
|
||||
}
|
||||
}
|
||||
|
||||
/** Saves changes made to settings. */
|
||||
void
|
||||
RSettingsWin::saveChanges()
|
||||
|
@ -48,6 +48,7 @@ class RSettingsWin: public QDialog, private Ui::Settings
|
||||
void saveChanges();
|
||||
|
||||
private:
|
||||
void loadSettings();
|
||||
void closeEvent (QCloseEvent * event);
|
||||
void initStackedWidget();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user