fix #152, make columns sortable in updater

This commit is contained in:
guinux 2016-08-25 09:48:35 +02:00
parent a15669fdf4
commit 6660e832f1
2 changed files with 20 additions and 4 deletions

View File

@ -116,8 +116,8 @@
<object class="GtkTreeView" id="repos_updates_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_clickable">False</property>
<property name="search_column">1</property>
<property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection">
@ -131,6 +131,8 @@
<property name="fixed_width">50</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">State</property>
<property name="clickable">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererToggle" id="repos_select_update">
<signal name="toggled" handler="on_repos_select_update_toggled" swapped="no"/>
@ -149,6 +151,8 @@
<property name="min_width">20</property>
<property name="title" translatable="yes">Name</property>
<property name="expand">True</property>
<property name="clickable">True</property>
<property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererText" id="repos_update_name"/>
<attributes>
@ -164,6 +168,8 @@
<property name="fixed_width">250</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Version</property>
<property name="clickable">True</property>
<property name="sort_column_id">2</property>
<child>
<object class="GtkCellRendererText" id="repos_update_new_version"/>
<attributes>
@ -185,6 +191,8 @@
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Repository</property>
<property name="clickable">True</property>
<property name="sort_column_id">4</property>
<child>
<object class="GtkCellRendererText" id="repos_update_repo"/>
<attributes>
@ -200,6 +208,8 @@
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Size</property>
<property name="clickable">True</property>
<property name="sort_column_id">6</property>
<child>
<object class="GtkCellRendererText" id="repos_update_size"/>
<attributes>
@ -226,8 +236,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<property name="headers_clickable">False</property>
<property name="search_column">1</property>
<property name="fixed_height_mode">True</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2">
@ -241,6 +251,8 @@
<property name="fixed_width">40</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">State</property>
<property name="clickable">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererToggle" id="aur_select_update">
<signal name="toggled" handler="on_aur_select_update_toggled" swapped="no"/>
@ -259,6 +271,8 @@
<property name="min_width">20</property>
<property name="title" translatable="yes">Name</property>
<property name="expand">True</property>
<property name="clickable">True</property>
<property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererText" id="aur_update_name"/>
<attributes>
@ -274,6 +288,8 @@
<property name="fixed_width">250</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Version</property>
<property name="clickable">True</property>
<property name="sort_column_id">2</property>
<child>
<object class="GtkCellRendererText" id="aur_update_new_version"/>
<attributes>

View File

@ -89,7 +89,7 @@ namespace Pamac {
transaction = new Transaction (this as Gtk.ApplicationWindow);
transaction.mode = Mode.UPDATER;
transaction.start_transaction.connect (on_start_transaction);
transaction.important_details_outpout.connect (on_important_details_outpout);
transaction.important_details_outpout.connect (on_important_details_output);
transaction.finished.connect (populate_updates_list);
transaction.get_updates_finished.connect (on_get_updates_finished);
transaction.generate_mirrors_list.connect (on_generate_mirrors_list);
@ -259,7 +259,7 @@ namespace Pamac {
cancel_button.sensitive = false;
}
void on_important_details_outpout (bool must_show) {
void on_important_details_output (bool must_show) {
if (must_show) {
stackswitcher.visible = false;
previous_visible_child_name = stack.visible_child_name;