pidgin/pidginaddchatdialog.c

changeset 41860
9315e7772780
parent 41854
c1d7e7445b0f
child 41864
6f490dec468f
equal deleted inserted replaced
41859:ed82ab63d15a 41860:9315e7772780
98 GtkWidget *child = NULL; 98 GtkWidget *child = NULL;
99 GList *info = NULL; 99 GList *info = NULL;
100 GHashTable *defaults = NULL; 100 GHashTable *defaults = NULL;
101 gboolean focus_set = FALSE; 101 gboolean focus_set = FALSE;
102 102
103 account = pidgin_account_chooser_get_selected(PIDGIN_ACCOUNT_CHOOSER(dialog->account));
104 connection = purple_account_get_connection(account);
105 protocol = purple_account_get_protocol(account);
106
107 /* Clean up the dynamic box and our list of entires. */ 103 /* Clean up the dynamic box and our list of entires. */
108 while((child = gtk_widget_get_first_child(dialog->dynamic_box)) != NULL) { 104 while((child = gtk_widget_get_first_child(dialog->dynamic_box)) != NULL) {
109 gtk_box_remove(GTK_BOX(dialog->dynamic_box), child); 105 gtk_box_remove(GTK_BOX(dialog->dynamic_box), child);
110 } 106 }
111 g_clear_pointer(&dialog->inputs, g_list_free); 107 g_clear_pointer(&dialog->inputs, g_list_free);
112 108
109 account = pidgin_account_chooser_get_selected(PIDGIN_ACCOUNT_CHOOSER(dialog->account));
110 if(!PURPLE_IS_ACCOUNT(account)) {
111 return;
112 }
113
114 connection = purple_account_get_connection(account);
115 protocol = purple_account_get_protocol(account);
113 info = purple_protocol_chat_info(PURPLE_PROTOCOL_CHAT(protocol), 116 info = purple_protocol_chat_info(PURPLE_PROTOCOL_CHAT(protocol),
114 connection); 117 connection);
115 defaults = purple_protocol_chat_info_defaults(PURPLE_PROTOCOL_CHAT(protocol), 118 defaults = purple_protocol_chat_info_defaults(PURPLE_PROTOCOL_CHAT(protocol),
116 connection, 119 connection,
117 dialog->default_name); 120 dialog->default_name);

mercurial