Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-05-03 Thread Manuel Kaufmann
On Fri, Apr 13, 2012 at 11:04 AM, Manuel Kaufmann humi...@gmail.com wrote:
 With these said, I will do what you say in the new patch :)

I'd like to finish this patch.

Did we decide what to do here?

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-05-03 Thread Gonzalo Odiard
My personal opinion is try to mimic the behaviour of search in the home.
* Add a timeout
* Enter execute the search
* Remove change of color.

-1 to change delay based in string size, as proposed by Gary. We don't want
do this more complicated yet...

Gonzalo


On Thu, May 3, 2012 at 10:36 AM, Manuel Kaufmann humi...@gmail.com wrote:

 On Fri, Apr 13, 2012 at 11:04 AM, Manuel Kaufmann humi...@gmail.com
 wrote:
  With these said, I will do what you say in the new patch :)

 I'd like to finish this patch.

 Did we decide what to do here?

 --
 Kaufmann Manuel
 Blog: http://humitos.wordpress.com/
 Porfolio: http://fotos.mkaufmann.com.ar/
 PyAr: http://www.python.com.ar/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-05-03 Thread Manuel Kaufmann
On Thu, May 3, 2012 at 10:59 AM, Gonzalo Odiard gonz...@laptop.org wrote:
 My personal opinion is try to mimic the behaviour of search in the home.

I like this.

So, if there are no objections I will do this :)

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-13 Thread Gary Martin
On 13 Apr 2012, at 04:47, Gonzalo Odiard wrote:

 May be for consistency is better add the timeout. Anyway, if the user press
 enter the search is done too.

Yes, other approaches could be to:

- not to search until the 2nd (or perhaps 3rd) characters are typed

- a slightly deeper but user invisible solution could be to delay longer for 
short strings, so for 1st character the timeout delay is twice the usual 
default? 

Having said the above, I've not yet hit this issue when searching the logs 
during my years looking through logs I see here on the XOs during normal 
usage/testing, the display of a one character search seems pretty 
instantaneous. What log is it that is getting so huge?

Any one know what the current delay is on the home view search, I've not looked 
at the code yet but feels like a 2sec timeout.

 I am not sure about changing the color in the entry. Is a nice feature,
 but is not used in any other place (in Sugar).

Yea, -1 for colour change, we don't use that any where else in Sugar, colour is 
usually reserved to indicate user ownership. If the implementation has a count 
of the search hits it would be nice to show the number of matches in the 
toolbar, but we are a little short of space unless the advanced features 
(Delete log, Log collector) in the cog secondary toolbar are moved into the 
Activity secondary toolbar (Log collector should certainly be treated as a 
save/export type feature as it just zips up log files into a Journal entry).

 Anyway, this is a very
 special activity, more useful for hacking and testing than as a educative
 tool.
 What do you think, Design Team?
 
 Gonzalo
 
 PD: Yes, I know, hacking and testing is educative too :)
 Gonzalo

;)

--Gary

 On Thu, Apr 12, 2012 at 7:58 PM, Manuel Kaufmann humi...@gmail.com wrote:
 
 On Thu, Apr 12, 2012 at 19:55, Manuel Kaufmann humi...@gmail.com wrote:
 Mmm... I'm not sure about this. If the user press just the a and the
 delay time is expired it will consume too much CPU.
 
 Besides, what is a delay time accordingly for children? I mean, maybe
 for a six-year-old kid 2 seconds is not enough and for a
 twelve-year-old kid is too much.
 
 I don't know. Personally, I don't like this approach :)
 
 --
 Kaufmann Manuel
 Blog: http://humitos.wordpress.com/
 Porfolio: http://fotos.mkaufmann.com.ar/
 PyAr: http://www.python.com.ar/
 

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-13 Thread Gonzalo Odiard
On Fri, Apr 13, 2012 at 12:56 AM, James Cameron qu...@laptop.org wrote:
 It might be possible to speed up the search algorithm?


It's so slow? Any particular case?

Gonzalo

 --
 James Cameron
 http://quozl.linux.org.au/
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-13 Thread Manuel Kaufmann
On Fri, Apr 13, 2012 at 08:27, Gary Martin garycmar...@googlemail.com wrote:
 I am not sure about changing the color in the entry. Is a nice feature,
 but is not used in any other place (in Sugar).

 Yea, -1 for colour change, we don't use that any where else in Sugar,

Well, my patch changes the color and uses Key for new search results
because of this comment in the ticket[1]:

To borrow what seems to be a common (but not necessarily the most
user obvious?) Sugar search box approach, we likely should return new
search results in Log only when the Enter key is pressed, and
somehow indicate when no results are returned as well.

I thought that search with Enter was a kind of standard, so I used it
in my patch. About colors, I didn't know what to do to show that were
no results, so I proposed this approach (stolen from Firefox's search
bar)

With these said, I will do what you say in the new patch :)

[1] http://bugs.sugarlabs.org/ticket/2734

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Manuel Quiñones
El día 12 de abril de 2012 14:14, Manuel Kaufmann humi...@gmail.com escribió:
 If the log file is long and we search for new results every time that a key is
 pressed this action could consume a lot of CPU. Even more if we search for a
 single char.

 So, I changed the way that it works to update the search results every time 
 the
 user presses the Enter key and if there are results for that query the Entry
 box is highlighted with yellow color and if there are no results with red
 color..

This is a great improvement.

 This commit solves: #2734

 Signed-off-by: Manuel Kaufmann humi...@gmail.com
Reviewed-by: Manuel Quiñones ma...@laptop.org


 ---
  logviewer.py |   43 ++-
  1 file changed, 34 insertions(+), 9 deletions(-)

 diff --git a/logviewer.py b/logviewer.py
 index 88fe2e6..5fbc6ab 100644
 --- a/logviewer.py
 +++ b/logviewer.py
 @@ -383,15 +383,15 @@ class LogActivity(activity.Activity):
         wrap_btn.connect('clicked', self._wrap_cb)
         toolbar_box.toolbar.insert(wrap_btn, -1)

 -        search_entry = iconentry.IconEntry()
 -        search_entry.set_size_request(gtk.gdk.screen_width() / 3, -1)
 -        search_entry.set_icon_from_name(
 +        self._search_entry = iconentry.IconEntry()
 +        self._search_entry.set_size_request(gtk.gdk.screen_width() / 3, -1)
 +        self._search_entry.set_icon_from_name(
                 iconentry.ICON_ENTRY_PRIMARY, 'system-search')
 -        search_entry.add_clear_button()
 -        search_entry.connect('activate', self._search_entry_activate_cb)
 -        search_entry.connect('changed', self._search_entry_changed_cb)
 +        self._search_entry.add_clear_button()
 +        self._search_entry.connect('activate', 
 self._search_entry_activate_cb)
 +        self._search_entry.connect('changed', self._search_entry_changed_cb)
         search_item = gtk.ToolItem()
 -        search_item.add(search_entry)
 +        search_item.add(self._search_entry)
         toolbar_box.toolbar.insert(search_item, -1)

         self._search_prev = ToolButton('go-previous-paired')
 @@ -440,11 +440,26 @@ class LogActivity(activity.Activity):

     def _search_entry_activate_cb(self, entry):
         self.viewer.set_search_text(entry.props.text)
 +        # Set an activated color to the search entry
 +        fg_color = gtk.gdk.color_parse('#B0')
 +        self._search_entry.modify_base(gtk.STATE_ACTIVE, fg_color)
 +        self._search_entry.modify_base(gtk.STATE_NORMAL, fg_color)
         self._update_search_buttons()

     def _search_entry_changed_cb(self, entry):
 -        self.viewer.set_search_text(entry.props.text)
 -        self._update_search_buttons()
 +        # Remove all highlighted words from the TextView
 +        _buffer = self.viewer._textview.get_buffer()
 +        start, end = _buffer.get_bounds()
 +        _buffer.remove_tag_by_name('search-hilite', start, end)
 +        _buffer.remove_tag_by_name('search-select', start, end)
 +
 +        # Go back to the search entry original colors
 +        bg_color = gtk.gdk.color_parse('#FF')
 +        fg_color = gtk.gdk.color_parse('#00')
 +        self._search_entry.modify_base(gtk.STATE_NORMAL, bg_color)
 +        self._search_entry.modify_text(gtk.STATE_NORMAL, fg_color)
 +        self._search_entry.modify_base(gtk.STATE_ACTIVE, bg_color)
 +        self._search_entry.modify_text(gtk.STATE_ACTIVE, fg_color)

     def _search_prev_cb(self, button):
         self.viewer.search_next('backward')
 @@ -464,6 +479,16 @@ class LogActivity(activity.Activity):
             self._search_prev.props.sensitive = prev_result != None
             self._search_next.props.sensitive = next_result != None

 +            if prev_result == next_result == None:
 +                # Change the background and foreground color of the
 +                # search entry
 +                bg_color = gtk.gdk.color_parse('#FF')
 +                fg_color = gtk.gdk.color_parse('#FF')
 +                self._search_entry.modify_base(gtk.STATE_ACTIVE, bg_color)
 +                self._search_entry.modify_base(gtk.STATE_NORMAL, bg_color)
 +                self._search_entry.modify_text(gtk.STATE_ACTIVE, fg_color)
 +                self._search_entry.modify_text(gtk.STATE_NORMAL, fg_color)
 +
     def _delete_log_cb(self, widget):
         if self.viewer.active_log:
             logfile = self.viewer.active_log.logfile
 --
 1.7.9.5

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Manuel Quiñones
El día 12 de abril de 2012 14:19, Manuel Quiñones ma...@laptop.org escribió:
 El día 12 de abril de 2012 14:14, Manuel Kaufmann humi...@gmail.com 
 escribió:
 If the log file is long and we search for new results every time that a key 
 is
 pressed this action could consume a lot of CPU. Even more if we search for a
 single char.

 So, I changed the way that it works to update the search results every time 
 the
 user presses the Enter key and if there are results for that query the Entry
 box is highlighted with yellow color and if there are no results with red
 color..

 This is a great improvement.

I took a second look.  The Next and Previous buttons should be
disabled when you edit the search entry again.

 This commit solves: #2734

 Signed-off-by: Manuel Kaufmann humi...@gmail.com
 Reviewed-by: Manuel Quiñones ma...@laptop.org


 ---
  logviewer.py |   43 ++-
  1 file changed, 34 insertions(+), 9 deletions(-)

 diff --git a/logviewer.py b/logviewer.py
 index 88fe2e6..5fbc6ab 100644
 --- a/logviewer.py
 +++ b/logviewer.py
 @@ -383,15 +383,15 @@ class LogActivity(activity.Activity):
         wrap_btn.connect('clicked', self._wrap_cb)
         toolbar_box.toolbar.insert(wrap_btn, -1)

 -        search_entry = iconentry.IconEntry()
 -        search_entry.set_size_request(gtk.gdk.screen_width() / 3, -1)
 -        search_entry.set_icon_from_name(
 +        self._search_entry = iconentry.IconEntry()
 +        self._search_entry.set_size_request(gtk.gdk.screen_width() / 3, -1)
 +        self._search_entry.set_icon_from_name(
                 iconentry.ICON_ENTRY_PRIMARY, 'system-search')
 -        search_entry.add_clear_button()
 -        search_entry.connect('activate', self._search_entry_activate_cb)
 -        search_entry.connect('changed', self._search_entry_changed_cb)
 +        self._search_entry.add_clear_button()
 +        self._search_entry.connect('activate', 
 self._search_entry_activate_cb)
 +        self._search_entry.connect('changed', self._search_entry_changed_cb)
         search_item = gtk.ToolItem()
 -        search_item.add(search_entry)
 +        search_item.add(self._search_entry)
         toolbar_box.toolbar.insert(search_item, -1)

         self._search_prev = ToolButton('go-previous-paired')
 @@ -440,11 +440,26 @@ class LogActivity(activity.Activity):

     def _search_entry_activate_cb(self, entry):
         self.viewer.set_search_text(entry.props.text)
 +        # Set an activated color to the search entry
 +        fg_color = gtk.gdk.color_parse('#B0')
 +        self._search_entry.modify_base(gtk.STATE_ACTIVE, fg_color)
 +        self._search_entry.modify_base(gtk.STATE_NORMAL, fg_color)
         self._update_search_buttons()

     def _search_entry_changed_cb(self, entry):
 -        self.viewer.set_search_text(entry.props.text)
 -        self._update_search_buttons()
 +        # Remove all highlighted words from the TextView
 +        _buffer = self.viewer._textview.get_buffer()
 +        start, end = _buffer.get_bounds()
 +        _buffer.remove_tag_by_name('search-hilite', start, end)
 +        _buffer.remove_tag_by_name('search-select', start, end)
 +
 +        # Go back to the search entry original colors
 +        bg_color = gtk.gdk.color_parse('#FF')
 +        fg_color = gtk.gdk.color_parse('#00')
 +        self._search_entry.modify_base(gtk.STATE_NORMAL, bg_color)
 +        self._search_entry.modify_text(gtk.STATE_NORMAL, fg_color)
 +        self._search_entry.modify_base(gtk.STATE_ACTIVE, bg_color)
 +        self._search_entry.modify_text(gtk.STATE_ACTIVE, fg_color)

     def _search_prev_cb(self, button):
         self.viewer.search_next('backward')
 @@ -464,6 +479,16 @@ class LogActivity(activity.Activity):
             self._search_prev.props.sensitive = prev_result != None
             self._search_next.props.sensitive = next_result != None

 +            if prev_result == next_result == None:
 +                # Change the background and foreground color of the
 +                # search entry
 +                bg_color = gtk.gdk.color_parse('#FF')
 +                fg_color = gtk.gdk.color_parse('#FF')
 +                self._search_entry.modify_base(gtk.STATE_ACTIVE, bg_color)
 +                self._search_entry.modify_base(gtk.STATE_NORMAL, bg_color)
 +                self._search_entry.modify_text(gtk.STATE_ACTIVE, fg_color)
 +                self._search_entry.modify_text(gtk.STATE_NORMAL, fg_color)
 +
     def _delete_log_cb(self, widget):
         if self.viewer.active_log:
             logfile = self.viewer.active_log.logfile
 --
 1.7.9.5

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



 --
 .. manuq ..



-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Gary Martin
On 12 Apr 2012, at 21:30, Manuel Quiñones wrote:

 El día 12 de abril de 2012 14:19, Manuel Quiñones ma...@laptop.org escribió:
 El día 12 de abril de 2012 14:14, Manuel Kaufmann humi...@gmail.com 
 escribió:
 If the log file is long and we search for new results every time that a key 
 is
 pressed this action could consume a lot of CPU. Even more if we search for a
 single char.
 
 So, I changed the way that it works to update the search results every time 
 the
 user presses the Enter key and if there are results for that query the Entry
 box is highlighted with yellow color and if there are no results with red
 color..
 
 This is a great improvement.

Is it possible to use a delay in typing rather than an explicit return key 
stroke? We use a delay in typing for the existing search in the Sugar shell 
home favourite view so there should be code to go reuse and the behaviour would 
be consistent.

Regards,
--Gary

 
 I took a second look.  The Next and Previous buttons should be
 disabled when you edit the search entry again.
 
 This commit solves: #2734
 
 Signed-off-by: Manuel Kaufmann humi...@gmail.com
 Reviewed-by: Manuel Quiñones ma...@laptop.org
 
 
 ---
  logviewer.py |   43 ++-
  1 file changed, 34 insertions(+), 9 deletions(-)
 
 diff --git a/logviewer.py b/logviewer.py
 index 88fe2e6..5fbc6ab 100644
 --- a/logviewer.py
 +++ b/logviewer.py
 @@ -383,15 +383,15 @@ class LogActivity(activity.Activity):
 wrap_btn.connect('clicked', self._wrap_cb)
 toolbar_box.toolbar.insert(wrap_btn, -1)
 
 -search_entry = iconentry.IconEntry()
 -search_entry.set_size_request(gtk.gdk.screen_width() / 3, -1)
 -search_entry.set_icon_from_name(
 +self._search_entry = iconentry.IconEntry()
 +self._search_entry.set_size_request(gtk.gdk.screen_width() / 3, -1)
 +self._search_entry.set_icon_from_name(
 iconentry.ICON_ENTRY_PRIMARY, 'system-search')
 -search_entry.add_clear_button()
 -search_entry.connect('activate', self._search_entry_activate_cb)
 -search_entry.connect('changed', self._search_entry_changed_cb)
 +self._search_entry.add_clear_button()
 +self._search_entry.connect('activate', 
 self._search_entry_activate_cb)
 +self._search_entry.connect('changed', 
 self._search_entry_changed_cb)
 search_item = gtk.ToolItem()
 -search_item.add(search_entry)
 +search_item.add(self._search_entry)
 toolbar_box.toolbar.insert(search_item, -1)
 
 self._search_prev = ToolButton('go-previous-paired')
 @@ -440,11 +440,26 @@ class LogActivity(activity.Activity):
 
 def _search_entry_activate_cb(self, entry):
 self.viewer.set_search_text(entry.props.text)
 +# Set an activated color to the search entry
 +fg_color = gtk.gdk.color_parse('#B0')
 +self._search_entry.modify_base(gtk.STATE_ACTIVE, fg_color)
 +self._search_entry.modify_base(gtk.STATE_NORMAL, fg_color)
 self._update_search_buttons()
 
 def _search_entry_changed_cb(self, entry):
 -self.viewer.set_search_text(entry.props.text)
 -self._update_search_buttons()
 +# Remove all highlighted words from the TextView
 +_buffer = self.viewer._textview.get_buffer()
 +start, end = _buffer.get_bounds()
 +_buffer.remove_tag_by_name('search-hilite', start, end)
 +_buffer.remove_tag_by_name('search-select', start, end)
 +
 +# Go back to the search entry original colors
 +bg_color = gtk.gdk.color_parse('#FF')
 +fg_color = gtk.gdk.color_parse('#00')
 +self._search_entry.modify_base(gtk.STATE_NORMAL, bg_color)
 +self._search_entry.modify_text(gtk.STATE_NORMAL, fg_color)
 +self._search_entry.modify_base(gtk.STATE_ACTIVE, bg_color)
 +self._search_entry.modify_text(gtk.STATE_ACTIVE, fg_color)
 
 def _search_prev_cb(self, button):
 self.viewer.search_next('backward')
 @@ -464,6 +479,16 @@ class LogActivity(activity.Activity):
 self._search_prev.props.sensitive = prev_result != None
 self._search_next.props.sensitive = next_result != None
 
 +if prev_result == next_result == None:
 +# Change the background and foreground color of the
 +# search entry
 +bg_color = gtk.gdk.color_parse('#FF')
 +fg_color = gtk.gdk.color_parse('#FF')
 +self._search_entry.modify_base(gtk.STATE_ACTIVE, bg_color)
 +self._search_entry.modify_base(gtk.STATE_NORMAL, bg_color)
 +self._search_entry.modify_text(gtk.STATE_ACTIVE, fg_color)
 +self._search_entry.modify_text(gtk.STATE_NORMAL, fg_color)
 +
 def _delete_log_cb(self, widget):
 if self.viewer.active_log:
 logfile = self.viewer.active_log.logfile
 --
 1.7.9.5
 
 

Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Manuel Quiñones
El día 12 de abril de 2012 18:11, Gary Martin
garycmar...@googlemail.com escribió:
 On 12 Apr 2012, at 21:30, Manuel Quiñones wrote:

 El día 12 de abril de 2012 14:19, Manuel Quiñones ma...@laptop.org 
 escribió:
 El día 12 de abril de 2012 14:14, Manuel Kaufmann humi...@gmail.com 
 escribió:
 If the log file is long and we search for new results every time that a 
 key is
 pressed this action could consume a lot of CPU. Even more if we search for 
 a
 single char.

 So, I changed the way that it works to update the search results every 
 time the
 user presses the Enter key and if there are results for that query the 
 Entry
 box is highlighted with yellow color and if there are no results with red
 color..

 This is a great improvement.

 Is it possible to use a delay in typing rather than an explicit return key 
 stroke? We use a delay in typing for the existing search in the Sugar shell 
 home favourite view so there should be code to go reuse and the behaviour 
 would be consistent.

Indeed, that seems like a better approach.  Sorry humitos for all the
comings and goings.

-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Manuel Quiñones
El día 12 de abril de 2012 19:12, Manuel Quiñones ma...@laptop.org escribió:
 El día 12 de abril de 2012 18:11, Gary Martin
 garycmar...@googlemail.com escribió:
 On 12 Apr 2012, at 21:30, Manuel Quiñones wrote:

 El día 12 de abril de 2012 14:19, Manuel Quiñones ma...@laptop.org 
 escribió:
 El día 12 de abril de 2012 14:14, Manuel Kaufmann humi...@gmail.com 
 escribió:
 If the log file is long and we search for new results every time that a 
 key is
 pressed this action could consume a lot of CPU. Even more if we search 
 for a
 single char.

 So, I changed the way that it works to update the search results every 
 time the
 user presses the Enter key and if there are results for that query the 
 Entry
 box is highlighted with yellow color and if there are no results with red
 color..

 This is a great improvement.

 Is it possible to use a delay in typing rather than an explicit return key 
 stroke? We use a delay in typing for the existing search in the Sugar shell 
 home favourite view so there should be code to go reuse and the behaviour 
 would be consistent.

 Indeed, that seems like a better approach.  Sorry humitos for all the
 comings and goings.

Forgot to say, we should do of this a Sugar recomedation, would be
good to change the interactive search in Browse accordingly.

-- 
.. manuq ..
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Manuel Kaufmann
2012/4/12 Gary Martin garycmar...@googlemail.com:
 Is it possible to use a delay in typing rather than an explicit return key 
 stroke? We use a delay in typing for the existing search in the Sugar shell 
 home favourite view so there should be code to go reuse and the behaviour 
 would be consistent.

Mmm... I'm not sure about this. If the user press just the a and the
delay time is expired it will consume too much CPU.

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Manuel Kaufmann
On Thu, Apr 12, 2012 at 19:55, Manuel Kaufmann humi...@gmail.com wrote:
 Mmm... I'm not sure about this. If the user press just the a and the
 delay time is expired it will consume too much CPU.

Besides, what is a delay time accordingly for children? I mean, maybe
for a six-year-old kid 2 seconds is not enough and for a
twelve-year-old kid is too much.

I don't know. Personally, I don't like this approach :)

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread Gonzalo Odiard
May be for consistency is better add the timeout. Anyway, if the user press
enter the search is done too.
I am not sure about changing the color in the entry. Is a nice feature,
but is not used in any other place (in Sugar). Anyway, this is a very
special activity, more useful for hacking and testing than as a educative
tool.
What do you think, Design Team?

Gonzalo

PD: Yes, I know, hacking and testing is educative too :)
Gonzalo

On Thu, Apr 12, 2012 at 7:58 PM, Manuel Kaufmann humi...@gmail.com wrote:

 On Thu, Apr 12, 2012 at 19:55, Manuel Kaufmann humi...@gmail.com wrote:
  Mmm... I'm not sure about this. If the user press just the a and the
  delay time is expired it will consume too much CPU.

 Besides, what is a delay time accordingly for children? I mean, maybe
 for a six-year-old kid 2 seconds is not enough and for a
 twelve-year-old kid is too much.

 I don't know. Personally, I don't like this approach :)

 --
 Kaufmann Manuel
 Blog: http://humitos.wordpress.com/
 Porfolio: http://fotos.mkaufmann.com.ar/
 PyAr: http://www.python.com.ar/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [PATCH Log v2] Don't update search results every keystroke

2012-04-12 Thread James Cameron
It might be possible to speed up the search algorithm?

-- 
James Cameron
http://quozl.linux.org.au/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel