diff --git a/.gitignore b/.gitignore index b644498b..80e4f362 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ build +builddir .atom-dbg.cson .vscode *~ diff --git a/data/com.github.stsdc.monitor.appdata.xml.in b/data/com.github.stsdc.monitor.appdata.xml.in index 12e1c079..6c258f0d 100644 --- a/data/com.github.stsdc.monitor.appdata.xml.in +++ b/data/com.github.stsdc.monitor.appdata.xml.in @@ -25,13 +25,11 @@ https://github.com/stsdc/monitor/issues - +
    -
  • Detailed process info in sidebar
  • -
  • CPU frequency in tooltip (Ryo Nakano)
  • -
  • Removed tree view . This fixes high CPU usage, indicator hangs, and app crashes
  • -
  • Special thanks to gavr, Ryo Nakano, Adam Bieńkowski and Daniele Cocca
  • +
  • Small bugfix
  • +
  • Added tooltips (Ryo Nakano)
diff --git a/debian/changelog b/debian/changelog index 512c2936..05a09882 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +com.github.stsdc.monitor (0.7.3) bionic; urgency=low + + * Added tooltips to process state label (Ryo Nakano) + * Small bugfix + +-- Stanisław Dac Mon, 22 Jun 2020 20:21:37 +0200 + com.github.stsdc.monitor (0.7.2) bionic; urgency=low * Fix sorting arrows @@ -5,7 +12,9 @@ com.github.stsdc.monitor (0.7.2) bionic; urgency=low * Add Turkish translation (Harun Yasar) * Use newest version of live-chart (Laurent Callarec) ← Check his lib for creating charts, it's amazing! -com.github.stsdc.monitor (0.7.1) bionic; urgency=low +-- Stanisław Dac Sat, 11 Apr 2020 21:01:15 +0200 + +com.github.stsdc.monitor (0.7.0) bionic; urgency=low * Detailed process info in sidebar * CPU frequency in tooltip (Ryo Nakano) diff --git a/meson.build b/meson.build index 0416e108..bc29b153 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,4 @@ - -project('com.github.stsdc.monitor', 'vala', 'c', version: '0.7.2') +project('com.github.stsdc.monitor', 'vala', 'c', version: '0.7.3') # these are Meson modules gnome = import('gnome') diff --git a/src/Managers/ProcessStructs.vala b/src/Managers/ProcessStructs.vala index 335085fb..9e1b17fe 100644 --- a/src/Managers/ProcessStructs.vala +++ b/src/Managers/ProcessStructs.vala @@ -61,6 +61,16 @@ public struct Monitor.ProcessStatus { // swapped out. public string comm; + // Should contain one of the following value: + // D uninterruptible sleep (usually IO) + // I Idle kernel thread + // R running or runnable (on run queue) + // S interruptible sleep (waiting for an event to complete) + // T stopped by job control signal + // t stopped by debugger during the tracing + // W paging (not valid since the 2.6.xx kernel) + // X dead (should never be seen) + // Z defunct ("zombie") process, terminated but not reaped by its parent public string state; // The PID of the parent of this process. diff --git a/src/Managers/ProcessUtils.vala b/src/Managers/ProcessUtils.vala index f766461f..58729aa9 100644 --- a/src/Managers/ProcessUtils.vala +++ b/src/Managers/ProcessUtils.vala @@ -9,7 +9,9 @@ public class Monitor.ProcessUtils { return false; } - public static string sanitize_commandline (string commandline) { + public static string sanitize_commandline (string? commandline) { + if (commandline == null) return Path.get_basename (""); + // splitting command; might include many options var splitted_commandline = commandline.split (" "); diff --git a/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala b/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala index 3ec0055d..aa072fbf 100644 --- a/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala +++ b/src/Views/ProcessView/ProcessInfoView/ProcessInfoHeader.vala @@ -70,8 +70,6 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { username.val.get_style_context ().add_class ("username-root"); username.val.get_style_context ().remove_class ("username-other"); username.val.get_style_context ().remove_class ("username-current"); - - } else if (process.uid == (int)Posix.getuid ()) { username.val.get_style_context ().add_class ("username-current"); username.val.get_style_context ().remove_class ("username-other"); @@ -85,6 +83,7 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { username.set_text (process.username); num_threads.set_text (process.stat.num_threads.to_string()); state.set_text (process.stat.state); + state.tooltip_text = set_state_tooltip (); num_threads.set_text (process.stat.num_threads.to_string()); set_icon (process); } @@ -104,4 +103,25 @@ public class Monitor.ProcessInfoHeader : Gtk.Grid { } } } + + private string set_state_tooltip () { + switch (state.label) { + case "D": + return _("The app is waiting in an uninterruptible disk sleep"); + case "I": + return _("Idle kernel thread"); + case "R": + return _("The process is running or runnable (on run queue)"); + case "S": + return _("The process is in an interruptible sleep; waiting for an event to complete"); + case "T": + return _("The process is stopped by a job control signal"); + case "t": + return _("The process is stopped stopped by a debugger during the tracing"); + case "Z": + return _("The app is terminated but not reaped by its parent"); + default: + return ""; + } + } } \ No newline at end of file diff --git a/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala b/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala index f5af8f20..149c910f 100644 --- a/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala +++ b/src/Views/ProcessView/ProcessTreeView/CPUProcessTreeView.vala @@ -199,7 +199,7 @@ public class Monitor.CPUProcessTreeView : Gtk.TreeView { tree_model.get (iter, Column.PID, out pid); Process process = model.process_manager.get_process (pid); process_selected (process); - debug ("cursor changed"); + // debug ("cursor changed"); } } } diff --git a/src/Widgets/Headerbar/Search.vala b/src/Widgets/Headerbar/Search.vala index f698e338..857c8088 100644 --- a/src/Widgets/Headerbar/Search.vala +++ b/src/Widgets/Headerbar/Search.vala @@ -47,6 +47,10 @@ namespace Monitor { int pid_haystack; bool found = false; var needle = this.text; + + // should help with assertation errors, donno + // if (needle == null) return true; + if ( needle.length == 0 ) { return true; }