View | Details | Raw Unified | Return to bug 217241
Collapse All | Expand All

(-)x11/xfce4-taskmanager/files/patch-src_process-tree-view.c (+19 lines)
Line 0 Link Here
1
--- src/process-tree-view.c.orig	2017-02-05 21:41:57 UTC
2
+++ src/process-tree-view.c
3
@@ -397,6 +397,8 @@ cb_send_signal (GtkMenuItem *mi, gpointe
4
 		GtkTreeSelection *selection;
5
 		GtkWidget *treeview;
6
 		treeview = g_object_get_data (G_OBJECT (mi), "treeview");
7
+		if (NULL == treeview)
8
+			return;
9
 		selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
10
 		gtk_tree_selection_unselect_all (selection);
11
 	}
12
@@ -451,6 +453,7 @@ build_context_menu (XtmProcessTreeView *
13
 
14
 	mi = gtk_menu_item_new_with_label (_("Kill"));
15
 	g_object_set_data (G_OBJECT (mi), "pid", GUINT_TO_POINTER (pid));
16
+	g_object_set_data (G_OBJECT (mi), "treeview", treeview);
17
 	gtk_container_add (GTK_CONTAINER (menu), mi);
18
 	g_signal_connect (mi, "activate", G_CALLBACK (cb_send_signal), GINT_TO_POINTER (XTM_SIGNAL_KILL));
19
 
(-)x11/xfce4-taskmanager/files/patch-src_task-manager-freebsd.c (+46 lines)
Line 0 Link Here
1
--- src/task-manager-freebsd.c.orig	2017-01-23 06:53:01 UTC
2
+++ src/task-manager-freebsd.c
3
@@ -26,11 +26,11 @@
4
 
5
 #include "task-manager.h"
6
 
7
-gulong
8
+guint64
9
 get_mem_by_bytes (const gchar *name)
10
 {
11
-	gulong buf;
12
-	gsize len = sizeof (gulong);
13
+	guint64 buf = 0;
14
+	gsize len = sizeof (buf);
15
 
16
 	if (sysctlbyname (name, &buf, &len, NULL, 0) < 0)
17
 		return 0;
18
@@ -41,13 +41,13 @@ get_mem_by_bytes (const gchar *name)
19
 guint64
20
 get_mem_by_pages (const gchar *name)
21
 {
22
-	gulong res;
23
+	guint64 res;
24
 
25
 	res = get_mem_by_bytes (name);
26
 	if (res > 0)
27
 		res = res * getpagesize ();
28
 
29
-	return (guint64) res;
30
+	return res;
31
 }
32
 
33
 gboolean
34
@@ -55,10 +55,10 @@ get_memory_usage (guint64 *memory_total,
35
 {
36
 	/* Get memory usage */
37
 	{
38
-		*memory_total = (guint64) get_mem_by_bytes ("hw.physmem");;
39
+		*memory_total = get_mem_by_bytes ("hw.physmem");;
40
 		*memory_free = get_mem_by_pages ("vm.stats.vm.v_free_count");
41
 		*memory_cache = get_mem_by_pages ("vm.stats.vm.v_inactive_count");
42
-		*memory_buffers = (guint64) get_mem_by_bytes ("vfs.bufspace");
43
+		*memory_buffers = get_mem_by_bytes ("vfs.bufspace");
44
 	}
45
 
46
 	/* Get swap usage */

Return to bug 217241