Cherry-picking upstream release 0.7.0.

* Removed build dependency libfm-dev
* Removed build dependency libmenu-cache-dev
* Bumped build dependency libfm-qt-def to >= 0.13.0~
* Bumped build dependency lxqt-build-tools to >= 0.5.0~
* Moved debian/.gitignore to ./.gitignore
ubuntu/disco debian/0.7.0-1
Alf Gaida 7 years ago
parent 53c7186f49
commit afc582fbd8

7
.gitignore vendored

@ -0,0 +1,7 @@
debian/*.debhelper
debian/*.log
debian/*.substvars
debian/debhelper-build-stamp
debian/files
debian/lximage-qt/

@ -1,9 +1,9 @@
Upstream Authors: Upstream Authors:
LXQt team: http://lxqt.org LXQt team: https://lxqt.org
Hong Jen Yee (PCMan) <pcman.tw@gmail.com> Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
Copyright: Copyright:
Copyright (c) 2013-2017 LXQt team Copyright (c) 2013-2018 LXQt team
License: GPL-2+ and LGPL-2.1+ License: GPL-2+ and LGPL-2.1+
The full text of the licenses can be found in the 'COPYING' file. The full text of the licenses can be found in the 'COPYING' file.

@ -1,7 +1,22 @@
lximage-qt-0.6.0 / 2017-10-21 lximage-qt-0.7.0 / 2018-05-21
============================= =============================
* Bumped minor version to 7
* Spanish translation update
* Just made it compilable again
* Removed not needed release.sh
* CMake: Prevent in-source builds
* fix some http->https
* Fix some mentions of LXDE
* Drop Qt foreach
* cmake: Handle CMP0071
* Add Spanish desktop entries
0.6.0 / 2017-10-21
==================
* Release 0.6.0: Update changelog
* Add ImageShack upload provider. * Add ImageShack upload provider.
* Fix warnings issued by GCC and Clang. * Fix warnings issued by GCC and Clang.
* Ensure file is closed when upload finishes. * Ensure file is closed when upload finishes.

@ -4,13 +4,14 @@ project(lximage-qt)
include(GNUInstallDirs) include(GNUInstallDirs)
set(MAJOR_VERSION 0) set(MAJOR_VERSION 0)
set(MINOR_VERSION 6) set(MINOR_VERSION 7)
set(PATCH_VERSION 0) set(PATCH_VERSION 0)
set(LXIMAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}) set(LXIMAGE_VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
set(LXQTBT_MINIMUM_VERSION "0.4.0") set(LXQTBT_MINIMUM_VERSION "0.5.0")
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@ -26,6 +27,7 @@ find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
find_package(Exif REQUIRED) find_package(Exif REQUIRED)
message(STATUS "Building with Qt ${Qt5Core_VERSION}") message(STATUS "Building with Qt ${Qt5Core_VERSION}")
include(LXQtPreventInSourceBuilds)
include(LXQtCompilerSettings NO_POLICY_SCOPE) include(LXQtCompilerSettings NO_POLICY_SCOPE)
# TODO: make the X11 stuff optional. # TODO: make the X11 stuff optional.

@ -6,20 +6,29 @@ LXImage-Qt is the Qt port of LXImage, a simple and fast image viewer.
In addition it features a tool to take screenshots. In addition it features a tool to take screenshots.
It is maintained by the LXQt project but can be used independently from this desktop environment. It is maintained by the LXQt project but can be used independently from this
desktop environment.
## Installation ## Installation
### Compiling source code ### Compiling source code
Runtime dependencies are qtx11extras and [libfm-qt](https://github.com/lxde/libfm-qt) (LXImage-Qt used to depend on [PCManFM-Qt](https://github.com/lxde/pcmanfm-qt) but the relevant code belongs to what was outsourced in libfm-qt). Runtime dependencies are qtx11extras and [libfm-qt](https://github.com/lxqt/libfm-qt)
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information. (LXImage-Qt used to depend on [PCManFM-Qt](https://github.com/lxqt/pcmanfm-qt)
but the relevant code belongs to what was outsourced in libfm-qt).
Additional build dependencies are CMake and optionally Git to pull latest VCS
checkouts. The localization files were outsourced to repository
[lxqt-l10n](https://github.com/lxqt/lxqt-l10n) so the corresponding dependencies
are needed, too. Please refer to this repository's `README.md` for further information.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems. Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX`
has to be set to `/usr` on most operating systems.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual. To build run `make`, to install `make install` which accepts variable `DESTDIR`
as usual.
### Binary packages ### Binary packages
Official binary packages are available in Arch Linux, Debian (as of Debian stretch), Fedora and openSUSE (Leap 42.1 and Tumbleweed). Official binary packages are available in Arch Linux, Debian (as of Debian stretch),
Just use the distributions' package manager to search for string 'lximage'. Fedora and openSUSE (Leap 42.1 and Tumbleweed). Just use the distributions'
package manager to search for string 'lximage'.

8
debian/.gitignore vendored

@ -1,8 +0,0 @@
/*.debhelper
/*.log
/*.substvars
/debhelper-build-stamp
/files
/lximage-qt/
/lximage-qt-dbg/

11
debian/changelog vendored

@ -1,3 +1,14 @@
lximage-qt (0.7.0-1) experimental; urgency=medium
* Cherry-picking upstream release 0.7.0.
* Removed build dependency libfm-dev
* Removed build dependency libmenu-cache-dev
* Bumped build dependency libfm-qt-def to >= 0.13.0~
* Bumped build dependency lxqt-build-tools to >= 0.5.0~
* Moved debian/.gitignore to ./.gitignore
-- Alf Gaida <agaida@siduction.org> Fri, 25 May 2018 19:36:29 +0200
lximage-qt (0.6.0-4) unstable; urgency=medium lximage-qt (0.6.0-4) unstable; urgency=medium
* Bumped compat to 11 * Bumped compat to 11

7
debian/control vendored

@ -7,16 +7,13 @@ Section: x11
Priority: optional Priority: optional
Build-Depends: debhelper (>= 11~), Build-Depends: debhelper (>= 11~),
libexif-dev, libexif-dev,
libglib2.0-dev, libfm-qt-dev (>= 0.13.0~),
libfm-dev,
libfm-qt-dev (>= 0.12.0),
libkf5windowsystem-dev, libkf5windowsystem-dev,
libmenu-cache-dev,
libqt5svg5-dev, libqt5svg5-dev,
libqt5x11extras5-dev, libqt5x11extras5-dev,
libx11-dev, libx11-dev,
libxfixes-dev, libxfixes-dev,
lxqt-build-tools (>= 0.4.0) lxqt-build-tools (>= 0.5.0~)
Standards-Version: 4.1.4 Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/lxqt-team/lximage-qt Vcs-Browser: https://salsa.debian.org/lxqt-team/lximage-qt
Vcs-Git: https://salsa.debian.org/lxqt-team/lximage-qt.git Vcs-Git: https://salsa.debian.org/lxqt-team/lximage-qt.git

@ -1,2 +1 @@
tar-ignore = .gitignore tar-ignore = .gitignore
tar-ignore = lximage-qt.kdev4

@ -1,28 +0,0 @@
#!/bin/bash
PROJECT="lximage-qt"
version="$1"
prefix=$PROJECT-$version
shift
if [[ -z $version ]]; then
>&2 echo "USAGE: $0 <tag>"
exit 1
fi
mkdir -p "dist/$version"
echo "Creating $prefix.tar.gz"
git archive -9 --format tar.gz $version --prefix="$prefix/" > "dist/$version/$prefix.tar.gz"
gpg --armor --detach-sign "dist/$version/$prefix.tar.gz"
echo "Creating $prefix.tar.xz"
git archive -9 --format tar.xz $version --prefix="$prefix/" > "dist/$version/$prefix.tar.xz"
gpg --armor --detach-sign "dist/$version/$prefix.tar.xz"
cd "dist/$version"
sha1sum --tag *.tar.gz *.tar.xz >> CHECKSUMS
sha256sum --tag *.tar.gz *.tar.xz >> CHECKSUMS
cd ..
echo "Uploading to lxqt.org..."
scp -r "$version" "downloads.lxqt.org:/srv/downloads.lxqt.org/$PROJECT/"

@ -33,13 +33,15 @@ set(lximage-qt_SRCS
upload/uploaddialog.cpp upload/uploaddialog.cpp
) )
qt5_add_dbus_adaptor(lximage-qt_SRCS qt5_add_dbus_adaptor(lximage-qt_DBUS_SRCS
org.lxde.LxImage.Application.xml org.lxde.LxImage.Application.xml
application.h application.h
LxImage::Application LxImage::Application
applicationadaptor applicationadaptor
ApplicationAdaptor ApplicationAdaptor
) )
set_property(SOURCE ${lximage-qt_DBUS_SRCS} PROPERTY SKIP_AUTOGEN ON)
list(APPEND lximage-qt_SRCS "${lximage-qt_DBUS_SRCS}")
set(lximage-qt_UIS set(lximage-qt_UIS
mainwindow.ui mainwindow.ui
@ -48,7 +50,6 @@ set(lximage-qt_UIS
upload/uploaddialog.ui upload/uploaddialog.ui
) )
qt5_wrap_ui(lximage-qt_UI_H ${lximage-qt_UIS})
# add translation for lximage-qt # add translation for lximage-qt
include(LXQtTranslateTs) include(LXQtTranslateTs)
@ -80,7 +81,7 @@ install(FILES ${desktop_files} DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applica
add_executable(lximage-qt add_executable(lximage-qt
${lximage-qt_SRCS} ${lximage-qt_SRCS}
${lximage-qt_UI_H} ${lximage-qt_UIS}
${desktop_files} ${desktop_files}
${QM_FILES} ${QM_FILES}
) )
@ -88,6 +89,7 @@ add_executable(lximage-qt
add_definitions( add_definitions(
-DLXIMAGE_DATA_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/lximage-qt" -DLXIMAGE_DATA_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/lximage-qt"
-DLXIMAGE_VERSION="${LXIMAGE_VERSION}" -DLXIMAGE_VERSION="${LXIMAGE_VERSION}"
-DQT_NO_FOREACH
) )
set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::Core Qt5::DBus Qt5::PrintSupport Qt5::X11Extras Qt5::Svg) set(QT_LIBRARIES Qt5::Widgets Qt5::Network Qt5::Core Qt5::DBus Qt5::PrintSupport Qt5::X11Extras Qt5::Svg)

@ -104,7 +104,7 @@ bool Application::parseCommandLineArgs() {
const bool screenshotTool = parser.isSet(screenshotOption); const bool screenshotTool = parser.isSet(screenshotOption);
QStringList paths; QStringList paths;
Q_FOREACH(QString arg, args) { for(const QString& arg : args) {
QFileInfo info(arg); QFileInfo info(arg);
paths.push_back(info.absoluteFilePath()); paths.push_back(info.absoluteFilePath());
} }
@ -151,7 +151,7 @@ void Application::newWindow(QStringList files) {
window->show(); window->show();
} }
else { else {
Q_FOREACH(QString fileName, files) { for(const QString& fileName : qAsConst(files)) {
window = createWindow(); window = createWindow();
window->openImageFile(fileName); window->openImageFile(fileName);
@ -167,7 +167,8 @@ void Application::newWindow(QStringList files) {
} }
void Application::applySettings() { void Application::applySettings() {
Q_FOREACH(QWidget* window, topLevelWidgets()) { const auto windows = topLevelWidgets();
for(QWidget* window : windows) {
if(window->inherits("LxImage::MainWindow")) if(window->inherits("LxImage::MainWindow"))
static_cast<MainWindow*>(window)->applySettings(); static_cast<MainWindow*>(window)->applySettings();
} }

@ -346,7 +346,7 @@ void ImageView::generateCache() {
// convert to the coordinate of the original image // convert to the coordinate of the original image
cachedSceneRect_ = viewportToScene(cachedRect_); cachedSceneRect_ = viewportToScene(cachedRect_);
// create a sub image of the visible without real data copy // create a sub image of the visible without real data copy
// Reference: http://stackoverflow.com/questions/12681554/dividing-qimage-to-smaller-pieces // Reference: https://stackoverflow.com/questions/12681554/dividing-qimage-to-smaller-pieces
QRect subRect = image_.rect().intersected(cachedSceneRect_); QRect subRect = image_.rect().intersected(cachedSceneRect_);
const uchar* bits = image_.constBits(); const uchar* bits = image_.constBits();
unsigned int offset = subRect.x() * image_.depth() / 8 + subRect.y() * image_.bytesPerLine(); unsigned int offset = subRect.x() * image_.depth() / 8 + subRect.y() * image_.bytesPerLine();

@ -89,7 +89,7 @@ void LoadImageJob::exec() {
exif_loader.reset(); exif_loader.reset();
if (exif_data) { if (exif_data) {
/* reference for EXIF orientation tag: /* reference for EXIF orientation tag:
* http://www.impulseadventure.com/photo/exif-orientation.html */ * https://www.impulseadventure.com/photo/exif-orientation.html */
ExifEntry* orient_ent = exif_data_get_entry(exif_data.get(), EXIF_TAG_ORIENTATION); ExifEntry* orient_ent = exif_data_get_entry(exif_data.get(), EXIF_TAG_ORIENTATION);
if(orient_ent) { /* orientation flag found in EXIF */ if(orient_ent) { /* orientation flag found in EXIF */
gushort orient; gushort orient;

@ -39,7 +39,6 @@
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QGraphicsSvgItem> #include <QGraphicsSvgItem>
#include "application.h" #include "application.h"
#include <libfm-qt/path.h>
#include <libfm-qt/folderview.h> #include <libfm-qt/folderview.h>
#include <libfm-qt/filepropsdialog.h> #include <libfm-qt/filepropsdialog.h>
#include <libfm-qt/fileoperation.h> #include <libfm-qt/fileoperation.h>
@ -143,9 +142,9 @@ MainWindow::~MainWindow() {
void MainWindow::on_actionAbout_triggered() { void MainWindow::on_actionAbout_triggered() {
QMessageBox::about(this, tr("About"), QMessageBox::about(this, tr("About"),
tr("LXImage - a simple and fast image viewer\n\n" tr("LXImage-Qt - a simple and fast image viewer\n\n"
"Copyright (C) 2013\n" "Copyright (C) 2013\n"
"LXDE Project: http://lxde.org/\n\n" "LXQt Project: https://lxqt.org/\n\n"
"Authors:\n" "Authors:\n"
"Hong Jen Yee (PCMan) <pcman.tw@gmail.com>")); "Hong Jen Yee (PCMan) <pcman.tw@gmail.com>"));
} }
@ -906,7 +905,8 @@ void MainWindow::changeEvent(QEvent* event) {
// is disabled. We needs to add the actions to the main window manually to enable the // is disabled. We needs to add the actions to the main window manually to enable the
// shortcuts again. // shortcuts again.
ui.menubar->hide(); ui.menubar->hide();
Q_FOREACH(QAction* action, ui.menubar->actions()) { const auto actions = ui.menubar->actions();
for(QAction* action : qAsConst(actions)) {
if(!action->shortcut().isEmpty()) if(!action->shortcut().isEmpty())
addAction(action); addAction(action);
} }
@ -917,7 +917,8 @@ void MainWindow::changeEvent(QEvent* event) {
ui.view->setFrameStyle(QFrame::StyledPanel|QFrame::Sunken); ui.view->setFrameStyle(QFrame::StyledPanel|QFrame::Sunken);
ui.view->setBackgroundBrush(QBrush(app->settings().bgColor())); ui.view->setBackgroundBrush(QBrush(app->settings().bgColor()));
// now we're going to re-enable the menu, so remove the actions previously added. // now we're going to re-enable the menu, so remove the actions previously added.
Q_FOREACH(QAction* action, ui.menubar->actions()) { const auto actions_ = ui.menubar->actions();
for(QAction* action : qAsConst(actions_)) {
if(!action->shortcut().isEmpty()) if(!action->shortcut().isEmpty())
removeAction(action); removeAction(action);
} }

@ -58,7 +58,8 @@ void PreferencesDialog::accept() {
settings.setFallbackIconTheme(newIconTheme); settings.setFallbackIconTheme(newIconTheme);
QIcon::setThemeName(newIconTheme); QIcon::setThemeName(newIconTheme);
// update the UI by emitting a style change event // update the UI by emitting a style change event
Q_FOREACH(QWidget *widget, QApplication::allWidgets()) { const auto allWidgets = QApplication::allWidgets();
for(QWidget *widget : allWidgets) {
QEvent event(QEvent::StyleChange); QEvent event(QEvent::StyleChange);
QApplication::sendEvent(widget, &event); QApplication::sendEvent(widget, &event);
} }
@ -76,9 +77,9 @@ void PreferencesDialog::accept() {
static void findIconThemesInDir(QHash<QString, QString>& iconThemes, QString dirName) { static void findIconThemesInDir(QHash<QString, QString>& iconThemes, QString dirName) {
QDir dir(dirName); QDir dir(dirName);
QStringList subDirs = dir.entryList(QDir::AllDirs); const QStringList subDirs = dir.entryList(QDir::AllDirs);
GKeyFile* kf = g_key_file_new(); GKeyFile* kf = g_key_file_new();
Q_FOREACH(QString subDir, subDirs) { for(QString subDir : subDirs) {
QString indexFile = dirName % '/' % subDir % "/index.theme"; QString indexFile = dirName % '/' % subDir % "/index.theme";
if(g_key_file_load_from_file(kf, indexFile.toLocal8Bit().constData(), GKeyFileFlags(0), NULL)) { if(g_key_file_load_from_file(kf, indexFile.toLocal8Bit().constData(), GKeyFileFlags(0), NULL)) {
// FIXME: skip hidden ones // FIXME: skip hidden ones

@ -0,0 +1,3 @@
Name[es]=Captura de pantalla
GenericName[es]=Captura de pantalla
Comment[es]=Toma capturas de la pantalla

@ -0,0 +1,3 @@
Name[es]=LXImage
GenericName[es]=Visor de imágenes
Comment[es]=El visor de imágenes de LXQt
Loading…
Cancel
Save