Commit 4f3054a0 authored by Scott Petrovic's avatar Scott Petrovic

update resource manager lists after a bundle has been imported

parent 618245b9
......@@ -66,9 +66,28 @@ DlgBundleManager::DlgBundleManager(KisActionManager* actionMgr, QWidget *parent)
m_ui->listBundleContents->setHeaderLabel(i18n("Resource"));
m_ui->listBundleContents->setSelectionMode(QAbstractItemView::NoSelection);
KoResourceServer<ResourceBundle> *bundleServer = ResourceBundleServerProvider::instance()->resourceBundleServer();
m_actionManager = actionMgr;
refreshListData();
connect(m_ui->bnEditBundle, SIGNAL(clicked()), SLOT(editBundle()));
connect(m_ui->importBundleButton, SIGNAL(clicked()), SLOT(slotImportResource()));
connect(m_ui->createBundleButton, SIGNAL(clicked()), SLOT(slotCreateBundle()));
connect(m_ui->deleteBackupFilesButton, SIGNAL(clicked()), SLOT(slotDeleteBackupFiles()));
connect(m_ui->openResourceFolderButton, SIGNAL(clicked()), SLOT(slotOpenResourceFolder()));
}
void DlgBundleManager::refreshListData()
{
KoResourceServer<ResourceBundle> *bundleServer = ResourceBundleServerProvider::instance()->resourceBundleServer();
m_ui->listInactive->clear();
m_ui->listActive->clear();
foreach(const QString &f, bundleServer->blackListedFiles()) {
ResourceBundle *bundle = new ResourceBundle(f);
bundle->load();
......@@ -85,14 +104,6 @@ DlgBundleManager::DlgBundleManager(KisActionManager* actionMgr, QWidget *parent)
}
}
fillListWidget(m_activeBundles.values(), m_ui->listActive);
connect(m_ui->bnEditBundle, SIGNAL(clicked()), SLOT(editBundle()));
connect(m_ui->importBundleButton, SIGNAL(clicked()), SLOT(slotImportResource()));
connect(m_ui->createBundleButton, SIGNAL(clicked()), SLOT(slotCreateBundle()));
connect(m_ui->deleteBackupFilesButton, SIGNAL(clicked()), SLOT(slotDeleteBackupFiles()));
connect(m_ui->openResourceFolderButton, SIGNAL(clicked()), SLOT(slotOpenResourceFolder()));
}
void DlgBundleManager::accept()
......@@ -312,6 +323,7 @@ void DlgBundleManager::slotImportResource() {
{
KisAction *action = m_actionManager->actionByName("import_resources");
action->trigger();
refreshListData();
}
}
......
......@@ -58,6 +58,7 @@ private:
Ui::WdgDlgBundleManager *m_ui;
void fillListWidget(QList<ResourceBundle*> bundles, QListWidget *w);
void refreshListData();
QMap<QString, ResourceBundle*> m_blacklistedBundles;
QMap<QString, ResourceBundle*> m_activeBundles;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment