always expand lines in disco window, increase default disco window width. Fixes #3877

This commit is contained in:
Yann Leboulanger 2009-09-10 13:54:44 +02:00
parent 8b528e512f
commit 7d7ca4d4ae
2 changed files with 27 additions and 24 deletions

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--*- mode: xml -*-->
<?xml version="1.0"?>
<glade-interface>
<!-- interface-requires gtk+ 2.14 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="service_discovery_window">
<property name="border_width">6</property>
<property name="role">Service Discovery</property>
<property name="default_width">450</property>
<property name="default_width">550</property>
<property name="default_height">420</property>
<signal name="destroy" handler="on_service_discovery_window_destroy"/>
<child>
@ -28,6 +28,9 @@
Agent JID - node</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkImage" id="banner_agent_icon">
@ -47,6 +50,7 @@ Agent JID - node</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
@ -55,22 +59,12 @@ Agent JID - node</property>
<property name="n_rows">3</property>
<property name="n_columns">3</property>
<property name="column_spacing">6</property>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkComboBoxEntry" id="address_comboboxentry">
<property name="visible">True</property>
<property name="items" translatable="yes"></property>
<signal name="changed" handler="on_address_comboboxentry_changed"/>
<signal name="key_press_event" handler="on_address_comboboxentry_key_press_event"/>
<child internal-child="entry">
<widget class="GtkEntry" id="comboboxentry-entry1">
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
@ -86,7 +80,7 @@ Agent JID - node</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="response_id">0</property>
<property name="receives_default">False</property>
<signal name="clicked" handler="on_go_button_clicked"/>
<child>
<widget class="GtkAlignment" id="alignment93">
@ -105,6 +99,7 @@ Agent JID - node</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
@ -145,6 +140,12 @@ Agent JID - node</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="expand">False</property>
@ -155,9 +156,9 @@ Agent JID - node</property>
<widget class="GtkScrolledWindow" id="services_scrollwin">
<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_ETCHED_IN</property>
<property name="hscrollbar_policy">automatic</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">etched-in</property>
<child>
<widget class="GtkTreeView" id="services_treeview">
<property name="visible">True</property>
@ -184,6 +185,7 @@ Agent JID - node</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
@ -200,19 +202,20 @@ Agent JID - node</property>
<property name="spacing">6</property>
<child>
<widget class="GtkButton" id="close_button">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="can_default">True</property>
<property name="label">gtk-close</property>
<property name="receives_default">False</property>
<property name="use_stock">True</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_close_button_clicked"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</widget>

View File

@ -1137,11 +1137,11 @@ class ToplevelAgentBrowser(AgentBrowser):
# Icon Renderer
renderer = gtk.CellRendererPixbuf()
renderer.set_property('xpad', 6)
col.pack_start(renderer, expand = False)
col.pack_start(renderer, expand=False)
col.set_cell_data_func(renderer, self._pixbuf_renderer_data_func)
# Text Renderer
renderer = gtk.CellRendererText()
col.pack_start(renderer, expand = True)
col.pack_start(renderer, expand=True)
col.set_cell_data_func(renderer, self._text_renderer_data_func)
renderer.set_property('foreground', 'dark gray')
# Save this so we can go along with theme changes
@ -1487,7 +1487,7 @@ class ToplevelAgentBrowser(AgentBrowser):
if not cat:
cat = self._create_category(*cat_args)
self.model.append(cat, (jid, node, pix, descr, 1))
self._expand_all()
gobject.idle_add(self._expand_all)
# Grab info on the service
self.cache.get_info(jid, node, self._agent_info, force=force)
self._update_progressbar()