Added settings for checkboxes in find-widget.
parent
dd83e11338
commit
eab650d6dd
|
@ -91,6 +91,14 @@ MainWindow::MainWindow(QMainWindow *parent)
|
|||
_headersize = { value[0], value[1], value[2] };
|
||||
}
|
||||
|
||||
key = "find_in";
|
||||
if (root.exists(key) && root[key.c_str()].isGroup())
|
||||
{
|
||||
const libconfig::Setting &value = root[key.c_str()];
|
||||
check_user->setChecked(value["user"]);
|
||||
check_reason->setChecked(value["reason"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
widget_find->hide();
|
||||
|
@ -107,7 +115,8 @@ MainWindow::~MainWindow()
|
|||
libconfig::Setting &root = _config.get_cfg().getRoot();
|
||||
// We can't add an element that already exists, so we delete it beforehand.
|
||||
for (const string &key :
|
||||
{ "size", "toolbar_position", "toolbar_visible", "table_headers" })
|
||||
{ "size", "toolbar_position", "toolbar_visible", "table_headers",
|
||||
"find_in" })
|
||||
{
|
||||
if (root.exists(key))
|
||||
{
|
||||
|
@ -156,6 +165,13 @@ MainWindow::~MainWindow()
|
|||
headers.add(libconfig::Setting::TypeInt) =
|
||||
tableview->horizontalHeader()->sectionSize(2);
|
||||
|
||||
libconfig::Setting &find_in = root.add("find_in",
|
||||
libconfig::Setting::TypeGroup);
|
||||
find_in.add("user", libconfig::Setting::TypeBoolean) =
|
||||
check_user->isChecked();
|
||||
find_in.add("reason", libconfig::Setting::TypeBoolean) =
|
||||
check_reason->isChecked();
|
||||
|
||||
_config.write();
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<translation>Du kannst URLs hier hineinziehen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="449"/>
|
||||
<location filename="../src/interface_qt.cpp" line="465"/>
|
||||
<source>Insert receipt here.</source>
|
||||
<translation>Beleg hier einfügen.</translation>
|
||||
</message>
|
||||
|
@ -198,7 +198,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../src/whyblocked.ui" line="285"/>
|
||||
<location filename="../src/interface_qt.cpp" line="223"/>
|
||||
<location filename="../src/interface_qt.cpp" line="239"/>
|
||||
<source>Edit entry</source>
|
||||
<translation>Eintrag bearbeiten</translation>
|
||||
</message>
|
||||
|
@ -219,68 +219,68 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../src/whyblocked.ui" line="59"/>
|
||||
<location filename="../src/interface_qt.cpp" line="167"/>
|
||||
<location filename="../src/interface_qt.cpp" line="183"/>
|
||||
<source>User/Instance</source>
|
||||
<translation>Benutzer/Instanz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="168"/>
|
||||
<location filename="../src/interface_qt.cpp" line="184"/>
|
||||
<source>Blocked/Silenced</source>
|
||||
<translation>Blockiert/Gedämpft</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/whyblocked.ui" line="72"/>
|
||||
<location filename="../src/interface_qt.cpp" line="169"/>
|
||||
<location filename="../src/interface_qt.cpp" line="185"/>
|
||||
<source>Reason</source>
|
||||
<translation>Begründung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="101"/>
|
||||
<location filename="../src/interface_qt.cpp" line="109"/>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="197"/>
|
||||
<location filename="../src/interface_qt.cpp" line="213"/>
|
||||
<source>blocked</source>
|
||||
<translation>blockiert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="201"/>
|
||||
<location filename="../src/interface_qt.cpp" line="217"/>
|
||||
<source>silenced</source>
|
||||
<translation>gedämpft</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="217"/>
|
||||
<location filename="../src/interface_qt.cpp" line="233"/>
|
||||
<source>Invalid selection</source>
|
||||
<translation>Ungültige Auswahl</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="218"/>
|
||||
<location filename="../src/interface_qt.cpp" line="234"/>
|
||||
<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="261"/>
|
||||
<location filename="../src/interface_qt.cpp" line="277"/>
|
||||
<source>Nothing selected</source>
|
||||
<translation>Nichts ausgewählt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="262"/>
|
||||
<location filename="../src/interface_qt.cpp" line="278"/>
|
||||
<source>Please select entries to remove.</source>
|
||||
<translation>Bitte wähle einträge aus, die gelöscht werden sollen.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="328"/>
|
||||
<location filename="../src/interface_qt.cpp" line="344"/>
|
||||
<source>About Whyblocked</source>
|
||||
<translation>Über Whyblocked</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="329"/>
|
||||
<location filename="../src/interface_qt.cpp" line="345"/>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="352"/>
|
||||
<location filename="../src/interface_qt.cpp" line="368"/>
|
||||
<source>Receipts:</source>
|
||||
<translation>Belege:</translation>
|
||||
</message>
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="449"/>
|
||||
<location filename="../src/interface_qt.cpp" line="465"/>
|
||||
<source>Insert receipt here.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -198,7 +198,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../src/whyblocked.ui" line="285"/>
|
||||
<location filename="../src/interface_qt.cpp" line="223"/>
|
||||
<location filename="../src/interface_qt.cpp" line="239"/>
|
||||
<source>Edit entry</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -219,68 +219,68 @@
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../src/whyblocked.ui" line="59"/>
|
||||
<location filename="../src/interface_qt.cpp" line="167"/>
|
||||
<location filename="../src/interface_qt.cpp" line="183"/>
|
||||
<source>User/Instance</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="168"/>
|
||||
<location filename="../src/interface_qt.cpp" line="184"/>
|
||||
<source>Blocked/Silenced</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/whyblocked.ui" line="72"/>
|
||||
<location filename="../src/interface_qt.cpp" line="169"/>
|
||||
<location filename="../src/interface_qt.cpp" line="185"/>
|
||||
<source>Reason</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="101"/>
|
||||
<location filename="../src/interface_qt.cpp" line="109"/>
|
||||
<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="197"/>
|
||||
<location filename="../src/interface_qt.cpp" line="213"/>
|
||||
<source>blocked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="201"/>
|
||||
<location filename="../src/interface_qt.cpp" line="217"/>
|
||||
<source>silenced</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="217"/>
|
||||
<location filename="../src/interface_qt.cpp" line="233"/>
|
||||
<source>Invalid selection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="218"/>
|
||||
<location filename="../src/interface_qt.cpp" line="234"/>
|
||||
<source>Please select only 1 entry to edit.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="261"/>
|
||||
<location filename="../src/interface_qt.cpp" line="277"/>
|
||||
<source>Nothing selected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="262"/>
|
||||
<location filename="../src/interface_qt.cpp" line="278"/>
|
||||
<source>Please select entries to remove.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="328"/>
|
||||
<location filename="../src/interface_qt.cpp" line="344"/>
|
||||
<source>About Whyblocked</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="329"/>
|
||||
<location filename="../src/interface_qt.cpp" line="345"/>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/interface_qt.cpp" line="352"/>
|
||||
<location filename="../src/interface_qt.cpp" line="368"/>
|
||||
<source>Receipts:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Loading…
Reference in New Issue