diff --git a/src/core.cpp b/src/core.cpp index d26ec6d..4157a0c 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -291,7 +291,7 @@ void core::exportToWEB() if ( settings->value ( "WEB/accessToken" ).toString().isEmpty() ) { - openSettingsDialog(); + openSettingsDialog ( 1 ); return; } @@ -310,9 +310,10 @@ void core::showExportResult ( QString big, QString small, QString userID ) er->show(); } -void core::openSettingsDialog() +void core::openSettingsDialog ( int tabIndex ) { settingsDialog *sd = new settingsDialog ( windows [ "main" ] ); + sd->activateTab ( tabIndex ); windows [ "settingsDialog" ] = sd; sd->show(); } diff --git a/src/core.h b/src/core.h index 4f641bb..377b7f0 100644 --- a/src/core.h +++ b/src/core.h @@ -79,7 +79,7 @@ public slots: void showAbout(); void exportToWEB(); void showExportResult ( QString, QString, QString ); - void openSettingsDialog(); + void openSettingsDialog ( int tabIndex = -1 ); void trayShotDisplay(); void trayShotWindow(); diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index fa44c8f..54aa65b 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -48,3 +48,9 @@ void settingsDialog::processHTML() { } + +void settingsDialog::activateTab ( int tabIndex ) +{ + if ( tabIndex != -1 ) + ui->tabWidget->setCurrentIndex ( tabIndex ); +} diff --git a/src/settingsdialog.h b/src/settingsdialog.h index 950854d..9405de5 100644 --- a/src/settingsdialog.h +++ b/src/settingsdialog.h @@ -17,6 +17,7 @@ class settingsDialog : public QDialog ~settingsDialog(); void processHTML(); + void activateTab ( int tabIndex ); private: Ui::settingsDialog *ui;