static gboolean gaim_connection_disconnect_cb(gpointer data) { GaimAccount *account = data; char *password = g_strdup(gaim_account_get_password(account)); gaim_account_disconnect(account); gaim_account_set_password(account, password); g_free(password); return FALSE; }
static void dologin(GtkWidget *widget, GtkWidget *w) { GaimAccount *account; GtkWidget *item; const char *password = gtk_entry_get_text(GTK_ENTRY(pass)); item = gtk_menu_get_active(GTK_MENU(gtk_option_menu_get_menu(GTK_OPTION_MENU(name)))); account = g_object_get_data(G_OBJECT(item), "account"); if (!account) { gaim_notify_error(NULL, NULL, _("Please create an account."), NULL); return; } gaim_account_set_password(account, (*password != '\0') ? password : NULL); #ifdef GAIM_SMALL_SCREEN account->ui_data = vbox_toplevel; #endif gaim_account_connect(account); }
static void request_pass_ok_cb(GaimAccount *account, const char *entry) { gaim_account_set_password(account, (*entry != '\0') ? entry : NULL); gaim_account_connect(account); }