]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/gtk+/gtk+-2.6.4-1.osso7/gtkiconfactory.c.diff
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / gtk+ / gtk+-2.6.4-1.osso7 / gtkiconfactory.c.diff
1 --- gtk+-2.6.4/gtk/gtkiconfactory.c     2005-01-03 16:44:33.000000000 +0200
2 +++ gtk+-2.6.4/gtk/gtkiconfactory.c     2005-04-06 16:19:36.804943160 +0300
3 @@ -813,7 +813,7 @@
4  {
5    if (icon_sizes == NULL)
6      {
7 -#define NUM_BUILTIN_SIZES 7
8 +#define NUM_BUILTIN_SIZES 11
9        gint i;
10  
11        icon_aliases = g_hash_table_new (g_str_hash, g_str_equal);
12 @@ -863,7 +863,27 @@
13        icon_sizes[GTK_ICON_SIZE_DIALOG].width = 48;
14        icon_sizes[GTK_ICON_SIZE_DIALOG].height = 48;
15  
16 -      g_assert ((GTK_ICON_SIZE_DIALOG + 1) == NUM_BUILTIN_SIZES);
17 +      icon_sizes[HILDON_ICON_SIZE_26].size = HILDON_ICON_SIZE_26;
18 +      icon_sizes[HILDON_ICON_SIZE_26].name = "hildon-26";
19 +      icon_sizes[HILDON_ICON_SIZE_26].width = 26;
20 +      icon_sizes[HILDON_ICON_SIZE_26].height = 26;
21 +
22 +      icon_sizes[HILDON_ICON_SIZE_40].size = HILDON_ICON_SIZE_40;
23 +      icon_sizes[HILDON_ICON_SIZE_40].name = "hildon-40";
24 +      icon_sizes[HILDON_ICON_SIZE_40].width = 40;
25 +      icon_sizes[HILDON_ICON_SIZE_40].height = 40;
26 +
27 +      icon_sizes[HILDON_ICON_SIZE_50].size = HILDON_ICON_SIZE_50;
28 +      icon_sizes[HILDON_ICON_SIZE_50].name = "hildon-50";
29 +      icon_sizes[HILDON_ICON_SIZE_50].width = 50;
30 +      icon_sizes[HILDON_ICON_SIZE_50].height = 50;
31 +
32 +      icon_sizes[HILDON_ICON_SIZE_64].size = HILDON_ICON_SIZE_64;
33 +      icon_sizes[HILDON_ICON_SIZE_64].name = "hildon-64";
34 +      icon_sizes[HILDON_ICON_SIZE_64].width = 54;
35 +      icon_sizes[HILDON_ICON_SIZE_64].height = 64;
36 +
37 +      g_assert ((HILDON_ICON_SIZE_64 + 1) == NUM_BUILTIN_SIZES);
38  
39        /* Alias everything to itself. */
40        i = 1; /* skip invalid size */
41 @@ -1658,7 +1678,7 @@
42    gint width, height, pixel_size;
43    gint *sizes, *s, dist;
44    GError *error = NULL;
45 -  
46 +
47    if (widget && gtk_widget_has_screen (widget))
48      screen = gtk_widget_get_screen (widget);
49    else if (style && style->colormap)
50 @@ -1734,8 +1754,10 @@
51    tmp_source.type = GTK_ICON_SOURCE_PIXBUF;
52    tmp_source.source.pixbuf = tmp_pixbuf;
53  
54 +  /* Hildon: no scaling allowed for Hildon icons */
55    pixbuf = gtk_style_render_icon (style, &tmp_source,
56 -                                 direction, state, -1,
57 +                                 direction, state,
58 +                                 (size < HILDON_ICON_SIZE_26) ? -1 : size,
59                                   widget, detail);
60  
61    if (!pixbuf)
62 @@ -1818,7 +1840,6 @@
63  {
64    /* This icon can be used for any direction/state/size */
65    static GtkIconSource fallback_source = GTK_ICON_SOURCE_INIT (TRUE, TRUE, TRUE);
66 -
67    if (fallback_source.type == GTK_ICON_SOURCE_EMPTY)
68      {
69        GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline (-1, stock_missing_image_24, FALSE, NULL);