Active Topics

 


Reply
Thread Tools
Posts: 29 | Thanked: 7 times | Joined on May 2010 @ Frankfurt, Germany
#1
I recently got an N900 and have just about come to grips with synching my contacts and calendars to it from my Mac using iSync - now I'd like to use my own address book entry for 'my information' on the N900. Googling only found one guy with the same problem but no solution. Is this at all possible, or do I have to type everything again?
If using an existing contacts entry is not possible, maybe someone could point out to me where 'my information' is stored, so I can try to find a workaround?
Thanks in advance!
Manuel
 
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#2
i'm interested, too.
 
Posts: 29 | Thanked: 7 times | Joined on May 2010 @ Frankfurt, Germany
#3
Okay, since I wanted to look into programming the N900 anyway, I hacked together a quick fix that works for me. Basically, I stitched together code from here and the Maemo 5 developers guide. I came up with the following code
Code:
/* gcc -Wall --std=gnu99 setmyinfo.c -o setmyinfo $(pkg-config --cflags --libs libosso-abook-1.0) $(pkg-config --cflags --libs glib-2.0) */
#include <glib/glist.h>
#include <libosso-abook/osso-abook.h>

int main(int argc, char** argv)
{
    osso_context_t *osso_cxt = osso_initialize (argv[0], "1.0", FALSE, NULL);
    osso_abook_init (&argc, &argv, osso_cxt);

    GtkWidget *chooser;
    GList *selection;

    chooser = osso_abook_contact_chooser_new (NULL, "Choose a contact to use for 'My information'");

    gtk_dialog_run (GTK_DIALOG (chooser));
    gtk_widget_hide (chooser);

    selection = osso_abook_contact_chooser_get_selection
            (OSSO_ABOOK_CONTACT_CHOOSER (chooser));

    if (selection) {
//            GList *l = selection;
            OssoABookContact *mergewith = selection->data;
//            g_printf ("%s\n", osso_abook_contact_get_display_name(selection->data));

            OssoABookSelfContact *myself = osso_abook_self_contact_get_default();
            OssoABookContact *myinfo = OSSO_ABOOK_CONTACT(myself);

            osso_abook_contact_reset(myinfo, mergewith);
            osso_abook_contact_commit(myinfo,0,NULL,NULL);
    } else {
//            g_printf ("Nothing selected\n");
    }

    g_list_free (selection);

    gtk_widget_destroy (chooser);

    osso_deinitialize (osso_cxt);

    exit(0);
}
For some reason, when I compile that for ARM in the SDK it depends on librtcom-eventlogger.so.0 which is not present on my PR1.2 N900, but symlinking this to librtcom-eventlogger.so.1 works for me.
If I run that from the Terminal via 'run-standalone.sh ./setmyinfo' it presents me with a contact selector. Info from the selected contact is then used without further confirmation to overwrite any manually entered information in 'My information'. I ended up with duplicate entries for the email addresses I have configured on the N900, but apart from that it worked for me.
The usual precautions apply, of course: No warranties, this may break your phone, by all means backup your contacts before you try this, etc., etc, etc.
I've attached a zipfile with the code and the compiled executable.
Attached Files
File Type: zip setmyinfo.zip (4.4 KB, 56 views)
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:05.