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

« back to all changes in this revision

Viewing changes to finch/gntaccount.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:
125
125
 
126
126
        if (value == NULL || *value == '\0')
127
127
        {
128
 
                purple_notify_error(NULL, _("Error"), _("Account was not added"),
 
128
                purple_notify_error(NULL, _("Error"),
 
129
                                dialog->account ? _("Account was not modified") : _("Account was not added"),
129
130
                                _("Username of an account must be non-empty."));
130
131
                return;
131
132
        }
160
161
                account = dialog->account;
161
162
 
162
163
                /* Protocol */
163
 
                purple_account_set_protocol_id(account, purple_plugin_get_id(plugin));
164
 
                purple_account_set_username(account, username->str);
 
164
                if (purple_account_is_disconnected(account)) {
 
165
                        purple_account_set_protocol_id(account, purple_plugin_get_id(plugin));
 
166
                        purple_account_set_username(account, username->str);
 
167
                } else {
 
168
                        const char *old = purple_account_get_protocol_id(account);
 
169
                        char *oldprpl;
 
170
                        if (strcmp(old, purple_plugin_get_id(plugin))) {
 
171
                                purple_notify_error(NULL, _("Error"), _("Account was not modified"),
 
172
                                                _("The account's protocol cannot be changed while it is connected to the server."));
 
173
                                return;
 
174
                        }
 
175
 
 
176
                        oldprpl = g_strdup(purple_normalize(account, purple_account_get_username(account)));
 
177
                        if (g_utf8_collate(oldprpl, purple_normalize(account, username->str))) {
 
178
                                purple_notify_error(NULL, _("Error"), _("Account was not modified"),
 
179
                                                _("The account's username cannot be changed while it is connected to the server."));
 
180
                                g_free(oldprpl);
 
181
                                return;
 
182
                        }
 
183
                        g_free(oldprpl);
 
184
                        purple_account_set_username(account, username->str);
 
185
                }
165
186
        }
166
187
        g_string_free(username, TRUE);
167
188
 
245
266
                }
246
267
        }
247
268
 
 
269
        /* In case of a new account, the 'Accounts' window is updated from the account-added
 
270
         * callback. In case of changes in an existing account, we need to explicitly do it
 
271
         * here.
 
272
         */
 
273
        if (dialog->account != NULL && accounts.window) {
 
274
                gnt_tree_change_text(GNT_TREE(accounts.tree), dialog->account,
 
275
                                0, purple_account_get_username(dialog->account));
 
276
                gnt_tree_change_text(GNT_TREE(accounts.tree), dialog->account,
 
277
                                1, purple_account_get_protocol_name(dialog->account));
 
278
        }
 
279
 
248
280
        gnt_widget_destroy(dialog->window);
249
281
}
250
282
 
603
635
        button = gnt_button_new(_("Cancel"));
604
636
        gnt_box_add_widget(GNT_BOX(hbox), button);
605
637
        g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gnt_widget_destroy), window);
606
 
        
 
638
 
607
639
        button = gnt_button_new(_("Save"));
608
640
        gnt_box_add_widget(GNT_BOX(hbox), button);
609
641
        g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(save_account_cb), dialog);