diff --git a/gnome-system-monitor.spec b/gnome-system-monitor.spec index 601bf3b..7e90709 100644 --- a/gnome-system-monitor.spec +++ b/gnome-system-monitor.spec @@ -12,7 +12,7 @@ Summary: Process and resource monitor Name: gnome-system-monitor Version: 2.27.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System URL: http://www.gnome.org/ @@ -49,6 +49,12 @@ Patch1: session.patch # https://bugzilla.redhat.com/show_bug.cgi?id=495730 Patch2: polkit1.patch +# http://bugzilla.gnome.org/show_bug.cgi?id=592747 +Patch3: buttons.patch + +# http://bugzilla.gnome.org/show_bug.cgi?id=592758 +Patch4: memmapsdialog.patch + Requires(pre): GConf2 >= %{gconf_version} Requires(post): GConf2 >= %{gconf_version} Requires(post): scrollkeeper @@ -65,6 +71,8 @@ such as CPU and memory. %patch0 -p1 -b .polkit %patch1 -p1 -b .session %patch2 -p1 -b .polkit1 +%patch3 -p1 -b .buttons +%patch4 -p1 -b .memmapsdialog autoreconf -i -f @@ -147,6 +155,10 @@ scrollkeeper-update -q %changelog +* Sat Aug 22 2009 Matthias Clasen - 2.27.4-3 +- Fix a button image +- Add a close button to the memmaps dialog + * Fri Jul 24 2009 Fedora Release Engineering - 2.27.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/memmapsdialog.patch b/memmapsdialog.patch new file mode 100644 index 0000000..4765aff --- /dev/null +++ b/memmapsdialog.patch @@ -0,0 +1,74 @@ +--- gnome-system-monitor-2.27.4/src/memmaps.cpp 2009-07-11 08:50:19.000000000 -0400 ++++ hacked/src/memmaps.cpp 2009-08-22 18:42:09.037680410 -0400 +@@ -452,18 +452,17 @@ + g_free (memmaps); + } + +- +- +-static gboolean window_delete_event(GtkWidget *, GdkEvent *, gpointer data) ++static void ++dialog_response (GtkDialog *dialog, gint response_id, gpointer data) + { + MemMapsData * const mmdata = static_cast(data); + + g_source_remove (mmdata->timer); + + delete mmdata; +- return FALSE; +-} + ++ gtk_widget_destroy (GTK_WIDGET (dialog)); ++} + + static MemMapsData* + create_memmapsdata (ProcData *procdata) +@@ -601,27 +600,17 @@ + mmdata = create_memmapsdata (procdata); + mmdata->info = info; + +- memmapsdialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); +- gtk_window_set_transient_for(GTK_WINDOW(memmapsdialog), GTK_WINDOW(procdata->app)); +- gtk_window_set_destroy_with_parent(GTK_WINDOW(memmapsdialog), TRUE); +- // gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); +- gtk_window_set_title(GTK_WINDOW(memmapsdialog), _("Memory Maps")); ++ memmapsdialog = gtk_dialog_new_with_buttons (_("Memory Maps"), GTK_WINDOW (procdata->app), ++ GTK_DIALOG_DESTROY_WITH_PARENT, ++ GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, ++ NULL); + gtk_window_set_resizable(GTK_WINDOW(memmapsdialog), TRUE); + gtk_window_set_default_size(GTK_WINDOW(memmapsdialog), 575, 400); +- // gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); +- gtk_container_set_border_width(GTK_CONTAINER(memmapsdialog), 12); ++ gtk_dialog_set_has_separator(GTK_DIALOG(memmapsdialog), FALSE); ++ gtk_container_set_border_width(GTK_CONTAINER(memmapsdialog), 5); + +- GtkWidget *mainbox = gtk_vbox_new(FALSE, 12); +- gtk_container_add(GTK_CONTAINER(memmapsdialog), mainbox); +- +- vbox = mainbox; +- gtk_box_set_spacing (GTK_BOX (vbox), 2); +- gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); +- +- dialog_vbox = gtk_vbox_new (FALSE, 6); ++ dialog_vbox = GTK_DIALOG (memmapsdialog)->vbox; + gtk_container_set_border_width (GTK_CONTAINER (dialog_vbox), 5); +- gtk_box_pack_start (GTK_BOX (vbox), dialog_vbox, TRUE, TRUE, 0); +- + + label = procman_make_label_for_mmaps_or_ofiles ( + _("_Memory maps for process \"%s\" (PID %u):"), +@@ -643,10 +632,10 @@ + + gtk_box_pack_start (GTK_BOX (dialog_vbox), scrolled, TRUE, TRUE, 0); + +- gtk_widget_show_all (memmapsdialog); ++ g_signal_connect (G_OBJECT (memmapsdialog), "response", ++ G_CALLBACK(dialog_response), mmdata); + +- g_signal_connect(G_OBJECT(memmapsdialog), "delete-event", +- G_CALLBACK(window_delete_event), mmdata); ++ gtk_widget_show_all (memmapsdialog); + + mmdata->timer = g_timeout_add_seconds (5, memmaps_timer, mmdata); +