aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac31
-rw-r--r--libempathy-gtk/empathy-chat.c16
-rw-r--r--libempathy-gtk/empathy-chat.h3
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c19
-rw-r--r--libempathy-gtk/empathy-contact-menu.c7
-rw-r--r--libempathy-gtk/empathy-contact-widget.c8
-rw-r--r--libempathy/empathy-connectivity.c2
-rw-r--r--libempathy/empathy-contact-list.c6
-rw-r--r--libempathy/empathy-contact.c12
-rw-r--r--libempathy/empathy-contact.h4
-rw-r--r--libempathy/empathy-dispatch-operation.c35
-rw-r--r--src/empathy-main-window.c22
-rw-r--r--src/empathy-new-chatroom-dialog.c2
-rw-r--r--src/empathy-preferences.c2
-rw-r--r--tests/empathy-chatroom-manager-test.c2
-rw-r--r--tests/test-helper.c103
16 files changed, 69 insertions, 205 deletions
diff --git a/configure.ac b/configure.ac
index edee9e07e..7c7721231 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,7 +80,6 @@ AM_PATH_GLIB_2_0
AC_PATH_XTRA
IT_PROG_INTLTOOL([0.35.0])
GNOME_DOC_INIT([0.17.3])
-IDT_COMPILE_WARNINGS
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
GLIB_GSETTINGS
GLIB_GENMARSHAL=`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`
@@ -423,7 +422,6 @@ if test "x$enable_meego" != "xno"; then
if test "x$have_meego" = "xyes"; then
AC_DEFINE(HAVE_MEEGO, 1, [Define if you have meego])
- chain_enable_favourite_contacts="yes"
fi
else
have_meego="no"
@@ -438,34 +436,6 @@ AC_SUBST(MEEGO_CFLAGS)
AC_SUBST(MEEGO_LIBS)
# -----------------------------------------------------------
-# favourite contacts support
-# -----------------------------------------------------------
-AC_ARG_ENABLE(favourite_contacts,
- AS_HELP_STRING([--enable-favourite-contacts=@<:no/yes@:>@],
- [Enable favourite contacts]), ,
- enable_favourite_contacts=no)
-
-if test "x$enable_favourite_contacts" != "xno" || test "x$chain_enable_favourite_contacts" = "xyes"; then
- PKG_CHECK_MODULES(TELEPATHY_LOGGER,
- [
- telepathy-logger
- ], have_telepathy_logger="yes", have_telepathy_logger="no")
-
- if test "x$have_telepathy_logger" = "xyes"; then
- have_favourite_contacts="yes"
- AC_DEFINE(HAVE_FAVOURITE_CONTACTS, 1, [Define if you want favourite contacts support])
- fi
-else
- have_favourite_contacts="no"
-fi
-
-if test "x$enable_favourite_contacts" = "xyes" && test "x$have_favourite_contacts" != "xyes"; then
- AC_MSG_ERROR([Couldn't find favourite contacts dependencies.])
-fi
-
-AM_CONDITIONAL(HAVE_FAVOURITE_CONTACTS, test "x$have_telepathy_logger" = "xyes")
-
-# -----------------------------------------------------------
# nautilus-sendto
# -----------------------------------------------------------
AC_ARG_ENABLE(nautilus-sendto,
@@ -561,7 +531,6 @@ Configure summary:
Location awareness (Geoclue): ${have_geoclue}
Adium themes (Webkit).......: ${have_webkit}
Meego widgets ..............: ${have_meego}
- Favourite contacts .........: ${have_favourite_contacts}
Control center embedding....: ${have_control_center_embedding}
Connectivity:
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 9e69c733a..52405ec47 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -63,7 +63,7 @@
#define COMPOSING_STOP_TIMEOUT 5
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyChat)
-typedef struct {
+struct _EmpathyChatPriv {
EmpathyTpChat *tp_chat;
TpAccount *account;
gchar *id;
@@ -138,7 +138,7 @@ typedef struct {
* notified again about the already notified pending messages when the
* messages in tab will be properly shown */
gboolean retrieving_backlogs;
-} EmpathyChatPriv;
+};
typedef struct {
gchar *text; /* Original message that was specified
@@ -2420,18 +2420,18 @@ conf_spell_checking_cb (GSettings *gsettings_chat,
}
static gboolean
-chat_hpaned_pos_changed_cb (GtkWidget* hpaned, gpointer user_data)
+chat_hpaned_pos_changed_cb (GtkWidget* hpaned,
+ GParamSpec *spec,
+ gpointer user_data)
{
- GSettings *gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA);
+ EmpathyChat *chat = EMPATHY_CHAT (user_data);
gint hpaned_pos;
hpaned_pos = gtk_paned_get_position (GTK_PANED(hpaned));
- g_settings_set_int (gsettings_chat,
+ g_settings_set_int (chat->priv->gsettings_ui,
EMPATHY_PREFS_UI_CHAT_WINDOW_PANED_POS,
hpaned_pos);
- g_object_unref (gsettings_chat);
-
return TRUE;
}
@@ -2529,7 +2529,7 @@ chat_create_ui (EmpathyChat *chat)
g_signal_connect (priv->hpaned, "notify::position",
G_CALLBACK (chat_hpaned_pos_changed_cb),
- NULL);
+ chat);
/* Load the paned position */
paned_pos = g_settings_get_int (priv->gsettings_ui,
diff --git a/libempathy-gtk/empathy-chat.h b/libempathy-gtk/empathy-chat.h
index 7f3ebda26..596b83f5d 100644
--- a/libempathy-gtk/empathy-chat.h
+++ b/libempathy-gtk/empathy-chat.h
@@ -47,10 +47,11 @@ G_BEGIN_DECLS
typedef struct _EmpathyChat EmpathyChat;
typedef struct _EmpathyChatClass EmpathyChatClass;
+typedef struct _EmpathyChatPriv EmpathyChatPriv;
struct _EmpathyChat {
GtkBin parent;
- gpointer priv;
+ EmpathyChatPriv *priv;
/* Protected */
EmpathyChatView *view;
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 57768997d..de838441f 100644
--- a/libempathy-gtk/empathy-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -1061,7 +1061,6 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
}
g_list_free (groups);
-#ifdef HAVE_FAVOURITE_CONTACTS
if (priv->show_groups &&
empathy_contact_list_is_favourite (priv->list, contact)) {
/* Add contact to the fake 'Favorites' group */
@@ -1072,7 +1071,6 @@ contact_list_store_add_contact (EmpathyContactListStore *store,
add_contact_to_store (GTK_TREE_STORE (store), &iter, &iter_group, contact, flags);
}
-#endif
contact_list_store_contact_update (store, contact);
}
@@ -1573,6 +1571,8 @@ contact_list_store_contact_sort (EmpathyContact *contact_a,
TpAccount *account_a, *account_b;
gint ret_val;
+ g_return_val_if_fail (contact_a != NULL || contact_b != NULL, 0);
+
/* alias */
ret_val = g_utf8_collate (empathy_contact_get_name (contact_a),
empathy_contact_get_name (contact_b));
@@ -1630,10 +1630,9 @@ contact_list_store_state_sort_func (GtkTreeModel *model,
EMPATHY_CONTACT_LIST_STORE_COL_IS_FAKE_GROUP, &fake_group_b,
-1);
- ret_val = compare_separator_and_groups (is_separator_a, is_separator_b,
- name_a, name_b, contact_a, contact_b, fake_group_a, fake_group_b);
-
- if (ret_val != 0) {
+ if (contact_a == NULL || contact_b == NULL) {
+ ret_val = compare_separator_and_groups (is_separator_a, is_separator_b,
+ name_a, name_b, contact_a, contact_b, fake_group_a, fake_group_b);
goto free_and_out;
}
@@ -1689,10 +1688,10 @@ contact_list_store_name_sort_func (GtkTreeModel *model,
EMPATHY_CONTACT_LIST_STORE_COL_IS_FAKE_GROUP, &fake_group_b,
-1);
- ret_val = compare_separator_and_groups (is_separator_a, is_separator_b,
- name_a, name_b, contact_a, contact_b, fake_group_a, fake_group_b);
-
- if (ret_val == 0)
+ if (contact_a == NULL || contact_b == NULL)
+ ret_val = compare_separator_and_groups (is_separator_a, is_separator_b,
+ name_a, name_b, contact_a, contact_b, fake_group_a, fake_group_b);
+ else
ret_val = contact_list_store_contact_sort (contact_a, contact_b);
if (contact_a) {
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 9ea19af32..6dfe63a6e 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -131,14 +131,12 @@ empathy_contact_menu_new (EmpathyContact *contact,
gtk_widget_show (item);
}
-#if HAVE_FAVOURITE_CONTACTS
/* Favorite checkbox */
if (features & EMPATHY_CONTACT_FEATURE_FAVOURITE) {
item = empathy_contact_favourite_menu_item_new (contact);
gtk_menu_shell_append (shell, item);
gtk_widget_show (item);
}
-#endif
return menu;
}
@@ -381,7 +379,8 @@ empathy_contact_share_my_desktop_menu_item_new (EmpathyContact *contact)
item = gtk_image_menu_item_new_with_mnemonic (_("Share My Desktop"));
image = gtk_image_new_from_icon_name (GTK_STOCK_NETWORK,
GTK_ICON_SIZE_MENU);
- gtk_widget_set_sensitive (item, empathy_contact_can_use_stream_tube (contact));
+ gtk_widget_set_sensitive (item, empathy_contact_can_use_rfb_stream_tube (
+ contact));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
gtk_widget_show (image);
@@ -392,7 +391,6 @@ empathy_contact_share_my_desktop_menu_item_new (EmpathyContact *contact)
return item;
}
-#if HAVE_FAVOURITE_CONTACTS
static void
favourite_menu_item_toggled_cb (GtkCheckMenuItem *item,
EmpathyContact *contact)
@@ -432,7 +430,6 @@ empathy_contact_favourite_menu_item_new (EmpathyContact *contact)
g_object_unref (manager);
return item;
}
-#endif
static void
contact_info_menu_item_activate_cb (EmpathyContact *contact)
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 72fe321d7..e7a6b3a14 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -1405,7 +1405,6 @@ contact_widget_presence_notify_cb (EmpathyContactWidget *information)
gtk_widget_show (information->image_state);
}
-#if HAVE_FAVOURITE_CONTACTS
static void
contact_widget_favourites_changed_cb (EmpathyContactManager *manager,
EmpathyContact *contact,
@@ -1418,7 +1417,6 @@ contact_widget_favourites_changed_cb (EmpathyContactManager *manager,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (
information->favourite_checkbox), is_favourite);
}
-#endif
static void
contact_widget_remove_contact (EmpathyContactWidget *information)
@@ -1524,7 +1522,6 @@ contact_widget_contact_update (EmpathyContactWidget *information)
contact_widget_presence_notify_cb (information);
contact_widget_avatar_notify_cb (information);
-#if HAVE_FAVOURITE_CONTACTS
if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE)
{
gboolean is_favourite;
@@ -1536,7 +1533,6 @@ contact_widget_contact_update (EmpathyContactWidget *information)
contact_widget_favourites_changed_cb (information->manager,
information->contact, is_favourite, information);
}
-#endif
gtk_widget_show (information->label_alias);
gtk_widget_show (information->widget_alias);
@@ -1657,7 +1653,6 @@ contact_widget_id_focus_out_cb (GtkWidget *widget,
return FALSE;
}
-#if HAVE_FAVOURITE_CONTACTS
static void
favourite_toggled_cb (GtkToggleButton *button,
EmpathyContactWidget *information)
@@ -1677,7 +1672,6 @@ favourite_toggled_cb (GtkToggleButton *button,
EMPATHY_CONTACT_LIST (information->manager), information->contact);
}
}
-#endif
static void
contact_widget_contact_setup (EmpathyContactWidget *information)
@@ -1817,7 +1811,6 @@ contact_widget_contact_setup (EmpathyContactWidget *information)
}
gtk_widget_show (information->widget_alias);
-#if HAVE_FAVOURITE_CONTACTS
/* Favorite */
if (information->flags & EMPATHY_CONTACT_WIDGET_EDIT_FAVOURITE)
{
@@ -1836,7 +1829,6 @@ contact_widget_contact_setup (EmpathyContactWidget *information)
gtk_widget_show (information->favourite_checkbox);
}
-#endif
}
static void
diff --git a/libempathy/empathy-connectivity.c b/libempathy/empathy-connectivity.c
index f6a723ef6..f02b7588b 100644
--- a/libempathy/empathy-connectivity.c
+++ b/libempathy/empathy-connectivity.c
@@ -403,7 +403,7 @@ empathy_connectivity_set_use_conn (EmpathyConnectivity *connectivity,
if (use_conn == priv->use_conn)
return;
- DEBUG ("use_conn gconf key changed; new value = %s",
+ DEBUG ("use_conn GSetting key changed; new value = %s",
use_conn ? "true" : "false");
priv->use_conn = use_conn;
diff --git a/libempathy/empathy-contact-list.c b/libempathy/empathy-contact-list.c
index 5cbe1cb15..631bb4a37 100644
--- a/libempathy/empathy-contact-list.c
+++ b/libempathy/empathy-contact-list.c
@@ -251,12 +251,10 @@ gboolean
empathy_contact_list_is_favourite (EmpathyContactList *list,
EmpathyContact *contact)
{
-#if HAVE_FAVOURITE_CONTACTS
if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->is_favourite) {
return EMPATHY_CONTACT_LIST_GET_IFACE (list)->is_favourite (
list, contact);
}
-#endif /* HAVE_FAVOURITE_CONTACTS */
return FALSE;
}
@@ -265,22 +263,18 @@ void
empathy_contact_list_add_to_favourites (EmpathyContactList *list,
EmpathyContact *contact)
{
-#if HAVE_FAVOURITE_CONTACTS
if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite) {
EMPATHY_CONTACT_LIST_GET_IFACE (list)->add_favourite (list,
contact);
}
-#endif /* HAVE_FAVOURITE_CONTACTS */
}
void
empathy_contact_list_remove_from_favourites (EmpathyContactList *list,
EmpathyContact *contact)
{
-#if HAVE_FAVOURITE_CONTACTS
if (EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite) {
EMPATHY_CONTACT_LIST_GET_IFACE (list)->remove_favourite (list,
contact);
}
-#endif /* HAVE_FAVOURITE_CONTACTS */
}
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index cbd3bd0ae..ba695ca57 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -970,7 +970,7 @@ empathy_contact_can_send_files (EmpathyContact *contact)
}
gboolean
-empathy_contact_can_use_stream_tube (EmpathyContact *contact)
+empathy_contact_can_use_rfb_stream_tube (EmpathyContact *contact)
{
EmpathyContactPriv *priv;
@@ -978,7 +978,7 @@ empathy_contact_can_use_stream_tube (EmpathyContact *contact)
priv = GET_PRIV (contact);
- return priv->capabilities & EMPATHY_CAPABILITIES_STREAM_TUBE;
+ return priv->capabilities & EMPATHY_CAPABILITIES_RFB_STREAM_TUBE;
}
static gchar *
@@ -1448,7 +1448,13 @@ tp_caps_to_capabilities (TpCapabilities *caps)
}
else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
{
- capabilities |= EMPATHY_CAPABILITIES_STREAM_TUBE;
+ const gchar *service;
+
+ service = tp_asv_get_string (fixed_prop,
+ TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE);
+
+ if (!tp_strdiff (service, "rfb"))
+ capabilities |= EMPATHY_CAPABILITIES_RFB_STREAM_TUBE;
}
else if (!tp_strdiff (chan_type,
TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA))
diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h
index ddb3f66c0..b5f24d0c5 100644
--- a/libempathy/empathy-contact.h
+++ b/libempathy/empathy-contact.h
@@ -65,7 +65,7 @@ typedef enum {
EMPATHY_CAPABILITIES_AUDIO = 1 << 0,
EMPATHY_CAPABILITIES_VIDEO = 1 << 1,
EMPATHY_CAPABILITIES_FT = 1 << 2,
- EMPATHY_CAPABILITIES_STREAM_TUBE = 1 << 3,
+ EMPATHY_CAPABILITIES_RFB_STREAM_TUBE = 1 << 3,
EMPATHY_CAPABILITIES_UNKNOWN = 1 << 7
} EmpathyCapabilities;
@@ -106,7 +106,7 @@ gboolean empathy_contact_can_voip (EmpathyContact *contact);
gboolean empathy_contact_can_voip_audio (EmpathyContact *contact);
gboolean empathy_contact_can_voip_video (EmpathyContact *contact);
gboolean empathy_contact_can_send_files (EmpathyContact *contact);
-gboolean empathy_contact_can_use_stream_tube (EmpathyContact *contact);
+gboolean empathy_contact_can_use_rfb_stream_tube (EmpathyContact *contact);
gboolean empathy_contact_load_avatar_cache (EmpathyContact *contact,
const gchar *token);
diff --git a/libempathy/empathy-dispatch-operation.c b/libempathy/empathy-dispatch-operation.c
index 68777a50e..83cf72483 100644
--- a/libempathy/empathy-dispatch-operation.c
+++ b/libempathy/empathy-dispatch-operation.c
@@ -217,6 +217,7 @@ dispatch_operation_connection_ready (TpConnection *connection,
EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (user_data);
EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
TpHandle handle;
+ TpHandleType handle_type;
if (error != NULL)
goto out;
@@ -225,10 +226,18 @@ dispatch_operation_connection_ready (TpConnection *connection,
/* no point to get more information */
goto out;
- handle = tp_channel_get_handle (priv->channel, NULL);
-
- empathy_tp_contact_factory_get_from_handle (priv->connection, handle,
- dispatcher_operation_got_contact_cb, NULL, NULL, G_OBJECT (self));
+ handle = tp_channel_get_handle (priv->channel, &handle_type);
+ if (handle_type == TP_HANDLE_TYPE_CONTACT && priv->contact == NULL)
+ {
+ empathy_tp_contact_factory_get_from_handle (priv->connection, handle,
+ dispatcher_operation_got_contact_cb, NULL, NULL, G_OBJECT (self));
+ }
+ else
+ {
+ g_object_ref (self);
+ tp_channel_call_when_ready (priv->channel,
+ empathy_dispatch_operation_channel_ready_cb, self);
+ }
out:
g_object_unref (self);
@@ -239,8 +248,6 @@ empathy_dispatch_operation_constructed (GObject *object)
{
EmpathyDispatchOperation *self = EMPATHY_DISPATCH_OPERATION (object);
EmpathyDispatchOperationPriv *priv = GET_PRIV (self);
- TpHandle handle;
- TpHandleType handle_type;
empathy_dispatch_operation_set_status (self,
EMPATHY_DISPATCHER_OPERATION_STATE_PREPARING);
@@ -249,21 +256,9 @@ empathy_dispatch_operation_constructed (GObject *object)
g_signal_connect (priv->channel, "invalidated",
G_CALLBACK (empathy_dispatch_operation_invalidated), self);
- handle = tp_channel_get_handle (priv->channel, &handle_type);
-
- if (handle_type == TP_HANDLE_TYPE_CONTACT && priv->contact == NULL)
- {
- /* Ensure to keep the self object alive while the call_when_ready is
- * running */
- g_object_ref (self);
- tp_connection_call_when_ready (priv->connection,
- dispatch_operation_connection_ready, object);
- return;
- }
-
g_object_ref (self);
- tp_channel_call_when_ready (priv->channel,
- empathy_dispatch_operation_channel_ready_cb, self);
+ tp_connection_call_when_ready (priv->connection,
+ dispatch_operation_connection_ready, object);
}
static void
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 3a6bf0ae4..9b818bc4c 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -792,22 +792,32 @@ main_window_view_contacts_list_size_cb (GtkRadioAction *action,
GtkRadioAction *current,
EmpathyMainWindow *window)
{
- gint value;
+ GSettings *gsettings_ui;
+ gint value;
value = gtk_radio_action_get_current_value (action);
+ /* create a new GSettings, so we can delay the setting until both
+ * values are set */
+ gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA);
- g_settings_set_boolean (window->gsettings_ui,
+ DEBUG ("radio button toggled, value = %i", value);
+
+ g_settings_delay (gsettings_ui);
+ g_settings_set_boolean (gsettings_ui,
EMPATHY_PREFS_UI_SHOW_AVATARS,
value == CONTACT_LIST_NORMAL_SIZE_WITH_AVATARS);
- g_settings_set_boolean (window->gsettings_ui,
+ g_settings_set_boolean (gsettings_ui,
EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
value == CONTACT_LIST_COMPACT_SIZE);
+ g_settings_apply (gsettings_ui);
empathy_contact_list_store_set_show_avatars (window->list_store,
value == CONTACT_LIST_NORMAL_SIZE_WITH_AVATARS);
empathy_contact_list_store_set_is_compact (window->list_store,
value == CONTACT_LIST_COMPACT_SIZE);
+
+ g_object_unref (gsettings_ui);
}
static void main_window_notify_show_protocols_cb (GSettings *gsettings,
@@ -825,7 +835,7 @@ main_window_notify_contact_list_size_cb (GSettings *gsettings,
const gchar *key,
EmpathyMainWindow *window)
{
- gint value = CONTACT_LIST_NORMAL_SIZE_WITH_AVATARS;
+ gint value;
if (g_settings_get_boolean (gsettings,
EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST)) {
@@ -837,6 +847,8 @@ main_window_notify_contact_list_size_cb (GSettings *gsettings,
value = CONTACT_LIST_NORMAL_SIZE;
}
+ DEBUG ("setting changed, value = %i", value);
+
/* By changing the value of the GtkRadioAction,
it emits a signal that calls main_window_view_contacts_list_size_cb
which updates the contacts list */
@@ -1536,6 +1548,8 @@ empathy_main_window_show (void)
EMPATHY_LIVE_SEARCH (window->search_bar));
gtk_box_pack_start (GTK_BOX (window->main_vbox), window->search_bar,
FALSE, TRUE, 0);
+ g_signal_connect_swapped (window->window, "map",
+ G_CALLBACK (gtk_widget_grab_focus), window->list_view);
/* Load user-defined accelerators. */
main_window_accels_load ();
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index 50b5f5d82..8d954aa85 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -731,6 +731,8 @@ new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
room_name = g_strdup (room);
}
+ g_strstrip (room_name);
+
DEBUG ("Requesting channel for '%s'", room_name);
empathy_dispatcher_join_muc (connection, room_name,
gtk_get_current_event_time (), NULL, NULL);
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index 8192049e7..4460d6f85 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -786,7 +786,7 @@ preferences_themes_setup (EmpathyPreferences *preferences)
G_CALLBACK (preferences_theme_changed_cb),
preferences);
- /* Select the theme from the gconf key and track changes */
+ /* Select the theme from the GSetting key and track changes */
preferences_theme_notify_cb (preferences->gsettings_chat,
EMPATHY_PREFS_CHAT_THEME,
preferences);
diff --git a/tests/empathy-chatroom-manager-test.c b/tests/empathy-chatroom-manager-test.c
index 3d6b6f6b7..b79e898d0 100644
--- a/tests/empathy-chatroom-manager-test.c
+++ b/tests/empathy-chatroom-manager-test.c
@@ -3,8 +3,6 @@
#include <string.h>
#include <glib/gstdio.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/util.h>
diff --git a/tests/test-helper.c b/tests/test-helper.c
index d51d22a52..ca763adb4 100644
--- a/tests/test-helper.c
+++ b/tests/test-helper.c
@@ -77,106 +77,3 @@ copy_xml_file (const gchar *orig,
g_free (buffer);
}
-#if 0
-EmpathyAccount *
-get_test_account (void)
-{
- McProfile *profile;
- EmpathyAccountManager *account_manager;
- EmpathyAccount *account;
- GList *accounts;
-
- account_manager = empathy_account_manager_dup_singleton ();
- profile = mc_profile_lookup ("test");
- accounts = mc_accounts_list_by_profile (profile);
- if (g_list_length (accounts) == 0)
- {
- /* need to create a test account */
- account = empathy_account_manager_create_by_profile (account_manager,
- profile);
- }
- else
- {
- /* reuse an existing test account */
- McAccount *mc_account;
- mc_account = accounts->data;
- account = empathy_account_manager_lookup (account_manager,
- mc_account_get_unique_name (mc_account));
- }
- g_object_unref (account_manager);
-
- g_object_unref (profile);
-
- return account;
-}
-
-/* Not used for now as there is no API to remove completely gconf keys.
- * So we reuse existing accounts instead of creating new ones */
-void
-destroy_test_account (EmpathyAccount *account)
-{
- GConfClient *client;
- gchar *path;
- GError *error = NULL;
- GSList *entries = NULL, *l;
- EmpathyAccountManager *manager;
-
- client = gconf_client_get_default ();
- path = g_strdup_printf ("/apps/telepathy/mc/accounts/%s",
- empathy_account_get_unique_name (account));
-
- entries = gconf_client_all_entries (client, path, &error);
- if (error != NULL)
- {
- g_print ("failed to list entries in %s: %s\n", path, error->message);
- g_error_free (error);
- error = NULL;
- }
-
- for (l = entries; l != NULL; l = g_slist_next (l))
- {
- GConfEntry *entry = l->data;
-
- if (g_str_has_suffix (entry->key, "data_dir"))
- {
- gchar *dir;
-
- dir = gconf_client_get_string (client, entry->key, &error);
- if (error != NULL)
- {
- g_print ("get data_dir string failed: %s\n", entry->key);
- g_error_free (error);
- error = NULL;
- }
- else
- {
- if (g_rmdir (dir) != 0)
- g_print ("can't remove %s\n", dir);
- }
-
- g_free (dir);
- }
-
- /* FIXME: this doesn't remove the key */
- gconf_client_unset (client, entry->key, &error);
- if (error != NULL)
- {
- g_print ("unset of %s failed: %s\n", path, error->message);
- g_error_free (error);
- error = NULL;
- }
-
- gconf_entry_unref (entry);
- }
-
- g_slist_free (entries);
-
- g_object_unref (client);
- g_free (path);
-
- manager = empathy_account_manager_dup_singleton ();
- empathy_account_manager_remove (manager, account);
- g_object_unref (account);
- g_object_unref (manager);
-}
-#endif