1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 07:51:38 +01:00

test changes

This commit is contained in:
2025-02-06 14:03:25 +01:00
parent f8df9efafd
commit 77b6240463
8 changed files with 17 additions and 15 deletions

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
builddir/ builddir/
.flatpak-builder/ .flatpak-builder/
repo/ repo/
app/
# Prerequisites # Prerequisites
*.d *.d

View File

@@ -1,7 +1,7 @@
#import "template.typ": * #import "template.typ": *
#show: project.with( #show: project.with(
title: "Karteikarten-Anwendung mit GTK und Libadwaita", title: "Karteikarten-Anwendung in C mit GTK4 und Libadwaita",
subtitle: "Hardwarenahe Programmierung", subtitle: "Hardwarenahe Programmierung",
authors: ( authors: (
"Sophie Krause", "Sophie Krause",

View File

@@ -41,9 +41,9 @@
"buildsystem": "meson", "buildsystem": "meson",
"sources": [ "sources": [
{ {
"type": "git", "type": "file",
"tag": "main", "url": "https://gitlab.cvh-server.de/skrause/flashcards",
"url": "https://gitlab.cvh-server.de/skrause/flashcards" "tag": "main"
} }
] ]
} }

View File

@@ -1,11 +1,5 @@
subdir('ui') subdir('ui')
resources = gnome.compile_resources('resources',
'flashcards.gresource.xml',
dependencies: blueprints,
c_name: 'flashcards'
)
compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true) compile_schemas = find_program('glib-compile-schemas', required: false, disabler: true)
test('Validate schema file', test('Validate schema file',
compile_schemas, compile_schemas,

View File

@@ -6,3 +6,9 @@ blueprints = custom_target('blueprints',
output: '.', output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
) )
resources = gnome.compile_resources('resources',
'flashcards.gresource.xml',
dependencies: blueprints,
c_name: 'flashcards'
)

View File

@@ -66,7 +66,8 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
Adw.Clamp { Adw.Clamp {
hexpand: true; hexpand: true;
child: Adw.Bin {
Adw.Bin {
margin-top: 12; margin-top: 12;
margin-bottom: 12; margin-bottom: 12;
margin-start: 12; margin-start: 12;
@@ -83,7 +84,7 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
wrap: true; wrap: true;
label: "Wie viel Grad hat ein Kreis?"; label: "Wie viel Grad hat ein Kreis?";
}; };
}; }
} }
} }
} }

View File

@@ -111,10 +111,10 @@ GArray *database_load_categories()
while (sqlite3_step(stmt) == SQLITE_ROW) while (sqlite3_step(stmt) == SQLITE_ROW)
{ {
int id = sqlite3_column_int(stmt, 0); int id = sqlite3_column_int(stmt, 0);
const unsigned char *temp_name = sqlite3_column_text(stmt, 1); const char *temp_name = (const char *)sqlite3_column_text(stmt, 1);
char *name = g_new0(char, strlen(temp_name)); char *name = g_new0(char, strlen(temp_name) + 1);
strcpy(name, temp_name); strncpy(name, temp_name, strlen(temp_name) + 1);
category c = {id, name}; category c = {id, name};
g_array_append_val(categories, c); g_array_append_val(categories, c);
} }