* Please review, update, cleanup before pushing to oe.dev!
---
 .../e-wm/Add-press-delay-support-to-illume.patch   |  152 ++++++++++++++++++++
 .../e17/e-wm/e_fm2-avoid-invalid-clicks-2.patch    |   84 +++++++++++
 .../e-wm/e_fm2-single-click-delay-support.patch    |  100 +++++++++++++
 recipes/e17/e-wm_svn.bb                            |   14 ++-
 4 files changed, 348 insertions(+), 2 deletions(-)
 create mode 100644 recipes/e17/e-wm/Add-press-delay-support-to-illume.patch
 create mode 100644 recipes/e17/e-wm/e_fm2-avoid-invalid-clicks-2.patch
 create mode 100644 recipes/e17/e-wm/e_fm2-single-click-delay-support.patch

diff --git a/recipes/e17/e-wm/Add-press-delay-support-to-illume.patch 
b/recipes/e17/e-wm/Add-press-delay-support-to-illume.patch
new file mode 100644
index 0000000..b01c35b
--- /dev/null
+++ b/recipes/e17/e-wm/Add-press-delay-support-to-illume.patch
@@ -0,0 +1,152 @@
+>From 7b4ed34a4d0ea7576d5b54ef580b30e16f802444 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Trevi=C3=B1o=20-=203v1n0?= <[email protected]>
+Date: Tue, 9 Jun 2009 01:33:33 +0200
+Subject: [PATCH 2/2] Add press delay support to illume
+ Use the e_fm2 single_click_delay option in illume e_fm2 to allow to
+ configure from the launcher settings a click delay to prevent
+ un-wanted clicks
+
+---
+ src/modules/illume/e_cfg.c     |   58 +++++++++++++++++++++++++++++++++++++++-
+ src/modules/illume/e_cfg.h     |    1 +
+ src/modules/illume/e_mod_win.c |    1 +
+ 3 files changed, 59 insertions(+), 1 deletions(-)
+
+diff --git a/src/modules/illume/e_cfg.c b/src/modules/illume/e_cfg.c
+index 7ae6213..3b52918 100644
+--- a/src/modules/illume/e_cfg.c
++++ b/src/modules/illume/e_cfg.c
+@@ -42,6 +42,7 @@ e_cfg_init(E_Module *m)
+    E_CONFIG_VAL(conf_edd, Illume_Cfg, launcher.mode, INT);
+    E_CONFIG_VAL(conf_edd, Illume_Cfg, launcher.icon_size, INT);
+    E_CONFIG_VAL(conf_edd, Illume_Cfg, launcher.single_click, INT);
++   E_CONFIG_VAL(conf_edd, Illume_Cfg, launcher.single_click_delay, INT);
+    
+    E_CONFIG_VAL(conf_edd, Illume_Cfg, power.auto_suspend, INT);
+    E_CONFIG_VAL(conf_edd, Illume_Cfg, power.auto_suspend_delay, INT);
+@@ -80,6 +81,7 @@ e_cfg_init(E_Module *m)
+       illume_cfg->launcher.mode = 0;
+       illume_cfg->launcher.icon_size = 120;
+       illume_cfg->launcher.single_click = 1;
++      illume_cfg->launcher.single_click_delay = 150;
+       
+       illume_cfg->power.auto_suspend = 1;
+       illume_cfg->power.auto_suspend_delay = 1;
+@@ -170,6 +172,14 @@ _e_cfg_launcher_change(void *data, Evas_Object *obj, void 
*event_info) {
+    _e_cfg_launcher_change_timer = ecore_timer_add(0.5, 
_e_cfg_launcher_change_timeout, data);
+ }
+ 
++Evas_Object *delay_label, *delay_slider;
++static void
++_e_cfg_launcher_click_change(void *data, Evas_Object *obj, void *event_info) {
++      e_widget_disabled_set(delay_label, !illume_cfg->launcher.single_click);
++      e_widget_disabled_set(delay_slider, !illume_cfg->launcher.single_click);
++      _e_cfg_launcher_change(data, obj, event_info);
++}
++
+ static void *
+ _e_cfg_launcher_create(E_Config_Dialog *cfd)
+ { // alloc cfd->cfdata
+@@ -179,6 +189,7 @@ _e_cfg_launcher_create(E_Config_Dialog *cfd)
+ static void 
+ _e_cfg_launcher_free(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
+ { // free cfd->cfdata
++   _e_mod_win_cfg_update(); // Reload on exit (to apply the slider value)
+ }
+ 
+ static Evas_Object *
+@@ -221,7 +232,16 @@ _e_cfg_launcher_ui(E_Config_Dialog *cfd, Evas *e, 
E_Config_Dialog_Data *cfdata)
+    frame = e_widget_framelist_add(e, "Launch Action", 0);
+    o = e_widget_check_add(e, "Single press", 
&(illume_cfg->launcher.single_click));
+    e_widget_framelist_object_append(frame, o);
+-   evas_object_smart_callback_add(o, "changed", _e_cfg_launcher_change, NULL);
++   evas_object_smart_callback_add(o, "changed", _e_cfg_launcher_click_change, 
NULL);
++   o = e_widget_label_add(e, "Press delay:");
++   delay_label = o;
++   e_widget_disabled_set(o, !illume_cfg->launcher.single_click);
++   e_widget_framelist_object_append(frame, o);
++   o = e_widget_slider_add(e, 1, 0, "%1.0f ms", 0, 350, 1, 0, NULL, 
&(illume_cfg->launcher.single_click_delay), 150);
++   delay_slider = o;
++   //evas_object_smart_callback_add(o, "changed", _e_cfg_launcher_change, 
NULL); //works ??
++   e_widget_disabled_set(o, !illume_cfg->launcher.single_click);
++   e_widget_framelist_object_append(frame, o);
+    e_widget_list_object_append(list, frame, 1, 0, 0.0); // fill, expand, align
+ 
+    return list;
+@@ -1374,6 +1394,40 @@ _dbcb_launcher_single_click_set(E_DBus_Object *obj, 
DBusMessage *msg)
+    return reply;
+ }
+ 
++// illume_cfg->launcher.single_click_delay
++static DBusMessage *
++_dbcb_launcher_single_click_delay_get(E_DBus_Object *obj, DBusMessage *msg)
++{
++   DBusMessage *reply;
++   DBusMessageIter iter;
++
++   reply = dbus_message_new_method_return(msg);
++   dbus_message_iter_init_append(reply, &iter);
++   dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, 
&(illume_cfg->launcher.single_click_delay));
++   return reply;
++}
++
++static DBusMessage *
++_dbcb_launcher_single_click_delay_set(E_DBus_Object *obj, DBusMessage *msg)
++{
++   DBusMessageIter iter;
++   DBusMessage *reply;
++   int val;
++   
++   dbus_message_iter_init(msg, &iter);
++   dbus_message_iter_get_basic(&iter, &(val));
++   if (val >= 0)
++     {
++      illume_cfg->launcher.single_click_delay = val;
++      _e_cfg_launcher_change(NULL, NULL, NULL);
++      return dbus_message_new_method_return(msg);
++     }
++   reply = dbus_message_new_error(msg,
++                                "org.enlightenment.DBus.InvalidArgument",
++                                "Parameter must be greater than 0");
++   return reply;
++}
++
+ // e_config->screensaver_timeout 0(off)-3600
+ static DBusMessage *
+ _dbcb_screensaver_timeout_get(E_DBus_Object *obj, DBusMessage *msg)
+@@ -1967,6 +2021,8 @@ static const DB_Method methods[] =
+    {"LauncherIconSizeSet", "i", "", _dbcb_launcher_icon_size_set},
+    {"LauncherSingleClickGet", "", "i", _dbcb_launcher_single_click_get},
+    {"LauncherSingleClickSet", "i", "", _dbcb_launcher_single_click_set},
++   {"LauncherSingleClickDelayGet", "", "i", 
_dbcb_launcher_single_click_delay_get},
++   {"LauncherSingleClickDelaySet", "i", "", 
_dbcb_launcher_single_click_delay_set},
+    {"ScreensaverTimeoutGet", "", "i", _dbcb_screensaver_timeout_get},
+    {"ScreensaverTimeoutSet", "i", "", _dbcb_screensaver_timeout_set},
+    {"AutosuspendTimeoutGet", "", "i", _dbcb_autosuspend_timeout_get},
+diff --git a/src/modules/illume/e_cfg.h b/src/modules/illume/e_cfg.h
+index 4350ca0..e3b2080 100644
+--- a/src/modules/illume/e_cfg.h
++++ b/src/modules/illume/e_cfg.h
+@@ -14,6 +14,7 @@ struct _Illume_Cfg
+       int mode;
+       int icon_size;
+       int single_click;
++        int single_click_delay;
+    } launcher;
+    
+    struct {
+diff --git a/src/modules/illume/e_mod_win.c b/src/modules/illume/e_mod_win.c
+index ec873ec..40fa13d 100644
+--- a/src/modules/illume/e_mod_win.c
++++ b/src/modules/illume/e_mod_win.c
+@@ -992,6 +992,7 @@ _apps_fm_config(Evas_Object *o)
+    fmc.view.open_dirs_in_place = 1;
+    fmc.view.selector = 0;
+    fmc.view.single_click = illume_cfg->launcher.single_click;
++   fmc.view.single_click_delay = illume_cfg->launcher.single_click_delay;
+    fmc.view.no_subdir_jump = 1;
+    fmc.icon.extension.show = 0;
+    fmc.icon.icon.w = illume_cfg->launcher.icon_size * e_scale / 2.0;
+-- 
+1.6.3.rc0
+
diff --git a/recipes/e17/e-wm/e_fm2-avoid-invalid-clicks-2.patch 
b/recipes/e17/e-wm/e_fm2-avoid-invalid-clicks-2.patch
new file mode 100644
index 0000000..5101034
--- /dev/null
+++ b/recipes/e17/e-wm/e_fm2-avoid-invalid-clicks-2.patch
@@ -0,0 +1,84 @@
+diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
+index 7b58e56..a47b26c 100644
+--- a/src/bin/e_fm.c
++++ b/src/bin/e_fm.c
+@@ -389,7 +389,7 @@ static int _e_fm2_cb_live_timer(void *data);
+ static int _e_fm2_theme_edje_object_set(E_Fm2_Smart_Data *sd, Evas_Object *o, 
const char *category, const char *group);
+ static int _e_fm2_theme_edje_icon_object_set(E_Fm2_Smart_Data *sd, 
Evas_Object *o, const char *category, const char *group);
+ 
+-static void _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier 
*modifiers, unsigned int timestamp);
++static void _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, void *evas_event);
+ 
+ static void _e_fm2_client_spawn(void);
+ static E_Fm2_Client *_e_fm2_client_get(void);
+@@ -6331,11 +6331,24 @@ _e_fm2_cb_dnd_drop(void *data, const char *type, void 
*event)
+ 
+ /* FIXME: prototype */
+ static void
+-_e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers, 
unsigned int timestamp)
++_e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, void *evas_event)
+ {
++   Evas_Event_Mouse_Down *ed = NULL;
++   Evas_Event_Mouse_Up *eu = NULL;
++   Evas_Modifier *modifiers;
+    int multi_sel = 0, range_sel = 0, sel_change = 0;
+    static unsigned int down_timestamp = 0;
+ 
++   if (!evas_event) return;
++   
++   if (!up) {
++     ed = evas_event;
++      modifiers = ed->modifiers;
++   } else {
++      eu = evas_event;
++      modifiers = eu->modifiers;
++   }
++
+    if (ic->sd->config->selection.windows_modifiers)
+      {
+       if (evas_key_modifier_is_set(modifiers, "Shift"))
+@@ -6446,11 +6459,16 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, 
Evas_Modifier *modifiers, unsigne
+        (ic->sd->config->view.single_click)
+        )
+      {
+-      if (!up && ic->sd->config->view.single_click_delay)
+-        down_timestamp = timestamp;
+-      if (up) {
+-        if ((timestamp - down_timestamp) > 
ic->sd->config->view.single_click_delay)
+-          evas_object_smart_callback_call(ic->sd->obj, "selected", NULL);
++      if (ed && ic->sd->config->view.single_click_delay)
++          down_timestamp = ed->timestamp;
++
++     if (eu && (eu->timestamp - down_timestamp) > 
ic->sd->config->view.single_click_delay) {
++          int icon_pos_x = ic->x + ic->sd->x - ic->sd->pos.x;
++          int icon_pos_y = ic->y + ic->sd->y - ic->sd->pos.y;
++
++          if (eu->output.x >= icon_pos_x && eu->output.x <= (icon_pos_x + 
ic->w) &&
++              eu->output.y >= icon_pos_y && eu->output.y <= (icon_pos_y + 
ic->h))
++             evas_object_smart_callback_call(ic->sd->obj, "selected", NULL);
+         }
+      }
+ }
+@@ -6492,11 +6510,11 @@ _e_fm2_cb_icon_mouse_down(void *data, Evas *e, 
Evas_Object *obj, void *event_inf
+            ic->drag.dnd = 0;
+            ic->drag.src = 1;
+         }
+-        _e_fm2_mouse_1_handler(ic, 0, ev->modifiers, ev->timestamp);
++        _e_fm2_mouse_1_handler(ic, 0, ev);
+      }
+    else if (ev->button == 3)
+      {
+-      if (!ic->selected) _e_fm2_mouse_1_handler(ic, 0, ev->modifiers, 
ev->timestamp);
++      if (!ic->selected) _e_fm2_mouse_1_handler(ic, 0, ev);
+       _e_fm2_icon_menu(ic, ic->sd->obj, ev->timestamp);
+      }
+ }
+@@ -6516,7 +6534,7 @@ _e_fm2_cb_icon_mouse_up(void *data, Evas *e, Evas_Object 
*obj, void *event_info)
+    if ((ev->button == 1) && (!ic->drag.dnd))
+      {
+       if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
+-        _e_fm2_mouse_1_handler(ic, 1, ev->modifiers, ev->timestamp);
++        _e_fm2_mouse_1_handler(ic, 1, ev);
+         ic->drag.start = 0;
+       ic->drag.dnd = 0;
+       ic->drag.src = 0;
diff --git a/recipes/e17/e-wm/e_fm2-single-click-delay-support.patch 
b/recipes/e17/e-wm/e_fm2-single-click-delay-support.patch
new file mode 100644
index 0000000..369b6d5
--- /dev/null
+++ b/recipes/e17/e-wm/e_fm2-single-click-delay-support.patch
@@ -0,0 +1,100 @@
+>From bb0df2798a630ece5ff19704831a6b170d0df274 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Trevi=C3=B1o=20-=203v1n0?= <[email protected]>
+Date: Tue, 9 Jun 2009 00:24:05 +0200
+Subject: [PATCH 1/2] e_fm2 single-click delay support
+ This patch allows to set a delay to select an item in the e_fm2 if
+ it is using the single-click mode. Thanks to this, it could be needed
+ a longer pressure to select an item in the file-manager; useful for
+ embedded/touch-based systems.
+
+---
+ src/bin/e_fm.c |   20 +++++++++++++-------
+ src/bin/e_fm.h |    1 +
+ 2 files changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
+index 07f9a2c..7b58e56 100644
+--- a/src/bin/e_fm.c
++++ b/src/bin/e_fm.c
+@@ -389,7 +389,7 @@ static int _e_fm2_cb_live_timer(void *data);
+ static int _e_fm2_theme_edje_object_set(E_Fm2_Smart_Data *sd, Evas_Object *o, 
const char *category, const char *group);
+ static int _e_fm2_theme_edje_icon_object_set(E_Fm2_Smart_Data *sd, 
Evas_Object *o, const char *category, const char *group);
+ 
+-static void _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier 
*modifiers);
++static void _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier 
*modifiers, unsigned int timestamp);
+ 
+ static void _e_fm2_client_spawn(void);
+ static E_Fm2_Client *_e_fm2_client_get(void);
+@@ -894,6 +894,7 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const 
char *path)
+       sd->config->view.open_dirs_in_place = 1;
+       sd->config->view.selector = 1;
+       sd->config->view.single_click = 0;
++      sd->config->view.single_click_delay = 0;
+       sd->config->view.no_subdir_jump = 0;
+       sd->config->icon.icon.w = 128;
+       sd->config->icon.icon.h = 128;
+@@ -6330,9 +6331,10 @@ _e_fm2_cb_dnd_drop(void *data, const char *type, void 
*event)
+ 
+ /* FIXME: prototype */
+ static void
+-_e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers)
++_e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, Evas_Modifier *modifiers, 
unsigned int timestamp)
+ {
+    int multi_sel = 0, range_sel = 0, sel_change = 0;
++   static unsigned int down_timestamp = 0;
+ 
+    if (ic->sd->config->selection.windows_modifiers)
+      {
+@@ -6444,8 +6446,12 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, 
Evas_Modifier *modifiers)
+        (ic->sd->config->view.single_click)
+        )
+      {
+-      if (up)
+-        evas_object_smart_callback_call(ic->sd->obj, "selected", NULL);
++      if (!up && ic->sd->config->view.single_click_delay)
++        down_timestamp = timestamp;
++      if (up) {
++        if ((timestamp - down_timestamp) > 
ic->sd->config->view.single_click_delay)
++          evas_object_smart_callback_call(ic->sd->obj, "selected", NULL);
++        }
+      }
+ }
+ 
+@@ -6486,11 +6492,11 @@ _e_fm2_cb_icon_mouse_down(void *data, Evas *e, 
Evas_Object *obj, void *event_inf
+            ic->drag.dnd = 0;
+            ic->drag.src = 1;
+         }
+-        _e_fm2_mouse_1_handler(ic, 0, ev->modifiers);
++        _e_fm2_mouse_1_handler(ic, 0, ev->modifiers, ev->timestamp);
+      }
+    else if (ev->button == 3)
+      {
+-      if (!ic->selected) _e_fm2_mouse_1_handler(ic, 0, ev->modifiers);
++      if (!ic->selected) _e_fm2_mouse_1_handler(ic, 0, ev->modifiers, 
ev->timestamp);
+       _e_fm2_icon_menu(ic, ic->sd->obj, ev->timestamp);
+      }
+ }
+@@ -6510,7 +6516,7 @@ _e_fm2_cb_icon_mouse_up(void *data, Evas *e, Evas_Object 
*obj, void *event_info)
+    if ((ev->button == 1) && (!ic->drag.dnd))
+      {
+       if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
+-        _e_fm2_mouse_1_handler(ic, 1, ev->modifiers);
++        _e_fm2_mouse_1_handler(ic, 1, ev->modifiers, ev->timestamp);
+         ic->drag.start = 0;
+       ic->drag.dnd = 0;
+       ic->drag.src = 0;
+diff --git a/src/bin/e_fm.h b/src/bin/e_fm.h
+index 1bbd7c4..170dfb9 100644
+--- a/src/bin/e_fm.h
++++ b/src/bin/e_fm.h
+@@ -71,6 +71,7 @@ struct _E_Fm2_Config
+       unsigned char   always_order;
+       unsigned char   link_drop;
+       unsigned char   fit_custom_pos;
++        unsigned int    single_click_delay;
+    } view;
+    /* display of icons */
+    struct {
+-- 
+1.6.3.rc0
+
diff --git a/recipes/e17/e-wm_svn.bb b/recipes/e17/e-wm_svn.bb
index de0f48f..be504c6 100644
--- a/recipes/e17/e-wm_svn.bb
+++ b/recipes/e17/e-wm_svn.bb
@@ -3,7 +3,7 @@ DEPENDS = "eet evas ecore edje efreet edbus"
 LICENSE = "MIT BSD"
 SRCNAME = "e"
 PV = "0.16.999.060+svnr${SRCPV}"
-PR = "r6"
+PR = "r8"
 
 inherit e update-alternatives
 
@@ -15,6 +15,11 @@ SRC_URI += "\
 "
 
 SRC_URI_append_openmoko = " file://illume-disable-screensaver.patch;patch=1"
+SRC_URI_append_shr = " file://illume-disable-screensaver.patch;patch=1 \
+file://e_fm2-single-click-delay-support.patch;patch=1;maxrev=41127 \
+file://Add-press-delay-support-to-illume.patch;patch=1;maxrev=41128 \
+file://e_fm2-avoid-invalid-clicks-2.patch;patch=1;maxrev=41127 "
+
 
 EXTRA_OECONF = "\
   --with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc \
@@ -75,6 +80,7 @@ PACKAGES =+ "\
   ${PN}-input-methods \
   ${PN}-sysactions \
   ${PN}-utils \
+  ${PN}-menu \
 "
 
 RRECOMMENDS_${PN} = "\
@@ -84,6 +90,7 @@ RRECOMMENDS_${PN} = "\
   ${PN}-other \
   ${PN}-input-methods \
   ${PN}-sysactions \
+  ${PN}-menu \
 "
 
 PACKAGE_ARCH_${PN}-config-default = "all"
@@ -101,6 +108,7 @@ PACKAGE_ARCH_${PN}-icons = "all"
 PACKAGE_ARCH_${PN}-other = "all"
 PACKAGE_ARCH_${PN}-input-methods = "all"
 PACKAGE_ARCH_${PN}-sysactions = "all"
+PACKAGE_ARCH_${PN}-menu = "all"
 
 FILES_${PN} = "\
   ${bindir}/* \
@@ -135,6 +143,7 @@ FILES_${PN}-other = "${datadir}/enlightenment/data/other"
 FILES_${PN}-input-methods = "${datadir}/enlightenment/data/input_methods"
 FILES_${PN}-sysactions = "${sysconfdir}/enlightenment/sysactions.conf"
 FILES_${PN}-utils = "${libdir}/enlightenment/utils/*"
+FILES_${PN}-menu = "${sysconfdir}/xdg/menus/applications.menu"
 
 RRECOMMENDS_${PN}-config-default = "${PN}-theme-default"
 RRECOMMENDS_${PN}-config-illume = "${PN}-theme-illume"
@@ -160,7 +169,8 @@ FILES_${PN}-doc += "\
   ${datadir}/enlightenment/doc \
 "
 
-CONFFILES_${PN} = "${sysconfdir}/xdg/menus/applications.menu"
+CONFFILES_${PN}-menu = "${sysconfdir}/xdg/menus/applications.menu"
+CONFFILES_${PN}-sysactions = "/etc/enlightenment/sysactions.conf"
 
 ALTERNATIVE_PATH = "${bindir}/enlightenment_start.oe"
 ALTERNATIVE_NAME = "x-window-manager"
-- 
1.6.5.3

_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to