[pygobject] Fixup for change in buffer API
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Fixup for change in buffer API
- Date: Thu, 24 Jun 2010 20:19:01 +0000 (UTC)
commit c93935621f2fb1ff5e8c424ae884bd684ea68e50
Author: John (J5) Palmieri <johnp redhat com>
Date: Thu Jun 24 13:47:54 2010 -0400
Fixup for change in buffer API
* Part of buffer API dealing with TextIter now marked (out caller-allocates)
demos/gtk-demo/gtk-demo.py | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/demos/gtk-demo/gtk-demo.py b/demos/gtk-demo/gtk-demo.py
index 9c164dc..94d7ace 100755
--- a/demos/gtk-demo/gtk-demo.py
+++ b/demos/gtk-demo/gtk-demo.py
@@ -139,8 +139,6 @@ class GtkDemoApp(object):
Gtk.Window.set_default_icon_list(list)
def selection_cb(self, selection, model):
- start = Gtk.TextIter()
- end = Gtk.TextIter()
iter = Gtk.TreeIter()
(success, m) = selection.get_selected(iter)
@@ -154,12 +152,12 @@ class GtkDemoApp(object):
code = GLib.file_get_contents(demo.filename)[1]
# output and style the title
- self.info_buffer.get_bounds(start, end)
+ (start, end) = self.info_buffer.get_bounds()
self.info_buffer.delete(start, end)
- self.source_buffer.get_bounds(start, end)
+ (start, end) = self.source_buffer.get_bounds()
self.source_buffer.delete(start, end)
- self.info_buffer.get_iter_at_offset(start, 0)
+ start = self.info_buffer.get_iter_at_offset(0)
end = start.copy()
self.info_buffer.insert(end, title)
start = end.copy()
@@ -171,7 +169,7 @@ class GtkDemoApp(object):
self.info_buffer.insert(end, description)
# output the code
- self.source_buffer.get_iter_at_offset(start, 0)
+ start = self.source_buffer.get_iter_at_offset(0)
end = start.copy()
self.source_buffer.insert(end, code)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]