mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Allow to reload other swift versions UI
This commit is contained in:
@@ -117,7 +117,7 @@ namespace BlackGui
|
||||
if (sets > 0 || caches > 0)
|
||||
{
|
||||
const CStatusMessage m = CStatusMessage(this).validationInfo("Copied %1 sets and %2 caches for '%3'") << sets << caches << selectedSimulators.toQString(true);
|
||||
this->showOverlayMessage(m);
|
||||
this->showOverlayHTMLMessage(m, 7500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,11 +26,17 @@ namespace BlackGui
|
||||
ui(new Ui::COtherSwiftVersionsComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->tvp_ApplicationInfo->menuRemoveItems(CApplicationInfoView::MenuClear);
|
||||
ui->tvp_ApplicationInfo->menuAddItems(CApplicationInfoView::MenuRefresh);
|
||||
|
||||
ui->tvp_ApplicationInfo->otherSwiftVersionsFromDataDirectories();
|
||||
ui->le_ThisVersion->setText(sGui->getApplicationInfo().asOtherSwiftVersionString());
|
||||
ui->le_ThisVersion->home(false);
|
||||
|
||||
connect(ui->tb_DataDir, &QToolButton::clicked, this, &COtherSwiftVersionsComponent::openDataDirectory);
|
||||
connect(ui->tvp_ApplicationInfo, &CApplicationInfoView::objectSelected, this, &COtherSwiftVersionsComponent::onObjectSelected);
|
||||
connect(ui->tvp_ApplicationInfo, &CApplicationInfoView::requestUpdate, this, &COtherSwiftVersionsComponent::reloadVersions);
|
||||
}
|
||||
|
||||
COtherSwiftVersionsComponent::~COtherSwiftVersionsComponent()
|
||||
@@ -47,6 +53,11 @@ namespace BlackGui
|
||||
return ui->tvp_ApplicationInfo->selectedObject();
|
||||
}
|
||||
|
||||
void COtherSwiftVersionsComponent::reloadVersions()
|
||||
{
|
||||
ui->tvp_ApplicationInfo->otherSwiftVersionsFromDataDirectories();
|
||||
}
|
||||
|
||||
void COtherSwiftVersionsComponent::openDataDirectory()
|
||||
{
|
||||
const QString dir = CDirectoryUtils::applicationDataDirectory();
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace BlackGui
|
||||
private:
|
||||
QScopedPointer<Ui::COtherSwiftVersionsComponent> ui;
|
||||
|
||||
//! Reload versions
|
||||
void reloadVersions();
|
||||
|
||||
//! Data directory
|
||||
void openDataDirectory();
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace BlackGui
|
||||
{
|
||||
const CApplicationInfoList others = CApplicationInfoList::fromOtherSwiftVersionsFromDataDirectories();
|
||||
this->updateContainer(others);
|
||||
m_acceptRowSelection = others.size() > 0;
|
||||
m_acceptRowSelection = (others.size() > 0);
|
||||
return others.size();
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user