/** Constructor */ GeneralPage::GeneralPage(QWidget * parent, Qt::WFlags flags) : ConfigPage(parent, flags) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); /* Connect signals */ connect(ui.runStartWizard_PB,SIGNAL(clicked()), this,SLOT(runStartWizard())) ; /* Hide platform specific features */ #ifdef Q_WS_WIN #ifdef QT_DEBUG ui.chkRunRetroshareAtSystemStartup->setEnabled(false); ui.chkRunRetroshareAtSystemStartupMinimized->setEnabled(false); #endif if (Settings->canSetRetroShareProtocol() == false) { ui.enableRetroShareProtocol->setEnabled(false); } else { ui.adminLabel->setEnabled(false); ui.adminLabel->setToolTip(""); } #else ui.chkRunRetroshareAtSystemStartup->setVisible(false); ui.chkRunRetroshareAtSystemStartupMinimized->setVisible(false); ui.enableRetroShareProtocol->setVisible(false); ui.adminLabel->setVisible(false); #endif }
/** Constructor */ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) : ConfigPage(parent, flags) { /* Invoke the Qt Designer generated object setup routine */ ui.setupUi(this); /* Connect signals */ connect(ui.runStartWizard_PB,SIGNAL(clicked()), this,SLOT(runStartWizard())) ; /* Hide platform specific features */ #ifdef Q_OS_WIN #ifdef QT_DEBUG ui.chkRunRetroshareAtSystemStartup->setEnabled(false); ui.chkRunRetroshareAtSystemStartupMinimized->setEnabled(false); #endif ui.desktopFileMissingLabel->setVisible(false); #else ui.chkRunRetroshareAtSystemStartup->setVisible(false); ui.chkRunRetroshareAtSystemStartupMinimized->setVisible(false); ui.registerRetroShareProtocol->setVisible(false); ui.adminLabel->setVisible(false); #endif if (Settings->canSetRetroShareProtocol()) { ui.registerRetroShareProtocol->setEnabled(true); #ifdef Q_OS_WIN ui.adminLabel->setEnabled(true); ui.adminLabel->setToolTip(tr("You have enough right.")); #else ui.desktopFileMissingLabel->setVisible(false); #endif } else { ui.registerRetroShareProtocol->setEnabled(false); #ifdef Q_OS_WIN ui.adminLabel->setEnabled(false); ui.adminLabel->setToolTip(tr("You don't have enough right. Run RetroShare as Admin to change this setting.")); #else ui.desktopFileMissingLabel->setVisible(true); #endif } ui.useLocalServer->setEnabled(true); #ifdef RS_AUTOLOGIN ui.autoLogin->setToolTip(tr("For security reasons the usage of auto-login is discouraged, you can enable it but you are on your own!")); #else // RS_AUTOLOGIN ui.autoLogin->setEnabled(false); ui.autoLogin->setToolTip(tr("Your RetroShare build has auto-login disabled.")); #endif // RS_AUTOLOGIN }