Hi,
the attached patch fixes the single-click feature of e_fm, so you can use
single-click on folders, not just on files.
It also removes the strdup in the affected functions that seems useless
here.
Would be nice if someone could check/review and commit it.
Greetings,
thomasg
Index: e_fm.c
===
--- e_fm.c (Revision 37249)
+++ e_fm.c (Arbeitskopie)
@@ -5136,18 +5136,17 @@
{
/* if its a directory open dirs in-place is set then change the dir
* to be the dir + file */
- if ((S_ISDIR(ic-info.statinfo.st_mode))
+ if (
+ (S_ISDIR(ic-info.statinfo.st_mode))
(ic-sd-config-view.open_dirs_in_place)
(!ic-sd-config-view.no_subdir_jump)
(!ic-sd-config-view.single_click)
)
{
-char buf[4096], *dev = NULL;
+char buf[4096];
-if (ic-sd-dev) dev = strdup(ic-sd-dev);
snprintf(buf, sizeof(buf), %s/%s, ic-sd-path, ic-info.file);
-e_fm2_path_set(ic-sd-obj, dev, buf);
-E_FREE(dev);
+e_fm2_path_set(ic-sd-obj, ic-sd-dev, buf);
}
else
evas_object_smart_callback_call(ic-sd-obj, selected, NULL);
@@ -5170,7 +5169,7 @@
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);
}
else if (ev-button == 3)
{
@@ -5195,6 +5194,24 @@
ic-drag.start = 0;
ic-drag.dnd = 0;
ic-drag.src = 0;
+
+if (
+ (S_ISDIR(ic-info.statinfo.st_mode))
+(ic-sd-config-view.open_dirs_in_place)
+(!ic-sd-config-view.no_subdir_jump)
+(ic-sd-config-view.single_click)
+)
+ {
+ char buf[4096];
+
+ snprintf(buf, sizeof(buf), %s/%s, ic-sd-path, ic-info.file);
+ e_fm2_path_set(ic-sd-obj, ic-sd-dev, buf);
+ }
+else if ((S_ISDIR(ic-info.statinfo.st_mode))
(ic-sd-config-view.single_click))
+ evas_object_smart_callback_call(ic-sd-obj, selected, NULL);
+
+
+
}
ic-down_sel = 0;
}
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel