Update of /cvsroot/gaim/gaim/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29375
Modified Files:
gtkaccount.c
Log Message:
When adding a new account, set the status before enabling it.That way, the correct status ends up being used, and you don't run into a a weird situation where the account tries to connect and then the offline status is appled when your current status is 'Offline'. Also a warning fix.
Index: gtkaccount.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkaccount.c,v
retrieving revision 1.207
retrieving revision 1.208
diff -u -d -p -r1.207 -r1.208
--- gtkaccount.c 15 Nov 2005 08:42:03 -0000 1.207
+++ gtkaccount.c 17 Nov 2005 04:42:16 -0000 1.208
@@ -965,8 +965,8 @@ add_protocol_options(AccountPrefsDialog
GtkWidget *check;
GtkWidget *entry;
GtkWidget *combo;
- GList *list;
- GList *node;
+ const GList *list;
+ const GList *node;
gint i, idx;
GtkListStore *model;
GtkTreeIter iter;
@@ -1623,12 +1623,16 @@ ok_account_prefs_cb(GtkWidget *w, Accoun
/* If this is a new account, then sign on! */
if (new) {
const char *current_savedstatus_name;
- const GaimSavedStatus *saved_status;
+ const GaimSavedStatus *saved_status = NULL;
- gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE);
current_savedstatus_name = gaim_prefs_get_string("/core/status/current");
- saved_status = gaim_savedstatus_find(current_savedstatus_name);
- gaim_savedstatus_activate_for_account(saved_status, account);
+ if (current_savedstatus_name)
+ saved_status = gaim_savedstatus_find(current_savedstatus_name);
+
+ if (saved_status) {
+ gaim_savedstatus_activate_for_account(saved_status, account);
+ gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE);
+ }
}
return account;
@@ -2339,7 +2343,7 @@ account_treeview_double_click_cb(GtkTree
gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, COLUMN_DATA, &account, -1);
if ((account != NULL) && (event->button == 1) &&
- (event->type == GDK_2BUTTON_PRESS) &&
+ (event->type == GDK_2BUTTON_PRESS) &&
(strcmp(gtk_tree_view_column_get_title(column), title)))
{
gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account);
|