|
|
@ -70,7 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#include "configdialog.moc"
|
|
|
|
#include "configdialog.moc"
|
|
|
|
namespace Gwenview {
|
|
|
|
namespace Gwenview {
|
|
|
|
|
|
|
|
|
|
|
|
typedef TQValueList<KConfigDialogManager*> ConfigManagerList;
|
|
|
|
typedef TQValueList<TDEConfigDialogManager*> ConfigManagerList;
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigDialogPrivate {
|
|
|
|
class ConfigDialogPrivate {
|
|
|
|
public:
|
|
|
|
public:
|
|
|
@ -122,23 +122,23 @@ ConfigDialog::ConfigDialog(TQWidget* parent, KIPI::PluginLoader* pluginLoader)
|
|
|
|
// Create dialog pages
|
|
|
|
// Create dialog pages
|
|
|
|
d->mImageListPage = addConfigPage<ConfigImageListPage>(
|
|
|
|
d->mImageListPage = addConfigPage<ConfigImageListPage>(
|
|
|
|
this, i18n("Configure Image List"), i18n("Image List"), "view_icon");
|
|
|
|
this, i18n("Configure Image List"), i18n("Image List"), "view_icon");
|
|
|
|
d->mManagers << new KConfigDialogManager(d->mImageListPage, FileViewConfig::self());
|
|
|
|
d->mManagers << new TDEConfigDialogManager(d->mImageListPage, FileViewConfig::self());
|
|
|
|
|
|
|
|
|
|
|
|
d->mImageViewPage = addConfigPage<ConfigImageViewPage>(
|
|
|
|
d->mImageViewPage = addConfigPage<ConfigImageViewPage>(
|
|
|
|
this, i18n("Configure Image View"), i18n("Image View"), "looknfeel");
|
|
|
|
this, i18n("Configure Image View"), i18n("Image View"), "looknfeel");
|
|
|
|
d->mManagers << new KConfigDialogManager(d->mImageViewPage, ImageViewConfig::self());
|
|
|
|
d->mManagers << new TDEConfigDialogManager(d->mImageViewPage, ImageViewConfig::self());
|
|
|
|
|
|
|
|
|
|
|
|
d->mFullScreenPage = addConfigPage<ConfigFullScreenPage>(
|
|
|
|
d->mFullScreenPage = addConfigPage<ConfigFullScreenPage>(
|
|
|
|
this, i18n("Configure Full Screen Mode"), i18n("Full Screen"), "window_fullscreen");
|
|
|
|
this, i18n("Configure Full Screen Mode"), i18n("Full Screen"), "window_fullscreen");
|
|
|
|
d->mManagers << new KConfigDialogManager(d->mFullScreenPage, FullScreenConfig::self());
|
|
|
|
d->mManagers << new TDEConfigDialogManager(d->mFullScreenPage, FullScreenConfig::self());
|
|
|
|
|
|
|
|
|
|
|
|
d->mFileOperationsPage = addConfigPage<ConfigFileOperationsPage>(
|
|
|
|
d->mFileOperationsPage = addConfigPage<ConfigFileOperationsPage>(
|
|
|
|
this, i18n("Configure File Operations"), i18n("File Operations"), "folder");
|
|
|
|
this, i18n("Configure File Operations"), i18n("File Operations"), "folder");
|
|
|
|
d->mManagers << new KConfigDialogManager(d->mFileOperationsPage, FileOperationConfig::self());
|
|
|
|
d->mManagers << new TDEConfigDialogManager(d->mFileOperationsPage, FileOperationConfig::self());
|
|
|
|
|
|
|
|
|
|
|
|
d->mSlideShowPage = addConfigPage<ConfigSlideshowPage>(
|
|
|
|
d->mSlideShowPage = addConfigPage<ConfigSlideshowPage>(
|
|
|
|
this, i18n("SlideShow"), i18n("SlideShow"), "slideshow_play");
|
|
|
|
this, i18n("SlideShow"), i18n("SlideShow"), "slideshow_play");
|
|
|
|
d->mManagers << new KConfigDialogManager(d->mSlideShowPage, SlideShowConfig::self());
|
|
|
|
d->mManagers << new TDEConfigDialogManager(d->mSlideShowPage, SlideShowConfig::self());
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef GV_HAVE_KIPI
|
|
|
|
#ifdef GV_HAVE_KIPI
|
|
|
|
Q_ASSERT(pluginLoader);
|
|
|
|
Q_ASSERT(pluginLoader);
|
|
|
@ -152,7 +152,7 @@ ConfigDialog::ConfigDialog(TQWidget* parent, KIPI::PluginLoader* pluginLoader)
|
|
|
|
|
|
|
|
|
|
|
|
d->mMiscPage = addConfigPage<ConfigMiscPage>(
|
|
|
|
d->mMiscPage = addConfigPage<ConfigMiscPage>(
|
|
|
|
this, i18n("Miscellaneous Settings"), i18n("Misc"), "gear");
|
|
|
|
this, i18n("Miscellaneous Settings"), i18n("Misc"), "gear");
|
|
|
|
d->mManagers << new KConfigDialogManager(d->mMiscPage, MiscConfig::self());
|
|
|
|
d->mManagers << new TDEConfigDialogManager(d->mMiscPage, MiscConfig::self());
|
|
|
|
// Read config, because the modified behavior might have changed
|
|
|
|
// Read config, because the modified behavior might have changed
|
|
|
|
MiscConfig::self()->readConfig();
|
|
|
|
MiscConfig::self()->readConfig();
|
|
|
|
|
|
|
|
|
|
|
@ -247,7 +247,7 @@ void ConfigDialog::calculateCacheSize() {
|
|
|
|
KURL url;
|
|
|
|
KURL url;
|
|
|
|
url.setPath(ThumbnailLoadJob::thumbnailBaseDir());
|
|
|
|
url.setPath(ThumbnailLoadJob::thumbnailBaseDir());
|
|
|
|
unsigned long size=KDirSize::dirSize(url);
|
|
|
|
unsigned long size=KDirSize::dirSize(url);
|
|
|
|
KMessageBox::information( this,i18n("Cache size is %1").arg(KIO::convertSize(size)) );
|
|
|
|
KMessageBox::information( this,i18n("Cache size is %1").arg(TDEIO::convertSize(size)) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -289,13 +289,13 @@ void ConfigDialog::emptyCache() {
|
|
|
|
|
|
|
|
|
|
|
|
KURL url;
|
|
|
|
KURL url;
|
|
|
|
url.setPath(dir);
|
|
|
|
url.setPath(dir);
|
|
|
|
if (KIO::NetAccess::del(url, topLevelWidget()) ) {
|
|
|
|
if (TDEIO::NetAccess::del(url, topLevelWidget()) ) {
|
|
|
|
KMessageBox::information( this,i18n("Cache emptied.") );
|
|
|
|
KMessageBox::information( this,i18n("Cache emptied.") );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ConfigDialog::onCacheEmptied(KIO::Job* job) {
|
|
|
|
void ConfigDialog::onCacheEmptied(TDEIO::Job* job) {
|
|
|
|
if ( job->error() ) {
|
|
|
|
if ( job->error() ) {
|
|
|
|
job->showErrorDialog(this);
|
|
|
|
job->showErrorDialog(this);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|