Cherry-picked upstream version 1.98.

* Cherry-picked upstream version 1.98.
* Removed date-time patch, applied upstream
* Refreshed the remaining patches
* Fixed system-wide configuration (Closes: #893809)
* Fixed default file format (Closes: LP1733461)
ubuntu/disco debian/1.98-1
Alf Gaida 7 years ago
parent 4ec4708a17
commit f49a49138e

@ -2,10 +2,15 @@ Upstream author:
Artem Galichkin <doomer3d@gmail.com> Artem Galichkin <doomer3d@gmail.com>
Contributors: Contributors:
Jerome Leclanche <jerome@leclan.ch> Tonci Antunovic <tantunovic@gmail.com>
Alexander Sokolov <sokoloff.a@gmail.com> Stef Binde <stef.binde@riseup.net>
Alf Gaida <agaida@siduction.org> Alf Gaida <agaida@siduction.org>
Ilya87 <yast4ik@gmail.com>
Jonathan Hooverman <jonathan.hooverman@gmail.com> Jonathan Hooverman <jonathan.hooverman@gmail.com>
Ilya87 <yast4ik@gmail.com>
Tsu Jan <tsujan2000@gmail.com>
Jerome Leclanche <jerome@leclan.ch>
Paulo Lieuthier <paulolieuthier@gmail.com> Paulo Lieuthier <paulolieuthier@gmail.com>
Peter Mattern <pmattern@arcor.de>
Luís Pereira <luis.artur.pereira@gmail.com>
Thibaut Quentin <thibaut.quentin@laposte.net>
Alexander Sokolov <sokoloff.a@gmail.com>

@ -1,7 +1,55 @@
screengrab-1.97 / 2017-09-26 screengrab-1.98 / 2018-05-21
============================ ============================
* Bumped SCREENGRAB_VERSION to 1.98
* Spanish translation update
* A more specific condition for Ctrl+C
* Filter out Ctrl+C in Delay box
* No window screenshot with shaded windows
* Translated using Weblate (German)
* Translated using Weblate (German)
* Translated using Weblate (German)
* Rewritten the debian related build infos
* some little changes regarding headlines and copyright
* removed doomer jabber
* added our bugtracker
* use our github repo as home
* Translated using Weblate (German)
* Translated using Weblate (German)
* Translated using Weblate (Ukrainian)
* Translated using Weblate (Spanish)
* Translated using Weblate (Russian)
* Translated using Weblate (Portuguese (Brazil))
* Translated using Weblate (Italian)
* Translated using Weblate (French)
* Translated using Weblate (German)
* Translated using Weblate (Russian)
* Translated using Weblate (French)
* Updated translation files again - changed the parameters for lupdate
* Translated using Weblate (Portuguese (Brazil))
* Translation maintenance
* Always use contents rect Fixes https://github.com/lxqt/screengrab/issues/67
* Never scale up beyond real size
* Several fixes, especially for the tray icon
* __DATE__ and __TIME__ macro are not very helpful for reproducible builds.
* Cleanup CMakeLists.txt and complete AUTHORS
* Added a minimum default configuration
* Handle invalid window screenshots
* Corrected a grammar mistake
* Always use native (LXQt) file dialog
* Just changed the location of a comment
* Cleanup and fixes
* Some ui polishing
* Improve screengrab app behaviour
* Drops Qt foreach
* fix some uris
* Update references in about dialog
1.97 / 2017-09-26
=================
* Release 1.97: Update changelog
* Added basic .gitattributes * Added basic .gitattributes
* Bump SCREENGRAB_VERSION to 1.9.7 * Bump SCREENGRAB_VERSION to 1.9.7
* Added KF5WindowSystem to build requirements * Added KF5WindowSystem to build requirements

@ -3,9 +3,9 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
# set project's name # set project's name
project(screengrab) project(screengrab)
find_package(Qt5Widgets 5.2.0 REQUIRED) find_package(Qt5Widgets 5.7.1 REQUIRED)
find_package(Qt5X11Extras 5.2.0 REQUIRED) find_package(Qt5X11Extras 5.7.1 REQUIRED)
find_package(Qt5Network 5.2.0 REQUIRED) find_package(Qt5Network 5.7.1 REQUIRED)
find_package(KF5WindowSystem REQUIRED) find_package(KF5WindowSystem REQUIRED)
# for translations # for translations
@ -39,7 +39,7 @@ find_package(
) )
# add version define # add version define
set(SCREENGRAB_VERSION "1.97") set(SCREENGRAB_VERSION "1.98")
set(SCREENGRAB_VERSION_DEV "2.0-beta1") set(SCREENGRAB_VERSION_DEV "2.0-beta1")
# set(DEV_BUILD True) # set(DEV_BUILD True)
@ -64,7 +64,10 @@ elseif(NOT SCREENGRAB_VERSION_DEV)
set(VERSION "${SCREENGRAB_VERSION}") set(VERSION "${SCREENGRAB_VERSION}")
endif(SCREENGRAB_VERSION_DEV) endif(SCREENGRAB_VERSION_DEV)
add_definitions(-DVERSION="${VERSION}") add_definitions(
-DVERSION="${VERSION}"
-DQT_NO_FOREACH
)
if(NOT CMAKE_BUILD_TYPE) if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
@ -182,6 +185,10 @@ qt5_add_resources(QRC_SOURCES ${SCREENGRAB_QRC})
message(STATUS "Generating localize ...") message(STATUS "Generating localize ...")
set(SCREENGRAB_CONFIG_FILES
screengrab.conf
)
set(SCREENGRAB_DESKTOP_FILES_IN set(SCREENGRAB_DESKTOP_FILES_IN
screengrab.desktop.in screengrab.desktop.in
) )
@ -256,31 +263,12 @@ endif()
target_link_libraries(screengrab qkeysequencewidget Qt5::Widgets KF5::WindowSystem ${X11_LIBRARIES}) target_link_libraries(screengrab qkeysequencewidget Qt5::Widgets KF5::WindowSystem ${X11_LIBRARIES})
# make src.tar.gz
add_custom_target(dist @echo create source package)
set(SCREENGRAB_DIST "screengrab-${SCREENGRAB_VERSION}")
add_custom_command(COMMAND cp
ARGS -R ${CMAKE_CURRENT_SOURCE_DIR} "/tmp/${SCREENGRAB_DIST}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
TARGET dist
)
add_custom_command(COMMAND tar
ARGS cvfz "${CMAKE_CURRENT_BINARY_DIR}/${SCREENGRAB_DIST}.tar.gz" --exclude=*~ --exclude-vcs --exclude=localize/*qm --exclude=*.kdev4 --exclude=build --exclude=create-src.sh --exclude=win32 -C "/tmp" "${SCREENGRAB_DIST}"
WORKING_DIRECTORY "/tmp"
TARGET dist
)
add_custom_command(COMMAND rm
ARGS -rf "/tmp/${SCREENGRAB_DIST}"
WORKING_DIRECTORY "/tmp"
TARGET dist
)
# installing # installing
install(TARGETS screengrab RUNTIME DESTINATION bin) install(TARGETS screengrab RUNTIME DESTINATION bin)
# install html docs # install html docs
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/html" DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}") install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/docs/html" DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
# install config files
install(FILES ${SCREENGRAB_CONFIG_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
# install desktop files # install desktop files
install(FILES ${SCREENGRAB_DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) install(FILES ${SCREENGRAB_DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
# install pixmap # install pixmap

@ -1,12 +1,10 @@
ScreenGrab # ScreenGrab
==========
version 2.0-dev ##### version 2.0-dev
ScreenGrab - A program for fast creating screenshots, and easily publishing them on internet image hosting services. It works on Linux and Windows operating systems. ScreenGrab uses the Qt framework and thus, it is independent from any desktop environment. ScreenGrab - A program for fast creating screenshots, and easily publishing them on internet image hosting services. It works on Linux and Windows operating systems. ScreenGrab uses the Qt framework and thus, it is independent from any desktop environment.
Build requirements ### Build requirements
------------------
* Qt5 >= 5.2 (Qt 4.x support only 1.x branch) * Qt5 >= 5.2 (Qt 4.x support only 1.x branch)
* CMake >= 2.8.11 (only for building ScreenGrab from sources) * CMake >= 2.8.11 (only for building ScreenGrab from sources)
@ -14,8 +12,7 @@ Build requirements
* KF5WindowSystem * KF5WindowSystem
* [optional] Qxt Library > 0.6 (if you want to build ScreenGrab using your system Qxt version - see the "Build options" section in this file) * [optional] Qxt Library > 0.6 (if you want to build ScreenGrab using your system Qxt version - see the "Build options" section in this file)
Build ### Build
-----
To build ScreenGrab from sources, use these commands: To build ScreenGrab from sources, use these commands:
@ -25,8 +22,7 @@ To build ScreenGrab from sources, use these commands:
make make
make install make install
Build options ### Build options
-------------
You can use some or all of these parameters to customise your build. You can use some or all of these parameters to customise your build.
@ -39,25 +35,28 @@ You can use some or all of these parameters to customise your build.
* **-DSG_DOCDIR** - Name for the directory of user's documentation. Default setting: "screengrab". * **-DSG_DOCDIR** - Name for the directory of user's documentation. Default setting: "screengrab".
* **-DQKSW_SHARED** - Enable shared linking with qkeysequencewidget library (in src/common/qksysekwesewidget). Default setting: OFF. * **-DQKSW_SHARED** - Enable shared linking with qkeysequencewidget library (in src/common/qksysekwesewidget). Default setting: OFF.
**Build notes:** #### Build notes
* For Debian based Linux distro (Debian Squeezy, Ubuntu 12.04, etc) - if you want to build ScreenGrab using the system version of the Qxt Library, please use this command to run CMake: For Debian based Linux distributions please use the distribution build tools. One can get the source-code with
```
apt source screengrab # Sources for the released package
- or -
git clone https://salsa.debian.org/lxqt-team/screengrab
```
Build with the tools provided by `devscripts` or better with `pbuilder` or `sbuild`
cmake -DSG_USE_SYSTEM_QXT=ON -DQXT_QXTCORE_INCLUDE_DIR=/usr/include/qxt/QxtCore -DQXT_QXTGUI_INCLUDE_DIR=/usr/include/qxt -DCMAKE_INSTALL_PREFIX=/usr ../ ### LICENSE
LICENSE
-------
Screengrab is licensed under the GPL v2. See file LICENSE in docs directory for more information Screengrab is licensed under the GPL v2. See file LICENSE in docs directory for more information
Contacts ### Contacts
--------
Web homepage: https://github.com/lxqt/screengrab
Bug Tracker: https://github.com/lxqt/screengrab/issues
E-mail: doomer3d@gmail.com
Jabber: doomer@jabber.linux.it
Web homepage: http://screengrab.doomer.org/
### Copyright
Copyright (c) 2009-2013, Artem 'DOOMer' Galichkin (c) 2014-2018, LXQt Team
(c) 2009-2013, Artem 'DOOMer' Galichkin

@ -93,7 +93,7 @@ function(lxqt_translate_desktop _RESULT)
file(WRITE ${_txFile} file(WRITE ${_txFile}
"[ -f ${_inFile} ] || exit 0\n" "[ -f ${_inFile} ] || exit 0\n"
"echo '[lxde-qt.${_fileName}_${_fileType}]'\n" "echo '[lxqt.${_fileName}_${_fileType}]'\n"
"echo 'type = DESKTOP'\n" "echo 'type = DESKTOP'\n"
"echo 'source_lang = en'\n" "echo 'source_lang = en'\n"
"echo 'source_file = ${_tx_inFile}'\n" "echo 'source_file = ${_tx_inFile}'\n"

10
debian/changelog vendored

@ -1,3 +1,13 @@
screengrab (1.98-1) unstable; urgency=medium
* Cherry-picked upstream version 1.98.
* Removed date-time patch, applied upstream
* Refreshed the remaining patches
* Fixed system-wide configuration (Closes: #893809)
* Fixed default file format (Closes: LP1733461)
-- Alf Gaida <agaida@siduction.org> Tue, 22 May 2018 18:01:45 +0200
screengrab (1.97-3) unstable; urgency=medium screengrab (1.97-3) unstable; urgency=medium
* Bumped compat to 11 * Bumped compat to 11

4
debian/control vendored

@ -10,8 +10,8 @@ Build-Depends: debhelper (>= 11~),
libkf5windowsystem-dev, libkf5windowsystem-dev,
libqt5svg5-dev, libqt5svg5-dev,
libqt5x11extras5-dev, libqt5x11extras5-dev,
libqt5xdg-dev (>= 2.0.0), libqt5xdg-dev (>= 2.0.0~),
libqt5xdgiconloader-dev, libqt5xdgiconloader-dev (>= 2.0.0~) ,
libx11-dev, libx11-dev,
libx11-xcb-dev, libx11-xcb-dev,
libxcb1-dev, libxcb1-dev,

@ -1,22 +0,0 @@
Description: Build date time
Author: Alf Gaida <agaida@siduction.org>
--- a/src/core/ui/about.cpp
+++ b/src/core/ui/about.cpp
@@ -31,16 +31,8 @@ AboutDialog::AboutDialog(QWidget *parent):
_ui->setupUi(this);
_ui->labAppName->setText(_ui->labAppName->text() + QString(" <b>") + qApp->applicationVersion() + QString("</b>"));
- QString versionInfo;
- versionInfo = tr("built on ");
- versionInfo.append(__DATE__);
- versionInfo.append(" ");
- versionInfo.append(__TIME__);
-
_ui->labQtVer->setText(tr("using Qt ") + qVersion());
- _ui->labVersion->setText(versionInfo);
-
QTabBar *tabs = new QTabBar;
_ui->frame->layout()->addWidget(tabs);

@ -5,9 +5,9 @@ Last-Update: 2016-09-19
--- a/src/core/core.cpp --- a/src/core/core.cpp
+++ b/src/core/core.cpp +++ b/src/core/core.cpp
@@ -511,8 +511,9 @@ @@ -536,8 +536,9 @@
if (_cmdLine.isSet(_screenTypeOpts.at(i))) if (_cmdLine.isSet(_screenTypeOpts.at(i)))
_conf->setScreenshotType(i); _conf->setDefScreenshotType(i);
+/* +/*
#ifdef SG_EXT_UPLOADS #ifdef SG_EXT_UPLOADS
@ -16,7 +16,7 @@ Last-Update: 2016-09-19
const QString UPLOAD_CMD_PARAM = "upload"; const QString UPLOAD_CMD_PARAM = "upload";
const QString UPLOAD_CMD_PARAM_SHORT = "u"; const QString UPLOAD_CMD_PARAM_SHORT = "u";
QCommandLineOption u(QStringList() << UPLOAD_CMD_PARAM_SHORT << UPLOAD_CMD_PARAM); QCommandLineOption u(QStringList() << UPLOAD_CMD_PARAM_SHORT << UPLOAD_CMD_PARAM);
@@ -524,6 +525,9 @@ @@ -549,6 +550,9 @@
} else } else
initWindow(); initWindow();
#endif #endif

@ -3,9 +3,9 @@ Author: Alf Gaida <agaida@siduction.org>
Bug-Debian: https://bugs.debian.org/834517 Bug-Debian: https://bugs.debian.org/834517
Last-Update: 2016-09-19 Last-Update: 2016-09-19
--- screengrab-1.96~38-g975f8ce.orig/src/modules/uploader/moduleuploader.cpp --- a/src/modules/uploader/moduleuploader.cpp
+++ screengrab-1.96~38-g975f8ce/src/modules/uploader/moduleuploader.cpp +++ b/src/modules/uploader/moduleuploader.cpp
@@ -36,11 +36,11 @@ const QString UPLOAD_CMD_PARAM_SHORT = " @@ -36,11 +36,11 @@
ModuleUploader::ModuleUploader(QObject *parent) : ModuleUploader::ModuleUploader(QObject *parent) :
QObject(parent), _ignoreCmdParam(false), QObject(parent), _ignoreCmdParam(false),

@ -1,4 +1,2 @@
build-date-time.patch
disable-cli-upload-option.patch disable-cli-upload-option.patch
core-cli-upload-option.patch core-cli-upload-option.patch

@ -0,0 +1,23 @@
[Base]
CopyFilenameToClipboard=0
autoSave=false
autoSaveFirst=false
defFilename=screen
defImgFormat=jpg
defScreenshotType=FullScreen
delay=0
imageQuality=80
[Display]
showTrayIcon=true
timeTrayMessages=5
trayMessages=1
windowHeight=533
windowWidth=700
zoomAroundMouse=false
[System]
AllowCopies=true
closeInTray=false
enbaleExternalView=true
fitInside=true

@ -33,10 +33,8 @@
#define KEY_SAVEDIR "defDir" #define KEY_SAVEDIR "defDir"
#define KEY_SAVENAME "defFilename" #define KEY_SAVENAME "defFilename"
#define KEY_SAVEFORMAT "defImgFormat" #define KEY_SAVEFORMAT "defImgFormat"
#define KEY_DELAY_DEF "defDelay"
#define KEY_DELAY "delay" #define KEY_DELAY "delay"
#define KEY_SCREENSHOT_TYPE_DEF "defScreenshotType" #define KEY_SCREENSHOT_TYPE_DEF "defScreenshotType"
#define KEY_SCREENSHOT_TYPE "screenshotType"
#define KEY_IMG_QUALITY "imageQuality" #define KEY_IMG_QUALITY "imageQuality"
#define KEY_FILENAMEDATE "insDateTimeInFilename" #define KEY_FILENAMEDATE "insDateTimeInFilename"
#define KEY_DATETIME_TPL "templateDateTime" #define KEY_DATETIME_TPL "templateDateTime"
@ -58,6 +56,8 @@
#define KEY_INCLUDE_CURSOR "includeCursor" #define KEY_INCLUDE_CURSOR "includeCursor"
#define KEY_FIT_INSIDE "fitInside" #define KEY_FIT_INSIDE "fitInside"
#define KEY_LAST_SELECTION "lastSelection"
static const QLatin1String FullScreen("FullScreen"); static const QLatin1String FullScreen("FullScreen");
static const QLatin1String Window("Window"); static const QLatin1String Window("Window");
@ -108,30 +108,17 @@ static int screenshotTypeFromString(const QString& str)
return r; return r;
} }
const static QStringList _imageFormats = {"png", "jpg"};
Config* Config::ptrInstance = 0; Config* Config::ptrInstance = 0;
// constructor // constructor
Config::Config() Config::Config()
{ {
_settings = new QSettings(getConfigFile(), QSettings::IniFormat); _settings = new Settings("screengrab", "screengrab");
_shortcuts = new ShortcutManager(_settings); _shortcuts = new ShortcutManager(_settings);
// check existing config file
if (!QFile::exists(getConfigFile()))
{
// creating conf file from set defaults
QFile cf(getConfigFile());
if (cf.open(QIODevice::WriteOnly))
{
cf.close();
}
setDefaultSettings();
saveSettings();
}
_settings->setIniCodec("UTF-8");
_scrNum = 0; _scrNum = 0;
} }
@ -168,11 +155,6 @@ void Config::killInstance()
} }
} }
QString Config::getConfigFile()
{
return getConfigDir() + QDir::separator() + CONFIG_FILE_NAME;
}
QString Config::getConfigDir() QString Config::getConfigDir()
{ {
QString dir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); QString dir = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
@ -273,16 +255,6 @@ void Config::setSaveFormat(QString format)
setValue(KEY_SAVEFORMAT, format); setValue(KEY_SAVEFORMAT, format);
} }
quint8 Config::getDefDelay()
{
return value(KEY_DELAY_DEF).toInt();
}
void Config::setDefDelay(quint8 sec)
{
setValue(KEY_DELAY_DEF, sec);
}
quint8 Config::getDelay() quint8 Config::getDelay()
{ {
return value(KEY_DELAY).toInt(); return value(KEY_DELAY).toInt();
@ -303,16 +275,6 @@ void Config::setDefScreenshotType(const int type)
setValue(QLatin1String(KEY_SCREENSHOT_TYPE_DEF), type); setValue(QLatin1String(KEY_SCREENSHOT_TYPE_DEF), type);
} }
int Config::getScreenshotType()
{
return (value(QLatin1String(KEY_SCREENSHOT_TYPE)).toInt());
}
void Config::setScreenshotType(const int type)
{
setValue(QLatin1String(KEY_SCREENSHOT_TYPE), type);
}
quint8 Config::getAutoCopyFilenameOnSaving() quint8 Config::getAutoCopyFilenameOnSaving()
{ {
return value(KEY_FILENAME_TO_CLB).toInt(); return value(KEY_FILENAME_TO_CLB).toInt();
@ -466,6 +428,16 @@ void Config::setFitInside(bool val)
setValue(KEY_FIT_INSIDE, val); setValue(KEY_FIT_INSIDE, val);
} }
QRect Config::getLastSelection()
{
return value(KEY_LAST_SELECTION).toRect();
}
void Config::setLastSelection(QRect rect)
{
setValue(KEY_LAST_SELECTION, rect);
}
void Config::saveWndSize() void Config::saveWndSize()
{ {
// saving size // saving size
@ -482,7 +454,7 @@ void Config::loadSettings()
setSaveDir(_settings->value(KEY_SAVEDIR, getDirNameDefault()).toString() ); setSaveDir(_settings->value(KEY_SAVEDIR, getDirNameDefault()).toString() );
setSaveFileName(_settings->value(KEY_SAVENAME,DEF_SAVE_NAME).toString()); setSaveFileName(_settings->value(KEY_SAVENAME,DEF_SAVE_NAME).toString());
setSaveFormat(_settings->value(KEY_SAVEFORMAT, DEF_SAVE_FORMAT).toString()); setSaveFormat(_settings->value(KEY_SAVEFORMAT, DEF_SAVE_FORMAT).toString());
setDefDelay(_settings->value(KEY_DELAY, DEF_DELAY).toInt()); setDelay(_settings->value(KEY_DELAY, DEF_DELAY).toInt());
setDefScreenshotType(screenshotTypeFromString(_settings->value(QLatin1String(KEY_SCREENSHOT_TYPE_DEF)).toString())); setDefScreenshotType(screenshotTypeFromString(_settings->value(QLatin1String(KEY_SCREENSHOT_TYPE_DEF)).toString()));
setAutoCopyFilenameOnSaving(_settings->value(KEY_FILENAME_TO_CLB, DEF_FILENAME_TO_CLB).toInt()); setAutoCopyFilenameOnSaving(_settings->value(KEY_FILENAME_TO_CLB, DEF_FILENAME_TO_CLB).toInt());
setDateTimeInFilename(_settings->value(KEY_FILENAMEDATE, DEF_DATETIME_FILENAME).toBool()); setDateTimeInFilename(_settings->value(KEY_FILENAMEDATE, DEF_DATETIME_FILENAME).toBool());
@ -498,6 +470,7 @@ void Config::loadSettings()
setTrayMessages(_settings->value(KEY_TRAYMESSAGES, DEF_TRAY_MESS_TYPE).toInt()); setTrayMessages(_settings->value(KEY_TRAYMESSAGES, DEF_TRAY_MESS_TYPE).toInt());
setTimeTrayMess(_settings->value(KEY_TIME_NOTIFY, DEF_TIME_TRAY_MESS).toInt( )); setTimeTrayMess(_settings->value(KEY_TIME_NOTIFY, DEF_TIME_TRAY_MESS).toInt( ));
setZoomAroundMouse(_settings->value(KEY_ZOOMBOX, DEF_ZOOM_AROUND_MOUSE).toBool()); setZoomAroundMouse(_settings->value(KEY_ZOOMBOX, DEF_ZOOM_AROUND_MOUSE).toBool());
setLastSelection(_settings->value(KEY_LAST_SELECTION).toRect());
// TODO - make set windows size without hardcode values // TODO - make set windows size without hardcode values
setRestoredWndSize(_settings->value(KEY_WND_WIDTH, DEF_WND_WIDTH).toInt(), setRestoredWndSize(_settings->value(KEY_WND_WIDTH, DEF_WND_WIDTH).toInt(),
_settings->value(KEY_WND_HEIGHT, DEF_WND_HEIGHT).toInt()); _settings->value(KEY_WND_HEIGHT, DEF_WND_HEIGHT).toInt());
@ -511,33 +484,26 @@ void Config::loadSettings()
setFitInside(_settings->value(KEY_FIT_INSIDE, DEF_FIT_INSIDE).toBool()); setFitInside(_settings->value(KEY_FIT_INSIDE, DEF_FIT_INSIDE).toBool());
_settings->endGroup(); _settings->endGroup();
setDelay(getDefDelay());
_shortcuts->loadSettings(); _shortcuts->loadSettings();
} }
void Config::saveSettings() void Config::saveSettings()
{ { // save settings except for those on the main window
_settings->beginGroup("Base"); _settings->beginGroup("Base");
_settings->setValue(KEY_SAVEDIR, getSaveDir()); _settings->setValue(KEY_SAVEDIR, getSaveDir());
_settings->setValue(KEY_SAVENAME, getSaveFileName()); _settings->setValue(KEY_SAVENAME, getSaveFileName());
_settings->setValue(KEY_SAVEFORMAT, getSaveFormat()); _settings->setValue(KEY_SAVEFORMAT, getSaveFormat());
_settings->setValue(KEY_DELAY, getDefDelay());
_settings->setValue(QLatin1String(KEY_SCREENSHOT_TYPE_DEF), screenshotTypeToString(getDefScreenshotType()));
_settings->setValue(KEY_FILENAME_TO_CLB, getAutoCopyFilenameOnSaving()); _settings->setValue(KEY_FILENAME_TO_CLB, getAutoCopyFilenameOnSaving());
_settings->setValue(KEY_FILENAMEDATE, getDateTimeInFilename()); _settings->setValue(KEY_FILENAMEDATE, getDateTimeInFilename());
_settings->setValue(KEY_DATETIME_TPL, getDateTimeTpl()); _settings->setValue(KEY_DATETIME_TPL, getDateTimeTpl());
_settings->setValue(KEY_AUTOSAVE, getAutoSave()); _settings->setValue(KEY_AUTOSAVE, getAutoSave());
_settings->setValue(KEY_AUTOSAVE_FIRST, getAutoSaveFirst()); _settings->setValue(KEY_AUTOSAVE_FIRST, getAutoSaveFirst());
_settings->setValue(KEY_IMG_QUALITY, getImageQuality()); _settings->setValue(KEY_IMG_QUALITY, getImageQuality());
_settings->setValue(KEY_NODECOR, getNoDecoration());
_settings->setValue(KEY_INCLUDE_CURSOR, getIncludeCursor());
_settings->endGroup(); _settings->endGroup();
_settings->beginGroup("Display"); _settings->beginGroup("Display");
_settings->setValue(KEY_TRAYMESSAGES, getTrayMessages()); _settings->setValue(KEY_TRAYMESSAGES, getTrayMessages());
_settings->setValue(KEY_TIME_NOTIFY, getTimeTrayMess()); _settings->setValue(KEY_TIME_NOTIFY, getTimeTrayMess());
_settings->setValue(KEY_ZOOMBOX, getZoomAroundMouse());
_settings->setValue(KEY_SHOW_TRAY, getShowTrayIcon()); _settings->setValue(KEY_SHOW_TRAY, getShowTrayIcon());
_settings->endGroup(); _settings->endGroup();
saveWndSize(); saveWndSize();
@ -554,14 +520,27 @@ void Config::saveSettings()
resetScrNum(); resetScrNum();
} }
void Config::saveScreenshotSettings()
{ // save the main window settings
_settings->beginGroup("Base");
_settings->setValue(QLatin1String(KEY_SCREENSHOT_TYPE_DEF), screenshotTypeToString(getDefScreenshotType()));
_settings->setValue(KEY_NODECOR, getNoDecoration());
_settings->setValue(KEY_INCLUDE_CURSOR, getIncludeCursor());
_settings->setValue(KEY_DELAY, getDelay());
_settings->endGroup();
_settings->beginGroup("Display");
_settings->setValue(KEY_ZOOMBOX, getZoomAroundMouse());
_settings->setValue(KEY_LAST_SELECTION, getLastSelection());
_settings->endGroup();
}
// set default values // set default values
void Config::setDefaultSettings() void Config::setDefaultSettings()
{ {
setSaveDir(getDirNameDefault()); setSaveDir(getDirNameDefault());
setSaveFileName(DEF_SAVE_NAME); setSaveFileName(DEF_SAVE_NAME);
setSaveFormat(DEF_SAVE_FORMAT); setSaveFormat(DEF_SAVE_FORMAT);
setDefDelay(DEF_DELAY);
setScreenshotType(Core::FullScreen);
setImageQuality(DEF_IMG_QUALITY); setImageQuality(DEF_IMG_QUALITY);
setDateTimeInFilename(DEF_DATETIME_FILENAME); setDateTimeInFilename(DEF_DATETIME_FILENAME);
setDateTimeTpl(DEF_DATETIME_TPL); setDateTimeTpl(DEF_DATETIME_TPL);
@ -570,7 +549,6 @@ void Config::setDefaultSettings()
setAutoSaveFirst(DEF_AUTO_SAVE_FIRST); setAutoSaveFirst(DEF_AUTO_SAVE_FIRST);
setTrayMessages(DEF_TRAY_MESS_TYPE); setTrayMessages(DEF_TRAY_MESS_TYPE);
setIncludeCursor(DEF_INCLUDE_CURSOR); setIncludeCursor(DEF_INCLUDE_CURSOR);
setZoomAroundMouse(DEF_ZOOM_AROUND_MOUSE);
setCloseInTray(DEF_CLOSE_IN_TRAY); setCloseInTray(DEF_CLOSE_IN_TRAY);
setTimeTrayMess(DEF_TIME_TRAY_MESS); setTimeTrayMess(DEF_TIME_TRAY_MESS);
setAllowMultipleInstance(DEF_ALLOW_COPIES); setAllowMultipleInstance(DEF_ALLOW_COPIES);
@ -582,9 +560,6 @@ void Config::setDefaultSettings()
_shortcuts->setDefaultSettings(); _shortcuts->setDefaultSettings();
setNoDecoration(DEF_X11_NODECOR);
setDelay(DEF_DELAY);
quint8 countModules = Core::instance()->modules()->count(); quint8 countModules = Core::instance()->modules()->count();
for (int i = 0; i < countModules; ++i) for (int i = 0; i < countModules; ++i)
Core::instance()->modules()->getModule(i)->defaultSettings(); Core::instance()->modules()->getModule(i)->defaultSettings();
@ -596,6 +571,10 @@ QString Config::getDirNameDefault()
return QDir::homePath()+QDir::separator(); return QDir::homePath()+QDir::separator();
} }
QStringList Config::getFormatIDs() const
{
return _imageFormats;
}
// get id of default save format // get id of default save format
int Config::getDefaultFormatID() int Config::getDefaultFormatID()
{ {

@ -52,6 +52,20 @@ const bool DEF_ENABLE_EXT_VIEWER = true;
const bool DEF_INCLUDE_CURSOR = false; const bool DEF_INCLUDE_CURSOR = false;
const bool DEF_FIT_INSIDE = true; const bool DEF_FIT_INSIDE = true;
class Settings : public QSettings // prevents redundant writings
{
Q_OBJECT
public:
Settings(const QString &organization, const QString &application = QString(), QObject *parent = nullptr)
: QSettings (organization, application, parent) {}
void setValue(const QString &key, const QVariant &v) {
if (value(key) == v)
return;
QSettings::setValue(key, v);
}
};
// class worker with conf data // class worker with conf data
class Config class Config
{ {
@ -99,12 +113,6 @@ public:
static void killInstance(); static void killInstance();
~Config(); ~Config();
/**
* @brief Gets the configuration file for screengrab. It's
* inside the folder returned by getConfigDir().
*/
static QString getConfigFile();
/** /**
* @brief Gets the directory where to save the configuration files. * @brief Gets the directory where to save the configuration files.
* Does not end with '/'. * Does not end with '/'.
@ -121,6 +129,11 @@ public:
*/ */
void saveSettings(); void saveSettings();
/**
* Save screenshot settings to conf file
*/
void saveScreenshotSettings();
/** /**
* Reset configuration data from default values * Reset configuration data from default values
*/ */
@ -138,10 +151,6 @@ public:
QString getSaveFormat(); QString getSaveFormat();
void setSaveFormat(QString format); void setSaveFormat(QString format);
// default delay
quint8 getDefDelay();
void setDefDelay(quint8 sec);
quint8 getDelay(); quint8 getDelay();
void setDelay(quint8 sec); void setDelay(quint8 sec);
@ -149,10 +158,6 @@ public:
int getDefScreenshotType(); int getDefScreenshotType();
void setDefScreenshotType(const int type); void setDefScreenshotType(const int type);
// current screenshot type
int getScreenshotType();
void setScreenshotType(const int type);
quint8 getAutoCopyFilenameOnSaving(); quint8 getAutoCopyFilenameOnSaving();
void setAutoCopyFilenameOnSaving(quint8 val); void setAutoCopyFilenameOnSaving(quint8 val);
@ -192,7 +197,8 @@ public:
void setRestoredWndSize(int w, int h); void setRestoredWndSize(int w, int h);
void saveWndSize(); void saveWndSize();
// get default image save format // get image save format(s)
QStringList getFormatIDs() const;
int getDefaultFormatID(); int getDefaultFormatID();
QString getDirNameDefault(); QString getDirNameDefault();
@ -229,6 +235,9 @@ public:
bool getFitInside(); bool getFitInside();
void setFitInside(bool val); void setFitInside(bool val);
QRect getLastSelection();
void setLastSelection(QRect rect);
static QString getSysLang(); static QString getSysLang();
ShortcutManager* shortcuts(); ShortcutManager* shortcuts();
@ -256,13 +265,11 @@ private:
*/ */
void setValue(const QString& key, QVariant val); void setValue(const QString& key, QVariant val);
QSettings *_settings; Settings *_settings;
QHash<QString, QVariant> _confData; QHash<QString, QVariant> _confData;
ShortcutManager *_shortcuts; ShortcutManager *_shortcuts;
QVector<QString> _imageFormats;
int _scrNum; // screen num in session int _scrNum; // screen num in session
QDateTime _dateLastSaving; QDateTime _dateLastSaving;
}; };

@ -54,6 +54,7 @@ Core::Core()
_conf = Config::instance(); _conf = Config::instance();
_conf->loadSettings(); _conf->loadSettings();
_lastSelectedArea = _conf->getLastSelection();
_pixelMap = new QPixmap; _pixelMap = new QPixmap;
_selector = 0; _selector = 0;
@ -144,6 +145,9 @@ void Core::sleep(int msec)
void Core::coreQuit() void Core::coreQuit()
{ {
_conf->setLastSelection(_lastSelectedArea);
_conf->saveScreenshotSettings();
_conf->setRestoredWndSize(_wnd->width(), _wnd->height()); _conf->setRestoredWndSize(_wnd->width(), _wnd->height());
_conf->saveWndSize(); _conf->saveWndSize();
@ -183,7 +187,7 @@ void Core::screenShot(bool first)
if (_firstScreen) if (_firstScreen)
_conf->updateLastSaveDate(); _conf->updateLastSaveDate();
switch(_conf->getScreenshotType()) switch(_conf->getDefScreenshotType())
{ {
case Core::FullScreen: case Core::FullScreen:
{ {
@ -242,7 +246,7 @@ void Core::checkAutoSave(bool first)
} }
} }
void Core::getActiveWindow() void Core::getActiveWindow() // called only with window screenshots
{ {
const QList<QScreen *> screens = qApp->screens(); const QList<QScreen *> screens = qApp->screens();
const QDesktopWidget *desktop = QApplication::desktop(); const QDesktopWidget *desktop = QApplication::desktop();
@ -250,10 +254,34 @@ void Core::getActiveWindow()
WId wnd = KWindowSystem::activeWindow(); WId wnd = KWindowSystem::activeWindow();
if (!wnd) // this window screenshot will be invalid
// if there's no active window or the active window is ours
bool invalid(!wnd || !KWindowSystem::hasWId(wnd) || (_wnd && _wnd->winId() == wnd));
if (!invalid)
{ // or if it isn't on the current desktop
KWindowInfo info(wnd, NET::WMDesktop);
invalid = info.valid() && !info.isOnDesktop(KWindowSystem::currentDesktop());
if (!invalid)
{ // or if it is a desktop or panel/dock
info = KWindowInfo(wnd, NET::WMWindowType);
QFlags<NET::WindowTypeMask> flags;
flags |= NET::DesktopMask;
flags |= NET::DockMask;
invalid = info.valid() && NET::typeMatchesMask(info.windowType(NET::AllTypesMask), flags);
}
}
// also invalid if the window is shaded/invisible
KWindowInfo info(wnd, NET::XAWMState | NET::WMFrameExtents);
if (!invalid && info.mappingState() != NET::Visible)
invalid = true;
// if this is an invalid screenshot, take a fullscreen shot instead
if (invalid)
{ {
qWarning() << "Could not take a window screenshot.";
*_pixelMap = screens[screenNum]->grabWindow(desktop->winId()); *_pixelMap = screens[screenNum]->grabWindow(desktop->winId());
exit(1); return;
} }
// no decorations option is selected // no decorations option is selected
@ -263,11 +291,6 @@ void Core::getActiveWindow()
return; return;
} }
KWindowInfo info(wnd, NET::XAWMState | NET::WMFrameExtents);
if (info.mappingState() != NET::Visible)
qWarning() << "Window not visible";
QRect geometry = info.frameGeometry(); QRect geometry = info.frameGeometry();
*_pixelMap = screens[screenNum]->grabWindow(QApplication::desktop()->winId(), *_pixelMap = screens[screenNum]->grabWindow(QApplication::desktop()->winId(),
geometry.x(), geometry.x(),
@ -290,7 +313,7 @@ void Core::grabCursor(int offsetX, int offsetY)
} }
void Core::sendSystemNotify(const StateNotifyMessage &notify) void Core::sendSystemNotify(const StateNotifyMessage& /*notify*/)
{ {
qDebug() << "Send system notification"; qDebug() << "Send system notification";
} }
@ -511,7 +534,7 @@ void Core::processCmdLineOpts(const QStringList& arguments)
// Check commandline parameters and set screenshot type // Check commandline parameters and set screenshot type
for (int i=0; i < _screenTypeOpts.count(); ++i) for (int i=0; i < _screenTypeOpts.count(); ++i)
if (_cmdLine.isSet(_screenTypeOpts.at(i))) if (_cmdLine.isSet(_screenTypeOpts.at(i)))
_conf->setScreenshotType(i); _conf->setDefScreenshotType(i);
#ifdef SG_EXT_UPLOADS #ifdef SG_EXT_UPLOADS
/// FIXMA - In module interface need add the mthod for geting module cmdLine options /// FIXMA - In module interface need add the mthod for geting module cmdLine options

@ -26,6 +26,10 @@ int main(int argc, char *argv[])
{ {
SingleApp scr(argc, argv, VERSION); SingleApp scr(argc, argv, VERSION);
scr.setApplicationVersion(VERSION); scr.setApplicationVersion(VERSION);
scr.setOrganizationName(QStringLiteral("lxqt"));
scr.setOrganizationDomain(QStringLiteral("https://lxqt.org"));
scr.setApplicationName(QStringLiteral("screengrab"));
scr.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
Core *ScreenGrab = Core::instance(); Core *ScreenGrab = Core::instance();
ScreenGrab->modules()->initModules(); ScreenGrab->modules()->initModules();
ScreenGrab->processCmdLineOpts(scr.arguments()); ScreenGrab->processCmdLineOpts(scr.arguments());

@ -31,22 +31,13 @@ AboutDialog::AboutDialog(QWidget *parent):
_ui->setupUi(this); _ui->setupUi(this);
_ui->labAppName->setText(_ui->labAppName->text() + QString(" <b>") + qApp->applicationVersion() + QString("</b>")); _ui->labAppName->setText(_ui->labAppName->text() + QString(" <b>") + qApp->applicationVersion() + QString("</b>"));
QString versionInfo;
versionInfo = tr("built on ");
versionInfo.append(__DATE__);
versionInfo.append(" ");
versionInfo.append(__TIME__);
_ui->labQtVer->setText(tr("using Qt ") + qVersion()); _ui->labQtVer->setText(tr("using Qt ") + qVersion());
_ui->labVersion->setText(versionInfo);
QTabBar *tabs = new QTabBar; QTabBar *tabs = new QTabBar;
_ui->frame->layout()->addWidget(tabs); _ui->frame->layout()->addWidget(tabs);
_ui->frame->layout()->addWidget(_ui->txtArea); _ui->frame->layout()->addWidget(_ui->txtArea);
tabs->setFixedHeight(24);
tabs->insertTab(0, tr("About")); tabs->insertTab(0, tr("About"));
tabs->insertTab(1, tr("Thanks")); tabs->insertTab(1, tr("Thanks"));
tabs->insertTab(2, tr("Help us")); tabs->insertTab(2, tr("Help us"));
@ -108,14 +99,11 @@ QString AboutDialog::tabAbout()
str += "<b>ScreenGrab</b> "; str += "<b>ScreenGrab</b> ";
str += tr("is a crossplatform application for fast creating screenshots of your desktop."); str += tr("is a crossplatform application for fast creating screenshots of your desktop.");
str += "<br><br>"; str += "<br><br>";
str += tr("It is a light and powerful application and has been written using the Qt framework, so that you are able to use in Windows and Linux."); str += tr("It is a light and powerful application, written in Qt.");
str += "<br><br>"; str += "<br><br>";
str += tr("E-Mail")+" - ";
str += "<a href=mailto:doomer3d@gmail.com>doomer3d@gmail.com</a>";
str += "<br>";
str += tr("Website")+" - "; str += tr("Website")+" - ";
str += "<a href=http://screengrab.doomer.org>http://screengrab.doomer.org/</a>"; str += "<a href=\"https://github.com/lxqt/screengrab\">https://github.com/lxqt/screengrab</a>";
str += "<br><br>"; str += "<br><br>";
str += tr("Licensed under the "); str += tr("Licensed under the ");
@ -140,13 +128,9 @@ QString AboutDialog::tabHelpUs()
str += "<li>" + tr("Report bugs and issues") + "</li>"; str += "<li>" + tr("Report bugs and issues") + "</li>";
str += "</ul>"; str += "</ul>";
str += tr("E-Mail");
str += "<br>";
str += "<a href=mailto:doomer3d@gmail.com>mailto:doomer3d@gmail.com</a>";
str += "<br><br>";
str += tr("Bug tracker"); str += tr("Bug tracker");
str += "<br>"; str += "<br>";
str += "<a href=https://github.com/DOOMer/screengrab/issues>https://github.com/DOOMer/screengrab/issues/</a>"; str += "<a href=https://github.com/lxqt/screengrab/issues>https://github.com/lxqt/screengrab/issues/</a>";
return str; return str;
} }

@ -52,7 +52,7 @@
<string/> <string/>
</property> </property>
<property name="pixmap"> <property name="pixmap">
<pixmap resource="../../screengrab.qrc">:/res/img/logo.png</pixmap> <pixmap resource="../../../screengrab.qrc">:/res/img/logo.png</pixmap>
</property> </property>
</widget> </widget>
</item> </item>
@ -160,8 +160,8 @@
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="../../screengrab.qrc"/> <include location="../../../screengrab.qrc"/>
<include location="../../screengrab.qrc"/> <include location="../../../screengrab.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

@ -39,22 +39,19 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
_ui->setupUi(this); _ui->setupUi(this);
conf = Config::instance(); conf = Config::instance();
connect(_ui->butSaveOpt, &QPushButton::clicked, this, &ConfigDialog::saveSettings); connect(_ui->buttonBox->button(QDialogButtonBox::Save), &QPushButton::clicked, this, &ConfigDialog::saveSettings);
connect(_ui->buttonBrowse, &QPushButton::clicked, this, &ConfigDialog::selectDir); connect(_ui->buttonBrowse, &QPushButton::clicked, this, &ConfigDialog::selectDir);
connect(_ui->butRestoreOpt, &QPushButton::clicked, this, &ConfigDialog::restoreDefaults); connect(_ui->buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, &ConfigDialog::restoreDefaults);
connect(_ui->checkIncDate, &QCheckBox::toggled, this, &ConfigDialog::setVisibleDateTplEdit); connect(_ui->checkIncDate, &QCheckBox::toggled, this, &ConfigDialog::setVisibleDateTplEdit);
connect(_ui->keyWidget, &QKeySequenceWidget::keySequenceAccepted, this, &ConfigDialog::acceptShortcut); connect(_ui->keyWidget, &QKeySequenceWidget::keySequenceAccepted, this, &ConfigDialog::acceptShortcut);
connect(_ui->keyWidget, &QKeySequenceWidget::keyNotSupported, this, &ConfigDialog::keyNotSupported); connect(_ui->keyWidget, &QKeySequenceWidget::keyNotSupported, this, &ConfigDialog::keyNotSupported);
connect(_ui->checkAutoSave, &QCheckBox::toggled, this, &ConfigDialog::setVisibleAutoSaveFirst); connect(_ui->checkAutoSave, &QCheckBox::toggled, this, &ConfigDialog::setVisibleAutoSaveFirst);
connect(_ui->butCancel, &QPushButton::clicked, this, &ConfigDialog::reject); connect(_ui->buttonBox->button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &ConfigDialog::reject);
connect(_ui->treeKeys, &QTreeWidget::expanded, _ui->treeKeys, &QTreeWidget::clearSelection); connect(_ui->treeKeys, &QTreeWidget::expanded, _ui->treeKeys, &QTreeWidget::clearSelection);
connect(_ui->treeKeys, &QTreeWidget::collapsed, this, &ConfigDialog::collapsTreeKeys); connect(_ui->treeKeys, &QTreeWidget::collapsed, this, &ConfigDialog::collapsTreeKeys);
connect(_ui->checkShowTray, &QCheckBox::toggled, this, &ConfigDialog::toggleCheckShowTray); connect(_ui->checkShowTray, &QCheckBox::toggled, this, &ConfigDialog::toggleCheckShowTray);
connect(_ui->editDateTmeTpl, &QLineEdit::textEdited, this, &ConfigDialog::editDateTmeTpl); connect(_ui->editDateTmeTpl, &QLineEdit::textEdited, this, &ConfigDialog::editDateTmeTpl);
void (QSpinBox::*delayChange)(int) = &QSpinBox::valueChanged;
connect(_ui->defDelay, delayChange, this, &ConfigDialog::changeDefDelay);
void (QSpinBox::*timeToTray)(int) = &QSpinBox::valueChanged; void (QSpinBox::*timeToTray)(int) = &QSpinBox::valueChanged;
connect(_ui->timeTrayMess, timeToTray, this, &ConfigDialog::changeTimeTrayMess); connect(_ui->timeTrayMess, timeToTray, this, &ConfigDialog::changeTimeTrayMess);
@ -73,13 +70,11 @@ ConfigDialog::ConfigDialog(QWidget *parent) :
connect(_ui->cbxFormat, formatChabge, this, &ConfigDialog::changeFormatType); connect(_ui->cbxFormat, formatChabge, this, &ConfigDialog::changeFormatType);
loadSettings(); loadSettings();
changeDefDelay(conf->getDefDelay());
setVisibleDateTplEdit(conf->getDateTimeInFilename()); setVisibleDateTplEdit(conf->getDateTimeInFilename());
setVisibleAutoSaveFirst(conf->getAutoSave()); setVisibleAutoSaveFirst(conf->getAutoSave());
_ui->listWidget->setCurrentRow(0); _ui->listWidget->setCurrentRow(0);
_ui->tabMain->setCurrentIndex(0);
editDateTmeTpl(conf->getDateTimeTpl()); editDateTmeTpl(conf->getDateTimeTpl());
@ -148,12 +143,9 @@ void ConfigDialog::loadSettings()
_ui->editDir->setText(conf->getSaveDir()); _ui->editDir->setText(conf->getSaveDir());
_ui->editFileName->setText(conf->getSaveFileName()); _ui->editFileName->setText(conf->getSaveFileName());
_ui->cbxFormat->addItem("png"); _ui->cbxFormat->addItems(conf->getFormatIDs());
_ui->cbxFormat->addItem("jpg");
_ui->cbxFormat->setCurrentIndex(conf->getDefaultFormatID()); _ui->cbxFormat->setCurrentIndex(conf->getDefaultFormatID());
_ui->defDelay->setValue(conf->getDefDelay());
_ui->cbxTypeScr->setCurrentIndex(conf->getDefScreenshotType());
_ui->checkIncDate->setChecked(conf->getDateTimeInFilename()); _ui->checkIncDate->setChecked(conf->getDateTimeInFilename());
_ui->editDateTmeTpl->setText(conf->getDateTimeTpl()); _ui->editDateTmeTpl->setText(conf->getDateTimeTpl());
_ui->cbxCopyFileName->setCurrentIndex(conf->getAutoCopyFilenameOnSaving()); _ui->cbxCopyFileName->setCurrentIndex(conf->getAutoCopyFilenameOnSaving());
@ -162,15 +154,12 @@ void ConfigDialog::loadSettings()
_ui->cbxTrayMsg->setCurrentIndex(conf->getTrayMessages()); _ui->cbxTrayMsg->setCurrentIndex(conf->getTrayMessages());
changeTrayMsgType(_ui->cbxTrayMsg->currentIndex()); changeTrayMsgType(_ui->cbxTrayMsg->currentIndex());
_ui->timeTrayMess->setValue(conf->getTimeTrayMess()); _ui->timeTrayMess->setValue(conf->getTimeTrayMess());
_ui->checkAutoSave->setChecked(conf->getAutoSave());; _ui->checkAutoSave->setChecked(conf->getAutoSave());
_ui->checkAutoSaveFirst->setChecked(conf->getAutoSaveFirst());; _ui->checkAutoSaveFirst->setChecked(conf->getAutoSaveFirst());
_ui->checkZommMouseArea->setChecked(conf->getZoomAroundMouse());
_ui->cbxIncludeCursor->setChecked(conf->getIncludeCursor());
_ui->checkInTray->setChecked(conf->getCloseInTray()); _ui->checkInTray->setChecked(conf->getCloseInTray());
_ui->checkAllowCopies->setChecked(conf->getAllowMultipleInstance()); _ui->checkAllowCopies->setChecked(conf->getAllowMultipleInstance());
_ui->checkNoDecorX11->setChecked(conf->getNoDecoration());
_ui->checkShowTray->setChecked(conf->getShowTrayIcon()); _ui->checkShowTray->setChecked(conf->getShowTrayIcon());
toggleCheckShowTray(conf->getShowTrayIcon()); toggleCheckShowTray(conf->getShowTrayIcon());
@ -201,17 +190,9 @@ void ConfigDialog::setVisibleAutoSaveFirst(bool status)
void ConfigDialog::changeFormatType(int type) void ConfigDialog::changeFormatType(int type)
{ {
if (type == 1) if (type == 1)
{ _ui->groupQuality->setVisible(true);
_ui->slideImgQuality->setVisible(true);;
_ui->labImgQuality->setVisible(true);
_ui->labImgQualityCurrent->setVisible(true);;
}
else else
{ _ui->groupQuality->setVisible(false);
_ui->slideImgQuality->setVisible(false);
_ui->labImgQuality->setVisible(false);
_ui->labImgQualityCurrent->setVisible(false);;
}
} }
@ -253,8 +234,6 @@ void ConfigDialog::saveSettings()
conf->setSaveDir(_ui->editDir->text()); conf->setSaveDir(_ui->editDir->text());
conf->setSaveFileName(_ui->editFileName->text()); conf->setSaveFileName(_ui->editFileName->text());
conf->setSaveFormat(_ui->cbxFormat->currentText()); conf->setSaveFormat(_ui->cbxFormat->currentText());
conf->setDefDelay(_ui->defDelay->value());
conf->setDefScreenshotType(_ui->cbxTypeScr->currentIndex());
conf->setDateTimeInFilename(_ui->checkIncDate->isChecked()); conf->setDateTimeInFilename(_ui->checkIncDate->isChecked());
conf->setDateTimeTpl(_ui->editDateTmeTpl->text()); conf->setDateTimeTpl(_ui->editDateTmeTpl->text());
conf->setAutoCopyFilenameOnSaving(_ui->cbxCopyFileName->currentIndex()); conf->setAutoCopyFilenameOnSaving(_ui->cbxCopyFileName->currentIndex());
@ -262,14 +241,11 @@ void ConfigDialog::saveSettings()
conf->setAutoSaveFirst(_ui->checkAutoSaveFirst->isChecked()); conf->setAutoSaveFirst(_ui->checkAutoSaveFirst->isChecked());
conf->setTrayMessages(_ui->cbxTrayMsg->currentIndex()); conf->setTrayMessages(_ui->cbxTrayMsg->currentIndex());
conf->setCloseInTray(_ui->checkInTray->isChecked()); conf->setCloseInTray(_ui->checkInTray->isChecked());
conf->setIncludeCursor(_ui->cbxIncludeCursor->isChecked());
conf->setZoomAroundMouse(_ui->checkZommMouseArea->isChecked());
conf->setAllowMultipleInstance(_ui->checkAllowCopies->isChecked()); conf->setAllowMultipleInstance(_ui->checkAllowCopies->isChecked());
conf->setTimeTrayMess(_ui->timeTrayMess->value()); conf->setTimeTrayMess(_ui->timeTrayMess->value());
conf->setShowTrayIcon(_ui->checkShowTray->isChecked()); conf->setShowTrayIcon(_ui->checkShowTray->isChecked());
conf->setImageQuality(_ui->slideImgQuality->value()); conf->setImageQuality(_ui->slideImgQuality->value());
conf->setEnableExtView(_ui->cbxEnableExtView->isChecked()); conf->setEnableExtView(_ui->cbxEnableExtView->isChecked());
conf->setNoDecoration(_ui->checkNoDecorX11->isChecked());
conf->setFitInside(_ui->checkFitInside->isChecked()); conf->setFitInside(_ui->checkFitInside->isChecked());
// save shortcuts in shortcutmanager // save shortcuts in shortcutmanager
@ -297,7 +273,6 @@ void ConfigDialog::saveSettings()
// update values of front-end settings // update values of front-end settings
conf->saveSettings(); conf->saveSettings();
conf->setDelay(conf->getDefDelay());
// call save method on modeule's configwidgets' // call save method on modeule's configwidgets'
for (int i = 0; i < _moduleWidgetNames.count(); ++i) for (int i = 0; i < _moduleWidgetNames.count(); ++i)
@ -349,12 +324,6 @@ void ConfigDialog::restoreDefaults()
} }
} }
void ConfigDialog::changeDefDelay(int val)
{
if (val == 0)
_ui->defDelay->setSpecialValueText(tr("None"));
}
void ConfigDialog::changeTimeTrayMess(int sec) void ConfigDialog::changeTimeTrayMess(int sec)
{ {
conf->setTimeTrayMess(sec); conf->setTimeTrayMess(sec);

@ -62,7 +62,6 @@ private slots:
void setVisibleDateTplEdit(bool); void setVisibleDateTplEdit(bool);
void changeTrayMsgType(int type); void changeTrayMsgType(int type);
void changeTimeTrayMess(int sec); void changeTimeTrayMess(int sec);
void changeDefDelay(int val);
void setVisibleAutoSaveFirst(bool status); void setVisibleAutoSaveFirst(bool status);
void changeFormatType(int type); void changeFormatType(int type);
void changeImgQualituSlider(int pos); void changeImgQualituSlider(int pos);

@ -57,9 +57,6 @@
<property name="textElideMode"> <property name="textElideMode">
<enum>Qt::ElideNone</enum> <enum>Qt::ElideNone</enum>
</property> </property>
<property name="flow">
<enum>QListView::TopToBottom</enum>
</property>
<property name="isWrapping" stdset="0"> <property name="isWrapping" stdset="0">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -109,42 +106,15 @@
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="page_6"> <widget class="QWidget" name="page_6">
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="tabMain">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tabSaving">
<attribute name="title">
<string>Saving</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>4</number> <number>5</number>
</property>
<property name="rightMargin">
<number>0</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="labDirectory"> <widget class="QGroupBox" name="groupBox">
<property name="text"> <property name="title">
<string>Default save directory:</string> <string>Default save directory</string>
</property> </property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QLineEdit" name="editDir"> <widget class="QLineEdit" name="editDir">
@ -170,9 +140,14 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
</layout> <item>
</item> <widget class="QGroupBox" name="groupBox_1">
<property name="title">
<string>Default file</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_14"> <layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="rightMargin"> <property name="rightMargin">
@ -183,7 +158,7 @@
<item> <item>
<widget class="QLabel" name="labFilename"> <widget class="QLabel" name="labFilename">
<property name="text"> <property name="text">
<string>Default filename:</string> <string>Name:</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -222,6 +197,9 @@
</item> </item>
</layout> </layout>
</item> </item>
</layout>
</widget>
</item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_11"> <layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="leftMargin"> <property name="leftMargin">
@ -262,153 +240,11 @@
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer_5"> <widget class="QGroupBox" name="groupQuality">
<property name="orientation"> <property name="title">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>82</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabScreenshot">
<attribute name="title">
<string>Screenshot</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Delay:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="defDelay">
<property name="toolTip">
<string>Default delay before grabbing screen</string>
</property>
<property name="wrapping">
<bool>false</bool>
</property>
<property name="suffix">
<string> sec</string>
</property>
<property name="prefix">
<string/>
</property>
<property name="maximum">
<number>90</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkNoDecorX11">
<property name="text">
<string>No window decoration</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_15">
<item>
<widget class="QLabel" name="labTypeScr_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>Type: </string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxTypeScr">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Type of screenshot</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Full screen</string>
</property>
</item>
<item>
<property name="text">
<string>Window</string>
</property>
</item>
<item>
<property name="text">
<string>Screen area</string>
</property>
</item>
<item>
<property name="text">
<string>Previous selection</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>118</width>
<height>28</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labImgQuality">
<property name="text">
<string>Image quality</string> <string>Image quality</string>
</property> </property>
</widget> <layout class="QHBoxLayout" name="horizontalLayout_2">
</item>
<item row="3" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item> <item>
<widget class="QSlider" name="slideImgQuality"> <widget class="QSlider" name="slideImgQuality">
<property name="toolTip"> <property name="toolTip">
@ -436,42 +272,28 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="cbxIncludeCursor">
<property name="text">
<string>Include mouse pointer</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QCheckBox" name="checkZommMouseArea">
<property name="text">
<string>Zoom area around mouse in selection mode</string>
</property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>117</height> <height>298</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget> </widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2"> <widget class="QWidget" name="page_2">
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -606,6 +428,9 @@
</widget> </widget>
<widget class="QWidget" name="page_4"> <widget class="QWidget" name="page_4">
<layout class="QVBoxLayout" name="verticalLayout_13"> <layout class="QVBoxLayout" name="verticalLayout_13">
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin"> <property name="topMargin">
<number>0</number> <number>0</number>
</property> </property>
@ -842,63 +667,9 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QPushButton" name="butRestoreOpt"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="minimumSize"> <property name="standardButtons">
<size> <set>QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save</set>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Restore default settings</string>
</property>
<property name="text">
<string>Defaults</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>88</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="butSaveOpt">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Save settings</string>
</property>
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="butCancel">
<property name="minimumSize">
<size>
<width>112</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Discard changes</string>
</property>
<property name="text">
<string>Cancel</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -913,10 +684,6 @@
<header>qkeysequencewidget.h</header> <header>qkeysequencewidget.h</header>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<tabstops>
<tabstop>butSaveOpt</tabstop>
<tabstop>butCancel</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>

@ -32,7 +32,7 @@
#include <QMenu> #include <QMenu>
MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent),
_ui(new Ui::MainWindow), _conf(NULL), _trayMenu(NULL) _ui(new Ui::MainWindow), _conf(nullptr), _trayMenu(nullptr)
{ {
_ui->setupUi(this); _ui->setupUi(this);
_trayed = false; _trayed = false;
@ -56,8 +56,9 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent),
connect(_globalShortcutSignals, SIGNAL(mapped(int)), this, SLOT(globalShortcutActivate(int))); connect(_globalShortcutSignals, SIGNAL(mapped(int)), this, SLOT(globalShortcutActivate(int)));
#endif #endif
_trayIcon = NULL; _trayIcon = nullptr;
_hideWnd = NULL; _hideWnd = nullptr;
_trayMenu = nullptr;
// create actions menu // create actions menu
actNew = new QAction(QIcon::fromTheme("document-new"), tr("New"), this); actNew = new QAction(QIcon::fromTheme("document-new"), tr("New"), this);
@ -106,14 +107,20 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent),
void (QComboBox::*typeScr)(int) = &QComboBox::currentIndexChanged; void (QComboBox::*typeScr)(int) = &QComboBox::currentIndexChanged;
connect(_ui->cbxTypeScr, typeScr, this, &MainWindow::typeScreenShotChange); connect(_ui->cbxTypeScr, typeScr, this, &MainWindow::typeScreenShotChange);
connect(_ui->checkIncludeCursor, &QCheckBox::toggled, this, &MainWindow::checkIncludeCursor); connect(_ui->checkIncludeCursor, &QCheckBox::toggled, this, &MainWindow::checkIncludeCursor);
connect(_ui->checkNoDecoration, &QCheckBox::toggled, this, &MainWindow::checkNoDecoration);
connect(_ui->checkZommMouseArea, &QCheckBox::toggled, this, &MainWindow::checkZommMouseArea);
QIcon icon(":/res/img/logo.png"); appIcon = QIcon::fromTheme ("screengrab");
setWindowIcon(icon); if (appIcon.isNull())
appIcon = QIcon(":/res/img/logo.png");
setWindowIcon(appIcon);
QRect geometry = QApplication::desktop()->availableGeometry(QApplication::desktop()->screenNumber()); QRect geometry = QApplication::desktop()->availableGeometry(QApplication::desktop()->screenNumber());
move(geometry.width() / 2 - width() / 2, geometry.height() / 2 - height() / 2); move(geometry.width() / 2 - width() / 2, geometry.height() / 2 - height() / 2);
_ui->scrLabel->installEventFilter(this); _ui->scrLabel->installEventFilter(this);
_ui->delayBox->installEventFilter(this);
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
@ -151,20 +158,29 @@ void MainWindow::resizeEvent(QResizeEvent *event)
// get size dcreen pixel map // get size dcreen pixel map
QSize scaleSize = Core::instance()->getPixmap()->size(); // get orig size pixmap QSize scaleSize = Core::instance()->getPixmap()->size(); // get orig size pixmap
scaleSize.scale(_ui->scrLabel->size(), Qt::KeepAspectRatio); scaleSize.scale(_ui->scrLabel->contentsRect().size(), Qt::KeepAspectRatio);
// if not scrlabel pixmap
if (!_ui->scrLabel->pixmap() || scaleSize != _ui->scrLabel->pixmap()->size()) if (!_ui->scrLabel->pixmap() || scaleSize != _ui->scrLabel->pixmap()->size())
updatePixmap(Core::instance()->getPixmap()); updatePixmap(Core::instance()->getPixmap());
} }
bool MainWindow::eventFilter(QObject* obj, QEvent* event) bool MainWindow::eventFilter(QObject* obj, QEvent* event)
{ {
if (obj == _ui->scrLabel && event->type() == QEvent::ToolTip) if (obj == _ui->scrLabel)
{
if (event->type() == QEvent::ToolTip)
displatScreenToolTip(); displatScreenToolTip();
else if (event->type() == QEvent::MouseButtonDblClick)
else if (obj == _ui->scrLabel && event->type() == QEvent::MouseButtonDblClick)
Core::instance()->openInExtViewer(); Core::instance()->openInExtViewer();
}
else if (obj == _ui->delayBox && event->type() == QEvent::ShortcutOverride)
{ // filter out Ctrl+C because we need it
if (QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event))
{
if ((keyEvent->modifiers() & Qt::ControlModifier) && keyEvent->key() == Qt::Key_C)
return true;
}
}
return QObject::eventFilter(obj, event); return QObject::eventFilter(obj, event);
} }
@ -172,8 +188,11 @@ bool MainWindow::eventFilter(QObject* obj, QEvent* event)
void MainWindow::updatePixmap(QPixmap *pMap) void MainWindow::updatePixmap(QPixmap *pMap)
{ {
_ui->scrLabel->setPixmap(pMap->scaled(_ui->scrLabel->size(), QSize lSize = _ui->scrLabel->contentsRect().size();
Qt::KeepAspectRatio, Qt::SmoothTransformation)); // never scale up the image beyond its real size
_ui->scrLabel->setPixmap(lSize.width() < pMap->width() || lSize.height() < pMap->height()
? pMap->scaled(lSize, Qt::KeepAspectRatio, Qt::SmoothTransformation)
: *pMap);
} }
void MainWindow::updateModulesActions(QList<QAction *> list) void MainWindow::updateModulesActions(QList<QAction *> list)
@ -219,7 +238,7 @@ void MainWindow::show()
if (_conf->getShowTrayIcon()) if (_conf->getShowTrayIcon())
{ {
_trayIcon->blockSignals(false); _trayIcon->blockSignals(false);
_trayIcon->setContextMenu(_trayMenu); // enable context menu _trayIcon->setContextMenu(_trayMenu);
} }
if (_trayIcon) if (_trayIcon)
@ -230,7 +249,7 @@ void MainWindow::show()
bool MainWindow::isTrayed() const bool MainWindow::isTrayed() const
{ {
return _trayIcon != NULL; return _trayIcon != nullptr;
} }
void MainWindow::showTrayMessage(const QString& header, const QString& message) void MainWindow::showTrayMessage(const QString& header, const QString& message)
@ -294,7 +313,7 @@ void MainWindow::showHelp()
void MainWindow::showOptions() void MainWindow::showOptions()
{ {
ConfigDialog *options = new ConfigDialog(); ConfigDialog *options = new ConfigDialog(this);
#ifdef SG_GLOBAL_SHORTCUTS #ifdef SG_GLOBAL_SHORTCUTS
globalShortcutBlock(true); globalShortcutBlock(true);
#endif #endif
@ -302,9 +321,12 @@ void MainWindow::showOptions()
if (isMinimized()) if (isMinimized())
{ {
showNormal(); showNormal();
disableTrayMenuActions(true);
if (options->exec() == QDialog::Accepted) if (options->exec() == QDialog::Accepted)
updateUI(); updateUI();
hideToShot(); disableTrayMenuActions(false);
if (_trayIcon) // the tray may have been removed
windowHideShow(); // hides the window in this case
} }
else else
{ {
@ -325,8 +347,10 @@ void MainWindow::showAbout()
if (isMinimized()) if (isMinimized())
{ {
showNormal(); showNormal();
disableTrayMenuActions(true);
about->exec(); about->exec();
hideToShot(); disableTrayMenuActions(false);
windowHideShow(); // hides the window in this case
} }
else else
about->exec(); about->exec();
@ -343,7 +367,7 @@ void MainWindow::displatScreenToolTip()
if (_conf->getEnableExtView()) if (_conf->getEnableExtView())
{ {
toolTip += "\n\n"; toolTip += "\n\n";
toolTip += tr("Double click for open screenshot in external default image viewer"); toolTip += tr("Double click to open screenshot in external default image viewer");
} }
_ui->scrLabel->setToolTip(toolTip); _ui->scrLabel->setToolTip(toolTip);
@ -370,36 +394,53 @@ void MainWindow::createTray()
_trayMenu->addSeparator(); _trayMenu->addSeparator();
_trayMenu->addAction(actQuit); _trayMenu->addAction(actQuit);
// icon menu
QIcon icon(":/res/img/logo.png");
_trayIcon = new QSystemTrayIcon(this); _trayIcon = new QSystemTrayIcon(this);
_trayIcon->setContextMenu(_trayMenu); _trayIcon->setContextMenu(_trayMenu);
_trayIcon->setIcon(icon); _trayIcon->setIcon(appIcon);
_trayIcon->show(); _trayIcon->show();
connect(_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::trayClick); connect(_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::trayClick);
} }
void MainWindow::disableTrayMenuActions(bool disable)
{
// On the one hand, QSystemTrayIcon::setContextMenu() can't be used for changing/removing
// the menu. On the other hand, deleting/recreating the current menu isn't a good way of
// disabling the context menu. Instead, we disable/enable menu ACTIONS when needed.
if (_trayMenu)
{
const QList<QAction*> actions = _trayMenu->actions();
for (QAction *action : actions)
action->setDisabled(disable);
}
}
void MainWindow::killTray() void MainWindow::killTray()
{ {
// the actions should be enabled because they're shared with the main window
disableTrayMenuActions(false);
_trayed = false; _trayed = false;
_trayMenu->clear();
delete _trayMenu;
_trayMenu = nullptr;
delete _trayIcon; delete _trayIcon;
_trayIcon = NULL; _trayIcon = nullptr;
} }
void MainWindow::delayBoxChange(int delay) void MainWindow::delayBoxChange(int delay)
{ {
if (delay == 0)
_ui->delayBox->setSpecialValueText(tr("None"));
_conf->setDelay(delay); _conf->setDelay(delay);
} }
void MainWindow::typeScreenShotChange(int type) void MainWindow::typeScreenShotChange(int type)
{ {
_conf->setScreenshotType(type); _conf->setDefScreenshotType(type);
// show/hide checkboxes according to the type
_ui->checkNoDecoration->setVisible(type == 1);
_ui->checkIncludeCursor->setVisible(type < 2);
_ui->checkZommMouseArea->setVisible(type >= 2);
} }
void MainWindow::checkIncludeCursor(bool include) void MainWindow::checkIncludeCursor(bool include)
@ -407,11 +448,30 @@ void MainWindow::checkIncludeCursor(bool include)
_conf->setIncludeCursor(include); _conf->setIncludeCursor(include);
} }
void MainWindow::checkNoDecoration(bool noDecor)
{
_conf->setNoDecoration(noDecor);
}
void MainWindow::checkZommMouseArea(bool zoom)
{
_conf->setZoomAroundMouse(zoom);
}
// updating UI from configdata // updating UI from configdata
void MainWindow::updateUI() void MainWindow::updateUI()
{ {
_ui->delayBox->setValue(_conf->getDelay()); _ui->delayBox->setValue(_conf->getDelay());
_ui->cbxTypeScr->setCurrentIndex(_conf->getDefScreenshotType());
int type = _conf->getDefScreenshotType();
_ui->cbxTypeScr->setCurrentIndex(type);
// show/hide checkboxes according to the type
_ui->checkNoDecoration->setVisible(type == 1);
_ui->checkIncludeCursor->setVisible(type < 2);
_ui->checkZommMouseArea->setVisible(type >= 2);
_ui->checkZommMouseArea->setChecked(_conf->getZoomAroundMouse());
_ui->checkNoDecoration->setChecked(_conf->getNoDecoration());
_ui->checkIncludeCursor->setChecked(_conf->getIncludeCursor()); _ui->checkIncludeCursor->setChecked(_conf->getIncludeCursor());
updateShortcuts(); updateShortcuts();
@ -428,6 +488,12 @@ void MainWindow::updateUI()
// mouse clicks on tray icom // mouse clicks on tray icom
void MainWindow::trayClick(QSystemTrayIcon::ActivationReason reason) void MainWindow::trayClick(QSystemTrayIcon::ActivationReason reason)
{ {
if (findChildren<QDialog*>().count() > 0)
{ // just activate the window when there's a dialog
activateWindow();
raise();
return;
}
switch(reason) switch(reason)
{ {
case QSystemTrayIcon::Trigger: case QSystemTrayIcon::Trigger:
@ -460,7 +526,7 @@ void MainWindow::hideToShot()
if (_conf->getShowTrayIcon()) if (_conf->getShowTrayIcon())
{ {
_trayIcon->blockSignals(true); _trayIcon->blockSignals(true);
_trayIcon->setContextMenu(NULL); // enable context menu disableTrayMenuActions(true);
} }
hide(); hide();
@ -479,47 +545,51 @@ void MainWindow::showWindow(const QString& str)
void MainWindow::restoreFromShot() void MainWindow::restoreFromShot()
{ {
if (!isVisible() && !_trayed)
showNormal();
// if show tray
if (_conf->getShowTrayIcon()) if (_conf->getShowTrayIcon())
{ {
_trayIcon->blockSignals(false); _trayIcon->blockSignals(false);
_trayIcon->setContextMenu(_trayMenu); // enable context menu disableTrayMenuActions(false);
} }
showNormal();
} }
void MainWindow::saveScreen() void MainWindow::saveScreen()
{ {
bool wasMinimized(isMinimized());
if (wasMinimized)
{
showNormal();
disableTrayMenuActions(true);
}
// create initial filepath // create initial filepath
QHash<QString, QString> formatsAvalible; QHash<QString, QString> formatsAvalible;
const QStringList formatIDs = _conf->getFormatIDs();
for (const QString &formatID : formatIDs)
formatsAvalible[formatID] = tr("%1 Files").arg(formatID.toUpper());
formatsAvalible["png"] = tr("PNG Files"); QString format = formatIDs.at(_conf->getDefaultFormatID());
formatsAvalible["jpg"] = tr("JPEG Files");
QString format = "png";
_conf->getSaveFormat(); _conf->getSaveFormat();
Core* c = Core::instance(); Core* c = Core::instance();
QString filePath = c->getSaveFilePath(format); QString filePath = c->getSaveFilePath(format);
// create file filters
QString fileFilters;
QString filterSelected; QString filterSelected;
filterSelected = formatsAvalible[format];
// create file filters
QStringList fileFilters;
QHash<QString, QString>::const_iterator iter = formatsAvalible.constBegin(); QHash<QString, QString>::const_iterator iter = formatsAvalible.constBegin();
while (iter != formatsAvalible.constEnd()) while (iter != formatsAvalible.constEnd())
{ {
fileFilters.append(iter.value() + " (*." + iter.key() + ");;"); QString str = iter.value() + " (*." + iter.key() + ")";
if (iter.key() == format)
filterSelected = str;
fileFilters << str;
++iter; ++iter;
} }
fileFilters.chop(2);
QString fileName; QString fileName;
fileName = QFileDialog::getSaveFileName(this, tr("Save As..."), filePath, fileFilters, &filterSelected, QFileDialog::DontUseNativeDialog); fileName = QFileDialog::getSaveFileName(this, tr("Save As..."), filePath, fileFilters.join(";;"), &filterSelected);
QRegExp rx("\\(\\*\\.[a-z]{3,4}\\)"); QRegExp rx("\\(\\*\\.[a-z]{3,4}\\)");
quint8 tmp = filterSelected.size() - rx.indexIn(filterSelected); quint8 tmp = filterSelected.size() - rx.indexIn(filterSelected);
@ -527,6 +597,12 @@ void MainWindow::saveScreen()
filterSelected.chop(tmp + 1); filterSelected.chop(tmp + 1);
format = formatsAvalible.key(filterSelected); format = formatsAvalible.key(filterSelected);
if (wasMinimized)
{
disableTrayMenuActions(false);
windowHideShow(); // hides the window in this case
}
// if user canceled saving // if user canceled saving
if (fileName.isEmpty()) if (fileName.isEmpty())
return; return;

@ -82,6 +82,7 @@ private:
QMenu *_trayMenu; QMenu *_trayMenu;
QShortcut *_hideWnd; QShortcut *_hideWnd;
bool _trayed; bool _trayed;
QIcon appIcon;
#ifdef SG_GLOBAL_SHORTCUTS #ifdef SG_GLOBAL_SHORTCUTS
QxtGlobalShortcut *_fullScreen; QxtGlobalShortcut *_fullScreen;
@ -95,6 +96,7 @@ private:
void displatScreenToolTip(); void displatScreenToolTip();
void createTray(); void createTray();
void killTray(); void killTray();
void disableTrayMenuActions(bool disable);
void updateShortcuts(); void updateShortcuts();
private Q_SLOTS: private Q_SLOTS:
@ -105,6 +107,8 @@ private Q_SLOTS:
void delayBoxChange(int); void delayBoxChange(int);
void typeScreenShotChange(int type); void typeScreenShotChange(int type);
void checkIncludeCursor(bool include); void checkIncludeCursor(bool include);
void checkNoDecoration(bool noDecor);
void checkZommMouseArea(bool zoom);
void updateUI(); void updateUI();
void trayClick(QSystemTrayIcon::ActivationReason reason); void trayClick(QSystemTrayIcon::ActivationReason reason);

@ -6,16 +6,10 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>640</width>
<height>343</height> <height>498</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>480</width>
<height>299</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>ScreenGrab</string> <string>ScreenGrab</string>
</property> </property>
@ -26,10 +20,10 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>5</number>
</property>
<item> <item>
<widget class="QLabel" name="scrLabel"> <widget class="QLabel" name="scrLabel">
<property name="sizePolicy"> <property name="sizePolicy">
@ -40,8 +34,8 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>450</width> <width>600</width>
<height>190</height> <height>400</height>
</size> </size>
</property> </property>
<property name="frameShape"> <property name="frameShape">
@ -59,26 +53,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="bottomBar" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
@ -86,12 +61,25 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>5</width>
<height>13</height> <height>5</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QLabel" name="labTypeScr">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Type:</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QComboBox" name="cbxTypeScr"> <widget class="QComboBox" name="cbxTypeScr">
<property name="enabled"> <property name="enabled">
@ -120,27 +108,37 @@
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Previous selection</string> <string>Last selected area</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labTypeScr"> <spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>5</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="labDelay">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text"> <property name="text">
<string>Type: </string> <string>Delay:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@ -152,15 +150,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Delay in seconds before taking screenshot</string> <string>Delay in seconds before taking screenshot</string>
</property> </property>
<property name="specialValueText">
<string>None</string>
</property>
<property name="suffix"> <property name="suffix">
<string> sec</string> <string> sec</string>
</property> </property>
@ -169,19 +164,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="labDelay">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Delay</string>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
@ -189,17 +171,19 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>5</width>
<height>13</height> <height>5</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
</layout> </layout>
</widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>10</number>
</property>
<item> <item>
<spacer name="horizontalSpacer_3"> <spacer name="horizontalSpacer_3">
<property name="orientation"> <property name="orientation">
@ -207,12 +191,26 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>5</width>
<height>20</height> <height>5</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item>
<widget class="QCheckBox" name="checkZommMouseArea">
<property name="text">
<string>Zoom area around mouse</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkNoDecoration">
<property name="text">
<string>No window decoration</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QCheckBox" name="checkIncludeCursor"> <widget class="QCheckBox" name="checkIncludeCursor">
<property name="text"> <property name="text">
@ -227,8 +225,8 @@
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>5</width>
<height>20</height> <height>5</height>
</size> </size>
</property> </property>
</spacer> </spacer>

@ -88,6 +88,6 @@ void ExtEdit::createAppList()
QMimeType mt = db.mimeTypeForFile(fileName); QMimeType mt = db.mimeTypeForFile(fileName);
_appList = XdgDesktopFileCache::getApps(mt.name()); _appList = XdgDesktopFileCache::getApps(mt.name());
foreach (XdgDesktopFile *app, _appList) for (XdgDesktopFile *app : qAsConst(_appList))
_actionList << new XdgAction(app); _actionList << new XdgAction(app);
} }

@ -47,9 +47,9 @@ void ModuleExtEdit::init()
QMenu* ModuleExtEdit::initModuleMenu() QMenu* ModuleExtEdit::initModuleMenu()
{ {
QMenu *menu = new QMenu(QObject::tr("Edit in..."), 0); QMenu *menu = new QMenu(QObject::tr("Edit in..."), 0);
QList<XdgAction*> actionsList = _extEdit->getActions(); const QList<XdgAction*> actionsList = _extEdit->getActions();
foreach (XdgAction *appAction, actionsList) for (XdgAction *appAction : actionsList)
{ {
menu->addAction(appAction); menu->addAction(appAction);
appAction->disconnect(SIGNAL(triggered())); appAction->disconnect(SIGNAL(triggered()));

@ -33,8 +33,7 @@ QStringList UploaderConfig::_labelsList = QStringList() << "Imgur";
UploaderConfig::UploaderConfig() UploaderConfig::UploaderConfig()
{ {
QString configFile = Config::getConfigDir() + QDir::separator() + "uploader.conf"; _settings = new QSettings ("screengrab", "uploader");
_settings = new QSettings(configFile, QSettings::IniFormat);
_groupsList << "imgur.com" << "mediacru.sh"; _groupsList << "imgur.com" << "mediacru.sh";
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

@ -4,158 +4,147 @@
<context> <context>
<name>AboutDialog</name> <name>AboutDialog</name>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="35"/> <location filename="../src/core/ui/about.cpp" line="34"/>
<source>built on </source>
<translation>compilé le </translation>
</message>
<message>
<location filename="../src/core/ui/about.cpp" line="40"/>
<source>using Qt </source> <source>using Qt </source>
<translation>en utilisant Qt</translation> <translation>en utilisant Qt</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="50"/> <location filename="../src/core/ui/about.cpp" line="41"/>
<source>About</source> <source>About</source>
<translation>À propos</translation> <translation>À propos</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="51"/> <location filename="../src/core/ui/about.cpp" line="42"/>
<source>Thanks</source> <source>Thanks</source>
<translation>Remerciements</translation> <translation>Remerciements</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="52"/> <location filename="../src/core/ui/about.cpp" line="43"/>
<source>Help us</source> <source>Help us</source>
<translation>Aidez nous</translation> <translation>Aidez nous</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="109"/> <location filename="../src/core/ui/about.cpp" line="100"/>
<source>is a crossplatform application for fast creating screenshots of your desktop.</source> <source>is a crossplatform application for fast creating screenshots of your desktop.</source>
<translation>est une application multi-plateforme pour créer des captures d&apos;écran de votre bureau.</translation> <translation>est une application multi-plateforme pour créer des captures d&apos;écran de votre bureau.</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="111"/> <location filename="../src/core/ui/about.cpp" line="102"/>
<source>It is a light and powerful application and has been written using the Qt framework, so that you are able to use in Windows and Linux.</source> <source>It is a light and powerful application, written in Qt.</source>
<translation>C&apos;est une application puissante et légére écrite avec le framework Qt de manière à être utilisé sous Windows et Linux.</translation> <translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/ui/about.cpp" line="114"/>
<location filename="../src/core/ui/about.cpp" line="143"/>
<source>E-Mail</source>
<translation>E-Mail</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="117"/> <location filename="../src/core/ui/about.cpp" line="105"/>
<source>Website</source> <source>Website</source>
<translation>Site Web</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="121"/> <location filename="../src/core/ui/about.cpp" line="109"/>
<source>Licensed under the </source> <source>Licensed under the </source>
<translation>Sous licence </translation> <translation>Sous licence </translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="125"/> <location filename="../src/core/ui/about.cpp" line="113"/>
<source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source> <source>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</source>
<translation>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</translation> <translation>Copyright &amp;copy; 2009-2013, Artem &apos;DOOMer&apos; Galichkin</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="132"/> <location filename="../src/core/ui/about.cpp" line="120"/>
<source>You can join us and help us if you want. This is an invitation if you like this application.</source> <source>You can join us and help us if you want. This is an invitation if you like this application.</source>
<translation>Vous pouvez nous rejoindre et nous aider si vous appréciez cette application.</translation> <translation>Vous pouvez nous rejoindre et nous aider si vous appréciez cette application.</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="135"/> <location filename="../src/core/ui/about.cpp" line="123"/>
<source>What you can do?</source> <source>What you can do?</source>
<translation>Que pouvez vous faire ?</translation> <translation>Que pouvez vous faire ?</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="138"/> <location filename="../src/core/ui/about.cpp" line="126"/>
<source>Translate ScreenGrab to other languages</source> <source>Translate ScreenGrab to other languages</source>
<translation>Traduire ScreenGrab dans d&apos;autres langues</translation> <translation>Traduire ScreenGrab dans d&apos;autres langues</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="139"/> <location filename="../src/core/ui/about.cpp" line="127"/>
<source>Make suggestions for next releases</source> <source>Make suggestions for next releases</source>
<translation>Faire des suggestions pour les prochaines versions</translation> <translation>Faire des suggestions pour les prochaines versions</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="140"/> <location filename="../src/core/ui/about.cpp" line="128"/>
<source>Report bugs and issues</source> <source>Report bugs and issues</source>
<translation>Rapporter les bugs</translation> <translation>Rapporter les bugs</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="147"/> <location filename="../src/core/ui/about.cpp" line="131"/>
<source>Bug tracker</source> <source>Bug tracker</source>
<translation>Bug tracker</translation> <translation>Bug tracker</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="157"/> <location filename="../src/core/ui/about.cpp" line="141"/>
<source>Translate:</source> <source>Translate:</source>
<translation>Traductions:</translation> <translation>Traductions:</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="159"/> <location filename="../src/core/ui/about.cpp" line="143"/>
<source> Brazilian Portuguese translation</source> <source> Brazilian Portuguese translation</source>
<translation>Brésilien - Portuguais</translation> <translation>Brésilien - Portuguais</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="160"/> <location filename="../src/core/ui/about.cpp" line="144"/>
<source>Marcio Moraes</source> <source>Marcio Moraes</source>
<translation>Marcio Moraes</translation> <translation>Marcio Moraes</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="162"/> <location filename="../src/core/ui/about.cpp" line="146"/>
<source> Ukrainian translation</source> <source> Ukrainian translation</source>
<translation>Ukrainien</translation> <translation>Ukrainien</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="163"/> <location filename="../src/core/ui/about.cpp" line="147"/>
<source>Gennadi Motsyo</source> <source>Gennadi Motsyo</source>
<translation>Gennadi Motsyo</translation> <translation>Gennadi Motsyo</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="165"/> <location filename="../src/core/ui/about.cpp" line="149"/>
<source> Spanish translation</source> <source> Spanish translation</source>
<translation>Espagnol</translation> <translation>Espagnol</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="166"/> <location filename="../src/core/ui/about.cpp" line="150"/>
<source>Burjans L García D</source> <source>Burjans L García D</source>
<translation>Burjans L García D</translation> <translation>Burjans L García D</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="168"/> <location filename="../src/core/ui/about.cpp" line="152"/>
<source> Italian translation</source> <source> Italian translation</source>
<translation>Italien</translation> <translation>Italien</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="172"/> <location filename="../src/core/ui/about.cpp" line="156"/>
<source>Testing:</source> <source>Testing:</source>
<translation>Tests:</translation> <translation>Tests:</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="174"/> <location filename="../src/core/ui/about.cpp" line="158"/>
<source>Dual monitor support and other in Linux</source> <source>Dual monitor support and other in Linux</source>
<translation>Support du double écran et autres sous Linux</translation> <translation>Support du double écran et autres sous Linux</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="175"/> <location filename="../src/core/ui/about.cpp" line="159"/>
<source>Dual monitor support in Linux</source> <source>Dual monitor support in Linux</source>
<translation>Support du double écran sous Linux</translation> <translation>Support du double écran sous Linux</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="176"/> <location filename="../src/core/ui/about.cpp" line="160"/>
<source>win32-build [Windows XP and 7]</source> <source>win32-build [Windows XP and 7]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="177"/> <location filename="../src/core/ui/about.cpp" line="161"/>
<source>old win32-build [Windows Vista]</source> <source>old win32-build [Windows Vista]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/about.cpp" line="178"/> <location filename="../src/core/ui/about.cpp" line="162"/>
<source>win32-build [Windows 7]</source> <source>win32-build [Windows 7]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -163,53 +152,48 @@
<context> <context>
<name>ConfigDialog</name> <name>ConfigDialog</name>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="230"/> <location filename="../src/core/ui/configwidget.cpp" line="211"/>
<source>Directory %1 does not exist. Do you want to create it?</source> <source>Directory %1 does not exist. Do you want to create it?</source>
<translation>Le répertoire %1 n&apos;existe pas. Voulez vous le crééer ?</translation> <translation>Le répertoire %1 n&apos;existe pas. Voulez vous le crééer ?</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="231"/> <location filename="../src/core/ui/configwidget.cpp" line="212"/>
<location filename="../src/core/ui/configwidget.cpp" line="338"/> <location filename="../src/core/ui/configwidget.cpp" line="313"/>
<source>Warning</source> <source>Warning</source>
<translation>Attention</translation> <translation>Attention</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="326"/> <location filename="../src/core/ui/configwidget.cpp" line="301"/>
<source>Select directory</source> <source>Select directory</source>
<translation>Choisissez un répertoire</translation> <translation>Choisissez un répertoire</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="337"/> <location filename="../src/core/ui/configwidget.cpp" line="312"/>
<source>Do you want to reset the settings to the defaults?</source> <source>Do you want to reset the settings to the defaults?</source>
<translation>Voulez vous restaurer les paramètres par défaut ?</translation> <translation>Voulez vous restaurer les paramètres par défaut ?</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="355"/> <location filename="../src/core/ui/configwidget.cpp" line="370"/>
<source>None</source>
<translation>Non</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.cpp" line="401"/>
<source>Example: </source> <source>Example: </source>
<translation>Exemple:</translation> <translation>Exemple:</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="457"/> <location filename="../src/core/ui/configwidget.cpp" line="426"/>
<source>This key is already used in your system! Please select another.</source> <source>This key is already used in your system! Please select another.</source>
<translation>Cette touche est déjà utilisé sur votre système! Veuillez en sélectionner une autre.</translation> <translation>Cette touche est déjà utilisé sur votre système! Veuillez en sélectionner une autre.</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="463"/> <location filename="../src/core/ui/configwidget.cpp" line="432"/>
<source>This key is already used in ScreenGrab! Please select another.</source> <source>This key is already used in ScreenGrab! Please select another.</source>
<translation>Cette touche est déjà utilisé dans ScreenGrab! Veuillez en sélectionner une autre.</translation> <translation>Cette touche est déjà utilisé dans ScreenGrab! Veuillez en sélectionner une autre.</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="481"/> <location filename="../src/core/ui/configwidget.cpp" line="450"/>
<source>This key is not supported on your system!</source> <source>This key is not supported on your system!</source>
<translation>Cette touche n&apos;est pas supportée par votre système!</translation> <translation>Cette touche n&apos;est pas supportée par votre système!</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.cpp" line="516"/> <location filename="../src/core/ui/configwidget.cpp" line="485"/>
<source>Error</source> <source>Error</source>
<translation>Erreur</translation> <translation>Erreur</translation>
</message> </message>
@ -217,57 +201,57 @@
<context> <context>
<name>Core</name> <name>Core</name>
<message> <message>
<location filename="../src/core/core.cpp" line="62"/> <location filename="../src/core/core.cpp" line="63"/>
<source>is a crossplatform application for fast creating screenshots of your desktop.</source> <source>is a crossplatform application for fast creating screenshots of your desktop.</source>
<translation>est une application multi-plateforme pour créer des captures d&apos;écran de votre bureau.</translation> <translation>est une application multi-plateforme pour créer des captures d&apos;écran de votre bureau.</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="66"/> <location filename="../src/core/core.cpp" line="67"/>
<source>Take a fullscreen screenshot</source> <source>Take a fullscreen screenshot</source>
<translation>Prendre une capture d&apos;écran de l&apos;écran entier</translation> <translation>Prendre une capture d&apos;écran de l&apos;écran entier</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="70"/> <location filename="../src/core/core.cpp" line="71"/>
<source>Take a screenshot of the active window</source> <source>Take a screenshot of the active window</source>
<translation>Prendre une capture d&apos;écran de la fenêtre active</translation> <translation>Prendre une capture d&apos;écran de la fenêtre active</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="74"/> <location filename="../src/core/core.cpp" line="75"/>
<source>Take a screenshot of a selection of the screen</source> <source>Take a screenshot of a selection of the screen</source>
<translation>Prendre une capture d&apos;écran d&apos;une zone sélectionnée</translation> <translation>Prendre une capture d&apos;écran d&apos;une zone sélectionnée</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="78"/> <location filename="../src/core/core.cpp" line="79"/>
<source>Run the application with a hidden main window</source> <source>Run the application with a hidden main window</source>
<translation>Cacher la fenêtre principale</translation> <translation>Cacher la fenêtre principale</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="400"/> <location filename="../src/core/core.cpp" line="421"/>
<source>Saved</source> <source>Saved</source>
<translation>Enregistrement</translation> <translation>Enregistrement</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="400"/> <location filename="../src/core/core.cpp" line="421"/>
<source>Saved to </source> <source>Saved to </source>
<translation>Enregistré vers </translation> <translation>Enregistré vers </translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="422"/> <location filename="../src/core/core.cpp" line="443"/>
<source>Name of saved file is copied to the clipboard</source> <source>Name of saved file is copied to the clipboard</source>
<translation>Le nom du fichier a été copié dans le presse-papiers</translation> <translation>Le nom du fichier a été copié dans le presse-papiers</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="428"/> <location filename="../src/core/core.cpp" line="449"/>
<source>Path to saved file is copied to the clipboard</source> <source>Path to saved file is copied to the clipboard</source>
<translation>Le chemin du fichier a été copié dans le presse-papiers</translation> <translation>Le chemin du fichier a été copié dans le presse-papiers</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="450"/> <location filename="../src/core/core.cpp" line="471"/>
<source>Copied</source> <source>Copied</source>
<translation>Copié</translation> <translation>Copié</translation>
</message> </message>
<message> <message>
<location filename="../src/core/core.cpp" line="450"/> <location filename="../src/core/core.cpp" line="471"/>
<source>Screenshot is copied to clipboard</source> <source>Screenshot is copied to clipboard</source>
<translation>La capture d&apos;écran a été copié dans le presse-papiers</translation> <translation>La capture d&apos;écran a été copié dans le presse-papiers</translation>
</message> </message>
@ -399,139 +383,144 @@
<context> <context>
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="20"/> <location filename="../src/core/ui/mainwindow.ui" line="14"/>
<source>ScreenGrab</source> <source>ScreenGrab</source>
<translation>ScreenGrab</translation> <translation>ScreenGrab</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="101"/> <location filename="../src/core/ui/mainwindow.ui" line="79"/>
<source>Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.ui" line="89"/>
<source>Type of screenshot</source> <source>Type of screenshot</source>
<translation>Type de capture</translation> <translation>Type de capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="108"/> <location filename="../src/core/ui/mainwindow.ui" line="96"/>
<source>Full screen</source> <source>Full screen</source>
<translation>Plein écran</translation> <translation>Plein écran</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="113"/> <location filename="../src/core/ui/mainwindow.ui" line="101"/>
<source>Window</source> <source>Window</source>
<translation>Fenêtre active</translation> <translation>Fenêtre active</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="118"/> <location filename="../src/core/ui/mainwindow.ui" line="106"/>
<source>Screen area</source> <source>Screen area</source>
<translation>Sélection</translation> <translation>Sélection</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="123"/> <location filename="../src/core/ui/mainwindow.ui" line="111"/>
<source>Previous selection</source> <source>Last selected area</source>
<translation>Sélection précedente</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="140"/> <location filename="../src/core/ui/mainwindow.ui" line="141"/>
<source>Type: </source> <source>Delay:</source>
<translation>Type: </translation> <translation type="unfinished">Délai:</translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.ui" line="203"/>
<source>Zoom area around mouse</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="162"/> <location filename="../src/core/ui/mainwindow.ui" line="210"/>
<source>No window decoration</source>
<translation type="unfinished">Pas de décoration des fenêtres</translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.ui" line="154"/>
<source>Delay in seconds before taking screenshot</source> <source>Delay in seconds before taking screenshot</source>
<translation>Délai en secondes avant de faire la capture</translation> <translation>Délai en secondes avant de faire la capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="165"/> <location filename="../src/core/ui/mainwindow.ui" line="160"/>
<source> sec</source> <source> sec</source>
<translation> sec</translation> <translation> sec</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="181"/> <location filename="../src/core/ui/mainwindow.ui" line="217"/>
<source>Delay</source>
<translation>Délai</translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.ui" line="219"/>
<source>Include mouse pointer</source> <source>Include mouse pointer</source>
<translation>Inclure le pointeur de la souris</translation> <translation>Inclure le pointeur de la souris</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.ui" line="248"/> <location filename="../src/core/ui/mainwindow.ui" line="246"/>
<source>toolBar</source> <source>toolBar</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="63"/> <location filename="../src/core/ui/mainwindow.cpp" line="64"/>
<source>New</source> <source>New</source>
<translation>Nouveau</translation> <translation>Nouveau</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="64"/> <location filename="../src/core/ui/mainwindow.cpp" line="65"/>
<source>Save</source> <source>Save</source>
<translation>Enregistrer</translation> <translation>Enregistrer</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="65"/> <location filename="../src/core/ui/mainwindow.cpp" line="66"/>
<source>Copy</source> <source>Copy</source>
<translation>Copier</translation> <translation>Copier</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="66"/> <location filename="../src/core/ui/mainwindow.cpp" line="67"/>
<source>Options</source> <source>Options</source>
<translation>Options</translation> <translation>Options</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="67"/> <location filename="../src/core/ui/mainwindow.cpp" line="68"/>
<location filename="../src/core/ui/mainwindow.cpp" line="91"/> <location filename="../src/core/ui/mainwindow.cpp" line="92"/>
<source>Help</source> <source>Help</source>
<translation>Aide</translation> <translation>Aide</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="68"/> <location filename="../src/core/ui/mainwindow.cpp" line="69"/>
<source>About</source> <source>About</source>
<translation>À propos</translation> <translation>À propos</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="69"/> <location filename="../src/core/ui/mainwindow.cpp" line="70"/>
<source>Quit</source> <source>Quit</source>
<translation>Quitter</translation> <translation>Quitter</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="342"/> <location filename="../src/core/ui/mainwindow.cpp" line="355"/>
<source>Screenshot </source> <source>Screenshot </source>
<translation>Capture d&apos;écran </translation> <translation>Capture d&apos;écran </translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="346"/> <location filename="../src/core/ui/mainwindow.cpp" line="359"/>
<source>Double click for open screenshot in external default image viewer</source> <source>Double click to open screenshot in external default image viewer</source>
<translation>Double cliquer pour visualiser la capture dans le lecteur externe</translation> <translation type="unfinished">Double cliquer pour visualiser la capture dans le lecteur externe</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="355"/> <location filename="../src/core/ui/mainwindow.cpp" line="558"/>
<location filename="../src/core/ui/mainwindow.cpp" line="444"/> <source>%1 Files</source>
<translation></translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.cpp" line="368"/>
<location filename="../src/core/ui/mainwindow.cpp" line="499"/>
<source>Hide</source> <source>Hide</source>
<translation>Cacher</translation> <translation>Cacher</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="396"/> <location filename="../src/core/ui/mainwindow.ui" line="157"/>
<source>None</source> <source>None</source>
<translation>Non</translation> <translation>Non</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="451"/> <location filename="../src/core/ui/mainwindow.cpp" line="506"/>
<source>Show</source> <source>Show</source>
<translation>Montrer</translation> <translation>Montrer</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/mainwindow.cpp" line="498"/> <location filename="../src/core/ui/mainwindow.cpp" line="581"/>
<source>PNG Files</source>
<translation>Fichiers PNG</translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.cpp" line="499"/>
<source>JPEG Files</source>
<translation>Fichiers JPEG</translation>
</message>
<message>
<location filename="../src/core/ui/mainwindow.cpp" line="522"/>
<source>Save As...</source> <source>Save As...</source>
<translation>Enregistrer sous...</translation> <translation>Enregistrer sous...</translation>
</message> </message>
@ -680,385 +669,294 @@ any key or using the right or middle mouse buttons.</source>
<name>configwidget</name> <name>configwidget</name>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="26"/> <location filename="../src/core/ui/configwidget.ui" line="26"/>
<location filename="../src/core/ui/configwidget.ui" line="802"/> <location filename="../src/core/ui/configwidget.ui" line="627"/>
<source>Options</source> <source>Options</source>
<translation>Options</translation> <translation>Options</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="80"/> <location filename="../src/core/ui/configwidget.ui" line="77"/>
<source>Main</source> <source>Main</source>
<translation>Principal</translation> <translation>Principal</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="85"/> <location filename="../src/core/ui/configwidget.ui" line="82"/>
<source>Advanced</source> <source>Advanced</source>
<translation>Avancé</translation> <translation>Avancé</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="90"/> <location filename="../src/core/ui/configwidget.ui" line="87"/>
<source>System tray</source> <source>System tray</source>
<translation>Barre des tâches</translation> <translation>Barre des tâches</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="95"/> <location filename="../src/core/ui/configwidget.ui" line="92"/>
<source>Shortcuts</source> <source>Shortcuts</source>
<translation>Raccourcis</translation> <translation>Raccourcis</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="129"/> <location filename="../src/core/ui/configwidget.ui" line="122"/>
<source>Saving</source>
<translation>Enregistrement</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="143"/>
<source>Default save directory:</source>
<translation>Répertoire d&apos;enregistrement par défaut:</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="152"/>
<source>Path to default selection dir for saving</source> <source>Path to default selection dir for saving</source>
<translation>Chemin vers le répertoire d&apos;enregistrement par défaut</translation> <translation>Chemin vers le répertoire d&apos;enregistrement par défaut</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="165"/> <location filename="../src/core/ui/configwidget.ui" line="135"/>
<source>Browse filesystem</source> <source>Browse filesystem</source>
<translation>Parcourir le système de fichiers</translation> <translation>Parcourir le système de fichiers</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="168"/> <location filename="../src/core/ui/configwidget.ui" line="138"/>
<source>Browse</source> <source>Browse</source>
<translation>Parcourir</translation> <translation>Parcourir</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="186"/> <location filename="../src/core/ui/configwidget.ui" line="168"/>
<source>Default filename:</source>
<translation>Nom de fichier par défaut:</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="193"/>
<source>Default filename</source> <source>Default filename</source>
<translation>Nom de fichier par défaut</translation> <translation>Nom de fichier par défaut</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="204"/> <location filename="../src/core/ui/configwidget.ui" line="179"/>
<source>Format</source> <source>Format</source>
<translation>Format</translation> <translation>Format</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="217"/> <location filename="../src/core/ui/configwidget.ui" line="192"/>
<source>Default saving image format</source> <source>Default saving image format</source>
<translation>Format d&apos;image par défaut</translation> <translation>Format d&apos;image par défaut</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="233"/> <location filename="../src/core/ui/configwidget.ui" line="211"/>
<source>Copy file name to the clipboard when saving</source> <source>Copy file name to the clipboard when saving</source>
<translation>Copier le nom du fichier dans le presse-papiers lors de l&apos;enregistrement</translation> <translation>Copier le nom du fichier dans le presse-papiers lors de l&apos;enregistrement</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="247"/> <location filename="../src/core/ui/configwidget.ui" line="225"/>
<source>Do not copy</source> <source>Do not copy</source>
<translation>Ne pas copier</translation> <translation>Ne pas copier</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="252"/> <location filename="../src/core/ui/configwidget.ui" line="230"/>
<source>Copy file name only</source> <source>Copy file name only</source>
<translation>Copier le nom du fichier seulement</translation> <translation>Copier le nom du fichier seulement</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="257"/> <location filename="../src/core/ui/configwidget.ui" line="235"/>
<source>Copy full file path</source> <source>Copy full file path</source>
<translation>Copier le chemin complet</translation> <translation>Copier le chemin complet</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="281"/> <location filename="../src/core/ui/configwidget.ui" line="515"/>
<source>Screenshot</source>
<translation>Capture</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="289"/>
<source>Delay:</source>
<translation>Délai:</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="296"/>
<source>Default delay before grabbing screen</source>
<translation>Délai par défaut</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="302"/>
<location filename="../src/core/ui/configwidget.ui" line="690"/>
<source> sec</source> <source> sec</source>
<translation> sec</translation> <translation> sec</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="328"/> <location filename="../src/core/ui/configwidget.ui" line="245"/>
<source>No window decoration</source>
<translation>Pas de décoration des fenêtres</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="348"/>
<source>Type: </source>
<translation>Types: </translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="361"/>
<source>Type of screenshot</source>
<translation>Type de capture</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="368"/>
<source>Full screen</source>
<translation>Plein écran</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="373"/>
<source>Window</source>
<translation>Fenêtre active</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="378"/>
<source>Screen area</source>
<translation>Sélection</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="383"/>
<source>Previous selection</source>
<translation>Sélection précedente</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="406"/>
<source>Image quality</source> <source>Image quality</source>
<translation>Qualité d&apos;image</translation> <translation>Qualité d&apos;image</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="415"/> <location filename="../src/core/ui/configwidget.ui" line="251"/>
<source>Image quality (1 - small file, 100 - high quality)</source> <source>Image quality (1 - small file, 100 - high quality)</source>
<translation>Qualité d&apos;image (1 - basse qualité, 100 - haute qualité)</translation> <translation>Qualité d&apos;image (1 - basse qualité, 100 - haute qualité)</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="443"/> <location filename="../src/core/ui/configwidget.ui" line="116"/>
<source>Include mouse pointer</source> <source>Default save directory</source>
<translation>Inclure le pointeur de la souris</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="450"/> <location filename="../src/core/ui/configwidget.ui" line="148"/>
<source>Zoom area around mouse in selection mode</source> <source>Default file</source>
<translation>Zoom autour du pointeur en mode sélection</translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="494"/> <location filename="../src/core/ui/configwidget.ui" line="161"/>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="316"/>
<source>Inserting current date time into saved filename</source> <source>Inserting current date time into saved filename</source>
<translation>Ajouter la date au nom de fichier</translation> <translation>Ajouter la date au nom de fichier</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="497"/> <location filename="../src/core/ui/configwidget.ui" line="319"/>
<source>Insert current date and time in file name</source> <source>Insert current date and time in file name</source>
<translation>Ajouter la date au nom du fichier</translation> <translation>Ajouter la date au nom du fichier</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="506"/> <location filename="../src/core/ui/configwidget.ui" line="328"/>
<source>Template: </source> <source>Template: </source>
<translation>Modèle: </translation> <translation>Modèle: </translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="531"/> <location filename="../src/core/ui/configwidget.ui" line="353"/>
<source>Example: </source> <source>Example: </source>
<translation>Exemple: </translation> <translation>Exemple: </translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="541"/> <location filename="../src/core/ui/configwidget.ui" line="363"/>
<source>Automatically saving screenshots in grabbing process</source> <source>Automatically saving screenshots in grabbing process</source>
<translation>Enregistrer automatiquement à la capture</translation> <translation>Enregistrer automatiquement à la capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="544"/> <location filename="../src/core/ui/configwidget.ui" line="366"/>
<source>Autosave screenshot</source> <source>Autosave screenshot</source>
<translation>Enregistrer automatiquement les captures</translation> <translation>Enregistrer automatiquement les captures</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="556"/> <location filename="../src/core/ui/configwidget.ui" line="378"/>
<source>Save first screenshot</source> <source>Save first screenshot</source>
<translation>Enregistrer la première capture</translation> <translation>Enregistrer la première capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="565"/> <location filename="../src/core/ui/configwidget.ui" line="387"/>
<source>Allow run multiplies copy of ScreenGrab</source> <source>Allow run multiplies copy of ScreenGrab</source>
<translation>Autoriser plusieurs instances de ScreenGrab</translation> <translation>Autoriser plusieurs instances de ScreenGrab</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="568"/> <location filename="../src/core/ui/configwidget.ui" line="390"/>
<source>Allow multiple instances of ScreenGrab</source> <source>Allow multiple instances of ScreenGrab</source>
<translation>Autoriser plusieurs instances de ScreenGrab</translation> <translation>Autoriser plusieurs instances de ScreenGrab</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="575"/> <location filename="../src/core/ui/configwidget.ui" line="397"/>
<source>Open in external viewer on double click</source> <source>Open in external viewer on double click</source>
<translation>Ouvir dans le visualiseur externe au double clic</translation> <translation>Ouvir dans le visualiseur externe au double clic</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="578"/> <location filename="../src/core/ui/configwidget.ui" line="400"/>
<source>Enable external viewer</source> <source>Enable external viewer</source>
<translation>Activer le visualiseur externe</translation> <translation>Activer le visualiseur externe</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="585"/> <location filename="../src/core/ui/configwidget.ui" line="407"/>
<source>Fit to edges only inside selected screen area</source> <source>Fit to edges only inside selected screen area</source>
<translation>Faire correspondre les bords de la sélection avec les bords de la zone rectangulaire sélectionné</translation> <translation>Faire correspondre les bords de la sélection avec les bords de la zone rectangulaire sélectionné</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="588"/> <location filename="../src/core/ui/configwidget.ui" line="410"/>
<source>Fit to edges inside selected area</source> <source>Fit to edges inside selected area</source>
<translation>Faire correspondre les bords de la sélection avec les bords de la zone rectangulaire sélectionné</translation> <translation>Faire correspondre les bords de la sélection avec les bords de la zone rectangulaire sélectionné</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="623"/> <location filename="../src/core/ui/configwidget.ui" line="448"/>
<source>Show ScreenGrab in the system tray</source> <source>Show ScreenGrab in the system tray</source>
<translation>Placer ScreenGrab dans la barre des tâches</translation> <translation>Placer ScreenGrab dans la barre des tâches</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="632"/> <location filename="../src/core/ui/configwidget.ui" line="457"/>
<source>Tray messages:</source> <source>Tray messages:</source>
<translation>Notifications:</translation> <translation>Notifications:</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="645"/> <location filename="../src/core/ui/configwidget.ui" line="470"/>
<source>Tray messages display mode</source> <source>Tray messages display mode</source>
<translation>Mode d&apos;affichage des notifications</translation> <translation>Mode d&apos;affichage des notifications</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="649"/> <location filename="../src/core/ui/configwidget.ui" line="474"/>
<source>Never</source> <source>Never</source>
<translation>Jamais</translation> <translation>Jamais</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="654"/> <location filename="../src/core/ui/configwidget.ui" line="479"/>
<source>Tray mode</source> <source>Tray mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="659"/> <location filename="../src/core/ui/configwidget.ui" line="484"/>
<source>Always</source> <source>Always</source>
<translation>Toujours</translation> <translation>Toujours</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="671"/> <location filename="../src/core/ui/configwidget.ui" line="496"/>
<source>Time of display tray messages</source> <source>Time of display tray messages</source>
<translation>Temps d&apos;affichage des notifications</translation> <translation>Temps d&apos;affichage des notifications</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="687"/> <location filename="../src/core/ui/configwidget.ui" line="512"/>
<source>Time to display tray messages</source> <source>Time to display tray messages</source>
<translation>Temps d&apos;affichage des notifications</translation> <translation>Temps d&apos;affichage des notifications</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="708"/> <location filename="../src/core/ui/configwidget.ui" line="533"/>
<source>Minimize to tray on click close button</source> <source>Minimize to tray on click close button</source>
<translation>Minimiser lors d&apos;un clic sur le bouton de fermeture</translation> <translation>Minimiser lors d&apos;un clic sur le bouton de fermeture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="711"/> <location filename="../src/core/ui/configwidget.ui" line="536"/>
<source>Minimize to tray when closing</source> <source>Minimize to tray when closing</source>
<translation>Minimiser lors d&apos;un clic sur le bouton de fermeture</translation> <translation>Minimiser lors d&apos;un clic sur le bouton de fermeture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="750"/> <location filename="../src/core/ui/configwidget.ui" line="575"/>
<source>Action</source> <source>Action</source>
<translation>Action</translation> <translation>Action</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="755"/> <location filename="../src/core/ui/configwidget.ui" line="580"/>
<source>Shortcut</source> <source>Shortcut</source>
<translation>Raccourci</translation> <translation>Raccourci</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="760"/> <location filename="../src/core/ui/configwidget.ui" line="585"/>
<source>Global shortcuts</source> <source>Global shortcuts</source>
<translation>Raccourcis globaux</translation> <translation>Raccourcis globaux</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="767"/> <location filename="../src/core/ui/configwidget.ui" line="592"/>
<source>Fill screen</source> <source>Fill screen</source>
<translation>Plein écran</translation> <translation>Plein écran</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="772"/> <location filename="../src/core/ui/configwidget.ui" line="597"/>
<source>Active window</source> <source>Active window</source>
<translation>Fenêtre active</translation> <translation>Fenêtre active</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="777"/> <location filename="../src/core/ui/configwidget.ui" line="602"/>
<source>Area select</source> <source>Area select</source>
<translation>Sélection</translation> <translation>Sélection</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="783"/> <location filename="../src/core/ui/configwidget.ui" line="608"/>
<source>Local shortcuts</source> <source>Local shortcuts</source>
<translation>Raccourcis locaux</translation> <translation>Raccourcis locaux</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="787"/> <location filename="../src/core/ui/configwidget.ui" line="612"/>
<source>New screen</source> <source>New screen</source>
<translation>Nouvelle capture</translation> <translation>Nouvelle capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="792"/> <location filename="../src/core/ui/configwidget.ui" line="617"/>
<source>Save screen</source> <source>Save screen</source>
<translation>Enregistrer la capture</translation> <translation>Enregistrer la capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="797"/> <location filename="../src/core/ui/configwidget.ui" line="622"/>
<source>Copy screen</source> <source>Copy screen</source>
<translation>Copier la capture</translation> <translation>Copier la capture</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="807"/> <location filename="../src/core/ui/configwidget.ui" line="632"/>
<source>Help</source> <source>Help</source>
<translation>Aide</translation> <translation>Aide</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="812"/> <location filename="../src/core/ui/configwidget.ui" line="637"/>
<source>Quit</source> <source>Quit</source>
<translation>Quitter</translation> <translation>Quitter</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="823"/> <location filename="../src/core/ui/configwidget.ui" line="648"/>
<source>Selected shortcut:</source> <source>Selected shortcut:</source>
<translation>Raccourci sélectionné:</translation> <translation>Raccourci sélectionné:</translation>
</message> </message>
<message> <message>
<location filename="../src/core/ui/configwidget.ui" line="830"/> <location filename="../src/core/ui/configwidget.ui" line="655"/>
<source>Not defined</source> <source>Not defined</source>
<translation>Non défini</translation> <translation>Non défini</translation>
</message> </message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="853"/>
<source>Restore default settings</source>
<translation>Paramètres par défaut</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="856"/>
<source>Defaults</source>
<translation>Défaut</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="882"/>
<source>Save settings</source>
<translation>Enregister les paramètres</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="885"/>
<source>Save</source>
<translation>Enregistrer</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="898"/>
<source>Discard changes</source>
<translation>Abandonner les changements</translation>
</message>
<message>
<location filename="../src/core/ui/configwidget.ui" line="901"/>
<source>Cancel</source>
<translation>Annuler</translation>
</message>
</context> </context>
</TS> </TS>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save