~ubuntu-branches/ubuntu/quantal/pidgin/quantal

« back to all changes in this revision

Viewing changes to libpurple/protocols/mxit/mxit.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-08-11 14:16:15 UTC
  • mfrom: (1.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20100811141615-lsqya0vlqrnu14lo
Tags: 1:2.7.3-1ubuntu1
* Resync on Debian, workaround build issue (lp:#600952) 
* debian/control:
  - Build-Depends on liblaunchpad-integration-dev
  - Drop libpurple0 dependency from libpurple-bin
  - Drop pidgin-data dependency from libpurple0
  - Recommends pidgin-libnotify
* debian/libpurple0.symbols: 
  - add epochs
* debian/patches/02_lpi.patch:
  - launchpad integration
* debian/patches/04_let_crasher_for_apport.patch:
  - stop catching the SIGSEGV signal and let apport handle it
* debian/patches/05_default_to_irc_ubuntu_com.patch:
  - set the default IRC server to irc.ubuntu.com
* debian/patches/10_docklet_default_off.patch:
  - default behavior to have no notification area icon.
* debian/patches/11_buddy_list_really_show.patch:
  - the buddy list tries harder to appear.  This fixes some issues with it
    not appearing.
* debian/patches/ 13_sounds_and_timers.patch:
  - adjusts the time out for sounds to be 15 seconds, 
    which helps get fewer spurious login notifications on slow connections.
* debian/patches/60_1024x600_gtk*.c.patch: 
  - add scrollbars into preferences and pounce dialogs
* debian/prefs.xml: 
  - Update to set the notify plugin prefs /plugins/gtk/X11/notify/*, 
    set /pidgin/plugins/loaded to load the notify plugin and enable 
    the standard logging options by default
* debian/rules:
  - install a launcher in the message indicator
  - set translation domain and update template
  - use simple-patchsys rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
        if ( !account )
92
92
                goto skip;
93
93
        con = purple_account_get_connection( account );
 
94
        if ( !con )
 
95
                goto skip;
94
96
 
95
97
        /* determine if it's a command-response to send */
96
98
        is_command = g_str_has_prefix( parts[4], "::type=reply|" );
145
147
 
146
148
 
147
149
/*------------------------------------------------------------------------
148
 
 * Unegister MXit from receiving URI click notifications from the UI
 
150
 * Unregister MXit from receiving URI click notifications from the UI
149
151
 */
150
152
static void mxit_unregister_uri_handler()
151
153
{
203
205
        if ( find_active_chat( session->active_chats, who ) )
204
206
                return;
205
207
 
206
 
        /* determite if this buddy is a MXit service */
 
208
        /* determine if this buddy is a MXit service */
207
209
        switch ( contact->type ) {
208
210
                case MXIT_TYPE_BOT :
209
211
                case MXIT_TYPE_CHATROOM :
559
561
{
560
562
        struct MXitSession*             session                 = (struct MXitSession*) gc->proto_data;
561
563
        const char*                             profilelist[]   = { CP_PROFILE_BIRTHDATE, CP_PROFILE_GENDER, CP_PROFILE_FULLNAME,
562
 
                                                                                                CP_PROFILE_FIRSTNAME, CP_PROFILE_LASTNAME, CP_PROFILE_REGCOUNTRY };
 
564
                                                                                                CP_PROFILE_FIRSTNAME, CP_PROFILE_LASTNAME, CP_PROFILE_REGCOUNTRY, CP_PROFILE_LASTSEEN,
 
565
                                                                                                CP_PROFILE_STATUS, CP_PROFILE_AVATAR };
563
566
 
564
567
        purple_debug_info( MXIT_PLUGIN_ID, "mxit_get_info: '%s'\n", who );
565
568
 
578
581
 
579
582
        table = g_hash_table_new( g_str_hash, g_str_equal );
580
583
 
581
 
        g_hash_table_insert( table, "login_label", (gpointer)_( "Your Mobile Number..." ) );
 
584
        g_hash_table_insert( table, "login_label", (gpointer)_( "Your MXit ID..." ) );
582
585
 
583
586
        return table;
584
587
}
585
588
 
 
589
 
 
590
/*------------------------------------------------------------------------
 
591
 * Buddy list menu.
 
592
 *
 
593
 *  @param node         The entry in the buddy list.
 
594
 */
 
595
static GList* mxit_blist_menu( PurpleBlistNode *node )
 
596
{
 
597
        PurpleBuddy*            buddy;
 
598
        struct contact*         contact;
 
599
        GList*                          m = NULL;
 
600
 
 
601
        if ( !PURPLE_BLIST_NODE_IS_BUDDY( node ) )
 
602
                return NULL;
 
603
 
 
604
        buddy = (PurpleBuddy *) node;
 
605
        contact = purple_buddy_get_protocol_data( buddy );
 
606
        if ( !contact )
 
607
                return NULL;
 
608
 
 
609
        return m;
 
610
}
 
611
 
586
612
/*========================================================================================================================*/
587
613
 
588
614
static PurplePluginProtocolInfo proto_info = {
594
620
                32, 32,                                                                                         /* min width & height */
595
621
                MXIT_AVATAR_SIZE,                                                                       /* max width */
596
622
                MXIT_AVATAR_SIZE,                                                                       /* max height */
597
 
                100000,                                                                                         /* max filezize */
 
623
                100000,                                                                                         /* max filesize */
598
624
                PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY      /* scaling rules */
599
625
        },
600
626
        mxit_list_icon,                 /* list_icon */
602
628
        mxit_status_text,               /* status_text */
603
629
        mxit_tooltip,                   /* tooltip_text */
604
630
        mxit_status_types,              /* status types                         [roster.c] */
605
 
        NULL,                                   /* blist_node_menu */
 
631
        mxit_blist_menu,                /* blist_node_menu */
606
632
        mxit_chat_info,                 /* chat_info                            [multimx.c] */
607
633
        NULL,                                   /* chat_info_defaults */
608
634
        mxit_login,                             /* login                                        [login.c] */