[EGIT] [core/efl] master 01/02: elm_progressbar test: Add test for custom format strings to show when %% is not escaped correctly.

2019-02-11 Thread Stephen 'Okra' Houston
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7b195738957282f20927d94425f0cf51399bfcad

commit 7b195738957282f20927d94425f0cf51399bfcad
Author: Stephen 'Okra' Houston 
Date:   Thu Jan 24 04:02:54 2019 +

elm_progressbar test: Add test for custom format strings to show when %% is 
not escaped correctly.

This adds a test that sets a custom progressbar format string that includes 
a custom percent (%%) that should be escaped to just one percent (%).  This 
case has been broken and fixed many times and is broken again so it makes sense 
to now add a check for it to try and prevent the continual breakage.

Reviewed-by: Cedric BAIL 
Differential Revision: https://phab.enlightenment.org/D7745
---
 src/tests/elementary/elm_test_progressbar.c | 17 +
 1 file changed, 17 insertions(+)

diff --git a/src/tests/elementary/elm_test_progressbar.c 
b/src/tests/elementary/elm_test_progressbar.c
index 819738..2ad2808de6 100644
--- a/src/tests/elementary/elm_test_progressbar.c
+++ b/src/tests/elementary/elm_test_progressbar.c
@@ -26,6 +26,22 @@ EFL_START_TEST(elm_progressbar_legacy_type_check)
 }
 EFL_END_TEST
 
+EFL_START_TEST(elm_progressbar_custom_unit_check)
+{
+   Evas_Object *win, *progressbar;
+   char format[50];
+
+   snprintf(format, sizeof(format), "%d percent (%d%%)", 50, 50);
+
+   win = win_add(NULL, "progressbar", ELM_WIN_BASIC);
+
+   progressbar = elm_progressbar_add(win);
+   elm_progressbar_unit_format_set(progressbar, format);
+   elm_progressbar_value_set(progressbar, .50);
+   ck_assert(!strcmp(elm_object_part_text_get(progressbar, "elm.text.status"), 
"50 percent (50%)"));
+}
+EFL_END_TEST
+
 EFL_START_TEST(elm_atspi_role_get)
 {
Evas_Object *win, *progressbar;
@@ -44,5 +60,6 @@ EFL_END_TEST
 void elm_test_progressbar(TCase *tc)
 {
tcase_add_test(tc, elm_progressbar_legacy_type_check);
+   tcase_add_test(tc, elm_progressbar_custom_unit_check);
tcase_add_test(tc, elm_atspi_role_get);
 }

-- 




[EGIT] [core/efl] feature/themes/flat 01/01: Flat theme: Fix cpuclock theme.`

2019-01-28 Thread Stephen 'Okra' Houston
okra pushed a commit to branch feature/themes/flat.

http://git.enlightenment.org/core/efl.git/commit/?id=042888c0ddb72360ab94e76ef9b1022e807e2712

commit 042888c0ddb72360ab94e76ef9b1022e807e2712
Author: Stephen 'Okra' Houston 
Date:   Mon Jan 28 14:52:45 2019 -0600

Flat theme: Fix cpuclock theme.`
---
 data/elementary/themes/edc/cpuclock.edc | 172 +++-
 data/elementary/themes/edc/cpufreq.edc  |  19 
 2 files changed, 35 insertions(+), 156 deletions(-)

diff --git a/data/elementary/themes/edc/cpuclock.edc 
b/data/elementary/themes/edc/cpuclock.edc
index 66b7005401..f4fcea9605 100644
--- a/data/elementary/themes/edc/cpuclock.edc
+++ b/data/elementary/themes/edc/cpuclock.edc
@@ -1,35 +1,14 @@
-group { name: "e/gadgets/cpuclock/main";
-   alias: "e/gadgets/cpuclock/main_vert";
-   images.image: "tacho_base.png" COMP;
-   images.image: "inset_round_hilight.png" COMP;
-   images.image: "inset_round_shadow.png" COMP;
-   images.image: "inset_round_shading.png" COMP;
-   set { name: "tacho_hand_big";
-  image { image: "tacho_hand_big.png" COMP; size: 73 73 9 9; }
-  image { image: "tacho_hand_big2.png" COMP; size: 37 37 72 72; }
-  image { image: "tacho_hand_big3.png" COMP; size: 19 19 36 36; }
-  image { image: "tacho_hand_big4.png" COMP; size: 0 0 18 18; }
-   }
-   images.image: "tacho_hand_big_shadow.png" COMP;
-   set { name: "tacho_hand_small_min";
-  image { image: "tacho_hand_small_min.png" COMP; size: 73 73 9 9; 
}
-  image { image: "tacho_hand_small_min2.png" COMP; size: 37 37 72 72; }
-  image { image: "tacho_hand_small_min3.png" COMP; size: 19 19 36 36; }
-  image { image: "tacho_hand_small_min4.png" COMP; size: 0 0 18 18; }
-   }
-   images.image: "tacho_hand_small_shadow.png" COMP;
-   set { name: "knob";
-  image { image: "knob_sz_24.png"  COMP; size: 31 31 32 32; }
-  image { image: "knob_sz_22.png"  COMP; size: 29 29 30 30; }
-  image { image: "knob_sz_20.png"  COMP; size: 27 27 28 28; }
-  image { image: "knob_sz_18.png"  COMP; size: 25 25 26 26; }
-  image { image: "knob_sz_16.png"  COMP; size: 23 23 24 24; }
-  image { image: "knob_sz_14.png"  COMP; size: 21 21 22 22; }
-  image { image: "knob_sz_12.png"  COMP; size: 19 19 20 20; }
-  image { image: "knob_sz_10.png"  COMP; size: 17 17 18 18; }
-  image { image: "knob_sz_08.png"  COMP; size: 15 15 16 16; }
-  image { image: "knob_sz_06.png"  COMP; size: 13 13 14 14; }
-  image { image: "knob_sz_04.png"  COMP; size:  0  0 12 12; }
+group { name: "e/gadget/cpuclock/main";
+   alias: "e/gadget/cpuclock/main_vert";
+   images.image: "cpu_base.png" COMP;
+   images.image: "cpu_clip1.png" COMP;
+   images.image: "cpu_clip2.png" COMP;
+   images.image: "cpu_clip3.png" COMP;
+   set { name: "marker";
+  image { image: "cpu_marker.png"  COMP; size: 72 72 9 9; }
+  image { image: "cpu_marker2.png" COMP; size: 36 36 72 72; }
+  image { image: "cpu_marker3.png" COMP; size: 18 18 36 36; }
+  image { image: "cpu_marker4.png" COMP; size: 0 0 4 18; }
}
script {
   public available_frequencies;
@@ -71,9 +50,6 @@ group { name: "e/gadgets/cpuclock/main";
  custom_state(PART:"meter", "default", 0.0);
  set_state_val(PART:"meter", STATE_MAP_ROT_Z, tf);
  set_state(PART:"meter", "custom", 0.0);
- custom_state(PART:"meter_sh", "default", 0.0);
- set_state_val(PART:"meter_sh", STATE_MAP_ROT_Z, tf);
- set_state(PART:"meter_sh", "custom", 0.0);
 
  f0 = get_int(min_freq_old);
  f1 = get_int(min_freq_new);
@@ -88,9 +64,6 @@ group { name: "e/gadgets/cpuclock/main";
  custom_state(PART:"meter_min", "default", 0.0);
  set_state_val(PART:"meter_min", STATE_MAP_ROT_Z, tf);
  set_state(PART:"meter_min", "custom", 0.0);
- custom_state(PART:"meter_min_sh", "default", 0.0);
- set_state_val(PART:"meter_min_sh", STATE_MAP_ROT_Z, tf);
- set_state(PART:"meter_min_sh", "custom", 0.0);
 
  f0 = get_int(max_freq_old);
  f1 = get_int(max_freq_new);
@@ -105,9 +78,6 @@ group { name: "e/gadgets/cpuclock/main";
  custom_state(PART:"meter_max", "default", 0.0);
  set_state_val(PART:"meter_max", STATE_MAP_ROT_Z, tf);
  set_s

[EGIT] [core/enlightenment] master 03/03: Wireless: Fix wireless gadget settings to work with updated gadget/menu callback methodology.

2019-01-23 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=18f9c8eb23d14e6648f45142f39f934d01105678

commit 18f9c8eb23d14e6648f45142f39f934d01105678
Author: Stephen 'Okra' Houston 
Date:   Wed Jan 23 20:57:15 2019 -0600

Wireless: Fix wireless gadget settings to work with updated gadget/menu 
callback methodology.
---
 src/modules/wireless/wireless.c | 56 +++--
 1 file changed, 49 insertions(+), 7 deletions(-)

diff --git a/src/modules/wireless/wireless.c b/src/modules/wireless/wireless.c
index a6cd65e67..30cbf68d2 100644
--- a/src/modules/wireless/wireless.c
+++ b/src/modules/wireless/wireless.c
@@ -72,6 +72,7 @@ static Eina_List *wireless_auth_pending;
 static Wireless_Auth_Popup *wireless_auth_popup;
 static Eina_Bool wireless_offline;
 static Evas_Object *wireless_edit_popup;
+static Evas_Object *menu_icon;
 static Wireless_Connection *wireless_edit[2];
 static unsigned int wireless_network_count[WIRELESS_SERVICE_TYPE_LAST];
 
@@ -799,7 +800,7 @@ _wireless_gadget_edit_select_services(void *data 
EINA_UNUSED, Evas_Object *obj E
_wireless_gadget_edit_services();
 }
 
-static void
+static Evas_Object *
 _wireless_gadget_edit(int type)
 {
Evas_Object *popup, *entry, *box1, *box, *list, *lbl, *bt;
@@ -810,7 +811,7 @@ _wireless_gadget_edit(int type)
Wireless_Connection *wc = wireless_current[type];
Wireless_Network *wn;
 
-   if (!wc) return;
+   if (!wc) return NULL;
if (wireless_popup.popup)
  {
 evas_object_hide(wireless_popup.popup);
@@ -938,6 +939,8 @@ _wireless_gadget_edit(int type)
e_comp_object_util_autoclose(wireless_edit_popup, NULL, _wireless_edit_key, 
NULL);
evas_object_event_callback_add(wireless_edit_popup, EVAS_CALLBACK_DEL, 
_wireless_edit_del, NULL);
elm_object_focus_set(entry, 1);
+
+   return wireless_popup.popup;
 }
 
 static void
@@ -993,6 +996,37 @@ _wireless_popup_dismissed(void *data EINA_UNUSED, 
Evas_Object *obj, void *event_
evas_object_del(obj);
 }
 
+static Evas_Object *
+_wireless_gadget_configure_cb(Evas_Object *g)
+{
+   Instance *inst = evas_object_data_get(g, "Instance");
+   int type;
+
+   if (!menu_icon)
+ return NULL;
+   for (type = 0; type < WIRELESS_SERVICE_TYPE_LAST; type++)
+ if (inst->icon[type] == menu_icon)
+   break;
+
+   return _wireless_gadget_edit(type);
+}
+
+static void
+_wireless_gadget_menu_populate_cb(Evas_Object *g, E_Menu *m EINA_UNUSED)
+{
+   Instance *inst = evas_object_data_get(g, "Instance");
+   Evas_Coord px, py, x, y, w, h;
+   int type;
+
+   evas_pointer_canvas_xy_get(evas_object_evas_get(g), , );
+   for (type = 0; type < WIRELESS_SERVICE_TYPE_LAST; type++)
+ {
+evas_object_geometry_get(inst->icon[type], , , , );
+if (E_INSIDE(px, py, x, y, w, h)) break;
+ }
+   menu_icon = inst->icon[type];
+}
+
 static void
 _wireless_gadget_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, 
void *event_info)
 {
@@ -1016,11 +1050,6 @@ _wireless_gadget_mouse_up(void *data, Evas *e 
EINA_UNUSED, Evas_Object *obj, voi
  if (obj == inst->icon[type])
break;
if (ev->button == 2) connman_technology_enabled_set(type, 
!wireless_type_enabled[type]);
-   if (ev->button == 3)
- {
-ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
-_wireless_gadget_edit(type);
- }
if (ev->button != 1) return;
if (wireless_popup.popup)
  {
@@ -1255,6 +1284,16 @@ _wireless_gadget_refresh(Instance *inst)
  evas_object_size_hint_aspect_set(inst->box, EVAS_ASPECT_CONTROL_BOTH, 
avail, 1);
 }
 
+static void
+_wireless_created_cb(void *data, Evas_Object *obj, void *event_data 
EINA_UNUSED)
+{
+   Instance *inst = data;
+   evas_object_data_set(inst->box, "Instance", inst);
+   e_gadget_configure_cb_set(inst->box, _wireless_gadget_configure_cb);
+   e_gadget_menu_populate_cb_set(inst->box, _wireless_gadget_menu_populate_cb);
+   evas_object_smart_callback_del_full(obj, "gadget_created", 
_wireless_created_cb, data);
+}
+
 static Evas_Object *
 wireless_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient)
 {
@@ -1267,9 +1306,12 @@ wireless_create(Evas_Object *parent, int *id, 
E_Gadget_Site_Orient orient)
inst->id = *id;
inst->orient = orient;
wireless_popup.type = inst->tooltip.type = -1;
+   menu_icon = NULL;
+
inst->box = elm_box_add(parent);
elm_box_horizontal_set(inst->box, orient != E_GADGET_SITE_ORIENT_VERTICAL);
elm_box_homogeneous_set(inst->box, 1);
+   evas_object_smart_callback_add(parent, "gadget_created", 
_wireless_created_cb, inst);
evas_object_event_callback_add(inst->box, EVAS_CALLBACK_DEL, wireless_del, 
inst);
 
if (*id < 0)

-- 




[EGIT] [core/enlightenment] master 02/03: Batman: Fix typo where batman was never resuming when screensaver returned.

2019-01-23 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=2081b92f07ee492b2e624578b23191fcc9f58140

commit 2081b92f07ee492b2e624578b23191fcc9f58140
Author: Stephen 'Okra' Houston 
Date:   Wed Jan 23 20:56:18 2019 -0600

Batman: Fix typo where batman was never resuming when screensaver returned.
---
 src/modules/sysinfo/batman/batman.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/sysinfo/batman/batman.c 
b/src/modules/sysinfo/batman/batman.c
index 8b4b3861e..75a642558 100644
--- a/src/modules/sysinfo/batman/batman.c
+++ b/src/modules/sysinfo/batman/batman.c
@@ -647,7 +647,7 @@ _batman_created_cb(void *data, Evas_Object *obj, void 
*event_data EINA_UNUSED)
evas_object_smart_callback_del_full(obj, "gadget_created", 
_batman_created_cb, data);
 
E_LIST_HANDLER_APPEND(inst->cfg->batman.handlers, E_EVENT_SCREENSAVER_ON, 
_screensaver_on, inst);
-   E_LIST_HANDLER_APPEND(inst->cfg->batman.handlers, E_EVENT_SCREENSAVER_ON, 
_screensaver_on, inst);
+   E_LIST_HANDLER_APPEND(inst->cfg->batman.handlers, E_EVENT_SCREENSAVER_OFF, 
_screensaver_off, inst);
E_LIST_HANDLER_APPEND(inst->cfg->batman.handlers, 
E_EVENT_POWERSAVE_CONFIG_UPDATE,
   _powersave_cb_config_update, inst);
 

-- 




[EGIT] [core/enlightenment] master 01/03: Batman: Don't leak stringshare when returning from update early.

2019-01-23 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=13d2ae75d362894243595484a2a48d3d2c914cb0

commit 13d2ae75d362894243595484a2a48d3d2c914cb0
Author: Stephen 'Okra' Houston 
Date:   Wed Jan 23 20:55:40 2019 -0600

Batman: Don't leak stringshare when returning from update early.
---
 src/modules/sysinfo/batman/batman_udev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/sysinfo/batman/batman_udev.c 
b/src/modules/sysinfo/batman/batman_udev.c
index ce28f57be..79335872c 100644
--- a/src/modules/sysinfo/batman/batman_udev.c
+++ b/src/modules/sysinfo/batman/batman_udev.c
@@ -327,6 +327,7 @@ _batman_udev_battery_update(const char *syspath, Battery 
*bat, Instance *inst)
 else if ((!strcmp(test, "Unknown")) && (bat->charge_rate <= 0) && 
(bat->last_full_charge <= 0))
   {
  _batman_udev_battery_del(syspath, inst);
+ eina_stringshare_del(test);
  return;
   }
 else

-- 




[EGIT] [core/efl] feature/themes/flat 01/01: Wireless Theme: Make the cloud work as it is supposed to on wifi.

2019-01-23 Thread Stephen 'Okra' Houston
okra pushed a commit to branch feature/themes/flat.

http://git.enlightenment.org/core/efl.git/commit/?id=67a5bd2043ac1cb3a302b1f91ebfdb40da74c1b7

commit 67a5bd2043ac1cb3a302b1f91ebfdb40da74c1b7
Author: Stephen 'Okra' Houston 
Date:   Wed Jan 23 16:13:46 2019 -0600

Wireless Theme: Make the cloud work as it is supposed to on wifi.
---
 data/elementary/themes/edc/wireless.edc | 23 +--
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/data/elementary/themes/edc/wireless.edc 
b/data/elementary/themes/edc/wireless.edc
index 0e95a5971b..d812e3e069 100644
--- a/data/elementary/themes/edc/wireless.edc
+++ b/data/elementary/themes/edc/wireless.edc
@@ -138,11 +138,17 @@ group { name: "e/gadget/wireless/wifi"; nomouse;
   public message(Msg_Type:type, id, ...) {
  if ((type == MSG_INT_SET) && (id == 1)) {
 new state = getarg(2), signl = getarg(3);
-if (state <= 1) {
-   set_state(PART:"wifi-base", "default", 0.0);
-   set_state(PART:"wifi", "default", 0.0);
+if (state == 0 && signl == 0) {
+   set_state(PART:"clip_wifi", "default", 0.0);
+   set_state(PART:"clip_exclam", "default", 0.0);
+}
+else {
+   set_state(PART:"clip_wifi", "wifi", 0.0);
+   set_state(PART:"clip_exclam", "wifi", 0.0);
 }
 if (state == 1) {
+   set_state(PART:"wifi-base", "default", 0.0);
+   set_state(PART:"wifi", "default", 0.0);
run_program(PROGRAM:"connecting");
run_program(PROGRAM:"connecting_wifi");
return;
@@ -275,17 +281,6 @@ group { name: "e/gadget/wireless/wifi"; nomouse;
  after:  "connecting";
  }
   }
-  target_group: "clips" "clip_exclam" "clip_wifi";
-  program {
- signal: "e,state,error"; source: "e";
- action: STATE_SET "default" 0.0;
- groups: "clips";
-  }
-  program {
- signal: "e,state,default"; source: "e";
- action: STATE_SET "wifi" 0.0;
- groups: "clips";
-  }
}
 }
 

-- 




[EGIT] [core/efl] feature/themes/flat 01/01: Flat theme: Finish converting new gadgets.

2019-01-23 Thread Stephen 'Okra' Houston
okra pushed a commit to branch feature/themes/flat.

http://git.enlightenment.org/core/efl.git/commit/?id=a427979cceb03477805d3fb909e2df6e7b918b7e

commit a427979cceb03477805d3fb909e2df6e7b918b7e
Author: Stephen 'Okra' Houston 
Date:   Wed Jan 23 15:22:22 2019 -0600

Flat theme: Finish converting new gadgets.
---
 data/elementary/themes/Makefile.am |   2 +
 data/elementary/themes/default.edc |   2 +
 data/elementary/themes/edc/batman.edc  | 217 +++---
 data/elementary/themes/edc/cpuclock.edc| 343 
 data/elementary/themes/edc/temperature.edc | 106 -
 data/elementary/themes/edc/thermal.edc | 101 +
 data/elementary/themes/edc/wireless.edc| 616 +++--
 7 files changed, 642 insertions(+), 745 deletions(-)

diff --git a/data/elementary/themes/Makefile.am 
b/data/elementary/themes/Makefile.am
index 47774811f4..243a265f61 100644
--- a/data/elementary/themes/Makefile.am
+++ b/data/elementary/themes/Makefile.am
@@ -40,6 +40,7 @@ elementary/themes/edc/comp_effects.edc \
 elementary/themes/edc/conf.edc \
 elementary/themes/edc/connman.edc \
 elementary/themes/edc/cpufreq.edc \
+elementary/themes/edc/cpuclock.edc \
 elementary/themes/edc/cpumonitor.edc \
 elementary/themes/edc/cslider.edc \
 elementary/themes/edc/desklock.edc \
@@ -82,6 +83,7 @@ elementary/themes/edc/syscon.edc \
 elementary/themes/edc/systray.edc \
 elementary/themes/edc/tasks.edc \
 elementary/themes/edc/temperature.edc \
+elementary/themes/edc/thermal.edc \
 elementary/themes/edc/textblock.edc \
 elementary/themes/edc/time.edc \
 elementary/themes/edc/toolbar.edc \
diff --git a/data/elementary/themes/default.edc 
b/data/elementary/themes/default.edc
index 6689b08bf5..a88aaf084f 100644
--- a/data/elementary/themes/default.edc
+++ b/data/elementary/themes/default.edc
@@ -139,7 +139,9 @@ collections {
 #include "edc/randr.edc"
 #include "edc/notification.edc"
 #include "edc/cpufreq.edc"
+#include "edc/cpuclock.edc"
 #include "edc/temperature.edc"
+#include "edc/thermal.edc"
 #include "edc/backlight.edc"
 #include "edc/mixer.edc"
 #include "edc/battery.edc"
diff --git a/data/elementary/themes/edc/batman.edc 
b/data/elementary/themes/edc/batman.edc
index f32751ad62..001beb3d54 100644
--- a/data/elementary/themes/edc/batman.edc
+++ b/data/elementary/themes/edc/batman.edc
@@ -1,186 +1,65 @@
 group { name: "e/gadget/batman/main";
alias: "e/gadget/batman/main_vert";
-   images.image: "bat_shadow.png" COMP;
images.image: "bat_base.png" COMP;
-   images.image: "bat_bottom0.png" COMP;
-   images.image: "bat_top0.png" COMP;
-   images.image: "batman_overlay.png" COMP;
-   images.image: "glow_med_white.png" COMP;
script {
   public message(Msg_Type:type, id, ...) {
  if ((type == MSG_FLOAT) && (id == 1)) {
-new Float:val;
-new r = 51, g = 153, b = 255;
-new lr = 255, lg = 0, lb = 0;
-
-val = getfarg(2);
-if (val < 0.35) {
-   new Float:val1, Float:val2;
-   
-   val1 = (val - 0.10) / 0.25;
-   val2 = 1.0 - val1;
-   r = round((r * val1) + (lr * val2), ROUND);
-   g = round((g * val1) + (lg * val2), ROUND);
-   b = round((b * val1) + (lb * val2), ROUND);
-} 
-custom_state(PART:"fill", "default", 0.0);
-set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
-set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
-set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
-set_state_val(PART:"fill", STATE_REL1, 0.0, 1.0 - val);
-set_state(PART:"fill", "custom", 0.0);
+new Float:val = getfarg(2);
+val = 0.05 + (0.9 * (1.0 - val));
+custom_state(PART:"fill_clip", "default", 0.0);
+set_state_val(PART:"fill_clip", STATE_REL1, 0.0, val);
+set_state(PART:"fill_clip", "custom", 0.0);
  }
   }
}
parts {
-  part { name: "fade_clip"; type: RECT;
- description { state: "default" 0.0;
-color: 255 255 255 255;
- }
- description { state: "faded" 0.0;
-color: 128 128 128 255;
- }
-  }
   part { name: "pulse_clip"; type: RECT;
- clip_to: "fade_clip";
  description { state: "default" 0.0;
-color: 255 255 255 255;
- }
- description { state: "faded" 1.0;
-color: 255 255 255 255;
+rel1.to: "bg";
+rel2.to: "bg";
  }
   

[EGIT] [core/enlightenment] master 01/01: Batman Udev: Don't include batteries who have unknown status, have never had a full charge, and have no charge rate.

2019-01-23 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=42d16a0ec1c367e2c89f42382a2df7ed7c465e93

commit 42d16a0ec1c367e2c89f42382a2df7ed7c465e93
Author: Stephen 'Okra' Houston 
Date:   Wed Jan 23 10:17:00 2019 -0600

Batman Udev: Don't include batteries who have unknown status, have never 
had a full charge, and have no charge rate.

Summary: This fixes issues where erroneous udev detections of batteries are 
included. @bu5hm4n and I both have had issues where udev thinks we have two 
batteries because our hid/touchscreens report a battery even though they are 
not accurate.  The problem is batman will then think there are two batteries 
and calculate battery percentage based off both batteries.  For instance if the 
laptop battery is 100% and it is detecting this phony hid battery, the result 
is batman thinks you are  [...]

Test Plan: You have to have a device that udev reports two batteries for 
when there aren't two.  It should be harmless to not include batteries that 
have never been charged, have no charge, and have unknown for their status.

Reviewers: bu5hm4n, raster, zmike!, devilhorns

Reviewed By: raster

Subscribers: cedric, bu5hm4n

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D7736
---
 src/modules/sysinfo/batman/batman_udev.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/modules/sysinfo/batman/batman_udev.c 
b/src/modules/sysinfo/batman/batman_udev.c
index d52541b88..ce28f57be 100644
--- a/src/modules/sysinfo/batman/batman_udev.c
+++ b/src/modules/sysinfo/batman/batman_udev.c
@@ -182,7 +182,7 @@ _batman_udev_battery_del(const char *syspath, Instance 
*inst)
 
EINA_LIST_FOREACH(batman_device_batteries, l, bat)
  {
-if (inst == bat->inst)
+if ((inst == bat->inst) && (eina_streq(bat->udi, syspath)))
   {
  batman_device_batteries = 
eina_list_remove_list(batman_device_batteries, l);
  eina_stringshare_del(bat->udi);
@@ -324,6 +324,11 @@ _batman_udev_battery_update(const char *syspath, Battery 
*bat, Instance *inst)
   bat->charging = 1;
 else if ((!strcmp(test, "Unknown")) && (bat->charge_rate > 0))
   bat->charging = 1;
+else if ((!strcmp(test, "Unknown")) && (bat->charge_rate <= 0) && 
(bat->last_full_charge <= 0))
+  {
+ _batman_udev_battery_del(syspath, inst);
+ return;
+  }
 else
   bat->charging = 0;
 eina_stringshare_del(test);

-- 




[EGIT] [core/enlightenment] master 01/01: Mixer Gadget: Give the mixer gadget its own actions as to not conflict with the shelf module.

2019-01-17 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=4097a9d2f63fd4cf7a2835d21018ffb3d7730bac

commit 4097a9d2f63fd4cf7a2835d21018ffb3d7730bac
Author: Stephen 'Okra' Houston 
Date:   Thu Jan 17 11:32:04 2019 -0600

Mixer Gadget: Give the mixer gadget its own actions as to not conflict with 
the shelf module.

Fixes T7263
---
 src/modules/mixer/gadget/mixer.c | 58 
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/modules/mixer/gadget/mixer.c b/src/modules/mixer/gadget/mixer.c
index 41c3f24a3..69a59a69e 100644
--- a/src/modules/mixer/gadget/mixer.c
+++ b/src/modules/mixer/gadget/mixer.c
@@ -260,52 +260,52 @@ _volume_mute_app_cb(E_Object *obj EINA_UNUSED, const char 
*params EINA_UNUSED)
 static void
 _actions_register(void)
 {
-   gmixer_context->actions.incr = e_action_add("volume_increase");
+   gmixer_context->actions.incr = e_action_add("gadget_volume_increase");
if (gmixer_context->actions.incr)
  {
 gmixer_context->actions.incr->func.go = _volume_increase_cb;
-e_action_predef_name_set("Mixer", _("Increase Volume"),
- "volume_increase", NULL, NULL, 0);
+e_action_predef_name_set("Mixer Gadget", _("Increase Volume"),
+ "gadget_volume_increase", NULL, NULL, 0);
  }
 
-   gmixer_context->actions.decr = e_action_add("volume_decrease");
+   gmixer_context->actions.decr = e_action_add("gadget_volume_decrease");
if (gmixer_context->actions.decr)
  {
 gmixer_context->actions.decr->func.go = _volume_decrease_cb;
-e_action_predef_name_set("Mixer", _("Decrease Volume"),
- "volume_decrease", NULL, NULL, 0);
+e_action_predef_name_set("Mixer Gadget", _("Decrease Volume"),
+ "gadget_volume_decrease", NULL, NULL, 0);
  }
 
-   gmixer_context->actions.mute = e_action_add("volume_mute");
+   gmixer_context->actions.mute = e_action_add("gadget_volume_mute");
if (gmixer_context->actions.mute)
  {
 gmixer_context->actions.mute->func.go = _volume_mute_cb;
-e_action_predef_name_set("Mixer", _("Mute volume"), "volume_mute",
+e_action_predef_name_set("Mixer Gadget", _("Mute volume"), 
"gadget_volume_mute",
  NULL, NULL, 0);
  }
-   gmixer_context->actions.incr_app = e_action_add("volume_increase_app");
+   gmixer_context->actions.incr_app = 
e_action_add("gadget_volume_increase_app");
if (gmixer_context->actions.incr_app)
  {
 gmixer_context->actions.incr_app->func.go = _volume_increase_app_cb;
-e_action_predef_name_set("Mixer",
+e_action_predef_name_set("Mixer Gadget",
  _("Increase Volume of Focused Application"),
- "volume_increase_app", NULL, NULL, 0);
+ "gadget_volume_increase_app", NULL, NULL, 0);
  }
-   gmixer_context->actions.decr_app = e_action_add("volume_decrease_app");
+   gmixer_context->actions.decr_app = 
e_action_add("gadget_volume_decrease_app");
if (gmixer_context->actions.decr_app)
  {
 gmixer_context->actions.decr_app->func.go = _volume_decrease_app_cb;
-e_action_predef_name_set("Mixer",
+e_action_predef_name_set("Mixer Gadget",
  _("Decrease Volume of Focused Application"),
- "volume_decrease_app", NULL, NULL, 0);
+ "gadget_volume_decrease_app", NULL, NULL, 0);
  }
-   gmixer_context->actions.mute_app = e_action_add("volume_mute_app");
+   gmixer_context->actions.mute_app = e_action_add("gadget_volume_mute_app");
if (gmixer_context->actions.mute_app)
  {
 gmixer_context->actions.mute_app->func.go = _volume_mute_app_cb;
-e_action_predef_name_set("Mixer",
+e_action_predef_name_set("Mixer Gadget",
  _("Mute Volume of Focused Application"),
- "volume_mute_app", NULL, NULL, 0);
+ "gadget_volume_mute_app", NULL, NULL, 0);
  }
 
e_comp_canvas_keys_ungrab();
@@ -317,46 +317,46 @@ _actions_unregister(void)
 {
if (gmixer_context->actions.incr)
  {
-e_action_predef_name_del("Mi

[EGIT] [enlightenment/gadgets/wireless] master 01/01: Use DESTDIR for the install script running perms.

2018-06-08 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/enlightenment/gadgets/wireless.git/commit/?id=f6ec0964a452f4eeb916e447cf2d86ae6e7749e0

commit f6ec0964a452f4eeb916e447cf2d86ae6e7749e0
Author: Stephen 'Okra' Houston 
Date:   Fri Jun 8 15:01:11 2018 -0500

Use DESTDIR for the install script running perms.
---
 perms.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/perms.sh b/perms.sh
index 1a25fc2..422aa48 100644
--- a/perms.sh
+++ b/perms.sh
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-chmod a+r "$1/wireless.edj"
+chmod a+r "${DESTDIR}/$1/wireless.edj"

-- 




[EGIT] [core/efl] master 01/01: Focus: If tree focus is set to not allow focus on the object - don't give it focus.

2018-04-19 Thread Stephen 'Okra' Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cf359629a529200b3b9e0accd2c45821dc64f60e

commit cf359629a529200b3b9e0accd2c45821dc64f60e
Author: Stephen 'Okra' Houston <smhousto...@gmail.com>
Date:   Thu Apr 19 11:17:34 2018 -0500

Focus: If tree focus is set to not allow focus on the object - don't give 
it focus.

Patch from Marcel 'bu5hm4n' Hollerbach
---
 src/lib/elementary/efl_ui_focus_layer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/elementary/efl_ui_focus_layer.c 
b/src/lib/elementary/efl_ui_focus_layer.c
index 3687a4df5f..45d5f9a72e 100644
--- a/src/lib/elementary/efl_ui_focus_layer.c
+++ b/src/lib/elementary/efl_ui_focus_layer.c
@@ -103,6 +103,8 @@ _publish_state_change(Eo *obj, Efl_Ui_Focus_Manager 
*omanager, Efl_Ui_Focus_Obje
 EOLIAN static void
 _efl_ui_focus_layer_enable_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool 
v)
 {
+   if (!elm_object_tree_focus_allow_get(obj))
+ v = EINA_FALSE;
if (v)
  {
 pd->registered_manager = elm_widget_top_get(obj);

-- 




[EGIT] [apps/ephoto] master 02/02: Forgot to rebase. Merge branch 'master' of git+ssh://git.enlightenment.org/apps/ephoto

2016-04-21 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=2d61927ea75557c03ca97dabf2bbeb35a9a2b806

commit 2d61927ea75557c03ca97dabf2bbeb35a9a2b806
Merge: 8a5e8e9 11ffca5
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Apr 21 09:32:12 2016 -0500

Forgot to rebase.
Merge branch 'master' of git+ssh://git.enlightenment.org/apps/ephoto

 src/bin/ephoto_config.c |  2 ++
 src/bin/ephoto_file.c   |  6 ++
 src/bin/ephoto_single_browser.c | 17 -
 3 files changed, 24 insertions(+), 1 deletion(-)

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Use a circle in the Red Eye Removal... Uses modified Bresenham.

2016-04-08 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=89dd56870a478427b9dfff5e9a01899250418e0f

commit 89dd56870a478427b9dfff5e9a01899250418e0f
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Fri Apr 8 12:47:51 2016 -0500

Ephoto: Use a circle in the Red Eye Removal... Uses modified Bresenham.
---
 src/bin/ephoto_red_eye.c | 63 +++-
 1 file changed, 30 insertions(+), 33 deletions(-)

diff --git a/src/bin/ephoto_red_eye.c b/src/bin/ephoto_red_eye.c
index db171b9..faf2b87 100644
--- a/src/bin/ephoto_red_eye.c
+++ b/src/bin/ephoto_red_eye.c
@@ -49,9 +49,10 @@ _reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 void *event_data EINA_UNUSED)
 {
Ephoto_Reye *er = data;
-   unsigned int *im_data, *im_data_new, *p1, *p2;
+   unsigned int *im_data, *p1;
Evas_Coord x, y, imx, imy, imw, imh;
Evas_Coord xpos, ypos, xadj, yadj, nx, ny;
+   Evas_Coord xx, yy, nnx, nny;
int a, r, g, b;
double scalex, scaley;
 
@@ -67,8 +68,8 @@ _reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
scalex = (double) (xadj) / (double) imw;
scaley = (double) (yadj) / (double) imh;
 
-   nx = ((er->w * scalex)-(er->rad/2));
-   ny = ((er->h * scaley)-(er->rad/2));
+   nx = er->w * scalex;
+   ny = er->h * scaley;
 
if (nx < 0) nx = 0;
if (ny < 0) ny = 0;
@@ -81,41 +82,37 @@ _reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  memcpy(im_data, er->original_im_data,
   sizeof(unsigned int) * er->w * er->h);
 
-   im_data_new = malloc(sizeof(unsigned int) * er->w * er->h);
-
-   for (y = 0; y < er->h; y++)
+   for (yy = -er->rad; yy <= er->rad; yy++)
  {
-p1 = im_data + (y * er->w);
-p2 = im_data_new + (y * er->w);
-for (x = 0; x < er->w; x++)
-  {
- b = (int) ((*p1) & 0xff);
- g = (int) ((*p1 >> 8) & 0xff);
- r = (int) ((*p1 >> 16) & 0xff);
- a = (int) ((*p1 >> 24) & 0xff);
- b = _mul_color_alpha(b, a);
- g = _mul_color_alpha(g, a);
- r = _mul_color_alpha(r, a);
- if (y >= ny && y <= ny+er->rad)
-   {
-  if (x >= nx && x <= nx+er->rad)
-r = (int) ((g+b)/2);
+for (xx = -er->rad; xx <= er->rad; xx++)
+   {
+  if ((xx * xx) + (yy * yy) <= (er->rad * er->rad))
+{
+   nnx = nx + xx;
+   nny = ny + yy;
+
+   p1 = im_data + (nny * er->w) + nnx;
+   b = (int) ((*p1) & 0xff);
+   g = (int) ((*p1 >> 8) & 0xff);
+   r = (int) ((*p1 >> 16) & 0xff);
+   a = (int) ((*p1 >> 24) & 0xff);
+   b = _mul_color_alpha(b, a);
+   g = _mul_color_alpha(g, a);
+   r = _mul_color_alpha(r, a);
+   r = (int) ((g+b)/2);
+   b = _normalize_color(b);
+   g = _normalize_color(g);
+   r = _normalize_color(r);
+   b = _demul_color_alpha(b, a);
+   g = _demul_color_alpha(g, a);
+   r = _demul_color_alpha(r, a);
+   *p1 = (a << 24) | (r << 16) | (g << 8) | b;
}
- b = _normalize_color(b);
- g = _normalize_color(g);
- r = _normalize_color(r);
- b = _demul_color_alpha(b, a);
- g = _demul_color_alpha(g, a);
- r = _demul_color_alpha(r, a);
- *p2 = (a << 24) | (r << 16) | (g << 8) | b;
- p2++;
- p1++;
   }
  }
-   er->edited_im_data = im_data_new;
+   er->edited_im_data = im_data;
ephoto_single_browser_image_data_update(er->main, er->image,
-   im_data_new, er->w, er->h);
-   free(im_data);
+   im_data, er->w, er->h);
 }
 
 static void

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix cursor calculation on Red Eye removal.

2016-04-05 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=0bf54e689e2e8ecc87a3d9841522c18bdf6a8580

commit 0bf54e689e2e8ecc87a3d9841522c18bdf6a8580
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Apr 5 09:28:09 2016 -0500

Ephoto: Fix cursor calculation on Red Eye removal.
---
 src/bin/ephoto_red_eye.c | 25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/bin/ephoto_red_eye.c b/src/bin/ephoto_red_eye.c
index 93dfbfb..5f48f35 100644
--- a/src/bin/ephoto_red_eye.c
+++ b/src/bin/ephoto_red_eye.c
@@ -50,18 +50,29 @@ _reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 {
Ephoto_Reye *er = data;
unsigned int *im_data, *im_data_new, *p1, *p2;
-   int x, y, imx, imy, xpos, ypos, xadj, yadj;
-   int a, r, g, b;
+   int x, y, imx, imy, imw, imh;
+   int xpos, ypos, xadj, yadj;
+   int a, r, g, b, nx, ny;
+   double scalex, scaley;
 
evas_pointer_canvas_xy_get(evas_object_evas_get(er->image), , );
-   evas_object_geometry_get(er->image, , , 0, 0);
+   evas_object_geometry_get(er->image, , , , );
 
-   xadj = (xpos-imx)-(er->rad/2);
-   yadj = (ypos-imy)-(er->rad/2);
+   xadj = xpos-imx;
+   yadj = ypos-imy;
 
if (xadj < 0) xadj = 0;
if (yadj < 0) yadj = 0;
 
+   scalex = (double) (xadj) / (double) imw;
+   scaley = (double) (yadj) / (double) imh;
+
+   nx = ((er->w * scalex)-(er->rad/2));
+   ny = ((er->h * scaley)-(er->rad/2));
+
+   if (nx < 0) nx = 0;
+   if (ny < 0) ny = 0;
+
im_data = malloc(sizeof(unsigned int) * er->w * er->h);
if (er->edited_im_data)
  memcpy(im_data, er->edited_im_data,
@@ -85,9 +96,9 @@ _reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  b = _mul_color_alpha(b, a);
  g = _mul_color_alpha(g, a);
  r = _mul_color_alpha(r, a);
- if (y >= yadj && y <= yadj+er->rad)
+ if (y >= ny && y <= ny+er->rad)
{
-  if (x >= xadj && x <= xadj+er->rad)
+  if (x >= nx && x <= nx+er->rad)
 r = (int) ((g+b)/2);
}
  b = _normalize_color(b);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add tool for red eye removal

2016-04-04 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=5a5d2bb12e28fc4bd08db9f8058e1addf0d0723f

commit 5a5d2bb12e28fc4bd08db9f8058e1addf0d0723f
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Mon Apr 4 15:50:56 2016 -0500

Ephoto: Add tool for red eye removal
---
 src/bin/Makefile.am |   1 +
 src/bin/ephoto.h|   2 +
 src/bin/ephoto_red_eye.c| 254 
 src/bin/ephoto_single_browser.c |  21 
 src/bin/ephoto_thumb_browser.c  |   4 +-
 5 files changed, 280 insertions(+), 2 deletions(-)

diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 802f96c..b369bed 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -30,6 +30,7 @@ ephoto_SOURCES = \
 ephoto_hsv.c \
 ephoto_ipc.c \
 ephoto_main.c \
+ephoto_red_eye.c \
 ephoto_thumb.c \
 ephoto_thumb_browser.c \
 ephoto_single_browser.c \
diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index 0375768..cf7170b 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -127,6 +127,8 @@ void ephoto_hsv_add(Evas_Object *main, Evas_Object *parent,
 Evas_Object *image);
 void ephoto_color_add(Evas_Object *main, Evas_Object *parent,
 Evas_Object *image);
+void ephoto_red_eye_add(Evas_Object *main, Evas_Object *parent,
+Evas_Object *image);
 void ephoto_filter_blur(Evas_Object *main, Evas_Object *image);
 void ephoto_filter_sharpen(Evas_Object *main, Evas_Object *image);
 void ephoto_filter_black_and_white(Evas_Object *main, Evas_Object *image);
diff --git a/src/bin/ephoto_red_eye.c b/src/bin/ephoto_red_eye.c
new file mode 100644
index 000..93dfbfb
--- /dev/null
+++ b/src/bin/ephoto_red_eye.c
@@ -0,0 +1,254 @@
+#include "ephoto.h"
+
+typedef struct _Ephoto_Reye Ephoto_Reye;
+struct _Ephoto_Reye
+{
+   Evas_Object *main;
+   Evas_Object *parent;
+   Evas_Object *image;
+   Evas_Object *editor;
+   Evas_Object *rslider;
+   Eina_List *handlers;
+   int rad;
+   int w, h;
+   unsigned int *original_im_data;
+   unsigned int *edited_im_data;
+};
+
+static int
+_normalize_color(int color)
+{
+   if (color < 0)
+  return 0;
+   else if (color > 255)
+  return 255;
+   else
+  return color;
+}
+
+static int
+_mul_color_alpha(int color, int alpha)
+{
+   if (alpha > 0 && alpha < 255)
+  return color * (255 / alpha);
+   else
+  return color;
+}
+
+static int
+_demul_color_alpha(int color, int alpha)
+{
+   if (alpha > 0 && alpha < 255)
+  return (color * alpha) / 255;
+   else
+  return color;
+}
+
+static void
+_reye_clicked(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_data EINA_UNUSED)
+{
+   Ephoto_Reye *er = data;
+   unsigned int *im_data, *im_data_new, *p1, *p2;
+   int x, y, imx, imy, xpos, ypos, xadj, yadj;
+   int a, r, g, b;
+
+   evas_pointer_canvas_xy_get(evas_object_evas_get(er->image), , );
+   evas_object_geometry_get(er->image, , , 0, 0);
+
+   xadj = (xpos-imx)-(er->rad/2);
+   yadj = (ypos-imy)-(er->rad/2);
+
+   if (xadj < 0) xadj = 0;
+   if (yadj < 0) yadj = 0;
+
+   im_data = malloc(sizeof(unsigned int) * er->w * er->h);
+   if (er->edited_im_data)
+ memcpy(im_data, er->edited_im_data,
+  sizeof(unsigned int) * er->w * er->h);
+   else
+ memcpy(im_data, er->original_im_data,
+  sizeof(unsigned int) * er->w * er->h);
+
+   im_data_new = malloc(sizeof(unsigned int) * er->w * er->h);
+
+   for (y = 0; y < er->h; y++)
+ {
+p1 = im_data + (y * er->w);
+p2 = im_data_new + (y * er->w);
+for (x = 0; x < er->w; x++)
+  {
+ b = (int) ((*p1) & 0xff);
+ g = (int) ((*p1 >> 8) & 0xff);
+ r = (int) ((*p1 >> 16) & 0xff);
+ a = (int) ((*p1 >> 24) & 0xff);
+ b = _mul_color_alpha(b, a);
+ g = _mul_color_alpha(g, a);
+ r = _mul_color_alpha(r, a);
+ if (y >= yadj && y <= yadj+er->rad)
+   {
+  if (x >= xadj && x <= xadj+er->rad)
+r = (int) ((g+b)/2);
+   }
+ b = _normalize_color(b);
+ g = _normalize_color(g);
+ r = _normalize_color(r);
+ b = _demul_color_alpha(b, a);
+ g = _demul_color_alpha(g, a);
+ r = _demul_color_alpha(r, a);
+ *p2 = (a << 24) | (r << 16) | (g << 8) | b;
+ p2++;
+ p1++;
+  }
+ }
+   er->edited_im_data = im_data_new;
+   ephoto_single_browser_image_data_update(er->main, er->image, EINA_FALSE,
+   im_data_new, er->w, er->h);
+   free(im_data);
+}
+
+static void
+_radius_slider_changed(void *data, Evas_Object *obj, void *event_info 
E

[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix notify appearance

2016-04-04 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=48a00843377054ecf1474db50838750743b45c4b

commit 48a00843377054ecf1474db50838750743b45c4b
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Mon Apr 4 11:07:21 2016 -0500

Ephoto: Fix notify appearance
---
 src/bin/ephoto_single_browser.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 853c113..9cf5493 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -401,6 +401,26 @@ _update_bottom_bar(Ephoto_Single_Browser *sb)
_("Resolution"), w, h, _("File Size"), tmp);
free(tmp);
 
+   if (!evas_object_visible_get(sb->botbox))
+ {
+
+evas_object_del(sb->botbox);
+   
+sb->botbox = elm_notify_add(sb->ephoto->win);
+elm_notify_align_set(sb->botbox, 0.5, 1.0);
+evas_object_size_hint_weight_set(sb->botbox, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
+evas_object_size_hint_fill_set(sb->botbox, EVAS_HINT_FILL, 
EVAS_HINT_FILL);
+
+sb->infolabel = elm_label_add(sb->botbox);
+elm_label_line_wrap_set(sb->infolabel, ELM_WRAP_NONE);
+evas_object_size_hint_weight_set(sb->infolabel, EVAS_HINT_EXPAND,
+EVAS_HINT_FILL);
+evas_object_size_hint_align_set(sb->infolabel, EVAS_HINT_FILL,
+EVAS_HINT_FILL);
+elm_object_content_set(sb->botbox, sb->infolabel);
+evas_object_show(sb->infolabel);
+ }
+
elm_object_text_set(sb->infolabel, image_info);
elm_notify_timeout_set(sb->botbox, 5);
evas_object_show(sb->botbox);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Keep search count data correctly.

2016-04-04 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=f27a07f88920a29e62a946e92c0548a305946c2d

commit f27a07f88920a29e62a946e92c0548a305946c2d
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Mon Apr 4 09:35:33 2016 -0500

Ephoto: Keep search count data correctly.
---
 src/bin/ephoto_thumb_browser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 520105d..42ebf1a 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -858,8 +858,6 @@ _ephoto_search_go(void *data, Evas_Object *obj EINA_UNUSED,
tb->searchentries = NULL;
if (results)
  {
-tb->totimages_old = tb->totimages;
-tb->totsize_old = tb->totsize;
 tb->totimages = 0;
 tb->totsize = 0;
 EINA_LIST_FOREACH(results, l, o)
@@ -1078,6 +1076,8 @@ _search(void *data, Evas_Object *obj EINA_UNUSED,
evas_object_show(search);
 
tb->search = search;
+   tb->totimages_old = tb->totimages;
+   tb->totsize_old = tb->totsize;
 
elm_object_focus_set(search, EINA_TRUE);
 }

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Clean up menus, remove toolbars, work on focus, start search on type.

2016-04-01 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=469ce75485e1aa986b5c45467c0151ffccd3642a

commit 469ce75485e1aa986b5c45467c0151ffccd3642a
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Fri Apr 1 15:29:46 2016 -0500

Ephoto: Clean up menus, remove toolbars, work on focus, start search on 
type.

Screenshots:
http://www.enlightenment.org/ss/e-56feda88450023.78697698.jpg
http://www.enlightenment.org/ss/e-56fedac3d198f2.43263458.jpg
---
 src/bin/ephoto.h|   1 +
 src/bin/ephoto_config.c |   3 +
 src/bin/ephoto_main.c   |  17 +++
 src/bin/ephoto_single_browser.c | 216 
 src/bin/ephoto_thumb_browser.c  | 239 +---
 5 files changed, 242 insertions(+), 234 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index a76ac92..0375768 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -70,6 +70,7 @@ void ephoto_config_main(Ephoto *em);
 Evas_Object *ephoto_single_browser_add(Ephoto *ephoto, Evas_Object *parent);
 void ephoto_single_browser_entries_set(Evas_Object *obj, Eina_List *entries);
 void ephoto_single_browser_entry_set(Evas_Object *obj, Ephoto_Entry *entry);
+void ephoto_single_browser_focus_set(Ephoto *ephoto);
 void ephoto_single_browser_path_pending_set(Evas_Object *obj,
 const char *path);
 void ephoto_single_browser_path_pending_unset(Evas_Object *obj);
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 2a9fbfd..1873e06 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -82,8 +82,10 @@ static void
 _config_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Evas_Object *popup = data;
+   Ephoto *ephoto = evas_object_data_get(popup, "ephoto");
 
evas_object_del(popup);
+   elm_object_focus_set(ephoto->pager, EINA_TRUE);
 }
 
 static void
@@ -118,6 +120,7 @@ _config_save_cb(void *data, Evas_Object *obj EINA_UNUSED,
   elm_object_text_get(ephoto->config->slide_trans));
 
evas_object_del(popup);
+   elm_object_focus_set(ephoto->pager, EINA_TRUE);
 }
 
 static void
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 34a3b86..6241281 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -203,6 +203,20 @@ _resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  }
 }
 
+static void
+_pager_focused(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   Ephoto *ephoto = data;
+
+   if (ephoto->state == EPHOTO_STATE_THUMB)
+ elm_object_focus_set(ephoto->tb, EINA_TRUE);
+   else if (ephoto->state == EPHOTO_STATE_SINGLE)
+ ephoto_single_browser_focus_set(ephoto);
+   else
+ elm_object_focus_set(ephoto->sl, EINA_TRUE);
+}
+
 Evas_Object *
 ephoto_window_add(const char *path)
 {
@@ -245,11 +259,14 @@ ephoto_window_add(const char *path)
   ephoto_thumb_size_set(ephoto, ephoto->config->thumb_size);
 
ephoto->pager = elm_naviframe_add(ephoto->win);
+   elm_object_focus_allow_set(ephoto->pager, EINA_FALSE);
elm_naviframe_prev_btn_auto_pushed_set(ephoto->pager, EINA_FALSE);
evas_object_size_hint_weight_set(ephoto->pager, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(ephoto->pager, EVAS_HINT_FILL,
EVAS_HINT_FILL);
+   evas_object_event_callback_add(ephoto->pager, EVAS_CALLBACK_FOCUS_IN,
+   _pager_focused, ephoto);
elm_win_resize_object_add(ephoto->win, ephoto->pager);
evas_object_show(ephoto->pager);
 
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 26fd13f..31e4cd7 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -51,6 +51,8 @@ static void _key_down(void *data, Evas *e EINA_UNUSED,
 static void _edit_menu(Ephoto_Single_Browser *sb);
 static void _back(void *data, Evas_Object *obj EINA_UNUSED, 
 void *event_info EINA_UNUSED);
+static char *_ephoto_get_file_size(const char *path);
+static void _update_bottom_bar(Ephoto_Single_Browser *sb);
 
 static void
 _viewer_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
@@ -140,7 +142,7 @@ _image_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 }
 
 static void
-_scroller_mouse_up(void *data, Evas *e EINA_UNUSED,
+_scroller_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 Evas_Object *obj EINA_UNUSED, void *event_info)
 {
Ephoto_Single_Browser *sb = data;
@@ -149,6 +151,7 @@ _scroller_mouse_up(void *data, Evas *e EINA_UNUSED,
if (ev->button == 3)
  {
 _edit_menu(sb);
+_update_bottom_bar(sb);
  }
 }
 
@@ -227,8 +230,8 @@ _viewer_add(Evas_Object *parent, const char *path, 
Ephoto_Single_Browser *sb)
evas_object_size_hint_align_set(v->scroller,
EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_

[EGIT] [apps/ephoto] master 01/01: Ephoto: Remove duplicate menu entry

2016-03-30 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=fbbf060059ace6c7669d92274d9d836b24c118d5

commit fbbf060059ace6c7669d92274d9d836b24c118d5
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Mar 30 14:12:02 2016 -0500

Ephoto: Remove duplicate menu entry
---
 src/bin/ephoto_thumb_browser.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 79dfcb8..a4ecbfe 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -1996,8 +1996,6 @@ _grid_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 _search, tb);
 elm_menu_item_add(menu, menu_it, "edit-select-all", _("Select All"),
 _grid_menu_select_all_cb, tb);
-elm_menu_item_add(menu, menu_it, "edit-clear", _("Select None"),
-_grid_menu_clear_cb, tb);
  }
else
  {

-- 




[EGIT] [apps/ephoto] master 01/01: EPhoto: Remove all toolbars in favor of context menus and key bindings.

2016-03-30 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=02343df6d9bf844112e90b3dae86e29f718a9b16

commit 02343df6d9bf844112e90b3dae86e29f718a9b16
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Mar 30 13:17:31 2016 -0500

EPhoto: Remove all toolbars in favor of context menus and key bindings.
---
 src/bin/ephoto_single_browser.c | 278 
 src/bin/ephoto_thumb_browser.c  | 173 -
 2 files changed, 201 insertions(+), 250 deletions(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 8672532..26fd13f 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -11,8 +11,6 @@ struct _Ephoto_Single_Browser
 {
Ephoto *ephoto;
Evas_Object *main;
-   Evas_Object *tbox;
-   Evas_Object *bar;
Evas_Object *mhbox;
Evas_Object *table;
Evas_Object *viewer;
@@ -137,12 +135,21 @@ _image_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
 elm_win_fullscreen_set(sb->ephoto->win,
 !elm_win_fullscreen_get(sb->ephoto->win));
  }
-   else if (ev->button == 3)
+   ecore_timer_del(_1s_hold);
+   _1s_hold = NULL;
+}
+
+static void
+_scroller_mouse_up(void *data, Evas *e EINA_UNUSED,
+Evas_Object *obj EINA_UNUSED, void *event_info)
+{
+   Ephoto_Single_Browser *sb = data;
+   Evas_Event_Mouse_Up *ev = event_info;
+
+   if (ev->button == 3)
  {
 _edit_menu(sb);
  }
-   ecore_timer_del(_1s_hold);
-   _1s_hold = NULL;
 }
 
 static const char *
@@ -220,6 +227,8 @@ _viewer_add(Evas_Object *parent, const char *path, 
Ephoto_Single_Browser *sb)
evas_object_size_hint_align_set(v->scroller,
EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_data_set(v->scroller, "viewer", v);
+   evas_object_event_callback_add(v->scroller, EVAS_CALLBACK_MOUSE_UP, 
_scroller_mouse_up,
+   sb);
evas_object_event_callback_add(v->scroller, EVAS_CALLBACK_DEL, _viewer_del,
v);
evas_object_show(v->scroller);
@@ -1145,8 +1154,6 @@ _crop_image(void *data, Evas_Object *obj EINA_UNUSED,
  {
sb->editing = EINA_TRUE;
sb->cropping = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
elm_table_unpack(v->table, v->image);
@@ -1162,8 +1169,6 @@ _go_bcg(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
if (sb->viewer)
  {
sb->editing = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
ephoto_bcg_add(sb->main, sb->mhbox, v->image);
@@ -1178,8 +1183,6 @@ _go_hsv(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
if (sb->viewer)
  {
sb->editing = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
ephoto_hsv_add(sb->main, sb->mhbox, v->image);
@@ -1195,8 +1198,6 @@ _go_color(void *data, Evas_Object *obj EINA_UNUSED,
if (sb->viewer)
  {
sb->editing = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
ephoto_color_add(sb->main, sb->mhbox, v->image);
@@ -1212,8 +1213,6 @@ _go_auto_eq(void *data, Evas_Object *obj EINA_UNUSED,
if (sb->viewer)
  {
sb->editing = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
ephoto_filter_histogram_eq(sb->main, v->image);
@@ -1229,8 +1228,6 @@ _go_blur(void *data, Evas_Object *obj EINA_UNUSED,
if (sb->viewer)
  {
sb->editing = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
ephoto_filter_blur(sb->main, v->image);
@@ -1246,8 +1243,6 @@ _go_sharpen(void *data, Evas_Object *obj EINA_UNUSED,
if (sb->viewer)
  {
sb->editing = EINA_TRUE;
-   elm_object_disabled_set(sb->bar, EINA_TRUE);
-   evas_object_freeze_events_set(sb->bar, EINA_TRUE);
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
ephoto_filter_sharpen(sb->

[EGIT] [apps/ephoto] master 01/02: Add new files for thumbnailing

2016-03-24 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=c2a555939dfd2d14a3409af027789fc13ef60f46

commit c2a555939dfd2d14a3409af027789fc13ef60f46
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Mar 24 12:14:39 2016 -0500

Add new files for thumbnailing
---
 COPYING.thumbnailer  |  27 ++
 src/bin/ephoto_ipc.c | 164 ++
 src/bin/ephoto_thumb.c   | 438 ++
 src/bin/ephoto_thumbnailer.c | 709 +++
 4 files changed, 1338 insertions(+)

diff --git a/COPYING.thumbnailer b/COPYING.thumbnailer
new file mode 100644
index 000..87c8026
--- /dev/null
+++ b/COPYING.thumbnailer
@@ -0,0 +1,27 @@
+Ephoto's thumbnailing code is from Enlightenment using the following license:
+
+Copyright notice for Enlightenment:
+
+Copyright (C) 2000-2012 Carsten Haitzler and various contributors (see AUTHORS)
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+   1. Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/bin/ephoto_ipc.c b/src/bin/ephoto_ipc.c
new file mode 100644
index 000..df243ca
--- /dev/null
+++ b/src/bin/ephoto_ipc.c
@@ -0,0 +1,164 @@
+#include "ephoto.h"
+#undef ERR
+#define ERR(...)do { printf(__VA_ARGS__); putc('\n', stdout); } 
while(0)
+
+char *e_ipc_socket = NULL;
+
+#ifdef USE_IPC
+/* local subsystem functions */
+static Eina_Bool _e_ipc_cb_client_del(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event);
+static Eina_Bool _e_ipc_cb_client_data(void *data EINA_UNUSED, int type 
EINA_UNUSED, void *event);
+
+/* local subsystem globals */
+static Ecore_Ipc_Server *_e_ipc_server = NULL;
+#endif
+
+/* externally accessible functions */
+int
+e_ipc_init(void)
+{
+   char buf[4096], buf2[128], buf3[4096];
+   char *tmp, *user, *base;
+   int pid, trynum = 0, id1 = 0;
+   struct stat st;
+
+   tmp = getenv("TMPDIR");
+   if (!tmp) tmp = "/tmp";
+   base = tmp;
+
+   tmp = getenv("XDG_RUNTIME_DIR");
+   if (tmp)
+ {
+if (stat(tmp, ) == 0)
+  {
+ if ((st.st_uid == getuid()) &&
+ ((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
+  (S_IRWXU | S_IFDIR)))
+   base = tmp;
+ else
+   ERR("XDG_RUNTIME_DIR of '%s' failed permissions check", tmp);
+  }
+else
+  ERR("XDG_RUNTIME_DIR of '%s' cannot be accessed", tmp);
+ }
+   
+   tmp = getenv("SD_USER_SOCKETS_DIR");
+   if (tmp)
+ {
+if (stat(tmp, ) == 0)
+  {
+ if ((st.st_uid == getuid()) &&
+ ((st.st_mode & (S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)) ==
+  (S_IRWXU | S_IFDIR)))
+   base = tmp;
+ else
+   ERR("SD_USER_SOCKETS_DIR of '%s' failed permissions check", 
tmp);
+  }
+else
+  ERR("SD_USER_SOCKETS_DIR of '%s' cannot be accessed", tmp);
+ }
+
+   user = getenv("USER");
+   if (!user)
+ {
+int uidint;
+
+user = "__unknown__";
+uidint = getuid();
+if (uidint >= 0)
+  {
+ snprintf(buf2, sizeof(buf2), "%i", uidint);
+ user = buf2;
+  }
+ }
+
+   setenv("EPHOTO_IPC_SOCKET", "", 1);
+
+   pid = (int)getpid();
+   for (trynum = 0; trynum <= 4096; trynum++)
+ {
+snprintf(buf, sizeof(buf), "%s/e-%s@%x",
+ base, user, id1);
+if (!mkdir(buf, S_IRWXU))
+  {
+#ifdef USE_IPC
+ snprintf(buf3, sizeof(buf3), "%s/%i",
+  buf, pid);
+ _e_ipc_serve

[EGIT] [apps/ephoto] master 01/01: Ephoto: Move common editing code to one place.

2016-03-23 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=d5b7d2408273a99623a5a957fc52267099de4c26

commit d5b7d2408273a99623a5a957fc52267099de4c26
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Mar 23 15:13:38 2016 -0500

Ephoto: Move common editing code to one place.
---
 src/bin/ephoto_editor.c | 100 
 1 file changed, 100 insertions(+)

diff --git a/src/bin/ephoto_editor.c b/src/bin/ephoto_editor.c
new file mode 100644
index 000..d02c440
--- /dev/null
+++ b/src/bin/ephoto_editor.c
@@ -0,0 +1,100 @@
+#include "ephoto.h"
+
+static void
+_editor_reset(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   ecore_event_add(EPHOTO_EVENT_EDITOR_RESET, NULL, NULL, NULL);   
+}
+
+static void
+_editor_apply(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   ecore_event_add(EPHOTO_EVENT_EDITOR_APPLY, NULL, NULL, NULL);
+}
+
+static void
+_editor_cancel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   ecore_event_add(EPHOTO_EVENT_EDITOR_CANCEL, NULL, NULL, NULL);
+}
+
+Evas_Object *
+ephoto_editor_add(Evas_Object *parent, const char *title, const char 
*data_name,
+void *data)
+{
+   Evas_Object *frame, *box, *ic, *button;
+
+   frame = elm_frame_add(parent);
+   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);
+   evas_object_data_set(frame, data_name, data);
+   elm_box_pack_end(parent, 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);
+   evas_object_data_set(box, data_name, data);
+   evas_object_data_set(box, "frame", frame);
+   elm_object_content_set(frame, box);
+   evas_object_show(box);
+
+   ic = elm_icon_add(box);
+   elm_icon_order_lookup_set(ic, ELM_ICON_LOOKUP_FDO_THEME);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+   elm_icon_standard_set(ic, "edit-undo");
+
+   button = elm_button_add(box);
+   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);
+   elm_box_pack_end(box, button);
+   evas_object_show(button);
+
+   ic = elm_icon_add(box);
+   elm_icon_order_lookup_set(ic, ELM_ICON_LOOKUP_FDO_THEME);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+   elm_icon_standard_set(ic, "document-save");
+
+   button = elm_button_add(box);
+   elm_object_text_set(button, _("Apply"));
+   elm_object_part_content_set(button, "icon", ic);
+   evas_object_smart_callback_add(button, "clicked", _editor_apply, 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);
+   elm_box_pack_end(box, button);
+   evas_object_show(button);
+
+   ic = elm_icon_add(box);
+   elm_icon_order_lookup_set(ic, ELM_ICON_LOOKUP_FDO_THEME);
+   evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+   elm_icon_standard_set(ic, "window-close");
+
+   button = elm_button_add(box);
+   elm_object_text_set(button, _("Cancel"));
+   elm_object_part_content_set(button, "icon", ic);
+   evas_object_smart_callback_add(button, "clicked", _editor_cancel, 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);
+   elm_box_pack_end(box, button);
+   evas_object_show(button);   
+
+   return box;
+}
+
+void
+ephoto_editor_del(Evas_Object *obj)
+{
+   Evas_Object *frame = evas_object_data_get(obj, "frame");
+
+   if (frame)
+ evas_object_del(frame);
+}
+

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Pass make distcheck

2016-03-22 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=247e7a9cb43259fde5f45a4d401d971db212197f

commit 247e7a9cb43259fde5f45a4d401d971db212197f
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Mar 22 12:39:29 2016 -0500

Ephoto: Pass make distcheck
---
 data/desktop/Makefile.am | 1 +
 data/images/Makefile.am  | 3 +++
 data/themes/Makefile.am  | 1 +
 src/bin/Makefile.am  | 4 +++-
 4 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/data/desktop/Makefile.am b/data/desktop/Makefile.am
index e336782..eccf0aa 100644
--- a/data/desktop/Makefile.am
+++ b/data/desktop/Makefile.am
@@ -1,3 +1,4 @@
+AUTOMAKE_OPTIONS = subdir-objects
 MAINTAINERCLEANFILES = Makefile.in Makefile
 
 desktopdir = $(datadir)/applications
diff --git a/data/images/Makefile.am b/data/images/Makefile.am
index d044fcf..ad8d7b3 100644
--- a/data/images/Makefile.am
+++ b/data/images/Makefile.am
@@ -1,4 +1,7 @@
+AUTOMAKE_OPTIONS = subdir-objects
 MAINTAINERCLEANFILES = Makefile.in Makefile
 
+EXTRA_DIST = ephoto.png
+
 filesdir = $(datadir)/$(PACKAGE)/images
 files_DATA = ephoto.png
diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index 113caa2..1bc217e 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -1,3 +1,4 @@
+AUTOMAKE_OPTIONS = subdir-objects
 MAINTAINERCLEANFILES = Makefile.in Makefile
 
 EDJE_CC = @edje_cc@
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index f9bbdef..1bfdc8b 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -1,4 +1,6 @@
-MAINTAINERCLEANFILES = *.o config.h.in config.h Makefile.in Makefile stamp-h1
+AUTOMAKE_OPTIONS = subdir-objects
+MAINTAINERCLEANFILES = *.gcda *.gcno *.o config.h.in config.h Makefile.in 
Makefile stamp-h1
+DISTCLEANFILES = *.gcda *.gcno
 
 bin_PROGRAMS = ephoto
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add version number to about page.

2016-03-22 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=91b706230e968932c9218d03e9424bcc1c2a66ea

commit 91b706230e968932c9218d03e9424bcc1c2a66ea
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Mar 22 11:00:09 2016 -0500

Ephoto: Add version number to about page.
---
 configure.ac|  3 +--
 src/bin/ephoto_config.c | 14 --
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 129a41c..16abae0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # get rid of that stupid cache mechanism
 rm -f config.cache
 
-EFL_VERSION([0], [1], [1], [dev])
-AC_INIT([ephoto], [efl_version], [enlightenment-de...@lists.sourceforge.net])
+AC_INIT([ephoto], [0.9.99], [enlightenment-de...@lists.sourceforge.net])
 
 AC_PREREQ([2.60])
 AC_CONFIG_SRCDIR([configure.ac])
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 93be739..2a9fbfd 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -423,8 +423,9 @@ _ephoto_config_bindings(Evas_Object *parent)
 static Evas_Object *
 _ephoto_config_about(Evas_Object *parent)
 {
-   Evas_Object *box, *entry, *img;
+   Evas_Object *box, *entry, *img, *lbl;
Eina_Strbuf *sbuf = eina_strbuf_new();
+   char ver[PATH_MAX];
FILE *f;
 
box = elm_box_add(parent);
@@ -434,7 +435,7 @@ _ephoto_config_about(Evas_Object *parent)
evas_object_show(box);
 
img = elm_image_add(box);
-   evas_object_size_hint_min_set(img, 50, 50);
+   evas_object_size_hint_min_set(img, 75, 75);
elm_image_preload_disabled_set(img, EINA_TRUE);
elm_image_file_set(img, PACKAGE_DATA_DIR "/images/ephoto.png", NULL);
evas_object_size_hint_weight_set(img, 0.0, 0.0);
@@ -442,6 +443,15 @@ _ephoto_config_about(Evas_Object *parent)
elm_box_pack_end(box, img);
evas_object_show(img);
 
+   snprintf(ver, PATH_MAX, "Version: %s", VERSION);
+
+   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);
+   elm_box_pack_end(box, lbl);
+   evas_object_show(lbl);
+
entry = elm_entry_add(box);
elm_entry_anchor_hover_style_set(entry, "popout");
elm_entry_anchor_hover_parent_set(entry, parent);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add logo image

2016-03-22 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=dcf897d2a12b432b00b37a747bec5622eae5f386

commit dcf897d2a12b432b00b37a747bec5622eae5f386
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Mar 22 10:37:43 2016 -0500

Ephoto: Add logo image
---
 data/images/Makefile.am |   4 
 data/images/ephoto.png  | Bin 0 -> 10896 bytes
 2 files changed, 4 insertions(+)

diff --git a/data/images/Makefile.am b/data/images/Makefile.am
new file mode 100644
index 000..d044fcf
--- /dev/null
+++ b/data/images/Makefile.am
@@ -0,0 +1,4 @@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+
+filesdir = $(datadir)/$(PACKAGE)/images
+files_DATA = ephoto.png
diff --git a/data/images/ephoto.png b/data/images/ephoto.png
new file mode 100644
index 000..6601e97
Binary files /dev/null and b/data/images/ephoto.png differ

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add logo to about page.

2016-03-22 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=58f3d32874ea00c8317551e2e00749bff20d6f1c

commit 58f3d32874ea00c8317551e2e00749bff20d6f1c
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Mar 22 10:36:22 2016 -0500

Ephoto: Add logo to about page.
---
 configure.ac|  1 +
 data/Makefile.am|  2 +-
 src/bin/ephoto_config.c | 11 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 918ce1a..129a41c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,7 @@ AC_OUTPUT([
 Makefile
 data/Makefile
 data/desktop/Makefile
+data/images/Makefile
 data/themes/Makefile
 src/Makefile
 src/bin/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index a9369e6..d7b8c58 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,2 +1,2 @@
 MAINTAINERCLEANFILES = Makefile.in Makefile
-SUBDIRS = desktop themes
+SUBDIRS = desktop themes images
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index dd72d91..93be739 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -423,7 +423,7 @@ _ephoto_config_bindings(Evas_Object *parent)
 static Evas_Object *
 _ephoto_config_about(Evas_Object *parent)
 {
-   Evas_Object *box, *entry;
+   Evas_Object *box, *entry, *img;
Eina_Strbuf *sbuf = eina_strbuf_new();
FILE *f;
 
@@ -433,6 +433,15 @@ _ephoto_config_about(Evas_Object *parent)
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(box);
 
+   img = elm_image_add(box);
+   evas_object_size_hint_min_set(img, 50, 50);
+   elm_image_preload_disabled_set(img, EINA_TRUE);
+   elm_image_file_set(img, PACKAGE_DATA_DIR "/images/ephoto.png", NULL);
+   evas_object_size_hint_weight_set(img, 0.0, 0.0);
+   evas_object_size_hint_align_set(img, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   elm_box_pack_end(box, img);
+   evas_object_show(img);
+
entry = elm_entry_add(box);
elm_entry_anchor_hover_style_set(entry, "popout");
elm_entry_anchor_hover_parent_set(entry, parent);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Eliminate duplicate thumbing.

2016-03-15 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=75131514ccf2b82e7864537bad4eaa1442c07c00

commit 75131514ccf2b82e7864537bad4eaa1442c07c00
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Mar 15 16:45:20 2016 -0500

Ephoto: Eliminate duplicate thumbing.
---
 src/bin/ephoto.h   |  1 +
 src/bin/ephoto_config.c|  4 ++--
 src/bin/ephoto_main.c  | 30 +++---
 src/bin/ephoto_thumb_browser.c | 10 +++---
 4 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index f0ed31a..71ab446 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -218,6 +218,7 @@ struct _Ephoto_Event_Entry_Create
 
 Ephoto_Entry *ephoto_entry_new(Ephoto *ephoto, const char *path,
 const char *label, Eina_File_Type type);
+Eina_Bool ephoto_entry_exists(Ephoto *ephoto, const char *path);
 void ephoto_entry_free(Ephoto *ephoto, Ephoto_Entry *entry);
 void ephoto_entry_free_listener_add(Ephoto_Entry *entry,
 void (*cb) (void *data, const Ephoto_Entry *entry), const void *data);
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 92ff0ab..dd72d91 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -442,8 +442,8 @@ _ephoto_config_about(Evas_Object *parent)
evas_object_size_hint_weight_set(entry, 0.0, 0.0);
evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
eina_strbuf_append_printf(sbuf,
-   _("Ephoto is a comprehensive image viewer based on the EFL."
-  "For more information, please visit the Ephoto project page:"
+   _("Ephoto is a comprehensive image viewer based on the EFL. For 
more"
+  "information, please visit the Ephoto project page:"
"http://www.smhouston.us/ephoto/>"
"http://www.smhouston.us/ephoto/"
"Ephoto also has a page on the Enlightenment wiki:"
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 62c3c83..b4dfade 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -353,6 +353,8 @@ _ephoto_populate_main(void *data, Eio_File *handler 
EINA_UNUSED,
Ephoto_Entry *e;
Ephoto_Event_Entry_Create *ev;
 
+   if (ephoto_entry_exists(ed->ephoto, info->path))
+ return;
e = ephoto_entry_new(ed->ephoto, info->path, info->path + info->name_start,
info->type);
 
@@ -451,6 +453,7 @@ _ephoto_change_dir(void *data)
 {
Ephoto_Dir_Data *ed = data;
 
+   ed->ephoto->thumb_entry = NULL;
ed->ephoto->job.change_dir = NULL;
_ephoto_populate_entries(ed);
 }
@@ -471,16 +474,12 @@ _monitor_cb(void *data, Ecore_File_Monitor *em 
EINA_UNUSED,
if (evas_object_image_extension_can_load_get(path))
  {
 if (event == ECORE_FILE_EVENT_CREATED_FILE)
-  { 
- Eina_List *l;
+  {
  Ephoto_Entry *entry;
  char buf[PATH_MAX];
 
- EINA_LIST_FOREACH(ephoto->entries, l, entry)
-   {
-  if (!strcmp(entry->path, path))
-return;
-   }
+ if (ephoto_entry_exists(ephoto, path))
+   return;
  snprintf(buf, PATH_MAX, "%s", path);
  entry = ephoto_entry_new(ephoto, path, basename(buf),
  EINA_FILE_REG);
@@ -553,6 +552,9 @@ _monitor_cb(void *data, Ecore_File_Monitor *em EINA_UNUSED,
  if (!found)
{
   char buf[PATH_MAX];
+
+  if (ephoto_entry_exists(ephoto, path))
+return;
   snprintf(buf, PATH_MAX, "%s", path);
   entry = ephoto_entry_new(ephoto, path, basename(buf),
   EINA_FILE_REG);
@@ -763,6 +765,20 @@ ephoto_entry_new(Ephoto *ephoto, const char *path, const 
char *label,
return entry;
 }
 
+Eina_Bool 
+ephoto_entry_exists(Ephoto *ephoto, const char *path)
+{
+   Ephoto_Entry *entry;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(ephoto->entries, l, entry)
+ {
+if (!strcmp(entry->path, path))
+  return EINA_TRUE;
+ }
+   return EINA_FALSE;
+}
+
 void
 ephoto_entry_free(Ephoto *ephoto, Ephoto_Entry *entry)
 {
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 296cb3a..e35e4fb 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -551,6 +551,8 @@ _monitor_cb(void *data, Ecore_File_Monitor *em EINA_UNUSED,
   {
  ic = &_ephoto_dir_class;
  snprintf(buf, PATH_MAX, "%s", path);
+ if (ephoto_entry_exists(entry->ephoto, path))
+   return;
  e = ephoto_entry_new(entry->ephoto, path, basename(buf),
  EINA_FILE_DIR);
  e->genlist = entry->genlist;
@@ -662

[EGIT] [core/elementary] master 01/01: theme: Fix scroller colorclass typo.

2016-03-08 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=d5a26c084f5b6efa9d27e6bf08f0f55871b3ca19

commit d5a26c084f5b6efa9d27e6bf08f0f55871b3ca19
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Mar 8 13:36:58 2016 -0600

theme: Fix scroller colorclass typo.
---
 data/themes/edc/elm/scroller.edc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/themes/edc/elm/scroller.edc b/data/themes/edc/elm/scroller.edc
index 27b267c..8902c50 100644
--- a/data/themes/edc/elm/scroller.edc
+++ b/data/themes/edc/elm/scroller.edc
@@ -694,7 +694,7 @@ group { name: "elm/scroller/base/default";
 rel2.to: "elm.swallow.background";
 //color: 64 64 64 200;
 color: 0 0 0 0;
-color_class: "scroller_bg`";
+color_class: "scroller_bg";
  }
   }
   part { name: "clipper"; type: RECT;

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add icons for sort hoversel

2016-03-07 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=df1c1a0686a0eeb0be29d0fd7f97cc2b66cb0aa5

commit df1c1a0686a0eeb0be29d0fd7f97cc2b66cb0aa5
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Mon Mar 7 10:46:13 2016 -0600

Ephoto: Add icons for sort hoversel
---
 src/bin/ephoto_thumb_browser.c | 32 
 1 file changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 14305d9..296cb3a 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -424,11 +424,16 @@ _sort_alpha_asc(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_data EINA_UNUSED)
 {
Ephoto_Thumb_Browser *tb = data;
+   Evas_Object *ic;
 
tb->sort = EPHOTO_SORT_ALPHABETICAL_ASCENDING;
tb->thumbs_only = 1;
tb->dirs_only = 0;
elm_object_text_set(tb->hover, _("Alphabetical Ascending"));
+   ic = elm_icon_add(tb->hover);
+   elm_icon_standard_set(ic, "view-sort-ascending");
+   elm_object_part_content_set(tb->hover, "icon", ic);
+   evas_object_show(ic);
ephoto_directory_set(tb->ephoto, tb->ephoto->config->directory,
NULL, tb->dirs_only, tb->thumbs_only);
 }
@@ -438,11 +443,16 @@ _sort_alpha_desc(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_data EINA_UNUSED)
 {
Ephoto_Thumb_Browser *tb = data;
+   Evas_Object *ic;
 
tb->sort = EPHOTO_SORT_ALPHABETICAL_DESCENDING;
tb->thumbs_only = 1;
tb->dirs_only = 0;
elm_object_text_set(tb->hover, _("Alphabetical Descending"));
+   ic = elm_icon_add(tb->hover);
+   elm_icon_standard_set(ic, "view-sort-descending");
+   elm_object_part_content_set(tb->hover, "icon", ic);
+   evas_object_show(ic);
ephoto_directory_set(tb->ephoto, tb->ephoto->config->directory,
NULL, tb->dirs_only, tb->thumbs_only);
 }
@@ -452,11 +462,16 @@ _sort_mod_asc(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_data EINA_UNUSED)
 {
Ephoto_Thumb_Browser *tb = data;
+   Evas_Object *ic;
 
tb->sort = EPHOTO_SORT_MODTIME_ASCENDING;
tb->thumbs_only = 1;
tb->dirs_only = 0;
elm_object_text_set(tb->hover, _("Modification Time Ascending"));
+   ic = elm_icon_add(tb->hover);
+   elm_icon_standard_set(ic, "view-sort-ascending");
+   elm_object_part_content_set(tb->hover, "icon", ic);
+   evas_object_show(ic);
ephoto_directory_set(tb->ephoto, tb->ephoto->config->directory,
NULL, tb->dirs_only, tb->thumbs_only);
 }
@@ -466,11 +481,16 @@ _sort_mod_desc(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_data EINA_UNUSED)
 {
Ephoto_Thumb_Browser *tb = data;
+   Evas_Object *ic;
 
tb->sort = EPHOTO_SORT_MODTIME_DESCENDING;
tb->thumbs_only = 1;
tb->dirs_only = 0;
elm_object_text_set(tb->hover, _("Modification Time Descending"));
+   ic = elm_icon_add(tb->hover);
+   elm_icon_standard_set(ic, "view-sort-descending");
+   elm_object_part_content_set(tb->hover, "icon", ic);
+   evas_object_show(ic);
ephoto_directory_set(tb->ephoto, tb->ephoto->config->directory,
NULL, tb->dirs_only, tb->thumbs_only);
 }
@@ -4058,14 +4078,18 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object 
*parent)
tb->hover = elm_hoversel_add(tb->table);
elm_hoversel_hover_parent_set(tb->hover, tb->ephoto->win);
elm_hoversel_item_add(tb->hover, _("Alphabetical Ascending"), 
-   "view-sort-ascending", 0, _sort_alpha_asc, tb);
+   "view-sort-ascending", ELM_ICON_STANDARD, _sort_alpha_asc, tb);
elm_hoversel_item_add(tb->hover, _("Alphabetical Descending"), 
-   "view-sort-descending", 0, _sort_alpha_desc, tb);
+   "view-sort-descending", ELM_ICON_STANDARD, _sort_alpha_desc, tb);
elm_hoversel_item_add(tb->hover, _("Modification Time Ascending"), 
-   "view-sort-ascending", 0, _sort_mod_asc, tb);
+   "view-sort-ascending", ELM_ICON_STANDARD, _sort_mod_asc, tb);
elm_hoversel_item_add(tb->hover, _("Modification Time Descending"), 
-   "view-sort-descending", 0, _sort_mod_desc, tb);
+   "view-sort-descending", ELM_ICON_STANDARD, _sort_mod_desc, tb);
elm_object_text_set(tb->hover, _("Alphabetical Ascending"));
+   icon = elm_icon_add(tb->hover);
+   elm_icon_standard_set(icon, "view-sort-ascending");
+   elm_object_part_content_set(tb->hover, "icon", icon);
+   evas_object_show(icon);
elm_table_pack(tb->table, tb->hover, 4, 1, 1, 1);
evas_object_show(tb->hover);
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Move to Ecore_File_Monitor: It behaves better than Eio at this point.

2016-02-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=97e82b216f0191697691d768451cca6824d447e6

commit 97e82b216f0191697691d768451cca6824d447e6
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Mon Feb 29 11:15:52 2016 -0600

Ephoto: Move to Ecore_File_Monitor: It behaves better than Eio at this 
point.
---
 src/bin/ephoto.h|   6 +-
 src/bin/ephoto_main.c   | 234 ++
 src/bin/ephoto_single_browser.c |  55 +++--
 src/bin/ephoto_thumb_browser.c  | 431 ++--
 4 files changed, 280 insertions(+), 446 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index c828b60..adc1d61 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -171,8 +171,7 @@ struct _Ephoto
Eina_List *searchentries;
Eina_List *thumbs;
 
-   Eio_Monitor *monitor;
-   Eina_List *monitor_handlers;
+   Ecore_File_Monitor *monitor;
 
const char *top_directory;
 
@@ -203,8 +202,7 @@ struct _Ephoto_Entry
const char *label;
double size;
Ephoto *ephoto;
-   Eio_Monitor *monitor;
-   Eina_List *monitor_handlers;
+   Ecore_File_Monitor *monitor;
Elm_Object_Item *item;
Elm_Object_Item *parent;
Eina_List *free_listeners;
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 9b35096..62c3c83 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -166,13 +166,7 @@ _win_free(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
if (ephoto->timer.thumb_regen)
  ecore_timer_del(ephoto->timer.thumb_regen);
if (ephoto->monitor)
- {
-Ecore_Event_Handler *handler;
-
-EINA_LIST_FREE(ephoto->monitor_handlers, handler)
-  ecore_event_handler_del(handler);
-eio_monitor_del(ephoto->monitor);
- }
+ ecore_file_monitor_del(ephoto->monitor);
ephoto_config_save(ephoto);
free(ephoto);
 }
@@ -461,133 +455,133 @@ _ephoto_change_dir(void *data)
_ephoto_populate_entries(ed);
 }
 
-static Eina_Bool
-_monitor_created(void *data, int type EINA_UNUSED, void *event)
+static void
+_monitor_cb(void *data, Ecore_File_Monitor *em EINA_UNUSED,
+Ecore_File_Event event, const char *path)
 {
Ephoto *ephoto = data;
-   Eio_Monitor_Event *ev = event;
char file[PATH_MAX], dir[PATH_MAX];
 
-   snprintf(file, PATH_MAX, "%s", ev->filename);
+   snprintf(file, PATH_MAX, "%s", path);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
if (strcmp(ephoto->config->directory, dir))
- return ECORE_CALLBACK_PASS_ON;
+ return;
 
-   if (evas_object_image_extension_can_load_get(ev->filename))
+   if (evas_object_image_extension_can_load_get(path))
  {
-Eina_List *l;
-Ephoto_Entry *entry;
-char buf[PATH_MAX];
+if (event == ECORE_FILE_EVENT_CREATED_FILE)
+  { 
+ Eina_List *l;
+ Ephoto_Entry *entry;
+ char buf[PATH_MAX];
 
-EINA_LIST_FOREACH(ephoto->entries, l, entry)
-  {
- if (!strcmp(entry->path, ev->filename))
-   return ECORE_CALLBACK_PASS_ON;
-  }
-snprintf(buf, PATH_MAX, "%s", ev->filename);
-entry = ephoto_entry_new(ephoto, ev->filename, basename(buf),
-EINA_FILE_REG);
-ephoto_single_browser_path_created(ephoto->single_browser, entry);
-if (!ephoto->entries)
-  {
- ephoto->entries = eina_list_append(ephoto->entries, entry);
-  }
-else
-  {
- int near_cmp;
- Eina_List *near_node =
- eina_list_search_sorted_near_list(ephoto->entries,
- ephoto_entries_cmp, entry, _cmp);
-
- if (near_cmp < 0)
-ephoto->entries =
-eina_list_append_relative_list(ephoto->entries, entry,
-near_node);
+ EINA_LIST_FOREACH(ephoto->entries, l, entry)
+   {
+  if (!strcmp(entry->path, path))
+return;
+   }
+ snprintf(buf, PATH_MAX, "%s", path);
+ entry = ephoto_entry_new(ephoto, path, basename(buf),
+ EINA_FILE_REG);
+ ephoto_single_browser_path_created(ephoto->single_browser, entry);
+ if (!ephoto->entries)
+   {
+  ephoto->entries = eina_list_append(ephoto->entries, entry);
+   }
  else
-ephoto->entries =
-eina_list_prepend_relative_list(ephoto->entries, entry,
-near_node);
+   {
+  int near_cmp;
+  Eina_List *near_node =
+  eina_list_search_sorted_near_list(ephoto->entries,
+  ephoto_entries_cmp, entry, _cmp);

[EGIT] [apps/ephoto] master 01/01: EPhoto: Remove stray printfs.

2016-02-25 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=957d72fc392e0e0a16c857af75d46f087a3417e8

commit 957d72fc392e0e0a16c857af75d46f087a3417e8
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Feb 25 16:46:04 2016 -0600

EPhoto: Remove stray printfs.
---
 src/bin/ephoto_main.c   | 6 +-
 src/bin/ephoto_single_browser.c | 2 --
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 82a6b7b..9b35096 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -471,10 +471,8 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
snprintf(file, PATH_MAX, "%s", ev->filename);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
-   printf("Howdy %s\n", ev->filename);
-   
if (strcmp(ephoto->config->directory, dir))
- return ECORE_CALLBACK_RENEW;
+ return ECORE_CALLBACK_PASS_ON;
 
if (evas_object_image_extension_can_load_get(ev->filename))
  {
@@ -554,8 +552,6 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
Eio_Monitor_Event *ev = event;
char file[PATH_MAX], dir[PATH_MAX];
 
-   printf("Doody %s\n", ev->filename);
-
snprintf(file, PATH_MAX, "%s", ev->filename);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index dc43f83..f99e518 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -182,8 +182,6 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event EINA_UNUSED)
Ephoto_Single_Browser *sb = data;
Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
 
-   printf("Cutie\n");
-
if (!ecore_file_exists(sb->entry->path))
  ephoto_entry_free(sb->ephoto, sb->entry);
else

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: More monitor work

2016-02-25 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=9ec91c1297723918316111dc889a8961cc1c17a6

commit 9ec91c1297723918316111dc889a8961cc1c17a6
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Feb 25 16:43:14 2016 -0600

Ephoto: More monitor work
---
 src/bin/ephoto_main.c   |  15 -
 src/bin/ephoto_single_browser.c | 132 +++-
 2 files changed, 74 insertions(+), 73 deletions(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 5235f5a..82a6b7b 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -470,9 +470,11 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
 
snprintf(file, PATH_MAX, "%s", ev->filename);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
+
+   printf("Howdy %s\n", ev->filename);

if (strcmp(ephoto->config->directory, dir))
- return ECORE_CALLBACK_PASS_ON;
+ return ECORE_CALLBACK_RENEW;
 
if (evas_object_image_extension_can_load_get(ev->filename))
  {
@@ -552,6 +554,8 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
Eio_Monitor_Event *ev = event;
char file[PATH_MAX], dir[PATH_MAX];
 
+   printf("Doody %s\n", ev->filename);
+
snprintf(file, PATH_MAX, "%s", ev->filename);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
@@ -562,6 +566,7 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
  {
 Eina_List *l;
 Ephoto_Entry *entry;
+int found = 0;
 
 EINA_LIST_FOREACH(ephoto->entries, l, entry)
   {
@@ -574,11 +579,17 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
 }
   else
 {
-   ephoto_thumb_browser_update(ephoto, entry);
+   if (!entry->item)
+ ephoto_thumb_browser_insert(ephoto, entry);
+   else
+ ephoto_thumb_browser_update(ephoto, entry);
 }
+  found = 1;
   break;
}
   }
+if (!found)
+  _monitor_created(ephoto, 0, ev);
  }
return ECORE_CALLBACK_PASS_ON;
 }
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 2cf1396..dc43f83 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -47,7 +47,6 @@ struct _Ephoto_Viewer
double zoom;
Eina_Bool fit:1;
Eina_Bool zoom_first:1;
-   Eina_Bool modified:1;
 };
 
 static void _zoom_set(Ephoto_Single_Browser *sb, double zoom);
@@ -71,33 +70,6 @@ _viewer_del(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
free(v);
 }
 
-static Eina_Bool
-_monitor_modified(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
-{
-   Ephoto_Single_Browser *sb = data;
-   Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
-
-   if (!ecore_file_exists(sb->entry->path))
- ephoto_entry_free(sb->ephoto, sb->entry);
-   else
- v->modified = EINA_TRUE;
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_monitor_closed(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
-{
-   Ephoto_Single_Browser *sb = data;
-   Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
-
-   if (v->modified == EINA_TRUE)
- {
-ephoto_single_browser_entry_set(sb->main, sb->entry);
-v->modified = EINA_FALSE;
- }
-   return ECORE_CALLBACK_PASS_ON;
-}
-
 static Evas_Object *
 _image_create_icon(void *data, Evas_Object *parent, Evas_Coord *xoff,
 Evas_Coord *yoff)
@@ -179,6 +151,63 @@ _image_mouse_up_cb(void *data, Evas *e EINA_UNUSED,
_1s_hold = NULL;
 }
 
+static const char *
+_get_edje_group(const char  *path)
+{
+   const char *group = NULL;
+   const char *ext = strrchr(path, '.');
+
+   if (ext)
+ {
+ext++;
+if ((strcasecmp(ext, "edj") == 0))
+  {
+ if (edje_file_group_exists(path, "e/desktop/background"))
+group = "e/desktop/background";
+ else
+   {
+  Eina_List *g = edje_file_collection_list(path);
+
+  group = eina_list_data_get(g);
+  edje_file_collection_list_free(g);
+   }
+  }
+ }
+   return group;
+}
+
+static Eina_Bool
+_monitor_modified(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
+{
+   Ephoto_Single_Browser *sb = data;
+   Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
+
+   printf("Cutie\n");
+
+   if (!ecore_file_exists(sb->entry->path))
+ ephoto_entry_free(sb->ephoto, sb->entry);
+   else
+ {
+Evas_Object *tmp;
+Evas

[EGIT] [apps/ephoto] master 01/01: Ephoto: More cleanup, eliminate duplicate thumbnails showing up, fix save error.

2016-02-24 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=3855fd4795802821698bd5eb75722c575fbd54a5

commit 3855fd4795802821698bd5eb75722c575fbd54a5
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Feb 24 16:47:39 2016 -0600

Ephoto: More cleanup, eliminate duplicate thumbnails showing up, fix save 
error.
---
 src/bin/ephoto.h|  2 ++
 src/bin/ephoto_main.c   | 14 
 src/bin/ephoto_single_browser.c | 71 +
 src/bin/ephoto_thumb_browser.c  | 49 ++--
 4 files changed, 104 insertions(+), 32 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index 5a4b539..c828b60 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -64,6 +64,7 @@ void ephoto_single_browser_entries_set(Evas_Object *obj, 
Eina_List *entries);
 void ephoto_single_browser_entry_set(Evas_Object *obj, Ephoto_Entry *entry);
 void ephoto_single_browser_path_pending_set(Evas_Object *obj,
 const char *path);
+void ephoto_single_browser_path_created(Evas_Object *obj, Ephoto_Entry *entry);
 void ephoto_single_browser_image_data_update(Evas_Object *main,
 Evas_Object *image, Eina_Bool finished, unsigned int *image_data, int w,
 int h);
@@ -82,6 +83,7 @@ void ephoto_thumb_browser_fsel_clear(Ephoto *ephoto);
 void ephoto_thumb_browser_top_dir_set(Ephoto *ephoto, const char *dir);
 void ephoto_thumb_browser_insert(Ephoto *ephoto, Ephoto_Entry *entry);
 void ephoto_thumb_browser_remove(Ephoto *ephoto, Ephoto_Entry *entry);
+void ephoto_thumb_browser_update(Ephoto *ephoto, Ephoto_Entry *entry);
 
 /* smart callbacks called: "selected" - an item in the thumb browser is
  * selected. The selected Ephoto_Entry is passed as event_info argument. */
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index e496687..5235f5a 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -470,11 +470,11 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
 
snprintf(file, PATH_MAX, "%s", ev->filename);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
-
+   
if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
 
-   if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6))
+   if (evas_object_image_extension_can_load_get(ev->filename))
  {
 Eina_List *l;
 Ephoto_Entry *entry;
@@ -488,6 +488,7 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
 snprintf(buf, PATH_MAX, "%s", ev->filename);
 entry = ephoto_entry_new(ephoto, ev->filename, basename(buf),
 EINA_FILE_REG);
+ephoto_single_browser_path_created(ephoto->single_browser, entry);
 if (!ephoto->entries)
   {
  ephoto->entries = eina_list_append(ephoto->entries, entry);
@@ -519,7 +520,6 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void 
*event)
Ephoto *ephoto = data;
Eio_Monitor_Event *ev = event;
char file[PATH_MAX], dir[PATH_MAX];
-   const char *mime;
 
snprintf(file, PATH_MAX, "%s", ev->filename);
snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
@@ -527,8 +527,7 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void 
*event)
if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
 
-   mime = efreet_mime_type_get(ev->filename);
-   if (!mime || !strncmp("image/", mime, 6))
+   if (evas_object_image_extension_can_load_get(ev->filename))
  {
 Eina_List *l;
 Ephoto_Entry *entry;
@@ -559,7 +558,7 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
 
-   if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6))
+   if (evas_object_image_extension_can_load_get(ev->filename))
  {
 Eina_List *l;
 Ephoto_Entry *entry;
@@ -575,8 +574,7 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
 }
   else
 {
-   ephoto_thumb_browser_remove(ephoto, entry);
-   ephoto_thumb_browser_insert(ephoto, entry);
+   ephoto_thumb_browser_update(ephoto, entry);
 }
   break;
}
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 1cbf5a9..2cf1396 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -1202,15 +1202,19 @@ _save_image_as_overwrite(void *data, Evas_Object *obj 
EINA_UNUSED,
 return;
  }
  }
+   ephoto_single_browser_path_pending_set(sb->ephoto->single_browser, file);
success =
evas_object_image_save(elm_image_object_get(v-&g

[EGIT] [apps/ephoto] master 01/01: Ephoto: Clean up some code by eliminating redundant code into one function.

2016-02-24 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=cc281bd2472b803f868b48460e0734e85d0feb28

commit cc281bd2472b803f868b48460e0734e85d0feb28
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Feb 24 10:03:44 2016 -0600

Ephoto: Clean up some code by eliminating redundant code into one function.
---
 src/bin/ephoto_thumb_browser.c | 331 +++--
 1 file changed, 86 insertions(+), 245 deletions(-)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index fca1eba..ea72125 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -53,12 +53,14 @@ struct _Ephoto_Thumb_Browser
Ecore_Timer *click_timer;
Eina_Bool thumbs_only;
Eina_Bool dirs_only;
+   double totsize;
+   double totsize_old;
int totimages;
+   int totimages_old;
int file_errors;
Eina_Bool dragging;
Eina_Bool searching;
Eina_Bool processing;
-   double totsize;
struct
{
   Ecore_Animator *todo_items;
@@ -92,6 +94,65 @@ static Eina_Bool _monitor_modified(void *data, int type 
EINA_UNUSED,
 void *event);
 
 static void
+_update_info_label(Ephoto_Thumb_Browser *tb)
+{
+   char buf[PATH_MAX];
+   char isize[PATH_MAX];
+   char image_info[PATH_MAX];
+   double totsize;
+
+
+   if (!tb->totimages)
+ {
+elm_object_text_set(tb->nolabel,
+_("No images matched your search"));
+snprintf(buf, PATH_MAX, "%s: 0 %s%s: 0%s",
+_("Total"), ngettext("image", "images", 0), _("Size"),
+ngettext("B", "B", 0));
+elm_object_text_set(tb->infolabel, buf);
+ }
+   else
+ {
+elm_object_text_set(tb->nolabel, " ");
+totsize = tb->totsize;
+if (totsize < 1024.0)
+   snprintf(isize, sizeof(isize), "%'.0f%s", totsize, ngettext("B",
+   "B", totsize));
+else
+  {
+ totsize /= 1024.0;
+ if (totsize < 1024)
+snprintf(isize, sizeof(isize), "%'.0f%s", totsize,
+ngettext("KB", "KB", totsize));
+ else
+   {
+  totsize /= 1024.0;
+  if (totsize < 1024)
+ snprintf(isize, sizeof(isize), "%'.1f%s", totsize,
+ ngettext("MB", "MB", totsize));
+  else
+{
+   totsize /= 1024.0;
+   if (totsize < 1024)
+  snprintf(isize, sizeof(isize), "%'.1f%s", totsize,
+  ngettext("GB", "GB", totsize));
+   else
+ {
+totsize /= 1024.0;
+snprintf(isize, sizeof(isize), "%'.1f%s",
+totsize, ngettext("TB", "TB", totsize));
+ }
+}
+   }
+  }
+snprintf(image_info, PATH_MAX, "%s: %d %s%s: %s",
+_("Total"), tb->totimages, ngettext("image", "images",
+tb->totimages), _("Size"), isize);
+elm_object_text_set(tb->infolabel, image_info);
+ }
+}
+
+static void
 _todo_items_free(Ephoto_Thumb_Browser *tb)
 {
eina_list_free(tb->todo_items);
@@ -854,11 +915,10 @@ _ephoto_search_go(void *data, Evas_Object *obj 
EINA_UNUSED,
tb->searchentries = NULL;
if (results)
  {
-char isize[PATH_MAX];
-char image_info[PATH_MAX];
-double totsize = 0;
-int totimages = 0;
-
+tb->totimages_old = tb->totimages;
+tb->totsize_old = tb->totsize;
+tb->totimages = 0;
+tb->totsize = 0;
 EINA_LIST_FOREACH(results, l, o)
   {
  const Elm_Gengrid_Item_Class *ic = NULL;
@@ -888,9 +948,9 @@ _ephoto_search_go(void *data, Evas_Object *obj EINA_UNUSED,
{
   Eina_File *f;
   elm_object_item_data_set(e->item, e);
-  totimages++;
+  tb->totimages++;
   f = eina_file_open(e->path, EINA_FALSE);
-  totsize += (double) eina_file_size_get(f);
+  tb->totsize += (double) eina_file_size_get(f);
   eina_file_close(f);
   tb->searchentries = eina_list_append(tb->searchentries, e);
}
@@ -900,53 +960,14 @@ _ephoto_search_go(void *data, Evas_Object *obj 
EINA_UNUSED,
}
   }
 tb->entries = tb->searchentries;
-elm_object_tex

[EGIT] [apps/ephoto] master 01/01: Ephoto: Don't save/overwrite images with raw extensions.

2016-02-17 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=16cf9beb6ee63960425b988207e378f8ce9406a2

commit 16cf9beb6ee63960425b988207e378f8ce9406a2
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Feb 17 10:50:32 2016 -0600

Ephoto: Don't save/overwrite images with raw extensions.
---
 src/bin/ephoto.h| 19 +++
 src/bin/ephoto_single_browser.c | 15 +--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index f7d2a22..5a4b539 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -260,6 +260,25 @@ _ephoto_eina_file_direct_info_image_useful(const 
Eina_File_Direct_Info *info)
return EINA_FALSE;
 }
 
+static inline Eina_Bool
+_ephoto_file_image_can_save(const char *ext)
+{
+   int i = 0;
+
+   const char *filters[] = {
+  "png", "jpeg", "jpg", "eet", "xpm", "tiff", "tif", "gif", "svg", "webp",
+  "pmaps", "bmp", "wbmp", "ico", "generic"
+   };
+
+   int count = sizeof(filters) / sizeof(filters[0]);
+   for (i = 0; i < count; i++)
+ {
+if (!strcasecmp(ext, filters[i]))
+   return EINA_TRUE;
+ }
+   return EINA_FALSE;
+}
+
 extern int EPHOTO_EVENT_ENTRY_CREATE;
 extern int EPHOTO_EVENT_POPULATE_START;
 extern int EPHOTO_EVENT_POPULATE_END;
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index eb2b028..1cbf5a9 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -20,6 +20,7 @@ struct _Ephoto_Single_Browser
Evas_Object *nolabel;
Evas_Object *botbox;
Evas_Object *event;
+   Elm_Object_Item *save;
const char *pending_path;
Ephoto_Entry *entry;
Ephoto_Orient orient;
@@ -764,6 +765,11 @@ _ephoto_single_browser_recalc(Ephoto_Single_Browser *sb)
 evas_object_show(sb->infolabel);
 
 ephoto_title_set(sb->ephoto, bname);
+
+ if (!_ephoto_file_image_can_save(strrchr(bname, '.')+1))
+   elm_object_item_disabled_set(sb->save, EINA_TRUE);
+ else
+   elm_object_item_disabled_set(sb->save, EINA_FALSE);
  }
 else
  {
@@ -1115,6 +1121,11 @@ _save_image(void *data, Evas_Object *obj EINA_UNUSED,
Ephoto_Single_Browser *sb = data;
Evas_Object *popup, *box, *label, *ic, *button;
 
+   if (!_ephoto_file_image_can_save(strrchr(sb->entry->label, '.')+1))
+ {
+_failed_save(sb);
+return;
+ }
if (sb->event)
  evas_object_freeze_events_set(sb->event, EINA_TRUE);
 
@@ -1233,7 +1244,7 @@ _save_image_as_done(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
 
char buf[PATH_MAX];
 
-   if (!evas_object_image_extension_can_load_get(selected))
+   if (!_ephoto_file_image_can_save(strrchr(selected, '.')+1))
   snprintf(buf, PATH_MAX, "%s.jpg", selected);
else
   snprintf(buf, PATH_MAX, "%s", selected);
@@ -2552,7 +2563,7 @@ ephoto_single_browser_add(Ephoto *ephoto, Evas_Object 
*parent)
menu = elm_toolbar_item_menu_get(icon);
 
elm_menu_item_add(menu, NULL, "edit-undo", _("Reset"), _reset_image, sb);
-   elm_menu_item_add(menu, NULL, "document-save", _("Save"), _save_image, sb);
+   sb->save = elm_menu_item_add(menu, NULL, "document-save", _("Save"), 
_save_image, sb);
elm_menu_item_add(menu, NULL, "document-save-as", _("Save As"),
_save_image_as, sb);
elm_menu_item_add(menu, NULL, "document-send", _("Upload"), _upload_image,

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix typo in commit of vtorri's patches for Windows.

2016-01-22 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=aa2c756ce054a64369122a3f19dc38d496a7ca81

commit aa2c756ce054a64369122a3f19dc38d496a7ca81
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Fri Jan 22 15:27:16 2016 -0600

Ephoto: Fix typo in commit of vtorri's patches for Windows.
---
 configure.ac| 2 +-
 src/bin/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index a78d3f1..918ce1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ have_po="yes"
 ],[
 have_po="no"
 ])
-AC_SUBST([LTLLIBINTL])
+AC_SUBST([LTLIBINTL])
 if test "x$LIBINTL" = "x"; then
   LIBINTL="$INTLLIBS"
 fi
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index cefe3b6..f9bbdef 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -13,7 +13,7 @@ ephoto_CPPFLAGS = \
 ephoto_LDADD = @EFL_LIBS@
 if HAVE_PO
 ephoto_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"
-ephoto_LDADD += @LIBINTL@
+ephoto_LDADD += @LTLIBINTL@
 endif
 
 ephoto_SOURCES = \

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Apply patches from Vincent Torri (vtorri) that make Ephoto work on Windows.

2016-01-22 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=f7de0f1c0fee2ed5f0a987bdae14ac02f8df5952

commit f7de0f1c0fee2ed5f0a987bdae14ac02f8df5952
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Fri Jan 22 15:24:32 2016 -0600

Ephoto: Apply patches from Vincent Torri (vtorri) that make Ephoto work on 
Windows.
---
 configure.ac| 2 +-
 src/bin/ephoto.c| 2 +-
 src/bin/ephoto.h| 7 ---
 src/bin/ephoto_config.c | 8 
 src/bin/ephoto_main.c   | 5 +++--
 5 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index cf71ebf..a78d3f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ have_po="yes"
 ],[
 have_po="no"
 ])
-AC_SUBST(LTLLIBINTL)
+AC_SUBST([LTLLIBINTL])
 if test "x$LIBINTL" = "x"; then
   LIBINTL="$INTLLIBS"
 fi
diff --git a/src/bin/ephoto.c b/src/bin/ephoto.c
index dff68ae..6d21161 100644
--- a/src/bin/ephoto.c
+++ b/src/bin/ephoto.c
@@ -2,7 +2,7 @@
 
 static void _ephoto_display_usage(void);
 
-EAPI int
+EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
int r = 0;
diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index d587c62..210d879 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -29,10 +29,11 @@
 # endif
 
 #if HAVE_GETTEXT && ENABLE_NLS
-#define _(string) gettext (string)
+# include 
+# define _(string) gettext (string)
 #else
-#define _(string) (string)
-#define ngettext(String1, String2, Var) Var == 1 ? String1 : String2
+# define _(string) (string)
+# define ngettext(String1, String2, Var) Var == 1 ? String1 : String2
 #endif
 
 typedef struct _Ephoto_Config Ephoto_Config;
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index 7ebea4d..cf0ac51 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -79,7 +79,7 @@ ephoto_config_free(Ephoto *ephoto)
 }
 
 static void
-_close(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_config_close_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info 
EINA_UNUSED)
 {
Evas_Object *popup = data;
 
@@ -87,7 +87,7 @@ _close(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 }
 
 static void
-_save(void *data, Evas_Object *obj EINA_UNUSED,
+_config_save_cb(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_info EINA_UNUSED)
 {
Evas_Object *popup = data;
@@ -527,7 +527,7 @@ ephoto_config_main(Ephoto *ephoto)
button = elm_button_add(popup);
elm_object_text_set(button, _("Save"));
elm_object_part_content_set(button, "icon", ic);
-   evas_object_smart_callback_add(button, "clicked", _save, popup);
+   evas_object_smart_callback_add(button, "clicked", _config_save_cb, popup);
elm_object_part_content_set(popup, "button1", button);
evas_object_show(button);
 
@@ -539,7 +539,7 @@ ephoto_config_main(Ephoto *ephoto)
button = elm_button_add(popup);
elm_object_text_set(button, _("Close"));
elm_object_part_content_set(button, "icon", ic);
-   evas_object_smart_callback_add(button, "clicked", _close, popup);
+   evas_object_smart_callback_add(button, "clicked", _config_close_cb, popup);
elm_object_part_content_set(popup, "button2", button);
evas_object_show(button);
 
diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 778cfdd..d5f5371 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -640,7 +640,8 @@ _thumb_gen_size_changed_timer_cb(void *data)
  {
 Ethumb_Thumb_Format format;
 
-format = (long) evas_object_data_get(o, "ephoto_format");
+format = (Ethumb_Thumb_Format) (uintptr_t) 
+evas_object_data_get(o, "ephoto_format");
 if (format)
  {
 elm_thumb_format_set(o, format);
@@ -753,7 +754,7 @@ ephoto_thumb_path_set(Evas_Object *obj, const char *path)
  }
  }
elm_thumb_format_set(obj, format);
-   evas_object_data_set(obj, "ephoto_format", (void *) (long) format);
+   evas_object_data_set(obj, "ephoto_format", (void *) (uintptr_t) format);
elm_thumb_crop_align_set(obj, 0.5, 0.5);
elm_thumb_aspect_set(obj, ETHUMB_THUMB_CROP);
elm_thumb_orientation_set(obj, ETHUMB_THUMB_ORIENT_ORIGINAL);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Remove redundant strlen+strcmp checks.

2016-01-20 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=8a183065b7e30ce95ab6eabb62fdbdb607ceaa46

commit 8a183065b7e30ce95ab6eabb62fdbdb607ceaa46
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Jan 20 09:15:39 2016 -0600

Ephoto: Remove redundant strlen+strcmp checks.
---
 src/bin/ephoto_main.c  |  74 ++--
 src/bin/ephoto_thumb_browser.c | 153 +++--
 2 files changed, 61 insertions(+), 166 deletions(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 858ed06..cdd3fb6 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -462,15 +462,12 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
 {
Ephoto *ephoto = data;
Eio_Monitor_Event *ev = event;
-   char file[PATH_MAX], dir[PATH_MAX], p[PATH_MAX];
+   char file[PATH_MAX], dir[PATH_MAX];
 
snprintf(file, PATH_MAX, "%s", ev->filename);
-   snprintf(p, PATH_MAX, "%s", ephoto->config->directory);
snprintf(dir, PATH_MAX, "%s", dirname(file));
 
-   if (strlen(p) != strlen(dir))
- return ECORE_CALLBACK_PASS_ON;
-   if (strcmp(p, dir))
+   if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
 
if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6))
@@ -481,16 +478,8 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
 
 EINA_LIST_FOREACH(ephoto->entries, l, entry)
   {
- char p1[PATH_MAX], p2[PATH_MAX];
- snprintf(p1, PATH_MAX, "%s", entry->path);
- snprintf(p2, PATH_MAX, "%s", ev->filename);
- if (strlen(p1) == strlen(p2))
-   {
-  if (!strcmp(p1, p2))
-{
-   return ECORE_CALLBACK_PASS_ON;
-}
-   }
+ if (!strcmp(entry->path, ev->filename))
+   return ECORE_CALLBACK_PASS_ON;
   }
 snprintf(buf, PATH_MAX, "%s", ev->filename);
 entry = ephoto_entry_new(ephoto, ev->filename, basename(buf),
@@ -525,15 +514,12 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void 
*event)
 {
Ephoto *ephoto = data;
Eio_Monitor_Event *ev = event;
-   char file[PATH_MAX], dir[PATH_MAX], p[PATH_MAX];
+   char file[PATH_MAX], dir[PATH_MAX];
 
snprintf(file, PATH_MAX, "%s", ev->filename);
-   snprintf(p, PATH_MAX, "%s", ephoto->config->directory);
snprintf(dir, PATH_MAX, "%s", dirname(file));
 
-   if (strlen(p) != strlen(dir))
- return ECORE_CALLBACK_PASS_ON;
-   if (strcmp(p, dir))
+   if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
 
if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6))
@@ -543,17 +529,11 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void 
*event)
 
 EINA_LIST_FOREACH(ephoto->entries, l, entry)
   {
- char p1[PATH_MAX], p2[PATH_MAX];
- snprintf(p1, PATH_MAX, "%s", entry->path);
- snprintf(p2, PATH_MAX, "%s", ev->filename);
- if (strlen(p1) == strlen(p2))
+ if (!strcmp(entry->path, ev->filename))
{
-  if (!strcmp(p1, p2))
-{
-   ephoto_thumb_browser_remove(ephoto, entry);
-   ephoto_entry_free(ephoto, entry);
-   break;
-}
+  ephoto_thumb_browser_remove(ephoto, entry);
+  ephoto_entry_free(ephoto, entry);
+  break;
}
   }
  }
@@ -565,15 +545,12 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
 {
Ephoto *ephoto = data;
Eio_Monitor_Event *ev = event;
-   char file[PATH_MAX], dir[PATH_MAX], p[PATH_MAX];
+   char file[PATH_MAX], dir[PATH_MAX];
 
snprintf(file, PATH_MAX, "%s", ev->filename);
-   snprintf(p, PATH_MAX, "%s", ephoto->config->directory);
snprintf(dir, PATH_MAX, "%s", dirname(file));
 
-   if (strlen(p) != strlen(dir))
- return ECORE_CALLBACK_PASS_ON;
-   if (strcmp(p, dir))
+   if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
 
if (!strncmp("image/", efreet_mime_type_get(ev->filename), 6))
@@ -583,26 +560,19 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
 
 EINA_LIST_FOREACH(ephoto->entries, l, entry)
   {
- char p1[PATH_MAX], p2[PATH_MAX];
-
- snprintf(p1, PATH_MAX, "%s", entry->path);
- snprintf(p2, PATH_MAX, "%s", ev->filename);
- if (strlen(p1) == strlen(p2))
+ if (!strcmp(entry->path, ev-

[EGIT] [apps/ephoto] master 01/01: Ephoto: Don't clear entries if populating directories only.

2016-01-20 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=95c5f41301df919363bbacc349bb470b656845fe

commit 95c5f41301df919363bbacc349bb470b656845fe
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Jan 20 09:21:27 2016 -0600

Ephoto: Don't clear entries if populating directories only.
---
 src/bin/ephoto_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index cdd3fb6..e12d6f5 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -438,7 +438,7 @@ _ephoto_populate_entries(Ephoto_Dir_Data *ed)
if (ed->thumbs_only)
  EINA_LIST_FREE(ed->ephoto->entries, entry)
ephoto_entry_free(entry->ephoto, entry);
-   else
+   else if (!ed->dirs_only)
  ephoto_entries_free(ed->ephoto);
 
ed->ephoto->ls =

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Use ecore_file_dir_get consistently instead of dirname and ecore_file_dir_get inconsistently.

2016-01-20 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=c421929c547e98fcd9b925cb42c85a7ecd38c8c0

commit c421929c547e98fcd9b925cb42c85a7ecd38c8c0
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Jan 20 16:46:49 2016 -0600

Ephoto: Use ecore_file_dir_get consistently instead of dirname and 
ecore_file_dir_get inconsistently.
---
 src/bin/ephoto_main.c   |  6 +++---
 src/bin/ephoto_single_browser.c | 37 +
 src/bin/ephoto_thumb_browser.c  | 20 ++--
 3 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index a7ff653..163eefe 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -469,7 +469,7 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
char file[PATH_MAX], dir[PATH_MAX];
 
snprintf(file, PATH_MAX, "%s", ev->filename);
-   snprintf(dir, PATH_MAX, "%s", dirname(file));
+   snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
@@ -521,7 +521,7 @@ _monitor_deleted(void *data, int type EINA_UNUSED, void 
*event)
char file[PATH_MAX], dir[PATH_MAX];
 
snprintf(file, PATH_MAX, "%s", ev->filename);
-   snprintf(dir, PATH_MAX, "%s", dirname(file));
+   snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
@@ -552,7 +552,7 @@ _monitor_modified(void *data, int type EINA_UNUSED, void 
*event)
char file[PATH_MAX], dir[PATH_MAX];
 
snprintf(file, PATH_MAX, "%s", ev->filename);
-   snprintf(dir, PATH_MAX, "%s", dirname(file));
+   snprintf(dir, PATH_MAX, "%s", ecore_file_dir_get(file));
 
if (strcmp(ephoto->config->directory, dir))
  return ECORE_CALLBACK_PASS_ON;
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 9c913e0..23fc22b 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -1200,15 +1200,17 @@ _save_image_as_overwrite(void *data, Evas_Object *obj 
EINA_UNUSED,
  {
char *dir = ecore_file_dir_get(file);
 
-   ephoto_thumb_browser_fsel_clear(sb->ephoto);
-   ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE, EINA_FALSE);
-ephoto_thumb_browser_top_dir_set(sb->ephoto,
-sb->ephoto->config->directory);
-   free(dir);
-   ephoto_single_browser_path_pending_set(sb->ephoto->single_browser,
-   file);
+if (strcmp(dir, sb->ephoto->config->directory))
+  {
+ephoto_thumb_browser_fsel_clear(sb->ephoto);
+ephoto_directory_set(sb->ephoto, dir, NULL, EINA_FALSE, 
EINA_FALSE);
+ ephoto_thumb_browser_top_dir_set(sb->ephoto,
+ sb->ephoto->config->directory);
+free(dir);
+ephoto_single_browser_path_pending_set(sb->ephoto->single_browser,
+file);
+  }
  }
-   ephoto_single_browser_entry_set(sb->main, sb->entry);
evas_object_del(popup);
if (sb->event)
  {
@@ -1309,14 +1311,17 @@ _save_image_as_done(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
   {
  char *dir = ecore_file_dir_get(buf);
 
- ephoto_thumb_browser_fsel_clear(sb->ephoto);
- ephoto_directory_set(sb->ephoto, dir, NULL,
-  EINA_FALSE, EINA_FALSE);
-  ephoto_thumb_browser_top_dir_set(sb->ephoto,
-  sb->ephoto->config->directory);
- free(dir);
- ephoto_single_browser_path_pending_set(sb->ephoto->
- single_browser, buf);
+  if (!strcmp(dir, sb->ephoto->config->directory))
+{
+  ephoto_thumb_browser_fsel_clear(sb->ephoto);
+  ephoto_directory_set(sb->ephoto, dir, NULL,
+   EINA_FALSE, EINA_FALSE);
+   ephoto_thumb_browser_top_dir_set(sb->ephoto,
+   sb->ephoto->config->directory);
+  free(dir);
+  ephoto_single_browser_path_pending_set(sb->ephoto->
+  single_browser, buf);
+}
   }
  }
  }
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index f0f5cfe..230386c 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -448,7 +448,7 @@ _monitor_created(void *data, int type EINA_UNUSED, void 
*event)
  return ECORE_CALLBACK_PASS_ON;
 
snprintf(file, PATH_MAX, "%s", 

[EGIT] [apps/ephoto] master 01/01: Ephoto: Put some file monitoring in place to keep the single image view updated. More to come for thumbnail view/file selector.

2016-01-14 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=f0369df28b788387eb81ecf6467d1062c93280b2

commit f0369df28b788387eb81ecf6467d1062c93280b2
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Jan 14 16:51:02 2016 -0600

Ephoto: Put some file monitoring in place to keep the single image view 
updated.  More to come for thumbnail view/file selector.
---
 src/bin/ephoto_single_browser.c | 27 +--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 19c4248..1907e74 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -38,12 +38,14 @@ struct _Ephoto_Single_Browser
 
 struct _Ephoto_Viewer
 {
+   Ecore_File_Monitor *monitor;
Evas_Object *scroller;
Evas_Object *table;
Evas_Object *image;
double zoom;
Eina_Bool fit:1;
Eina_Bool zoom_first:1;
+   Eina_Bool modified:1;
 };
 
 static void _zoom_set(Ephoto_Single_Browser *sb, double zoom);
@@ -58,10 +60,29 @@ _viewer_del(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 void *event_info EINA_UNUSED)
 {
Ephoto_Viewer *v = data;
-
+   if (v->monitor)
+ ecore_file_monitor_del(v->monitor);
free(v);
 }
 
+static void
+_viewer_monitor(void *data, Ecore_File_Monitor *em EINA_UNUSED, 
+Ecore_File_Event event, const char *path)
+{
+   Ephoto_Single_Browser *sb = data;
+   Ephoto_Viewer *v = evas_object_data_get(sb->viewer, "viewer");
+
+   if (!ecore_file_exists(path))
+ ephoto_entry_free(sb->ephoto, sb->entry);
+   else if (event == ECORE_FILE_EVENT_MODIFIED)
+ v->modified = EINA_TRUE;
+   else if (event == ECORE_FILE_EVENT_CLOSED && v->modified == EINA_TRUE)
+ {
+ephoto_single_browser_entry_set(sb->main, sb->entry);
+v->modified = EINA_FALSE;
+ }
+}   
+
 static Evas_Object *
 _image_create_icon(void *data, Evas_Object *parent, Evas_Coord *xoff,
 Evas_Coord *yoff)
@@ -210,6 +231,9 @@ _viewer_add(Evas_Object *parent, const char *path, 
Ephoto_Single_Browser *sb)
 elm_image_animated_play_set(v->image, EINA_TRUE);
  }
 
+
+   v->monitor = ecore_file_monitor_add(path, _viewer_monitor, sb);
+
return v->scroller;
 
   error:
@@ -1803,7 +1827,6 @@ _delete_apply(void *data, Evas_Object *obj EINA_UNUSED,
 elm_object_focus_set(sb->event, EINA_TRUE);
 evas_object_freeze_events_set(sb->event, EINA_FALSE);
  }
-   ephoto_entry_free(sb->ephoto, sb->entry);
 }
 
 static void

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Make animated images such as gifs play.

2016-01-14 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=702148c09cd432aac43b95f0409482f552e4fdaf

commit 702148c09cd432aac43b95f0409482f552e4fdaf
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Jan 14 15:32:10 2016 -0600

Ephoto:  Make animated images such as gifs play.
---
 src/bin/ephoto_cropper.c| 2 +-
 src/bin/ephoto_single_browser.c | 5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/bin/ephoto_cropper.c b/src/bin/ephoto_cropper.c
index ee00b64..b5c8998 100644
--- a/src/bin/ephoto_cropper.c
+++ b/src/bin/ephoto_cropper.c
@@ -17,7 +17,7 @@ struct _Ephoto_Cropper
int starty;
int offsetx;
int offsety;
-   int resizing;
+   Eina_Bool resizing;
 };
 
 static void
diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 0d7a859..84e0600 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -204,6 +204,11 @@ _viewer_add(Evas_Object *parent, const char *path, 
Ephoto_Single_Browser *sb)
_image_mouse_up_cb, sb);
elm_table_pack(v->table, v->image, 0, 0, 1, 1);
evas_object_show(v->image);
+   if (elm_image_animated_available_get(v->image))
+ {
+elm_image_animated_set(v->image, EINA_TRUE);
+elm_image_animated_play_set(v->image, EINA_TRUE);
+ }
 
return v->scroller;
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add additional key bindings.

2016-01-14 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=f89b553bd01abf529a855648a8c7a216b5da8406

commit f89b553bd01abf529a855648a8c7a216b5da8406
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Thu Jan 14 16:05:41 2016 -0600

Ephoto: Add additional key bindings.
---
 src/bin/ephoto_single_browser.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 84e0600..19c4248 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -2259,6 +2259,17 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
   {
  _delete_image(sb, NULL, NULL);
   }
+else if (!strcmp(k, "s"))
+  {
+ if (!shift)
+   _save_image_as(sb, NULL, NULL);
+ else
+   _save_image(sb, NULL, NULL);
+  }
+else if (!strcmp(k, "u"))
+  {
+ _reset_image(sb, NULL, NULL);
+  }
return;
  }
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Make the settings panel nicer.

2016-01-13 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=550c8064a6d0d6a9e04c26663f7f04d2c19fd2b1

commit 550c8064a6d0d6a9e04c26663f7f04d2c19fd2b1
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Jan 13 15:48:11 2016 -0600

Ephoto: Make the settings panel nicer.
---
 src/bin/ephoto.h|  12 +-
 src/bin/ephoto_config.c | 273 ++--
 src/bin/ephoto_single_browser.c | 104 +--
 src/bin/ephoto_slideshow.c  | 103 +--
 src/bin/ephoto_thumb_browser.c  | 113 ++---
 5 files changed, 167 insertions(+), 438 deletions(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index 4ece500..31e6119 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -56,9 +56,7 @@ void ephoto_directory_set(Ephoto *ephoto, const char *path,
 Eina_Bool ephoto_config_init(Ephoto *em);
 void ephoto_config_save(Ephoto *em);
 void ephoto_config_free(Ephoto *em);
-void ephoto_config_general(Ephoto *em);
-void ephoto_config_slideshow(Ephoto *em);
-void ephoto_config_about(Ephoto *em);
+void ephoto_config_main(Ephoto *em);
 
 Evas_Object *ephoto_single_browser_add(Ephoto *ephoto, Evas_Object *parent);
 void ephoto_single_browser_entries_set(Evas_Object *obj, Eina_List *entries);
@@ -136,11 +134,11 @@ struct _Ephoto_Config
const char *slideshow_transition;
int window_width;
int window_height;
-   int fsel_hide;
-   int tool_hide;
+   Eina_Bool fsel_hide;
+   Eina_Bool tool_hide;
const char *open;
-   int prompts;
-   int drop;
+   Eina_Bool prompts;
+   Eina_Bool drop;
Evas_Object *slide_time;
Evas_Object *slide_trans;
Evas_Object *hide_toolbar;
diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index fb47bd7..857abe1 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -87,7 +87,7 @@ _close(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 }
 
 static void
-_save_general(void *data, Evas_Object *obj EINA_UNUSED,
+_save(void *data, Evas_Object *obj EINA_UNUSED,
 void *event_info EINA_UNUSED)
 {
Evas_Object *popup = data;
@@ -110,7 +110,12 @@ _save_general(void *data, Evas_Object *obj EINA_UNUSED,
elm_check_state_get(ephoto->config->hide_toolbar);
ephoto->config->prompts = elm_check_state_get(ephoto->config->show_prompts);
ephoto->config->drop = elm_check_state_get(ephoto->config->move_drop);
-   evas_object_del(popup);
+   if (elm_spinner_value_get(ephoto->config->slide_time) > 0)
+  ephoto->config->slideshow_timeout =
+  elm_spinner_value_get(ephoto->config->slide_time);
+   if (elm_object_text_get(ephoto->config->slide_trans))
+  eina_stringshare_replace(>config->slideshow_transition,
+  elm_object_text_get(ephoto->config->slide_trans));
 }
 
 static void
@@ -126,21 +131,15 @@ _open_hv_select(void *data, Evas_Object *obj, void 
*event_info)
   elm_object_disabled_set(ephoto->config->open_dir_custom, EINA_TRUE);
 }
 
-void
-ephoto_config_general(Ephoto *ephoto)
+static Evas_Object *
+_ephoto_config_general(Ephoto *ephoto, Evas_Object *parent)
 {
-   Evas_Object *popup, *box, *table, *check, *hoversel, *entry, *ic, *button;
-
-   popup = elm_popup_add(ephoto->win);
-   elm_popup_scrollable_set(popup, EINA_TRUE);
-   elm_object_part_text_set(popup, "title,text", _("General Settings"));
-   elm_popup_orient_set(popup, ELM_POPUP_ORIENT_CENTER);
+   Evas_Object *box, *table, *check, *hoversel, *entry;
 
-   box = elm_box_add(popup);
+   box = elm_box_add(parent);
elm_box_horizontal_set(box, EINA_FALSE);
-   evas_object_size_hint_weight_set(box, 0.0, 0.0);
+   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);
-   evas_object_show(box);
 
table = elm_table_add(box);
evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -151,7 +150,7 @@ ephoto_config_general(Ephoto *ephoto)
elm_object_text_set(check, _("Hide Toolbar On Fullscreen"));
evas_object_size_hint_align_set(check, 0.0, EVAS_HINT_FILL);
elm_check_state_set(check, ephoto->config->tool_hide);
-   elm_table_pack(table, check, 0, 1, 1, 1);
+   elm_table_pack(table, check, 0, 0, 1, 1);
evas_object_show(check);
ephoto->config->hide_toolbar = check;
 
@@ -159,7 +158,7 @@ ephoto_config_general(Ephoto *ephoto)
elm_object_text_set(check, _("Prompt Before Changing The Filesystem"));
evas_object_size_hint_align_set(check, 0.0, EVAS_HINT_FILL);
elm_check_state_set(check, ephoto->config->prompts);
-   elm_table_pack(table, check, 0, 2, 1, 1);
+   elm_table_pack(table, check, 0, 1, 1, 1);
evas_object_show(check);
ephoto->config->show_prompts = check;
 
@@ -167,7 +166,7 @@ ephoto_config_

[EGIT] [apps/ephoto] master 01/01: Ephoto: Don't use brackets for keybindings. Ctrl+l and Ctrl+r to rotate. Shift+Ctrl+l and Shift+Ctrl+r to flip.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=e870db104a12cd9e71927db69f182ad237b832ac

commit e870db104a12cd9e71927db69f182ad237b832ac
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 10:23:15 2015 -0600

Ephoto: Don't use brackets for keybindings.  Ctrl+l and Ctrl+r to rotate.  
Shift+Ctrl+l and Shift+Ctrl+r to flip.
---
 src/bin/ephoto_single_browser.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 01efd81..f09ae2f 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -2336,6 +2336,20 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 else
_zoom_set(sb, 1.0);
  }
+else if (!strcmp(k, "l") && !sb->editing)
+  {
+ if (!shift)
+   _rotate_counterclock(sb);
+ else
+   _flip_horiz(sb);
+  }
+else if (!strcmp(k, "r") && !sb->editing)
+  {
+ if (!shift)
+   _rotate_clock(sb);
+ else
+   _flip_vert(sb);
+  }
return;
  }
 
@@ -2356,20 +2370,6 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
   _first_entry(sb);
else if (!strcmp(k, "End") && !sb->editing)
   _last_entry(sb);
-   else if (!strcmp(k, "bracketleft") && !sb->editing)
- {
-   if (!shift)
-  _rotate_counterclock(sb);
-   else
-  _flip_horiz(sb);
- }
-   else if (!strcmp(k, "bracketright") && !sb->editing)
- {
-   if (!shift)
-  _rotate_clock(sb);
-   else
-  _flip_vert(sb);
- }
else if (!strcmp(k, "F2"))
  {
 _settings(sb, NULL, NULL);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Escape should unselect all selected images.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=e25bf7d9dfee0d4c0589faf596b1c773776e3d17

commit e25bf7d9dfee0d4c0589faf596b1c773776e3d17
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 11:28:48 2015 -0600

Ephoto: Escape should unselect all selected images.
---
 src/bin/ephoto_thumb_browser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 562faa5..dc36ade 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -3197,6 +3197,8 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  {
 if (tb->searching)
   _ephoto_search_cancel(tb->search, NULL, NULL);
+else
+  _grid_menu_clear_cb(tb, NULL, NULL);
  }
 }
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Load raw image formats.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=351c0b28099fcf34f043a194bc6a2eefb7a0055a

commit 351c0b28099fcf34f043a194bc6a2eefb7a0055a
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 11:16:19 2015 -0600

Ephoto: Load raw image formats.
---
 src/bin/ephoto.h | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h
index ce75554..1301c64 100644
--- a/src/bin/ephoto.h
+++ b/src/bin/ephoto.h
@@ -222,7 +222,11 @@ _ephoto_eina_file_direct_info_image_useful(const 
Eina_File_Direct_Info *info)
 
const char *filters[] = {
   "png", "jpeg", "jpg", "eet", "xpm", "tiff", "gif", "svg", "webp", 
"pmaps",
-  "bmp", "tga", "wbmp", "ico", "psd", "jp2k", "generic"
+  "bmp", "tga", "wbmp", "ico", "psd", "jp2k", "generic", "3fr", "ari", 
"arw",
+  "bay", "crw", "cr2", "cap", "dcs", "dcr", "dng", "drf", "eip", "erf",
+  "fff", "iiq", "k25", "kdc", "mdc", "mef", "mos", "mrw", "nef", "nrw", 
"obm",
+  "orf", "pef", "ptx", "pxn", "r3d", "raf", "raw", "rwl", "rw2", "rwz",
+  "sr2", "srf", "srw", "tif", "x3f"
};
 
bname = info->path + info->name_start;

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Config version bump.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=911804ba72b6c975f6d1e397a2a2da1b7f8e85f7

commit 911804ba72b6c975f6d1e397a2a2da1b7f8e85f7
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 10:40:26 2015 -0600

Ephoto: Config version bump.
---
 src/bin/ephoto_config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c
index c41b75d..fb47bd7 100644
--- a/src/bin/ephoto_config.c
+++ b/src/bin/ephoto_config.c
@@ -1,6 +1,6 @@
 #include "ephoto.h"
 
-#define CONFIG_VERSION 13
+#define CONFIG_VERSION 14
 
 static int _ephoto_config_load(Ephoto *ephoto);
 static Eina_Bool _ephoto_on_config_save(void *data);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add ctrl+delete key binding to the single image view.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=aa18a9c320b74ed1e577d80abaefc42eb8096322

commit aa18a9c320b74ed1e577d80abaefc42eb8096322
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 10:46:55 2015 -0600

Ephoto: Add ctrl+delete key binding to the single image view.
---
 src/bin/ephoto_single_browser.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index f09ae2f..8cd573d 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -2350,6 +2350,10 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
  else
_flip_vert(sb);
   }
+else if (!strcmp(k, "Delete"))
+  {
+ _delete_image(sb, NULL, NULL);
+  }
return;
  }
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Oops, should be F1 to open settings.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=42c3a3a4825be0b54387c0a1ad52b3c5d2416686

commit 42c3a3a4825be0b54387c0a1ad52b3c5d2416686
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 11:02:12 2015 -0600

Ephoto: Oops, should be F1 to open settings.
---
 src/bin/ephoto_single_browser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index 8cd573d..c5f8b72 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -2374,7 +2374,7 @@ _key_down(void *data, Evas *e EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
   _first_entry(sb);
else if (!strcmp(k, "End") && !sb->editing)
   _last_entry(sb);
-   else if (!strcmp(k, "F2"))
+   else if (!strcmp(k, "F1"))
  {
 _settings(sb, NULL, NULL);
  }

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Updated Slovak translation from Stefan Uram (the_waiter)

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=6edcf0d5d258d612ff8d0ecde753b30dbc388614

commit 6edcf0d5d258d612ff8d0ecde753b30dbc388614
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 12:32:12 2015 -0600

Ephoto: Updated Slovak translation from Stefan Uram (the_waiter)
---
 po/sk.po | 694 ---
 1 file changed, 582 insertions(+), 112 deletions(-)

diff --git a/po/sk.po b/po/sk.po
index 6b3cf16..0164a96 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -7,275 +7,745 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ephoto 0.1.1\n"
 "Report-Msgid-Bugs-To: enlightenment-de...@lists.sourceforge.net\n"
-"POT-Creation-Date: 2015-08-11 21:42+0200\n"
-"PO-Revision-Date: 2015-08-11 16:21+0100\n"
-"Last-Translator: Štefan Uram <u...@szm.sk>\n"
+"POT-Creation-Date: 2015-12-29 18:20+0100\n"
+"PO-Revision-Date: 2015-12-29 19:25+0100\n"
+"Last-Translator: Stefan Uram <the_wai...@bodhi.sk>\n"
 "Language-Team: none\n"
 "Language: sk\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Poedit 1.8.4\n"
+"X-Generator: Poedit 1.5.4\n"
 
-#: src/bin/ephoto_config.c:110
+#: src/bin/ephoto_bcg.c:338 src/bin/ephoto_single_browser.c:2155
+#: src/bin/ephoto_single_browser.c:2606
+msgid "Brightness/Contrast/Gamma"
+msgstr "Jas/Konstrast/Gamma"
+
+#: src/bin/ephoto_bcg.c:355
+msgid "Brightness"
+msgstr "Jas"
+
+#: src/bin/ephoto_bcg.c:369
+msgid "Contrast"
+msgstr "Kontrast"
+
+#: src/bin/ephoto_bcg.c:383
+msgid "Gamma"
+msgstr "Gamma"
+
+#: src/bin/ephoto_bcg.c:402 src/bin/ephoto_color.c:385
+#: src/bin/ephoto_cropper.c:720 src/bin/ephoto_hsv.c:409
+#: src/bin/ephoto_single_browser.c:2123 src/bin/ephoto_single_browser.c:2574
+msgid "Reset"
+msgstr "Resetovať"
+
+#: src/bin/ephoto_bcg.c:416 src/bin/ephoto_color.c:399
+#: src/bin/ephoto_cropper.c:734 src/bin/ephoto_hsv.c:423
+msgid "Apply"
+msgstr "Použiť"
+
+#: src/bin/ephoto_bcg.c:430 src/bin/ephoto_config.c:226
+#: src/bin/ephoto_config.c:357 src/bin/ephoto_color.c:413
+#: src/bin/ephoto_cropper.c:748 src/bin/ephoto_hsv.c:437
+#: src/bin/ephoto_thumb_browser.c:746 src/bin/ephoto_thumb_browser.c:1338
+#: src/bin/ephoto_thumb_browser.c:1491
+msgid "Cancel"
+msgstr "Zrušiť"
+
+#: src/bin/ephoto_config.c:98 src/bin/ephoto_config.c:176
+msgid "Root Directory"
+msgstr "Domovský priečinok"
+
+#: src/bin/ephoto_config.c:100 src/bin/ephoto_config.c:178
+msgid "Home Directory"
+msgstr "Domovský priečinok"
+
+#: src/bin/ephoto_config.c:102 src/bin/ephoto_config.c:180
+msgid "Last Open Directory"
+msgstr "Posledný oitvorený priečinok"
+
+#: src/bin/ephoto_config.c:123 src/bin/ephoto_config.c:182
+#: src/bin/ephoto_config.c:196
+msgid "Custom Directory"
+msgstr "Voliteľný priečinok"
+
+#: src/bin/ephoto_config.c:136 src/bin/ephoto_thumb_browser.c:854
+#: src/bin/ephoto_single_browser.c:2277 src/bin/ephoto_slideshow.c:243
+msgid "General Settings"
+msgstr "Všeobecné nastavenie"
+
+#: src/bin/ephoto_config.c:151
+msgid "Hide Toolbar On Fullscreen"
+msgstr "Skryť lištu s nástrojmi pri celej obrazovke"
+
+#: src/bin/ephoto_config.c:159
+msgid "Prompt Before Changing The Filesystem"
+msgstr "Upozornenie pred vykonaním systémových operácií"
+
+#: src/bin/ephoto_config.c:167
+msgid "Move Files When Dropped"
+msgstr "Presúnúť súbory po uvoľnení"
+
+#: src/bin/ephoto_config.c:184
+msgid "Directory To Open Ephoto In"
+msgstr "Východzí priečinok"
+
+#: src/bin/ephoto_config.c:214 src/bin/ephoto_config.c:345
+#: src/bin/ephoto_thumb_browser.c:1326 src/bin/ephoto_single_browser.c:2124
+#: src/bin/ephoto_single_browser.c:2575
+msgid "Save"
+msgstr "Uložiť"
+
+#: src/bin/ephoto_config.c:266
 msgid "second"
 msgid_plural "seconds"
 msgstr[0] "sekunda"
 msgstr[1] "sekundy"
 msgstr[2] "sekúnd"
 
-#: src/bin/ephoto_config.c:139
-msgid "Slideshow Options"
-msgstr "Možnosti prezentácie"
+#: src/bin/ephoto_config.c:280 src/bin/ephoto_thumb_browser.c:862
+#: src/bin/ephoto_single_browser.c:2285 src/bin/ephoto_slideshow.c:251
+msgid "Slideshow Settings"
+msgstr "Možnosti prezentácie "
 
-#: src/bin/ephoto_config.c:146
+#: src/bin/ephoto_config.c:296
 msgid "Show Each Slide For"
 msgstr "Zobrazit každý o

[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix bug where the navigation didn't work if ephoto opened directly with an image.

2015-12-29 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=1941bdb9c35ce1ba4de04364d2bb4afbf619a23f

commit 1941bdb9c35ce1ba4de04364d2bb4afbf619a23f
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 29 09:08:39 2015 -0600

Ephoto: Fix bug where the navigation didn't work if ephoto opened directly 
with an image.
---
 src/bin/ephoto_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c
index 5785cdf..018d7b2 100644
--- a/src/bin/ephoto_main.c
+++ b/src/bin/ephoto_main.c
@@ -420,6 +420,9 @@ _ephoto_populate_end(void *data, Eio_File *handler 
EINA_UNUSED)
 
ed->ephoto->ls = NULL;
 
+   if (!ed->ephoto->selentries)
+ ephoto_single_browser_entries_set(ed->ephoto->single_browser,
+ ed->ephoto->entries);
ecore_event_add(EPHOTO_EVENT_POPULATE_END, NULL, NULL, NULL);
free(ed);
 }

-- 




[EGIT] [apps/ephoto] master 02/02: Ephoto: Delete the entry before the hbox.

2015-12-16 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=f74f2b421ff6aaef40a9805042cb1f14730cad62

commit f74f2b421ff6aaef40a9805042cb1f14730cad62
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Dec 16 15:52:00 2015 -0600

Ephoto: Delete the entry before the hbox.
---
 src/bin/ephoto_thumb_browser.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 0abbe7a..562faa5 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -613,6 +613,8 @@ _ephoto_search_cancel(void *data, Evas_Object *obj 
EINA_UNUSED,
 
elm_object_focus_set(tb->main, EINA_TRUE);
tb->last_search = NULL;
+   evas_object_del(tb->search);
+   tb->search = NULL;
elm_box_unpack(tb->gridbox, hbox);
evas_object_del(hbox);
tb->searching = 0;

-- 




[EGIT] [apps/ephoto] master 01/02: Ephoto: Don't delete gengrid item on search.

2015-12-16 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=4a6a69bb0b91d82bfae076a4efc455a80c13761d

commit 4a6a69bb0b91d82bfae076a4efc455a80c13761d
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Dec 16 15:49:19 2015 -0600

Ephoto: Don't delete gengrid item on search.
---
 src/bin/ephoto_thumb_browser.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 2378f6b..0abbe7a 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -124,7 +124,6 @@ _on_list_expanded(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info)
tb->thumbs_only = 0;
ephoto_directory_set(tb->ephoto, path, it, tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
-   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -148,7 +147,6 @@ _on_list_contracted(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto,
tb->ephoto->config->directory);
-   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -164,7 +162,6 @@ _dir_job(void *data)
ephoto_directory_set(tb->ephoto, path, NULL,
tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
-   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -526,7 +523,6 @@ _ephoto_dir_go_up(void *data, Evas_Object *obj EINA_UNUSED,
ephoto_directory_set(tb->ephoto, dirname(path), NULL,
 tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
-elm_object_focus_set(tb->main, EINA_TRUE);
  }
 }
 
@@ -547,7 +543,6 @@ _ephoto_dir_go_trash(void *data, Evas_Object *obj 
EINA_UNUSED,
ephoto_directory_set(tb->ephoto, path, NULL,
tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, _("Trash"));
-   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -567,7 +562,6 @@ _ephoto_direntry_go(void *data, Evas_Object *obj 
EINA_UNUSED,
ephoto_directory_set(tb->ephoto, dir, NULL,
 tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
-elm_object_focus_set(tb->main, EINA_TRUE);
  }
 }
 
@@ -617,7 +611,7 @@ _ephoto_search_cancel(void *data, Evas_Object *obj 
EINA_UNUSED,
Evas_Object *hbox = evas_object_data_get(search, "parent");
Ephoto_Thumb_Browser *tb = evas_object_data_get(search, "thumb_browser");
 
-   evas_object_del(tb->last_search);
+   elm_object_focus_set(tb->main, EINA_TRUE);
tb->last_search = NULL;
elm_box_unpack(tb->gridbox, hbox);
evas_object_del(hbox);

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Clear the grid selection when clicking in the empty space.

2015-12-15 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=d5cb51942249c22dd6e9edabc3820e47f3d96912

commit d5cb51942249c22dd6e9edabc3820e47f3d96912
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 15 12:44:54 2015 -0600

Ephoto: Clear the grid selection when clicking in the empty space.
---
 src/bin/ephoto_thumb_browser.c | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 0e7c671..054b4ba 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -2854,6 +2854,20 @@ _grid_mouse_up_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_UNUSED,
  tb->last_sel = item;
   }
  }
+   if (info->button == 1 && !item)
+ {
+Eina_List *sel = eina_list_clone(selected);
+Eina_List *node;
+Elm_Object_Item *it;
+if (eina_list_count(sel) > 0)
+  {
+ EINA_LIST_FOREACH(sel, node, it)
+   {
+  elm_gengrid_item_selected_set(it, EINA_FALSE);
+   }
+ eina_list_free(sel);
+  }
+ }
if (info->button != 3)
   return;
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: No reason to block window with popup on directory load.

2015-12-15 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=598e33f646a93387dcd5d64fe4a2ee12aa616f0c

commit 598e33f646a93387dcd5d64fe4a2ee12aa616f0c
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 15 12:39:46 2015 -0600

Ephoto: No reason to block window with popup on directory load.
---
 src/bin/ephoto_thumb_browser.c | 25 +
 1 file changed, 1 insertion(+), 24 deletions(-)

diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index be8b11c..0e7c671 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -31,7 +31,6 @@ struct _Ephoto_Thumb_Browser
Evas_Object *max;
Evas_Object *leftbox;
Evas_Object *direntry;
-   Evas_Object *dir_loading;
Evas_Object *ficon;
Elm_Object_Item *dir_current;
Elm_Object_Item *last_sel;
@@ -417,13 +416,7 @@ _todo_items_process(void *data)
  {
 if (tb->animator.count == 0)
   return EINA_TRUE;
-   if (tb->dir_loading)
- {
-evas_object_del(tb->dir_loading);
- evas_object_freeze_events_set(tb->main, EINA_FALSE);
- elm_object_focus_set(tb->main, EINA_TRUE);
- }
-   tb->animator.todo_items = NULL;
+tb->animator.todo_items = NULL;
return EINA_FALSE;
  }
if ((tb->ls) && (eina_list_count(tb->todo_items) < TODO_ITEM_MIN_BATCH))
@@ -3105,10 +3098,6 @@ _ephoto_thumb_populate_start(void *data, int type 
EINA_UNUSED,
 
evas_object_smart_callback_call(tb->main, "changed,directory", NULL);
 
-   tb->dir_loading =
-   _processing(tb, _("Loading Directory"),
-   _("Please wait while the directory is loaded."));
-   evas_object_show(tb->dir_loading);
tb->animator.processed = 0;
tb->animator.count = 0;
 
@@ -3189,12 +3178,6 @@ _ephoto_thumb_populate_end(void *data, int type 
EINA_UNUSED,
tb->totimages), _("Size"), isize);
elm_object_text_set(tb->infolabel, image_info);
  }
-   if (tb->dir_loading && (tb->animator.processed == tb->animator.count))
- {
-   evas_object_del(tb->dir_loading);
-evas_object_freeze_events_set(tb->main, EINA_FALSE);
-elm_object_focus_set(tb->main, EINA_TRUE);
- }
tb->dirs_only = 0;
tb->thumbs_only = 0;
 
@@ -3207,12 +3190,6 @@ _ephoto_thumb_populate_error(void *data, int type 
EINA_UNUSED,
 {
Ephoto_Thumb_Browser *tb = data;
 
-   if (tb->dir_loading)
- {
-evas_object_del(tb->dir_loading);
-evas_object_freeze_events_set(tb->main, EINA_FALSE);
-elm_object_focus_set(tb->main, EINA_TRUE);
- }
tb->dirs_only = 0;
tb->thumbs_only = 0;
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Add ability to search images

2015-12-15 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=230ffeaa8caf326d8fb10ca61b5f710cc64a9b3a

commit 230ffeaa8caf326d8fb10ca61b5f710cc64a9b3a
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 15 16:42:38 2015 -0600

Ephoto: Add ability to search images
---
 TODO   |   1 -
 src/bin/ephoto_thumb_browser.c | 206 +++--
 2 files changed, 179 insertions(+), 28 deletions(-)

diff --git a/TODO b/TODO
index fead8c3..e3a12fd 100644
--- a/TODO
+++ b/TODO
@@ -6,7 +6,6 @@ Add more effects, filters as necessary
 Clean up Cropper
 -Thumb Browser:
 Add ability to view more info on image(Exif perhaps?)
-Add ability to search
 -Slideshow:
 Possibly look at implementing moving slideshows.
 -Other Possibilities:
diff --git a/src/bin/ephoto_thumb_browser.c b/src/bin/ephoto_thumb_browser.c
index 054b4ba..2378f6b 100644
--- a/src/bin/ephoto_thumb_browser.c
+++ b/src/bin/ephoto_thumb_browser.c
@@ -22,6 +22,7 @@ struct _Ephoto_Thumb_Browser
Ephoto *ephoto;
Evas_Object *main;
Evas_Object *table;
+   Evas_Object *gridbox;
Evas_Object *grid;
Evas_Object *nolabel;
Evas_Object *infolabel;
@@ -32,8 +33,10 @@ struct _Ephoto_Thumb_Browser
Evas_Object *leftbox;
Evas_Object *direntry;
Evas_Object *ficon;
+   Evas_Object *search;
Elm_Object_Item *dir_current;
Elm_Object_Item *last_sel;
+   Elm_Object_Item *last_search;
Ephoto_Sort sort;
Eio_File *ls;
Eina_List *cut_items;
@@ -49,6 +52,7 @@ struct _Ephoto_Thumb_Browser
int totimages;
int file_errors;
int dragging;
+   int searching;
double totsize;
struct
{
@@ -120,6 +124,7 @@ _on_list_expanded(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info)
tb->thumbs_only = 0;
ephoto_directory_set(tb->ephoto, path, it, tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
+   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -143,6 +148,7 @@ _on_list_contracted(void *data, Evas_Object *obj 
EINA_UNUSED, void *event_info)
tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto,
tb->ephoto->config->directory);
+   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -158,6 +164,7 @@ _dir_job(void *data)
ephoto_directory_set(tb->ephoto, path, NULL,
tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
+   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -519,6 +526,7 @@ _ephoto_dir_go_up(void *data, Evas_Object *obj EINA_UNUSED,
ephoto_directory_set(tb->ephoto, dirname(path), NULL,
 tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
+elm_object_focus_set(tb->main, EINA_TRUE);
  }
 }
 
@@ -539,6 +547,7 @@ _ephoto_dir_go_trash(void *data, Evas_Object *obj 
EINA_UNUSED,
ephoto_directory_set(tb->ephoto, path, NULL,
tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, _("Trash"));
+   elm_object_focus_set(tb->main, EINA_TRUE);
 }
 
 static void
@@ -558,10 +567,64 @@ _ephoto_direntry_go(void *data, Evas_Object *obj 
EINA_UNUSED,
ephoto_directory_set(tb->ephoto, dir, NULL,
 tb->dirs_only, tb->thumbs_only);
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
+elm_object_focus_set(tb->main, EINA_TRUE);
  }
 }
 
 static void
+_ephoto_search_go(void *data, Evas_Object *obj EINA_UNUSED,
+void *event_info EINA_UNUSED)
+{
+   Evas_Object *search = data;
+   Ephoto_Thumb_Browser *tb = evas_object_data_get(search, "thumb_browser");
+   Elm_Object_Item *next = NULL;
+   Elm_Object_Item *found = NULL;
+   Elm_Object_Item *o = NULL;
+   Eina_List *sel = eina_list_clone(elm_gengrid_selected_items_get(tb->grid));
+   Eina_List *l;
+   const char *search_text = elm_object_text_get(search);
+   char pattern[PATH_MAX];
+
+   if (tb->last_search)
+ next = elm_gengrid_item_next_get(tb->last_search);
+   if (!next)
+ next = elm_gengrid_first_item_get(tb->grid);
+
+   snprintf(pattern, PATH_MAX, "*%s*", search_text);
+
+   EINA_LIST_FOREACH(sel, l, o)
+ {
+elm_gengrid_item_selected_set(o, EINA_FALSE);
+ }
+   eina_list_free(sel);
+
+   found = elm_gengrid_search_by_text_item_get(tb->grid, next, NULL, pattern, 
+   ELM_GLOB_MATCH_NOCASE);
+   tb->last_search = found;
+   if (found)
+ {
+elm_gengrid_item_selected_set(found, EINA_TRUE);
+elm_gengrid_item_bring_in(found, ELM_GENGRID_ITEM_SCROLLTO_MIDDLE);
+elm_object_focus_set(search, EINA_TRUE);
+ }
+}
+
+static void
+_ephoto_search_cancel(void *data, Evas_Object *obj EINA_UNUSED,
+void *event_in

[EGIT] [apps/ephoto] master 01/01: Ephoto: Fix cropper math.

2015-12-09 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=7682ab5665ea54bfbb904e7092158f9d63ae7e7c

commit 7682ab5665ea54bfbb904e7092158f9d63ae7e7c
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Wed Dec 9 16:54:45 2015 -0600

Ephoto: Fix cropper math.
---
 src/bin/ephoto_cropper.c | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/bin/ephoto_cropper.c b/src/bin/ephoto_cropper.c
index cd9351c..ee00b64 100644
--- a/src/bin/ephoto_cropper.c
+++ b/src/bin/ephoto_cropper.c
@@ -29,7 +29,8 @@ _calculate_cropper_size(void *data, Evas_Object *obj 
EINA_UNUSED,
int w, h, cw, ch, iw, ih, nw, nh;
double scalew, scaleh;
 
-   evas_object_geometry_get(ec->layout, 0, 0, , );
+   edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
+   "ephoto.swallow.image", 0, 0, , );
edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
"ephoto.swallow.cropper", 0, 0, , );
evas_object_image_size_get(elm_image_object_get(ec->image), , );
@@ -63,8 +64,10 @@ _cropper_changed_width(void *data, Evas_Object *obj 
EINA_UNUSED,
 
mw = elm_slider_value_get(ec->cropw);
 
-   evas_object_geometry_get(ec->layout, , 0, , 0);
-   evas_object_geometry_get(ec->cropper, , 0, , 0);
+   edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
+   "ephoto.swallow.image", , 0, , 0);
+   edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
+   "ephoto.swallow.cropper", , 0, , 0);
evas_object_image_size_get(elm_image_object_get(ec->image), , 0);
 
scalew = (double) mw / (double) iw;
@@ -113,8 +116,10 @@ _cropper_changed_height(void *data, Evas_Object *obj 
EINA_UNUSED,
 
mh = elm_slider_value_get(ec->croph);
 
-   evas_object_geometry_get(ec->layout, 0, , 0, );
-   evas_object_geometry_get(ec->cropper, 0, , 0, );
+   edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
+   "ephoto.swallow.image", 0, , 0, );
+   edje_object_part_geometry_get(elm_layout_edje_get(ec->layout),
+   "ephoto.swallow.cropper", 0, , 0, );
evas_object_image_size_get(elm_image_object_get(ec->image), 0, );
 
scaleh = (double) mh / (double) ih;
@@ -179,7 +184,7 @@ _apply_crop(void *data, Evas_Object *obj EINA_UNUSED,
double scalex, scaley, scalew, scaleh;
unsigned int *idata, *idata_new;
 
-   evas_object_geometry_get(ec->layout, , , , );
+   edje_object_part_geometry_get(edje, "ephoto.swallow.image", , , , );
edje_object_part_geometry_get(edje, "ephoto.swallow.cropper", , , ,
);
evas_object_image_size_get(elm_image_object_get(ec->image), , );
@@ -187,8 +192,8 @@ _apply_crop(void *data, Evas_Object *obj EINA_UNUSED,
idata =
evas_object_image_data_get(elm_image_object_get(ec->image), EINA_FALSE);
 
-   scalex = (double) cx / (double) w;
-   scaley = (double) cy / (double) h;
+   scalex = (double) (cx-x) / (double) w;
+   scaley = (double) (cy-y) / (double) h;
scalew = (double) cw / (double) w;
scaleh = (double) ch / (double) h;
 

-- 




[EGIT] [apps/ephoto] master 01/01: Ephoto: Increase padding on single viewer.

2015-12-08 Thread Stephen okra Houston
okra pushed a commit to branch master.

http://git.enlightenment.org/apps/ephoto.git/commit/?id=f9ce92e568f4c3957816fa2e9131aef22277d8cc

commit f9ce92e568f4c3957816fa2e9131aef22277d8cc
Author: Stephen okra Houston <smhousto...@gmail.com>
Date:   Tue Dec 8 15:55:11 2015 -0600

Ephoto: Increase padding on single viewer.
---
 src/bin/ephoto_single_browser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/ephoto_single_browser.c b/src/bin/ephoto_single_browser.c
index c20bd03..01efd81 100644
--- a/src/bin/ephoto_single_browser.c
+++ b/src/bin/ephoto_single_browser.c
@@ -246,8 +246,8 @@ _viewer_zoom_fit_apply(Ephoto_Viewer *v)
EINA_SAFETY_ON_TRUE_RETURN(iw <= 0);
EINA_SAFETY_ON_TRUE_RETURN(ih <= 0);
 
-   zx = (double) (cw-10) / (double) iw;
-   zy = (double) (ch-10) / (double) ih;
+   zx = (double) (cw-15) / (double) iw;
+   zy = (double) (ch-15) / (double) ih;
 
zoom = (zx < zy) ? zx : zy;
_viewer_zoom_apply(v, zoom);

--