1. 18 Feb, 2018 1 commit
    • John Lindgren's avatar
      Fix incorrect optimization in find_builtin_icon(). · 5aa939dc
      John Lindgren authored
      When we found an icon with exactly the requested size, we'd stop
      searching immediately (good), but we'd neglect to set the returned
      min_difference to 0 (bad).  This caused theme_lookup_icon() to
      prefer other, potentially much worse, matches over the exact one.
      5aa939dc
  2. 16 Nov, 2017 2 commits
  3. 11 Oct, 2017 1 commit
  4. 30 Sep, 2016 1 commit
    • Victor Toso's avatar
      icon-theme: Fix leaks on error · 9701b58c
      Victor Toso authored
      13 bytes in 1 blocks are definitely lost in loss record 766 of 16,875
         at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
         by 0xA9D0247: vasprintf (in /usr/lib64/libc-2.24.so)
         by 0xA2453FC: g_vasprintf (gprintf.c:316)
         by 0xA2152F7: g_strdup_vprintf (gstrfuncs.c:514)
         by 0xA21539C: g_strdup_printf (gstrfuncs.c:540)
         by 0x678F25C: gdk_rgba_to_string (gdkrgba.c:360)
         by 0x5FAE00D: rgba_to_string_noalpha (gtkicontheme.c:4322)
         by 0x5FAE6F2: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4492)
         by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
         by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
         by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
         by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)
      
      14 bytes in 1 blocks are definitely lost in loss record 801 of 16,875
         at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
         by 0xA9D0247: vasprintf (in /usr/lib64/libc-2.24.so)
         by 0xA2453FC: g_vasprintf (gprintf.c:316)
         by 0xA2152F7: g_strdup_vprintf (gstrfuncs.c:514)
         by 0xA21539C: g_strdup_printf (gstrfuncs.c:540)
         by 0x678F25C: gdk_rgba_to_string (gdkrgba.c:360)
         by 0x5FAE00D: rgba_to_string_noalpha (gtkicontheme.c:4322)
         by 0x5FAE68E: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4482)
         by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
         by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
         by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
         by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)
      
      15 bytes in 1 blocks are definitely lost in loss record 838 of 16,875
         at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
         by 0xA9D0247: vasprintf (in /usr/lib64/libc-2.24.so)
         by 0xA2453FC: g_vasprintf (gprintf.c:316)
         by 0xA2152F7: g_strdup_vprintf (gstrfuncs.c:514)
         by 0xA21539C: g_strdup_printf (gstrfuncs.c:540)
         by 0x678F25C: gdk_rgba_to_string (gdkrgba.c:360)
         by 0x5FAE00D: rgba_to_string_noalpha (gtkicontheme.c:4322)
         by 0x5FAE6C3: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4487)
         by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
         by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
         by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
         by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)
      
      16,384 bytes in 1 blocks are definitely lost in loss record 16,847 of 16,875
         at 0x4C2DADE: malloc (vg_replace_malloc.c:298)
         by 0x4C2FC91: realloc (vg_replace_malloc.c:785)
         by 0xA1F89FA: g_realloc (gmem.c:159)
         by 0xA1BAD2E: g_array_maybe_expand (garray.c:779)
         by 0xA1BA566: g_array_set_size (garray.c:555)
         by 0xA1BBCB8: g_byte_array_set_size (garray.c:1752)
         by 0x8D1CC48: g_file_load_contents (gfile.c:6766)
         by 0x5FAE767: gtk_icon_info_load_symbolic_svg (gtkicontheme.c:4501)
         by 0x5FAED4F: gtk_icon_info_load_symbolic_internal (gtkicontheme.c:4622)
         by 0x5FAEEE8: gtk_icon_info_load_symbolic (gtkicontheme.c:4711)
         by 0x5F00246: gtk_css_image_recolor_load (gtkcssimagerecolor.c:118)
         by 0x5F003E4: gtk_css_image_recolor_compute (gtkcssimagerecolor.c:170)
      
      https://bugzilla.gnome.org/show_bug.cgi?id=772215
      9701b58c
  5. 22 Sep, 2016 1 commit
  6. 19 May, 2016 1 commit
    • Matthias Clasen's avatar
      icon theme: Add a warning · de7c1563
      Matthias Clasen authored
      Warn about the situation when we've found a resource or file path,
      but gdk-pixbuf fails to give us a pixbuf. This generally means that
      either pixbuf loaders are not found or the shared-mime database
      is missing.
      de7c1563
  7. 31 Mar, 2016 1 commit
  8. 29 Feb, 2016 1 commit
    • Matthias Clasen's avatar
      Don't use g_print for debug output · 2ee7fb18
      Matthias Clasen authored
      The g_print documentation explicitly says not to do this, since
      g_print is meant to be redirected by applications. Instead use
      g_message for logging that can be triggered via GTK_DEBUG.
      2ee7fb18
  9. 28 Feb, 2016 1 commit
  10. 30 Jan, 2016 1 commit
    • Matthias Clasen's avatar
      icontheme: Avoid a crash · e5454950
      Matthias Clasen authored
      gtk_icon_info_new_for_file with a size of 0 would fail for
      symbolic pngs because we ended up scaling with 0. Avoid this.
      e5454950
  11. 29 Jan, 2016 1 commit
    • Matthias Clasen's avatar
      icon theme: Improve loading of unthemed files · 001598a8
      Matthias Clasen authored
      When creating icon info objects for unthemed files, we don't
      really have a nominal size, so we pass 0 to mean 'load at
      original size'. However, this is not what was happening.
      To make this possible, add variants of some pixbuf loading
      functions that take a scale factor instead of a desired size,
      and use those when we don't have a nominal size.
      001598a8
  12. 14 Jan, 2016 2 commits
  13. 08 Jan, 2016 1 commit
    • Alberto Ruiz's avatar
      introspection: This patch fixes nullable return values fixes for the following symbols in gtk · 496f0892
      Alberto Ruiz authored
        gtk_accel_group_query
        gtk_accel_group_from_accel_closure
        gtk_accel_label_get_accel_widget
        gtk_accessible_get_widget
        gtk_actionable_get_action_name
        gtk_app_chooser_get_app_info
        gtk_app_chooser_button_get_heading
        gtk_app_chooser_dialog_get_heading
        gtk_application_get_window_by_id
        gtk_assistant_get_nth_page
        gtk_binding_set_find
        gtk_builder_get_object
        gtk_builder_lookup_callback_symbol
        gtk_builder_get_application
        gtk_button_get_image
        gtk_cell_area_get_focus_from_sibling
        gtk_cell_renderer_start_editing
        gtk_cell_view_get_model
        gtk_cell_view_get_displayed_row
        gtk_clipboard_get_owner
        gtk_container_get_focus_child
        gtk_container_get_focus_vadjustment
        gtk_container_get_focus_hadjustment
        gtk_dialog_get_widget_for_response
        gtk_drag_get_source_widget
        gtk_drag_dest_get_target_list
        gtk_drag_source_get_target_list
        gtk_entry_completion_get_model
        gtk_entry_completion_compute_prefix
        gtk_expander_get_label_widget
        gtk_file_chooser_get_filename
        gtk_file_chooser_get_current_folder
        gtk_file_chooser_get_uri
        gtk_file_chooser_get_current_folder_uri
        gtk_file_chooser_get_preview_widget
        gtk_file_chooser_get_preview_file
        gtk_file_chooser_get_preview_filename
        gtk_file_chooser_get_preview_uri
        gtk_file_chooser_get_extra_widget
        gtk_file_chooser_get_filter
        gtk_file_chooser_native_get_accept_label
        gtk_file_chooser_native_get_cancel_label
        gtk_file_filter_get_name
        gtk_font_chooser_get_font_family
        gtk_font_chooser_get_font_face
        gtk_font_chooser_get_font
        gtk_font_chooser_get_font_desc
        gtk_font_chooser_get_font_map
        gtk_frame_get_label
        gtk_gesture_get_device
        gtk_gesture_get_window
        gtk_gl_area_get_error
        gtk_header_bar_get_title
        gtk_header_bar_get_subtitle
        gtk_header_bar_get_custom_title
        gtk_icon_info_get_filename
        gtk_icon_view_get_path_at_pos
        gtk_icon_view_get_model
        gtk_image_get_pixbuf
        gtk_image_get_animation
        gtk_label_get_mnemonic_widget
        gtk_label_get_attributes
        gtk_check_version
        gtk_menu_button_get_popup
        gtk_menu_button_get_menu_model
        gtk_menu_button_get_align_widget
        gtk_menu_button_get_popover
        gtk_menu_item_get_submenu
        gtk_menu_item_get_accel_path
        gtk_native_dialog_get_title
        gtk_native_dialog_get_transient_for
        gtk_notebook_get_nth_page
        gtk_notebook_get_tab_label_text
        gtk_notebook_get_menu_label
        gtk_notebook_get_menu_label_text
        gtk_notebook_get_group_name
        gtk_notebook_get_action_widget
        gtk_offscreen_window_get_surface
        gtk_offscreen_window_get_pixbuf
        gtk_paned_get_child1
        gtk_paned_get_child2
        gtk_places_sidebar_get_location
        gtk_places_sidebar_get_nth_bookmark
        gtk_plug_get_socket_window
        gtk_popover_get_default_widget
        gtk_progress_bar_get_text
        gtk_recent_filter_get_name
        gtk_recent_manager_lookup_item
        gtk_settings_get_default
        gtk_socket_get_plug_window
        gtk_stack_sidebar_get_stack
        gtk_stack_switcher_get_stack
        gtk_style_context_get_section
        gtk_style_context_get_parent
        gtk_style_context_get_frame_clock
        gtk_test_find_widget
        gtk_text_buffer_get_mark
        gtk_text_tag_table_lookup
        gtk_text_view_get_tabs
        gtk_text_view_toggle_cursor_visible
        gtk_text_view_get_window
        gtk_toolbar_get_nth_item
        gtk_tool_button_get_label
        gtk_tool_button_get_icon_name
        gtk_tool_button_get_label_widget
        gtk_tool_button_get_icon_widget
        gtk_tool_palette_get_drop_item
        gtk_tool_palette_get_drop_group
        gtk_tree_model_filter_convert_child_path_to_path
        gtk_tree_model_filter_convert_path_to_child_path
        gtk_tree_model_sort_convert_child_path_to_path
        gtk_tree_model_sort_convert_path_to_child_path
        gtk_tree_view_get_column
        gtk_tree_view_get_bin_window
        gtk_tree_view_column_get_widget
        gtk_tree_view_column_get_tree_view
        gtk_widget_get_frame_clock
        gtk_window_group_get_current_device_grab
        GtkTextBufferSerializeFunc
      496f0892
  14. 09 Dec, 2015 1 commit
  15. 02 Dec, 2015 1 commit
    • Benjamin Otte's avatar
      css: Introduct -gtk-icon-palette · 7fa37e4b
      Benjamin Otte authored
      This borrows heavily from the CSS4 fonts draft's font-palette, currently
      found at https://drafts.csswg.org/css-fonts-4/#font-palette-control
      
      The palette is mainly meant to trigger invalidations when colors used for
      symbolic icons change, to potentially allow extending supported colors
      in symbolic icons and to recolor all colors of a symbolic icon, not just
      the main one.
      
      The syntax for the property goes like this:
      Name:        -gtk-icon-palette
      Value:       default | name <color> [ , name <color> ]*
      Initial:     default
      Applies to:  all elements with icons
      Inherited:   yes
      Animatable:  yes, each color animated separately
      
      The property defines a list of named colors to be used when looking up
      icons. If a name is not defined, the value of the current "color"
      property is used. Which names are relevant depends on the icons in use.
      Currently symbolic icons make use of the names "success", "warning" and
      "error".
      
      "default" is the current behavior of the GTK when coloring symbolic
      icons and is equal to the string
        success @success_color, warning @warning_color, error @error_color
      
      Animation is crudely implemented by animating colors that are in both
      palettes that are animated and otherwise keeping the color from the
      palette that defined it. Note that this can cause a sharp cut at the
      beginning or end of the animation when the color goes away and will
      therefore be replaced with the color property.
      
      You can see an example of animations at
      http://gfycat.com/CautiousPeacefulIaerismetalmark
      7fa37e4b
  16. 04 Nov, 2015 1 commit
    • Emmanuele Bassi's avatar
      docs: Point at for_scale() variants · c1ecd1ef
      Emmanuele Bassi authored
      Using lookup_icon() and lookup_by_gicon() with a size multiplied by a
      scaling factor is almost certainly going to get worse results than using
      their for_scale() variants.
      c1ecd1ef
  17. 28 Oct, 2015 1 commit
  18. 27 Oct, 2015 1 commit
    • Matthias Clasen's avatar
      icon theme: Ensure to propagate an error · 270e900f
      Matthias Clasen authored
      If the svg pixbuf loader is not available, we end up with criticals
      from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
      returns NULL without setting an error.
      
      Avoid this by propagating the load error.
      270e900f
  19. 17 Jul, 2015 1 commit
  20. 12 Jun, 2015 1 commit
  21. 02 Jun, 2015 1 commit
  22. 23 Feb, 2015 3 commits
  23. 31 Jan, 2015 1 commit
  24. 08 Dec, 2014 1 commit
  25. 03 Nov, 2014 1 commit
  26. 21 Sep, 2014 2 commits
    • Matthias Clasen's avatar
      GtkIconTheme: Repair symbolic fallback with rtl/ltr · 964c202c
      Matthias Clasen authored
      For symbolic icons, we prefer symbolics in inherited themes over
      generic icons in the theme itself. So far this was implemented
      by looking at icon_name[0] and looking that up in inherited themes
      if it is symbolic. But with automatic rtl/ltr handling, the first
      icon  name will always have an -rtl or -ltr suffix, and an icon
      with that suffix is not going to exist in most cases. To fix this,
      look for shorter icon names too, as long as they are still symbolic.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=737000
      964c202c
    • Matthias Clasen's avatar
      Trivial: clarify a comment · 1b858e42
      Matthias Clasen authored
      Using 'highcolor' here seems confusing, since there is a theme
      by that name. Just say full-color.
      1b858e42
  27. 05 Sep, 2014 1 commit
  28. 12 Aug, 2014 1 commit
    • Alexander Larsson's avatar
      Change way alpha is used when recoloring symbolics · afeb5000
      Alexander Larsson authored
      If the foreground color has an alpha != 1 we used to just pass that into
      the svg. This is useful to e.g. render an insensitive icon. However,
      that is not an ideal model for symbolics. For instance, if the icon uses
      overlapping areas when drawing, expecting these to be opaque then the
      transparent color will result in a different alpha value for the overlapping
      area. Also, non-foreground symbolic colors are still rendered opaque, and
      the recoloring of pngs can't handle transparent colors.
      
      So, instead we extract any alpha from the foreground, render using the
      opaque colors and then apply the foreground alpha to the entire result.
      This means we get an even transparency, even for other colors, and we
      can apply alpha for the pngs too.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=734668
      afeb5000
  29. 03 Aug, 2014 1 commit
  30. 17 Jul, 2014 1 commit
    • Matthias Clasen's avatar
      GtkIconTheme: Make spinners scale in hi-dpi · f3ef3165
      Matthias Clasen authored
      The Adwaita icon theme ships spinners in a scalable directory
      with MaxSize=32 and Scale=1. One way to make them scale up in
      hi-dpi would be to add an @2 directory with MaxSize=32 and Scale=2,
      but that directory would also be consulted in non hi-dpi situations
      and give us an effective spinner max size of 64.
      
      Instead, treat svg icons implicitly as hi-dpi, and scale them
      up to MaxSize * 2 when in hi-dpi.
      f3ef3165
  31. 15 Jul, 2014 1 commit
  32. 14 Jul, 2014 1 commit
    • Matthias Clasen's avatar
      GktIconTheme: Be more careful with paths · 5a252f13
      Matthias Clasen authored
      Slapping file:// in front of a path does not guarantee a working
      uri (e.g. if you are on windows and the path looks like F:\\...).
      Therefore, go back to using g_file_new_for_path if we don't have
      to deal with a resource.
      5a252f13
  33. 10 Jul, 2014 2 commits
  34. 09 Jul, 2014 1 commit