Percent should be 100% only when we have already added all the targets.
This commit is contained in:
parent
340fcc271d
commit
c9cd87b142
@ -179,7 +179,7 @@ class ClipboardBox(hippo.CanvasBox):
|
||||
if str(target) not in ('TIMESTAMP', 'TARGETS', 'MULTIPLE'):
|
||||
widget.drag_get_data(context, target, time)
|
||||
|
||||
cb_service.set_object_percent(object_id, percent = 100)
|
||||
cb_service.set_object_percent(object_id, percent=100)
|
||||
|
||||
return True
|
||||
|
||||
|
@ -53,20 +53,17 @@ class ClipboardPanelWindow(FrameWindow):
|
||||
|
||||
cb_service = clipboardservice.get_instance()
|
||||
key = cb_service.add_object(name="")
|
||||
cb_service.set_object_percent(key, percent = 100)
|
||||
cb_service.set_object_percent(key, percent=0)
|
||||
|
||||
targets = clipboard.wait_for_targets()
|
||||
for target in targets:
|
||||
if target not in ('TIMESTAMP', 'TARGETS', 'MULTIPLE'):
|
||||
if target not in ('TIMESTAMP', 'TARGETS', 'MULTIPLE', 'SAVE_TARGETS'):
|
||||
selection = clipboard.wait_for_contents(target)
|
||||
if selection:
|
||||
self._add_selection(key, selection)
|
||||
|
||||
cb_service.set_object_percent(key, percent=100)
|
||||
|
||||
# TODO: Notify somehow the object added.
|
||||
#self._frame.show_and_hide(0)
|
||||
|
||||
def _add_selection(self, key, selection):
|
||||
if selection.data:
|
||||
logging.debug('adding type ' + selection.type + '.')
|
||||
|
Loading…
Reference in New Issue
Block a user