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

« back to all changes in this revision

Viewing changes to libpurple/protocols/mxit/actions.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:
86
86
        /* validate name */
87
87
        name = purple_request_fields_get_string( fields, "name" );
88
88
        if ( ( !name ) || ( strlen( name ) < 3 ) ) {
89
 
                err = _( "The name you entered is invalid." );
 
89
                err = _( "The Display Name you entered is invalid." );
90
90
                goto out;
91
91
        }
92
92
 
113
113
 
114
114
                /* update name */
115
115
                g_strlcpy( profile->nickname, name, sizeof( profile->nickname ) );
116
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FULLNAME, CP_PROF_TYPE_UTF8, profile->nickname );
 
116
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FULLNAME, CP_PROFILE_TYPE_UTF8, profile->nickname );
117
117
                g_string_append( attributes, attrib );
118
118
                acount++;
119
119
 
120
120
                /* update hidden */
121
121
                field = purple_request_fields_get_field( fields, "hidden" );
122
122
                profile->hidden = purple_request_field_bool_get_value( field );
123
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_HIDENUMBER, CP_PROF_TYPE_BOOL, ( profile->hidden ) ? "1" : "0" );
 
123
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_HIDENUMBER, CP_PROFILE_TYPE_BOOL, ( profile->hidden ) ? "1" : "0" );
124
124
                g_string_append( attributes, attrib );
125
125
                acount++;
126
126
 
127
127
                /* update birthday */
128
 
                strcpy( profile->birthday, bday );
129
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_BIRTHDATE, CP_PROF_TYPE_UTF8, profile->birthday );
 
128
                g_strlcpy( profile->birthday, bday, sizeof( profile->birthday ) );
 
129
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_BIRTHDATE, CP_PROFILE_TYPE_UTF8, profile->birthday );
130
130
                g_string_append( attributes, attrib );
131
131
                acount++;
132
132
 
133
133
                /* update gender */
134
134
                profile->male = ( purple_request_fields_get_choice( fields, "male" ) != 0 );
135
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_GENDER, CP_PROF_TYPE_BOOL, ( profile->male ) ? "1" : "0" );
 
135
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_GENDER, CP_PROFILE_TYPE_BOOL, ( profile->male ) ? "1" : "0" );
136
136
                g_string_append( attributes, attrib );
137
137
                acount++;
138
138
 
141
141
                if ( !name )
142
142
                        profile->title[0] = '\0';
143
143
                else
144
 
                        strcpy( profile->title, name );
145
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_TITLE, CP_PROF_TYPE_UTF8, profile->title );
 
144
                        g_strlcpy( profile->title, name, sizeof( profile->title ) );
 
145
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_TITLE, CP_PROFILE_TYPE_UTF8, profile->title );
146
146
                g_string_append( attributes, attrib );
147
147
                acount++;
148
148
 
151
151
                if ( !name )
152
152
                        profile->firstname[0] = '\0';
153
153
                else
154
 
                        strcpy( profile->firstname, name );
155
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FIRSTNAME, CP_PROF_TYPE_UTF8, profile->firstname );
 
154
                        g_strlcpy( profile->firstname, name, sizeof( profile->firstname ) );
 
155
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_FIRSTNAME, CP_PROFILE_TYPE_UTF8, profile->firstname );
156
156
                g_string_append( attributes, attrib );
157
157
                acount++;
158
158
 
161
161
                if ( !name )
162
162
                        profile->lastname[0] = '\0';
163
163
                else
164
 
                        strcpy( profile->lastname, name );
165
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_LASTNAME, CP_PROF_TYPE_UTF8, profile->lastname );
 
164
                        g_strlcpy( profile->lastname, name, sizeof( profile->lastname ) );
 
165
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_LASTNAME, CP_PROFILE_TYPE_UTF8, profile->lastname );
166
166
                g_string_append( attributes, attrib );
167
167
                acount++;
168
168
 
171
171
                if ( !name )
172
172
                        profile->email[0] = '\0';
173
173
                else
174
 
                        strcpy( profile->email, name );
175
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_EMAIL, CP_PROF_TYPE_UTF8, profile->email );
 
174
                        g_strlcpy( profile->email, name, sizeof( profile->email ) );
 
175
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_EMAIL, CP_PROFILE_TYPE_UTF8, profile->email );
176
176
                g_string_append( attributes, attrib );
177
177
                acount++;
178
178
 
181
181
                if ( !name )
182
182
                        profile->mobilenr[0] = '\0';
183
183
                else
184
 
                        strcpy( profile->mobilenr, name );
185
 
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_MOBILENR, CP_PROF_TYPE_UTF8, profile->mobilenr );
 
184
                        g_strlcpy( profile->mobilenr, name, sizeof( profile->mobilenr ) );
 
185
                g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_MOBILENR, CP_PROFILE_TYPE_UTF8, profile->mobilenr );
186
186
                g_string_append( attributes, attrib );
187
187
                acount++;
188
188
 
225
225
        group = purple_request_field_group_new( NULL );
226
226
        purple_request_fields_add_group( fields, group );
227
227
 
228
 
        /* mxitId (read-only) */
229
 
        if ( session->mxitId ) {
230
 
                field = purple_request_field_string_new( "mxitid", _( "Your MXitId" ), session->mxitId, FALSE );
 
228
#if     0
 
229
        /* UID (read-only) */
 
230
        if ( session->uid ) {
 
231
                field = purple_request_field_string_new( "mxitid", _( "Your UID" ), session->uid, FALSE );
231
232
                purple_request_field_string_set_editable( field, FALSE );
232
233
                purple_request_field_group_add_field( group, field );
233
234
        }
 
235
#endif
234
236
 
235
237
        /* pin */
236
238
        field = purple_request_field_string_new( "pin", _( "PIN" ), session->acc->password, FALSE );
247
249
        /* birthday */
248
250
        field = purple_request_field_string_new( "bday", _( "Birthday" ), profile->birthday, FALSE );
249
251
        purple_request_field_group_add_field( group, field );
 
252
        if ( profile->flags & CP_PROF_DOBLOCKED )
 
253
                purple_request_field_string_set_editable( field, FALSE );
250
254
 
251
255
        /* gender */
252
256
        field = purple_request_field_choice_new( "male", _( "Gender" ), ( profile->male ) ? 1 : 0 );