summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <rimmed@yandex.ru>2014-12-12 16:33:40 +0000
committerVyacheslav Reutskiy <rimmed@yandex.ru>2014-12-12 16:33:40 +0000
commit1e8efa03db2a2f91366b0e3941466c33f6a815a0 (patch)
treedf09d388e34d15f54e4f8871035aea29ed84bd22
parent520c897897571a40e59f461116be5a34b4b3e5f3 (diff)
parent4f69a70173f1b8f451cb56b680953d3ea6a99740 (diff)
Merge branch 'develop'0.2.2
-rw-r--r--NEWS12
-rw-r--r--configure.ac6
-rw-r--r--data/themes/macro.edc2
-rw-r--r--data/themes/widgets/combobox.edc232
-rw-r--r--data/themes/widgets/images/Bookmark_v3.pngbin0 -> 270 bytes
-rw-r--r--data/themes/widgets/images/Bookmark_v3_current.pngbin0 -> 248 bytes
-rw-r--r--data/themes/widgets/images/combobox_small_bg.pngbin0 -> 475 bytes
-rw-r--r--data/themes/widgets/images/combobox_small_bg_focused.pngbin0 -> 455 bytes
-rw-r--r--data/themes/widgets/images/combobox_small_bg_unactive.pngbin0 -> 488 bytes
-rw-r--r--data/themes/widgets/images/icon-add.pngbin0 -> 157 bytes
-rw-r--r--data/themes/widgets/tabs.edc155
-rw-r--r--examples/combobox_example.c11
-rw-r--r--src/lib/ewe_combobox.c96
-rw-r--r--src/lib/ewe_combobox.eo11
-rw-r--r--src/lib/ewe_combobox_legacy.h16
-rw-r--r--src/lib/ewe_entry.c1
-rw-r--r--src/lib/ewe_ruler.c1
-rw-r--r--src/lib/ewe_statusbar.c1
-rw-r--r--src/lib/ewe_tabs.c50
-rw-r--r--src/lib/ewe_tabs.eo1
-rw-r--r--src/lib/ewe_widget_tabs.h2
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_item_title_set.c16
-rw-r--r--tests/test_ewe_combobox/test_ewe_combobox.c2
-rw-r--r--tests/test_ewe_combobox/test_ewe_combobox.h8
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_elm_widget_style_get.c145
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_elm_widget_style_set.c118
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_disabled_set.c2
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_orient_horizontal_get.c2
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_orient_horizontal_set.c2
-rw-r--r--tests/test_ewe_tabs/test_ewe_tabs.c5
-rw-r--r--tests/test_ewe_tabs/test_ewe_tabs.h7
-rwxr-xr-xtests/tests_report_generator.py11
33 files changed, 851 insertions, 68 deletions
diff --git a/NEWS b/NEWS
index 2d6b409..37e3939 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,17 @@
1========= 1=========
2Ewe 0.2.1 2Ewe 0.2.2
3========= 3=========
4 4
5Changes since 0.2.1
6-------------------
7
8Feature:
9 * New style for tabs.
10
11Fixes:
12 * Fix bugs in combobox;
13 * Fix bugs in tabs;
14
5Changes since 0.2.0 15Changes since 0.2.0
6------------------- 16-------------------
7 17
diff --git a/configure.ac b/configure.ac
index d845e4b..be6c425 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1EWE_VERSION([0], [2], [1]) 1EWE_VERSION([0], [2], [2])
2 2
3AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net]) 3AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net])
4AC_PREREQ([2.60]) 4AC_PREREQ([2.60])
@@ -34,8 +34,8 @@ fi
34 34
35EWE_INIT 35EWE_INIT
36 36
37m4_define([efl_version], [1.11.0]) 37m4_define([efl_version], [1.12.2])
38m4_define([elm_version], [1.11.0]) 38m4_define([elm_version], [1.12.2])
39 39
40 40
41### Checks for programs 41### Checks for programs
diff --git a/data/themes/macro.edc b/data/themes/macro.edc
index 459c972..3a2d24d 100644
--- a/data/themes/macro.edc
+++ b/data/themes/macro.edc
@@ -26,6 +26,7 @@ fonts {
26#define TABS_TITLE_COLOR 174 177 179 255 26#define TABS_TITLE_COLOR 174 177 179 255
27#define TABS_DISABLED_TITLE_COLOR 198 201 205 255 27#define TABS_DISABLED_TITLE_COLOR 198 201 205 255
28#define TABS_DISABLER_COLOR 64 64 64 200 28#define TABS_DISABLER_COLOR 64 64 64 200
29#define TABS_BOOKMARK_CONTENT_BG_COLOR 165 175 174 255
29 30
30#define RULER_BACKGROUND_COLOR 48 48 48 255 31#define RULER_BACKGROUND_COLOR 48 48 48 255
31#define RULER_DASHES_COLOR 146 146 146 255 32#define RULER_DASHES_COLOR 146 146 146 255
@@ -41,6 +42,7 @@ fonts {
41#define COMBOBOX_ITEM_TEXT_COLOR 174 176 177 255; 42#define COMBOBOX_ITEM_TEXT_COLOR 174 176 177 255;
42#define COMBOBOX_ITEM_MOUSEIN_BG 38 39 41 255; 43#define COMBOBOX_ITEM_MOUSEIN_BG 38 39 41 255;
43#define COMBOBOX_ITEM_PADDING 5 0; 44#define COMBOBOX_ITEM_PADDING 5 0;
45#define COMBOBOX_ITEM_RIGHT_PADDING 15 0;
44#define COMBOBOX_TEXT_COLOR 213 213 213 255; 46#define COMBOBOX_TEXT_COLOR 213 213 213 255;
45 47
46#define ENTRY_GLOW_SUCCESS_COLOR 0 213 0 255; 48#define ENTRY_GLOW_SUCCESS_COLOR 0 213 0 255;
diff --git a/data/themes/widgets/combobox.edc b/data/themes/widgets/combobox.edc
index d109315..0f7d358 100644
--- a/data/themes/widgets/combobox.edc
+++ b/data/themes/widgets/combobox.edc
@@ -21,7 +21,7 @@ group { name: "ewe/combobox/base/default";
21 fixed: 1 1; 21 fixed: 1 1;
22 image { 22 image {
23 normal: "dropdown-bg.png"; 23 normal: "dropdown-bg.png";
24 border: 4 4 9 9; 24 border: 3 3 1 1;
25 } 25 }
26 min: 0 20; 26 min: 0 20;
27 max: -1 20; 27 max: -1 20;
@@ -183,6 +183,211 @@ group { name: "ewe/combobox/base/default";
183 } 183 }
184} 184}
185 185
186group { name: "ewe/combobox/small/default";
187 min: 0 21;
188 max: 21 21;
189 images {
190 image: "icon-add.png" COMP;
191 image: "icon-slideup.png" COMP;
192 image: "icon-slidedown.png" COMP;
193 image: "combobox_small_bg_unactive.png" COMP;
194 image: "combobox_small_bg.png" COMP;
195 image: "combobox_small_bg_focused.png" COMP;
196 }
197 parts {
198 part { name: "bg"; type: RECT;
199 description {
200 state: "default" 0;
201 color: TRANSPARENT_COLOR;
202 }
203 }
204 part { name: "back";
205 type: IMAGE;
206 description { state: "default" 0.0;
207 align: 0.0 0.0;
208 fixed: 1 1;
209 image {
210 normal: "combobox_small_bg.png";
211 border: 4 4 9 9;
212 }
213 min: 31 21;
214 rel1 {
215 to: "bg";
216 relative: 0.0 0.0;
217 }
218 rel2.to: "bg";
219 }
220 description { state: "focus" 0.0;
221 inherit: "default" 0.0;
222 image.normal: "combobox_small_bg_focused.png";
223 }
224 description { state: "disable" 0.0;
225 inherit: "default" 0.0;
226 image.normal: "combobox_small_bg_unactive.png";
227 }
228 }
229 part { name: "left.offset";
230 type: SPACER;
231 description { state: "default";
232 align: 0.0 0.5;
233 min: 25 21;
234 max: 25 21;
235 rel1.to: "back";
236 }
237 }
238 part { name: "right.offset";
239 type: SPACER;
240 description { state: "default";
241 align: 1.0 0.5;
242 min: 10 21;
243 max: 10 21;
244 rel2.to: "back";
245 }
246 }
247 part { name: "arrow";
248 type: IMAGE;
249 mouse_events: 1;
250 clip_to: "disabler";
251 description { state: "default" 0.0;
252 align: 0.0 0.5;
253 max: 6 4;
254 image.normal: "icon-slidedown.png";
255 rel1.to: "right.offset";
256 rel2.to: "right.offset";
257 }
258 description { state: "expanded" 0.0;
259 inherit: "default" 0.0;
260 image.normal: "icon-slideup.png";
261 }
262 }
263 part { name: "plus";
264 type: IMAGE;
265 mouse_events: 1;
266 clip_to: "disabler";
267 description { state: "default" 0.0;
268 align: 0.5 0.5;
269 max: 16 16;
270 image.normal: "icon-add.png";
271 rel1.to: "left.offset";
272 rel2.to: "left.offset";
273 }
274 }
275
276 part { name: "ewe.text";
277 type: TEXT;
278 clip_to: "disabler";
279 description { state: "default" 0.0;
280 fixed: 1 1;
281 align: 0.5 0.5;
282 visible: 0;
283 color: COMBOBOX_TEXT_COLOR;
284 text {
285 font: FN;
286 min: 1 0;
287 elipsis: -1;
288 size: 12;
289 align: 0.5 0.5;
290 }
291 rel1 {
292 to_x: "left.offset";
293 relative: 1.0 0.0;
294 }
295 rel2 {
296 to_x: "right.offset";
297 relative: 0.0 1.0;
298 offset: -3 -1;
299 }
300 }
301 }
302 part { name: "expand.btn";
303 type: RECT;
304 description { state: "default" 0.0;
305 visible: 1;
306 color: TRANSPARENT_COLOR;
307 rel1.to: "back";
308 rel2.to: "back";
309 }
310 description { state: "unvisible" 0.0;
311 inherit: "default" 0.0;
312 visible: 0;
313 }
314 }
315 part { name: "disabler";
316 type: RECT;
317 description { state: "default" 0.0;
318 color: WHITE_COLOR;
319 rel1.to: "back";
320 rel2.to: "back";
321 }
322 description { state: "active" 0.0;
323 inherit: "default" 0.0;
324 color: 64 64 64 225;
325 }
326 }
327 }
328 programs {
329 program { name: "expand";
330 signal: "ewe,state,expanded";
331 source: "ewe";
332 action: STATE_SET "expanded" 0.0;
333 target: "arrow";
334 }
335 program { name: "focus";
336 signal: "ewe,state,expanded";
337 source: "ewe";
338 action: STATE_SET "focus" 0.0;
339 target: "back";
340 }
341 program { name: "collapse";
342 signal: "ewe,state,default";
343 source: "ewe";
344 action: STATE_SET "default" 0.0;
345 target: "arrow";
346 }
347 program { name: "outfocus";
348 signal: "ewe,state,default";
349 source: "ewe";
350 action: STATE_SET "default" 0.0;
351 target: "back";
352 }
353 program { name: "clicked";
354 signal: "mouse,clicked,1";
355 source: "expand.btn";
356 action: SIGNAL_EMIT "clicked" "ewe";
357 }
358 program { name: "btn_show";
359 signal: "btn,show";
360 source: "ewe";
361 action: STATE_SET "default" 0.0;
362 target: "expand.btn";
363 }
364 program { name: "btn_hide";
365 signal: "btn,hide";
366 source: "ewe";
367 action: STATE_SET "unvisible" 0.0;
368 target: "expand.btn";
369 }
370 program { name: "back_disable";
371 signal: "ewe,state,disable";
372 source: "ewe";
373 action: STATE_SET "disable" 0.0;
374 target: "back";
375 }
376 program { name: "disabler_active";
377 signal: "ewe,disable,active";
378 source: "ewe";
379 action: STATE_SET "active" 0.0;
380 target: "disabler";
381 }
382 program { name: "disabler_unactive";
383 signal: "ewe,disable,unactive";
384 source: "ewe";
385 action: STATE_SET "default" 0.0;
386 target: "disabler";
387 }
388 }
389}
390
186group { name: "ewe/combobox/expander/default"; 391group { name: "ewe/combobox/expander/default";
187 parts{ 392 parts{
188 part { name: "bg"; 393 part { name: "bg";
@@ -250,14 +455,30 @@ group {name: "ewe/combobox/item/content/default";
250 } 455 }
251 } 456 }
252 } 457 }
458 part { name: "right.offset";
459 type: SPACER;
460 description { state: "default" 0.0;
461 align: 1.0 1.0;
462 fixed: 1 1;
463 min: COMBOBOX_ITEM_RIGHT_PADDING;
464 max: COMBOBOX_ITEM_RIGHT_PADDING;
465 rel1 {
466 relative: 1.0 1.0;
467 to: "ewe.bg";
468 }
469 }
470 }
253 part { name: "ewe.text"; 471 part { name: "ewe.text";
254 type: TEXT; 472 type: TEXT;
255 description { state: "default" 0.0; 473 description { state: "default" 0.0;
256 min: 0 20; 474 min: 0 20;
257 max: -1 20; 475 max: -1 20;
476 align: 0.0 0.5;
258 color: COMBOBOX_ITEM_TEXT_COLOR; 477 color: COMBOBOX_ITEM_TEXT_COLOR;
259 text { 478 text {
260 font: FN; 479 font: FN;
480 min: 1 0;
481 elipsis: -1;
261 size: 12; 482 size: 12;
262 align: 0.0 0.5; 483 align: 0.0 0.5;
263 } 484 }
@@ -265,6 +486,10 @@ group {name: "ewe/combobox/item/content/default";
265 to: "left.offset"; 486 to: "left.offset";
266 relative: 1.0 1.0; 487 relative: 1.0 1.0;
267 } 488 }
489 rel2 {
490 to: "right.offset";
491 relative: 0.0 0.0;
492 }
268 } 493 }
269 } 494 }
270 } 495 }
@@ -318,11 +543,14 @@ group { name: "ewe/combobox/item/color_class/default";
318 description { state: "default" 0.0; 543 description { state: "default" 0.0;
319 min: 0 20; 544 min: 0 20;
320 max: -1 20; 545 max: -1 20;
546 align: 0.0 0.5;
321 color: COMBOBOX_ITEM_TEXT_COLOR; 547 color: COMBOBOX_ITEM_TEXT_COLOR;
322 text { 548 text {
323 font: FN; 549 font: FN;
550 min: 1 0;
551 elipsis: -1;
324 size: 12; 552 size: 12;
325 align: 0.0 0.0; 553 align: 0.0 0.5;
326 } 554 }
327 rel1 { 555 rel1 {
328 to: "left.offset"; 556 to: "left.offset";
diff --git a/data/themes/widgets/images/Bookmark_v3.png b/data/themes/widgets/images/Bookmark_v3.png
new file mode 100644
index 0000000..3374d92
--- /dev/null
+++ b/data/themes/widgets/images/Bookmark_v3.png
Binary files differ
diff --git a/data/themes/widgets/images/Bookmark_v3_current.png b/data/themes/widgets/images/Bookmark_v3_current.png
new file mode 100644
index 0000000..b2aa449
--- /dev/null
+++ b/data/themes/widgets/images/Bookmark_v3_current.png
Binary files differ
diff --git a/data/themes/widgets/images/combobox_small_bg.png b/data/themes/widgets/images/combobox_small_bg.png
new file mode 100644
index 0000000..10e4ae6
--- /dev/null
+++ b/data/themes/widgets/images/combobox_small_bg.png
Binary files differ
diff --git a/data/themes/widgets/images/combobox_small_bg_focused.png b/data/themes/widgets/images/combobox_small_bg_focused.png
new file mode 100644
index 0000000..fccba7b
--- /dev/null
+++ b/data/themes/widgets/images/combobox_small_bg_focused.png
Binary files differ
diff --git a/data/themes/widgets/images/combobox_small_bg_unactive.png b/data/themes/widgets/images/combobox_small_bg_unactive.png
new file mode 100644
index 0000000..b6ec694
--- /dev/null
+++ b/data/themes/widgets/images/combobox_small_bg_unactive.png
Binary files differ
diff --git a/data/themes/widgets/images/icon-add.png b/data/themes/widgets/images/icon-add.png
new file mode 100644
index 0000000..4394f52
--- /dev/null
+++ b/data/themes/widgets/images/icon-add.png
Binary files differ
diff --git a/data/themes/widgets/tabs.edc b/data/themes/widgets/tabs.edc
index b8dab76..9be6c08 100644
--- a/data/themes/widgets/tabs.edc
+++ b/data/themes/widgets/tabs.edc
@@ -375,6 +375,10 @@ group {name: "ewe/tabs/item/head/vertical/red";
375 } 375 }
376} 376}
377 377
378#define PADDING_SIZE_SET \
379 min: 2 2; \
380 max: 2 2;
381
378group {name: "ewe/tabs/item/content/horizontal/default"; 382group {name: "ewe/tabs/item/content/horizontal/default";
379 images { 383 images {
380 image: "tab-content-bg.png" COMP; 384 image: "tab-content-bg.png" COMP;
@@ -390,11 +394,31 @@ group {name: "ewe/tabs/item/content/horizontal/default";
390 fill.smooth: 0; 394 fill.smooth: 0;
391 } 395 }
392 } 396 }
397 part { name: "padding.top_left";
398 type: SPACER;
399 description {
400 align: 0.0 0.0;
401 PADDING_SIZE_SET;
402 }
403 }
404 part { name: "padding.right_bottom";
405 type: SPACER;
406 description {
407 align: 1.0 1.0;
408 PADDING_SIZE_SET;
409 }
410 }
393 part { name: "ewe.content"; 411 part { name: "ewe.content";
394 type: SWALLOW; 412 type: SWALLOW;
395 description { state: "default" 0.0; 413 description { state: "default" 0.0;
396 rel1.offset: 0 2; 414 rel1 {
397 rel2.offset: -3 -3; 415 to: "padding.top_left";
416 relative: 1.0 1.0;
417 }
418 rel2 {
419 to: "padding.right_bottom";
420 relative: 0.0 0.0;
421 }
398 } 422 }
399 } 423 }
400 part { name: "disabler"; 424 part { name: "disabler";
@@ -427,6 +451,8 @@ group {name: "ewe/tabs/item/content/horizontal/default";
427 } 451 }
428} 452}
429 453
454#undef PADDING_SIZE
455
430group {name: "ewe/tabs/item/content/horizontal/blue"; 456group {name: "ewe/tabs/item/content/horizontal/blue";
431 inherit: "ewe/tabs/item/content/horizontal/default"; 457 inherit: "ewe/tabs/item/content/horizontal/default";
432 parts { 458 parts {
@@ -492,3 +518,128 @@ group {name: "ewe/tabs/item/content/vertical/red";
492 inherit: "ewe/tabs/item/content/vertical/default"; 518 inherit: "ewe/tabs/item/content/vertical/default";
493} 519}
494 520
521group { name: "ewe/tabs/horizontal/bookmark";
522 parts {
523 part { name: "bg";
524 type: RECT;
525 description { state: "default" 0.0;
526 visible: 0;
527 }
528 }
529 part { name: "separator";
530 type: RECT;
531 description { state: "default" 0.0;
532 visible: 0;
533 }
534 }
535 part { name: "tabs_area";
536 type: SWALLOW;
537 clip_to: "tabs_area_clip";
538 description { state: "default" 0.0;
539 align: 0.0 0.0;
540 min: 0 26;
541 max: -1 26;
542 rel1.offset: 0 0;
543 rel2.offset: 0 0;
544 }
545 }
546 part { name: "tabs_area_clip";
547 type: RECT;
548 description { state: "default" 0.0;
549 rel1.to: "tabs_area";
550 rel2.to: "tabs_area";
551 }
552 }
553 part { name: "tabs_area.spacer.bot";
554 type: SPACER;
555 description { state: "default" 0.0;
556 min: 4 4;
557 max: 4 4;
558 align: 1.0 1.0;
559 rel1.to: "tabs_area";
560 rel2.to: "tabs_area";
561 }
562 }
563 part { name: "content_area";
564 type: SWALLOW;
565 description { state: "default" 0.0;
566 rel1.to_y: "tabs_area.spacer.bot";
567 }
568 }
569 }
570}
571
572group { name: "ewe/tabs/item/content/horizontal/bookmark";
573 inherit: "ewe/tabs/item/content/horizontal/default";
574 images {
575 image: "input-text-bg_disable.png" COMP;
576 }
577 parts {
578 part { name: "bg";
579 type: IMAGE;
580 description { state: "default" 0.0;
581 image {
582 normal: "input-text-bg_disable.png";
583 border: 2 2 4 2;
584 }
585 color: TABS_BOOKMARK_CONTENT_BG_COLOR;
586 }
587 }
588 }
589}
590
591group { name: "ewe/tabs/item/head/horizontal/bookmark";
592 inherit: "ewe/tabs/item/head/horizontal/default";
593 images {
594 image: "Bookmark_v3_current.png" COMP;
595 image: "Bookmark_v3.png" COMP;
596 }
597 parts {
598 part { name: "items_spacer";
599 type: SPACER;
600 description { state: "default" 0.0;
601 align: 0.0 1.0;
602 min: 4 4;
603 max: 4 4;
604 }
605 }
606 part { name: "bg";
607 description { state: "default" 0.0;
608 min: 140 26;
609 image {
610 normal: "Bookmark_v3.png";
611 border: 4 4 4 4;
612 }
613 rel1 {
614 to_x: "items_spacer";
615 relative: 1.0 0.0;
616 }
617 rel2.to_y: "items_spacer";
618 }
619 description { state: "active" 0.0;
620 inherit: "default" 0.0;
621 image.normal: "Bookmark_v3_current.png";
622 }
623 }
624 part { name: "ewe.icon";
625 type: SWALLOW;
626 description { state: "default" 0.0;
627 rel2 {
628 to_x: "bg";
629 to_y: "items_spacer";
630 relative: 1.0 0.0;
631 }
632 }
633 }
634 part { name: "ewe.swallow.end";
635 type: SWALLOW;
636 description { state: "default" 0.0;
637 rel2 {
638 to_x: "bg";
639 to_y: "items_spacer";
640 relative: 1.0 0.0;
641 }
642 }
643 }
644 }
645}
diff --git a/examples/combobox_example.c b/examples/combobox_example.c
index 792da17..c9e8d4d 100644
--- a/examples/combobox_example.c
+++ b/examples/combobox_example.c
@@ -41,13 +41,18 @@ elm_main(int argc, char **argv)
41 elm_win_autodel_set(win, EINA_TRUE); 41 elm_win_autodel_set(win, EINA_TRUE);
42 42
43 cb = ewe_combobox_add(win); 43 cb = ewe_combobox_add(win);
44 Ewe_Combobox_Item *it = ewe_combobox_item_add(cb, "Liu Kang"); 44 if (!ewe_combobox_style_set(cb, "small/default"))
45 printf("You have some problems\n");
46
47 Ewe_Combobox_Item *it = ewe_combobox_item_add(cb, "+");
45 ewe_combobox_item_style_set(cb, it, "color_class/default"); 48 ewe_combobox_item_style_set(cb, it, "color_class/default");
46 evas_object_smart_callback_add(cb, "expanded", _fcb, it); 49 evas_object_smart_callback_add(cb, "expanded", _fcb, it);
47 50
48 Ewe_Combobox_Item *item = ewe_combobox_item_add(cb, "Scorpion"); 51 Ewe_Combobox_Item *item;
52 item = ewe_combobox_item_add(cb, "Mortal Kombat is an American video game franchise, developed by Midway Games' Chicago studio.");
49 item = ewe_combobox_item_add(cb, "Raiden"); 53 item = ewe_combobox_item_add(cb, "Raiden");
50 ewe_combobox_item_add(cb, "Johnny Cage"); 54 ewe_combobox_item_add(cb, "Johnny Cage");
55 ewe_combobox_item_add(cb, "Scorpion");
51 ewe_combobox_item_add(cb, "La-La-La-La"); 56 ewe_combobox_item_add(cb, "La-La-La-La");
52 ewe_combobox_select_item_set(cb, 0); 57 ewe_combobox_select_item_set(cb, 0);
53 evas_object_smart_callback_add(cb, "selected", _sel, NULL); 58 evas_object_smart_callback_add(cb, "selected", _sel, NULL);
@@ -60,7 +65,7 @@ elm_main(int argc, char **argv)
60 65
61 // ewe_combobox_items_list_free(cb ,EINA_TRUE); 66 // ewe_combobox_items_list_free(cb ,EINA_TRUE);
62 67
63 evas_object_resize(cb, 300, 200); 68 evas_object_resize(cb, 30, 30);
64 evas_object_move(cb, 150, 150); 69 evas_object_move(cb, 150, 150);
65 evas_object_show(cb); 70 evas_object_show(cb);
66 71
diff --git a/src/lib/ewe_combobox.c b/src/lib/ewe_combobox.c
index 3609625..e2ee2bd 100644
--- a/src/lib/ewe_combobox.c
+++ b/src/lib/ewe_combobox.c
@@ -8,6 +8,8 @@ EAPI Eo_Op EWE_OBJ_COMBOBOX_BASE_ID = EO_NOOP;
8#define MY_CLASS_NAME "Ewe_Combobox" 8#define MY_CLASS_NAME "Ewe_Combobox"
9#define MY_CLASS_NAME_LEGACY "ewe_combobox" 9#define MY_CLASS_NAME_LEGACY "ewe_combobox"
10#define MIN_ITEMS 5 10#define MIN_ITEMS 5
11#define ITEM_H 20
12
11 13
12static void _focus_out_cb(void *, Evas_Object *, void *); 14static void _focus_out_cb(void *, Evas_Object *, void *);
13 15
@@ -17,6 +19,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
17 19
18/*----------------------internal helpers functions----------------------------*/ 20/*----------------------internal helpers functions----------------------------*/
19 21
22
20static void 23static void
21_item_data_free(Ewe_Combobox_Item *item) 24_item_data_free(Ewe_Combobox_Item *item)
22{ 25{
@@ -64,8 +67,8 @@ _selected_cb(void *data,
64 67
65 edje_object_part_text_set(sd->combobox, "ewe.text", item->title); 68 edje_object_part_text_set(sd->combobox, "ewe.text", item->title);
66 sd->selected = item; 69 sd->selected = item;
67 evas_object_smart_callback_call(sd->obj, "selected", item);
68 _focus_out_cb(sd, NULL, NULL); 70 _focus_out_cb(sd, NULL, NULL);
71 evas_object_smart_callback_call(sd->obj, "selected", item);
69} 72}
70 73
71static Evas_Object * 74static Evas_Object *
@@ -98,6 +101,7 @@ _exp_window_create(Evas **evas, Ewe_Combobox_Smart_Data *sd)
98 edje_object_part_swallow(sd->expander, "swallow.part", sd->scroller); 101 edje_object_part_swallow(sd->expander, "swallow.part", sd->scroller);
99 evas_object_size_hint_weight_set(sd->scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 102 evas_object_size_hint_weight_set(sd->scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
100 elm_scroller_policy_set(sd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO); 103 elm_scroller_policy_set(sd->scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
104 elm_scroller_content_min_limit(sd->scroller, EINA_TRUE, EINA_FALSE);
101 evas_object_focus_set(sd->scroller, EINA_TRUE); 105 evas_object_focus_set(sd->scroller, EINA_TRUE);
102 evas_object_show(sd->scroller); 106 evas_object_show(sd->scroller);
103 107
@@ -112,28 +116,29 @@ _exp_window_create(Evas **evas, Ewe_Combobox_Smart_Data *sd)
112static void 116static void
113_ewe_combobox_expand(Evas_Object *obj) 117_ewe_combobox_expand(Evas_Object *obj)
114{ 118{
115 int top_widget_pos_x, top_widget_pos_y, sc_y_offset, screen_high, list_count; 119 int b_w, b_h, scr_h, window_width = 0;
120 int top_widget_pos_x, top_widget_pos_y, sc_y_offset, list_count;
116 Eina_List *l; 121 Eina_List *l;
117 Evas_Coord combo_x, combo_y, combo_width, combo_high, expander_h, item_h; 122 Evas_Coord combo_x, combo_y, combo_width, combo_height, expander_h;
118 Evas_Object *popup_win; 123 Evas_Object *popup_win;
119 Evas *evas = NULL; 124 Evas *evas = NULL;
120 Ewe_Combobox_Item *item; 125 Ewe_Combobox_Item *item;
121 int item_show_down = 0, item_show_up = 0; 126 int holds_item;
122 int expander_minw = 10, expander_minh = 20;
123 combo_high = item_h = 20;
124 127
125 EWE_COMBOBOX_DATA_GET(obj, sd); 128 EWE_COMBOBOX_DATA_GET(obj, sd);
129
130 edje_object_size_min_calc(sd->combobox, NULL, &combo_height);
126 sd->expanded = EINA_TRUE; 131 sd->expanded = EINA_TRUE;
127 evas_object_geometry_get(sd->combobox, &combo_x, &combo_y, &combo_width, NULL); 132 evas_object_geometry_get(sd->combobox, &combo_x, &combo_y, &combo_width, NULL);
128 edje_object_signal_emit(sd->combobox, "ewe,state,expanded", "ewe"); 133 edje_object_signal_emit(sd->combobox, "ewe,state,expanded", "ewe");
129 edje_object_signal_emit(sd->combobox, "btn,hide", "ewe"); 134 edje_object_signal_emit(sd->combobox, "btn,hide", "ewe");
130 135
131 elm_win_screen_position_get(sd->top_win, &top_widget_pos_x, &top_widget_pos_y); 136 evas_object_geometry_get(sd->top_win, &top_widget_pos_x, &top_widget_pos_y, NULL, NULL);
132 elm_win_screen_size_get(sd->top_win, NULL, &sc_y_offset, NULL, &screen_high); 137 elm_win_screen_size_get(sd->top_win, NULL, &sc_y_offset, NULL, &scr_h);
133 138
134 screen_high += sc_y_offset; 139 scr_h += sc_y_offset;
135 combo_x += top_widget_pos_x; 140 combo_x += top_widget_pos_x;
136 combo_y += combo_high + top_widget_pos_y; 141 combo_y += combo_height + top_widget_pos_y;
137 142
138 popup_win = _exp_window_create(&evas, sd); 143 popup_win = _exp_window_create(&evas, sd);
139 144
@@ -144,36 +149,51 @@ _ewe_combobox_expand(Evas_Object *obj)
144 edje_object_file_set(item->content, EWE_THEME, item->style); 149 edje_object_file_set(item->content, EWE_THEME, item->style);
145 else 150 else
146 edje_object_file_set(item->content, EWE_THEME, 151 edje_object_file_set(item->content, EWE_THEME,
147 "ewe/combobox/item/content/default"); 152 "ewe/combobox/item/content/default");
148 evas_object_resize(item->content, combo_width - expander_minw, item_h); 153 evas_object_size_hint_min_set(item->content, combo_width, ITEM_H);
154 evas_object_size_hint_weight_set(item->content, EVAS_HINT_EXPAND, 0);
155 evas_object_size_hint_align_set(item->content, EVAS_HINT_FILL, 0.5);
149 edje_object_part_text_set(item->content, "ewe.text", item->title); 156 edje_object_part_text_set(item->content, "ewe.text", item->title);
150 evas_object_show(item->content); 157 evas_object_show(item->content);
158 edje_object_size_min_calc(item->content, &b_w, NULL);
159 if (window_width < b_w)
160 window_width = b_w;
151 evas_object_box_append(sd->items_box, item->content); 161 evas_object_box_append(sd->items_box, item->content);
152 edje_object_signal_callback_add(item->content, "select", "ewe", 162 edje_object_signal_callback_add(item->content, "select", "ewe",
153 _selected_cb, item); 163 _selected_cb, item);
154 } 164 }
155 165
156 list_count = eina_list_count(sd->items); 166 list_count = eina_list_count(sd->items);
157 expander_h = list_count * item_h + expander_minh / 2; 167 expander_h = b_h = list_count * ITEM_H + ITEM_H / 4;
158 168
159 if (expander_h > screen_high - combo_y) 169 if (b_h > scr_h - combo_y)
160 { 170 {
161 item_show_down = floor((screen_high - combo_y - expander_minh) / item_h); 171 holds_item = (scr_h - combo_y) / ITEM_H;
162 if (item_show_down >= MIN_ITEMS) 172 expander_h = holds_item * ITEM_H;
163 expander_h = (item_show_down * item_h) + (expander_minh / 2); 173 if (holds_item < MIN_ITEMS)
164 else if (expander_h < combo_y)
165 combo_y -= combo_high + expander_h;
166 else
167 { 174 {
168 item_show_up = floor((combo_y - combo_high - expander_minh) / item_h); 175 expander_h = b_h;
169 expander_h = (item_show_up * item_h) + (expander_minh / 2); 176 int tmp = combo_y;
170 combo_y -= combo_high + expander_h; 177 combo_y -= combo_height + b_h;
178 if (combo_y < 0)
179 {
180 combo_y = 0;
181 expander_h = tmp - combo_height;
182 }
171 } 183 }
172 } 184 }
173 185
186 if (window_width > combo_width)
187 {
188 evas_object_resize(sd->expander, window_width, expander_h);
189 evas_object_geometry_set(popup_win, combo_x, combo_y, window_width, expander_h);
190 }
191 else
192 {
193 evas_object_resize(sd->expander, combo_width, expander_h);
194 evas_object_geometry_set(popup_win, combo_x, combo_y, combo_width, expander_h);
195 }
174 evas_object_smart_callback_call(sd->obj, "expanded", evas); 196 evas_object_smart_callback_call(sd->obj, "expanded", evas);
175 evas_object_resize(sd->expander, combo_width, expander_h);
176 evas_object_geometry_set(popup_win, combo_x, combo_y, combo_width, expander_h);
177} 197}
178 198
179static void 199static void
@@ -225,6 +245,7 @@ _ewe_combobox_item_add(Eo *obj,
225 ret->index = eina_list_count(sd->items); 245 ret->index = eina_list_count(sd->items);
226 ret->style = NULL; 246 ret->style = NULL;
227 sd->items = eina_list_append(sd->items, ret); 247 sd->items = eina_list_append(sd->items, ret);
248
228 return ret; 249 return ret;
229} 250}
230 251
@@ -251,13 +272,14 @@ _ewe_combobox_item_del(Eo *obj,
251 } 272 }
252 } 273 }
253 sd->items = eina_list_remove(sd->items, item); 274 sd->items = eina_list_remove(sd->items, item);
254 _item_data_free(item);
255 275
256 l = eina_list_nth_list(sd->items, item->index); 276 l = eina_list_nth_list(sd->items, item->index);
257 for (data = eina_list_data_get(l); l ; 277 for (data = eina_list_data_get(l); l ;
258 l = eina_list_next(l), data = eina_list_data_get(l)) 278 l = eina_list_next(l), data = eina_list_data_get(l))
259 data->index--; 279 data->index--;
260 280
281 _item_data_free(item);
282
261 return EINA_TRUE; 283 return EINA_TRUE;
262} 284}
263 285
@@ -291,7 +313,7 @@ _ewe_combobox_item_title_set(Eo *obj EINA_UNUSED,
291 int index, 313 int index,
292 Eina_Stringshare *title) 314 Eina_Stringshare *title)
293{ 315{
294 if (((int)eina_list_count(sd->items) < (index + 1)) || (index < 0) || (!title)) 316 if (((int)eina_list_count(sd->items) < (index + 1)) || (index < 0))
295 return EINA_FALSE; 317 return EINA_FALSE;
296 Ewe_Combobox_Item *item; 318 Ewe_Combobox_Item *item;
297 item = eina_list_nth(sd->items, index); 319 item = eina_list_nth(sd->items, index);
@@ -371,6 +393,23 @@ _ewe_combobox_item_style_set(Eo *obj EINA_UNUSED,
371 return EINA_TRUE; 393 return EINA_TRUE;
372} 394}
373 395
396EOLIAN static Eina_Bool
397_ewe_combobox_style_set(Eo *obj EINA_UNUSED,
398 Ewe_Combobox_Smart_Data *sd EINA_UNUSED,
399 Eina_Stringshare *style)
400{
401 Eina_Bool res;
402 Eina_Stringshare *st;
403 if (!style)
404 return EINA_FALSE;
405
406 st = eina_stringshare_printf("ewe/combobox/%s", style);
407 res = edje_object_file_set(sd->combobox, EWE_THEME, st);
408
409 eina_stringshare_del(st);
410 return res;
411}
412
374/*------------------------Smart functions ----------------------------*/ 413/*------------------------Smart functions ----------------------------*/
375 414
376EOLIAN static void 415EOLIAN static void
@@ -426,7 +465,6 @@ ewe_combobox_add(Evas_Object *parent)
426{ 465{
427 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 466 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
428 Evas_Object *obj = eo_add(MY_CLASS, parent); 467 Evas_Object *obj = eo_add(MY_CLASS, parent);
429 eo_unref(obj);
430 return obj; 468 return obj;
431} 469}
432 470
diff --git a/src/lib/ewe_combobox.eo b/src/lib/ewe_combobox.eo
index 81b1dc8..b888feb 100644
--- a/src/lib/ewe_combobox.eo
+++ b/src/lib/ewe_combobox.eo
@@ -134,7 +134,18 @@ class Ewe_Combobox (Elm_Widget)
134 @in Eina_Stringshare *style; /*@New items style*/ 134 @in Eina_Stringshare *style; /*@New items style*/
135 } 135 }
136 } 136 }
137 style_set {
138 /*@
139 Set style of the combobox.
140
141 @return EINA_TRUE on success, EINA_FALSE otherwise
137 142
143 @ingroup combobox*/
144 return: Eina_Bool;
145 params {
146 @in Eina_Stringshare *style; /*@New combobox style*/
147 }
148 }
138 } 149 }
139 150
140 implements { 151 implements {
diff --git a/src/lib/ewe_combobox_legacy.h b/src/lib/ewe_combobox_legacy.h
index bd5992f..834f9f7 100644
--- a/src/lib/ewe_combobox_legacy.h
+++ b/src/lib/ewe_combobox_legacy.h
@@ -122,7 +122,7 @@ ewe_combobox_select_item_get(Evas_Object *obj);
122/** 122/**
123 * Sets select combobox item. 123 * Sets select combobox item.
124 * 124 *
125 * @param item obj combobox object 125 * @param obj The combobox object
126 * @param index The combobox index 126 * @param index The combobox index
127 * @return EINA_TRUE on success, EINA_FALSE otherwise 127 * @return EINA_TRUE on success, EINA_FALSE otherwise
128 * 128 *
@@ -135,6 +135,7 @@ ewe_combobox_select_item_set(Evas_Object *obj,
135/** 135/**
136 * Sets the style for combobox item. 136 * Sets the style for combobox item.
137 * 137 *
138 * @param obj The combobox obj
138 * @param item The combobox item 139 * @param item The combobox item
139 * @param style The name of style 140 * @param style The name of style
140 * @return EINA_TRUE on success, EINA_FALSE otherwise 141 * @return EINA_TRUE on success, EINA_FALSE otherwise
@@ -146,4 +147,17 @@ ewe_combobox_item_style_set(Evas_Object *obj,
146 Ewe_Combobox_Item *item, 147 Ewe_Combobox_Item *item,
147 Eina_Stringshare *style); 148 Eina_Stringshare *style);
148 149
150/**
151 * Sets the style for combobox.
152 *
153 * @param obj The combobox obj
154 * @param style The name of style
155 * @return EINA_TRUE on success, EINA_FALSE otherwise
156 *
157 * @ingroup combobox
158 */
159EAPI Eina_Bool
160ewe_combobox_style_set(Evas_Object *obj,
161 Eina_Stringshare *style);
162
149#endif /* EWE_COMBOBOX_LEGACY_H */ 163#endif /* EWE_COMBOBOX_LEGACY_H */
diff --git a/src/lib/ewe_entry.c b/src/lib/ewe_entry.c
index 3e5c83f..3352760 100644
--- a/src/lib/ewe_entry.c
+++ b/src/lib/ewe_entry.c
@@ -13,7 +13,6 @@ ewe_entry_add(Evas_Object *parent)
13{ 13{
14 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 14 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
15 Evas_Object *obj = eo_add(MY_CLASS, parent); 15 Evas_Object *obj = eo_add(MY_CLASS, parent);
16 eo_unref(obj);
17 return obj; 16 return obj;
18} 17}
19 18
diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index ef8ce5e..61bc06f 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -939,7 +939,6 @@ ewe_ruler_add(Evas_Object *parent)
939 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 939 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
940 Evas_Object *obj = eo_add(MY_CLASS, parent); 940 Evas_Object *obj = eo_add(MY_CLASS, parent);
941 941
942 eo_unref(obj);
943 return obj; 942 return obj;
944} 943}
945 944
diff --git a/src/lib/ewe_statusbar.c b/src/lib/ewe_statusbar.c
index a49ad33..9f48877 100644
--- a/src/lib/ewe_statusbar.c
+++ b/src/lib/ewe_statusbar.c
@@ -370,7 +370,6 @@ ewe_statusbar_add(Evas_Object *parent)
370{ 370{
371 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 371 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
372 Evas_Object *obj = eo_add(MY_CLASS, parent); 372 Evas_Object *obj = eo_add(MY_CLASS, parent);
373 eo_unref(obj);
374 return obj; 373 return obj;
375} 374}
376/* ------Item API--------*/ 375/* ------Item API--------*/
diff --git a/src/lib/ewe_tabs.c b/src/lib/ewe_tabs.c
index 7dca284..3362296 100644
--- a/src/lib/ewe_tabs.c
+++ b/src/lib/ewe_tabs.c
@@ -33,6 +33,17 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
33 {NULL, NULL} 33 {NULL, NULL}
34}; 34};
35 35
36static void
37_ewe_tabs_layout_style_set(Ewe_Tabs_Smart_Data *sd)
38{
39 Eina_Stringshare *group_name = NULL;
40 group_name = eina_stringshare_printf("ewe/tabs/%s/%s",
41 sd->horizontal ? "horizontal" : "vertical",
42 sd->style);
43 elm_layout_file_set(sd->layout, EWE_THEME, group_name);
44 eina_stringshare_del(group_name);
45}
46
36EOLIAN static void 47EOLIAN static void
37_ewe_tabs_evas_object_smart_add(Eo *obj, 48_ewe_tabs_evas_object_smart_add(Eo *obj,
38 Ewe_Tabs_Smart_Data *sd) 49 Ewe_Tabs_Smart_Data *sd)
@@ -44,9 +55,13 @@ _ewe_tabs_evas_object_smart_add(Eo *obj,
44 elm_widget_sub_object_parent_add(obj); 55 elm_widget_sub_object_parent_add(obj);
45 56
46 _elm_access_object_register(obj, wd->resize_obj); 57 _elm_access_object_register(obj, wd->resize_obj);
58
47 sd->layout = elm_layout_add(obj); 59 sd->layout = elm_layout_add(obj);
48 evas_object_smart_member_add(sd->layout, obj); 60 evas_object_smart_member_add(sd->layout, obj);
49 elm_layout_file_set(sd->layout, EWE_THEME, "ewe/tabs/horizontal/default"); 61
62 sd->style = eina_stringshare_add("default");
63 _ewe_tabs_layout_style_set(sd);
64
50 sd->items_box = elm_box_add(obj); 65 sd->items_box = elm_box_add(obj);
51 evas_object_smart_member_add(sd->items_box, obj); 66 evas_object_smart_member_add(sd->items_box, obj);
52 elm_layout_content_set(sd->layout, "tabs_area", sd->items_box); 67 elm_layout_content_set(sd->layout, "tabs_area", sd->items_box);
@@ -68,8 +83,6 @@ ewe_tabs_add(Evas_Object *parent)
68 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 83 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
69 Evas_Object *obj = eo_add(MY_CLASS, parent); 84 Evas_Object *obj = eo_add(MY_CLASS, parent);
70 85
71
72 eo_unref(obj);
73 return obj; 86 return obj;
74} 87}
75 88
@@ -237,6 +250,7 @@ _ewe_tabs_evas_object_smart_del(Eo *obj EINA_UNUSED,
237 _item_data_free(it); 250 _item_data_free(it);
238 } 251 }
239 evas_object_del(sd->layout); 252 evas_object_del(sd->layout);
253 eina_stringshare_del(sd->style);
240} 254}
241 255
242EOLIAN static const Eina_List * 256EOLIAN static const Eina_List *
@@ -419,10 +433,7 @@ _ewe_tabs_orient_horizontal_set(Eo *obj,
419 return EINA_FALSE; 433 return EINA_FALSE;
420 sd->horizontal = horizontal; 434 sd->horizontal = horizontal;
421 elm_box_horizontal_set(sd->items_box, sd->horizontal); 435 elm_box_horizontal_set(sd->items_box, sd->horizontal);
422 if (sd->horizontal) 436 _ewe_tabs_layout_style_set(sd);
423 elm_layout_file_set(sd->layout, EWE_THEME, "ewe/tabs/horizontal/default");
424 else
425 elm_layout_file_set(sd->layout, EWE_THEME, "ewe/tabs/vertical/default");
426 437
427 EINA_LIST_FOREACH(sd->items, l, it) 438 EINA_LIST_FOREACH(sd->items, l, it)
428 { 439 {
@@ -481,6 +492,31 @@ _ewe_tabs_evas_object_smart_resize(Eo *obj,
481 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h)); 492 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
482} 493}
483 494
495EOLIAN static Eina_Bool
496_ewe_tabs_elm_widget_style_set(Eo *obj EINA_UNUSED,
497 Ewe_Tabs_Smart_Data *sd,
498 const char *style)
499{
500 if (!sd) return EINA_FALSE;
501
502 if (style)
503 eina_stringshare_replace(&(sd->style), style);
504 else
505 eina_stringshare_replace(&(sd->style), "default");
506
507 _ewe_tabs_layout_style_set(sd);
508 return EINA_TRUE;
509}
510
511EOLIAN static const char*
512_ewe_tabs_elm_widget_style_get(Eo *obj EINA_UNUSED,
513 Ewe_Tabs_Smart_Data *sd)
514{
515 if (!sd) return NULL;
516
517 return sd->style;
518}
519
484static void 520static void
485_ewe_tabs_evas_object_smart_move(Eo *obj, 521_ewe_tabs_evas_object_smart_move(Eo *obj,
486 Ewe_Tabs_Smart_Data *sd, 522 Ewe_Tabs_Smart_Data *sd,
diff --git a/src/lib/ewe_tabs.eo b/src/lib/ewe_tabs.eo
index fdf1e6e..e473ea3 100644
--- a/src/lib/ewe_tabs.eo
+++ b/src/lib/ewe_tabs.eo
@@ -254,6 +254,7 @@ class Ewe_Tabs (Elm_Widget)
254 Evas.Object_Smart.move; 254 Evas.Object_Smart.move;
255 Evas.Object_Smart.show; 255 Evas.Object_Smart.show;
256 Evas.Object_Smart.hide; 256 Evas.Object_Smart.hide;
257 Elm_Widget.style;
257 } 258 }
258 events { 259 events {
259 item,activated; 260 item,activated;
diff --git a/src/lib/ewe_widget_tabs.h b/src/lib/ewe_widget_tabs.h
index 001417b..1ee3657 100644
--- a/src/lib/ewe_widget_tabs.h
+++ b/src/lib/ewe_widget_tabs.h
@@ -30,6 +30,8 @@ struct _Ewe_Tabs_Smart_Data
30 Eina_List *items; 30 Eina_List *items;
31 Ewe_Tabs_Item *active_item; 31 Ewe_Tabs_Item *active_item;
32 Eina_Bool horizontal; 32 Eina_Bool horizontal;
33
34 Eina_Stringshare *style;
33}; 35};
34 36
35#define EWE_TABS_DATA_GET(o, sd) \ 37#define EWE_TABS_DATA_GET(o, sd) \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 42f8612..2b3fba9 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -116,7 +116,9 @@ test_ewe_tabs/ewe_tabs_item_del.c \
116test_ewe_tabs/ewe_tabs_item_disabled_set.c \ 116test_ewe_tabs/ewe_tabs_item_disabled_set.c \
117test_ewe_tabs/ewe_tabs_item_disabled_get.c \ 117test_ewe_tabs/ewe_tabs_item_disabled_get.c \
118test_ewe_tabs/ewe_tabs_orient_horizontal_set.c \ 118test_ewe_tabs/ewe_tabs_orient_horizontal_set.c \
119test_ewe_tabs/ewe_tabs_orient_horizontal_get.c 119test_ewe_tabs/ewe_tabs_orient_horizontal_get.c \
120test_ewe_tabs/ewe_tabs_elm_widget_style_set.c \
121test_ewe_tabs/ewe_tabs_elm_widget_style_get.c
120ewe_tabs_test_CFLAGS = ${FLAGS} 122ewe_tabs_test_CFLAGS = ${FLAGS}
121ewe_tabs_test_LDADD = ${LD} 123ewe_tabs_test_LDADD = ${LD}
122 124
diff --git a/tests/test_ewe_combobox/ewe_combobox_item_title_set.c b/tests/test_ewe_combobox/ewe_combobox_item_title_set.c
index e360cc3..e19cda9 100644
--- a/tests/test_ewe_combobox/ewe_combobox_item_title_set.c
+++ b/tests/test_ewe_combobox/ewe_combobox_item_title_set.c
@@ -112,7 +112,7 @@ END_TEST
112 * @{ 112 * @{
113 * <tr> 113 * <tr>
114 * <td>ewe_combobox_item_title_set</td> 114 * <td>ewe_combobox_item_title_set</td>
115 * <td>ewe_combobox_item_title_set_test_n1</td> 115 * <td>ewe_combobox_item_title_set_test_p3</td>
116 * <td> 116 * <td>
117 * @precondition 117 * @precondition
118 * @step 1 initialized ewe 118 * @step 1 initialized ewe
@@ -125,20 +125,20 @@ END_TEST
125 * @step 2 check that returned value 125 * @step 2 check that returned value
126 * </td> 126 * </td>
127 * <td>Evas_Object *combobox, int 0, NULL</td> 127 * <td>Evas_Object *combobox, int 0, NULL</td>
128 * <td>EINA_FALSE</td> 128 * <td>EINA_TRUE</td>
129 * <td>_REAL_RESULT_</td> 129 * <td>_REAL_RESULT_</td>
130 * <td>_PASSED_</td> 130 * <td>_PASSED_</td>
131 * </tr> 131 * </tr>
132 * @} 132 * @}
133 */ 133 */
134EWE_TEST(ewe_combobox_item_title_set_test_n1) 134EWE_TEST(ewe_combobox_item_title_set_test_p3)
135{ 135{
136 ewe_init(0, 0); 136 ewe_init(0, 0);
137 Evas_Object *win = elm_win_util_standard_add("test", "test"); 137 Evas_Object *win = elm_win_util_standard_add("test", "test");
138 Evas_Object *combobox = ewe_combobox_add(win); 138 Evas_Object *combobox = ewe_combobox_add(win);
139 ewe_combobox_item_add(combobox, NULL); 139 ewe_combobox_item_add(combobox, NULL);
140 140
141 ck_assert_msg(ewe_combobox_item_title_set(combobox, 0, NULL) == EINA_FALSE, "NULL title was set to item"); 141 ck_assert_msg(ewe_combobox_item_title_set(combobox, 0, NULL) == EINA_TRUE, "Could not set NULL title to item");
142 142
143 evas_object_del(win); 143 evas_object_del(win);
144 ewe_shutdown(); 144 ewe_shutdown();
@@ -150,7 +150,7 @@ END_TEST
150 * @{ 150 * @{
151 * <tr> 151 * <tr>
152 * <td>ewe_combobox_item_title_set</td> 152 * <td>ewe_combobox_item_title_set</td>
153 * <td>ewe_combobox_item_title_set_test_n2</td> 153 * <td>ewe_combobox_item_title_set_test_n1</td>
154 * <td> 154 * <td>
155 * @precondition 155 * @precondition
156 * @step 1 initialized ewe 156 * @step 1 initialized ewe
@@ -166,7 +166,7 @@ END_TEST
166 * </tr> 166 * </tr>
167 * @} 167 * @}
168 */ 168 */
169EWE_TEST(ewe_combobox_item_title_set_test_n2) 169EWE_TEST(ewe_combobox_item_title_set_test_n1)
170{ 170{
171 ewe_init(0, 0); 171 ewe_init(0, 0);
172 172
@@ -181,7 +181,7 @@ END_TEST
181 * @{ 181 * @{
182 * <tr> 182 * <tr>
183 * <td>ewe_combobox_item_title_set</td> 183 * <td>ewe_combobox_item_title_set</td>
184 * <td>ewe_combobox_item_title_set_test_n3</td> 184 * <td>ewe_combobox_item_title_set_test_n2</td>
185 * <td> 185 * <td>
186 * @precondition 186 * @precondition
187 * @step 1 initialized ewe 187 * @step 1 initialized ewe
@@ -200,7 +200,7 @@ END_TEST
200 * </tr> 200 * </tr>
201 * @} 201 * @}
202 */ 202 */
203EWE_TEST(ewe_combobox_item_title_set_test_n3) 203EWE_TEST(ewe_combobox_item_title_set_test_n2)
204{ 204{
205 ewe_init(0, 0); 205 ewe_init(0, 0);
206 Evas_Object *win = elm_win_util_standard_add("test", "test"); 206 Evas_Object *win = elm_win_util_standard_add("test", "test");
diff --git a/tests/test_ewe_combobox/test_ewe_combobox.c b/tests/test_ewe_combobox/test_ewe_combobox.c
index bb73c88..4152445 100644
--- a/tests/test_ewe_combobox/test_ewe_combobox.c
+++ b/tests/test_ewe_combobox/test_ewe_combobox.c
@@ -32,9 +32,9 @@ Suite* test_suite (void) {
32 tcase_add_test(tcase, ewe_combobox_item_title_get_test_n2); 32 tcase_add_test(tcase, ewe_combobox_item_title_get_test_n2);
33 tcase_add_test(tcase, ewe_combobox_item_title_set_test_p1); 33 tcase_add_test(tcase, ewe_combobox_item_title_set_test_p1);
34 tcase_add_test(tcase, ewe_combobox_item_title_set_test_p2); 34 tcase_add_test(tcase, ewe_combobox_item_title_set_test_p2);
35 tcase_add_test(tcase, ewe_combobox_item_title_set_test_p3);
35 tcase_add_test(tcase, ewe_combobox_item_title_set_test_n1); 36 tcase_add_test(tcase, ewe_combobox_item_title_set_test_n1);
36 tcase_add_test(tcase, ewe_combobox_item_title_set_test_n2); 37 tcase_add_test(tcase, ewe_combobox_item_title_set_test_n2);
37 tcase_add_test(tcase, ewe_combobox_item_title_set_test_n3);
38 tcase_add_test(tcase, ewe_combobox_items_list_get_test_p); 38 tcase_add_test(tcase, ewe_combobox_items_list_get_test_p);
39 tcase_add_test(tcase, ewe_combobox_items_list_get_test_n); 39 tcase_add_test(tcase, ewe_combobox_items_list_get_test_n);
40 tcase_add_test(tcase, ewe_combobox_select_item_set_test_p); 40 tcase_add_test(tcase, ewe_combobox_select_item_set_test_p);
diff --git a/tests/test_ewe_combobox/test_ewe_combobox.h b/tests/test_ewe_combobox/test_ewe_combobox.h
index 847b68d..204e137 100644
--- a/tests/test_ewe_combobox/test_ewe_combobox.h
+++ b/tests/test_ewe_combobox/test_ewe_combobox.h
@@ -29,21 +29,27 @@ void ewe_combobox_add_test_n(int);
29void ewe_combobox_item_add_test_p1(int); 29void ewe_combobox_item_add_test_p1(int);
30void ewe_combobox_item_add_test_p2(int); 30void ewe_combobox_item_add_test_p2(int);
31void ewe_combobox_item_add_test_n(int); 31void ewe_combobox_item_add_test_n(int);
32
32void ewe_combobox_item_del_test_p(int); 33void ewe_combobox_item_del_test_p(int);
33void ewe_combobox_item_del_test_n(int); 34void ewe_combobox_item_del_test_n(int);
35
34void ewe_combobox_item_title_get_test_p(int); 36void ewe_combobox_item_title_get_test_p(int);
35void ewe_combobox_item_title_get_test_n1(int); 37void ewe_combobox_item_title_get_test_n1(int);
36void ewe_combobox_item_title_get_test_n2(int); 38void ewe_combobox_item_title_get_test_n2(int);
39
37void ewe_combobox_item_title_set_test_p1(int); 40void ewe_combobox_item_title_set_test_p1(int);
38void ewe_combobox_item_title_set_test_p2(int); 41void ewe_combobox_item_title_set_test_p2(int);
42void ewe_combobox_item_title_set_test_p3(int);
39void ewe_combobox_item_title_set_test_n1(int); 43void ewe_combobox_item_title_set_test_n1(int);
40void ewe_combobox_item_title_set_test_n2(int); 44void ewe_combobox_item_title_set_test_n2(int);
41void ewe_combobox_item_title_set_test_n3(int); 45
42void ewe_combobox_items_list_get_test_p(int); 46void ewe_combobox_items_list_get_test_p(int);
43void ewe_combobox_items_list_get_test_n(int); 47void ewe_combobox_items_list_get_test_n(int);
48
44void ewe_combobox_select_item_set_test_p(int); 49void ewe_combobox_select_item_set_test_p(int);
45void ewe_combobox_select_item_set_test_n1(int); 50void ewe_combobox_select_item_set_test_n1(int);
46void ewe_combobox_select_item_set_test_n2(int); 51void ewe_combobox_select_item_set_test_n2(int);
52
47void ewe_combobox_select_item_get_test_p1(int); 53void ewe_combobox_select_item_get_test_p1(int);
48void ewe_combobox_select_item_get_test_p2(int); 54void ewe_combobox_select_item_get_test_p2(int);
49void ewe_combobox_select_item_get_test_n(int); 55void ewe_combobox_select_item_get_test_n(int);
diff --git a/tests/test_ewe_tabs/ewe_tabs_elm_widget_style_get.c b/tests/test_ewe_tabs/ewe_tabs_elm_widget_style_get.c
new file mode 100644
index 0000000..7e08a6a
--- /dev/null
+++ b/tests/test_ewe_tabs/ewe_tabs_elm_widget_style_get.c
@@ -0,0 +1,145 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html.
18 */
19#include "test_ewe_tabs.h"
20
21/**
22 * @addtogroup ewe_tabs_test
23 * @{
24 * @addtogroup ewe_tabs_elm_widget_style_get
25 * @{
26 * ewe_tabs
27 * <TABLE>
28 * @}
29 */
30
31/**
32 * @addtogroup ewe_tabs_elm_widget_style_get
33 * @{
34 * <tr>
35 * <td>elm_object_style_get</td>
36 * <td>ewe_tabs_elm_widget_style_get_p1</td>
37 * <td>
38 * @precondition
39 * @step 1 initialized ewe
40 * @step 2 parent window created
41 * @step 3 ewe_tabs added
42 *
43 * @procedure
44 * @step 1 call elm_widget_style_get(tabs);
45 * @step 2 check that returned value is "default"
46 * </td>
47 * <td> Evas_Object *tabs</td>
48 * <td>All checks passed</td>
49 * <td>_REAL_RESULT_</td>
50 * <td>_PASSED_</td>
51 * </tr>
52 * @}
53 */
54EWE_TEST(ewe_tabs_elm_widget_style_get_p1)
55{
56 ewe_init(0, 0);
57 Evas_Object *win = elm_win_util_standard_add("test", "test");
58 Evas_Object *tabs = ewe_tabs_add(win);
59
60 Eina_Bool result = !strcmp(elm_object_style_get(tabs), "default");
61 ck_assert_msg(result == EINA_TRUE, "Wrong default name of the style");
62
63 evas_object_del(win);
64 ewe_shutdown();
65}
66END_TEST
67
68/**
69 * @addtogroup ewe_tabs_elm_widget_style_get
70 * @{
71 * <tr>
72 * <td>elm_object_style_get</td>
73 * <td>ewe_tabs_elm_widget_style_get_p2</td>
74 * <td>
75 * @precondition
76 * @step 1 initialized ewe
77 * @step 2 parent window created
78 * @step 3 ewe_tabs added
79 *
80 * @procedure
81 * @step 1 call elm_widget_style_set(tabs, "style");
82 * @step 2 call elm_widget_style_get(tabs);
83 * @step 3 check that returned value is "style"
84 * </td>
85 * <td> Evas_Object *tabs</td>
86 * <td>All checks passed</td>
87 * <td>_REAL_RESULT_</td>
88 * <td>_PASSED_</td>
89 * </tr>
90 * @}
91 */
92EWE_TEST(ewe_tabs_elm_widget_style_get_p2)
93{
94 ewe_init(0, 0);
95 Evas_Object *win = elm_win_util_standard_add("test", "test");
96 Evas_Object *tabs = ewe_tabs_add(win);
97
98 elm_object_style_set(tabs, "style");
99
100 Eina_Bool result = !strcmp(elm_object_style_get(tabs), "style");
101 ck_assert_msg(result == EINA_TRUE, "Wrong style name received");
102
103 evas_object_del(win);
104 ewe_shutdown();
105}
106END_TEST
107
108/**
109 * @addtogroup ewe_tabs_elm_widget_style_get
110 * @{
111 * <tr>
112 * <td>elm_object_style_get</td>
113 * <td>ewe_tabs_elm_widget_style_get_n</td>
114 * <td>
115 * @precondition
116 * @step 1 initialized ewe
117 *
118 * @procedure
119 * @step 1 call elm_widget_style_get(NULL);
120 * @step 2 check that returned value is NULL;
121 * </td>
122 * <td>NULL</td>
123 * <td>All checks passed</td>
124 * <td>_REAL_RESULT_</td>
125 * <td>_PASSED_</td>
126 * </tr>
127 * @}
128 */
129EWE_TEST(ewe_tabs_elm_widget_style_get_n)
130{
131 ewe_init(0, 0);
132
133 ck_assert_msg(elm_object_style_get(NULL) == NULL, "NULL should be returned");
134
135 ewe_shutdown();
136}
137END_TEST
138
139/**
140 * @addtogroup ewe_tabs_elm_widget_style_get
141 * @{
142 * </TABLE>
143 * @}
144 * @}
145 */
diff --git a/tests/test_ewe_tabs/ewe_tabs_elm_widget_style_set.c b/tests/test_ewe_tabs/ewe_tabs_elm_widget_style_set.c
new file mode 100644
index 0000000..30eac8c
--- /dev/null
+++ b/tests/test_ewe_tabs/ewe_tabs_elm_widget_style_set.c
@@ -0,0 +1,118 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html.
18 */
19#include "test_ewe_tabs.h"
20
21/**
22 * @addtogroup ewe_tabs_test
23 * @{
24 * @addtogroup ewe_tabs_elm_widget_style_set
25 * @{
26 * ewe_tabs
27 * <TABLE>
28 * @}
29 */
30
31/**
32 * @addtogroup ewe_tabs_elm_widget_style_set
33 * @{
34 * <tr>
35 * <td>elm_object_style_set</td>
36 * <td>ewe_tabs_elm_widget_style_set_p</td>
37 * <td>
38 * @precondition
39 * @step 1 initialized ewe
40 * @step 2 parent window created
41 * @step 3 ewe_tabs added
42 *
43 * @procedure
44 * @step 1 call elm_widget_style_set(tabs, "style");
45 * @step 2 call elm_widget_style_get(tabs);
46 * @step 3 check that returned value is "style"
47 * @step 4 call elm_widget_style_set(tabs, NULL);
48 * @step 5 call elm_widget_style_get(tabs);
49 * @step 6 check that returned value is "default"
50 * </td>
51 * <td> Evas_Object *tabs, const char *str; Evas_Object *tabs, NULL;</td>
52 * <td>All checks passed</td>
53 * <td>_REAL_RESULT_</td>
54 * <td>_PASSED_</td>
55 * </tr>
56 * @}
57 */
58EWE_TEST(ewe_tabs_elm_widget_style_set_p)
59{
60 ewe_init(0, 0);
61 Evas_Object *win = elm_win_util_standard_add("test", "test");
62 Evas_Object *tabs = ewe_tabs_add(win);
63
64 ck_assert_msg(elm_object_style_set(tabs, "style") == EINA_TRUE, "New style value should be set, but it isnt");
65 Eina_Bool result = !strcmp(elm_object_style_get(tabs), "style");
66 ck_assert_msg(result == EINA_TRUE, "Wrong value of style received");
67
68 ck_assert_msg(elm_object_style_set(tabs, NULL) == EINA_TRUE, "Default style value should be set, but it isnt");
69
70 result = !strcmp(elm_object_style_get(tabs), "default");
71 ck_assert_msg(result == EINA_TRUE, "Default style value should be set, but it isnt");
72
73 evas_object_del(win);
74 ewe_shutdown();
75}
76END_TEST
77
78/**
79 * @addtogroup ewe_tabs_elm_widget_style_set
80 * @{
81 * <tr>
82 * <td>elm_object_style_set</td>
83 * <td>ewe_tabs_elm_widget_style_set_n</td>
84 * <td>
85 * @precondition
86 * @step 1 initialized ewe
87 *
88 * @procedure
89 * @step 1 call elm_widget_style_set(NULL, NULL);
90 * @step 2 check that returned value is EINA_FALSE;
91 * @step 3 call elm_widget_style_set(NULL, "style");
92 * @step 4 check that returned value is EINA_FALSE;
93 * </td>
94 * <td>NULL, NULL; NULL, const char *str</td>
95 * <td>All checks passed</td>
96 * <td>_REAL_RESULT_</td>
97 * <td>_PASSED_</td>
98 * </tr>
99 * @}
100 */
101EWE_TEST(ewe_tabs_elm_widget_style_set_n)
102{
103 ewe_init(0, 0);
104
105 ck_assert_msg(elm_object_style_set(NULL, NULL) == EINA_FALSE, "Wrong returned data on passing NULL");
106 ck_assert_msg(elm_object_style_set(NULL, NULL) == EINA_FALSE, "Wrong returned data on passing NULL");
107
108 ewe_shutdown();
109}
110END_TEST
111
112/**
113 * @addtogroup ewe_tabs_elm_widget_style_set
114 * @{
115 * </TABLE>
116 * @}
117 * @}
118 */
diff --git a/tests/test_ewe_tabs/ewe_tabs_item_disabled_set.c b/tests/test_ewe_tabs/ewe_tabs_item_disabled_set.c
index 28664ce..7c59418 100644
--- a/tests/test_ewe_tabs/ewe_tabs_item_disabled_set.c
+++ b/tests/test_ewe_tabs/ewe_tabs_item_disabled_set.c
@@ -22,7 +22,7 @@
22 * @{ 22 * @{
23 * @addtogroup ewe_tabs_item_disabled_set 23 * @addtogroup ewe_tabs_item_disabled_set
24 * @{ 24 * @{
25 * ewe_eabs 25 * ewe_tabs
26 * <TABLE> 26 * <TABLE>
27 * @} 27 * @}
28 */ 28 */
diff --git a/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_get.c b/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_get.c
index 73236a3..876b963 100644
--- a/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_get.c
+++ b/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_get.c
@@ -23,7 +23,7 @@
23 * @{ 23 * @{
24 * @addtogroup ewe_tabs_orient_horizontal_get 24 * @addtogroup ewe_tabs_orient_horizontal_get
25 * @{ 25 * @{
26 * ewe_eabs 26 * ewe_tabs
27 * <TABLE> 27 * <TABLE>
28 * @} 28 * @}
29 */ 29 */
diff --git a/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_set.c b/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_set.c
index f0cfef9..c7c7160 100644
--- a/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_set.c
+++ b/tests/test_ewe_tabs/ewe_tabs_orient_horizontal_set.c
@@ -23,7 +23,7 @@
23 * @{ 23 * @{
24 * @addtogroup ewe_tabs_orient_horizontal_set 24 * @addtogroup ewe_tabs_orient_horizontal_set
25 * @{ 25 * @{
26 * ewe_eabs 26 * ewe_tabs
27 * <TABLE> 27 * <TABLE>
28 * @} 28 * @}
29 */ 29 */
diff --git a/tests/test_ewe_tabs/test_ewe_tabs.c b/tests/test_ewe_tabs/test_ewe_tabs.c
index d9527d0..dc728e2 100644
--- a/tests/test_ewe_tabs/test_ewe_tabs.c
+++ b/tests/test_ewe_tabs/test_ewe_tabs.c
@@ -73,6 +73,11 @@ Suite* test_suite (void) {
73 tcase_add_test(tcase, ewe_tabs_orient_horizontal_set_test_n); 73 tcase_add_test(tcase, ewe_tabs_orient_horizontal_set_test_n);
74 tcase_add_test(tcase, ewe_tabs_orient_horizontal_get_test_p); 74 tcase_add_test(tcase, ewe_tabs_orient_horizontal_get_test_p);
75 tcase_add_test(tcase, ewe_tabs_orient_horizontal_get_test_n); 75 tcase_add_test(tcase, ewe_tabs_orient_horizontal_get_test_n);
76 tcase_add_test(tcase, ewe_tabs_elm_widget_style_get_p1);
77 tcase_add_test(tcase, ewe_tabs_elm_widget_style_get_p2);
78 tcase_add_test(tcase, ewe_tabs_elm_widget_style_get_n);
79 tcase_add_test(tcase, ewe_tabs_elm_widget_style_set_p);
80 tcase_add_test(tcase, ewe_tabs_elm_widget_style_set_n);
76 suite_add_tcase(suite, tcase); 81 suite_add_tcase(suite, tcase);
77 return suite; 82 return suite;
78} 83}
diff --git a/tests/test_ewe_tabs/test_ewe_tabs.h b/tests/test_ewe_tabs/test_ewe_tabs.h
index 907dbef..72f4ca6 100644
--- a/tests/test_ewe_tabs/test_ewe_tabs.h
+++ b/tests/test_ewe_tabs/test_ewe_tabs.h
@@ -95,3 +95,10 @@ void ewe_tabs_orient_horizontal_set_test_n(int);
95 95
96void ewe_tabs_orient_horizontal_get_test_p(int); 96void ewe_tabs_orient_horizontal_get_test_p(int);
97void ewe_tabs_orient_horizontal_get_test_n(int); 97void ewe_tabs_orient_horizontal_get_test_n(int);
98
99void ewe_tabs_elm_widget_style_set_p(int);
100void ewe_tabs_elm_widget_style_set_n(int);
101
102void ewe_tabs_elm_widget_style_get_p1(int);
103void ewe_tabs_elm_widget_style_get_p2(int);
104void ewe_tabs_elm_widget_style_get_n(int);
diff --git a/tests/tests_report_generator.py b/tests/tests_report_generator.py
index e1a115e..e33be9b 100755
--- a/tests/tests_report_generator.py
+++ b/tests/tests_report_generator.py
@@ -75,6 +75,8 @@ def gen_report(logs_dir, output_file):
75 i = i + 1 75 i = i + 1
76 tmp_split = tmp_lines[i].split("</td><td>", 5) 76 tmp_split = tmp_lines[i].split("</td><td>", 5)
77 for j in range(log_start, len(lines)): 77 for j in range(log_start, len(lines)):
78 result = "NOT RAN";
79 passed = '<td bgcolor="#FFFF00">Not ran</td>'
78 if test_id in lines[j]: 80 if test_id in lines[j]:
79 log_split = lines[j].split(':', 7) 81 log_split = lines[j].split(':', 7)
80 if log_split[2] == 'P': 82 if log_split[2] == 'P':
@@ -98,6 +100,7 @@ def gen_report(logs_dir, output_file):
98 i = i + 3 100 i = i + 3
99 except IndexError: 101 except IndexError:
100 print "Incorrect doc structure in \"" + tmp_file + "\"" 102 print "Incorrect doc structure in \"" + tmp_file + "\""
103 print " last test_id: " + test_id
101 out.write('<tr><td> </td></tr>') 104 out.write('<tr><td> </td></tr>')
102 except IOError: 105 except IOError:
103 print "There is no test log for \"" + tmp_file + "\"" 106 print "There is no test log for \"" + tmp_file + "\""
@@ -109,6 +112,7 @@ def main():
109 parser.add_argument('html', help='path to the tests documentation directory') 112 parser.add_argument('html', help='path to the tests documentation directory')
110 parser.add_argument('log', help='path to the tests log directory') 113 parser.add_argument('log', help='path to the tests log directory')
111 parser.add_argument('-c', '--clean', action='store_true', help='removes all *.tmp files from current directory before processing') 114 parser.add_argument('-c', '--clean', action='store_true', help='removes all *.tmp files from current directory before processing')
115 parser.add_argument('-t', '--tmp', action='store_true', help='do not remove *.tmp files from current directory after processing')
112 parser.add_argument('-o', '--output', default='report.html', help='output file name. Default name: report.html') 116 parser.add_argument('-o', '--output', default='report.html', help='output file name. Default name: report.html')
113 args = parser.parse_args() 117 args = parser.parse_args()
114 118
@@ -127,9 +131,10 @@ def main():
127 return 131 return
128 walk_dirs(args.html) 132 walk_dirs(args.html)
129 gen_report(args.log, args.output) 133 gen_report(args.log, args.output)
130 for f in os.listdir('.'): 134 if not args.tmp:
131 if not os.path.isdir(f) and f.endswith('.tmp'): 135 for f in os.listdir('.'):
132 os.remove(f) 136 if not os.path.isdir(f) and f.endswith('.tmp'):
137 os.remove(f)
133 138
134if __name__ == '__main__': 139if __name__ == '__main__':
135 main() 140 main()