Merge lp:~dobey/ubuntuone-client/idle-icon-fixups into lp:ubuntuone-client

Proposed by dobey
Status: Merged
Approved by: Elliot Murphy
Approved revision: 253
Merged at revision: not available
Proposed branch: lp:~dobey/ubuntuone-client/idle-icon-fixups
Merge into: lp:ubuntuone-client
Diff against target: 56 lines
1 file modified
bin/ubuntuone-client-applet (+10/-4)
To merge this branch: bzr merge lp:~dobey/ubuntuone-client/idle-icon-fixups
Reviewer Review Type Date Requested Status
Elliot Murphy (community) Approve
Review via email: mp+13298@code.launchpad.net

Commit message

Use -idle icon where appropriate
Override set_icon_from_name so we can fallback from -idle properly

To post a comment you must log in.
Revision history for this message
Elliot Murphy (statik) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/ubuntuone-client-applet'
2--- bin/ubuntuone-client-applet 2009-10-12 20:13:56 +0000
3+++ bin/ubuntuone-client-applet 2009-10-13 17:30:23 +0000
4@@ -433,6 +433,7 @@
5
6 self.__managed_dir = None
7
8+ self.__size = 24
9 self.__theme = gtk.icon_theme_get_default()
10 iconpath = os.path.abspath(os.path.join(
11 os.path.split(os.path.dirname(__file__))[0],
12@@ -449,7 +450,6 @@
13 self.connect("popup-menu", self.__popup_menu)
14 self.connect("activate", self.__do_action)
15
16- self.__size = 24
17 self.__size_changed(self, self.__size)
18
19 self.__litems = {}
20@@ -498,6 +498,12 @@
21
22 gobject.idle_add(self.__get_root)
23
24+ def set_from_icon_name(self, icon):
25+ """Handle fallbacks for setting our icon."""
26+ pixbuf = self.__theme.load_icon(icon, self.__size,
27+ gtk.ICON_LOOKUP_GENERIC_FALLBACK)
28+ self.set_from_pixbuf(pixbuf)
29+
30 def set_visibility_config(self, visibility):
31 """Update the visibility configuration."""
32 self.__show_when = int(visibility)
33@@ -517,7 +523,7 @@
34 label = self.__litems["status"].get_child()
35 if done:
36 self.set_tooltip(_("Files updated."))
37- self.set_from_icon_name("ubuntuone-client")
38+ self.set_from_icon_name("ubuntuone-client-idle")
39 label.set_text(_("Your files are up to date."))
40 else:
41 label.set_markup("<i>%s</i>" % text)
42@@ -722,13 +728,13 @@
43
44 else:
45 self.__connected = True
46- self.set_from_icon_name("ubuntuone-client")
47+ self.set_from_icon_name("ubuntuone-client-idle")
48 if state.startswith("CONNECTING") or \
49 state.startswith("START_CONNECTING") or \
50 state.startswith("AUTHENTICATING") or \
51 state.startswith("CONNECTED") or \
52 state.startswith("START_CONNECTED"):
53- self.set_from_icon_name("ubuntuone-client")
54+ self.set_from_icon_name("ubuntuone-client-idle")
55 self.set_tooltip(_("Connecting"))
56 self.__visible = True
57

Subscribers

People subscribed via source and target branches