[empathy] rename empathy-dispatcher to empathy-request-util
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] rename empathy-dispatcher to empathy-request-util
- Date: Thu, 17 Mar 2011 08:54:54 +0000 (UTC)
commit 23d90f884b28cabd3b9b986998c118314a9238f9
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Mar 7 14:02:52 2011 +0100
rename empathy-dispatcher to empathy-request-util
We don't have EmpathyDispatcher any more so this file just contains some
utility functions now.
libempathy-gtk/empathy-chat.c | 8 ++++----
libempathy-gtk/empathy-contact-list-view.c | 4 ++--
libempathy-gtk/empathy-contact-menu.c | 4 ++--
libempathy-gtk/empathy-contact-selector-dialog.c | 1 -
libempathy-gtk/empathy-individual-menu.c | 4 ++--
libempathy-gtk/empathy-individual-view.c | 4 ++--
libempathy-gtk/empathy-new-message-dialog.c | 4 ++--
libempathy-gtk/empathy-share-my-desktop.c | 2 --
libempathy-gtk/empathy-ui-utils.c | 1 -
libempathy/Makefile.am | 4 ++--
libempathy/empathy-chatroom-manager.h | 1 -
...empathy-dispatcher.c => empathy-request-util.c} | 12 ++++++------
...empathy-dispatcher.h => empathy-request-util.h} | 9 ++++-----
libempathy/empathy-utils.c | 1 -
src/empathy-chat-manager.c | 6 +++---
src/empathy-chat-window.c | 3 ++-
src/empathy-main-window.c | 4 ++--
src/empathy-new-chatroom-dialog.c | 4 ++--
src/empathy.c | 6 +++---
tests/interactive/empetit.c | 4 ++--
20 files changed, 40 insertions(+), 46 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index b696963..d1442d8 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -42,7 +42,7 @@
#include <libempathy/empathy-gsettings.h>
#include <libempathy/empathy-keyring.h>
#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-marshal.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <src/empathy-chat-window.h>
@@ -249,11 +249,11 @@ account_reconnected (EmpathyChat *chat,
* https://bugs.freedesktop.org/show_bug.cgi?id=13422 */
switch (priv->handle_type) {
case TP_HANDLE_TYPE_CONTACT:
- empathy_dispatcher_chat_with_contact_id (
+ empathy_chat_with_contact_id (
account, priv->id, TP_USER_ACTION_TIME_NOT_USER_ACTION);
break;
case TP_HANDLE_TYPE_ROOM:
- empathy_dispatcher_join_muc (account, priv->id,
+ empathy_join_muc (account, priv->id,
TP_USER_ACTION_TIME_NOT_USER_ACTION);
break;
case TP_HANDLE_TYPE_NONE:
@@ -739,7 +739,7 @@ empathy_chat_join_muc (EmpathyChat *chat,
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- empathy_dispatcher_join_muc (priv->account, room,
+ empathy_join_muc (priv->account, room,
gtk_get_current_event_time ());
}
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 9377fdb..608611a 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -37,7 +37,7 @@
#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-contact-groups.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-utils.h>
#include "empathy-contact-list-view.h"
@@ -906,7 +906,7 @@ contact_list_view_row_activated (GtkTreeView *view,
if (contact) {
DEBUG ("Starting a chat");
- empathy_dispatcher_chat_with_contact (contact,
+ empathy_chat_with_contact (contact,
gtk_get_current_event_time ());
g_object_unref (contact);
}
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 28725cc..441b692 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -28,7 +28,7 @@
#include <telepathy-logger/log-manager.h>
#include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-contact-manager.h>
@@ -311,7 +311,7 @@ static void
empathy_contact_chat_menu_item_activated (GtkMenuItem *item,
EmpathyContact *contact)
{
- empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time ());
+ empathy_chat_with_contact (contact, gtk_get_current_event_time ());
}
GtkWidget *
diff --git a/libempathy-gtk/empathy-contact-selector-dialog.c b/libempathy-gtk/empathy-contact-selector-dialog.c
index 3ed7f30..d5e533a 100644
--- a/libempathy-gtk/empathy-contact-selector-dialog.c
+++ b/libempathy-gtk/empathy-contact-selector-dialog.c
@@ -30,7 +30,6 @@
#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
#include <libempathy/empathy-utils.h>
#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 5995f2e..3e404c3 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -31,7 +31,7 @@
#include <folks/folks.h>
#include <folks/folks-telepathy.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-individual-manager.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-utils.h>
@@ -499,7 +499,7 @@ empathy_individual_chat_menu_item_activated (GtkMenuItem *item,
{
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
- empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time ());
+ empathy_chat_with_contact (contact, gtk_get_current_event_time ());
}
GtkWidget *
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index f72f6e6..c66fda6 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -40,7 +40,7 @@
#include <libempathy/empathy-individual-manager.h>
#include <libempathy/empathy-contact-groups.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-utils.h>
#include "empathy-individual-view.h"
@@ -1019,7 +1019,7 @@ individual_view_row_activated (GtkTreeView *view,
{
DEBUG ("Starting a chat");
- empathy_dispatcher_chat_with_contact (contact,
+ empathy_chat_with_contact (contact,
gtk_get_current_event_time ());
}
diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c
index 4747dfb..b9edb93 100644
--- a/libempathy-gtk/empathy-new-message-dialog.c
+++ b/libempathy-gtk/empathy-new-message-dialog.c
@@ -30,7 +30,7 @@
#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-utils.h>
#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
@@ -75,7 +75,7 @@ empathy_new_message_dialog_response (GtkDialog *dialog, int response_id)
if (EMP_STR_EMPTY (contact_id) || account == NULL) goto out;
- empathy_dispatcher_chat_with_contact_id (account, contact_id,
+ empathy_chat_with_contact_id (account, contact_id,
gtk_get_current_event_time ());
out:
diff --git a/libempathy-gtk/empathy-share-my-desktop.c b/libempathy-gtk/empathy-share-my-desktop.c
index 01a885a..bc9e921 100644
--- a/libempathy-gtk/empathy-share-my-desktop.c
+++ b/libempathy-gtk/empathy-share-my-desktop.c
@@ -27,8 +27,6 @@
#include <telepathy-glib/channel.h>
#include <telepathy-glib/interfaces.h>
-#include <libempathy/empathy-dispatcher.h>
-
#define DEBUG_FLAG EMPATHY_DEBUG_SHARE_DESKTOP
#include <libempathy/empathy-debug.h>
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index eb5578e..8dbf6af 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -49,7 +49,6 @@
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
#include <libempathy/empathy-ft-factory.h>
void
diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am
index 20225f7..cfea24c 100644
--- a/libempathy/Makefile.am
+++ b/libempathy/Makefile.am
@@ -38,7 +38,6 @@ libempathy_headers = \
empathy-contact-manager.h \
empathy-contact.h \
empathy-debug.h \
- empathy-dispatcher.h \
empathy-ft-factory.h \
empathy-ft-handler.h \
empathy-gsettings.h \
@@ -50,6 +49,7 @@ libempathy_headers = \
empathy-keyring.h \
empathy-location.h \
empathy-message.h \
+ empathy-request-util.h \
empathy-server-sasl-handler.h \
empathy-server-tls-handler.h \
empathy-status-presets.h \
@@ -79,7 +79,6 @@ libempathy_la_SOURCES = \
empathy-contact-manager.c \
empathy-contact.c \
empathy-debug.c \
- empathy-dispatcher.c \
empathy-ft-factory.c \
empathy-ft-handler.c \
empathy-presence-manager.c \
@@ -89,6 +88,7 @@ libempathy_la_SOURCES = \
empathy-irc-server.c \
empathy-keyring.c \
empathy-message.c \
+ empathy-request-util.c \
empathy-server-sasl-handler.c \
empathy-server-tls-handler.c \
empathy-status-presets.c \
diff --git a/libempathy/empathy-chatroom-manager.h b/libempathy/empathy-chatroom-manager.h
index 5afb2b4..be33015 100644
--- a/libempathy/empathy-chatroom-manager.h
+++ b/libempathy/empathy-chatroom-manager.h
@@ -29,7 +29,6 @@
#include <telepathy-glib/account.h>
#include "empathy-chatroom.h"
-#include "empathy-dispatcher.h"
G_BEGIN_DECLS
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-request-util.c
similarity index 90%
rename from libempathy/empathy-dispatcher.c
rename to libempathy/empathy-request-util.c
index 1f7d7f2..c912cc1 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-request-util.c
@@ -1,4 +1,4 @@
-/* * Copyright (C) 2007-2009 Collabora Ltd.
+/* * Copyright (C) 2007-2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -27,7 +27,7 @@
#include <telepathy-glib/telepathy-glib.h>
-#include "empathy-dispatcher.h"
+#include "empathy-request-util.h"
#include "empathy-utils.h"
#include "empathy-utils.h"
@@ -35,10 +35,10 @@
#include <libempathy/empathy-debug.h>
void
-empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
+empathy_chat_with_contact (EmpathyContact *contact,
gint64 timestamp)
{
- empathy_dispatcher_chat_with_contact_id (
+ empathy_chat_with_contact_id (
empathy_contact_get_account (contact), empathy_contact_get_id (contact),
timestamp);
}
@@ -59,7 +59,7 @@ ensure_text_channel_cb (GObject *source,
}
void
-empathy_dispatcher_chat_with_contact_id (TpAccount *account,
+empathy_chat_with_contact_id (TpAccount *account,
const gchar *contact_id,
gint64 timestamp)
{
@@ -83,7 +83,7 @@ empathy_dispatcher_chat_with_contact_id (TpAccount *account,
}
void
-empathy_dispatcher_join_muc (TpAccount *account,
+empathy_join_muc (TpAccount *account,
const gchar *room_name,
gint64 timestamp)
{
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-request-util.h
similarity index 79%
rename from libempathy/empathy-dispatcher.h
rename to libempathy/empathy-request-util.h
index 8c986ec..1073f0d 100644
--- a/libempathy/empathy-dispatcher.h
+++ b/libempathy/empathy-request-util.h
@@ -1,6 +1,5 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Copyright (C) 2007-2008 Collabora Ltd.
+ * Copyright (C) 2007-2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -32,15 +31,15 @@
G_BEGIN_DECLS
/* Requesting 1 to 1 text channels */
-void empathy_dispatcher_chat_with_contact_id (TpAccount *account,
+void empathy_chat_with_contact_id (TpAccount *account,
const gchar *contact_id,
gint64 timestamp);
-void empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
+void empathy_chat_with_contact (EmpathyContact *contact,
gint64 timestamp);
/* Request a muc channel */
-void empathy_dispatcher_join_muc (TpAccount *account,
+void empathy_join_muc (TpAccount *account,
const gchar *roomname,
gint64 timestamp);
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 775a320..86c0f20 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -48,7 +48,6 @@
#include "empathy-utils.h"
#include "empathy-contact-manager.h"
#include "empathy-individual-manager.h"
-#include "empathy-dispatcher.h"
#include "empathy-presence-manager.h"
#include "empathy-tp-contact-factory.h"
diff --git a/src/empathy-chat-manager.c b/src/empathy-chat-manager.c
index c84b5f4..c3488dc 100644
--- a/src/empathy-chat-manager.c
+++ b/src/empathy-chat-manager.c
@@ -20,7 +20,7 @@
#include <telepathy-glib/telepathy-glib.h>
#include <libempathy/empathy-chatroom-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-utils.h>
#include "empathy-chat-window.h"
@@ -433,10 +433,10 @@ empathy_chat_manager_undo_closed_chat (EmpathyChatManager *self)
data->room ? "room" : "contact", data->id);
if (data->room)
- empathy_dispatcher_join_muc (data->account, data->id,
+ empathy_join_muc (data->account, data->id,
TP_USER_ACTION_TIME_NOT_USER_ACTION);
else
- empathy_dispatcher_chat_with_contact_id (data->account, data->id,
+ empathy_chat_with_contact_id (data->account, data->id,
TP_USER_ACTION_TIME_NOT_USER_ACTION);
g_signal_emit (self, signals[CLOSED_CHATS_CHANGED], 0,
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 755e9d1..6c6e617 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -45,6 +45,7 @@
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-tp-contact-factory.h>
#include <libempathy/empathy-contact-list.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy-gtk/empathy-images.h>
#include <libempathy-gtk/empathy-contact-dialogs.h>
@@ -1768,7 +1769,7 @@ chat_window_drag_data_received (GtkWidget *widget,
}
if (!chat) {
- empathy_dispatcher_chat_with_contact_id (
+ empathy_chat_with_contact_id (
account, contact_id, gtk_get_current_event_time ());
g_strfreev (strv);
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 12b99ba..b4c1254 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -35,7 +35,7 @@
#include <libempathy/empathy-contact.h>
#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-chatroom.h>
#include <libempathy/empathy-contact-list.h>
@@ -1157,7 +1157,7 @@ join_chatroom (EmpathyChatroom *chatroom,
room = empathy_chatroom_get_room (chatroom);
DEBUG ("Requesting channel for '%s'", room);
- empathy_dispatcher_join_muc (account, room, timestamp);
+ empathy_join_muc (account, room, timestamp);
}
typedef struct
diff --git a/src/empathy-new-chatroom-dialog.c b/src/empathy-new-chatroom-dialog.c
index edaeb0e..f27e8de 100644
--- a/src/empathy-new-chatroom-dialog.c
+++ b/src/empathy-new-chatroom-dialog.c
@@ -36,7 +36,7 @@
#include <libempathy/empathy-tp-roomlist.h>
#include <libempathy/empathy-chatroom.h>
#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy-gtk/empathy-account-chooser.h>
#include <libempathy-gtk/empathy-ui-utils.h>
@@ -690,7 +690,7 @@ new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
g_strstrip (room_name);
DEBUG ("Requesting channel for '%s'", room_name);
- empathy_dispatcher_join_muc (account, room_name,
+ empathy_join_muc (account, room_name,
gtk_get_current_event_time ());
g_free (room_name);
diff --git a/src/empathy.c b/src/empathy.c
index e03e43a..e18288c 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -52,7 +52,7 @@
#include <libempathy/empathy-account-settings.h>
#include <libempathy/empathy-connectivity.h>
#include <libempathy/empathy-connection-managers.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy/empathy-ft-factory.h>
#include <libempathy/empathy-gsettings.h>
#include <libempathy/empathy-tp-chat.h>
@@ -539,7 +539,7 @@ account_status_changed_cb (TpAccount *account,
if (new_status != TP_CONNECTION_STATUS_CONNECTED)
return;
- empathy_dispatcher_join_muc (account,
+ empathy_join_muc (account,
empathy_chatroom_get_room (room), TP_USER_ACTION_TIME_NOT_USER_ACTION);
}
@@ -587,7 +587,7 @@ account_manager_chatroom_ready_cb (GObject *source_object,
}
else
{
- empathy_dispatcher_join_muc (account,
+ empathy_join_muc (account,
empathy_chatroom_get_room (room),
TP_USER_ACTION_TIME_NOT_USER_ACTION);
}
diff --git a/tests/interactive/empetit.c b/tests/interactive/empetit.c
index 3ed5998..f3957db 100644
--- a/tests/interactive/empetit.c
+++ b/tests/interactive/empetit.c
@@ -3,7 +3,7 @@
#include <gtk/gtk.h>
#include <libempathy/empathy-contact-manager.h>
-#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-request-util.h>
#include <libempathy-gtk/empathy-ui-utils.h>
#include <libempathy-gtk/empathy-contact-list-store.h>
@@ -23,7 +23,7 @@ clicked_cb (GtkButton *button,
if (!contact)
return;
- empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time ());
+ empathy_chat_with_contact (contact, gtk_get_current_event_time ());
g_object_unref (contact);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]