diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-07-04 22:09:44 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-08-10 13:49:29 (GMT) |
commit | 292668290231e966bbc3629bd75f5c3853648ec4 (patch) | |
tree | f483c2f2a9c4de62d10009b9401dd1453a209a91 /toolbox.py | |
parent | 16c5b2406cac683eb7009ae84f0c6a4db36cf7c7 (diff) |
Initial phase of clipboard operations ported to cairo
Copy, paste and move operations are implemented.
NOTES:
* Change size of selection is not implemented in this patch.
* A refactoring was done to do the code easier to understand.
Previously, the Area.selmove was used to check if a selection is
in progress. Now only to check if a area is being moved.
A selection is detected using Area.is_selected().
The propery selmove now is private _selmove.
The selected area now should be obtained using Area.get_selection_bounds(),
and not using Area.orig_x, Area.orig_y and the selection size.
This properties should be removed after finish refactoring.
The property Area.sel_get_out was removed.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'toolbox.py')
-rw-r--r-- | toolbox.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -191,7 +191,7 @@ class DrawEditToolbar(EditToolbar): self._activity.area.copy() def _paste_cb(self, widget, data=None): - self._activity.area.past(self._activity.area) + self._activity.area.paste(self._activity.area) def _on_signal_undo_cb(self, widget, data=None): self._verify_sensitive_buttons() @@ -786,7 +786,7 @@ class ImageToolbar(gtk.Toolbar): def resize(self, spinButton, tool, activity): if activity.area.tool['name'] == 'marquee-rectangular' and \ - activity.area.selmove: + activity.area.is_selected(): if tool == "object-height": self.height_percent = spinButton.get_value_as_int() / 100. activity.area.d.resizeSelection(activity.area, @@ -839,7 +839,7 @@ class ImageToolbar(gtk.Toolbar): chooser.get_selected_object()) jobject = chooser.get_selected_object() if jobject and jobject.file_path: - self._activity.area.loadImage(jobject.file_path) + self._activity.area.load_image(jobject.file_path) finally: chooser.destroy() del chooser |