Hello community, here is the log from the commit of package lximage-qt for openSUSE:Factory checked in at 2017-03-13 15:32:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lximage-qt (Old) and /work/SRC/openSUSE:Factory/.lximage-qt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lximage-qt" Mon Mar 13 15:32:41 2017 rev:3 rq:460521 version:0.5.1 Changes: -------- --- /work/SRC/openSUSE:Factory/lximage-qt/lximage-qt.changes 2016-10-06 12:43:45.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.lximage-qt.new/lximage-qt.changes 2017-03-13 15:33:38.120988719 +0100 @@ -1,0 +2,15 @@ +Fri Feb 24 18:29:45 UTC 2017 - [email protected] + +- Update to 0.5.1: + * Bump patch version and (#82) + * Create lximage-qt-screenshot_it.desktop (#83) + * Add *da.desktop files + * Desktop entry files: Fix typo in French translation + * [MRG] Display first image when loading a directory (v2) (#75) + * Desktop entry files: Add French translation + * Use lxqt-build-tools + * Use the new lxqt-build-tools package + * Fixed A Cast (#71) + * Remove cpack (#70) + +------------------------------------------------------------------- Old: ---- lximage-qt-0.5.0.tar.xz lximage-qt-0.5.0.tar.xz.asc New: ---- lximage-qt-0.5.1.tar.xz lximage-qt-0.5.1.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lximage-qt.spec ++++++ --- /var/tmp/diff_new_pack.ZJ8bZZ/_old 2017-03-13 15:33:38.724903372 +0100 +++ /var/tmp/diff_new_pack.ZJ8bZZ/_new 2017-03-13 15:33:38.728902806 +0100 @@ -17,7 +17,7 @@ Name: lximage-qt -Version: 0.5.0 +Version: 0.5.1 Release: 0 Summary: LXQt Image Viewer License: GPL-2.0+ @@ -29,6 +29,7 @@ BuildRequires: cmake >= 3.0.2 BuildRequires: fdupes BuildRequires: gcc-c++ +Buildrequires: lxqt-build-tools-devel BuildRequires: pkgconfig BuildRequires: update-desktop-files BuildRequires: cmake(KF5WindowSystem) ++++++ lximage-qt-0.5.0.tar.xz -> lximage-qt-0.5.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/.gitignore new/lximage-qt-0.5.1/.gitignore --- old/lximage-qt-0.5.0/.gitignore 2016-09-24 00:50:09.000000000 +0200 +++ new/lximage-qt-0.5.1/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -build -*.kdev4 -src/translations/lximage-qt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/CHANGELOG new/lximage-qt-0.5.1/CHANGELOG --- old/lximage-qt-0.5.0/CHANGELOG 2016-09-24 00:50:09.000000000 +0200 +++ new/lximage-qt-0.5.1/CHANGELOG 2016-12-21 18:49:37.000000000 +0100 @@ -1,7 +1,22 @@ -lximage-qt-0.5.0 / 2016-09-24 +lximage-qt-0.5.1 / 2016-12-21 ============================= + * Bump patch version and (#82) + * Create lximage-qt-screenshot_it.desktop (#83) + * Add *da.desktop files + * Desktop entry files: Fix typo in French translation + * [MRG] Display first image when loading a directory (v2) (#75) + * Desktop entry files: Add French translation + * Use lxqt-build-tools + * Use the new lxqt-build-tools package + * Fixed A Cast (#71) + * Remove cpack (#70) + +0.5.0 / 2016-09-24 +================== + + * Release 0.5.0: Add changelog * Bump version to 0.5.0 (#67) * Remove Core and Qt from Categories in desktop file (#64) * Extend README.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/CMakeLists.txt new/lximage-qt-0.5.1/CMakeLists.txt --- old/lximage-qt-0.5.0/CMakeLists.txt 2016-09-24 00:50:09.000000000 +0200 +++ new/lximage-qt-0.5.1/CMakeLists.txt 2016-12-21 18:49:37.000000000 +0100 @@ -1,17 +1,18 @@ cmake_minimum_required(VERSION 3.0.2) - project(lximage-qt) include(GNUInstallDirs) set(MAJOR_VERSION 0) set(MINOR_VERSION 5) -set(PATCH_VERSION 0) +set(PATCH_VERSION 1) set(LXIMAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}) +set(LXQTBT_MINIMUM_VERSION "0.3.0") + +set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) -set(CMAKE_AUTOMOC ON) find_package(Qt5Widgets REQUIRED) find_package(Qt5DBus REQUIRED) @@ -20,7 +21,7 @@ find_package(Qt5LinguistTools REQUIRED QUIET) find_package(Qt5Svg REQUIRED QUIET) find_package(fm-qt REQUIRED QUIET) -find_package(lxqt REQUIRED) #just a build dependency for .desktop files translation +find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED) message(STATUS "Building with Qt ${Qt5Core_VERSION_STRING}") include(LXQtCompilerSettings NO_POLICY_SCOPE) @@ -46,12 +47,3 @@ DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/48x48/apps" ) -# building tarball with CPack ------------------------------------------------- -include(InstallRequiredSystemLibraries) -set(CPACK_PACKAGE_VERSION_MAJOR ${MAJOR_VERSION}) -set(CPACK_PACKAGE_VERSION_MINOR ${MINOR_VERSION}) -set(CPACK_PACKAGE_VERSION_PATCH ${PATCH_VERSION}) -set(CPACK_GENERATOR TBZ2) -set(CPACK_SOURCE_GENERATOR TBZ2) -set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp) -include(CPack) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/mainwindow.cpp new/lximage-qt-0.5.1/src/mainwindow.cpp --- old/lximage-qt-0.5.0/src/mainwindow.cpp 2016-09-24 00:50:09.000000000 +0200 +++ new/lximage-qt-0.5.1/src/mainwindow.cpp 2016-12-21 18:49:37.000000000 +0100 @@ -19,6 +19,8 @@ #include "mainwindow.h" +#include <QDir> +#include <QFileInfo> #include <QMessageBox> #include <QFileDialog> #include <QImage> @@ -184,6 +186,9 @@ thumbnailsView_->childView()->scrollTo(currentIndex_, QAbstractItemView::EnsureVisible); } } + // this is used to open the first image of a folder + else if (currentFile_ == nullptr) + on_actionFirst_triggered(); } void MainWindow::openImageFile(QString fileName) { @@ -193,9 +198,31 @@ fm_path_unref(path); return; } - // load the image file asynchronously - loadImage(path); - loadFolder(fm_path_get_parent(path)); + if (QFileInfo(fileName).isDir()) { + if(fm_path_equal(path, folderPath_)) { + fm_path_unref(path); + return; + } + QList<QByteArray> formats = QImageReader::supportedImageFormats(); + QStringList formatsFilters; + for (const QByteArray& format: formats) + formatsFilters << QString("*.") + format; + QDir dir(fileName); + dir.setNameFilters(formatsFilters); + dir.setFilter(QDir::Files | QDir::NoDotAndDotDot); + if(dir.entryList().isEmpty()) { + fm_path_unref(path); + return; + } + if(currentFile_) + fm_path_unref(currentFile_); + currentFile_ = nullptr; + loadFolder(path); + } else { + // load the image file asynchronously + loadImage(path); + loadFolder(fm_path_get_parent(path)); + } fm_path_unref(path); } @@ -243,6 +270,12 @@ return fileName; } +QString MainWindow::openDirectory() { + QString directory = QFileDialog::getExistingDirectory(this, + tr("Open directory"), QString()); + return directory; +} + // popup a file dialog and retrieve the selected image file name QString MainWindow::saveFileName(QString defaultName) { QString filterStr; @@ -275,6 +308,13 @@ } } +void MainWindow::on_actionOpenDirectory_triggered() { + QString directory = openDirectory(); + if(!directory.isEmpty()) { + openImageFile(directory); + } +} + void MainWindow::on_actionNewWindow_triggered() { Application* app = static_cast<Application*>(qApp); MainWindow* window = new MainWindow(); @@ -646,19 +686,19 @@ void MainWindow::on_actionRotateClockwise_triggered() { QGraphicsItem *graphItem = getGraphicsItem(); + bool isGifOrSvg (graphItem->isWidget() // we have gif animation + || dynamic_cast<QGraphicsSvgItem*>(graphItem)); // an SVG image; if(!image_.isNull()) { QTransform transform; transform.rotate(90.0); image_ = image_.transformed(transform, Qt::SmoothTransformation); /* when this is GIF or SVG, we need to rotate its corresponding QImage without showing it to have the right measure for auto-zooming */ - ui.view->setImage(image_, graphItem->isWidget() // we have gif animation - || static_cast<QGraphicsSvgItem*>(graphItem) // an SVG image - ? false : true); + ui.view->setImage(image_, isGifOrSvg ? false : true); setModified(true); } - if(graphItem) { + if(isGifOrSvg) { QTransform transform; transform.translate(graphItem->sceneBoundingRect().height(), 0); transform.rotate(90); @@ -671,16 +711,17 @@ void MainWindow::on_actionRotateCounterclockwise_triggered() { QGraphicsItem *graphItem = getGraphicsItem(); + bool isGifOrSvg (graphItem->isWidget() + || dynamic_cast<QGraphicsSvgItem*>(graphItem)); if(!image_.isNull()) { QTransform transform; transform.rotate(-90.0); image_ = image_.transformed(transform, Qt::SmoothTransformation); - ui.view->setImage(image_, graphItem->isWidget() || static_cast<QGraphicsSvgItem*>(graphItem) - ? false : true); + ui.view->setImage(image_, isGifOrSvg ? false : true); setModified(true); } - if(graphItem) { + if(isGifOrSvg) { QTransform transform; transform.translate(0, graphItem->sceneBoundingRect().width()); transform.rotate(-90); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/mainwindow.h new/lximage-qt-0.5.1/src/mainwindow.h --- old/lximage-qt-0.5.0/src/mainwindow.h 2016-09-24 00:50:09.000000000 +0200 +++ new/lximage-qt-0.5.1/src/mainwindow.h 2016-12-21 18:49:37.000000000 +0100 @@ -74,6 +74,7 @@ void saveImage(FmPath* filePath); // save current image to a file void loadFolder(FmPath* newFolderPath); QString openFileName(); + QString openDirectory(); QString saveFileName(QString defaultName = QString()); virtual void changeEvent(QEvent * event); virtual void resizeEvent(QResizeEvent *event); @@ -87,6 +88,7 @@ void on_actionAbout_triggered(); void on_actionOpenFile_triggered(); + void on_actionOpenDirectory_triggered(); void on_actionNewWindow_triggered(); void on_actionSave_triggered(); void on_actionSaveAs_triggered(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/mainwindow.ui new/lximage-qt-0.5.1/src/mainwindow.ui --- old/lximage-qt-0.5.0/src/mainwindow.ui 2016-09-24 00:50:09.000000000 +0200 +++ new/lximage-qt-0.5.1/src/mainwindow.ui 2016-12-21 18:49:37.000000000 +0100 @@ -56,6 +56,7 @@ </property> <addaction name="actionNewWindow"/> <addaction name="actionOpenFile"/> + <addaction name="actionOpenDirectory"/> <addaction name="actionScreenshot"/> <addaction name="actionSave"/> <addaction name="actionSaveAs"/> @@ -454,6 +455,17 @@ <string>File Properties</string> </property> </action> + <action name="actionOpenDirectory"> + <property name="icon"> + <iconset theme="document-open"/> + </property> + <property name="text"> + <string>Open &Directory</string> + </property> + <property name="shortcut"> + <string>Ctrl+D</string> + </property> + </action> </widget> <customwidgets> <customwidget> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/translations/lximage-qt-screenshot_da.desktop new/lximage-qt-0.5.1/src/translations/lximage-qt-screenshot_da.desktop --- old/lximage-qt-0.5.0/src/translations/lximage-qt-screenshot_da.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/lximage-qt-0.5.1/src/translations/lximage-qt-screenshot_da.desktop 2016-12-21 18:49:37.000000000 +0100 @@ -0,0 +1,3 @@ +Name[da]=Skærmbillede +GenericName[da]=Skærmbillede +Comment[da]=Tag et skærmbillede diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/translations/lximage-qt-screenshot_fr.desktop new/lximage-qt-0.5.1/src/translations/lximage-qt-screenshot_fr.desktop --- old/lximage-qt-0.5.0/src/translations/lximage-qt-screenshot_fr.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/lximage-qt-0.5.1/src/translations/lximage-qt-screenshot_fr.desktop 2016-12-21 18:49:37.000000000 +0100 @@ -0,0 +1,4 @@ +#Translations +Name[fr]=Copie d'écran +GenericName[fr]=Copie d'écran +Comment[fr]=Faire une copie d'écran diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/translations/lximage-qt-screenshot_it.desktop new/lximage-qt-0.5.1/src/translations/lximage-qt-screenshot_it.desktop --- old/lximage-qt-0.5.0/src/translations/lximage-qt-screenshot_it.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/lximage-qt-0.5.1/src/translations/lximage-qt-screenshot_it.desktop 2016-12-21 18:49:37.000000000 +0100 @@ -0,0 +1,4 @@ +#Translations +Name[it]=Cattura schermata +GenericName[it]=Cattura una schermata +Comment[it]=Catturare una schermata diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/translations/lximage-qt_da.desktop new/lximage-qt-0.5.1/src/translations/lximage-qt_da.desktop --- old/lximage-qt-0.5.0/src/translations/lximage-qt_da.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/lximage-qt-0.5.1/src/translations/lximage-qt_da.desktop 2016-12-21 18:49:37.000000000 +0100 @@ -0,0 +1,3 @@ +Name[da]=LXImage +GenericName[da]=Billedfremviser +Comment[da]=LXQt-billedfremviseren diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lximage-qt-0.5.0/src/translations/lximage-qt_fr.desktop new/lximage-qt-0.5.1/src/translations/lximage-qt_fr.desktop --- old/lximage-qt-0.5.0/src/translations/lximage-qt_fr.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/lximage-qt-0.5.1/src/translations/lximage-qt_fr.desktop 2016-12-21 18:49:37.000000000 +0100 @@ -0,0 +1,4 @@ +#Translation +Name[fr]=LXImage +GenericName[fr]=Visionneuse d'images +Comment[fr]=Visionneuse d'images de LXQt
