Opened 9 years ago

Closed 8 years ago

#4010 closed defect (fixed)

Theme: check why not all stock icons are available

Reported by: erikos Owned by: manuq
Priority: Normal Milestone: Unspecified
Component: Sugar Version: 0.97.x
Severity: Major Keywords: 13.1.0, theme, regression, r?
Cc: erikos Distribution/OS: OLPC
Bug Status: Unconfirmed

Description

The Gtk.STOCK_CANCEL stock icon is mapped to the Sugar one, the Gtk.STOCK_OK icon is not. See #3971 for more diagnosis.

Attachments (3)

0001-Revert-AP-password-dialog-theme-the-ok-button-correc.patch (1.6 KB) - added by manuq 8 years ago.
Patch for shell that reverts the workaround made in #3971
test-stock-icons.py (1.4 KB) - added by manuq 8 years ago.
Testcase script.
0001-Action-icons-add-gtk-ok.svg-as-a-symbolic-link-of-di.patch (1.3 KB) - added by manuq 8 years ago.
Artwork patch.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by erikos

  • Owner changed from erikos to manuq
  • Status changed from new to assigned

comment:2 Changed 8 years ago by manuq

  • Keywords 13.1.0 theme added

comment:3 Changed 8 years ago by manuq

  • Keywords regression added

Changed 8 years ago by manuq

Patch for shell that reverts the workaround made in #3971

Changed 8 years ago by manuq

Testcase script.

Changed 8 years ago by manuq

Artwork patch.

comment:4 Changed 8 years ago by manuq

  • Cc erikos added
  • Keywords r? added
  • Milestone changed from 0.98 to 1.0

We are missing gtk-ok.svg . The stock icons are named by convention with the same name as the stock id [1]. For Gtk.STOCK_OK it is 'gtk-ok' [2].

[1] http://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html#gtk3-Stock-Items.description
[2] http://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html#GTK-STOCK-OK:CAPS

We can add gtk-ok.svg as a symbolic link to dialog-ok.svg . The same is for gtk-cancel.svg, it is a symbolic link to dialog-cancel.svg . The attached patch for artwork does so.

Unlike gtk-cancel, we have to do the link manually in the Makefile. The gtk-cancel link is done by the utility icon-naming-utils, a dependency of sugar-artwork. It provides various aliases for
backwards compatibility. In /usr/share/icon-naming-utils/legacy-icon-mapping.xml there is an entry
for dialog-cancel:

        <icon name="dialog-cancel">
            <link>gtk-cancel</link>
            <link>button_cancel</link>
            <link>cancel</link>
        </icon>

But there is no entry for dialog-ok.

The confusion in #3971 was that the icon theme is not updated after we copy the svg file to the corresponding directory. We need to touch the directory for that to happen:

sudo touch /usr/share/icons/sugar/

After that the icon appears. The attached testcase will tell if the custom icon is found or not. Run it from a sugar shell, like from Terminal activity.

The change made in #3971 can be reverted after this fix. I attach a revert patch too.

comment:5 Changed 8 years ago by dnarvaez

  • Component changed from sugar-artwork to Sugar

comment:6 Changed 8 years ago by dnarvaez

  • Milestone changed from 1.0 to Unspecified

comment:7 Changed 8 years ago by dnarvaez

  • Bug Status changed from Assigned to Unconfirmed

comment:9 Changed 8 years ago by Manuel Quiñones

  • Resolution set to fixed
  • Status changed from assigned to closed

Action icons: add gtk-ok.svg as a symbolic link of dialog-ok.svg

The icon-naming-utils utility doesn't take care of this alias, so we
do the symbolic link in the Makefile. The alias is needed for stock
icons with Gtk.STOCK_OK id.

Fixes #4010 .

Changeset: 5fa78429076c8cd6272645b2c9dfe0fbf7cc9fb2

Note: See TracTickets for help on using tickets.