patch from olof to fix paste :)

SVN revision: 38033
This commit is contained in:
Carsten Haitzler 2008-12-08 23:46:46 +00:00
parent d21f1f9a65
commit 9b701fc3f8
2 changed files with 4 additions and 7 deletions

View File

@ -3637,7 +3637,7 @@ collections {
type: TEXTBLOCK;
mouse_events: 1;
scale: 1;
entry_mode: PASSOWRD;
entry_mode: PASSWORD;
multiline: 0;
source: "elm/entry/selection/default"; // selection under
source4: "elm/entry/cursor/default"; // cursorover

View File

@ -319,23 +319,20 @@ _text_to_mkup(const char *text)
{
char *str = NULL;
int str_len = 0, str_alloc = 0;
int ch, pos = 0;
int ch, pos = 0, pos2 = 0;
for (;;)
{
// FIXME: use evas_string_char_next_get()
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos);
pos = pos2;
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos2);
if (ch <= 0) break;
if (ch == '\n') str = _str_append(str, "<br>", &str_len, &str_alloc);
else if (ch == '\t') str = _str_append(str, "<\t>", &str_len, &str_alloc);
else
{
int pos2;
char tstr[16];
pos2 = pos;
// FIXME: use evas_string_char_next_get()
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos2);
strncpy(tstr, text + pos, pos2 - pos);
tstr[pos2 - pos] = 0;
str = _str_append(str, tstr, &str_len, &str_alloc);