ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=eaa3781e52db371828d863c22488a61e25b9674e

commit eaa3781e52db371828d863c22488a61e25b9674e
Author: Al Poole <[email protected]>
Date:   Fri May 26 22:17:00 2017 +0100

    filepanel: add menu for filepanel when no file is clicked.
    
    Summary:
    Opens a suitable menu for the root directory if right-click
    is not focussed on an item.
    
    Reviewers: ajwillia.ms
    
    Reviewed By: ajwillia.ms
    
    Differential Revision: https://phab.enlightenment.org/D4911
---
 src/bin/edi_filepanel.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c
index 675569f..bf9b3bd 100644
--- a/src/bin/edi_filepanel.c
+++ b/src/bin/edi_filepanel.c
@@ -273,7 +273,16 @@ _item_clicked_cb(void *data EINA_UNUSED, Evas *e 
EINA_UNUSED, Evas_Object *obj,
    it = elm_genlist_at_xy_item_get(obj, ev->output.x, ev->output.y, NULL);
    sd = elm_object_item_data_get(it);
 
-   if (!sd) return;
+   if (!sd)
+     {
+        sd = malloc(sizeof(Edi_Dir_Data));
+        if (!sd)
+          return;
+
+        sd->path = edi_project_get();
+        sd->isdir = EINA_TRUE;
+        _item_menu_dir_create(_main_win, sd);
+     }
 
    if (ev->button == 1 && it)
      {

-- 


Reply via email to