maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   TouchSearch for Fremantle (https://talk.maemo.org/showthread.php?t=31405)

BrentDC 2009-09-08 15:43

TouchSearch for Fremantle
 
I've just uploaded a package to Fremantle extras-devel (and subsequently promoted it to -testing); it's called "TouchSearch".

It's a python-based Home plugin that allows you to search the web. It has been specifically designed for Fremantle so it should conform closely to the Maemo5 HIG.

On-device testing is required (it's written in Python, is a Home Plugin, and is written by me....).

Package page here.

BrentDC 2009-09-10 03:33

Re: TouchSearch for Fremantle
 
Quim? Andre? Anybody? Is anyone out there? Hello...ello....lo.....o......

:)

Capt'n Corrupt 2009-09-10 11:36

Re: TouchSearch for Fremantle
 
Hi!

It sounds great, but I have no way of testing it currently. How about some screenshots? These always excite the masses.

{:^I~

ragnar 2009-09-10 12:07

Re: TouchSearch for Fremantle
 
Hi BrentDC, I'll try this out.

-
Installed... But where is it? It doesn't install an icon to the Main menu, it doesn't come as an entry to the Home / Edit mode / list of Widgets to be added to a Home canvas.

Is there some command line hack to start this?

timsamoff 2009-09-10 12:10

Re: TouchSearch for Fremantle
 
Same here... Can't find how to use it (Maemo 5 requires "Desktop Widgets" to be installed via a menu accessed from the desktop).

Tim

BrentDC 2009-09-10 16:20

Re: TouchSearch for Fremantle
 
It *should* appear in the list of Home Widgets in Desktop Edit Mode (it does on scratchbox).

Can you list the output of this at the CLI:

Code:

dpkg -S touchsearch
I want to make sure it installed OK. Thanks.

timsamoff 2009-09-10 17:01

Re: TouchSearch for Fremantle
 
Here is the output:
Code:

~ $ dpkg -S touchsearch
dpkg: serious warning: files list file for package `aisleriot-help-en' missing, assuming package has no files currently installed.
touchsearch: /usr/share/applications/hildon-home/touchsearch.desktop
touchsearch: /usr/share/touchsearch/ghosted/google_maps.png
touchsearch: /usr/share/touchsearch/ghosted
touchsearch: /usr/lib/hildon-home/touchsearch.py
touchsearch: /usr/share/touchsearch/ghosted/general_shopping.png
touchsearch: /usr/share/doc/touchsearch
touchsearch: /usr/share/touchsearch/ghosted/google.png
touchsearch: /usr/share/touchsearch
touchsearch: /usr/share/touchsearch/select_search_engine.png
touchsearch: /usr/share/doc/touchsearch/changelog.Debian
touchsearch: /usr/lib/python2.5/site-packages/touchsearch-1.0.egg-info
touchsearch: /usr/share/touchsearch/ghosted/ebay.png
touchsearch: /usr/share/touchsearch/ghosted/dictionary.png

Weird AisleRiot mention in there!

Tim

BrentDC 2009-09-10 22:25

Re: TouchSearch for Fremantle
 
Thanks. It seems like it installed OK.

Next test:

Code:

dpkg -p python-hildon
That should print out the package information of python-hildon. Specifically look at the Version field, it should be *maemo11. If it is anything less, do (with extras-devel enabled):

Code:

apt-get install python-hildon
...and tell me how it goes!

Big thanks, BTW!

timsamoff 2009-09-11 04:30

Re: TouchSearch for Fremantle
 
Yes. It is 0.9.0-1maemo11

Tim

Khertan 2009-09-11 04:31

Re: TouchSearch for Fremantle
 
It s completely normal, on scratchbox same problem appear. It s again the same problem than on the first hildon-desktop binding for diablo, the launcher module doesn't use the right path to search the home applet, but use instead /usr/lib/python2.5/site-packages/

So now it s works on my scratchbox too after copying /usr/lib/hildon-home/touchsearch.py in /usr/lib/python2.5/site-packages/

Someone with an n900 can confirm this ?

qgil 2009-09-11 04:42

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by BrentDC (Post 324644)
Quim? Andre? Anybody? Is anyone out there? Hello...ello....lo.....o......

:)

Sorry, I had seen http://maemo.org/packages/package_in...hsearch/1.0-1/ before and commented there already.

I think you should wait for a bit more of certainty that you app works before pushing it to extras-testing. Although nowadays fair enough: I wouldn't have seen it if it wouldn't have landed there. ;)

timsamoff 2009-09-11 05:03

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by Khertan (Post 325230)
So now it s works on my scratchbox too after copying /usr/lib/hildon-home/touchsearch.py in /usr/lib/python2.5/site-packages/

Someone with an n900 can confirm this ?

Weird. After copying the script, nothing happened for me (i.e., the Widget was not available from the menu). But, after restarting, the Widget was present on the Desktop. But, after removing the Widget from the desktop, I could not add it again (from the menu). But, after restarting (again), I was able to see/add the Widget from the menu. But, if I remove the Widget, it's no longer available from the menu (unless I restart, at which point the Widget is added to the desktop automatically).

I hope that makes sense...

Also, attempting a search doesn't actually open the browser (i.e., instigate a search). :(

Tim

BrentDC 2009-09-11 15:26

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by timsamoff (Post 325241)
Weird. After copying the script, nothing happened for me (i.e., the Widget was not available from the menu). But, after restarting, the Widget was present on the Desktop. But, after removing the Widget from the desktop, I could not add it again (from the menu). But, after restarting (again), I was able to see/add the Widget from the menu. But, if I remove the Widget, it's no longer available from the menu (unless I restart, at which point the Widget is added to the desktop automatically).

I hope that makes sense...

I does make sense because I was seeing the exact same thing in Scratchbox -- I thought it was an oddity w/Scratchbox. It must be a bug in either:

-Hildon Desktop
-The Python bindings for it

Because the .desktop interface is quite easy and I don't think I could've possibly messed it up :eek:

Quote:

Also, attempting a search doesn't actually open the browser (i.e., instigate a search). :(

Tim
Could you see if this command in the terminal opens Google.com:

Code:

dbus-send --system --type=method_call --dest="com.nokia.osso_browser" --print-reply /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"http://www.google.com"
Thanks!

(having a device is a blessing and a curse, eh? ;))

BrentDC 2009-09-11 15:37

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by qgil (Post 325234)
Sorry, I had seen http://maemo.org/packages/package_in...hsearch/1.0-1/ before and commented there already.

No problem, it was a "playful" bump. :)

Quote:

I think you should wait for a bit more of certainty that you app works before pushing it to extras-testing. Although nowadays fair enough: I wouldn't have seen it if it wouldn't have landed there. ;)
I extensively tested it Scratchbox and everything that could be tested checked out. If I hadn't uploaded it to -testing, it would probably be rotting in -devel right now...

Additionally, TouchSearch is a simple applet, and although it's (hopefully) useful, it is more of a "deployment of technologies" on Fremantle e.g. a test. Only difference between it an something like Attitude, is that I plan on making it a day-to-day useable application.

Furthermore, since it is so simple, I plan on frequently uploading new versions to -testing after I fix problems found by testers.

timsamoff 2009-09-11 18:53

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by BrentDC (Post 325430)
Code:

dbus-send --system --type=method_call --dest="com.nokia.osso_browser" --print-reply /com/nokia/osso_browser/request com.nokia.osso_browser.load_url string:"http://www.google.com"

This works. :)

Side-note: Also, I think that your Widget would look better if you used the default Widget background gradient (translucent black to medium gray). Plus, most Widgets "hide" their settings button (which has a default Maemo 5 icon) until users "edit" on-screen properties.

Tim

timsamoff 2009-09-11 20:41

Re: TouchSearch for Fremantle
 
Quoting myself...
Quote:

Originally Posted by timsamoff (Post 325241)
Also, attempting a search doesn't actually open the browser (i.e., instigate a search). :(

This is working now after another reboot.

Tim

BrentDC 2009-09-12 02:52

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by timsamoff (Post 325512)
This works. :)

Side-note: Also, I think that your Widget would look better if you used the default Widget background gradient (translucent black to medium gray). Plus, most Widgets "hide" their settings button (which has a default Maemo 5 icon) until users "edit" on-screen properties.

Tim

Unfortunately, I have absolutely no idea what the "default Widget background" is... I'm just using a regular gtk.Button so it should inherit any theming.

Would it be possible to snap a couple screenshots? I'm thinking one of my applet against a pre-installed one and one of each dialog (search and select engine). That would be fantastic.

Concerning the settings dialog: it isn't a settings dialog per se, but integral to the everyday use of the applet. I'm envisioning that once I add more sites to search, the user can easily flip through the list and select an engine easily (and change this frequently). There will also be a settings interface to change traditional options, like button size, icon type, etc.

BrentDC 2009-09-12 02:56

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by timsamoff (Post 325564)
Quoting myself...


This is working now after another reboot.

Tim

It is extremely confusing that you needed to reboot so many times for it to work...

Is it working consistently now?

timsamoff 2009-09-12 13:00

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by BrentDC (Post 325675)
Would it be possible to snap a couple screenshots?

Sure, I'll work on this.

Quote:

Originally Posted by BrentDC (Post 325675)
Concerning the settings dialog

Funny. I sort of realized this after I made that comment. Yeah, it's better where it is. :D

Tim

timsamoff 2009-09-12 13:02

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by BrentDC (Post 325676)
It is extremely confusing that you needed to reboot so many times for it to work...

Is it working consistently now?

I agree. Sorry I can't tell you why. And, yes... It seems to be working like a charm now!

Tim

timsamoff 2009-09-14 02:07

Re: TouchSearch for Fremantle
 
1 Attachment(s)
Screen grab time.

Tim

qgil 2009-09-14 02:54

Re: TouchSearch for Fremantle
 
Have you checked the terms and conditions about using the Google logo in your application?

BrentDC 2009-09-15 22:45

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by timsamoff (Post 326516)
Screen grab time.

Tim

Thanks, Tim.

I notice that the gradient background is for shortcut icons, but is it also for actual applets? Thanks.

BrentDC 2009-09-15 22:57

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by qgil (Post 326539)
Have you checked the terms and conditions about using the Google logo in your application?

I have not looked into seeing whether they allow that or not, but since I actually altered the icon, I'm guessing not...

On the bright side, the logo does have a ™ after it, so I could probably put something in my application like:

Quote:

Google™ and the Google logo are trademarks of Google, inc. and are used for informational purposes only. This software is not endorsed or made by Google inc.

timsamoff 2009-09-16 02:30

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by BrentDC (Post 327508)
Thanks, Tim.

I notice that the gradient background is for shortcut icons, but is it also for actual applets? Thanks.

Good question. Usually there is so much ontent that you can't really tell -- although it is usually a translucent version of black (which looks a lot like those shortcuts). I'll take another screen shot and post it (probably tomorrow sometime).

Tim

BrentDC 2009-09-23 15:31

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by timsamoff (Post 327575)
Good question. Usually there is so much ontent that you can't really tell -- although it is usually a translucent version of black (which looks a lot like those shortcuts). I'll take another screen shot and post it (probably tomorrow sometime).

Tim

Small bump on that :)


I've also started a discussion on maemo-developers to get to the bottom of why the applet doesn't work on the device when installed to /usr/lib/hildon-home/.

yerga 2009-09-23 15:59

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by BrentDC (Post 332211)
Small bump on that :)


I've also started a discussion on maemo-developers to get to the bottom of why the applet doesn't work on the device when installed to /usr/lib/hildon-home/.

A quick note, I am not an expert in Home applets, but I think it should go to /usr/lib/hildon-desktop/

BrentDC 2009-09-24 01:39

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by yerga (Post 332229)
A quick note, I am not an expert in Home applets, but I think it should go to /usr/lib/hildon-desktop/

Yes -- thanks; it was a recent change in the python-hildondesktop bindings. I will (hopefully, barring to much work) release a new version this weekend. :)

@Tim: the screenshot will still be helpful, though. :)

NvyUs 2009-12-24 01:47

Re: TouchSearch for Fremantle
 
loving the new version of touchsearch with the colour setting and extra search engines
big thanks for your work.

YoDude 2009-12-27 00:53

Re: TouchSearch for Fremantle
 
Can you point to the file where the searches are stored? Google maps now points to twaelti 's Maemap...
No offense to anyone but that page does not work well if you have changed you view settings.

BrentDC 2009-12-27 19:08

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by YoDude (Post 442595)
Can you point to the file where the searches are stored? Google maps now points to twaelti 's Maemap...
No offense to anyone but that page does not work well if you have changed you view settings.

Sorry about that, I didn't think the regular Google Maps even worked because of the scrolling issue.

The search engine specifications are not stored in a seperate file, but are hard-coded directly in the source code (this will not be the case in the next version, I'm currently writing a front-end for user-inputted search engines) -- so that needs to be edited directly.

It isn't too hard to do that, but you need some sort of sftp in place to make it much less painful.

If you do have this, give this thread a bump and I will post a quick howto on how to do this (the actual source code editing is easy, just comment/uncomment one line, just what is needed to do it is the hard part: sftp, root access, etc.).

YoDude 2009-12-27 22:04

Re: TouchSearch for Fremantle
 
Bumped as requested... I can get to the belly of the beast. :)

BrentDC 2009-12-28 17:20

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by YoDude (Post 443277)
Bumped as requested... I can get to the belly of the beast. :)

Ready? Set? Go!
  1. SFTP into your N900 as root
  2. Navigate to /usr/lib/hildon-desktop/
  3. You should see a file called touchsearch.py, open it in a non-Windows specific editor (basically, anything other than Notepad)
  4. Scroll down to line 369

You should see this:

Code:

      elif engine == "Google Maps":
        icon = gtk.gdk.pixbuf_new_from_file_at_size(d + "google_maps.png", 122, 40)
        #url = "http://maps.google.com/maps?hl=en&tab=wl&q=%s"
        url = "http://tomch.com/maemaps.html?from=%s&go=1"

Remove the pound sign in front of the:
Code:

#url = "http://maps.google.com/maps?hl=en&tab=wl&q=%s"
line, and place it in front of the other url = line.

It should look like this:

Code:

      elif engine == "Google Maps":
        icon = gtk.gdk.pixbuf_new_from_file_at_size(d + "google_maps.png", 122, 40)
        url = "http://maps.google.com/maps?hl=en&tab=wl&q=%s"
        #url = "http://tomch.com/maemaps.html?from=%s&go=1"

Save the file.

Reboot.

Viola!

(if you reboot and TouchSearch doesn't work, you can uninstall/reinstall and try again -- but I'm sure that won't happen :))

twaelti 2009-12-28 20:02

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by YoDude (Post 442595)
No offense to anyone but that page does not work well if you have changed you view settings.

no problem :-) but please explain in more detail what you mean.
reason is that i would like to understand your needs to improve maemaps.
also, you can pre-configure maemaps quite well by passing query params and e.g. bookmark such a longer URL (maptype, from. autostart, traffic layer)

YoDude 2009-12-28 22:44

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by twaelti (Post 444227)
no problem :-) but please explain in more detail what you mean.
reason is that i would like to understand your needs to improve maemaps.
also, you can pre-configure maemaps quite well by passing query params and e.g. bookmark such a longer URL (maptype, from. autostart, traffic layer)

Unfortunately when you change the browser's global font size to large or extra large, maemaps screen elements do not render well.

I'm thinkin' it's not something you could correct easily with out writing a specific page for each browser font size.

***

BTW, BrentDC... changes worked like a charm. superb program, tight code. :)

twaelti 2009-12-29 21:39

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by YoDude (Post 444462)
Unfortunately when you change the browser's global font size to large or extra large, maemaps screen elements do not render well.
I'm thinkin' it's not something you could correct easily with out writing a specific page for each browser font size.

can you describe your setup so that i can try to recreate your environment? there are some CSS tricks left to be tried...

chakli 2009-12-31 00:05

Re: TouchSearch for Fremantle
 
@ dev or anybody who can develop apps....is it possible to add epocrates as a search engine??

YoDude 2009-12-31 03:10

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by chakli (Post 447388)
@ dev or anybody who can develop apps....is it possible to add epocrates as a search engine??

Getting a peek at BrentDC's code tells me that what he has planned will allow users to change or modify search strings very easily in future versions. :)
It should be just as easy, and use the same format as the custom searches that are used with the FireFox add on... Very cool.


***

@ Tom

As you may know the included browser on the N900 allows the user to globally set the text size. It is set to "normal" by default. For the visual challenged user (read geezers) "large" and "Very Large" are also available by touching the browsers menu bar (in reduced view), selecting "options", then "Adjust view", then "Text size".

I found that "large" works well for me and most pages adjust correctly with no need for side scrolling. However, some purpose built web pages like maeMaps may not always display correctly.

http://files.myopera.com/yodude/blog/maemaps-normal.png

^maeMaps shown @ "Normal" browser text size

http://files.myopera.com/yodude/blog/maemaps-xlarge.png

^maeMaps shown @ "Large" browser text size

http://files.myopera.com/yodude/blog/maemaps-large.png

^maeMaps shown @ "Very Large" browser text size

As we can see maeMaps in the "Normal" view is quite usable for everyone. The CSS "trick" could simply be to suppress what ever text info the browser passes to this page so that the "normal" view is displayed regardless of the size selected by the user.

Good luck and a big Thanks to you and BrentDC for spending your time in making our user experience more productive and enjoyable. :)

BrentDC 2009-12-31 03:50

Re: TouchSearch for Fremantle
 
Quote:

Originally Posted by chakli (Post 447388)
@ dev or anybody who can develop apps....is it possible to add epocrates as a search engine??

Hi,

Do you mean like this: http://search.epocrates.com/seek/cgi...query=headache

If so, then that will be extremely easy to add in the next version (locally by you, it most likely won't be builtin).

I literally have spent the last week writing an interface for adding, deleting, editing, and sorting Search Engines. I'll post some screenshots later, or maybe tomorrow of this beast :) (There is still a lot of polishing needed, but it is already really cool!)

fraaaaanka 2010-01-11 13:43

Re: TouchSearch for Fremantle
 
Hi There,
Using touchsearch i tried to add my own search for 'yell'
went through all the steps and it worked successfully apart from when i press the +button and select 'Yell' the icon i created does not appear on the widget (i just get a black box with the blue + sign on the right)
when i click the black box it then opens up the search bar with the logo i created on the left hand side.

My question is why am i not getting the logo on the desktop widget?

I created the icon using paint, the size is the specified 122x40, saved as a .png file.

Help is appreciated.


All times are GMT. The time now is 09:08.

vBulletin® Version 3.8.8