mirror of
https://gitlab.cvh-server.de/skrause/flashcards.git
synced 2025-12-12 07:51:38 +01:00
update ui, add metainfo
This commit is contained in:
@@ -16,9 +16,10 @@ struct _FlashcardsApp
|
||||
G_DEFINE_TYPE(FlashcardsApp, flashcards_app, ADW_TYPE_APPLICATION);
|
||||
|
||||
static void
|
||||
flashcards_app_quit(__attribute__((unused)) GSimpleAction *action,
|
||||
__attribute__((unused)) GVariant *parameter,
|
||||
gpointer user_data)
|
||||
flashcards_app_quit(
|
||||
__attribute__((unused)) GSimpleAction *action,
|
||||
__attribute__((unused)) GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
FlashcardsApp *self = user_data;
|
||||
g_assert(FLASHCARDS_IS_APP(self));
|
||||
@@ -26,28 +27,30 @@ flashcards_app_quit(__attribute__((unused)) GSimpleAction *action,
|
||||
}
|
||||
|
||||
static void
|
||||
flashcards_app_about(__attribute__((unused)) GSimpleAction *action,
|
||||
__attribute__((unused)) GVariant *parameter,
|
||||
gpointer user_data)
|
||||
flashcards_app_about(
|
||||
__attribute__((unused)) GSimpleAction *action,
|
||||
__attribute__((unused)) GVariant *parameter,
|
||||
gpointer user_data)
|
||||
{
|
||||
static const char *developers[] = {"Sophie Krause", NULL};
|
||||
FlashcardsApp *self = user_data;
|
||||
GtkWindow *window = NULL;
|
||||
GtkWindow *window;
|
||||
AdwDialog *dialog;
|
||||
|
||||
g_assert(FLASHCARDS_IS_APP(self));
|
||||
|
||||
window = gtk_application_get_active_window(GTK_APPLICATION(self));
|
||||
|
||||
adw_show_about_dialog(GTK_WIDGET(window),
|
||||
/*adw_show_about_dialog(GTK_WIDGET(window),
|
||||
"application-name", _("Flashcards"),
|
||||
"application-icon", "li.sopht.Flashcards",
|
||||
"developer-name", "Sophie Krause",
|
||||
"translator-credits", "Sophie Krause",
|
||||
"version", "1.0.0",
|
||||
"developers", developers,
|
||||
"issue-url", "https://gitlab.cvh-server.de/skrause/flashcards/-/issues",
|
||||
"copyright", "© 2025 Sophie Krause",
|
||||
"license-type", GTK_LICENSE_MIT_X11,
|
||||
NULL);
|
||||
NULL);*/
|
||||
dialog = adw_about_dialog_new_from_appdata("/li/sopht/flashcards/appdata", NULL);
|
||||
adw_dialog_present(dialog, GTK_WIDGET(window));
|
||||
}
|
||||
|
||||
static const GActionEntry app_actions[] = {
|
||||
@@ -76,10 +79,11 @@ flashcards_app_activate(GApplication *app)
|
||||
}
|
||||
|
||||
static void
|
||||
flashcards_app_open(GApplication *app,
|
||||
__attribute__((unused)) GFile **files,
|
||||
__attribute__((unused)) int n_files,
|
||||
__attribute__((unused)) const char *hint)
|
||||
flashcards_app_open(
|
||||
GApplication *app,
|
||||
__attribute__((unused)) GFile **files,
|
||||
__attribute__((unused)) int n_files,
|
||||
__attribute__((unused)) const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
FlashcardsAppWindow *win;
|
||||
|
||||
Reference in New Issue
Block a user