mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 22:22:45 -04: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
2 changed files with 13 additions and 0 deletions
|
@ -50,6 +50,7 @@ RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags)
|
||||||
void
|
void
|
||||||
RSettingsWin::showWindow(int page)
|
RSettingsWin::showWindow(int page)
|
||||||
{
|
{
|
||||||
|
loadSettings();
|
||||||
setNewPage(page);
|
setNewPage(page);
|
||||||
QDialog::show();
|
QDialog::show();
|
||||||
}
|
}
|
||||||
|
@ -126,6 +127,17 @@ RSettingsWin::setNewPage(int page)
|
||||||
listWidget->setCurrentRow(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. */
|
/** Saves changes made to settings. */
|
||||||
void
|
void
|
||||||
RSettingsWin::saveChanges()
|
RSettingsWin::saveChanges()
|
||||||
|
|
|
@ -48,6 +48,7 @@ class RSettingsWin: public QDialog, private Ui::Settings
|
||||||
void saveChanges();
|
void saveChanges();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void loadSettings();
|
||||||
void closeEvent (QCloseEvent * event);
|
void closeEvent (QCloseEvent * event);
|
||||||
void initStackedWidget();
|
void initStackedWidget();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue