View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#5
Originally Posted by puggan View Post
* The notification is showing a icon, a paper whit a red X, id like to repalce this icon.
* When i click the notification, somthing should happen, but i don't know what id like it to yet.
Code:
#! /usr/bin/env python2.5
# -*- coding: utf-8 -*-

import os
import sys
import gobject, dbus
import pynotify
from dbus.mainloop.glib import DBusGMainLoop

def cb (Notification=None, action=None, Data=None):
	pass

DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
pynotify.init(os.path.splitext(os.path.basename(sys.argv[0]))[0])
n = pynotify.Notification("Mail, mother****er!", "Call from Beelzebub", "general_clock")
n.set_hint_string("dbus-callback-default", "com.nokia.osso_browser /com/nokia/osso_browser com.nokia.osso_browser open_new_window string:\"callto://666\"")
n.add_action("default", "call", cb)
n.show()
Alas, Hildon Desktop is incredibly stupid and will only call services registered on the Session bus, so I had go through the browser.