Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
gtk3.1686
gtk3-icon-theme-reduce-io.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gtk3-icon-theme-reduce-io.patch of Package gtk3.1686
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 8e3198c..7fdafd4 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -268,6 +268,7 @@ struct _GtkIconInfo guint raw_coordinates : 1; guint forced_size : 1; guint emblems_applied : 1; + guint is_svg : 1; /* Cached information if we go ahead and try to load * the icon. @@ -1726,6 +1727,7 @@ choose_icon (GtkIconTheme *icon_theme, icon_info->filename = g_strdup (unthemed_icon->no_svg_filename); icon_info->icon_file = g_file_new_for_path (icon_info->filename); + icon_info->is_svg = suffix_from_name (icon_info->filename) == ICON_SUFFIX_SVG; } out: @@ -2876,6 +2878,7 @@ theme_lookup_icon (IconTheme *theme, file = g_strconcat (icon_name, string_from_suffix (suffix), NULL); icon_info->filename = g_build_filename (min_dir->dir, file, NULL); icon_info->icon_file = g_file_new_for_path (icon_info->filename); + icon_info->is_svg = suffix == ICON_SUFFIX_SVG; g_free (file); } else @@ -3313,6 +3316,7 @@ icon_info_new (IconThemeDirType type, int dir_size, int dir_scale) icon_info->dir_size = dir_size; icon_info->dir_scale = dir_scale; icon_info->unscaled_scale = 1.0; + icon_info->is_svg = FALSE; return icon_info; } @@ -3680,30 +3684,7 @@ icon_info_ensure_scale_and_pixbuf (GtkIconInfo *icon_info, scaled_desired_size = icon_info->desired_size * icon_info->desired_scale; - is_svg = FALSE; - if (G_IS_FILE_ICON (icon_info->loadable)) - { - GFile *file; - GFileInfo *file_info; - const gchar *content_type; - - file = g_file_icon_get_file (G_FILE_ICON (icon_info->loadable)); - file_info = g_file_query_info (file, - G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, - G_FILE_QUERY_INFO_NONE, - NULL, NULL); - if (file_info) - { - content_type = g_file_info_get_content_type (file_info); - - if (content_type && strcmp (content_type, "image/svg+xml") == 0) - is_svg = TRUE; - - g_object_unref (file_info); - } - } - - if (is_svg) + if (icon_info->is_svg) { GInputStream *stream; @@ -5283,6 +5264,7 @@ gtk_icon_theme_lookup_by_gicon_for_scale (GtkIconTheme *icon_theme, { info = icon_info_new (ICON_THEME_DIR_UNTHEMED, size, 1); info->loadable = G_LOADABLE_ICON (g_object_ref (icon)); + info->is_svg = FALSE; if (G_IS_FILE_ICON (icon)) { @@ -5291,6 +5273,7 @@ gtk_icon_theme_lookup_by_gicon_for_scale (GtkIconTheme *icon_theme, { info->icon_file = g_object_ref (file); info->filename = g_file_get_path (file); + info->is_svg = suffix_from_name (info->filename) == ICON_SUFFIX_SVG; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor