Notices


Reply
Thread Tools
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#1
I have a file (gnumeric spreadsheet .xls) that I use multiple times a day; sometimes while on the phone. I am trying to make a QBW icon to open said file.

I have unsuccessfully tried a few commands and finally got it to work using:

/usr/bin/browser_dbuscmd.sh load_url file:///myflie | echo ""

Only problem being it opens the default browser (firefox) and asks if I want to open/save/nothing this file. This uses a shed load of processing power and takes a while espically when on the phone to a customer.

The other way is to create a shortcut to gnumeric and open the file using recently used.

But is it possible to get my QBW to just open my file?
Thanks in advance.

Last edited by sixwheeledbeast; 2010-12-26 at 14:31.
 
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#2
Install https://garage.maemo.org/frs/downloa...le-1_armel.deb and pass your file's path to it as the first argument. Else just try "gnumeric myfile"
 

The Following User Says Thank You to jstokes For This Useful Post:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#3
gnumeric home/user/MyDocs/.documents/Myfile.xls | echo ""

Works a treat in QBW, cheers.

Last edited by sixwheeledbeast; 2010-12-26 at 14:30.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Posts: 5 | Thanked: 2 times | Joined on Dec 2010
#4
Originally Posted by sixwheeledbeast View Post
Works a treat in QBW, cheers.
Please pay attention to the following effect:

If you open the file in that way, QBW is waiting for the application shutdown. That means QBW widget shows progress animation all the time while the application is running. Progress animation stops when you close the application.
Showing the animation is no problem generally, but the cpu usage you will rise during the time QBW waits for the application close.

Don't know, if this behaviour can be reproduced on any other device than mine.
On my systen (without overclocking) the average cpu usage is 10% higher, while QBW waits for application.

So, if you just open/close the file immediately - no poblem. If you leaf the file opened the whole day - have a look at the described effect, battery drain will rise.

The right way to start an application (without having QBW to wait for application shutdown) is to use DBUS. Unfortunately I haven't figured out how to pass a file to gnumeric - additional DBUS parameters doesn't work here. I worry that gnumeric is not able to receive parameters by DBUS.

DBUS:
dbus-send --type=method_call --dest=com.nokia.HildonDesktop.AppMgr /com/nokia/HildonDesktop/AppMgr com.nokia.HildonDesktop.AppMgr.LaunchApplication string:"gnumeric"

http://wiki.maemo.org/Queen_BeeCon_W...FSizes_buttons
 
Posts: 235 | Thanked: 339 times | Joined on Nov 2010
#5
Originally Posted by Psioneer View Post
I worry that gnumeric is not able to receive parameters by DBUS.
It is. If you look at its source, you will see that it calls osso_mime_set_cb to set a callback function that will be invoked if the program is started with the mime_open D-Bus method - this is how you, once you've registered a MIME type, get libhildonmime etc. to pass the filename to the program.

Try:
dbus-send --print-reply --dest=com.nokia.gnumeric /com/nokia/gnumeric com.nokia.gnumeric.mime_open string:'file://myfile'
 

The Following 2 Users Say Thank You to jstokes For This Useful Post:
Posts: 5 | Thanked: 2 times | Joined on Dec 2010
#6
Originally Posted by jstokes View Post
Try:
dbus-send --print-reply --dest=com.nokia.gnumeric /com/nokia/gnumeric com.nokia.gnumeric.mime_open string:'file://myfile'
Thanks for the hint!
Works flawless...
 

The Following User Says Thank You to Psioneer For This Useful Post:
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#7
Originally Posted by jstokes View Post
It is. If you look at its source, you will see that it calls osso_mime_set_cb to set a callback function that will be invoked if the program is started with the mime_open D-Bus method - this is how you, once you've registered a MIME type, get libhildonmime etc. to pass the filename to the program.

Try:
dbus-send --print-reply --dest=com.nokia.gnumeric /com/nokia/gnumeric com.nokia.gnumeric.mime_open string:'file://myfile'
This doesn't seem to work for me, gnumeric opens with a "no such file or directory".

gnumeric home/user/MyDocs/.documents/Myfile.xls | echo ""

Still works so I am sure the path is correct.

Also I assume all my QBW internet bookmarks need changing to DBUS too, these are all currently

fennec "www.myurlhere.com"

Any ideas on DBUS commands for Fennec?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:47.