Skip to content

Commit

Permalink
Make domain info labels optional
Browse files Browse the repository at this point in the history
  • Loading branch information
onurkepenek committed Dec 8, 2020
1 parent 30509f9 commit ac41562
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/loginform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,8 @@ void LoginForm::animationTimerFinished(){
}else{
ui->pushButton_right->show();
ui->userInput->hide();
ui->domainnameLabel->setText(getUserRealm(toolButtons[(lastuserindex + 1) % 3]->text()));
if(Settings().show_domaininfo())
ui->domainnameLabel->setText(getUserRealm(toolButtons[(lastuserindex + 1) % 3]->text()));
emit sendCurrentUser(toolButtons[(lastuserindex + 1) % 3]->text());
ui->passwordInput->setFocus();
}
Expand Down Expand Up @@ -2079,8 +2080,8 @@ void LoginForm::usersbuttonReposition(){
ui->toolButtonright->setIcon(iconPassive);
ui->toolButtoncenter->setIcon(iconActive);


ui->domainnameLabel->setText(getUserRealm(userList[0]));
if(Settings().show_domaininfo())
ui->domainnameLabel->setText(getUserRealm(userList[0]));
emit sendCurrentUser(userList[0]);

ui->toolButtonleft->hide();
Expand Down
5 changes: 3 additions & 2 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ MainWindow::MainWindow(int screen, QWidget *parent) :
m_SettingsForm->move(offsetX, offsetY);
m_SettingsForm->show();

m_SettingsForm->updateHostName(m_LoginForm->getHostname());
if(Settings().show_domaininfo())
m_SettingsForm->updateHostName(m_LoginForm->getHostname());

m_PowerForm = new PowerForm(this);

Expand Down Expand Up @@ -144,7 +145,7 @@ MainWindow::MainWindow(int screen, QWidget *parent) :
m_ClockForm->show();


setMainBackground(true);
setMainBackground(true);

// This hack ensures that the primary screen will have focus
// if there are more screens (move the mouse cursor in the center
Expand Down
1 change: 1 addition & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Settings : public QSettings
QString passwordresetwebpageurl(){return value("password-web-reset-webpage").toString();}
int screenSaver_timeout() { return value("screen-saver-timeout").toInt(); }
int slideShow_timeout() { return value("slide-show-timeout").toInt(); }
int show_domaininfo() { return value("show-domain-info").toInt(); }
};


Expand Down

0 comments on commit ac41562

Please sign in to comment.