little gui fixes

This commit is contained in:
guinux 2013-04-13 14:01:50 +02:00
parent 750415c0b7
commit ec6c5d9381
2 changed files with 10 additions and 4 deletions

View File

@ -667,6 +667,7 @@
<property name="vexpand">True</property>
<property name="model">packages_list</property>
<property name="search_column">0</property>
<property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="list_treeview_selection">
@ -676,7 +677,8 @@
<child>
<object class="GtkTreeViewColumn" id="installed_column">
<property name="resizable">True</property>
<property name="sizing">autosize</property>
<property name="sizing">fixed</property>
<property name="fixed_width">100</property>
<property name="title" translatable="yes">State</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
@ -706,7 +708,8 @@
<child>
<object class="GtkTreeViewColumn" id="name_column">
<property name="resizable">True</property>
<property name="sizing">autosize</property>
<property name="sizing">fixed</property>
<property name="fixed_width">250</property>
<property name="title" translatable="yes">Name</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>
@ -724,7 +727,8 @@
<child>
<object class="GtkTreeViewColumn" id="size_column">
<property name="resizable">True</property>
<property name="sizing">autosize</property>
<property name="sizing">fixed</property>
<property name="fixed_width">50</property>
<property name="title" translatable="yes">Size</property>
<property name="clickable">True</property>
<property name="sort_indicator">True</property>

View File

@ -279,7 +279,9 @@ def set_packages_list():
def set_infos_list(pkg):
name_label.set_markup('<big><b>{} {}</b></big>'.format(pkg.name, pkg.version))
desc_label.set_markup(pkg.desc)
# fix & in desc
desc = pkg.desc.replace('&', '&amp;')
desc_label.set_markup(desc)
# fix & in url
url = pkg.url.replace('&', '&amp;')
link_label.set_markup('<a href=\"{_url}\">{_url}</a>'.format(_url = url))