diff options
author | infirit <[email protected]> | 2014-12-18 01:04:47 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-18 01:04:47 +0100 |
commit | 72efbb28ccebaef956d7c49acf4a08fdfdeccbcb (patch) | |
tree | bb04b8d4873031318386fab730d408920946a9d2 | |
parent | 3d4bef6f6a0e2649b9236352f6ce73e57c0feff7 (diff) | |
download | mate-system-monitor-72efbb28ccebaef956d7c49acf4a08fdfdeccbcb.tar.bz2 mate-system-monitor-72efbb28ccebaef956d7c49acf4a08fdfdeccbcb.tar.xz |
Include process name in end & kill process dialogs
Taken from GSM commit: 140b2526232c118dc5b5b976aee5a71acc24dfa2
From: Chris Kühl <[email protected]>
Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=560162
-rw-r--r-- | src/procdialogs.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp index 2aff3ff..d89295a 100644 --- a/src/procdialogs.cpp +++ b/src/procdialogs.cpp @@ -67,7 +67,9 @@ procdialog_create_kill_dialog (ProcData *procdata, int signal) if (signal == SIGKILL) { /*xgettext: primary alert message*/ - primary = _("Kill the selected process?"); + primary = g_strdup_printf (_("Kill the selected process »%s« (PID: %u)?"), + procdata->selected_process->name, + procdata->selected_process->pid); /*xgettext: secondary alert message*/ secondary = _("Killing a process may destroy data, break the " "session or introduce a security risk. " @@ -76,7 +78,9 @@ procdialog_create_kill_dialog (ProcData *procdata, int signal) } else { /*xgettext: primary alert message*/ - primary = _("End the selected process?"); + primary = g_strdup_printf (_("End the selected process »%s« (PID: %u)?"), + procdata->selected_process->name, + procdata->selected_process->pid); /*xgettext: secondary alert message*/ secondary = _("Ending a process may destroy data, break the " "session or introduce a security risk. " @@ -90,6 +94,8 @@ procdialog_create_kill_dialog (ProcData *procdata, int signal) GTK_BUTTONS_NONE, "%s", primary); + g_free (primary); + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (kill_alert_dialog), "%s", secondary); @@ -166,7 +172,8 @@ procdialog_create_renice_dialog (ProcData *procdata) GtkWidget *hscale; GtkWidget *button; GtkWidget *icon; - gchar *text; + gchar *text; + gchar *dialog_title; if (renice_dialog) return; @@ -174,10 +181,14 @@ procdialog_create_renice_dialog (ProcData *procdata) if (!info) return; - dialog = gtk_dialog_new_with_buttons (_("Change Priority"), NULL, + dialog_title = g_strdup_printf (_("Change Priority of Process »%s« (PID: %u)"), + info->name, info->pid); + dialog = gtk_dialog_new_with_buttons (dialog_title, NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); + g_free (dialog_title); + renice_dialog = dialog; gtk_window_set_resizable (GTK_WINDOW (renice_dialog), FALSE); gtk_container_set_border_width (GTK_CONTAINER (renice_dialog), 5); |