Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Features/GTK3/Porting/InfoSlicer
(view source)
Revision as of 07:15, 12 July 2012
458 bytes added
,
07:15, 12 July 2012
→Code Snippets
Line 140:
Line 140:
[Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 80)],
[Gtk.TargetEntry.new('text/plain', Gtk.TargetFlags.SAME_APP, 80)],
Gdk.DragAction.COPY)
Gdk.DragAction.COPY)
+
+
== Gtk.TextView.scroll_to_iter ==
+
+
* gtk2: http://www.pygtk.org/docs/pygtk/class-gtktextview.html#method-gtktextview--scroll-to-iter
+
* Gtk3: http://developer.gnome.org/gtk3/3.5/GtkTextView.html#gtk-text-view-scroll-to-iter
+
+
This method in gtk2 takes only 2 required arguments but in Gtk3 all of them (5) are required. So, I had to change the call to this method:
+
+
self.scroll_to_iter(mouseiter, 0)
+
+
by:
+
+
self.scroll_to_iter(mouseiter, 0, False, 0.5, 0.5)
= Gdk.atom_intern =
= Gdk.atom_intern =
Humitos
266
edits