summaryrefslogtreecommitdiff
path: root/gtk/gtkbuildable.h
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2020-09-25 16:43:24 +0200
committerFlorian Müllner <fmuellner@gnome.org>2020-09-26 02:16:05 +0200
commit12189bc10f87fe6315565e38099aceff60583a41 (patch)
tree891f1f086bc1a4321f7faef0432485810f940dc1 /gtk/gtkbuildable.h
parenta9de1d702ef389c47f7bc78baefcb761a4b73a04 (diff)
downloadgtk+-12189bc10f87fe6315565e38099aceff60583a41.tar.gz
buildable: Rename set_name() to set_buildable_id()
GtkBuildable's get_name()/set_name() methods may shadow GtkWidget's methods. Avoid that by renaming the API to get_buildable_id()/set_buildable_id(), which also reflects the name of the XML attribute the API refers to. https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
Diffstat (limited to 'gtk/gtkbuildable.h')
-rw-r--r--gtk/gtkbuildable.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/gtk/gtkbuildable.h b/gtk/gtkbuildable.h
index 7450103f57..9cb69dcaa3 100644
--- a/gtk/gtkbuildable.h
+++ b/gtk/gtkbuildable.h
@@ -76,12 +76,12 @@ struct _GtkBuildableParser
/**
* GtkBuildableIface:
* @g_iface: the parent class
- * @set_name: Stores the name attribute given in the GtkBuilder UI definition.
+ * @set_id: Stores the id attribute given in the GtkBuilder UI definition.
* #GtkWidget stores the name as object data. Implement this method if your
- * object has some notion of “name” and it makes sense to map the XML name
+ * object has some notion of “ID” and it makes sense to map the XML id
* attribute to it.
- * @get_name: The getter corresponding to @set_name. Implement this
- * if you implement @set_name.
+ * @get_id: The getter corresponding to @set_id. Implement this
+ * if you implement @set_id.
* @add_child: Adds a child. The @type parameter can be used to
* differentiate the kind of child. #GtkWidget implements this
* to add event controllers to the widget, #GtkNotebook uses
@@ -126,9 +126,9 @@ struct _GtkBuildableIface
GTypeInterface g_iface;
/* virtual table */
- void (* set_name) (GtkBuildable *buildable,
- const char *name);
- const char * (* get_name) (GtkBuildable *buildable);
+ void (* set_id) (GtkBuildable *buildable,
+ const char *id);
+ const char * (* get_id) (GtkBuildable *buildable);
void (* add_child) (GtkBuildable *buildable,
GtkBuilder *builder,
GObject *child,
@@ -169,10 +169,10 @@ GDK_AVAILABLE_IN_ALL
GType gtk_buildable_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-void gtk_buildable_set_name (GtkBuildable *buildable,
- const char *name);
+void gtk_buildable_set_buildable_id (GtkBuildable *buildable,
+ const char *id);
GDK_AVAILABLE_IN_ALL
-const char * gtk_buildable_get_name (GtkBuildable *buildable);
+const char * gtk_buildable_get_buildable_id (GtkBuildable *buildable);
GDK_AVAILABLE_IN_ALL
void gtk_buildable_add_child (GtkBuildable *buildable,
GtkBuilder *builder,