[gnome-builder/wip/gtk4-port: 706/736] plugins/buildui: use helper for widget destroy




commit 0be298d2757c9614a298579dc4b30532c055f28b
Author: Christian Hergert <chergert redhat com>
Date:   Thu Apr 21 10:43:02 2022 -0700

    plugins/buildui: use helper for widget destroy

 src/plugins/buildui/gbp-buildui-config-surface.c        | 2 +-
 src/plugins/buildui/gbp-buildui-workspace-addin.c       | 6 +++---
 src/plugins/color-picker/gb-color-picker-editor-addin.c | 4 ++--
 src/plugins/command-bar/gbp-gaction-command.c           | 4 ++--
 src/plugins/devhelp/gbp-devhelp-frame-addin.c           | 2 +-
 src/plugins/editor/gbp-editor-frame-addin.c             | 2 +-
 src/plugins/editor/gbp-editor-frame-controls.c          | 4 ++--
 src/plugins/editor/gbp-editor-workspace-addin.c         | 6 +++---
 src/plugins/glade/gbp-glade-editor-addin.c              | 2 +-
 src/plugins/glade/gbp-glade-frame-addin.c               | 4 ++--
 src/plugins/glade/gbp-glade-page.c                      | 6 +++---
 src/plugins/history/gbp-history-frame-addin.c           | 6 +++---
 src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c   | 2 +-
 src/plugins/symbol-tree/gbp-symbol-frame-addin.c        | 2 +-
 src/plugins/sysprof/gbp-sysprof-workspace-addin.c       | 2 +-
 15 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/src/plugins/buildui/gbp-buildui-config-surface.c 
b/src/plugins/buildui/gbp-buildui-config-surface.c
index 3bb0ae0db..d0f3ca8ae 100644
--- a/src/plugins/buildui/gbp-buildui-config-surface.c
+++ b/src/plugins/buildui/gbp-buildui-config-surface.c
@@ -129,7 +129,7 @@ gbp_buildui_config_surface_row_selected_cb (GbpBuilduiConfigSurface *self,
                                     NULL);
   g_signal_connect (self->preferences,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->preferences);
   gtk_container_add (GTK_CONTAINER (self->paned), GTK_WIDGET (self->preferences));
 
diff --git a/src/plugins/buildui/gbp-buildui-workspace-addin.c 
b/src/plugins/buildui/gbp-buildui-workspace-addin.c
index 0ea51bec7..5e3fcbad5 100644
--- a/src/plugins/buildui/gbp-buildui-workspace-addin.c
+++ b/src/plugins/buildui/gbp-buildui-workspace-addin.c
@@ -292,7 +292,7 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
                                  NULL);
   g_signal_connect (self->diag_box,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->diag_box);
   ide_omni_bar_add_status_icon (omnibar, GTK_WIDGET (self->diag_box), 0);
 
@@ -337,7 +337,7 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
                                          NULL);
   g_signal_connect (self->omni_bar_section,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->omni_bar_section);
   ide_omni_bar_add_popover_section (omnibar, GTK_WIDGET (self->omni_bar_section), 0);
   gbp_buildui_omni_bar_section_set_context (self->omni_bar_section, context);
@@ -395,7 +395,7 @@ gbp_buildui_workspace_addin_load (IdeWorkspaceAddin *addin,
                                 NULL);
   g_signal_connect (self->surface,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->surface);
   ide_workspace_add_surface (workspace, IDE_SURFACE (self->surface));
 
diff --git a/src/plugins/color-picker/gb-color-picker-editor-addin.c 
b/src/plugins/color-picker/gb-color-picker-editor-addin.c
index 11028c6db..2697525f1 100644
--- a/src/plugins/color-picker/gb-color-picker-editor-addin.c
+++ b/src/plugins/color-picker/gb-color-picker-editor-addin.c
@@ -174,7 +174,7 @@ gb_color_picker_editor_addin_set_panel (GbColorPickerEditorAddin *self)
                               NULL);
   g_signal_connect (self->panel,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->panel);
   g_signal_connect_object (self->panel,
                            "notify::rgba",
@@ -294,7 +294,7 @@ gb_color_picker_editor_addin_load (IdeEditorAddin       *addin,
                              NULL);
   g_signal_connect (self->dock,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->dock);
 
   sidebar = ide_editor_surface_get_transient_sidebar (self->editor);
diff --git a/src/plugins/command-bar/gbp-gaction-command.c b/src/plugins/command-bar/gbp-gaction-command.c
index a373956f4..1ea2f2ca3 100644
--- a/src/plugins/command-bar/gbp-gaction-command.c
+++ b/src/plugins/command-bar/gbp-gaction-command.c
@@ -108,7 +108,7 @@ gbp_gaction_command_finalize (GObject *object)
   if (self->widget != NULL)
     {
       g_signal_handlers_disconnect_by_func (self->widget,
-                                            G_CALLBACK (gtk_widget_destroyed),
+                                            G_CALLBACK (ide_gtk_widget_destroyed),
                                             &self->widget);
       self->widget = NULL;
     }
@@ -167,7 +167,7 @@ gbp_gaction_command_new (GtkWidget   *widget,
 
   g_signal_connect (self->widget,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->widget);
 
   return g_steal_pointer (&self);
diff --git a/src/plugins/devhelp/gbp-devhelp-frame-addin.c b/src/plugins/devhelp/gbp-devhelp-frame-addin.c
index e3629cc2a..61ca379f4 100644
--- a/src/plugins/devhelp/gbp-devhelp-frame-addin.c
+++ b/src/plugins/devhelp/gbp-devhelp-frame-addin.c
@@ -171,7 +171,7 @@ gbp_devhelp_frame_addin_set_view (IdeFrameAddin *addin,
                                        NULL);
           g_signal_connect (self->button,
                             "destroy",
-                            G_CALLBACK (gtk_widget_destroyed),
+                            G_CALLBACK (ide_gtk_widget_destroyed),
                             &self->button);
           ide_frame_header_add_custom_title (IDE_FRAME_HEADER (titlebar),
                                                     GTK_WIDGET (self->button),
diff --git a/src/plugins/editor/gbp-editor-frame-addin.c b/src/plugins/editor/gbp-editor-frame-addin.c
index f0e2c3622..86b9ef2f3 100644
--- a/src/plugins/editor/gbp-editor-frame-addin.c
+++ b/src/plugins/editor/gbp-editor-frame-addin.c
@@ -101,7 +101,7 @@ gbp_editor_frame_addin_load (IdeFrameAddin *addin,
   self->controls = g_object_new (GBP_TYPE_EDITOR_FRAME_CONTROLS, NULL);
   g_signal_connect (self->controls,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->controls);
   gtk_container_add_with_properties (GTK_CONTAINER (header), GTK_WIDGET (self->controls),
                                      "pack-type", GTK_PACK_END,
diff --git a/src/plugins/editor/gbp-editor-frame-controls.c b/src/plugins/editor/gbp-editor-frame-controls.c
index 9c48f505d..04a9cf9bf 100644
--- a/src/plugins/editor/gbp-editor-frame-controls.c
+++ b/src/plugins/editor/gbp-editor-frame-controls.c
@@ -341,7 +341,7 @@ gbp_editor_frame_controls_set_page (GbpEditorFrameControls *self,
   if (self->page != NULL)
     {
       g_signal_handlers_disconnect_by_func (self->page,
-                                            G_CALLBACK (gtk_widget_destroyed),
+                                            G_CALLBACK (ide_gtk_widget_destroyed),
                                             &self->page);
       self->page = NULL;
     }
@@ -351,7 +351,7 @@ gbp_editor_frame_controls_set_page (GbpEditorFrameControls *self,
       self->page = page;
       g_signal_connect (page,
                         "destroy",
-                        G_CALLBACK (gtk_widget_destroyed),
+                        G_CALLBACK (ide_gtk_widget_destroyed),
                         &self->page);
       dzl_binding_group_set_source (self->buffer_bindings, page->buffer);
       dzl_signal_group_set_target (self->buffer_signals, page->buffer);
diff --git a/src/plugins/editor/gbp-editor-workspace-addin.c b/src/plugins/editor/gbp-editor-workspace-addin.c
index af81761c4..d38cf9568 100644
--- a/src/plugins/editor/gbp-editor-workspace-addin.c
+++ b/src/plugins/editor/gbp-editor-workspace-addin.c
@@ -156,7 +156,7 @@ add_buttons (GbpEditorWorkspaceAddin *self,
                                    NULL);
   g_signal_connect (self->new_button,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->new_button);
   ide_header_bar_add_primary (header, GTK_WIDGET (self->new_button));
 
@@ -167,7 +167,7 @@ add_buttons (GbpEditorWorkspaceAddin *self,
                                    NULL);
   g_signal_connect (self->panels_box,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->panels_box);
   dzl_gtk_widget_add_style_class (GTK_WIDGET (self->panels_box), "linked");
   ide_header_bar_add_primary (header, GTK_WIDGET (self->panels_box));
@@ -251,7 +251,7 @@ gbp_editor_workspace_addin_load (IdeWorkspaceAddin *addin,
                                 NULL);
   g_signal_connect (self->surface,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->surface);
   ide_workspace_add_surface (IDE_WORKSPACE (workspace), IDE_SURFACE (self->surface));
   ide_workspace_set_visible_surface_name (IDE_WORKSPACE (workspace), "editor");
diff --git a/src/plugins/glade/gbp-glade-editor-addin.c b/src/plugins/glade/gbp-glade-editor-addin.c
index 430eb9abb..e27175229 100644
--- a/src/plugins/glade/gbp-glade-editor-addin.c
+++ b/src/plugins/glade/gbp-glade-editor-addin.c
@@ -71,7 +71,7 @@ gbp_glade_editor_addin_ensure_properties (GbpGladeEditorAddin *self)
                                    NULL);
   g_signal_connect (self->properties,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->properties);
   gtk_container_add (GTK_CONTAINER (transient), GTK_WIDGET (self->properties));
 
diff --git a/src/plugins/glade/gbp-glade-frame-addin.c b/src/plugins/glade/gbp-glade-frame-addin.c
index e7729379f..36d9c36be 100644
--- a/src/plugins/glade/gbp-glade-frame-addin.c
+++ b/src/plugins/glade/gbp-glade-frame-addin.c
@@ -336,7 +336,7 @@ gbp_glade_frame_addin_load (IdeFrameAddin *addin,
                                NULL);
   g_signal_connect (self->button,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->button);
   ide_frame_header_add_custom_title (IDE_FRAME_HEADER (header),
                                             GTK_WIDGET (self->button),
@@ -380,7 +380,7 @@ gbp_glade_frame_addin_load (IdeFrameAddin *addin,
                                       NULL);
   g_signal_connect (self->toggle_source,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->toggle_source);
   g_signal_connect_object (self->toggle_source,
                            "clicked",
diff --git a/src/plugins/glade/gbp-glade-page.c b/src/plugins/glade/gbp-glade-page.c
index d41877ed8..b15082c1a 100644
--- a/src/plugins/glade/gbp-glade-page.c
+++ b/src/plugins/glade/gbp-glade-page.c
@@ -122,7 +122,7 @@ gbp_glade_page_set_project (GbpGladePage *self,
                                          NULL);
           g_signal_connect (self->designer,
                             "destroy",
-                            G_CALLBACK (gtk_widget_destroyed),
+                            G_CALLBACK (ide_gtk_widget_destroyed),
                             &self->designer);
           dzl_gtk_widget_add_style_class (GTK_WIDGET (self->designer), "glade-designer");
           gtk_container_add_with_properties (GTK_CONTAINER (self->main_box), GTK_WIDGET (self->designer),
@@ -559,7 +559,7 @@ gbp_glade_page_init (GbpGladePage *self)
                                 NULL);
   g_signal_connect (self->chooser,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->chooser);
   dzl_gtk_widget_add_style_class (GTK_WIDGET (self->chooser), "glade-chooser");
   gtk_container_add_with_properties (GTK_CONTAINER (self->main_box), GTK_WIDGET (self->chooser),
@@ -573,7 +573,7 @@ gbp_glade_page_init (GbpGladePage *self)
                                  NULL);
   g_signal_connect (self->designer,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->designer);
   dzl_gtk_widget_add_style_class (GTK_WIDGET (self->designer), "glade-designer");
   gtk_container_add (GTK_CONTAINER (self->main_box), GTK_WIDGET (self->designer));
diff --git a/src/plugins/history/gbp-history-frame-addin.c b/src/plugins/history/gbp-history-frame-addin.c
index a3c223a58..373b1cf0c 100644
--- a/src/plugins/history/gbp-history-frame-addin.c
+++ b/src/plugins/history/gbp-history-frame-addin.c
@@ -243,7 +243,7 @@ gbp_history_frame_addin_load (IdeFrameAddin *addin,
                                  NULL);
   g_signal_connect (self->controls,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->controls);
   dzl_gtk_widget_add_style_class (GTK_WIDGET (self->controls), "linked");
   gtk_container_add_with_properties (GTK_CONTAINER (header), GTK_WIDGET (self->controls),
@@ -260,7 +260,7 @@ gbp_history_frame_addin_load (IdeFrameAddin *addin,
                                         NULL);
   g_signal_connect (self->previous_button,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->previous_button);
   gtk_container_add (GTK_CONTAINER (self->controls), GTK_WIDGET (self->previous_button));
 
@@ -274,7 +274,7 @@ gbp_history_frame_addin_load (IdeFrameAddin *addin,
                                     NULL);
   g_signal_connect (self->next_button,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->next_button);
   gtk_container_add (GTK_CONTAINER (self->controls), GTK_WIDGET (self->next_button));
 
diff --git a/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c 
b/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
index c695ed217..2510b4861 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-preferences-addin.c
@@ -110,7 +110,7 @@ gbp_shellcmd_preferences_addin_load (IdePreferencesAddin *addin,
                                NULL);
   g_signal_connect (self->editor,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->editor);
   dzl_preferences_add_custom (prefs, "shellcmd.id", "basic", GTK_WIDGET (self->editor), NULL, 0);
 }
diff --git a/src/plugins/symbol-tree/gbp-symbol-frame-addin.c 
b/src/plugins/symbol-tree/gbp-symbol-frame-addin.c
index 6f8f55441..27b548287 100644
--- a/src/plugins/symbol-tree/gbp-symbol-frame-addin.c
+++ b/src/plugins/symbol-tree/gbp-symbol-frame-addin.c
@@ -463,7 +463,7 @@ gbp_symbol_frame_addin_load (IdeFrameAddin *addin,
   self->button = g_object_new (GBP_TYPE_SYMBOL_MENU_BUTTON, NULL);
   g_signal_connect (self->button,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->button);
   g_signal_connect_swapped (self->button,
                             "toggled",
diff --git a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c 
b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
index eb12f5e0f..d0028d69c 100644
--- a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
@@ -406,7 +406,7 @@ gbp_sysprof_workspace_addin_check_supported_cb (GObject      *object,
                                 NULL);
   g_signal_connect (self->surface,
                     "destroy",
-                    G_CALLBACK (gtk_widget_destroyed),
+                    G_CALLBACK (ide_gtk_widget_destroyed),
                     &self->surface);
   ide_workspace_add_surface (self->workspace, IDE_SURFACE (self->surface));
 }


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