From a7f0af6e8a852f74a33a1f470cb1b8bef595c3e7 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sun, 23 Jul 2023 23:04:06 -0300 Subject: [PATCH] event-editor: Shuffle some code Declaring the entries struct inline saves us a few lines of code. --- src/gui/event-editor/gcal-event-editor-dialog.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/gui/event-editor/gcal-event-editor-dialog.c b/src/gui/event-editor/gcal-event-editor-dialog.c index 6a6ddf20..ce92c81c 100644 --- a/src/gui/event-editor/gcal-event-editor-dialog.c +++ b/src/gui/event-editor/gcal-event-editor-dialog.c @@ -85,10 +85,6 @@ struct _GcalEventEditorDialog gboolean writable; }; -static void on_calendar_selected_action_cb (GSimpleAction *menu_item, - GVariant *value, - gpointer user_data); - G_DEFINE_TYPE (GcalEventEditorDialog, gcal_event_editor_dialog, ADW_TYPE_WINDOW) enum @@ -109,11 +105,6 @@ enum static guint signals[NUM_SIGNALS] = { 0, }; static GParamSpec* properties[N_PROPS] = { NULL, }; -static const GActionEntry action_entries[] = -{ - { "select-calendar", on_calendar_selected_action_cb, "s" }, -}; - /* * Auxiliary methods @@ -550,6 +541,11 @@ gcal_event_editor_dialog_finalize (GObject *object) static void gcal_event_editor_dialog_constructed (GObject* object) { + const GActionEntry action_entries[] = + { + { "select-calendar", on_calendar_selected_action_cb, "s" }, + }; + GcalEventEditorDialog *self; self = GCAL_EVENT_EDITOR_DIALOG (object);