Ticket #24948: 616851-gtktoolbutton.diff

File 616851-gtktoolbutton.diff, 612 bytes (added by su-v, 14 years ago)

adapted patch file from git.gnome.org

  • gtk/gtktoolbutton.c

    gtk_tool_button_construct_contents (GtkToolItem *tool_item) 
    470470          gtk_widget_show (icon);
    471471        }
    472472
    473       if (icon && text_orientation == GTK_ORIENTATION_HORIZONTAL)
     473      if (GTK_IS_MISC (icon) && text_orientation == GTK_ORIENTATION_HORIZONTAL)
    474474        gtk_misc_set_alignment (GTK_MISC (icon),
    475475                                1.0 - gtk_tool_item_get_text_alignment (GTK_TOOL_ITEM (button)),
    476476                                0.5);
    477       else if (icon)
     477      else if (GTK_IS_MISC (icon))
    478478        gtk_misc_set_alignment (GTK_MISC (icon),
    479479                                0.5,
    480480                                gtk_tool_item_get_text_alignment (GTK_TOOL_ITEM (button)));