Removed error report via statusbar, added error reporting via message box.
parent
f0e01cd268
commit
540877fb75
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.2)
|
cmake_minimum_required (VERSION 3.2)
|
||||||
project (whyblocked
|
project (whyblocked
|
||||||
VERSION 0.12.1
|
VERSION 0.12.2
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# Packages
|
# Packages
|
||||||
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
|
set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${mastodon-cpp_VERSION_MAJOR})
|
set(CPACK_PACKAGE_VERSION_MAJOR ${${CMAKE_PROJECT_NAME}_VERSION_MAJOR})
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${mastodon-cpp_VERSION_MINOR})
|
set(CPACK_PACKAGE_VERSION_MINOR ${${CMAKE_PROJECT_NAME}_VERSION_MINOR})
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${mastodon-cpp_VERSION_PATCH})
|
set(CPACK_PACKAGE_VERSION_PATCH ${${CMAKE_PROJECT_NAME}_VERSION_PATCH})
|
||||||
set(CPACK_PACKAGE_VERSION ${whyblocked_VERSION})
|
set(CPACK_PACKAGE_VERSION ${whyblocked_VERSION})
|
||||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Whyblocked reminds you why you blocked someone.")
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Whyblocked reminds you why you blocked someone.")
|
||||||
set(CPACK_PACKAGE_CONTACT "tastytea <tastytea@tastytea.de>")
|
set(CPACK_PACKAGE_CONTACT "tastytea <tastytea@tastytea.de>")
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDebug>
|
|
||||||
#include <iostream>
|
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QLibraryInfo>
|
#include <QLibraryInfo>
|
||||||
#include <QtCore/qmimedata.h>
|
#include <QtCore/qmimedata.h>
|
||||||
|
@ -89,6 +87,8 @@ MainWindow::MainWindow(QMainWindow *parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
populate_tableview();
|
populate_tableview();
|
||||||
|
statusBar()->showMessage(tr("Try dragging an account from your webbrowser "
|
||||||
|
"into this window."));
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
@ -171,8 +171,6 @@ void MainWindow::populate_tableview()
|
||||||
QString::fromStdString(std::get<2>(line)));
|
QString::fromStdString(std::get<2>(line)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
statusBar()->showMessage(tr("Database loaded."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::add_row(const QString &user, const int &blocked,
|
void MainWindow::add_row(const QString &user, const int &blocked,
|
||||||
|
@ -240,15 +238,14 @@ void MainWindow::remove()
|
||||||
{
|
{
|
||||||
const string user = row.data().toString().toStdString();
|
const string user = row.data().toString().toStdString();
|
||||||
database::remove(user);
|
database::remove(user);
|
||||||
statusBar()->showMessage(tr("Removed %1 from database.")
|
|
||||||
.arg(QString::fromStdString(user)));
|
|
||||||
_model->removeRow(row.row());
|
_model->removeRow(row.row());
|
||||||
}
|
}
|
||||||
label_receipts->clear();
|
label_receipts->clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
statusBar()->showMessage(tr("Select data to remove."));
|
QMessageBox::warning(this, tr("Nothing selected"),
|
||||||
|
tr("Please select entries to remove."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,9 +407,6 @@ void DialogAdd::accept()
|
||||||
database::add_receipt(data.user, receipt);
|
database::add_receipt(data.user, receipt);
|
||||||
}
|
}
|
||||||
|
|
||||||
_parent->statusBar()->showMessage(tr("Added %1 to database.")
|
|
||||||
.arg(QString::fromStdString(data.user)));
|
|
||||||
|
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,9 @@
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" rowspan="3">
|
<item row="4" column="1" rowspan="3">
|
||||||
<widget class="QListWidget" name="list_receipts">
|
<widget class="QListWidget" name="list_receipts">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>You can drag URLs in here</string>
|
||||||
|
</property>
|
||||||
<property name="editTriggers">
|
<property name="editTriggers">
|
||||||
<set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
|
<set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
|
||||||
</property>
|
</property>
|
||||||
|
|
|
@ -69,14 +69,14 @@
|
||||||
<translation></translation>
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="378"/>
|
<location filename="../src/whyblocked_add.ui" line="171"/>
|
||||||
<source>Insert receipt here.</source>
|
<source>You can drag URLs in here</source>
|
||||||
<translation>Beleg hier einfügen.</translation>
|
<translation type="unfinished">Du kannst URLs hier hineinziehen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="413"/>
|
<location filename="../src/interface_qt.cpp" line="375"/>
|
||||||
<source>Added %1 to database.</source>
|
<source>Insert receipt here.</source>
|
||||||
<translation>%1 zur Datenbank hinzugefügt.</translation>
|
<translation>Beleg hier einfügen.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/whyblocked.ui" line="229"/>
|
<location filename="../src/whyblocked.ui" line="229"/>
|
||||||
<location filename="../src/interface_qt.cpp" line="211"/>
|
<location filename="../src/interface_qt.cpp" line="209"/>
|
||||||
<source>Edit entry</source>
|
<source>Edit entry</source>
|
||||||
<translation>Eintrag bearbeiten</translation>
|
<translation>Eintrag bearbeiten</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -208,52 +208,52 @@
|
||||||
<translation>Begründung</translation>
|
<translation>Begründung</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="175"/>
|
<location filename="../src/interface_qt.cpp" line="90"/>
|
||||||
<source>Database loaded.</source>
|
<source>Try dragging an account from your webbrowser into this window.</source>
|
||||||
<translation>Datenbank geladen.</translation>
|
<translation>Versuche, einen account von deinem webbrowser in dieses fenster zu ziehen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="185"/>
|
<location filename="../src/interface_qt.cpp" line="183"/>
|
||||||
<source>blocked</source>
|
<source>blocked</source>
|
||||||
<translation>blockiert</translation>
|
<translation>blockiert</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="189"/>
|
<location filename="../src/interface_qt.cpp" line="187"/>
|
||||||
<source>silenced</source>
|
<source>silenced</source>
|
||||||
<translation>gedämpft</translation>
|
<translation>gedämpft</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="205"/>
|
<location filename="../src/interface_qt.cpp" line="203"/>
|
||||||
<source>Invalid selection</source>
|
<source>Invalid selection</source>
|
||||||
<translation>Ungültige Auswahl</translation>
|
<translation>Ungültige Auswahl</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="206"/>
|
<location filename="../src/interface_qt.cpp" line="204"/>
|
||||||
<source>Please select only 1 entry to edit.</source>
|
<source>Please select only 1 entry to edit.</source>
|
||||||
<translation>Bitte nur 1 Eintrag zum bearbeiten auswählen.</translation>
|
<translation>Bitte nur 1 Eintrag zum bearbeiten auswählen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="243"/>
|
<location filename="../src/interface_qt.cpp" line="247"/>
|
||||||
<source>Removed %1 from database.</source>
|
<source>Nothing selected</source>
|
||||||
<translation>%1 aus der Datenbank gelöscht.</translation>
|
<translation>Nichts ausgewählt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="251"/>
|
<location filename="../src/interface_qt.cpp" line="248"/>
|
||||||
<source>Select data to remove.</source>
|
<source>Please select entries to remove.</source>
|
||||||
<translation>Wähle Daten zum löschen aus.</translation>
|
<translation>Bitte wähle einträge aus, die gelöscht werden sollen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="257"/>
|
<location filename="../src/interface_qt.cpp" line="254"/>
|
||||||
<source>About Whyblocked</source>
|
<source>About Whyblocked</source>
|
||||||
<translation>Über Whyblocked</translation>
|
<translation>Über Whyblocked</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="258"/>
|
<location filename="../src/interface_qt.cpp" line="255"/>
|
||||||
<source><p><b>Whyblocked</b> %1</p><p>Reminds you why you blocked someone.</p><p>Sourcecode: <a href="https://schlomp.space/tastytea/whyblocked">https://schlomp.space/tastytea/whyblocked</a></p><p><small>Copyright © 2018 <a href="mailto:tastytea@tastytea.de">tastytea</a>.<br>Licence GPLv3: <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPL version 3</a>.<br>This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.</small></p></source>
|
<source><p><b>Whyblocked</b> %1</p><p>Reminds you why you blocked someone.</p><p>Sourcecode: <a href="https://schlomp.space/tastytea/whyblocked">https://schlomp.space/tastytea/whyblocked</a></p><p><small>Copyright © 2018 <a href="mailto:tastytea@tastytea.de">tastytea</a>.<br>Licence GPLv3: <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPL version 3</a>.<br>This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.</small></p></source>
|
||||||
<translation><p><b>Whyblocked</b> %1</p><p>Erinnert dich, warum du jemanden blockiertest.</p><p>Quelltext: <a href="https://schlomp.space/tastytea/whyblocked">https://schlomp.space/tastytea/whyblocked</a></p><p><small>Copyright © 2018 <a href="mailto:tastytea@tastytea.de">tastytea</a>.<br>Lizenz GPLv3: <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPL version 3</a>.<br>Für dieses Programm besteht KEINERLEI GARANTIE. Dies ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen.</small></p></translation>
|
<translation><p><b>Whyblocked</b> %1</p><p>Erinnert dich, warum du jemanden blockiertest.</p><p>Quelltext: <a href="https://schlomp.space/tastytea/whyblocked">https://schlomp.space/tastytea/whyblocked</a></p><p><small>Copyright © 2018 <a href="mailto:tastytea@tastytea.de">tastytea</a>.<br>Lizenz GPLv3: <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPL version 3</a>.<br>Für dieses Programm besteht KEINERLEI GARANTIE. Dies ist freie Software, die Sie unter bestimmten Bedingungen weitergeben dürfen.</small></p></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="281"/>
|
<location filename="../src/interface_qt.cpp" line="278"/>
|
||||||
<source>Receipts:</source>
|
<source>Receipts:</source>
|
||||||
<translation>Belege:</translation>
|
<translation>Belege:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -69,13 +69,13 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="378"/>
|
<location filename="../src/whyblocked_add.ui" line="171"/>
|
||||||
<source>Insert receipt here.</source>
|
<source>You can drag URLs in here</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="413"/>
|
<location filename="../src/interface_qt.cpp" line="375"/>
|
||||||
<source>Added %1 to database.</source>
|
<source>Insert receipt here.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/whyblocked.ui" line="229"/>
|
<location filename="../src/whyblocked.ui" line="229"/>
|
||||||
<location filename="../src/interface_qt.cpp" line="211"/>
|
<location filename="../src/interface_qt.cpp" line="209"/>
|
||||||
<source>Edit entry</source>
|
<source>Edit entry</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -208,52 +208,52 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="175"/>
|
<location filename="../src/interface_qt.cpp" line="90"/>
|
||||||
<source>Database loaded.</source>
|
<source>Try dragging an account from your webbrowser into this window.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="185"/>
|
<location filename="../src/interface_qt.cpp" line="183"/>
|
||||||
<source>blocked</source>
|
<source>blocked</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="189"/>
|
<location filename="../src/interface_qt.cpp" line="187"/>
|
||||||
<source>silenced</source>
|
<source>silenced</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="205"/>
|
<location filename="../src/interface_qt.cpp" line="203"/>
|
||||||
<source>Invalid selection</source>
|
<source>Invalid selection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="206"/>
|
<location filename="../src/interface_qt.cpp" line="204"/>
|
||||||
<source>Please select only 1 entry to edit.</source>
|
<source>Please select only 1 entry to edit.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="243"/>
|
<location filename="../src/interface_qt.cpp" line="247"/>
|
||||||
<source>Removed %1 from database.</source>
|
<source>Nothing selected</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="251"/>
|
<location filename="../src/interface_qt.cpp" line="248"/>
|
||||||
<source>Select data to remove.</source>
|
<source>Please select entries to remove.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="257"/>
|
<location filename="../src/interface_qt.cpp" line="254"/>
|
||||||
<source>About Whyblocked</source>
|
<source>About Whyblocked</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="258"/>
|
<location filename="../src/interface_qt.cpp" line="255"/>
|
||||||
<source><p><b>Whyblocked</b> %1</p><p>Reminds you why you blocked someone.</p><p>Sourcecode: <a href="https://schlomp.space/tastytea/whyblocked">https://schlomp.space/tastytea/whyblocked</a></p><p><small>Copyright © 2018 <a href="mailto:tastytea@tastytea.de">tastytea</a>.<br>Licence GPLv3: <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPL version 3</a>.<br>This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.</small></p></source>
|
<source><p><b>Whyblocked</b> %1</p><p>Reminds you why you blocked someone.</p><p>Sourcecode: <a href="https://schlomp.space/tastytea/whyblocked">https://schlomp.space/tastytea/whyblocked</a></p><p><small>Copyright © 2018 <a href="mailto:tastytea@tastytea.de">tastytea</a>.<br>Licence GPLv3: <a href="https://www.gnu.org/licenses/gpl-3.0.html">GNU GPL version 3</a>.<br>This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions.</small></p></source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/interface_qt.cpp" line="281"/>
|
<location filename="../src/interface_qt.cpp" line="278"/>
|
||||||
<source>Receipts:</source>
|
<source>Receipts:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Loading…
Reference in New Issue