diff options
-rw-r--r-- | digikam/digikam/Makefile.am | 9 | ||||
-rw-r--r-- | digikam/libs/dialogs/imagedialog.cpp | 41 | ||||
-rw-r--r-- | digikam/libs/dialogs/imagedialog.h | 1 | ||||
-rw-r--r-- | digikam/libs/threadimageio/loadingcache.cpp | 8 | ||||
-rw-r--r-- | digikam/libs/threadimageio/loadingcache.h | 3 | ||||
-rw-r--r-- | digikam/showfoto/Makefile.am | 13 | ||||
-rw-r--r-- | digikam/showfoto/main.cpp | 3 | ||||
-rw-r--r-- | digikam/showfoto/showfoto.cpp | 20 | ||||
-rw-r--r-- | digikam/themedesigner/Makefile.am | 5 | ||||
-rw-r--r-- | digikam/themedesigner/main.cpp | 4 | ||||
-rw-r--r-- | digikam/utilities/cameragui/cameraui.cpp | 32 |
11 files changed, 41 insertions, 98 deletions
diff --git a/digikam/digikam/Makefile.am b/digikam/digikam/Makefile.am index 6705dcb5..cd8969fa 100644 --- a/digikam/digikam/Makefile.am +++ b/digikam/digikam/Makefile.am @@ -145,13 +145,8 @@ bin_PROGRAMS = digikam digikam_SOURCES = main.cpp -digikam_LDADD = $(LIB_TQT) \ - $(LIB_TDECORE) \ - $(LIB_TDEUI) \ - $(LIBSOCKET) \ - $(LIB_TDEFILE) \ - $(LIB_TDEPARTS) \ - $(LIB_TDEUTILS) \ +digikam_LDADD = $(LCMS_LIBS) \ + $(LIB_TQT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIBSOCKET) $(LIB_TDEFILE) $(LIB_TDEPARTS) $(LIB_TDEUTILS) \ libdigikam.la digikam_LDFLAGS = $(LIBKIPI_LIBS) $(LIBKDCRAW_LIBS) $(LIBKEXIV2_LIBS) $(KDE_RPATH) $(all_libraries) $(LIB_TDEUTILS) diff --git a/digikam/libs/dialogs/imagedialog.cpp b/digikam/libs/dialogs/imagedialog.cpp index 5304126f..35477994 100644 --- a/digikam/libs/dialogs/imagedialog.cpp +++ b/digikam/libs/dialogs/imagedialog.cpp @@ -255,8 +255,6 @@ public: bool singleSelect; - TQString fileformats; - KURL url; KURL::List urls; }; @@ -266,38 +264,12 @@ ImageDialog::ImageDialog(TQWidget* parent, const KURL &url, bool singleSelect, c d = new ImageDialogPrivate; d->singleSelect = singleSelect; - TQStringList patternList = TQStringList::split('\n', KImageIO::pattern(KImageIO::Reading)); - - // All Images from list must been always the first entry given by KDE API - TQString allPictures = patternList[0]; + TQStringList mimeTypes = KImageIO::mimeTypes(KImageIO::Reading); + mimeTypes.append("image/x-raw"); -#if KDCRAW_VERSION < 0x000106 - // Add other files format witch are missing to All Images" type mime provided by KDE and remplace current. - if (KDcrawIface::DcrawBinary::instance()->versionIsRight()) - { - allPictures.insert(allPictures.find("|"), TQString(KDcrawIface::DcrawBinary::instance()->rawFiles()) + TQString(" *.JPE *.TIF")); - patternList.remove(patternList[0]); - patternList.prepend(allPictures); - // Added RAW file formats supported by dcraw program like a type mime. - // Nota: we cannot use here "image/x-raw" type mime from KDE because it uncomplete - // or unavailable (see file #121242 in B.K.O). - patternList.append(i18n("\n%1|Camera RAW files").arg(TQString(KDcrawIface::DcrawBinary::instance()->rawFiles()))); - } -#else - allPictures.insert(allPictures.find("|"), TQString(KDcrawIface::KDcraw::rawFiles()) + TQString(" *.JPE *.TIF")); - patternList.remove(patternList[0]); - patternList.prepend(allPictures); - // Added RAW file formats supported by dcraw program like a type mime. - // Nota: we cannot use here "image/x-raw" type mime from KDE because it uncomplete - // or unavailable (see file #121242 in B.K.O). - patternList.append(i18n("\n%1|Camera RAW files").arg(TQString(KDcrawIface::KDcraw::rawFiles()))); -#endif + DDebug() << "mimeTypes=" << mimeTypes.join(" ") << endl; - d->fileformats = patternList.join("\n"); - - DDebug() << "fileformats=" << d->fileformats << endl; - - KFileDialog dlg(url.path(), d->fileformats, parent, "imageFileOpenDialog", false); + KFileDialog dlg(url.path(), mimeTypes.join(" "), parent, "imageFileOpenDialog", false); ImageDialogPreview *preview = new ImageDialogPreview(&dlg); dlg.setPreviewWidget(preview); dlg.setOperationMode(KFileDialog::Opening); @@ -330,11 +302,6 @@ bool ImageDialog::singleSelect() const return d->singleSelect; } -TQString ImageDialog::fileformats() const -{ - return d->fileformats; -} - KURL ImageDialog::url() const { return d->url; diff --git a/digikam/libs/dialogs/imagedialog.h b/digikam/libs/dialogs/imagedialog.h index 275765cd..0f666f01 100644 --- a/digikam/libs/dialogs/imagedialog.h +++ b/digikam/libs/dialogs/imagedialog.h @@ -85,7 +85,6 @@ public: KURL::List urls() const; bool singleSelect() const; - TQString fileformats() const; static KURL::List getImageURLs(TQWidget* parent, const KURL& url, const TQString& caption=TQString()); static KURL getImageURL(TQWidget* parent, const KURL& url, const TQString& caption=TQString()); diff --git a/digikam/libs/threadimageio/loadingcache.cpp b/digikam/libs/threadimageio/loadingcache.cpp index e2b39fee..48457f38 100644 --- a/digikam/libs/threadimageio/loadingcache.cpp +++ b/digikam/libs/threadimageio/loadingcache.cpp @@ -126,7 +126,8 @@ bool LoadingCache::putImage(const TQString &cacheKey, DImg *img, const TQString { // schedule update of file watch // KDirWatch can only be accessed from main thread! - TQApplication::postEvent(this, new TQCustomEvent(TQEvent::User)); + addToWatch(); + //TQApplication::postEvent(this, new TQCustomEvent(TQEvent::User)); } return successfulyInserted; } @@ -158,10 +159,11 @@ void LoadingCache::slotFileDirty(const TQString &path) } } -void LoadingCache::customEvent(TQCustomEvent *) +void LoadingCache::addToWatch( ) +//void LoadingCache::customEvent(TQCustomEvent *) { // Event comes from main thread, we need to lock ourselves. - CacheLock lock(this); + //CacheLock lock(this); // get a list of files in cache that need watch TQStringList toBeAdded; diff --git a/digikam/libs/threadimageio/loadingcache.h b/digikam/libs/threadimageio/loadingcache.h index d4689305..0853d6d5 100644 --- a/digikam/libs/threadimageio/loadingcache.h +++ b/digikam/libs/threadimageio/loadingcache.h @@ -113,7 +113,8 @@ public: protected: - virtual void customEvent (TQCustomEvent *event); + void addToWatch( ); + //virtual void customEvent (TQCustomEvent *event); private slots: diff --git a/digikam/showfoto/Makefile.am b/digikam/showfoto/Makefile.am index 9f9476a3..55144570 100644 --- a/digikam/showfoto/Makefile.am +++ b/digikam/showfoto/Makefile.am @@ -24,15 +24,10 @@ INCLUDES = -I$(top_srcdir)/digikam/showfoto/setup \ showfoto_SOURCES = main.cpp showfoto.cpp -showfoto_LDADD = $(top_builddir)/digikam/showfoto/setup/libsetup.la \ - $(top_builddir)/digikam/libs/imageproperties/libimagepropertiesshowfoto.la \ - $(top_builddir)/digikam/libs/thumbbar/libthumbbar.la \ - $(top_builddir)/digikam/utilities/imageeditor/editor/libshowfoto.la \ - $(top_builddir)/digikam/utilities/slideshow/libslideshow.la \ - $(top_builddir)/digikam/libs/threadimageio/libthreadimageio.la \ - $(top_builddir)/digikam/libs/themeengine/libthemeengine.la \ - $(top_builddir)/digikam/libs/jpegutils/libjpegutils.la \ - $(LIB_TDEUTILS) $(LIB_TDEPARTS) $(LIBJPEG) +showfoto_LDADD = $(LCMS_LIBS) \ + $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIBSOCKET) $(LIB_TDEFILE) $(LIB_TDEPARTS) $(LIB_TDEUTILS) \ + $(top_builddir)/digikam/digikam/libdigikam.la \ + $(top_builddir)/digikam/showfoto/setup/libsetup.la showfoto_LDFLAGS = $(LIBKEXIV2_LIBS) $(LIBKDCRAW_LIBS) $(KDE_RPATH) $(all_libraries) diff --git a/digikam/showfoto/main.cpp b/digikam/showfoto/main.cpp index 0be2a542..b73ef066 100644 --- a/digikam/showfoto/main.cpp +++ b/digikam/showfoto/main.cpp @@ -67,6 +67,8 @@ int main(int argc, char *argv[]) Digikam::authorsRegistration(aboutData); + TDELocale::setMainCatalogue("digikam"); + TDECmdLineArgs::init( argc, argv, &aboutData ); TDECmdLineArgs::addCmdLineOptions( options ); @@ -85,7 +87,6 @@ int main(int argc, char *argv[]) app.setMainWidget(w); w->show(); - TDEGlobal::locale()->setMainCatalogue("digikam"); TDEGlobal::locale()->insertCatalogue("libkdcraw"); int ret = app.exec(); diff --git a/digikam/showfoto/showfoto.cpp b/digikam/showfoto/showfoto.cpp index 4f1caf20..0b032e50 100644 --- a/digikam/showfoto/showfoto.cpp +++ b/digikam/showfoto/showfoto.cpp @@ -269,7 +269,7 @@ ShowFoto::ShowFoto(const KURL::List& urlList) if (url.isLocalFile()) { TQFileInfo fi(url.path()); - if (fi.isDir()) + if (fi.isDir() || urlList.size() == 1) { // Local Dir openFolder(url); @@ -820,11 +820,15 @@ void ShowFoto::slotOpenFolder(const KURL& url) toggleNavigation(1); } -void ShowFoto::openFolder(const KURL& url) +void ShowFoto::openFolder(const KURL& iurl) { - if (!url.isValid() || !url.isLocalFile()) + if (!iurl.isValid() || !iurl.isLocalFile()) return; + KURL url = iurl; + bool isFile = !TQFileInfo(iurl.path()).isDir(); + if(isFile) url = TQFileInfo(iurl.path()).dirPath(true); + // Parse KDE image IO mime types registration to get files filter pattern. TQStringList mimeTypes = KImageIO::mimeTypes(KImageIO::Reading); @@ -909,10 +913,12 @@ void ShowFoto::openFolder(const KURL& url) TQFileInfo* fi; // And open all items in image editor. - - while( (fi = it.current() ) ) - { - new Digikam::ThumbBarItem( d->thumbBar, KURL(fi->filePath()) ); + while( (fi = it.current() ) ) { + Digikam::ThumbBarItem *tit = new Digikam::ThumbBarItem( d->thumbBar, KURL(fi->filePath()) ); + if(isFile && fi->filePath() == iurl.path()) { + d->thumbBar->setSelected(tit); + d->currentItem = d->thumbBar->currentItem(); + } ++it; } } diff --git a/digikam/themedesigner/Makefile.am b/digikam/themedesigner/Makefile.am index 3375c23d..cacb64cb 100644 --- a/digikam/themedesigner/Makefile.am +++ b/digikam/themedesigner/Makefile.am @@ -13,7 +13,8 @@ bin_PROGRAMS = digikamthemedesigner digikamthemedesigner_SOURCES = main.cpp mainwindow.cpp themedicongroupitem.cpp \ themediconitem.cpp themediconview.cpp -digikamthemedesigner_LDADD = $(LIB_TQT) $(LIB_TDECORE) $(LIB_TDEUI) \ - $(top_builddir)/digikam/digikam/libdigikam.la +digikamthemedesigner_LDADD = $(LCMS_LIBS) \ + $(LIB_TQT) $(LIB_TDECORE) $(LIB_TDEUI) \ + $(top_builddir)/digikam/digikam/libdigikam.la digikamthemedesigner_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor $(LIB_TDEUTILS) diff --git a/digikam/themedesigner/main.cpp b/digikam/themedesigner/main.cpp index 27bc7459..cd6f8a6a 100644 --- a/digikam/themedesigner/main.cpp +++ b/digikam/themedesigner/main.cpp @@ -60,11 +60,11 @@ int main(int argc, char** argv) Digikam::authorsRegistration(aboutData); + TDELocale::setMainCatalogue("digikam"); + TDECmdLineArgs::init(argc, argv, &aboutData); TDECmdLineArgs::addCmdLineOptions(options); - TDEGlobal::locale()->setMainCatalogue( "digikam" ); - TDEApplication app; Digikam::MainWindow *im = new Digikam::MainWindow(); app.setMainWidget(im); diff --git a/digikam/utilities/cameragui/cameraui.cpp b/digikam/utilities/cameragui/cameraui.cpp index cdabd06c..5481ccc2 100644 --- a/digikam/utilities/cameragui/cameraui.cpp +++ b/digikam/utilities/cameragui/cameraui.cpp @@ -995,37 +995,13 @@ void CameraUI::slotUpload() if (d->busy) return; - TQString fileformats; + TQStringList mimeTypes = KImageIO::mimeTypes(KImageIO::Reading); + mimeTypes.append("image/x-raw"); - TQStringList patternList = TQStringList::split('\n', KImageIO::pattern(KImageIO::Reading)); - - // All Images from list must been always the first entry given by KDE API - TQString allPictures = patternList[0]; - - // Add RAW file format to All Images" type mime and remplace current. -#if KDCRAW_VERSION < 0x000106 - allPictures.insert(allPictures.find("|"), TQString(KDcrawIface::DcrawBinary::instance()->rawFiles())); -#else - allPictures.insert(allPictures.find("|"), TQString(KDcrawIface::KDcraw::rawFiles())); -#endif - patternList.remove(patternList[0]); - patternList.prepend(allPictures); - - // Added RAW file formats supported by dcraw program like a type mime. - // Nota: we cannot use here "image/x-raw" type mime from KDE because it uncomplete - // or unavailable(dcraw_0)(see file #121242 in B.K.O). -#if KDCRAW_VERSION < 0x000106 - patternList.append(TQString("\n%1|Camera RAW files").arg(TQString(KDcrawIface::DcrawBinary::instance()->rawFiles()))); -#else - patternList.append(TQString("\n%1|Camera RAW files").arg(TQString(KDcrawIface::KDcraw::rawFiles()))); -#endif - - fileformats = patternList.join("\n"); - - DDebug () << "fileformats=" << fileformats << endl; + DDebug() << "mimeTypes=" << mimeTypes.join(" ") << endl; KURL::List urls = KFileDialog::getOpenURLs(AlbumManager::instance()->getLibraryPath(), - fileformats, this, i18n("Select Image to Upload")); + mimeTypes.join(" "), this, i18n("Select Image to Upload")); if (!urls.isEmpty()) slotUploadItems(urls); } |