mirror of
https://gitlab.cvh-server.de/skrause/flashcards.git
synced 2026-06-15 01:13:53 +00:00
Compare commits
62 Commits
main
..
cd3ea61503
| Author | SHA1 | Date | |
|---|---|---|---|
|
cd3ea61503
|
|||
|
5529da02db
|
|||
|
a4ab9486a1
|
|||
|
6cf180e4f0
|
|||
|
34d68d3e51
|
|||
|
d916767369
|
|||
|
803185de87
|
|||
|
a444bdd2fb
|
|||
|
ed81f378a5
|
|||
| 4910217797 | |||
| d05524a0c8 | |||
| a8ede59d44 | |||
| 48918ba4bf | |||
| 9f5f951a9f | |||
| a90db5b042 | |||
| 6ee04e16bb | |||
| 568e4a8db9 | |||
| 588dea495e | |||
| 06de190d38 | |||
| e382bb162b | |||
| cdc30546cb | |||
| 4ad8fa443d | |||
| 430cdcc8bb | |||
| 4d29719bb9 | |||
| 6db523d5d6 | |||
| e5723d6a48 | |||
| 5f2b933a33 | |||
| 2144bc655b | |||
| 48848f55a3 | |||
| 9376d02003 | |||
| a27e26d779 | |||
| f122102c3d | |||
| 81d2e8d92e | |||
| b98397d17a | |||
| 70b745b63e | |||
| 9cb77fe9ff | |||
| ca7a3dde58 | |||
| 1ea9bb36c6 | |||
| 46efd54ad8 | |||
| 7d4bad1875 | |||
| 77b6240463 | |||
| f8df9efafd | |||
| 12007042c2 | |||
| af2d8aff27 | |||
| 7804069a76 | |||
| 7143160614 | |||
| 0ce8f13639 | |||
| 7d7e269147 | |||
| 2179a302be | |||
| e14cadcd7b | |||
| 96ae902f99 | |||
| 2e92dcffb7 | |||
| b76cc8f9ea | |||
| 280773ff8d | |||
| 4eea278113 | |||
| e7a4ec91f9 | |||
| f4b6e525e0 | |||
| 600e255b91 | |||
| c673ae63fe | |||
| b4d8f9d096 | |||
| 81e353b449 | |||
| 51144e1854 |
+1
-1
@@ -8,7 +8,7 @@ docs:
|
||||
- ./Flashcards.pdf
|
||||
|
||||
flatpak:
|
||||
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-49
|
||||
image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-48
|
||||
stage: build
|
||||
variables:
|
||||
APP_ID: "li.sopht.Flashcards"
|
||||
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,6 +0,0 @@
|
||||
electronic:
|
||||
type: Web
|
||||
title: Ishkur's Guide to Electronic Music
|
||||
serial-number: v2.5
|
||||
author: Ishkur
|
||||
url: { value: http://www.techno.org/electronic-music-guide/, date: 2020-11-30 }
|
||||
+3
-13
@@ -4,24 +4,15 @@
|
||||
title: "Karteikarten-Anwendung in C mit GTK4 und Libadwaita",
|
||||
subtitle: "Hardwarenahe Programmierung",
|
||||
authors: (
|
||||
(
|
||||
name: "Sophie Krause",
|
||||
id: "18103387"
|
||||
),
|
||||
"Sophie Krause",
|
||||
),
|
||||
profs: (
|
||||
"Prof. Dr. rer. nat. Peter Gerwinski",
|
||||
"Prof. Dr. Gerwinski",
|
||||
),
|
||||
submitted_at: none,
|
||||
logo: "BO.svg"
|
||||
logo: "BO_Logo.svg"
|
||||
)
|
||||
|
||||
= Einleitung
|
||||
Das Projekt behandelt die Entwicklung einer typischen Anwendung für die GNOME-Desktop-Umgebung unter Linux.
|
||||
Dementsprechend wird die Anwendung mit GTK4 und Libadwaita entwickelt, um ein natives Erlebnis zu erzielen.
|
||||
Da GTK in C geschrieben ist, wird ebenfalls in dieser Sprache programmiert.
|
||||
|
||||
Als Thema der Anwendung wurde eine Karteikarten-App gewählt, da diese gut für die Entwicklung einer Desktop-Anwendung geeignet ist und ebenfalls eine Datenbank benötigt.
|
||||
|
||||
#pagebreak()
|
||||
= Konzept & Tools
|
||||
@@ -40,7 +31,6 @@ Als Thema der Anwendung wurde eine Karteikarten-App gewählt, da diese gut für
|
||||
== Datenbank
|
||||
|
||||
== UI
|
||||
|
||||
=== Layout
|
||||
|
||||
== Logik
|
||||
|
||||
+3
-23
@@ -1,8 +1,8 @@
|
||||
#import "@preview/hydra:0.6.1": hydra
|
||||
|
||||
#let project(title: "", subtitle: "", authors: ((name: "", id: ""),), profs: ("",), submitted_at: none, logo: none, body) = {
|
||||
#let project(title: "", subtitle: "", authors: (), profs: (), logo: none, body) = {
|
||||
// Basic properties
|
||||
set document(author: "a", title: title)
|
||||
set document(author: authors, title: title)
|
||||
set text(lang: "de")
|
||||
set heading(numbering: "1.1")
|
||||
|
||||
@@ -27,37 +27,17 @@
|
||||
set align(left)
|
||||
|
||||
// Author
|
||||
let authors_title
|
||||
if authors.len() == 1 {
|
||||
authors_title = "Autor*in"
|
||||
} else {
|
||||
authors_title = "Autor*innen"
|
||||
}
|
||||
text(weight: 700, authors_title + " (Matrikelnummer):")
|
||||
grid(
|
||||
gutter: 1em,
|
||||
..authors.map(author => author.name + " (" + author.id + ")").flatten()
|
||||
..authors,
|
||||
)
|
||||
|
||||
// Profs
|
||||
let profs_title
|
||||
if profs.len() == 1 {
|
||||
profs_title = "Prüfer*in"
|
||||
} else {
|
||||
profs_title = "Prüfer*innen"
|
||||
}
|
||||
text(weight: 700, profs_title + ":")
|
||||
grid(
|
||||
gutter: 1em,
|
||||
..profs,
|
||||
)
|
||||
|
||||
// Abgabedatum
|
||||
if submitted_at != none {
|
||||
text(weight: 700, "Abgabedatum: ")
|
||||
text(submitted_at.display("[day].[month].[year]"))
|
||||
}
|
||||
|
||||
// Table of contents
|
||||
set align(left)
|
||||
set page(numbering: "I", number-align: center)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "li.sopht.Flashcards",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "49",
|
||||
"runtime-version": "48",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "flashcards",
|
||||
"separate-locales": false,
|
||||
@@ -33,7 +33,7 @@
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://gitlab.gnome.org/jwestman/blueprint-compiler",
|
||||
"tag": "v0.18.0"
|
||||
"tag": "v0.16.0"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
+14
-16
@@ -1,13 +1,12 @@
|
||||
project(
|
||||
'flashcards', 'c',
|
||||
version : '1.0.0',
|
||||
meson_version : '>= 1.0.0',
|
||||
default_options : ['warning_level=2', 'c_std=gnu23'],
|
||||
project('flashcards', 'c',
|
||||
version: '1.0.0',
|
||||
meson_version: '>= 1.0.0',
|
||||
default_options: ['warning_level=2', 'c_std=gnu23'],
|
||||
)
|
||||
|
||||
flashcards_deps = [
|
||||
dependency('gtk4'),
|
||||
dependency('libadwaita-1', version : '>= 1.7'),
|
||||
dependency('libadwaita-1', version: '>= 1.6'),
|
||||
dependency('sqlite3'),
|
||||
]
|
||||
|
||||
@@ -22,21 +21,20 @@ cc = meson.get_compiler('c')
|
||||
|
||||
config_h = configuration_data()
|
||||
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||
config_h.set_quoted('GETTEXT_PACKAGE', meson.project_name())
|
||||
config_h.set_quoted('GETTEXT_PACKAGE', 'flashcards')
|
||||
config_h.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
|
||||
configure_file(output : 'config.h', configuration : config_h)
|
||||
add_project_arguments(['-I' + meson.project_build_root()], language : 'c')
|
||||
configure_file(output: 'config.h', configuration: config_h)
|
||||
add_project_arguments(['-I' + meson.project_build_root()], language: 'c')
|
||||
|
||||
executable(
|
||||
meson.project_name(),
|
||||
executable('flashcards',
|
||||
sourcefiles,
|
||||
resources,
|
||||
dependencies : flashcards_deps,
|
||||
install : true
|
||||
dependencies: flashcards_deps,
|
||||
install: true
|
||||
)
|
||||
|
||||
gnome.post_install(
|
||||
glib_compile_schemas : true,
|
||||
gtk_update_icon_cache : true,
|
||||
update_desktop_database : true,
|
||||
glib_compile_schemas: true,
|
||||
gtk_update_icon_cache: true,
|
||||
update_desktop_database: true,
|
||||
)
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
# Copyright (C) 2025 Sophie Krause
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: flashcards\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-07-03 14:48+0200\n"
|
||||
"PO-Revision-Date: 2025-10-06 14:36+0200\n"
|
||||
"Last-Translator: Sophie Krause\n"
|
||||
"Language-Team: de\n"
|
||||
"Language: de\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"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
+5
-2
@@ -1,4 +1,7 @@
|
||||
# Copyright (C) 2025 Sophie Krause
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the flashcards package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
@@ -6,7 +9,7 @@ msgstr ""
|
||||
"Project-Id-Version: flashcards\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-07-03 14:48+0200\n"
|
||||
"PO-Revision-Date: 2025-10-06 14:36+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"
|
||||
"Language: \n"
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
i18n.gettext(meson.project_name(), preset : 'glib')
|
||||
i18n.gettext(meson.project_name(), preset: 'glib')
|
||||
+6
-12
@@ -1,12 +1,9 @@
|
||||
compile_schemas = find_program('glib-compile-schemas', required : false, disabler : true)
|
||||
test(
|
||||
'Validate schema file',
|
||||
test('Validate schema file',
|
||||
compile_schemas,
|
||||
args : ['--strict', '--dry-run', meson.current_source_dir()]
|
||||
)
|
||||
args : ['--strict', '--dry-run', meson.current_source_dir()])
|
||||
|
||||
install_data(
|
||||
'li.sopht.Flashcards.gschema.xml',
|
||||
install_data('li.sopht.Flashcards.gschema.xml',
|
||||
install_dir : get_option('datadir') / 'glib-2.0' / 'schemas'
|
||||
)
|
||||
|
||||
@@ -33,10 +30,8 @@ appstream_file = i18n.merge_file(
|
||||
)
|
||||
|
||||
appstreamcli = find_program('appstreamcli', required : false, disabler : true)
|
||||
test(
|
||||
'Validate appstream file', appstreamcli,
|
||||
args : ['validate', '--no-net', '--explain', appstream_file]
|
||||
)
|
||||
test('Validate appstream file', appstreamcli,
|
||||
args : ['validate', '--no-net', '--explain', appstream_file])
|
||||
|
||||
service_conf = configuration_data()
|
||||
service_conf.set('bindir', get_option('prefix') / get_option('bindir'))
|
||||
@@ -49,8 +44,7 @@ configure_file(
|
||||
|
||||
subdir('ui')
|
||||
|
||||
resources = gnome.compile_resources(
|
||||
'resources',
|
||||
resources = gnome.compile_resources('resources',
|
||||
'flashcards.gresource.xml',
|
||||
dependencies : [blueprints, appstream_file],
|
||||
c_name : 'flashcards'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
blueprints = custom_target(
|
||||
'blueprints',
|
||||
blueprints = custom_target('blueprints',
|
||||
input : files(
|
||||
'window.blp',
|
||||
'create-category.blp',
|
||||
|
||||
@@ -69,6 +69,7 @@ database_save_category (sqlite3 *db, const char *c)
|
||||
{
|
||||
sqlite3_stmt *stmt;
|
||||
|
||||
fprintf (stdout, "%s\n", c);
|
||||
int rc = sqlite3_prepare_v2 (db, "INSERT INTO categories (name) VALUES(?)",
|
||||
-1, &stmt, nullptr);
|
||||
if (rc == SQLITE_OK)
|
||||
|
||||
@@ -52,6 +52,7 @@ load_categories (FlashcardsAppWindow *win)
|
||||
for (guint i = 0; i < win->categories->len; i++)
|
||||
{
|
||||
category c = g_array_index (win->categories, category, i);
|
||||
printf ("%d: %s\n", c.id, c.name);
|
||||
|
||||
GtkWidget *child = gtk_list_box_row_new ();
|
||||
GtkWidget *label = gtk_label_new (c.name);
|
||||
|
||||
+1
-2
@@ -1,5 +1,4 @@
|
||||
sourcefiles = files(
|
||||
'main.c',
|
||||
sourcefiles = files('main.c',
|
||||
'flashcardsapp.c',
|
||||
'flashcardsappwin.c',
|
||||
'create-category.c',
|
||||
|
||||
Reference in New Issue
Block a user