summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Rocha <lucasr@gnome.org>2008-04-07 19:06:21 +0000
committerLucas Almeida Rocha <lucasr@src.gnome.org>2008-04-07 19:06:21 +0000
commiteeb43bf65b8fd1f41b30e69fd898526ba02d9f78 (patch)
tree176808b1cf8cfb2d4ea0b0f43f67e66592fcfa27
parent70ab527ea74a824b2abd6c74344093dd4d5e93c7 (diff)
fix memory leak on custom labels (Fixes bug #526627). Patch by
2008-03-30 Lucas Rocha <lucasr@gnome.org> * src/msg.c (zenity_msg_construct_question_dialog): fix memory leak on custom labels (Fixes bug #526627). Patch by kraai@ftbfs.org. svn path=/trunk/; revision=1348
-rw-r--r--ChangeLog5
-rw-r--r--src/msg.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index bc648da..cae5fdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-03-30 Lucas Rocha <lucasr@gnome.org>
+ * src/msg.c (zenity_msg_construct_question_dialog): fix memory leak on
+ custom labels (Fixes bug #526627). Patch by kraai@ftbfs.org.
+
+2008-03-30 Lucas Rocha <lucasr@gnome.org>
+
Allow question dialogs to use custom button label text (Fixes
bug #335763). Patch from Cosimo Cecchi <anarki@lilik.it> and
Thomas Thurman <tthurman@gnome.org>.
diff --git a/src/msg.c b/src/msg.c
index 90e5164..0364268 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -40,13 +40,13 @@ zenity_msg_construct_question_dialog (GtkWidget *dialog, ZenityMsgData *msg_data
gtk_widget_grab_focus (ok_button);
if (msg_data->cancel_label) {
- gtk_button_set_label (GTK_BUTTON (cancel_button), g_strdup (msg_data->cancel_label));
+ gtk_button_set_label (GTK_BUTTON (cancel_button), msg_data->cancel_label);
gtk_button_set_image (GTK_BUTTON (cancel_button),
gtk_image_new_from_stock (GTK_STOCK_CANCEL, GTK_ICON_SIZE_BUTTON));
}
if (msg_data->ok_label) {
- gtk_button_set_label (GTK_BUTTON (ok_button), g_strdup (msg_data->ok_label));
+ gtk_button_set_label (GTK_BUTTON (ok_button), msg_data->ok_label);
gtk_button_set_image (GTK_BUTTON (ok_button),
gtk_image_new_from_stock (GTK_STOCK_OK, GTK_ICON_SIZE_BUTTON));
}