diff options
author | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-06-11 17:34:34 +0800 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2013-06-11 17:34:34 +0800 |
commit | 37deb64980a9896e8748fb4cb0fc84c59b95bf89 (patch) | |
tree | a84e1de44411e6451ebb711e3af8da4d75152107 /src | |
parent | 7d395c53d8d2fb7f2a5fa496555cb09cbdaa0be9 (diff) | |
parent | 69cd22c4b53c2b25cf5a22180bfddf0784c8db33 (diff) | |
download | gsoc2013-empathy-37deb64980a9896e8748fb4cb0fc84c59b95bf89.tar.gz gsoc2013-empathy-37deb64980a9896e8748fb4cb0fc84c59b95bf89.tar.zst gsoc2013-empathy-37deb64980a9896e8748fb4cb0fc84c59b95bf89.zip |
Merge branch 'gnome-3-8'
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-new-chatroom-dialog.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c index 6ff365ce9..5edf45a5a 100644 --- a/src/empathy-new-chatroom-dialog.c +++ b/src/empathy-new-chatroom-dialog.c @@ -254,8 +254,8 @@ new_chatroom_dialog_model_setup (EmpathyNewChatroomDialog *self) /* Store/Model */ store = gtk_list_store_new (COL_COUNT, - G_TYPE_STRING, /* Invite */ - G_TYPE_STRING, /* Password */ + G_TYPE_STRING, /* Need password */ + G_TYPE_STRING, /* Invite only */ G_TYPE_STRING, /* Name */ G_TYPE_STRING, /* Room */ G_TYPE_STRING, /* Member count */ @@ -414,6 +414,12 @@ new_chatroom_dialog_got_room_cb (TpRoomList *room_list, const gchar *invite_only; gchar *tmp; + if (tp_str_empty (tp_room_info_get_handle_name (room))) + { + DEBUG ("Room handle name is empty - Broken CM"); + return; + } + DEBUG ("New room listed: %s (%s)", tp_room_info_get_name (room), tp_room_info_get_handle_name (room)); @@ -494,16 +500,26 @@ new_room_list_cb (GObject *source, gpointer user_data) { EmpathyNewChatroomDialog *self = user_data; + TpRoomList *room_list; GError *error = NULL; - self->priv->room_list = tp_room_list_new_finish (result, &error); - if (self->priv->room_list == NULL) + room_list = tp_room_list_new_finish (result, &error); + if (room_list == NULL) { DEBUG ("Failed to create TpRoomList: %s\n", error->message); g_error_free (error); return; } + if (tp_room_list_get_account (room_list) != self->priv->account) + { + /* Account changed while we were creating this TpRoomList */ + g_object_unref (room_list); + return; + } + + self->priv->room_list = room_list; + tp_g_signal_connect_object (self->priv->room_list, "got-room", G_CALLBACK (new_chatroom_dialog_got_room_cb), self, 0); tp_g_signal_connect_object (self->priv->room_list, "failed", @@ -527,7 +543,6 @@ new_room_list_cb (GObject *source, gtk_widget_set_sensitive (self->priv->expander_browse, TRUE); new_chatroom_dialog_update_widgets (self); - } static void |