Active Topics

 



Notices


Reply
Thread Tools
Posts: 42 | Thanked: 1 time | Joined on Jun 2010
#71
Can anyone tell me where Pidgin saves the conversation logs? Can I transfer them to my computer to read at a later date?
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#72
Originally Posted by Bookishwitch View Post
Can anyone tell me where Pidgin saves the conversation logs? Can I transfer them to my computer to read at a later date?
they're in: ~/.purple/logs/

of course can you transfer them to your computer.
the easiest thing would be to symlink them to a folder which you can access from your pc - for example the documents-folder.

--------------------------------------------------------------

can anyone tell me how the "n.set_hint_string" is read by the system?
i mean in the example if i click the notification the string is being read and the browser opens up and shows me the number.
now i would love to know what the system doing with the strings written in this command?

-------------------------------------------------------------

i wrote some additional code for vibrating the phone when showing the notification. if someone is interested i could post it.

i think you can (nearly) do all the things from this site:
http://wiki.maemo.org/User:Jebba/DBUS
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#73
Originally Posted by mase View Post
Is it possible to start pidgin automatically when booting?
yep.
just write a startup script and put it in the event.d folder
(search for "startup event.d" or something)
 
sytheii's Avatar
Posts: 57 | Thanked: 10 times | Joined on Jun 2010
#74
Originally Posted by b666m View Post
(close pidgin)
open up xterm and type "cd .purple" and then "rm status.xml".
all the old status messages should be gone at the next pidgin startup.



most linux distributions use init.d for those kind of work.
maemo uses startup - event.d.
there you have to create a startup-file like this:
Code:
start on started hildon-desktop
script 
        run-standalone.sh /usr/bin/pidgin
end script
(you can name the script whatever you want - for example "pidginautostart")
this file you have to place in: /etc/event.d
(the path would be: /etc/event.d/pidginautostart )



just chill.
maybe a little bit cleaning up would help.
if you aren't lazy and haven't got any problems to type in all of your accounts again then just try following:

(close pidgin)
open up xterm and type "cd .purple" and then "rm *xml".
(your logs aren't affected by doing this)
your pidgin should be pretty virgin at the next start and will ask you for your accounts.

if you are lazy with creating accounts, you have to type some more lines in xterm:
1. cd .purple
2. mv accounts.xml accounts.bak
3. rm *xml
4. mv accounts.bak accounts.xml

if your pidgin doesn't work correctly after this you can try to uninstall it completely via the program manager.
after uninstalling it, open up xterm and type "rm -r .purple".
this will delete all of your preferences including your log-files.
(if you want to save your log-files then do a "cp -r .purple/logs pidgin/" first)
then install pidgin again, fire it up and recreate your accounts. it should be fine now - everything else wouldn't make any sense ^^.
(if you saved your logs in the way i described above you can restore them in xterm by "cp -r pidgin/logs .purple/" and "rm -r pidgin/")

have fun (:
I know its been a while since I asked this question, but i forgot I originally posted here, and I wanted to thank you for those instructions, they worked great! I also went ahead and cleaned up my friends list anyways...and after doing that, it turns out that having the plugin for conversations isn't that bad after all, so I'm just gonna go with that.

Thanks again!
__________________
Can you see them?
 
Posts: 5 | Thanked: 0 times | Joined on Jul 2010
#75
Originally Posted by b666m View Post
they're in: ~/.purple/logs/

of course can you transfer them to your computer.
the easiest thing would be to symlink them to a folder which you can access from your pc - for example the documents-folder.

--------------------------------------------------------------

can anyone tell me how the "n.set_hint_string" is read by the system?
i mean in the example if i click the notification the string is being read and the browser opens up and shows me the number.
now i would love to know what the system doing with the strings written in this command?

-------------------------------------------------------------

i wrote some additional code for vibrating the phone when showing the notification. if someone is interested i could post it.

i think you can (nearly) do all the things from this site:
http://wiki.maemo.org/User:Jebba/DBUS
hmm the vribration notification sounds nice, could u post it?
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#76
Originally Posted by Bizzey View Post
hmm the vribration notification sounds nice, could u post it?
here you go:

Code:
#!/usr/bin/env python

def showconv_cb (n, action):
	# assert action == "showconv"
	print "Click :D"
	n.close()

def my_func(account, sender, message, conversation, flags):

	if bus.pidginbus.PurpleConversationHasFocus(conversation) == 0:

		name = str(sender.split("@")[0])
		buddy = bus.pidginbus.PurpleFindBuddy(account,name)
		alias = bus.pidginbus.PurpleBuddyGetAlias(buddy)
		#icon = bus.pidginbus.PurpleBuddyGetIcon(buddy)
		#icon_path = bus.pidginbus.PurpleBuddyIconGetFullPath(icon)
		proto = bus.pidginbus.PurpleAccountGetProtocolName(account)
		#proid = bus.pidginbus.PurpleAccountGetProtocolId(account)
		conv = str(conversation)

		if alias == "":
			alias = name

		msg = message

		if proto == "XMPP":
			msg = msg[6:-7]
		
		elif proto == "MSN":
			col = msg.find("COLOR")
			if col > -1:
				msg = msg[col+16:-14]

		msg = msg.replace("\n"," ")
		msg = "\""+msg
		if len(msg) > 32:
			msg = msg[:33]+"...\""
		else:
			msg = msg+"\""			

		print conv+":", alias, "("+sender+") said \""+message+"\" in proto", proto
		#with icon at", icon_path, "in conv", conv

        pynotify.init(os.path.splitext(os.path.basename(sys.argv[0]))[0])
	n = pynotify.Notification(alias+" ("+proto+")",msg,"pidgin")
        n.set_hint_string("default","im.pidgin.purple.PurpleService /im/pidgin/purple/PurpleObject im.pidgin.purple.PurpleInterface.PurpleConversationPresent int32:"+conv)
        # 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("showconv", "ShowConv Action", showconv_cb)
        n.set_timeout(3000)
        n.show()

        sbus.mcebus.req_vibrator_pattern_activate("PatternChatAndEmail")

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()
sbus = dbus.SystemBus()

obj = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
bus.pidginbus = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")

objv = sbus.get_object("com.nokia.mce", "/com/nokia/mce/request")
sbus.mcebus = dbus.Interface(objv, "com.nokia.mce.request" )

bus.add_signal_receiver(my_func,
                        dbus_interface="im.pidgin.purple.PurpleInterface",
                        signal_name="ReceivedImMsg")

loop = gobject.MainLoop()
loop.run()
EDIT1: Code updated because of false indents

Last edited by b666m; 2010-07-07 at 18:14.
 

The Following User Says Thank You to b666m For This Useful Post:
Posts: 5 | Thanked: 0 times | Joined on Jul 2010
#77
Originally Posted by b666m View Post
here you go:

Code:
#!/usr/bin/env python

def showconv_cb (n, action):
	assert action == "showconv"
	print "Click :D"
	n.close()

def my_func(account, sender, message, conversation, flags):

	if bus.pidginbus.PurpleConversationHasFocus(conversation) == 0:

		name = str(sender.split("@")[0])
		buddy = bus.pidginbus.PurpleFindBuddy(account,name)
		alias = bus.pidginbus.PurpleBuddyGetAlias(buddy)
		#icon = bus.pidginbus.PurpleBuddyGetIcon(buddy)
		#icon_path = bus.pidginbus.PurpleBuddyIconGetFullPath(icon)
		proto = bus.pidginbus.PurpleAccountGetProtocolName(account)
		#proid = bus.pidginbus.PurpleAccountGetProtocolId(account)
		conv = str(conversation)

		if alias == "":
			alias = name

		msg = message

		if proto == "XMPP":
			msg = msg[6:-7]
		
		elif proto == "MSN":
			col = msg.find("COLOR")
			if col > -1:
				msg = msg[col+16:-14]

		msg = msg.replace("\n"," ")
		msg = "\""+msg
		if len(msg) > 32:
			msg = msg[:33]+"...\""
		else:
			msg = msg+"\""			

		print alias, "("+sender+") said \""+message+"\" in proto", proto
		#with icon at", icon_path, "in conv", conv

        # 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(alias+" ("+proto+")",msg,"pidgin")
        # -------------------------
        # 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","im.pidgin.purple.PurpleService /im/pidgin/purple/PurpleObject        im.pidgin.purple.PurpleInterface purple_conversation_present int32:"+conv)
        # 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("showconv", "ShowConv Action", showconv_cb)
        n.set_timeout(3000)
        # or do i have to make an "add_action" for the notification?
        # maybe i can just put three NULL arguments there ^^
        # ------------------------
        n.show()

        bus.mcebus.ReqVibratorPatternActivate("PatternChatAndEmail")

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")

objv = bus.get_object("com.nokia.mce.request", "/com/nokia/mce/request")
bus.mcebus = dbus.Interface(objv, "com.nokia.mce" )

bus.add_signal_receiver(my_func,
                        dbus_interface="im.pidgin.purple.PurpleInterface",
                        signal_name="ReceivedImMsg")

loop = gobject.MainLoop()
loop.run()
ty for postin but some reason it doesnt work... the other 1 you posted before this worked..
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#78
Originally Posted by Bizzey View Post
ty for postin but some reason it doesnt work... the other 1 you posted before this worked..
is there any error-message when executing it?

something like "unexpected indent"? then please write down the line of this error.

maybe the formatting has gone wrong when pasting the code over here.

i updated the code above. please try again.
 
Posts: 5 | Thanked: 0 times | Joined on Jul 2010
#79
Originally Posted by b666m View Post
is there any error-message when executing it?

something like "unexpected indent"? then please write down the line of this error.

maybe the formatting has gone wrong when pasting the code over here.

i updated the code above. please try again.
the updated code is working ty for a quick reply, if someone could make a pidgin plugin of this code that would be great
 
Posts: 958 | Thanked: 483 times | Joined on May 2010
#80
Since Pidgin now supports the OCS protocol, anyone has any idea if someone is porting it to be a protocol plugin for the built-in messaging application? I don't really want to run Pidgin on my phone as I'm quite happy with the internal messaging app. However, i do use OCS at my office.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:50.