summaryrefslogtreecommitdiff
path: root/src/procdialogs.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-17 16:33:35 +0100
committerinfirit <[email protected]>2014-12-17 17:23:02 +0100
commit2a0ef42d45004d7b0775ac843352cf10d11ce091 (patch)
tree298b8fea64cf0bd45f6607193598d1f2284f841a /src/procdialogs.cpp
parentb7a79ac25a7d27fe98694dc18e04a7225ad81132 (diff)
downloadmate-system-monitor-2a0ef42d45004d7b0775ac843352cf10d11ce091.tar.bz2
mate-system-monitor-2a0ef42d45004d7b0775ac843352cf10d11ce091.tar.xz
Make change priority button respect button-images setting
Taken from GSM commit: bfef9799749fa0b36bb91c52479f7e7119b5d738 From: Chris Kühl <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=592747
Diffstat (limited to 'src/procdialogs.cpp')
-rw-r--r--src/procdialogs.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index 976cf60..b61fd35 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -155,7 +155,6 @@ procdialog_create_renice_dialog (ProcData *procdata)
GtkWidget *dialog = NULL;
GtkWidget *dialog_vbox;
GtkWidget *vbox;
- GtkWidget *hbox;
GtkWidget *label;
GtkWidget *priority_label;
GtkWidget *table;
@@ -166,7 +165,6 @@ procdialog_create_renice_dialog (ProcData *procdata)
#endif
GtkWidget *hscale;
GtkWidget *button;
- GtkWidget *align;
GtkWidget *icon;
gchar *text;
@@ -183,22 +181,12 @@ procdialog_create_renice_dialog (ProcData *procdata)
renice_dialog = dialog;
gtk_window_set_resizable (GTK_WINDOW (renice_dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (renice_dialog), 5);
-
- button = gtk_button_new ();
+
+ button = gtk_button_new_with_mnemonic (_("Change _Priority"));
gtk_widget_set_can_default (button, TRUE);
-
- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (button), align);
-
- hbox = gtk_hbox_new (FALSE, 2);
- gtk_container_add (GTK_CONTAINER (align), hbox);
icon = gtk_image_new_from_stock (GTK_STOCK_OK, GTK_ICON_SIZE_BUTTON);
- gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
-
- label = gtk_label_new_with_mnemonic (_("Change _Priority"));
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
- gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+ gtk_button_set_image (GTK_BUTTON (button), icon);
gtk_dialog_add_action_widget (GTK_DIALOG (renice_dialog), button, 100);
gtk_dialog_set_default_response (GTK_DIALOG (renice_dialog), 100);