diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 8ce06ab99..1298a1fa2 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -1549,6 +1549,9 @@ class Service_discovery_window: iter = model.iter_next(iter) if not iter: #If it is not, we stop return + expand = False + if len(model.get_path(iter)) == 1: + expand = True for item in items: if not item.has_key('name'): continue @@ -1561,14 +1564,16 @@ class Service_discovery_window: if not iter_child: # If it is not we add it iter_child = model.append(iter, (item['name'], item['jid'])) self.agent_infos[item['jid']] = {'identities': [item]} - if self.iter_is_visible(iter_child): + if self.iter_is_visible(iter_child) or expand: self.browse(item['jid']) + if expand: + self.agents_treeview.expand_row((model.get_path(iter)), False) def agent_info(self, agent, identities, features, items): """When we recieve informations about an agent""" model = self.agents_treeview.get_model() iter = model.get_iter_root() - expand = 0 + expand = False # We look if this agent is in the treeview while (iter): if agent == model.get_value(iter, 1): @@ -1583,7 +1588,7 @@ class Service_discovery_window: if not iter: #If it is not we add it iter = model.append(None, (agent, agent)) self.agent_infos[agent] = {'features' : []} - expand = 1 + expand = True self.agent_infos[agent]['features'] = features if len(identities): self.agent_infos[agent]['identities'] = identities diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index b3aca8135..507cf6270 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -2262,14 +2262,14 @@ False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST - + 5 True False - 0 + 5 @@ -2336,12 +2336,11 @@ - 5 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE + GTK_SHADOW_ETCHED_IN GTK_CORNER_TOP_LEFT