Skip to content

Commit

Permalink
Fixup of Icon handling in Blueman
Browse files Browse the repository at this point in the history
* Adding additional status icons for all resolutions
* Changing Icon path to use a more icon themes friendly /usr/share/icons/hicolor dir
to store all icons instead of pkgdatadir specific icon folder
* Reverted icon names back to blueman-foo.png to resolve file name conflicts with gnome-bluetooth
  • Loading branch information
HarveyMittens committed Aug 8, 2014
1 parent ad15507 commit d1772f6
Show file tree
Hide file tree
Showing 81 changed files with 179 additions and 26 deletions.
2 changes: 1 addition & 1 deletion blueman/Constants.py.in
Expand Up @@ -3,7 +3,7 @@ PACKAGE="@PACKAGE@"
WEBSITE="https://github.com/blueman-project/blueman"
PREFIX="@prefix@"
BIN_DIR="@BINDIR@"
ICON_PATH = "@pkgdatadir@/icons"
ICON_PATH = "@icondir@"
UI_PATH = "@pkgdatadir@/ui"
OBEX_BROWSE_AVAILABLE = True
DHCP_CONFIG_FILE = "@dhconfig@"
Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/applet/AppIndicator.py
Expand Up @@ -30,7 +30,7 @@

class AppIndicator(AppletPlugin):
__description__ = _("Uses libappindicator to show a statusicon")
__icon__ = "bluetooth"
__icon__ = "blueman"
__author__ = "Walmis"
__depends__ = ["StatusIcon", "Menu"]

Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/applet/PowerManager.py
Expand Up @@ -217,7 +217,7 @@ def on_status_icon_query_icon(self):

#return pixbuf
if not self.GetBluetoothStatus():
return ("bluetooth-disabled", "bluetooth-disabled")
return ("blueman-disabled", "blueman-disabled")

def on_adapter_added(self, path):
adapter = Bluez.Adapter(path)
Expand Down
4 changes: 2 additions & 2 deletions blueman/plugins/applet/ShowConnected.py
Expand Up @@ -10,7 +10,7 @@
class ShowConnected(AppletPlugin):
__author__ = "Walmis"
__depends__ = ["StatusIcon"]
__icon__ = "bluetooth-active"
__icon__ = "blueman-active"
__description__ = _(
"Adds an indication on the status icon when Bluetooth is active and shows the number of connections in the tooltip.")

Expand Down Expand Up @@ -38,7 +38,7 @@ def on_status_icon_query_icon(self):
# [(x, pixbuf.props.height - x_size, 0, 255)])
#
# return pixbuf
return ("bluetooth-active",)
return ("blueman-active",)
else:
self.active = False

Expand Down
2 changes: 1 addition & 1 deletion blueman/plugins/applet/StatusIcon.py
Expand Up @@ -7,7 +7,7 @@

class StatusIcon(AppletPlugin, Gtk.StatusIcon):
__unloadable__ = False
__icon__ = "bluetooth"
__icon__ = "blueman"

def on_entry_changed(self, entry, ic, image):

Expand Down
20 changes: 20 additions & 0 deletions configure.ac
Expand Up @@ -85,6 +85,9 @@ AC_SUBST(prefix)
pkgdatadir="${DATADIR}/${PACKAGE}"
AC_SUBST(pkgdatadir)

icondir="${DATADIR}/icons"
AC_SUBST(icondir)

AS_AC_EXPAND(LOCALEDIR, $datarootdir/locale)
AC_SUBST(LOCALEDIR)

Expand Down Expand Up @@ -188,12 +191,29 @@ data/icons/hicolor/16x16/Makefile
data/icons/hicolor/16x16/actions/Makefile
data/icons/hicolor/16x16/devices/Makefile
data/icons/hicolor/16x16/status/Makefile
data/icons/hicolor/22x22/Makefile
data/icons/hicolor/22x22/status/Makefile
data/icons/hicolor/24x24/Makefile
data/icons/hicolor/24x24/status/Makefile
data/icons/hicolor/32x32/Makefile
data/icons/hicolor/32x32/actions/Makefile
data/icons/hicolor/32x32/status/Makefile
data/icons/hicolor/48x48/Makefile
data/icons/hicolor/48x48/actions/Makefile
data/icons/hicolor/48x48/devices/Makefile
data/icons/hicolor/48x48/status/Makefile
data/icons/hicolor/64x64/Makefile
data/icons/hicolor/64x64/status/Makefile
data/icons/hicolor/72x72/Makefile
data/icons/hicolor/72x72/status/Makefile
data/icons/hicolor/96x96/Makefile
data/icons/hicolor/96x96/status/Makefile
data/icons/hicolor/128x128/Makefile
data/icons/hicolor/128x128/status/Makefile
data/icons/hicolor/192x192/Makefile
data/icons/hicolor/192x192/status/Makefile
data/icons/hicolor/256x256/Makefile
data/icons/hicolor/256x256/status/Makefile
data/icons/hicolor/scalable/Makefile
data/icons/hicolor/scalable/devices/Makefile
data/icons/hicolor/scalable/actions/Makefile
Expand Down
2 changes: 2 additions & 0 deletions data/icons/hicolor/128x128/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/128x128/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 128x128
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/hicolor/128x128/status/blueman.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/icons/hicolor/16x16/actions/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 16x16
context = actions

Expand Down
2 changes: 1 addition & 1 deletion data/icons/hicolor/16x16/devices/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 16x16
context = devices

Expand Down
8 changes: 4 additions & 4 deletions data/icons/hicolor/16x16/status/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 16x16
context = status

Expand All @@ -9,8 +9,8 @@ icons_DATA = \
blueman-down-inactive.png \
blueman-up-active.png \
blueman-up-inactive.png \
bluetooth-active.png \
bluetooth-disabled.png \
bluetooth.png
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Empty file modified data/icons/hicolor/16x16/status/blueman-down-active.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/icons/hicolor/16x16/status/blueman-down-inactive.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/icons/hicolor/16x16/status/blueman-up-active.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified data/icons/hicolor/16x16/status/blueman-up-inactive.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/icons/hicolor/192x192/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/192x192/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 192x192
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/hicolor/192x192/status/blueman.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/icons/hicolor/22x22/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/22x22/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 22x22
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/hicolor/22x22/status/blueman.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/icons/hicolor/24x24/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/24x24/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 24x24
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/hicolor/24x24/status/blueman.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/icons/hicolor/256x256/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/256x256/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 256x256
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/hicolor/256x256/status/blueman.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion data/icons/hicolor/32x32/Makefile.am
@@ -1,2 +1,3 @@
SUBDIRS = \
actions
actions \
status
2 changes: 1 addition & 1 deletion data/icons/hicolor/32x32/actions/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 32x32
context = actions

Expand Down
12 changes: 12 additions & 0 deletions data/icons/hicolor/32x32/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 32x32
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/icons/hicolor/32x32/status/blueman.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion data/icons/hicolor/48x48/actions/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 48x48
context = actions

Expand Down
2 changes: 1 addition & 1 deletion data/icons/hicolor/48x48/devices/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 48x48
context = devices

Expand Down
8 changes: 4 additions & 4 deletions data/icons/hicolor/48x48/status/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = 48x48
context = status

Expand Down Expand Up @@ -35,8 +35,8 @@ icons_DATA = \
blueman-tpl-80.png \
blueman-tpl-90.png \
blueman-tpl-100.png \
bluetooth-active.png \
bluetooth-disabled.png \
bluetooth.png
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
2 changes: 2 additions & 0 deletions data/icons/hicolor/64x64/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/64x64/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 64x64
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Binary file added data/icons/hicolor/64x64/status/blueman.png
2 changes: 2 additions & 0 deletions data/icons/hicolor/72x72/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/72x72/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 72x72
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Binary file added data/icons/hicolor/72x72/status/blueman.png
2 changes: 2 additions & 0 deletions data/icons/hicolor/96x96/Makefile.am
@@ -0,0 +1,2 @@
SUBDIRS = \
status
12 changes: 12 additions & 0 deletions data/icons/hicolor/96x96/status/Makefile.am
@@ -0,0 +1,12 @@
themedir = $(icondir)/hicolor
size = 96x96
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = \
blueman-active.png \
blueman-disabled.png \
blueman.png

EXTRA_DIST = $(icons_DATA)
Binary file added data/icons/hicolor/96x96/status/blueman.png
12 changes: 10 additions & 2 deletions data/icons/hicolor/Makefile.am
@@ -1,10 +1,18 @@
SUBDIRS = \
scalable \
16x16 \
22x22 \
24x24 \
32x32 \
48x48
48x48 \
64x64 \
72x72 \
96x96 \
128x128 \
192x192 \
256x256

gtk_update_icon_cache = gtk-update-icon-cache -f -t $(pkgdatadir)/icons/hicolor
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(icondir)/hicolor

install-data-hook: update-icon-cache
uninstall-hook: update-icon-cache
Expand Down
2 changes: 1 addition & 1 deletion data/icons/hicolor/scalable/actions/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = scalable
context = actions

Expand Down
2 changes: 1 addition & 1 deletion data/icons/hicolor/scalable/devices/Makefile.am
@@ -1,4 +1,4 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = scalable
context = devices

Expand Down
4 changes: 2 additions & 2 deletions data/icons/hicolor/scalable/status/Makefile.am
@@ -1,9 +1,9 @@
themedir = $(pkgdatadir)/icons/hicolor
themedir = $(icondir)/hicolor
size = scalable
context = status

iconsdir = $(themedir)/$(size)/$(context)

icons_DATA = bluetooth-active.svg bluetooth-disabled.svg bluetooth.svg
icons_DATA = blueman-active.png blueman-disabled.png blueman.svg

EXTRA_DIST = $(icons_DATA)

0 comments on commit d1772f6

Please sign in to comment.