Skip to content

Commit 82b3afc

Browse files
committed
get_sorting_state returns sortings state of columns
1 parent b8d0af3 commit 82b3afc

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,17 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView {
211211
}
212212
}
213213

214-
public void get_sorting_state () {
215-
var columns = this.get_columns ();
214+
public string get_sorting_state () {
215+
string sorting_state = "";
216216

217217
foreach (var column in columns) {
218-
var sort_column_id = column.get_sort_column_id ();
219-
var sort_order = column.get_sort_order ();
220-
var ind = column.sort_indicator;
221-
debug ("sort_column_id: %d sort_order: %d, indicator: %s", sort_column_id, sort_order, ind.to_string ());
218+
int sort_indicator = column.sort_indicator ? 1 : 0;
219+
sorting_state += "%d%d".printf (sort_indicator, column.get_sort_order ());
220+
222221
}
222+
debug ("Sorting state: " + sorting_state);
223+
224+
return sorting_state;
223225
}
224226

225227
public void set_sorting_state () {

0 commit comments

Comments
 (0)