mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
builder: Stop using GtkBuildable.get_id
Drop the only implementation of this vfunc, and stop using it. It isn't needed, and the only implementation did the same thing GtkBuilder does anyway.
This commit is contained in:
parent
8f24072354
commit
92edd4c476
@ -626,10 +626,7 @@ gtk_builder_get_parameters (GtkBuilder *builder,
|
||||
static const char *
|
||||
object_get_id (GObject *object)
|
||||
{
|
||||
if (GTK_IS_BUILDABLE (object))
|
||||
return gtk_buildable_get_buildable_id (GTK_BUILDABLE (object));
|
||||
else
|
||||
return g_object_get_data (object, "gtk-builder-id");
|
||||
return g_object_get_data (object, "gtk-builder-id");
|
||||
}
|
||||
|
||||
static GObject *
|
||||
@ -672,10 +669,7 @@ static inline void
|
||||
object_set_id (GObject *object,
|
||||
const char *id)
|
||||
{
|
||||
if (GTK_IS_BUILDABLE (object))
|
||||
gtk_buildable_set_buildable_id (GTK_BUILDABLE (object), id);
|
||||
else
|
||||
g_object_set_data_full (object, "gtk-builder-id", g_strdup (id), g_free);
|
||||
g_object_set_data_full (object, "gtk-builder-id", g_strdup (id), g_free);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -608,9 +608,6 @@ static gboolean gtk_widget_real_mnemonic_activate (GtkWidget
|
||||
gboolean group_cycling);
|
||||
static void gtk_widget_accessible_interface_init (GtkAccessibleInterface *iface);
|
||||
static void gtk_widget_buildable_interface_init (GtkBuildableIface *iface);
|
||||
static void gtk_widget_buildable_set_id (GtkBuildable *buildable,
|
||||
const char *id);
|
||||
static const char * gtk_widget_buildable_get_id (GtkBuildable *buildable);
|
||||
static GObject * gtk_widget_buildable_get_internal_child (GtkBuildable *buildable,
|
||||
GtkBuilder *builder,
|
||||
const char *childname);
|
||||
@ -654,7 +651,6 @@ static GQuark quark_size_groups = 0;
|
||||
static GQuark quark_auto_children = 0;
|
||||
static GQuark quark_font_options = 0;
|
||||
static GQuark quark_font_map = 0;
|
||||
static GQuark quark_builder_set_id = 0;
|
||||
|
||||
GType
|
||||
gtk_widget_get_type (void)
|
||||
@ -8498,10 +8494,6 @@ gtk_widget_buildable_add_child (GtkBuildable *buildable,
|
||||
static void
|
||||
gtk_widget_buildable_interface_init (GtkBuildableIface *iface)
|
||||
{
|
||||
quark_builder_set_id = g_quark_from_static_string ("gtk-builder-set-id");
|
||||
|
||||
iface->set_id = gtk_widget_buildable_set_id;
|
||||
iface->get_id = gtk_widget_buildable_get_id;
|
||||
iface->get_internal_child = gtk_widget_buildable_get_internal_child;
|
||||
iface->parser_finished = gtk_widget_buildable_parser_finished;
|
||||
iface->custom_tag_start = gtk_widget_buildable_custom_tag_start;
|
||||
@ -8510,20 +8502,6 @@ gtk_widget_buildable_interface_init (GtkBuildableIface *iface)
|
||||
iface->add_child = gtk_widget_buildable_add_child;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_buildable_set_id (GtkBuildable *buildable,
|
||||
const char *id)
|
||||
{
|
||||
g_object_set_qdata_full (G_OBJECT (buildable), quark_builder_set_id,
|
||||
g_strdup (id), g_free);
|
||||
}
|
||||
|
||||
static const char *
|
||||
gtk_widget_buildable_get_id (GtkBuildable *buildable)
|
||||
{
|
||||
return g_object_get_qdata (G_OBJECT (buildable), quark_builder_set_id);
|
||||
}
|
||||
|
||||
static GObject *
|
||||
gtk_widget_buildable_get_internal_child (GtkBuildable *buildable,
|
||||
GtkBuilder *builder,
|
||||
|
Loading…
Reference in New Issue
Block a user