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:
committed by
Emmanuele Bassi
parent
97e0d1120f
commit
48c87e3e17
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
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.
|
||||
|
||||
2008-02-10 Cody Russell <bratsche@gnome.org>
|
||||
|
||||
* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder_uri):
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
|
||||
@ -324,6 +324,7 @@ gtk_recent_chooser_menu_constructor (GType type,
|
||||
GINT_TO_POINTER (TRUE));
|
||||
|
||||
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), priv->placeholder, 0);
|
||||
gtk_widget_set_no_show_all (priv->placeholder, TRUE);
|
||||
gtk_widget_show (priv->placeholder);
|
||||
|
||||
/* (re)populate the menu */
|
||||
|
||||
@ -81,8 +81,6 @@ create_recent_chooser_menu (gint limit)
|
||||
G_CALLBACK (item_activated_cb),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (menu);
|
||||
|
||||
menuitem = gtk_separator_menu_item_new ();
|
||||
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
@ -103,6 +101,8 @@ create_recent_chooser_menu (gint limit)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
gtk_widget_show_all (menu);
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user