[gnome-system-monitor] Search text in PID and arguments
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Search text in PID and arguments
- Date: Mon, 29 Jun 2015 20:09:58 +0000 (UTC)
commit 438c0a31359be0702f47ba5af77a59df24ff9f8f
Author: Robert Roth <robert roth off gmail com>
Date: Mon Jun 29 23:09:45 2015 +0300
Search text in PID and arguments
src/proctable.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/proctable.cpp b/src/proctable.cpp
index cd848f9..2caeaf2 100644
--- a/src/proctable.cpp
+++ b/src/proctable.cpp
@@ -212,17 +212,26 @@ iter_matches_search_key (GtkTreeModel *model, GtkTreeIter *iter, const gchar *ke
{
char *name;
char *user;
+ pid_t pid;
+ char *pids;
+ char *args;
gboolean found;
gtk_tree_model_get (model, iter,
COL_NAME, &name,
COL_USER, &user,
+ COL_PID, &pid,
+ COL_ARGS, &args,
-1);
- found = (name && strcasestr (name, key)) || (user && strcasestr (user, key));
+ pids = g_strdup_printf ("%d", pid);
+ found = (name && strcasestr (name, key)) || (user && strcasestr (user, key))
+ || (pids && strcasestr (pids, key)) || (args && strcasestr (args, key));
g_free (name);
g_free (user);
+ g_free (args);
+ g_free (pids);
return found;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]