[pygobject] Override Gtk.TreeSelection.get_selected to not return success value.
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Override Gtk.TreeSelection.get_selected to not return success value.
- Date: Mon, 11 Oct 2010 17:56:52 +0000 (UTC)
commit 28f9366c9cb382801bad080864f667c867daa3c7
Author: Sebastian Pölsterl <sebp k-d-w org>
Date: Sat Oct 9 17:40:40 2010 +0200
Override Gtk.TreeSelection.get_selected to not return success value.
https://bugzilla.gnome.org/show_bug.cgi?id=631765
gi/overrides/Gtk.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 026940d..20c01a6 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -427,6 +427,18 @@ class TreeViewColumn(Gtk.TreeViewColumn):
TreeViewColumn = override(TreeViewColumn)
__all__.append('TreeViewColumn')
+class TreeSelection(Gtk.TreeSelection):
+
+ def get_selected(self):
+ success, model, aiter = super(TreeSelection, self).get_selected()
+ if success:
+ return (model, aiter)
+ else:
+ return (model, None)
+
+TreeSelection = override(TreeSelection)
+__all__.append('TreeSelection')
+
class Button(Gtk.Button):
def __init__(self, label=None, stock=None, use_underline=False):
if stock:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]