summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@enlightenment.org>2013-11-20 15:26:49 -0500
committerMike Blumenkrantz <zmike@enlightenment.org>2013-11-20 15:32:31 -0500
commitbedf56c457939c897e1eac1f3a2b27c945166178 (patch)
tree13bdfd1ffc3e75def6db0e016c14382d1ea8e962
parentcc2939b327f9ae1ff8b13d3f6bc10ed1b973003f (diff)
add back/forward mouse button support for efm when a toolbar is present
button numbers untested because I don't have a mouse, so if they're wrong someone should post the results of clicking those buttons from xev T67
-rw-r--r--src/modules/fileman/e_fwin_nav.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modules/fileman/e_fwin_nav.c b/src/modules/fileman/e_fwin_nav.c
index d382260ff..fffcd1980 100644
--- a/src/modules/fileman/e_fwin_nav.c
+++ b/src/modules/fileman/e_fwin_nav.c
@@ -55,6 +55,8 @@ static void _cb_button_click(void *data, Evas_Object *obj, const cha
55static void _cb_scroll_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info); 55static void _cb_scroll_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info);
56static void _box_button_append(Instance *inst, const char *label, Edje_Signal_Cb func); 56static void _box_button_append(Instance *inst, const char *label, Edje_Signal_Cb func);
57static void _box_button_free(Nav_Item *ni); 57static void _box_button_free(Nav_Item *ni);
58static void _cb_fm_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info);
59
58 60
59static Eina_List *instances = NULL; 61static Eina_List *instances = NULL;
60static const char *_nav_mod_dir = NULL; 62static const char *_nav_mod_dir = NULL;
@@ -289,6 +291,8 @@ _gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
289 inst->tbar = tbar; 291 inst->tbar = tbar;
290 inst->o_fm = o_fm; 292 inst->o_fm = o_fm;
291 293
294 evas_object_event_callback_add(o_fm, EVAS_CALLBACK_MOUSE_DOWN, _cb_fm_mouse_down, inst);
295
292 snprintf(buf, sizeof(buf), "%s/e-module-efm_nav.edj", _nav_mod_dir); 296 snprintf(buf, sizeof(buf), "%s/e-module-efm_nav.edj", _nav_mod_dir);
293 inst->theme = eina_stringshare_add(buf); 297 inst->theme = eina_stringshare_add(buf);
294 298
@@ -392,6 +396,9 @@ _gc_shutdown(E_Gadcon_Client *gcc)
392 instances = eina_list_remove(instances, inst); 396 instances = eina_list_remove(instances, inst);
393 397
394 evas_object_event_callback_del_full(inst->o_fm, 398 evas_object_event_callback_del_full(inst->o_fm,
399 EVAS_CALLBACK_MOUSE_DOWN,
400 _cb_fm_mouse_down, inst);
401 evas_object_event_callback_del_full(inst->o_fm,
395 EVAS_CALLBACK_KEY_DOWN, 402 EVAS_CALLBACK_KEY_DOWN,
396 _cb_key_down, inst); 403 _cb_key_down, inst);
397 404
@@ -588,6 +595,18 @@ _cb_favorites_click(void *data, Evas_Object *obj __UNUSED__, const char *emissio
588} 595}
589 596
590static void 597static void
598_cb_fm_mouse_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
599{
600 Instance *inst = data;
601 Evas_Event_Mouse_Down *ev = event_info;
602
603 if (ev->button == 9)
604 _cb_forward_click(inst, NULL, NULL, NULL);
605 else if (ev->button == 8)
606 _cb_back_click(inst, NULL, NULL, NULL);
607}
608
609static void
591_cb_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info) 610_cb_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info)
592{ 611{
593 Instance *inst; 612 Instance *inst;