forked from enlightenment/enlightenment
- get correct path uris
- fix browse item action missed one case - fix segv in selector_item_update when state has no plugin SVN revision: 48838
This commit is contained in:
parent
57a9bdc2ed
commit
111b5b95c1
|
@ -1035,7 +1035,8 @@ _evry_selector_item_update(Evry_Selector *sel)
|
|||
}
|
||||
}
|
||||
|
||||
if (!(sel->o_icon) && (EVRY_ITEM(s->plugin)->icon))
|
||||
if (!(sel->o_icon) && s->plugin &&
|
||||
(EVRY_ITEM(s->plugin)->icon))
|
||||
{
|
||||
o = evry_icon_theme_get(EVRY_ITEM(s->plugin)->icon, win->popup->evas);
|
||||
if (o)
|
||||
|
@ -1304,7 +1305,10 @@ evry_browse_item(Evry_Selector *sel)
|
|||
continue;
|
||||
|
||||
if ((pp = p->browse(p, it)))
|
||||
plugins = eina_list_append(plugins, pp);
|
||||
{
|
||||
plugins = eina_list_append(plugins, pp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* FIXME this is a special case for actions */
|
||||
|
@ -1347,6 +1351,11 @@ evry_browse_item(Evry_Selector *sel)
|
|||
_evry_matches_update(sel, 1);
|
||||
s = new_state;
|
||||
}
|
||||
else
|
||||
{
|
||||
_evry_matches_update(sel, 1);
|
||||
s = new_state;
|
||||
}
|
||||
|
||||
_evry_selector_update(sel);
|
||||
|
||||
|
|
|
@ -717,24 +717,45 @@ evry_util_url_unescape(const char *string, int length)
|
|||
static Eina_Bool
|
||||
_isalnum(unsigned char in)
|
||||
{
|
||||
switch (in) {
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
case 'a': case 'b': case 'c': case 'd': case 'e':
|
||||
case 'f': case 'g': case 'h': case 'i': case 'j':
|
||||
case 'k': case 'l': case 'm': case 'n': case 'o':
|
||||
case 'p': case 'q': case 'r': case 's': case 't':
|
||||
case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
|
||||
case 'A': case 'B': case 'C': case 'D': case 'E':
|
||||
case 'F': case 'G': case 'H': case 'I': case 'J':
|
||||
case 'K': case 'L': case 'M': case 'N': case 'O':
|
||||
case 'P': case 'Q': case 'R': case 'S': case 'T':
|
||||
case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
|
||||
return EINA_TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return EINA_FALSE;
|
||||
switch (in)
|
||||
{
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
case 'a': case 'b': case 'c': case 'd': case 'e':
|
||||
case 'f': case 'g': case 'h': case 'i': case 'j':
|
||||
case 'k': case 'l': case 'm': case 'n': case 'o':
|
||||
case 'p': case 'q': case 'r': case 's': case 't':
|
||||
case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
|
||||
case 'A': case 'B': case 'C': case 'D': case 'E':
|
||||
case 'F': case 'G': case 'H': case 'I': case 'J':
|
||||
case 'K': case 'L': case 'M': case 'N': case 'O':
|
||||
case 'P': case 'Q': case 'R': case 'S': case 'T':
|
||||
case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z':
|
||||
return EINA_TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
/* FIXME there seem to be too many ways of not following a standard.
|
||||
find out which is the most popular */
|
||||
static Eina_Bool
|
||||
_isuric(unsigned char in)
|
||||
{
|
||||
switch (in)
|
||||
{
|
||||
case '/': case '.': case '(': case ')': case '-':
|
||||
case '~': case '\'': case '_': case '@': case '+':
|
||||
/* case ';': case ':':
|
||||
* case '&': case '=': case '$': case ',':
|
||||
* case '.': case '!':
|
||||
* case '\'': */
|
||||
|
||||
return EINA_TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
char *
|
||||
|
@ -758,7 +779,7 @@ _evry_util_url_escape(const char *string, int inlength, int path)
|
|||
in = *string;
|
||||
|
||||
if (_isalnum(in) ||
|
||||
(path && ispunct(in)))
|
||||
(path && _isuric(in)))
|
||||
{
|
||||
/* just copy this */
|
||||
ns[strindex++]=in;
|
||||
|
|
Loading…
Reference in New Issue