Set no-show-all flag on the placeholder menu item.

2008-02-11  Emmanuele Bassi  <ebassi@gnome.org>

	* gtk/gtkrecentchoosermenu.c:
	(gtk_recent_chooser_menu_constructor): Set no-show-all flag
	on the placeholder menu item.

	* tests/testrecentchoosermenu.c:
	(create_recent_chooser_menu): Use gtk_widget_show_all() to test
	whether the placeholder menu item gets shown.

svn path=/trunk/; revision=19509
This commit is contained in:
Emmanuele Bassi
2008-02-11 09:54:09 +00:00
committed by Emmanuele Bassi
parent 97e0d1120f
commit 48c87e3e17
4 changed files with 27 additions and 9 deletions

View File

@ -538,8 +538,8 @@ gtk_link_button_new (const gchar *uri)
}
retval = g_object_new (GTK_TYPE_LINK_BUTTON,
"uri", uri,
"label", utf8_uri,
"uri", uri,
NULL);
g_free (utf8_uri);
@ -590,17 +590,24 @@ void
gtk_link_button_set_uri (GtkLinkButton *link_button,
const gchar *uri)
{
GtkLinkButtonPrivate *priv;
const gchar *label;
gchar *tmp;
g_return_if_fail (GTK_IS_LINK_BUTTON (link_button));
g_return_if_fail (uri != NULL);
tmp = link_button->priv->uri;
link_button->priv->uri = g_strdup (uri);
g_free (tmp);
link_button->priv->visited = FALSE;
priv = link_button->priv;
g_free (priv->uri);
priv->uri = g_strdup (uri);
label = gtk_button_get_label (GTK_BUTTON (link_button));
if (label && *label != '\0' && strcmp (label, uri) != 0)
gtk_widget_set_tooltip_text (GTK_WIDGET (link_button), uri);
priv->visited = FALSE;
g_object_notify (G_OBJECT (link_button), "uri");
}