|
|
2010-09-30
, 05:23
|
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#2
|
|
|
2010-09-30
, 05:58
|
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#3
|
ok, sorry guys i didn't know i should have to use dbus & mime types. can someone be so kind and help me find the dbus-send command for opening a file in calendar?
| The Following User Says Thank You to AlMehdi For This Useful Post: | ||
|
|
2010-09-30
, 07:18
|
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#4
|
def on_actionSync_triggered(self):
import os
self.cal.parse_events()
try:
os.system('dbus-send --type=method_call --dest=com.nokia.calendar /com/nokia/calendar com.nokia.calendar.mime_open string:"file:///$1"')
except: print "you should be using me on maemo5"
|
|
2010-09-30
, 10:51
|
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#5
|
|
|
2010-09-30
, 11:15
|
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#6
|
method call sender=:1.301 -> dest=com.nokia.calendar serial=17 path=/com/nokia/calendar; interface=com.nokia.calendar; member=mime_open string "file:///home/user/MyDocs/todoy.ics"
|
|
2010-09-30
, 12:48
|
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#7
|
|
|
2010-09-30
, 16:42
|
|
Posts: 161 |
Thanked: 85 times |
Joined on Feb 2010
|
#8
|
signal sender=org.freedesktop.DBus -> dest=:1.145 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.145"
method call sender=:1.145 -> dest=org.freedesktop.DBus serial=3 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='method_call'"
method call sender=:1.145 -> dest=org.freedesktop.DBus serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='method_return'"
method call sender=:1.145 -> dest=org.freedesktop.DBus serial=5 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
string "type='error'"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=29 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.146"
string ""
string ":1.146"
method call sender=:1.146 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.146 -> dest=org.gtk.vfs.Daemon serial=2 path=/org/gtk/vfs/mounttracker; interface=org.gtk.vfs.MountTracker; member=listMountableInfo
method return sender=:1.9 -> dest=:1.146 reply_serial=2
array [
struct {
string "sftp"
string "sftp"
array [
string "ssh"
]
int32 22
boolean true
}
struct {
string "http"
string "http"
array [
]
int32 0
boolean false
}
struct {
string "trash"
string "trash"
array [
]
int32 0
boolean false
}
struct {
string "obex"
string "obex"
array [
]
int32 0
boolean false
}
struct {
string "computer"
string "computer"
array [
]
int32 0
boolean false
}
struct {
string "network"
string "network"
array [
]
int32 0
boolean false
}
struct {
string "dav"
string "dav"
array [
]
int32 0
boolean false
}
struct {
string "localtest"
string "localtest"
array [
]
int32 0
boolean false
}
struct {
string "ftp"
string "ftp"
array [
]
int32 21
boolean true
}
struct {
string "burn"
string "burn"
array [
]
int32 0
boolean false
}
]
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=30 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string ":1.147"
string ""
string ":1.147"
method call sender=:1.147 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=31 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
string "com.nokia.osso-filemanager"
string ""
string ":1.147"
method call sender=:1.147 -> dest=org.freedesktop.DBus serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RequestName
string "com.nokia.osso-filemanager"
uint32 1
method call sender=:1.147 -> dest=com.nokia.calendar serial=3 path=/com/nokia/calendar; interface=com.nokia.calendar; member=mime_open
string "file:///home/user/.todoy/todoy.ics"
method call sender=:1.147 -> dest=com.nokia.HildonDesktop.AppMgr serial=4 path=/com/nokia/HildonDesktop/AppMgr; interface=com.nokia.HildonDesktop.AppMgr; member=LaunchApplication
string ""
method return sender=:1.35 -> dest=:1.147 reply_serial=4
method return sender=:1.144 -> dest=:1.147 reply_serial=3
error sender=:1.144 -> dest=:1.147 error_name=org.freedesktop.DBus.Error.UnknownMethod reply_serial=3
string "Method "mime_open" with signature "s" on interface "com.nokia.calendar" doesn't exist
"
|
|
2010-09-30
, 19:59
|
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#9
|
just in case someone else looks for it this is how to use it in a python function. The bold part is the dbus call.
Code:def on_actionSync_triggered(self): import os self.cal.parse_events() try: os.system('dbus-send --type=method_call --dest=com.nokia.calendar /com/nokia/calendar com.nokia.calendar.mime_open string:"file:///$1"') except: print "you should be using me on maemo5"
import os
import dbus
bus = dbus.SessionBus()
proxy=bus.get_object('com.nokia.calendar','/com/nokia/calendar')
iface=dbus.Interface(proxy,dbus_interface='com.nokia.calendar')
iface.mime_open('file:///home/user/MyDocs/GermanHolidays.ics')
| The Following User Says Thank You to nicolai For This Useful Post: | ||
So the question is: what are file bindings or whatever they're called, that we can launch skipping file-manager? ie: can we use the sharing file fun. from outside? etc.
Last edited by erniadeldesktop; 2010-09-30 at 12:41. Reason: more pertinent title