Active Topics

 



Notices


Reply
Thread Tools
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#41
Having been working on/with the GCDialer glade-2 doesn't hold a candle to glade-3 in terms of usability. PyGTK seems light on documentation especially when it comes to Hildon/Maemo specific stuff though. It has been hair-pulling aggravting trying to track down things that, to me, seem like they should be trivial. Some of those issues have been how to set hildon input hints so that a field is numeric, phone, or non caps, how to properly use gconf through python, and gtk builder ( which was backported to PyMaemo ).

I've also switched to converting my glade to gtk builder xml which seems faster and better supported now and moving forward. The switch to gtkbuilder was rather trivial once you find some examples.
 
Posts: 1 | Thanked: 0 times | Joined on Jul 2008
#42
Has anyone tried associating mailto-links to dbus-switchboard. I would like to start claws-mail when clicking mailto-links and I have followed the instructions as per mms on the first post in this thread. When I run dbus-switchboard in the X-terminal and click a mailto-link it doesn't print any messages (apart from a start notification).

Any help is appreciated.

/Lars
 
Posts: 1 | Thanked: 1 time | Joined on May 2008
#43
I was having problems with evince not being able to open certain PDF files by association. Worked fine if I opened it from the app, though.

A little figuring out, and running '/usr/bin/dbus-switchboard.py' in xterm revealed that a comma character (,) was causing it to choke. A lot of my PDF files have commas in them, so time to start hacking!

Turns out, the solution is very easy. Find the following text on line 19 of the aforementioned script. (If you don't know how to edit the script, read up on it in this thread.)

Code:
    argstr = argstr.replace("%20", " ")
Basically, you need one of these lines for every non-alphanumeric character that you have in your filenames. "%20" is the hex url-encoded character, and " " (space) is the corresponding character.

Simply copy that line and paste it right below, then make the appropriate changes:

Code:
    argstr = argstr.replace("%20", " ")
    argstr = argstr.replace("%2C", ",")
Keep it going for any other characters that are causing problems. That's it!

BTW, looks like there's no urldecode() function in Python like there is in PHP.


- Sushi
(sponsored by: Heavy metal themed gifts and clothing at Savage Dominion)

Last edited by sushi3; 2008-07-05 at 02:29.
 

The Following User Says Thank You to sushi3 For This Useful Post:
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#44
Thanks sushi3, i'll add that to next release. Thanks also for confirming that the hack is needed since i was wondering if there was a better way to decode... maybe i'll borrow some user made function in future.

lars : i tried doing this today without much luck (still went to modest in diablo) so i'm not sure where that setting is coming from. I'll keep looking but even if i find it im not certain mailto links are practical for dbus-switchboard... you would probably need a script to parse out email (possibly subject) and have claws support support invoking a new mail via command line.

You probably would have better luck (and i'll try this next) : using -firefox- settings for associating claws as outlined here :
http://www.claws-mail.org/faq/index....ail_program.3F

Last edited by pipeline; 2008-07-05 at 03:34.
 
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#45
I have posted a new version 1.2.0 of dbus-switchboard which includes
- A new gui editor (created by hvacengi) for managing the config files (thanks!)
- Updated the installer to offer to add sample mime types to /usr/share/applications/defaults.list (still need to enable them by uncommenting). This is just for avi, torrent, midi, and application/octet-stream so you may not want to add anything if your already configured, but this makes setup quicker on fresh installs.
- Added apps handlers suggested by lars, debernardis.
- Added comma-fix mentioned by sushi.

So dbus-switchboard has an icon now, its almost a real app !

Thanks hvacengi for creating the user interface, its not only easier to use but easier to change xref on the fly (in case we get multiple handlers for same file extension).

If for some reason the gui wont load, it could be you have an old chinook firmware or old python install. If you dont want to upgrade python or chinook then edit (as root), /usr/lib/python2.5/site-packages/dbus_switchboard_gui.py and change line 15 from :
Code:
        gtk.set_application_name("")
Code:
        #gtk.set_application_name("")
 

The Following 3 Users Say Thank You to pipeline For This Useful Post:
Posts: 132 | Thanked: 40 times | Joined on Jun 2008
#46
Is anyone else having problems making mplayer the default handler for avi after upgrading diablo to the new diablo (4.2008.30-2). Mine keeps defaulting to the default player.
 
Posts: 1 | Thanked: 0 times | Joined on Sep 2008
#47
I seem to have encountered an issue passing a URL through dbus-switchboard to its handler. It looks as though either microb or dbus-switchboard is cutting off URL arguments. So when I click on a sample link:

http://www.test.com/test.avi?foo=bar&bar=foo

I see the following in dbus-switchboard.py:

dbus-switchboard started
osso_test_receiver: Received an RPC to mime_open.
osso_test_receiver: RPC had arguments http://www.test.com/test.avi.
MPlayer 1.0rc1-maemo.29.n8x0 (C) 2000-2006 MPlayer Team
CPU: ARM
Internet Tablet OS version: RX-34+RX-44+RX-48_DIABLO_4.2008.30-2_PR_MR0

[MENU] Can't open menu config file: /home/user/.mplayer/menu.conf
Menu inited: /etc/mplayer/menu.conf

Playing http://www.test.com/test.avi.
Resolving www.test.com for AF_INET...
Connecting to server www.test.com[x.x.x.x]: ...
http_read_response read 0 (i.e. EOF).
STREAM_ASF, URL: http://www.test.com/test.avi
Resolving www.test.com for AF_INET...
Connecting to server www.test.com[x.x.x.x]: ...
read: Operation now in progress
Failed, exiting.
Resolving www.test.com for AF_INET...
Connecting to server www.test.com[x.x.x.x]: ...
http_read_response read 0 (i.e. EOF).
File not found: 'www.test.com/test.avi'
Failed to open http://www.test.com/test.avi.


Exiting... (End of file)

If I run the same from the terminal:

mplayer "http://www.test.com/test.avi?foo=bar&bar=foo" it streams correctly.

Any idea how I can get the entire string passed to mplayer via dbus-switchboard?

Thanks!
 
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#48
I updated dbus-switchboard to version 1.2.1. It no longer requires manual editing as root for many of the file types (usually those not already associated are automatically supported now).

I added support for XLS and CSV (Gnumeric), and DOC (I wrote a script to use antiword to convert to pdf and then i launch osso-pdfviewer to display it.

Bittorrent, midi, comix, iso should also be supported with no editing.

If you have already installed Abiword on you default maemo filesystem, then there might be mime type you need to add like msword but i uninstalled abiword and rebooted and it went to switchboard using octec-stream (unknown). So it works 'easily' as doc viewer only if you don't have abiword installed on maemo (debian abiword wont interfere and you can actually add that as a handler for DOCs too)

So if you install gnumeric and antiword (i have link for an antiword build in 1st post although i know there are others around), then you can view DOC files and XLS files which you get on the web or on device. If you get them as email attachments, you may (or may not) have to save and then click on them in osso file manager.

Persons who already edited the defaults.list (on their current flash) may or may not need to add the mime types if they are already set.... but the 'active' mime types which i add now should be ok to have dups of.

Last edited by pipeline; 2008-10-08 at 00:25.
 

The Following User Says Thank You to pipeline For This Useful Post:
Posts: 134 | Thanked: 57 times | Joined on Mar 2008 @ South Bend IN
#49
Very cool, I'll download and have a look at it. I always liked this app, thanks for working on it pipeline!
 

The Following User Says Thank You to hvacengi For This Useful Post:
pipeline's Avatar
Posts: 693 | Thanked: 502 times | Joined on Jul 2007
#50
Originally Posted by hvacengi View Post
Very cool, I'll download and have a look at it. I always liked this app, thanks for working on it pipeline!
Not only am i leveraging other people's apps but i didnt even write the UI I am proud of the glue tho! Anyone seen the bubble messages... yea that was me
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:45.