Logo Search packages:      
Sourcecode: gajim version File versions  Download package

def roster_window::RosterWindow::on_roster_treeview_row_expanded (   self,

When a row is expanded change the icon of the arrow

Definition at line 2529 of file roster_window.py.

02529                                                                    :
            '''When a row is expanded change the icon of the arrow'''
            model = self.tree.get_model()
            if gajim.config.get('mergeaccounts'):
                  accounts = gajim.connections.keys()
                  accounts = [model[iter][C_ACCOUNT].decode('utf-8')]
            type = model[iter][C_TYPE]
            if type == 'group':
                  model.set_value(iter, 0, self.jabber_state_images['16']['opened'])
                  jid = model[iter][C_JID].decode('utf-8')
                  for account in accounts:
                        if gajim.groups[account].has_key(jid): # This account has this group
                              gajim.groups[account][jid]['expand'] = True
                              if account + jid in self.collapsed_rows:
                                    self.collapsed_rows.remove(account + jid)
            elif type == 'account':
                  account = accounts[0] # There is only one cause we don't use merge
                  if account in self.collapsed_rows:
                  for g in gajim.groups[account]:
                        groupIter = self.get_group_iter(g, account)
                        if groupIter and gajim.groups[account][g]['expand']:
                              pathG = model.get_path(groupIter)
                              self.tree.expand_row(pathG, False)
            elif type == 'contact':
                  jid =  model[iter][C_JID].decode('utf-8')
                  account = model[iter][C_ACCOUNT].decode('utf-8')
                  self.draw_contact(jid, account)

      def on_roster_treeview_row_collapsed(self, widget, iter, path):

Generated by  Doxygen 1.6.0   Back to index