Refactored the QT interface. (#12)

develop
tastytea 2019-01-14 15:45:05 +01:00
parent 8a5aa60d66
commit daefd245f0
No known key found for this signature in database
GPG Key ID: CFC39497F1B26E07
10 changed files with 552 additions and 495 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project (whyblocked
VERSION 0.14.0
VERSION 0.14.1
LANGUAGES CXX
)
@ -41,11 +41,9 @@ configure_file (
"${PROJECT_BINARY_DIR}/version.hpp"
)
set(COMMON_LIBRARIES
)
add_executable(whyblocked-gui
src/interface_qt.cpp src/whyblocked.cpp src/xdgcfg.cpp)
src/qt/main.cpp src/qt/mainwindow.cpp src/qt/dialog_add.cpp
src/whyblocked.cpp src/xdgcfg.cpp)
target_link_libraries(whyblocked-gui
${LIBXDG_BASEDIR_LIBRARIES} vsqlitepp Qt5::Widgets
${LIBCONFIG_LIBRARIES} stdc++fs)

112
src/qt/dialog_add.cpp Normal file
View File

@ -0,0 +1,112 @@
/* This file is part of whyblocked.
* Copyright © 2019 tastytea <tastytea@tastytea.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QtCore/qmimedata.h>
#include "dialog_add.hpp"
DialogAdd::DialogAdd(Database &database, QMainWindow *parent)
: QDialog(parent)
, _parent(static_cast<MainWindow*>(parent))
, _database(database)
{
setupUi(this);
}
void DialogAdd::set_data(const Database::data &data)
{
text_user->setText(QString::fromStdString(data.user));
radio_blocked->setChecked(data.blocked);
radio_silcenced->setChecked(!data.blocked);
text_reason->setText(QString::fromStdString(data.reason));
for (const string &receipt : data.receipts)
{
QListWidgetItem *item =
new QListWidgetItem(QString::fromStdString(receipt));
item->setFlags(item->flags() | Qt::ItemIsEditable);
list_receipts->insertItem(list_receipts->count(), item);
}
}
const Database::data DialogAdd::get_data() const
{
std::vector<string> receipts;
for (int row = 0; row <= list_receipts->count() - 1; ++row)
{
receipts.push_back(list_receipts->item(row)->text().toStdString());
}
Database::data data;
data.user = text_user->text().toStdString();
data.blocked = radio_blocked->isChecked();
data.reason = text_reason->text().toStdString();
data.receipts = receipts;
return data;
}
void DialogAdd::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("text/plain"))
{
event->acceptProposedAction();
}
}
void DialogAdd::dropEvent(QDropEvent *event)
{
const QString text = event->mimeData()->text();
QListWidgetItem *item = new QListWidgetItem(text);
item->setFlags(item->flags() | Qt::ItemIsEditable);
list_receipts->insertItem(list_receipts->count(), item);
}
void DialogAdd::add_receipt()
{
QListWidgetItem *item = new QListWidgetItem(tr("Insert receipt here."));
item->setFlags(item->flags() | Qt::ItemIsEditable);
list_receipts->insertItem(list_receipts->count(), item);
list_receipts->editItem(item);
}
void DialogAdd::remove_receipt()
{
for (auto item :list_receipts->selectedItems())
{
delete item;
}
}
void DialogAdd::accept()
{
if (property("edit").toBool())
{
_parent->remove();
}
Database::data data = get_data();
if (!data)
{
return;
}
_database.add_user(data);
_parent->add_row(QString::fromStdString(data.user),
data.blocked,
QString::fromStdString(data.reason));
delete this;
}

46
src/qt/dialog_add.hpp Normal file
View File

@ -0,0 +1,46 @@
/* This file is part of whyblocked.
* Copyright © 2019 tastytea <tastytea@tastytea.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DIALOG_ADD_HPP
#define DIALOG_ADD_HPP
#include "mainwindow.hpp"
#include "ui_whyblocked_add.h"
class DialogAdd : public QDialog, private Ui::DialogAdd
{
Q_OBJECT
public:
explicit DialogAdd(Database &database, QMainWindow *parent = nullptr);
void set_data(const Database::data &data);
private:
const Database::data get_data() const;
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
MainWindow *_parent;
Database &_database;
private slots:
void add_receipt();
void remove_receipt();
void accept();
};
#endif // DIALOG_ADD_HPP

39
src/qt/main.cpp Normal file
View File

@ -0,0 +1,39 @@
/* This file is part of whyblocked.
* Copyright © 2019 tastytea <tastytea@tastytea.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QTranslator>
#include <QLibraryInfo>
#include "mainwindow.hpp"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QCoreApplication::setApplicationName("Whyblocked");
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&qtTranslator);
QTranslator appTranslator;
appTranslator.load("whyblocked_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&appTranslator);
MainWindow win;
win.show();
return app.exec();
}

View File

@ -20,12 +20,11 @@
#include <codecvt>
#include <algorithm>
#include <QMessageBox>
#include <QTranslator>
#include <QLibraryInfo>
#include <QtCore/qmimedata.h>
#include <libconfig.h++>
#include "version.hpp"
#include "interface_qt.hpp"
#include "mainwindow.hpp"
#include "dialog_add.hpp"
using std::wstring;
@ -177,33 +176,6 @@ MainWindow::~MainWindow()
_config.write();
}
void MainWindow::populate_tableview(const vector<Database::data> &entries)
{
_model->clear();
_model->setHorizontalHeaderLabels(
{
tr("User/Instance"),
tr("Blocked/Silenced"),
tr("Reason")
});
tableview->horizontalHeader()->resizeSection(0, _headersize[0]);
tableview->horizontalHeader()->resizeSection(1, _headersize[1]);
tableview->horizontalHeader()->resizeSection(2, _headersize[2]);
for (const Database::data &entry : entries)
{
add_row(QString::fromStdString(entry.user),
entry.blocked,
QString::fromStdString(entry.reason));
}
}
void MainWindow::reload()
{
_database.reload();
populate_tableview(_dbdata);
}
void MainWindow::add_row(const QString &user, const int &blocked,
const QString &reason)
{
@ -221,33 +193,6 @@ void MainWindow::add_row(const QString &user, const int &blocked,
_model->appendRow(items);
}
void MainWindow::add()
{
DialogAdd *dialog = new DialogAdd(_database, this);
dialog->show();
}
void MainWindow::edit()
{
if (tableview->selectionModel()->selectedRows().count() != 1)
{
QMessageBox::warning(this, tr("Invalid selection"),
tr("Please select only 1 entry to edit."));
return;
}
DialogAdd *dialog = new DialogAdd(_database, this);
dialog->setWindowTitle(tr("Edit entry"));
QModelIndex index = tableview->selectionModel()->selectedRows().first();
const string user = index.sibling(index.row(), 0).data()
.toString().toStdString();
dialog->set_data(_database.get_user(user));
dialog->setProperty("edit", true);
dialog->show();
}
void MainWindow::remove()
{
QItemSelectionModel *selection = tableview->selectionModel();
@ -268,17 +213,49 @@ void MainWindow::remove()
}
}
void MainWindow::find()
const string MainWindow::urls_to_hyperlinks(const string &text)
{
if (widget_find->isVisible())
std::regex re_url("((https?|gopher|ftps?)\\://[^ <]*)");
return std::regex_replace(text, re_url, "<a href=\"$1\">$1</a>");
}
void MainWindow::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("text/plain"))
{
widget_find->hide();
event->acceptProposedAction();
}
else
}
void MainWindow::dropEvent(QDropEvent *event)
{
string text = event->mimeData()->text().toStdString();
const std::array<const std::regex, 4> fediverse =
{
widget_find->show();
text_find->setFocus();
std::regex("https://([^/]+)/@([^/]+)"), // Mastodon
std::regex("https://([^/]+)/profile/([^/]+)"), // Friendica
std::regex("https://([^/]+)/users/([^/]+)"), // Pleroma
std::regex("https://([^/]+)/([^/]+)") // Gnusocial
};
std::smatch match;
for (const std::regex &re : fediverse)
{
std::regex_match(text, match, re);
const string instance = match[1];
const string user = match[2];
if (!instance.empty() && !user.empty())
{
text = '@' + user + '@' + instance;
break;
}
}
DialogAdd *dialog = new DialogAdd(_database, this);
Database::data data;
data.user = text;
dialog->set_data(data);
dialog->show();
}
bool MainWindow::eventFilter(QObject *obj, QEvent *event)
@ -337,6 +314,33 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
return QObject::eventFilter(obj, event);
}
void MainWindow::add()
{
DialogAdd *dialog = new DialogAdd(_database, this);
dialog->show();
}
void MainWindow::edit()
{
if (tableview->selectionModel()->selectedRows().count() != 1)
{
QMessageBox::warning(this, tr("Invalid selection"),
tr("Please select only 1 entry to edit."));
return;
}
DialogAdd *dialog = new DialogAdd(_database, this);
dialog->setWindowTitle(tr("Edit entry"));
QModelIndex index = tableview->selectionModel()->selectedRows().first();
const string user = index.sibling(index.row(), 0).data()
.toString().toStdString();
dialog->set_data(_database.get_user(user));
dialog->setProperty("edit", true);
dialog->show();
}
void MainWindow::about()
{
QMessageBox::about(this, tr("About Whyblocked"),
@ -371,160 +375,42 @@ void MainWindow::show_details(QModelIndex index)
label_receipts->setText(QString::fromStdString((text)));
}
const string MainWindow::urls_to_hyperlinks(const string &text)
void MainWindow::populate_tableview(const vector<Database::data> &entries)
{
std::regex re_url("((https?|gopher|ftps?)\\://[^ <]*)");
return std::regex_replace(text, re_url, "<a href=\"$1\">$1</a>");
}
void MainWindow::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("text/plain"))
_model->clear();
_model->setHorizontalHeaderLabels(
{
event->acceptProposedAction();
tr("User/Instance"),
tr("Blocked/Silenced"),
tr("Reason")
});
tableview->horizontalHeader()->resizeSection(0, _headersize[0]);
tableview->horizontalHeader()->resizeSection(1, _headersize[1]);
tableview->horizontalHeader()->resizeSection(2, _headersize[2]);
for (const Database::data &entry : entries)
{
add_row(QString::fromStdString(entry.user),
entry.blocked,
QString::fromStdString(entry.reason));
}
}
void MainWindow::dropEvent(QDropEvent *event)
void MainWindow::reload()
{
string text = event->mimeData()->text().toStdString();
const std::array<const std::regex, 4> fediverse =
{
std::regex("https://([^/]+)/@([^/]+)"), // Mastodon
std::regex("https://([^/]+)/profile/([^/]+)"), // Friendica
std::regex("https://([^/]+)/users/([^/]+)"), // Pleroma
std::regex("https://([^/]+)/([^/]+)") // Gnusocial
};
std::smatch match;
_database.reload();
populate_tableview(_dbdata);
}
for (const std::regex &re : fediverse)
void MainWindow::find()
{
if (widget_find->isVisible())
{
std::regex_match(text, match, re);
const string instance = match[1];
const string user = match[2];
if (!instance.empty() && !user.empty())
{
text = '@' + user + '@' + instance;
break;
}
widget_find->hide();
}
DialogAdd *dialog = new DialogAdd(_database, this);
Database::data data;
data.user = text;
dialog->set_data(data);
dialog->show();
}
DialogAdd::DialogAdd(Database &database, QMainWindow *parent)
: QDialog(parent)
, _parent(static_cast<MainWindow*>(parent))
, _database(database)
{
setupUi(this);
}
const Database::data DialogAdd::get_data() const
{
std::vector<string> receipts;
for (int row = 0; row <= list_receipts->count() - 1; ++row)
else
{
receipts.push_back(list_receipts->item(row)->text().toStdString());
}
Database::data data;
data.user = text_user->text().toStdString();
data.blocked = radio_blocked->isChecked();
data.reason = text_reason->text().toStdString();
data.receipts = receipts;
return data;
}
void DialogAdd::set_data(const Database::data &data)
{
text_user->setText(QString::fromStdString(data.user));
radio_blocked->setChecked(data.blocked);
radio_silcenced->setChecked(!data.blocked);
text_reason->setText(QString::fromStdString(data.reason));
for (const string &receipt : data.receipts)
{
QListWidgetItem *item =
new QListWidgetItem(QString::fromStdString(receipt));
item->setFlags(item->flags() | Qt::ItemIsEditable);
list_receipts->insertItem(list_receipts->count(), item);
widget_find->show();
text_find->setFocus();
}
}
void DialogAdd::add_receipt()
{
QListWidgetItem *item = new QListWidgetItem(tr("Insert receipt here."));
item->setFlags(item->flags() | Qt::ItemIsEditable);
list_receipts->insertItem(list_receipts->count(), item);
list_receipts->editItem(item);
}
void DialogAdd::remove_receipt()
{
for (auto item :list_receipts->selectedItems())
{
delete item;
}
}
void DialogAdd::accept()
{
if (property("edit").toBool())
{
_parent->remove();
}
Database::data data = get_data();
if (!data)
{
return;
}
_database.add_user(data);
_parent->add_row(QString::fromStdString(data.user),
data.blocked,
QString::fromStdString(data.reason));
delete this;
}
void DialogAdd::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("text/plain"))
{
event->acceptProposedAction();
}
}
void DialogAdd::dropEvent(QDropEvent *event)
{
const QString text = event->mimeData()->text();
QListWidgetItem *item = new QListWidgetItem(text);
item->setFlags(item->flags() | Qt::ItemIsEditable);
list_receipts->insertItem(list_receipts->count(), item);
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QCoreApplication::setApplicationName("Whyblocked");
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&qtTranslator);
QTranslator appTranslator;
appTranslator.load("whyblocked_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&appTranslator);
MainWindow win;
win.show();
return app.exec();
}

View File

@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INTERFACE_QT_HPP
#define INTERFACE_QT_HPP
#ifndef MAINWINDOW_HPP
#define MAINWINDOW_HPP
#include <string>
#include <memory>
@ -25,10 +25,9 @@
#include <QStandardItemModel>
#include <QDialog>
#include <QtGui/qevent.h>
#include "xdgcfg.hpp"
#include "whyblocked.hpp"
#include "../xdgcfg.hpp"
#include "../whyblocked.hpp"
#include "ui_whyblocked.h"
#include "ui_whyblocked_add.h"
using std::string;
using std::vector;
@ -69,27 +68,4 @@ private slots:
};
class DialogAdd : public QDialog, private Ui::DialogAdd
{
Q_OBJECT
public:
explicit DialogAdd(Database &database, QMainWindow *parent = nullptr);
void set_data(const Database::data &data);
private:
const Database::data get_data() const;
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
MainWindow *_parent;
Database &_database;
private slots:
void add_receipt();
void remove_receipt();
void accept();
};
#endif // INTERFACE_QT_HPP
#endif // MAINWINDOW_HPP

View File

@ -4,285 +4,285 @@
<context>
<name>DialogAdd</name>
<message>
<location filename="../src/whyblocked_add.ui" line="17"/>
<location filename="../src/qt/whyblocked_add.ui" line="17"/>
<source>Add entry</source>
<translation>Eintrag hinzufügen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="40"/>
<location filename="../src/qt/whyblocked_add.ui" line="40"/>
<source>Memory aids, proof</source>
<translation>Gedächtnisstützen, Beweise</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="43"/>
<location filename="../src/qt/whyblocked_add.ui" line="43"/>
<source>Rece&amp;ipts</source>
<translation>Be&amp;lege</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="56"/>
<location filename="../src/qt/whyblocked_add.ui" line="56"/>
<source>Add receipt</source>
<translation>Beleg hinzufügen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="59"/>
<location filename="../src/qt/whyblocked_add.ui" line="59"/>
<source>&amp;Add</source>
<translation>&amp;Hinzufügen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="79"/>
<location filename="../src/qt/whyblocked_add.ui" line="79"/>
<source>&amp;Blocked</source>
<translation>&amp;Blockiert</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="98"/>
<location filename="../src/qt/whyblocked_add.ui" line="98"/>
<source>&amp;Silenced</source>
<translation>&amp;Gedämpft</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="105"/>
<location filename="../src/qt/whyblocked_add.ui" line="105"/>
<source>R&amp;eason</source>
<translation>B&amp;egründung</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="134"/>
<location filename="../src/qt/whyblocked_add.ui" line="134"/>
<source>Blocked/Silenced</source>
<translation>Blockiert/Gedämpft</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="144"/>
<location filename="../src/qt/whyblocked_add.ui" line="144"/>
<source>&amp;User/Instance</source>
<translation>Ben&amp;utzer/Instanz</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="154"/>
<location filename="../src/qt/whyblocked_add.ui" line="154"/>
<source>Remove receipt</source>
<translation>Beleg entfernen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="157"/>
<location filename="../src/qt/whyblocked_add.ui" line="157"/>
<source>Re&amp;move</source>
<translation>Ent&amp;fernen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="164"/>
<location filename="../src/qt/whyblocked_add.ui" line="164"/>
<source>Del</source>
<translation></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="171"/>
<location filename="../src/qt/whyblocked_add.ui" line="171"/>
<source>You can drag URLs in here</source>
<translation>Du kannst URLs hier hineinziehen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="461"/>
<location filename="../src/qt/dialog_add.cpp" line="79"/>
<source>Insert receipt here.</source>
<translation>Beleg hier einfügen.</translation>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../src/whyblocked.ui" line="17"/>
<location filename="../src/qt/whyblocked.ui" line="17"/>
<source>Whyblocked</source>
<translation></translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="56"/>
<location filename="../src/qt/whyblocked.ui" line="56"/>
<source>Search for Users/Instances</source>
<translation>Suche nach Benutzern/Instanzen</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="69"/>
<source>Search for Reasons</source>
<translation>Suche nach Begründungen</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="88"/>
<source>Click or press enter to view receipts</source>
<translation>Klicken oder Eingabe drücken, um Belege zu anzuzeigen</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="131"/>
<source>Memory aids, proof</source>
<translation>Gedächtnisstützen, Beweise</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="155"/>
<source>Toolbar</source>
<translation>Werkzeugleiste</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="186"/>
<source>&amp;Database</source>
<translation>&amp;Datenbank</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="197"/>
<source>&amp;Help</source>
<translation>&amp;Hilfe</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="210"/>
<source>&amp;Add</source>
<translation>&amp;Hinzufügen</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="213"/>
<source>Add user or instance</source>
<translation>Benutzer oder Instanz hinzufügen</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="216"/>
<source>Ctrl+N</source>
<translation></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="225"/>
<source>Re&amp;move</source>
<translation>Ent&amp;fernen</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="228"/>
<source>Remove user or instance</source>
<translation>Benutzer oder Instanz entfernen</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="231"/>
<source>Del</source>
<translation></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="240"/>
<source>&amp;About</source>
<translation>&amp;Über</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="243"/>
<source>About this application</source>
<translation>Über dieses Programm</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="252"/>
<source>&amp;Reload</source>
<translation>Neu &amp;laden</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="255"/>
<source>Reload database</source>
<translation>Datenbank neu laden</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="258"/>
<source>Ctrl+R</source>
<translation></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="267"/>
<source>&amp;Quit</source>
<translation>&amp;Beenden</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="270"/>
<source>Quit application</source>
<translation>Programm beenden</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="273"/>
<source>Ctrl+Q</source>
<translation></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="282"/>
<source>&amp;Edit</source>
<translation>B&amp;earbeiten</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="285"/>
<location filename="../src/interface_qt.cpp" line="240"/>
<source>Edit entry</source>
<translation>Eintrag bearbeiten</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="300"/>
<source>&amp;Find</source>
<translation>&amp;Finden</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="303"/>
<source>Find entries</source>
<translation>Finde Einträge</translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="306"/>
<source>Ctrl+F</source>
<translation></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="59"/>
<location filename="../src/interface_qt.cpp" line="185"/>
<location filename="../src/qt/whyblocked.ui" line="59"/>
<location filename="../src/qt/mainwindow.cpp" line="383"/>
<source>User/Instance</source>
<translation>Benutzer/Instanz</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="186"/>
<source>Blocked/Silenced</source>
<translation>Blockiert/Gedämpft</translation>
<location filename="../src/qt/whyblocked.ui" line="69"/>
<source>Search for Reasons</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="72"/>
<location filename="../src/interface_qt.cpp" line="187"/>
<location filename="../src/qt/whyblocked.ui" line="72"/>
<location filename="../src/qt/mainwindow.cpp" line="385"/>
<source>Reason</source>
<translation>Begründung</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="111"/>
<location filename="../src/qt/whyblocked.ui" line="88"/>
<source>Click or press enter to view receipts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="131"/>
<source>Memory aids, proof</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="155"/>
<source>Toolbar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="186"/>
<source>&amp;Database</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="197"/>
<source>&amp;Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="210"/>
<source>&amp;Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="213"/>
<source>Add user or instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="216"/>
<source>Ctrl+N</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="225"/>
<source>Re&amp;move</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="228"/>
<source>Remove user or instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="231"/>
<source>Del</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="240"/>
<source>&amp;About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="243"/>
<source>About this application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="252"/>
<source>&amp;Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="255"/>
<source>Reload database</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="258"/>
<source>Ctrl+R</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="267"/>
<source>&amp;Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="270"/>
<source>Quit application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="273"/>
<source>Ctrl+Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="282"/>
<source>&amp;Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="285"/>
<location filename="../src/qt/mainwindow.cpp" line="333"/>
<source>Edit entry</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="300"/>
<source>&amp;Find</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="303"/>
<source>Find entries</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/whyblocked.ui" line="306"/>
<source>Ctrl+F</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/mainwindow.cpp" line="110"/>
<source>Try dragging an account from your webbrowser into this window.</source>
<translation>Versuche, einen Account von deinem Webbrowser in dieses Fenster zu ziehen.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="214"/>
<location filename="../src/qt/mainwindow.cpp" line="186"/>
<source>blocked</source>
<translation>blockiert</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="218"/>
<location filename="../src/qt/mainwindow.cpp" line="190"/>
<source>silenced</source>
<translation>gedämpft</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="234"/>
<source>Invalid selection</source>
<translation>Ungültige Auswahl</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="235"/>
<source>Please select only 1 entry to edit.</source>
<translation>Bitte nur 1 Eintrag zum bearbeiten auswählen.</translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="266"/>
<location filename="../src/qt/mainwindow.cpp" line="211"/>
<source>Nothing selected</source>
<translation>Nichts ausgewählt</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="267"/>
<location filename="../src/qt/mainwindow.cpp" line="212"/>
<source>Please select entries to remove.</source>
<translation>Bitte wähle Einträge aus, die gelöscht werden sollen.</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="342"/>
<location filename="../src/qt/mainwindow.cpp" line="327"/>
<source>Invalid selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/mainwindow.cpp" line="328"/>
<source>Please select only 1 entry to edit.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/mainwindow.cpp" line="346"/>
<source>About Whyblocked</source>
<translation>Über Whyblocked</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="343"/>
<location filename="../src/qt/mainwindow.cpp" line="347"/>
<source>&lt;p&gt;&lt;b&gt;Whyblocked&lt;/b&gt; %1&lt;/p&gt;&lt;p&gt;Reminds you why you blocked someone.&lt;/p&gt;&lt;p&gt;Sourcecode: &lt;a href=&quot;https://schlomp.space/tastytea/whyblocked&quot;&gt;https://schlomp.space/tastytea/whyblocked&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Copyright © 2018 &lt;a href=&quot;mailto:tastytea@tastytea.de&quot;&gt;tastytea&lt;/a&gt;.&lt;br&gt;Licence GPLv3: &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;GNU GPL version 3&lt;/a&gt;.&lt;br&gt;This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.&lt;/small&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;&lt;b&gt;Whyblocked&lt;/b&gt; %1&lt;/p&gt;&lt;p&gt;Erinnert dich, warum du jemanden blockiertest.&lt;/p&gt;&lt;p&gt;Quelltext: &lt;a href=&quot;https://schlomp.space/tastytea/whyblocked&quot;&gt;https://schlomp.space/tastytea/whyblocked&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Copyright © 2018 &lt;a href=&quot;mailto:tastytea@tastytea.de&quot;&gt;tastytea&lt;/a&gt;.&lt;br&gt;Lizenz GPLv3: &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;GNU GPL version 3&lt;/a&gt;.&lt;br&gt;Für dieses Programm besteht KEINERLEI GARANTIE. Dies ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen.&lt;/small&gt;&lt;/p&gt;</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="364"/>
<location filename="../src/qt/mainwindow.cpp" line="368"/>
<source>Receipts:</source>
<translation>Belege:</translation>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/qt/mainwindow.cpp" line="384"/>
<source>Blocked/Silenced</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -4,77 +4,77 @@
<context>
<name>DialogAdd</name>
<message>
<location filename="../src/whyblocked_add.ui" line="17"/>
<location filename="../src/qt/whyblocked_add.ui" line="17"/>
<source>Add entry</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="40"/>
<location filename="../src/qt/whyblocked_add.ui" line="40"/>
<source>Memory aids, proof</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="43"/>
<location filename="../src/qt/whyblocked_add.ui" line="43"/>
<source>Rece&amp;ipts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="56"/>
<location filename="../src/qt/whyblocked_add.ui" line="56"/>
<source>Add receipt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="59"/>
<location filename="../src/qt/whyblocked_add.ui" line="59"/>
<source>&amp;Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="79"/>
<location filename="../src/qt/whyblocked_add.ui" line="79"/>
<source>&amp;Blocked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="98"/>
<location filename="../src/qt/whyblocked_add.ui" line="98"/>
<source>&amp;Silenced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="105"/>
<location filename="../src/qt/whyblocked_add.ui" line="105"/>
<source>R&amp;eason</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="134"/>
<location filename="../src/qt/whyblocked_add.ui" line="134"/>
<source>Blocked/Silenced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="144"/>
<location filename="../src/qt/whyblocked_add.ui" line="144"/>
<source>&amp;User/Instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="154"/>
<location filename="../src/qt/whyblocked_add.ui" line="154"/>
<source>Remove receipt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="157"/>
<location filename="../src/qt/whyblocked_add.ui" line="157"/>
<source>Re&amp;move</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="164"/>
<location filename="../src/qt/whyblocked_add.ui" line="164"/>
<source>Del</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked_add.ui" line="171"/>
<location filename="../src/qt/whyblocked_add.ui" line="171"/>
<source>You can drag URLs in here</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="461"/>
<location filename="../src/qt/dialog_add.cpp" line="79"/>
<source>Insert receipt here.</source>
<translation type="unfinished"></translation>
</message>
@ -82,205 +82,205 @@
<context>
<name>MainWindow</name>
<message>
<location filename="../src/whyblocked.ui" line="17"/>
<location filename="../src/qt/whyblocked.ui" line="17"/>
<source>Whyblocked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="56"/>
<location filename="../src/qt/whyblocked.ui" line="56"/>
<source>Search for Users/Instances</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="69"/>
<location filename="../src/qt/whyblocked.ui" line="69"/>
<source>Search for Reasons</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="88"/>
<location filename="../src/qt/whyblocked.ui" line="88"/>
<source>Click or press enter to view receipts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="131"/>
<location filename="../src/qt/whyblocked.ui" line="131"/>
<source>Memory aids, proof</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="155"/>
<location filename="../src/qt/whyblocked.ui" line="155"/>
<source>Toolbar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="186"/>
<location filename="../src/qt/whyblocked.ui" line="186"/>
<source>&amp;Database</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="197"/>
<location filename="../src/qt/whyblocked.ui" line="197"/>
<source>&amp;Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="210"/>
<location filename="../src/qt/whyblocked.ui" line="210"/>
<source>&amp;Add</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="213"/>
<location filename="../src/qt/whyblocked.ui" line="213"/>
<source>Add user or instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="216"/>
<location filename="../src/qt/whyblocked.ui" line="216"/>
<source>Ctrl+N</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="225"/>
<location filename="../src/qt/whyblocked.ui" line="225"/>
<source>Re&amp;move</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="228"/>
<location filename="../src/qt/whyblocked.ui" line="228"/>
<source>Remove user or instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="231"/>
<location filename="../src/qt/whyblocked.ui" line="231"/>
<source>Del</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="240"/>
<location filename="../src/qt/whyblocked.ui" line="240"/>
<source>&amp;About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="243"/>
<location filename="../src/qt/whyblocked.ui" line="243"/>
<source>About this application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="252"/>
<location filename="../src/qt/whyblocked.ui" line="252"/>
<source>&amp;Reload</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="255"/>
<location filename="../src/qt/whyblocked.ui" line="255"/>
<source>Reload database</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="258"/>
<location filename="../src/qt/whyblocked.ui" line="258"/>
<source>Ctrl+R</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="267"/>
<location filename="../src/qt/whyblocked.ui" line="267"/>
<source>&amp;Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="270"/>
<location filename="../src/qt/whyblocked.ui" line="270"/>
<source>Quit application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="273"/>
<location filename="../src/qt/whyblocked.ui" line="273"/>
<source>Ctrl+Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="282"/>
<location filename="../src/qt/whyblocked.ui" line="282"/>
<source>&amp;Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="285"/>
<location filename="../src/interface_qt.cpp" line="240"/>
<location filename="../src/qt/whyblocked.ui" line="285"/>
<location filename="../src/qt/mainwindow.cpp" line="333"/>
<source>Edit entry</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="300"/>
<location filename="../src/qt/whyblocked.ui" line="300"/>
<source>&amp;Find</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="303"/>
<location filename="../src/qt/whyblocked.ui" line="303"/>
<source>Find entries</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="306"/>
<location filename="../src/qt/whyblocked.ui" line="306"/>
<source>Ctrl+F</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="59"/>
<location filename="../src/interface_qt.cpp" line="185"/>
<location filename="../src/qt/whyblocked.ui" line="59"/>
<location filename="../src/qt/mainwindow.cpp" line="383"/>
<source>User/Instance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="186"/>
<location filename="../src/qt/mainwindow.cpp" line="384"/>
<source>Blocked/Silenced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/whyblocked.ui" line="72"/>
<location filename="../src/interface_qt.cpp" line="187"/>
<location filename="../src/qt/whyblocked.ui" line="72"/>
<location filename="../src/qt/mainwindow.cpp" line="385"/>
<source>Reason</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="111"/>
<location filename="../src/qt/mainwindow.cpp" line="110"/>
<source>Try dragging an account from your webbrowser into this window.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="214"/>
<location filename="../src/qt/mainwindow.cpp" line="186"/>
<source>blocked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="218"/>
<location filename="../src/qt/mainwindow.cpp" line="190"/>
<source>silenced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="234"/>
<location filename="../src/qt/mainwindow.cpp" line="327"/>
<source>Invalid selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="235"/>
<location filename="../src/qt/mainwindow.cpp" line="328"/>
<source>Please select only 1 entry to edit.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="266"/>
<location filename="../src/qt/mainwindow.cpp" line="211"/>
<source>Nothing selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="267"/>
<location filename="../src/qt/mainwindow.cpp" line="212"/>
<source>Please select entries to remove.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="342"/>
<location filename="../src/qt/mainwindow.cpp" line="346"/>
<source>About Whyblocked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="343"/>
<location filename="../src/qt/mainwindow.cpp" line="347"/>
<source>&lt;p&gt;&lt;b&gt;Whyblocked&lt;/b&gt; %1&lt;/p&gt;&lt;p&gt;Reminds you why you blocked someone.&lt;/p&gt;&lt;p&gt;Sourcecode: &lt;a href=&quot;https://schlomp.space/tastytea/whyblocked&quot;&gt;https://schlomp.space/tastytea/whyblocked&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;small&gt;Copyright © 2018 &lt;a href=&quot;mailto:tastytea@tastytea.de&quot;&gt;tastytea&lt;/a&gt;.&lt;br&gt;Licence GPLv3: &lt;a href=&quot;https://www.gnu.org/licenses/gpl-3.0.html&quot;&gt;GNU GPL version 3&lt;/a&gt;.&lt;br&gt;This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.&lt;/small&gt;&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_qt.cpp" line="364"/>
<location filename="../src/qt/mainwindow.cpp" line="368"/>
<source>Receipts:</source>
<translation type="unfinished"></translation>
</message>