Active Topics

 



Notices


Reply
Thread Tools
Posts: 26 | Thanked: 2 times | Joined on Apr 2010
#41
Figured I would follow up on my most recent complaints in case some one was suffering from the same issues. I unchecked the "use SSL" box and voila, my AIM account was functional.
 
sytheii's Avatar
Posts: 57 | Thanked: 10 times | Joined on Jun 2010
#42
edit: decided to make my own thread since these questions dont have anything to do with led lights....

http://talk.maemo.org/showthread.php...512#post722512

Quick question about pidgin if anyone knows an answer...

a. In my status selector, you now, available, away, etc. I at one point typed something in there for status, but made a few mistakes on what to put in there...and now i have like 3 or for poorly worded status on there, including the one that I initially wanted to make. I looked around, but i cant seem to find a way to GET RID OF THEM! there is an option for new status, or saved status, but i never went to the new button to create any...so why are they stuck there??? Its really aggravating.

b.Also, i started using pidgin because of the obvious reasons, it doesn't clutter your normal contacts, but one thing i have not been able to discover is a way to make pidgin start on phone start-up...seems like this should be an option somewhere...or can i program my phone through xserver to make it do this?

c. And, i noticed something else that is rather agravating! After a clean reboot of the phone(power off and on) Pidgin is not running yet. I go to pidgin, and start it up, and then i just get a black screen, that includes the phone status bar n clock at the top. If i hit the top left desktop button, it will show an active window for buddy list, but there is nothing in it. If i click on that, it then shows me a blank desktop screen ( ie my wallpaper ) with the phone status n clock, but what i guess is actually happening, is that pidgin is really there, but none of pidgin is displaying, its invisible, cause if i click on any of the space on that screen, say...where one of my buddies might be, i get a new to: message box to that buddy! if i close that window, which i can actually see, then pidgin just goes back to being invisible! ARGGG!!!

edit: it seems that if i go to the pidgin status plugin from the main phone status tile to access pidgin, after initial start of pidgin, the invisibility glitch is corrected...but again, that is a whole 'nother step that i should not have to do!
help.

Any help would be greatly appreciated. thanks

Last edited by sytheii; 2010-06-20 at 10:30.
 
Posts: 19 | Thanked: 2 times | Joined on Jun 2010
#43
Originally Posted by b666m View Post
problem solved:

just go to ~/.purple and delete "prefs.xml".

a new prefs.xml will be created on next pidgin startup.

it seems that old/false preferences are responsible for this error.

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

popups on maemo? i don't know...

the only thing i can imagine:
using dbus to show the messages

(the theme-colored banners which appear when something important happens - i hope you know what i mean xD)
I mean, when you get an SMS at the top left appears a little bar/popup or something like that. Is that possible with pidgin? Cause I get it with integrated msn, but I really prefered pidgin.

Thanks!
 
mase's Avatar
Posts: 355 | Thanked: 205 times | Joined on Jun 2010 @ Germany
#44
Is it possible to start pidgin automatically when booting?
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#45
Originally Posted by sytheii View Post
a. ... but i cant seem to find a way to GET RID OF THEM!
(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.

b. ...or can i program my phone through xserver to make it do this?
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 )

c. ... ARGGG!!!
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 (:
 

The Following User Says Thank You to b666m For This Useful Post:
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#46
Originally Posted by basvhout View Post
I mean, when you get an SMS at the top left appears a little bar/popup or something like that. Is that possible with pidgin? Cause I get it with integrated msn, but I really prefered pidgin.

Thanks!
this bar/popup/banner is called through dbus afaik.

dbus commands can be easily sent - for example in xterm:
Code:
dbus-send-notification "foo bar boo bah bang"
(for some fun with dbus take a look at: http://wiki.maemo.org/User:Jebba/DBUS )

mhm... unfortunately i don't know how to program plugins for pidgin but maybe i will take a short look into it ^^

it can't be this hard ;D

(in "normal" pidgin there is something similar done with libnotify which unfortunately isn't available in pidgin - but you may have just to change the libnotify-call to a dbus-call ^^)
 

The Following User Says Thank You to b666m For This Useful Post:
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#47
SUMMARY:
tried to port the nowplayingd project to a pidginnotifyd project ^^
this means that after all there should be a libnotify notification when someone writes you.
unfortunately i hadn't too much time - so this is just quick and dirty.
one important thing to do would be programming a function which looks up if there is an fullscreen app (like browser) opened - and ONLY then make a notification - a notification on every message like it would be now would be a total overkill.
(maybe you could make a preferences-file which states when the notification should show up and can be easily edited by the user)
(but in my opinion: if no fullscreen-app is opened the statusbar plugin which shows a little icon when someone wrote you is already good enough for this job)

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

i tried to do some coding on the notify thingy:
HAVEN'T TESTED IT YET - JUST WRITTEN TOGETHER SOME STUFF!

Code:
#include <glib.h>
#include <glib-object.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <hildon/hildon-notification.h>

#include "marshal.h"  /* The file generated from marshal.list via tool glib-genmarshal */

/* pidgin dbus station name */
#define DBUS_SERVICE_PURPLE      "im.pidgin.purple.PurpleService"
#define DBUS_PATH_PURPLE         "/im/pidgin/purple/PurpleObject"
#define DBUS_INTERFACE_PURPLE    "im.pidgin.purple.PurpleInterface"

/* global dbus instance */
DBusGConnection *bus;
DBusGProxy *purple_proxy;

/* Main event loop */
GMainLoop *loop = NULL;

/* Signal callback handling routing */
void received_im_msg_cb (DBusGProxy *purple_proxy, int account_id, 
                         const char *sender, const char *message, 
                         int conv_id, unsigned int flags,
                         gpointer user_data)
{
    HildonNotification *n = NULL;

    n = hildon_notification_new( sender, message, "pidgin", "network" );
    
    /* maybe someone can find an dbus call for bringing the current conversation
       window to foreground when being clicked - using the "com.nokia.SOMETHING" interface */
    /* an example for using the pidgin interface - not tried yet ^^ */
    /* hildon_notification_add_dbus_action( n, "default", "pidgin",
        DBUS_SERVICE_PURPLE,
        DBUS_PATH_PURPLE,
        DBUS_INTERFACE_PURPLE,
        "$METHOD", // see http://developer.pidgin.im/wiki/DbusHowto#CallingPidginmethods for methods?!
        G_TYPE_NONE, NULL,
        -1 ); */
		
    notify_notification_show( NOTIFY_NOTIFICATION( n ), NULL );
    g_timeout_add_seconds( 2, close_notification, n );  
}

/*
 * The main process, loop waiting for any signals
 */
int main (int argc, char **argv)
{
    GError *error = NULL;
    
    g_type_init ();

    /* Get the bus */
    bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
    if (bus == NULL) {
        g_printerr("Failed to open connection to bus: %s", error->message);
        g_error_free(error);
        return -1;
    }

    /* Create a proxy object for the bus driver */
    purple_proxy = dbus_g_proxy_new_for_name (bus,
                                              DBUS_SERVICE_PURPLE,
                                              DBUS_PATH_PURPLE,
                                              DBUS_INTERFACE_PURPLE);
    
    if (!purple_proxy) {
        g_printerr("Couldn't connect to the Purple Service: %s", error->message);
        g_error_free(error);
        return -1;
    }

    /* Create the main loop instance */
    loop = g_main_loop_new (NULL, FALSE);

    /* Register dbus signal marshaller */
    dbus_g_object_register_marshaller(marshal_VOID__INT_STRING_STRING_INT_UINT, 
                                      G_TYPE_NONE, G_TYPE_INT, G_TYPE_STRING, 
                                      G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT, 
                                      G_TYPE_INVALID);
        
    /* Add the signal to the proxy */
    dbus_g_proxy_add_signal(purple_proxy, "ReceivedImMsg", 
                            G_TYPE_INT, G_TYPE_STRING, G_TYPE_STRING, 
                            G_TYPE_INT, G_TYPE_UINT, G_TYPE_INVALID);

    /* Connect the signal handler to the proxy */
    dbus_g_proxy_connect_signal(purple_proxy, "ReceivedImMsg",
                                G_CALLBACK(received_im_msg_cb), bus, NULL);

    /* Main loop */
    g_main_loop_run (loop);

    return 0;
}
thanks to timu and his nowplayingd project for the notification example in his source-code.
and a special thanks to the guys over at http://developer.pidgin.im/wiki/DbusHowto - don't know who has written this howto but it's nearly what i was looking for (:

maybe someone can look into this code and improve it - maybe compile it too - THIS WOULD BE VERY APPRECIATED ;D

this code is meant to be run as a daemon like nowplayingd:

Code:
#!/bin/sh                                                                                                
DAEMON=/usr/bin/pidginnotifyd
DSMETOOL=/usr/sbin/dsmetool
DSMETOOL_PARAMETERS="-t"

$DSMETOOL $DSMETOOL_PARAMETERS $DAEMON
NO WARRANTY FOR THIS ONE!
(maybe someone will be inspired by this quick&dirty code ^^)

Last edited by b666m; 2010-06-23 at 16:58.
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#48
so... back from watching germany against ghana *yay*

tried following code on my laptop and ran it as script:
Code:
void received_im_msg_cb (DBusGProxy *purple_proxy, int account_id, 
                         const char *sender, const char *message, 
                         int conv_id, unsigned int flags,
                         gpointer user_data)
{
    g_print("Account %d receives msg \"%s\" from %s\n",   
            account_id, message, sender);
}
and that was what my console showed me:
Code:
b666m@xb666mx:~/pidgin$ ./pidginnotifyd 
Account 1100 receives msg "-" from xxx767xxx
(i xxx'ed out some numbers to save my contact from your spam :P)
but hey.. i get the data i want to get for the notification

so the notification should show on top the number of your contact and under this the message - and of course the pidgin-logo. (don't know the maximum length of it and what happens if it exceeds it ^^)
would look like:


four things would be to-do:
1. convert the number to the name of the contact (should be easy)
2. check the length of the message and cut it (add "..." at the end)
3. replace the pidgin-icon by the contact's photo (don't know if it's possible because the photos are stored with a very cryptic name)
4. by clicking the notification bring the conversation to foreground (this would be the hardest (impossible) thing to do ^^)

will see what i can do (:
 

The Following User Says Thank You to b666m For This Useful Post:
NokiaRocks's Avatar
Posts: 658 | Thanked: 117 times | Joined on Jan 2010
#49
Thanx for you effort !
 
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#50
OMG
FORGET TO LINK "pidgin"
NOW THE FUNCTIONS WORK FINE
IGNORE THE REST OF THE POST xD
--------------------------------------------


i found some interesting functions in the "account.h" file of libpurple.
and i tried to use them but i get an error when trying to compile the code.

include:
Code:
#include <libpurple/account.h>
(the file is in place and found by the compiler)

example of function declaration in account.h:
Code:
const char *purple_account_get_alias(const PurpleAccount *account);
(do i have to do something more then just calling the function in my code?)

callback with the functions declared in account.h:
Code:
/* Signal callback handling routing */
void received_im_msg_cb (DBusGProxy *purple_proxy, int account_id, 
                         const char *sender, const char *message, 
                         int conv_id, unsigned int flags,
                         gpointer user_data)
{

/* need to inlcude "account.h" for following functions */
const PurpleAccount *account;
const char *alias;
const char *icon_path;
const char *protocol;

// PurpleAccount *purple_accounts_find_any(const char *name, const char *protocol);
// PurpleAccount *purple_accounts_find_connected(const char *name, const char *protocol);
account = purple_accounts_find(sender, NULL);

/* get the alias */
alias = purple_account_get_alias(account); 
/* get the icon path */
icon_path = purple_account_get_buddy_icon_path(account); 
/* get the protocol name */
protocol = purple_account_get_protocol_name(account);

    g_print("Account %d receives msg \"%s\" from %s\n",   
            account_id, message, sender);
    
    g_print("Alias %s, Path %s, Protocol %s", alias, icon_path, protocol);
}
(am i declaring my variables (account, alias, icon_path, protocol) in the right way?)

my compiler command:
Code:
sudo gcc -MMD -Wall -ggdb -O `pkg-config --cflags dbus-1 glib-2.0 dbus-glib-1` `pkg-config --libs dbus-1 glib-2.0 dbus-glib-1` marshal.c pidginnotifyd.c -o pidginnotifyd
(am i missing something here? like linking the pidgin-dev lib..?!)

and this is the error i get:
Code:
/tmp/ccVoXEPd.o: In function `received_im_msg_cb':
/home/b666m/pidgin/pidginnotifyd.c:37: undefined reference to `purple_accounts_find'
/home/b666m/pidgin/pidginnotifyd.c:40: undefined reference to `purple_account_get_alias'
/home/b666m/pidgin/pidginnotifyd.c:42: undefined reference to `purple_account_get_buddy_icon_path'
/home/b666m/pidgin/pidginnotifyd.c:44: undefined reference to `purple_account_get_protocol_name'
collect2: ld returned 1 exit status
(what is meant by "undefined reference to"? the function is declared in account.h)

help, please (:

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

the correct compiler command:
Code:
sudo gcc -MMD -Wall -ggdb -O `pkg-config --cflags dbus-1 glib-2.0 dbus-glib-1 pidgin` `pkg-config --libs dbus-1 glib-2.0 dbus-glib-1 pidgin` marshal.c pidginnotifyd.c -o pidginnotifyd

Last edited by b666m; 2010-06-24 at 14:17.
 
Reply


 
Forum Jump


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