~micahg/ubuntu/natty/pidgin/2.7.9-2

« back to all changes in this revision

Viewing changes to libpurple/protocols/mxit/profile.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:
101
101
 
102
102
 
103
103
/*------------------------------------------------------------------------
 
104
 * Returns timestamp field in date & time format (DD-MM-YYYY HH:MM:SS)
 
105
 *
 
106
 * @param msecs         The timestamps (milliseconds since epoch)
 
107
 * @return                      Date & Time in a display'able format.
 
108
 */
 
109
static const char* datetime( gint64 msecs )
 
110
{  
 
111
    time_t secs = msecs / 1000;
 
112
 
 
113
    struct tm t;
 
114
    localtime_r( &secs, &t );
 
115
 
 
116
        return purple_utf8_strftime( "%d-%m-%Y %H:%M:%S", &t );
 
117
}
 
118
 
 
119
 
 
120
/*------------------------------------------------------------------------
104
121
 * Display the profile information.
105
122
 *
106
123
 *  @param session              The MXit session object
120
137
                contact = purple_buddy_get_protocol_data(buddy);
121
138
        }
122
139
 
123
 
        purple_notify_user_info_add_pair( info, _( "Nick Name" ), profile->nickname );
 
140
        purple_notify_user_info_add_pair( info, _( "Display Name" ), profile->nickname );
124
141
        purple_notify_user_info_add_pair( info, _( "Birthday" ), profile->birthday );
125
142
        purple_notify_user_info_add_pair( info, _( "Gender" ), profile->male ? _( "Male" ) : _( "Female" ) );
126
143
//      purple_notify_user_info_add_pair( info, _( "Hidden Number" ), profile->hidden ? _( "Yes" ) : _( "No" ) );
138
155
                /* presence */
139
156
                purple_notify_user_info_add_pair( info, _( "Status" ), mxit_convert_presence_to_name( contact->presence ) );
140
157
 
 
158
                /* last online */
 
159
                if ( contact->presence == MXIT_PRESENCE_OFFLINE )
 
160
                        purple_notify_user_info_add_pair( info, _( "Last Online" ), ( profile->lastonline == 0 ) ? _( "Unknown" ) : datetime( profile->lastonline ) );
 
161
 
141
162
                /* mood */
142
163
                if ( contact->mood != MXIT_MOOD_NONE )   
143
164
                        purple_notify_user_info_add_pair( info, _( "Mood" ), mxit_convert_mood_to_name( contact->mood ) );
153
174
 
154
175
                /* hidden number */
155
176
                purple_notify_user_info_add_pair( info, _( "Hidden Number" ), ( contact->flags & MXIT_CFLAG_HIDDEN ) ? _( "Yes" ) : _( "No" ) );
156
 
 
157
177
        }
158
178
 
159
179
        purple_notify_userinfo( session->con, username, info, NULL, NULL );