On Tue, 10 Jun 2014 21:30:56 +0200 Davide Andreoli <d...@gurumeditation.it> said:
> Really a cool feature indeed, but the theme implementation is really > poor.... sure. but it's a good step - the feature look good. :) > I strongly suggest to put the new search entry on the top-right corner of > the widget (after the Home button but right aligned) > and to put a search icon aside the search entry. So the user know that the > entry is a search entry. yes. this would be better. > Otherwise it's really hard to find the new feature, and the user is really > confused about 3 different entry on the bottom of the widget. > No? Objections? none. :) > 2014-06-10 11:56 GMT+02:00 abhi <a.aryadi...@samsung.com>: > > > raster pushed a commit to branch master. > > > > > > http://git.enlightenment.org/core/elementary.git/commit/?id=b29bcfdbcf83209699b3d3cb6b372858ce6dad47 > > > > commit b29bcfdbcf83209699b3d3cb6b372858ce6dad47 > > Author: abhi <a.aryadi...@samsung.com> > > Date: Tue Jun 10 18:50:01 2014 +0900 > > > > fileselector: Adding search entry for realtime filename search > > > > Summary: > > search entry added for searching files/subfolders in a folder > > @feature > > > > Test Plan: elementary_test -to fileselector > > > > Reviewers: seoz, raster > > > > CC: raster > > > > Differential Revision: https://phab.enlightenment.org/D875 > > --- > > data/themes/edc/elm/fileselector.edc | 16 ++++++++++++++ > > src/lib/elc_fileselector.c | 43 > > ++++++++++++++++++++++++++++++++++++ > > src/lib/elm_widget_fileselector.h | 2 ++ > > 3 files changed, 61 insertions(+) > > > > diff --git a/data/themes/edc/elm/fileselector.edc > > b/data/themes/edc/elm/fileselector.edc > > index 78a06b5..a7e9a1b 100644 > > --- a/data/themes/edc/elm/fileselector.edc > > +++ b/data/themes/edc/elm/fileselector.edc > > @@ -101,6 +101,22 @@ group { name: "elm/fileselector/base/default"; > > fixed: 1 1; > > align: 0.5 1.0; > > rel1 { > > + to_y: "elm.swallow.search"; > > + relative: 0.0 0.0; > > + offset: 3 -4; > > + } > > + rel2 { > > + to_y: "elm.swallow.search"; > > + relative: 1.0 0.0; > > + offset: -4 -4; > > + } > > + } > > + } > > + part { name: "elm.swallow.search"; type: SWALLOW; > > + description { state: "default" 0.0; > > + fixed: 1 1; > > + align: 0.5 1.0; > > + rel1 { > > to_y: "elm.swallow.filters"; > > relative: 0.0 0.0; > > offset: 3 -4; > > diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c > > index 5a03505..d09cfc0 100644 > > --- a/src/lib/elc_fileselector.c > > +++ b/src/lib/elc_fileselector.c > > @@ -131,6 +131,7 @@ _elm_fileselector_elm_widget_theme_apply(Eo *obj, > > Elm_Fileselector_Data *sd) > > > > SWALLOW("elm.swallow.path", sd->path_entry); > > SWALLOW("elm.swallow.filename", sd->name_entry); > > + SWALLOW("elm.swallow.search", sd->search_entry); > > > > snprintf(buf, sizeof(buf), "fileselector/actions/%s", style); > > SWALLOW("elm.swallow.filters", sd->filter_hoversel); > > @@ -369,6 +370,8 @@ _ls_filter_cb(void *data, > > Listing_Request *lreq = data; > > Elm_Fileselector_Filter *cf; > > Eina_Bool dir = EINA_FALSE; > > + char *pch = NULL, *temp = NULL; > > + char temp_path[EINA_PATH_MAX]; > > > > if (!lreq->sd->hidden_visible && info->path[info->name_start] == '.') > > return EINA_FALSE; > > @@ -379,6 +382,21 @@ _ls_filter_cb(void *data, > > if (lreq->sd->only_folder && !dir) > > return EINA_FALSE; > > > > + //Search entry filter > > + if ((lreq->sd->search_string) && (lreq->sd->search_string[0] != '\0')) > > + { > > + strcpy(temp_path, info->path); > > + pch = strchr(temp_path, '/'); > > + while (pch != NULL) > > + { > > + temp = pch; > > + pch = strchr(pch + 1, '/'); > > + } > > + temp++; > > + if ((temp) && (lreq->sd->search_string) && (!strstr(temp, > > lreq->sd->search_string))) > > + return EINA_FALSE; > > + } > > + > > cf = lreq->sd->current_filter; > > if (!cf) > > return EINA_TRUE; > > @@ -1335,6 +1353,17 @@ _resource_deleted(void *data, int type EINA_UNUSED, > > void *ev) > > return ECORE_CALLBACK_PASS_ON; > > } > > > > +static void _preedit_cb(void *data, Evas_Object *obj, > > + void *event_info EINA_UNUSED) > > +{ > > + ELM_FILESELECTOR_DATA_GET(data, sd); > > + > > + sd->search_string = elm_entry_entry_get(obj); > > + > > + if (sd->search_string && sd->path) > > + _populate(data, sd->path, NULL, NULL); > > +} > > + > > EOLIAN static void > > _elm_fileselector_evas_object_smart_add(Eo *obj, Elm_Fileselector_Data > > *priv) > > { > > @@ -1427,6 +1456,20 @@ _elm_fileselector_evas_object_smart_add(Eo *obj, > > Elm_Fileselector_Data *priv) > > elm_widget_sub_object_add(obj, en); > > priv->name_entry = en; > > > > + //search entry > > + en = elm_entry_add(obj); > > + elm_entry_scrollable_set(en, EINA_TRUE); > > + elm_widget_mirrored_automatic_set(en, EINA_FALSE); > > + elm_entry_editable_set(en, EINA_TRUE); > > + elm_entry_single_line_set(en, EINA_TRUE); > > + elm_entry_line_wrap_set(en, ELM_WRAP_CHAR); > > + evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, > > EVAS_HINT_EXPAND); > > + evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL); > > + evas_object_smart_callback_add(en, "changed", _preedit_cb, obj); > > + > > + elm_widget_sub_object_add(obj, en); > > + priv->search_entry = en; > > + > > elm_fileselector_buttons_ok_cancel_set(obj, EINA_TRUE); > > elm_fileselector_is_save_set(obj, EINA_FALSE); > > > > diff --git a/src/lib/elm_widget_fileselector.h > > b/src/lib/elm_widget_fileselector.h > > index 6e085e4..cf67ecd 100644 > > --- a/src/lib/elm_widget_fileselector.h > > +++ b/src/lib/elm_widget_fileselector.h > > @@ -27,6 +27,7 @@ struct _Elm_Fileselector_Data > > Evas_Object *obj; > > Evas_Object *path_entry; > > Evas_Object *name_entry; > > + Evas_Object *search_entry; > > Evas_Object *files_view; > > Evas_Object *up_button; > > Evas_Object *home_button; > > @@ -46,6 +47,7 @@ struct _Elm_Fileselector_Data > > Ecore_Idler *populate_idler; > > > > const char *path_separator; > > + const char *search_string; > > > > Eio_File *current; > > Eio_Monitor *monitor; > > > > -- > > > > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel