static void ide_editor_frame_set_position_label (IdeEditorFrame *self, const gchar *text) { g_return_if_fail (IDE_IS_EDITOR_FRAME (self)); if (!text || !*text) { if (self->search_entry_tag) { gd_tagged_entry_remove_tag (self->search_entry, self->search_entry_tag); g_clear_object (&self->search_entry_tag); } return; } if (!self->search_entry_tag) { self->search_entry_tag = gd_tagged_entry_tag_new (""); gd_tagged_entry_add_tag (self->search_entry, self->search_entry_tag); gd_tagged_entry_tag_set_style (self->search_entry_tag, "gb-search-entry-occurrences-tag"); } gd_tagged_entry_tag_set_label (self->search_entry_tag, text); }
static void gd_tagged_entry_tag_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { GdTaggedEntryTag *self = GD_TAGGED_ENTRY_TAG (object); switch (property_id) { case PROP_TAG_LABEL: gd_tagged_entry_tag_set_label (self, g_value_get_string (value)); break; case PROP_TAG_HAS_CLOSE_BUTTON: gd_tagged_entry_tag_set_has_close_button (self, g_value_get_boolean (value)); break; case PROP_TAG_STYLE: gd_tagged_entry_tag_set_style (self, g_value_get_string (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } }