mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 12:41:16 +00:00
Merge branch 'wip/kabus/misc-leaks2' into 'main'
general: Fix leaks See merge request GNOME/gtk!6951
This commit is contained in:
commit
c739b9fe7f
@ -600,8 +600,8 @@ update_display (void)
|
||||
if (s->len > 0)
|
||||
{
|
||||
pango_font_description_set_variations (desc, s->str);
|
||||
g_string_free (s, TRUE);
|
||||
}
|
||||
g_string_free (s, TRUE);
|
||||
|
||||
font_desc = pango_font_description_to_string (desc);
|
||||
|
||||
|
@ -354,6 +354,7 @@ do_images (GtkWidget *do_widget)
|
||||
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
|
||||
image = gtk_image_new_from_gicon (gicon);
|
||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||
g_object_unref (gicon);
|
||||
|
||||
gtk_frame_set_child (GTK_FRAME (frame), image);
|
||||
|
||||
|
@ -3015,6 +3015,8 @@ gdk_x11_display_init_gl_backend (GdkX11Display *self,
|
||||
|
||||
self->egl_version = epoxy_egl_version (egl_display);
|
||||
|
||||
XFree (visinfo);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -370,6 +370,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
|
||||
else
|
||||
texture = NULL;
|
||||
take_image_definition (cellpixbuf, gtk_image_definition_new_paintable (GDK_PAINTABLE (texture)));
|
||||
g_clear_object (&texture);
|
||||
break;
|
||||
case PROP_PIXBUF_EXPANDER_OPEN:
|
||||
g_clear_object (&priv->pixbuf_expander_open);
|
||||
|
@ -1390,9 +1390,25 @@ gtk_at_context_get_text_accumulate (GtkATContext *self,
|
||||
{
|
||||
const char *text = gtk_widget_get_tooltip_text (GTK_WIDGET (self->accessible));
|
||||
if (text && not_just_space (text))
|
||||
if (!check_duplicates || ((property == GTK_ACCESSIBLE_PROPERTY_LABEL && strcmp(text, gtk_at_context_get_description_internal (self, FALSE)) != 0)
|
||||
|| (property == GTK_ACCESSIBLE_PROPERTY_DESCRIPTION && strcmp(text, gtk_at_context_get_name_internal (self, FALSE)) != 0)))
|
||||
append_with_space (res, text);
|
||||
{
|
||||
gboolean append = !check_duplicates;
|
||||
|
||||
if (!append)
|
||||
{
|
||||
char *description = gtk_at_context_get_description_internal (self, FALSE);
|
||||
char *name = gtk_at_context_get_name_internal (self, FALSE);
|
||||
|
||||
append =
|
||||
(property == GTK_ACCESSIBLE_PROPERTY_LABEL && strcmp (text, description) != 0) ||
|
||||
(property == GTK_ACCESSIBLE_PROPERTY_DESCRIPTION && strcmp (text, name) != 0);
|
||||
|
||||
g_free (description);
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
if (append)
|
||||
append_with_space (res, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,6 +242,7 @@ gtk_emoji_chooser_finalize (GObject *object)
|
||||
g_source_remove (chooser->populate_idle);
|
||||
|
||||
g_clear_pointer (&chooser->data, g_variant_unref);
|
||||
g_clear_pointer (&chooser->iter, g_variant_iter_free);
|
||||
g_clear_object (&chooser->settings);
|
||||
|
||||
G_OBJECT_CLASS (gtk_emoji_chooser_parent_class)->finalize (object);
|
||||
|
@ -2232,6 +2232,7 @@ update_feature_example (GtkFontChooserWidget *fontchooser,
|
||||
attr->start_index = 0;
|
||||
attr->end_index = strlen (input);
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
g_free (str);
|
||||
str = g_strconcat (item->name, " 1", NULL);
|
||||
attr = pango_attr_font_features_new (str);
|
||||
attr->start_index = strlen (input) + strlen (" → ");
|
||||
@ -2241,6 +2242,7 @@ update_feature_example (GtkFontChooserWidget *fontchooser,
|
||||
attr->start_index = strlen (input) + strlen (" → ");
|
||||
attr->end_index = attr->start_index + strlen (input);
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
g_free (str);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (item->example), text);
|
||||
gtk_label_set_attributes (GTK_LABEL (item->example), attrs);
|
||||
|
Loading…
Reference in New Issue
Block a user