[gtk/ebassi/finish-template] Rename clear_template to dispose_template
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/finish-template] Rename clear_template to dispose_template
- Date: Thu, 7 Jul 2022 13:10:12 +0000 (UTC)
commit a5c07633261791317ff359c9236acd611929a1d3
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jul 7 14:09:35 2022 +0100
Rename clear_template to dispose_template
Make it more clear that the function is supposed to be called during the
dispose sequence of a widget.
demos/constraint-editor/constraint-editor-window.c | 2 +-
demos/constraint-editor/constraint-editor.c | 2 +-
demos/constraint-editor/guide-editor.c | 2 +-
demos/gtk-demo/application.c | 2 +-
demos/gtk-demo/demo3widget.c | 2 +-
demos/gtk-demo/listbox.c | 2 +-
demos/icon-browser/iconbrowserwin.c | 2 +-
demos/node-editor/node-editor-window.c | 2 +-
gtk/gtkemojichooser.c | 2 +-
gtk/gtkfilechooserdialog.c | 2 +-
gtk/gtkfilechooserwidget.c | 2 +-
gtk/gtkfontchooserdialog.c | 2 +-
gtk/gtkmediacontrols.c | 2 +-
gtk/gtkstatusbar.c | 2 +-
gtk/gtkwidget.c | 14 +++++++-------
gtk/gtkwidget.h | 2 +-
gtk/inspector/a11y.c | 2 +-
gtk/inspector/actions.c | 2 +-
gtk/inspector/clipboard.c | 2 +-
gtk/inspector/general.c | 2 +-
gtk/inspector/list-data.c | 2 +-
gtk/inspector/logs.c | 2 +-
gtk/inspector/misc-info.c | 2 +-
gtk/inspector/recorder.c | 2 +-
gtk/inspector/resource-list.c | 2 +-
gtk/inspector/tree-data.c | 2 +-
gtk/inspector/visual.c | 2 +-
gtk/inspector/window.c | 2 +-
28 files changed, 34 insertions(+), 34 deletions(-)
---
diff --git a/demos/constraint-editor/constraint-editor-window.c
b/demos/constraint-editor/constraint-editor-window.c
index 80dc10c1c3..fc47413187 100644
--- a/demos/constraint-editor/constraint-editor-window.c
+++ b/demos/constraint-editor/constraint-editor-window.c
@@ -363,7 +363,7 @@ save_cb (GtkWidget *button,
static void
constraint_editor_window_dispose (GObject *object)
{
- gtk_widget_clear_template (GTK_WIDGET (object), CONSTRAINT_EDITOR_WINDOW_TYPE);
+ gtk_widget_dispose_template (GTK_WIDGET (object), CONSTRAINT_EDITOR_WINDOW_TYPE);
G_OBJECT_CLASS (constraint_editor_window_parent_class)->dispose (object);
}
diff --git a/demos/constraint-editor/constraint-editor.c b/demos/constraint-editor/constraint-editor.c
index 17407bb439..3e77eca1d4 100644
--- a/demos/constraint-editor/constraint-editor.c
+++ b/demos/constraint-editor/constraint-editor.c
@@ -610,7 +610,7 @@ constraint_editor_dispose (GObject *object)
g_clear_object (&self->model);
g_clear_object (&self->constraint);
- gtk_widget_clear_template (GTK_WIDGET (object), CONSTRAINT_EDITOR_TYPE);
+ gtk_widget_dispose_template (GTK_WIDGET (object), CONSTRAINT_EDITOR_TYPE);
G_OBJECT_CLASS (constraint_editor_parent_class)->dispose (object);
}
diff --git a/demos/constraint-editor/guide-editor.c b/demos/constraint-editor/guide-editor.c
index f7bc039378..6e8e2ac5ac 100644
--- a/demos/constraint-editor/guide-editor.c
+++ b/demos/constraint-editor/guide-editor.c
@@ -296,7 +296,7 @@ guide_editor_dispose (GObject *object)
g_clear_object (&self->guide);
- gtk_widget_clear_template (GTK_WIDGET (self), GUIDE_EDITOR_TYPE);
+ gtk_widget_dispose_template (GTK_WIDGET (self), GUIDE_EDITOR_TYPE);
G_OBJECT_CLASS (guide_editor_parent_class)->dispose (object);
}
diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c
index e0acb60305..a3e29bfb1c 100644
--- a/demos/gtk-demo/application.c
+++ b/demos/gtk-demo/application.c
@@ -504,7 +504,7 @@ demo_application_window_dispose (GObject *object)
demo_application_window_store_state (window);
- gtk_widget_clear_template (GTK_WIDGET (window), demo_application_window_get_type ());
+ gtk_widget_dispose_template (GTK_WIDGET (window), demo_application_window_get_type ());
G_OBJECT_CLASS (demo_application_window_parent_class)->dispose (object);
}
diff --git a/demos/gtk-demo/demo3widget.c b/demos/gtk-demo/demo3widget.c
index 51a820a3ff..9f8d943d14 100644
--- a/demos/gtk-demo/demo3widget.c
+++ b/demos/gtk-demo/demo3widget.c
@@ -38,7 +38,7 @@ demo3_widget_dispose (GObject *object)
g_clear_object (&self->paintable);
- gtk_widget_clear_template (GTK_WIDGET (self), DEMO3_TYPE_WIDGET);
+ gtk_widget_dispose_template (GTK_WIDGET (self), DEMO3_TYPE_WIDGET);
G_OBJECT_CLASS (demo3_widget_parent_class)->dispose (object);
}
diff --git a/demos/gtk-demo/listbox.c b/demos/gtk-demo/listbox.c
index c08cf681b7..49bd2135ae 100644
--- a/demos/gtk-demo/listbox.c
+++ b/demos/gtk-demo/listbox.c
@@ -263,7 +263,7 @@ gtk_message_row_state_flags_changed (GtkWidget *widget,
static void
gtk_message_row_dispose (GObject *obj)
{
- gtk_widget_clear_template (GTK_WIDGET (obj), GTK_TYPE_MESSAGE_ROW);
+ gtk_widget_dispose_template (GTK_WIDGET (obj), GTK_TYPE_MESSAGE_ROW);
G_OBJECT_CLASS (gtk_message_row_parent_class)->dispose (obj);
}
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c
index 6a130c45a1..d0da5c464c 100644
--- a/demos/icon-browser/iconbrowserwin.c
+++ b/demos/icon-browser/iconbrowserwin.c
@@ -412,7 +412,7 @@ icon_browser_window_init (IconBrowserWindow *win)
static void
icon_browser_window_dispose (GObject *object)
{
- gtk_widget_clear_template (GTK_WIDGET (object), ICON_BROWSER_WINDOW_TYPE);
+ gtk_widget_dispose_template (GTK_WIDGET (object), ICON_BROWSER_WINDOW_TYPE);
G_OBJECT_CLASS (icon_browser_window_parent_class)->dispose (object);
}
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c
index d9bc5eff0f..25cf11b48d 100644
--- a/demos/node-editor/node-editor-window.c
+++ b/demos/node-editor/node-editor-window.c
@@ -876,7 +876,7 @@ dark_mode_cb (GtkToggleButton *button,
static void
node_editor_window_dispose (GObject *object)
{
- gtk_widget_clear_template (GTK_WIDGET (object), NODE_EDITOR_WINDOW_TYPE);
+ gtk_widget_dispose_template (GTK_WIDGET (object), NODE_EDITOR_WINDOW_TYPE);
G_OBJECT_CLASS (node_editor_window_parent_class)->dispose (object);
}
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index 281772a6da..adeb485c6c 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -252,7 +252,7 @@ gtk_emoji_chooser_finalize (GObject *object)
static void
gtk_emoji_chooser_dispose (GObject *object)
{
- gtk_widget_clear_template (GTK_WIDGET (object), GTK_TYPE_EMOJI_CHOOSER);
+ gtk_widget_dispose_template (GTK_WIDGET (object), GTK_TYPE_EMOJI_CHOOSER);
G_OBJECT_CLASS (gtk_emoji_chooser_parent_class)->dispose (object);
}
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index c874d0c31a..56b070a65a 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -380,7 +380,7 @@ gtk_file_chooser_dialog_activate_response (GtkWidget *widget,
static void
gtk_file_chooser_dialog_dispose (GObject *object)
{
- gtk_widget_clear_template (GTK_WIDGET (object), GTK_TYPE_FILE_CHOOSER_DIALOG);
+ gtk_widget_dispose_template (GTK_WIDGET (object), GTK_TYPE_FILE_CHOOSER_DIALOG);
G_OBJECT_CLASS (gtk_file_chooser_dialog_parent_class)->dispose (object);
}
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 2d39c38eda..da11ae735b 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3137,7 +3137,7 @@ gtk_file_chooser_widget_dispose (GObject *object)
remove_settings_signal (impl);
- gtk_widget_clear_template (GTK_WIDGET (impl), GTK_TYPE_FILE_CHOOSER_WIDGET);
+ gtk_widget_dispose_template (GTK_WIDGET (impl), GTK_TYPE_FILE_CHOOSER_WIDGET);
G_OBJECT_CLASS (gtk_file_chooser_widget_parent_class)->dispose (object);
}
diff --git a/gtk/gtkfontchooserdialog.c b/gtk/gtkfontchooserdialog.c
index 6fefcce24a..5aeddd20c4 100644
--- a/gtk/gtkfontchooserdialog.c
+++ b/gtk/gtkfontchooserdialog.c
@@ -232,7 +232,7 @@ gtk_font_chooser_dialog_dispose (GObject *object)
/* tweak_button is not a template child */
g_clear_pointer (&dialog->tweak_button, gtk_widget_unparent);
- gtk_widget_clear_template (GTK_WIDGET (dialog), GTK_TYPE_FONT_CHOOSER_DIALOG);
+ gtk_widget_dispose_template (GTK_WIDGET (dialog), GTK_TYPE_FONT_CHOOSER_DIALOG);
G_OBJECT_CLASS (gtk_font_chooser_dialog_parent_class)->dispose (object);
}
diff --git a/gtk/gtkmediacontrols.c b/gtk/gtkmediacontrols.c
index e7f279510d..4dc8888e15 100644
--- a/gtk/gtkmediacontrols.c
+++ b/gtk/gtkmediacontrols.c
@@ -208,7 +208,7 @@ gtk_media_controls_dispose (GObject *object)
gtk_media_controls_set_media_stream (controls, NULL);
- gtk_widget_clear_template (GTK_WIDGET (object), GTK_TYPE_MEDIA_CONTROLS);
+ gtk_widget_dispose_template (GTK_WIDGET (object), GTK_TYPE_MEDIA_CONTROLS);
G_OBJECT_CLASS (gtk_media_controls_parent_class)->dispose (object);
}
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 98dc4c5c5b..70afc1bdf4 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -143,7 +143,7 @@ gtk_statusbar_dispose (GObject *object)
g_slist_free_full (self->keys, g_free);
self->keys = NULL;
- gtk_widget_clear_template (GTK_WIDGET (self), GTK_TYPE_STATUSBAR);
+ gtk_widget_dispose_template (GTK_WIDGET (self), GTK_TYPE_STATUSBAR);
G_OBJECT_CLASS (gtk_statusbar_parent_class)->dispose (object);
}
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index aeffed122e..f622b11aab 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -392,7 +392,7 @@
* }
* ```
*
- * as well as calling [method@Gtk.Widget.clear_template] from the dispose
+ * as well as calling [method@Gtk.Widget.dispose_template] from the dispose
* function:
*
* ```c
@@ -404,7 +404,7 @@
* // Dispose objects for which you have a reference...
*
* // Clear the template children for this widget type
- * gtk_widget_clear_template (GTK_WIDGET (self), FOO_TYPE_WIDGET);
+ * gtk_widget_dispose_template (GTK_WIDGET (self), FOO_TYPE_WIDGET);
*
* G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject);
* }
@@ -428,7 +428,7 @@
* static void
* foo_widget_dispose (GObject *gobject)
* {
- * gtk_widget_clear_template (GTK_WIDGET (gobject), FOO_TYPE_WIDGET);
+ * gtk_widget_dispose_template (GTK_WIDGET (gobject), FOO_TYPE_WIDGET);
*
* G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject);
* }
@@ -11007,7 +11007,7 @@ out:
}
/**
- * gtk_widget_clear_template:
+ * gtk_widget_dispose_template:
* @widget: the widget with a template
* @widget_type: the type of the widget to finalize the template for
*
@@ -11031,7 +11031,7 @@ out:
* SomeWidget *self = SOME_WIDGET (gobject);
*
* // Clear the template data for SomeWidget
- * gtk_widget_clear_template (GTK_WIDGET (self), SOME_TYPE_WIDGET);
+ * gtk_widget_dispose_template (GTK_WIDGET (self), SOME_TYPE_WIDGET);
*
* G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject);
* }
@@ -11040,8 +11040,8 @@ out:
* Since: 4.8
*/
void
-gtk_widget_clear_template (GtkWidget *widget,
- GType widget_type)
+gtk_widget_dispose_template (GtkWidget *widget,
+ GType widget_type)
{
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (g_type_name (widget_type) != NULL);
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index fede1b634e..8720017bad 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -834,7 +834,7 @@ GObject *gtk_widget_get_template_child (GtkWidget *
GType widget_type,
const char *name);
GDK_AVAILABLE_IN_4_8
-void gtk_widget_clear_template (GtkWidget *widget,
+void gtk_widget_dispose_template (GtkWidget *widget,
GType widget_type);
GDK_AVAILABLE_IN_ALL
void gtk_widget_class_set_template (GtkWidgetClass *widget_class,
diff --git a/gtk/inspector/a11y.c b/gtk/inspector/a11y.c
index 178b5d138a..9a9140e183 100644
--- a/gtk/inspector/a11y.c
+++ b/gtk/inspector/a11y.c
@@ -462,7 +462,7 @@ dispose (GObject *o)
g_clear_object (&sl->object);
- gtk_widget_clear_template (GTK_WIDGET (o), GTK_TYPE_INSPECTOR_A11Y);
+ gtk_widget_dispose_template (GTK_WIDGET (o), GTK_TYPE_INSPECTOR_A11Y);
G_OBJECT_CLASS (gtk_inspector_a11y_parent_class)->dispose (o);
}
diff --git a/gtk/inspector/actions.c b/gtk/inspector/actions.c
index be621b28f9..24afc47856 100644
--- a/gtk/inspector/actions.c
+++ b/gtk/inspector/actions.c
@@ -425,7 +425,7 @@ dispose (GObject *object)
g_clear_object (&sl->actions);
g_clear_object (&sl->object);
- gtk_widget_clear_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_ACTIONS);
+ gtk_widget_dispose_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_ACTIONS);
G_OBJECT_CLASS (gtk_inspector_actions_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/clipboard.c b/gtk/inspector/clipboard.c
index dd85dcb736..edfb8b6ca4 100644
--- a/gtk/inspector/clipboard.c
+++ b/gtk/inspector/clipboard.c
@@ -355,7 +355,7 @@ gtk_inspector_clipboard_dispose (GObject *object)
gtk_inspector_clipboard_unset_display (self);
- gtk_widget_clear_template (GTK_WIDGET (self), GTK_TYPE_INSPECTOR_CLIPBOARD);
+ gtk_widget_dispose_template (GTK_WIDGET (self), GTK_TYPE_INSPECTOR_CLIPBOARD);
G_OBJECT_CLASS (gtk_inspector_clipboard_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
index 485a98cea1..951ce98d1e 100644
--- a/gtk/inspector/general.c
+++ b/gtk/inspector/general.c
@@ -1097,7 +1097,7 @@ gtk_inspector_general_dispose (GObject *object)
disconnect_seat (gen, GDK_SEAT (l->data));
g_list_free (list);
- gtk_widget_clear_template (GTK_WIDGET (gen), GTK_TYPE_INSPECTOR_GENERAL);
+ gtk_widget_dispose_template (GTK_WIDGET (gen), GTK_TYPE_INSPECTOR_GENERAL);
G_OBJECT_CLASS (gtk_inspector_general_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/list-data.c b/gtk/inspector/list-data.c
index 3978bf1784..c56defef95 100644
--- a/gtk/inspector/list-data.c
+++ b/gtk/inspector/list-data.c
@@ -191,7 +191,7 @@ dispose (GObject *object)
{
GtkInspectorListData *sl = GTK_INSPECTOR_LIST_DATA (object);
- gtk_widget_clear_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_LIST_DATA);
+ gtk_widget_dispose_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_LIST_DATA);
G_OBJECT_CLASS (gtk_inspector_list_data_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/logs.c b/gtk/inspector/logs.c
index ac9b88b076..97b5cf17c2 100644
--- a/gtk/inspector/logs.c
+++ b/gtk/inspector/logs.c
@@ -99,7 +99,7 @@ gtk_inspector_logs_init (GtkInspectorLogs *logs)
static void
dispose (GObject *object)
{
- gtk_widget_clear_template (GTK_WIDGET (object), GTK_TYPE_INSPECTOR_LOGS);
+ gtk_widget_dispose_template (GTK_WIDGET (object), GTK_TYPE_INSPECTOR_LOGS);
G_OBJECT_CLASS (gtk_inspector_logs_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/misc-info.c b/gtk/inspector/misc-info.c
index 39b766a8f4..7b5a442ffb 100644
--- a/gtk/inspector/misc-info.c
+++ b/gtk/inspector/misc-info.c
@@ -596,7 +596,7 @@ dispose (GObject *o)
{
GtkInspectorMiscInfo *sl = GTK_INSPECTOR_MISC_INFO (o);
- gtk_widget_clear_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_MISC_INFO);
+ gtk_widget_dispose_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_MISC_INFO);
G_OBJECT_CLASS (gtk_inspector_misc_info_parent_class)->dispose (o);
}
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index 9e4ed37ca0..e5caf293fa 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -2043,7 +2043,7 @@ gtk_inspector_recorder_dispose (GObject *object)
g_clear_object (&recorder->render_node_root_model);
g_clear_object (&recorder->render_node_selection);
- gtk_widget_clear_template (GTK_WIDGET (recorder), GTK_TYPE_INSPECTOR_RECORDER);
+ gtk_widget_dispose_template (GTK_WIDGET (recorder), GTK_TYPE_INSPECTOR_RECORDER);
G_OBJECT_CLASS (gtk_inspector_recorder_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/resource-list.c b/gtk/inspector/resource-list.c
index 86112ac487..3c0dc2a38e 100644
--- a/gtk/inspector/resource-list.c
+++ b/gtk/inspector/resource-list.c
@@ -768,7 +768,7 @@ dispose (GObject *object)
g_clear_object (&rl->selection);
g_clear_object (&rl->tree_model);
- gtk_widget_clear_template (GTK_WIDGET (rl), GTK_TYPE_INSPECTOR_RESOURCE_LIST);
+ gtk_widget_dispose_template (GTK_WIDGET (rl), GTK_TYPE_INSPECTOR_RESOURCE_LIST);
G_OBJECT_CLASS (gtk_inspector_resource_list_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/tree-data.c b/gtk/inspector/tree-data.c
index a4fd0b72e4..b0e23c2933 100644
--- a/gtk/inspector/tree-data.c
+++ b/gtk/inspector/tree-data.c
@@ -176,7 +176,7 @@ dispose (GObject *object)
{
GtkInspectorTreeData *sl = GTK_INSPECTOR_TREE_DATA (object);
- gtk_widget_clear_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_TREE_DATA);
+ gtk_widget_dispose_template (GTK_WIDGET (sl), GTK_TYPE_INSPECTOR_TREE_DATA);
G_OBJECT_CLASS (gtk_inspector_tree_data_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c
index 4b4d44c62e..19ac88b4ef 100644
--- a/gtk/inspector/visual.c
+++ b/gtk/inspector/visual.c
@@ -1134,7 +1134,7 @@ gtk_inspector_visual_dispose (GObject *object)
{
GtkInspectorVisual *vis = GTK_INSPECTOR_VISUAL (object);
- gtk_widget_clear_template (GTK_WIDGET (vis), GTK_TYPE_INSPECTOR_VISUAL);
+ gtk_widget_dispose_template (GTK_WIDGET (vis), GTK_TYPE_INSPECTOR_VISUAL);
G_OBJECT_CLASS (gtk_inspector_visual_parent_class)->dispose (object);
}
diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c
index 8a0d198fa1..2bc45d8267 100644
--- a/gtk/inspector/window.c
+++ b/gtk/inspector/window.c
@@ -314,7 +314,7 @@ gtk_inspector_window_dispose (GObject *object)
g_clear_object (&iw->flash_overlay);
g_clear_pointer (&iw->objects, g_array_unref);
- gtk_widget_clear_template (GTK_WIDGET (iw), GTK_TYPE_INSPECTOR_WINDOW);
+ gtk_widget_dispose_template (GTK_WIDGET (iw), GTK_TYPE_INSPECTOR_WINDOW);
G_OBJECT_CLASS (gtk_inspector_window_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]