summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/elc_fileselector.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/lib/elementary/elc_fileselector.c b/src/lib/elementary/elc_fileselector.c
index 9d59c620a5..bcafeb5306 100644
--- a/src/lib/elementary/elc_fileselector.c
+++ b/src/lib/elementary/elc_fileselector.c
@@ -312,13 +312,10 @@ _itc_icon_folder_get(void *data EINA_UNUSED,
312 Evas_Object *obj, 312 Evas_Object *obj,
313 const char *source) 313 const char *source)
314{ 314{
315 Evas_Object *ic, *grid, *f; 315 Evas_Object *ic, *grid;
316 316
317 if (strcmp(source, "elm.swallow.icon")) return NULL; 317 if (strcmp(source, "elm.swallow.icon")) return NULL;
318 318
319 f = evas_object_data_get(obj, "parent");
320 ELM_FILESELECTOR_DATA_GET(f, sd);
321
322 ic = elm_icon_add(obj); 319 ic = elm_icon_add(obj);
323 elm_icon_standard_set(ic, "folder"); 320 elm_icon_standard_set(ic, "folder");
324 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 321 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
@@ -327,7 +324,6 @@ _itc_icon_folder_get(void *data EINA_UNUSED,
327 grid = elm_grid_add(obj); 324 grid = elm_grid_add(obj);
328 elm_grid_size_set(grid, 1, 1); 325 elm_grid_size_set(grid, 1, 1);
329 elm_grid_pack(grid, ic, 0, 0, 1, 1); 326 elm_grid_pack(grid, ic, 0, 0, 1, 1);
330 evas_object_size_hint_min_set(grid, sd->thumbnail_size.w, sd->thumbnail_size.h);
331 evas_object_show(grid); 327 evas_object_show(grid);
332 328
333 return grid; 329 return grid;
@@ -339,13 +335,10 @@ _itc_icon_image_get(void *data,
339 const char *source) 335 const char *source)
340{ 336{
341 Elm_Fileselector_Item_Data *it_data = data; 337 Elm_Fileselector_Item_Data *it_data = data;
342 Evas_Object *ic, *grid, *f; 338 Evas_Object *ic, *grid;
343 339
344 if (strcmp(source, "elm.swallow.icon")) return NULL; 340 if (strcmp(source, "elm.swallow.icon")) return NULL;
345 341
346 f = evas_object_data_get(obj, "parent");
347 ELM_FILESELECTOR_DATA_GET(f, sd);
348
349 ic = elm_icon_add(obj); 342 ic = elm_icon_add(obj);
350 elm_icon_standard_set(ic, "image"); 343 elm_icon_standard_set(ic, "image");
351 // FIXME: maybe use Efl.Model.connect 344 // FIXME: maybe use Efl.Model.connect
@@ -356,7 +349,6 @@ _itc_icon_image_get(void *data,
356 grid = elm_grid_add(obj); 349 grid = elm_grid_add(obj);
357 elm_grid_size_set(grid, 1, 1); 350 elm_grid_size_set(grid, 1, 1);
358 elm_grid_pack(grid, ic, 0, 0, 1, 1); 351 elm_grid_pack(grid, ic, 0, 0, 1, 1);
359 evas_object_size_hint_min_set(grid, sd->thumbnail_size.w, sd->thumbnail_size.h);
360 evas_object_show(grid); 352 evas_object_show(grid);
361 353
362 return grid; 354 return grid;
@@ -367,13 +359,10 @@ _itc_icon_file_get(void *data EINA_UNUSED,
367 Evas_Object *obj, 359 Evas_Object *obj,
368 const char *source) 360 const char *source)
369{ 361{
370 Evas_Object *ic, *grid, *f; 362 Evas_Object *ic, *grid;
371 363
372 if (strcmp(source, "elm.swallow.icon")) return NULL; 364 if (strcmp(source, "elm.swallow.icon")) return NULL;
373 365
374 f = evas_object_data_get(obj, "parent");
375 ELM_FILESELECTOR_DATA_GET(f, sd);
376
377 ic = elm_icon_add(obj); 366 ic = elm_icon_add(obj);
378 elm_icon_standard_set(ic, "file"); 367 elm_icon_standard_set(ic, "file");
379 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 368 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
@@ -382,7 +371,6 @@ _itc_icon_file_get(void *data EINA_UNUSED,
382 grid = elm_grid_add(obj); 371 grid = elm_grid_add(obj);
383 elm_grid_size_set(grid, 1, 1); 372 elm_grid_size_set(grid, 1, 1);
384 elm_grid_pack(grid, ic, 0, 0, 1, 1); 373 elm_grid_pack(grid, ic, 0, 0, 1, 1);
385 evas_object_size_hint_min_set(grid, sd->thumbnail_size.w, sd->thumbnail_size.h);
386 evas_object_show(grid); 374 evas_object_show(grid);
387 375
388 return grid; 376 return grid;