From: Carsten Haitzler Date: Mon, 20 Dec 2010 11:10:32 +0000 (+0000) Subject: move image extensions to the file top along with other tables. X-Git-Tag: v1.0.0~3574 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2395bc6fda7c912217007571513382998eab0dc1;p=platform%2Fupstream%2Felementary.git move image extensions to the file top along with other tables. SVN revision: 55658 --- diff --git a/src/lib/elm_cnp_helper.c b/src/lib/elm_cnp_helper.c index c343318..a20f604 100644 --- a/src/lib/elm_cnp_helper.c +++ b/src/lib/elm_cnp_helper.c @@ -177,6 +177,21 @@ static const Escape escapes[] = { }; #define N_ESCAPES ((int)(sizeof(escapes) / sizeof(escapes[0]))) +static const char *image_extensions[] = +{ + ".png", + ".jpg", ".jpeg", ".jpe", ".jfif", ".jfi", + ".bmp", + ".xpm", + ".ppm", "pgm", ".pbm", ".pnm", + ".gif", + ".tif", ".tiff", + ".svg", ".svg.gz", + ".tga", ".targa", + + NULL +}; + static Cnp_Atom atoms[CNP_N_ATOMS] = { [CNP_ATOM_TARGETS] = { "TARGETS", @@ -769,27 +784,13 @@ notify_handler_uri(Cnp_Selection *sel, Ecore_X_Event_Selection_Notify *notify) ext = p + strlen(p); if (ext) { - const char *extns[] = - { - ".png", - ".jpg", ".jpeg", ".jpe", ".jfif", ".jfi", - ".bmp", - ".xpm", - ".ppm", "pgm", ".pbm", ".pnm", - ".gif", - ".tif", ".tiff", - ".svg", ".svg.gz", - ".tga", ".targa", - - NULL - }; Eina_Bool extok = EINA_FALSE; int i; - for (i = 0; extns[i]; i++) + for (i = 0; image_extensions[i]; i++) { - pp = ext - strlen(extns[i]); - if ((pp >= p) && (!strcasecmp(pp, extns[i]))) + pp = ext - strlen(image_extensions[i]); + if ((pp >= p) && (!strcasecmp(pp, image_extensions[i]))) { extok = EINA_TRUE; break;