--- a/patches/gnome-system-monitor-01-solaris.diff Wed Mar 04 06:46:15 2009 +0000
+++ b/patches/gnome-system-monitor-01-solaris.diff Wed Mar 04 06:54:21 2009 +0000
@@ -1,545 +1,60 @@
-diff -Nrup gnome-system-monitor-2.17.6/src/callbacks.h gnome-system-monitor-2.17.6.mod/src/callbacks.h
---- gnome-system-monitor-2.17.6/src/callbacks.h 2007-01-18 07:44:46.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/callbacks.h 2007-01-24 17:09:38.201397000 +0800
-@@ -25,63 +25,62 @@
- #include "procman.h"
- #include <libgnomevfs/gnome-vfs.h>
+diff -Nrup gnome-system-monitor-2.25.91/configure.in gnome-system-monitor-2.25.91.mod/configure.in
+--- gnome-system-monitor-2.25.91/configure.in 2009-02-17 02:07:36.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/configure.in 2009-03-04 10:31:31.831892000 +0800
+@@ -56,13 +56,13 @@ if test "$GCC" = "yes" -a "$set_more_war
+ -Wcast-align -Wsign-compare \
+ -std=gnu89 \
+ $CFLAGS"
+- CXXFLAGS="-Wall -std=c++98 $CXXFLAGS"
++ CXXFLAGS="-Wall -std=c++98 $CXXFLAGS -features=extensions"
+ else
+ AC_MSG_RESULT(no)
+ fi
--
--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_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;
--
--gint cb_update_disks (gpointer data) G_GNUC_INTERNAL;
--gint cb_timeout (gpointer data) G_GNUC_INTERNAL;
--
--void cb_volume_mounted_or_unmounted(GnomeVFSVolumeMonitor *vfsvolumemonitor,
-- GnomeVFSVolume *vol,
-- gpointer procdata) G_GNUC_INTERNAL;
--
--void cb_radio_processes(GtkAction *action,
-- GtkRadioAction *current,
-- gpointer data) G_GNUC_INTERNAL;
--
--
--
--void cb_kill_sigstop(GtkAction *action,
-- gpointer data) G_GNUC_INTERNAL;
--
--void cb_kill_sigcont(GtkAction *action,
-- 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);
-+
-+G_GNUC_INTERNAL gint cb_update_disks (gpointer data);
-+G_GNUC_INTERNAL gint cb_timeout (gpointer data);
-+
-+G_GNUC_INTERNAL void cb_volume_mounted_or_unmounted(GnomeVFSVolumeMonitor *vfsvolumemonitor,
-+ GnomeVFSVolume *vol,
-+ gpointer procdata);
-+
-+G_GNUC_INTERNAL void cb_radio_processes(GtkAction *action,
-+ GtkRadioAction *current,
-+ gpointer data);
-+
-+
-+G_GNUC_INTERNAL void cb_kill_sigstop(GtkAction *action,
-+ gpointer data);
-+
-+G_GNUC_INTERNAL void cb_kill_sigcont(GtkAction *action,
-+ gpointer data);
-+
- #endif /* _PROCMAN_CALLBACKS_H_ */
-diff -Nrup gnome-system-monitor-2.17.6/src/interface.cpp gnome-system-monitor-2.17.6.mod/src/interface.cpp
---- gnome-system-monitor-2.17.6/src/interface.cpp 2007-01-19 05:14:12.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/interface.cpp 2007-01-28 19:07:44.321834000 +0800
-@@ -231,13 +231,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;
+-dnl CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden $CXXFLAGS"
+-dnl CXXFLAGS="-fvisibility-inlines-hidden $CXXFLAGS"
++dnl CXXFLAGS="-fvisibility=hidden -fvisibility-inlines-hidden -features=extensions $CXXFLAGS"
++dnl CXXFLAGS="-fvisibility-inlines-hidden -features=extensions $CXXFLAGS"
+
+ AM_GCONF_SOURCE_2
- vbox = gtk_vbox_new (FALSE, 18);
-
-@@ -285,6 +285,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));
-@@ -297,10 +298,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;
-
-@@ -340,22 +352,33 @@ 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, GTK_FILL, GTK_FILL, 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, GTK_FILL, 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,
-+ label2,
- 2,
- 3,
- 0,
-@@ -365,17 +388,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, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
--
--
-- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->memtotal),
-+ /* 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, GTK_FILL, 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(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);
+diff -Nrup gnome-system-monitor-2.25.91/src/load-graph.cpp gnome-system-monitor-2.25.91.mod/src/load-graph.cpp
+--- gnome-system-monitor-2.25.91/src/load-graph.cpp 2008-08-31 21:29:57.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/load-graph.cpp 2009-03-04 11:26:07.230508000 +0800
+@@ -405,7 +405,7 @@ net_scale (LoadGraph *g, unsigned din, u
+ // where factor10 is integer and x < 10
+ // so we new_max has only 1 significant digit
- gtk_table_attach (GTK_TABLE (table),
-- load_graph_get_labels(mem_graph)->memtotal,
-+ label4,
- 4,
- 5,
- 0,
-@@ -385,12 +417,18 @@ create_sys_view (ProcData *procdata)
- 0,
- 0);
-
--
-- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->mempercent),
-+ /* 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 (label5),
- 1.0,
- 0.5);
- gtk_table_attach (GTK_TABLE (table),
-- load_graph_get_labels(mem_graph)->mempercent,
-+ label5,
- 5,
- 6,
- 0,
-@@ -399,23 +437,40 @@ create_sys_view (ProcData *procdata)
- GTK_FILL,
- 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, GTK_FILL, GTK_FILL, 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, GTK_FILL, 0, 0);
-
+- unsigned factor10 = std::pow(10.0, std::floor(std::log10(coef10)));
++ unsigned factor10 = std::pow(10.0, std::floor(std::log10((double)coef10)));
+ coef10 = std::ceil(coef10 / double(factor10)) * factor10;
-- 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,
-+ label2,
- 2,
- 3,
- 1,
-@@ -425,16 +480,24 @@ 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, GTK_FILL, 0, 0);
--
--
-- gtk_misc_set_alignment (GTK_MISC (load_graph_get_labels(mem_graph)->swaptotal),
-+ /* 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, GTK_FILL, 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(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,
- 4,
- 5,
- 1,
-@@ -445,7 +508,7 @@ create_sys_view (ProcData *procdata)
- 0);
+ // then make coef10 divisible by num_bars
+@@ -414,10 +414,10 @@ net_scale (LoadGraph *g, unsigned din, u
+ g_assert(coef10 % g->num_bars() == 0);
-
-- 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),
-@@ -458,6 +521,13 @@ create_sys_view (ProcData *procdata)
- GTK_FILL,
- 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 Network */
-
- procdata->mem_graph = mem_graph;
-
-@@ -493,11 +563,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, GTK_FILL, GTK_FILL, 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, GTK_FILL, 0, 0);
-
-@@ -506,26 +580,41 @@ create_sys_view (ProcData *procdata)
- G_CALLBACK(size_request), &net_size);
-
+ new_max = coef10 * (1UL << (base10 * 10));
+- procman_debug("bak %u new_max %u pow2 %u coef10 %u", bak_max, new_max, pow2, coef10);
++ //procman_debug("bak %u new_max %u pow2 %u coef10 %u", bak_max, new_max, pow2, coef10);
-- 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,
-+ label2,
- FALSE,
- FALSE,
- 0);
-
- gtk_table_attach (GTK_TABLE (table), hbox, 2, 3, 0, 1, GTK_FILL, GTK_FILL, 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, GTK_FILL, 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, GTK_FILL, 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,
-+ label4,
- 4,
- 5,
- 0,
-@@ -534,14 +623,24 @@ create_sys_view (ProcData *procdata)
- GTK_FILL,
- 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, GTK_FILL, GTK_FILL, 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, GTK_FILL, 0, 0);
-
-@@ -549,26 +648,41 @@ create_sys_view (ProcData *procdata)
- g_signal_connect (G_OBJECT (hbox), "size_request",
- G_CALLBACK(size_request), &net_size);
+ if (bak_max > new_max) {
+- procman_debug("overflow detected: bak=%u new=%u", bak_max, new_max);
++ //procman_debug("overflow detected: bak=%u new=%u", bak_max, new_max);
+ new_max = bak_max;
+ }
-- 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,
-+ label2,
- FALSE,
- FALSE,
- 0);
-
- gtk_table_attach (GTK_TABLE (table), hbox, 2, 3, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
+@@ -435,7 +435,7 @@ net_scale (LoadGraph *g, unsigned din, u
+ }
+ }
-- 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, GTK_FILL, 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, GTK_FILL, 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,
-+ label4,
- 4,
- 5,
- 1,
-@@ -580,6 +580,12 @@
- 0,
- 0);
+- procman_debug("rescale dmax = %u max = %u new_max = %u", dmax, g->net.max, new_max);
++ //procman_debug("rescale dmax = %u max = %u new_max = %u", dmax, g->net.max, new_max);
-+ /* 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;
-
- return vbox;
-diff -Nrup gnome-system-monitor-2.17.6/src/interface.h gnome-system-monitor-2.17.6.mod/src/interface.h
---- gnome-system-monitor-2.17.6/src/interface.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/interface.h 2007-01-24 17:41:55.437494000 +0800
-@@ -24,9 +24,9 @@
- #include <gtk/gtk.h>
- #include "procman.h"
+ g->net.max = new_max;
--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.18.0/src/load-graph.cpp gnome-system-monitor-2.18.0.mod/src/load-graph.cpp
---- gnome-system-monitor-2.18.0/src/load-graph.cpp 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.18.0.mod/src/load-graph.cpp 2007-01-24 17:42:48.619510000 +0800
-@@ -379,6 +379,24 @@
+@@ -457,6 +457,24 @@ get_net (LoadGraph *g)
unsigned din, dout;
- gchar *text1, *text2;
+ gchar *text1;
+ /* we have to optimize the performance of libgtop, because in some low
+ level machine, to update the information will occupy too much cpu.
@@ -562,89 +77,65 @@
ifnames = glibtop_get_netlist(&netlist);
for (i = 0; i < netlist.number; ++i)
-diff -Nrup gnome-system-monitor-2.17.6/src/load-graph.h gnome-system-monitor-2.17.6.mod/src/load-graph.h
---- gnome-system-monitor-2.17.6/src/load-graph.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/load-graph.h 2007-01-24 17:44:34.665872000 +0800
-@@ -34,34 +34,34 @@ struct _LoadGraphLabels
+diff -Nrup gnome-system-monitor-2.25.91/src/lsof.cpp gnome-system-monitor-2.25.91.mod/src/lsof.cpp
+--- gnome-system-monitor-2.25.91/src/lsof.cpp 2008-05-24 05:44:00.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/lsof.cpp 2009-03-04 10:16:57.082704000 +0800
+@@ -95,13 +95,13 @@ namespace
+
+ GUI()
+ {
+- procman_debug("New Lsof GUI %p", this);
++ //procman_debug("New Lsof GUI %p", this);
+ }
+
+
+ ~GUI()
+ {
+- procman_debug("Destroying Lsof GUI %p", this);
++ //procman_debug("Destroying Lsof GUI %p", this);
+ }
- /* 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) ;
+diff -Nrup gnome-system-monitor-2.25.91/src/openfiles.cpp gnome-system-monitor-2.25.91.mod/src/openfiles.cpp
+--- gnome-system-monitor-2.25.91/src/openfiles.cpp 2008-09-12 03:55:34.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/openfiles.cpp 2009-03-04 11:54:44.460430000 +0800
+@@ -67,7 +67,7 @@ friendlier_hostname(const char *addr_str
+ goto failsafe;
- /* 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;
+ if (getnameinfo(res->ai_addr, res->ai_addrlen, hostname,
+- sizeof hostname, service, sizeof service, NI_IDN))
++ sizeof hostname, service, sizeof service, NI_MAXSERV))
+ goto failsafe;
--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.17.6/src/memmaps.h gnome-system-monitor-2.17.6.mod/src/memmaps.h
---- gnome-system-monitor-2.17.6/src/memmaps.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/memmaps.h 2007-01-24 17:45:14.957958000 +0800
-@@ -4,6 +4,6 @@
- #include <glib.h>
- #include "procman.h"
+ if (res) freeaddrinfo(res);
+diff -Nrup gnome-system-monitor-2.25.91/src/prettytable.cpp gnome-system-monitor-2.25.91.mod/src/prettytable.cpp
+--- gnome-system-monitor-2.25.91/src/prettytable.cpp 2009-01-19 02:01:09.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/prettytable.cpp 2009-03-04 10:17:07.130460000 +0800
+@@ -77,7 +77,7 @@ PrettyTable::register_application(pid_t
+ info->set_icon(icon);
+ // move the ref to the map
+ this->apps[pid] = icon;
+- procman_debug("WNCK OK for %u", unsigned(pid));
++ //procman_debug("WNCK OK for %u", unsigned(pid));
+ }
+ }
--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.17.6/src/openfiles.h gnome-system-monitor-2.17.6.mod/src/openfiles.h
---- gnome-system-monitor-2.17.6/src/openfiles.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/openfiles.h 2007-01-24 17:45:46.513294000 +0800
-@@ -5,6 +5,6 @@
-
- #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.17.6/src/procactions.cpp gnome-system-monitor-2.17.6.mod/src/procactions.cpp
---- gnome-system-monitor-2.17.6/src/procactions.cpp 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/procactions.cpp 2007-01-24 17:46:53.540932000 +0800
-@@ -127,6 +127,14 @@ kill_single_process (GtkTreeModel *model
-
+@@ -229,7 +229,7 @@ PrettyTable::set_icon(ProcInfo &info)
+ getters.push_back(&PrettyTable::get_icon_from_name);
+ if (has_kthreadd())
+ {
+- procman_debug("kthreadd is running with PID 2");
++ //procman_debug("kthreadd is running with PID 2");
+ getters.push_back(&PrettyTable::get_icon_for_kernel);
+ }
+ getters.push_back(&PrettyTable::get_icon_dummy);
+diff -Nrup gnome-system-monitor-2.25.91/src/procactions.cpp gnome-system-monitor-2.25.91.mod/src/procactions.cpp
+--- gnome-system-monitor-2.25.91/src/procactions.cpp 2007-01-03 06:15:36.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/procactions.cpp 2009-02-22 19:58:20.190256000 +0800
+@@ -128,6 +128,15 @@ kill_single_process (GtkTreeModel *model
if (!info)
return;
+
+ /*
+ * If the process 0 is a system process, we can't control it even as root
+ */
@@ -653,27 +144,23 @@
+ return;
+ }
+ /* if it is not a system process, we can kill it now */
-
++
error = kill (info->pid, args->signal);
-diff -Nrup gnome-system-monitor-2.17.6/src/procactions.h gnome-system-monitor-2.17.6.mod/src/procactions.h
---- gnome-system-monitor-2.17.6/src/procactions.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/procactions.h 2007-01-24 19:30:38.684435000 +0800
-@@ -21,8 +21,8 @@
+ /* success */
+diff -Nrup gnome-system-monitor-2.25.91/src/procdialogs.cpp gnome-system-monitor-2.25.91.mod/src/procdialogs.cpp
+--- gnome-system-monitor-2.25.91/src/procdialogs.cpp 2008-05-24 05:44:00.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/procdialogs.cpp 2009-03-04 10:17:21.908309000 +0800
+@@ -342,7 +342,7 @@ private:
+ g_error_free(e);
+ }
- #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) ;
+- procman_debug("set %s to %d", this->gconf_key.c_str(), new_value);
++ //procman_debug("set %s to %d", this->gconf_key.c_str(), new_value);
+ }
- #endif
-
-diff -Nrup gnome-system-monitor-2.17.6/src/procdialogs.cpp gnome-system-monitor-2.17.6.mod/src/procdialogs.cpp
---- gnome-system-monitor-2.17.6/src/procdialogs.cpp 2007-01-18 07:50:28.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/procdialogs.cpp 2007-01-24 17:48:59.927166000 +0800
-@@ -629,7 +629,10 @@ procdialog_create_preferences_dialog (Pr
+ const string gconf_key;
+@@ -659,7 +659,10 @@ procdialog_create_preferences_dialog (Pr
gtk_box_pack_start (GTK_BOX (hbox2), hbox3, TRUE, TRUE, 0);
update = (gfloat) procdata->config.graph_update_interval;
@@ -685,33 +172,19 @@
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.17.6/src/procdialogs.h gnome-system-monitor-2.17.6.mod/src/procdialogs.h
---- gnome-system-monitor-2.17.6/src/procdialogs.h 2007-01-18 07:47:42.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/procdialogs.h 2007-01-24 17:51:27.419745000 +0800
-@@ -42,13 +42,13 @@ typedef enum
- } ProcmanActionType;
+@@ -803,7 +806,7 @@ procdialog_create_root_password_dialog(P
+ command = procman_action_to_command(type, pid, extra_value);
+
+- procman_debug("Trying to run '%s' as root", command);
++ //procman_debug("Trying to run '%s' as root", command);
--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_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.6/src/procman.cpp gnome-system-monitor-2.17.6.mod/src/procman.cpp
---- gnome-system-monitor-2.17.6/src/procman.cpp 2007-01-18 07:53:25.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/procman.cpp 2007-01-28 19:19:17.263672000 +0800
-@@ -110,7 +110,10 @@ timeouts_changed_cb (GConfClient *client
+ if (procman_has_gksu())
+ ret = procman_gksu_create_root_password_dialog(command);
+diff -Nrup gnome-system-monitor-2.25.91/src/procman.cpp gnome-system-monitor-2.25.91.mod/src/procman.cpp
+--- gnome-system-monitor-2.25.91/src/procman.cpp 2009-01-03 20:06:10.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/procman.cpp 2009-03-04 10:22:32.037096000 +0800
+@@ -147,7 +147,10 @@ timeouts_changed_cb (GConfClient *client
procdata->config.graph_update_interval = gconf_value_get_int (value);
procdata->config.graph_update_interval =
MAX (procdata->config.graph_update_interval,
@@ -723,14 +196,14 @@
load_graph_change_speed(procdata->cpu_graph,
procdata->config.graph_update_interval);
load_graph_change_speed(procdata->mem_graph,
-@@ -349,10 +352,14 @@ procman_data_new (GConfClient *client)
+@@ -332,10 +335,14 @@ procman_data_new (GConfClient *client)
/* Sanity checks */
swidth = gdk_screen_width ();
sheight = gdk_screen_height ();
- pd->config.width = CLAMP (pd->config.width, 50, swidth);
- pd->config.height = CLAMP (pd->config.height, 50, sheight);
+ pd->config.width = CLAMP (pd->config.width, 50, swidth-2); /* there is a bug in gtk I think, when the width/height
-+ become the biggest, the windows alway biggest, so -2 */
++ become the biggest, the windows alway biggest, so -2 */
+ pd->config.height = CLAMP (pd->config.height, 50, sheight-2);
pd->config.update_interval = MAX (pd->config.update_interval, 1000);
- pd->config.graph_update_interval = MAX (pd->config.graph_update_interval, 250);
@@ -741,30 +214,78 @@
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.17.6/src/procman.h gnome-system-monitor-2.17.6.mod/src/procman.h
---- gnome-system-monitor-2.17.6/src/procman.h 2007-01-22 00:58:39.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/procman.h 2007-01-24 17:57:36.918021000 +0800
-@@ -199,9 +199,9 @@ struct ProcData
- SmoothRefresh *smooth_refresh;
- };
+@@ -598,9 +605,9 @@ cb_server (const gchar *msg, gpointer us
+ procdata = *(ProcData**)user_data;
+ g_assert (procdata != NULL);
+
+- procman_debug("cb_server(%s)", msg);
++ //procman_debug("cb_server(%s)", msg);
+ if (msg != NULL && procman::SHOW_SYSTEM_TAB_CMD == msg) {
+- procman_debug("Changing to PROCMAN_TAB_SYSINFO via bacon message");
++ //procman_debug("Changing to PROCMAN_TAB_SYSINFO via bacon message");
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO);
+ cb_change_current_page(GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO, procdata);
+ } else
+@@ -677,7 +684,7 @@ main (int argc, char *argv[])
+
+ Gio::init();
+ Gtk::Main kit(&argc, &argv);
+- procman_debug("post gtk_init");
++ //procman_debug("post gtk_init");
+
+ conn = bacon_message_connection_new ("gnome-system-monitor");
+ if (!conn) g_error("Couldn't connect to gnome-system-monitor");
+@@ -715,14 +722,14 @@ main (int argc, char *argv[])
+
+ glibtop_init ();
--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) ;
+- procman_debug("end init");
++ //procman_debug("end init");
+
+ procdata = procman_data_new (client);
+ procdata->client = client;
+
+- procman_debug("begin create_main_window");
++ //procman_debug("begin create_main_window");
+ create_main_window (procdata);
+- procman_debug("end create_main_window");
++ //procman_debug("end create_main_window");
+
+ // proctable_update_all (procdata);
+
+@@ -731,14 +738,14 @@ main (int argc, char *argv[])
+ g_assert(procdata->app);
+
+ if (option_group.show_system_tab) {
+- procman_debug("Starting with PROCMAN_TAB_SYSINFO by commandline request");
++ //procman_debug("Starting with PROCMAN_TAB_SYSINFO by commandline request");
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO);
+ cb_change_current_page (GTK_NOTEBOOK(procdata->notebook), PROCMAN_TAB_SYSINFO, procdata);
+ }
+
+ gtk_widget_show(procdata->app);
+
+- procman_debug("begin gtk_main");
++ //procman_debug("begin gtk_main");
+ kit.run();
+
+ procman_free_data (procdata);
+diff -Nrup gnome-system-monitor-2.25.91/src/proctable.cpp gnome-system-monitor-2.25.91.mod/src/proctable.cpp
+--- gnome-system-monitor-2.25.91/src/proctable.cpp 2008-09-14 05:25:03.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/proctable.cpp 2009-03-04 12:05:57.166912000 +0800
+@@ -197,7 +197,7 @@ search_equal_func(GtkTreeModel *model,
+ GtkWidget *
+-proctable_new (ProcData * const procdata)
++proctable_new (ProcData * procdata)
+ {
+ GtkWidget *proctree;
+ GtkWidget *scrolled;
+@@ -487,6 +487,18 @@ static void get_process_memory_writable(
+ glibtop_proc_map buf;
+ glibtop_map_entry *maps;
-diff -Nrup gnome-system-monitor-2.17.6/src/proctable.cpp gnome-system-monitor-2.17.6.mod/src/proctable.cpp
---- gnome-system-monitor-2.17.6/src/proctable.cpp 2007-01-21 08:57:08.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/proctable.cpp 2007-01-24 19:43:59.958896000 +0800
-@@ -549,7 +549,18 @@ 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()
@@ -779,139 +300,110 @@
+
maps = glibtop_get_proc_map(&buf, info->pid);
- for (i = 0; i < buf.number; ++i) {
-@@ -558,6 +569,9 @@ static void get_process_memory_writable(
+ gulong memwritable = 0;
+@@ -498,6 +510,9 @@ static void get_process_memory_writable(
#else
if (maps[i].perm & GLIBTOP_MAP_PERM_WRITE)
- info->memwritable += maps[i].size;
+ memwritable += maps[i].size;
+
+ if (maps[i].perm & GLIBTOP_MAP_PERM_SHARED)
+ info->memshared += maps[i].shared_clean;
#endif
}
-@@ -574,15 +588,19 @@ get_process_memory_info(ProcInfo *info)
- wnck_pid_read_resource_usage (gdk_screen_get_display (gdk_screen_get_default ()),
+@@ -517,13 +532,20 @@ get_process_memory_info(ProcInfo *info)
info->pid,
&xresources);
-+
-+ info->memxserver = xresources.total_bytes_estimate;
- glibtop_get_proc_mem(&procmem, info->pid);
--
++ info->memxserver = xresources.total_bytes_estimate;
++
+/* zhua: use get_process_memory_writable(), because it just call glibtop_get_proc_map_s(),
-++ can get shared memory and writable memory, others: vmsize & memres, will be
++ can get shared memory and writable memory, others: vmsize & memres, will be
+ get in procstate from glibtop_get_proc_state()*/
+/* glibtop_get_proc_mem(&procmem, info->pid);
+
+
info->vmsize = procmem.vsize;
info->memres = procmem.resident;
info->memshared = procmem.share;
-- info->memxserver = xresources.total_bytes_estimate;
--
+ info->memxserver = xresources.total_bytes_estimate;
+*/
+
get_process_memory_writable(info);
- info->mem = info->memxserver + info->memwritable;
-@@ -766,6 +784,30 @@ remove_children_from_tree (ProcData *pro
- } while (gtk_tree_model_iter_next (model, parent));
+@@ -597,7 +619,7 @@ insert_info_to_tree (ProcInfo *info, Pro
+
+ procdata->pretty_table.set_icon(*info);
+
+- procman_debug("inserted %d%s", info->pid, (forced ? " (forced)" : ""));
++ //procman_debug("inserted %d%s", info->pid, (forced ? " (forced)" : ""));
}
-+/* place the children process to blacklist if the parent is placed into */
-+#if 0
-+/* Community have delete this function, so maybe not need this patch. */
-+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));
-+}
-+#endif
+
+@@ -612,12 +634,12 @@ remove_info_from_tree (ProcData *procdat
+ GtkTreeIter child_node;
+
+ if (std::find(orphans.begin(), orphans.end(), current) != orphans.end()) {
+- procman_debug("[%u] %d already removed from tree", lvl, int(current->pid));
++ //procman_debug("[%u] %d already removed from tree", lvl, int(current->pid));
+ return;
+ }
- void
- remove_info_from_tree (ProcInfo *info, ProcData *procdata)
-@@ -781,7 +823,12 @@ remove_info_from_tree (ProcInfo *info, P
+- procman_debug("[%u] pid %d, %d children", lvl, int(current->pid),
+- gtk_tree_model_iter_n_children(model, ¤t->node));
++ //procman_debug("[%u] pid %d, %d children", lvl, int(current->pid),
++ // gtk_tree_model_iter_n_children(model, ¤t->node));
+
+ // it is not possible to iterate&erase over a treeview so instead we
+ // just pop one child after another and recursively remove it and
+@@ -655,15 +677,20 @@ update_info (ProcData *procdata, ProcInf
+ glibtop_get_proc_state (&procstate, info->pid);
+ info->status = procstate.state;
- if (procdata->selected_process == info)
- procdata->selected_process = NULL;
--
-+ /* move all children from tree to blacklist */
-+/* Community have delete this function, so maybe not need this patch. */
-+/* 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);
-
- info->is_visible = FALSE;
-@@ -846,18 +893,31 @@ update_info (ProcData *procdata, ProcInf
- glibtop_proc_uid procuid;
- glibtop_proc_time proctime;
-
-+ /* zhua: let's delete this call, because we can get the value
++ /* zhua: let's delete this call, because we can get the value
+ from glibtop_get_proc_state
- glibtop_get_proc_uid (&procuid, info->pid);
-+ */
- glibtop_get_proc_time (&proctime, info->pid);
+ glibtop_get_proc_uid (&procuid, info->pid);
++ */
+ glibtop_get_proc_time (&proctime, info->pid);
-- get_process_memory_info(info);
-- get_process_user(procdata, info, procstate.uid);
-+ get_process_memory_info(info);/* get shared/writable/xserver memory */
-+ get_process_user(procdata, info, procstate.uid);/* get user of process */
+- get_process_memory_info(info);
++ get_process_memory_info(info);/* get shared/writable/xserver memory */
+
+- info->set_user(procstate.uid);
++ info->set_user(procstate.uid);/* get user of process */
-+ /* zhua: let's get from file directly
- info->pcpu = (proctime.rtime - info->cpu_time_last) * 100 / total_time;
- info->pcpu = MIN(info->pcpu, 100);
-+ */
++ /* zhua: let's get from file directly
+ info->pcpu = (proctime.rtime - info->cpu_time) * 100 / procdata->cpu_total_time;
+ info->pcpu = MIN(info->pcpu, 100);
++ */
- info->cpu_time_last = proctime.rtime;
-- info->nice = procuid.nice;
+ if (procdata->config.solaris_mode)
+ info->pcpu /= procdata->config.num_cpus;
+@@ -671,6 +698,17 @@ update_info (ProcData *procdata, ProcInf
+ ProcInfo::cpu_times[info->pid] = info->cpu_time = proctime.rtime;
+ info->nice = procuid.nice;
+ info->ppid = procuid.ppid;
++
+ /* zhua: get nice/ppid from procstate */
-+ info->nice = procstate.nice;
++ // info->nice = procstate.nice;
+
+ /* zhua: get start_time from procstate */
+ info->start_time = procstate.start_time;
+
+ info->vmsize = procstate.vsize;
+ info->memres = procstate.resident;
-
-+ info->pcpu = procstate.load;
++
++ // info->pcpu = procstate.load;
+ }
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (procdata->tree));
-
-@@ -889,7 +949,9 @@ ProcInfo::ProcInfo(pid_t pid)
- info->uid = -1;
- glibtop_get_proc_state (&procstate, pid);
-- glibtop_get_proc_uid (&procuid, pid);
-+ /* zhua: delete this function, because we can get nice/ppid from glibtop_get_proc_state()
-+ dont' need to open/pread/close psinfo, it will save some time
-+ glibtop_get_proc_uid (&procuid, pid);*/
- glibtop_get_proc_time (&proctime, pid);
- arguments = glibtop_get_proc_argv (&procargs, pid, 0);
-
-@@ -903,16 +965,21 @@ ProcInfo::ProcInfo(pid_t pid)
-
- info->pcpu = 0;
- info->cpu_time_last = proctime.rtime;
+@@ -712,7 +750,13 @@ ProcInfo::ProcInfo(pid_t pid)
+ cpu_time = it->second;
+ }
+ info->cpu_time = cpu_time;
- info->start_time = proctime.start_time;
-- info->nice = procuid.nice;
--
+ /* zhua: get start_time/nice/ppid from procstate */
+ info->start_time = procstate.start_time;
+ info->nice = procstate.nice;
@@ -919,136 +411,131 @@
+ info->vmsize = procstate.vsize;
+ info->memres = procstate.resident;
+ info->pcpu = procstate.load;
-+
- get_process_memory_info(info);
- get_process_status (info, &procstate);
+
get_process_selinux_context (info);
-
- info->pixbuf = ProcData::get_instance()->pretty_table.get_icon(info->name, pid);
+ }
+@@ -757,7 +801,7 @@ refresh_list (ProcData *procdata, const
+ ++next;
-- info->parent = find_parent(ProcData::get_instance(), procuid.ppid);
-+ info->parent = find_parent(ProcData::get_instance(), procstate.ppid);
- if (info->parent) {
- info->parent->children = g_slist_prepend (info->parent->children, info);
- }
-@@ -999,7 +999,7 @@
+ if (pids.find(info->pid) == pids.end()) {
+- procman_debug("ripping %d", info->pid);
++ //procman_debug("ripping %d", info->pid);
+ remove_info_from_tree(procdata, model, info, addition);
+ addition.remove(info);
+ ProcInfo::all.erase(it);
+@@ -785,12 +829,12 @@ refresh_list (ProcData *procdata, const
- static void
--refresh_list (ProcData *procdata, const unsigned *pid_list, const guint n)
-+refresh_list (ProcData *procdata, const long *pid_list, const guint n)
- {
- GHashTable *pid_hash;
- GList *list;
-@@ -1011,7 +1071,7 @@
- void
- proctable_update_list (ProcData * const procdata)
- {
-- unsigned *pid_list;
-+ long *pid_list;
- glibtop_proclist proclist;
- glibtop_cpu cpu;
- gint which, arg;
-@@ -1022,9 +1089,11 @@ proctable_update_list (ProcData * const
+ while (not addition.empty()) {
+- procman_debug("looking for %d parents", int(addition.size()));
++ //procman_debug("looking for %d parents", int(addition.size()));
+ ProcList::iterator it(addition.begin());
+
+ while (it != addition.end()) {
+- procman_debug("looking for %d's parent with ppid %d",
+- int((*it)->pid), int((*it)->ppid));
++ //procman_debug("looking for %d's parent with ppid %d",
++ //int((*it)->pid), int((*it)->ppid));
+
+
+ // inserts the process in the treeview if :
+@@ -880,9 +924,11 @@ 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 */
-+ /* zhua: delete these sentences, we can get cpu% from file directly.
++/* zhua: delete these sentences, we can get cpu% from file directly.
glibtop_get_cpu (&cpu);
- total_time = MAX(cpu.total - total_time_last, 1);
- total_time_last = cpu.total;
-+ */
+ procdata->cpu_total_time = MAX(cpu.total - procdata->cpu_total_time_last, 1);
+ procdata->cpu_total_time_last = cpu.total;
++*/
refresh_list (procdata, pid_list, proclist.number);
-diff -Nrup gnome-system-monitor-2.17.6/src/proctable.h gnome-system-monitor-2.17.6.mod/src/proctable.h
---- gnome-system-monitor-2.17.6/src/proctable.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/proctable.h 2007-01-24 19:49:03.049889000 +0800
-@@ -48,20 +48,23 @@ enum
- NUM_COLUMNS
- };
+@@ -895,7 +941,7 @@ proctable_update_list (ProcData * const
-+G_BEGIN_DECLS
--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 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) ;
-
--GSList* proctable_get_columns_order(GtkTreeView *treeview) G_GNUC_INTERNAL;
--void proctable_set_columns_order(GtkTreeView *treeview, GSList *order) 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) ;
+ void
+-proctable_update_all (ProcData * const procdata)
++proctable_update_all (ProcData * procdata)
+ {
+ char* string;
--char* make_loadavg_string(void) G_GNUC_INTERNAL;
-+G_GNUC_INTERNAL char* make_loadavg_string(void) ;
-+
-+G_END_DECLS
-
- #endif /* _PROCMAN_PROCTABLE_H_ */
-diff -Nrup gnome-system-monitor-2.17.6/src/selinux.h gnome-system-monitor-2.17.6.mod/src/selinux.h
---- gnome-system-monitor-2.17.6/src/selinux.h 2007-01-03 06:15:36.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/selinux.h 2007-01-24 19:18:59.947306000 +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) ;
+diff -Nrup gnome-system-monitor-2.25.91/src/selection.cpp gnome-system-monitor-2.25.91.mod/src/selection.cpp
+--- gnome-system-monitor-2.25.91/src/selection.cpp 2007-06-30 02:28:26.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/selection.cpp 2009-03-04 12:00:41.995124000 +0800
+@@ -33,10 +33,10 @@ namespace procman
+ if (ProcInfo* proc = ProcInfo::find(*it))
+ {
+ gtk_tree_selection_select_iter(selection, &proc->node);
+- procman_debug("Re-selected process %u", unsigned(*it));
++ //procman_debug("Re-selected process %u", unsigned(*it));
+ }
+- else
+- procman_debug("Could not find process %u, cannot re-select it", unsigned(*it));
++ //else
++ //procman_debug("Could not find process %u, cannot re-select it", unsigned(*it));
+ }
+ }
+ }
+diff -Nrup gnome-system-monitor-2.25.91/src/smooth_refresh.cpp gnome-system-monitor-2.25.91.mod/src/smooth_refresh.cpp
+--- gnome-system-monitor-2.25.91/src/smooth_refresh.cpp 2009-01-19 02:16:39.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/smooth_refresh.cpp 2009-03-04 11:31:10.615230000 +0800
+@@ -65,7 +65,7 @@ void SmoothRefresh::load_gconf_value(GCo
+ this->active = value ? gconf_value_get_bool(value) : KEY_DEFAULT_VALUE;
--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;
+ if (this->active)
+- procman_debug("smooth_refresh is enabled");
++ //procman_debug("smooth_refresh is enabled");
- #endif /* PROCMAN_SELINUX_H_20050525 */
-diff -Nrup gnome-system-monitor-2.17.6/src/util.h gnome-system-monitor-2.17.6.mod/src/util.h
---- gnome-system-monitor-2.17.6/src/util.h 2007-01-23 01:30:48.000000000 +0800
-+++ gnome-system-monitor-2.17.6.mod/src/util.h 2007-01-24 19:20:35.141663000 +0800
-@@ -25,22 +25,22 @@ inline int procman_cmp(T x, T y)
- #define PROCMAN_CMP(X, Y) procman_cmp((X), (Y))
- #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) ;
+ if (own_value and value)
+ gconf_value_free(value);
+@@ -159,10 +159,10 @@ SmoothRefresh::get(guint &new_interval)
--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) ;
+ if (changed) {
+- procman_debug("CPU usage is %3u%%, changed refresh_interval to %u (config %u)",
++ /*procman_debug("CPU usage is %3u%%, changed refresh_interval to %u (config %u)",
+ this->last_pcpu,
+ this->interval,
+- config_interval);
++ config_interval);*/
+ }
+ g_assert(this->interval == new_interval);
+diff -Nrup gnome-system-monitor-2.25.91/src/sysinfo.cpp gnome-system-monitor-2.25.91.mod/src/sysinfo.cpp
+--- gnome-system-monitor-2.25.91/src/sysinfo.cpp 2009-01-21 05:13:28.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/sysinfo.cpp 2009-03-04 10:18:54.373979000 +0800
+@@ -273,7 +273,7 @@ namespace {
+ channel->close();
+ Glib::spawn_close_pid(pid);
+
+- procman_debug("lsb_release output = '%s'", content.c_str());
++ //procman_debug("lsb_release output = '%s'", content.c_str());
--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;
+ string release, codename;
+ std::istringstream input(content);
+diff -Nrup gnome-system-monitor-2.25.91/src/util.cpp gnome-system-monitor-2.25.91.mod/src/util.cpp
+--- gnome-system-monitor-2.25.91/src/util.cpp 2009-02-17 02:21:44.000000000 +0800
++++ gnome-system-monitor-2.25.91.mod/src/util.cpp 2009-03-04 10:21:38.634398000 +0800
+@@ -192,7 +192,7 @@ load_symbols(const char *module, ...)
+ if (!mod)
+ return FALSE;
+- procman_debug("Found %s", module);
++ //procman_debug("Found %s", module);
+
+ va_start(args, module);
--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);
+@@ -208,10 +208,10 @@ load_symbols(const char *module, ...)
+ symbol = va_arg(args, void**);
-
- inline string make_string(char *c_str)
+ if (g_module_symbol(mod, name, symbol)) {
+- procman_debug("Loaded %s from %s", name, module);
++ //procman_debug("Loaded %s from %s", name, module);
+ }
+ else {
+- procman_debug("Could not load %s from %s", name, module);
++ //procman_debug("Could not load %s from %s", name, module);
+ found_all = FALSE;
+ break;
+ }