mirror of
https://gitlab.cvh-server.de/skrause/flashcards.git
synced 2026-04-30 21:47:05 +00:00
more stuff!
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
#include <adwaita.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
|
||||
#include "create-category.h"
|
||||
|
||||
struct _FlashcardsCreateCategoryDialog
|
||||
@@ -18,21 +13,21 @@ G_DEFINE_TYPE (FlashcardsCreateCategoryDialog,
|
||||
flashcards_create_category_dialog, ADW_TYPE_ALERT_DIALOG);
|
||||
|
||||
static void
|
||||
flashcards_create_category_dialog_init (FlashcardsCreateCategoryDialog *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
on_response (__attribute__ ((unused)) AdwAlertDialog *dialog, gchar *response,
|
||||
gpointer user_data)
|
||||
on_response (__attribute__ ((unused)) AdwAlertDialog *dialog,
|
||||
const gchar *response, gpointer user_data)
|
||||
{
|
||||
FlashcardsCreateCategoryDialog *self = user_data;
|
||||
|
||||
const gchar *category = gtk_editable_get_text (self->entry);
|
||||
|
||||
if (strcmp (response, "add") == 0 && strlen (category) > 0)
|
||||
flashcards_app_window_test (self->win, category);
|
||||
flashcards_app_window_add_category (self->win, category);
|
||||
}
|
||||
|
||||
static void
|
||||
flashcards_create_category_dialog_init (FlashcardsCreateCategoryDialog *self)
|
||||
{
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user