Ephoto: In preparation for release, remove the overlapping autohide panels per overwhelming user requests.

master
Stephen 'Okra' Houston 6 years ago
parent 5cbf023d1d
commit 2639e5b1ad
  1. 2
      data/themes/Makefile.am
  2. 415
      data/themes/ephoto.edc
  3. BIN
      data/themes/images/shadow.png
  4. BIN
      data/themes/images/shadow_circle_horiz.png
  5. BIN
      data/themes/images/shadow_circle_vert.png
  6. 20
      src/bin/ephoto.h
  7. 15
      src/bin/ephoto_bcg.c
  8. 15
      src/bin/ephoto_color.c
  9. 86
      src/bin/ephoto_config.c
  10. 27
      src/bin/ephoto_cropper.c
  11. 30
      src/bin/ephoto_directory_browser.c
  12. 48
      src/bin/ephoto_editor.c
  13. 72
      src/bin/ephoto_file.c
  14. 12
      src/bin/ephoto_filters.c
  15. 15
      src/bin/ephoto_hsv.c
  16. 219
      src/bin/ephoto_main.c
  17. 9
      src/bin/ephoto_red_eye.c
  18. 10
      src/bin/ephoto_scale.c
  19. 155
      src/bin/ephoto_single_browser.c
  20. 142
      src/bin/ephoto_slideshow.c
  21. 105
      src/bin/ephoto_thumb_browser.c

@ -13,8 +13,6 @@ EXTRA_DIST = ephoto.edc \
images/sel_corner3.png \
images/sel_corner5.png \
images/sel_corner7.png \
images/shadow_circle_horiz.png \
images/shadow_circle_vert.png \
images/tile.png
ephoto.edj: Makefile $(EXTRA_DIST)

@ -3,10 +3,7 @@
collections {
images {
image: "images/shadow_circle_horiz.png" COMP;
image: "images/shadow_circle_vert.png" COMP;
image: "images/tile.png" COMP;
image: "images/shadow.png" COMP;
image: "images/sel_border.png" COMP;
image: "images/sel_corner1.png" COMP;
image: "images/sel_corner3.png" COMP;
@ -15,98 +12,105 @@ collections {
}
group { name: "ephoto,main,layout";
script {
public offseth = 0;
public offsetv = 0;
public custom = 0 ;
public custom_folders = 0;
public folders_visible = 1;
public controls_visible = 1;
public custom_editor = 0;
public folders_visible = 0;
public editor_visible = 0;
public statusbar_visible = 1;
public message(Msg_Type:type, id, ...) {
if ((type == MSG_INT_SET) && (id == 1)) {
new hoffset = getarg(2);
new voffset = getarg(3);
new hoff, voff, roneoff;
set_int(custom, 1);
hoffset *= -1;
voffset *= -1;
get_state_val(PART:"ephoto.swallow.controls", STATE_REL1_OFFSET,
0, roneoff);
get_state_val(PART:"ephoto.swallow.controls", STATE_REL2_OFFSET,
hoff, voff);
roneoff -= get_int(offsetv);
roneoff += voffset;
hoff -= get_int(offseth);
voff -= get_int(offsetv);
hoff += hoffset;
voff += voffset;
set_int(offseth, hoffset);
set_int(offsetv, voffset);
custom_state(PART:"ephoto.swallow.controls", "default", 0.0);
set_state_val(PART:"ephoto.swallow.controls", STATE_REL1_OFFSET,
0, roneoff);
set_state_val(PART:"ephoto.swallow.controls", STATE_REL2_OFFSET,
hoff, voff);
set_state(PART:"ephoto.swallow.controls", "custom", 0.0);
}
if ((type == MSG_INT_SET) && (id == 2)) {
new minw = getarg(2);
set_int(statusbar_visible, 1);
set_int(custom_folders, 1);
custom_state(PART:"ephoto.swallow.folders", "visible", 0.0);
set_int(custom_editor, 1);
custom_state(PART:"ephoto,folders",
"visible", 0.0);
custom_state(PART:"ephoto.swallow.folders",
"visible", 0.0);
custom_state(PART:"ephoto,editor",
"visible", 0.0);
custom_state(PART:"ephoto.swallow.editor",
"visible", 0.0);
set_state_val(PART:"ephoto,folders",
STATE_MIN, minw, 0);
set_state_val(PART:"ephoto.swallow.folders",
STATE_MIN, minw, 0);
set_state_val(PART:"ephoto,editor",
STATE_MIN, minw, 0);
set_state_val(PART:"ephoto.swallow.editor",
STATE_MIN, minw, 0);
if (get_int(folders_visible)) {
set_state(PART:"ephoto,folders",
"custom", 0.0);
set_state(PART:"ephoto.swallow.folders",
"custom", 0.0);
}
if (get_int(editor_visible)) {
set_state(PART:"ephoto,editor",
"custom", 0.0);
set_state(PART:"ephoto.swallow.editor",
"custom", 0.0);
}
}
}
public hide_folders(val, Float:pos) {
set_int(folders_visible, 0);
set_state_anim(PART:"ephoto.swallow.folders",
"hidden", 0.0, DECELERATE, pos);
set_state_anim(PART:"folders_shadow",
"hidden", 0.0, DECELERATE, pos);
"default", 0.0, DECELERATE, pos);
set_state_anim(PART:"ephoto,folders",
"hidden", 0.0, DECELERATE, pos);
"default", 0.0, DECELERATE, pos);
}
public show_folders(val, Float:pos) {
set_int(folders_visible, 1);
if (get_int(custom_folders)) {
if (custom_folders) {
set_state_anim(PART:"ephoto.swallow.folders",
"custom", 0.0, ACCELERATE, pos);
"custom", 1.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,folders",
"custom", 1.0, ACCELERATE, pos);
}
else {
set_state_anim(PART:"ephoto.swallow.folders",
"default", 0.0, ACCELERATE, pos);
}
set_state_anim(PART:"folders_shadow",
"default", 0.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,folders",
"default", 0.0, ACCELERATE, pos);
}
public hide_controls(val, Float:pos) {
set_int(controls_visible, 0);
set_state_anim(PART:"ephoto.swallow.controls",
"hidden", 0.0, DECELERATE, pos);
set_state_anim(PART:"controls_shadow",
"hidden", 0.0, DECELERATE, pos);
set_state_anim(PART:"ephoto,controls",
"hidden", 0.0, DECELERATE, pos);
}
public show_controls(val, Float:pos) {
set_int(controls_visible, 1);
if (get_int(custom)) {
set_state_anim(PART:"ephoto.swallow.controls",
"custom", 0.0, ACCELERATE, pos);
"visible", 1.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,folders",
"visible", 1.0, ACCELERATE, pos);
}
}
public hide_editor(val, Float:pos) {
set_int(editor_visible, 0);
set_state_anim(PART:"ephoto.swallow.editor",
"default", 0.0, DECELERATE, pos);
set_state_anim(PART:"ephoto,editor",
"default", 0.0, DECELERATE, pos);
}
public show_editor(val, Float:pos) {
set_int(editor_visible, 1);
if (custom_editor) {
set_state_anim(PART:"ephoto.swallow.editor",
"custom", 1.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,editor",
"custom", 1.0, ACCELERATE, pos);
}
else {
set_state_anim(PART:"ephoto.swallow.controls",
"default", 0.0, ACCELERATE, pos);
}
set_state_anim(PART:"controls_shadow",
"default", 0.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,controls",
"default", 0.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto.swallow.editor",
"visible", 1.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,editor",
"visible", 1.0, ACCELERATE, pos);
}
}
public hide_statusbar(val, Float:pos) {
set_int(statusbar_visible, 0);
set_state_anim(PART:"ephoto.swallow.statusbar",
"hidden", 0.0, DECELERATE, pos);
set_state_anim(PART:"ephoto,statusbar",
"hidden", 0.0, DECELERATE, pos);
}
public show_statusbar(val, Float:pos) {
set_int(statusbar_visible, 1);
set_state_anim(PART:"ephoto.swallow.statusbar",
"default", 1.0, ACCELERATE, pos);
set_state_anim(PART:"ephoto,statusbar",
"default", 1.0, ACCELERATE, pos);
}
}
parts {
@ -120,6 +124,8 @@ collections {
clip_to: "ephoto,main,clip";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "ephoto.swallow.main";
rel2.to: "ephoto.swallow.main";
image.normal: "images/tile.png";
color: 210 210 210 255;
fill {
@ -133,179 +139,111 @@ collections {
mouse_events: 1;
clip_to: "ephoto,main,clip";
description { state: "default" 0.0;
rel2.to: "ephoto,editor";
rel2.relative: 0.0 1.0;
rel1.to_x: "ephoto,folders";
rel1.relative: 1.0 0.0;
rel2.to_x: "ephoto,editor";
rel2.to_y: "ephoto,statusbar";
rel2.relative: 0.0 0.0;
}
}
rect { name: "ephoto,editor";
scale: 1;
rect { name: "ephoto,folders";
clip_to: "ephoto,main,clip";
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "ephoto.swallow.editor";
rel2.to: "ephoto.swallow.editor";
min: 0 0;
rel1.to: "ephoto.swallow.folders";
rel2.to: "ephoto.swallow.folders";
color: 255 255 255 0;
visible: 0;
}
description { state: "visible" 0.0;
inherit: default 0.0;
fixed: 1 1;
min: 220 0;
color: 255 255 255 255;
visible: 1;
}
}
image { name: "editor_shadow";
mouse_events: 0;
swallow { name: "ephoto.swallow.folders";
scale: 1;
mouse_events: 1;
clip_to: "ephoto,folders";
description { state: "default" 0.0;
fixed: 1 1;
image.normal: "images/shadow_circle_vert.png";
min: 32 0;
min: 0 0;
align: 1.0 0.0;
rel1.relative: 0.0 0.0;
rel2.to_y: "ephoto,statusbar";
rel2.relative: 0.0 0.0;
color: 255 255 255 0;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
rel1.to: "ephoto,editor";
rel1.relative: 1.0 0.0;
rel2.to: "ephoto,editor";
color: 255 255 255 128;
min: 220 0;
rel1.relative: 0.0 0.0;
rel2.to_y: "ephoto,statusbar";
rel2.relative: 0.2 0.0;
color: 255 255 255 255;
visible: 1;
}
}
rect { name: "editor_base";
clip_to: "ephoto,editor";
scale: 1;
description { state: "default" 0.0;
color: 30 30 30 150;
rel1.to: "ephoto,editor";
rel2.to: "ephoto,editor";
}
}
swallow { name: "ephoto.swallow.editor";
rect { name: "ephoto,editor";
clip_to: "ephoto,main,clip";
scale: 1;
mouse_events: 1;
clip_to: "ephoto,editor";
description { state: "default" 0.0;
fixed: 1 1;
min: 220 0;
rel1.to: "ephoto,main,clip";
rel1.relative: 1.0 0.0;
rel2.to: "ephoto,main,clip";
rel2.relative: 2.0 1.0;
min: 0 0;
rel1.to: "ephoto.swallow.editor";
rel2.to: "ephoto.swallow.editor";
color: 255 255 255 0;
visible: 0;
}
description { state: "visible" 0.0;
inherit: "default" 0.0;
rel1.to: "ephoto,main,clip";
rel1.relative: 1.0 0.0;
rel2.to: "ephoto,main,clip";
rel2.relative: 1.0 1.0;
align: 1.0 0.0;
visible: 1;
}
}
rect { name: "ephoto,folders";
clip_to: "ephoto,main,clip";
scale: 1;
description { state: "default" 0.0;
inherit: default 0.0;
fixed: 1 1;
min: 220 0;
rel1.to: "ephoto.swallow.folders";
rel2.to: "ephoto.swallow.folders";
color: 255 255 255 255;
visible: 1;
}
description { state: "hidden" 0.0;
inherit: default 0.0;
color: 255 255 255 0;
visible: 0;
}
}
image { name: "folders_shadow";
mouse_events: 0;
swallow { name: "ephoto.swallow.editor";
scale: 1;
mouse_events: 1;
clip_to: "ephoto,editor";
description { state: "default" 0.0;
fixed: 1 1;
image.normal: "images/shadow_circle_vert.png";
min: 32 0;
rel1.to: "ephoto,folders";
min: 0 0;
align: 0.0 0.0;
rel1.relative: 1.0 0.0;
rel2.to: "ephoto,folders";
color: 255 255 255 128;
visible: 1;
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
rel2.to_y: "ephoto,statusbar";
rel2.relative: 1.0 0.0;
color: 255 255 255 0;
visible: 0;
}
}
rect { name: "folders_base";
clip_to: "ephoto,folders";
scale: 1;
description { state: "default" 0.0;
color: 30 30 30 150;
rel1.to: "ephoto,folders";
rel2.to: "ephoto,folders";
}
}
swallow { name: "ephoto.swallow.folders";
scale: 1;
mouse_events: 1;
clip_to: "ephoto,folders";
description { state: "default" 0.0;
description { state: "visible" 0.0;
inherit: "default" 0.0;
fixed: 1 1;
min: 220 0;
rel1.to: "ephoto.swallow.main";
rel1.relative: 0.0 0.0;
rel2.to: "ephoto,controls";
rel2.relative: 0.0 0.0;
align: 0.0 0.0;
rel1.relative: 0.8 0.0;
rel2.to_y: "ephoto,statusbar";
rel2.relative: 1.0 0.0;
align: 1.0 0.0;
color: 255 255 255 255;
visible: 1;
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
}
rect { name: "ephoto,controls";
scale: 1;
rect { name: "ephoto,statusbar";
clip_to: "ephoto,main,clip";
description { state: "default" 0.0;
fixed: 0 1;
rel1.to: "ephoto.swallow.controls";
rel2.to: "ephoto.swallow.controls";
color: 255 255 255 255;
visible: 1;
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
color: 255 255 255 0;
visible: 0;
}
}
rect { name: "controls_base";
clip_to: "ephoto,controls";
scale: 1;
description { state: "default" 0.0;
color: 30 30 30 150;
rel1.to: "ephoto,controls";
rel2.to: "ephoto,controls";
}
}
image { name: "controls_shadow";
mouse_events: 0;
scale: 1;
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "controls_base";
rel1.relative: 0.0 0.0;
rel2.to: "controls_base";
rel2.relative: 1.0 0.0;
image.normal: "images/shadow_circle_horiz.png";
min: 0 32;
color: 255 255 255 128;
rel1.to: "ephoto.swallow.statusbar";
rel2.to: "ephoto.swallow.statusbar";
color: 255 255 255 255;
visible: 1;
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
@ -313,71 +251,32 @@ collections {
visible: 0;
}
}
swallow { name: "ephoto.swallow.controls";
swallow { name: "ephoto.swallow.statusbar";
scale: 1;
mouse_events: 1;
clip_to: "ephoto,controls";
clip_to: "ephoto,statusbar";
description { state: "default" 0.0;
fixed: 1 1;
rel1.to: "ephoto.swallow.main";
rel2.to: "ephoto.swallow.main";
rel1.relative: 0.0 1.0;
rel1.offset: 0 -1;
rel2.offset: 0 -1;
align: 0.5 1.0;
rel2.relative: 1.0 1.0;
align: 0.0 1.0;
color: 255 255 255 255;
visible: 1;
}
description { state: "hidden" 0.0;
inherit: "default" 0.0;
align: 0.0 0.0;
color: 255 255 255 0;
visible: 0;
}
}
}
programs {
program { signal: "ephoto,editor,hide";
source: "ephoto";
action: STATE_SET "default" 0.0;
target: "ephoto.swallow.editor";
target: "editor_shadow";
target: "ephoto,editor";
}
program { signal: "ephoto,editor,show";
source: "ephoto";
action: STATE_SET "visible" 0.0;
target: "ephoto.swallow.editor";
target: "editor_shadow";
target: "ephoto,editor";
}
program { signal: "mouse,in";
source: "ephoto.swallow.controls";
action: SIGNAL_EMIT "ephoto,block" "ephoto";
}
program { signal: "mouse,out";
source: "ephoto.swallow.controls";
action: SIGNAL_EMIT "ephoto,unblock" "ephoto";
}
program { signal: "mouse,in";
source: "ephoto.swallow.folders";
action: SIGNAL_EMIT "ephoto,block" "ephoto";
}
program { signal: "mouse,out";
source: "ephoto.swallow.folders";
action: SIGNAL_EMIT "ephoto,unblock" "ephoto";
}
program { signal: "ephoto,folders,hide,start";
source: "ephoto";
action: STATE_SET "hidden" 0.0;
target: "ephoto.swallow.folders";
target: "folders_shadow";
target: "ephoto,folders";
}
program { signal: "ephoto,folders,hide";
source: "ephoto";
script {
if (get_int(folders_visible)) {
anim(1.0, "hide_folders", 1);
anim(0.3, "hide_folders", 1);
}
}
}
@ -385,23 +284,49 @@ collections {
source: "ephoto";
script {
if (!get_int(folders_visible)) {
anim(0.5, "show_folders", 1);
anim(0.3, "show_folders", 1);
}
}
}
program { signal: "ephoto,folders,show,start";
source: "ephoto";
script {
set_int(folders_visible, 1);
if (custom_folders) {
set_state(PART:"ephoto,folders", "custom", 0.0);
set_state(PART:"ephoto.swallow.folders", "custom", 0.0);
}
else {
set_state(PART:"ephoto,folders", "visible", 0.0);
set_state(PART:"ephoto.swallow.folders", "visible", 0.0);
}
}
}
program { signal: "ephoto,controls,hide";
program { signal: "ephoto,editor,hide";
source: "ephoto";
script {
anim(0.3, "hide_editor", 1);
}
}
program { signal: "ephoto,editor,show";
source: "ephoto";
script {
anim(0.3, "show_editor", 1);
}
}
program { signal: "ephoto,statusbar,hide";
source: "ephoto";
script {
if (get_int(controls_visible)) {
anim(1.0, "hide_controls", 1);
if (get_int(statusbar_visible)) {
anim(0.3, "hide_statusbar", 1);
}
}
}
program { signal: "ephoto,controls,show";
program { signal: "ephoto,statusbar,show";
source: "ephoto";
script {
if (!get_int(controls_visible)) {
anim(0.5, "show_controls", 1);
if (!get_int(statusbar_visible)) {
anim(0.3, "show_statusbar", 1);
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 B

@ -82,7 +82,6 @@ void ephoto_single_browser_image_data_done(Evas_Object *main,
unsigned int *image_data, Evas_Coord w, Evas_Coord h);
void ephoto_single_browser_cancel_editing(Evas_Object *main);
void ephoto_single_browser_slideshow(Evas_Object *obj);
void ephoto_single_browser_adjust_offsets(Ephoto *ephoto);
/* smart callbacks called: "back" - the user wants to go back to the previous
* screen. */
@ -91,7 +90,6 @@ Evas_Object *ephoto_slideshow_add(Ephoto *ephoto, Evas_Object *parent);
void ephoto_slideshow_entries_set(Evas_Object *obj, Eina_List *entries);
void ephoto_slideshow_entry_set(Evas_Object *obj, Ephoto_Entry *entry);
void ephoto_slideshow_show_controls(Ephoto *ephoto);
void ephoto_slideshow_adjust_offsets(Ephoto *ephoto);
/* smart callbacks called: "back" - the user wants to go back to the previous
* screen. */
@ -243,9 +241,12 @@ struct _Ephoto_Config
struct _Ephoto
{
Evas_Object *win;
Evas_Object *main;
Evas_Object *layout;
Evas_Object *pager;
Evas_Object *statusbar;
Evas_Object *folders_button;
Evas_Object *view_button;
Evas_Object *controls_left;
Evas_Object *controls_right;
Evas_Object *infolabel;
@ -261,24 +262,17 @@ struct _Ephoto
Elm_Object_Item *sb;
Elm_Object_Item *sl;
Eina_Bool folders_toggle;
Eina_List *entries;
Eina_List *selentries;
Eina_List *searchentries;
Eina_List *thumbs;
Eina_Bool blocking;
Eina_Bool menu_blocking;
Eina_Bool hover_blocking;
Eina_Bool right_blocking;
Eina_Bool folders_toggle;
Eina_Bool editor_blocking;
Eio_Monitor *monitor;
Eina_List *monitor_handlers;
Ecore_Thread *file_thread;
Eina_List *file_pos;
Eina_List *upload_handlers;
Ecore_Timer *overlay_timer;
Ecore_Thread *file_thread;
Ecore_Con_Url *url_up;
char *url_ret;
char *upload_error;
@ -417,5 +411,9 @@ extern int EPHOTO_EVENT_EDITOR_BACK;
#define WRN(...) EINA_LOG_WARN(__VA_ARGS__)
#define INF(...) EINA_LOG_INFO(__VA_ARGS__)
#define DBG(...) EINA_LOG_DBG(__VA_ARGS__)
#define EPHOTO_WEIGHT evas_object_size_hint_weight_set
#define EPHOTO_ALIGN evas_object_size_hint_align_set
#define EPHOTO_EXPAND(X) EPHOTO_WEIGHT((X), EVAS_HINT_EXPAND, EVAS_HINT_EXPAND)
#define EPHOTO_FILL(X) EPHOTO_ALIGN((X), EVAS_HINT_FILL, EVAS_HINT_FILL)
#endif

@ -362,8 +362,9 @@ ephoto_bcg_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_step_set(slider, .1);
elm_slider_value_set(slider, 1);
elm_slider_unit_format_set(slider, "%1.2f");
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
elm_slider_indicator_format_set(slider, "%1.2f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_gamma_slider_changed, ebcg);
elm_box_pack_start(ebcg->editor, slider);
@ -376,8 +377,9 @@ ephoto_bcg_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_step_set(slider, 1);
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_contrast_slider_changed, ebcg);
elm_box_pack_start(ebcg->editor, slider);
@ -390,8 +392,9 @@ ephoto_bcg_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Obje
elm_slider_step_set(slider, 1);
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_brightness_slider_changed, ebcg);
elm_box_pack_start(ebcg->editor, slider);

@ -347,8 +347,9 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob
elm_slider_step_set(slider, 1);
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_blue_slider_changed, eco);
elm_box_pack_start(eco->editor, slider);
@ -361,8 +362,9 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob
elm_slider_step_set(slider, 1);
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_green_slider_changed, eco);
elm_box_pack_start(eco->editor, slider);
@ -375,8 +377,9 @@ ephoto_color_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent, Evas_Ob
elm_slider_step_set(slider, 1);
elm_slider_value_set(slider, 0);
elm_slider_unit_format_set(slider, "%1.0f");
evas_object_size_hint_weight_set(slider, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(slider, EVAS_HINT_FILL, 0.5);
elm_slider_indicator_format_set(slider, "%1.0f");
EPHOTO_WEIGHT(slider, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(slider, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(slider, "delay,changed",
_red_slider_changed, eco);
elm_box_pack_start(eco->editor, slider);

@ -73,14 +73,14 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
Evas_Object *table, *check, *hoversel, *entry, *label;
table = elm_table_add(parent);
evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(table);
EPHOTO_FILL(table);
elm_box_pack_end(parent, table);
evas_object_show(table);
check = elm_check_add(table);
elm_object_text_set(check, _("Show Folders On Start"));
evas_object_size_hint_align_set(check, 0.0, 0.5);
EPHOTO_ALIGN(check, 0.0, 0.5);
elm_check_state_set(check, ephoto->config->folders);
elm_table_pack(table, check, 0, 0, 1, 1);
evas_object_show(check);
@ -88,7 +88,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
check = elm_check_add(table);
elm_object_text_set(check, _("Prompt Before Changing The Filesystem"));
evas_object_size_hint_align_set(check, 0.0, EVAS_HINT_FILL);
EPHOTO_FILL(check);
elm_check_state_set(check, ephoto->config->prompts);
elm_table_pack(table, check, 0, 1, 1, 1);
evas_object_show(check);
@ -96,7 +96,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
check = elm_check_add(table);
elm_object_text_set(check, _("Move Files When Dropped"));
evas_object_size_hint_align_set(check, 0.0, EVAS_HINT_FILL);
EPHOTO_FILL(check);
elm_check_state_set(check, ephoto->config->drop);
elm_table_pack(table, check, 0, 2, 1, 1);
evas_object_show(check);
@ -104,7 +104,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
check = elm_check_add(table);
elm_object_text_set(check, _("Smooth Scale Images"));
evas_object_size_hint_align_set(check, 0.0, EVAS_HINT_FILL);
EPHOTO_FILL(check);
elm_check_state_set(check, ephoto->config->smooth);
elm_table_pack(table, check, 0, 3, 1, 1);
evas_object_show(check);
@ -112,7 +112,7 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
label = elm_label_add(table);
elm_object_text_set(label, _("Top Level Directory"));
evas_object_size_hint_align_set(label, 0.5, 0.5);
EPHOTO_ALIGN(label, 0.5, 0.5);
elm_table_pack(table, label, 0, 4, 1, 1);
evas_object_show(label);
@ -128,9 +128,8 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
_open_hv_select, ephoto);
elm_object_text_set(hoversel, ephoto->config->open);
evas_object_data_set(hoversel, "ephoto", ephoto);
evas_object_size_hint_weight_set(hoversel, EVAS_HINT_EXPAND,
EVAS_HINT_FILL);
evas_object_size_hint_align_set(hoversel, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(hoversel, EVAS_HINT_EXPAND, 0.0);
EPHOTO_FILL(hoversel);
elm_table_pack(table, hoversel, 0, 5, 1, 1);
evas_object_show(hoversel);
ephoto->config->open_dir = hoversel;
@ -142,8 +141,8 @@ _config_general(Ephoto *ephoto, Evas_Object *parent)
elm_object_disabled_set(entry, EINA_TRUE);
elm_scroller_policy_set(entry, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(entry);
EPHOTO_FILL(entry);
elm_table_pack(table, entry, 0, 6, 1, 1);
evas_object_show(entry);
ephoto->config->open_dir_custom = entry;
@ -202,14 +201,14 @@ _config_slideshow(Ephoto *ephoto, Evas_Object *parent)
char buf[PATH_MAX];
table = elm_table_add(parent);
evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(table);
EPHOTO_FILL(table);
elm_box_pack_end(parent, table);
evas_object_show(table);
check = elm_check_add(table);
elm_object_text_set(check, _("Moving Slideshow"));
evas_object_size_hint_align_set(check, 0.5, 0.5);
EPHOTO_ALIGN(check, 0.5, 0.5);
elm_check_state_set(check, ephoto->config->movess);
elm_table_pack(table, check, 0, 0, 2, 1);
evas_object_show(check);
@ -219,7 +218,7 @@ _config_slideshow(Ephoto *ephoto, Evas_Object *parent)
memset(buf, 0, PATH_MAX);
snprintf(buf, PATH_MAX, "%s:", _("Show Each Slide For"));
elm_object_text_set(label, buf);
evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL);
EPHOTO_FILL(label);
elm_table_pack(table, label, 0, 1, 1, 1);
evas_object_show(label);
@ -240,7 +239,7 @@ _config_slideshow(Ephoto *ephoto, Evas_Object *parent)
memset(buf, 0, PATH_MAX);
snprintf(buf, PATH_MAX, "%s:", _("Slide Transition"));
elm_object_text_set(label, buf);
evas_object_size_hint_align_set(label, 0.0, EVAS_HINT_FILL);
EPHOTO_FILL(label);
elm_table_pack(table, label, 0, 2, 1, 1);
evas_object_show(label);
@ -254,9 +253,8 @@ _config_slideshow(Ephoto *ephoto, Evas_Object *parent)
_hv_select, transition);
elm_hoversel_item_add(hoversel, "none", NULL, 0, _hv_select, NULL);
elm_object_text_set(hoversel, ephoto->config->slideshow_transition);
evas_object_size_hint_weight_set(hoversel, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(hoversel, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(hoversel);
EPHOTO_FILL(hoversel);
elm_table_pack(table, hoversel, 1, 2, 1, 1);
evas_object_show(hoversel);
ephoto->config->slide_trans = hoversel;
@ -274,14 +272,14 @@ _config_settings(Ephoto *ephoto, Evas_Object *parent, Eina_Bool slideshow)
elm_object_text_set(frame, _("General"));
else
elm_object_text_set(frame, _("Slideshow"));
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(frame);
EPHOTO_FILL(frame);
evas_object_show(frame);
vbox = elm_box_add(frame);
elm_box_horizontal_set(vbox, EINA_FALSE);
evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(vbox);
EPHOTO_FILL(vbox);
elm_object_content_set(frame, vbox);
evas_object_show(vbox);
@ -352,28 +350,28 @@ _config_bindings(Evas_Object *parent)
frame = elm_frame_add(parent);
elm_object_text_set(frame, _("Bindings"));
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(frame);
EPHOTO_FILL(frame);
evas_object_show(frame);
box = elm_box_add(parent);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(box);
EPHOTO_FILL(box);
elm_object_content_set(frame, box);
evas_object_show(box);
scroller = elm_scroller_add(box);
evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(scroller);
EPHOTO_FILL(scroller);
elm_box_pack_end(box, scroller);
evas_object_show(scroller);
entry = elm_entry_add(scroller);
elm_entry_editable_set(entry, EINA_FALSE);
elm_entry_line_wrap_set(entry, ELM_WRAP_NONE);
evas_object_size_hint_weight_set(entry, 0.0, 0.0);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(entry, 0.0, 0.0);
EPHOTO_FILL(entry);
eina_strbuf_append_printf(sbuf,
_("<b><hilight>General Bindings</hilight></b><br/>"
"<b>F1:</b> Settings Panel<br/>"
@ -439,14 +437,14 @@ _config_about(Evas_Object *parent)
frame = elm_frame_add(parent);
elm_object_text_set(frame, _("About"));
evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(frame);
EPHOTO_FILL(frame);
evas_object_show(frame);
box = elm_box_add(frame);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(box);
EPHOTO_FILL(box);
elm_object_content_set(frame, box);
evas_object_show(box);
@ -463,8 +461,8 @@ _config_about(Evas_Object *parent)
lbl = elm_label_add(box);
elm_object_text_set(lbl, ver);
evas_object_size_hint_weight_set(lbl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(lbl, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(lbl);
EPHOTO_FILL(lbl);
elm_box_pack_end(box, lbl);
evas_object_show(lbl);
@ -474,8 +472,8 @@ _config_about(Evas_Object *parent)
elm_entry_editable_set(entry, EINA_FALSE);
elm_entry_context_menu_disabled_set(entry, EINA_TRUE);
elm_entry_line_wrap_set(entry, ELM_WRAP_NONE);
evas_object_size_hint_weight_set(entry, 0.0, 0.0);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(entry, 0.0, 0.0);
EPHOTO_FILL(entry);
eina_strbuf_append_printf(sbuf,
_("Ephoto is a comprehensive image viewer based on the EFL. For more<br/>"
"information, please visit the Ephoto project page:<br/>"
@ -637,8 +635,8 @@ ephoto_config_main(Ephoto *ephoto)
table = elm_table_add(popup);
elm_table_homogeneous_set(table, EINA_FALSE);
evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(table);
EPHOTO_FILL(table);
settings = _config_settings(ephoto, table, EINA_FALSE);
elm_table_pack(table, settings, 1, 0, 1, 1);
@ -652,8 +650,8 @@ ephoto_config_main(Ephoto *ephoto)
list = elm_list_add(table);
elm_list_select_mode_set(list, ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_scroller_content_min_limit(list, 1, 1);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(list);
EPHOTO_FILL(list);
elm_table_pack(table, list, 0, 0, 1, 1);
evas_object_show(list);

@ -648,24 +648,21 @@ ephoto_cropper_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
ec->box = elm_box_add(image_parent);
elm_box_homogeneous_set(ec->box, EINA_TRUE);
elm_box_horizontal_set(ec->box, EINA_TRUE);
evas_object_size_hint_weight_set(ec->box, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ec->box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(ec->box);
EPHOTO_FILL(ec->box);
elm_table_pack(image_parent, ec->box, 0, 0, 1, 1);
evas_object_show(ec->box);
ec->layout = elm_layout_add(ec->box);
elm_layout_file_set(ec->layout, PACKAGE_DATA_DIR "/themes/ephoto.edj",
"ephoto,image,cropper,base");
evas_object_size_hint_weight_set(ec->layout, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ec->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(ec->layout);
EPHOTO_FILL(ec->layout);
elm_box_pack_end(ec->box, ec->layout);
evas_object_show(ec->layout);
evas_object_size_hint_weight_set(ec->image, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ec->image, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(ec->image);
EPHOTO_FILL(ec->image);
elm_layout_content_set(ec->layout, "ephoto.swallow.image", ec->image);
evas_object_show(ec->image);
@ -709,10 +706,10 @@ ephoto_cropper_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
elm_slider_min_max_set(ec->croph, 1, h);
elm_slider_step_set(ec->croph, 1);
elm_slider_unit_format_set(ec->croph, "%1.0f");
elm_slider_indicator_format_set(ec->croph, "%1.0f");
elm_object_text_set(ec->croph, _("Height"));
evas_object_size_hint_weight_set(ec->croph, EVAS_HINT_EXPAND,
EVAS_HINT_FILL);
evas_object_size_hint_align_set(ec->croph, EVAS_HINT_FILL, 0.5);
EPHOTO_WEIGHT(ec->croph, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(ec->croph, EVAS_HINT_FILL, 0.5);
elm_box_pack_start(ec->editor, ec->croph);
evas_object_smart_callback_add(ec->croph, "slider,drag,stop",
_cropper_changed_height, ec);
@ -722,10 +719,10 @@ ephoto_cropper_add(Ephoto *ephoto, Evas_Object *main, Evas_Object *parent,
elm_slider_min_max_set(ec->cropw, 1, w);
elm_slider_step_set(ec->cropw, 1);
elm_slider_unit_format_set(ec->cropw, "%1.0f");
elm_slider_indicator_format_set(ec->cropw, "%1.0f");
elm_object_text_set(ec->cropw, _("Width"));
evas_object_size_hint_weight_set(ec->cropw, EVAS_HINT_EXPAND,
EVAS_HINT_FILL);
evas_object_size_hint_align_set(ec->cropw, EVAS_HINT_FILL, 0.5);
EPHOTO_WEIGHT(ec->cropw, EVAS_HINT_EXPAND, 0.0);
EPHOTO_ALIGN(ec->cropw, EVAS_HINT_FILL, 0.5);
elm_box_pack_start(ec->editor, ec->cropw);
evas_object_smart_callback_add(ec->cropw, "slider,drag,stop",
_cropper_changed_width, ec);

@ -56,7 +56,6 @@ _menu_dismissed_cb(void *data, Evas_Object *obj,
{
Ephoto_Directory_Browser *db = data;
db->ephoto->menu_blocking = EINA_FALSE;
evas_object_del(obj);
elm_object_focus_set(db->main, EINA_TRUE);
}
@ -447,8 +446,8 @@ _dir_go_trash(void *data, Evas_Object *obj EINA_UNUSED,
but = elm_button_add(db->leftbox);
elm_object_text_set(but, _("Back"));
elm_object_part_content_set(but, "icon", ic);
evas_object_size_hint_weight_set(but, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_fill_set(but, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(but, EVAS_HINT_EXPAND, 0.0);
EPHOTO_FILL(but);
evas_object_smart_callback_add(but, "clicked", _trash_back, db);
elm_box_pack_end(db->leftbox, but);
evas_object_show(but);
@ -456,9 +455,8 @@ _dir_go_trash(void *data, Evas_Object *obj EINA_UNUSED,
db->fsel = elm_genlist_add(db->leftbox);
elm_genlist_select_mode_set(db->fsel, ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_genlist_highlight_mode_set(db->fsel, EINA_TRUE);
evas_object_size_hint_weight_set(db->fsel, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(db->fsel, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(db->fsel);
EPHOTO_FILL(db->fsel);
evas_object_smart_callback_add(db->fsel, "expand,request",
_on_list_expand_req, db);
evas_object_smart_callback_add(db->fsel, "contract,request",
@ -614,8 +612,6 @@ _fsel_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
if (item)
elm_genlist_item_selected_set(item, EINA_TRUE);
db->ephoto->menu_blocking = EINA_TRUE;
menu = elm_menu_add(db->ephoto->win);
elm_menu_move(menu, x, y);
@ -658,24 +654,22 @@ _ephoto_directory_view_add(Ephoto_Directory_Browser *db)
msg->count = 1;
msg->val[0] = (int)round(220 * elm_config_scale_get());
edje_object_message_send(elm_layout_edje_get(db->ephoto->layout),
EDJE_MESSAGE_INT_SET, 2, msg);
EDJE_MESSAGE_INT_SET, 1, msg);
db->leftbox = elm_box_add(db->main);
elm_box_horizontal_set(db->leftbox, EINA_FALSE);
elm_box_homogeneous_set(db->leftbox, EINA_FALSE);
elm_box_padding_set(db->leftbox, 0, -5);
evas_object_size_hint_weight_set(db->leftbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(db->leftbox,
EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(db->leftbox);
EPHOTO_FILL(db->leftbox);
elm_box_pack_end(db->main, db->leftbox);
evas_object_show(db->leftbox);
db->fsel = elm_genlist_add(db->leftbox);
elm_genlist_select_mode_set(db->fsel, ELM_OBJECT_SELECT_MODE_ALWAYS);
elm_genlist_highlight_mode_set(db->fsel, EINA_TRUE);
evas_object_size_hint_weight_set(db->fsel, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(db->fsel, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(db->fsel);
EPHOTO_FILL(db->fsel);
evas_object_smart_callback_add(db->fsel, "expand,request",
_on_list_expand_req, db);
evas_object_smart_callback_add(db->fsel, "contract,request",
@ -1330,12 +1324,10 @@ ephoto_directory_browser_add(Ephoto *ephoto, Evas_Object *parent)
db->main = box;
elm_box_horizontal_set(db->main, EINA_FALSE);
evas_object_size_hint_weight_set(db->main, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(db->main, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_event_callback_add(db->main, EVAS_CALLBACK_DEL,
_ephoto_main_del, db);
evas_object_size_hint_min_set(db->main, (int)round(195 * elm_config_scale_get()), 0);
evas_object_size_hint_max_set(db->main, (int)round(195 * elm_config_scale_get()), 99999);
evas_object_data_set(db->main, "directory_browser", db);
_ephoto_directory_view_add(db);
@ -1361,7 +1353,7 @@ ephoto_directory_browser_add(Ephoto *ephoto, Evas_Object *parent)
_ephoto_dir_entry_create, db));
return db->main;
error:
evas_object_del(db->main);
return NULL;

@ -8,27 +8,17 @@ _editor_reset(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
}
static void
_editor_apply(void *data, Evas_Object *obj EINA_UNUSED,
_editor_apply(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Ephoto *ephoto = data;
ecore_event_add(EPHOTO_EVENT_EDITOR_APPLY, NULL, NULL, NULL);
edje_object_signal_emit(elm_layout_edje_get(ephoto->layout),
"ephoto,editor,hide", "ephoto");
ephoto->editor_blocking = EINA_FALSE;
}
static void
_editor_cancel(void *data, Evas_Object *obj EINA_UNUSED,
_editor_cancel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
Ephoto *ephoto = data;
ecore_event_add(EPHOTO_EVENT_EDITOR_CANCEL, NULL, NULL, NULL);
edje_object_signal_emit(elm_layout_edje_get(ephoto->layout),
"ephoto,editor,hide", "ephoto");
ephoto->editor_blocking = EINA_FALSE;
}
Evas_Object *
@ -37,24 +27,22 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
{
Evas_Object *frame, *box, *ic, *button;
ephoto->editor_blocking = EINA_TRUE;
edje_object_signal_emit(elm_layout_edje_get(ephoto->layout),
"ephoto,controls,hide", "ephoto");
edje_object_signal_emit(elm_layout_edje_get(ephoto->layout),
"ephoto,folders,hide", "ephoto");
frame = elm_frame_add(ephoto->layout);
frame = elm_frame_add(ephoto->main);
elm_object_text_set(frame, title);
evas_object_size_hint_weight_set(frame, 0.3, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(frame, 0.3, EVAS_HINT_EXPAND);
EPHOTO_FILL(frame);
evas_object_size_hint_min_set(frame, (int)round(195 * elm_config_scale_get()), 0);
evas_object_data_set(frame, data_name, data);
elm_layout_content_set(ephoto->layout, "ephoto.swallow.editor", frame);
evas_object_show(frame);
box = elm_box_add(frame);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(box);
EPHOTO_FILL(box);
evas_object_data_set(box, data_name, data);
evas_object_data_set(box, "frame", frame);
elm_object_content_set(frame, box);
@ -70,10 +58,8 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
elm_object_text_set(button, _("Reset"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _editor_reset, box);
evas_object_size_hint_weight_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, 220*elm_config_scale_get(),
30*elm_config_scale_get());
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, 0.0);
EPHOTO_FILL(button);
elm_box_pack_end(box, button);
evas_object_show(button);
@ -87,10 +73,8 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
elm_object_text_set(button, _("Apply"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _editor_apply, ephoto);
evas_object_size_hint_weight_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, 220*elm_config_scale_get(),
30*elm_config_scale_get());
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, 0.0);
EPHOTO_FILL(button);
elm_box_pack_end(box, button);
evas_object_show(button);
@ -104,15 +88,13 @@ ephoto_editor_add(Ephoto *ephoto, const char *title, const char *data_name,
elm_object_text_set(button, _("Cancel"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _editor_cancel, ephoto);
evas_object_size_hint_weight_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(button, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_min_set(button, 220*elm_config_scale_get(),
30*elm_config_scale_get());
EPHOTO_WEIGHT(button, EVAS_HINT_EXPAND, 0.0);
EPHOTO_FILL(button);
elm_box_pack_end(box, button);
evas_object_show(button);
edje_object_signal_emit(elm_layout_edje_get(ephoto->layout),
"ephoto,editor,show", "ephoto");
"ephoto,editor,show", "ephoto");
return box;
}

@ -23,14 +23,14 @@ _complete(Ephoto *ephoto, const char *title, const char *text)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_weight_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(box);
EPHOTO_FILL(box);
evas_object_show(box);
label = elm_label_add(box);
elm_object_text_set(label, text);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(label);
EPHOTO_FILL(label);
elm_box_pack_end(box, label);
evas_object_show(label);
@ -72,14 +72,14 @@ _prompt(Ephoto *ephoto, const char *title, const char *text)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_weight_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_FILL(box);
evas_object_show(box);
label = elm_label_add(box);
elm_object_text_set(label, text);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(label);
EPHOTO_FILL(label);
elm_box_pack_end(box, label);
evas_object_show(label);
@ -188,20 +188,20 @@ _upload_image_complete_cb(void *data, int ev_type EINA_UNUSED, void *event)
box = elm_box_add(popup);
elm_box_horizontal_set(box, EINA_FALSE);
evas_object_size_hint_weight_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_WEIGHT(box, 0.0, 0.0);
EPHOTO_FILL(box);
evas_object_show(box);
label = elm_label_add(box);
evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
EPHOTO_EXPAND(label);
EPHOTO_FILL(label);
elm_box_pack_end(box, label);
evas_object_show(label);
hbox = elm_box_add(box);
elm_box_horizontal_set(hbox, EINA_TRUE);
evas_object_size_hint_weight_set(hbox, EVAS_HINT_FILL, 0.0);
evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);