[E-devel] [EFM] Typebuf

2008-07-25 Thread Гусев Фёдор
Hello everyone.

Attached patch fixes a couple issues with current typebuf in EFM.
First, now typebuf is cleared out when you change current directory.
Second, it has a 5 seconds timeout, so if you don't type anything
during this time, it's cleared out too.

PS: Typebuf is a way for faster navigation in EFM, you type what you
what to find, and matching file is automatically selected.

-- 
King regards,
Fedor Gusev.
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index 4ede60e..b2c0ca8 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -97,6 +97,7 @@ struct _E_Fm2_Smart_Data

struct {
   char*buf;
+  Ecore_Timer *timer;
} typebuf;

int busy_count;
@@ -596,6 +597,9 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
 	_e_fm2_client_monitor_add(sd->id, sd->realpath);
 	sd->listing = 1;
  }
+
+   /* Clean up typebuf. */
+   _e_fm2_typebuf_hide(obj);

evas_object_smart_callback_call(obj, "dir_changed", NULL);
sd->tmp.iter = 0;
@@ -4373,6 +4377,24 @@ _e_fm2_typebuf_complete(Evas_Object *obj)
_e_fm2_typebuf_match(obj);
 }
 
+static int
+_e_fm_typebuf_timer_cb(void *data)
+{
+   Evas_Object *obj = data;
+   E_Fm2_Smart_Data *sd;
+
+   if(!data) return 0;
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return 0;
+
+   if (!sd->typebuf_visible) return 0;
+
+   _e_fm2_typebuf_hide(obj);
+   sd->typebuf.timer = NULL;
+
+   return 0;
+}
+
 static void
 _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
 {
@@ -4390,6 +4412,13 @@ _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
sd->typebuf.buf = ts;
_e_fm2_typebuf_match(obj);
edje_object_part_text_set(sd->overlay, "e.text.typebuf_label", sd->typebuf.buf);
+
+   if(sd->typebuf.timer) 
+ {
+	ecore_timer_del(sd->typebuf.timer);
+ }
+
+   sd->typebuf.timer = ecore_timer_add(5.0, _e_fm_typebuf_timer_cb, obj);
 }
 
 static void
-
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=100&url=/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EFM] Typebuf

2008-07-25 Thread thomasg
typebuf should understand some basic shell commands like cd, cd -, cd ~, cd
.., that would be cool and even faster :)

On Fri, Jul 25, 2008 at 10:30 AM, Гусев Фёдор <[EMAIL PROTECTED]> wrote:

> Hello everyone.
>
> Attached patch fixes a couple issues with current typebuf in EFM.
> First, now typebuf is cleared out when you change current directory.
> Second, it has a 5 seconds timeout, so if you don't type anything
> during this time, it's cleared out too.
>
> PS: Typebuf is a way for faster navigation in EFM, you type what you
> what to find, and matching file is automatically selected.
>
> --
> King regards,
> Fedor Gusev.
>
> -
> 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=100&url=/
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
-
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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EFM] Typebuf

2008-07-26 Thread The Rasterman
On Fri, 25 Jul 2008 12:30:57 +0400 "Гусев Фёдор" <[EMAIL PROTECTED]> babbled:

> Hello everyone.
> 
> Attached patch fixes a couple issues with current typebuf in EFM.
> First, now typebuf is cleared out when you change current directory.
> Second, it has a 5 seconds timeout, so if you don't type anything
> during this time, it's cleared out too.

in cvs. :) thx!

> PS: Typebuf is a way for faster navigation in EFM, you type what you
> what to find, and matching file is automatically selected.



-- 
- 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=100&url=/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel