Re: [E-devel] [PATCH] e_fm: fix single-click on folders

2008-11-04 Thread Fedor Gusev
On Mon, Nov 03, 2008 at 07:55:52PM +1100, Carsten Haitzler wrote:
 On Tue, 28 Oct 2008 20:36:06 +0100 thomasg [EMAIL PROTECTED] babbled:
  It also removes the strdup in the affected functions that seems useless
  here.

Turns out, those strdups are not that useless... e_fm2_path_set()
calls eina_stringshare_del() on sd-dev, which turns out to be a
free(). After that, it assignes it's dev argument to sd-dev, which is
now not valid.

I fixed it in svn.

-
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


Re: [E-devel] [PATCH] e_fm: fix single-click on folders

2008-11-03 Thread The Rasterman
On Tue, 28 Oct 2008 20:36:06 +0100 thomasg [EMAIL PROTECTED] babbled:

 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.

in svn :)

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]


-
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


[E-devel] [PATCH] e_fm: fix single-click on folders

2008-10-28 Thread thomasg
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