[Sugar-devel] [Sugar 1/2] Only add a group of selections to the clipboard if there are anything available.
silbe at activitycentral.com
Mon Feb 6 07:24:39 EST 2012
Excerpts from godiard's message of 2012-01-26 22:17:57 +0100:
> This problem is affecting Text to Speech with Write activity,
> because there are only a selection in the secondary clipboard
> but a icon is displayed in the frame without anything selected.
I don't grok the above problem statement, but only adding non-empty
objects to the clipboard makes sense on its own.
> @@ -68,9 +67,13 @@ class ClipboardPanelWindow(FrameWindow):
> if not selection:
> logging.warning('no data for selection target %s.', target)
> + cb_selections.append(selection)
> + if len(cb_selections) > 0:
A blank line before the if block would help visually distinguishing
between the for loop and the if block.
Acked-by: Sascha Silbe <silbe at activitycentral.com>
PS: Formatting this patch with -U4 (rather than the default of 3) helps
seeing how the two separated changes in this patch are related.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: not available
More information about the Sugar-devel