[gnome-calendar/gnome-42] event-editor-dialog: Drop the useless transient_size_allocate_cb()



commit d65511d43d643992eeea64faba985fa9cd15d57c
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri May 6 08:40:26 2022 +0200

    event-editor-dialog: Drop the useless transient_size_allocate_cb()
    
    This drops the transient_size_allocate_cb() callback function that in
    practice does nothing at all. This also fixes an error message as the
    size-allocate signal doesn't exist anymore in GTK 4.
    
    
    (cherry picked from commit 6b389005e01b5dd800ea79efc61d62c62c715f13)

 src/gui/event-editor/gcal-event-editor-dialog.c | 17 -----------------
 1 file changed, 17 deletions(-)
---
diff --git a/src/gui/event-editor/gcal-event-editor-dialog.c b/src/gui/event-editor/gcal-event-editor-dialog.c
index 0118e756..381f0fae 100644
--- a/src/gui/event-editor/gcal-event-editor-dialog.c
+++ b/src/gui/event-editor/gcal-event-editor-dialog.c
@@ -257,16 +257,6 @@ on_calendar_selected_action_cb (GSimpleAction *action,
   GCAL_EXIT;
 }
 
-static void
-transient_size_allocate_cb (GcalEventEditorDialog *self)
-{
-  GtkAllocation alloc;
-  GtkWindow *transient;
-
-  transient = gtk_window_get_transient_for (GTK_WINDOW (self));
-  gtk_widget_get_allocation (GTK_WIDGET (transient), &alloc);
-}
-
 static void
 on_cancel_button_clicked_cb (GtkButton             *button,
                              GcalEventEditorDialog *self)
@@ -433,13 +423,6 @@ gcal_event_editor_dialog_constructed (GObject* object)
   gtk_widget_insert_action_group (GTK_WIDGET (self),
                                   "event-editor-dialog",
                                   G_ACTION_GROUP (self->action_group));
-
-  /* Watch the main window and adapt the maximum size */
-  g_signal_connect_object (gtk_window_get_transient_for (GTK_WINDOW (self)),
-                           "size-allocate",
-                           G_CALLBACK (transient_size_allocate_cb),
-                           self,
-                           G_CONNECT_SWAPPED);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]