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-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 08:07.

vBulletin® Version 3.8.8