Merge lp://staging/~ballogy/indicator-session/better-fallback-icon into lp://staging/indicator-session/13.04

Proposed by Balló György
Status: Work in progress
Proposed branch: lp://staging/~ballogy/indicator-session/better-fallback-icon
Merge into: lp://staging/indicator-session/13.04
Diff against target: 65 lines (+5/-22)
1 file modified
src/indicator-session.c (+5/-22)
To merge this branch: bzr merge lp://staging/~ballogy/indicator-session/better-fallback-icon
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Needs Information
Mathieu Trudel-Lapierre Needs Fixing
Review via email: mp+141608@code.staging.launchpad.net

Description of the change

This change reverts the commit 358 [1], and provides a better and simpler fallback icon handling.

Instead of monitoring theme changes and use a hard-coded "gtk-missing-image" as fallback, use g_themed_icon_new_with_default_fallbacks (). The gtk-missing-image is too generic, however, there is a "system" icon available in the gnome-icon-theme, which is a more appropriate icon.

[1] http://bazaar.launchpad.net/~indicator-applet-developers/indicator-session/trunk.13.04/revision/358

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This would break bug https://bugs.launchpad.net/indicator-appmenu/+bug/1088778 again; in the way that all g_themed_icon_new_with_default_fallbacks() does is shorten the name at dashes until it finds a match; but doesn't take into account the cases where there are none -- which should still be gtk_missing_icon.

review: Needs Fixing
Revision history for this message
Lars Karlitski (larsu) wrote :

This patch fixes two unrelated things:

(1) Revert r358, which doesn't seem to be necessary anymore. At least I cannot reproduce bug #1048348 when reverting r358: the "missing" icon is shown for all themes that don't have system-devices-panel. The icon is also properly updated when the theme changes. Maybe this was an issue in GtkImage that has since been fixed?

(2) Specifiy that the default icon fallbacks ("system-devices-panel", "system-devices", "system") should be used, so that themes that don't have "system-devices-panel" fall back to "system".

I like both changes, but would appreciate someone else confirming (1) before this gets merged.

Sorry for misleading you last Friday, Mathieu. I didn't have enough time to look at this in detail.

review: Needs Information
Revision history for this message
Peter Hurley (phurley) wrote :

> (2) Specifiy that the default icon fallbacks ("system-devices-panel", "system-
> devices", "system") should be used, so that themes that don't have "system-
> devices-panel" fall back to "system".

Some themes (including HighContrast, which makes this an accessibility issue) do not have default fallbacks from "system-devices-panel".

Revision history for this message
Lars Karlitski (larsu) wrote :

> Some themes (including HighContrast, which makes this an accessibility issue)
> do not have default fallbacks from "system-devices-panel".

Right, but this is unrelated to this patch: in HighContrast, the missing icon is shown both with and without this patch.

I suggest opening a bug agains gnome-accessibility-themes or making HighContrast fall back to Humanity (as suggested by seb128 at [1]).

[1] https://bugs.launchpad.net/unity/+bug/975563/comments/2

Revision history for this message
Peter Hurley (phurley) wrote :

> > Some themes (including HighContrast, which makes this an accessibility
> issue)
> > do not have default fallbacks from "system-devices-panel".
>
> Right, but this is unrelated to this patch: in HighContrast, the missing icon
> is shown both with and without this patch.

This branch is called 'better-fallback-icon' specifically because it proposes to fix bug #975563 by showing a better icon than 'gtk-missing-icon'. My comment notes that this branch does not fix that because there is no fallback icon.

> I suggest opening a bug agains gnome-accessibility-themes or making
> HighContrast fall back to Humanity (as suggested by seb128 at [1]).
>
> [1] https://bugs.launchpad.net/unity/+bug/975563/comments/2

Have a look at https://code.launchpad.net/~phurley/indicator-session/lp-957563
before pushing this off into some other package.

Revision history for this message
Balló György (ballogy) wrote :

I confirm that my patch tries to solve two things.

1. In my experience the indicator_session_update_icon_callback() is not needed, because the icon gets updated correctly on theme change.

2. I think that "system" is a generic enough name, and should be provided by every theme. And most of icon themes inherit the gnome-icon-theme, including the HighContrast icon theme[1], so it should not be a problem.

However, I think the best solution would be to use similar icon names as they called in gnome-icon-theme-symbolic (as it was reported[2]), so:
- "system-devices-panel" would be "system-shutdown-symbolic"
- "system-devices-panel-information" would be "system-shutdown-symbolic-information"
- "system-devices-panel-alert" would be "system-shutdown-symbolic-alert"

This would provides the best fallback names for all themes:
- GNOME Symbolic falls back to "system-shutdown-symbolic"
- GNOME, HighContrast and Humanity falls back to "system-shutdown"

[1] http://git.gnome.org/browse/gnome-themes-standard/tree/themes/HighContrast/icons/index.theme.in
[2] https://bugs.launchpad.net/indicator-session/+bug/903819

Unmerged revisions

381. By Balló György

Improve fallback icon handling

Instead of monitoring theme changes and use a
hard-coded "gtk-missing-image", use
g_themed_icon_new_with_default_fallbacks () to get a proper fallback
icon (e.g. "system").

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches