summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvi Levin <avi.levin@samsung.com>2015-06-16 11:16:57 +0300
committerAvi Levin <avi.levin@samsung.com>2015-06-16 11:16:57 +0300
commit883d77bffa9220388996cdddf2b42c0d6a517413 (patch)
tree923bcfcd1c0bb53ee8216b23239b1fa78471bc4e
parenta586df3d5583a5eadd34cbe6a46762031b9668ab (diff)
Eolian_info: Fixing indentation in events filterHEADmaster
-rw-r--r--src/bin/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index abe6c45..5d70ed3 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -72,21 +72,23 @@ _event_filter(const Eolian_Class *ekl, Eina_Strbuf *buf)
72{ 72{
73 Eina_Iterator *lst_events = eolian_class_events_get(ekl); 73 Eina_Iterator *lst_events = eolian_class_events_get(ekl);
74 const Eolian_Event* event; 74 const Eolian_Event* event;
75 const char* event_title = "Events: ";
76 int dist_start = strlen(event_title)+3;
75 77
76 if(lst_events){ 78 if(lst_events){
77 eina_strbuf_append(buf, "Events: "); 79 eina_strbuf_append(buf, event_title);
78 } 80 }
79 81
80 int chars = strlen("Events: "); 82 int chars = 0;
81 EINA_ITERATOR_FOREACH(lst_events, event){ 83 EINA_ITERATOR_FOREACH(lst_events, event){
82 const char* event_name = eolian_event_name_get(event); 84 const char* event_name = eolian_event_name_get(event);
83 chars += strlen(event_name)+1; 85 chars += strlen(event_name)+1;
84 if(chars-1 > MAX_CHARS_FILTER) 86 if(chars-3 + dist_start > MAX_CHARS_FILTER)
85 { 87 {
86 /* willl write in a new line */ 88 /* willl write in a new line */
87 chars = strlen(event_name)+1; 89 chars = strlen(event_name)+1;
88 eina_strbuf_append(buf, "..."); 90 eina_strbuf_append(buf, "\\l");
89 eina_strbuf_append(buf, "\\l\\l"); 91 for (int i = 0; i < dist_start; i++, eina_strbuf_append(buf, "&nbsp;"));
90 } 92 }
91 eina_strbuf_append(buf, event_name); 93 eina_strbuf_append(buf, event_name);
92 eina_strbuf_append(buf, " "); 94 eina_strbuf_append(buf, " ");