forked from AuroraMiddleware/gtk
If the toolbar mode is ICONS and there is no icon set then show the label, and vice versa (#322019)
This commit is contained in:
parent
da6a0bf6d8
commit
b22c707741
@ -1,3 +1,10 @@
|
||||
2005-12-07 Ross Burton <ross@burtonini.com>
|
||||
|
||||
* docs/reference/gtk/tmpl/gtkenums.sgml:
|
||||
* gtk/gtktoolbutton.c:
|
||||
If the toolbar mode is ICONS and there is no icon set then show
|
||||
the label, and vice versa (#322019)
|
||||
|
||||
2005-12-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_key_press): Use the correct
|
||||
|
@ -1,3 +1,10 @@
|
||||
2005-12-07 Ross Burton <ross@burtonini.com>
|
||||
|
||||
* docs/reference/gtk/tmpl/gtkenums.sgml:
|
||||
* gtk/gtktoolbutton.c:
|
||||
If the toolbar mode is ICONS and there is no icon set then show
|
||||
the label, and vice versa (#322019)
|
||||
|
||||
2005-12-07 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_key_press): Use the correct
|
||||
|
@ -410,7 +410,9 @@ Indicates the direction a sub-menu will appear.
|
||||
<para>
|
||||
Used to customize the appearance of a #GtkToolbar. Note that
|
||||
setting the toolbar style overrides the user's preferences
|
||||
for the default toolbar style.
|
||||
for the default toolbar style. Note that if the button has only
|
||||
a label set and GTK_TOOLBAR_ICONS is used, the label will be
|
||||
visible, and vice versa.
|
||||
</para>
|
||||
|
||||
@GTK_TOOLBAR_ICONS: Buttons display only icons in the toolbar.
|
||||
|
@ -317,6 +317,22 @@ gtk_tool_button_construct_contents (GtkToolItem *tool_item)
|
||||
{
|
||||
need_label = TRUE;
|
||||
}
|
||||
|
||||
if (style == GTK_TOOLBAR_ICONS && button->priv->icon_widget == NULL &&
|
||||
button->priv->stock_id == NULL && button->priv->icon_name == NULL)
|
||||
{
|
||||
need_label = TRUE;
|
||||
need_icon = FALSE;
|
||||
style = GTK_TOOLBAR_TEXT;
|
||||
}
|
||||
|
||||
if (style == GTK_TOOLBAR_TEXT && button->priv->label_widget == NULL &&
|
||||
button->priv->stock_id == NULL && button->priv->label_text == NULL)
|
||||
{
|
||||
need_label = FALSE;
|
||||
need_icon = TRUE;
|
||||
style = GTK_TOOLBAR_ICONS;
|
||||
}
|
||||
|
||||
if (need_label)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user