diff --git a/src/widget/form/profileform.cpp b/src/widget/form/profileform.cpp index 37fa1dbbf..7238cbea5 100644 --- a/src/widget/form/profileform.cpp +++ b/src/widget/form/profileform.cpp @@ -120,6 +120,12 @@ ProfileForm::ProfileForm(QWidget *parent) : Translator::registerHandler(std::bind(&ProfileForm::retranslateUi, this), this); } +void ProfileForm::prFileLabelUpdate() +{ + Nexus& nexus = Nexus::getInstance(); + bodyUI->prFileLabel->setText(tr("Current profile:") + nexus.getProfile()->getName() + ".tox"); +} + ProfileForm::~ProfileForm() { Translator::unregister(this); @@ -134,6 +140,11 @@ void ProfileForm::show(Ui::MainWindow &ui) ui.mainContent->layout()->addWidget(this); head->show(); QWidget::show(); + prFileLabelUpdate(); + QString DirPath = QDir(Settings::getInstance().getSettingsDirPath()).path().trimmed(); + bodyUI->dirPrLink->setText(bodyUI->dirPrLink->text().replace("Dir_Path",DirPath)); + bodyUI->dirPrLink->setOpenExternalLinks(true); + bodyUI->dirPrLink->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::TextSelectableByMouse); bodyUI->userName->setFocus(); bodyUI->userName->selectAll(); } @@ -260,7 +271,10 @@ void ProfileForm::onRenameClicked() GUI::showError(tr("Failed to rename", "rename failed title"), tr("Couldn't rename the profile to \"%1\"").arg(cur)); else + { + prFileLabelUpdate(); break; + } } while (true); } diff --git a/src/widget/form/profileform.h b/src/widget/form/profileform.h index f1d442fc6..db3c87068 100644 --- a/src/widget/form/profileform.h +++ b/src/widget/form/profileform.h @@ -80,6 +80,7 @@ private slots: private: void retranslateUi(); + void prFileLabelUpdate(); private: void refreshProfiles(); diff --git a/src/widget/form/profileform.ui b/src/widget/form/profileform.ui index c89c17eff..d03858523 100644 --- a/src/widget/form/profileform.ui +++ b/src/widget/form/profileform.ui @@ -155,6 +155,38 @@ Share it with your friends to communicate. Profile + + + + + + + + + + + PointingHandCursor + + + Qt::ClickFocus + + + <p><a href="file:///Dir_Path\"><span style=" text-decoration: NONE; color:#000000;">Current profile location: Dir_Path</span></a></p> + + + Qt::RichText + + + false + + + false + + + Qt::TextSelectableByMouse + + +