Browse Source

Removed error report via statusbar, added error reporting via message box.

tastytea 4 days ago
parent
commit
540877fb75
Signed by: tastytea <tastytea@tastytea.de> GPG Key ID: CFC39497F1B26E07

+ 1
- 1
CMakeLists.txt View File

@@ -1,6 +1,6 @@
1 1
 cmake_minimum_required (VERSION 3.2)
2 2
 project (whyblocked
3
-         VERSION 0.12.1
3
+         VERSION 0.12.2
4 4
          LANGUAGES CXX
5 5
 )
6 6
 

+ 3
- 3
packages.CMakeLists.txt View File

@@ -1,8 +1,8 @@
1 1
 # Packages
2 2
 set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME})
3
-set(CPACK_PACKAGE_VERSION_MAJOR ${mastodon-cpp_VERSION_MAJOR})
4
-set(CPACK_PACKAGE_VERSION_MINOR ${mastodon-cpp_VERSION_MINOR})
5
-set(CPACK_PACKAGE_VERSION_PATCH ${mastodon-cpp_VERSION_PATCH})
3
+set(CPACK_PACKAGE_VERSION_MAJOR ${${CMAKE_PROJECT_NAME}_VERSION_MAJOR})
4
+set(CPACK_PACKAGE_VERSION_MINOR ${${CMAKE_PROJECT_NAME}_VERSION_MINOR})
5
+set(CPACK_PACKAGE_VERSION_PATCH ${${CMAKE_PROJECT_NAME}_VERSION_PATCH})
6 6
 set(CPACK_PACKAGE_VERSION ${whyblocked_VERSION})
7 7
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Whyblocked reminds you why you blocked someone.")
8 8
 set(CPACK_PACKAGE_CONTACT "tastytea <tastytea@tastytea.de>")

+ 4
- 10
src/interface_qt.cpp View File

@@ -17,8 +17,6 @@
17 17
 #include <regex>
18 18
 #include <array>
19 19
 #include <QMessageBox>
20
-#include <QDebug>
21
-#include <iostream>
22 20
 #include <QTranslator>
23 21
 #include <QLibraryInfo>
24 22
 #include <QtCore/qmimedata.h>
@@ -89,6 +87,8 @@ MainWindow::MainWindow(QMainWindow *parent)
89 87
     }
90 88
 
91 89
     populate_tableview();
90
+    statusBar()->showMessage(tr("Try dragging an account from your webbrowser "
91
+                                "into this window."));
92 92
 }
93 93
 
94 94
 MainWindow::~MainWindow()
@@ -171,8 +171,6 @@ void MainWindow::populate_tableview()
171 171
                     QString::fromStdString(std::get<2>(line)));
172 172
         }
173 173
     }
174
-
175
-    statusBar()->showMessage(tr("Database loaded."));
176 174
 }
177 175
 
178 176
 void MainWindow::add_row(const QString &user, const int &blocked,
@@ -240,15 +238,14 @@ void MainWindow::remove()
240 238
         {
241 239
             const string user = row.data().toString().toStdString();
242 240
             database::remove(user);
243
-            statusBar()->showMessage(tr("Removed %1 from database.")
244
-                                     .arg(QString::fromStdString(user)));
245 241
             _model->removeRow(row.row());
246 242
         }
247 243
         label_receipts->clear();
248 244
     }
249 245
     else
250 246
     {
251
-        statusBar()->showMessage(tr("Select data to remove."));
247
+        QMessageBox::warning(this, tr("Nothing selected"),
248
+                             tr("Please select entries to remove."));
252 249
     }
253 250
 }
254 251
 
@@ -410,9 +407,6 @@ void DialogAdd::accept()
410 407
         database::add_receipt(data.user, receipt);
411 408
     }
412 409
 
413
-    _parent->statusBar()->showMessage(tr("Added %1 to database.")
414
-                                      .arg(QString::fromStdString(data.user)));
415
-
416 410
     delete this;
417 411
 }
418 412
 

+ 3
- 0
src/whyblocked_add.ui View File

@@ -167,6 +167,9 @@
167 167
      </item>
168 168
      <item row="4" column="1" rowspan="3">
169 169
       <widget class="QListWidget" name="list_receipts">
170
+       <property name="toolTip">
171
+        <string>You can drag URLs in here</string>
172
+       </property>
170 173
        <property name="editTriggers">
171 174
         <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
172 175
        </property>

+ 23
- 23
translations/whyblocked_de.ts View File

@@ -69,14 +69,14 @@
69 69
         <translation></translation>
70 70
     </message>
71 71
     <message>
72
-        <location filename="../src/interface_qt.cpp" line="378"/>
73
-        <source>Insert receipt here.</source>
74
-        <translation>Beleg hier einfügen.</translation>
72
+        <location filename="../src/whyblocked_add.ui" line="171"/>
73
+        <source>You can drag URLs in here</source>
74
+        <translation type="unfinished">Du kannst URLs hier hineinziehen</translation>
75 75
     </message>
76 76
     <message>
77
-        <location filename="../src/interface_qt.cpp" line="413"/>
78
-        <source>Added %1 to database.</source>
79
-        <translation>%1 zur Datenbank hinzugefügt.</translation>
77
+        <location filename="../src/interface_qt.cpp" line="375"/>
78
+        <source>Insert receipt here.</source>
79
+        <translation>Beleg hier einfügen.</translation>
80 80
     </message>
81 81
 </context>
82 82
 <context>
@@ -188,7 +188,7 @@
188 188
     </message>
189 189
     <message>
190 190
         <location filename="../src/whyblocked.ui" line="229"/>
191
-        <location filename="../src/interface_qt.cpp" line="211"/>
191
+        <location filename="../src/interface_qt.cpp" line="209"/>
192 192
         <source>Edit entry</source>
193 193
         <translation>Eintrag bearbeiten</translation>
194 194
     </message>
@@ -208,52 +208,52 @@
208 208
         <translation>Begründung</translation>
209 209
     </message>
210 210
     <message>
211
-        <location filename="../src/interface_qt.cpp" line="175"/>
212
-        <source>Database loaded.</source>
213
-        <translation>Datenbank geladen.</translation>
211
+        <location filename="../src/interface_qt.cpp" line="90"/>
212
+        <source>Try dragging an account from your webbrowser into this window.</source>
213
+        <translation>Versuche, einen account von deinem webbrowser in dieses fenster zu ziehen.</translation>
214 214
     </message>
215 215
     <message>
216
-        <location filename="../src/interface_qt.cpp" line="185"/>
216
+        <location filename="../src/interface_qt.cpp" line="183"/>
217 217
         <source>blocked</source>
218 218
         <translation>blockiert</translation>
219 219
     </message>
220 220
     <message>
221
-        <location filename="../src/interface_qt.cpp" line="189"/>
221
+        <location filename="../src/interface_qt.cpp" line="187"/>
222 222
         <source>silenced</source>
223 223
         <translation>gedämpft</translation>
224 224
     </message>
225 225
     <message>
226
-        <location filename="../src/interface_qt.cpp" line="205"/>
226
+        <location filename="../src/interface_qt.cpp" line="203"/>
227 227
         <source>Invalid selection</source>
228 228
         <translation>Ungültige Auswahl</translation>
229 229
     </message>
230 230
     <message>
231
-        <location filename="../src/interface_qt.cpp" line="206"/>
231
+        <location filename="../src/interface_qt.cpp" line="204"/>
232 232
         <source>Please select only 1 entry to edit.</source>
233 233
         <translation>Bitte nur 1 Eintrag zum bearbeiten auswählen.</translation>
234 234
     </message>
235 235
     <message>
236
-        <location filename="../src/interface_qt.cpp" line="243"/>
237
-        <source>Removed %1 from database.</source>
238
-        <translation>%1 aus der Datenbank gelöscht.</translation>
236
+        <location filename="../src/interface_qt.cpp" line="247"/>
237
+        <source>Nothing selected</source>
238
+        <translation>Nichts ausgewählt</translation>
239 239
     </message>
240 240
     <message>
241
-        <location filename="../src/interface_qt.cpp" line="251"/>
242
-        <source>Select data to remove.</source>
243
-        <translation>Wähle Daten zum löschen aus.</translation>
241
+        <location filename="../src/interface_qt.cpp" line="248"/>
242
+        <source>Please select entries to remove.</source>
243
+        <translation>Bitte wähle einträge aus, die gelöscht werden sollen.</translation>
244 244
     </message>
245 245
     <message>
246
-        <location filename="../src/interface_qt.cpp" line="257"/>
246
+        <location filename="../src/interface_qt.cpp" line="254"/>
247 247
         <source>About Whyblocked</source>
248 248
         <translation>Über Whyblocked</translation>
249 249
     </message>
250 250
     <message>
251
-        <location filename="../src/interface_qt.cpp" line="258"/>
251
+        <location filename="../src/interface_qt.cpp" line="255"/>
252 252
         <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>
253 253
         <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>
254 254
     </message>
255 255
     <message>
256
-        <location filename="../src/interface_qt.cpp" line="281"/>
256
+        <location filename="../src/interface_qt.cpp" line="278"/>
257 257
         <source>Receipts:</source>
258 258
         <translation>Belege:</translation>
259 259
     </message>

+ 18
- 18
translations/whyblocked_en.ts View File

@@ -69,13 +69,13 @@
69 69
         <translation type="unfinished"></translation>
70 70
     </message>
71 71
     <message>
72
-        <location filename="../src/interface_qt.cpp" line="378"/>
73
-        <source>Insert receipt here.</source>
72
+        <location filename="../src/whyblocked_add.ui" line="171"/>
73
+        <source>You can drag URLs in here</source>
74 74
         <translation type="unfinished"></translation>
75 75
     </message>
76 76
     <message>
77
-        <location filename="../src/interface_qt.cpp" line="413"/>
78
-        <source>Added %1 to database.</source>
77
+        <location filename="../src/interface_qt.cpp" line="375"/>
78
+        <source>Insert receipt here.</source>
79 79
         <translation type="unfinished"></translation>
80 80
     </message>
81 81
 </context>
@@ -188,7 +188,7 @@
188 188
     </message>
189 189
     <message>
190 190
         <location filename="../src/whyblocked.ui" line="229"/>
191
-        <location filename="../src/interface_qt.cpp" line="211"/>
191
+        <location filename="../src/interface_qt.cpp" line="209"/>
192 192
         <source>Edit entry</source>
193 193
         <translation type="unfinished"></translation>
194 194
     </message>
@@ -208,52 +208,52 @@
208 208
         <translation type="unfinished"></translation>
209 209
     </message>
210 210
     <message>
211
-        <location filename="../src/interface_qt.cpp" line="175"/>
212
-        <source>Database loaded.</source>
211
+        <location filename="../src/interface_qt.cpp" line="90"/>
212
+        <source>Try dragging an account from your webbrowser into this window.</source>
213 213
         <translation type="unfinished"></translation>
214 214
     </message>
215 215
     <message>
216
-        <location filename="../src/interface_qt.cpp" line="185"/>
216
+        <location filename="../src/interface_qt.cpp" line="183"/>
217 217
         <source>blocked</source>
218 218
         <translation type="unfinished"></translation>
219 219
     </message>
220 220
     <message>
221
-        <location filename="../src/interface_qt.cpp" line="189"/>
221
+        <location filename="../src/interface_qt.cpp" line="187"/>
222 222
         <source>silenced</source>
223 223
         <translation type="unfinished"></translation>
224 224
     </message>
225 225
     <message>
226
-        <location filename="../src/interface_qt.cpp" line="205"/>
226
+        <location filename="../src/interface_qt.cpp" line="203"/>
227 227
         <source>Invalid selection</source>
228 228
         <translation type="unfinished"></translation>
229 229
     </message>
230 230
     <message>
231
-        <location filename="../src/interface_qt.cpp" line="206"/>
231
+        <location filename="../src/interface_qt.cpp" line="204"/>
232 232
         <source>Please select only 1 entry to edit.</source>
233 233
         <translation type="unfinished"></translation>
234 234
     </message>
235 235
     <message>
236
-        <location filename="../src/interface_qt.cpp" line="243"/>
237
-        <source>Removed %1 from database.</source>
236
+        <location filename="../src/interface_qt.cpp" line="247"/>
237
+        <source>Nothing selected</source>
238 238
         <translation type="unfinished"></translation>
239 239
     </message>
240 240
     <message>
241
-        <location filename="../src/interface_qt.cpp" line="251"/>
242
-        <source>Select data to remove.</source>
241
+        <location filename="../src/interface_qt.cpp" line="248"/>
242
+        <source>Please select entries to remove.</source>
243 243
         <translation type="unfinished"></translation>
244 244
     </message>
245 245
     <message>
246
-        <location filename="../src/interface_qt.cpp" line="257"/>
246
+        <location filename="../src/interface_qt.cpp" line="254"/>
247 247
         <source>About Whyblocked</source>
248 248
         <translation type="unfinished"></translation>
249 249
     </message>
250 250
     <message>
251
-        <location filename="../src/interface_qt.cpp" line="258"/>
251
+        <location filename="../src/interface_qt.cpp" line="255"/>
252 252
         <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>
253 253
         <translation type="unfinished"></translation>
254 254
     </message>
255 255
     <message>
256
-        <location filename="../src/interface_qt.cpp" line="281"/>
256
+        <location filename="../src/interface_qt.cpp" line="278"/>
257 257
         <source>Receipts:</source>
258 258
         <translation type="unfinished"></translation>
259 259
     </message>

Loading…
Cancel
Save