Mercurial > libervia-backend
comparison frontends/src/primitivus/primitivus @ 608:ea9aa51234eb
Primitivus: fixed contacts list (un)hidding
fix bug 17
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 24 Feb 2013 15:29:31 +0100 |
parents | c123dddaea6b |
children | 84a6e83157c2 |
comparison
equal
deleted
inserted
replaced
607:c123dddaea6b | 608:ea9aa51234eb |
---|---|
148 | 148 |
149 elif input == 'ctrl d' and 'D' in self.bridge.getVersion(): #Debug only for dev versions | 149 elif input == 'ctrl d' and 'D' in self.bridge.getVersion(): #Debug only for dev versions |
150 self.debug() | 150 self.debug() |
151 elif input == 'f2': #user wants to (un)hide the contact_list | 151 elif input == 'f2': #user wants to (un)hide the contact_list |
152 try: | 152 try: |
153 center_widgets = self.center_part.widget_list | 153 for wid, options in self.center_part.contents: |
154 if self.contact_list in center_widgets: | 154 if self.contact_list is wid: |
155 self.center_part.set_focus(0) #necessary as the focus change to the next object, we can go out of range if we are on the last object of self.center_part | 155 self.center_part.contents.remove((wid, options)) |
156 center_widgets.remove(self.contact_list) | 156 break |
157 del self.center_part.column_types[0] | |
158 else: | 157 else: |
159 self.center_part.contents.insert(0, (self.contact_list, ('weight', 2, False))) | 158 self.center_part.contents.insert(0, (self.contact_list, ('weight', 2, False))) |
160 except AttributeError: | 159 except AttributeError: |
161 #The main widget is not built (probably in Profile Manager) | 160 #The main widget is not built (probably in Profile Manager) |
162 pass | 161 pass |