Merge branch 'wip/otte/for-master' into 'master'

Wip/otte/for master

See merge request GNOME/gtk!2392
This commit is contained in:
Matthias Clasen 2020-08-07 01:16:11 +00:00
commit 6cf04c505f
2 changed files with 9 additions and 9 deletions

View File

@ -65,6 +65,7 @@ read_lines_cb (GObject *object,
{
g_print ("Could not read data: %s\n", error->message);
g_clear_error (&error);
g_object_unref (stringlist);
return;
}
@ -74,6 +75,7 @@ read_lines_cb (GObject *object,
{
if (size)
gtk_string_list_take (stringlist, g_utf8_make_valid (buffer, size));
g_object_unref (stringlist);
return;
}
@ -121,6 +123,7 @@ file_is_open_cb (GObject *file,
{
g_print ("Could not open file: %s\n", error->message);
g_error_free (error);
g_object_unref (data);
return;
}
@ -134,7 +137,7 @@ load_file (GtkStringList *list,
GFile *file)
{
gtk_string_list_splice (list, 0, g_list_model_get_n_items (G_LIST_MODEL (list)), NULL);
g_file_read_async (file, G_PRIORITY_HIGH_IDLE, NULL, file_is_open_cb, list);
g_file_read_async (file, G_PRIORITY_HIGH_IDLE, NULL, file_is_open_cb, g_object_ref (list));
}
static void
@ -174,6 +177,7 @@ do_listview_words (GtkWidget *do_widget)
stringlist = gtk_string_list_new ((const char **) words);
g_strfreev (words);
}
g_object_unref (file);
filter = gtk_string_filter_new (gtk_property_expression_new (GTK_TYPE_STRING_OBJECT, NULL, "string"));
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (stringlist), filter);

View File

@ -13156,19 +13156,15 @@ gtk_treeview_snapshot_border (GtkSnapshot *snapshot,
const graphene_rect_t *rect)
{
GskRoundedRect rounded;
GskRenderNode *border_node;
gsk_rounded_rect_init_from_rect (&rounded, rect, 0);
#define BLACK { 0, 0, 0, 1 }
border_node = gsk_border_node_new (&rounded,
(float[4]) { 1, 1, 1, 1 },
(GdkRGBA[4]) { BLACK, BLACK, BLACK, BLACK });
gtk_snapshot_append_border (snapshot,
&rounded,
(float[4]) { 1, 1, 1, 1 },
(GdkRGBA[4]) { BLACK, BLACK, BLACK, BLACK });
#undef BLACK
gtk_snapshot_append_node (snapshot, border_node);
gsk_render_node_unref (border_node);
}
/* KEEP IN SYNC WITH GTK_TREE_VIEW_BIN_EXPOSE */