Use KNS3 download dialog in Aurorae config.
This change magically fixes the problem that you had to close the systemsettings window to use the GHNS dialog. svn path=/trunk/KDE/kdebase/workspace/; revision=1063029
This commit is contained in:
parent
85d965a78e
commit
6aacd897e2
2 changed files with 9 additions and 7 deletions
|
@ -20,6 +20,6 @@ kde4_add_ui_files(kwin_aurorae_config_PART_SRCS config/config.ui)
|
|||
|
||||
kde4_add_plugin(kwin_aurorae_config ${kwin_aurorae_config_PART_SRCS})
|
||||
|
||||
target_link_libraries(kwin_aurorae_config ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTGUI_LIBRARY} ${KDE4_KNEWSTUFF2_LIBS})
|
||||
target_link_libraries(kwin_aurorae_config ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${KDE4_PLASMA_LIBS} ${QT_QTGUI_LIBRARY} ${KDE4_KNEWSTUFF3_LIBS})
|
||||
|
||||
install(TARGETS kwin_aurorae_config DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
|
|
|
@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <KTar>
|
||||
#include <KUrlRequesterDialog>
|
||||
#include <KDE/Plasma/FrameSvg>
|
||||
#include <KDE/KNS/Engine>
|
||||
#include <KDE/KNS3/DownloadDialog>
|
||||
|
||||
#include <QFile>
|
||||
#include <QPainter>
|
||||
|
@ -619,17 +619,19 @@ void AuroraeConfig::slotInstallNewTheme()
|
|||
|
||||
void AuroraeConfig::slotGHNSClicked()
|
||||
{
|
||||
KNS::Engine engine(NULL);
|
||||
if (engine.init("aurorae.knsrc")) {
|
||||
KNS::Entry::List entries = engine.downloadDialogModal(m_ui);
|
||||
|
||||
if (entries.size() > 0) {
|
||||
QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog("aurorae.knsrc");
|
||||
// explicit set the icon or there will be a question mark
|
||||
// has to be kept in sync with kwindecoration.desktop
|
||||
dialog->setWindowIcon(KIcon("preferences-system-windows-action"));
|
||||
if (dialog->exec() == KDialog::Accepted) {
|
||||
if (dialog->changedEntries().size() > 0) {
|
||||
int index = m_ui->theme->currentIndex();
|
||||
const QString themeName = m_ui->theme->itemData(index, ThemeModel::PackageNameRole).toString();
|
||||
m_themeModel->reload();
|
||||
m_ui->theme->setCurrentIndex(m_themeModel->indexOf(themeName));
|
||||
}
|
||||
}
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in a new issue