summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Aguirre <aguirre.nicolas@gmail.com>2012-09-09 22:47:46 +0000
committerNicolas Aguirre <aguirre.nicolas@gmail.com>2012-09-09 22:47:46 +0000
commit83a9b32b60a79322d3368d449b0f70a093acd8c8 (patch)
tree51e9466cfa601c11815e201a2c7fb2d33dccb9ea
parent3066a4b40e034061114fac3ed08cdcbe01d759f9 (diff)
[E-MODULES-EXTRA/elfe] * Remove modules and config entries, they never worked.
* Restore correct behaviour when placing icons on the desktop * Remove few Elementary errors SVN revision: 76358
-rw-r--r--data/themes/default/default.edc16
-rw-r--r--src/allapps.c101
-rw-r--r--src/desktop.c25
-rw-r--r--src/desktop_item.c8
-rw-r--r--src/desktop_page.c6
-rw-r--r--src/gadgets.c14
-rw-r--r--src/main.c3
7 files changed, 98 insertions, 75 deletions
diff --git a/data/themes/default/default.edc b/data/themes/default/default.edc
index 155e254..a1a79b9 100644
--- a/data/themes/default/default.edc
+++ b/data/themes/default/default.edc
@@ -583,6 +583,22 @@ collections
583 transition: DECELERATE 0.5; 583 transition: DECELERATE 0.5;
584 } 584 }
585 program { 585 program {
586 name: "place,show";
587 signal: "place,show";
588 source: "elfe";
589 action: STATE_SET "in" 0.0;
590 target: "over";
591 transition: ACCELERATE 0.5;
592 }
593 program {
594 name: "place,hide";
595 signal: "place,hide";
596 source: "elfe";
597 action: STATE_SET "default" 0.0;
598 target: "over";
599 transition: DECELERATE 0.5;
600 }
601 program {
586 name: "mouse,in"; 602 name: "mouse,in";
587 signal: "mouse,in"; 603 signal: "mouse,in";
588 source: "*"; 604 source: "*";
diff --git a/src/allapps.c b/src/allapps.c
index a046627..74d523a 100644
--- a/src/allapps.c
+++ b/src/allapps.c
@@ -82,9 +82,11 @@ _gl_longpress(void *data, Evas_Object *obj __UNUSED__, void *event_info)
82 if (gitem->menu->type != EFREET_MENU_ENTRY_DESKTOP) 82 if (gitem->menu->type != EFREET_MENU_ENTRY_DESKTOP)
83 return; 83 return;
84 84
85 elm_gengrid_item_selected_set(event_info, EINA_FALSE);
86
85 evas_object_smart_callback_call(allapps->box, 87 evas_object_smart_callback_call(allapps->box,
86 "entry,longpressed", gitem->menu); 88 "entry,longpressed", gitem->menu);
87 elm_gengrid_item_selected_set(it, EINA_FALSE); 89
88} 90}
89 91
90static void 92static void
@@ -94,10 +96,9 @@ _widget_longpress(void *data, Evas_Object *obj __UNUSED__, void *event_info)
94 Elfe_Allapps *allapps = data; 96 Elfe_Allapps *allapps = data;
95 Elm_Object_Item *glit = event_info; 97 Elm_Object_Item *glit = event_info;
96 98
97 printf("Send widget longpressed\n");
98 evas_object_smart_callback_call(allapps->box, 99 evas_object_smart_callback_call(allapps->box,
99 "gadget,longpressed", (void*)name); 100 "gadget,longpressed", (void*)name);
100 elm_gengrid_item_selected_set(glit, EINA_FALSE); 101 elm_gengrid_item_selected_set(event_info, EINA_FALSE);
101} 102}
102 103
103static void 104static void
@@ -161,8 +162,6 @@ _obj_resize_cb(void *data , Evas *e __UNUSED__ , Evas_Object *obj __UNUSED__, vo
161 162
162 ow = w / (elfe_home_cfg->icon_size + w / 10); 163 ow = w / (elfe_home_cfg->icon_size + w / 10);
163 164
164 printf("Nb elements : ow %d\n", ow);
165
166 elm_gengrid_item_size_set(allapps->grid, w / ow, (w /ow) + 20); 165 elm_gengrid_item_size_set(allapps->grid, w / ow, (w /ow) + 20);
167 166
168 elm_gengrid_align_set(allapps->grid, 0.5, 0); 167 elm_gengrid_align_set(allapps->grid, 0.5, 0);
@@ -259,52 +258,52 @@ elfe_allapps_add(Evas_Object *parent)
259 allapps->box = elm_box_add(parent); 258 allapps->box = elm_box_add(parent);
260 259
261 /* Create buttons selector */ 260 /* Create buttons selector */
262 allapps->selector = elm_box_add(allapps->box); 261 /* allapps->selector = elm_box_add(allapps->box); */
263 elm_box_horizontal_set(allapps->selector, EINA_TRUE); 262 /* elm_box_horizontal_set(allapps->selector, EINA_TRUE); */
264 263
265 bt = elm_button_add(allapps->selector); 264 /* bt = elm_button_add(allapps->selector); */
266 elm_object_text_set(bt, "Apps"); 265 /* elm_object_text_set(bt, "Apps"); */
267 ic = elm_icon_add(bt); 266 /* ic = elm_icon_add(bt); */
268 elm_image_file_set(ic, elfe_home_cfg->theme, "icon/applications"); 267 /* elm_image_file_set(ic, elfe_home_cfg->theme, "icon/applications"); */
269 evas_object_show(ic); 268 /* evas_object_show(ic); */
270 elm_object_content_set(bt, ic); 269 /* elm_object_content_set(bt, ic); */
271 evas_object_show(bt); 270 /* evas_object_show(bt); */
272 elm_box_pack_end(allapps->selector, bt); 271 /* elm_box_pack_end(allapps->selector, bt); */
273 evas_object_smart_callback_add(bt, "clicked", _apps_clicked_cb, allapps); 272 /* evas_object_smart_callback_add(bt, "clicked", _apps_clicked_cb, allapps); */
274 allapps->buttons = eina_list_append(allapps->buttons, bt); 273 /* allapps->buttons = eina_list_append(allapps->buttons, bt); */
275 274
276 sep = elm_separator_add(allapps->selector); 275 /* sep = elm_separator_add(allapps->selector); */
277 evas_object_show(sep); 276 /* evas_object_show(sep); */
278 elm_box_pack_end(allapps->selector, sep); 277 /* elm_box_pack_end(allapps->selector, sep); */
279 278
280 bt = elm_button_add(allapps->selector); 279 /* bt = elm_button_add(allapps->selector); */
281 elm_object_text_set(bt, "Widgets"); 280 /* elm_object_text_set(bt, "Widgets"); */
282 ic = elm_icon_add(bt); 281 /* ic = elm_icon_add(bt); */
283 elm_image_file_set(ic, elfe_home_cfg->theme, "icon/widgets"); 282 /* elm_image_file_set(ic, elfe_home_cfg->theme, "icon/widgets"); */
284 evas_object_show(ic); 283 /* evas_object_show(ic); */
285 elm_object_content_set(bt, ic); 284 /* elm_object_content_set(bt, ic); */
286 evas_object_show(bt); 285 /* evas_object_show(bt); */
287 elm_box_pack_end(allapps->selector, bt); 286 /* elm_box_pack_end(allapps->selector, bt); */
288 evas_object_smart_callback_add(bt, "clicked", _widgets_clicked_cb, allapps); 287 /* evas_object_smart_callback_add(bt, "clicked", _widgets_clicked_cb, allapps); */
289 allapps->buttons = eina_list_append(allapps->buttons, bt); 288 /* allapps->buttons = eina_list_append(allapps->buttons, bt); */
290 289
291 sep = elm_separator_add(allapps->selector); 290 /* sep = elm_separator_add(allapps->selector); */
292 evas_object_show(sep); 291 /* evas_object_show(sep); */
293 elm_box_pack_end(allapps->selector, sep); 292 /* elm_box_pack_end(allapps->selector, sep); */
294 293
295 bt = elm_button_add(allapps->selector); 294 /* bt = elm_button_add(allapps->selector); */
296 elm_object_text_set(bt, "Config"); 295 /* elm_object_text_set(bt, "Config"); */
297 ic = elm_icon_add(bt); 296 /* ic = elm_icon_add(bt); */
298 elm_image_file_set(ic, elfe_home_cfg->theme, "icon/configuration"); 297 /* elm_image_file_set(ic, elfe_home_cfg->theme, "icon/configuration"); */
299 evas_object_show(ic); 298 /* evas_object_show(ic); */
300 elm_object_content_set(bt, ic); 299 /* elm_object_content_set(bt, ic); */
301 evas_object_show(bt); 300 /* evas_object_show(bt); */
302 elm_box_pack_end(allapps->selector, bt); 301 /* elm_box_pack_end(allapps->selector, bt); */
303 evas_object_smart_callback_add(bt, "clicked", _config_clicked_cb, allapps); 302 /* evas_object_smart_callback_add(bt, "clicked", _config_clicked_cb, allapps); */
304 allapps->buttons = eina_list_append(allapps->buttons, bt); 303 /* allapps->buttons = eina_list_append(allapps->buttons, bt); */
305 304
306 evas_object_show(allapps->selector); 305 /* evas_object_show(allapps->selector); */
307 elm_box_pack_end(allapps->box, allapps->selector); 306 /* elm_box_pack_end(allapps->box, allapps->selector); */
308 307
309 allapps->nf = elm_naviframe_add(allapps->box); 308 allapps->nf = elm_naviframe_add(allapps->box);
310 evas_object_show(allapps->nf); 309 evas_object_show(allapps->nf);
diff --git a/src/desktop.c b/src/desktop.c
index 68c2719..4bd6f60 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -182,11 +182,26 @@ _cb_object_resize(void *data , Evas *e __UNUSED__, Evas_Object *obj, void *event
182static void 182static void
183_icon_mouse_move_cb(void *data,Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info) 183_icon_mouse_move_cb(void *data,Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
184{ 184{
185 Evas_Object *o_edje;
186 Eina_List *l;
187 Evas_Object *over;
185 Elfe_Desktop *desk = data; 188 Elfe_Desktop *desk = data;
186 Evas_Event_Mouse_Move *ev = event_info; 189 Evas_Event_Mouse_Move *ev = event_info;
187 190
188 evas_object_move(desk->floating_icon, ev->cur.output.x - 92 / 2, ev->cur.output.y - 92 / 2); 191 evas_object_move(desk->floating_icon, ev->cur.output.x - 92 / 2, ev->cur.output.y - 92 / 2);
189 192
193 EINA_LIST_FOREACH(desk->overs, l, over)
194 {
195 Evas_Coord x,y,w,h;
196 o_edje = elm_layout_edje_get(over);
197 evas_object_geometry_get(o_edje, &x, &y, &w, &h);
198 if (ELM_RECTS_INTERSECT(x, y, w, h, ev->cur.output.x, ev->cur.output.y, 1, 1))
199 edje_object_signal_emit(o_edje, "place,show", "elfe");
200 else
201 edje_object_signal_emit(o_edje, "place,hide", "elfe");
202 }
203
204
190} 205}
191 206
192 207
@@ -228,15 +243,18 @@ _app_longpressed_cb(void *data , Evas_Object *obj, void *event_info)
228 o_edje = elm_layout_edje_get(desk->layout); 243 o_edje = elm_layout_edje_get(desk->layout);
229 edje_object_signal_emit(o_edje, "allapps,toggle", "elfe"); 244 edje_object_signal_emit(o_edje, "allapps,toggle", "elfe");
230 245
231 ic = elfe_utils_fdo_icon_add(o_edje, entry->icon, size); 246
247 ic = elfe_utils_fdo_icon_add(desk->layout, entry->icon, size);
232 evas_object_show(ic); 248 evas_object_show(ic);
233 evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y); 249 evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
234 evas_object_resize(ic, size, size); 250 evas_object_resize(ic, size, size);
235 evas_object_move(ic, x - size / 2, y - size /2); 251 evas_object_move(ic, x - size / 2, y - size /2);
236 desk->floating_icon = ic; 252 desk->floating_icon = ic;
237 253
238 evas_object_del(desk->allapps); 254 evas_object_hide(desk->allapps);
239 desk->allapps = NULL; 255 //evas_object_del(desk->allapps);
256 //desk->allapps = NULL;
257
240 evas_object_pass_events_set(ic, EINA_TRUE); 258 evas_object_pass_events_set(ic, EINA_TRUE);
241 259
242 desk->selected_app = entry; 260 desk->selected_app = entry;
@@ -544,6 +562,7 @@ elfe_desktop_edit_mode_set(Evas_Object *obj, Eina_Bool mode)
544 562
545 evas_object_resize(o_edje, m, n); 563 evas_object_resize(o_edje, m, n);
546 evas_object_move(o_edje, x + i*m, y + j*n); 564 evas_object_move(o_edje, x + i*m, y + j*n);
565 evas_object_raise(o_edje);
547 evas_object_show(over); 566 evas_object_show(over);
548 desk->overs = eina_list_append(desk->overs, over); 567 desk->overs = eina_list_append(desk->overs, over);
549 } 568 }
diff --git a/src/desktop_item.c b/src/desktop_item.c
index 8747dc5..8d52ca7 100644
--- a/src/desktop_item.c
+++ b/src/desktop_item.c
@@ -8,6 +8,7 @@
8typedef struct _Elfe_Desktop_Item Elfe_Desktop_Item; 8typedef struct _Elfe_Desktop_Item Elfe_Desktop_Item;
9struct _Elfe_Desktop_Item 9struct _Elfe_Desktop_Item
10{ 10{
11 Evas_Object *parent;
11 Evas_Object *frame; 12 Evas_Object *frame;
12 Evas_Object *item; 13 Evas_Object *item;
13 Evas_Object *icon; 14 Evas_Object *icon;
@@ -98,7 +99,7 @@ _app_add(Elfe_Desktop_Item *dit, const char *name __UNUSED__)
98 item = edje_object_add(evas_object_evas_get(dit->frame)); 99 item = edje_object_add(evas_object_evas_get(dit->frame));
99 edje_object_file_set(item, elfe_home_cfg->theme, "elfe/desktop/app/frame"); 100 edje_object_file_set(item, elfe_home_cfg->theme, "elfe/desktop/app/frame");
100 101
101 icon = elfe_utils_fdo_icon_add(dit->frame, dit->desktop->icon, elfe_home_cfg->icon_size); 102 icon = elfe_utils_fdo_icon_add(dit->parent, dit->desktop->icon, elfe_home_cfg->icon_size);
102 //evas_object_size_hint_min_set(icon, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size); 103 //evas_object_size_hint_min_set(icon, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size);
103 evas_object_size_hint_max_set(icon, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size); 104 evas_object_size_hint_max_set(icon, elfe_home_cfg->icon_size, elfe_home_cfg->icon_size);
104 105
@@ -210,6 +211,8 @@ elfe_desktop_item_add(Evas_Object *parent,
210 if (!dit) 211 if (!dit)
211 return NULL; 212 return NULL;
212 213
214 dit->parent = parent;
215
213 dit->row = row; 216 dit->row = row;
214 dit->col = col; 217 dit->col = col;
215 218
@@ -217,13 +220,12 @@ elfe_desktop_item_add(Evas_Object *parent,
217 edje_object_file_set(layout, elfe_home_cfg->theme, "elfe/desktop/frame"); 220 edje_object_file_set(layout, elfe_home_cfg->theme, "elfe/desktop/frame");
218 221
219 dit->frame = layout; 222 dit->frame = layout;
220 printf("ITEM ADD %s\n", name);
221 223
222 switch (type) 224 switch (type)
223 { 225 {
224 case ELFE_DESKTOP_ITEM_APP: 226 case ELFE_DESKTOP_ITEM_APP:
225 dit->desktop = efreet_desktop_get(name); 227 dit->desktop = efreet_desktop_get(name);
226 228
227 if (!dit->desktop) 229 if (!dit->desktop)
228 { 230 {
229 printf("ERROR unable to get efreet desktop from %s\n", name); 231 printf("ERROR unable to get efreet desktop from %s\n", name);
diff --git a/src/desktop_page.c b/src/desktop_page.c
index ba56201..c82ef29 100644
--- a/src/desktop_page.c
+++ b/src/desktop_page.c
@@ -167,7 +167,7 @@ _populate_page(Elfe_Desktop_Page *page)
167 if (eina_matrixsparse_data_idx_get(page->items, dic->row, dic->col)) 167 if (eina_matrixsparse_data_idx_get(page->items, dic->row, dic->col))
168 continue; 168 continue;
169 169
170 item = elfe_desktop_item_add(page->layout, dic->row, dic->col, 170 item = elfe_desktop_item_add(page->parent, dic->row, dic->col,
171 dic->name, dic->type, page->gc); 171 dic->name, dic->type, page->gc);
172 if (!item) 172 if (!item)
173 continue; 173 continue;
@@ -244,7 +244,7 @@ elfe_desktop_page_item_gadget_add(Evas_Object *obj, const char *name,
244 /* This position is already used by another item! */ 244 /* This position is already used by another item! */
245 if (eina_matrixsparse_data_idx_get(page->items, row, col)) return; 245 if (eina_matrixsparse_data_idx_get(page->items, row, col)) return;
246 246
247 item = elfe_desktop_item_add(page->layout, row, col, 247 item = elfe_desktop_item_add(page->parent, row, col,
248 name, 248 name,
249 ELFE_DESKTOP_ITEM_GADGET, page->gc); 249 ELFE_DESKTOP_ITEM_GADGET, page->gc);
250 e_layout_pack(page->layout, item); 250 e_layout_pack(page->layout, item);
@@ -277,7 +277,7 @@ elfe_desktop_page_item_app_add(Evas_Object *obj, Efreet_Menu *menu,
277 /* This position is already used by another item! */ 277 /* This position is already used by another item! */
278 if (eina_matrixsparse_data_idx_get(page->items, row, col)) return; 278 if (eina_matrixsparse_data_idx_get(page->items, row, col)) return;
279 279
280 item = elfe_desktop_item_add(page->layout, row, col, 280 item = elfe_desktop_item_add(page->parent, row, col,
281 menu->desktop->orig_path, 281 menu->desktop->orig_path,
282 ELFE_DESKTOP_ITEM_APP, NULL); 282 ELFE_DESKTOP_ITEM_APP, NULL);
283 e_layout_pack(page->layout, item); 283 e_layout_pack(page->layout, item);
diff --git a/src/gadgets.c b/src/gadgets.c
index fc19602..1e7358e 100644
--- a/src/gadgets.c
+++ b/src/gadgets.c
@@ -162,13 +162,10 @@ elfe_gadgets_app_add(Evas_Object *obj, Efreet_Menu *app, Evas_Coord x, Evas_Coor
162 162
163 ic = elfe_utils_fdo_icon_add(obj, app->icon, MIN(w,h)); 163 ic = elfe_utils_fdo_icon_add(obj, app->icon, MIN(w,h));
164 evas_object_show(ic); 164 evas_object_show(ic);
165 printf("App name : %s\n", app->name); 165
166 ly = _item_add(egad, ELFE_DESKTOP_ITEM_APP, app->icon, ic, m, n, pos_x, pos_y, w, h); 166 ly = _item_add(egad, ELFE_DESKTOP_ITEM_APP, app->icon, ic, m, n, pos_x, pos_y, w, h);
167 if (ly) 167 if (ly)
168 {
169 elfe_home_config_desktop_item_add(egad->desktop, ELFE_DESKTOP_ITEM_APP, m, n, pos_x, pos_y, w, h, app->desktop->orig_path); 168 elfe_home_config_desktop_item_add(egad->desktop, ELFE_DESKTOP_ITEM_APP, m, n, pos_x, pos_y, w, h, app->desktop->orig_path);
170 printf("Desktop path : %s\n", app->desktop->orig_path);
171 }
172 else 169 else
173 return; 170 return;
174 171
@@ -196,10 +193,6 @@ _object_resize_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
196 193
197 evas_object_geometry_get(egad->layout, &x, &y, &w, &h); 194 evas_object_geometry_get(egad->layout, &x, &y, &w, &h);
198 e_layout_virtual_size_set(egad->layout, w, h); 195 e_layout_virtual_size_set(egad->layout, w, h);
199 printf("%d %d %d %d\n", x, y, w, h);
200
201
202
203 evas_object_show(egad->layout); 196 evas_object_show(egad->layout);
204} 197}
205 198
@@ -306,11 +299,6 @@ elfe_gadgets_zone_add(Evas_Object *parent, E_Zone *zone, int desktop, const char
306 break; 299 break;
307 } 300 }
308 301
309 printf("%p %d %d %d %d %d %d\n", child, dic->col, dic->row,
310 dic->pos_x, dic->pos_y,
311 dic->size_w, dic->size_h);
312
313
314 } 302 }
315 303
316 304
diff --git a/src/main.c b/src/main.c
index 635f05a..f4cab05 100644
--- a/src/main.c
+++ b/src/main.c
@@ -234,7 +234,6 @@ _elfe_home_win_new(E_Zone *zone)
234static void 234static void
235_elfe_home_win_cb_free(Elfe_Home_Win *hwin) 235_elfe_home_win_cb_free(Elfe_Home_Win *hwin)
236{ 236{
237 printf("CB FREE\n");
238 if (hwin->win->evas_win) e_drop_xdnd_register_set(hwin->win->evas_win, 0); 237 if (hwin->win->evas_win) e_drop_xdnd_register_set(hwin->win->evas_win, 0);
239 if (hwin->o_bg) evas_object_del(hwin->o_bg); 238 if (hwin->o_bg) evas_object_del(hwin->o_bg);
240 if (hwin->layout) evas_object_del(hwin->layout); 239 if (hwin->layout) evas_object_del(hwin->layout);
@@ -248,7 +247,7 @@ _elfe_home_win_cb_resize(E_Win *win)
248 Elfe_Home_Win *hwin; 247 Elfe_Home_Win *hwin;
249 Evas_Coord w, h; 248 Evas_Coord w, h;
250 if (!(hwin = win->data)) return; 249 if (!(hwin = win->data)) return;
251 if (hwin->o_bg) 250 if (hwin->o_bg)
252 { 251 {
253 evas_object_size_hint_min_set(hwin->o_bg, win->w, win->h); 252 evas_object_size_hint_min_set(hwin->o_bg, win->w, win->h);
254 edje_object_parts_extends_calc(hwin->o_bg, NULL, NULL, &w, &h); 253 edje_object_parts_extends_calc(hwin->o_bg, NULL, NULL, &w, &h);