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
=== modified file 'bin/ubuntuone-client-applet'
--- bin/ubuntuone-client-applet 2009-10-12 20:13:56 +0000
+++ bin/ubuntuone-client-applet 2009-10-13 17:30:23 +0000
@@ -433,6 +433,7 @@
433433
434 self.__managed_dir = None434 self.__managed_dir = None
435435
436 self.__size = 24
436 self.__theme = gtk.icon_theme_get_default()437 self.__theme = gtk.icon_theme_get_default()
437 iconpath = os.path.abspath(os.path.join(438 iconpath = os.path.abspath(os.path.join(
438 os.path.split(os.path.dirname(__file__))[0],439 os.path.split(os.path.dirname(__file__))[0],
@@ -449,7 +450,6 @@
449 self.connect("popup-menu", self.__popup_menu)450 self.connect("popup-menu", self.__popup_menu)
450 self.connect("activate", self.__do_action)451 self.connect("activate", self.__do_action)
451452
452 self.__size = 24
453 self.__size_changed(self, self.__size)453 self.__size_changed(self, self.__size)
454454
455 self.__litems = {}455 self.__litems = {}
@@ -498,6 +498,12 @@
498498
499 gobject.idle_add(self.__get_root)499 gobject.idle_add(self.__get_root)
500500
501 def set_from_icon_name(self, icon):
502 """Handle fallbacks for setting our icon."""
503 pixbuf = self.__theme.load_icon(icon, self.__size,
504 gtk.ICON_LOOKUP_GENERIC_FALLBACK)
505 self.set_from_pixbuf(pixbuf)
506
501 def set_visibility_config(self, visibility):507 def set_visibility_config(self, visibility):
502 """Update the visibility configuration."""508 """Update the visibility configuration."""
503 self.__show_when = int(visibility)509 self.__show_when = int(visibility)
@@ -517,7 +523,7 @@
517 label = self.__litems["status"].get_child()523 label = self.__litems["status"].get_child()
518 if done:524 if done:
519 self.set_tooltip(_("Files updated."))525 self.set_tooltip(_("Files updated."))
520 self.set_from_icon_name("ubuntuone-client")526 self.set_from_icon_name("ubuntuone-client-idle")
521 label.set_text(_("Your files are up to date."))527 label.set_text(_("Your files are up to date."))
522 else:528 else:
523 label.set_markup("<i>%s</i>" % text)529 label.set_markup("<i>%s</i>" % text)
@@ -722,13 +728,13 @@
722728
723 else:729 else:
724 self.__connected = True730 self.__connected = True
725 self.set_from_icon_name("ubuntuone-client")731 self.set_from_icon_name("ubuntuone-client-idle")
726 if state.startswith("CONNECTING") or \732 if state.startswith("CONNECTING") or \
727 state.startswith("START_CONNECTING") or \733 state.startswith("START_CONNECTING") or \
728 state.startswith("AUTHENTICATING") or \734 state.startswith("AUTHENTICATING") or \
729 state.startswith("CONNECTED") or \735 state.startswith("CONNECTED") or \
730 state.startswith("START_CONNECTED"):736 state.startswith("START_CONNECTED"):
731 self.set_from_icon_name("ubuntuone-client")737 self.set_from_icon_name("ubuntuone-client-idle")
732 self.set_tooltip(_("Connecting"))738 self.set_tooltip(_("Connecting"))
733 self.__visible = True739 self.__visible = True
734740

Subscribers

People subscribed via source and target branches