Summary: | Allow to remove a local theme | ||
---|---|---|---|
Product: | [Unmaintained] superkaramba | Reporter: | M. Ignacio Monge Garc <ignaciomonge> |
Component: | general | Assignee: | Ryan Nickell <p0z3r> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
M. Ignacio Monge Garc
2005-09-04 02:15:29 UTC
A good idea on how to handle this was presented here: http://sourceforge.net/tracker/index.php?func=detail&aid=1318668&group_id=21351&atid=371889 It may be possible, but we'll have to see if this isn't too feature ridden to add before 3.5.1. SVN commit 490638 by nickell: BUG:112011 Local themes can now be removed from the theme dialog, although we don't delete the theme out from underneath the user. It is delisted so that they can change their mind later and run it again. M +0 -2 themefile.cpp M +26 -16 themesdlg.cpp --- branches/KDE/3.5/kdeutils/superkaramba/src/themefile.cpp #490637:490638 @@ -327,8 +327,6 @@ bool ThemeFile::canUninstall() const { - if(!isZipTheme()) - return false; QFileInfo fi(file()); if(fi.permission(QFileInfo::WriteUser) || fi.permission(QFileInfo::WriteGroup) || --- branches/KDE/3.5/kdeutils/superkaramba/src/themesdlg.cpp #490637:490638 @@ -358,25 +358,35 @@ KURL trash("trash:/"); KURL theme(tf->file()); - karambaApp->dcopIface()->closeTheme(tf->name()); - if(!KProtocolInfo::isKnownProtocol(trash)) - trash = KGlobalSettings::trashPath(); - KIO::move(theme, trash); - tableThemes->removeItem(w); + if(!tf->isZipTheme()) + { + kdDebug() << "removing " << tf->name() << " from the theme dialog" << endl; + karambaApp->dcopIface()->closeTheme(tf->name()); + tableThemes->removeItem(w); + } + else + { + karambaApp->dcopIface()->closeTheme(tf->name()); + if(!KProtocolInfo::isKnownProtocol(trash)) + trash = KGlobalSettings::trashPath(); + kdDebug() << "moving " << theme.fileName() << " to the trash" << endl; + KIO::move(theme, trash); + tableThemes->removeItem(w); #ifdef HAVE_KNEWSTUFF - // Remove theme from KNewStuffStatus - KConfig* config = KGlobal::config(); + // Remove theme from KNewStuffStatus + KConfig* config = KGlobal::config(); - config->setGroup("KNewStuffNames"); - QString name = config->readEntry(theme.path()); - kdDebug() << theme.path() << name << endl; - if(!name.isEmpty()) - { - kapp->config()->deleteEntry(theme.path()); - config->setGroup("KNewStuffStatus"); - kapp->config()->deleteEntry(name); + config->setGroup("KNewStuffNames"); + QString name = config->readEntry(theme.path()); + kdDebug() << theme.path() << name << endl; + if(!name.isEmpty()) + { + kapp->config()->deleteEntry(theme.path()); + config->setGroup("KNewStuffStatus"); + kapp->config()->deleteEntry(name); + } +#endif } -#endif selectionChanged(tableThemes->selected()); } |