From 3117e65687d4d23a06ebfe3f7fc84f41c1555754 Mon Sep 17 00:00:00 2001 From: bigpod Date: Sun, 6 Mar 2005 03:01:34 +0000 Subject: [PATCH] single click in arrow works now --- plugins/gtkgui/gtkgui.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index e9fd3e3af..421d0fb9f 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1936,6 +1936,18 @@ class roster_window: try: path, column, x, y = self.tree.get_path_at_pos(int(event.x), \ int(event.y)) + model = self.tree.get_model() + iter = model.get_iter(path) + type = model.get_value(iter, 2) + if (type == 'group'): + if (self.tree.row_expanded(path)): + if x <= self.pixbufs['opened'].get_pixbuf()\ #The integer 10 is the xoffset + .get_width()+10: + self.tree.collapse_row(path) + else: + if x <= self.pixbufs['closed'].get_pixbuf()\ + .get_width()+10: + self.tree.expand_row(path, False) except TypeError: self.tree.get_selection().unselect_all() return False