Simplify icon handling a bit.

When implementing bug 765359, it appears that Geary is doing too much
work to load icons. Simplify it a bit.

* src/client/components/icon-factory.vala (IconFactory): Don't bother
  loading an application icon, it's easier and works better to just use
  an icon name where needed. Don't bother adding all of the icons/*x*
  directories to the icon theme search path, just make the icon's
  directory hierarchy follow the XDG/hicolor spec and add the base
  directory. Remove now-redundant code.

* src/client/application/geary-controller.vala: Set the default icon name
  for all geary windows.
  (GearyController:on_about()): Set the name for the icon in the About
  dialog.

* src/client/components/main-window.vala (ApplicationWindow): Don't
  bother loading icons for the window, just use the new default.

* src/client/notification/libnotify.vala: Don't bother passing the
  application icon through for error notifications, an icon name has
  already been set.

* icons/*x*/geary.png: Move to a new directory hierarchy that follows the
  hicolor spec.

* icons/CMakeLists.txt: Updated to use new paths to the icons.
This commit is contained in:
Michael James Gratton 2016-04-27 11:56:25 +10:00 committed by Adam Dingle
parent 38d628e49f
commit d33e3e7229
12 changed files with 25 additions and 64 deletions

View file

@ -27,13 +27,13 @@ set(ICON_FILES
install(FILES ${ICON_FILES} DESTINATION ${ICONS_DEST})
# Application icon goes in theme directory
install(FILES "16x16/geary.png" DESTINATION share/icons/hicolor/16x16/apps)
install(FILES "24x24/geary.png" DESTINATION share/icons/hicolor/24x24/apps)
install(FILES "32x32/geary.png" DESTINATION share/icons/hicolor/32x32/apps)
install(FILES "48x48/geary.png" DESTINATION share/icons/hicolor/48x48/apps)
install(FILES "256x256/geary.png" DESTINATION share/icons/hicolor/256x256/apps)
install(FILES "512x512/geary.png" DESTINATION share/icons/hicolor/512x512/apps)
install(FILES "geary-symbolic.svg" DESTINATION share/icons/hicolor/symbolic/apps)
install(FILES "hicolor/16x16/apps/geary.png" DESTINATION share/icons/hicolor/16x16/apps)
install(FILES "hicolor/24x24/apps/geary.png" DESTINATION share/icons/hicolor/24x24/apps)
install(FILES "hicolor/32x32/apps/geary.png" DESTINATION share/icons/hicolor/32x32/apps)
install(FILES "hicolor/48x48/apps/geary.png" DESTINATION share/icons/hicolor/48x48/apps)
install(FILES "hicolor/256x256/apps/geary.png" DESTINATION share/icons/hicolor/256x256/apps)
install(FILES "hicolor/512x512/apps/geary.png" DESTINATION share/icons/hicolor/512x512/apps)
install(FILES "hicolor/symbolic/apps/geary-symbolic.svg" DESTINATION share/icons/hicolor/symbolic/apps)
# Optional: update icon cache at install time.
if (ICON_UPDATE)

View file

Before

Width:  |  Height:  |  Size: 742 B

After

Width:  |  Height:  |  Size: 742 B

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Before After
Before After