summaryrefslogtreecommitdiff
path: root/src/empathy-new-chatroom-dialog.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-06-26 14:49:13 +0100
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-01 14:19:40 +0100
commitdd54eb8205f1cd12267af127dab79297c0edc469 (patch)
tree3655199cf98837b6f46c45bf4aba813458a50077 /src/empathy-new-chatroom-dialog.c
parentf3d6fcb79762ff484c8b7221cec1079b0dad7fb7 (diff)
downloadempathy-dd54eb8205f1cd12267af127dab79297c0edc469.tar.gz
Port the main of empathy to EmpathyAccount
Diffstat (limited to 'src/empathy-new-chatroom-dialog.c')
-rw-r--r--src/empathy-new-chatroom-dialog.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index da90cbb49..e16da91a7 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -33,7 +33,6 @@
#include <glib/gprintf.h>
#include <libmissioncontrol/mission-control.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-profile.h>
#include <libempathy/empathy-tp-roomlist.h>
@@ -358,14 +357,14 @@ static void
new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog)
{
EmpathyAccountChooser *account_chooser;
- McAccount *account;
+ EmpathyAccount *account;
McProfile *profile;
const gchar *protocol;
const gchar *room;
account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
account = empathy_account_chooser_dup_account (account_chooser);
- profile = mc_account_get_profile (account);
+ profile = empathy_account_get_profile (account);
protocol = mc_profile_get_protocol_name (profile);
gtk_entry_set_text (GTK_ENTRY (dialog->entry_server), "");
@@ -399,12 +398,13 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
EmpathyNewChatroomDialog *dialog)
{
EmpathyAccountChooser *account_chooser;
- McAccount *account;
+ EmpathyAccount *account;
gboolean listing = FALSE;
gboolean expanded = FALSE;
if (dialog->room_list) {
g_object_unref (dialog->room_list);
+ dialog->room_list = NULL;
}
ephy_spinner_stop (EPHY_SPINNER (dialog->throbber));
@@ -412,6 +412,9 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
account = empathy_account_chooser_dup_account (account_chooser);
+ if (account == NULL)
+ goto out;
+
dialog->room_list = empathy_tp_roomlist_new (account);
if (dialog->room_list) {
@@ -444,9 +447,10 @@ new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
}
}
- new_chatroom_dialog_update_widgets (dialog);
-
g_object_unref (account);
+
+out:
+ new_chatroom_dialog_update_widgets (dialog);
}
static void