Commit dd4b8550 authored by Vanadiae's avatar Vanadiae Committed by Christian Hergert
Browse files

gui: Bind frame popover open pages icon by gicon instead of icon-name

Currently editor pages have their page icon set to the one found for
the corresponding MIME type of the file.

While those icons are correctly shown under "Opened Pages" in the left
sidebar, they are only shown with the default text/plain MIME icon in the
frame header's Open Pages popover, so per-MIME type icon support is left
unfinished.

So this commit fixes it by changing from a binding of the icon-name
to a binding of the (g)icon, because the icon-name property is only a
shorthand to set the gicon, but icons at the end of the day are always
set in the (g)icon property even when setting icon-name. This is
especially important since ide_g_content_type_get_symbolic_icon gives a
GIcon, not an icon name. That's why editor pages were shown with the
text/plain MIME icon in the popover, as the icon was first set with
icon-name before setting it with the gicon associated with the file's
MIME type.
parent 332e6da4
Pipeline #274986 passed with stages
in 31 minutes and 25 seconds
......@@ -282,7 +282,7 @@ create_document_row (gpointer item,
self, 0);
dzl_gtk_widget_add_style_class (GTK_WIDGET (close_button), "image-button");
g_object_bind_property (item, "icon-name", image, "icon-name", G_BINDING_SYNC_CREATE);
g_object_bind_property (item, "icon", image, "gicon", G_BINDING_SYNC_CREATE);
g_object_bind_property_full (item, "modified", label, "attributes", G_BINDING_SYNC_CREATE,
modified_to_attrs, NULL, NULL, NULL);
g_object_bind_property (item, "title", label, "label", G_BINDING_SYNC_CREATE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment