![]() |
2010-06-24
, 03:16
|
Posts: 42 |
Thanked: 1 time |
Joined on Jun 2010
|
#52
|
![]() |
2010-06-24
, 14:00
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#53
|
This really annoys me. I want my status to read 'Available' even if I don't have the app on the screen at the moment (it's running, I'm just looking at something else). Is there any way to make it keep my status as 'Available' all the time?
![]() |
2010-06-24
, 14:35
|
Posts: 42 |
Thanked: 1 time |
Joined on Jun 2010
|
#54
|
mhm... don't know why this is happening... but maybe there's a function which sets your status to idle when losing focus or screen goes off...
then you could try to set your away-status:
when you see your buddylist do a CTRL + P on your keyboard.
this will open up the preferences.
now click with your finger on the dot on the right side of the screen (on the right side of "proxy").
then the list should scroll to the right where you can find a tab called "status/idle".
just uncheck the box next to "change to this status when idle".
does that work?! (:
![]() |
2010-06-24
, 16:14
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#55
|
just because they want a STRUCT and not an INT as parameter.
has anyone any idea how to solve this problem? :/
why does pidgin say that it sends a struct and my monitor recognizes an integer?
and are there maybe any cool G_TYPE_xxx for getting structs from dbus?
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
![]() |
2010-06-24
, 16:34
|
Posts: 323 |
Thanked: 76 times |
Joined on Jan 2010
|
#56
|
![]() |
2010-06-24
, 18:25
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#57
|
Here's the major difference: The function takes a struct; the method call takes an PurpleAccount in the form of an int32, which is what the RecievedImMsg signal gives you.
#!/usr/bin/env python #def cb (Notification=None, action=None, Data=None): #pass def my_func(account, sender, message, conversation, flags): buddy = bus.pidginbus.PurpleFindBuddy(account,str(sender.split("@")[0])) name = bus.pidginbus.PurpleBuddyGetAlias(buddy) icon = bus.pidginbus.PurpleBuddyGetIcon(buddy) icon_path = bus.pidginbus.PurpleBuddyIconGetFullPath(icon) print name, "("+sender+") said \""+message+"\" with icon at", icon_path # it's only commented out for test-reasons because i only try it on ubuntu and console with print # pynotify.init(os.path.splitext(os.path.basename(sys.argv[0]))[0]) # n = pynotify.Notification(name, "\""+message+"\"", icon_path) # ------------------------- # maybe the next two lines can be used for bringing the conversation window to the foreground # when the notification is being clicked by the user # if that is not possible: comment them out or delete them (no use for them) # 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) # or do i have to make an "add_action" for the notification? # maybe i can just put three NULL arguments there ^^ # ------------------------ #n.show() import os import sys import gobject, dbus import pynotify from dbus.mainloop.glib import DBusGMainLoop dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject") bus.pidginbus = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface") bus.add_signal_receiver(my_func, dbus_interface="im.pidgin.purple.PurpleInterface", signal_name="ReceivedImMsg") loop = gobject.MainLoop() loop.run()
b666m@xb666mx:~/pidgin$ python python/pidginnotifyd.py ICH (xxx597xxx) said "test 123" with icon at /home/b666m/.purple/icons/5b9c4725ac17458f93a6960b0e05368ec9fa382f.jpg
The Following User Says Thank You to b666m For This Useful Post: | ||
![]() |
2010-06-25
, 00:16
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#58
|
![]() |
2010-06-25
, 07:11
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#59
|
1. callback function when notification is clicked doesn't work / isn't called - only the notification closes (would be cool if we could get the conversation window to foreground)
2. the buddy avatars are stored as ".jpg" - maybe pynotify only accepts ".png"?! - using the pidgin icon instead
3. icq looks ok but msn sends formatted messages like ""<FONT FACE="Times"><FONT COLOR="#000000">Hi!</FONT></FONT>" so there is some work needed to extract the message. haven't tested xmpp and other protocols yet.
![]() |
2010-06-25
, 11:34
|
|
Posts: 1,090 |
Thanked: 476 times |
Joined on Jan 2010
@ Ingolstadt, Germany
|
#60
|
I guess Pidgin isn't emitting the signal in that case. Are there alternatives?
I couldn't find a function to show the window corresponding to the conversation.
Notifications under Maemo *only* support a D-Bus callback.
You could implement a service in the script, too, and set up the callback to point to your service which'd go through the windows and bring it to the top with the Xlib API... :\
Only thing is, python-xlib is lame so you'd have to resort to ctypes and I have no idea how to implement a D-Bus service in python-dbus (dbus-glib, however); but I think Totem has a Python plugin implementing a remote control service in python-dbus.
According to the Icon Theme Specification, only PNG, XPM and SVG are supported.
I believe this is using a workaround for the same issue: http://ubuntuforums.org/showthread.php?t=1201310
Python probably has such a function to shorten. The sad thing here is that the small notification is able to display more characters than the one in the Dashboard so it's a compromise. :\
The Following User Says Thank You to b666m For This Useful Post: | ||
the dbus signal from pidgin looks like:
so my marshaller has to look like:
that's why i can't use these three very cool functions:
has anyone any idea how to solve this problem? :/
why does pidgin say that it sends a struct and my monitor recognizes an integer?
and are there maybe any cool G_TYPE_xxx for getting structs from dbus?