diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-06-07 18:49:17 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-06-07 18:49:17 (GMT) |
commit | c9cd87b1425e67e686300fb924874542f1096a52 (patch) | |
tree | f95e009924e6daea3176e0d5255f54bbbcc4f949 | |
parent | 340fcc271d23f74c5d53a50e522d345c5817b79c (diff) |
Percent should be 100% only when we have already added all the targets.
-rw-r--r-- | shell/view/frame/clipboardbox.py | 2 | ||||
-rw-r--r-- | shell/view/frame/clipboardpanelwindow.py | 7 |
2 files changed, 3 insertions, 6 deletions
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 + '.') |