1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 06:41: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/
.flatpak-builder/
repo/
app/
# Prerequisites
*.d

View File

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

View File

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

View File

@@ -1,11 +1,5 @@
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)
test('Validate schema file',
compile_schemas,

View File

@@ -6,3 +6,9 @@ blueprints = custom_target('blueprints',
output: '.',
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 {
hexpand: true;
child: Adw.Bin {
Adw.Bin {
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
@@ -83,7 +84,7 @@ template $FlashcardsAppWindow : Adw.ApplicationWindow {
wrap: true;
label: "Wie viel Grad hat ein Kreis?";
};
};
}
}
}
}

View File

@@ -111,10 +111,10 @@ GArray *database_load_categories()
while (sqlite3_step(stmt) == SQLITE_ROW)
{
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));
strcpy(name, temp_name);
char *name = g_new0(char, strlen(temp_name) + 1);
strncpy(name, temp_name, strlen(temp_name) + 1);
category c = {id, name};
g_array_append_val(categories, c);
}