summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-07-28 04:35:45 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-07-28 04:35:45 +0000
commitd2ea9aee5df6a2bf02651bce782c798ad67540af (patch)
treedd903dc18c7c55a28b4cb20acbafaab5469ba225
parentf4f1ad13b4b01202ab631674b03a5057c833cf9b (diff)
1. start work on dialog stuff
2. fix edge flip stuff 3. fix ghost windows stuff 4. spec SVN revision: 15925
-rw-r--r--TODO3
-rw-r--r--data/themes/Makefile.am3
-rw-r--r--data/themes/default.edc1
-rw-r--r--data/themes/default_dialog.edc253
-rw-r--r--enlightenment.spec9
-rw-r--r--src/bin/Makefile.am4
-rw-r--r--src/bin/e_border.c110
-rw-r--r--src/bin/e_border.h2
-rw-r--r--src/bin/e_dialog.c214
-rw-r--r--src/bin/e_dialog.h35
-rw-r--r--src/bin/e_includes.h1
-rw-r--r--src/bin/e_int_menus.c25
-rw-r--r--src/bin/e_manager.c18
-rw-r--r--src/bin/e_manager.h2
-rw-r--r--src/bin/e_object.c4
-rw-r--r--src/bin/e_object.h4
-rw-r--r--src/bin/e_test.c23
-rw-r--r--src/bin/e_zone.c4
-rw-r--r--src/modules/pager/e_mod_main.c4
-rw-r--r--src/modules/start/e_mod_main.c1
20 files changed, 627 insertions, 93 deletions
diff --git a/TODO b/TODO
index 3a672057f..3484c714a 100644
--- a/TODO
+++ b/TODO
@@ -22,9 +22,6 @@ Some of the things (in very short form) that need to be done to E17...
22 map/unmap event and something else... they still are around in x- just e 22 map/unmap event and something else... they still are around in x- just e
23 hides them and never shows them again 23 hides them and never shows them again
24 fullscreen. is this correct? 24 fullscreen. is this correct?
25* BUG: client windows list somehow doesn't unref its list of borders in the
26 free callback set on it. why? is this callback never called? or is the
27 data pointer on the menu object null for some reason?
28* BUG: if you have 2 zones and you fill up zone 2 (right) mostly and then run 25* BUG: if you have 2 zones and you fill up zone 2 (right) mostly and then run
29 a big xev (xev -g 1280x1024) that wont fit it gets placed offscreen to the 26 a big xev (xev -g 1280x1024) that wont fit it gets placed offscreen to the
30 right of zone 2 27 right of zone 2
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index 291aa6b5c..7735a259b 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -30,7 +30,8 @@ default_cpufreq.edc \
30default_ibox.edc \ 30default_ibox.edc \
31default_start.edc \ 31default_start.edc \
32default_winlist.edc \ 32default_winlist.edc \
33default_transitions.edc 33default_transitions.edc \
34default_dialog.edc
34 35
35default.edj: Makefile $(EXTRA_DIST) 36default.edj: Makefile $(EXTRA_DIST)
36 $(EDJE_CC) $(EDJE_FLAGS) \ 37 $(EDJE_CC) $(EDJE_FLAGS) \
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 82d849cb3..e7edee240 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -39,5 +39,6 @@ collections {
39#include "default_start.edc" 39#include "default_start.edc"
40#include "default_winlist.edc" 40#include "default_winlist.edc"
41#include "default_transitions.edc" 41#include "default_transitions.edc"
42#include "default_dialog.edc"
42} 43}
43 44
diff --git a/data/themes/default_dialog.edc b/data/themes/default_dialog.edc
new file mode 100644
index 000000000..bac73753b
--- /dev/null
+++ b/data/themes/default_dialog.edc
@@ -0,0 +1,253 @@
1images {
2 image: "e17_menu_bg.png" COMP;
3 image: "e17_winlist_top.png" COMP;
4 image: "e17_winlist_bottom.png" COMP;
5 image: "e17_button2.png" COMP;
6 image: "e17_button.png" COMP;
7}
8
9group {
10 name: "widgets/dialog/main";
11 parts {
12 part {
13 name: "base";
14 mouse_events: 0;
15 type: RECT;
16 description {
17 state: "default" 0.0;
18 rel1 {
19 relative: 0.0 1.0;
20 offset: 1 0;
21 to_y: "base2";
22 }
23 rel2 {
24 relative: 1.0 1.0;
25 offset: -2 -2;
26 }
27 color: 221 221 221 255;
28 }
29 }
30 part {
31 name: "base2";
32 mouse_events: 0;
33 description {
34 state: "default" 0.0;
35 max: 99999 48;
36 align: 0.5 0.0;
37 rel1 {
38 relative: 0.0 0.0;
39 offset: 1 1;
40 }
41 rel2 {
42 relative: 1.0 1.0;
43 offset: -2 -2;
44 }
45 image {
46 normal: "e17_menu_bg.png";
47 }
48 fill {
49 smooth: 0;
50 }
51 }
52 }
53 part {
54 name: "base3";
55 mouse_events: 0;
56 description {
57 state: "default" 0.0;
58 rel1 {
59 relative: 0.0 0.0;
60 offset: 0 0;
61 }
62 rel2 {
63 relative: 1.0 1.0;
64 offset: -1 -1;
65 }
66 image {
67 normal: "e17_menu_bg_border.png";
68 border: 1 1 1 1;
69 middle: 0;
70 }
71 fill {
72 smooth: 0;
73 }
74 }
75 }
76 part {
77 name: "icon_swallow";
78 type: SWALLOW;
79 description {
80 state: "default" 0.0;
81 align: 0.0 0.5;
82 color: 0 0 0 0;
83 rel1 {
84 relative: 0.0 0.0;
85 offset: 16 16;
86 }
87 rel2 {
88 relative: 0.0 0.0;
89 offset: 16 -9;
90 to_y: "buttons_swallow";
91 }
92 }
93 }
94 part {
95 name: "content_swallow";
96 type: SWALLOW;
97 description {
98 state: "default" 0.0;
99 color: 0 0 0 0;
100 rel1 {
101 relative: 1.0 0.0;
102 offset: 8 16;
103 to_x: "icon_swallow";
104 }
105 rel2 {
106 relative: 1.0 0.0;
107 offset: -17 -9;
108 to_y: "buttons_swallow";
109 }
110 }
111 }
112 part {
113 name: "top";
114 mouse_events: 0;
115 description {
116 state: "default" 0.0;
117 rel1 {
118 relative: 0.0 0.0;
119 offset: 1 1;
120 }
121 rel2 {
122 relative: 1.0 0.0;
123 offset: -2 16;
124 to_y: "content_swallow";
125 }
126 image {
127 normal: "e17_winlist_top.png";
128 border: 0 0 0 19;
129 }
130 fill {
131 smooth: 0;
132 }
133 }
134 }
135 part {
136 name: "bottom";
137 mouse_events: 0;
138 description {
139 state: "default" 0.0;
140 rel1 {
141 relative: 0.0 1.0;
142 offset: 1 -3;
143 to_y: "content_swallow";
144 }
145 rel2 {
146 relative: 1.0 1.0;
147 offset: -2 -2;
148 }
149 image {
150 normal: "e17_winlist_bottom.png";
151 border: 0 0 4 0;
152 }
153 fill {
154 smooth: 0;
155 }
156 }
157 }
158 part {
159 name: "buttons_swallow";
160 type: SWALLOW;
161 description {
162 state: "default" 0.0;
163 color: 0 0 0 0;
164 align: 0.5 1.0;
165 rel1 {
166 relative: 0.0 1.0;
167 offset: 16 -9;
168 }
169 rel2 {
170 relative: 1.0 1.0;
171 offset: -17 -9;
172 }
173 }
174 }
175 }
176}
177
178group {
179 name: "widgets/dialog/button";
180 parts {
181 part {
182 name: "button_image";
183 type: IMAGE;
184 mouse_events: 1;
185 description {
186 state: "default" 0.0;
187 min: 64 32;
188 image {
189 normal: "e17_button.png";
190 border: 8 8 8 8;
191 }
192 }
193 description {
194 state: "clicked" 0.0;
195 min: 64 32;
196 image {
197 normal: "e17_button2.png";
198 border: 8 8 8 8;
199 }
200 }
201 }
202 part {
203 name: "button_text";
204 type: TEXT;
205 effect: SHADOW;
206 mouse_events: 0;
207 description {
208 state: "default" 0.0;
209 rel1 {
210 relative: 0.0 0.0;
211 offset: 6 6;
212 to: "button_image";
213 }
214 rel2 {
215 relative: 1.0 1.0;
216 offset: -7 -7;
217 to: "button_image";
218 }
219 color: 0 0 0 255;
220 color3: 255 255 255 128;
221 text {
222 text: "OK";
223 font: "Edje Vera";
224 size: 10;
225 min: 0 0;
226 align: 0.5 0.5;
227 }
228 }
229 }
230 }
231 programs {
232 program {
233 name: "button_click";
234 signal: "mouse,down,1";
235 source: "button_image";
236 action: STATE_SET "clicked" 0.0;
237 target: "button_image";
238 }
239 program {
240 name: "button_unclick";
241 signal: "mouse,up,1";
242 source: "button_image";
243 action: STATE_SET "default" 0.0;
244 target: "button_image";
245 }
246 program {
247 name: "button_unclick2";
248 signal: "mouse,clicked";
249 source: "button_image";
250 action: SIGNAL_EMIT "click" "";
251 }
252 }
253}
diff --git a/enlightenment.spec b/enlightenment.spec
index ba3be9a6b..75aff441a 100644
--- a/enlightenment.spec
+++ b/enlightenment.spec
@@ -1,6 +1,6 @@
1Summary: The Enlightenment window manager 1Summary: The Enlightenment window manager
2Name: enlightenment 2Name: enlightenment
3Version: 0.17.0_pre10 3Version: 0.16.999.011
4Release: NOT_RELEASE_1.%(date '+%Y%m%d') 4Release: NOT_RELEASE_1.%(date '+%Y%m%d')
5License: BSD 5License: BSD
6Group: User Interface/Desktops 6Group: User Interface/Desktops
@@ -52,16 +52,17 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
52%defattr(-, root, root) 52%defattr(-, root, root)
53%doc AUTHORS COPYING COPYING-PLAIN README 53%doc AUTHORS COPYING COPYING-PLAIN README
54%{_bindir}/* 54%{_bindir}/*
55%{_libdir}/libe.so.*
55%{_libdir}/%{name} 56%{_libdir}/%{name}
56%{_datadir}/%{name} 57%{_datadir}/%{name}
58%{_datadir}/locale/*
57 59
58%files devel 60%files devel
59%defattr(-, root, root) 61%defattr(-, root, root)
60%{_includedir}/enlightenment/*.h 62%{_includedir}/enlightenment/*.h
61%{_includedir}/E.h 63%{_includedir}/E_Lib.h
62%{_libdir}/libe.a 64%{_libdir}/libe.a
63%{_libdir}/libe.la 65%{_libdir}/libe.la
64%{_libdir}/libe.so.0.0.0 66%{_libdir}/libe.so
65
66 67
67%changelog 68%changelog
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 2f55f1856..4cc986e58 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -67,7 +67,8 @@ e_grabinput.h \
67e_bg.h \ 67e_bg.h \
68e_remember.h \ 68e_remember.h \
69e_win.h \ 69e_win.h \
70e_pan.h 70e_pan.h \
71e_dialog.h
71 72
72enlightenment_SOURCES = \ 73enlightenment_SOURCES = \
73e_main.c \ 74e_main.c \
@@ -124,6 +125,7 @@ e_bg.c \
124e_remember.c \ 125e_remember.c \
125e_win.c \ 126e_win.c \
126e_pan.c \ 127e_pan.c \
128e_dialog.c \
127$(ENLIGHTENMENTHEADERS) 129$(ENLIGHTENMENTHEADERS)
128 130
129enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ 131enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index 4e80d25b9..c573ff631 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -490,7 +490,7 @@ e_border_zone_set(E_Border *bd, E_Zone *zone)
490 ev = calloc(1, sizeof(E_Event_Border_Zone_Set)); 490 ev = calloc(1, sizeof(E_Event_Border_Zone_Set));
491 ev->border = bd; 491 ev->border = bd;
492 e_object_ref(E_OBJECT(bd)); 492 e_object_ref(E_OBJECT(bd));
493 e_object_breadcrumb_add(E_OBJECT(bd), "border_zone_set_event"); 493// e_object_breadcrumb_add(E_OBJECT(bd), "border_zone_set_event");
494 ev->zone = zone; 494 ev->zone = zone;
495 e_object_ref(E_OBJECT(zone)); 495 e_object_ref(E_OBJECT(zone));
496 ecore_event_add(E_EVENT_BORDER_ZONE_SET, ev, _e_border_event_border_zone_set_free, NULL); 496 ecore_event_add(E_EVENT_BORDER_ZONE_SET, ev, _e_border_event_border_zone_set_free, NULL);
@@ -516,7 +516,7 @@ e_border_desk_set(E_Border *bd, E_Desk *desk)
516 ev = calloc(1, sizeof(E_Event_Border_Desk_Set)); 516 ev = calloc(1, sizeof(E_Event_Border_Desk_Set));
517 ev->border = bd; 517 ev->border = bd;
518 e_object_ref(E_OBJECT(bd)); 518 e_object_ref(E_OBJECT(bd));
519 e_object_breadcrumb_add(E_OBJECT(bd), "border_desk_set_event"); 519// e_object_breadcrumb_add(E_OBJECT(bd), "border_desk_set_event");
520 ev->desk = desk; 520 ev->desk = desk;
521 e_object_ref(E_OBJECT(desk)); 521 e_object_ref(E_OBJECT(desk));
522 ecore_event_add(E_EVENT_BORDER_DESK_SET, ev, _e_border_event_border_desk_set_free, NULL); 522 ecore_event_add(E_EVENT_BORDER_DESK_SET, ev, _e_border_event_border_desk_set_free, NULL);
@@ -545,7 +545,7 @@ e_border_show(E_Border *bd)
545 ev = calloc(1, sizeof(E_Event_Border_Show)); 545 ev = calloc(1, sizeof(E_Event_Border_Show));
546 ev->border = bd; 546 ev->border = bd;
547 e_object_ref(E_OBJECT(bd)); 547 e_object_ref(E_OBJECT(bd));
548 e_object_breadcrumb_add(E_OBJECT(bd), "border_show_event"); 548// e_object_breadcrumb_add(E_OBJECT(bd), "border_show_event");
549 ecore_event_add(E_EVENT_BORDER_SHOW, ev, _e_border_event_border_show_free, NULL); 549 ecore_event_add(E_EVENT_BORDER_SHOW, ev, _e_border_event_border_show_free, NULL);
550} 550}
551 551
@@ -598,7 +598,7 @@ e_border_hide(E_Border *bd, int manage)
598 ev = calloc(1, sizeof(E_Event_Border_Hide)); 598 ev = calloc(1, sizeof(E_Event_Border_Hide));
599 ev->border = bd; 599 ev->border = bd;
600 e_object_ref(E_OBJECT(bd)); 600 e_object_ref(E_OBJECT(bd));
601 e_object_breadcrumb_add(E_OBJECT(bd), "border_hide_event"); 601// e_object_breadcrumb_add(E_OBJECT(bd), "border_hide_event");
602 ecore_event_add(E_EVENT_BORDER_HIDE, ev, _e_border_event_border_hide_free, NULL); 602 ecore_event_add(E_EVENT_BORDER_HIDE, ev, _e_border_event_border_hide_free, NULL);
603 } 603 }
604} 604}
@@ -647,7 +647,7 @@ e_border_move(E_Border *bd, int x, int y)
647 ev = calloc(1, sizeof(E_Event_Border_Move)); 647 ev = calloc(1, sizeof(E_Event_Border_Move));
648 ev->border = bd; 648 ev->border = bd;
649 e_object_ref(E_OBJECT(bd)); 649 e_object_ref(E_OBJECT(bd));
650 e_object_breadcrumb_add(E_OBJECT(bd), "border_move_event"); 650// e_object_breadcrumb_add(E_OBJECT(bd), "border_move_event");
651 ecore_event_add(E_EVENT_BORDER_MOVE, ev, _e_border_event_border_move_free, NULL); 651 ecore_event_add(E_EVENT_BORDER_MOVE, ev, _e_border_event_border_move_free, NULL);
652} 652}
653 653
@@ -693,7 +693,7 @@ e_border_resize(E_Border *bd, int w, int h)
693 ev = calloc(1, sizeof(E_Event_Border_Resize)); 693 ev = calloc(1, sizeof(E_Event_Border_Resize));
694 ev->border = bd; 694 ev->border = bd;
695 e_object_ref(E_OBJECT(bd)); 695 e_object_ref(E_OBJECT(bd));
696 e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event"); 696// e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event");
697 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL); 697 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL);
698} 698}
699 699
@@ -748,13 +748,13 @@ e_border_move_resize(E_Border *bd, int x, int y, int w, int h)
748 mev = calloc(1, sizeof(E_Event_Border_Move)); 748 mev = calloc(1, sizeof(E_Event_Border_Move));
749 mev->border = bd; 749 mev->border = bd;
750 e_object_ref(E_OBJECT(bd)); 750 e_object_ref(E_OBJECT(bd));
751 e_object_breadcrumb_add(E_OBJECT(bd), "border_move_event"); 751// e_object_breadcrumb_add(E_OBJECT(bd), "border_move_event");
752 ecore_event_add(E_EVENT_BORDER_MOVE, mev, _e_border_event_border_move_free, NULL); 752 ecore_event_add(E_EVENT_BORDER_MOVE, mev, _e_border_event_border_move_free, NULL);
753 753
754 rev = calloc(1, sizeof(E_Event_Border_Resize)); 754 rev = calloc(1, sizeof(E_Event_Border_Resize));
755 rev->border = bd; 755 rev->border = bd;
756 e_object_ref(E_OBJECT(bd)); 756 e_object_ref(E_OBJECT(bd));
757 e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event"); 757// e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event");
758 ecore_event_add(E_EVENT_BORDER_RESIZE, rev, _e_border_event_border_resize_free, NULL); 758 ecore_event_add(E_EVENT_BORDER_RESIZE, rev, _e_border_event_border_resize_free, NULL);
759} 759}
760 760
@@ -772,7 +772,7 @@ e_border_raise(E_Border *bd)
772 ev = calloc(1, sizeof(E_Event_Border_Raise)); 772 ev = calloc(1, sizeof(E_Event_Border_Raise));
773 ev->border = bd; 773 ev->border = bd;
774 e_object_ref(E_OBJECT(bd)); 774 e_object_ref(E_OBJECT(bd));
775 e_object_breadcrumb_add(E_OBJECT(bd), "border_raise_event"); 775// e_object_breadcrumb_add(E_OBJECT(bd), "border_raise_event");
776 ev->above = NULL; 776 ev->above = NULL;
777 ecore_event_add(E_EVENT_BORDER_RAISE, ev, _e_border_event_border_raise_free, NULL); 777 ecore_event_add(E_EVENT_BORDER_RAISE, ev, _e_border_event_border_raise_free, NULL);
778 } 778 }
@@ -792,7 +792,7 @@ e_border_lower(E_Border *bd)
792 ev = calloc(1, sizeof(E_Event_Border_Lower)); 792 ev = calloc(1, sizeof(E_Event_Border_Lower));
793 ev->border = bd; 793 ev->border = bd;
794 e_object_ref(E_OBJECT(bd)); 794 e_object_ref(E_OBJECT(bd));
795 e_object_breadcrumb_add(E_OBJECT(bd), "border_lower_event"); 795// e_object_breadcrumb_add(E_OBJECT(bd), "border_lower_event");
796 ev->below = NULL; 796 ev->below = NULL;
797 ecore_event_add(E_EVENT_BORDER_LOWER, ev, _e_border_event_border_lower_free, NULL); 797 ecore_event_add(E_EVENT_BORDER_LOWER, ev, _e_border_event_border_lower_free, NULL);
798 } 798 }
@@ -812,10 +812,10 @@ e_border_stack_above(E_Border *bd, E_Border *above)
812 ev = calloc(1, sizeof(E_Event_Border_Raise)); 812 ev = calloc(1, sizeof(E_Event_Border_Raise));
813 ev->border = bd; 813 ev->border = bd;
814 e_object_ref(E_OBJECT(bd)); 814 e_object_ref(E_OBJECT(bd));
815 e_object_breadcrumb_add(E_OBJECT(bd), "border_raise_event"); 815// e_object_breadcrumb_add(E_OBJECT(bd), "border_raise_event");
816 ev->above = above; 816 ev->above = above;
817 e_object_ref(E_OBJECT(above)); 817 e_object_ref(E_OBJECT(above));
818 e_object_breadcrumb_add(E_OBJECT(above), "border_raise_event.above"); 818// e_object_breadcrumb_add(E_OBJECT(above), "border_raise_event.above");
819 ecore_event_add(E_EVENT_BORDER_RAISE, ev, _e_border_event_border_raise_free, NULL); 819 ecore_event_add(E_EVENT_BORDER_RAISE, ev, _e_border_event_border_raise_free, NULL);
820 } 820 }
821} 821}
@@ -833,10 +833,10 @@ e_border_stack_below(E_Border *bd, E_Border *below)
833 ev = calloc(1, sizeof(E_Event_Border_Lower)); 833 ev = calloc(1, sizeof(E_Event_Border_Lower));
834 ev->border = bd; 834 ev->border = bd;
835 e_object_ref(E_OBJECT(bd)); 835 e_object_ref(E_OBJECT(bd));
836 e_object_breadcrumb_add(E_OBJECT(bd), "border_lower_event"); 836// e_object_breadcrumb_add(E_OBJECT(bd), "border_lower_event");
837 ev->below = below; 837 ev->below = below;
838 e_object_ref(E_OBJECT(below)); 838 e_object_ref(E_OBJECT(below));
839 e_object_breadcrumb_add(E_OBJECT(below), "border_lower_event.below"); 839// e_object_breadcrumb_add(E_OBJECT(below), "border_lower_event.below");
840 ecore_event_add(E_EVENT_BORDER_LOWER, ev, _e_border_event_border_lower_free, NULL); 840 ecore_event_add(E_EVENT_BORDER_LOWER, ev, _e_border_event_border_lower_free, NULL);
841 } 841 }
842} 842}
@@ -1012,7 +1012,7 @@ e_border_shade(E_Border *bd, E_Direction dir)
1012 /* The resize is added in the animator when animation complete */ 1012 /* The resize is added in the animator when animation complete */
1013 /* For non-animated, we add it immediately with the new size */ 1013 /* For non-animated, we add it immediately with the new size */
1014 e_object_ref(E_OBJECT(bd)); 1014 e_object_ref(E_OBJECT(bd));
1015 e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event"); 1015// e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event");
1016 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL); 1016 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL);
1017 } 1017 }
1018 1018
@@ -1101,7 +1101,7 @@ e_border_unshade(E_Border *bd, E_Direction dir)
1101 /* The resize is added in the animator when animation complete */ 1101 /* The resize is added in the animator when animation complete */
1102 /* For non-animated, we add it immediately with the new size */ 1102 /* For non-animated, we add it immediately with the new size */
1103 e_object_ref(E_OBJECT(bd)); 1103 e_object_ref(E_OBJECT(bd));
1104 e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event"); 1104// e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event");
1105 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL); 1105 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL);
1106 } 1106 }
1107 1107
@@ -1384,7 +1384,7 @@ e_border_iconify(E_Border *bd)
1384 ev = E_NEW(E_Event_Border_Iconify, 1); 1384 ev = E_NEW(E_Event_Border_Iconify, 1);
1385 ev->border = bd; 1385 ev->border = bd;
1386 e_object_ref(E_OBJECT(bd)); 1386 e_object_ref(E_OBJECT(bd));
1387 e_object_breadcrumb_add(E_OBJECT(bd), "border_iconify_event"); 1387// e_object_breadcrumb_add(E_OBJECT(bd), "border_iconify_event");
1388 ecore_event_add(E_EVENT_BORDER_ICONIFY, ev, _e_border_event_border_iconify_free, NULL); 1388 ecore_event_add(E_EVENT_BORDER_ICONIFY, ev, _e_border_event_border_iconify_free, NULL);
1389} 1389}
1390 1390
@@ -1413,7 +1413,7 @@ e_border_uniconify(E_Border *bd)
1413 ev = E_NEW(E_Event_Border_Uniconify, 1); 1413 ev = E_NEW(E_Event_Border_Uniconify, 1);
1414 ev->border = bd; 1414 ev->border = bd;
1415 e_object_ref(E_OBJECT(bd)); 1415 e_object_ref(E_OBJECT(bd));
1416 e_object_breadcrumb_add(E_OBJECT(bd), "border_uniconify_event"); 1416// e_object_breadcrumb_add(E_OBJECT(bd), "border_uniconify_event");
1417 ecore_event_add(E_EVENT_BORDER_UNICONIFY, ev, _e_border_event_border_uniconify_free, NULL); 1417 ecore_event_add(E_EVENT_BORDER_UNICONIFY, ev, _e_border_event_border_uniconify_free, NULL);
1418 1418
1419} 1419}
@@ -1433,7 +1433,7 @@ e_border_stick(E_Border *bd)
1433 ev = E_NEW(E_Event_Border_Stick, 1); 1433 ev = E_NEW(E_Event_Border_Stick, 1);
1434 ev->border = bd; 1434 ev->border = bd;
1435 e_object_ref(E_OBJECT(bd)); 1435 e_object_ref(E_OBJECT(bd));
1436 e_object_breadcrumb_add(E_OBJECT(bd), "border_stick_event"); 1436// e_object_breadcrumb_add(E_OBJECT(bd), "border_stick_event");
1437 ecore_event_add(E_EVENT_BORDER_STICK, ev, _e_border_event_border_stick_free, NULL); 1437 ecore_event_add(E_EVENT_BORDER_STICK, ev, _e_border_event_border_stick_free, NULL);
1438} 1438}
1439 1439
@@ -1454,7 +1454,7 @@ e_border_unstick(E_Border *bd)
1454 ev = E_NEW(E_Event_Border_Unstick, 1); 1454 ev = E_NEW(E_Event_Border_Unstick, 1);
1455 ev->border = bd; 1455 ev->border = bd;
1456 e_object_ref(E_OBJECT(bd)); 1456 e_object_ref(E_OBJECT(bd));
1457 e_object_breadcrumb_add(E_OBJECT(bd), "border_unstick_event"); 1457// e_object_breadcrumb_add(E_OBJECT(bd), "border_unstick_event");
1458 ecore_event_add(E_EVENT_BORDER_UNSTICK, ev, _e_border_event_border_unstick_free, NULL); 1458 ecore_event_add(E_EVENT_BORDER_UNSTICK, ev, _e_border_event_border_unstick_free, NULL);
1459} 1459}
1460 1460
@@ -1614,13 +1614,11 @@ e_border_act_move_begin(E_Border *bd, Ecore_X_Event_Mouse_Button_Down *ev)
1614void 1614void
1615e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev) 1615e_border_act_move_end(E_Border *bd, Ecore_X_Event_Mouse_Button_Up *ev)
1616{ 1616{
1617 if (bd->moving) 1617 if (!bd->moving) return;
1618 { 1618 bd->moving = 0;
1619 e_zone_flip_win_restore(); 1619 e_zone_flip_win_restore();
1620 bd->moving = 0; 1620 _e_border_move_end(bd);
1621 _e_border_move_end(bd); 1621 e_zone_flip_coords_handle(bd->zone, -1, -1);
1622 e_zone_flip_coords_handle(bd->zone, -1, -1);
1623 }
1624} 1622}
1625 1623
1626void 1624void
@@ -1877,11 +1875,7 @@ e_border_ping(E_Border *bd)
1877void 1875void
1878e_border_move_cancel(void) 1876e_border_move_cancel(void)
1879{ 1877{
1880 if (move) 1878 if (move) _e_border_move_end(move);
1881 {
1882 move->moving = 0;
1883 _e_border_move_end(move);
1884 }
1885} 1879}
1886 1880
1887void 1881void
@@ -1933,11 +1927,13 @@ _e_border_free(E_Border *bd)
1933 1927
1934 IF_FREE(bd->shape_rects); 1928 IF_FREE(bd->shape_rects);
1935 bd->shape_rects_num = 0; 1929 bd->shape_rects_num = 0;
1930/*
1936 if (bd->dangling_ref_check) 1931 if (bd->dangling_ref_check)
1937 { 1932 {
1938 ecore_timer_del(bd->dangling_ref_check); 1933 ecore_timer_del(bd->dangling_ref_check);
1939 bd->dangling_ref_check = NULL; 1934 bd->dangling_ref_check = NULL;
1940 } 1935 }
1936 */
1941 if (bd->kill_timer) 1937 if (bd->kill_timer)
1942 { 1938 {
1943 ecore_timer_del(bd->kill_timer); 1939 ecore_timer_del(bd->kill_timer);
@@ -2017,6 +2013,7 @@ _e_border_free(E_Border *bd)
2017 free(bd); 2013 free(bd);
2018} 2014}
2019 2015
2016/*
2020static int 2017static int
2021_e_border_del_dangling_ref_check(void *data) 2018_e_border_del_dangling_ref_check(void *data)
2022{ 2019{
@@ -2028,18 +2025,21 @@ _e_border_del_dangling_ref_check(void *data)
2028 printf("%p, %i, \"%s\" [\"%s\" \"%s\"]\n", 2025 printf("%p, %i, \"%s\" [\"%s\" \"%s\"]\n",
2029 bd, e_object_ref_get(E_OBJECT(bd)), bd->client.icccm.title, 2026 bd, e_object_ref_get(E_OBJECT(bd)), bd->client.icccm.title,
2030 bd->client.icccm.name, bd->client.icccm.class); 2027 bd->client.icccm.name, bd->client.icccm.class);
2031 e_object_breadcrumb_debug(E_OBJECT(bd)); 2028// e_object_breadcrumb_debug(E_OBJECT(bd));
2032 printf("---\n"); 2029 printf("---\n");
2033 return 1; 2030 return 1;
2034} 2031}
2032*/
2035 2033
2036static void 2034static void
2037_e_border_del(E_Border *bd) 2035_e_border_del(E_Border *bd)
2038{ 2036{
2039 E_Event_Border_Remove *ev; 2037 E_Event_Border_Remove *ev;
2040 2038
2039/*
2041 if (!bd->dangling_ref_check) 2040 if (!bd->dangling_ref_check)
2042 bd->dangling_ref_check = ecore_timer_add(1.0, _e_border_del_dangling_ref_check, bd); 2041 bd->dangling_ref_check = ecore_timer_add(1.0, _e_border_del_dangling_ref_check, bd);
2042 */
2043 if (!bd->already_unparented) 2043 if (!bd->already_unparented)
2044 { 2044 {
2045 ecore_x_window_reparent(bd->client.win, 2045 ecore_x_window_reparent(bd->client.win,
@@ -2055,7 +2055,7 @@ _e_border_del(E_Border *bd)
2055 /* FIXME Don't ref this during shutdown. And the event is pointless 2055 /* FIXME Don't ref this during shutdown. And the event is pointless
2056 * during shutdown.. */ 2056 * during shutdown.. */
2057 e_object_ref(E_OBJECT(bd)); 2057 e_object_ref(E_OBJECT(bd));
2058 e_object_breadcrumb_add(E_OBJECT(bd), "border_remove_event"); 2058// e_object_breadcrumb_add(E_OBJECT(bd), "border_remove_event");
2059 ecore_event_add(E_EVENT_BORDER_REMOVE, ev, _e_border_event_border_remove_free, NULL); 2059 ecore_event_add(E_EVENT_BORDER_REMOVE, ev, _e_border_event_border_remove_free, NULL);
2060} 2060}
2061 2061
@@ -3995,7 +3995,7 @@ _e_border_eval(E_Border *bd)
3995 ev = calloc(1, sizeof(E_Event_Border_Icon_Change)); 3995 ev = calloc(1, sizeof(E_Event_Border_Icon_Change));
3996 ev->border = bd; 3996 ev->border = bd;
3997 e_object_ref(E_OBJECT(bd)); 3997 e_object_ref(E_OBJECT(bd));
3998 e_object_breadcrumb_add(E_OBJECT(bd), "border_icon_change_event"); 3998// e_object_breadcrumb_add(E_OBJECT(bd), "border_icon_change_event");
3999 ecore_event_add(E_EVENT_BORDER_ICON_CHANGE, ev, 3999 ecore_event_add(E_EVENT_BORDER_ICON_CHANGE, ev,
4000 _e_border_event_border_icon_change_free, NULL); 4000 _e_border_event_border_icon_change_free, NULL);
4001 } 4001 }
@@ -4467,7 +4467,7 @@ _e_border_eval(E_Border *bd)
4467 ev = calloc(1, sizeof(E_Event_Border_Add)); 4467 ev = calloc(1, sizeof(E_Event_Border_Add));
4468 ev->border = bd; 4468 ev->border = bd;
4469 e_object_ref(E_OBJECT(bd)); 4469 e_object_ref(E_OBJECT(bd));
4470 e_object_breadcrumb_add(E_OBJECT(bd), "border_add_event"); 4470// e_object_breadcrumb_add(E_OBJECT(bd), "border_add_event");
4471 ecore_event_add(E_EVENT_BORDER_ADD, ev, _e_border_event_border_add_free, NULL); 4471 ecore_event_add(E_EVENT_BORDER_ADD, ev, _e_border_event_border_add_free, NULL);
4472 4472
4473 /* Recreate state */ 4473 /* Recreate state */
@@ -5081,7 +5081,7 @@ _e_border_shade_animator(void *data)
5081 ev = calloc(1, sizeof(E_Event_Border_Resize)); 5081 ev = calloc(1, sizeof(E_Event_Border_Resize));
5082 ev->border = bd; 5082 ev->border = bd;
5083 e_object_ref(E_OBJECT(bd)); 5083 e_object_ref(E_OBJECT(bd));
5084 e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event"); 5084// e_object_breadcrumb_add(E_OBJECT(bd), "border_resize_event");
5085 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL); 5085 ecore_event_add(E_EVENT_BORDER_RESIZE, ev, _e_border_event_border_resize_free, NULL);
5086 return 0; 5086 return 0;
5087 } 5087 }
@@ -6187,7 +6187,7 @@ _e_border_event_border_resize_free(void *data, void *ev)
6187 E_Event_Border_Resize *e; 6187 E_Event_Border_Resize *e;
6188 6188
6189 e = ev; 6189 e = ev;
6190 e_object_breadcrumb_del(E_OBJECT(e->border), "border_resize_event"); 6190// e_object_breadcrumb_del(E_OBJECT(e->border), "border_resize_event");
6191 e_object_unref(E_OBJECT(e->border)); 6191 e_object_unref(E_OBJECT(e->border));
6192 free(e); 6192 free(e);
6193} 6193}
@@ -6198,7 +6198,7 @@ _e_border_event_border_move_free(void *data, void *ev)
6198 E_Event_Border_Move *e; 6198 E_Event_Border_Move *e;
6199 6199
6200 e = ev; 6200 e = ev;
6201 e_object_breadcrumb_del(E_OBJECT(e->border), "border_move_event"); 6201// e_object_breadcrumb_del(E_OBJECT(e->border), "border_move_event");
6202 e_object_unref(E_OBJECT(e->border)); 6202 e_object_unref(E_OBJECT(e->border));
6203 free(e); 6203 free(e);
6204} 6204}
@@ -6209,7 +6209,7 @@ _e_border_event_border_add_free(void *data, void *ev)
6209 E_Event_Border_Add *e; 6209 E_Event_Border_Add *e;
6210 6210
6211 e = ev; 6211 e = ev;
6212 e_object_breadcrumb_del(E_OBJECT(e->border), "border_add_event"); 6212// e_object_breadcrumb_del(E_OBJECT(e->border), "border_add_event");
6213 e_object_unref(E_OBJECT(e->border)); 6213 e_object_unref(E_OBJECT(e->border));
6214 free(e); 6214 free(e);
6215} 6215}
@@ -6220,7 +6220,7 @@ _e_border_event_border_remove_free(void *data, void *ev)
6220 E_Event_Border_Remove *e; 6220 E_Event_Border_Remove *e;
6221 6221
6222 e = ev; 6222 e = ev;
6223 e_object_breadcrumb_del(E_OBJECT(e->border), "border_remove_event"); 6223// e_object_breadcrumb_del(E_OBJECT(e->border), "border_remove_event");
6224 e_object_unref(E_OBJECT(e->border)); 6224 e_object_unref(E_OBJECT(e->border));
6225 free(e); 6225 free(e);
6226} 6226}
@@ -6231,7 +6231,7 @@ _e_border_event_border_show_free(void *data, void *ev)
6231 E_Event_Border_Show *e; 6231 E_Event_Border_Show *e;
6232 6232
6233 e = ev; 6233 e = ev;
6234 e_object_breadcrumb_del(E_OBJECT(e->border), "border_show_event"); 6234// e_object_breadcrumb_del(E_OBJECT(e->border), "border_show_event");
6235 e_object_unref(E_OBJECT(e->border)); 6235 e_object_unref(E_OBJECT(e->border));
6236 free(e); 6236 free(e);
6237} 6237}
@@ -6242,7 +6242,7 @@ _e_border_event_border_hide_free(void *data, void *ev)
6242 E_Event_Border_Hide *e; 6242 E_Event_Border_Hide *e;
6243 6243
6244 e = ev; 6244 e = ev;
6245 e_object_breadcrumb_del(E_OBJECT(e->border), "border_hide_event"); 6245// e_object_breadcrumb_del(E_OBJECT(e->border), "border_hide_event");
6246 e_object_unref(E_OBJECT(e->border)); 6246 e_object_unref(E_OBJECT(e->border));
6247 free(e); 6247 free(e);
6248} 6248}
@@ -6253,7 +6253,7 @@ _e_border_event_border_iconify_free(void *data, void *ev)
6253 E_Event_Border_Iconify *e; 6253 E_Event_Border_Iconify *e;
6254 6254
6255 e = ev; 6255 e = ev;
6256 e_object_breadcrumb_del(E_OBJECT(e->border), "border_iconify_event"); 6256// e_object_breadcrumb_del(E_OBJECT(e->border), "border_iconify_event");
6257 e_object_unref(E_OBJECT(e->border)); 6257 e_object_unref(E_OBJECT(e->border));
6258 free(e); 6258 free(e);
6259} 6259}
@@ -6264,7 +6264,7 @@ _e_border_event_border_uniconify_free(void *data, void *ev)
6264 E_Event_Border_Uniconify *e; 6264 E_Event_Border_Uniconify *e;
6265 6265
6266 e = ev; 6266 e = ev;
6267 e_object_breadcrumb_del(E_OBJECT(e->border), "border_uniconify_event"); 6267// e_object_breadcrumb_del(E_OBJECT(e->border), "border_uniconify_event");
6268 e_object_unref(E_OBJECT(e->border)); 6268 e_object_unref(E_OBJECT(e->border));
6269 free(e); 6269 free(e);
6270} 6270}
@@ -6275,7 +6275,7 @@ _e_border_event_border_stick_free(void *data, void *ev)
6275 E_Event_Border_Stick *e; 6275 E_Event_Border_Stick *e;
6276 6276
6277 e = ev; 6277 e = ev;
6278 e_object_breadcrumb_del(E_OBJECT(e->border), "border_stick_event"); 6278// e_object_breadcrumb_del(E_OBJECT(e->border), "border_stick_event");
6279 e_object_unref(E_OBJECT(e->border)); 6279 e_object_unref(E_OBJECT(e->border));
6280 free(e); 6280 free(e);
6281} 6281}
@@ -6286,7 +6286,7 @@ _e_border_event_border_unstick_free(void *data, void *ev)
6286 E_Event_Border_Unstick *e; 6286 E_Event_Border_Unstick *e;
6287 6287
6288 e = ev; 6288 e = ev;
6289 e_object_breadcrumb_del(E_OBJECT(e->border), "border_unstick_event"); 6289// e_object_breadcrumb_del(E_OBJECT(e->border), "border_unstick_event");
6290 e_object_unref(E_OBJECT(e->border)); 6290 e_object_unref(E_OBJECT(e->border));
6291 free(e); 6291 free(e);
6292} 6292}
@@ -6297,7 +6297,7 @@ _e_border_event_border_zone_set_free(void *data, void *ev)
6297 E_Event_Border_Zone_Set *e; 6297 E_Event_Border_Zone_Set *e;
6298 6298
6299 e = ev; 6299 e = ev;
6300 e_object_breadcrumb_del(E_OBJECT(e->border), "border_zone_set_event"); 6300// e_object_breadcrumb_del(E_OBJECT(e->border), "border_zone_set_event");
6301 e_object_unref(E_OBJECT(e->border)); 6301 e_object_unref(E_OBJECT(e->border));
6302 e_object_unref(E_OBJECT(e->zone)); 6302 e_object_unref(E_OBJECT(e->zone));
6303 free(e); 6303 free(e);
@@ -6309,7 +6309,7 @@ _e_border_event_border_desk_set_free(void *data, void *ev)
6309 E_Event_Border_Desk_Set *e; 6309 E_Event_Border_Desk_Set *e;
6310 6310
6311 e = ev; 6311 e = ev;
6312 e_object_breadcrumb_del(E_OBJECT(e->border), "border_desk_set_event"); 6312// e_object_breadcrumb_del(E_OBJECT(e->border), "border_desk_set_event");
6313 e_object_unref(E_OBJECT(e->border)); 6313 e_object_unref(E_OBJECT(e->border));
6314 e_object_unref(E_OBJECT(e->desk)); 6314 e_object_unref(E_OBJECT(e->desk));
6315 free(e); 6315 free(e);
@@ -6321,11 +6321,11 @@ _e_border_event_border_raise_free(void *data, void *ev)
6321 E_Event_Border_Raise *e; 6321 E_Event_Border_Raise *e;
6322 6322
6323 e = ev; 6323 e = ev;
6324 e_object_breadcrumb_del(E_OBJECT(e->border), "border_raise_event"); 6324// e_object_breadcrumb_del(E_OBJECT(e->border), "border_raise_event");
6325 e_object_unref(E_OBJECT(e->border)); 6325 e_object_unref(E_OBJECT(e->border));
6326 if (e->above) 6326 if (e->above)
6327 { 6327 {
6328 e_object_breadcrumb_del(E_OBJECT(e->above), "border_raise_event.above"); 6328// e_object_breadcrumb_del(E_OBJECT(e->above), "border_raise_event.above");
6329 e_object_unref(E_OBJECT(e->above)); 6329 e_object_unref(E_OBJECT(e->above));
6330 } 6330 }
6331 free(e); 6331 free(e);
@@ -6337,11 +6337,11 @@ _e_border_event_border_lower_free(void *data, void *ev)
6337 E_Event_Border_Lower *e; 6337 E_Event_Border_Lower *e;
6338 6338
6339 e = ev; 6339 e = ev;
6340 e_object_breadcrumb_del(E_OBJECT(e->border), "border_lower_event"); 6340// e_object_breadcrumb_del(E_OBJECT(e->border), "border_lower_event");
6341 e_object_unref(E_OBJECT(e->border)); 6341 e_object_unref(E_OBJECT(e->border));
6342 if (e->below) 6342 if (e->below)
6343 { 6343 {
6344 e_object_breadcrumb_del(E_OBJECT(e->below), "border_lower_event.below"); 6344// e_object_breadcrumb_del(E_OBJECT(e->below), "border_lower_event.below");
6345 e_object_unref(E_OBJECT(e->below)); 6345 e_object_unref(E_OBJECT(e->below));
6346 } 6346 }
6347 free(e); 6347 free(e);
@@ -6353,7 +6353,7 @@ _e_border_event_border_icon_change_free(void *data, void *ev)
6353 E_Event_Border_Icon_Change *e; 6353 E_Event_Border_Icon_Change *e;
6354 6354
6355 e = ev; 6355 e = ev;
6356 e_object_breadcrumb_del(E_OBJECT(e->border), "border_icon_change_event"); 6356// e_object_breadcrumb_del(E_OBJECT(e->border), "border_icon_change_event");
6357 e_object_unref(E_OBJECT(e->border)); 6357 e_object_unref(E_OBJECT(e->border));
6358 free(e); 6358 free(e);
6359} 6359}
diff --git a/src/bin/e_border.h b/src/bin/e_border.h
index 465c894b1..917436f37 100644
--- a/src/bin/e_border.h
+++ b/src/bin/e_border.h
@@ -371,7 +371,7 @@ struct _E_Border
371 Ecore_X_Rectangle *shape_rects; 371 Ecore_X_Rectangle *shape_rects;
372 E_Remember *remember; 372 E_Remember *remember;
373 373
374 Ecore_Timer *dangling_ref_check; 374// Ecore_Timer *dangling_ref_check;
375}; 375};
376 376
377struct _E_Border_Pending_Move_Resize 377struct _E_Border_Pending_Move_Resize
diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c
new file mode 100644
index 000000000..e3c8a1a61
--- /dev/null
+++ b/src/bin/e_dialog.c
@@ -0,0 +1,214 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#include "e.h"
5
6typedef struct _E_Dialog_Button E_Dialog_Button;
7
8struct _E_Dialog_Button
9{
10 E_Dialog *dialog;
11 Evas_Object *obj;
12 char *label;
13 char *icon;
14 void (*func) (void *data, E_Dialog *dia);
15 void *data;
16};
17
18/* local subsystem functions */
19static void _e_dialog_free(E_Dialog *dia);
20static void _e_dialog_cb_button_clicked(void *data, Evas_Object *obj, const char *emission, const char *source);
21static void _e_dialog_cb_delete(E_Win *win);
22
23/* local subsystem globals */
24
25/* externally accessible functions */
26
27E_Dialog *
28e_dialog_new(E_Container *con)
29{
30 E_Dialog *dia;
31 E_Manager *man;
32 Evas_Object *o;
33
34 if (!con)
35 {
36 man = e_manager_current_get();
37 if (!man) return NULL;
38 con = e_container_current_get(man);
39 if (!con) con = e_manager_container_number_get(man, 0);
40 if (!con) return NULL;
41 }
42 dia = E_OBJECT_ALLOC(E_Dialog, E_DIALOG_TYPE, _e_dialog_free);
43 if (!dia) return NULL;
44 dia->win = e_win_new(con);
45 if (!dia->win)
46 {
47 free(dia);
48 return NULL;
49 }
50 dia->win->data = dia;
51 e_win_name_class_set(dia->win, "E", "_dialog");
52 o = edje_object_add(e_win_evas_get(dia->win));
53 dia->bg_object = o;
54 e_theme_edje_object_set(o, "base/theme/dialog",
55 "widgets/dialog/main");
56 evas_object_move(o, 0, 0);
57 evas_object_show(o);
58
59 o = evas_object_textblock_add(e_win_evas_get(dia->win));
60 dia->text_object = o;
61 edje_object_part_swallow(dia->bg_object, "content_swallow", o);
62 evas_object_show(o);
63 {
64 char format[1024];
65 char *fname;
66 int fsize;
67
68 fname = (char *)e_font_default_string_get("default", &fsize);
69 snprintf(format, sizeof(format),
70 "font='%s' size=%i wrap=word",
71 fname, fsize);
72 evas_object_textblock_format_insert(o, format);
73 evas_object_textblock_format_insert(o, "color=#000");
74 evas_object_textblock_format_insert(o, "\n");
75 evas_object_textblock_text_insert(o, "Here is some text");
76 evas_object_textblock_format_insert(o, "\n");
77 evas_object_textblock_text_insert(o, "Here is some more text");
78 evas_object_textblock_format_insert(o, "\n");
79 evas_object_textblock_text_insert(o, "And even more text on this line to make it really long for testing");
80 evas_object_textblock_format_insert(o, "\n");
81 evas_object_textblock_text_insert(o, "Short");
82 evas_object_textblock_format_insert(o, "\n");
83 evas_object_textblock_text_insert(o, "Aaardvaaarks On!");
84 evas_object_textblock_format_insert(o, "\n");
85 evas_object_textblock_format_insert(o, "\n");
86 }
87
88 o = e_box_add(e_win_evas_get(dia->win));
89 dia->box_object = o;
90 e_box_orientation_set(o, 1);
91 e_box_homogenous_set(o, 1);
92 e_box_align_set(o, 0.5, 0.5);
93 edje_object_part_swallow(dia->bg_object, "buttons_swallow", o);
94 evas_object_show(o);
95
96 return dia;
97}
98
99void
100e_dialog_button_add(E_Dialog *dia, char *label, char *icon, void (*func) (void *data, E_Dialog *dia), void *data)
101{
102 E_Dialog_Button *db;
103 Evas_Coord mw, mh;
104
105 db = E_NEW(E_Dialog_Button, 1);
106 db->dialog = dia;
107 if (label) db->label = strdup(label);
108 if (icon) db->icon = strdup(icon);
109 db->func = func;
110 db->data = data;
111 db->obj = edje_object_add(e_win_evas_get(dia->win));
112 e_theme_edje_object_set(db->obj, "base/theme/dialog",
113 "widgets/dialog/button");
114 edje_object_signal_callback_add(db->obj, "click", "",
115 _e_dialog_cb_button_clicked, db);
116 edje_object_part_text_set(db->obj, "button_text", db->label);
117 edje_object_size_min_calc(db->obj, &mw, &mh);
118 e_box_pack_end(dia->box_object, db->obj);
119 e_box_pack_options_set(db->obj,
120 1, 1, /* fill */
121 0, 1, /* expand */
122 0.5, 0.5, /* align */
123 mw, mh, /* min */
124 9999, mh /* max */
125 );
126 evas_object_show(db->obj);
127
128 dia->buttons = evas_list_append(dia->buttons, db);
129}
130
131void
132e_dialog_title_set(E_Dialog *dia, char *title)
133{
134 e_win_title_set(dia->win, title);
135}
136
137void
138e_dialog_text_set(E_Dialog *dia, char *text)
139{
140}
141
142void
143e_dialog_icon_set(E_Dialog *dia, char *icon)
144{
145}
146
147void
148e_dialog_show(E_Dialog *dia)
149{
150 Evas_Coord mw, mh;
151 Evas_Object *o;
152
153 o = dia->text_object;
154// evas_object_textblock_format_size_get(o, &mw, &mh);
155 evas_object_textblock_native_size_get(o, &mw, &mh);
156 edje_extern_object_min_size_set(o, mw + 2, mh + 2);
157 edje_object_part_swallow(dia->bg_object, "content_swallow", o);
158
159 o = dia->box_object;
160 e_box_min_size_get(o, &mw, &mh);
161 edje_extern_object_min_size_set(o, mw, mh);
162 edje_object_part_swallow(dia->bg_object, "buttons_swallow", o);
163
164 edje_object_size_min_calc(dia->bg_object, &mw, &mh);
165 evas_object_resize(dia->bg_object, mw, mh);
166 e_win_resize(dia->win, mw, mh);
167 e_win_size_min_set(dia->win, mw, mh);
168 e_win_size_max_set(dia->win, mw, mh);
169 e_win_show(dia->win);
170}
171
172/* local subsystem functions */
173static void
174_e_dialog_free(E_Dialog *dia)
175{
176 while (dia->buttons)
177 {
178 E_Dialog_Button *db;
179
180 db = dia->buttons->data;
181 dia->buttons = evas_list_remove_list(dia->buttons, dia->buttons);
182 IF_FREE(db->label);
183 IF_FREE(db->icon);
184 evas_object_del(db->obj);
185 free(db);
186 }
187 if (dia->text_object) evas_object_del(dia->text_object);
188 if (dia->icon_object) evas_object_del(dia->icon_object);
189 if (dia->box_object) evas_object_del(dia->box_object);
190 if (dia->bg_object) evas_object_del(dia->bg_object);
191 e_object_del(E_OBJECT(dia->win));
192 free(dia);
193}
194
195static void
196_e_dialog_cb_button_clicked(void *data, Evas_Object *obj, const char *emission, const char *source)
197{
198 E_Dialog_Button *db;
199
200 db = data;
201 if (db->func)
202 db->func(db->data, db->dialog);
203 else
204 e_object_del(E_OBJECT(db->dialog));
205}
206
207static void
208_e_dialog_cb_delete(E_Win *win)
209{
210 E_Dialog *dia;
211
212 dia = win->data;
213 e_object_del(E_OBJECT(dia));
214}
diff --git a/src/bin/e_dialog.h b/src/bin/e_dialog.h
new file mode 100644
index 000000000..210bbfe3f
--- /dev/null
+++ b/src/bin/e_dialog.h
@@ -0,0 +1,35 @@
1/*
2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
3 */
4#ifdef E_TYPEDEFS
5
6typedef struct _E_Dialog E_Dialog;
7
8#else
9#ifndef E_DIALOG_H
10#define E_DIALOG_H
11
12#define E_DIALOG_TYPE 0xE0b01012
13
14struct _E_Dialog
15{
16 E_Object e_obj_inherit;
17
18 E_Win *win;
19 Evas_Object *bg_object;
20 Evas_Object *box_object;
21 Evas_Object *text_object;
22 Evas_Object *icon_object;
23 Evas_List *buttons;
24 void *data;
25};
26
27EAPI E_Dialog *e_dialog_new (E_Container *con);
28EAPI void e_dialog_button_add (E_Dialog *dia, char *label, char *icon, void (*func) (void *data, E_Dialog *dia), void *data);
29EAPI void e_dialog_title_set (E_Dialog *dia, char *title);
30EAPI void e_dialog_text_set (E_Dialog *dia, char *text);
31EAPI void e_dialog_icon_set (E_Dialog *dia, char *icon);
32EAPI void e_dialog_show (E_Dialog *dia);
33
34#endif
35#endif
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index 5b6da2afa..a77557da5 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -55,3 +55,4 @@
55#include "e_remember.h" 55#include "e_remember.h"
56#include "e_win.h" 56#include "e_win.h"
57#include "e_pan.h" 57#include "e_pan.h"
58#include "e_dialog.h"
diff --git a/src/bin/e_int_menus.c b/src/bin/e_int_menus.c
index 0be9f6926..aad7a6eb0 100644
--- a/src/bin/e_int_menus.c
+++ b/src/bin/e_int_menus.c
@@ -289,14 +289,6 @@ _e_int_menus_main_del_hook(void *obj)
289 e_object_del(E_OBJECT(dat->lost_clients)); 289 e_object_del(E_OBJECT(dat->lost_clients));
290 free(dat); 290 free(dat);
291 } 291 }
292 else
293 {
294 printf("%%$%%@%%#^#^#$^#$\n"
295 "%%$%%@%%#^#^#$^#$\n"
296 " main menu object data is NULL!\n"
297 "%%$%%@%%#^#^#$^#$\n"
298 "%%$%%@%%#^#^#$^#$\n");
299 }
300} 292}
301 293
302static void 294static void
@@ -567,7 +559,7 @@ _e_int_menus_clients_pre_cb(void *data, E_Menu *m)
567 e_menu_item_label_set(mi, _("No name!!")); 559 e_menu_item_label_set(mi, _("No name!!"));
568 /* ref the border as we implicitly unref it in the callback */ 560 /* ref the border as we implicitly unref it in the callback */
569 e_object_ref(E_OBJECT(bd)); 561 e_object_ref(E_OBJECT(bd));
570 e_object_breadcrumb_add(E_OBJECT(bd), "clients_menu"); 562// e_object_breadcrumb_add(E_OBJECT(bd), "clients_menu");
571 e_menu_item_callback_set(mi, _e_int_menus_clients_item_cb, bd); 563 e_menu_item_callback_set(mi, _e_int_menus_clients_item_cb, bd);
572 if (!bd->iconic) e_menu_item_toggle_set(mi, 1); 564 if (!bd->iconic) e_menu_item_toggle_set(mi, 1);
573 a = e_app_window_name_class_title_role_find(bd->client.icccm.name, 565 a = e_app_window_name_class_title_role_find(bd->client.icccm.name,
@@ -585,6 +577,7 @@ _e_int_menus_clients_pre_cb(void *data, E_Menu *m)
585 e_menu_item_icon_edje_set(mi, s, "windows"); 577 e_menu_item_icon_edje_set(mi, s, "windows");
586 IF_FREE(s); 578 IF_FREE(s);
587 e_menu_item_callback_set(mi, _e_int_menus_clients_cleanup_cb, zone); 579 e_menu_item_callback_set(mi, _e_int_menus_clients_cleanup_cb, zone);
580
588 e_object_free_attach_func_set(E_OBJECT(m), _e_int_menus_clients_free_hook); 581 e_object_free_attach_func_set(E_OBJECT(m), _e_int_menus_clients_free_hook);
589 e_object_data_set(E_OBJECT(m), borders); 582 e_object_data_set(E_OBJECT(m), borders);
590} 583}
@@ -597,21 +590,13 @@ _e_int_menus_clients_free_hook(void *obj)
597 590
598 m = obj; 591 m = obj;
599 borders = e_object_data_get(E_OBJECT(m)); 592 borders = e_object_data_get(E_OBJECT(m));
600 if (borders == NULL)
601 {
602 printf("########################################################\n");
603 printf("########################################################\n");
604 printf("clients menu free cb called and object data is NULL!\n");
605 printf("########################################################\n");
606 printf("########################################################\n");
607 }
608 while (borders) 593 while (borders)
609 { 594 {
610 E_Border *bd; 595 E_Border *bd;
611 596
612 bd = borders->data; 597 bd = borders->data;
613 borders = evas_list_remove_list(borders, borders); 598 borders = evas_list_remove_list(borders, borders);
614 e_object_breadcrumb_del(E_OBJECT(bd), "clients_menu"); 599// e_object_breadcrumb_del(E_OBJECT(bd), "clients_menu");
615 e_object_unref(E_OBJECT(bd)); 600 e_object_unref(E_OBJECT(bd));
616 } 601 }
617} 602}
@@ -831,7 +816,7 @@ _e_int_menus_lost_clients_pre_cb(void *data, E_Menu *m)
831 e_menu_item_label_set(mi, _("No name!!")); 816 e_menu_item_label_set(mi, _("No name!!"));
832 /* ref the border as we implicitly unref it in the callback */ 817 /* ref the border as we implicitly unref it in the callback */
833 e_object_ref(E_OBJECT(bd)); 818 e_object_ref(E_OBJECT(bd));
834 e_object_breadcrumb_add(E_OBJECT(bd), "lost_clients_menu"); 819// e_object_breadcrumb_add(E_OBJECT(bd), "lost_clients_menu");
835 e_menu_item_callback_set(mi, _e_int_menus_lost_clients_item_cb, bd); 820 e_menu_item_callback_set(mi, _e_int_menus_lost_clients_item_cb, bd);
836 a = e_app_window_name_class_title_role_find(bd->client.icccm.name, 821 a = e_app_window_name_class_title_role_find(bd->client.icccm.name,
837 bd->client.icccm.class, 822 bd->client.icccm.class,
@@ -857,7 +842,7 @@ _e_int_menus_lost_clients_free_hook(void *obj)
857 842
858 bd = borders->data; 843 bd = borders->data;
859 borders = evas_list_remove_list(borders, borders); 844 borders = evas_list_remove_list(borders, borders);
860 e_object_breadcrumb_del(E_OBJECT(bd), "lost_clients_menu"); 845// e_object_breadcrumb_del(E_OBJECT(bd), "lost_clients_menu");
861 e_object_unref(E_OBJECT(bd)); 846 e_object_unref(E_OBJECT(bd));
862 } 847 }
863} 848}
diff --git a/src/bin/e_manager.c b/src/bin/e_manager.c
index 3afc06d6c..2e24ec346 100644
--- a/src/bin/e_manager.c
+++ b/src/bin/e_manager.c
@@ -338,6 +338,24 @@ e_manager_lower(E_Manager *man)
338 ecore_x_window_lower(man->win); 338 ecore_x_window_lower(man->win);
339} 339}
340 340
341E_Manager *
342e_manager_current_get(void)
343{
344 Evas_List *l;
345 E_Manager *man;
346 int x, y;
347
348 if (!managers) return NULL;
349 for (l = managers; l; l = l->next)
350 {
351 man = l->data;
352 ecore_x_pointer_xy_get(man->win, &x, &y);
353 if (E_INSIDE(x, y, man->x, man->y, man->w, man->h))
354 return man;
355 }
356 return managers->data;
357}
358
341E_Container * 359E_Container *
342e_manager_container_number_get(E_Manager *man, int num) 360e_manager_container_number_get(E_Manager *man, int num)
343{ 361{
diff --git a/src/bin/e_manager.h b/src/bin/e_manager.h
index 59440139b..1d8d46e42 100644
--- a/src/bin/e_manager.h
+++ b/src/bin/e_manager.h
@@ -37,8 +37,8 @@ EAPI void e_manager_resize(E_Manager *man, int w, int h);
37EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int w, int h); 37EAPI void e_manager_move_resize(E_Manager *man, int x, int y, int w, int h);
38EAPI void e_manager_raise(E_Manager *man); 38EAPI void e_manager_raise(E_Manager *man);
39EAPI void e_manager_lower(E_Manager *man); 39EAPI void e_manager_lower(E_Manager *man);
40EAPI E_Manager *e_manager_current_get(void);
40 41
41EAPI E_Container *e_manager_container_current_get(E_Manager *man);
42EAPI E_Container *e_manager_container_number_get(E_Manager *man, int num); 42EAPI E_Container *e_manager_container_number_get(E_Manager *man, int num);
43 43
44EAPI void e_managers_keys_grab(void); 44EAPI void e_managers_keys_grab(void);
diff --git a/src/bin/e_object.c b/src/bin/e_object.c
index 656e12856..d47129e9e 100644
--- a/src/bin/e_object.c
+++ b/src/bin/e_object.c
@@ -80,11 +80,13 @@ void
80e_object_free(E_Object *obj) 80e_object_free(E_Object *obj)
81{ 81{
82 E_OBJECT_CHECK(obj); 82 E_OBJECT_CHECK(obj);
83/*
83 if (obj->crumbs) 84 if (obj->crumbs)
84 { 85 {
85 printf("EEEK obj type %x has crumbs still! ->\n", obj->type); 86 printf("EEEK obj type %x has crumbs still! ->\n", obj->type);
86 e_object_breadcrumb_debug(obj); 87 e_object_breadcrumb_debug(obj);
87 } 88 }
89 */
88 if (obj->free_att_func) obj->free_att_func(obj); 90 if (obj->free_att_func) obj->free_att_func(obj);
89 obj->magic = E_OBJECT_MAGIC_FREED; 91 obj->magic = E_OBJECT_MAGIC_FREED;
90 obj->cleanup_func(obj); 92 obj->cleanup_func(obj);
@@ -257,6 +259,7 @@ e_object_del_attach_func_set(E_Object *obj, void (*func) (void *obj))
257 obj->del_att_func = func; 259 obj->del_att_func = func;
258} 260}
259 261
262/*
260void 263void
261e_object_breadcrumb_add(E_Object *obj, char *crumb) 264e_object_breadcrumb_add(E_Object *obj, char *crumb)
262{ 265{
@@ -290,6 +293,7 @@ e_object_breadcrumb_debug(E_Object *obj)
290 for (l = obj->crumbs; l; l = l->next) 293 for (l = obj->crumbs; l; l = l->next)
291 printf("CRUMB: %s\n", l->data); 294 printf("CRUMB: %s\n", l->data);
292} 295}
296*/
293 297
294#ifdef OBJECT_PARANOIA_CHECK 298#ifdef OBJECT_PARANOIA_CHECK
295/* local subsystem functions */ 299/* local subsystem functions */
diff --git a/src/bin/e_object.h b/src/bin/e_object.h
index 77f9eb81b..84f08a793 100644
--- a/src/bin/e_object.h
+++ b/src/bin/e_object.h
@@ -70,7 +70,7 @@ struct _E_Object
70 void (*del_att_func) (void *obj); 70 void (*del_att_func) (void *obj);
71 void *data; 71 void *data;
72 unsigned char deleted : 1; 72 unsigned char deleted : 1;
73 Evas_List *crumbs; 73// Evas_List *crumbs;
74}; 74};
75 75
76EAPI void *e_object_alloc (int size, int type, E_Object_Cleanup_Func cleanup_func); 76EAPI void *e_object_alloc (int size, int type, E_Object_Cleanup_Func cleanup_func);
@@ -88,9 +88,11 @@ EAPI void *e_object_data_get (E_Object *obj);
88EAPI void e_object_free_attach_func_set(E_Object *obj, void (*func) (void *obj)); 88EAPI void e_object_free_attach_func_set(E_Object *obj, void (*func) (void *obj));
89EAPI void e_object_del_attach_func_set (E_Object *obj, void (*func) (void *obj)); 89EAPI void e_object_del_attach_func_set (E_Object *obj, void (*func) (void *obj));
90 90
91/*
91EAPI void e_object_breadcrumb_add (E_Object *obj, char *crumb); 92EAPI void e_object_breadcrumb_add (E_Object *obj, char *crumb);
92EAPI void e_object_breadcrumb_del (E_Object *obj, char *crumb); 93EAPI void e_object_breadcrumb_del (E_Object *obj, char *crumb);
93EAPI void e_object_breadcrumb_debug (E_Object *obj); 94EAPI void e_object_breadcrumb_debug (E_Object *obj);
95*/
94 96
95#endif 97#endif
96#endif 98#endif
diff --git a/src/bin/e_test.c b/src/bin/e_test.c
index 0bf6a585f..483ae6b5b 100644
--- a/src/bin/e_test.c
+++ b/src/bin/e_test.c
@@ -282,6 +282,29 @@ _e_test_internal(E_Container *con)
282 } 282 }
283} 283}
284#elif 0 284#elif 0
285static void
286_e_test_dialog_del(void *obj)
287{
288 E_Dialog *dia;
289
290 dia = obj;
291 printf("dialog delete hook!\n");
292}
293
294static void
295_e_test_internal(E_Container *con)
296{
297 E_Dialog *dia;
298
299 dia = e_dialog_new(con);
300 e_object_del_attach_func_set(E_OBJECT(dia), _e_test_dialog_del);
301 e_dialog_title_set(dia, "A Test Dialog");
302 e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
303 e_dialog_button_add(dia, "Apply", NULL, NULL, NULL);
304 e_dialog_button_add(dia, "Cancel", NULL, NULL, NULL);
305 e_dialog_show(dia);
306}
307#elif 0
285#else 308#else
286static void 309static void
287_e_test_internal(E_Container *con) 310_e_test_internal(E_Container *con)
diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c
index 22e30d967..1adf46c62 100644
--- a/src/bin/e_zone.c
+++ b/src/bin/e_zone.c
@@ -807,7 +807,6 @@ _e_zone_cb_timer(void *data)
807 E_Event_Pointer_Warp *ev; 807 E_Event_Pointer_Warp *ev;
808 int x, y; 808 int x, y;
809 809
810 printf("_e_zone_cb_timer()\n");
811 ev = E_NEW(E_Event_Pointer_Warp, 1); 810 ev = E_NEW(E_Event_Pointer_Warp, 1);
812 if (!ev) return 0; 811 if (!ev) return 0;
813 812
@@ -834,14 +833,11 @@ _e_zone_cb_timer(void *data)
834 } 833 }
835 break; 834 break;
836 case E_DIRECTION_RIGHT: 835 case E_DIRECTION_RIGHT:
837 printf("clip right...\n");
838 if (E_ZONE_FLIP_RIGHT(zone)) 836 if (E_ZONE_FLIP_RIGHT(zone))
839 { 837 {
840 printf("ummm...\n");
841 current = e_desk_at_xy_get(zone, zone->desk_x_current + 1, zone->desk_y_current); 838 current = e_desk_at_xy_get(zone, zone->desk_x_current + 1, zone->desk_y_current);
842 if (current) 839 if (current)
843 { 840 {
844 printf("show new desk\n");
845 e_desk_show(current); 841 e_desk_show(current);
846 ecore_x_pointer_warp(zone->container->win, 2, y); 842 ecore_x_pointer_warp(zone->container->win, 2, y);
847 ev->curr.y = y; 843 ev->curr.y = y;
diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index eaff5fefb..3b6c7dfc8 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -606,7 +606,7 @@ _pager_window_new(Pager_Desk *pd, E_Border *border)
606 606
607 pw->border = border; 607 pw->border = border;
608 e_object_ref(E_OBJECT(border)); 608 e_object_ref(E_OBJECT(border));
609 e_object_breadcrumb_add(E_OBJECT(border), "pager_module"); 609// e_object_breadcrumb_add(E_OBJECT(border), "pager_module");
610 610
611 visible = !border->iconic; 611 visible = !border->iconic;
612 pw->desk = pd; 612 pw->desk = pd;
@@ -635,7 +635,7 @@ _pager_window_free(Pager_Win *pw)
635{ 635{
636 if (pw->window_object) evas_object_del(pw->window_object); 636 if (pw->window_object) evas_object_del(pw->window_object);
637 if (pw->icon_object) evas_object_del(pw->icon_object); 637 if (pw->icon_object) evas_object_del(pw->icon_object);
638 e_object_breadcrumb_del(E_OBJECT(pw->border), "pager_module"); 638// e_object_breadcrumb_del(E_OBJECT(pw->border), "pager_module");
639 e_object_unref(E_OBJECT(pw->border)); 639 e_object_unref(E_OBJECT(pw->border));
640 free(pw); 640 free(pw);
641} 641}
diff --git a/src/modules/start/e_mod_main.c b/src/modules/start/e_mod_main.c
index 27df2eecf..b921d3518 100644
--- a/src/modules/start/e_mod_main.c
+++ b/src/modules/start/e_mod_main.c
@@ -368,5 +368,6 @@ _start_menu_cb_post_deactivate(void *data, E_Menu *m)
368 face = data; 368 face = data;
369 if (!face->main_menu) return; 369 if (!face->main_menu) return;
370 edje_object_signal_emit(face->button_object, "passive", ""); 370 edje_object_signal_emit(face->button_object, "passive", "");
371 e_object_del(E_OBJECT(face->main_menu));
371 face->main_menu = NULL; 372 face->main_menu = NULL;
372} 373}