Skip to content

Commit

Permalink
Fixed position of seperator line in Usage and fixed bandwidth process…
Browse files Browse the repository at this point in the history
… icons
  • Loading branch information
babluboy committed Nov 6, 2016
1 parent e09a319 commit 38f80de
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/nutty.vala
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ namespace NuttyApp {
bandwidth_results_box.pack_start (bandwidth_results_label, false, true, 0);

TreeView bandwidth_table_treeview = new TreeView();
bandwidth_table_treeview.set_fixed_height_mode(true);
//bandwidth_table_treeview.set_fixed_height_mode(false);
CellRendererText bandwidth_cell = new CellRendererText ();
bandwidth_table_treeview.insert_column_with_attributes (-1, Constants.TEXT_FOR_BANDWIDTH_COLUMN_NAME_1, bandwidth_cell, "text", 0);
bandwidth_table_treeview.insert_column_with_attributes (-1, Constants.TEXT_FOR_BANDWIDTH_COLUMN_NAME_2, bandwidth_cell, "text", 1);
Expand Down Expand Up @@ -644,7 +644,7 @@ namespace NuttyApp {
Box bandwidth_layout_box = new Box (Orientation.VERTICAL, Constants.SPACING_WIDGETS);
bandwidth_layout_box.pack_start (bandwidth_results_box, false, true, 0);
bandwidth_layout_box.pack_start (bandwidth_scroll, true, true, 0);
bandwidth_layout_box.pack_start (bandwidth_separator, true, true, 0);
bandwidth_layout_box.pack_start (bandwidth_separator, false, false, 0);
bandwidth_layout_box.pack_start (bandwidth_process_result_box, false, false, 0);
bandwidth_layout_box.pack_end (bandwidth_process_scroll, true, true, 0);

Expand All @@ -671,7 +671,7 @@ namespace NuttyApp {
bandwidthProcessTreeModelFilter = new Gtk.TreeModelFilter (processBandwidthApps(bandwidth_combobox.get_active_id ()), null);
setFilterAndSort(bandwidth_process_table_treeview, bandwidthProcessTreeModelFilter, SortType.DESCENDING);
});
//Add devices-box to stack
//Add bandwidth-box to stack
stack.add_titled(bandwidth_layout_box, "bandwidth", Constants.TEXT_FOR_BANDWIDTH_TAB);
debug("Bandwidth tab set up completed...");

Expand Down Expand Up @@ -2031,6 +2031,15 @@ namespace NuttyApp {
aProcessName.append(processNameAttributes[0]);
}
if(!processNames.str.contains(aProcessName.str)){
//break the process name further if possible
if(aProcessName.str.contains(" ")){
processNames.append(aProcessName.str);
aProcessName.assign(aProcessName.str.split (" ",-1)[0]);
}
if(aProcessName.str.contains("--")){
processNames.append(aProcessName.str);
aProcessName.assign(aProcessName.str.split ("--",-1)[0]);
}
// Get the icon:
try {
app_icon = icon_theme.load_icon (aProcessName.str, 16, 0);
Expand Down

0 comments on commit 38f80de

Please sign in to comment.