summaryrefslogtreecommitdiff
path: root/gtk/gtklinkbutton.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-08-12 15:47:13 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-08-12 15:47:13 +0000
commit611fcd30d328b13bc5612dc8aebd12965f9a54d2 (patch)
tree1b7f979cbe750ea7e0aa73b498d603bdfbd89851 /gtk/gtklinkbutton.c
parent25d3a9c30966c0f5f018e977498e0887e274b9a1 (diff)
downloadgtk+-611fcd30d328b13bc5612dc8aebd12965f9a54d2.tar.gz
bail out if there is no label to set the color on.
2008-08-12 Michael Natterer <mitch@imendio.com> * gtk/gtklinkbutton.c (set_link_color): bail out if there is no label to set the color on. (gtk_link_button_add): call set_link_color() so the label gets the right color no matter how the link button is created. svn path=/trunk/; revision=21100
Diffstat (limited to 'gtk/gtklinkbutton.c')
-rw-r--r--gtk/gtklinkbutton.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 843a6888fd..9a6d134e99 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -250,6 +250,8 @@ set_link_color (GtkLinkButton *link_button)
GtkWidget *label;
label = gtk_bin_get_child (GTK_BIN (link_button));
+ if (!GTK_IS_LABEL (label))
+ return;
if (link_button->priv->visited)
{
@@ -303,6 +305,7 @@ gtk_link_button_add (GtkContainer *container,
{
GTK_CONTAINER_CLASS (gtk_link_button_parent_class)->add (container, widget);
+ set_link_color (GTK_LINK_BUTTON (container));
set_link_underline (GTK_LINK_BUTTON (container));
}