? depcomp
? gnome-system-monitor-2.11.3.tar.gz
? stamp-h1
? src/proctable.s
Index: src/callbacks.c
===================================================================
RCS file: /cvs/gnome/procman/src/callbacks.c,v
retrieving revision 1.118
diff -p -u -r1.118 callbacks.c
--- src/callbacks.c	13 May 2005 09:21:24 -0000	1.118
+++ src/callbacks.c	31 May 2005 18:37:38 -0000
@@ -198,21 +198,6 @@ cb_app_delete (GtkWidget *window, GdkEve
 }
 
 
-void
-cb_proc_combo_changed (GtkComboBox *combo, gpointer data)
-{
-	ProcData * const procdata = data;
-	GConfClient *client;
-
-	g_return_if_fail (procdata);
-
-	client = procdata->client;
-
-	procdata->config.whose_process = gtk_combo_box_get_active (combo);
-	gconf_client_set_int (client, "/apps/procman/view_as",
-			      procdata->config.whose_process, NULL);
-}
-
 
 void
 cb_end_process_button_pressed (GtkButton *button, gpointer data)
@@ -594,4 +579,16 @@ cb_timeout (gpointer data)
 	}
 
 	return TRUE;
+}
+
+
+void
+cb_radio_processes(GtkAction *action, GtkRadioAction *current, gpointer data)
+{
+	ProcData * const procdata = data;
+
+	procdata->config.whose_process = gtk_radio_action_get_current_value(current);
+
+	gconf_client_set_int (procdata->client, "/apps/procman/view_as",
+			      procdata->config.whose_process, NULL);
 }
Index: src/callbacks.h
===================================================================
RCS file: /cvs/gnome/procman/src/callbacks.h,v
retrieving revision 1.44
diff -p -u -r1.44 callbacks.h
--- src/callbacks.h	13 May 2005 09:21:24 -0000	1.44
+++ src/callbacks.h	31 May 2005 18:37:38 -0000
@@ -40,8 +40,6 @@ void		cb_about (GtkAction *action, gpoin
 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_proc_combo_changed (GtkComboBox *combo, 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;
 
@@ -72,5 +70,8 @@ void		cb_volume_mounted_or_unmounted(Gno
 					       GnomeVFSVolume *vol,
 					       gpointer procdata) G_GNUC_INTERNAL;
 
+void		cb_radio_processes(GtkAction *action,
+				   GtkRadioAction *current,
+				   gpointer data) G_GNUC_INTERNAL;
 
 #endif /* _PROCMAN_CALLBACKS_H_ */
Index: src/interface.c
===================================================================
RCS file: /cvs/gnome/procman/src/interface.c,v
retrieving revision 1.139
diff -p -u -r1.139 interface.c
--- src/interface.c	30 May 2005 08:28:45 -0000	1.139
+++ src/interface.c	31 May 2005 18:37:38 -0000
@@ -86,6 +86,18 @@ static const GtkToggleActionEntry toggle
 	  G_CALLBACK (cb_toggle_threads), FALSE }
 };
 
+
+static const GtkRadioActionEntry radio_menu_entries[] =
+{
+  { "ShowActiveProcesses", NULL, N_("Active processes"), NULL,
+    N_("Show active processes"), ACTIVE_PROCESSES },
+  { "ShowAllProcesses", NULL, N_("All processes"), NULL,
+    N_("Show all processes"), ALL_PROCESSES },
+  { "ShowMyProcesses", NULL, N_("My processes"), NULL,
+    N_("Show user own process"), MY_PROCESSES }
+};
+
+
 static const char ui_info[] =
 "  <menubar name=\"MenuBar\">"
 "    <menu name=\"FileMenu\" action=\"File\">"
@@ -100,6 +112,10 @@ static const char ui_info[] =
 "      <menuitem name=\"EditPreferenciesMenu\" action=\"Preferencies\" />"
 "    </menu>"
 "    <menu name=\"ViewMenu\" action=\"View\">"
+"      <menuitem name=\"ViewActiveProcesses\" action=\"ShowActiveProcesses\" />"
+"      <menuitem name=\"ViewAllProcesses\" action=\"ShowAllProcesses\" />"
+"      <menuitem name=\"ViewMyProcesses\" action=\"ShowMyProcesses\" />"
+"      <separator />"
 "      <menuitem name=\"ViewDependenciesMenu\" action=\"ShowDependencies\" />"
 "      <menuitem name=\"ViewThreadsMenu\" action=\"ShowThreads\" />"
 "      <separator />"
@@ -132,9 +148,7 @@ create_proc_view (ProcData *procdata)
 {
 	GtkWidget *vbox1, *vbox2;
 	GtkWidget *hbox1;
-	GtkWidget *proc_combo;
 	GtkWidget *scrolled;
-	GtkWidget *label;
 	GtkWidget *hbox2;
 	char* string;
 
@@ -149,22 +163,6 @@ create_proc_view (ProcData *procdata)
 	g_free (string);
 	gtk_box_pack_start (GTK_BOX (hbox1), procdata->loadavg, FALSE, FALSE, 0);
 
-	proc_combo = gtk_combo_box_new_text ();
-	gtk_box_pack_end (GTK_BOX (hbox1), proc_combo, FALSE, FALSE, 0);
-
-	gtk_combo_box_insert_text (GTK_COMBO_BOX (proc_combo), ALL_PROCESSES, _("All processes"));
-	gtk_combo_box_insert_text (GTK_COMBO_BOX (proc_combo), MY_PROCESSES, _("My processes"));
-	gtk_combo_box_insert_text (GTK_COMBO_BOX (proc_combo), ACTIVE_PROCESSES, _("Active processes"));
-
-	gtk_combo_box_set_active (GTK_COMBO_BOX (proc_combo), procdata->config.whose_process);
-
-	g_signal_connect (G_OBJECT (proc_combo), "changed",
-			  G_CALLBACK (cb_proc_combo_changed), procdata);
-
-  	label = gtk_label_new_with_mnemonic (_("Sho_w:"));
-  	gtk_label_set_mnemonic_widget (GTK_LABEL (label), proc_combo);
-	gtk_box_pack_end (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
-
 	gtk_widget_show_all (hbox1);
 
 	scrolled = proctable_new (procdata);
@@ -682,6 +680,13 @@ create_main_window (ProcData *procdata)
 	                                     toggle_menu_entries,
 	                                     G_N_ELEMENTS (toggle_menu_entries),
 	                                     procdata);
+
+	gtk_action_group_add_radio_actions (procdata->action_group,
+					    radio_menu_entries,
+					    G_N_ELEMENTS (radio_menu_entries),
+					    procdata->config.whose_process,
+					    G_CALLBACK(cb_radio_processes),
+					    procdata);
 
 	gtk_ui_manager_insert_action_group (procdata->uimanager,
 	                                    procdata->action_group,
