merge changes from master

This commit is contained in:
Andy Williams 2015-02-26 13:56:50 +00:00
commit 079a65a98b
5 changed files with 18 additions and 12 deletions

View File

@ -45,7 +45,7 @@ static void _elm_code_file_line_append_data(Elm_Code_File *file, const char *con
if (file->parent) if (file->parent)
{ {
elm_code_parse_line(file->parent, line); _elm_code_parse_line(file->parent, line);
elm_code_callback_fire(file->parent, &ELM_CODE_EVENT_LINE_LOAD_DONE, line); elm_code_callback_fire(file->parent, &ELM_CODE_EVENT_LINE_LOAD_DONE, line);
} }
} }
@ -98,7 +98,7 @@ EAPI Elm_Code_File *elm_code_file_open(Elm_Code *code, const char *path)
if (ret->parent) if (ret->parent)
{ {
elm_code_parse_file(ret->parent, ret); _elm_code_parse_file(ret->parent, ret);
elm_code_callback_fire(ret->parent, &ELM_CODE_EVENT_FILE_LOAD_DONE, ret); elm_code_callback_fire(ret->parent, &ELM_CODE_EVENT_FILE_LOAD_DONE, ret);
} }
return ret; return ret;

View File

@ -6,7 +6,8 @@
#include "elm_code_private.h" #include "elm_code_private.h"
EAPI void elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line) void
_elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line)
{ {
Elm_Code_Parser *parser; Elm_Code_Parser *parser;
Eina_List *item; Eina_List *item;
@ -18,7 +19,8 @@ EAPI void elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line)
} }
} }
EAPI void elm_code_parse_file(Elm_Code *code, Elm_Code_File *file) void
_elm_code_parse_file(Elm_Code *code, Elm_Code_File *file)
{ {
Elm_Code_Parser *parser; Elm_Code_Parser *parser;
Eina_List *item; Eina_List *item;
@ -30,9 +32,10 @@ EAPI void elm_code_parse_file(Elm_Code *code, Elm_Code_File *file)
} }
} }
EAPI void elm_code_parser_add(Elm_Code *code, EAPI void
void (*parse_line)(Elm_Code_Line *, void *), elm_code_parser_add(Elm_Code *code,
void (*parse_file)(Elm_Code_File *, void *), void *data) void (*parse_line)(Elm_Code_Line *, void *),
void (*parse_file)(Elm_Code_File *, void *), void *data)
{ {
Elm_Code_Parser *parser; Elm_Code_Parser *parser;

View File

@ -32,10 +32,6 @@ typedef struct _Elm_Code_Parser
EAPI void elm_code_parser_add(Elm_Code *code, void (*parse_line)(Elm_Code_Line *, void *), EAPI void elm_code_parser_add(Elm_Code *code, void (*parse_line)(Elm_Code_Line *, void *),
void (*parse_file)(Elm_Code_File *, void *), void *data); void (*parse_file)(Elm_Code_File *, void *), void *data);
EAPI void elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line);
EAPI void elm_code_parse_file(Elm_Code *code, Elm_Code_File *file);
/** /**
* @} * @}
*/ */

View File

@ -39,3 +39,9 @@ typedef struct
Eina_Bool show_line_numbers; Eina_Bool show_line_numbers;
unsigned int line_width_marker; unsigned int line_width_marker;
} Elm_Code_Widget_Data; } Elm_Code_Widget_Data;
/* Private parser callbacks */
void _elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line);
void _elm_code_parse_file(Elm_Code *code, Elm_Code_File *file);

View File

@ -132,7 +132,8 @@ static void _edi_consolepanel_append_line_type(const char *line, Eina_Bool err)
{ {
_edi_consolepanel_parse_directory(line); _edi_consolepanel_parse_directory(line);
elm_code_file_line_append(_edi_console_code->file, line, strlen(line), err ? strdup(_current_dir) : NULL); elm_code_file_line_append(_edi_console_code->file, line, strlen(line),
err && _current_dir ? strdup(_current_dir) : NULL);
_edi_test_line_callback(line); _edi_test_line_callback(line);
} }