aboutsummaryrefslogtreecommitdiff
path: root/sysutils/gnomesystemmonitor/files
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-12-07 03:16:20 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-12-07 03:16:20 +0000
commitbd5d67b6b91f5e395471be4da2d54592d041e8cb (patch)
tree7ba1d85116cdb39ce5576c9ff3e27ba025511832 /sysutils/gnomesystemmonitor/files
parent44a659cab4b27b73dddac3e9632f01bbdbd2d629 (diff)
downloadports-bd5d67b6b91f5e395471be4da2d54592d041e8cb.tar.gz
ports-bd5d67b6b91f5e395471be4da2d54592d041e8cb.zip
Notes
Diffstat (limited to 'sysutils/gnomesystemmonitor/files')
-rw-r--r--sysutils/gnomesystemmonitor/files/patch-src::proctable.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sysutils/gnomesystemmonitor/files/patch-src::proctable.c b/sysutils/gnomesystemmonitor/files/patch-src::proctable.c
index 05f4c5384caf..30ef6303d397 100644
--- a/sysutils/gnomesystemmonitor/files/patch-src::proctable.c
+++ b/sysutils/gnomesystemmonitor/files/patch-src::proctable.c
@@ -1,6 +1,6 @@
---- src/proctable.c.orig Mon Jul 19 10:02:09 2004
-+++ src/proctable.c Mon Jul 19 10:08:18 2004
-@@ -563,6 +563,9 @@
+--- src/proctable.c.orig Sun Nov 21 18:03:12 2004
++++ src/proctable.c Mon Dec 6 22:10:55 2004
+@@ -535,6 +535,9 @@
glibtop_get_proc_uid (&procuid, pid);
glibtop_get_proc_time (&proctime, pid);
newcputime = proctime.utime + proctime.stime;
@@ -9,8 +9,8 @@
+ }
model = gtk_tree_view_get_model (GTK_TREE_VIEW (procdata->tree));
- wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
-@@ -667,6 +670,10 @@
+ wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
+@@ -645,6 +648,10 @@
glibtop_get_proc_uid (&procuid, pid);
glibtop_get_proc_time (&proctime, pid);
newcputime = proctime.utime + proctime.stime;
@@ -19,12 +19,12 @@
+ }
+
- wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
- pid,
-@@ -761,6 +768,12 @@
- return FALSE;
+ wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
+ pid,
+@@ -745,6 +752,12 @@
}
+
+static int
+pid_compare(const void* first, const void* second)
+{
@@ -32,18 +32,18 @@
+}
+
static void
- refresh_list (ProcData *data, unsigned *pid_list, gint n)
+ refresh_list (ProcData *data, const unsigned *pid_list, guint n)
{
-@@ -769,6 +782,8 @@
+@@ -754,6 +767,8 @@
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (procdata->tree));
- gint i = 0;
-
-+ qsort(pid_list, n, sizeof (*pid_list), pid_compare);
+ guint i;
+
++ qsort (pid_list, n, sizeof (*pid_list), pid_compare);
+
/* Add or update processes */
- while (i < n) {
+ for(i = 0; i < n; ++i) {
ProcInfo *info;
-@@ -862,6 +877,9 @@
+@@ -837,6 +852,9 @@
** should probably have a total_time_last gint in the ProcInfo structure */
glibtop_get_cpu (&cpu);
total_time = cpu.total - total_time_last;
@@ -51,5 +51,5 @@
+ total_time /= (cpu.frequency/100);
+ }
total_time_last = cpu.total;
-
- refresh_list (procdata, pid_list, n);
+
+ refresh_list (procdata, pid_list, proclist.number);