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
This commit is contained in:
Lucas Rocha 2008-04-07 19:06:21 +00:00 committed by Lucas Almeida Rocha
parent 70ab527ea7
commit eeb43bf65b
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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));
}