mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
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
This commit is contained in:
parent
eda544e8e6
commit
5d8adc9406
@ -1,3 +1,12 @@
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user