[gnome-power-manager: 1/3] Use the battery names from the shared-icon-specification
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager: 1/3] Use the battery names from the shared-icon-specification
- Date: Fri, 30 Apr 2010 12:56:17 +0000 (UTC)
commit 52821a4b944a69a6eaca420ecce1f9e65ebd6891
Author: Richard Hughes <richard hughsie com>
Date: Wed Mar 31 21:52:29 2010 +0100
Use the battery names from the shared-icon-specification
data/icons/16x16/status/Makefile.am | 25 +-
...0-charging.png => battery-caution-charging.png} | Bin 800 -> 800 bytes
.../{gpm-battery-000.png => battery-caution.png} | Bin 567 -> 567 bytes
.../{gpm-battery-empty.png => battery-empty.png} | Bin 501 -> 501 bytes
...-100-charging.png => battery-full-charging.png} | Bin 818 -> 818 bytes
.../{gpm-battery-100.png => battery-full.png} | Bin 591 -> 591 bytes
...-060-charging.png => battery-good-charging.png} | Bin 804 -> 804 bytes
.../{gpm-battery-060.png => battery-good.png} | Bin 595 -> 595 bytes
...y-020-charging.png => battery-low-charging.png} | Bin 804 -> 804 bytes
.../{gpm-battery-020.png => battery-low.png} | Bin 600 -> 600 bytes
...gpm-battery-missing.png => battery-missing.png} | Bin 603 -> 603 bytes
.../16x16/status/gpm-battery-040-charging.png | Bin 814 -> 0 bytes
data/icons/16x16/status/gpm-battery-040.png | Bin 635 -> 0 bytes
.../16x16/status/gpm-battery-080-charging.png | Bin 808 -> 0 bytes
data/icons/16x16/status/gpm-battery-080.png | Bin 607 -> 0 bytes
data/icons/16x16/status/gpm-battery-charged.png | Bin 754 -> 0 bytes
data/icons/22x22/status/Makefile.am | 25 +-
...0-charging.png => battery-caution-charging.png} | Bin 1132 -> 1132 bytes
.../{gpm-battery-000.png => battery-caution.png} | Bin 717 -> 717 bytes
.../{gpm-battery-empty.png => battery-empty.png} | Bin 641 -> 641 bytes
...-100-charging.png => battery-full-charging.png} | Bin 1131 -> 1131 bytes
.../{gpm-battery-100.png => battery-full.png} | Bin 721 -> 721 bytes
...-060-charging.png => battery-good-charging.png} | Bin 1138 -> 1138 bytes
.../{gpm-battery-060.png => battery-good.png} | Bin 752 -> 752 bytes
...y-020-charging.png => battery-low-charging.png} | Bin 1135 -> 1135 bytes
.../{gpm-battery-020.png => battery-low.png} | Bin 715 -> 715 bytes
...gpm-battery-missing.png => battery-missing.png} | Bin 799 -> 799 bytes
.../22x22/status/gpm-battery-040-charging.png | Bin 1126 -> 0 bytes
data/icons/22x22/status/gpm-battery-040.png | Bin 747 -> 0 bytes
.../22x22/status/gpm-battery-080-charging.png | Bin 1149 -> 0 bytes
data/icons/22x22/status/gpm-battery-080.png | Bin 751 -> 0 bytes
data/icons/22x22/status/gpm-battery-charged.png | Bin 1053 -> 0 bytes
data/icons/24x24/status/Makefile.am | 25 +-
...0-charging.png => battery-caution-charging.png} | Bin 1152 -> 1152 bytes
.../{gpm-battery-000.png => battery-caution.png} | Bin 747 -> 747 bytes
.../{gpm-battery-empty.png => battery-empty.png} | Bin 669 -> 669 bytes
...-100-charging.png => battery-full-charging.png} | Bin 1155 -> 1155 bytes
.../{gpm-battery-100.png => battery-full.png} | Bin 749 -> 749 bytes
...-060-charging.png => battery-good-charging.png} | Bin 1162 -> 1162 bytes
.../{gpm-battery-060.png => battery-good.png} | Bin 783 -> 783 bytes
...y-020-charging.png => battery-low-charging.png} | Bin 1151 -> 1151 bytes
.../{gpm-battery-020.png => battery-low.png} | Bin 751 -> 751 bytes
...gpm-battery-missing.png => battery-missing.png} | Bin 833 -> 833 bytes
.../24x24/status/gpm-battery-040-charging.png | Bin 1153 -> 0 bytes
data/icons/24x24/status/gpm-battery-040.png | Bin 778 -> 0 bytes
.../24x24/status/gpm-battery-080-charging.png | Bin 1174 -> 0 bytes
data/icons/24x24/status/gpm-battery-080.png | Bin 783 -> 0 bytes
data/icons/24x24/status/gpm-battery-charged.png | Bin 1121 -> 0 bytes
data/icons/32x32/status/Makefile.am | 25 +-
...0-charging.png => battery-caution-charging.png} | Bin 2388 -> 2388 bytes
.../{gpm-battery-000.png => battery-caution.png} | Bin 1485 -> 1485 bytes
.../{gpm-battery-empty.png => battery-empty.png} | Bin 1311 -> 1311 bytes
...-100-charging.png => battery-full-charging.png} | Bin 2364 -> 2364 bytes
.../{gpm-battery-100.png => battery-full.png} | Bin 1311 -> 1311 bytes
...-060-charging.png => battery-good-charging.png} | Bin 2475 -> 2475 bytes
.../{gpm-battery-060.png => battery-good.png} | Bin 1509 -> 1509 bytes
...y-020-charging.png => battery-low-charging.png} | Bin 2438 -> 2438 bytes
.../{gpm-battery-020.png => battery-low.png} | Bin 1516 -> 1516 bytes
...gpm-battery-missing.png => battery-missing.png} | Bin 1662 -> 1662 bytes
.../32x32/status/gpm-battery-040-charging.png | Bin 2461 -> 0 bytes
data/icons/32x32/status/gpm-battery-040.png | Bin 1522 -> 0 bytes
.../32x32/status/gpm-battery-080-charging.png | Bin 2471 -> 0 bytes
data/icons/32x32/status/gpm-battery-080.png | Bin 1441 -> 0 bytes
data/icons/32x32/status/gpm-battery-charged.png | Bin 2257 -> 0 bytes
data/icons/48x48/status/Makefile.am | 25 +-
...0-charging.png => battery-caution-charging.png} | Bin 4134 -> 4134 bytes
.../{gpm-battery-000.png => battery-caution.png} | Bin 2419 -> 2419 bytes
.../{gpm-battery-empty.png => battery-empty.png} | Bin 2129 -> 2129 bytes
...-100-charging.png => battery-full-charging.png} | Bin 4055 -> 4055 bytes
.../{gpm-battery-100.png => battery-full.png} | Bin 2244 -> 2244 bytes
...-060-charging.png => battery-good-charging.png} | Bin 4169 -> 4169 bytes
.../{gpm-battery-060.png => battery-good.png} | Bin 2484 -> 2484 bytes
...y-020-charging.png => battery-low-charging.png} | Bin 4155 -> 4155 bytes
.../{gpm-battery-020.png => battery-low.png} | Bin 2493 -> 2493 bytes
...gpm-battery-missing.png => battery-missing.png} | Bin 2258 -> 2258 bytes
.../48x48/status/gpm-battery-040-charging.png | Bin 4189 -> 0 bytes
data/icons/48x48/status/gpm-battery-040.png | Bin 2544 -> 0 bytes
.../48x48/status/gpm-battery-080-charging.png | Bin 4245 -> 0 bytes
data/icons/48x48/status/gpm-battery-080.png | Bin 2452 -> 0 bytes
data/icons/48x48/status/gpm-battery-charged.png | Bin 3712 -> 0 bytes
data/icons/scalable/status/Makefile.am | 25 +-
...0-charging.svg => battery-caution-charging.svg} | 0
.../{gpm-battery-000.svg => battery-caution.svg} | 0
.../{gpm-battery-empty.svg => battery-empty.svg} | 4 +-
...-100-charging.svg => battery-full-charging.svg} | 0
.../{gpm-battery-100.svg => battery-full.svg} | 0
...-060-charging.svg => battery-good-charging.svg} | 0
.../{gpm-battery-060.svg => battery-good.svg} | 0
...y-020-charging.svg => battery-low-charging.svg} | 0
.../{gpm-battery-020.svg => battery-low.svg} | 0
...gpm-battery-missing.svg => battery-missing.svg} | 0
.../scalable/status/gpm-battery-040-charging.svg | 504 ---------------
data/icons/scalable/status/gpm-battery-040.svg | 279 --------
.../scalable/status/gpm-battery-080-charging.svg | 504 ---------------
data/icons/scalable/status/gpm-battery-080.svg | 279 --------
data/icons/scalable/status/gpm-battery-charged.svg | 673 --------------------
src/gpm-upower.c | 74 ++-
97 files changed, 102 insertions(+), 2365 deletions(-)
---
diff --git a/data/icons/16x16/status/Makefile.am b/data/icons/16x16/status/Makefile.am
index 38f48d1..595cb2c 100644
--- a/data/icons/16x16/status/Makefile.am
+++ b/data/icons/16x16/status/Makefile.am
@@ -33,21 +33,16 @@ icons_DATA = \
gpm-mouse-060.png \
gpm-mouse-080.png \
gpm-mouse-100.png \
- gpm-battery-000.png \
- gpm-battery-020.png \
- gpm-battery-040.png \
- gpm-battery-060.png \
- gpm-battery-080.png \
- gpm-battery-100.png \
- gpm-battery-000-charging.png \
- gpm-battery-020-charging.png \
- gpm-battery-040-charging.png \
- gpm-battery-060-charging.png \
- gpm-battery-080-charging.png \
- gpm-battery-100-charging.png \
- gpm-battery-missing.png \
- gpm-battery-charged.png \
- gpm-battery-empty.png \
+ battery-caution.png \
+ battery-low.png \
+ battery-good.png \
+ battery-full.png \
+ battery-caution-charging.png \
+ battery-low-charging.png \
+ battery-good-charging.png \
+ battery-full-charging.png \
+ battery-missing.png \
+ battery-empty.png \
gpm-ups-000.png \
gpm-ups-020.png \
gpm-ups-040.png \
diff --git a/data/icons/16x16/status/gpm-battery-000-charging.png b/data/icons/16x16/status/battery-caution-charging.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-000-charging.png
rename to data/icons/16x16/status/battery-caution-charging.png
diff --git a/data/icons/16x16/status/gpm-battery-000.png b/data/icons/16x16/status/battery-caution.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-000.png
rename to data/icons/16x16/status/battery-caution.png
diff --git a/data/icons/16x16/status/gpm-battery-empty.png b/data/icons/16x16/status/battery-empty.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-empty.png
rename to data/icons/16x16/status/battery-empty.png
diff --git a/data/icons/16x16/status/gpm-battery-100-charging.png b/data/icons/16x16/status/battery-full-charging.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-100-charging.png
rename to data/icons/16x16/status/battery-full-charging.png
diff --git a/data/icons/16x16/status/gpm-battery-100.png b/data/icons/16x16/status/battery-full.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-100.png
rename to data/icons/16x16/status/battery-full.png
diff --git a/data/icons/16x16/status/gpm-battery-060-charging.png b/data/icons/16x16/status/battery-good-charging.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-060-charging.png
rename to data/icons/16x16/status/battery-good-charging.png
diff --git a/data/icons/16x16/status/gpm-battery-060.png b/data/icons/16x16/status/battery-good.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-060.png
rename to data/icons/16x16/status/battery-good.png
diff --git a/data/icons/16x16/status/gpm-battery-020-charging.png b/data/icons/16x16/status/battery-low-charging.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-020-charging.png
rename to data/icons/16x16/status/battery-low-charging.png
diff --git a/data/icons/16x16/status/gpm-battery-020.png b/data/icons/16x16/status/battery-low.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-020.png
rename to data/icons/16x16/status/battery-low.png
diff --git a/data/icons/16x16/status/gpm-battery-missing.png b/data/icons/16x16/status/battery-missing.png
similarity index 100%
rename from data/icons/16x16/status/gpm-battery-missing.png
rename to data/icons/16x16/status/battery-missing.png
diff --git a/data/icons/22x22/status/Makefile.am b/data/icons/22x22/status/Makefile.am
index 1184c55..142237c 100644
--- a/data/icons/22x22/status/Makefile.am
+++ b/data/icons/22x22/status/Makefile.am
@@ -33,21 +33,16 @@ icons_DATA = \
gpm-mouse-060.png \
gpm-mouse-080.png \
gpm-mouse-100.png \
- gpm-battery-000.png \
- gpm-battery-020.png \
- gpm-battery-040.png \
- gpm-battery-060.png \
- gpm-battery-080.png \
- gpm-battery-100.png \
- gpm-battery-000-charging.png \
- gpm-battery-020-charging.png \
- gpm-battery-040-charging.png \
- gpm-battery-060-charging.png \
- gpm-battery-080-charging.png \
- gpm-battery-100-charging.png \
- gpm-battery-missing.png \
- gpm-battery-charged.png \
- gpm-battery-empty.png \
+ battery-caution.png \
+ battery-low.png \
+ battery-good.png \
+ battery-full.png \
+ battery-caution-charging.png \
+ battery-low-charging.png \
+ battery-good-charging.png \
+ battery-full-charging.png \
+ battery-missing.png \
+ battery-empty.png \
gpm-ups-000.png \
gpm-ups-020.png \
gpm-ups-040.png \
diff --git a/data/icons/22x22/status/gpm-battery-000-charging.png b/data/icons/22x22/status/battery-caution-charging.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-000-charging.png
rename to data/icons/22x22/status/battery-caution-charging.png
diff --git a/data/icons/22x22/status/gpm-battery-000.png b/data/icons/22x22/status/battery-caution.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-000.png
rename to data/icons/22x22/status/battery-caution.png
diff --git a/data/icons/22x22/status/gpm-battery-empty.png b/data/icons/22x22/status/battery-empty.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-empty.png
rename to data/icons/22x22/status/battery-empty.png
diff --git a/data/icons/22x22/status/gpm-battery-100-charging.png b/data/icons/22x22/status/battery-full-charging.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-100-charging.png
rename to data/icons/22x22/status/battery-full-charging.png
diff --git a/data/icons/22x22/status/gpm-battery-100.png b/data/icons/22x22/status/battery-full.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-100.png
rename to data/icons/22x22/status/battery-full.png
diff --git a/data/icons/22x22/status/gpm-battery-060-charging.png b/data/icons/22x22/status/battery-good-charging.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-060-charging.png
rename to data/icons/22x22/status/battery-good-charging.png
diff --git a/data/icons/22x22/status/gpm-battery-060.png b/data/icons/22x22/status/battery-good.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-060.png
rename to data/icons/22x22/status/battery-good.png
diff --git a/data/icons/22x22/status/gpm-battery-020-charging.png b/data/icons/22x22/status/battery-low-charging.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-020-charging.png
rename to data/icons/22x22/status/battery-low-charging.png
diff --git a/data/icons/22x22/status/gpm-battery-020.png b/data/icons/22x22/status/battery-low.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-020.png
rename to data/icons/22x22/status/battery-low.png
diff --git a/data/icons/22x22/status/gpm-battery-missing.png b/data/icons/22x22/status/battery-missing.png
similarity index 100%
rename from data/icons/22x22/status/gpm-battery-missing.png
rename to data/icons/22x22/status/battery-missing.png
diff --git a/data/icons/24x24/status/Makefile.am b/data/icons/24x24/status/Makefile.am
index d5af505..8e21052 100644
--- a/data/icons/24x24/status/Makefile.am
+++ b/data/icons/24x24/status/Makefile.am
@@ -33,21 +33,16 @@ icons_DATA = \
gpm-mouse-060.png \
gpm-mouse-080.png \
gpm-mouse-100.png \
- gpm-battery-000.png \
- gpm-battery-020.png \
- gpm-battery-040.png \
- gpm-battery-060.png \
- gpm-battery-080.png \
- gpm-battery-100.png \
- gpm-battery-000-charging.png \
- gpm-battery-020-charging.png \
- gpm-battery-040-charging.png \
- gpm-battery-060-charging.png \
- gpm-battery-080-charging.png \
- gpm-battery-100-charging.png \
- gpm-battery-missing.png \
- gpm-battery-charged.png \
- gpm-battery-empty.png \
+ battery-caution.png \
+ battery-low.png \
+ battery-good.png \
+ battery-full.png \
+ battery-caution-charging.png \
+ battery-low-charging.png \
+ battery-good-charging.png \
+ battery-full-charging.png \
+ battery-missing.png \
+ battery-empty.png \
gpm-ups-000.png \
gpm-ups-020.png \
gpm-ups-040.png \
diff --git a/data/icons/24x24/status/gpm-battery-000-charging.png b/data/icons/24x24/status/battery-caution-charging.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-000-charging.png
rename to data/icons/24x24/status/battery-caution-charging.png
diff --git a/data/icons/24x24/status/gpm-battery-000.png b/data/icons/24x24/status/battery-caution.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-000.png
rename to data/icons/24x24/status/battery-caution.png
diff --git a/data/icons/24x24/status/gpm-battery-empty.png b/data/icons/24x24/status/battery-empty.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-empty.png
rename to data/icons/24x24/status/battery-empty.png
diff --git a/data/icons/24x24/status/gpm-battery-100-charging.png b/data/icons/24x24/status/battery-full-charging.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-100-charging.png
rename to data/icons/24x24/status/battery-full-charging.png
diff --git a/data/icons/24x24/status/gpm-battery-100.png b/data/icons/24x24/status/battery-full.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-100.png
rename to data/icons/24x24/status/battery-full.png
diff --git a/data/icons/24x24/status/gpm-battery-060-charging.png b/data/icons/24x24/status/battery-good-charging.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-060-charging.png
rename to data/icons/24x24/status/battery-good-charging.png
diff --git a/data/icons/24x24/status/gpm-battery-060.png b/data/icons/24x24/status/battery-good.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-060.png
rename to data/icons/24x24/status/battery-good.png
diff --git a/data/icons/24x24/status/gpm-battery-020-charging.png b/data/icons/24x24/status/battery-low-charging.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-020-charging.png
rename to data/icons/24x24/status/battery-low-charging.png
diff --git a/data/icons/24x24/status/gpm-battery-020.png b/data/icons/24x24/status/battery-low.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-020.png
rename to data/icons/24x24/status/battery-low.png
diff --git a/data/icons/24x24/status/gpm-battery-missing.png b/data/icons/24x24/status/battery-missing.png
similarity index 100%
rename from data/icons/24x24/status/gpm-battery-missing.png
rename to data/icons/24x24/status/battery-missing.png
diff --git a/data/icons/32x32/status/Makefile.am b/data/icons/32x32/status/Makefile.am
index 7eefec8..21b01cf 100644
--- a/data/icons/32x32/status/Makefile.am
+++ b/data/icons/32x32/status/Makefile.am
@@ -33,21 +33,16 @@ icons_DATA = \
gpm-mouse-060.png \
gpm-mouse-080.png \
gpm-mouse-100.png \
- gpm-battery-000.png \
- gpm-battery-020.png \
- gpm-battery-040.png \
- gpm-battery-060.png \
- gpm-battery-080.png \
- gpm-battery-100.png \
- gpm-battery-000-charging.png \
- gpm-battery-020-charging.png \
- gpm-battery-040-charging.png \
- gpm-battery-060-charging.png \
- gpm-battery-080-charging.png \
- gpm-battery-100-charging.png \
- gpm-battery-missing.png \
- gpm-battery-charged.png \
- gpm-battery-empty.png \
+ battery-caution.png \
+ battery-low.png \
+ battery-good.png \
+ battery-full.png \
+ battery-caution-charging.png \
+ battery-low-charging.png \
+ battery-good-charging.png \
+ battery-full-charging.png \
+ battery-missing.png \
+ battery-empty.png \
gpm-ups-000.png \
gpm-ups-020.png \
gpm-ups-040.png \
diff --git a/data/icons/32x32/status/gpm-battery-000-charging.png b/data/icons/32x32/status/battery-caution-charging.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-000-charging.png
rename to data/icons/32x32/status/battery-caution-charging.png
diff --git a/data/icons/32x32/status/gpm-battery-000.png b/data/icons/32x32/status/battery-caution.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-000.png
rename to data/icons/32x32/status/battery-caution.png
diff --git a/data/icons/32x32/status/gpm-battery-empty.png b/data/icons/32x32/status/battery-empty.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-empty.png
rename to data/icons/32x32/status/battery-empty.png
diff --git a/data/icons/32x32/status/gpm-battery-100-charging.png b/data/icons/32x32/status/battery-full-charging.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-100-charging.png
rename to data/icons/32x32/status/battery-full-charging.png
diff --git a/data/icons/32x32/status/gpm-battery-100.png b/data/icons/32x32/status/battery-full.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-100.png
rename to data/icons/32x32/status/battery-full.png
diff --git a/data/icons/32x32/status/gpm-battery-060-charging.png b/data/icons/32x32/status/battery-good-charging.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-060-charging.png
rename to data/icons/32x32/status/battery-good-charging.png
diff --git a/data/icons/32x32/status/gpm-battery-060.png b/data/icons/32x32/status/battery-good.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-060.png
rename to data/icons/32x32/status/battery-good.png
diff --git a/data/icons/32x32/status/gpm-battery-020-charging.png b/data/icons/32x32/status/battery-low-charging.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-020-charging.png
rename to data/icons/32x32/status/battery-low-charging.png
diff --git a/data/icons/32x32/status/gpm-battery-020.png b/data/icons/32x32/status/battery-low.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-020.png
rename to data/icons/32x32/status/battery-low.png
diff --git a/data/icons/32x32/status/gpm-battery-missing.png b/data/icons/32x32/status/battery-missing.png
similarity index 100%
rename from data/icons/32x32/status/gpm-battery-missing.png
rename to data/icons/32x32/status/battery-missing.png
diff --git a/data/icons/48x48/status/Makefile.am b/data/icons/48x48/status/Makefile.am
index 53124c8..e34edf8 100644
--- a/data/icons/48x48/status/Makefile.am
+++ b/data/icons/48x48/status/Makefile.am
@@ -34,21 +34,16 @@ icons_DATA = \
gpm-mouse-060.png \
gpm-mouse-080.png \
gpm-mouse-100.png \
- gpm-battery-000.png \
- gpm-battery-020.png \
- gpm-battery-040.png \
- gpm-battery-060.png \
- gpm-battery-080.png \
- gpm-battery-100.png \
- gpm-battery-000-charging.png \
- gpm-battery-020-charging.png \
- gpm-battery-040-charging.png \
- gpm-battery-060-charging.png \
- gpm-battery-080-charging.png \
- gpm-battery-100-charging.png \
- gpm-battery-missing.png \
- gpm-battery-charged.png \
- gpm-battery-empty.png \
+ battery-caution.png \
+ battery-low.png \
+ battery-good.png \
+ battery-full.png \
+ battery-caution-charging.png \
+ battery-low-charging.png \
+ battery-good-charging.png \
+ battery-full-charging.png \
+ battery-missing.png \
+ battery-empty.png \
gpm-ups-000.png \
gpm-ups-020.png \
gpm-ups-040.png \
diff --git a/data/icons/48x48/status/gpm-battery-000-charging.png b/data/icons/48x48/status/battery-caution-charging.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-000-charging.png
rename to data/icons/48x48/status/battery-caution-charging.png
diff --git a/data/icons/48x48/status/gpm-battery-000.png b/data/icons/48x48/status/battery-caution.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-000.png
rename to data/icons/48x48/status/battery-caution.png
diff --git a/data/icons/48x48/status/gpm-battery-empty.png b/data/icons/48x48/status/battery-empty.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-empty.png
rename to data/icons/48x48/status/battery-empty.png
diff --git a/data/icons/48x48/status/gpm-battery-100-charging.png b/data/icons/48x48/status/battery-full-charging.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-100-charging.png
rename to data/icons/48x48/status/battery-full-charging.png
diff --git a/data/icons/48x48/status/gpm-battery-100.png b/data/icons/48x48/status/battery-full.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-100.png
rename to data/icons/48x48/status/battery-full.png
diff --git a/data/icons/48x48/status/gpm-battery-060-charging.png b/data/icons/48x48/status/battery-good-charging.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-060-charging.png
rename to data/icons/48x48/status/battery-good-charging.png
diff --git a/data/icons/48x48/status/gpm-battery-060.png b/data/icons/48x48/status/battery-good.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-060.png
rename to data/icons/48x48/status/battery-good.png
diff --git a/data/icons/48x48/status/gpm-battery-020-charging.png b/data/icons/48x48/status/battery-low-charging.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-020-charging.png
rename to data/icons/48x48/status/battery-low-charging.png
diff --git a/data/icons/48x48/status/gpm-battery-020.png b/data/icons/48x48/status/battery-low.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-020.png
rename to data/icons/48x48/status/battery-low.png
diff --git a/data/icons/48x48/status/gpm-battery-missing.png b/data/icons/48x48/status/battery-missing.png
similarity index 100%
rename from data/icons/48x48/status/gpm-battery-missing.png
rename to data/icons/48x48/status/battery-missing.png
diff --git a/data/icons/scalable/status/Makefile.am b/data/icons/scalable/status/Makefile.am
index e7b6c04..b8bdd68 100644
--- a/data/icons/scalable/status/Makefile.am
+++ b/data/icons/scalable/status/Makefile.am
@@ -25,21 +25,16 @@ icons_DATA = \
gpm-mouse-000.svg \
gpm-mouse-060.svg \
gpm-mouse-100.svg \
- gpm-battery-000.svg \
- gpm-battery-020.svg \
- gpm-battery-040.svg \
- gpm-battery-060.svg \
- gpm-battery-080.svg \
- gpm-battery-100.svg \
- gpm-battery-000-charging.svg \
- gpm-battery-020-charging.svg \
- gpm-battery-040-charging.svg \
- gpm-battery-060-charging.svg \
- gpm-battery-080-charging.svg \
- gpm-battery-100-charging.svg \
- gpm-battery-missing.svg \
- gpm-battery-charged.svg \
- gpm-battery-empty.svg \
+ battery-caution.svg \
+ battery-low.svg \
+ battery-good.svg \
+ battery-full.svg \
+ battery-caution-charging.svg \
+ battery-low-charging.svg \
+ battery-good-charging.svg \
+ battery-full-charging.svg \
+ battery-missing.svg \
+ battery-empty.svg \
gpm-ups-000.svg \
gpm-ups-020.svg \
gpm-ups-040.svg \
diff --git a/data/icons/scalable/status/gpm-battery-000-charging.svg b/data/icons/scalable/status/battery-caution-charging.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-000-charging.svg
rename to data/icons/scalable/status/battery-caution-charging.svg
diff --git a/data/icons/scalable/status/gpm-battery-000.svg b/data/icons/scalable/status/battery-caution.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-000.svg
rename to data/icons/scalable/status/battery-caution.svg
diff --git a/data/icons/scalable/status/gpm-battery-empty.svg b/data/icons/scalable/status/battery-empty.svg
similarity index 99%
rename from data/icons/scalable/status/gpm-battery-empty.svg
rename to data/icons/scalable/status/battery-empty.svg
index 7d8e5d5..f4b8a87 100644
--- a/data/icons/scalable/status/gpm-battery-empty.svg
+++ b/data/icons/scalable/status/battery-empty.svg
@@ -16,9 +16,9 @@
id="svg1328"
sodipodi:version="0.32"
inkscape:version="0.46+devel"
- sodipodi:docname="gpm-battery-empty.svg"
+ sodipodi:docname="battery-empty.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
- inkscape:export-filename="/home/hughsie/Code/gnome-power-manager/data/icons/48x48/status/gpm-battery-empty.png"
+ inkscape:export-filename="/home/hughsie/Code/gnome-power-manager/data/icons/48x48/status/battery-empty.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
diff --git a/data/icons/scalable/status/gpm-battery-100-charging.svg b/data/icons/scalable/status/battery-full-charging.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-100-charging.svg
rename to data/icons/scalable/status/battery-full-charging.svg
diff --git a/data/icons/scalable/status/gpm-battery-100.svg b/data/icons/scalable/status/battery-full.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-100.svg
rename to data/icons/scalable/status/battery-full.svg
diff --git a/data/icons/scalable/status/gpm-battery-060-charging.svg b/data/icons/scalable/status/battery-good-charging.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-060-charging.svg
rename to data/icons/scalable/status/battery-good-charging.svg
diff --git a/data/icons/scalable/status/gpm-battery-060.svg b/data/icons/scalable/status/battery-good.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-060.svg
rename to data/icons/scalable/status/battery-good.svg
diff --git a/data/icons/scalable/status/gpm-battery-020-charging.svg b/data/icons/scalable/status/battery-low-charging.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-020-charging.svg
rename to data/icons/scalable/status/battery-low-charging.svg
diff --git a/data/icons/scalable/status/gpm-battery-020.svg b/data/icons/scalable/status/battery-low.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-020.svg
rename to data/icons/scalable/status/battery-low.svg
diff --git a/data/icons/scalable/status/gpm-battery-missing.svg b/data/icons/scalable/status/battery-missing.svg
similarity index 100%
rename from data/icons/scalable/status/gpm-battery-missing.svg
rename to data/icons/scalable/status/battery-missing.svg
diff --git a/src/gpm-upower.c b/src/gpm-upower.c
index f3463f6..80ef8a0 100644
--- a/src/gpm-upower.c
+++ b/src/gpm-upower.c
@@ -35,15 +35,7 @@
/**
* gpm_upower_get_device_icon_index:
- * @percent: The charge of the device
- *
- * The index value depends on the percentage charge:
- * 00-10 = 000
- * 10-30 = 020
- * 30-50 = 040
- * 50-70 = 060
- * 70-90 = 080
- * 90-100 = 100
+ * @device: The UpDevice
*
* Return value: The character string for the filename suffix.
**/
@@ -67,16 +59,36 @@ gpm_upower_get_device_icon_index (UpDevice *device)
}
/**
- * gpm_upower_get_device_icon:
+ * gpm_upower_get_device_icon_suffix:
+ * @device: The UpDevice
*
- * Need to free the return value
+ * Return value: The character string for the filename suffix.
+ **/
+static const gchar *
+gpm_upower_get_device_icon_suffix (UpDevice *device)
+{
+ gdouble percentage;
+ /* get device properties */
+ g_object_get (device, "percentage", &percentage, NULL);
+ if (percentage < 10)
+ return "caution";
+ else if (percentage < 30)
+ return "low";
+ else if (percentage < 60)
+ return "good";
+ return "full";
+}
+
+/**
+ * gpm_upower_get_device_icon:
*
+ * Return value: The device icon, use g_object_unref() when done.
**/
GIcon *
gpm_upower_get_device_icon (UpDevice *device, gboolean use_symbolic)
{
GString *filename;
- const gchar *prefix = NULL;
+ const gchar *kind_str;
const gchar *index_str;
UpDeviceKind kind;
UpDeviceState state;
@@ -121,48 +133,42 @@ gpm_upower_get_device_icon (UpDevice *device, gboolean use_symbolic)
} else if (kind == UP_DEVICE_KIND_BATTERY) {
if (!is_present) {
/* battery missing */
- g_string_append (filename, "gpm-battery-missing");
+ g_string_append (filename, "battery-missing");
} else if (state == UP_DEVICE_STATE_EMPTY) {
- g_string_append (filename, "gpm-battery-empty");
+ g_string_append (filename, "battery-empty");
} else if (state == UP_DEVICE_STATE_FULLY_CHARGED) {
- g_string_append (filename, "gpm-battery-charged");
+ g_string_append (filename, "battery-full");
- } else if (state == UP_DEVICE_STATE_CHARGING) {
- index_str = gpm_upower_get_device_icon_index (device);
- g_string_append_printf (filename, "gpm-battery-%s-charging", index_str);
+ } else if (state == UP_DEVICE_STATE_CHARGING ||
+ state == UP_DEVICE_STATE_PENDING_CHARGE) {
+ index_str = gpm_upower_get_device_icon_suffix (device);
+ g_string_append_printf (filename, "battery-%s-charging", index_str);
- } else if (state == UP_DEVICE_STATE_DISCHARGING) {
- index_str = gpm_upower_get_device_icon_index (device);
- g_string_append_printf (filename, "gpm-battery-%s", index_str);
+ } else if (state == UP_DEVICE_STATE_DISCHARGING ||
+ state == UP_DEVICE_STATE_PENDING_DISCHARGE) {
+ index_str = gpm_upower_get_device_icon_suffix (device);
+ g_string_append_printf (filename, "battery-%s", index_str);
- } else if (state == UP_DEVICE_STATE_PENDING_CHARGE) {
- index_str = gpm_upower_get_device_icon_index (device);
- /* FIXME: do new grey icons */
- g_string_append_printf (filename, "gpm-battery-%s-charging", index_str);
-
- } else if (state == UP_DEVICE_STATE_PENDING_DISCHARGE) {
- index_str = gpm_upower_get_device_icon_index (device);
- g_string_append_printf (filename, "gpm-battery-%s", index_str);
} else {
- g_string_append (filename, "gpm-battery-missing");
+ g_string_append (filename, "battery-missing");
}
} else if (kind == UP_DEVICE_KIND_MOUSE ||
kind == UP_DEVICE_KIND_KEYBOARD ||
kind == UP_DEVICE_KIND_PHONE) {
- prefix = up_device_kind_to_string (kind);
+ kind_str = up_device_kind_to_string (kind);
if (!is_present) {
/* battery missing */
- g_string_append_printf (filename, "gpm-%s-000", prefix);
+ g_string_append_printf (filename, "gpm-%s-000", kind_str);
} else if (state == UP_DEVICE_STATE_FULLY_CHARGED) {
- g_string_append_printf (filename, "gpm-%s-100", prefix);
+ g_string_append_printf (filename, "gpm-%s-100", kind_str);
} else if (state == UP_DEVICE_STATE_DISCHARGING) {
index_str = gpm_upower_get_device_icon_index (device);
- g_string_append_printf (filename, "gpm-%s-%s", prefix, index_str);
+ g_string_append_printf (filename, "gpm-%s-%s", kind_str, index_str);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]