The Following User Says Thank You to puggan For This Useful Post: | ||
|
2010-06-13
, 20:19
|
Posts: 4 |
Thanked: 1 time |
Joined on Jun 2010
|
#2
|
|
2010-06-13
, 20:32
|
|
Posts: 1,091 |
Thanked: 323 times |
Joined on Feb 2010
@ ~
|
#3
|
|
2010-06-13
, 21:19
|
Posts: 6 |
Thanked: 2 times |
Joined on Jun 2010
@ Sweden
|
#4
|
Wow, this could prove useful since I also live in Sweden
I'll be monitoring this thread.
|
2010-06-13
, 23:51
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#5
|
* 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.
#! /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()
|
2014-02-07
, 09:16
|
Posts: 958 |
Thanked: 483 times |
Joined on May 2010
|
#6
|
Tags |
caller, d-bus, online, python |
|
Why:
I wanted to know who was calling even if i didn't have them in my abook.
So far:
I got a python script, that lisen for incoming calls on dbus.
When it gets a number it ask my webserver for the name of that number (my server ask a few swedish sites for the name of the number) and return the name to python
Python then makes a Notification whit the name.
Left to do:
* Id like this to be run in background somehow, having it in a terminal work nice for debuging, but i prefer somthing less visible later.
* 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: