summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-06-14 15:44:02 +0300
committerAvi Levin <avi.levin@samsung.com>2015-06-14 15:44:02 +0300
commitd4bfc9e166801bd9981bbe602f5f78863a9b658c (patch)
tree52c5ea2accc123ed855677660685b9273127ee6b
parent1550470ddecc435cf73cdb5183afd70e8058f9e6 (diff)
Eolian_info: fix line breaks in event label
-rw-r--r--src/bin/main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 7bab5bf..91d28c1 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -31,7 +31,7 @@ int _eolian_info_log_dom;
31#endif 31#endif
32#define CRIT(...) EINA_LOG_DOM_CRIT(_eolian_info_log_dom, __VA_ARGS__) 32#define CRIT(...) EINA_LOG_DOM_CRIT(_eolian_info_log_dom, __VA_ARGS__)
33 33
34#define MAX_CHARS_FILTER 40 34#define MAX_CHARS_FILTER 45
35 35
36static void _file_filter(const Eolian_Class *ekl, Eina_Strbuf *buf); 36static void _file_filter(const Eolian_Class *ekl, Eina_Strbuf *buf);
37static void _event_filter(const Eolian_Class *ekl, Eina_Strbuf *buf); 37static void _event_filter(const Eolian_Class *ekl, Eina_Strbuf *buf);
@@ -80,16 +80,16 @@ _event_filter(const Eolian_Class *ekl, Eina_Strbuf *buf)
80 int chars = strlen("Events: "); 80 int chars = strlen("Events: ");
81 EINA_ITERATOR_FOREACH(lst_events, event){ 81 EINA_ITERATOR_FOREACH(lst_events, event){
82 const char* event_name = eolian_event_name_get(event); 82 const char* event_name = eolian_event_name_get(event);
83 chars += strlen(event_name); 83 chars += strlen(event_name)+1;
84 if(chars+3 > MAX_CHARS_FILTER) 84 if(chars-1 > MAX_CHARS_FILTER)
85 { 85 {
86 /* willl write in a new line */ 86 /* willl write in a new line */
87 chars = 0; 87 chars = strlen(event_name)+1;
88 eina_strbuf_append(buf, "..."); 88 eina_strbuf_append(buf, "...");
89 eina_strbuf_append(buf, "\\l\\l"); 89 eina_strbuf_append(buf, "\\l\\l");
90 } 90 }
91 eina_strbuf_append(buf, event_name); 91 eina_strbuf_append(buf, event_name);
92 eina_strbuf_append(buf, "/"); 92 eina_strbuf_append(buf, " ");
93 } 93 }
94 94
95 eina_iterator_free(lst_events); 95 eina_iterator_free(lst_events);