Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Features/GTK3/Porting/Log
(view source)
Revision as of 09:07, 18 July 2012
604 bytes added
,
09:07, 18 July 2012
no edit summary
Line 31:
Line 31:
def _sort_logfile(self, treemodel, itera, iterb, user_data=None):
def _sort_logfile(self, treemodel, itera, iterb, user_data=None):
+
+
= Clipboard =
+
+
* Gtk3: http://python-gtk-3-tutorial.readthedocs.org/en/latest/clipboard.html
+
** http://developer.gnome.org/gtk3/3.5/GtkTextBuffer.html#gtk-text-buffer-copy-clipboard
+
+
To integrate the clipboard of the activity with the ''MAIN'' clipboard (the Sugar one) we should obtain that clipboard:
+
+
# Clipboard of the activity
+
self.clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
+
+
And then, when the ''Copy'' button is pressed we should call this function (in the callback). The ''self.viewer.'''''active_log'' is a Gtk.TextBuffer
+
+
self.viewer.active_log.copy_clipboard(self.clipboard)
+
= Missing things =
= Missing things =
Humitos
266
edits