Ticket #284: diff-1

File diff-1, 1.2 KB (added by Gerritv, 13 years ago)
Line 
1Index: gui_internal.c
2===================================================================
3--- gui_internal.c      (revision 1985)
4+++ gui_internal.c      (working copy)
5@@ -322,7 +322,15 @@
6 
7 static struct widget *gui_internal_keyboard_do(struct gui_priv *this, struct widget *wkbdb, int mode);
8 static struct menu_data * gui_internal_menu_data(struct gui_priv *this);
9-
10+/*
11+ * * Display image scaled to specific size
12+ * * searches for scaleable and pre-scaled image
13+ * * @param this Our gui context
14+ * * @param name image name
15+ * * @param w desired width of image
16+ * * @param h desired height of image
17+ * * @returns image_struct Ptr to scaled image struct or NULL if not scaled or found
18+ * */
19 static struct graphics_image *
20 image_new_scaled(struct gui_priv *this, char *name, int w, int h)
21 {
22@@ -333,13 +341,13 @@
23        for (i = 1 ; i < 6 ; i++) {
24                full_name=NULL;
25                switch (i) {
26-               case 1:
27+               case 3:
28                        full_name=g_strdup_printf("%s/xpm/%s.svg", getenv("NAVIT_SHAREDIR"), name);
29                        break;
30                case 2:
31                        full_name=g_strdup_printf("%s/xpm/%s.svgz", getenv("NAVIT_SHAREDIR"), name);
32                        break;
33-               case 3:
34+               case 1:
35                        if (w != -1 && h != -1) {
36                                full_name=g_strdup_printf("%s/xpm/%s_%d_%d.png", getenv("NAVIT_SHAREDIR"), name, w, h);
37                        }
38