Skip to content

Commit

Permalink
Don't attempt to open file when deselected on secondary treeview click,
Browse files Browse the repository at this point in the history
fixes #221
  • Loading branch information
annejan committed Nov 19, 2016
1 parent cdb8070 commit fec75da
Show file tree
Hide file tree
Showing 24 changed files with 1,123 additions and 1,102 deletions.
19 changes: 18 additions & 1 deletion deselectabletreeview.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
#ifndef DESELECTABLETREEVIEW_H
#define DESELECTABLETREEVIEW_H
/* taken from http://stackoverflow.com/questions/2761284/ thanks to Yassir Ennazk */
#include "QTreeView"
#include "QMouseEvent"
#include "QDebug"
#include "mainwindow.h"

/**
* @brief The DeselectableTreeView class
* taken from http://stackoverflow.com/questions/2761284/ thanks to Yassir Ennazk
*/
class DeselectableTreeView : public QTreeView
{
Q_OBJECT

public:
/**
* @brief DeselectableTreeView standard constructor
* @param parent
*/
DeselectableTreeView(QWidget *parent) : QTreeView(parent) {}
/**
* @brief ~DeselectableTreeView standard destructor
*/
virtual ~DeselectableTreeView() {}

signals:
/**
* @brief emptyClicked event
*/
void emptyClicked();

private:
/**
* @brief mousePressEvent now deselects on second click
* @param event
*/
virtual void mousePressEvent(QMouseEvent *event)
{
QModelIndex item = indexAt(event->pos());
Expand Down
100 changes: 50 additions & 50 deletions localization/localization_ar_MA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,14 @@ Expire-Date: 0
<message>
<location filename="../mainwindow.ui" line="72"/>
<location filename="../mainwindow.ui" line="75"/>
<location filename="../mainwindow.cpp" line="1796"/>
<location filename="../mainwindow.cpp" line="1797"/>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.ui" line="90"/>
<location filename="../mainwindow.ui" line="93"/>
<location filename="../mainwindow.cpp" line="1808"/>
<location filename="../mainwindow.cpp" line="1809"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -503,7 +503,7 @@ Expire-Date: 0
</message>
<message>
<location filename="../mainwindow.ui" line="179"/>
<location filename="../mainwindow.cpp" line="1790"/>
<location filename="../mainwindow.cpp" line="1791"/>
<source>Users</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -579,13 +579,13 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1836"/>
<location filename="../mainwindow.cpp" line="1837"/>
<source>New Folder:
(Will be placed in %1 )</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="825"/>
<location filename="../mainwindow.cpp" line="826"/>
<source>Password hidden</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -600,197 +600,197 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="829"/>
<location filename="../mainwindow.cpp" line="830"/>
<source>Content hidden</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="917"/>
<location filename="../mainwindow.cpp" line="918"/>
<source>Clipboard cleared</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="919"/>
<location filename="../mainwindow.cpp" line="920"/>
<source>Clipboard not cleared</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="932"/>
<location filename="../mainwindow.cpp" line="933"/>
<source>Password and Content hidden</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="984"/>
<location filename="../mainwindow.cpp" line="985"/>
<source>QProcess::FailedToStart</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="987"/>
<location filename="../mainwindow.cpp" line="988"/>
<source>QProcess::Crashed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="990"/>
<location filename="../mainwindow.cpp" line="991"/>
<source>QProcess::Timedout</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="993"/>
<location filename="../mainwindow.cpp" line="994"/>
<source>QProcess::ReadError</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="996"/>
<location filename="../mainwindow.cpp" line="997"/>
<source>QProcess::WriteError</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="999"/>
<location filename="../mainwindow.cpp" line="1000"/>
<source>QProcess::UnknownError</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1047"/>
<location filename="../mainwindow.cpp" line="1048"/>
<source>Looking for: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="719"/>
<location filename="../mainwindow.cpp" line="1185"/>
<location filename="../mainwindow.cpp" line="1361"/>
<location filename="../mainwindow.cpp" line="2034"/>
<location filename="../mainwindow.cpp" line="720"/>
<location filename="../mainwindow.cpp" line="1186"/>
<location filename="../mainwindow.cpp" line="1362"/>
<location filename="../mainwindow.cpp" line="2038"/>
<source>Can not edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1186"/>
<location filename="../mainwindow.cpp" line="2035"/>
<location filename="../mainwindow.cpp" line="1187"/>
<location filename="../mainwindow.cpp" line="2039"/>
<source>Could not read encryption key to use, .gpg-id file missing or invalid.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1232"/>
<location filename="../mainwindow.cpp" line="1835"/>
<location filename="../mainwindow.cpp" line="1233"/>
<location filename="../mainwindow.cpp" line="1836"/>
<source>New file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1256"/>
<location filename="../mainwindow.cpp" line="1257"/>
<source>Delete password?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1257"/>
<location filename="../mainwindow.cpp" line="1285"/>
<location filename="../mainwindow.cpp" line="1258"/>
<location filename="../mainwindow.cpp" line="1286"/>
<source>Are you sure you want to delete %1?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1284"/>
<location filename="../mainwindow.cpp" line="1285"/>
<source>Delete folder?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="720"/>
<location filename="../mainwindow.cpp" line="1362"/>
<location filename="../mainwindow.cpp" line="721"/>
<location filename="../mainwindow.cpp" line="1363"/>
<source>Selected password file does not exist, not able to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="865"/>
<location filename="../mainwindow.cpp" line="2077"/>
<location filename="../mainwindow.cpp" line="866"/>
<location filename="../mainwindow.cpp" line="2081"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1233"/>
<location filename="../mainwindow.cpp" line="1234"/>
<source>New password file:
(Will be placed in %1 )</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1429"/>
<location filename="../mainwindow.cpp" line="1430"/>
<source>Can not get key list</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1430"/>
<location filename="../mainwindow.cpp" line="1431"/>
<source>Unable to get list of available gpg keys</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1461"/>
<location filename="../mainwindow.cpp" line="1462"/>
<source>Key not found in keyring</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1496"/>
<location filename="../mainwindow.cpp" line="1497"/>
<source>Cannot update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1497"/>
<location filename="../mainwindow.cpp" line="1498"/>
<source>Failed to open .gpg-id for writing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1510"/>
<location filename="../mainwindow.cpp" line="1511"/>
<source>Check selected users!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1511"/>
<location filename="../mainwindow.cpp" line="1512"/>
<source>None of the selected keys have a secret key available.
You will not be able to decrypt any newly added passwords!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1604"/>
<location filename="../mainwindow.cpp" line="1605"/>
<source>Generating GPG key pair</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1649"/>
<location filename="../mainwindow.cpp" line="1650"/>
<source>Profile changed to %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1788"/>
<location filename="../mainwindow.cpp" line="1789"/>
<source>Add folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1789"/>
<location filename="../mainwindow.cpp" line="1790"/>
<source>Add password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1906"/>
<location filename="../mainwindow.cpp" line="1907"/>
<source>No characters chosen</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1907"/>
<location filename="../mainwindow.cpp" line="1908"/>
<source>Can&apos;t generate password, there are no characters to choose from set in the configuration!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1926"/>
<location filename="../mainwindow.cpp" line="1927"/>
<source>Timed out</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1927"/>
<location filename="../mainwindow.cpp" line="1928"/>
<source>Can&apos;t start process, previous one is still running!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1962"/>
<location filename="../mainwindow.cpp" line="1966"/>
<source>Copied to clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="1976"/>
<location filename="../mainwindow.cpp" line="1980"/>
<source>Re-encrypting from folder %1</source>
<translation type="unfinished"></translation>
</message>
Expand Down
Loading

0 comments on commit fec75da

Please sign in to comment.