From c9cd87b1425e67e686300fb924874542f1096a52 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Thu, 07 Jun 2007 18:49:17 +0000 Subject: Percent should be 100% only when we have already added all the targets. --- (limited to 'shell') diff --git a/shell/view/frame/clipboardbox.py b/shell/view/frame/clipboardbox.py index 85fadef..965a6c6 100644 --- a/shell/view/frame/clipboardbox.py +++ b/shell/view/frame/clipboardbox.py @@ -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 diff --git a/shell/view/frame/clipboardpanelwindow.py b/shell/view/frame/clipboardpanelwindow.py index 75e2998..69c6aec 100644 --- a/shell/view/frame/clipboardpanelwindow.py +++ b/shell/view/frame/clipboardpanelwindow.py @@ -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 + '.') -- cgit v0.9.1