diff options
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 18 | ||||
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 14 |
2 files changed, 17 insertions, 15 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index b17dca72f..cbc2a1cbc 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -31,7 +31,7 @@ #include <glib/gi18n-lib.h> #ifdef HAVE_MOBLIN -#include <nbtk/nbtk-gtk.h> +#include <mx/mx-gtk.h> #endif #include <libempathy/empathy-utils.h> @@ -746,8 +746,8 @@ account_widget_applied_cb (GObject *source_object, enabled_checked = #ifdef HAVE_MOBLIN - nbtk_gtk_light_switch_get_active ( - NBTK_GTK_LIGHT_SWITCH (priv->enabled_checkbox)); + mx_gtk_light_switch_get_active ( + MX_GTK_LIGHT_SWITCH (priv->enabled_checkbox)); #else gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (priv->enabled_checkbox)); @@ -1331,8 +1331,8 @@ empathy_account_widget_enabled_cb (TpAccount *account, if (priv->enabled_checkbox != NULL) { #ifdef HAVE_MOBLIN - nbtk_gtk_light_switch_set_active ( - NBTK_GTK_LIGHT_SWITCH (priv->enabled_checkbox), + mx_gtk_light_switch_set_active ( + MX_GTK_LIGHT_SWITCH (priv->enabled_checkbox), enabled); #else gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->enabled_checkbox), @@ -1343,7 +1343,7 @@ empathy_account_widget_enabled_cb (TpAccount *account, static void #ifdef HAVE_MOBLIN -account_widget_switch_flipped_cb (NbtkGtkLightSwitch *sw, +account_widget_switch_flipped_cb (MxGtkLightSwitch *sw, gboolean state, gpointer user_data) #else @@ -1512,10 +1512,10 @@ add_enable_checkbox (EmpathyAccountWidget *self, w = gtk_label_new (_("Account:")); gtk_misc_set_alignment (GTK_MISC (w), 0, 0.5); - priv->enabled_checkbox = nbtk_gtk_light_switch_new (); + priv->enabled_checkbox = mx_gtk_light_switch_new (); - nbtk_gtk_light_switch_set_active ( - NBTK_GTK_LIGHT_SWITCH (priv->enabled_checkbox), is_enabled); + mx_gtk_light_switch_set_active ( + MX_GTK_LIGHT_SWITCH (priv->enabled_checkbox), is_enabled); gtk_widget_show (w); #else diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index d27337b25..4594d4d29 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -2947,12 +2947,14 @@ empathy_chat_messages_read (EmpathyChat *self) g_return_if_fail (EMPATHY_IS_CHAT (self)); - empathy_tp_chat_acknowledge_messages (priv->tp_chat, + if (priv->tp_chat != NULL) { + empathy_tp_chat_acknowledge_messages (priv->tp_chat, priv->pending_messages); - - while (priv->pending_messages != NULL) { - g_object_unref (priv->pending_messages->data); - priv->pending_messages = g_slist_delete_link ( - priv->pending_messages, priv->pending_messages); } + /* ...else, we can't do any acknowledging because the channel (or + * indeed connection) has gone away. */ + + g_slist_foreach (priv->pending_messages, (GFunc) g_object_unref, NULL); + g_slist_free (priv->pending_messages); + priv->pending_messages = NULL; } |