Add an option for saving clipboard objects to the Journal.

This commit is contained in:
Tomeu Vizoso
2007-06-17 20:55:16 +02:00
parent d4323957a1
commit 1afe9273a1
8 changed files with 184 additions and 60 deletions
+17 -2
View File
@@ -1,3 +1,18 @@
# Copyright (C) 2007, One Laptop Per Child
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import shutil
import os
import logging
@@ -135,7 +150,7 @@ class ClipboardBox(hippo.CanvasBox):
def _clipboard_data_get_cb(self, clipboard, selection, info, data):
object_id = self._selected_icon.get_object_id()
cb_service = clipboardservice.get_instance()
data = cb_service.get_object_data(object_id, selection.target)
data = cb_service.get_object_data(object_id, selection.target)['DATA']
selection.set(selection.target, 8, data)
@@ -204,7 +219,7 @@ class ClipboardBox(hippo.CanvasBox):
object_id = self._last_clicked_icon.get_object_id()
cb_service = clipboardservice.get_instance()
data = cb_service.get_object_data(object_id, selection.target)
data = cb_service.get_object_data(object_id, selection.target)['DATA']
selection.set(selection.target, 8, data)
+15
View File
@@ -1,3 +1,18 @@
# Copyright (C) 2007, One Laptop Per Child
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import logging
import gtk
import hippo