parent
936a8392d5
commit
ee6fb42258
|
@ -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
|
||||
|
|
|
@ -2262,14 +2262,14 @@
|
|||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<signal name="destroy" handler="on_agent_browser_window_destroy" last_modification_time="Tue, 01 Mar 2005 14:19:07 GMT"/>
|
||||
<signal name="destroy" handler="on_service_discovery_window_destroy" last_modification_time="Sun, 27 Mar 2005 18:05:35 GMT"/>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox11">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="spacing">5</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2942">
|
||||
|
@ -2336,12 +2336,11 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow9">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
|
|
Loading…
Reference in New Issue