summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--data/themes/default.edc690
-rw-r--r--data/themes/images/everything_border.pngbin0 -> 745 bytes
-rw-r--r--data/themes/images/everything_box.pngbin226 -> 271 bytes
-rw-r--r--data/themes/images/everything_item_bg.pngbin0 -> 347 bytes
-rw-r--r--src/modules/everything/Makefile.am100
-rw-r--r--src/modules/everything/actions/evry_plug_border_act.c (renamed from src/modules/everything/evry_plug_border_act.c)0
-rw-r--r--src/modules/everything/actions/evry_plug_clipboard.c (renamed from src/modules/everything/evry_plug_clipboard.c)0
-rw-r--r--src/modules/everything/actions/evry_plug_wallpaper.c (renamed from src/modules/everything/evry_plug_wallpaper.c)0
-rw-r--r--src/modules/everything/e_mod_main.h22
-rw-r--r--src/modules/everything/evry.c76
-rw-r--r--src/modules/everything/evry_plug_aggregator.c2
-rw-r--r--src/modules/everything/sources/Makefile.am64
-rw-r--r--src/modules/everything/sources/evry_plug_apps.c (renamed from src/modules/everything/evry_plug_apps.c)170
-rw-r--r--src/modules/everything/sources/evry_plug_aspell.c (renamed from src/modules/everything/evry_plug_aspell.c)0
-rw-r--r--src/modules/everything/sources/evry_plug_border.c (renamed from src/modules/everything/evry_plug_border.c)35
-rw-r--r--src/modules/everything/sources/evry_plug_calc.c (renamed from src/modules/everything/evry_plug_calc.c)0
-rw-r--r--src/modules/everything/sources/evry_plug_config.c (renamed from src/modules/everything/evry_plug_config.c)0
-rw-r--r--src/modules/everything/sources/evry_plug_dir_browse.c (renamed from src/modules/everything/evry_plug_dir_browse.c)10
-rw-r--r--src/modules/everything/sources/evry_plug_tracker.c (renamed from src/modules/everything/evry_plug_tracker.c)80
-rw-r--r--src/modules/everything/views/Makefile.am43
-rw-r--r--src/modules/everything/views/evry_plug_preview.c (renamed from src/modules/everything/evry_plug_preview.c)2
-rw-r--r--src/modules/everything/views/evry_plug_view_help.c (renamed from src/modules/everything/evry_plug_view_help.c)0
-rw-r--r--src/modules/everything/views/evry_plug_view_list.c (renamed from src/modules/everything/evry_plug_view_list.c)293
-rw-r--r--src/modules/everything/views/evry_plug_view_thumb.c971
25 files changed, 2029 insertions, 532 deletions
diff --git a/configure.ac b/configure.ac
index f514f13..31da04b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -560,6 +560,9 @@ src/modules/illume2/module.desktop
560src/modules/syscon/Makefile 560src/modules/syscon/Makefile
561src/modules/syscon/module.desktop 561src/modules/syscon/module.desktop
562src/modules/everything/Makefile 562src/modules/everything/Makefile
563src/modules/everything/sources/Makefile
564src/modules/everything/actions/Makefile
565src/modules/everything/views/Makefile
563src/modules/everything/module.desktop 566src/modules/everything/module.desktop
564src/modules/everything/everything.pc 567src/modules/everything/everything.pc
565src/modules/systray/Makefile 568src/modules/systray/Makefile
diff --git a/data/themes/default.edc b/data/themes/default.edc
index c1ce977..f853931 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -26581,7 +26581,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26581 26581
26582///////////////////////////////////////////////////////////////////////////// 26582/////////////////////////////////////////////////////////////////////////////
26583 /*** MOD: EVERYTHING ***/ 26583 /*** MOD: EVERYTHING ***/
26584 /* #define DROP_SHADOW 1 */ 26584 #define DROP_SHADOW 1
26585 26585
26586 ICON("everything-launch","icon_advanced.png",64) 26586 ICON("everything-launch","icon_advanced.png",64)
26587 26587
@@ -26614,8 +26614,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26614 border: 50 50 50 50; 26614 border: 50 50 50 50;
26615 } 26615 }
26616 fill.smooth: 0; 26616 fill.smooth: 0;
26617 color: 255 255 255 100; 26617 color: 255 255 255 200;
26618
26619 } 26618 }
26620 } 26619 }
26621 part { name: "bg"; 26620 part { name: "bg";
@@ -26630,7 +26629,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26630 border: 7 7 5 5; 26629 border: 7 7 5 5;
26631 } 26630 }
26632 color: 255 255 255 255; 26631 color: 255 255 255 255;
26633
26634 } 26632 }
26635 description { state: "wide" 0; 26633 description { state: "wide" 0;
26636 inherit: "default" 0.0; 26634 inherit: "default" 0.0;
@@ -26650,7 +26648,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26650 border: 7 7 5 5; 26648 border: 7 7 5 5;
26651 } 26649 }
26652 color: 255 255 255 255; 26650 color: 255 255 255 255;
26653
26654 } 26651 }
26655 description { state: "wide" 0; 26652 description { state: "wide" 0;
26656 inherit: "default" 0.0; 26653 inherit: "default" 0.0;
@@ -26729,7 +26726,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26729 visible: 1; 26726 visible: 1;
26730 } 26727 }
26731 } 26728 }
26732
26733 part { name: "over1"; 26729 part { name: "over1";
26734 mouse_events: 0; 26730 mouse_events: 0;
26735 description { state: "default" 0.0; 26731 description { state: "default" 0.0;
@@ -26749,7 +26745,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26749 rel1.to: "bg"; 26745 rel1.to: "bg";
26750 rel2.to: "bg"; 26746 rel2.to: "bg";
26751 rel2.offset: -1 40; 26747 rel2.offset: -1 40;
26752
26753 image { 26748 image {
26754 normal: "bt_shine.png"; 26749 normal: "bt_shine.png";
26755 border: 7 7 7 0; 26750 border: 7 7 7 0;
@@ -26779,7 +26774,8 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26779 26774
26780 group { name: "e/modules/everything/selector_item"; 26775 group { name: "e/modules/everything/selector_item";
26781 images { 26776 images {
26782 image: "gadman_border.png" COMP; 26777 image: "everything_border.png" COMP;
26778 image: "everything_item_bg.png" COMP;
26783 } 26779 }
26784 parts { 26780 parts {
26785 part { name: "clip"; 26781 part { name: "clip";
@@ -26789,14 +26785,30 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26789 state: "default" 0.0; 26785 state: "default" 0.0;
26790 } 26786 }
26791 } 26787 }
26792 26788 part { name: "border_bg";
26793 part { name: "border";
26794 clip_to: "clip"; 26789 clip_to: "clip";
26795 mouse_events: 0; 26790 mouse_events: 0;
26796 description { state: "default" 0.0; 26791 description { state: "default" 0.0;
26797 color: 255 255 255 32; 26792 color: 255 255 255 32;
26793 rel1.offset: 2 2;
26794 rel2.offset: -3 -3;
26795 image {
26796 normal: "everything_item_bg.png";
26797 border: 5 5 5 5;
26798 }
26799 }
26800 description { state: "selected" 0.0;
26801 inherit: "default" 0.0;
26802 color: 255 255 255 64;
26803 }
26804 }
26805 part { name: "border";
26806 clip_to: "clip";
26807 mouse_events: 0;
26808 description { state: "default" 0.0;
26809 color: 255 255 255 64;
26798 image { 26810 image {
26799 normal: "gadman_border.png"; 26811 normal: "everything_border.png";
26800 border: 10 10 10 10; 26812 border: 10 10 10 10;
26801 } 26813 }
26802 } 26814 }
@@ -26805,7 +26817,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26805 color: 255 255 255 128; 26817 color: 255 255 255 128;
26806 } 26818 }
26807 } 26819 }
26808
26809 part { name: "inner_clip"; 26820 part { name: "inner_clip";
26810 type: RECT; 26821 type: RECT;
26811 clip_to: "clip"; 26822 clip_to: "clip";
@@ -26815,7 +26826,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26815 rel2.offset: -11 -11; 26826 rel2.offset: -11 -11;
26816 } 26827 }
26817 } 26828 }
26818
26819 part { name: "icon_clip"; 26829 part { name: "icon_clip";
26820 type: RECT; 26830 type: RECT;
26821 clip_to: "inner_clip"; 26831 clip_to: "inner_clip";
@@ -26828,7 +26838,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26828 color: 255 255 255 200; 26838 color: 255 255 255 200;
26829 } 26839 }
26830 } 26840 }
26831
26832 part { 26841 part {
26833 name: "e.swallow.icons"; 26842 name: "e.swallow.icons";
26834 type: SWALLOW; 26843 type: SWALLOW;
@@ -26907,6 +26916,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26907 action: STATE_SET "selected" 0.0; 26916 action: STATE_SET "selected" 0.0;
26908 transition: SINUSOIDAL 0.2; 26917 transition: SINUSOIDAL 0.2;
26909 target: "border"; 26918 target: "border";
26919 target: "border_bg";
26910 } 26920 }
26911 program { name: "unsel"; 26921 program { name: "unsel";
26912 signal: "e,state,unselected"; 26922 signal: "e,state,unselected";
@@ -26914,6 +26924,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26914 action: STATE_SET "default" 0.0; 26924 action: STATE_SET "default" 0.0;
26915 transition: SINUSOIDAL 0.3; 26925 transition: SINUSOIDAL 0.3;
26916 target: "border"; 26926 target: "border";
26927 target: "border_bg";
26917 } 26928 }
26918 program { name: "update"; 26929 program { name: "update";
26919 signal: "e,signal,update"; 26930 signal: "e,signal,update";
@@ -26943,17 +26954,15 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
26943 image: "drop.png" COMP; 26954 image: "drop.png" COMP;
26944 #endif 26955 #endif
26945 } 26956 }
26946
26947 /* offset to main popup */ 26957 /* offset to main popup */
26948 #ifdef DROP_SHADOW 26958 #ifdef DROP_SHADOW
26949 data.item: "offset_y" "-52"; 26959 data.item: "offset_y" "-52";
26950 min: 450 285; 26960 min: 480 315;
26951 #else 26961 #else
26952 data.item: "offset_y" "-2"; 26962 data.item: "offset_y" "-2";
26953 min: 350 235; 26963 min: 380 265;
26954 #endif 26964 #endif
26955 data.item: "shaped" "1"; 26965 data.item: "shaped" "1";
26956
26957 parts { 26966 parts {
26958 #ifdef DROP_SHADOW 26967 #ifdef DROP_SHADOW
26959 part { name: "shadow"; 26968 part { name: "shadow";
@@ -27051,13 +27060,11 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27051 rel2.offset: -1 24; 27060 rel2.offset: -1 24;
27052 } 27061 }
27053 } 27062 }
27054
27055 part { name: "bg"; 27063 part { name: "bg";
27056 description { state: "default" 0.0; 27064 description { state: "default" 0.0;
27057 rel1.to_x: "base"; 27065 rel1.to_x: "base";
27058 rel1.to_y: "input_base"; 27066 rel1.to_y: "input_base";
27059 rel2.to: "base"; 27067 rel2.to: "base";
27060
27061 image { 27068 image {
27062 normal: "base_bg.png"; 27069 normal: "base_bg.png";
27063 border: 2 2 2 2; 27070 border: 2 2 2 2;
@@ -27066,7 +27073,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27066 color: 205 205 205 255; 27073 color: 205 205 205 255;
27067 } 27074 }
27068 } 27075 }
27069
27070 part { name: "bar_base"; 27076 part { name: "bar_base";
27071 type: RECT; 27077 type: RECT;
27072 description { state: "default" 0.0; 27078 description { state: "default" 0.0;
@@ -27128,7 +27134,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27128 state: "default" 0.0; 27134 state: "default" 0.0;
27129 rel1.to: "bar_clip"; 27135 rel1.to: "bar_clip";
27130 rel1.offset: -1 0; 27136 rel1.offset: -1 0;
27131
27132 rel2.to: "bar_clip"; 27137 rel2.to: "bar_clip";
27133 rel2.offset: -1 -1; 27138 rel2.offset: -1 -1;
27134 } 27139 }
@@ -27162,8 +27167,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27162 color: 255 255 255 128; 27167 color: 255 255 255 128;
27163 } 27168 }
27164 } 27169 }
27165
27166
27167 part { name: "input_bg"; 27170 part { name: "input_bg";
27168 clip_to: "input_base"; 27171 clip_to: "input_base";
27169 description { state: "default" 0.0; 27172 description { state: "default" 0.0;
@@ -27250,7 +27253,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27250 visible: 1; 27253 visible: 1;
27251 } 27254 }
27252 } 27255 }
27253
27254 part { name: "list_clip"; 27256 part { name: "list_clip";
27255 type: RECT; 27257 type: RECT;
27256 clip_to: "base"; 27258 clip_to: "base";
@@ -27258,12 +27260,12 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27258 color: 255 255 255 255; 27260 color: 255 255 255 255;
27259 rel1 { 27261 rel1 {
27260 relative: 0.0 0.0; 27262 relative: 0.0 0.0;
27261 offset: 2 2; 27263 offset: 2 0;
27262 to: "base"; 27264 to: "base";
27263 } 27265 }
27264 rel2 { 27266 rel2 {
27265 relative: 1.0 0.0; 27267 relative: 1.0 0.0;
27266 offset: -3 -2; 27268 offset: -3 0;
27267 to_y: "bar_base"; 27269 to_y: "bar_base";
27268 to_x: "base"; 27270 to_x: "base";
27269 } 27271 }
@@ -27322,8 +27324,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27322 middle: 0; 27324 middle: 0;
27323 } 27325 }
27324 fill.smooth : 0; 27326 fill.smooth : 0;
27325 color: 200 200 200 255; 27327 color: 200 200 200 255;
27326
27327 } 27328 }
27328 } 27329 }
27329 part { name: "list_over2"; 27330 part { name: "list_over2";
@@ -27343,8 +27344,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27343 middle: 0; 27344 middle: 0;
27344 } 27345 }
27345 fill.smooth : 0; 27346 fill.smooth : 0;
27346 color: 200 200 200 255; 27347 color: 200 200 200 255;
27347
27348 } 27348 }
27349 } 27349 }
27350 part { name: "box"; 27350 part { name: "box";
@@ -27362,7 +27362,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27362 } 27362 }
27363 fill.smooth : 1; 27363 fill.smooth : 1;
27364 color: 255 255 255 250; 27364 color: 255 255 255 250;
27365
27366 } 27365 }
27367 } 27366 }
27368 } 27367 }
@@ -27422,7 +27421,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27422 } 27421 }
27423 } 27422 }
27424 } 27423 }
27425
27426 27424
27427 group { name: "e/modules/everything/tab_item"; 27425 group { name: "e/modules/everything/tab_item";
27428 images { 27426 images {
@@ -27430,7 +27428,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27430 } 27428 }
27431 min: 70 10; 27429 min: 70 10;
27432 max: 100 10; 27430 max: 100 10;
27433
27434 parts { 27431 parts {
27435 part { name: "label2"; 27432 part { name: "label2";
27436 type: TEXT; 27433 type: TEXT;
@@ -27523,7 +27520,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27523 image: "bt_dis_hilight.png" COMP; 27520 image: "bt_dis_hilight.png" COMP;
27524 } 27521 }
27525 min: 140 28; 27522 min: 140 28;
27526
27527 parts { 27523 parts {
27528 part { name: "list_bg"; 27524 part { name: "list_bg";
27529 type: RECT; 27525 type: RECT;
@@ -27650,7 +27646,6 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27650 relative: 1.0 1.0; 27646 relative: 1.0 1.0;
27651 offset: -3 -2; 27647 offset: -3 -2;
27652 } 27648 }
27653
27654 color: 255 255 255 255; 27649 color: 255 255 255 255;
27655 } 27650 }
27656 } 27651 }
@@ -27765,6 +27760,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27765 } 27760 }
27766 rel2 { 27761 rel2 {
27767 relative: 1.0 1.0; 27762 relative: 1.0 1.0;
27763 offset: -1 -4;
27768 } 27764 }
27769 } 27765 }
27770 } 27766 }
@@ -27817,8 +27813,7 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27817 rel1.relative: 0.6666 0.0; 27813 rel1.relative: 0.6666 0.0;
27818 rel2.relative: 0.9999 1.0; 27814 rel2.relative: 0.9999 1.0;
27819 } 27815 }
27820 } 27816 }
27821
27822 part { name: "e.swallow.icon3"; 27817 part { name: "e.swallow.icon3";
27823 type: SWALLOW; 27818 type: SWALLOW;
27824 description { state: "default" 0.0; 27819 description { state: "default" 0.0;
@@ -27877,3 +27872,622 @@ MIMEBASE("application/x-font-bdf","icon_mime_font_generic.png", ".BDF", 128);
27877 27872
27878 27873
27879 27874
27875/////////////////////////////////////////////////////////////////////////////
27876 /*** WALLPAPER MAIN DIALOG ***/
27877 group { name: "e/modules/everything/thumbview/main/window";
27878 images {
27879 image: "vgrad_dark.png" COMP;
27880 image: "dia_topshad.png" COMP;
27881 image: "dia_botshad.png" COMP;
27882 image: "dia_botshad.png" COMP;
27883 image: "topsh.png" COMP;
27884 image: "wp-bot1.png" COMP;
27885 image: "wp-bot2.png" COMP;
27886 image: "wp-tb1.png" COMP;
27887 image: "wp-tb2.png" COMP;
27888 image: "wp-tb3.png" COMP;
27889 image: "wp-tbs.png" COMP;
27890 image: "big_arrow_up.png" COMP;
27891
27892 image: "busy-1.png" COMP;
27893 image: "busy-2.png" COMP;
27894 image: "busy-3.png" COMP;
27895 image: "busy-4.png" COMP;
27896 image: "busy-5.png" COMP;
27897 image: "busy-6.png" COMP;
27898 image: "busy-7.png" COMP;
27899 image: "busy-8.png" COMP;
27900 image: "busy-9.png" COMP;
27901 }
27902 parts {
27903 part { name: "base";
27904 mouse_events: 0;
27905 description { state: "default" 0.0;
27906 color_class: "dialog_base";
27907 image.normal: "vgrad_dark.png";
27908 rel1 {
27909 relative: 0.0 0.0;
27910 offset: 0 -3;
27911 }
27912 rel2 {
27913 relative: 1.0 1.0;
27914 offset: -1 6;
27915 /* to_y: "bot1"; */
27916 }
27917 fill {
27918 smooth: 0;
27919 /* size {
27920 * relative: 0.0 1.0;
27921 * offset: 64 0;
27922 * } */
27923 }
27924 }
27925 }
27926 part { name: "e.swallow.preview";
27927 type: SWALLOW;
27928 description { state: "default" 0.0;
27929 }
27930 }
27931 part { name: "events";
27932 type: RECT;
27933 description { state: "default" 0.0;
27934 color: 0 0 0 0;
27935 }
27936 }
27937 part { name: "e.swallow.list";
27938 type: SWALLOW;
27939 description { state: "default" 0.0;
27940 rel1 {
27941 relative: 0.0 0.0;
27942 offset: 6 1;
27943 }
27944 rel2 {
27945 relative: 1.0 1.0;
27946 offset: -3 -3;
27947 /* to_y: "bot1"; */
27948 }
27949 }
27950 }
27951 part { name: "cover";
27952 type: RECT;
27953 description { state: "default" 0.0;
27954 color: 0 0 0 0;
27955 visible: 0;
27956 }
27957 description { state: "out" 0.0;
27958 inherit: "default" 0.0;
27959 visible: 1;
27960 }
27961 }
27962 part { name: "shadow2";
27963 mouse_events: 0;
27964 description { state: "default" 0.0;
27965 rel1.relative: 0.0 1.0;
27966 rel1.offset: 0 -4;
27967 image.normal: "dia_botshad.png";
27968 fill {
27969 smooth: 0;
27970 size {
27971 relative: 0.0 1.0;
27972 offset: 64 0;
27973 }
27974 }
27975 }
27976 }
27977 part { name: "busy_clip";
27978 type: RECT;
27979 description { state: "default" 0.0;
27980 visible: 0;
27981 color: 255 255 255 0;
27982 }
27983 description { state: "visible" 0.0;
27984 visible: 1;
27985 color: 255 255 255 255;
27986 }
27987 }
27988 part { name: "busy";
27989 mouse_events: 0;
27990 clip_to: "busy_clip";
27991 description { state: "default" 0.0;
27992 min: 32 32;
27993 max: 32 32;
27994 aspect: 1.0 1.0;
27995 aspect_preference: BOTH;
27996 rel1 {
27997 relative: 0.5 0.5;
27998 offset: 0 0;
27999 }
28000 rel2 {
28001 relative: 0.5 0.5;
28002 offset: -1 1;
28003 }
28004 image {
28005 normal: "busy-9.png";
28006 tween: "busy-1.png";
28007 tween: "busy-2.png";
28008 tween: "busy-3.png";
28009 tween: "busy-4.png";
28010 tween: "busy-5.png";
28011 tween: "busy-6.png";
28012 tween: "busy-7.png";
28013 tween: "busy-8.png";
28014 }
28015 }
28016 }
28017 }
28018 programs {
28019 program { name: "busy1";
28020 signal: "e,state,busy,on";
28021 source: "e";
28022 action: STATE_SET "visible" 0.0;
28023 transition: LINEAR 1.0;
28024 target: "busy_clip";
28025 }
28026 program { name: "busy_anim";
28027 signal: "e,state,busy,on";
28028 source: "e";
28029 action: STATE_SET "default" 0.0;
28030 transition: LINEAR 0.3333;
28031 target: "busy";
28032 after: "busy_anim";
28033 }
28034 program { name: "busy2";
28035 signal: "e,state,busy,off";
28036 source: "e";
28037 action: STATE_SET "default" 0.0;
28038 transition: LINEAR 1.0;
28039 target: "busy_clip";
28040 after: "busy3";
28041 }
28042 program { name: "busy3";
28043 action: ACTION_STOP;
28044 target: "busy_anim";
28045 }
28046 }
28047 }
28048
28049 group { name: "e/modules/everything/thumbview/main/mini";
28050 images {
28051 image: "e17_mini_button_shadow2.png" COMP;
28052 image: "everything_item_bg.png" COMP;
28053 }
28054 parts {
28055 part { name: "bg";
28056 mouse_events: 0;
28057 description { state: "default" 0.0;
28058 /* visible: 0; */
28059 rel1 {
28060 to: "base";
28061 offset: -1 -3;
28062 }
28063 rel2 {
28064 to: "base";
28065 offset: 0 2;
28066 }
28067 fill.smooth: 0;
28068 image {
28069 normal: "everything_item_bg.png";
28070 border: 5 5 5 5;
28071 }
28072 color: 255 255 255 32;
28073 }
28074 description { state: "visible" 0.0;
28075 inherit: "default" 0.0;
28076 color: 255 255 255 128;
28077 }
28078 }
28079 part { name: "base";
28080 mouse_events: 0;
28081 type: RECT;
28082 description { state: "default" 0.0;
28083 visible: 0;
28084 rel1 {
28085 relative: 0.0 0.0;
28086 offset: 0 4;
28087 }
28088 rel2 {
28089 relative: 1.0 1.0;
28090 offset: -5 -5;
28091 }
28092 color: 255 255 255 0;
28093 }
28094 description { state: "visible" 0.0;
28095 inherit: "default" 0.0;
28096 visible: 1;
28097 color: 255 255 255 255;
28098 }
28099 }
28100 part { name: "e.swallow.content";
28101 clip_to: "base";
28102 type: SWALLOW;
28103 description { state: "default" 0.0;
28104 rel1 {
28105 to: "base";
28106 relative: 0.0 0.0;
28107 offset: 2 0;
28108 }
28109 rel2 {
28110 to: "base";
28111 relative: 1.0 1.0;
28112 offset: -3 -11;
28113 }
28114 }
28115 }
28116 part { name: "e.swallow.icon";
28117 clip_to: "base";
28118 type: SWALLOW;
28119 description { state: "default" 0.0;
28120 rel1 {
28121 to: "base";
28122 relative: 0.0 0.0;
28123 offset: 5 3;
28124 }
28125 rel2 {
28126 to: "base";
28127 relative: 1.0 1.0;
28128 offset: -6 -13;
28129 }
28130 }
28131 }
28132 part { name: "e.text.label";
28133 type: TEXT;
28134 clip_to: "base";
28135 effect: SOFT_SHADOW;
28136 mouse_events: 0;
28137 scale: 1;
28138 description {
28139 state: "default" 0.0;
28140 rel1 {
28141 offset: 2 -12;
28142 relative: 0.0 1.0;
28143 }
28144 rel2.offset: -2 -4;
28145 color: 210 210 210 255;
28146 color3: 0 0 0 0;
28147 text {
28148 font: "Sans";
28149 size: 10;
28150 min: 0 1;
28151 align: 0.5 0.0;
28152 }
28153 }
28154 }
28155
28156 part { name: "events";
28157 type: RECT;
28158 description { state: "default" 0.0;
28159 color: 0 0 0 0;
28160 visible: 0;
28161 }
28162 description { state: "visible" 0.0;
28163 inherit: "default" 0.0;
28164 visible: 1;
28165 }
28166 }
28167 }
28168 programs {
28169 program { name: "sel";
28170 signal: "e,state,selected";
28171 source: "e";
28172 action: STATE_SET "visible" 0.0;
28173 transition: DECELERATE 0.1;
28174 target: "bg";
28175 }
28176 program { name: "unsel";
28177 signal: "e,state,unselected";
28178 source: "e";
28179 action: STATE_SET "default" 0.0;
28180 transition: SINUSOIDAL 0.2;
28181 target: "bg";
28182 }
28183 program { name: "thumb_gen";
28184 signal: "e,action,thumb,gen";
28185 source: "e";
28186 action: STATE_SET "default" 0.0;
28187 transition: DECELERATE 0.0;
28188 target: "base";
28189 after: "thumb_ungen";
28190 }
28191 program { name: "thumb_ungen";
28192 signal: "e,action,thumb,ungen";
28193 source: "e";
28194 action: STATE_SET "visible" 0.0;
28195 transition: SINUSOIDAL 0.15;
28196 target: "base";
28197 }
28198 program { name: "thumb_show_delayed";
28199 signal: "e,action,thumb,show_delayed";
28200 source: "e";
28201 action: STATE_SET "default" 0.2;
28202 target: "base";
28203 after: "thumb_show_delayed2";
28204 }
28205 program { name: "thumb_show_delayed2";
28206 action: STATE_SET "visible" 0.0;
28207 transition: SINUSOIDAL 0.6;
28208 target: "base";
28209 }
28210 program { name: "thumb_show";
28211 signal: "e,action,thumb,show";
28212 source: "e";
28213 action: STATE_SET "visible" 0.0;
28214 transition: SINUSOIDAL 0.1;
28215 target: "base";
28216 }
28217 }
28218 }
28219
28220 group { name: "e/modules/everything/thumbview/main/scrollframe";
28221 images {
28222 image: "arrow_up.png" COMP;
28223 image: "arrow_down.png" COMP;
28224 image: "bt_sm_base1.png" COMP;
28225 image: "bt_sm_base2.png" COMP;
28226 image: "bt_sm_shine.png" COMP;
28227 image: "bt_sm_hilight.png" COMP;
28228 image: "sb_runnerv.png" COMP;
28229 }
28230 parts {
28231// part { name: "clipper";
28232// type: RECT;
28233// mouse_events: 0;
28234// description { state: "default" 0.0;
28235// }
28236// }
28237 part { name: "e.swallow.content";
28238// clip_to: "clipper";
28239 type: SWALLOW;
28240 description { state: "default" 0.0;
28241 rel1.offset: 0 0;
28242 rel2 {
28243 relative: 0.0 1.0;
28244 offset: 2 -1;
28245 to_x: "sb_vbar";
28246 }
28247 }
28248 }
28249 part { name: "sb_vbar";
28250 type: RECT;
28251 mouse_events: 0;
28252 scale: 1;
28253 description { state: "default" 0.0;
28254 min: 7 17;
28255 align: 1.0 0.0;
28256 rel1 {
28257 relative: 1.0 0.0;
28258 offset: -1 0;
28259 }
28260 rel2 {
28261 relative: 1.0 1.0;
28262 offset: -1 -1;
28263 }
28264 }
28265 description { state: "hidden" 0.0;
28266 visible: 0;
28267 max: 0 99999;
28268 rel1 {
28269 relative: 1.0 0.0;
28270 offset: -1 0;
28271 }
28272 rel2 {
28273 relative: 1.0 1.0;
28274 offset: -1 -1;
28275 }
28276 }
28277 }
28278 part { name: "sb_vbar_base";
28279 type: RECT;
28280 clip_to: "sb_vbar";
28281 mouse_events: 1;
28282 description { state: "default" 0.0;
28283 color: 0 0 0 0;
28284 rel1 {
28285 relative: 0.0 1.0;
28286 offset: 0 -1;
28287 to: "sb_vbar_a1";
28288 }
28289 rel2 {
28290 relative: 1.0 0.0;
28291 offset: -1 0;
28292 to: "sb_vbar_a2";
28293 }
28294 }
28295 }
28296 part { name: "sb_vbar_runner";
28297 clip_to: "sb_vbar";
28298 mouse_events: 0;
28299 description { state: "default" 0.0;
28300 max: 3 99999;
28301 rel1.to: "sb_vbar_base";
28302 rel1.offset: -2 0;
28303 rel2.to: "sb_vbar_base";
28304 image {
28305 normal: "sb_runnerv.png";
28306 border: 0 0 4 4;
28307 }
28308 fill.smooth: 0;
28309 }
28310 }
28311 part { name: "sb_vbar_p1";
28312 type: RECT;
28313 clip_to: "sb_vbar";
28314 mouse_events: 1;
28315 description { state: "default" 0.0;
28316 color: 0 0 0 0;
28317 rel1 {
28318 relative: 0.0 1.0;
28319 to: "sb_vbar_a1";
28320 }
28321 rel2 {
28322 relative: 1.0 0.0;
28323 to: "e.dragable.vbar";
28324 }
28325 }
28326 }
28327 part { name: "sb_vbar_p2";
28328 type: RECT;
28329 clip_to: "sb_vbar";
28330 mouse_events: 1;
28331 description { state: "default" 0.0;
28332 color: 0 0 0 0;
28333 rel1 {
28334 relative: 0.0 1.0;
28335 to: "e.dragable.vbar";
28336 }
28337 rel2 {
28338 relative: 1.0 0.0;
28339 to: "sb_vbar_a2";
28340 }
28341 }
28342 }
28343 part { name: "e.dragable.vbar";
28344 clip_to: "sb_vbar";
28345 mouse_events: 1;
28346 scale: 1;
28347 dragable {
28348 x: 0 0 0;
28349 y: 1 1 0;
28350 confine: "sb_vbar_base";
28351 }
28352 description { state: "default" 0.0;
28353 min: 7 17;
28354 rel1 {
28355 relative: 0.5 0.5;
28356 offset: -1 0;
28357 to: "sb_vbar_base";
28358 }
28359 rel2 {
28360 relative: 0.5 0.5;
28361 offset: -1 0;
28362 to: "sb_vbar_base";
28363 }
28364 image {
28365 normal: "bt_sm_base2.png";
28366 border: 6 6 6 6;
28367 }
28368 }
28369 description { state: "clicked" 0.0;
28370 inherit: "default" 0.0;
28371 image.normal: "bt_sm_base1.png";
28372 }
28373 }
28374 part { name: "sb_vbar_over1";
28375 clip_to: "sb_vbar";
28376 mouse_events: 0;
28377 description { state: "default" 0.0;
28378 rel1.to: "e.dragable.vbar";
28379 rel2.relative: 1.0 0.5;
28380 rel2.to: "e.dragable.vbar";
28381 image {
28382 normal: "bt_sm_hilight.png";
28383 border: 6 6 6 0;
28384 }
28385 }
28386 }
28387 part { name: "sb_vbar_over2";
28388 clip_to: "sb_vbar";
28389 mouse_events: 0;
28390 description { state: "default" 0.0;
28391 rel1.to: "e.dragable.vbar";
28392 rel2.to: "e.dragable.vbar";
28393 image {
28394 normal: "bt_sm_shine.png";
28395 border: 6 6 6 0;
28396 }
28397 }
28398 }
28399
28400 part { name: "sb_vbar_a1";
28401 type: RECT;
28402 clip_to: "sb_vbar";
28403 mouse_events: 1;
28404 description { state: "default" 0.0;
28405 min: 7 17;
28406 align: 0.5 0.0;
28407 /* aspect: 1.0 1.0; */
28408 aspect_preference: HORIZONTAL;
28409 color: 0 0 0 0;
28410 rel1 { to: "sb_vbar";
28411 relative: 0.0 0.0;
28412 offset: 0 0;
28413 }
28414 rel2 { to: "sb_vbar";
28415 relative: 1.0 0.0;
28416 offset: -1 0;
28417 }
28418 }
28419 }
28420 part { name: "sb_vbar_a2";
28421 type: RECT;
28422 clip_to: "sb_vbar";
28423 mouse_events: 1;
28424 description { state: "default" 0.0;
28425 min: 7 17;
28426 align: 0.5 1.0;
28427 /* aspect: 1.0 1.0; */
28428 aspect_preference: HORIZONTAL;
28429 color: 0 0 0 0;
28430 rel1 {
28431 to: "sb_vbar";
28432 relative: 0.0 1.0;
28433 offset: 0 0;
28434 }
28435 rel2 {
28436 to: "sb_vbar";
28437 relative: 1.0 1.0;
28438 offset: -1 0;
28439 }
28440 }
28441 }
28442 }
28443 programs {
28444 program { name: "sb_vbar_show";
28445 signal: "e,action,show,vbar";
28446 source: "e";
28447 action: STATE_SET "default" 0.0;
28448 target: "sb_vbar";
28449 }
28450 program { name: "sb_vbar_hide";
28451 signal: "e,action,hide,vbar";
28452 source: "e";
28453 action: STATE_SET "hidden" 0.0;
28454 target: "sb_vbar";
28455 }
28456 program { name: "sb_vbar_a1_down2";
28457 signal: "mouse,down,1";
28458 source: "sb_vbar_a1";
28459 action: DRAG_VAL_STEP 0.0 -1.0;
28460 target: "e.dragable.vbar";
28461 }
28462 program { name: "sb_vbar_a2_down2";
28463 signal: "mouse,down,1";
28464 source: "sb_vbar_a2";
28465 action: DRAG_VAL_STEP 0.0 1.0;
28466 target: "e.dragable.vbar";
28467 }
28468 program { name: "sb_vbar_p1_down";
28469 signal: "mouse,down,1";
28470 source: "sb_vbar_p1";
28471 action: DRAG_VAL_PAGE 0.0 -1.0;
28472 target: "e.dragable.vbar";
28473 }
28474 program { name: "sb_vbar_p2_down";
28475 signal: "mouse,down,1";
28476 source: "sb_vbar_p2";
28477 action: DRAG_VAL_PAGE 0.0 1.0;
28478 target: "e.dragable.vbar";
28479 }
28480 program { name: "sb_vbar_down";
28481 signal: "mouse,down,1";
28482 source: "e.dragable.vbar";
28483 action: STATE_SET "clicked" 0.0;
28484 target: "e.dragable.vbar";
28485 }
28486 program { name: "sb_vbar_up";
28487 signal: "mouse,up,1";
28488 source: "e.dragable.vbar";
28489 action: STATE_SET "default" 0.0;
28490 target: "e.dragable.vbar";
28491 }
28492 }
28493 }
diff --git a/data/themes/images/everything_border.png b/data/themes/images/everything_border.png
new file mode 100644
index 0000000..d2b2819
--- /dev/null
+++ b/data/themes/images/everything_border.png
Binary files differ
diff --git a/data/themes/images/everything_box.png b/data/themes/images/everything_box.png
index d023916..f2b4990 100644
--- a/data/themes/images/everything_box.png
+++ b/data/themes/images/everything_box.png
Binary files differ
diff --git a/data/themes/images/everything_item_bg.png b/data/themes/images/everything_item_bg.png
new file mode 100644
index 0000000..1bd167b
--- /dev/null
+++ b/data/themes/images/everything_item_bg.png
Binary files differ
diff --git a/src/modules/everything/Makefile.am b/src/modules/everything/Makefile.am
index dd323d8..49a25e6 100644
--- a/src/modules/everything/Makefile.am
+++ b/src/modules/everything/Makefile.am
@@ -1,6 +1,8 @@
1MAINTAINERCLEANFILES = Makefile.in everything.pc 1MAINTAINERCLEANFILES = Makefile.in everything.pc
2MODULE = everything 2MODULE = everything
3 3
4SUBDIRS = sources actions views
5
4# data files for the module 6# data files for the module
5filesdir = $(libdir)/enlightenment/modules/$(MODULE) 7filesdir = $(libdir)/enlightenment/modules/$(MODULE)
6files_DATA = \ 8files_DATA = \
@@ -29,7 +31,8 @@ module_la_SOURCES = $(EVRYHEADERS) \
29 evry.c \ 31 evry.c \
30 evry_config.c \ 32 evry_config.c \
31 evry_plug_aggregator.c \ 33 evry_plug_aggregator.c \
32 evry_plug_actions.c 34 evry_plug_actions.c \
35 evry_view_plugin_tabs.c
33 36
34 37
35module_la_LIBADD = @e_libs@ @dlopen_libs@ 38module_la_LIBADD = @e_libs@ @dlopen_libs@
@@ -42,99 +45,6 @@ installed_headers_DATA = $(EVRYHEADERS)
42pkgconfigdir = $(libdir)/pkgconfig 45pkgconfigdir = $(libdir)/pkgconfig
43pkgconfig_DATA = everything.pc 46pkgconfig_DATA = everything.pc
44 47
45plugindir = $(libdir)/enlightenment/everything_plugins/core/$(MODULE_ARCH)
46
47evry_plug_appsdir = $(plugindir)
48evry_plug_apps_LTLIBRARIES = evry_plug_apps.la
49evry_plug_apps_la_SOURCES = evry_plug_apps.c
50evry_plug_apps_la_LIBADD = @e_libs@
51evry_plug_apps_la_LDFLAGS = -no-undefined -module -avoid-version
52evry_plug_apps_la_LIBTOOLFLAGS = --tag=disable-static
53
54evry_plug_borderdir = $(plugindir)
55evry_plug_border_LTLIBRARIES = evry_plug_border.la
56evry_plug_border_la_SOURCES = evry_plug_border.c
57evry_plug_border_la_LIBADD = @e_libs@
58evry_plug_border_la_LDFLAGS = -no-undefined -module -avoid-version
59evry_plug_border_la_LIBTOOLFLAGS = --tag=disable-static
60
61evry_plug_border_actdir = $(plugindir)
62evry_plug_border_act_LTLIBRARIES = evry_plug_border_act.la
63evry_plug_border_act_la_SOURCES = evry_plug_border_act.c
64evry_plug_border_act_la_LIBADD = @e_libs@
65evry_plug_border_act_la_LDFLAGS = -no-undefined -module -avoid-version
66evry_plug_border_act_la_LIBTOOLFLAGS = --tag=disable-static
67
68evry_plug_dir_browsedir = $(plugindir)
69evry_plug_dir_browse_LTLIBRARIES = evry_plug_dir_browse.la
70evry_plug_dir_browse_la_SOURCES = evry_plug_dir_browse.c
71evry_plug_dir_browse_la_LIBADD = @e_libs@
72evry_plug_dir_browse_la_LDFLAGS = -no-undefined -module -avoid-version
73evry_plug_dir_browse_la_LIBTOOLFLAGS = --tag=disable-static
74
75evry_plug_trackerdir = $(plugindir)
76evry_plug_tracker_LTLIBRARIES = evry_plug_tracker.la
77evry_plug_tracker_la_SOURCES = evry_plug_tracker.c
78evry_plug_tracker_la_LIBADD = @e_libs@
79evry_plug_tracker_la_LDFLAGS = -no-undefined -module -avoid-version
80evry_plug_tracker_la_LIBTOOLFLAGS = --tag=disable-static
81
82evry_plug_calcdir = $(plugindir)
83evry_plug_calc_LTLIBRARIES = evry_plug_calc.la
84evry_plug_calc_la_SOURCES = evry_plug_calc.c
85evry_plug_calc_la_LIBADD = @e_libs@
86evry_plug_calc_la_LDFLAGS = -no-undefined -module -avoid-version
87evry_plug_calc_la_LIBTOOLFLAGS = --tag=disable-static
88
89evry_plug_configdir = $(plugindir)
90evry_plug_config_LTLIBRARIES = evry_plug_config.la
91evry_plug_config_la_SOURCES = evry_plug_config.c
92evry_plug_config_la_LIBADD = @e_libs@
93evry_plug_config_la_LDFLAGS = -no-undefined -module -avoid-version
94evry_plug_config_la_LIBTOOLFLAGS = --tag=disable-static
95
96evry_plug_aspelldir = $(plugindir)
97evry_plug_aspell_LTLIBRARIES = evry_plug_aspell.la
98evry_plug_aspell_la_SOURCES = evry_plug_aspell.c
99evry_plug_aspell_la_LIBADD = @e_libs@
100evry_plug_aspell_la_LDFLAGS = -no-undefined -module -avoid-version
101evry_plug_aspell_la_LIBTOOLFLAGS = --tag=disable-static
102
103evry_plug_clipboarddir = $(plugindir)
104evry_plug_clipboard_LTLIBRARIES = evry_plug_clipboard.la
105evry_plug_clipboard_la_SOURCES = evry_plug_clipboard.c
106evry_plug_clipboard_la_LIBADD = @e_libs@
107evry_plug_clipboard_la_LDFLAGS = -no-undefined -module -avoid-version
108evry_plug_clipboard_la_LIBTOOLFLAGS = --tag=disable-static
109
110evry_plug_previewdir = $(plugindir)
111evry_plug_preview_LTLIBRARIES = evry_plug_preview.la
112evry_plug_preview_la_SOURCES = evry_plug_preview.c
113evry_plug_preview_la_LIBADD = @e_libs@
114evry_plug_preview_la_LDFLAGS = -no-undefined -module -avoid-version
115evry_plug_preview_la_LIBTOOLFLAGS = --tag=disable-static
116
117evry_plug_view_listdir = $(plugindir)
118evry_plug_view_list_LTLIBRARIES = evry_plug_view_list.la
119evry_plug_view_list_la_SOURCES = evry_plug_view_list.c
120evry_plug_view_list_la_LIBADD = @e_libs@
121evry_plug_view_list_la_LDFLAGS = -no-undefined -module -avoid-version
122evry_plug_view_list_la_LIBTOOLFLAGS = --tag=disable-static
123
124evry_plug_view_helpdir = $(plugindir)
125evry_plug_view_help_LTLIBRARIES = evry_plug_view_help.la
126evry_plug_view_help_la_SOURCES = evry_plug_view_help.c
127evry_plug_view_help_la_LIBADD = @e_libs@
128evry_plug_view_help_la_LDFLAGS = -no-undefined -module -avoid-version
129evry_plug_view_help_la_LIBTOOLFLAGS = --tag=disable-static
130
131evry_plug_wallpaperdir = $(plugindir)
132evry_plug_wallpaper_LTLIBRARIES = evry_plug_wallpaper.la
133evry_plug_wallpaper_la_SOURCES = evry_plug_wallpaper.c
134evry_plug_wallpaper_la_LIBADD = @e_libs@
135evry_plug_wallpaper_la_LDFLAGS = -no-undefined -module -avoid-version
136evry_plug_wallpaper_la_LIBTOOLFLAGS = --tag=disable-static
137
138uninstall: 48uninstall:
139 rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE) 49 rm -rf $(DESTDIR)$(libdir)/enlightenment/modules/$(MODULE)
140 50 rm -rf $(DESTDIR)$(libdir)/enlightenment/everything_plugins/core/
diff --git a/src/modules/everything/evry_plug_border_act.c b/src/modules/everything/actions/evry_plug_border_act.c
index 94b252f..94b252f 100644
--- a/src/modules/everything/evry_plug_border_act.c
+++ b/src/modules/everything/actions/evry_plug_border_act.c
diff --git a/src/modules/everything/evry_plug_clipboard.c b/src/modules/everything/actions/evry_plug_clipboard.c
index 656e283..656e283 100644
--- a/src/modules/everything/evry_plug_clipboard.c
+++ b/src/modules/everything/actions/evry_plug_clipboard.c
diff --git a/src/modules/everything/evry_plug_wallpaper.c b/src/modules/everything/actions/evry_plug_wallpaper.c
index ac823e8..ac823e8 100644
--- a/src/modules/everything/evry_plug_wallpaper.c
+++ b/src/modules/everything/actions/evry_plug_wallpaper.c
diff --git a/src/modules/everything/e_mod_main.h b/src/modules/everything/e_mod_main.h
index 30711fe..1deeb9b 100644
--- a/src/modules/everything/e_mod_main.h
+++ b/src/modules/everything/e_mod_main.h
@@ -6,6 +6,7 @@
6 6
7typedef struct _Config Config; 7typedef struct _Config Config;
8typedef struct _Evry_Selector Evry_Selector; 8typedef struct _Evry_Selector Evry_Selector;
9typedef struct _Tab_View Tab_View;
9 10
10struct _Config 11struct _Config
11{ 12{
@@ -57,8 +58,26 @@ struct _Evry_Selector
57 58
58 /* all plugins that belong to this selector*/ 59 /* all plugins that belong to this selector*/
59 Eina_List *plugins; 60 Eina_List *plugins;
61
62 Evry_View *view;
60}; 63};
61 64
65struct _Tab_View
66{
67 Evas *evas;
68 const Evry_State *state;
69
70 Evas_Object *o_tabs;
71 Eina_List *tabs;
72
73 void (*update) (Tab_View *tv);
74 void (*clear) (Tab_View *tv);
75 int (*key_down) (Tab_View *tv, const Ecore_Event_Key *ev);
76
77};
78
79
80
62EAPI extern E_Module_Api e_modapi; 81EAPI extern E_Module_Api e_modapi;
63 82
64EAPI void *e_modapi_init (E_Module *m); 83EAPI void *e_modapi_init (E_Module *m);
@@ -77,6 +96,9 @@ void evry_plug_aggregator_free(Evry_Plugin *plugin);
77Evry_Plugin *evry_plug_actions_new(void); 96Evry_Plugin *evry_plug_actions_new(void);
78void evry_plug_actions_free(Evry_Plugin *plugin); 97void evry_plug_actions_free(Evry_Plugin *plugin);
79 98
99Tab_View *evry_tab_view_new(const Evry_State *s, Evas *e);
100void evry_tab_view_free(Tab_View *v);
101
80extern Config *evry_conf; 102extern Config *evry_conf;
81extern Evry_Selector **selectors; 103extern Evry_Selector **selectors;
82 104
diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c
index f96c296..5989430 100644
--- a/src/modules/everything/evry.c
+++ b/src/modules/everything/evry.c
@@ -10,7 +10,7 @@
10 */ 10 */
11#define INPUTLEN 40 11#define INPUTLEN 40
12#define MATCH_LAG 0.33 12#define MATCH_LAG 0.33
13#define MAX_FUZZ 150 13#define MAX_FUZZ 100
14#define MAX_WORDS 5 14#define MAX_WORDS 5
15 15
16 16
@@ -40,7 +40,7 @@ static void _evry_matches_update(Evry_Selector *sel);
40static void _evry_plugin_action(Evry_Selector *sel, int finished); 40static void _evry_plugin_action(Evry_Selector *sel, int finished);
41static void _evry_plugin_select(Evry_State *s, Evry_Plugin *p); 41static void _evry_plugin_select(Evry_State *s, Evry_Plugin *p);
42static void _evry_plugin_list_insert(Evry_State *s, Evry_Plugin *p); 42static void _evry_plugin_list_insert(Evry_State *s, Evry_Plugin *p);
43static void _evry_backspace(Evry_State *s); 43static int _evry_backspace(Evry_State *s);
44static void _evry_update(Evry_State *s, int fetch); 44static void _evry_update(Evry_State *s, int fetch);
45static void _evry_update_text_label(Evry_State *s); 45static void _evry_update_text_label(Evry_State *s);
46static int _evry_clear(Evry_State *s); 46static int _evry_clear(Evry_State *s);
@@ -59,7 +59,7 @@ static int _evry_selector_subjects_get(const char *plugin_name);
59static int _evry_selector_actions_get(Evry_Item *it); 59static int _evry_selector_actions_get(Evry_Item *it);
60static int _evry_selector_objects_get(Evry_Action *act); 60static int _evry_selector_objects_get(Evry_Action *act);
61 61
62static void _evry_browse_item(Evry_Selector *sel); 62static int _evry_browse_item(Evry_Selector *sel);
63static void _evry_browse_back(Evry_Selector *sel); 63static void _evry_browse_back(Evry_Selector *sel);
64 64
65static Evry_Window *_evry_window_new(E_Zone *zone); 65static Evry_Window *_evry_window_new(E_Zone *zone);
@@ -245,7 +245,7 @@ evry_clear_input(void)
245} 245}
246 246
247 247
248/* static int item_cnt = 0; */ 248static int item_cnt = 0;
249 249
250EAPI Evry_Item * 250EAPI Evry_Item *
251evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, void (*cb_free) (Evry_Item *item)) 251evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, void (*cb_free) (Evry_Item *item))
@@ -267,7 +267,7 @@ evry_item_new(Evry_Item *base, Evry_Plugin *p, const char *label, void (*cb_free
267 267
268 it->ref = 1; 268 it->ref = 1;
269 269
270 /* item_cnt++; */ 270 item_cnt++;
271 271
272 return it; 272 return it;
273} 273}
@@ -283,13 +283,10 @@ evry_item_free(Evry_Item *it)
283 283
284 /* printf("%d, %d\t free: %s\n", 284 /* printf("%d, %d\t free: %s\n",
285 * it->ref, item_cnt - 1, 285 * it->ref, item_cnt - 1,
286 * it->label); 286 * it->label); */
287 * item_cnt--; */ 287 item_cnt--;
288 288
289 if (it->label) eina_stringshare_del(it->label); 289 if (it->label) eina_stringshare_del(it->label);
290 /* if (it->uri) eina_stringshare_del(it->uri);
291 * if (it->mime) eina_stringshare_del(it->mime); */
292
293 if (it->o_bg) evas_object_del(it->o_bg); 290 if (it->o_bg) evas_object_del(it->o_bg);
294 if (it->o_icon) evas_object_del(it->o_icon); 291 if (it->o_icon) evas_object_del(it->o_icon);
295 292
@@ -423,7 +420,8 @@ evry_fuzzy_match(const char *str, const char *match)
423 unsigned int m_num = 0; 420 unsigned int m_num = 0;
424 unsigned int m_cnt = 0; 421 unsigned int m_cnt = 0;
425 unsigned int m_min[MAX_WORDS]; 422 unsigned int m_min[MAX_WORDS];
426 423 unsigned int m_len = 0;
424
427 if (!match || !str) return 0; 425 if (!match || !str) return 0;
428 426
429 /* remove white spaces at the beginning */ 427 /* remove white spaces at the beginning */
@@ -440,6 +438,11 @@ evry_fuzzy_match(const char *str, const char *match)
440 for (m = match; ip && (*m != 0); m++) 438 for (m = match; ip && (*m != 0); m++)
441 if (ip && ispunct(*m)) ip = 0; 439 if (ip && ispunct(*m)) ip = 0;
442 440
441 m_len = strlen(match);
442
443 /* with less than 3 chars match must be a prefix */
444 if (m_len < 3) m_len = 0;
445
443 next = str; 446 next = str;
444 m = match; 447 m = match;
445 448
@@ -489,11 +492,11 @@ evry_fuzzy_match(const char *str, const char *match)
489 else 492 else
490 offset += 3; 493 offset += 3;
491 494
492 if (offset < 10) 495 if (offset <= m_len * 3)
493 continue; 496 continue;
494 } 497 }
495 498
496 if (min < MAX_FUZZ && offset < 10) 499 if (min < MAX_FUZZ && offset <= m_len * 3)
497 { 500 {
498 /* first offset of match in word */ 501 /* first offset of match in word */
499 if (!first) 502 if (!first)
@@ -1087,24 +1090,25 @@ _evry_state_pop(Evry_Selector *sel)
1087 sel->state = NULL; 1090 sel->state = NULL;
1088} 1091}
1089 1092
1090static void 1093static int
1091_evry_browse_item(Evry_Selector *sel) 1094_evry_browse_item(Evry_Selector *sel)
1092{ 1095{
1093 Evry_State *s = sel->state; 1096 Evry_State *s = sel->state;
1094 Evry_Item *it; 1097 Evry_Item *it;
1095 Eina_List *l, *plugins = NULL; 1098 Eina_List *l, *plugins = NULL;
1096 Evry_Plugin *p, *plugin; 1099 Evry_Plugin *p, *plugin;
1100 Evry_View *view = NULL;
1097 const char *type_out; 1101 const char *type_out;
1098 1102
1099 it = s->sel_item; 1103 it = s->sel_item;
1100 1104
1101 if (!it || !it->browseable) 1105 if (!it || !it->browseable)
1102 return; 1106 return 0;
1103 1107
1104 type_out = it->plugin->type_out; 1108 type_out = it->plugin->type_out;
1105 1109
1106 if (!type_out) 1110 if (!type_out)
1107 return; 1111 return 1;
1108 1112
1109 if (it->plugin->begin && 1113 if (it->plugin->begin &&
1110 (p = it->plugin->begin(it->plugin, it))) 1114 (p = it->plugin->begin(it->plugin, it)))
@@ -1126,13 +1130,32 @@ _evry_browse_item(Evry_Selector *sel)
1126 } 1130 }
1127 } 1131 }
1128 1132
1129 if (!plugins) return; 1133 if (!plugins) return 1;
1130 _evry_view_hide(s->view); 1134
1135 if (s->view)
1136 {
1137 _evry_view_hide(s->view);
1138 view = s->view->id;
1139 }
1140
1131 _evry_state_new(sel, plugins); 1141 _evry_state_new(sel, plugins);
1132 _evry_matches_update(sel); 1142 _evry_matches_update(sel);
1133 _evry_selector_update(sel); 1143 _evry_selector_update(sel);
1134 _evry_list_win_update(sel->state); 1144 s = sel->state;
1145
1146 if (view && list->visible && s)
1147 {
1148 s->view = view->create(view, s, list->o_main);
1149 if (s->view)
1150 {
1151 _evry_view_show(s->view);
1152 s->view->update(s->view);
1153 }
1154 }
1155
1135 _evry_update_text_label(sel->state); 1156 _evry_update_text_label(sel->state);
1157
1158 return 1;
1136} 1159}
1137 1160
1138static void 1161static void
@@ -1281,15 +1304,18 @@ _evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
1281 { 1304 {
1282 if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) 1305 if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT)
1283 _evry_plugin_action(selector, 0); 1306 _evry_plugin_action(selector, 0);
1284 else 1307 else if (!_evry_browse_item(selector))
1285 _evry_plugin_action(selector, 1); 1308 _evry_plugin_action(selector, 1);
1286 } 1309 }
1287 else if (!strcmp(key, "Escape")) 1310 else if (!strcmp(key, "Escape"))
1288 evry_hide(); 1311 evry_hide();
1289 else if (!strcmp(key, "Tab")) 1312 else if (!strcmp(key, "Tab"))
1290 _evry_selectors_switch(); 1313 _evry_selectors_switch();
1291 else if (!strcmp(key, "BackSpace")) 1314 else if (!strcmp(key, "BackSpace"))
1292 _evry_backspace(s); 1315 {
1316 if (!_evry_backspace(s))
1317 _evry_browse_back(selector);
1318 }
1293 else if (!strcmp(key, "Delete")) 1319 else if (!strcmp(key, "Delete"))
1294 _evry_backspace(s); 1320 _evry_backspace(s);
1295 else if (_evry_view_key_press(s, ev)) 1321 else if (_evry_view_key_press(s, ev))
@@ -1319,7 +1345,7 @@ _evry_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
1319 return 1; 1345 return 1;
1320} 1346}
1321 1347
1322static void 1348static int
1323_evry_backspace(Evry_State *s) 1349_evry_backspace(Evry_State *s)
1324{ 1350{
1325 int len, val, pos; 1351 int len, val, pos;
@@ -1336,8 +1362,12 @@ _evry_backspace(Evry_State *s)
1336 1362
1337 if ((pos == 0) || !isspace(val)) 1363 if ((pos == 0) || !isspace(val))
1338 _evry_update(s, 1); 1364 _evry_update(s, 1);
1365
1366 return 1;
1339 } 1367 }
1340 } 1368 }
1369
1370 return 0;
1341} 1371}
1342 1372
1343static void 1373static void
diff --git a/src/modules/everything/evry_plug_aggregator.c b/src/modules/everything/evry_plug_aggregator.c
index 3559724..a62dabc 100644
--- a/src/modules/everything/evry_plug_aggregator.c
+++ b/src/modules/everything/evry_plug_aggregator.c
@@ -38,7 +38,7 @@ _cb_sort(const void *data1, const void *data2)
38 if (it1->priority - it2->priority) 38 if (it1->priority - it2->priority)
39 return (it1->priority - it2->priority); 39 return (it1->priority - it2->priority);
40 40
41 return 0; 41 return strcasecmp(it1->label, it2->label);
42} 42}
43 43
44static int 44static int
diff --git a/src/modules/everything/sources/Makefile.am b/src/modules/everything/sources/Makefile.am
new file mode 100644
index 0000000..264f255
--- /dev/null
+++ b/src/modules/everything/sources/Makefile.am
@@ -0,0 +1,64 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3# the module .so file
4INCLUDES = -I.. \
5 -I$(top_srcdir) \
6 -I$(top_srcdir)/src/modules/$(MODULE) \
7 -I$(top_srcdir)/src/bin \
8 -I$(top_srcdir)/src/lib \
9 -I$(top_srcdir)/src/modules \
10 @e_cflags@
11
12
13plugindir = $(libdir)/enlightenment/everything_plugins/core/$(MODULE_ARCH)
14
15evry_plug_appsdir = $(plugindir)
16evry_plug_apps_LTLIBRARIES = evry_plug_apps.la
17evry_plug_apps_la_SOURCES = evry_plug_apps.c
18evry_plug_apps_la_LIBADD = @e_libs@
19evry_plug_apps_la_LDFLAGS = -no-undefined -module -avoid-version
20evry_plug_apps_la_LIBTOOLFLAGS = --tag=disable-static
21
22evry_plug_borderdir = $(plugindir)
23evry_plug_border_LTLIBRARIES = evry_plug_border.la
24evry_plug_border_la_SOURCES = evry_plug_border.c
25evry_plug_border_la_LIBADD = @e_libs@
26evry_plug_border_la_LDFLAGS = -no-undefined -module -avoid-version
27evry_plug_border_la_LIBTOOLFLAGS = --tag=disable-static
28
29evry_plug_dir_browsedir = $(plugindir)
30evry_plug_dir_browse_LTLIBRARIES = evry_plug_dir_browse.la
31evry_plug_dir_browse_la_SOURCES = evry_plug_dir_browse.c
32evry_plug_dir_browse_la_LIBADD = @e_libs@
33evry_plug_dir_browse_la_LDFLAGS = -no-undefined -module -avoid-version
34evry_plug_dir_browse_la_LIBTOOLFLAGS = --tag=disable-static
35
36evry_plug_trackerdir = $(plugindir)
37evry_plug_tracker_LTLIBRARIES = evry_plug_tracker.la
38evry_plug_tracker_la_SOURCES = evry_plug_tracker.c
39evry_plug_tracker_la_LIBADD = @e_libs@
40evry_plug_tracker_la_LDFLAGS = -no-undefined -module -avoid-version
41evry_plug_tracker_la_LIBTOOLFLAGS = --tag=disable-static
42
43evry_plug_calcdir = $(plugindir)
44evry_plug_calc_LTLIBRARIES = evry_plug_calc.la
45evry_plug_calc_la_SOURCES = evry_plug_calc.c
46evry_plug_calc_la_LIBADD = @e_libs@
47evry_plug_calc_la_LDFLAGS = -no-undefined -module -avoid-version
48evry_plug_calc_la_LIBTOOLFLAGS = --tag=disable-static
49
50evry_plug_configdir = $(plugindir)
51evry_plug_config_LTLIBRARIES = evry_plug_config.la
52evry_plug_config_la_SOURCES = evry_plug_config.c
53evry_plug_config_la_LIBADD = @e_libs@
54evry_plug_config_la_LDFLAGS = -no-undefined -module -avoid-version
55evry_plug_config_la_LIBTOOLFLAGS = --tag=disable-static
56
57evry_plug_aspelldir = $(plugindir)
58evry_plug_aspell_LTLIBRARIES = evry_plug_aspell.la
59evry_plug_aspell_la_SOURCES = evry_plug_aspell.c
60evry_plug_aspell_la_LIBADD = @e_libs@
61evry_plug_aspell_la_LDFLAGS = -no-undefined -module -avoid-version
62evry_plug_aspell_la_LIBTOOLFLAGS = --tag=disable-static
63
64
diff --git a/src/modules/everything/evry_plug_apps.c b/src/modules/everything/sources/evry_plug_apps.c
index eed77f9..a5de554 100644
--- a/src/modules/everything/evry_plug_apps.c
+++ b/src/modules/everything/sources/evry_plug_apps.c
@@ -20,11 +20,16 @@ static Evry_Action *act3;
20static Evry_Action *act4; 20static Evry_Action *act4;
21static Eina_List *exe_path = NULL; 21static Eina_List *exe_path = NULL;
22 22
23static void _hash_free(void *data)
24{
25 ITEM_APP(app, data);
26 evry_item_free(EVRY_ITEM(app));
27}
28
23 29
24static Evry_Plugin * 30static Evry_Plugin *
25_begin(Evry_Plugin *plugin, const Evry_Item *item) 31_begin(Evry_Plugin *plugin, const Evry_Item *item)
26{ 32{
27 /* Plugin *p = (Plugin*) plugin; */
28 PLUGIN(p, plugin); 33 PLUGIN(p, plugin);
29 34
30 const char *mime; 35 const char *mime;
@@ -53,6 +58,8 @@ _begin(Evry_Plugin *plugin, const Evry_Item *item)
53 } 58 }
54 } 59 }
55 60
61 p->added = eina_hash_string_small_new(_hash_free);
62
56 return EVRY_PLUGIN(p); 63 return EVRY_PLUGIN(p);
57} 64}
58 65
@@ -61,8 +68,10 @@ _item_free(Evry_Item *item)
61{ 68{
62 ITEM_APP(app, item); 69 ITEM_APP(app, item);
63 70
64 if (app->file) eina_stringshare_del(app->file); 71 if (app->desktop)
65 if (app->desktop) efreet_desktop_free(app->desktop); 72 efreet_desktop_free(app->desktop);
73 if (app->file)
74 eina_stringshare_del(app->file);
66 75
67 E_FREE(app); 76 E_FREE(app);
68} 77}
@@ -73,7 +82,9 @@ _cleanup(Evry_Plugin *plugin)
73 PLUGIN(p, plugin); 82 PLUGIN(p, plugin);
74 Efreet_Desktop *desktop; 83 Efreet_Desktop *desktop;
75 84
76 EVRY_PLUGIN_ITEMS_FREE(p); 85 eina_hash_free(p->added);
86
87 EVRY_PLUGIN_ITEMS_CLEAR(p);
77 88
78 EINA_LIST_FREE(p->apps_mime, desktop) 89 EINA_LIST_FREE(p->apps_mime, desktop)
79 efreet_desktop_free(desktop); 90 efreet_desktop_free(desktop);
@@ -94,6 +105,17 @@ _item_add(Plugin *p, Efreet_Desktop *desktop, char *file, int match)
94 105
95 if (!file) return 0; 106 if (!file) return 0;
96 107
108 if ((app = eina_hash_find(p->added, file)) &&
109 (!desktop || (desktop == app->desktop)))
110 {
111 if (!eina_list_data_find_list(EVRY_PLUGIN(p)->items, app))
112 {
113 EVRY_ITEM(app)->fuzzy_match = match;
114 EVRY_PLUGIN_ITEM_APPEND(p, app);
115 }
116 return 1;
117 }
118
97 if (!desktop) 119 if (!desktop)
98 { 120 {
99 char match[4096]; 121 char match[4096];
@@ -101,9 +123,6 @@ _item_add(Plugin *p, Efreet_Desktop *desktop, char *file, int match)
101 int len; 123 int len;
102 char *tmp; 124 char *tmp;
103 125
104 if (eina_hash_find(p->added, file))
105 return 0;
106
107 len = strlen(file); 126 len = strlen(file);
108 tmp = ecore_file_app_exe_get(file); 127 tmp = ecore_file_app_exe_get(file);
109 snprintf(match, sizeof(match), "%s*", tmp); 128 snprintf(match, sizeof(match), "%s*", tmp);
@@ -121,24 +140,14 @@ _item_add(Plugin *p, Efreet_Desktop *desktop, char *file, int match)
121 } 140 }
122 141
123 free(tmp); 142 free(tmp);
124
125 if (!desktop)
126 eina_hash_add(p->added, file, file);
127 } 143 }
128 144
129 if (desktop) 145 if (desktop)
130 { 146 {
131 if ((d2 = eina_hash_find(p->added, file)) &&
132 ((desktop == d2) ||
133 (!strcmp(desktop->exec, d2->exec))))
134 return 0;
135
136 if (!already_refd) 147 if (!already_refd)
137 efreet_desktop_ref(desktop); 148 efreet_desktop_ref(desktop);
138 eina_hash_add(p->added, file, desktop);
139 file = NULL;
140 } 149 }
141 150
142 app = E_NEW(Evry_Item_App, 1); 151 app = E_NEW(Evry_Item_App, 1);
143 152
144 if (desktop) 153 if (desktop)
@@ -147,11 +156,14 @@ _item_add(Plugin *p, Efreet_Desktop *desktop, char *file, int match)
147 evry_item_new(EVRY_ITEM(app), EVRY_PLUGIN(p), file, _item_free); 156 evry_item_new(EVRY_ITEM(app), EVRY_PLUGIN(p), file, _item_free);
148 157
149 app->desktop = desktop; 158 app->desktop = desktop;
150 app->file = file; 159 app->file = eina_stringshare_add(file);
160
151 EVRY_ITEM(app)->fuzzy_match = match; 161 EVRY_ITEM(app)->fuzzy_match = match;
152 162
153 EVRY_PLUGIN_ITEM_APPEND(p, app); 163 EVRY_PLUGIN_ITEM_APPEND(p, app);
154 164
165 eina_hash_add(p->added, file, app);
166
155 return 1; 167 return 1;
156} 168}
157 169
@@ -232,10 +244,8 @@ _fetch(Evry_Plugin *plugin, const char *input)
232 char *file; 244 char *file;
233 int prio = 0; 245 int prio = 0;
234 246
235 p->added = eina_hash_string_small_new(NULL); 247 EVRY_PLUGIN_ITEMS_CLEAR(p);
236 248
237 EVRY_PLUGIN_ITEMS_FREE(p);
238
239 /* add apps for a given mimetype */ 249 /* add apps for a given mimetype */
240 if (plugin->type == type_action) 250 if (plugin->type == type_action)
241 { 251 {
@@ -283,53 +293,52 @@ _fetch(Evry_Plugin *plugin, const char *input)
283 _item_add(p, NULL, file, 1); 293 _item_add(p, NULL, file, 1);
284 } 294 }
285 295
296 /* TODO make this an action */
286 /* show 'Run Command' item */ 297 /* show 'Run Command' item */
287 if (input) 298 /* if (input)
288 { 299 * {
289 int found = 0; 300 * int found = 0;
290 char *end; 301 * char *end;
291 char *dir; 302 * char *dir;
292 char cmd[1024]; 303 * char cmd[1024];
293 char path[1024]; 304 * char path[1024];
294 305 *
295 snprintf(cmd, sizeof(cmd), "%s", input); 306 * snprintf(cmd, sizeof(cmd), "%s", input);
296 307 *
297 if ((end = strchr(input, ' '))) 308 * if ((end = strchr(input, ' ')))
298 { 309 * {
299 int len = (end - input) + 1; 310 * int len = (end - input) + 1;
300 if (len >= 0) 311 * if (len >= 0)
301 snprintf(cmd, len, "%s", input); 312 * snprintf(cmd, len, "%s", input);
302 } 313 * }
303 314 *
304 EINA_LIST_FOREACH(exe_path, l, dir) 315 * EINA_LIST_FOREACH(exe_path, l, dir)
305 { 316 * {
306 snprintf(path, sizeof(path), "%s/%s", dir, cmd); 317 * snprintf(path, sizeof(path), "%s/%s", dir, cmd);
307 if (ecore_file_exists(path)) 318 * if (ecore_file_exists(path))
308 { 319 * {
309 found = 1; 320 * found = 1;
310 break; 321 * break;
311 } 322 * }
312 } 323 * }
313 324 *
314 if (found) 325 * if (found)
315 { 326 * {
316 Evry_Item_App *app; 327 * Evry_Item_App *app;
317 app = E_NEW(Evry_Item_App, 1); 328 * app = E_NEW(Evry_Item_App, 1);
318 evry_item_new(EVRY_ITEM(app), plugin, _("Run Command"), _item_free); 329 * evry_item_new(EVRY_ITEM(app), plugin, _("Run Command"), _item_free);
319 app->file = eina_stringshare_add(input); 330 * app->file = eina_stringshare_add(input);
320 EVRY_ITEM(app)->priority = 9999; 331 * EVRY_ITEM(app)->priority = 9999;
321 EVRY_PLUGIN_ITEM_APPEND(p, app); 332 * EVRY_PLUGIN_ITEM_APPEND(p, app);
322 333 *
323 snprintf(cmd, sizeof(cmd), "xterm -hold -e %s", input); 334 * snprintf(cmd, sizeof(cmd), "xterm -hold -e %s", input);
324 app = E_NEW(Evry_Item_App, 1); 335 * app = E_NEW(Evry_Item_App, 1);
325 evry_item_new(EVRY_ITEM(app), plugin, _("Run in Terminal"), _item_free); 336 * evry_item_new(EVRY_ITEM(app), plugin, _("Run in Terminal"), _item_free);
326 app->file = eina_stringshare_add(cmd); 337 * app->file = eina_stringshare_add(cmd);
327 EVRY_ITEM(app)->priority = 1000; 338 * EVRY_ITEM(app)->priority = 1000;
328 EVRY_PLUGIN_ITEM_APPEND(p, app); 339 * EVRY_PLUGIN_ITEM_APPEND(p, app);
329 } 340 * }
330 } 341 * } */
331
332 eina_hash_free(p->added);
333 342
334 if (!plugin->items) return 0; 343 if (!plugin->items) return 0;
335 344
@@ -376,16 +385,12 @@ static int
376_app_action(const Evry_Item *it1, const Evry_Item *it2) 385_app_action(const Evry_Item *it1, const Evry_Item *it2)
377{ 386{
378 E_Zone *zone; 387 E_Zone *zone;
379 /* Evry_App *app = NULL; */
380 Eina_List *files = NULL; 388 Eina_List *files = NULL;
381 char *exe = NULL; 389 char *exe = NULL;
382 390
383 if (!it1) return 0; 391 if (!it1) return 0;
384 /* app = it_app->data[0]; */
385 ITEM_APP(app, it1); 392 ITEM_APP(app, it1);
386 393
387 if (!app) return 0;
388
389 zone = e_util_zone_current_get(e_manager_current_get()); 394 zone = e_util_zone_current_get(e_manager_current_get());
390 395
391 if (app->desktop) 396 if (app->desktop)
@@ -468,7 +473,6 @@ static int
468_open_with_action(Evry_Plugin *plugin, const Evry_Item *it) 473_open_with_action(Evry_Plugin *plugin, const Evry_Item *it)
469{ 474{
470 PLUGIN(p, plugin); 475 PLUGIN(p, plugin);
471 /* Plugin *p = (Plugin*) plugin; */
472 476
473 if (p->candidate) 477 if (p->candidate)
474 return _app_action(it, p->candidate); 478 return _app_action(it, p->candidate);
@@ -480,7 +484,7 @@ static int
480_edit_app_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it) 484_edit_app_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
481{ 485{
482 ITEM_APP(app, it); 486 ITEM_APP(app, it);
483 /* Evry_App *app = it->data[0]; */ 487
484 if (app->desktop) 488 if (app->desktop)
485 return 1; 489 return 1;
486 490
@@ -501,7 +505,7 @@ _edit_app_action(Evry_Action *act)
501 snprintf(buf, 128, "%s/.local/share/applications/%s.desktop", 505 snprintf(buf, 128, "%s/.local/share/applications/%s.desktop",
502 e_user_homedir_get(), app->file); 506 e_user_homedir_get(), app->file);
503 desktop = efreet_desktop_empty_new(eina_stringshare_add(buf)); 507 desktop = efreet_desktop_empty_new(eina_stringshare_add(buf));
504 /* XXX check if this gets freed by efreet*/ 508 /* XXX check if this is freed by efreet*/
505 desktop->exec = strdup(app->file); 509 desktop->exec = strdup(app->file);
506 } 510 }
507 511
@@ -514,7 +518,7 @@ static int
514_new_app_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it) 518_new_app_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
515{ 519{
516 ITEM_APP(app, it); 520 ITEM_APP(app, it);
517 /* Evry_App *app = it->data[0]; */ 521
518 if (app->desktop) 522 if (app->desktop)
519 return 1; 523 return 1;
520 524
@@ -527,7 +531,6 @@ _new_app_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it)
527static int 531static int
528_new_app_action(Evry_Action *act) 532_new_app_action(Evry_Action *act)
529{ 533{
530 /* Evry_App *app; */
531 char *name; 534 char *name;
532 char buf[4096]; 535 char buf[4096];
533 char *end; 536 char *end;
@@ -535,7 +538,6 @@ _new_app_action(Evry_Action *act)
535 int i; 538 int i;
536 539
537 ITEM_APP(app, act->item1); 540 ITEM_APP(app, act->item1);
538 /* app = act->item1->data[0]; */
539 541
540 if (app->desktop) 542 if (app->desktop)
541 name = strdup(app->desktop->name); 543 name = strdup(app->desktop->name);
@@ -571,8 +573,6 @@ _new_app_action(Evry_Action *act)
571 else 573 else
572 { 574 {
573 efreet_desktop_save_as(app->desktop, buf); 575 efreet_desktop_save_as(app->desktop, buf);
574 /* efreet_desktop_new(app->desktop->orig_path); */
575
576 desktop = efreet_desktop_new(buf); 576 desktop = efreet_desktop_new(buf);
577 } 577 }
578 578
@@ -607,14 +607,10 @@ _exec_border_action(Evry_Action *act)
607static int 607static int
608_exec_border_intercept(Evry_Action *act) 608_exec_border_intercept(Evry_Action *act)
609{ 609{
610 /* Evry_Item *it = E_NEW(Evry_Item, 1); */
611 Evry_Item_App *app = E_NEW(Evry_Item_App, 1); 610 Evry_Item_App *app = E_NEW(Evry_Item_App, 1);
612 E_Border *bd = act->item1->data; 611 E_Border *bd = act->item1->data;
613 612
614 app->desktop = bd->desktop; 613 app->desktop = bd->desktop;
615 /* it->data[0] = app; */
616
617 /* act->item1 = it; */
618 act->item1 = EVRY_ITEM(app); 614 act->item1 = EVRY_ITEM(app);
619 615
620 return 1; 616 return 1;
@@ -624,12 +620,8 @@ _exec_border_intercept(Evry_Action *act)
624static void 620static void
625_exec_border_cleanup(Evry_Action *act) 621_exec_border_cleanup(Evry_Action *act)
626{ 622{
627 /* Evry_Item *it = (Evry_Item*) act->item1;
628 * Evry_App *app = it->data[0]; */
629 ITEM_APP(app, act->item1); 623 ITEM_APP(app, act->item1);
630
631 E_FREE(app); 624 E_FREE(app);
632 /* E_FREE(it); */
633} 625}
634 626
635 627
diff --git a/src/modules/everything/evry_plug_aspell.c b/src/modules/everything/sources/evry_plug_aspell.c
index 1f419e7..1f419e7 100644
--- a/src/modules/everything/evry_plug_aspell.c
+++ b/src/modules/everything/sources/evry_plug_aspell.c
diff --git a/src/modules/everything/evry_plug_border.c b/src/modules/everything/sources/evry_plug_border.c
index 3d37e93..0d83a34 100644
--- a/src/modules/everything/evry_plug_border.c
+++ b/src/modules/everything/sources/evry_plug_border.c
@@ -3,7 +3,7 @@
3 3
4static Evry_Plugin *plugin; 4static Evry_Plugin *plugin;
5static Eina_List *handlers = NULL; 5static Eina_List *handlers = NULL;
6 6static Eina_Hash *border_hash = NULL;
7 7
8static int 8static int
9_cb_border_remove(void *data, int type, void *event) 9_cb_border_remove(void *data, int type, void *event)
@@ -20,6 +20,7 @@ _cb_border_remove(void *data, int type, void *event)
20 if (it->data == ev->border) 20 if (it->data == ev->border)
21 { 21 {
22 p->items = eina_list_remove(p->items, it); 22 p->items = eina_list_remove(p->items, it);
23 eina_hash_del_by_key(border_hash, ev->border);
23 evry_item_free(it); 24 evry_item_free(it);
24 evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD); 25 evry_plugin_async_update(p, EVRY_ASYNC_UPDATE_ADD);
25 break; 26 break;
@@ -29,6 +30,12 @@ _cb_border_remove(void *data, int type, void *event)
29 return 1; 30 return 1;
30} 31}
31 32
33static void _hash_free(void *data)
34{
35 Evry_Item *it = data;
36 evry_item_free(it);
37}
38
32static Evry_Plugin * 39static Evry_Plugin *
33_begin(Evry_Plugin *p, const Evry_Item *it) 40_begin(Evry_Plugin *p, const Evry_Item *it)
34{ 41{
@@ -36,18 +43,21 @@ _begin(Evry_Plugin *p, const Evry_Item *it)
36 (handlers, ecore_event_handler_add 43 (handlers, ecore_event_handler_add
37 (E_EVENT_BORDER_REMOVE, _cb_border_remove, p)); 44 (E_EVENT_BORDER_REMOVE, _cb_border_remove, p));
38 45
46 border_hash = eina_hash_pointer_new(_hash_free);
47
39 return p; 48 return p;
40} 49}
41 50
42static void 51static void
43_cleanup(Evry_Plugin *p) 52_cleanup(Evry_Plugin *p)
44{ 53{
45 Evry_Item *it;
46 Ecore_Event_Handler *h; 54 Ecore_Event_Handler *h;
47 55
48 EINA_LIST_FREE(p->items, it) 56 eina_hash_free(border_hash);
49 evry_item_free(it); 57 border_hash = NULL;
50 58
59 EVRY_PLUGIN_ITEMS_CLEAR(p);
60
51 EINA_LIST_FREE(handlers, h) 61 EINA_LIST_FREE(handlers, h)
52 ecore_event_handler_del(h); 62 ecore_event_handler_del(h);
53 63
@@ -65,17 +75,26 @@ _item_free(Evry_Item *it)
65static void 75static void
66_item_add(Evry_Plugin *p, E_Border *bd, int match, int *prio) 76_item_add(Evry_Plugin *p, E_Border *bd, int match, int *prio)
67{ 77{
68 Evry_Item *it; 78 Evry_Item *it = NULL;
69 79
80 if ((it = eina_hash_find(border_hash, &bd)))
81 {
82 it->priority = *prio;
83 EVRY_PLUGIN_ITEM_APPEND(p, it);
84 *prio += 1;
85 return;
86 }
87
70 it = evry_item_new(NULL, p, e_border_name_get(bd), _item_free); 88 it = evry_item_new(NULL, p, e_border_name_get(bd), _item_free);
71 89
72 e_object_ref(E_OBJECT(bd)); 90 e_object_ref(E_OBJECT(bd));
73 it->data = bd; 91 it->data = bd;
74 it->fuzzy_match = match; 92 it->fuzzy_match = match;
75 it->priority = *prio; 93 it->priority = *prio;
76
77 *prio += 1; 94 *prio += 1;
78 95
96 eina_hash_add(border_hash, &bd, it);
97
79 EVRY_PLUGIN_ITEM_APPEND(p, it); 98 EVRY_PLUGIN_ITEM_APPEND(p, it);
80} 99}
81 100
@@ -100,7 +119,7 @@ _fetch(Evry_Plugin *p, const char *input)
100 int prio = 0; 119 int prio = 0;
101 int m1, m2; 120 int m1, m2;
102 121
103 _cleanup(p); 122 EVRY_PLUGIN_ITEMS_CLEAR(p);
104 123
105 zone = e_util_zone_current_get(e_manager_current_get()); 124 zone = e_util_zone_current_get(e_manager_current_get());
106 125
diff --git a/src/modules/everything/evry_plug_calc.c b/src/modules/everything/sources/evry_plug_calc.c
index 2b95db1..2b95db1 100644
--- a/src/modules/everything/evry_plug_calc.c
+++ b/src/modules/everything/sources/evry_plug_calc.c
diff --git a/src/modules/everything/evry_plug_config.c b/src/modules/everything/sources/evry_plug_config.c
index 8a9fcec..8a9fcec 100644
--- a/src/modules/everything/evry_plug_config.c
+++ b/src/modules/everything/sources/evry_plug_config.c
diff --git a/src/modules/everything/evry_plug_dir_browse.c b/src/modules/everything/sources/evry_plug_dir_browse.c
index a6a2295..88c8ca8 100644
--- a/src/modules/everything/evry_plug_dir_browse.c
+++ b/src/modules/everything/sources/evry_plug_dir_browse.c
@@ -15,7 +15,7 @@ struct _Plugin
15 /* current list of files */ 15 /* current list of files */
16 Eina_List *cur; 16 Eina_List *cur;
17 Eina_Bool command; 17 Eina_Bool command;
18 Ecore_Idler *idler; 18 Ecore_Idle_Enterer *idler;
19}; 19};
20 20
21static Evry_Plugin *p1; 21static Evry_Plugin *p1;
@@ -87,7 +87,7 @@ _dirbrowse_idler(void *data)
87 Plugin *p = data; 87 Plugin *p = data;
88 Eina_List *l; 88 Eina_List *l;
89 Evry_Item_File *file; 89 Evry_Item_File *file;
90 int cnt = 10; 90 int cnt = 20;
91 91
92 EINA_LIST_FOREACH(p->files, l, file) 92 EINA_LIST_FOREACH(p->files, l, file)
93 { 93 {
@@ -109,6 +109,8 @@ _dirbrowse_idler(void *data)
109 return 0; 109 return 0;
110 } 110 }
111 111
112 e_util_wakeup();
113
112 return 1; 114 return 1;
113} 115}
114 116
@@ -156,7 +158,7 @@ _read_directory(Plugin *p)
156 free(filename); 158 free(filename);
157 } 159 }
158 160
159 p->idler = ecore_idler_add(_dirbrowse_idler, p); 161 p->idler = ecore_idle_enterer_before_add(_dirbrowse_idler, p);
160} 162}
161 163
162static Evry_Plugin * 164static Evry_Plugin *
@@ -205,7 +207,7 @@ _cleanup(Evry_Plugin *plugin)
205 evry_item_free(EVRY_ITEM(file)); 207 evry_item_free(EVRY_ITEM(file));
206 208
207 if (p->idler) 209 if (p->idler)
208 ecore_idler_del(p->idler); 210 ecore_idle_enterer_del(p->idler);
209 211
210 EVRY_PLUGIN_ITEMS_CLEAR(p); 212 EVRY_PLUGIN_ITEMS_CLEAR(p);
211 213
diff --git a/src/modules/everything/evry_plug_tracker.c b/src/modules/everything/sources/evry_plug_tracker.c
index 643de90..60f78e9 100644
--- a/src/modules/everything/evry_plug_tracker.c
+++ b/src/modules/everything/sources/evry_plug_tracker.c
@@ -22,6 +22,7 @@ static E_DBus_Connection *conn = NULL;
22static Eina_List *plugins = NULL; 22static Eina_List *plugins = NULL;
23static int _prio = 5; 23static int _prio = 5;
24 24
25
25static Evry_Plugin * 26static Evry_Plugin *
26_begin(Evry_Plugin *plugin, const Evry_Item *it) 27_begin(Evry_Plugin *plugin, const Evry_Item *it)
27{ 28{
@@ -105,11 +106,12 @@ _item_add(Plugin *p, char *path, char *mime, int prio)
105 evry_item_new(EVRY_ITEM(file), EVRY_PLUGIN(p), filename, _item_free); 106 evry_item_new(EVRY_ITEM(file), EVRY_PLUGIN(p), filename, _item_free);
106 file->uri = eina_stringshare_add(path); 107 file->uri = eina_stringshare_add(path);
107 108
108 EVRY_ITEM(file)->priority = prio; 109 /* EVRY_ITEM(file)->priority = prio; */
109 110
110 if (folder) 111 if (folder)
111 { 112 {
112 EVRY_ITEM(file)->browseable = EINA_TRUE; 113 EVRY_ITEM(file)->browseable = EINA_TRUE;
114 EVRY_ITEM(file)->priority = 1;
113 file->mime = eina_stringshare_add("x-directory/normal"); 115 file->mime = eina_stringshare_add("x-directory/normal");
114 } 116 }
115 else 117 else
@@ -148,7 +150,10 @@ _cb_sort(const void *data1, const void *data2)
148 it1 = data1; 150 it1 = data1;
149 it2 = data2; 151 it2 = data2;
150 152
151 return (it2->priority - it1->priority); 153 if (it1->priority - it2->priority)
154 return (it1->priority - it2->priority);
155
156 return strcasecmp(it1->label, it2->label);
152} 157}
153 158
154static void 159static void
@@ -362,16 +367,81 @@ _plugin_new(const char *name, int type, char *service, int max_hits, int begin)
362 evry_plugin_new(EVRY_PLUGIN(p), name, type, "", "FILE", 0, NULL, NULL, 367 evry_plugin_new(EVRY_PLUGIN(p), name, type, "", "FILE", 0, NULL, NULL,
363 NULL, _cleanup, _fetch, 368 NULL, _cleanup, _fetch,
364 NULL, _icon_get, NULL, NULL); 369 NULL, _icon_get, NULL, NULL);
365 else 370 else if (type == type_object)
366 evry_plugin_new(EVRY_PLUGIN(p), name, type, "APPLICATION", "FILE", 0, NULL, NULL, 371 evry_plugin_new(EVRY_PLUGIN(p), name, type, "APPLICATION", "FILE", 0, NULL, NULL,
367 _begin, _cleanup, _fetch, 372 _begin, _cleanup, _fetch,
368 NULL, _icon_get, NULL, NULL); 373 NULL, _icon_get, NULL, NULL);
369 374
370 plugins = eina_list_append(plugins, p); 375 plugins = eina_list_append(plugins, p);
371 376
372 evry_plugin_register(EVRY_PLUGIN(p), _prio++); 377 evry_plugin_register(EVRY_PLUGIN(p), _prio++);
373} 378}
374 379
380static void
381_dbus_cb_version(void *data, DBusMessage *msg, DBusError *error)
382{
383 DBusMessageIter iter;
384 Plugin *p;
385 int version;
386
387 if (dbus_error_is_set(error))
388 {
389 printf("Error: %s - %s\n", error->name, error->message);
390 e_dbus_connection_close(conn);
391
392 EINA_LIST_FREE(plugins, p)
393 {
394 if (p->condition[0]) free(p->condition);
395
396 EVRY_PLUGIN_FREE(p);
397 }
398 return;
399 }
400
401 dbus_message_iter_init(msg, &iter);
402
403 if (dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_INT32)
404 dbus_message_iter_get_basic(&iter, &version);
405
406 printf("tracker version %d\n", version);
407
408 if (version < 690)
409 {
410 e_dbus_connection_close(conn);
411
412 EINA_LIST_FREE(plugins, p)
413 {
414 if (p->condition[0]) free(p->condition);
415
416 EVRY_PLUGIN_FREE(p);
417 }
418 }
419}
420
421
422static void
423_get_version(void)
424{
425 DBusMessage *msg;
426
427 msg = dbus_message_new_method_call("org.freedesktop.Tracker",
428 "/org/freedesktop/Tracker",
429 "org.freedesktop.Tracker",
430 "GetVersion");
431
432 e_dbus_message_send(conn, msg, _dbus_cb_version, -1, NULL);
433 dbus_message_unref(msg);
434}
435
436
437/* static Evry_Plugin *
438 * _begin_subject(Evry_Plugin *plugin, const Evry_Item *it)
439 * {
440 * if (!conn) return NULL;
441 *
442 * return plugin;
443 * } */
444
375 445
376static Eina_Bool 446static Eina_Bool
377_init(void) 447_init(void)
@@ -388,6 +458,8 @@ _init(void)
388 458
389 _plugin_new("Find Files", type_object, "Files", 20, 1); 459 _plugin_new("Find Files", type_object, "Files", 20, 1);
390 _plugin_new("Folders", type_object, "Folders", 20, 0); 460 _plugin_new("Folders", type_object, "Folders", 20, 0);
461
462 _get_version();
391 463
392 return EINA_TRUE; 464 return EINA_TRUE;
393} 465}
diff --git a/src/modules/everything/views/Makefile.am b/src/modules/everything/views/Makefile.am
new file mode 100644
index 0000000..794e648
--- /dev/null
+++ b/src/modules/everything/views/Makefile.am
@@ -0,0 +1,43 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3# the module .so file
4INCLUDES = -I.. \
5 -I$(top_srcdir) \
6 -I$(top_srcdir)/src/modules/$(MODULE) \
7 -I$(top_srcdir)/src/bin \
8 -I$(top_srcdir)/src/lib \
9 -I$(top_srcdir)/src/modules \
10 @e_cflags@
11
12plugindir = $(libdir)/enlightenment/everything_plugins/core/$(MODULE_ARCH)
13
14
15evry_plug_previewdir = $(plugindir)
16evry_plug_preview_LTLIBRARIES = evry_plug_preview.la
17evry_plug_preview_la_SOURCES = evry_plug_preview.c
18evry_plug_preview_la_LIBADD = @e_libs@
19evry_plug_preview_la_LDFLAGS = -no-undefined -module -avoid-version
20evry_plug_preview_la_LIBTOOLFLAGS = --tag=disable-static
21
22evry_plug_view_listdir = $(plugindir)
23evry_plug_view_list_LTLIBRARIES = evry_plug_view_list.la
24evry_plug_view_list_la_SOURCES = evry_plug_view_list.c
25evry_plug_view_list_la_LIBADD = @e_libs@
26evry_plug_view_list_la_LDFLAGS = -no-undefined -module -avoid-version
27evry_plug_view_list_la_LIBTOOLFLAGS = --tag=disable-static
28
29evry_plug_view_helpdir = $(plugindir)
30evry_plug_view_help_LTLIBRARIES = evry_plug_view_help.la
31evry_plug_view_help_la_SOURCES = evry_plug_view_help.c
32evry_plug_view_help_la_LIBADD = @e_libs@
33evry_plug_view_help_la_LDFLAGS = -no-undefined -module -avoid-version
34evry_plug_view_help_la_LIBTOOLFLAGS = --tag=disable-static
35
36evry_plug_view_thumbdir = $(plugindir)
37evry_plug_view_thumb_LTLIBRARIES = evry_plug_view_thumb.la
38evry_plug_view_thumb_la_SOURCES = evry_plug_view_thumb.c
39evry_plug_view_thumb_la_LIBADD = @e_libs@
40evry_plug_view_thumb_la_LDFLAGS = -no-undefined -module -avoid-version
41evry_plug_view_thumb_la_LIBTOOLFLAGS = --tag=disable-static
42
43
diff --git a/src/modules/everything/evry_plug_preview.c b/src/modules/everything/views/evry_plug_preview.c
index dd16b4b..68127d1 100644
--- a/src/modules/everything/evry_plug_preview.c
+++ b/src/modules/everything/views/evry_plug_preview.c
@@ -243,7 +243,7 @@ _init(void)
243 view->update = &_view_update; 243 view->update = &_view_update;
244 view->clear = &_view_clear; 244 view->clear = &_view_clear;
245 view->cb_key_down = &_cb_key_down; 245 view->cb_key_down = &_cb_key_down;
246 evry_view_register(view, 2); 246 evry_view_register(view, 3);
247 247
248 view_types = eina_stringshare_add("FILE"); 248 view_types = eina_stringshare_add("FILE");
249 249
diff --git a/src/modules/everything/evry_plug_view_help.c b/src/modules/everything/views/evry_plug_view_help.c
index 267483c..267483c 100644
--- a/src/modules/everything/evry_plug_view_help.c
+++ b/src/modules/everything/views/evry_plug_view_help.c
diff --git a/src/modules/everything/evry_plug_view_list.c b/src/modules/everything/views/evry_plug_view_list.c
index 3211090..629c661 100644
--- a/src/modules/everything/evry_plug_view_list.c
+++ b/src/modules/everything/views/evry_plug_view_list.c
@@ -1,35 +1,25 @@
1#include "Evry.h" 1#include "e_mod_main.h"
2 2
3typedef struct _View View; 3typedef struct _View View;
4typedef struct _List_Tab List_Tab;
5
6struct _List_Tab
7{
8 Evry_Plugin *plugin;
9 Evas_Object *o_tab;
10};
11
12
13 4
14struct _View 5struct _View
15{ 6{
16 Evry_View view; 7 Evry_View view;
17 Evas *evas; 8 Evas *evas;
18 const Evas_Object *swallow;
19
20 const Evry_State *state; 9 const Evry_State *state;
21 10 Tab_View *tabs;
11
22 Evas_Object *o_list; 12 Evas_Object *o_list;
23 Evas_Object *o_tabs;
24
25 Eina_List *items; 13 Eina_List *items;
26 Eina_List *tabs;
27 14
28 Ecore_Idler *item_idler; 15
16 Ecore_Idle_Enterer *item_idler;
29 17
30 double scroll_align_to; 18 double scroll_align_to;
31 double scroll_align; 19 double scroll_align;
32 20
21
22
33 /* int ev_last_is_mouse; 23 /* int ev_last_is_mouse;
34 * Evry_Item *item_mouseover; */ 24 * Evry_Item *item_mouseover; */
35 /* Ecore_Timer *scroll_timer; */ 25 /* Ecore_Timer *scroll_timer; */
@@ -47,7 +37,7 @@ _list_clear(View *v)
47 37
48 if (v->item_idler) 38 if (v->item_idler)
49 { 39 {
50 ecore_idler_del(v->item_idler); 40 ecore_idle_enterer_del(v->item_idler);
51 v->item_idler = NULL; 41 v->item_idler = NULL;
52 } 42 }
53 43
@@ -86,7 +76,6 @@ _list_clear(View *v)
86 76
87 e_box_thaw(v->o_list); 77 e_box_thaw(v->o_list);
88 evas_event_thaw(v->evas); 78 evas_event_thaw(v->evas);
89
90} 79}
91 80
92static void 81static void
@@ -154,6 +143,8 @@ _list_item_idler(void *data)
154 } 143 }
155 e_box_thaw(v->o_list); 144 e_box_thaw(v->o_list);
156 145
146 e_util_wakeup();
147
157 if (cnt == 0) return 1; 148 if (cnt == 0) return 1;
158 end: 149 end:
159 v->item_idler = NULL; 150 v->item_idler = NULL;
@@ -244,7 +235,7 @@ _list_update(View *v)
244 235
245 _list_scroll_to(v, v->state->sel_item); 236 _list_scroll_to(v, v->state->sel_item);
246 237
247 v->item_idler = ecore_idler_add(_list_item_idler, v); 238 v->item_idler = ecore_idle_enterer_add(_list_item_idler, v);
248 239
249 return 1; 240 return 1;
250} 241}
@@ -332,219 +323,14 @@ _list_item_last(View *v)
332 evry_item_select(v->state, it); 323 evry_item_select(v->state, it);
333} 324}
334 325
335static void
336_list_tab_scroll_to(View *v, Evry_Plugin *p)
337{
338 int n, w, mw, i;
339 double align;
340 Eina_List *l;
341 const Evry_State *s = v->state;
342
343 for(i = 0, l = s->cur_plugins; l; l = l->next, i++)
344 if (l->data == p) break;
345
346 n = eina_list_count(s->cur_plugins);
347
348 e_box_min_size_get(v->o_tabs, &mw, NULL);
349 evas_object_geometry_get(v->o_tabs, NULL, NULL, &w, NULL);
350
351 if (mw <= w + 5)
352 {
353 e_box_align_set(v->o_tabs, 0.0, 0.5);
354 return;
355 }
356
357 if (n > 1)
358 {
359 align = (double)i / (double)(n - 1);
360 /* if (evry_conf->scroll_animate)
361 * {
362 * if (!scroll_timer)
363 * scroll_timer = ecore_timer_add(0.01, _evry_list_scroll_timer, NULL);
364 * if (!scroll_animator)
365 * scroll_animator = ecore_animator_add(_evry_list_animator, NULL);
366 * }
367 * else */
368 e_box_align_set(v->o_tabs, 1.0 - align, 0.5);
369 }
370 else
371 e_box_align_set(v->o_tabs, 1.0, 0.5);
372}
373
374static void
375_list_tabs_update(View *v)
376{
377
378 Eina_List *l, *ll;
379 Evry_Plugin *p;
380 const Evry_State *s = v->state;
381 List_Tab *tab;
382 Evas_Coord mw, cw, w;
383 Evas_Object *o;
384
385 evas_object_geometry_get(v->o_tabs, NULL, NULL, &w, NULL);
386
387 /* remove tabs for not active plugins */
388 e_box_freeze(v->o_tabs);
389
390 EINA_LIST_FOREACH(v->tabs, l, tab)
391 {
392 e_box_unpack(tab->o_tab);
393 evas_object_hide(tab->o_tab);
394 }
395
396 /* show/update tabs of active plugins */
397 EINA_LIST_FOREACH(s->cur_plugins, l, p)
398 {
399 EINA_LIST_FOREACH(v->tabs, ll, tab)
400 if (tab->plugin == p) break;
401
402 if (!tab && (strlen(p->name) > 0))
403 {
404 tab = E_NEW(List_Tab, 1);
405 tab->plugin = p;
406
407 o = edje_object_add(v->evas);
408 e_theme_edje_object_set(o, "base/theme/everything",
409 "e/modules/everything/tab_item");
410 edje_object_part_text_set(o, "e.text.label", p->name);
411
412 tab->o_tab = o;
413
414 v->tabs = eina_list_append(v->tabs, tab);
415 }
416
417 if (!tab) continue;
418
419 o = tab->o_tab;
420 evas_object_show(o);
421 e_box_pack_end(v->o_tabs, o);
422
423 edje_object_size_min_calc(o, &cw, NULL);
424 edje_object_size_min_get(o, &mw, NULL);
425
426 e_box_pack_options_set(o, 1, 1, 1, 0, 0.0, 0.5,
427 (mw < cw ? cw : mw), 10,
428 (w ? w/3 : 150), 9999);
429 if (s->plugin == p)
430 edje_object_signal_emit(o, "e,state,selected", "e");
431 else
432 edje_object_signal_emit(o, "e,state,unselected", "e");
433 }
434
435 e_box_thaw(v->o_tabs);
436
437 if (s->plugin)
438 _list_tab_scroll_to(v, s->plugin);
439}
440
441
442static void
443_list_tabs_clear(View *v)
444{
445 Eina_List *l;
446 List_Tab *tab;
447
448 e_box_freeze(v->o_tabs);
449 EINA_LIST_FOREACH(v->tabs, l, tab)
450 {
451 e_box_unpack(tab->o_tab);
452 evas_object_hide(tab->o_tab);
453 }
454 e_box_thaw(v->o_tabs);
455}
456
457static void
458_list_plugin_select(View *v, Evry_Plugin *p)
459{
460 evry_plugin_select(v->state, p);
461
462 _list_tabs_update(v);
463 _list_tab_scroll_to(v, p);
464 _list_update(v);
465}
466
467static void
468_list_plugin_next(View *v)
469{
470 Eina_List *l;
471 Evry_Plugin *p = NULL;
472 const Evry_State *s = v->state;
473
474 if (!s->plugin) return;
475
476 l = eina_list_data_find_list(s->cur_plugins, s->plugin);
477
478 if (l && l->next)
479 p = l->next->data;
480 else if (s->plugin != s->cur_plugins->data)
481 p = s->cur_plugins->data;
482
483 if (p) _list_plugin_select(v, p);
484}
485
486static void
487_list_plugin_next_by_name(View *v, const char *key)
488{
489 Eina_List *l;
490 Evry_Plugin *p, *first = NULL, *next = NULL;
491 int found = 0;
492 const Evry_State *s = v->state;
493
494 if (!s->plugin) return;
495
496 EINA_LIST_FOREACH(s->cur_plugins, l, p)
497 {
498 if (p->name && (!strncasecmp(p->name, key, 1)))
499 {
500 if (!first) first = p;
501
502 if (found && !next)
503 next = p;
504 }
505 if (p == s->plugin) found = 1;
506 }
507
508 if (next)
509 p = next;
510 else if (first != s->plugin)
511 p = first;
512 else
513 p = NULL;
514
515 if (p) _list_plugin_select(v, p);
516}
517
518static void
519_list_plugin_prev(View *v)
520{
521 Eina_List *l;
522 Evry_Plugin *p = NULL;
523 const Evry_State *s = v->state;
524
525 if (!s->plugin) return;
526
527 l = eina_list_data_find_list(s->cur_plugins, s->plugin);
528
529 if (l && l->prev)
530 p = l->prev->data;
531 else
532 {
533 l = eina_list_last(s->cur_plugins);
534 if (s->plugin != l->data)
535 p = l->data;
536 }
537
538 if (p) _list_plugin_select(v, p);
539}
540
541static int 326static int
542_update(Evry_View *view) 327_update(Evry_View *view)
543{ 328{
544 VIEW(v, view); 329 VIEW(v, view);
545 330
331 v->tabs->update(v->tabs);
546 _list_update(v); 332 _list_update(v);
547 _list_tabs_update(v); 333
548 return 1; 334 return 1;
549} 335}
550 336
@@ -553,11 +339,10 @@ _clear(Evry_View *view)
553{ 339{
554 VIEW(v, view); 340 VIEW(v, view);
555 341
342 v->tabs->clear(v->tabs);
556 _list_clear(v); 343 _list_clear(v);
557 _list_tabs_clear(v);
558} 344}
559 345
560
561static int 346static int
562_cb_key_down(Evry_View *view, const Ecore_Event_Key *ev) 347_cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
563{ 348{
@@ -565,7 +350,12 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
565 350
566 const char *key = ev->key; 351 const char *key = ev->key;
567 352
568 if (!strcmp(key, "Up")) 353 if (v->tabs->key_down(v->tabs, ev))
354 {
355 _list_update(v);
356 return 1;
357 }
358 else if (!strcmp(key, "Up"))
569 _list_item_prev(v); 359 _list_item_prev(v);
570 else if (!strcmp(key, "Down")) 360 else if (!strcmp(key, "Down"))
571 _list_item_next(v); 361 _list_item_next(v);
@@ -573,29 +363,6 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
573 _list_item_last(v); 363 _list_item_last(v);
574 else if (!strcmp(key, "Home")) 364 else if (!strcmp(key, "Home"))
575 _list_item_first(v); 365 _list_item_first(v);
576 else if (!strcmp(key, "Next"))
577 _list_plugin_next(v);
578 else if (!strcmp(key, "Prior"))
579 _list_plugin_prev(v);
580 else if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT)
581 {
582 if (!strcmp(key, "Left"))
583 _list_plugin_prev(v);
584 else if (!strcmp(key, "Right"))
585 _list_plugin_next(v);
586 else return 0;
587
588 return 1;
589 }
590 else if (ev->modifiers & ECORE_EVENT_MODIFIER_CTRL)
591 {
592 if (!strcmp(key, "Left"))
593 _list_plugin_prev(v);
594 else if (!strcmp(key, "Right"))
595 _list_plugin_next(v);
596 else if (ev->compose)
597 _list_plugin_next_by_name(v, key);
598 }
599 else return 0; 366 else return 0;
600 367
601 return 1; 368 return 1;
@@ -610,7 +377,6 @@ _create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
610 v = E_NEW(View, 1); 377 v = E_NEW(View, 1);
611 v->view = *view; 378 v->view = *view;
612 v->evas = evas_object_evas_get(swallow); 379 v->evas = evas_object_evas_get(swallow);
613 v->swallow = swallow;
614 v->state = s; 380 v->state = s;
615 381
616 o = e_box_add(v->evas); 382 o = e_box_add(v->evas);
@@ -619,11 +385,8 @@ _create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
619 v->view.o_list = o; 385 v->view.o_list = o;
620 v->o_list = o; 386 v->o_list = o;
621 387
622 o = e_box_add(v->evas); 388 v->tabs = evry_tab_view_new(s, v->evas);
623 e_box_orientation_set(o, 1); 389 v->view.o_bar = v->tabs->o_tabs;
624 e_box_homogenous_set(o, 1);
625 v->view.o_bar = o;
626 v->o_tabs = o;
627 390
628 return EVRY_VIEW(v); 391 return EVRY_VIEW(v);
629} 392}
@@ -632,19 +395,11 @@ static void
632_destroy(Evry_View *view) 395_destroy(Evry_View *view)
633{ 396{
634 VIEW(v, view); 397 VIEW(v, view);
635 List_Tab *tab;
636 398
637 _clear(view); 399 _clear(view);
638
639 EINA_LIST_FREE(v->tabs, tab)
640 {
641 evas_object_del(tab->o_tab);
642 E_FREE(tab);
643 }
644
645 evas_object_del(v->o_list); 400 evas_object_del(v->o_list);
646 evas_object_del(v->o_tabs); 401 evry_tab_view_free(v->tabs);
647 402
648 E_FREE(v); 403 E_FREE(v);
649} 404}
650 405
diff --git a/src/modules/everything/views/evry_plug_view_thumb.c b/src/modules/everything/views/evry_plug_view_thumb.c
new file mode 100644
index 0000000..89bc5cc
--- /dev/null
+++ b/src/modules/everything/views/evry_plug_view_thumb.c
@@ -0,0 +1,971 @@
1#include "e_mod_main.h"
2
3typedef struct _View View;
4typedef struct _Smart_Data Smart_Data;
5typedef struct _Item Item;
6
7struct _View
8{
9 Evry_View view;
10 Evas *evas;
11 const Evry_State *state;
12 Tab_View *tabs;
13
14 Evas_Object *bg, *sframe, *span;
15 int iw, ih;
16};
17
18struct _Smart_Data
19{
20 View *view;
21 Eina_List *items;
22 Item *sel_item;
23 Ecore_Idle_Enterer *idle_enter;
24 Ecore_Animator *animator;
25 Evas_Coord x, y, w, h;
26 Evas_Coord cx, cy, cw, ch;
27 Evas_Coord sx, sy;
28 int id_num;
29 int sort_num;
30 double selmove;
31 Eina_Bool selin : 1;
32 Eina_Bool selout : 1;
33 Eina_Bool jump2hi : 1;
34 /* */
35 Eina_Bool update : 1;
36
37 int zoom;
38
39 /* Ecore_Timer *seltimer; */
40 /* double seltime; */
41};
42
43struct _Item
44{
45 Evry_Item *item;
46 Evas_Object *obj;
47 Evas_Coord x, y, w, h;
48 Evas_Object *frame, *image, *thumb;
49 Eina_Bool selected : 1;
50 Eina_Bool have_thumb : 1;
51 Eina_Bool do_thumb : 1;
52 Eina_Bool get_thumb : 1;
53 Eina_Bool showing : 1;
54 Eina_Bool visible : 1;
55 Eina_Bool changed : 1;
56 int pos;
57};
58
59static Evry_View *view = NULL;
60static const char *view_types = NULL;
61
62static void
63_thumb_gen(void *data, Evas_Object *obj, void *event_info)
64{
65 Evas_Coord w, h;
66 Item *it = data;
67
68 if (!it->frame) return;
69
70 e_icon_size_get(it->thumb, &w, &h);
71 edje_extern_object_aspect_set(it->thumb, EDJE_ASPECT_CONTROL_BOTH, w, h);
72 edje_object_part_swallow(it->frame, "e.swallow.icon", it->thumb);
73 evas_object_show(it->thumb);
74 it->have_thumb = EINA_TRUE;
75 it->do_thumb = EINA_FALSE;
76
77 if (it->image) evas_object_del(it->image);
78 it->image = NULL;
79
80}
81
82static int
83_e_smart_reconfigure_do(void *data)
84{
85 Evas_Object *obj = data;
86 Smart_Data *sd = evas_object_smart_data_get(obj);
87 Eina_List *l;
88 Item *it;
89 int iw, ih, redo = 0, changed = 0;
90 static int recursion = 0;
91 Evas_Coord x, y, xx, yy, ww, hh, mw, mh, ox, oy, dd;
92
93 if (!sd) return 0;
94 if (sd->cx > (sd->cw - sd->w)) sd->cx = sd->cw - sd->w;
95 if (sd->cy > (sd->ch - sd->h)) sd->cy = sd->ch - sd->h;
96 if (sd->cx < 0) sd->cx = 0;
97 if (sd->cy < 0) sd->cy = 0;
98 e_scrollframe_child_viewport_size_get(sd->view->sframe,
99 &sd->view->iw,
100 &sd->view->ih);
101
102 if (sd->zoom == 0)
103 {
104 int cnt = eina_list_count(sd->items);
105
106 sd->view->iw *= 3;
107 sd->view->iw /= 4;
108
109 if (cnt < 3)
110 iw = (double)sd->w / 2.5;
111 else if (cnt < 7)
112 iw = sd->w / 3;
113 else
114 iw = sd->w / 4;
115 }
116 else if (sd->zoom == 1)
117 {
118 sd->view->iw *= 2;
119 sd->view->iw /= 3;
120 iw = sd->w / 3;
121 }
122 else if (sd->zoom == 2)
123 {
124 iw = sd->w;
125 }
126
127 if (sd->view->iw <= 0) sd->view->iw = 1;
128 if (sd->view->ih <= 0) sd->view->ih = 1;
129
130 x = 0;
131 y = 0;
132 ww = iw;
133 hh = (sd->view->ih * iw) / (sd->view->iw);
134 ih = hh;
135
136 mw = mh = 0;
137 EINA_LIST_FOREACH(sd->items, l, it)
138 {
139 xx = sd->x - sd->cx + x;
140 if (x > (sd->w - ww))
141 {
142 x = 0;
143 y += hh;
144 xx = sd->x - sd->cx + x;
145 }
146 yy = sd->y - sd->cy + y;
147 it->x = x;
148 it->y = y;
149 it->w = ww;
150 it->h = hh;
151 if (it->selected)
152 {
153 sd->sx = it->x + (it->w / 2);
154 sd->sy = it->y + (it->h / 2);
155 }
156 if ((x + ww) > mw)mw = x + ww;
157 if ((y + hh) > mh) mh = y + hh;
158 x += ww;
159 }
160 if ((mw != sd->cw) || (mh != sd->ch))
161 {
162 sd->cw = mw;
163 sd->ch = mh;
164 if (sd->cx > (sd->cw - sd->w))
165 {
166 sd->cx = sd->cw - sd->w;
167 redo = 1;
168 }
169 if (sd->cy > (sd->ch - sd->h))
170 {
171 sd->cy = sd->ch - sd->h;
172 redo = 1;
173 }
174 if (sd->cx < 0)
175 {
176 sd->cx = 0;
177 redo = 1;
178 }
179 if (sd->cy < 0)
180 {
181 sd->cy = 0;
182 redo = 1;
183 }
184 if (redo)
185 {
186 recursion = 1;
187 _e_smart_reconfigure_do(obj);
188 recursion = 0;
189 }
190 changed = 1;
191 }
192
193 ox = 0;
194 if (sd->w > sd->cw) ox = (sd->w - sd->cw) / 2;
195 oy = 0;
196 if (sd->h > sd->ch) oy = (sd->h - sd->ch) / 2;
197
198
199 if (sd->sel_item && !sd->update)
200 {
201 int y, h;
202 it = sd->sel_item;
203
204 e_scrollframe_child_pos_get(sd->view->sframe, NULL, &y);
205 e_scrollframe_child_viewport_size_get(sd->view->sframe, NULL, &h);
206
207 if ((it->y + it->h) - y >= h - it->h)
208 e_scrollframe_child_pos_set(sd->view->sframe, 0, it->y - (2 - sd->zoom) * it->h);
209 else if (it->y < y)
210 e_scrollframe_child_pos_set(sd->view->sframe, 0, it->y);
211 }
212
213 EINA_LIST_FOREACH(sd->items, l, it)
214 {
215 Evas_Coord dx, dy, vw, vh;
216
217 dx = dy = 0;
218 if ((sd->sx >= 0) &&
219 (sd->selmove > 0.0))
220 {
221 double a, d; //, di;
222 int sum = 0;
223 /* char *p; */
224
225 // -----0X0+++++
226 dx = (it->x + (it->w / 2)) - sd->sx;
227 dy = (it->y + (it->h / 2)) - sd->sy;
228 if (dx > 0)
229 {
230 /* |/
231 * +-- */
232 if (dy < 0)
233 a = -atan(-(double)dy / (double)dx);
234 /* +--
235 * |\ */
236 else
237 a = atan((double)dy / (double)dx);
238 }
239 else if (dx == 0)
240 {
241 /* |
242 * + */
243 if (dy < 0) a = -M_PI / 2;
244 /* +
245 * | */
246 else a = M_PI / 2;
247 }
248 else
249 {
250 /* \|
251 * --+ */
252 if (dy < 0)
253 a = -M_PI + atan((double)dy / (double)dx);
254 /* --+
255 * /| */
256 else
257 a = M_PI - atan(-(double)dy / (double)dx);
258 }
259 d = sqrt((double)(dx * dx) + (double)(dy * dy));
260 dx = dy = 0;
261
262 sum = 0;
263 xx = sd->sx - sd->cx + ox;
264 yy = sd->sy - sd->cy + oy;
265 if (xx < (sd->w / 2)) dx = sd->w - xx;
266 else dx = xx;
267 if (yy < (sd->h / 2)) dy = sd->h - yy;
268 else dy = yy;
269 dd = dx - d;
270 if (dy > dx) dd = dy - d;
271 if (dd < 0) dd = 0;
272 dy = sin(a) * sd->selmove * (dd * 0.9);
273 dx = cos(a) * sd->selmove * (dd * 0.9);
274 }
275 xx = sd->x - sd->cx + it->x + ox;
276 yy = sd->y - sd->cy + it->y + oy;
277
278 evas_object_geometry_get(sd->view->span, NULL, NULL, &vw, &vh);
279
280 if (E_INTERSECTS(xx, yy, it->w, it->h, 0, - it->h*2, vw, vh + it->h*4))
281 {
282 if (!it->frame)
283 {
284 it->frame = edje_object_add(sd->view->evas);
285
286 e_theme_edje_object_set(it->frame, "base/theme/widgets",
287 "e/modules/everything/thumbview/main/mini");
288
289 evas_object_smart_member_add(it->frame, obj);
290 evas_object_clip_set(it->frame, evas_object_clip_get(obj));
291 edje_object_part_text_set(it->frame, "e.text.label", it->item->label);
292
293 if (!it->image && !it->have_thumb &&
294 it->item->plugin && it->item->plugin->icon_get)
295 {
296 it->image = it->item->plugin->icon_get
297 (it->item->plugin, it->item, sd->view->evas);
298
299 edje_object_part_swallow(it->frame, "e.swallow.content", it->image);
300 evas_object_show(it->image);
301 }
302 }
303
304 if (it->get_thumb && !it->have_thumb)
305 {
306 if (!it->thumb)
307 {
308 ITEM_FILE(file, it->item);
309
310 it->thumb = e_thumb_icon_add(sd->view->evas);
311 evas_object_smart_callback_add(it->thumb, "e_thumb_gen", _thumb_gen, it);
312
313 e_thumb_icon_file_set(it->thumb, file->uri, NULL);
314 e_thumb_icon_size_set(it->thumb, iw, ih);
315 e_thumb_icon_begin(it->thumb);
316 it->do_thumb = EINA_TRUE;
317 }
318 else if (!it->do_thumb)
319 {
320 e_thumb_icon_begin(it->thumb);
321 it->do_thumb = EINA_TRUE;
322 }
323 }
324
325 if (it->selected && sd->zoom < 2)
326 edje_object_signal_emit(it->frame, "e,state,selected", "e");
327
328 if (sd->update && !it->visible)
329 edje_object_signal_emit(it->frame, "e,action,thumb,show_delayed", "e");
330 else if (!it->visible)
331 edje_object_signal_emit(it->frame, "e,action,thumb,show", "e");
332
333 evas_object_move(it->frame,
334 xx + dx,
335 yy + dy);
336
337 evas_object_resize(it->frame, it->w, it->h);
338 evas_object_show(it->frame);
339 it->visible = EINA_TRUE;
340 }
341 else
342 {
343 if (it->frame)
344 {
345 if (it->do_thumb) e_thumb_icon_end(it->thumb);
346 if (it->thumb) evas_object_del(it->thumb);
347 if (it->image) evas_object_del(it->image);
348
349 evas_object_del(it->frame);
350
351 it->thumb = NULL;
352 it->image = NULL;
353 it->frame = NULL;
354
355 it->have_thumb = EINA_FALSE;
356 it->do_thumb = EINA_FALSE;
357 it->visible = EINA_FALSE;
358 it->changed = TRUE;
359 }
360 }
361 }
362
363 if (changed)
364 evas_object_smart_callback_call(obj, "changed", NULL);
365
366 sd->update = EINA_FALSE;
367
368 if (recursion == 0)
369 sd->idle_enter = NULL;
370 return 0;
371}
372
373static void
374_e_smart_reconfigure(Evas_Object *obj)
375{
376 Smart_Data *sd = evas_object_smart_data_get(obj);
377
378 if (sd->idle_enter) return;
379 sd->idle_enter = ecore_idle_enterer_before_add(_e_smart_reconfigure_do, obj);
380}
381
382static void
383_e_smart_add(Evas_Object *obj)
384{
385 Smart_Data *sd = calloc(1, sizeof(Smart_Data));
386 if (!sd) return;
387 sd->x = sd->y = sd->w = sd->h = 0;
388 sd->sx = sd->sy = -1;
389 evas_object_smart_data_set(obj, sd);
390}
391
392static void
393_e_smart_del(Evas_Object *obj)
394{
395 Smart_Data *sd = evas_object_smart_data_get(obj);
396 Item *it;
397 /* if (sd->seltimer)
398 * ecore_timer_del(sd->seltimer); */
399 /* if (sd->animator)
400 * ecore_animator_del(sd->animator); */
401 if (sd->idle_enter)
402 ecore_idle_enterer_del(sd->idle_enter);
403 // sd->view is just referenced
404 // sd->child_obj is unused
405 EINA_LIST_FREE(sd->items, it)
406 {
407 if (it->do_thumb) e_thumb_icon_end(it->thumb);
408 if (it->thumb) evas_object_del(it->thumb);
409 if (it->frame) evas_object_del(it->frame);
410 if (it->image) evas_object_del(it->image);
411 evry_item_free(it->item);
412 free(it);
413 }
414 free(sd);
415 evas_object_smart_data_set(obj, NULL);
416}
417
418static void
419_e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
420{
421 Smart_Data *sd = evas_object_smart_data_get(obj);
422 sd->x = x;
423 sd->y = y;
424 _e_smart_reconfigure(obj);
425}
426
427static void
428_e_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
429{
430 Smart_Data *sd = evas_object_smart_data_get(obj);
431 sd->w = w;
432 sd->h = h;
433 _e_smart_reconfigure(obj);
434 evas_object_smart_callback_call(obj, "changed", NULL);
435}
436
437static void
438_e_smart_show(Evas_Object *obj)
439{
440 /* Smart_Data *sd = evas_object_smart_data_get(obj); */
441 // evas_object_show(sd->child_obj);
442}
443
444static void
445_e_smart_hide(Evas_Object *obj)
446{
447 /* Smart_Data *sd = evas_object_smart_data_get(obj); */
448 // evas_object_hide(sd->child_obj);
449}
450
451static void
452_e_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
453{
454 /* Smart_Data *sd = evas_object_smart_data_get(obj); */
455 // evas_object_color_set(sd->child_obj, r, g, b, a);
456}
457
458static void
459_e_smart_clip_set(Evas_Object *obj, Evas_Object * clip)
460{
461 /* Smart_Data *sd = evas_object_smart_data_get(obj); */
462 // evas_object_clip_set(sd->child_obj, clip);
463}
464
465static void
466_e_smart_clip_unset(Evas_Object *obj)
467{
468 /* Smart_Data *sd = evas_object_smart_data_get(obj); */
469 // evas_object_clip_unset(sd->child_obj);
470}
471
472static Evas_Object *
473_pan_add(Evas *evas)
474{
475 static Evas_Smart *smart = NULL;
476 static const Evas_Smart_Class sc =
477 {
478 "wp_pan",
479 EVAS_SMART_CLASS_VERSION,
480 _e_smart_add,
481 _e_smart_del,
482 _e_smart_move,
483 _e_smart_resize,
484 _e_smart_show,
485 _e_smart_hide,
486 _e_smart_color_set,
487 _e_smart_clip_set,
488 _e_smart_clip_unset,
489 NULL,
490 NULL,
491 NULL,
492 NULL
493 };
494 smart = evas_smart_class_new(&sc);
495 return evas_object_smart_add(evas, smart);
496}
497
498static void
499_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
500{
501 Smart_Data *sd = evas_object_smart_data_get(obj);
502 if (x > (sd->cw - sd->w)) x = sd->cw - sd->w;
503 if (y > (sd->ch - sd->h)) y = sd->ch - sd->h;
504 if (x < 0) x = 0;
505 if (y < 0) y = 0;
506 if ((sd->cx == x) && (sd->cy == y)) return;
507 sd->cx = x;
508 sd->cy = y;
509 _e_smart_reconfigure(obj);
510}
511
512static void
513_pan_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
514{
515 Smart_Data *sd = evas_object_smart_data_get(obj);
516 if (x) *x = sd->cx;
517 if (y) *y = sd->cy;
518}
519
520static void
521_pan_max_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y)
522{
523 Smart_Data *sd = evas_object_smart_data_get(obj);
524 if (x)
525 {
526 if (sd->w < sd->cw) *x = sd->cw - sd->w;
527 else *x = 0;
528 }
529 if (y)
530 {
531 if (sd->h < sd->ch) *y = sd->ch - sd->h;
532 else *y = 0;
533 }
534}
535
536static void
537_pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
538{
539 Smart_Data *sd = evas_object_smart_data_get(obj);
540 if (w) *w = sd->cw;
541 if (h) *h = sd->ch;
542}
543
544static void
545_pan_view_set(Evas_Object *obj, View *view)
546{
547 Smart_Data *sd = evas_object_smart_data_get(obj);
548 sd->view = view;
549}
550
551static int
552_check_item(const Evry_Item *it)
553{
554 if (it->plugin->type_out != view_types) return 0;
555
556 ITEM_FILE(file, it);
557
558 if (!file->uri || !file->mime) return 0;
559
560 if (!strncmp(file->mime, "image/", 6))
561 return 1;
562
563 return 0;
564}
565
566static Item *
567_pan_item_add(Evas_Object *obj, Evry_Item *item)
568{
569 Smart_Data *sd = evas_object_smart_data_get(obj);
570 Item *it;
571
572 it = E_NEW(Item, 1);
573 if (!it) return NULL;
574
575 sd->items = eina_list_append(sd->items, it);
576 it->obj = obj;
577 it->item = item;
578
579 if (_check_item(item))
580 it->get_thumb = EINA_TRUE;
581
582
583 evry_item_ref(item);
584
585 _e_smart_reconfigure(obj);
586
587 return it;
588}
589
590static void
591_pan_item_remove(Evas_Object *obj, Item *it)
592{
593 Smart_Data *sd = evas_object_smart_data_get(obj);
594
595 sd->items = eina_list_remove(sd->items, it);
596 if (it->do_thumb) e_thumb_icon_end(it->thumb);
597 if (it->thumb) evas_object_del(it->thumb);
598 if (it->frame) evas_object_del(it->frame);
599 if (it->image) evas_object_del(it->image);
600
601 evry_item_free(it->item);
602
603 E_FREE(it);
604
605 _e_smart_reconfigure(obj);
606}
607
608static void
609_pan_item_select(Evas_Object *obj, Item *it)
610{
611 Smart_Data *sd = evas_object_smart_data_get(obj);
612
613 sd->sel_item->selected = EINA_FALSE;
614 edje_object_signal_emit(sd->sel_item->frame, "e,state,unselected", "e");
615 sd->sel_item = it;
616 sd->sel_item->selected = EINA_TRUE;
617
618 if (sd->zoom < 2)
619 edje_object_signal_emit(sd->sel_item->frame, "e,state,selected", "e");
620
621 sd->update = EINA_FALSE;
622
623 if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
624 sd->idle_enter = ecore_idle_enterer_add(_e_smart_reconfigure_do, obj);
625}
626
627static void
628_view_clear(Evry_View *view)
629{
630 View *v = (View*) view;
631 Smart_Data *sd = evas_object_smart_data_get(v->span);
632 Item *it;
633
634 EINA_LIST_FREE(sd->items, it)
635 {
636 if (it->thumb) evas_object_del(it->thumb);
637 if (it->frame) evas_object_del(it->frame);
638 if (it->image) evas_object_del(it->image);
639 evry_item_free(it->item);
640 E_FREE(it);
641 }
642
643 if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
644 sd->idle_enter = ecore_idle_enterer_add(_e_smart_reconfigure_do, v->span);
645
646 v->tabs->clear(v->tabs);
647}
648
649static int
650_sort_cb(const void *data1, const void *data2)
651{
652 const Item *it1 = data1;
653 const Item *it2 = data2;
654
655 return it1->pos - it2->pos;
656}
657
658static int
659_view_update(Evry_View *view)
660{
661 VIEW(v, view);
662 Smart_Data *sd = evas_object_smart_data_get(v->span);
663 Item *v_it;
664 Evry_Item *p_it;
665 Eina_List *l, *ll, *p_items, *v_remove = NULL, *v_items = NULL;
666 int pos, last_pos;
667
668 if (!v->state->plugin)
669 {
670 _view_clear(view);
671 return 1;
672 }
673
674 p_items = v->state->plugin->items;
675
676 EINA_LIST_FOREACH(sd->items, l, v_it)
677 {
678 last_pos = v_it->pos;
679 v_it->pos = 0;
680 pos = 1;
681 EINA_LIST_FOREACH(p_items, ll, p_it)
682 {
683 if (v_it->item == p_it)
684 {
685 if (pos != last_pos)
686 v_it->changed = EINA_TRUE;
687
688 v_it->pos = pos;
689
690 if (p_it == v->state->sel_item)
691 {
692 sd->sel_item = v_it;
693 v_it->selected = EINA_TRUE;
694 }
695 else
696 v_it->selected = EINA_FALSE;
697
698 break;
699 }
700 pos++;
701 }
702
703 if(v_it->pos)
704 {
705 v_items = eina_list_append(v_items, v_it->item);
706 if (_check_item(v_it->item))
707 v_it->get_thumb = EINA_TRUE;
708 }
709
710 else
711 v_remove = eina_list_append(v_remove, v_it);
712 }
713
714 if (v_remove)
715 sd->update = EINA_TRUE;
716
717 EINA_LIST_FREE(v_remove, v_it)
718 _pan_item_remove(v->span, v_it);
719
720 pos = 1;
721 int added = 0;
722
723 EINA_LIST_FOREACH(p_items, l, p_it)
724 {
725 if (!eina_list_data_find_list(v_items, p_it))
726 {
727 added = 1;
728 v_it = _pan_item_add(v->span, p_it);
729
730 if (v_it)
731 {
732 v_it->pos = pos;
733
734 if (p_it == v->state->sel_item)
735 {
736 sd->sel_item = v_it;
737 v_it->selected = EINA_TRUE;
738 }
739 }
740 }
741 pos++;
742 }
743
744 sd->items = eina_list_sort(sd->items, pos - 1, _sort_cb);
745
746 if (added)
747 sd->update = EINA_TRUE;
748
749 if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
750 sd->idle_enter = ecore_idle_enterer_add(_e_smart_reconfigure_do, v->span);
751
752 if (v_items) eina_list_free(v_items);
753
754 v->tabs->update(v->tabs);
755
756 return 1;
757}
758
759static int
760_cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
761{
762 View *v = (View *) view;
763 Smart_Data *sd = evas_object_smart_data_get(v->span);
764 Eina_List *l = NULL, *ll;
765 Item *it = NULL;
766
767 if (!v->state->plugin)
768 return 0;
769
770 if (v->tabs->key_down(v->tabs, ev))
771 {
772 _view_update(view);
773 return 1;
774 }
775
776 if (sd->items)
777 l = eina_list_data_find_list(sd->items, sd->sel_item);
778
779 if (!strcmp(ev->key, "Right"))
780 {
781 if (l && l->next)
782 it = l->next->data;
783
784 if (it)
785 {
786 _pan_item_select(v->span, it);
787 evry_item_select(v->state, it->item);
788 }
789 goto end;
790 }
791 else if (!strcmp(ev->key, "Left"))
792 {
793 if (!sd->items) return 1;
794
795 if (l && l->prev)
796 it = l->prev->data;
797
798 if (it)
799 {
800 _pan_item_select(v->span, it);
801 evry_item_select(v->state, it->item);
802 }
803 goto end;
804 }
805 else if (!strcmp(ev->key, "Down"))
806 {
807 if (!sd->items) return 1;
808
809 EINA_LIST_FOREACH(l, ll, it)
810 {
811 if (it->y > sd->sel_item->y &&
812 it->x >= sd->sel_item->x)
813 break;
814 }
815
816 if (!it && l && l->next)
817 it = l->next->data;
818
819 if (it)
820 {
821 _pan_item_select(v->span, it);
822 evry_item_select(v->state, it->item);
823 }
824 goto end;
825 }
826 else if (!strcmp(ev->key, "Up"))
827 {
828 if (!sd->items) return 1;
829
830 EINA_LIST_REVERSE_FOREACH(l, ll, it)
831 {
832 if (it->y < sd->sel_item->y &&
833 it->x <= sd->sel_item->x)
834 break;
835 }
836
837 if (!it && l && l->prev)
838 it = l->prev->data;
839
840 if (it)
841 {
842 _pan_item_select(v->span, it);
843 evry_item_select(v->state, it->item);
844 }
845 goto end;
846 }
847 else if (!strcmp(ev->key, "plus") ||
848 ((ev->modifiers & ECORE_EVENT_MODIFIER_ALT) &&
849 (!strcmp(ev->key, "z"))))
850 {
851 sd->zoom++;
852 if (sd->zoom > 2) sd->zoom = 0;
853
854 if (sd->zoom == 2)
855 {
856 EINA_LIST_FOREACH(sd->items, l, it)
857 {
858 if (it->have_thumb)
859 {
860 evas_object_del(it->thumb);
861 it->thumb = NULL;
862 it->have_thumb = EINA_FALSE;
863 }
864 else if (it->do_thumb)
865 {
866 e_thumb_icon_end(it->thumb);
867 evas_object_del(it->thumb);
868 it->thumb = NULL;
869 it->do_thumb = EINA_FALSE;
870 }
871 }
872 }
873
874
875 if (sd->idle_enter) ecore_idle_enterer_del(sd->idle_enter);
876 sd->idle_enter = ecore_idle_enterer_add(_e_smart_reconfigure_do, v->span);
877
878