patches/gnome-system-monitor-01-solaris.diff
author dcarbery
Fri, 24 Nov 2006 16:56:15 +0000
changeset 8628 c3b3c1d14139
parent 8569 bcdeb66705af
child 8689 9962c13009ca
permissions -rw-r--r--
Merged 217update branch changes r9777:9830 into trunk branch.

diff -Nrup gnome-system-monitor-2.16.1/src/callbacks.c gnome-system-monitor-2.16.1.mod/src/callbacks.c
--- gnome-system-monitor-2.16.1/src/callbacks.c	2006-07-14 03:24:49.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/callbacks.c	2006-11-13 20:26:32.071084000 +0800
@@ -452,7 +452,11 @@ cb_timeout (gpointer data)
 		return FALSE;
 	}
 
-	return TRUE;
+       procdata->timeout = g_timeout_add(new_interval,
+                                         cb_timeout,
+                                         procdata);
+
+       return FALSE;
 }
 
 
diff -Nrup gnome-system-monitor-2.17.2.1/src/callbacks.h gnome-system-monitor-2.17.2.1.mod/src/callbacks.h
--- gnome-system-monitor-2.17.2.1/src/callbacks.h	2005-07-13 22:35:04.000000000 +0800
+++ gnome-system-monitor-2.17.2.1.mod/src/callbacks.h	2006-11-13 20:26:32.071324000 +0800
@@ -25,65 +25,65 @@
 #include "procman.h"
 #include <libgnomevfs/gnome-vfs.h>
 
-void		cb_show_memory_maps (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_show_open_files (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_show_lsof(GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_renice (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_end_process (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_kill_process (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_hide_process (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_show_hidden_processes (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_edit_preferences (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-
-void		cb_help_contents (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-void		cb_about (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-
-void		cb_app_exit (GtkAction *action, gpointer data) G_GNUC_INTERNAL;
-gboolean	cb_app_delete (GtkWidget *window, GdkEventAny *event, gpointer data) G_GNUC_INTERNAL;
-
-void		cb_end_process_button_pressed (GtkButton *button, gpointer data) G_GNUC_INTERNAL;
-void		cb_logout (GtkButton *button, gpointer data) G_GNUC_INTERNAL;
-
-void		cb_info_button_pressed (GtkButton *button, gpointer user_data) G_GNUC_INTERNAL;
-
-void		cb_cpu_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-void		cb_mem_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-void		cb_swap_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-void		cb_net_in_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-void		cb_net_out_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-void		cb_bg_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-void		cb_frame_color_changed (GtkColorButton *widget, gpointer user_data) G_GNUC_INTERNAL;
-
-void		cb_row_selected (GtkTreeSelection *selection, gpointer data) G_GNUC_INTERNAL;
-
-gboolean	cb_tree_popup_menu (GtkWidget *widget, gpointer data) G_GNUC_INTERNAL;
-gboolean	cb_tree_button_pressed (GtkWidget *widget, GdkEventButton *event,
-					gpointer data) G_GNUC_INTERNAL;
-
-
-void		cb_change_current_page (GtkNotebook *nb,
-					gint num, gpointer data) G_GNUC_INTERNAL;
-void		cb_switch_page (GtkNotebook *nb, GtkNotebookPage *page,
-				gint num, gpointer data) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		cb_show_memory_maps (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_show_open_files (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_show_lsof(GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_renice (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_end_process (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_kill_process (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_hide_process (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_show_hidden_processes (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_edit_preferences (GtkAction *action, gpointer data);
+
+G_GNUC_INTERNAL void		cb_help_contents (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL void		cb_about (GtkAction *action, gpointer data);
+
+G_GNUC_INTERNAL void		cb_app_exit (GtkAction *action, gpointer data);
+G_GNUC_INTERNAL gboolean	cb_app_delete (GtkWidget *window, GdkEventAny *event, gpointer data);
+
+G_GNUC_INTERNAL void		cb_end_process_button_pressed (GtkButton *button, gpointer data);
+G_GNUC_INTERNAL void		cb_logout (GtkButton *button, gpointer data);
+
+G_GNUC_INTERNAL void		cb_info_button_pressed (GtkButton *button, gpointer user_data);
+
+G_GNUC_INTERNAL void		cb_cpu_color_changed (GtkColorButton *widget, gpointer user_data);
+G_GNUC_INTERNAL void		cb_mem_color_changed (GtkColorButton *widget, gpointer user_data);
+G_GNUC_INTERNAL void		cb_swap_color_changed (GtkColorButton *widget, gpointer user_data);
+G_GNUC_INTERNAL void		cb_net_in_color_changed (GtkColorButton *widget, gpointer user_data);
+G_GNUC_INTERNAL void		cb_net_out_color_changed (GtkColorButton *widget, gpointer user_data);
+G_GNUC_INTERNAL void		cb_bg_color_changed (GtkColorButton *widget, gpointer user_data);
+G_GNUC_INTERNAL void		cb_frame_color_changed (GtkColorButton *widget, gpointer user_data);
+
+G_GNUC_INTERNAL void		cb_row_selected (GtkTreeSelection *selection, gpointer data);
+
+G_GNUC_INTERNAL gboolean	cb_tree_popup_menu (GtkWidget *widget, gpointer data);
+G_GNUC_INTERNAL gboolean	cb_tree_button_pressed (GtkWidget *widget, GdkEventButton *event,
+					gpointer data);
+
+
+G_GNUC_INTERNAL void		cb_change_current_page (GtkNotebook *nb,
+					gint num, gpointer data);
+G_GNUC_INTERNAL void		cb_switch_page (GtkNotebook *nb, GtkNotebookPage *page,
+				gint num, gpointer data);
 
-gint		cb_update_disks (gpointer data) G_GNUC_INTERNAL;
-gint		cb_timeout (gpointer data) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL gint		cb_update_disks (gpointer data);
+G_GNUC_INTERNAL gint		cb_timeout (gpointer data);
 
-void		cb_volume_mounted_or_unmounted(GnomeVFSVolumeMonitor *vfsvolumemonitor,
+G_GNUC_INTERNAL void		cb_volume_mounted_or_unmounted(GnomeVFSVolumeMonitor *vfsvolumemonitor,
 					       GnomeVFSVolume *vol,
-					       gpointer procdata) G_GNUC_INTERNAL;
+					       gpointer procdata);
 
-void		cb_radio_processes(GtkAction *action,
+G_GNUC_INTERNAL void		cb_radio_processes(GtkAction *action,
 				   GtkRadioAction *current,
-				   gpointer data) G_GNUC_INTERNAL;
+				   gpointer data);
 
 
 
-void		cb_kill_sigstop(GtkAction *action,
-				gpointer data) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		cb_kill_sigstop(GtkAction *action,
+				gpointer data);
 
-void		cb_kill_sigcont(GtkAction *action,
-				gpointer data) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		cb_kill_sigcont(GtkAction *action,
+				gpointer data);
 
 
 #endif /* _PROCMAN_CALLBACKS_H_ */
diff -Nrup gnome-system-monitor-2.16.1/src/favorites.h gnome-system-monitor-2.16.1.mod/src/favorites.h
--- gnome-system-monitor-2.16.1/src/favorites.h	2005-03-17 17:23:13.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/favorites.h	2006-11-13 20:26:32.076242000 +0800
@@ -26,15 +26,15 @@
 
 #include "procman.h"
 
-void 		save_blacklist (ProcData *procdata, GConfClient *client) G_GNUC_INTERNAL;
-void		add_to_blacklist (ProcData *procdata, gchar *name) G_GNUC_INTERNAL;
-void		add_selected_to_blacklist (ProcData *procdata) G_GNUC_INTERNAL;
-void		remove_from_blacklist (ProcData *procdata, gchar *name) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void 		save_blacklist (ProcData *procdata, GConfClient *client);
+G_GNUC_INTERNAL void		add_to_blacklist (ProcData *procdata, gchar *name) ;
+G_GNUC_INTERNAL void		add_selected_to_blacklist (ProcData *procdata) ;
+G_GNUC_INTERNAL void		remove_from_blacklist (ProcData *procdata, gchar *name) ;
 
-gboolean	is_process_blacklisted (ProcData *procdata, gchar *name) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL gboolean	is_process_blacklisted (ProcData *procdata, gchar *name) ;
 
-void 		get_blacklist (ProcData *procdata, GConfClient *client) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void 		get_blacklist (ProcData *procdata, GConfClient *client) ;
 
-void		create_blacklist_dialog (ProcData *procdata) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		create_blacklist_dialog (ProcData *procdata) ;
 
 #endif
diff -Nrup gnome-system-monitor-2.16.1/src/interface.c gnome-system-monitor-2.16.1.mod/src/interface.c
--- gnome-system-monitor-2.16.1/src/interface.c	2006-08-18 00:50:42.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/interface.c	2006-11-13 20:26:32.065079000 +0800
@@ -240,12 +240,13 @@ create_sys_view (ProcData *procdata)
 	GtkWidget *cpu_box, *mem_box, *net_box;
 	GtkWidget *cpu_hbox, *mem_hbox, *net_hbox;
 	GtkWidget *cpu_graph_box, *mem_graph_box, *net_graph_box;
-	GtkWidget *label,*cpu_label, *spacer;
+	GtkWidget *label,*label2,*label3, *label4,*label5, *cpu_label, *spacer;
 	GtkWidget *table;
 	GtkWidget *color_picker;
 	GtkSizeGroup *sizegroup;
 	LoadGraph *cpu_graph, *mem_graph, *net_graph;
 	gint i;
+	AtkObject *colorWidget, *label1Widget, *label2Widget, *label3Widget, *label4Widget, *label5Widget;
 
 
 	vbox = gtk_vbox_new (FALSE, 18);
@@ -294,6 +295,7 @@ create_sys_view (ProcData *procdata)
 
 		color_picker = gtk_color_button_new_with_color (
 			&load_graph_get_colors(cpu_graph)[2+i]);
+    		colorWidget = gtk_widget_get_accessible (color_picker);
 
 		g_signal_connect (G_OBJECT (color_picker), "color_set",
 			    G_CALLBACK (cb_cpu_color_changed), GINT_TO_POINTER (i));
@@ -306,10 +308,21 @@ create_sys_view (ProcData *procdata)
 			text = g_strdup_printf (_("CPU%d:"), i+1);
 		}
 		label = gtk_label_new (text);
+		/* in order to support accessibility, add the relationship between label and button */
+    		label1Widget = gtk_widget_get_accessible (label);
+            	atk_object_add_relationship (label1Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+		
 		gtk_box_pack_start (GTK_BOX (temp_hbox), label, FALSE, FALSE, 6);
 		g_free (text);
 		
 		cpu_label = gtk_label_new (NULL);
+		/* in order to support accessibility, add the relationship between button and cpu_label */
+    		label2Widget = gtk_widget_get_accessible (cpu_label);
+            	atk_object_add_relationship (label2Widget, ATK_RELATION_LABEL_FOR, colorWidget);
+		/* in order to support accessibility, add the relationship between button and label/cpu_label */
+            	atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label1Widget);
+            	atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label2Widget);
+		
 		gtk_box_pack_start (GTK_BOX (temp_hbox), cpu_label, FALSE, FALSE, 0);
 		load_graph_get_labels(cpu_graph)->cpu[i] = cpu_label;
 		
@@ -349,22 +362,32 @@ create_sys_view (ProcData *procdata)
 	gtk_table_set_col_spacings (GTK_TABLE (table), 12);
 	gtk_box_pack_start (GTK_BOX (mem_graph_box), table, 
 			    FALSE, FALSE, 0);
-
+/* Draw User usage */
 	color_picker = gtk_color_button_new_with_color (
 		&load_graph_get_colors(mem_graph)[2]);
+    	colorWidget = gtk_widget_get_accessible (color_picker);
 	g_signal_connect (G_OBJECT (color_picker), "color_set",
 			    G_CALLBACK (cb_mem_color_changed), procdata);
 	gtk_table_attach (GTK_TABLE (table), color_picker, 0, 1, 0, 1, 0, 0, 0, 0);
 	
 	label = gtk_label_new (_("User memory:"));
+    	label1Widget = gtk_widget_get_accessible (label);
+        atk_object_add_relationship (label1Widget,ATK_RELATION_LABEL_FOR,colorWidget);
 	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 	gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
-	
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->memused),
+
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label2 = load_graph_get_labels(mem_graph)->memused;
+    	label2Widget = gtk_widget_get_accessible (label2);
+        atk_object_add_relationship (label2Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->memused),*/
+	gtk_misc_set_alignment (GTK_MISC (label2),
 				0.0,
 				0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(mem_graph)->memused,
+/*			  load_graph_get_labels(mem_graph)->memused,*/
+			  label2,
 			  2,
 			  3,
 			  0,
@@ -374,17 +397,27 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0);
 	
-	label = gtk_label_new (_("of"));
-	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-	gtk_table_attach (GTK_TABLE (table), label, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+	/* in order to support accessibility, add the relationship between label and button */
+	label3 = gtk_label_new (_("of"));
+    	label3Widget = gtk_widget_get_accessible (label3);
+        atk_object_add_relationship (label3Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label3), 0.0, 0.5);
+	gtk_table_attach (GTK_TABLE (table), label3, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
 	
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->memtotal),
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label4 = load_graph_get_labels(mem_graph)->memtotal;
+    	label4Widget = gtk_widget_get_accessible (label4);
+        atk_object_add_relationship (label4Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->memtotal),*/
+	gtk_misc_set_alignment (GTK_MISC (label4),
 				0.0,
 				0.5);
 
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(mem_graph)->memtotal,
+/*			  load_graph_get_labels(mem_graph)->memtotal,*/
+			  label4,
 			  4,
 			  5,
 			  0,
@@ -394,12 +427,19 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0);
 	
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label5 = load_graph_get_labels(mem_graph)->mempercent;
+    	label5Widget = gtk_widget_get_accessible (label5);
+        atk_object_add_relationship (label5Widget,ATK_RELATION_LABEL_FOR,colorWidget);
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->mempercent),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->mempercent),*/
+	gtk_misc_set_alignment (GTK_MISC (label5),
 					  1.0,
 					  0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(mem_graph)->mempercent,
+/*			  load_graph_get_labels(mem_graph)->mempercent,*/
+			  label5,
 			  5,
 			  6,
 			  0,
@@ -408,23 +448,42 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0,
 			  0);
+			  
+	/* in order to support accessibility, add the relationship between button and label */
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label1Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label2Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label3Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label4Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label5Widget);
 
+/* Draw the Swap Usage */
 	color_picker = gtk_color_button_new_with_color (
 		&load_graph_get_colors(mem_graph)[3]);
+    	colorWidget = gtk_widget_get_accessible (color_picker);
 	g_signal_connect (G_OBJECT (color_picker), "color_set",
 			    G_CALLBACK (cb_swap_color_changed), procdata);
 	gtk_table_attach (GTK_TABLE (table), color_picker, 0, 1, 1, 2, 0, 0, 0, 0);
 			  
 	label = gtk_label_new (_("Used swap:"));
+	/* in order to support accessibility, add the relationship between label and button */
+    	label1Widget = gtk_widget_get_accessible (label);
+        atk_object_add_relationship (label1Widget,ATK_RELATION_LABEL_FOR,colorWidget);
 	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 	gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
 	
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swapused ),
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label2 = load_graph_get_labels(mem_graph)->swapused;
+    	label2Widget = gtk_widget_get_accessible (label2);
+        atk_object_add_relationship (label2Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label2),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swapused ),*/
 				0.0,
 				0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(mem_graph)->swapused,
+/*			  load_graph_get_labels(mem_graph)->swapused,*/
+			  label2,
 			  2,
 			  3,
 			  1,
@@ -434,16 +493,26 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0);
 			  
-	label = gtk_label_new (_("of"));
-	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-	gtk_table_attach (GTK_TABLE (table), label, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+	/* in order to support accessibility, add the relationship between label and button */			  
+	label3 = gtk_label_new (_("of"));
+    	label3Widget = gtk_widget_get_accessible (label3);
+        atk_object_add_relationship (label3Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label3), 0.0, 0.5);
+	gtk_table_attach (GTK_TABLE (table), label3, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
 	
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swaptotal),
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label4 = load_graph_get_labels(mem_graph)->swaptotal;
+    	label4Widget = gtk_widget_get_accessible (label4);
+        atk_object_add_relationship (label4Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label4),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swaptotal),*/
 				0.0,
 				0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(mem_graph)->swaptotal,
+			  label4,
+/*			  load_graph_get_labels(mem_graph)->swaptotal,*/
 			  4,
 			  5,
 			  1,
@@ -453,12 +522,19 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0);
 
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label5 = load_graph_get_labels(mem_graph)->swappercent;
+    	label5Widget = gtk_widget_get_accessible (label5);
+        atk_object_add_relationship (label5Widget,ATK_RELATION_LABEL_FOR,colorWidget);
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swappercent),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swappercent),*/
+	gtk_misc_set_alignment (GTK_MISC (label5),
 				1.0,
 				0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(mem_graph)->swappercent,
+/*			  load_graph_get_labels(mem_graph)->swappercent,*/
+			  label5,
 			  5,
 			  6,
 			  1,
@@ -467,6 +543,13 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0,
 			  0);
+			  
+	/* in order to support accessibility, add the relationship between button and label */
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label1Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label2Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label3Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label4Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label5Widget);
 
 	procdata->mem_graph = mem_graph;
 
@@ -502,11 +585,15 @@ create_sys_view (ProcData *procdata)
 
 	color_picker = gtk_color_button_new_with_color (
 		&load_graph_get_colors(net_graph)[2]);
+    	colorWidget = gtk_widget_get_accessible (color_picker);
 	g_signal_connect (G_OBJECT (color_picker), "color_set",
 			    G_CALLBACK (cb_net_in_color_changed), procdata);
 	gtk_table_attach (GTK_TABLE (table), color_picker, 0, 1, 0, 1, 0, 0, 0, 0);
 
 	label = gtk_label_new (_("Received:"));
+	/* in order to support accessibility, add the relationship between label and button */
+    	label1Widget = gtk_widget_get_accessible (label);
+        atk_object_add_relationship (label1Widget,ATK_RELATION_LABEL_FOR,colorWidget);
 	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 	gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_FILL, 0, 0, 0);
 
@@ -515,26 +602,43 @@ create_sys_view (ProcData *procdata)
 			  G_CALLBACK (net_size_request), procdata);
 
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in),
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label2 = load_graph_get_labels(net_graph)->net_in;
+    	label2Widget = gtk_widget_get_accessible (label2);
+        atk_object_add_relationship (label2Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label2),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in),*/
 				0.0,
 				0.5);
 	gtk_box_pack_start (GTK_BOX (hbox),
-			    load_graph_get_labels(net_graph)->net_in,
+/*			    load_graph_get_labels(net_graph)->net_in,*/
+			    label2,
 			    FALSE,
 			    FALSE,
 			    0);
 
 	gtk_table_attach (GTK_TABLE (table), hbox, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
 
-	label = gtk_label_new (_("Total:"));
-	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-	gtk_table_attach (GTK_TABLE (table), label, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
-
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in_total),
+	/* in order to support accessibility, add the relationship between label and button */			  
+	label3 = gtk_label_new (_("Total:"));
+    	label3Widget = gtk_widget_get_accessible (label3);
+        atk_object_add_relationship (label3Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label3), 0.0, 0.5);
+	gtk_table_attach (GTK_TABLE (table), label3, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
+
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label4 = load_graph_get_labels(net_graph)->net_in_total;
+    	label4Widget = gtk_widget_get_accessible (label4);
+        atk_object_add_relationship (label4Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label4),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_in_total),*/
 				0.0,
 				0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(net_graph)->net_in_total,
+/*			  load_graph_get_labels(net_graph)->net_in_total,*/
+			  label4,
 			  4,
 			  5,
 			  0,
@@ -543,14 +647,24 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0,
 			  0);
+			  
+	/* in order to support accessibility, add the relationship between button and label */
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label1Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label2Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label3Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label4Widget);
 
 	color_picker = gtk_color_button_new_with_color (
 		&load_graph_get_colors(net_graph)[3]);
+    	colorWidget = gtk_widget_get_accessible (color_picker);
 	g_signal_connect (G_OBJECT (color_picker), "color_set",
 			    G_CALLBACK (cb_net_out_color_changed), procdata);
 	gtk_table_attach (GTK_TABLE (table), color_picker, 0, 1, 1, 2, 0, 0, 0, 0);
 
 	label = gtk_label_new (_("Sent:"));
+	/* in order to support accessibility, add the relationship between label and button */
+    	label1Widget = gtk_widget_get_accessible (label);
+        atk_object_add_relationship (label1Widget,ATK_RELATION_LABEL_FOR,colorWidget);
 	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
 	gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
 
@@ -558,26 +672,43 @@ create_sys_view (ProcData *procdata)
 	g_signal_connect (G_OBJECT (hbox), "size_request",
 			  G_CALLBACK (net_size_request), procdata);
 
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out),
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label2 = load_graph_get_labels(net_graph)->net_out;
+    	label2Widget = gtk_widget_get_accessible (label2);
+        atk_object_add_relationship (label2Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label2),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out),*/
 				0.0,
 				0.5);
 	gtk_box_pack_start (GTK_BOX (hbox),
-			    load_graph_get_labels(net_graph)->net_out,
+/*			    load_graph_get_labels(net_graph)->net_out,*/
+			    label2,
 			    FALSE,
 			    FALSE,
 			    0);
 
 	gtk_table_attach (GTK_TABLE (table), hbox, 2, 3, 1, 2, GTK_FILL, 0, 0, 0);
 
-	label = gtk_label_new (_("Total:"));
-	gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-	gtk_table_attach (GTK_TABLE (table), label, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
-
-	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out_total),
+	/* in order to support accessibility, add the relationship between label and button */			  
+	label3 = gtk_label_new (_("Total:"));
+    	label3Widget = gtk_widget_get_accessible (label3);
+        atk_object_add_relationship (label3Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label3), 0.0, 0.5);
+	gtk_table_attach (GTK_TABLE (table), label3, 3, 4, 1, 2, GTK_FILL, 0, 0, 0);
+
+	/* in order to support accessibility, and to promote performance and readable, 
+	   let's call the load_graph_get_labels() only once here */		
+	label4 = load_graph_get_labels(net_graph)->net_out_total;
+    	label4Widget = gtk_widget_get_accessible (label4);
+        atk_object_add_relationship (label4Widget,ATK_RELATION_LABEL_FOR,colorWidget);
+	gtk_misc_set_alignment (GTK_MISC (label4),
+/*	gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(net_graph)->net_out_total),*/
 				0.0,
 				0.5);
 	gtk_table_attach (GTK_TABLE (table),
-			  load_graph_get_labels(net_graph)->net_out_total,
+/*			  load_graph_get_labels(net_graph)->net_out_total,*/
+			  label4,
 			  4,
 			  5,
 			  1,
@@ -586,6 +717,13 @@ create_sys_view (ProcData *procdata)
 			  0,
 			  0,
 			  0);
+			  
+	/* in order to support accessibility, add the relationship between button and label */
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label1Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label2Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label3Widget);
+        atk_object_add_relationship (colorWidget, ATK_RELATION_LABELLED_BY ,label4Widget);
+
 
 	procdata->net_graph = net_graph;
 
diff -Nrup gnome-system-monitor-2.17.2.1/src/interface.h gnome-system-monitor-2.17.2.1.mod/src/interface.h
--- gnome-system-monitor-2.17.2.1/src/interface.h	2005-03-17 22:23:42.000000000 +0800
+++ gnome-system-monitor-2.17.2.1.mod/src/interface.h	2006-11-13 20:26:32.065343000 +0800
@@ -25,9 +25,9 @@
 #include "procman.h"
 
 
-void		create_main_window (ProcData *data) G_GNUC_INTERNAL;
-void		update_sensitivity (ProcData *data) G_GNUC_INTERNAL;
-void            do_popup_menu(ProcData *data, GdkEventButton *event) G_GNUC_INTERNAL;
-GtkWidget *	make_title_label (const char *text) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		create_main_window (ProcData *data);
+G_GNUC_INTERNAL void		update_sensitivity (ProcData *data);
+G_GNUC_INTERNAL void            do_popup_menu(ProcData *data, GdkEventButton *event);
+G_GNUC_INTERNAL GtkWidget *	make_title_label (const char *text);
 
 #endif /* _PROCMAN_INTERFACE_H_ */
diff -Nrup gnome-system-monitor-2.16.1/src/load-graph.c gnome-system-monitor-2.16.1.mod/src/load-graph.c
--- gnome-system-monitor-2.16.1/src/load-graph.c	2006-08-18 00:50:03.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/load-graph.c	2006-11-13 20:26:32.073407000 +0800
@@ -348,6 +348,20 @@ get_net (LoadGraph *g)
 	float din, dout;
 	gchar *text1, *text2;
 
+        /* we have to optimize the performance of libgtop, because in some low level machine,
+           to update the information will occupy too much cpu.
+ 
+           here I would like to make a little update:set glibtop_netlist.flags=1,so as to let glibtop_get_netlist()
+           only return the ones whose first character of name is the same with the first one in their module,
+           glibtop_get_netload() just try to find these devices, for example, bge0 and bge...
+ 
+           we do the check in glibtop_get_netlist(), I think this will accelerate the transaction lots,
+           Also this will not affect the existing codes, because when nobody set glibtop_netlist.flags,
+           glibtop_get_netlist() will return all devices with class "net".
+          */
+ 
+        netlist.flags = 1;
+	
 	ifnames = glibtop_get_netlist(&netlist);
 
 	for (i = 0; i < netlist.number; ++i)
diff -Nrup gnome-system-monitor-2.16.1/src/load-graph.h gnome-system-monitor-2.16.1.mod/src/load-graph.h
--- gnome-system-monitor-2.16.1/src/load-graph.h	2006-01-02 17:28:58.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/load-graph.h	2006-11-13 20:26:32.073549000 +0800
@@ -34,35 +34,35 @@ struct _LoadGraphLabels
 
 
 /* Create new load graph. */
-LoadGraph *
-load_graph_new (gint type, ProcData *procdata) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL LoadGraph *
+load_graph_new (gint type, ProcData *procdata);
 
 /* Force a drawing update */
-void
-load_graph_draw (LoadGraph *g) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void
+load_graph_draw (LoadGraph *g) ;
 
 /* Start load graph. */
-void
-load_graph_start (LoadGraph *g) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void
+load_graph_start (LoadGraph *g) ;
 
 /* Stop load graph. */
-void
-load_graph_stop (LoadGraph *g) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void
+load_graph_stop (LoadGraph *g) ;
 
 /* Change load graph speed and restart it if it has been previously started */
-void
+G_GNUC_INTERNAL void
 load_graph_change_speed (LoadGraph *g,
-			 guint new_speed) G_GNUC_INTERNAL;
+			 guint new_speed) ;
 
-GdkColor*
-load_graph_get_colors (LoadGraph *g) G_GNUC_INTERNAL G_GNUC_CONST;
+G_GNUC_INTERNAL GdkColor*
+load_graph_get_colors (LoadGraph *g)  G_GNUC_CONST;
 
-LoadGraphLabels*
-load_graph_get_labels (LoadGraph *g) G_GNUC_INTERNAL G_GNUC_CONST;
+G_GNUC_INTERNAL LoadGraphLabels*
+load_graph_get_labels (LoadGraph *g)  G_GNUC_CONST;
 
 
-GtkWidget*
-load_graph_get_widget (LoadGraph *g) G_GNUC_INTERNAL G_GNUC_CONST;
+G_GNUC_INTERNAL GtkWidget*
+load_graph_get_widget (LoadGraph *g)  G_GNUC_CONST;
 
 
 #endif /* _PROCMAN_LOAD_GRAPH_H_ */
diff -Nrup gnome-system-monitor-2.16.1/src/memmaps.h gnome-system-monitor-2.16.1.mod/src/memmaps.h
--- gnome-system-monitor-2.16.1/src/memmaps.h	2005-03-17 17:23:13.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/memmaps.h	2006-11-13 20:26:32.076831000 +0800
@@ -4,6 +4,6 @@
 #include <glib/gtypes.h>
 #include "procman.h"
 
-void 		create_memmaps_dialog (ProcData *procdata) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void 		create_memmaps_dialog (ProcData *procdata) ;
 
 #endif /* _PROCMAN_MEMMAPS_H_ */
diff -Nrup gnome-system-monitor-2.16.1/src/openfiles.h gnome-system-monitor-2.16.1.mod/src/openfiles.h
--- gnome-system-monitor-2.16.1/src/openfiles.h	2005-03-17 17:23:13.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/openfiles.h	2006-11-13 20:26:32.065979000 +0800
@@ -5,7 +5,7 @@
 
 #include "procman.h"
 
-void 		create_openfiles_dialog (ProcData *procdata) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void 		create_openfiles_dialog (ProcData *procdata) ;
 
 
 #endif
diff -Nrup gnome-system-monitor-2.16.1/src/prettytable.h gnome-system-monitor-2.16.1.mod/src/prettytable.h
--- gnome-system-monitor-2.16.1/src/prettytable.h	2005-02-16 23:40:01.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/prettytable.h	2006-11-13 20:26:32.066976000 +0800
@@ -6,10 +6,10 @@
 #include "procman.h"
 
 
-void		pretty_table_new (ProcData *procdata) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		pretty_table_new (ProcData *procdata) ;
 
-GdkPixbuf*	pretty_table_get_icon (PrettyTable *pretty_table,
-				       const gchar *command, guint pid) G_GNUC_INTERNAL;
-void 		pretty_table_free (PrettyTable *pretty_table) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL GdkPixbuf*	pretty_table_get_icon (PrettyTable *pretty_table,
+				       const gchar *command, guint pid) ;
+G_GNUC_INTERNAL void 		pretty_table_free (PrettyTable *pretty_table) ;
 
 #endif /* _PROCMAN_PRETTYTABLE_H_ */
diff -Nrup gnome-system-monitor-2.16.1/src/procactions.c gnome-system-monitor-2.16.1.mod/src/procactions.c
--- gnome-system-monitor-2.16.1/src/procactions.c	2006-06-25 03:29:03.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/procactions.c	2006-11-13 20:26:32.068354000 +0800
@@ -128,6 +128,14 @@ kill_single_process (GtkTreeModel *model
 	if (!info)
 		return;
 
+	/*
+          * If the process 0 is a system process, we can't control it even as root
+          */
+        if ((args->signal == SIGTERM) || (args->signal == SIGKILL)){
+                if (info->pid == 0)
+                return;
+        }
+        /* if it is not a system process, we can kill it now */
 	error = kill (info->pid, args->signal);
 
 	/* success */
diff -Nrup gnome-system-monitor-2.16.1/src/procactions.h gnome-system-monitor-2.16.1.mod/src/procactions.h
--- gnome-system-monitor-2.16.1/src/procactions.h	2005-12-01 21:06:34.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/procactions.h	2006-11-13 20:26:32.068652000 +0800
@@ -21,8 +21,8 @@
 
 #include "procman.h"
  
-void		renice (ProcData *procdata, int nice) G_GNUC_INTERNAL;
-void		kill_process (ProcData *procdata, int sig) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL  void		renice (ProcData *procdata, int nice) ;
+G_GNUC_INTERNAL void		kill_process (ProcData *procdata, int sig) ;
 
 #endif
 
diff -Nrup gnome-system-monitor-2.16.1/src/procdialogs.c gnome-system-monitor-2.16.1.mod/src/procdialogs.c
--- gnome-system-monitor-2.16.1/src/procdialogs.c	2006-08-09 04:56:59.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/procdialogs.c	2006-11-13 20:26:32.075288000 +0800
@@ -333,7 +333,7 @@ smooth_refresh_toggled(GtkToggleButton *
 
 	gboolean toggled;
 
-	toggled = gtk_toggle_button_get_active(button);
+	toggled = TRUE; /*gtk_toggle_button_get_active(button);*/
 
 	gconf_client_set_bool(client, SMOOTH_REFRESH_KEY, toggled, NULL);
 }
@@ -397,7 +397,7 @@ update_graph_update_interval (GtkWidget 
 	spin_button = widget;
 	value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spin_button));
 	
-	if (1000 * value == procdata->config.graph_update_interval)
+	if ((int)(1000 * value) == procdata->config.graph_update_interval)
 		return FALSE;
 
 	gconf_client_set_int (client, "/apps/procman/graph_update_interval", value * 1000, NULL);
@@ -714,7 +714,10 @@ procdialog_create_preferences_dialog (Pr
 	gtk_box_pack_start (GTK_BOX (hbox2), hbox3, TRUE, TRUE, 0);
 			  
 	update = (gfloat) procdata->config.graph_update_interval;
-	adjustment = (GtkAdjustment *) gtk_adjustment_new(update / 1000.0, 0.25, 
+       /* The interval is too small, and in some low level machine, 
+	  cause gconf can't work, so set its min value 1 sec*/
+        /*adjustment = (GtkAdjustment *) gtk_adjustment_new(update / 1000.0, 0.25,*/
+        adjustment = (GtkAdjustment *) gtk_adjustment_new(update / 1000.0, 1,
 							  100.0, 0.25, 1.0, 1.0);
 	spin_button = gtk_spin_button_new (adjustment, 1.0, 2);
 	g_signal_connect (G_OBJECT (spin_button), "focus_out_event",
diff -Nrup gnome-system-monitor-2.16.1/src/procdialogs.h gnome-system-monitor-2.16.1.mod/src/procdialogs.h
--- gnome-system-monitor-2.16.1/src/procdialogs.h	2005-12-01 23:46:20.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/procdialogs.h	2006-11-13 20:26:32.075559000 +0800
@@ -42,14 +42,14 @@ typedef enum
 } ProcmanActionType;
 
 
-void			procdialog_create_hide_dialog (ProcData *data) G_GNUC_INTERNAL;
-void			procdialog_create_kill_dialog (ProcData *data, int signal) G_GNUC_INTERNAL;
-void 			procdialog_create_renice_dialog (ProcData *data) G_GNUC_INTERNAL;
-gboolean		procdialog_create_root_password_dialog (ProcmanActionType type,
+G_GNUC_INTERNAL void			procdialog_create_hide_dialog (ProcData *data) ;
+G_GNUC_INTERNAL void			procdialog_create_kill_dialog (ProcData *data, int signal) ;
+G_GNUC_INTERNAL void 			procdialog_create_renice_dialog (ProcData *data) ;
+G_GNUC_INTERNAL gboolean		procdialog_create_root_password_dialog (ProcmanActionType type,
 								ProcData *procdata,
-								gint pid, gint extra_value) G_GNUC_INTERNAL;
-void 			procdialog_create_memmaps_dialog (ProcData *data) G_GNUC_INTERNAL;
-void			procdialog_create_preferences_dialog (ProcData *data) G_GNUC_INTERNAL;
+								gint pid, gint extra_value) ;
+G_GNUC_INTERNAL void 			procdialog_create_memmaps_dialog (ProcData *data) ;
+G_GNUC_INTERNAL void			procdialog_create_preferences_dialog (ProcData *data) ;
 
 #endif
 
diff -Nrup gnome-system-monitor-2.17.2.1/src/procman.c gnome-system-monitor-2.17.2.1.mod/src/procman.c
--- gnome-system-monitor-2.17.2.1/src/procman.c	2006-09-17 18:05:19.000000000 +0800
+++ gnome-system-monitor-2.17.2.1.mod/src/procman.c	2006-11-13 20:26:32.074531000 +0800
@@ -107,7 +107,10 @@
 		procdata->config.graph_update_interval = gconf_value_get_int (value);
 		procdata->config.graph_update_interval = 
 			MAX (procdata->config.graph_update_interval, 
-			     250);
+		/* The interval is too small, and in some low level machine,
+		   cause gconf can't work, so set its min value 1 sec*/
+		/*           250);*/
+			     1000);
 		load_graph_change_speed(procdata->cpu_graph,
 					procdata->config.graph_update_interval);
 		load_graph_change_speed(procdata->mem_graph,
@@ -356,7 +359,10 @@
 	pd->config.width = CLAMP (pd->config.width, 50, swidth);
 	pd->config.height = CLAMP (pd->config.height, 50, sheight);
 	pd->config.update_interval = MAX (pd->config.update_interval, 1000);
-	pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 250);
+	/* The interval is too small, and in some low level machine,
+	   cause gconf can't work, so set its min value 1 sec*/
+	/*pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 250);*/
+	pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 1000);
 	pd->config.disks_update_interval = MAX (pd->config.disks_update_interval, 1000);
 	pd->config.whose_process = CLAMP (pd->config.whose_process, 0, 2);
 	pd->config.current_tab = CLAMP(pd->config.current_tab,
diff -Nrup gnome-system-monitor-2.16.1/src/procman.h gnome-system-monitor-2.16.1.mod/src/procman.h
--- gnome-system-monitor-2.16.1/src/procman.h	2006-08-18 00:50:43.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/procman.h	2006-11-13 20:26:32.074782000 +0800
@@ -181,9 +181,9 @@ struct _ProcData
 	SmoothRefresh  *smooth_refresh;
 };
 
-void		procman_save_config (ProcData *data) G_GNUC_INTERNAL;
-void		procman_save_tree_state (GConfClient *client, GtkWidget *tree, const gchar *prefix) G_GNUC_INTERNAL;
-gboolean	procman_get_tree_state (GConfClient *client, GtkWidget *tree, const gchar *prefix) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void		procman_save_config (ProcData *data);
+G_GNUC_INTERNAL void		procman_save_tree_state (GConfClient *client, GtkWidget *tree, const gchar *prefix) ;
+G_GNUC_INTERNAL gboolean	procman_get_tree_state (GConfClient *client, GtkWidget *tree, const gchar *prefix) ;
 
 
 
diff -Nrup gnome-system-monitor-2.16.1/src/proctable.c gnome-system-monitor-2.16.1.mod/src/proctable.c
--- gnome-system-monitor-2.16.1/src/proctable.c	2006-08-31 02:11:01.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/proctable.c	2006-11-13 20:45:40.107468000 +0800
@@ -556,6 +556,17 @@ static void get_process_memory_writable(
 	unsigned i;
 
 	info->memwritable = 0;
+	/* we have to optimize the performance of libgtop, because update the information will occupy too much cpu.
+ 
+           here I would like to make a little update:set glibtop_proc_map.flags=1,so as to let glibtop_get_proc_map_s()
+           only return the ones this function need: memwritable
+ 
+           we do the check in glibtop_get_proc_map_s(), don't run the others part which don't need by this function,
+	   I think this will accelerate the transaction lots,
+           Also this will not affect the existing codes, because when nobody set glibtop_proc_map.flags,
+           glibtop_get_proc_map() will return all as before. zhua
+	*/
+	buf.flags = 1;
 
 	maps = glibtop_get_proc_map(&buf, info->pid);
 
@@ -588,6 +599,10 @@ get_process_memory_info(ProcInfo *info)
 	info->memres	= procmem.resident;
 	info->memshared	= procmem.share;
 
+#ifdef __sun
+        info->pcpu      = procmem.load;
+#endif
+
 	info->memxserver = xresources.total_bytes_estimate;
 
 	get_process_memory_writable(info);
@@ -766,6 +781,28 @@ remove_children_from_tree (ProcData *pro
 	} while (gtk_tree_model_iter_next (model, parent));
 }
 
+/* place the children process to blacklist if the parent is placed into */
+static void
+blacklist_children_from_tree (ProcData *procdata, GtkTreeModel *model,
+                          GtkTreeIter *parent)
+{
+        do {
+                ProcInfo *child_info;
+                GtkTreeIter child;
+ 
+                if (gtk_tree_model_iter_children (model, &child, parent))
+                        blacklist_children_from_tree (procdata, model, &child);
+ 
+                gtk_tree_model_get (model, parent, COL_POINTER, &child_info, -1);
+                if (child_info) {
+                        if (procdata->selected_process == child_info)
+                                procdata->selected_process = NULL;
+                        add_to_blacklist (procdata, child_info->name);
+                        child_info->is_visible = FALSE;
+                }
+        } while (gtk_tree_model_iter_next (model, parent));
+}
+
 
 void
 remove_info_from_tree (ProcInfo *info, ProcData *procdata)
@@ -781,6 +818,11 @@ remove_info_from_tree (ProcInfo *info, P
 
 	if (procdata->selected_process == info)
 		procdata->selected_process = NULL;
+       /* move all children from tree to blacklist */
+         GtkTreeIter child;
+         if (gtk_tree_model_iter_children (model, &child, &info->node))
+               blacklist_children_from_tree (procdata, model, &child);
+ 
 
 	gtk_tree_store_remove (GTK_TREE_STORE (model), &info->node);
 
@@ -849,7 +891,7 @@ update_info (ProcData *procdata, ProcInf
 		glibtop_get_proc_uid (&procuid, info->pid);
 		glibtop_get_proc_time (&proctime, info->pid);
 
-		get_process_memory_info(info);
+/*		get_process_memory_info(info); */
 		get_process_user(procdata, info, procstate.uid);
 
 		info->pcpu = (proctime.rtime - info->cpu_time_last) * 100 / total_time;
@@ -859,6 +901,11 @@ update_info (ProcData *procdata, ProcInf
 		info->nice = procuid.nice;
 
 
+                /* if at Solaris, in get_process_memory_info() info->pcpu will 
+		   get again from glibtop_get_proc_mem() */
+                get_process_memory_info(info);
+
+
 		model = gtk_tree_view_get_model (GTK_TREE_VIEW (procdata->tree));
 
 		update_info_mutable_cols(GTK_TREE_STORE (model), procdata, info);
@@ -1018,8 +1065,8 @@ proctable_update_list (ProcData * const 
 	/* FIXME: total cpu time elapsed should be calculated on an individual basis here
 	** should probably have a total_time_last gint in the ProcInfo structure */
 	glibtop_get_cpu (&cpu);
-	total_time = MAX(cpu.total - total_time_last, 1);
-	total_time_last = cpu.total;
+        total_time = MAX(cpu.total - total_time_last, 1);
+        total_time_last = cpu.total;
 
 	refresh_list (procdata, pid_list, proclist.number);
 
diff -Nrup gnome-system-monitor-2.16.1/src/proctable.h gnome-system-monitor-2.16.1.mod/src/proctable.h
--- gnome-system-monitor-2.16.1/src/proctable.h	2006-07-06 17:40:24.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/proctable.h	2006-11-13 20:26:32.070490000 +0800
@@ -26,42 +26,41 @@
 
 enum
 {
-	COL_NAME = 0,
-	COL_USER,
-	COL_STATUS,
-	COL_VMSIZE,
-	COL_MEMRES,
-	COL_MEMWRITABLE,
-	COL_MEMSHARED,
-	COL_MEMXSERVER,
-	COL_CPU,
-	COL_CPU_TIME,
-	COL_START_TIME,
-	COL_NICE,
-	COL_PID,
-	COL_SECURITYCONTEXT,
-	COL_ARGS,
-	COL_MEM,
-	COL_PIXBUF,
-	COL_POINTER,
-	COL_TOOLTIP,
-	NUM_COLUMNS
+        COL_NAME = 0,
+        COL_USER,
+        COL_STATUS,
+        COL_VMSIZE,
+        COL_MEMRES,
+        COL_MEMWRITABLE,
+        COL_MEMSHARED,
+        COL_MEMXSERVER,
+        COL_CPU,
+        COL_CPU_TIME,
+        COL_START_TIME,
+        COL_NICE,
+        COL_PID,
+        COL_SECURITYCONTEXT,
+        COL_ARGS,
+        COL_MEM,
+        COL_PIXBUF,
+        COL_POINTER,
+        COL_TOOLTIP,
+        NUM_COLUMNS
 };
 
+G_GNUC_INTERNAL GtkWidget*	proctable_new (ProcData *data) ;
+G_GNUC_INTERNAL void		proctable_update_table (ProcData *data) ;
+G_GNUC_INTERNAL void		proctable_update_list (ProcData *data) ;
+G_GNUC_INTERNAL void		insert_info_to_tree (ProcInfo *info, ProcData *procdata) ;
+G_GNUC_INTERNAL void		remove_info_from_tree (ProcInfo *info, ProcData *procdata) ;
+G_GNUC_INTERNAL ProcInfo *	proctable_find_process (guint pid, ProcData *procdata) ;
+G_GNUC_INTERNAL void		proctable_update_all (ProcData *data) ;
+G_GNUC_INTERNAL void		proctable_clear_tree (ProcData *data) ;
+G_GNUC_INTERNAL void		proctable_free_table (ProcData *data) ;
 
-GtkWidget*	proctable_new (ProcData *data) G_GNUC_INTERNAL;
-void		proctable_update_table (ProcData *data) G_GNUC_INTERNAL;
-void		proctable_update_list (ProcData *data) G_GNUC_INTERNAL;
-void		insert_info_to_tree (ProcInfo *info, ProcData *procdata) G_GNUC_INTERNAL;
-void		remove_info_from_tree (ProcInfo *info, ProcData *procdata) G_GNUC_INTERNAL;
-ProcInfo *	proctable_find_process (guint pid, ProcData *procdata) G_GNUC_INTERNAL;
-void		proctable_update_all (ProcData *data) G_GNUC_INTERNAL;
-void		proctable_clear_tree (ProcData *data) G_GNUC_INTERNAL;
-void		proctable_free_table (ProcData *data) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL GSList*		proctable_get_columns_order(GtkTreeView *treeview) ;
+G_GNUC_INTERNAL void		proctable_set_columns_order(GtkTreeView *treeview, GSList *order) ;
 
-GSList*		proctable_get_columns_order(GtkTreeView *treeview) G_GNUC_INTERNAL;
-void		proctable_set_columns_order(GtkTreeView *treeview, GSList *order) G_GNUC_INTERNAL;
-
-char*		make_loadavg_string(void) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL char*		make_loadavg_string(void) ;
 
 #endif /* _PROCMAN_PROCTABLE_H_ */
diff -Nrup gnome-system-monitor-2.16.1/src/selinux.h gnome-system-monitor-2.16.1.mod/src/selinux.h
--- gnome-system-monitor-2.16.1/src/selinux.h	2006-07-09 01:24:40.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/selinux.h	2006-11-13 20:26:32.069158000 +0800
@@ -5,10 +5,10 @@
 
 #include "procman.h"
 
-void
-get_process_selinux_context (ProcInfo *info) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void
+get_process_selinux_context (ProcInfo *info) ;
 
-gboolean
-can_show_security_context_column (void) G_GNUC_INTERNAL G_GNUC_CONST;
+G_GNUC_INTERNAL gboolean
+can_show_security_context_column (void)  G_GNUC_CONST;
 
 #endif /* PROCMAN_SELINUX_H_20050525 */
diff -Nrup gnome-system-monitor-2.16.1/src/smooth_refresh.c gnome-system-monitor-2.16.1.mod/src/smooth_refresh.c
--- gnome-system-monitor-2.16.1/src/smooth_refresh.c	2006-07-12 03:59:32.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/smooth_refresh.c	2006-11-13 20:26:32.072291000 +0800
@@ -183,8 +183,10 @@ smooth_refresh_get(SmoothRefresh *sm, gu
 	gboolean changed;
 	float pcpu;
 
-	if (!sm->active)
+	if (!sm->active){
+                *new_interval = sm->interval;
 		return FALSE;
+	}
 
 	pcpu = get_own_cpu_usage(sm);
 /*
@@ -243,6 +245,8 @@ smooth_refresh_get(SmoothRefresh *sm, gu
 		       *sm->config_interval,
 		       ctime(&now));
 	}
+	else
+		*new_interval = sm->interval;
 
 	g_assert(sm->interval == *new_interval);
 	g_assert(sm->interval >= *sm->config_interval);
diff -Nrup gnome-system-monitor-2.16.1/src/smooth_refresh.h gnome-system-monitor-2.16.1.mod/src/smooth_refresh.h
--- gnome-system-monitor-2.16.1/src/smooth_refresh.h	2005-12-28 00:14:59.000000000 +0800
+++ gnome-system-monitor-2.16.1.mod/src/smooth_refresh.h	2006-11-13 20:26:32.072506000 +0800
@@ -18,8 +18,8 @@ typedef struct _SmoothRefresh SmoothRefr
   @return : initialized SmoothRefresh
  */
 
-SmoothRefresh*
-smooth_refresh_new(const guint * config_interval) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL SmoothRefresh*
+smooth_refresh_new(const guint * config_interval) ;
 
 
 
@@ -30,8 +30,8 @@ smooth_refresh_new(const guint * config_
 
  */
 
-void
-smooth_refresh_reset(SmoothRefresh *sm) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void
+smooth_refresh_reset(SmoothRefresh *sm) ;
 
 
 
@@ -42,8 +42,8 @@ smooth_refresh_reset(SmoothRefresh *sm) 
 
  */
 
-void
-smooth_refresh_destroy(SmoothRefresh *sm) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL void
+smooth_refresh_destroy(SmoothRefresh *sm) ;
 
 
 
@@ -59,8 +59,8 @@ smooth_refresh_destroy(SmoothRefresh *sm
   is stored in @new_interval. Else FALSE;
  */
 
-gboolean
-smooth_refresh_get(SmoothRefresh *sm, guint *new_interval) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL gboolean
+smooth_refresh_get(SmoothRefresh *sm, guint *new_interval) ;
 
 
 #endif /* _PROCMAN_SMOOTH_REFRESH */
diff -Nrup gnome-system-monitor-2.17.2.1/src/util.h gnome-system-monitor-2.17.2.1.mod/src/util.h
--- gnome-system-monitor-2.17.2.1/src/util.h	2006-07-12 03:51:11.000000000 +0800
+++ gnome-system-monitor-2.17.2.1.mod/src/util.h	2006-11-13 20:26:32.074021000 +0800
@@ -9,21 +9,21 @@
 #define PROCMAN_RCMP(X, Y) PROCMAN_CMP((Y), (X))
 
 
-GtkWidget*
+G_GNUC_INTERNAL GtkWidget*
 procman_make_label_for_mmaps_or_ofiles(const char *format,
 					     const char *process_name,
-					     unsigned pid) G_GNUC_INTERNAL;
+					     unsigned pid);
 
 
-gchar*
-SI_gnome_vfs_format_file_size_for_display (GnomeVFSFileSize size) G_GNUC_INTERNAL;
+G_GNUC_INTERNAL gchar*
+SI_gnome_vfs_format_file_size_for_display (GnomeVFSFileSize size);
 
 
-gboolean
-load_symbols(const char *module, ...) G_GNUC_INTERNAL G_GNUC_NULL_TERMINATED;
+G_GNUC_INTERNAL gboolean
+load_symbols(const char *module, ...) G_GNUC_NULL_TERMINATED;
 
 
-void
-procman_debug(const char *format, ...) G_GNUC_INTERNAL G_GNUC_PRINTF(1, 2);
+G_GNUC_INTERNAL void
+procman_debug(const char *format, ...) G_GNUC_PRINTF(1, 2);
 
 #endif /* H_GNOME_SYSTEM_MONITOR_UTIL_1123178725 */