1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 04:31:39 +01:00

add missing icons, cleanup translations, fix last little issues, prepare for documentation

This commit is contained in:
2025-07-03 14:22:04 +02:00
parent a444bdd2fb
commit 803185de87
14 changed files with 38 additions and 72 deletions

View File

@@ -13,55 +13,40 @@
)
= Einleitung
#lorem(100)
#pagebreak()
= Konzept & Tools
#lorem(100)
== SQLite
#lorem(100)
== GTK4
#lorem(100)
== Libadwaita
#lorem(100)
== Blueprint
#lorem(100)
#pagebreak()
= Implementierung
#lorem(100)
== Datenbank
#lorem(100)
== UI
#lorem(100)
=== Layout
== Logik
#lorem(100)
#pagebreak()
= Buildsystem
#lorem(100)
#pagebreak()
= Flatpak
#lorem(100)
#pagebreak()
= CI / CD
#lorem(100)
== Flatpak
#lorem(100)
== Dokumentation
#lorem(100)
#pagebreak()
= Fazit & Ausblick
#lorem(100)

View File

@@ -1,4 +1,4 @@
#import "@preview/hydra:0.6.0": hydra
#import "@preview/hydra:0.6.1": hydra
#let project(title: "", subtitle: "", authors: (), profs: (), logo: none, body) = {
// Basic properties

View File

@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: flashcards\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-04 09:50+0200\n"
"POT-Creation-Date: 2025-07-03 14:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -12,7 +12,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: resources/ui/window.blp:5 resources/ui/window.blp:60
#: resources/ui/window.blp:81 resources/li.sopht.Flashcards.desktop.in:3
#: resources/ui/window.blp:81 resources/li.sopht.Flashcards.desktop.in:2
#: resources/li.sopht.Flashcards.metainfo.xml.in:7
msgid "Flashcards"
msgstr "Karteikarten"
@@ -89,18 +89,6 @@ msgstr "Neue Karteikarte erstellen"
msgid "Answer"
msgstr "Antwort"
#: resources/li.sopht.Flashcards.desktop.in:9
msgid "GTK;"
msgstr ""
#: resources/li.sopht.Flashcards.metainfo.xml.in:8
msgid "Learn categories with flashcards!"
msgstr "Lerne Kategorien mit Karteikarten!"
#: resources/li.sopht.Flashcards.metainfo.xml.in:10
msgid "No description"
msgstr ""
#: resources/li.sopht.Flashcards.metainfo.xml.in:44
msgid "A caption"
msgstr ""

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: flashcards\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-04 09:50+0200\n"
"POT-Creation-Date: 2025-07-03 14:15+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
#: resources/ui/window.blp:5 resources/ui/window.blp:60
#: resources/ui/window.blp:81 resources/li.sopht.Flashcards.desktop.in:3
#: resources/ui/window.blp:81 resources/li.sopht.Flashcards.desktop.in:2
#: resources/li.sopht.Flashcards.metainfo.xml.in:7
msgid "Flashcards"
msgstr ""
@@ -95,18 +95,6 @@ msgstr ""
msgid "Answer"
msgstr ""
#: resources/li.sopht.Flashcards.desktop.in:9
msgid "GTK;"
msgstr ""
#: resources/li.sopht.Flashcards.metainfo.xml.in:8
msgid "Learn categories with flashcards!"
msgstr ""
#: resources/li.sopht.Flashcards.metainfo.xml.in:10
msgid "No description"
msgstr ""
#: resources/li.sopht.Flashcards.metainfo.xml.in:44
msgid "A caption"
msgstr ""

View File

@@ -7,6 +7,8 @@
<file alias="appdata" compressed="true" preprocess="xml-stripblanks">li.sopht.Flashcards.metainfo.xml</file>
</gresource>
<gresource prefix="/li/sopht/flashcards/icons/scalable/actions/">
<file preprocess="xml-stripblanks">icons/hicolor/scalable/actions/add-card-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/hicolor/scalable/actions/add-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/hicolor/scalable/actions/delete-symbolic.svg</file>
<file preprocess="xml-stripblanks">icons/hicolor/scalable/actions/category-symbolic.svg</file>
</gresource>
</gresources>

View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7 3 v 4 h -4 v 2 h 4 v 4 h 2 v -4 h 4 v -2 h -4 v -4 z m 0 0" fill="#222222"/></svg>

Before

Width:  |  Height:  |  Size: 222 B

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 7 1 v 6 h -6 v 2 h 6 v 6 h 2 v -6 h 6 v -2 h -6 v -6 z m 0 0" fill="#222222"/></svg>

After

Width:  |  Height:  |  Size: 222 B

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><g fill="#222222"><path d="m 6 4.5 c 0 0.828125 -0.671875 1.5 -1.5 1.5 s -1.5 -0.671875 -1.5 -1.5 s 0.671875 -1.5 1.5 -1.5 s 1.5 0.671875 1.5 1.5 z m 0 0"/><path d="m 0 7.089844 c 0 0.847656 0.335938 1.660156 0.9375 2.261718 l 5.382812 5.382813 c 0.925782 0.925781 2.433594 0.925781 3.359376 0 l 4.964843 -4.964844 c 0.976563 -0.976562 0.976563 -2.5625 0 -3.539062 l -5.417969 -5.417969 c -0.519531 -0.519531 -1.226562 -0.8125 -1.960937 -0.8125 h -3.265625 c -2.207031 0 -4 1.792969 -4 4 z m 4 -5.089844 h 3.265625 c 0.207031 0 0.402344 0.082031 0.546875 0.226562 l 5.417969 5.417969 c 0.203125 0.207031 0.203125 0.503907 0 0.710938 l -4.964844 4.964843 c -0.15625 0.15625 -0.375 0.15625 -0.53125 0 l -5.382813 -5.382812 c -0.226562 -0.226562 -0.351562 -0.53125 -0.351562 -0.847656 v -3.089844 c 0 -1.117188 0.882812 -2 2 -2 z m 0 0"/></g></svg>

After

Width:  |  Height:  |  Size: 972 B

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 1 3 h 14 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 h -14 c -0.550781 0 -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
<path d="m 4 4 v -1.5 c 0 -1.386719 1.113281 -2.5 2.5 -2.5 h 2.980469 c 1.382812 0 2.5 1.113281 2.5 2.5 v 1.5 h -2 v -1.5 c 0 -0.269531 -0.230469 -0.5 -0.5 -0.5 h -2.980469 c -0.269531 0 -0.5 0.230469 -0.5 0.5 v 1.5 z m 0 0"/>
<path d="m 4 4 v 9 c 0 0.546875 0.453125 1 1 1 h 6 c 0.546875 0 1 -0.453125 1 -1 v -9 h 2 v 9 c 0 1.660156 -1.339844 3 -3 3 h -6 c -1.660156 0 -3 -1.339844 -3 -3 v -9 z m 0 0"/>
<path d="m 7 7 v 5 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -5 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 s 0.5 0.222656 0.5 0.5 z m 0 0"/>
<path d="m 10 7 v 5 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -5 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 s 0.5 0.222656 0.5 0.5 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -14,7 +14,9 @@ install_data(
action_dir = 'hicolor' / 'scalable' / 'actions'
action_icons = [
action_dir / 'add-card-symbolic.svg',
action_dir / 'add-symbolic.svg',
action_dir / 'delete-symbolic.svg',
action_dir / 'category-symbolic.svg',
]
install_data(
action_icons,

View File

@@ -4,6 +4,5 @@ Exec=flashcards
Icon=li.sopht.Flashcards
Terminal=false
Type=Application
Categories=Utility;
Keywords=GTK;
Categories=Utility
StartupNotify=true

View File

@@ -6,9 +6,6 @@
<name>Flashcards</name>
<summary>Learn categories with flashcards!</summary>
<description>
<p>No description</p>
</description>
<developer id="li.sopht">
<name translate="no">Sophie Krause</name>
@@ -38,13 +35,6 @@
<color type="primary" scheme_preference="dark">#993d3d</color>
</branding>
<screenshots>
<screenshot type="default">
<image>https://example.org/example1.png</image>
<caption>A caption</caption>
</screenshot>
</screenshots>
<releases>
<release version="1.0.0" date="2025-02-18">
</release>

View File

@@ -24,7 +24,7 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
Adw.HeaderBar {
[start]
Gtk.Button {
icon-name: "list-add-symbolic";
icon-name: "add-symbolic";
clicked => $on_add_category();
tooltip-text: _("Create category");
}
@@ -64,14 +64,14 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
Adw.HeaderBar {
[start]
Gtk.Button add_card_button {
icon-name: "add-card-symbolic";
icon-name: "add-symbolic";
clicked => $on_add_card();
tooltip-text: _("Add flashcard");
visible: false;
}
[start]
Gtk.Button delete_card_button {
icon-name: "user-trash-symbolic";
icon-name: "delete-symbolic";
clicked => $on_delete_card();
tooltip-text: _("Delete flashcard");
visible: false;
@@ -86,14 +86,14 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
Adw.ViewStackPage {
child: Adw.StatusPage placeholder_category {
title: _("Select a category");
icon-name: "edit-find-symbolic";
icon-name: "category-symbolic";
};
}
Adw.ViewStackPage {
child: Adw.StatusPage placeholder_card {
title: _("Add a flashcard");
icon-name: "list-add-symbolic";
icon-name: "add-symbolic";
};
}
@@ -121,7 +121,7 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
margin-end: 48;
hexpand: true;
justify: center;
label: "Wie viele Bäume sind in einem Wald?";
label: "";
wrap: true;
wrap-mode: word_char;
}

View File

@@ -71,10 +71,12 @@ next_card (FlashcardsAppWindow *win)
if (win->cards->length <= 0)
{
adw_view_stack_set_visible_child (win->main_view, win->placeholder_card);
gtk_widget_set_visible (GTK_WIDGET (win->delete_card_button), FALSE);
return;
}
win->current_card = g_queue_pop_head (win->cards);
gtk_label_set_label (win->card_title, win->current_card->title);
gtk_widget_set_visible (GTK_WIDGET (win->delete_card_button), TRUE);
}
static void
@@ -82,14 +84,14 @@ load_cards (FlashcardsAppWindow *win, category c)
{
GArray *card_array = database_load_cards (win->db, c.id);
adw_view_stack_set_visible_child (win->main_view, win->flashcard);
win->cards = g_queue_new ();
for (guint i = 0; i < card_array->len; i++)
{
g_queue_push_tail (win->cards, &g_array_index (card_array, card, i));
;
}
printf ("Flashcards: %d\n", win->cards->length);
next_card (win);
}
@@ -112,7 +114,6 @@ on_select_category (__attribute__ ((unused)) GtkListBox *box,
adw_view_stack_set_visible_child (win->main_view, win->flashcard);
gtk_widget_set_visible (GTK_WIDGET (win->add_card_button), TRUE);
gtk_widget_set_visible (GTK_WIDGET (win->delete_card_button), TRUE);
gtk_widget_set_visible (GTK_WIDGET (win->delete_category_button), TRUE);
load_cards (win, c);
@@ -202,7 +203,7 @@ flashcards_app_window_add_card (FlashcardsAppWindow *win, const gchar *title,
const gchar *answer)
{
database_save_card (win->db, win->current_category.id, title, answer);
printf ("Added card\n");
load_cards (win, win->current_category);
}
void
@@ -217,7 +218,6 @@ static void
on_flashcards_app_window_show (GtkWidget *self, gpointer user_data)
{
FlashcardsAppWindow *win = user_data;
printf ("Show\n");
load_categories (win);
gtk_list_box_unselect_all (win->topics);