summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-05-24 20:21:19 +0200
committerDave Andreoli <dave@gurumeditation.it>2016-05-24 20:21:19 +0200
commitb0ed787d0301ed7adc7ce43f5451ac08bf65b561 (patch)
tree6eb76806b6de36ea40ffaa6428747582d9045239
parent0a2bb86c63f8ad1cfa1e2bb82e7c64d707ecf9b6 (diff)
Fix crazy indentation. no functional changes.
* keep on a single line if it fits 80 cols * align to opening braces in functions
-rw-r--r--src/lib/elementary/elm_thumb.c68
1 files changed, 28 insertions, 40 deletions
diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 6ca3e30f4b..8df3a13314 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -98,25 +98,22 @@ _thumb_ready_inform(Elm_Thumb_Data *sd,
98 if ((sd->is_video) && (sd->thumb.format == ETHUMB_THUMB_EET)) 98 if ((sd->is_video) && (sd->thumb.format == ETHUMB_THUMB_EET))
99 { 99 {
100 edje_object_size_min_get(sd->view, &mw, &mh); 100 edje_object_size_min_get(sd->view, &mw, &mh);
101 edje_object_size_min_restricted_calc 101 edje_object_size_min_restricted_calc(sd->view, &mw, &mh, mw, mh);
102 (sd->view, &mw, &mh, mw, mh);
103 evas_object_size_hint_min_set(sd->view, mw, mh); 102 evas_object_size_hint_min_set(sd->view, mw, mh);
104 } 103 }
105 else 104 else
106 { 105 {
107 evas_object_image_size_get(sd->view, &aw, &ah); 106 evas_object_image_size_get(sd->view, &aw, &ah);
108 evas_object_size_hint_aspect_set 107 evas_object_size_hint_aspect_set(sd->view, EVAS_ASPECT_CONTROL_BOTH,
109 (sd->view, EVAS_ASPECT_CONTROL_BOTH, aw, ah); 108 aw, ah);
110 } 109 }
111 110
112 edje_object_part_swallow(wd->resize_obj, "elm.swallow.content", sd->view); 111 edje_object_part_swallow(wd->resize_obj, "elm.swallow.content", sd->view);
113 eina_stringshare_replace(&(sd->thumb.file), thumb_path); 112 eina_stringshare_replace(&(sd->thumb.file), thumb_path);
114 eina_stringshare_replace(&(sd->thumb.key), thumb_key); 113 eina_stringshare_replace(&(sd->thumb.key), thumb_key);
115 edje_object_signal_emit 114 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_PULSE_STOP, "elm");
116 (wd->resize_obj, EDJE_SIGNAL_PULSE_STOP, "elm");
117 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_STOP, "elm"); 115 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_STOP, "elm");
118 eo_event_callback_call 116 eo_event_callback_call(sd->obj, ELM_THUMB_EVENT_GENERATE_STOP, NULL);
119 (sd->obj, ELM_THUMB_EVENT_GENERATE_STOP, NULL);
120} 117}
121 118
122static void 119static void
@@ -245,9 +242,8 @@ _thumb_finish(Elm_Thumb_Data *sd,
245 ERR("could not create image object"); 242 ERR("could not create image object");
246 goto err; 243 goto err;
247 } 244 }
248 evas_object_event_callback_add 245 evas_object_event_callback_add(sd->view, EVAS_CALLBACK_IMAGE_PRELOADED,
249 (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded, 246 _on_thumb_preloaded, sd->obj);
250 sd->obj);
251 evas_object_hide(sd->view); 247 evas_object_hide(sd->view);
252 } 248 }
253 249
@@ -291,18 +287,15 @@ _thumb_finish(Elm_Thumb_Data *sd,
291 ELM_SAFE_FREE(sd->view, evas_object_del); 287 ELM_SAFE_FREE(sd->view, evas_object_del);
292 288
293 wd = eo_data_scope_get(sd->obj, ELM_WIDGET_CLASS); 289 wd = eo_data_scope_get(sd->obj, ELM_WIDGET_CLASS);
294 edje_object_signal_emit 290 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_LOAD_ERROR, "elm");
295 (wd->resize_obj, EDJE_SIGNAL_LOAD_ERROR, "elm"); 291 eo_event_callback_call(sd->obj, ELM_THUMB_EVENT_LOAD_ERROR, NULL);
296 eo_event_callback_call
297 (sd->obj, ELM_THUMB_EVENT_LOAD_ERROR, NULL);
298 } 292 }
299 293
300 return; 294 return;
301 295
302err: 296err:
303 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_LOAD_ERROR, "elm"); 297 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_LOAD_ERROR, "elm");
304 eo_event_callback_call 298 eo_event_callback_call(sd->obj, ELM_THUMB_EVENT_LOAD_ERROR, NULL);
305 (sd->obj, ELM_THUMB_EVENT_LOAD_ERROR, NULL);
306} 299}
307 300
308static void 301static void
@@ -336,9 +329,8 @@ _on_ethumb_thumb_error(Ethumb_Client *client EINA_UNUSED,
336 ERR("Something odd happened with a thumbnail request"); 329 ERR("Something odd happened with a thumbnail request");
337 return; 330 return;
338 } 331 }
339 evas_object_event_callback_del_full 332 evas_object_event_callback_del_full(sd->view, EVAS_CALLBACK_IMAGE_PRELOADED,
340 (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded, 333 _on_thumb_preloaded, sd);
341 sd);
342 334
343 pending_request--; 335 pending_request--;
344 sd->thumb.request = NULL; 336 sd->thumb.request = NULL;
@@ -349,8 +341,7 @@ _on_ethumb_thumb_error(Ethumb_Client *client EINA_UNUSED,
349 ELM_WIDGET_DATA_GET_OR_RETURN(data, wd); 341 ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
350 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_ERROR, "elm"); 342 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_ERROR, "elm");
351 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_PULSE_STOP, "elm"); 343 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_PULSE_STOP, "elm");
352 eo_event_callback_call 344 eo_event_callback_call(sd->obj, ELM_THUMB_EVENT_GENERATE_ERROR, NULL);
353 (sd->obj, ELM_THUMB_EVENT_GENERATE_ERROR, NULL);
354} 345}
355 346
356static void 347static void
@@ -389,13 +380,14 @@ _thumb_start(Elm_Thumb_Data *sd)
389 ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd); 380 ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
390 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_PULSE_START, "elm"); 381 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_PULSE_START, "elm");
391 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_START, "elm"); 382 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_START, "elm");
392 eo_event_callback_call 383 eo_event_callback_call(sd->obj, ELM_THUMB_EVENT_GENERATE_START, NULL);
393 (sd->obj, ELM_THUMB_EVENT_GENERATE_START, NULL);
394 384
395 pending_request++; 385 pending_request++;
396 ethumb_client_file_set(_elm_ethumb_client, sd->file, sd->key); 386 ethumb_client_file_set(_elm_ethumb_client, sd->file, sd->key);
397 sd->thumb.request = ethumb_client_thumb_async_get 387 sd->thumb.request = ethumb_client_thumb_async_get(_elm_ethumb_client,
398 (_elm_ethumb_client, _on_ethumb_thumb_done, _on_ethumb_thumb_error, sd->obj); 388 _on_ethumb_thumb_done,
389 _on_ethumb_thumb_error,
390 sd->obj);
399} 391}
400 392
401static Eina_Bool 393static Eina_Bool
@@ -456,8 +448,8 @@ _thumb_show(Elm_Thumb_Data *sd)
456 } 448 }
457 449
458 if (!sd->eeh) 450 if (!sd->eeh)
459 sd->eeh = ecore_event_handler_add 451 sd->eeh = ecore_event_handler_add(ELM_ECORE_EVENT_ETHUMB_CONNECT,
460 (ELM_ECORE_EVENT_ETHUMB_CONNECT, _thumbnailing_available_cb, sd->obj); 452 _thumbnailing_available_cb, sd->obj);
461} 453}
462 454
463EOLIAN static void 455EOLIAN static void
@@ -480,10 +472,8 @@ _elm_thumb_evas_object_smart_hide(Eo *obj, Elm_Thumb_Data *sd)
480 ethumb_client_thumb_async_cancel(_elm_ethumb_client, sd->thumb.request); 472 ethumb_client_thumb_async_cancel(_elm_ethumb_client, sd->thumb.request);
481 sd->thumb.request = NULL; 473 sd->thumb.request = NULL;
482 474
483 edje_object_signal_emit 475 edje_object_signal_emit(wd->resize_obj, EDJE_SIGNAL_GENERATE_STOP, "elm");
484 (wd->resize_obj, EDJE_SIGNAL_GENERATE_STOP, "elm"); 476 eo_event_callback_call(sd->obj, ELM_THUMB_EVENT_GENERATE_STOP, NULL);
485 eo_event_callback_call
486 (sd->obj, ELM_THUMB_EVENT_GENERATE_STOP, NULL);
487 } 477 }
488 478
489 if (sd->thumb.retry) 479 if (sd->thumb.retry)
@@ -544,10 +534,10 @@ _elm_thumb_evas_object_smart_add(Eo *obj, Elm_Thumb_Data *_pd EINA_UNUSED)
544 if (!elm_layout_theme_set(obj, "thumb", "base", elm_widget_style_get(obj))) 534 if (!elm_layout_theme_set(obj, "thumb", "base", elm_widget_style_get(obj)))
545 CRI("Failed to set layout!"); 535 CRI("Failed to set layout!");
546 536
547 evas_object_event_callback_add 537 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN,
548 (obj, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, obj); 538 _mouse_down_cb, obj);
549 evas_object_event_callback_add 539 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
550 (obj, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, obj); 540 _mouse_up_cb, obj);
551 541
552 elm_widget_can_focus_set(obj, EINA_FALSE); 542 elm_widget_can_focus_set(obj, EINA_FALSE);
553} 543}
@@ -566,9 +556,8 @@ _elm_thumb_evas_object_smart_del(Eo *obj, Elm_Thumb_Data *sd)
566 eo_data_unref(sd->obj, sd); 556 eo_data_unref(sd->obj, sd);
567 sd->thumb.retry = EINA_FALSE; 557 sd->thumb.retry = EINA_FALSE;
568 } 558 }
569 evas_object_event_callback_del_full 559 evas_object_event_callback_del_full(sd->view, EVAS_CALLBACK_IMAGE_PRELOADED,
570 (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded, 560 _on_thumb_preloaded, sd);
571 sd);
572 561
573 ELM_SAFE_FREE(sd->view, evas_object_del); 562 ELM_SAFE_FREE(sd->view, evas_object_del);
574 eina_stringshare_del(sd->thumb.thumb_path); 563 eina_stringshare_del(sd->thumb.thumb_path);
@@ -608,7 +597,6 @@ _elm_thumb_efl_file_file_set(Eo *obj EINA_UNUSED, Elm_Thumb_Data *sd, const char
608{ 597{
609 Eina_Bool file_replaced, key_replaced; 598 Eina_Bool file_replaced, key_replaced;
610 599
611
612 file_replaced = eina_stringshare_replace(&(sd->file), file); 600 file_replaced = eina_stringshare_replace(&(sd->file), file);
613 key_replaced = eina_stringshare_replace(&(sd->key), key); 601 key_replaced = eina_stringshare_replace(&(sd->key), key);
614 602