Commit 5d8adc94 authored by Christian Dywan's avatar Christian Dywan Committed by Christian Dywan
Browse files

Bug 555270 – Allow unsetting a MessageDialog's image

2008-10-08  Christian Dywan  <christian@imendio.com>

Bug 555270 – Allow unsetting a MessageDialog's image

* gtk/gtkmessagedialog.c (gtk_message_dialog_set_property),
Remove a superfluous cast to GtkWidget*
(gtk_message_dialog_set_image): Accept NULL for the image
and unset the image in that case.

svn path=/trunk/; revision=21607
parent eda544e8
2008-10-08 Christian Dywan <christian@imendio.com>
Bug 555270 – Allow unsetting a MessageDialog's image
* gtk/gtkmessagedialog.c (gtk_message_dialog_set_property),
Remove a superfluous cast to GtkWidget*
(gtk_message_dialog_set_image): Accept NULL for the image
and unset the image in that case.
2008-10-08 Christian Dywan <christian@imendio.com>
Bug 436533 – Allow more space efficient scroll arrows placement
......
......@@ -418,7 +418,7 @@ gtk_message_dialog_set_property (GObject *object,
g_value_get_boolean (value));
break;
case PROP_IMAGE:
gtk_message_dialog_set_image (dialog, (GtkWidget *)g_value_get_object (value));
gtk_message_dialog_set_image (dialog, g_value_get_object (value));
break;
default:
......@@ -628,6 +628,13 @@ gtk_message_dialog_set_image (GtkMessageDialog *dialog,
GtkWidget *parent;
g_return_if_fail (GTK_IS_MESSAGE_DIALOG (dialog));
g_return_if_fail (image == NULL || GTK_IS_WIDGET (image));
if (image == NULL)
{
image = gtk_image_new_from_stock (NULL, GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
}
priv = GTK_MESSAGE_DIALOG_GET_PRIVATE (dialog);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment