foiegras r62 - in trunk: . src/foiegras/windows



Author: denisw
Date: Mon Mar 10 10:54:55 2008
New Revision: 62
URL: http://svn.gnome.org/viewvc/foiegras?rev=62&view=rev

Log:
2008-03-10  Denis Washington  <denisw svn gnome org>

	* src/foiegras/buffer/main.py:
	Implement cut, copy, paste actions.


Modified:
   trunk/ChangeLog
   trunk/src/foiegras/windows/main.py

Modified: trunk/src/foiegras/windows/main.py
==============================================================================
--- trunk/src/foiegras/windows/main.py	(original)
+++ trunk/src/foiegras/windows/main.py	Mon Mar 10 10:54:55 2008
@@ -128,9 +128,9 @@
             ('QuitAction', gtk.STOCK_QUIT, _("_Quit"), None, _(""), self.quit),
             ('UndoAction', gtk.STOCK_UNDO, _("_Undo"), "<Ctrl>Z", _("Undo the last action"), self.dummy_action),
             ('RedoAction', gtk.STOCK_REDO, _("_Redo"), "<Ctrl>Y", _("Redo the last undone action"), self.dummy_action),
-            ('CutAction', gtk.STOCK_CUT, _("Cu_t"), None, _("Cut the selection"), self.dummy_action),
-            ('CopyAction', gtk.STOCK_COPY, _("_Copy"), None, _("Copy the selection"), self.dummy_action),
-            ('PasteAction', gtk.STOCK_PASTE, _("_Paste"), None, _("Paste the clipboard"), self.dummy_action),
+            ('CutAction', gtk.STOCK_CUT, _("Cu_t"), None, _("Cut the selection"), self.cut),
+            ('CopyAction', gtk.STOCK_COPY, _("_Copy"), None, _("Copy the selection"), self.copy),
+            ('PasteAction', gtk.STOCK_PASTE, _("_Paste"), None, _("Paste the clipboard"), self.paste),
             ('PreferencesAction', gtk.STOCK_PREFERENCES, _("_Preferences"), None, _(""), self.show_preferences),
             ('InsertAction', gtk.STOCK_ADD, _("Insert"), None, _(""), self.dummy_action),
             ('CitationAction', None, _("_Citation"), None, _(""), self.apply_block_tag),
@@ -731,6 +731,15 @@
         self._window.show_all()
 
 
+    def cut(self, action):
+        self._document._buffer.cut_clipboard(gtk.Clipboard(), True)
+
+    def copy(self, action):
+        self._document._buffer.copy_clipboard(gtk.Clipboard())
+
+    def paste(self, action):
+        self._document._buffer.paste_clipboard(gtk.Clipboard(), None, True)
+
     def show_preferences(self, action):
         """
         Show the Preferences dialog.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]