mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
Fix #10589 CRTICAL on empty label on resource chooser widget
This commit is contained in:
parent
9bc59ba543
commit
1553f8b88c
1 changed files with 8 additions and 2 deletions
|
@ -237,8 +237,14 @@ gimp_resource_chooser_constructed (GObject *object)
|
||||||
GimpResourceChooserPrivate *priv;
|
GimpResourceChooserPrivate *priv;
|
||||||
|
|
||||||
priv = gimp_resource_chooser_get_instance_private (GIMP_RESOURCE_CHOOSER (object));
|
priv = gimp_resource_chooser_get_instance_private (GIMP_RESOURCE_CHOOSER (object));
|
||||||
gtk_label_set_text_with_mnemonic (GTK_LABEL (priv->label_widget), priv->label);
|
/* Set text of label widget now since underlying property might have changed.
|
||||||
gtk_widget_show (GTK_WIDGET (priv->label_widget));
|
* Not when empty string: set_text throws CRITICAL on empty string!
|
||||||
|
*/
|
||||||
|
if (priv->label != NULL)
|
||||||
|
{
|
||||||
|
gtk_label_set_text_with_mnemonic (GTK_LABEL (priv->label_widget), priv->label);
|
||||||
|
gtk_widget_show (GTK_WIDGET (priv->label_widget));
|
||||||
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (gimp_resource_chooser_parent_class)->constructed (object);
|
G_OBJECT_CLASS (gimp_resource_chooser_parent_class)->constructed (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue