X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtklinkbutton.c;h=b5981c741f5ea55192dd40ddbeb9d8fb5e7b5f94;hb=1865b9a1116d166c9abc5c75f5d01270574007c5;hp=505fb0095b01f400c69ff56fc7bf05c058c80ff1;hpb=9d0febc9a64a5bfb0fcfc3a88de4757f6c1ff090;p=~andy%2Fgtk diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c index 505fb0095..b5981c741 100644 --- a/gtk/gtklinkbutton.c +++ b/gtk/gtklinkbutton.c @@ -163,9 +163,9 @@ gtk_link_button_class_init (GtkLinkButtonClass *klass) klass->activate_link = gtk_link_button_activate_link; /** - * GtkLinkButton:uri - * - * The URI bound to this button. + * GtkLinkButton:uri: + * + * The URI bound to this button. * * Since: 2.10 */ @@ -177,8 +177,8 @@ gtk_link_button_class_init (GtkLinkButtonClass *klass) NULL, G_PARAM_READWRITE)); /** - * GtkLinkButton:visited - * + * GtkLinkButton:visited: + * * The 'visited' state of this button. A visited link is drawn in a * different color. * @@ -526,7 +526,10 @@ gtk_link_button_button_press (GtkWidget *widget, if (!gtk_widget_has_focus (widget)) gtk_widget_grab_focus (widget); - if (gdk_event_triggers_context_menu ((GdkEvent *) event)) + /* Don't popup the menu if there's no URI set, + * otherwise the menu item will trigger a warning */ + if (gdk_event_triggers_context_menu ((GdkEvent *) event) && + GTK_LINK_BUTTON (widget)->priv->uri != NULL) { gtk_link_button_do_popup (GTK_LINK_BUTTON (widget), event);