use the width of the first CellRenderer instead of the width of the pixbuf
less deep indentation
This commit is contained in:
parent
d6fcb4011c
commit
b1d7152bdd
2 changed files with 13 additions and 13 deletions
|
@ -8181,6 +8181,7 @@ Custom</property>
|
|||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
<signal name="scroll_child" handler="on_conversation_scrolledwindow_scroll_child" last_modification_time="Sat, 05 Mar 2005 16:20:42 GMT"/>
|
||||
<signal name="move_focus_out" handler="on_conversation_scrolledwindow_move_focus_out" last_modification_time="Sun, 06 Mar 2005 01:28:04 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTextView" id="conversation_textview">
|
||||
|
|
|
@ -1936,21 +1936,20 @@ 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)):
|
||||
#The integer 10 is the xoffset
|
||||
if x <= self.pixbufs['opened'].get_pixbuf()\
|
||||
.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
|
||||
model = self.tree.get_model()
|
||||
iter = model.get_iter(path)
|
||||
type = model.get_value(iter, 2)
|
||||
if (type == 'group'): #FIXME: what about doing the same with accounts ?
|
||||
# The integer 30 is the width of the first CellRenderer (see
|
||||
# iconCellDataFunc function)
|
||||
if x <= 30:
|
||||
if (self.tree.row_expanded(path)):
|
||||
self.tree.collapse_row(path)
|
||||
else:
|
||||
self.tree.expand_row(path, False)
|
||||
return False
|
||||
|
||||
def on_req_usub(self, widget, user, account):
|
||||
|
|
Loading…
Add table
Reference in a new issue