12592 Update Manager needs work for HighContrast theme
authorPadraig O'Briain <padraig.obriain@sun.com>
Tue, 12 Jan 2010 15:20:14 +0000
changeset 1641 ffe02e791b0e
parent 1640 9b768674beee
child 1642 c6e464b99a0f
12592 Update Manager needs work for HighContrast theme
src/pkgdefs/SUNWipkg-um/prototype
src/um/Makefile
src/um/data/icons/HighContrast/24x24/updatemanager.png
src/um/data/icons/HighContrast/36x36/updatemanager.png
src/um/data/icons/HighContrast/48x48/updatemanager.png
src/um/data/updatemanager.png
src/updatemanager.py
--- a/src/pkgdefs/SUNWipkg-um/prototype	Tue Jan 12 13:36:45 2010 +0000
+++ b/src/pkgdefs/SUNWipkg-um/prototype	Tue Jan 12 15:20:14 2010 +0000
@@ -22,6 +22,10 @@
 d none usr/share/applications 755 root other
 f none usr/share/applications/updatemanager.desktop 444 root other
 d none usr/share/icons 755 root other
+d none usr/share/icons/HighContrast 755 root other
+d none usr/share/icons/HighContrast/48x48 755 root other
+d none usr/share/icons/HighContrast/48x48/apps 755 root other
+f none usr/share/icons/HighContrast/48x48/apps/updatemanager.png 444 root other
 d none usr/share/icons/hicolor 755 root other
 d none usr/share/icons/hicolor/48x48 755 root other
 d none usr/share/icons/hicolor/48x48/apps 755 root other
@@ -31,6 +35,16 @@
 f none usr/share/man/cat1/pm-updatemanager.1 444 root bin
 d none usr/share/update-manager 755 root bin
 d none usr/share/update-manager/icons 755 root bin
+d none usr/share/update-manager/icons/HighContrast 755 root bin
+d none usr/share/update-manager/icons/HighContrast/24x24 755 root bin
+d none usr/share/update-manager/icons/HighContrast/24x24/actions 755 root bin
+f none usr/share/update-manager/icons/HighContrast/24x24/actions/updatemanager.png 444 root other
+d none usr/share/update-manager/icons/HighContrast/36x36 755 root bin
+d none usr/share/update-manager/icons/HighContrast/36x36/actions 755 root bin
+f none usr/share/update-manager/icons/HighContrast/36x36/actions/updatemanager.png 444 root other
+d none usr/share/update-manager/icons/HighContrast/48x48 755 root bin
+d none usr/share/update-manager/icons/HighContrast/48x48/actions 755 root bin
+f none usr/share/update-manager/icons/HighContrast/48x48/actions/updatemanager.png 444 root other
 d none usr/share/update-manager/icons/hicolor 755 root bin
 d none usr/share/update-manager/icons/hicolor/24x24 755 root bin
 d none usr/share/update-manager/icons/hicolor/24x24/actions 755 root bin
--- a/src/um/Makefile	Tue Jan 12 13:36:45 2010 +0000
+++ b/src/um/Makefile	Tue Jan 12 15:20:14 2010 +0000
@@ -35,9 +35,13 @@
 ROOTUSRLIB = $(ROOT)/lib
 
 ROOTAPPICONSHARE = $(ROOT)/share/icons/hicolor/48x48/apps
+ROOTAPPHIGHICONSHARE = $(ROOT)/share/icons/HighContrast/48x48/apps
 ROOTAUTOSTARTSHARE = $(ROOTETC)/xdg/autostart
 ROOTDESKTOPSHARE = $(ROOT)/share/applications
 ROOTGCONFSHARE = $(ROOTETC)/gconf/schemas
+ROOTHIGHICON24SHARE = $(ROOTSHARE)/icons/HighContrast/24x24/actions
+ROOTHIGHICON36SHARE = $(ROOTSHARE)/icons/HighContrast/36x36/actions
+ROOTHIGHICON48SHARE = $(ROOTSHARE)/icons/HighContrast/48x48/actions
 ROOTICON24SHARE = $(ROOTSHARE)/icons/hicolor/24x24/actions
 ROOTICON36SHARE = $(ROOTSHARE)/icons/hicolor/36x36/actions
 ROOTICON48SHARE = $(ROOTSHARE)/icons/hicolor/48x48/actions
@@ -49,9 +53,13 @@
 
 ROOTDIRS = \
    $(ROOTAPPICONSHARE) \
+   $(ROOTAPPHIGHICONSHARE) \
    $(ROOTAUTOSTARTSHARE) \
    $(ROOTDESKTOPSHARE) \
    $(ROOTGCONFSHARE) \
+   $(ROOTHIGHICON24SHARE) \
+   $(ROOTHIGHICON36SHARE) \
+   $(ROOTHIGHICON48SHARE) \
    $(ROOTICON24SHARE) \
    $(ROOTICON36SHARE) \
    $(ROOTICON48SHARE) \
@@ -61,7 +69,10 @@
    $(ROOTSVCSHARE)
 
 APPICONS = \
-   data/updatemanager.png
+   data/icons/48x48/updatemanager.png
+
+APPHIGHICONS = \
+   data/icons/HighContrast/48x48/updatemanager.png
 
 AUTOSTART = \
    data/updatemanagernotifier.desktop
@@ -72,6 +83,15 @@
 GCONF = \
    data/updatemanager-preferences.schemas
 
+HIGHICONS24 = \
+   data/icons/HighContrast/24x24/updatemanager.png
+
+HIGHICONS36 = \
+   data/icons/HighContrast/36x36/updatemanager.png
+
+HIGHICONS48 = \
+   data/icons/HighContrast/48x48/updatemanager.png
+
 ICONS24 = \
    data/icons/24x24/updatemanager.png
 
@@ -94,6 +114,7 @@
 # Define the paths to all of the stuff we'll install.
 #
 ROOTAPPICONS = $(APPICONS:data/%=$(ROOTAPPICONSHARE)/%)
+ROOTAPPHIGHICONS = $(APPHIGHICONS:data/%=$(ROOTAPPHIGHICONSHARE)/%)
 
 ROOTAUTOSTART = $(AUTOSTART:data/%=$(ROOTAUTOSTARTSHARE)/%)
 
@@ -101,6 +122,10 @@
 
 ROOTGCONF = $(GCONF:data/%=$(ROOTGCONFSHARE)/%)
 
+ROOTHIGHICONS24 = $(HIGHICONS24:data/icons/HighContrast/24x24/%=$(ROOTHIGHICON24SHARE)/%)
+ROOTHIGHICONS36 = $(HIGHICONS36:data/icons/HighContrast/36x36/%=$(ROOTHIGHICON36SHARE)/%)
+ROOTHIGHICONS48 = $(HIGHICONS48:data/icons/HighContrast/48x48/%=$(ROOTHIGHICON48SHARE)/%)
+
 ROOTICONS24 = $(ICONS24:data/icons/24x24/%=$(ROOTICON24SHARE)/%)
 ROOTICONS36 = $(ICONS36:data/icons/36x36/%=$(ROOTICON36SHARE)/%)
 ROOTICONS48 = $(ICONS48:data/icons/48x48/%=$(ROOTICON48SHARE)/%)
@@ -113,9 +138,13 @@
 
 ROOTCOMPONENTS = \
    $(ROOTAPPICONS) \
+   $(ROOTAPPHIGHICONS) \
    $(ROOTAUTOSTART) \
    $(ROOTDESKTOP) \
    $(ROOTGCONF) \
+   $(ROOTHIGHICONS24) \
+   $(ROOTHIGHICONS36) \
+   $(ROOTHIGHICONS48) \
    $(ROOTICONS24) \
    $(ROOTICONS36) \
    $(ROOTICONS48) \
@@ -163,7 +192,8 @@
 	ln -sf $(PWD)/data/updatemanagernotifier.desktop /etc/xdg/autostart/updatemanagernotifier.desktop
 	ln -sf $(PWD)/data/updatemanager-preferences.schemas /etc/gconf/schemas/updatemanage-preferences.schemas
 	ln -sf $(PWD)/data/icons /usr/share/update-manager/icons/hicolor
-	ln -sf $(PWD)/data/icons/updatemanager.png /usr/share/icons/hicolor/48x48/apps/updatemanager.png
+	ln -sf $(PWD)/data/icons/48x48/updatemanager.png /usr/share/icons/hicolor/48x48/apps/updatemanager.png
+	ln -sf $(PWD)/data/icons/HighContrast/48x48/updatemanager.png /usr/share/icons/HighContrast/48x48/apps/updatemanager.png
 	ln -sf $(PWD)/data/updatemanager.desktop /usr/share/applications/updatemanager.desktop
 
 link-clean:
@@ -175,10 +205,14 @@
 	rm -f /lib/svc/method/pkg-update
 	rm -f /usr/share/applications/updatemanager.desktop
 	rm -f /usr/share/icons/hicolor/48x48/apps/updatemanager.png
+	rm -f /usr/share/icons/HighContrast/48x48/apps/updatemanager.png
 
 $(ROOTDIRS):
 	$(INSTALL) -d -m 0755 $@
 
+$(ROOTAPPHIGHICONSHARE)/%: $(ROOTDIRS) data/%
+	$(INSTALL) -f $(ROOTAPPHIGHICONSHARE) -m 0644 $<
+
 $(ROOTAPPICONSHARE)/%: $(ROOTDIRS) data/%
 	$(INSTALL) -f $(ROOTAPPICONSHARE) -m 0644 $<
 
@@ -191,6 +225,15 @@
 $(ROOTGCONFSHARE)/%: $(ROOTDIRS) data/%
 	$(INSTALL) -f $(ROOTGCONFSHARE) -m 0644 $<
 
+$(ROOTHIGHICON24SHARE)/%: $(ROOTDIRS) data/icons/HighContrast/24x24/%
+	$(INSTALL) -f $(ROOTHIGHICON24SHARE) -m 0644 $<
+
+$(ROOTHIGHICON36SHARE)/%: $(ROOTDIRS) data/icons/HighContrast/36x36/%
+	$(INSTALL) -f $(ROOTHIGHICON36SHARE) -m 0644 $<
+
+$(ROOTHIGHICON48SHARE)/%: $(ROOTDIRS) data/icons/HighContrast/48x48/%
+	$(INSTALL) -f $(ROOTHIGHICON48SHARE) -m 0644 $<
+
 $(ROOTICON24SHARE)/%: $(ROOTDIRS) data/icons/24x24/%
 	$(INSTALL) -f $(ROOTICON24SHARE) -m 0644 $<
 
Binary file src/um/data/icons/HighContrast/24x24/updatemanager.png has changed
Binary file src/um/data/icons/HighContrast/36x36/updatemanager.png has changed
Binary file src/um/data/icons/HighContrast/48x48/updatemanager.png has changed
Binary file src/um/data/updatemanager.png has changed
--- a/src/updatemanager.py	Tue Jan 12 13:36:45 2010 +0000
+++ b/src/updatemanager.py	Tue Jan 12 15:20:14 2010 +0000
@@ -19,7 +19,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -120,7 +120,7 @@
                 self.package_selection = None
                 self.update_all_proceed = False
                 self.application_path = None
-                self.icon_theme = gtk.IconTheme()
+                self.icon_theme = gtk.icon_theme_get_default()
                 pkg_icon_location = os.path.join(self.application_dir, PKG_ICON_LOCATION)
                 self.icon_theme.append_search_path(pkg_icon_location)
                 self.pkg_installed_icon = gui_misc.get_icon(self.icon_theme,