| 156 require_password = purple_account_get_require_password(editor->account); |
156 require_password = purple_account_get_require_password(editor->account); |
| 157 |
157 |
| 158 if(purple_account_is_connected(editor->account)) { |
158 if(purple_account_is_connected(editor->account)) { |
| 159 gtk_widget_set_sensitive(editor->username, FALSE); |
159 gtk_widget_set_sensitive(editor->username, FALSE); |
| 160 } |
160 } |
| 161 } else { |
|
| 162 /* If we don't have an account reset the fields that are static. */ |
|
| 163 pidgin_protocol_chooser_set_protocol(PIDGIN_PROTOCOL_CHOOSER(editor->protocol), |
|
| 164 NULL); |
|
| 165 gtk_editable_set_text(GTK_EDITABLE(editor->username), ""); |
|
| 166 } |
161 } |
| 167 |
162 |
| 168 /* Now remove the rows we added to the preference group for each non |
163 /* Now remove the rows we added to the preference group for each non |
| 169 * constant user split. |
164 * constant user split. |
| 170 */ |
165 */ |
| 1306 purple_account_get_protocol(editor->account)); |
1301 purple_account_get_protocol(editor->account)); |
| 1307 |
1302 |
| 1308 g_signal_connect_object(account, "notify::connection", |
1303 g_signal_connect_object(account, "notify::connection", |
| 1309 G_CALLBACK(pidgin_account_editor_connection_changed_cb), |
1304 G_CALLBACK(pidgin_account_editor_connection_changed_cb), |
| 1310 editor, 0); |
1305 editor, 0); |
| |
1306 } else { |
| |
1307 /* If we don't have an account reset the fields that are static. */ |
| |
1308 pidgin_protocol_chooser_set_protocol(PIDGIN_PROTOCOL_CHOOSER(editor->protocol), |
| |
1309 NULL); |
| |
1310 gtk_editable_set_text(GTK_EDITABLE(editor->username), ""); |
| 1311 } |
1311 } |
| 1312 |
1312 |
| 1313 g_object_notify_by_pspec(G_OBJECT(editor), properties[PROP_ACCOUNT]); |
1313 g_object_notify_by_pspec(G_OBJECT(editor), properties[PROP_ACCOUNT]); |
| 1314 } |
1314 } |
| 1315 |
1315 |