diff options
author | Bernie Innocenti <bernie@codewiz.org> | 2010-08-13 18:15:21 (GMT) |
---|---|---|
committer | Bernie Innocenti <bernie@codewiz.org> | 2010-08-13 18:15:21 (GMT) |
commit | 542e756b7983f65725fdd2b1b5c39cf4a344fa6e (patch) | |
tree | 84fae85c0433deae9ad0c58a63f5885b906f17e8 /rpms | |
parent | bd242a2694050900edc5e511b88273bf02f87288 (diff) |
Add prevent-multiple-XS-icons-when-re-register.patch
Diffstat (limited to 'rpms')
-rw-r--r-- | rpms/sugar/prevent-multiple-XS-icons-when-re-register.patch | 54 | ||||
-rw-r--r-- | rpms/sugar/sugar.spec | 6 |
2 files changed, 58 insertions, 2 deletions
diff --git a/rpms/sugar/prevent-multiple-XS-icons-when-re-register.patch b/rpms/sugar/prevent-multiple-XS-icons-when-re-register.patch new file mode 100644 index 0000000..5a0cffd --- /dev/null +++ b/rpms/sugar/prevent-multiple-XS-icons-when-re-register.patch @@ -0,0 +1,54 @@ +From: Martin Abente <mabente@paraguayeduca.org> +To: dextrose@lists.sugarlabs.org +Date: Fri, 6 Aug 2010 14:59:42 -0400 +Organization: Paraguay Educa +Subject: [Dextrose] [PATCH] Prevent multiple XS icon when re register + +Re register patch did not consider the XS button option logic. +This patch makes sure previous icon will be removed before adding +the new one. + +Signed-off-by: Martin Abente <mabente@paraguayeduca.org> +--- + src/jarabe/journal/volumestoolbar.py | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/jarabe/journal/volumestoolbar.py b/src/jarabe/journal/volumestoolbar.py +index e1f9ce0..5fadfac 100644 +--- a/src/jarabe/journal/volumestoolbar.py ++++ b/src/jarabe/journal/volumestoolbar.py +@@ -66,10 +66,15 @@ class VolumesToolbar(gtk.Toolbar): + client = gconf.client_get_default() + backup_url = client.get_string('/desktop/sugar/backup_url') + ++ for button in self._volume_buttons: ++ if button.__class__ == XSButton: ++ self._volume_buttons.remove(button) ++ self.remove(button) ++ break ++ + if backup_url: + xs_button = XSButton() + xs_button.set_palette(JournalXSPalette(backup_url)) +- #xs_button.props.group = self._volume_buttons[0] + xs_button.show() + + self._volume_buttons.append(xs_button) +@@ -122,7 +127,7 @@ class VolumesToolbar(gtk.Toolbar): + def _get_button_for_mount(self, mount): + mount_point = mount.get_root().get_path() + for button in self.get_children(): +- if type(button) == VolumeButton and \ ++ if button.__class__ == VolumeButton and \ + button.mount_point == mount_point: + return button + logging.error('Couldnt find button with mount_point %r', mount_point) +-- +1.6.0.4 + +_______________________________________________ +Dextrose mailing list +Dextrose@lists.sugarlabs.org +http://lists.sugarlabs.org/listinfo/dextrose + + diff --git a/rpms/sugar/sugar.spec b/rpms/sugar/sugar.spec index aa4416f..9409a12 100644 --- a/rpms/sugar/sugar.spec +++ b/rpms/sugar/sugar.spec @@ -32,7 +32,7 @@ Patch19: improve-activity-updater-icon.patch Patch20: indicate-inactive-state-in-mesh-device-icon.patch Patch21: discard_network_connections.patch #Patch22: sl1814-consolidate-activity-launch-entry-point.patch -Patch23: register-session-failed-fix.patch +Patch23: sl1940-register-session-failed-fix.patch # Andres' journal filesize enhancement Patch101: sizelist-0001-Journal-Retrieve-filesize-from-the-datastore.patch @@ -59,7 +59,8 @@ Patch500: sl2006-touchpad-device-on-frame.patch Patch503: cpu-and-memory-resource-indicator.patch Patch504: sl2064-always-listen-for-NameOwnerChanged-DBus-message.patch Patch506: jasg-register-rename.patch -Patch507: microformat-updater.patch +Patch507: prevent-multiple-XS-icons-when-re-register.patch +Patch508: microformat-updater.patch # tch experimental patches patch601: bundle-Delete-profile-data-only-when-erased.patch @@ -196,6 +197,7 @@ multiple instances of sugar. %patch504 -p1 %patch506 -p1 %patch507 -p1 +%patch508 -p1 %patch601 -p1 %patch602 -p1 |