aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/desktop-utils')
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.cpp19
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.h2
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/MainUI.ui15
-rw-r--r--src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp15
-rw-r--r--src-qt5/desktop-utils/lumina-fm/MainUI.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_de.ts88
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp50
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.h3
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/MainUI.ui58
-rw-r--r--src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts10
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts10
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp2
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/i18n/l-te_de.ts16
13 files changed, 202 insertions, 88 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
index e465cdf8..2972550c 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp
@@ -42,6 +42,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
connect(ui->actionAdd_Dirs, SIGNAL(triggered()), this, SLOT(addDirs()) );
connect(ui->tree_contents, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(ViewFile(QTreeWidgetItem*)) );
connect(ui->actionUSB_Image, SIGNAL(triggered()), this, SLOT(BurnImgToUSB()) );
+ connect(ui->tree_contents, SIGNAL(itemSelectionChanged()), this, SLOT(selectionChanged()) );
//Set Keyboard Shortcuts
ui->action_New->setShortcut(tr("CTRL+N"));
@@ -88,7 +89,7 @@ void MainUI::loadIcons(){
ui->actionAdd_Dirs->setIcon( LXDG::findIcon("archive-insert-directory","") );
ui->actionRemove_File->setIcon( LXDG::findIcon("archive-remove","") );
ui->actionExtract_All->setIcon( LXDG::findIcon("archive-extract","") );
- ui->actionExtract_Sel->setIcon( LXDG::findIcon("archive-extract","") );
+ ui->actionExtract_Sel->setIcon( LXDG::findIcon("edit-select-all","") );
ui->actionUSB_Image->setIcon( LXDG::findIcon("drive-removable-media-usb-pendrive","drive-removable-media-usb") );
}
@@ -112,6 +113,12 @@ QTreeWidgetItem* MainUI::findItem(QString path, QTreeWidgetItem *start){
}
bool MainUI::cleanItems(QStringList list, QTreeWidgetItem *start){
+ //Quick detection for an empty list
+ if(list.isEmpty() && ui->tree_contents->topLevelItemCount()>0){
+ ui->tree_contents->clear();
+ return true;
+ }
+ //Recursive resolution of items
bool changed = false;
if(start==0){
for(int i=0; i<ui->tree_contents->topLevelItemCount(); i++){
@@ -154,7 +161,7 @@ QString MainUI::CreateFileTypes(){
QString MainUI::OpenFileTypes(){
QStringList types;
- types << QString(tr("All Types %1")).arg("(*.tar.gz *.tar.xz *.tar.bz *.tar.bz2 *.tar.lzma *.tar *.zip *.tgz *.txz *.tbz *.tbz2 *.tlz *.cpio *.pax *.ar *.shar *.7z *.iso *.img *.xar *.jar *.rpm)");
+ types << QString(tr("All Known Types %1")).arg("(*.tar.gz *.tar.xz *.tar.bz *.tar.bz2 *.tar.lzma *.tar *.zip *.tgz *.txz *.tbz *.tbz2 *.tlz *.cpio *.pax *.ar *.shar *.7z *.iso *.img *.xar *.jar *.rpm)");
types << tr("Uncompressed Archive (*.tar)");
types << tr("GZip Compressed Archive (*.tar.gz *.tgz)");
types << tr("BZip Compressed Archive (*.tar.bz *.tbz)");
@@ -171,6 +178,7 @@ QString MainUI::OpenFileTypes(){
types << tr("READ-ONLY: XAR archive (*.xar)");
types << tr("READ-ONLY: Java archive (*.jar)");
types << tr("READ-ONLY: RedHat Package (*.rpm)");
+ types << tr("Show All Files (*)");
return types.join(";;");
}
@@ -340,7 +348,8 @@ void MainUI::ProcFinished(bool success, QString msg){
canmodify = canmodify && BACKEND->canModify(); //also include the file type limitations
ui->actionAdd_File->setEnabled(canmodify);
ui->actionRemove_File->setEnabled(canmodify && info.exists());
- ui->actionExtract_All->setEnabled(info.exists());
+ ui->actionExtract_All->setEnabled(info.exists() && ui->tree_contents->topLevelItemCount()>0);
+ ui->actionExtract_Sel->setEnabled(info.exists() && !ui->tree_contents->selectedItems().isEmpty());
ui->actionAdd_Dirs->setEnabled(canmodify);
}
@@ -349,3 +358,7 @@ void MainUI::ProcUpdate(int percent, QString txt){
ui->progressBar->setValue(percent);
if(!txt.isEmpty()){ ui->label_progress->setText(txt); }
}
+
+void MainUI::selectionChanged(){
+ ui->actionExtract_Sel->setEnabled(!ui->tree_contents->selectedItems().isEmpty());
+}
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.h b/src-qt5/desktop-utils/lumina-archiver/MainUI.h
index bf37d26a..273078ea 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.h
@@ -55,6 +55,8 @@ private slots:
void ProcFinished(bool, QString);
void ProcUpdate(int percent, QString txt);
+ //UI Slots
+ void selectionChanged();
};
#endif
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.ui b/src-qt5/desktop-utils/lumina-archiver/MainUI.ui
index 6666b7cb..0fc9eadf 100644
--- a/src-qt5/desktop-utils/lumina-archiver/MainUI.ui
+++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.ui
@@ -15,6 +15,15 @@
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>3</number>
+ </property>
+ <property name="topMargin">
+ <number>1</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
@@ -111,7 +120,7 @@
<x>0</x>
<y>0</y>
<width>403</width>
- <height>22</height>
+ <height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -168,6 +177,7 @@
<addaction name="actionRemove_File"/>
<addaction name="separator"/>
<addaction name="actionExtract_All"/>
+ <addaction name="actionExtract_Sel"/>
</widget>
<action name="action_Open">
<property name="text">
@@ -226,6 +236,9 @@
<property name="text">
<string>Extract Selection</string>
</property>
+ <property name="statusTip">
+ <string>Extract Selected Items</string>
+ </property>
</action>
<action name="actionUSB_Image">
<property name="text">
diff --git a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
index 78efd51c..0659f8b1 100644
--- a/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
+++ b/src-qt5/desktop-utils/lumina-archiver/TarBackend.cpp
@@ -27,6 +27,7 @@ Backend::~Backend(){
// PUBLIC
//===============
void Backend::loadFile(QString path){
+ //qDebug() << "Loading Archive:" << path;
filepath = path;
tmpfilepath = filepath.section("/",0,-2)+"/"+".tmp_larchiver_"+filepath.section("/",-1);
flags.clear();
@@ -149,7 +150,7 @@ void Backend::startViewFile(QString path){
args << "-x";
args << flags <<"--include" << path <<"--strip-components" << QString::number(path.count("/")) << "-C" << QDir::tempPath();
STARTING=true;
- qDebug() << "Starting command:" << "tar" << args;
+ //qDebug() << "Starting command:" << "tar" << args;
PROC.start("tar", args);
}
@@ -195,6 +196,7 @@ void Backend::startList(){
QStringList args;
args << "-tv";
LIST = STARTING=true;
+ //qDebug() << "Starting List:" << "tar "+args.join(" ")+" "+flags.join(" ");
PROC.start("tar", QStringList() << args << flags);
}
@@ -203,12 +205,17 @@ void Backend::startList(){
//===============
void Backend::procFinished(int retcode, QProcess::ExitStatus){
static QString result;
- processData();
//qDebug() << "Process Finished:" << PROC.arguments() << retcode;
+ processData();
LIST = STARTING = false;
if(PROC.arguments().contains("-tv")){
- if(retcode!=0){ contents.clear(); } //could not read archive
- emit ProcessFinished(true,result);
+ if(retcode!=0){ //could not read archive
+ contents.clear();
+ result = tr("Could not read archive");
+ }else if(result.isEmpty()){
+ result = tr("Archive Loaded");
+ }
+ emit ProcessFinished((retcode==0), result);
result.clear();
}else{
bool needupdate = true;
diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
index da3943a2..45ec860a 100644
--- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp
@@ -118,7 +118,7 @@ MainUI::~MainUI(){
}
workThread->quit();
//Also ensure the work thread is stopped
- workThread->wait();
+// workThread->wait();
}
void MainUI::OpenDirs(QStringList dirs){
diff --git a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_de.ts b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_de.ts
index 84c07a5e..26942d93 100644
--- a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_de.ts
+++ b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_de.ts
@@ -94,7 +94,7 @@
<message>
<location filename="../BrowserWidget.cpp" line="343"/>
<source>Files: %1</source>
- <translation type="unfinished"></translation>
+ <translation>Dateien: %1</translation>
</message>
<message>
<location filename="../BrowserWidget.cpp" line="349"/>
@@ -104,7 +104,7 @@
<message>
<location filename="../BrowserWidget.cpp" line="363"/>
<source>No Directory Contents</source>
- <translation type="unfinished"></translation>
+ <translation>Kein Verzeichnisinhalt</translation>
</message>
</context>
<context>
@@ -118,12 +118,12 @@
<message>
<location filename="../widgets/DirWidget2.ui" line="145"/>
<source>Increase Icon Sizes</source>
- <translation type="unfinished"></translation>
+ <translation>Symbolgrößen erhöhen</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="161"/>
<source>Decrease Icon Sizes</source>
- <translation type="unfinished"></translation>
+ <translation>Symbolgrößen verringern</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="179"/>
@@ -134,7 +134,7 @@
<location filename="../widgets/DirWidget2.ui" line="182"/>
<location filename="../widgets/DirWidget2.ui" line="185"/>
<source>Go back to previous directory</source>
- <translation>zurück zum vorhergehenden Verzeichnis</translation>
+ <translation>Zurück zum vorherigen Verzeichnis</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="193"/>
@@ -161,32 +161,32 @@
<message>
<location filename="../widgets/DirWidget2.ui" line="218"/>
<source>Menu</source>
- <translation type="unfinished"></translation>
+ <translation>Menü</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="221"/>
<source>Select Action</source>
- <translation type="unfinished"></translation>
+ <translation>Aktion auswählen</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="229"/>
<source>SingleColumn</source>
- <translation type="unfinished"></translation>
+ <translation>EinzelneSpalte</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="232"/>
<source>Single column view</source>
- <translation type="unfinished"></translation>
+ <translation>Einzelspaltenansicht</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="240"/>
<source>Dual Column</source>
- <translation type="unfinished"></translation>
+ <translation>Doppelspalte</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.ui" line="243"/>
<source>Dual Column View</source>
- <translation type="unfinished"></translation>
+ <translation>Doppelspaltenansicht</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="533"/>
@@ -231,17 +231,17 @@
<message>
<location filename="../widgets/DirWidget2.cpp" line="488"/>
<source>File Operations</source>
- <translation type="unfinished"></translation>
+ <translation>Dateioperationen</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="502"/>
<source>Directory Operations</source>
- <translation type="unfinished"></translation>
+ <translation>Verzeichnisoperationen</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="514"/>
<source>Loading...</source>
- <translation type="unfinished"></translation>
+ <translation>Ladevorgang...</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="563"/>
@@ -268,7 +268,7 @@
<message>
<location filename="../widgets/DirWidget2.cpp" line="229"/>
<source>Create...</source>
- <translation type="unfinished"></translation>
+ <translation>Erstellen...</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="231"/>
@@ -278,22 +278,22 @@
<message>
<location filename="../widgets/DirWidget2.cpp" line="232"/>
<source>Directory</source>
- <translation type="unfinished"></translation>
+ <translation>Verzeichnis</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="233"/>
<source>Application Launcher</source>
- <translation type="unfinished"></translation>
+ <translation>Anwendungsstarter</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="237"/>
<source>Launch...</source>
- <translation type="unfinished"></translation>
+ <translation>Starten...</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="239"/>
<source>Terminal</source>
- <translation type="unfinished"></translation>
+ <translation>Terminal</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="240"/>
@@ -303,22 +303,22 @@
<message>
<location filename="../widgets/DirWidget2.cpp" line="241"/>
<source>Multimedia Player</source>
- <translation type="unfinished"></translation>
+ <translation>Multimedia-Abspieler</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="256"/>
<source>View Files...</source>
- <translation type="unfinished"></translation>
+ <translation>Dateien ansehen...</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="258"/>
<source>Checksums</source>
- <translation type="unfinished"></translation>
+ <translation>Prüfsummen</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="260"/>
<source>Properties</source>
- <translation type="unfinished"></translation>
+ <translation>Eigenschaften</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="448"/>
@@ -332,8 +332,8 @@
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="460"/>
- <source>The &quot;lumina-fileinfo&quot; utility could not be found on the system. Please install it first.</source>
- <translation>Das &quot;lumina-fileinfo&quot; Dienstprogramm konnte nicht gefunden werden. Bitte erst installieren.</translation>
+ <source>The "lumina-fileinfo" utility could not be found on the system. Please install it first.</source>
+ <translation>Das "lumina-fileinfo" Dienstprogramm konnte nicht gefunden werden. Bitte erst installieren.</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="485"/>
@@ -553,7 +553,7 @@ Neue Position: %2</translation>
<message>
<location filename="../gitWizard.ui" line="159"/>
<source>Custom Depth</source>
- <translation>Benutzerdefinierter Wert für &quot;depth&quot;</translation>
+ <translation>Benutzerdefinierter Wert für "depth"</translation>
</message>
<message>
<location filename="../gitWizard.ui" line="166"/>
@@ -567,8 +567,8 @@ Neue Position: %2</translation>
</message>
<message>
<location filename="../gitWizard.ui" line="232"/>
- <source>Click &quot;Next&quot; to start downloading the repository</source>
- <translation>Auf &quot;Weiter&quot; klicken, um das Repository herunterzuladen</translation>
+ <source>Click "Next" to start downloading the repository</source>
+ <translation>Auf "Weiter" klicken, um das Repository herunterzuladen</translation>
</message>
<message>
<location filename="../gitWizard.h" line="58"/>
@@ -631,17 +631,17 @@ Neue Position: %2</translation>
<message>
<location filename="../MainUI.ui" line="171"/>
<source>New Tab</source>
- <translation type="unfinished"></translation>
+ <translation>Neue Registerkarte</translation>
</message>
<message>
<location filename="../MainUI.ui" line="174"/>
<source>New Browser</source>
- <translation>neuer Browser</translation>
+ <translation>Neuer Browser</translation>
</message>
<message>
<location filename="../MainUI.ui" line="250"/>
<source>Search Directory...</source>
- <translation>Suche im Verzeichnis...</translation>
+ <translation>Im Verzeichnis suchen...</translation>
</message>
<message>
<location filename="../MainUI.ui" line="283"/>
@@ -711,17 +711,17 @@ Neue Position: %2</translation>
<message>
<location filename="../MainUI.ui" line="403"/>
<source>Close Tab</source>
- <translation type="unfinished"></translation>
+ <translation>Registerkarte schließen</translation>
</message>
<message>
<location filename="../MainUI.ui" line="414"/>
<source>Repo Status</source>
- <translation>Status des Repositorys</translation>
+ <translation>Repositoriumsstatus</translation>
</message>
<message>
<location filename="../MainUI.ui" line="419"/>
<source>Clone Repository</source>
- <translation>Repository klonen</translation>
+ <translation>Repositorium klonen</translation>
</message>
<message>
<location filename="../MainUI.ui" line="177"/>
@@ -846,12 +846,12 @@ Neue Position: %2</translation>
<message>
<location filename="../MainUI.cpp" line="222"/>
<source>CTRL+B</source>
- <translation type="unfinished"></translation>
+ <translation>STRG+B</translation>
</message>
<message>
<location filename="../MainUI.cpp" line="231"/>
<source>CTRL+E</source>
- <translation type="unfinished"></translation>
+ <translation>STRG+E</translation>
</message>
<message>
<location filename="../MainUI.cpp" line="336"/>
@@ -1018,37 +1018,37 @@ Neue Position: %2</translation>
<message>
<location filename="../OPWidget.ui" line="60"/>
<source>Evaluating...</source>
- <translation type="unfinished"></translation>
+ <translation>Auswertung...</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="52"/>
<source>Move</source>
- <translation type="unfinished"></translation>
+ <translation>Verschieben</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="53"/>
<source>Copy</source>
- <translation type="unfinished"></translation>
+ <translation>Kopieren</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="54"/>
<source>Remove</source>
- <translation type="unfinished"></translation>
+ <translation>Entfernen</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="96"/>
<source>File Operation Errors</source>
- <translation type="unfinished"></translation>
+ <translation>Dateioperationsfehler</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="108"/>
<source>%1 Finished</source>
- <translation type="unfinished"></translation>
+ <translation>%1 abgeschlossen</translation>
</message>
<message>
<location filename="../OPWidget.cpp" line="108"/>
<source>Errors Occured</source>
- <translation type="unfinished"></translation>
+ <translation>Fehler aufgetreten</translation>
</message>
</context>
<context>
@@ -1164,7 +1164,7 @@ Neue Position: %2</translation>
<message>
<location filename="../TrayUI.cpp" line="76"/>
<source>Errors during operation. Click to view details</source>
- <translation type="unfinished"></translation>
+ <translation>Fehler während des Vorgangs. Zum Anzeigen von Details klicken</translation>
</message>
</context>
</TS>
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
index 40c9857b..25f4cc62 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.cpp
@@ -9,12 +9,15 @@
#include <LuminaX11.h>
#include <QMessageBox>
+#include <QClipboard>
-
-MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
+MainUI::MainUI()
+ : QMainWindow(), ui(new Ui::MainUI),
+ mousegrabbed(false),
+ picSaved(false),
+ closeOnSave(false)
+{
ui->setupUi(this); //load the designer file
- mousegrabbed = false;
- picSaved = false;
XCB = new LXCB();
IMG = new ImageEditor(this);
ui->scrollArea->setWidget(IMG);
@@ -30,7 +33,8 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
scaleTimer->setSingleShot(true);
scaleTimer->setInterval(200); //~1/5 second
tabbar = new QTabBar(this);
- ui->tabLayout->insertWidget(0,tabbar);
+ tabbar->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
+ ui->tabLayout->insertWidget(0,tabbar, Qt::AlignLeft | Qt::AlignBottom);
tabbar->addTab(LXDG::findIcon("view-preview",""), tr("View"));
tabbar->addTab(LXDG::findIcon("preferences-other",""), tr("Settings"));
ui->stackedWidget->setCurrentWidget(ui->page_current);
@@ -47,6 +51,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
//connect(ui->push_snap, SIGNAL(clicked()), this, SLOT(startScreenshot()) );
connect(ui->actionTake_Screenshot, SIGNAL(triggered()), this, SLOT(startScreenshot()) );
connect(ui->tool_crop, SIGNAL(clicked()), IMG, SLOT(cropImage()) );
+ connect(ui->tool_copy_to_clipboard, SIGNAL(clicked()), this, SLOT(copyToClipboard()) );
connect(IMG, SIGNAL(selectionChanged(bool)), this, SLOT(imgselchanged(bool)) );
connect(IMG, SIGNAL(scaleFactorChanged(int)), this, SLOT(imgScalingChanged(int)) );
connect(ui->slider_zoom, SIGNAL(valueChanged(int)), this, SLOT(sliderChanged()) );
@@ -74,16 +79,14 @@ MainUI::~MainUI(){}
void MainUI::setupIcons(){
//Setup the icons
- //ui->tool_save->setIcon( LXDG::findIcon("document-save","") );
ui->tool_quicksave->setIcon( LXDG::findIcon("document-edit","") );
ui->actionSave_As->setIcon( LXDG::findIcon("document-save-as","") );
ui->actionQuick_Save->setIcon( LXDG::findIcon("document-save","") );
ui->actionClose->setIcon( LXDG::findIcon("application-exit","") );
- //ui->push_snap->setIcon( LXDG::findIcon("camera-web","") );
+ ui->tool_copy_to_clipboard->setIcon( LXDG::findIcon("insert-image","") );
ui->actionTake_Screenshot->setIcon( LXDG::findIcon("camera-web","") );
ui->tool_crop->setIcon( LXDG::findIcon("transform-crop","") );
ui->tool_resize->setIcon( LXDG::findIcon("transform-scale","") );
- //ui->actionEdit->setIcon( LXDG::findIcon("applications-graphics","") );
this->setWindowIcon( LXDG::findIcon("camera-web","") );
}
@@ -96,13 +99,22 @@ void MainUI::showSaveError(QString path){
void MainUI::saveScreenshot(){
if(mousegrabbed){ return; }
QString filepath = QFileDialog::getSaveFileName(this, tr("Save Screenshot"), ppath+"/"+QString( "Screenshot-%1.png" ).arg( lastScreenShot.toString("yyyy-MM-dd-hh-mm-ss")), tr("PNG Files (*.png);;AllFiles (*)") );
- if(filepath.isEmpty()){ return; }
+ if(filepath.isEmpty()){
+ closeOnSave = false;
+ return;
+ }
if(!filepath.endsWith(".png")){ filepath.append(".png"); }
if( !IMG->image().save(filepath, "png") ){
+ closeOnSave = false;
showSaveError(filepath);
}else{
picSaved = true;
ppath = filepath.section("/",0,-2); //just the directory
+ if (closeOnSave) {
+ // We came here from close, now we need to close *after* handling
+ // the current screen event.
+ QTimer::singleShot(0, this, SLOT(close()));
+ }
}
}
@@ -121,6 +133,12 @@ void MainUI::quicksave(){
}
}
+void MainUI::copyToClipboard(){
+ qDebug() << "Copy Image to clipboard";
+ QClipboard *clipboard = QApplication::clipboard();
+ clipboard->setImage(IMG->image());
+ qDebug() << " - Success:" << !clipboard->image().isNull();
+}
void MainUI::startScreenshot(){
if(mousegrabbed){ return; }
@@ -243,8 +261,18 @@ void MainUI::closeEvent(QCloseEvent *ev){
//qDebug() << "Close Event:" << ui->check_show_popups->isChecked() << picSaved;
if(ui->check_show_popups->isChecked() && !picSaved){
//Ask what to do about the unsaved changed
- if(QMessageBox::Yes != QMessageBox::warning(this, tr("Unsaved Screenshot"), tr("The current screenshot has not been saved yet. Do you want to quit anyway?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) ){
- //cancelled close of window
+ const int messageRet = QMessageBox::warning(this, tr("Unsaved Screenshot"),
+ tr("The current screenshot has not been saved yet. Do you want to save or discard your changes?"),
+ QMessageBox::Discard | QMessageBox::Save |QMessageBox::Cancel, QMessageBox::Cancel);
+ switch (messageRet) {
+ case QMessageBox::Discard:
+ // Just close, we don't care about the file.
+ break;
+ case QMessageBox::Save:
+ closeOnSave = true;
+ saveScreenshot();
+ // fall through
+ case QMessageBox::Cancel:
ev->ignore();
return;
}
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.h b/src-qt5/desktop-utils/lumina-screenshot/MainUI.h
index 396bfafe..4a18ef74 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.h
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.h
@@ -41,7 +41,7 @@ public slots:
private:
Ui::MainUI *ui;
- bool mousegrabbed, picSaved;
+ bool mousegrabbed, picSaved, closeOnSave;
QRect lastgeom;
QString ppath; //previous file path
WId cwin; //current window to screenshot
@@ -63,6 +63,7 @@ private slots:
}
void saveScreenshot();
void quicksave();
+ void copyToClipboard();
void startScreenshot();
diff --git a/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui b/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui
index cddee009..f4230ff6 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui
+++ b/src-qt5/desktop-utils/lumina-screenshot/MainUI.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>386</width>
- <height>288</height>
+ <width>480</width>
+ <height>318</height>
</rect>
</property>
<property name="sizePolicy">
@@ -54,7 +54,7 @@
<item>
<widget class="QFrame" name="frame_modify">
<property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
@@ -83,12 +83,44 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="statusTip">
+ <string>Open screenshot with an application</string>
+ </property>
<property name="text">
- <string>Open With...</string>
+ <string>Open</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_copy_to_clipboard">
+ <property name="statusTip">
+ <string>Copy screenshot to clipboard</string>
+ </property>
+ <property name="text">
+ <string>Copy</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+C</string>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
</widget>
</item>
<item>
@@ -99,12 +131,18 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="statusTip">
+ <string>Resize screenshot to selection</string>
+ </property>
<property name="text">
<string>Resize</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item>
@@ -115,12 +153,18 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="statusTip">
+ <string>Crop screenshot to selection</string>
+ </property>
<property name="text">
<string>&amp;Crop</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
</widget>
</item>
</layout>
@@ -210,8 +254,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>344</width>
- <height>216</height>
+ <width>439</width>
+ <height>230</height>
</rect>
</property>
</widget>
@@ -463,9 +507,9 @@
</attribute>
<addaction name="actionTake_Screenshot"/>
<addaction name="actionSave_As"/>
- <addaction name="actionQuick_Save"/>
<addaction name="actionClose"/>
</widget>
+ <widget class="QStatusBar" name="statusBar"/>
<action name="actionTake_Screenshot">
<property name="text">
<string>Capture</string>
diff --git a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts
index ab4efacf..5888f671 100644
--- a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts
+++ b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_de.ts
@@ -50,17 +50,17 @@
<message>
<location filename="../MainUI.ui" line="70"/>
<source> Sec Delay</source>
- <translation type="unfinished"></translation>
+ <translation> Sek. Verzögerung</translation>
</message>
<message>
<location filename="../MainUI.ui" line="183"/>
<source>Capture</source>
- <translation type="unfinished"></translation>
+ <translation>Aufnehmen</translation>
</message>
<message>
<location filename="../MainUI.ui" line="212"/>
<source>Edit</source>
- <translation type="unfinished"></translation>
+ <translation>Bearbeiten</translation>
</message>
<message>
<location filename="../MainUI.ui" line="362"/>
@@ -100,12 +100,12 @@
<message>
<location filename="../MainUI.cpp" line="79"/>
<source>Could not save screenshot</source>
- <translation type="unfinished"></translation>
+ <translation>Bildschirmfoto konnte nicht gespeichert werden</translation>
</message>
<message>
<location filename="../MainUI.cpp" line="79"/>
<source>The screenshot could not be saved. Please check directory permissions or pick a different directory</source>
- <translation type="unfinished"></translation>
+ <translation>Das Bildschirmfoto konnte nicht gespeichert werden. Bitte überprüfen Sie die Verzeichnisberechtigungen oder wählen Sie ein anderes Verzeichnis aus</translation>
</message>
<message>
<location filename="../MainUI.cpp" line="86"/>
diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts
index 9cf56536..606091e8 100644
--- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts
+++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_de.ts
@@ -6,12 +6,12 @@
<message>
<location filename="../TerminalWidget.cpp" line="60"/>
<source>Copy Selection</source>
- <translation type="unfinished"></translation>
+ <translation>Auswahl kopieren</translation>
</message>
<message>
<location filename="../TerminalWidget.cpp" line="61"/>
<source>Paste</source>
- <translation type="unfinished"></translation>
+ <translation>Einfügen</translation>
</message>
</context>
<context>
@@ -24,12 +24,12 @@
<message>
<location filename="../TrayIcon.cpp" line="125"/>
<source>Top of Screen</source>
- <translation type="unfinished"></translation>
+ <translation>Oben am Bildschirm</translation>
</message>
<message>
<location filename="../TrayIcon.cpp" line="130"/>
<source>Close Terminal</source>
- <translation type="unfinished"></translation>
+ <translation>Terminal schließen</translation>
</message>
<message>
<location filename="../TrayIcon.cpp" line="139"/>
@@ -39,7 +39,7 @@
<message>
<location filename="../TrayIcon.cpp" line="142"/>
<source>Monitor %1</source>
- <translation type="unfinished"></translation>
+ <translation>Monitor %1</translation>
</message>
</context>
</TS>
diff --git a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp
index e8eaa007..a0aff9cc 100644
--- a/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/PlainTextEditor.cpp
@@ -83,7 +83,7 @@ void PlainTextEditor::LoadFile(QString filepath){
this->centerCursor(); //scroll until cursor is centered (if possible)
}
hasChanges = false;
- watcher->addPath(filepath);
+ if(QFile::exists(filepath)){ watcher->addPath(filepath); }
emit FileLoaded(this->whatsThis());
}
diff --git a/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_de.ts b/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_de.ts
index d493699e..9d7c344b 100644
--- a/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_de.ts
+++ b/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_de.ts
@@ -241,7 +241,7 @@
<location filename="../MainUI.cpp" line="289"/>
<location filename="../MainUI.cpp" line="386"/>
<source>Lose Unsaved Changes?</source>
- <translation type="unfinished"></translation>
+ <translation>Nicht gespeicherte Änderungen verlieren?</translation>
</message>
<message>
<location filename="../MainUI.cpp" line="289"/>
@@ -249,7 +249,10 @@
Do you want to close it anyway?
%1</source>
- <translation type="unfinished"></translation>
+ <translation>Diese Datei hat nicht gespeicherte Änderungen.
+Möchten Sie sie trotzdem schließen?
+
+%1</translation>
</message>
<message>
<location filename="../MainUI.cpp" line="386"/>
@@ -257,7 +260,10 @@ Do you want to close it anyway?
Do you want to close the editor anyway?
%1</source>
- <translation type="unfinished"></translation>
+ <translation>Es gibt nicht gespeicherte Änderungen.
+Möchten Sie den Editor trotzdem schließen?
+
+%1</translation>
</message>
</context>
<context>
@@ -275,7 +281,7 @@ Do you want to close the editor anyway?
<message>
<location filename="../PlainTextEditor.cpp" line="289"/>
<source>Row Number: %1, Column Number: %2</source>
- <translation type="unfinished"></translation>
+ <translation>Zeilennummer: %1, Spaltennummer: %2</translation>
</message>
<message>
<location filename="../PlainTextEditor.cpp" line="298"/>
@@ -285,7 +291,7 @@ Do you want to close the editor anyway?
<message>
<location filename="../PlainTextEditor.cpp" line="300"/>
<source>(Note: You will lose all currently-unsaved changes)</source>
- <translation>(Hinweis: Sie werden alle momentan ungespeicherten Änderungen verlieren)</translation>
+ <translation>(Hinweis: Sie werden alle momentan nicht gespeicherten Änderungen verlieren)</translation>
</message>
<message>
<location filename="../PlainTextEditor.cpp" line="304"/>
bgstack15