aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-06-22 18:47:42 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-06-22 18:47:42 +0800
commit58505161bcc63ba91190f6b38a3c52c0c564ca32 (patch)
treee17e91ae407c49df8d545494c76f828468e42ee3 /libempathy-gtk
parentf50c7c8d3d635c2fa567f5d60a1c92c85225227c (diff)
downloadgsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.tar
gsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.tar.gz
gsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.tar.bz2
gsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.tar.lz
gsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.tar.xz
gsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.tar.zst
gsoc2013-empathy-58505161bcc63ba91190f6b38a3c52c0c564ca32.zip
Rename all filenames starting with "gossip" by "empathy", change namespace
2007-06-22 Xavier Claessens <xclaesse@gmail.com> * libempathy/*.[ch]: * libempathy-gtk/*.[ch]: * src/*.[ch]: Rename all filenames starting with "gossip" by "empathy", change namespace of all gossip_*() functions to empathy_*(). Fixes bug #444490 (Mario Danic, Xavier Claessens). svn path=/trunk/; revision=170
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/Makefile.am78
-rw-r--r--libempathy-gtk/empathy-about-dialog.c (renamed from libempathy-gtk/gossip-about-dialog.c)8
-rw-r--r--libempathy-gtk/empathy-about-dialog.h (renamed from libempathy-gtk/gossip-about-dialog.h)8
-rw-r--r--libempathy-gtk/empathy-account-chooser.c (renamed from libempathy-gtk/gossip-account-chooser.c)130
-rw-r--r--libempathy-gtk/empathy-account-chooser.h66
-rw-r--r--libempathy-gtk/empathy-account-widget-generic.c (renamed from libempathy-gtk/gossip-account-widget-generic.c)34
-rw-r--r--libempathy-gtk/empathy-account-widget-generic.h (renamed from libempathy-gtk/gossip-account-widget-generic.h)8
-rw-r--r--libempathy-gtk/empathy-account-widget-jabber.c (renamed from libempathy-gtk/gossip-account-widget-jabber.c)46
-rw-r--r--libempathy-gtk/empathy-account-widget-jabber.glade (renamed from libempathy-gtk/gossip-account-widget-jabber.glade)0
-rw-r--r--libempathy-gtk/empathy-account-widget-jabber.h (renamed from libempathy-gtk/gossip-account-widget-jabber.h)8
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c (renamed from libempathy-gtk/gossip-accounts-dialog.c)148
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.glade (renamed from libempathy-gtk/gossip-accounts-dialog.glade)0
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.h (renamed from libempathy-gtk/gossip-accounts-dialog.h)8
-rw-r--r--libempathy-gtk/empathy-cell-renderer-expander.c (renamed from libempathy-gtk/gossip-cell-renderer-expander.c)108
-rw-r--r--libempathy-gtk/empathy-cell-renderer-expander.h59
-rw-r--r--libempathy-gtk/empathy-cell-renderer-text.c (renamed from libempathy-gtk/gossip-cell-renderer-text.c)64
-rw-r--r--libempathy-gtk/empathy-cell-renderer-text.h56
-rw-r--r--libempathy-gtk/empathy-chat-view.c (renamed from libempathy-gtk/gossip-chat-view.c)650
-rw-r--r--libempathy-gtk/empathy-chat-view.h134
-rw-r--r--libempathy-gtk/empathy-chat-window.c (renamed from libempathy-gtk/gossip-chat-window.c)706
-rw-r--r--libempathy-gtk/empathy-chat-window.h80
-rw-r--r--libempathy-gtk/empathy-chat.c (renamed from libempathy-gtk/gossip-chat.c)460
-rw-r--r--libempathy-gtk/empathy-chat.glade (renamed from libempathy-gtk/gossip-chat.glade)0
-rw-r--r--libempathy-gtk/empathy-chat.h123
-rw-r--r--libempathy-gtk/empathy-chatrooms-window.c (renamed from libempathy-gtk/gossip-chatrooms-window.c)168
-rw-r--r--libempathy-gtk/empathy-chatrooms-window.glade (renamed from libempathy-gtk/gossip-chatrooms-window.glade)2
-rw-r--r--libempathy-gtk/empathy-chatrooms-window.h (renamed from libempathy-gtk/gossip-chatrooms-window.h)8
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c22
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.h6
-rw-r--r--libempathy-gtk/empathy-contact-groups.c (renamed from libempathy-gtk/gossip-contact-groups.c)22
-rw-r--r--libempathy-gtk/empathy-contact-groups.dtd (renamed from libempathy-gtk/gossip-contact-groups.dtd)2
-rw-r--r--libempathy-gtk/empathy-contact-groups.h (renamed from libempathy-gtk/gossip-contact-groups.h)12
-rw-r--r--libempathy-gtk/empathy-contact-list-store.c (renamed from libempathy-gtk/gossip-contact-list-store.c)396
-rw-r--r--libempathy-gtk/empathy-contact-list-store.h122
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c (renamed from libempathy-gtk/gossip-contact-list-view.c)308
-rw-r--r--libempathy-gtk/empathy-contact-list-view.h78
-rw-r--r--libempathy-gtk/empathy-contact-widget.c54
-rw-r--r--libempathy-gtk/empathy-contact-widget.h6
-rw-r--r--libempathy-gtk/empathy-geometry.c (renamed from libempathy-gtk/gossip-geometry.c)14
-rw-r--r--libempathy-gtk/empathy-geometry.h (renamed from libempathy-gtk/gossip-geometry.h)10
-rw-r--r--libempathy-gtk/empathy-group-chat.c (renamed from libempathy-gtk/gossip-group-chat.c)254
-rw-r--r--libempathy-gtk/empathy-group-chat.glade (renamed from libempathy-gtk/gossip-group-chat.glade)2
-rw-r--r--libempathy-gtk/empathy-group-chat.h69
-rw-r--r--libempathy-gtk/empathy-log-window.c (renamed from libempathy-gtk/gossip-log-window.c)220
-rw-r--r--libempathy-gtk/empathy-log-window.glade (renamed from libempathy-gtk/gossip-log-window.glade)0
-rw-r--r--libempathy-gtk/empathy-log-window.h (renamed from libempathy-gtk/gossip-log-window.h)8
-rw-r--r--libempathy-gtk/empathy-main-window.c230
-rw-r--r--libempathy-gtk/empathy-new-chatroom-dialog.c (renamed from libempathy-gtk/gossip-new-chatroom-dialog.c)128
-rw-r--r--libempathy-gtk/empathy-new-chatroom-dialog.glade (renamed from libempathy-gtk/gossip-new-chatroom-dialog.glade)0
-rw-r--r--libempathy-gtk/empathy-new-chatroom-dialog.h (renamed from libempathy-gtk/gossip-new-chatroom-dialog.h)8
-rw-r--r--libempathy-gtk/empathy-preferences.c (renamed from libempathy-gtk/gossip-preferences.c)202
-rw-r--r--libempathy-gtk/empathy-preferences.glade (renamed from libempathy-gtk/gossip-preferences.glade)0
-rw-r--r--libempathy-gtk/empathy-preferences.h58
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c (renamed from libempathy-gtk/gossip-presence-chooser.c)150
-rw-r--r--libempathy-gtk/empathy-presence-chooser.glade (renamed from libempathy-gtk/gossip-presence-chooser.glade)0
-rw-r--r--libempathy-gtk/empathy-presence-chooser.h58
-rw-r--r--libempathy-gtk/empathy-private-chat.c (renamed from libempathy-gtk/gossip-private-chat.c)186
-rw-r--r--libempathy-gtk/empathy-private-chat.h68
-rw-r--r--libempathy-gtk/empathy-profile-chooser.c (renamed from libempathy-gtk/gossip-profile-chooser.c)8
-rw-r--r--libempathy-gtk/empathy-profile-chooser.h (renamed from libempathy-gtk/gossip-profile-chooser.h)10
-rw-r--r--libempathy-gtk/empathy-spell-dialog.c (renamed from libempathy-gtk/gossip-spell-dialog.c)54
-rw-r--r--libempathy-gtk/empathy-spell-dialog.glade (renamed from libempathy-gtk/gossip-spell-dialog.glade)0
-rw-r--r--libempathy-gtk/empathy-spell-dialog.h (renamed from libempathy-gtk/gossip-spell-dialog.h)10
-rw-r--r--libempathy-gtk/empathy-spell.c (renamed from libempathy-gtk/gossip-spell.c)70
-rw-r--r--libempathy-gtk/empathy-spell.h (renamed from libempathy-gtk/gossip-spell.h)20
-rw-r--r--libempathy-gtk/empathy-status-icon.c64
-rw-r--r--libempathy-gtk/empathy-status-presets.c (renamed from libempathy-gtk/gossip-status-presets.c)40
-rw-r--r--libempathy-gtk/empathy-status-presets.dtd (renamed from libempathy-gtk/gossip-status-presets.dtd)2
-rw-r--r--libempathy-gtk/empathy-status-presets.h (renamed from libempathy-gtk/gossip-status-presets.h)24
-rw-r--r--libempathy-gtk/empathy-theme-manager.c (renamed from libempathy-gtk/gossip-theme-manager.c)164
-rw-r--r--libempathy-gtk/empathy-theme-manager.h64
-rw-r--r--libempathy-gtk/empathy-ui-utils.c (renamed from libempathy-gtk/gossip-ui-utils.c)142
-rw-r--r--libempathy-gtk/empathy-ui-utils.h (renamed from libempathy-gtk/gossip-ui-utils.h)56
-rw-r--r--libempathy-gtk/gossip-account-chooser.h66
-rw-r--r--libempathy-gtk/gossip-cell-renderer-expander.h59
-rw-r--r--libempathy-gtk/gossip-cell-renderer-text.h56
-rw-r--r--libempathy-gtk/gossip-chat-manager.loT7
-rw-r--r--libempathy-gtk/gossip-chat-view.h134
-rw-r--r--libempathy-gtk/gossip-chat-window.h80
-rw-r--r--libempathy-gtk/gossip-chat.h123
-rw-r--r--libempathy-gtk/gossip-contact-list-store.h122
-rw-r--r--libempathy-gtk/gossip-contact-list-view.h78
-rw-r--r--libempathy-gtk/gossip-group-chat.h69
-rw-r--r--libempathy-gtk/gossip-preferences.h58
-rw-r--r--libempathy-gtk/gossip-presence-chooser.h58
-rw-r--r--libempathy-gtk/gossip-private-chat.h68
-rw-r--r--libempathy-gtk/gossip-theme-manager.h64
87 files changed, 3808 insertions, 3815 deletions
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am
index 113b37c3a..5a01c6471 100644
--- a/libempathy-gtk/Makefile.am
+++ b/libempathy-gtk/Makefile.am
@@ -14,33 +14,33 @@ libempathy_gtk_la_SOURCES = \
empathy-status-icon.c empathy-status-icon.h \
empathy-contact-widget.c empathy-contact-widget.h \
empathy-contact-dialogs.c empathy-contact-dialogs.h \
- gossip-accounts-dialog.c gossip-accounts-dialog.h \
- gossip-account-widget-generic.c gossip-account-widget-generic.h \
- gossip-account-widget-jabber.c gossip-account-widget-jabber.h \
- gossip-profile-chooser.c gossip-profile-chooser.h \
- gossip-cell-renderer-expander.c gossip-cell-renderer-expander.h \
- gossip-cell-renderer-text.c gossip-cell-renderer-text.h \
- gossip-spell.c gossip-spell.h \
- gossip-spell-dialog.c gossip-spell-dialog.h \
- gossip-contact-groups.c gossip-contact-groups.h \
- gossip-contact-list-store.c gossip-contact-list-store.h \
- gossip-contact-list-view.c gossip-contact-list-view.h \
- gossip-preferences.c gossip-preferences.h \
- gossip-theme-manager.c gossip-theme-manager.h \
- gossip-chat-window.c gossip-chat-window.h \
- gossip-chat.c gossip-chat.h \
- gossip-chat-view.c gossip-chat-view.h \
- gossip-private-chat.c gossip-private-chat.h \
- gossip-group-chat.c gossip-group-chat.h \
- gossip-geometry.c gossip-geometry.h \
- gossip-status-presets.c gossip-status-presets.h \
- gossip-presence-chooser.c gossip-presence-chooser.h \
- gossip-about-dialog.c gossip-about-dialog.h \
- gossip-account-chooser.c gossip-account-chooser.h \
- gossip-new-chatroom-dialog.c gossip-new-chatroom-dialog.h \
- gossip-chatrooms-window.c gossip-chatrooms-window.h \
- gossip-log-window.c gossip-log-window.h \
- gossip-ui-utils.c gossip-ui-utils.h
+ empathy-accounts-dialog.c empathy-accounts-dialog.h \
+ empathy-account-widget-generic.c empathy-account-widget-generic.h \
+ empathy-account-widget-jabber.c empathy-account-widget-jabber.h \
+ empathy-profile-chooser.c empathy-profile-chooser.h \
+ empathy-cell-renderer-expander.c empathy-cell-renderer-expander.h \
+ empathy-cell-renderer-text.c empathy-cell-renderer-text.h \
+ empathy-spell.c empathy-spell.h \
+ empathy-spell-dialog.c empathy-spell-dialog.h \
+ empathy-contact-groups.c empathy-contact-groups.h \
+ empathy-contact-list-store.c empathy-contact-list-store.h \
+ empathy-contact-list-view.c empathy-contact-list-view.h \
+ empathy-preferences.c empathy-preferences.h \
+ empathy-theme-manager.c empathy-theme-manager.h \
+ empathy-chat-window.c empathy-chat-window.h \
+ empathy-chat.c empathy-chat.h \
+ empathy-chat-view.c empathy-chat-view.h \
+ empathy-private-chat.c empathy-private-chat.h \
+ empathy-group-chat.c empathy-group-chat.h \
+ empathy-geometry.c empathy-geometry.h \
+ empathy-status-presets.c empathy-status-presets.h \
+ empathy-presence-chooser.c empathy-presence-chooser.h \
+ empathy-about-dialog.c empathy-about-dialog.h \
+ empathy-account-chooser.c empathy-account-chooser.h \
+ empathy-new-chatroom-dialog.c empathy-new-chatroom-dialog.h \
+ empathy-chatrooms-window.c empathy-chatrooms-window.h \
+ empathy-log-window.c empathy-log-window.h \
+ empathy-ui-utils.c empathy-ui-utils.h
libempathy_gtk_la_LIBADD = \
$(EMPATHY_LIBS) \
@@ -54,21 +54,21 @@ glade_DATA = \
empathy-status-icon.glade \
empathy-contact-widget.glade \
empathy-contact-dialogs.glade \
- gossip-preferences.glade \
- gossip-presence-chooser.glade \
- gossip-accounts-dialog.glade \
- gossip-account-widget-jabber.glade \
- gossip-new-chatroom-dialog.glade \
- gossip-group-chat.glade \
- gossip-chatrooms-window.glade \
- gossip-spell-dialog.glade \
- gossip-log-window.glade \
- gossip-chat.glade
+ empathy-preferences.glade \
+ empathy-presence-chooser.glade \
+ empathy-accounts-dialog.glade \
+ empathy-account-widget-jabber.glade \
+ empathy-new-chatroom-dialog.glade \
+ empathy-group-chat.glade \
+ empathy-chatrooms-window.glade \
+ empathy-spell-dialog.glade \
+ empathy-log-window.glade \
+ empathy-chat.glade
dtddir = $(datadir)/empathy
dtd_DATA = \
- gossip-status-presets.dtd \
- gossip-contact-groups.dtd
+ empathy-status-presets.dtd \
+ empathy-contact-groups.dtd
EXTRA_DIST = \
diff --git a/libempathy-gtk/gossip-about-dialog.c b/libempathy-gtk/empathy-about-dialog.c
index d2c13faa2..07d62ab72 100644
--- a/libempathy-gtk/gossip-about-dialog.c
+++ b/libempathy-gtk/empathy-about-dialog.c
@@ -29,8 +29,8 @@
#include <gtk/gtksizegroup.h>
#include <glade/glade.h>
-#include "gossip-about-dialog.h"
-#include "gossip-ui-utils.h"
+#include "empathy-about-dialog.h"
+#include "empathy-ui-utils.h"
#define WEB_SITE "http://live.gnome.org/Empathy"
@@ -78,11 +78,11 @@ about_dialog_activate_link_cb (GtkAboutDialog *about,
const gchar *link,
gpointer data)
{
- gossip_url_show (link);
+ empathy_url_show (link);
}
void
-gossip_about_dialog_new (GtkWindow *parent)
+empathy_about_dialog_new (GtkWindow *parent)
{
gchar *license_trans;
diff --git a/libempathy-gtk/gossip-about-dialog.h b/libempathy-gtk/empathy-about-dialog.h
index 0e5b9d4fb..ad5705e0e 100644
--- a/libempathy-gtk/gossip-about-dialog.h
+++ b/libempathy-gtk/empathy-about-dialog.h
@@ -20,15 +20,15 @@
* Authors: Martyn Russell <martyn@imendio.com>
*/
-#ifndef __GOSSIP_ABOUT_DIALOG_H__
-#define __GOSSIP_ABOUT_DIALOG_H__
+#ifndef __EMPATHY_ABOUT_DIALOG_H__
+#define __EMPATHY_ABOUT_DIALOG_H__
#include <gtk/gtkwindow.h>
G_BEGIN_DECLS
-void gossip_about_dialog_new (GtkWindow *parent);
+void empathy_about_dialog_new (GtkWindow *parent);
G_END_DECLS
-#endif /* __GOSSIP_ABOUT_DIALOG_H__ */
+#endif /* __EMPATHY_ABOUT_DIALOG_H__ */
diff --git a/libempathy-gtk/gossip-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index dfed1bb54..eb46c52f7 100644
--- a/libempathy-gtk/gossip-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -32,12 +32,12 @@
#include <libmissioncontrol/mc-account-monitor.h>
#include <libmissioncontrol/mission-control.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-utils.h>
-#include "gossip-ui-utils.h"
-#include "gossip-account-chooser.h"
+#include "empathy-ui-utils.h"
+#include "empathy-account-chooser.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_ACCOUNT_CHOOSER, GossipAccountChooserPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserPriv))
typedef struct {
MissionControl *mc;
@@ -46,10 +46,10 @@ typedef struct {
gboolean set_active_item;
gboolean can_select_all;
gboolean has_all_option;
-} GossipAccountChooserPriv;
+} EmpathyAccountChooserPriv;
typedef struct {
- GossipAccountChooser *chooser;
+ EmpathyAccountChooser *chooser;
McAccount *account;
gboolean set;
} SetAccountData;
@@ -71,18 +71,18 @@ static void account_chooser_set_property (GObject
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void account_chooser_setup (GossipAccountChooser *chooser);
+static void account_chooser_setup (EmpathyAccountChooser *chooser);
static void account_chooser_account_created_cb (McAccountMonitor *monitor,
const gchar *unique_name,
- GossipAccountChooser *chooser);
+ EmpathyAccountChooser *chooser);
static void account_chooser_account_add_foreach (McAccount *account,
- GossipAccountChooser *chooser);
+ EmpathyAccountChooser *chooser);
static void account_chooser_account_deleted_cb (McAccountMonitor *monitor,
const gchar *unique_name,
- GossipAccountChooser *chooser);
+ EmpathyAccountChooser *chooser);
static void account_chooser_account_remove_foreach (McAccount *account,
- GossipAccountChooser *chooser);
-static void account_chooser_update_iter (GossipAccountChooser *chooser,
+ EmpathyAccountChooser *chooser);
+static void account_chooser_update_iter (EmpathyAccountChooser *chooser,
GtkTreeIter *iter,
McAccount *account);
static void account_chooser_status_changed_cb (MissionControl *mc,
@@ -90,10 +90,10 @@ static void account_chooser_status_changed_cb (MissionControl
McPresence presence,
TelepathyConnectionStatusReason reason,
const gchar *unique_name,
- GossipAccountChooser *chooser);
+ EmpathyAccountChooser *chooser);
static gboolean account_chooser_separator_func (GtkTreeModel *model,
GtkTreeIter *iter,
- GossipAccountChooser *chooser);
+ EmpathyAccountChooser *chooser);
static gboolean account_chooser_set_account_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
@@ -101,7 +101,7 @@ static gboolean account_chooser_set_account_foreach (GtkTreeModel
static gboolean account_chooser_set_enabled_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipAccountChooser *chooser);
+ EmpathyAccountChooser *chooser);
enum {
PROP_0,
@@ -109,10 +109,10 @@ enum {
PROP_HAS_ALL_OPTION,
};
-G_DEFINE_TYPE (GossipAccountChooser, gossip_account_chooser, GTK_TYPE_COMBO_BOX);
+G_DEFINE_TYPE (EmpathyAccountChooser, empathy_account_chooser, GTK_TYPE_COMBO_BOX);
static void
-gossip_account_chooser_class_init (GossipAccountChooserClass *klass)
+empathy_account_chooser_class_init (EmpathyAccountChooserClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -136,21 +136,21 @@ gossip_account_chooser_class_init (GossipAccountChooserClass *klass)
FALSE,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipAccountChooserPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyAccountChooserPriv));
}
static void
-gossip_account_chooser_init (GossipAccountChooser *chooser)
+empathy_account_chooser_init (EmpathyAccountChooser *chooser)
{
}
static void
account_chooser_finalize (GObject *object)
{
- GossipAccountChooser *chooser;
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooser *chooser;
+ EmpathyAccountChooserPriv *priv;
- chooser = GOSSIP_ACCOUNT_CHOOSER (object);
+ chooser = EMPATHY_ACCOUNT_CHOOSER (object);
priv = GET_PRIV (object);
g_signal_handlers_disconnect_by_func (priv->monitor,
@@ -166,7 +166,7 @@ account_chooser_finalize (GObject *object)
g_object_unref (priv->mc);
g_object_unref (priv->monitor);
- G_OBJECT_CLASS (gossip_account_chooser_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_account_chooser_parent_class)->finalize (object);
}
static void
@@ -175,7 +175,7 @@ account_chooser_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
priv = GET_PRIV (object);
@@ -198,17 +198,17 @@ account_chooser_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
priv = GET_PRIV (object);
switch (param_id) {
case PROP_CAN_SELECT_ALL:
- gossip_account_chooser_set_can_select_all (GOSSIP_ACCOUNT_CHOOSER (object),
+ empathy_account_chooser_set_can_select_all (EMPATHY_ACCOUNT_CHOOSER (object),
g_value_get_boolean (value));
break;
case PROP_HAS_ALL_OPTION:
- gossip_account_chooser_set_has_all_option (GOSSIP_ACCOUNT_CHOOSER (object),
+ empathy_account_chooser_set_has_all_option (EMPATHY_ACCOUNT_CHOOSER (object),
g_value_get_boolean (value));
break;
default:
@@ -218,18 +218,18 @@ account_chooser_set_property (GObject *object,
}
GtkWidget *
-gossip_account_chooser_new (void)
+empathy_account_chooser_new (void)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
McAccountMonitor *monitor;
GtkWidget *chooser;
monitor = mc_account_monitor_new ();
- chooser = g_object_new (GOSSIP_TYPE_ACCOUNT_CHOOSER, NULL);
+ chooser = g_object_new (EMPATHY_TYPE_ACCOUNT_CHOOSER, NULL);
priv = GET_PRIV (chooser);
- priv->mc = gossip_mission_control_new ();
+ priv->mc = empathy_mission_control_new ();
priv->monitor = mc_account_monitor_new ();
g_signal_connect (priv->monitor, "account-created",
@@ -242,20 +242,20 @@ gossip_account_chooser_new (void)
G_CALLBACK (account_chooser_status_changed_cb),
chooser, NULL);
- account_chooser_setup (GOSSIP_ACCOUNT_CHOOSER (chooser));
+ account_chooser_setup (EMPATHY_ACCOUNT_CHOOSER (chooser));
return chooser;
}
McAccount *
-gossip_account_chooser_get_account (GossipAccountChooser *chooser)
+empathy_account_chooser_get_account (EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
McAccount *account;
GtkTreeModel *model;
GtkTreeIter iter;
- g_return_val_if_fail (GOSSIP_IS_ACCOUNT_CHOOSER (chooser), NULL);
+ g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), NULL);
priv = GET_PRIV (chooser);
@@ -268,7 +268,7 @@ gossip_account_chooser_get_account (GossipAccountChooser *chooser)
}
gboolean
-gossip_account_chooser_set_account (GossipAccountChooser *chooser,
+empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
McAccount *account)
{
GtkComboBox *combobox;
@@ -276,7 +276,7 @@ gossip_account_chooser_set_account (GossipAccountChooser *chooser,
GtkTreeIter iter;
SetAccountData data;
- g_return_val_if_fail (GOSSIP_IS_ACCOUNT_CHOOSER (chooser), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), FALSE);
combobox = GTK_COMBO_BOX (chooser);
model = gtk_combo_box_get_model (combobox);
@@ -293,11 +293,11 @@ gossip_account_chooser_set_account (GossipAccountChooser *chooser,
}
gboolean
-gossip_account_chooser_get_can_select_all (GossipAccountChooser *chooser)
+empathy_account_chooser_get_can_select_all (EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_ACCOUNT_CHOOSER (chooser), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), FALSE);
priv = GET_PRIV (chooser);
@@ -305,14 +305,14 @@ gossip_account_chooser_get_can_select_all (GossipAccountChooser *chooser)
}
void
-gossip_account_chooser_set_can_select_all (GossipAccountChooser *chooser,
+empathy_account_chooser_set_can_select_all (EmpathyAccountChooser *chooser,
gboolean can_select_all)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
GtkComboBox *combobox;
GtkTreeModel *model;
- g_return_if_fail (GOSSIP_IS_ACCOUNT_CHOOSER (chooser));
+ g_return_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser));
priv = GET_PRIV (chooser);
@@ -333,11 +333,11 @@ gossip_account_chooser_set_can_select_all (GossipAccountChooser *chooser,
}
gboolean
-gossip_account_chooser_get_has_all_option (GossipAccountChooser *chooser)
+empathy_account_chooser_get_has_all_option (EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_ACCOUNT_CHOOSER (chooser), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), FALSE);
priv = GET_PRIV (chooser);
@@ -345,16 +345,16 @@ gossip_account_chooser_get_has_all_option (GossipAccountChooser *chooser)
}
void
-gossip_account_chooser_set_has_all_option (GossipAccountChooser *chooser,
+empathy_account_chooser_set_has_all_option (EmpathyAccountChooser *chooser,
gboolean has_all_option)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
GtkComboBox *combobox;
GtkListStore *store;
GtkTreeModel *model;
GtkTreeIter iter;
- g_return_if_fail (GOSSIP_IS_ACCOUNT_CHOOSER (chooser));
+ g_return_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser));
priv = GET_PRIV (chooser);
@@ -410,9 +410,9 @@ gossip_account_chooser_set_has_all_option (GossipAccountChooser *chooser,
}
static void
-account_chooser_setup (GossipAccountChooser *chooser)
+account_chooser_setup (EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
GList *accounts;
GtkListStore *store;
GtkCellRenderer *renderer;
@@ -461,7 +461,7 @@ account_chooser_setup (GossipAccountChooser *chooser)
static void
account_chooser_account_created_cb (McAccountMonitor *monitor,
const gchar *unique_name,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
McAccount *account;
@@ -472,9 +472,9 @@ account_chooser_account_created_cb (McAccountMonitor *monitor,
static void
account_chooser_account_add_foreach (McAccount *account,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
GtkListStore *store;
GtkComboBox *combobox;
GtkTreeIter iter;
@@ -491,7 +491,7 @@ account_chooser_account_add_foreach (McAccount *account,
static void
account_chooser_account_deleted_cb (McAccountMonitor *monitor,
const gchar *unique_name,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
McAccount *account;
@@ -502,17 +502,17 @@ account_chooser_account_deleted_cb (McAccountMonitor *monitor,
static void
account_chooser_account_remove_foreach (McAccount *account,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
/* Fixme: TODO */
}
static void
-account_chooser_update_iter (GossipAccountChooser *chooser,
+account_chooser_update_iter (EmpathyAccountChooser *chooser,
GtkTreeIter *iter,
McAccount *account)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
GtkListStore *store;
GtkComboBox *combobox;
TpConn *tp_conn;
@@ -524,7 +524,7 @@ account_chooser_update_iter (GossipAccountChooser *chooser,
combobox = GTK_COMBO_BOX (chooser);
store = GTK_LIST_STORE (gtk_combo_box_get_model (combobox));
- icon_name = gossip_icon_name_from_account (account);
+ icon_name = empathy_icon_name_from_account (account);
tp_conn = mission_control_get_connection (priv->mc, account, NULL);
is_enabled = (tp_conn != NULL || priv->can_select_all);
@@ -552,7 +552,7 @@ account_chooser_status_changed_cb (MissionControl *mc,
McPresence presence,
TelepathyConnectionStatusReason reason,
const gchar *unique_name,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
/* FIXME: implement */
}
@@ -560,9 +560,9 @@ account_chooser_status_changed_cb (MissionControl *mc,
static gboolean
account_chooser_separator_func (GtkTreeModel *model,
GtkTreeIter *iter,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
gchar *text;
gboolean is_separator;
@@ -597,7 +597,7 @@ account_chooser_set_account_foreach (GtkTreeModel *model,
else if ((data->account && !account) || (!data->account && account)) {
equal = FALSE;
} else {
- equal = gossip_account_equal (data->account, account);
+ equal = empathy_account_equal (data->account, account);
g_object_unref (account);
}
@@ -617,9 +617,9 @@ static gboolean
account_chooser_set_enabled_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipAccountChooser *chooser)
+ EmpathyAccountChooser *chooser)
{
- GossipAccountChooserPriv *priv;
+ EmpathyAccountChooserPriv *priv;
McAccount *account;
priv = GET_PRIV (chooser);
diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h
new file mode 100644
index 000000000..8d9cb657c
--- /dev/null
+++ b/libempathy-gtk/empathy-account-chooser.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2005-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Martyn Russell <martyn@imendio.com>
+ */
+
+#ifndef __EMPATHY_ACCOUNT_CHOOSER_H__
+#define __EMPATHY_ACCOUNT_CHOOSER_H__
+
+#include <gtk/gtkcombobox.h>
+
+#include <libmissioncontrol/mc-account.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_ACCOUNT_CHOOSER (empathy_account_chooser_get_type ())
+#define EMPATHY_ACCOUNT_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooser))
+#define EMPATHY_ACCOUNT_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserClass))
+#define EMPATHY_IS_ACCOUNT_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_ACCOUNT_CHOOSER))
+#define EMPATHY_IS_ACCOUNT_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_ACCOUNT_CHOOSER))
+#define EMPATHY_ACCOUNT_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserClass))
+
+typedef struct _EmpathyAccountChooser EmpathyAccountChooser;
+typedef struct _EmpathyAccountChooserClass EmpathyAccountChooserClass;
+
+struct _EmpathyAccountChooser {
+ GtkComboBox parent;
+};
+
+struct _EmpathyAccountChooserClass {
+ GtkComboBoxClass parent_class;
+};
+
+GType empathy_account_chooser_get_type (void) G_GNUC_CONST;
+GtkWidget * empathy_account_chooser_new (void);
+McAccount * empathy_account_chooser_get_account (EmpathyAccountChooser *chooser);
+gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
+ McAccount *account);
+gboolean empathy_account_chooser_get_can_select_all (EmpathyAccountChooser *chooser);
+
+void empathy_account_chooser_set_can_select_all (EmpathyAccountChooser *chooser,
+ gboolean can_select_all);
+gboolean empathy_account_chooser_get_has_all_option (EmpathyAccountChooser *chooser);
+void empathy_account_chooser_set_has_all_option (EmpathyAccountChooser *chooser,
+ gboolean has_all_option);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_ACCOUNT_CHOOSER_H__ */
+
diff --git a/libempathy-gtk/gossip-account-widget-generic.c b/libempathy-gtk/empathy-account-widget-generic.c
index 4ba0f9f2d..4f9ea03b0 100644
--- a/libempathy-gtk/gossip-account-widget-generic.c
+++ b/libempathy-gtk/empathy-account-widget-generic.c
@@ -32,9 +32,9 @@
#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
-#include <libempathy-gtk/gossip-ui-utils.h>
+#include <libempathy-gtk/empathy-ui-utils.h>
-#include "gossip-account-widget-generic.h"
+#include "empathy-account-widget-generic.h"
typedef struct {
McAccount *account;
@@ -44,25 +44,25 @@ typedef struct {
GtkSizeGroup *size_group;
guint n_rows;
-} GossipAccountWidgetGeneric;
+} EmpathyAccountWidgetGeneric;
static gboolean account_widget_generic_entry_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- GossipAccountWidgetGeneric *settings);
+ EmpathyAccountWidgetGeneric *settings);
static void account_widget_generic_int_changed_cb (GtkWidget *widget,
- GossipAccountWidgetGeneric *settings);
+ EmpathyAccountWidgetGeneric *settings);
static void account_widget_generic_checkbutton_toggled_cb (GtkWidget *widget,
- GossipAccountWidgetGeneric *settings);
+ EmpathyAccountWidgetGeneric *settings);
static gchar * account_widget_generic_format_param_name (const gchar *param_name);
static void account_widget_generic_setup_foreach (McProtocolParam *param,
- GossipAccountWidgetGeneric *settings);
+ EmpathyAccountWidgetGeneric *settings);
static void account_widget_generic_destroy_cb (GtkWidget *widget,
- GossipAccountWidgetGeneric *settings);
+ EmpathyAccountWidgetGeneric *settings);
static gboolean
account_widget_generic_entry_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- GossipAccountWidgetGeneric *settings)
+ EmpathyAccountWidgetGeneric *settings)
{
const gchar *str;
const gchar *param_name;
@@ -77,7 +77,7 @@ account_widget_generic_entry_focus_cb (GtkWidget *widget,
static void
account_widget_generic_int_changed_cb (GtkWidget *widget,
- GossipAccountWidgetGeneric *settings)
+ EmpathyAccountWidgetGeneric *settings)
{
const gchar *param_name;
gint value;
@@ -90,7 +90,7 @@ account_widget_generic_int_changed_cb (GtkWidget *widget,
static void
account_widget_generic_checkbutton_toggled_cb (GtkWidget *widget,
- GossipAccountWidgetGeneric *settings)
+ EmpathyAccountWidgetGeneric *settings)
{
gboolean active;
const gchar *param_name;
@@ -127,7 +127,7 @@ account_widget_generic_format_param_name (const gchar *param_name)
static void
account_widget_generic_setup_foreach (McProtocolParam *param,
- GossipAccountWidgetGeneric *settings)
+ EmpathyAccountWidgetGeneric *settings)
{
GtkWidget *widget;
gchar *param_name_formatted;
@@ -243,7 +243,7 @@ account_widget_generic_setup_foreach (McProtocolParam *param,
}
static void
-accounts_widget_generic_setup (GossipAccountWidgetGeneric *settings)
+accounts_widget_generic_setup (EmpathyAccountWidgetGeneric *settings)
{
McProtocol *protocol;
McProfile *profile;
@@ -262,7 +262,7 @@ accounts_widget_generic_setup (GossipAccountWidgetGeneric *settings)
static void
account_widget_generic_destroy_cb (GtkWidget *widget,
- GossipAccountWidgetGeneric *settings)
+ EmpathyAccountWidgetGeneric *settings)
{
g_object_unref (settings->account);
g_object_unref (settings->size_group);
@@ -271,15 +271,15 @@ account_widget_generic_destroy_cb (GtkWidget *widget,
}
GtkWidget *
-gossip_account_widget_generic_new (McAccount *account,
+empathy_account_widget_generic_new (McAccount *account,
GtkWidget *label_name)
{
- GossipAccountWidgetGeneric *settings;
+ EmpathyAccountWidgetGeneric *settings;
g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (GTK_IS_WIDGET (label_name), NULL);
- settings = g_new0 (GossipAccountWidgetGeneric, 1);
+ settings = g_new0 (EmpathyAccountWidgetGeneric, 1);
settings->account = g_object_ref (account);
diff --git a/libempathy-gtk/gossip-account-widget-generic.h b/libempathy-gtk/empathy-account-widget-generic.h
index 4b3c7eba2..e26c72e84 100644
--- a/libempathy-gtk/gossip-account-widget-generic.h
+++ b/libempathy-gtk/empathy-account-widget-generic.h
@@ -22,8 +22,8 @@
* Martyn Russell <martyn@imendio.com>
*/
-#ifndef __GOSSIP_ACCOUNT_WIDGET_GENERIC_H__
-#define __GOSSIP_ACCOUNT_WIDGET_GENERIC_H__
+#ifndef __EMPATHY_ACCOUNT_WIDGET_GENERIC_H__
+#define __EMPATHY_ACCOUNT_WIDGET_GENERIC_H__
#include <gtk/gtk.h>
@@ -31,9 +31,9 @@
G_BEGIN_DECLS
-GtkWidget *gossip_account_widget_generic_new (McAccount *account,
+GtkWidget *empathy_account_widget_generic_new (McAccount *account,
GtkWidget *label_name);
G_END_DECLS
-#endif /* __GOSSIP_ACCOUNT_WIDGET_GENERIC_H__ */
+#endif /* __EMPATHY_ACCOUNT_WIDGET_GENERIC_H__ */
diff --git a/libempathy-gtk/gossip-account-widget-jabber.c b/libempathy-gtk/empathy-account-widget-jabber.c
index e7334b4b5..2e5a4871b 100644
--- a/libempathy-gtk/gossip-account-widget-jabber.c
+++ b/libempathy-gtk/empathy-account-widget-jabber.c
@@ -32,10 +32,10 @@
#include <libmissioncontrol/mc-profile.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-utils.h>
-#include "gossip-account-widget-jabber.h"
-#include "gossip-ui-utils.h"
+#include "empathy-account-widget-jabber.h"
+#include "empathy-ui-utils.h"
#define PORT_WITHOUT_SSL 5222
#define PORT_WITH_SSL 5223
@@ -51,27 +51,27 @@ typedef struct {
GtkWidget *entry_server;
GtkWidget *spinbutton_port;
GtkWidget *checkbutton_ssl;
-} GossipAccountWidgetJabber;
+} EmpathyAccountWidgetJabber;
static gboolean account_widget_jabber_entry_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- GossipAccountWidgetJabber *settings);
+ EmpathyAccountWidgetJabber *settings);
static void account_widget_jabber_entry_changed_cb (GtkWidget *widget,
- GossipAccountWidgetJabber *settings);
+ EmpathyAccountWidgetJabber *settings);
static void account_widget_jabber_checkbutton_toggled_cb (GtkWidget *widget,
- GossipAccountWidgetJabber *settings);
+ EmpathyAccountWidgetJabber *settings);
static void account_widget_jabber_value_changed_cb (GtkWidget *spinbutton,
- GossipAccountWidgetJabber *settings);
+ EmpathyAccountWidgetJabber *settings);
static void account_widget_jabber_button_forget_clicked_cb (GtkWidget *button,
- GossipAccountWidgetJabber *settings);
+ EmpathyAccountWidgetJabber *settings);
static void account_widget_jabber_destroy_cb (GtkWidget *widget,
- GossipAccountWidgetJabber *settings);
-static void account_widget_jabber_setup (GossipAccountWidgetJabber *settings);
+ EmpathyAccountWidgetJabber *settings);
+static void account_widget_jabber_setup (EmpathyAccountWidgetJabber *settings);
static gboolean
account_widget_jabber_entry_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- GossipAccountWidgetJabber *settings)
+ EmpathyAccountWidgetJabber *settings)
{
const gchar *param;
const gchar *str;
@@ -107,7 +107,7 @@ account_widget_jabber_entry_focus_cb (GtkWidget *widget,
static void
account_widget_jabber_entry_changed_cb (GtkWidget *widget,
- GossipAccountWidgetJabber *settings)
+ EmpathyAccountWidgetJabber *settings)
{
if (widget == settings->entry_password) {
const gchar *str;
@@ -119,7 +119,7 @@ account_widget_jabber_entry_changed_cb (GtkWidget *widget,
static void
account_widget_jabber_checkbutton_toggled_cb (GtkWidget *widget,
- GossipAccountWidgetJabber *settings)
+ EmpathyAccountWidgetJabber *settings)
{
if (widget == settings->checkbutton_ssl) {
gint port = 0;
@@ -146,7 +146,7 @@ account_widget_jabber_checkbutton_toggled_cb (GtkWidget *widget,
static void
account_widget_jabber_value_changed_cb (GtkWidget *spinbutton,
- GossipAccountWidgetJabber *settings)
+ EmpathyAccountWidgetJabber *settings)
{
if (spinbutton == settings->spinbutton_port) {
gdouble value;
@@ -158,7 +158,7 @@ account_widget_jabber_value_changed_cb (GtkWidget *spinbutton,
static void
account_widget_jabber_button_forget_clicked_cb (GtkWidget *button,
- GossipAccountWidgetJabber *settings)
+ EmpathyAccountWidgetJabber *settings)
{
mc_account_set_param_string (settings->account, "password", "");
gtk_entry_set_text (GTK_ENTRY (settings->entry_password), "");
@@ -166,14 +166,14 @@ account_widget_jabber_button_forget_clicked_cb (GtkWidget *butto
static void
account_widget_jabber_destroy_cb (GtkWidget *widget,
- GossipAccountWidgetJabber *settings)
+ EmpathyAccountWidgetJabber *settings)
{
g_object_unref (settings->account);
g_free (settings);
}
static void
-account_widget_jabber_setup (GossipAccountWidgetJabber *settings)
+account_widget_jabber_setup (EmpathyAccountWidgetJabber *settings)
{
gint port = 0;
gchar *id = NULL;
@@ -217,18 +217,18 @@ account_widget_jabber_setup (GossipAccountWidgetJabber *settings)
}
GtkWidget *
-gossip_account_widget_jabber_new (McAccount *account)
+empathy_account_widget_jabber_new (McAccount *account)
{
- GossipAccountWidgetJabber *settings;
+ EmpathyAccountWidgetJabber *settings;
GladeXML *glade;
GtkSizeGroup *size_group;
GtkWidget *label_id, *label_password;
GtkWidget *label_server, *label_resource, *label_port;
- settings = g_new0 (GossipAccountWidgetJabber, 1);
+ settings = g_new0 (EmpathyAccountWidgetJabber, 1);
settings->account = g_object_ref (account);
- glade = gossip_glade_get_file ("gossip-account-widget-jabber.glade",
+ glade = empathy_glade_get_file ("empathy-account-widget-jabber.glade",
"vbox_jabber_settings",
NULL,
"vbox_jabber_settings", &settings->vbox_settings,
@@ -248,7 +248,7 @@ gossip_account_widget_jabber_new (McAccount *account)
account_widget_jabber_setup (settings);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
settings,
"vbox_jabber_settings", "destroy", account_widget_jabber_destroy_cb,
"button_forget", "clicked", account_widget_jabber_button_forget_clicked_cb,
diff --git a/libempathy-gtk/gossip-account-widget-jabber.glade b/libempathy-gtk/empathy-account-widget-jabber.glade
index 12eec7576..12eec7576 100644
--- a/libempathy-gtk/gossip-account-widget-jabber.glade
+++ b/libempathy-gtk/empathy-account-widget-jabber.glade
diff --git a/libempathy-gtk/gossip-account-widget-jabber.h b/libempathy-gtk/empathy-account-widget-jabber.h
index 0a967f7b6..99205c9ac 100644
--- a/libempathy-gtk/gossip-account-widget-jabber.h
+++ b/libempathy-gtk/empathy-account-widget-jabber.h
@@ -20,15 +20,15 @@
* Authors: Xavier Claessens <xclaesse@gmail.com>
*/
-#ifndef __GOSSIP_ACCOUNT_WIDGET_JABBER_H__
-#define __GOSSIP_ACCOUNT_WIDGET_JABBER_H__
+#ifndef __EMPATHY_ACCOUNT_WIDGET_JABBER_H__
+#define __EMPATHY_ACCOUNT_WIDGET_JABBER_H__
#include <libmissioncontrol/mc-account.h>
G_BEGIN_DECLS
-GtkWidget *gossip_account_widget_jabber_new (McAccount *account);
+GtkWidget *empathy_account_widget_jabber_new (McAccount *account);
G_END_DECLS
-#endif /* __GOSSIP_ACCOUNT_WIDGET_JABBER_H__ */
+#endif /* __EMPATHY_ACCOUNT_WIDGET_JABBER_H__ */
diff --git a/libempathy-gtk/gossip-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index 3abb9be33..0e5f909c1 100644
--- a/libempathy-gtk/gossip-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -38,14 +38,14 @@
#include <libmissioncontrol/mc-account-monitor.h>
#include <libtelepathy/tp-constants.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy-gtk/gossip-ui-utils.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy-gtk/empathy-ui-utils.h>
-#include "gossip-accounts-dialog.h"
-#include "gossip-profile-chooser.h"
-#include "gossip-account-widget-generic.h"
-#include "gossip-account-widget-jabber.h"
+#include "empathy-accounts-dialog.h"
+#include "empathy-profile-chooser.h"
+#include "empathy-account-widget-generic.h"
+#include "empathy-account-widget-jabber.h"
#define DEBUG_DOMAIN "AccountDialog"
@@ -85,7 +85,7 @@ typedef struct {
MissionControl *mc;
McAccountMonitor *monitor;
-} GossipAccountsDialog;
+} EmpathyAccountsDialog;
enum {
COL_NAME,
@@ -94,69 +94,69 @@ enum {
COL_COUNT
};
-static void accounts_dialog_setup (GossipAccountsDialog *dialog);
-static void accounts_dialog_update_account (GossipAccountsDialog *dialog,
+static void accounts_dialog_setup (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
McAccount *account);
-static void accounts_dialog_model_setup (GossipAccountsDialog *dialog);
-static void accounts_dialog_model_add_columns (GossipAccountsDialog *dialog);
-static void accounts_dialog_model_select_first (GossipAccountsDialog *dialog);
+static void accounts_dialog_model_setup (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_add_columns (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_select_first (EmpathyAccountsDialog *dialog);
static void accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipAccountsDialog *dialog);
-static McAccount *accounts_dialog_model_get_selected (GossipAccountsDialog *dialog);
-static void accounts_dialog_model_set_selected (GossipAccountsDialog *dialog,
+ EmpathyAccountsDialog *dialog);
+static McAccount *accounts_dialog_model_get_selected (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_set_selected (EmpathyAccountsDialog *dialog,
McAccount *account);
-static gboolean accounts_dialog_model_remove_selected (GossipAccountsDialog *dialog);
+static gboolean accounts_dialog_model_remove_selected (EmpathyAccountsDialog *dialog);
static void accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
- GossipAccountsDialog *dialog);
-static void accounts_dialog_add_account (GossipAccountsDialog *dialog,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
McAccount *account);
static void accounts_dialog_account_added_cb (McAccountMonitor *monitor,
gchar *unique_name,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_account_removed_cb (McAccountMonitor *monitor,
gchar *unique_name,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static gboolean accounts_dialog_row_changed_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gpointer user_data);
-static gboolean accounts_dialog_flash_connecting_cb (GossipAccountsDialog *dialog);
+static gboolean accounts_dialog_flash_connecting_cb (EmpathyAccountsDialog *dialog);
static void accounts_dialog_status_changed_cb (MissionControl *mc,
TelepathyConnectionStatus status,
McPresence presence,
TelepathyConnectionStatusReason reason,
const gchar *unique_name,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_entry_name_changed_cb (GtkWidget *widget,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_button_create_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_button_back_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_button_connect_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_button_add_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_remove_response_cb (GtkWidget *dialog,
gint response,
McAccount *account);
static void accounts_dialog_button_remove_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_treeview_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_response_cb (GtkWidget *widget,
gint response,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void accounts_dialog_destroy_cb (GtkWidget *widget,
- GossipAccountsDialog *dialog);
+ EmpathyAccountsDialog *dialog);
static void
-accounts_dialog_setup (GossipAccountsDialog *dialog)
+accounts_dialog_setup (EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkListStore *store;
@@ -205,7 +205,7 @@ accounts_dialog_setup (GossipAccountsDialog *dialog)
}
static void
-accounts_dialog_update_connect_button (GossipAccountsDialog *dialog)
+accounts_dialog_update_connect_button (EmpathyAccountsDialog *dialog)
{
McAccount *account;
GtkWidget *image;
@@ -234,7 +234,7 @@ accounts_dialog_update_connect_button (GossipAccountsDialog *dialog)
}
static void
-accounts_dialog_update_account (GossipAccountsDialog *dialog,
+accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
McAccount *account)
{
if (dialog->settings_widget) {
@@ -286,10 +286,10 @@ accounts_dialog_update_account (GossipAccountsDialog *dialog,
if (strcmp (config_ui, "jabber") == 0) {
dialog->settings_widget =
- gossip_account_widget_jabber_new (account);
+ empathy_account_widget_jabber_new (account);
} else {
dialog->settings_widget =
- gossip_account_widget_generic_new (account,
+ empathy_account_widget_generic_new (account,
dialog->label_name);
}
@@ -318,7 +318,7 @@ accounts_dialog_update_account (GossipAccountsDialog *dialog,
}
static void
-accounts_dialog_model_setup (GossipAccountsDialog *dialog)
+accounts_dialog_model_setup (EmpathyAccountsDialog *dialog)
{
GtkListStore *store;
GtkTreeSelection *selection;
@@ -347,7 +347,7 @@ accounts_dialog_model_setup (GossipAccountsDialog *dialog)
}
static void
-accounts_dialog_model_add_columns (GossipAccountsDialog *dialog)
+accounts_dialog_model_add_columns (EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeViewColumn *column;
@@ -380,7 +380,7 @@ accounts_dialog_model_add_columns (GossipAccountsDialog *dialog)
}
static void
-accounts_dialog_model_select_first (GossipAccountsDialog *dialog)
+accounts_dialog_model_select_first (EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -404,7 +404,7 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
const gchar *icon_name;
@@ -416,8 +416,8 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
COL_ACCOUNT_POINTER, &account,
-1);
- icon_name = gossip_icon_name_from_account (account);
- pixbuf = gossip_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
+ icon_name = empathy_icon_name_from_account (account);
+ pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
if (pixbuf) {
if (status == TP_CONN_STATUS_DISCONNECTED ||
@@ -452,7 +452,7 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
}
static McAccount *
-accounts_dialog_model_get_selected (GossipAccountsDialog *dialog)
+accounts_dialog_model_get_selected (EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -473,7 +473,7 @@ accounts_dialog_model_get_selected (GossipAccountsDialog *dialog)
}
static void
-accounts_dialog_model_set_selected (GossipAccountsDialog *dialog,
+accounts_dialog_model_set_selected (EmpathyAccountsDialog *dialog,
McAccount *account)
{
GtkTreeView *view;
@@ -496,7 +496,7 @@ accounts_dialog_model_set_selected (GossipAccountsDialog *dialog,
COL_ACCOUNT_POINTER, &this_account,
-1);
- equal = gossip_account_equal (this_account, account);
+ equal = empathy_account_equal (this_account, account);
g_object_unref (this_account);
if (equal) {
@@ -507,7 +507,7 @@ accounts_dialog_model_set_selected (GossipAccountsDialog *dialog,
}
static gboolean
-accounts_dialog_model_remove_selected (GossipAccountsDialog *dialog)
+accounts_dialog_model_remove_selected (EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -526,7 +526,7 @@ accounts_dialog_model_remove_selected (GossipAccountsDialog *dialog)
static void
accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
GtkTreeModel *model;
@@ -549,7 +549,7 @@ accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
}
static void
-accounts_dialog_add_account (GossipAccountsDialog *dialog,
+accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
McAccount *account)
{
TelepathyConnectionStatus status;
@@ -574,7 +574,7 @@ accounts_dialog_add_account (GossipAccountsDialog *dialog,
COL_ACCOUNT_POINTER, &this_account,
-1);
- equal = gossip_account_equal (this_account, account);
+ equal = empathy_account_equal (this_account, account);
g_object_unref (this_account);
if (equal) {
@@ -587,7 +587,7 @@ accounts_dialog_add_account (GossipAccountsDialog *dialog,
g_return_if_fail (name != NULL);
- gossip_debug (DEBUG_DOMAIN, "Adding new account: %s", name);
+ empathy_debug (DEBUG_DOMAIN, "Adding new account: %s", name);
gtk_list_store_insert_with_values (store, &iter,
-1,
@@ -600,7 +600,7 @@ accounts_dialog_add_account (GossipAccountsDialog *dialog,
static void
accounts_dialog_account_added_cb (McAccountMonitor *monitor,
gchar *unique_name,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
@@ -612,7 +612,7 @@ accounts_dialog_account_added_cb (McAccountMonitor *monitor,
static void
accounts_dialog_account_removed_cb (McAccountMonitor *monitor,
gchar *unique_name,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
@@ -636,7 +636,7 @@ accounts_dialog_row_changed_foreach (GtkTreeModel *model,
}
static gboolean
-accounts_dialog_flash_connecting_cb (GossipAccountsDialog *dialog)
+accounts_dialog_flash_connecting_cb (EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -657,7 +657,7 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
McPresence presence,
TelepathyConnectionStatusReason reason,
const gchar *unique_name,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeSelection *selection;
@@ -674,7 +674,7 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
model = gtk_tree_view_get_model (view);
account = mc_account_lookup (unique_name);
- gossip_debug (DEBUG_DOMAIN, "Status changed for account %s: "
+ empathy_debug (DEBUG_DOMAIN, "Status changed for account %s: "
"status=%d presence=%d",
unique_name, status, presence);
@@ -688,7 +688,7 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
COL_ACCOUNT_POINTER, &this_account,
-1);
- equal = gossip_account_equal (this_account, account);
+ equal = empathy_account_equal (this_account, account);
g_object_unref (this_account);
if (equal) {
@@ -745,7 +745,7 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
static void
accounts_dialog_entry_name_changed_cb (GtkWidget *widget,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
const gchar *str;
@@ -755,7 +755,7 @@ accounts_dialog_entry_name_changed_cb (GtkWidget *widget,
static void
accounts_dialog_button_create_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McProfile *profile;
McAccount *account;
@@ -766,7 +766,7 @@ accounts_dialog_button_create_clicked_cb (GtkWidget *button,
gtk_widget_hide (dialog->frame_no_account);
gtk_widget_hide (dialog->frame_new_account);
- profile = gossip_profile_chooser_get_selected (dialog->combobox_profile);
+ profile = empathy_profile_chooser_get_selected (dialog->combobox_profile);
/* Create account */
account = mc_account_create (profile);
@@ -783,7 +783,7 @@ accounts_dialog_button_create_clicked_cb (GtkWidget *button,
static void
accounts_dialog_button_back_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
@@ -797,7 +797,7 @@ accounts_dialog_button_back_clicked_cb (GtkWidget *button,
static void
accounts_dialog_button_connect_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
gboolean enable;
@@ -812,7 +812,7 @@ accounts_dialog_button_connect_clicked_cb (GtkWidget *button,
static void
accounts_dialog_button_add_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
gtk_widget_hide (dialog->vbox_details);
gtk_widget_hide (dialog->frame_no_account);
@@ -837,7 +837,7 @@ accounts_dialog_remove_response_cb (GtkWidget *dialog,
static void
accounts_dialog_button_remove_clicked_cb (GtkWidget *button,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
McAccount *account;
GtkWidget *message_dialog;
@@ -883,7 +883,7 @@ static void
accounts_dialog_treeview_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
accounts_dialog_button_connect_clicked_cb (dialog->button_connect,
@@ -893,14 +893,14 @@ accounts_dialog_treeview_row_activated_cb (GtkTreeView *tree_view,
static void
accounts_dialog_response_cb (GtkWidget *widget,
gint response,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
gtk_widget_destroy (widget);
}
static void
accounts_dialog_destroy_cb (GtkWidget *widget,
- GossipAccountsDialog *dialog)
+ EmpathyAccountsDialog *dialog)
{
GList *accounts, *l;
@@ -943,9 +943,9 @@ accounts_dialog_destroy_cb (GtkWidget *widget,
}
GtkWidget *
-gossip_accounts_dialog_show (GtkWindow *parent)
+empathy_accounts_dialog_show (GtkWindow *parent)
{
- static GossipAccountsDialog *dialog = NULL;
+ static EmpathyAccountsDialog *dialog = NULL;
GladeXML *glade;
GtkWidget *bbox;
GtkWidget *button_close;
@@ -955,9 +955,9 @@ gossip_accounts_dialog_show (GtkWindow *parent)
return dialog->window;
}
- dialog = g_new0 (GossipAccountsDialog, 1);
+ dialog = g_new0 (EmpathyAccountsDialog, 1);
- glade = gossip_glade_get_file ("gossip-accounts-dialog.glade",
+ glade = empathy_glade_get_file ("empathy-accounts-dialog.glade",
"accounts_dialog",
NULL,
"accounts_dialog", &dialog->window,
@@ -981,7 +981,7 @@ gossip_accounts_dialog_show (GtkWindow *parent)
"button_close", &button_close,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
dialog,
"accounts_dialog", "destroy", accounts_dialog_destroy_cb,
"accounts_dialog", "response", accounts_dialog_response_cb,
@@ -999,7 +999,7 @@ gossip_accounts_dialog_show (GtkWindow *parent)
g_object_unref (glade);
/* Create profile chooser */
- dialog->combobox_profile = gossip_profile_chooser_new ();
+ dialog->combobox_profile = empathy_profile_chooser_new ();
gtk_table_attach_defaults (GTK_TABLE (dialog->table_new_account),
dialog->combobox_profile,
1, 2,
@@ -1007,7 +1007,7 @@ gossip_accounts_dialog_show (GtkWindow *parent)
gtk_widget_show (dialog->combobox_profile);
/* Set up signalling */
- dialog->mc = gossip_mission_control_new ();
+ dialog->mc = empathy_mission_control_new ();
dialog->monitor = mc_account_monitor_new ();
/* FIXME: connect account-enabled/disabled too */
diff --git a/libempathy-gtk/gossip-accounts-dialog.glade b/libempathy-gtk/empathy-accounts-dialog.glade
index 05ba64f80..05ba64f80 100644
--- a/libempathy-gtk/gossip-accounts-dialog.glade
+++ b/libempathy-gtk/empathy-accounts-dialog.glade
diff --git a/libempathy-gtk/gossip-accounts-dialog.h b/libempathy-gtk/empathy-accounts-dialog.h
index 5b058e6a4..db800b98b 100644
--- a/libempathy-gtk/gossip-accounts-dialog.h
+++ b/libempathy-gtk/empathy-accounts-dialog.h
@@ -21,15 +21,15 @@
* Authors: Martyn Russell <martyn@imendio.com>
*/
-#ifndef __GOSSIP_ACCOUNTS_DIALOG_H__
-#define __GOSSIP_ACCOUNTS_DIALOG_H__
+#ifndef __EMPATHY_ACCOUNTS_DIALOG_H__
+#define __EMPATHY_ACCOUNTS_DIALOG_H__
#include <gtk/gtkwidget.h>
G_BEGIN_DECLS
-GtkWidget *gossip_accounts_dialog_show (GtkWindow *parent);
+GtkWidget *empathy_accounts_dialog_show (GtkWindow *parent);
G_END_DECLS
-#endif /* __GOSSIP_ACCOUNTS_DIALOG_H__ */
+#endif /* __EMPATHY_ACCOUNTS_DIALOG_H__ */
diff --git a/libempathy-gtk/gossip-cell-renderer-expander.c b/libempathy-gtk/empathy-cell-renderer-expander.c
index e116ace7b..51930ab6a 100644
--- a/libempathy-gtk/gossip-cell-renderer-expander.c
+++ b/libempathy-gtk/empathy-cell-renderer-expander.c
@@ -31,36 +31,36 @@
#include <gtk/gtktreeview.h>
-#include "gossip-cell-renderer-expander.h"
+#include "empathy-cell-renderer-expander.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CELL_RENDERER_EXPANDER, GossipCellRendererExpanderPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CELL_RENDERER_EXPANDER, EmpathyCellRendererExpanderPriv))
-static void gossip_cell_renderer_expander_init (GossipCellRendererExpander *expander);
-static void gossip_cell_renderer_expander_class_init (GossipCellRendererExpanderClass *klass);
-static void gossip_cell_renderer_expander_get_property (GObject *object,
+static void empathy_cell_renderer_expander_init (EmpathyCellRendererExpander *expander);
+static void empathy_cell_renderer_expander_class_init (EmpathyCellRendererExpanderClass *klass);
+static void empathy_cell_renderer_expander_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec);
-static void gossip_cell_renderer_expander_set_property (GObject *object,
+static void empathy_cell_renderer_expander_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void gossip_cell_renderer_expander_finalize (GObject *object);
-static void gossip_cell_renderer_expander_get_size (GtkCellRenderer *cell,
+static void empathy_cell_renderer_expander_finalize (GObject *object);
+static void empathy_cell_renderer_expander_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
GdkRectangle *cell_area,
gint *x_offset,
gint *y_offset,
gint *width,
gint *height);
-static void gossip_cell_renderer_expander_render (GtkCellRenderer *cell,
+static void empathy_cell_renderer_expander_render (GtkCellRenderer *cell,
GdkWindow *window,
GtkWidget *widget,
GdkRectangle *background_area,
GdkRectangle *cell_area,
GdkRectangle *expose_area,
GtkCellRendererState flags);
-static gboolean gossip_cell_renderer_expander_activate (GtkCellRenderer *cell,
+static gboolean empathy_cell_renderer_expander_activate (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path,
@@ -75,9 +75,9 @@ enum {
PROP_ACTIVATABLE
};
-typedef struct _GossipCellRendererExpanderPriv GossipCellRendererExpanderPriv;
+typedef struct _EmpathyCellRendererExpanderPriv EmpathyCellRendererExpanderPriv;
-struct _GossipCellRendererExpanderPriv {
+struct _EmpathyCellRendererExpanderPriv {
GtkExpanderStyle expander_style;
gint expander_size;
@@ -91,12 +91,12 @@ struct _GossipCellRendererExpanderPriv {
guint animation_expanding : 1;
};
-G_DEFINE_TYPE (GossipCellRendererExpander, gossip_cell_renderer_expander, GTK_TYPE_CELL_RENDERER)
+G_DEFINE_TYPE (EmpathyCellRendererExpander, empathy_cell_renderer_expander, GTK_TYPE_CELL_RENDERER)
static void
-gossip_cell_renderer_expander_init (GossipCellRendererExpander *expander)
+empathy_cell_renderer_expander_init (EmpathyCellRendererExpander *expander)
{
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpanderPriv *priv;
priv = GET_PRIV (expander);
@@ -111,7 +111,7 @@ gossip_cell_renderer_expander_init (GossipCellRendererExpander *expander)
}
static void
-gossip_cell_renderer_expander_class_init (GossipCellRendererExpanderClass *klass)
+empathy_cell_renderer_expander_class_init (EmpathyCellRendererExpanderClass *klass)
{
GObjectClass *object_class;
GtkCellRendererClass *cell_class;
@@ -119,14 +119,14 @@ gossip_cell_renderer_expander_class_init (GossipCellRendererExpanderClass *klass
object_class = G_OBJECT_CLASS (klass);
cell_class = GTK_CELL_RENDERER_CLASS (klass);
- object_class->finalize = gossip_cell_renderer_expander_finalize;
+ object_class->finalize = empathy_cell_renderer_expander_finalize;
- object_class->get_property = gossip_cell_renderer_expander_get_property;
- object_class->set_property = gossip_cell_renderer_expander_set_property;
+ object_class->get_property = empathy_cell_renderer_expander_get_property;
+ object_class->set_property = empathy_cell_renderer_expander_set_property;
- cell_class->get_size = gossip_cell_renderer_expander_get_size;
- cell_class->render = gossip_cell_renderer_expander_render;
- cell_class->activate = gossip_cell_renderer_expander_activate;
+ cell_class->get_size = empathy_cell_renderer_expander_get_size;
+ cell_class->render = empathy_cell_renderer_expander_render;
+ cell_class->activate = empathy_cell_renderer_expander_activate;
g_object_class_install_property (object_class,
PROP_EXPANDER_STYLE,
@@ -155,19 +155,19 @@ gossip_cell_renderer_expander_class_init (GossipCellRendererExpanderClass *klass
TRUE,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipCellRendererExpanderPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyCellRendererExpanderPriv));
}
static void
-gossip_cell_renderer_expander_get_property (GObject *object,
+empathy_cell_renderer_expander_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
- GossipCellRendererExpander *expander;
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpander *expander;
+ EmpathyCellRendererExpanderPriv *priv;
- expander = GOSSIP_CELL_RENDERER_EXPANDER (object);
+ expander = EMPATHY_CELL_RENDERER_EXPANDER (object);
priv = GET_PRIV (expander);
switch (param_id) {
@@ -190,15 +190,15 @@ gossip_cell_renderer_expander_get_property (GObject *object,
}
static void
-gossip_cell_renderer_expander_set_property (GObject *object,
+empathy_cell_renderer_expander_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec)
{
- GossipCellRendererExpander *expander;
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpander *expander;
+ EmpathyCellRendererExpanderPriv *priv;
- expander = GOSSIP_CELL_RENDERER_EXPANDER (object);
+ expander = EMPATHY_CELL_RENDERER_EXPANDER (object);
priv = GET_PRIV (expander);
switch (param_id) {
@@ -221,9 +221,9 @@ gossip_cell_renderer_expander_set_property (GObject *object,
}
static void
-gossip_cell_renderer_expander_finalize (GObject *object)
+empathy_cell_renderer_expander_finalize (GObject *object)
{
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpanderPriv *priv;
priv = GET_PRIV (object);
@@ -236,17 +236,17 @@ gossip_cell_renderer_expander_finalize (GObject *object)
gtk_tree_row_reference_free (priv->animation_node);
}
- (* G_OBJECT_CLASS (gossip_cell_renderer_expander_parent_class)->finalize) (object);
+ (* G_OBJECT_CLASS (empathy_cell_renderer_expander_parent_class)->finalize) (object);
}
GtkCellRenderer *
-gossip_cell_renderer_expander_new (void)
+empathy_cell_renderer_expander_new (void)
{
- return g_object_new (GOSSIP_TYPE_CELL_RENDERER_EXPANDER, NULL);
+ return g_object_new (EMPATHY_TYPE_CELL_RENDERER_EXPANDER, NULL);
}
static void
-gossip_cell_renderer_expander_get_size (GtkCellRenderer *cell,
+empathy_cell_renderer_expander_get_size (GtkCellRenderer *cell,
GtkWidget *widget,
GdkRectangle *cell_area,
gint *x_offset,
@@ -254,10 +254,10 @@ gossip_cell_renderer_expander_get_size (GtkCellRenderer *cell,
gint *width,
gint *height)
{
- GossipCellRendererExpander *expander;
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpander *expander;
+ EmpathyCellRendererExpanderPriv *priv;
- expander = (GossipCellRendererExpander*) cell;
+ expander = (EmpathyCellRendererExpander*) cell;
priv = GET_PRIV (expander);
if (cell_area) {
@@ -286,7 +286,7 @@ gossip_cell_renderer_expander_get_size (GtkCellRenderer *cell,
}
static void
-gossip_cell_renderer_expander_render (GtkCellRenderer *cell,
+empathy_cell_renderer_expander_render (GtkCellRenderer *cell,
GdkWindow *window,
GtkWidget *widget,
GdkRectangle *background_area,
@@ -294,12 +294,12 @@ gossip_cell_renderer_expander_render (GtkCellRenderer *cell,
GdkRectangle *expose_area,
GtkCellRendererState flags)
{
- GossipCellRendererExpander *expander;
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpander *expander;
+ EmpathyCellRendererExpanderPriv *priv;
GtkExpanderStyle expander_style;
gint x_offset, y_offset;
- expander = (GossipCellRendererExpander*) cell;
+ expander = (EmpathyCellRendererExpander*) cell;
priv = GET_PRIV (expander);
if (priv->animation_node) {
@@ -319,7 +319,7 @@ gossip_cell_renderer_expander_render (GtkCellRenderer *cell,
} else
expander_style = priv->expander_style;
- gossip_cell_renderer_expander_get_size (cell, widget, cell_area,
+ empathy_cell_renderer_expander_get_size (cell, widget, cell_area,
&x_offset, &y_offset,
NULL, NULL);
@@ -352,9 +352,9 @@ invalidate_node (GtkTreeView *tree_view,
}
static gboolean
-do_animation (GossipCellRendererExpander *expander)
+do_animation (EmpathyCellRendererExpander *expander)
{
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpanderPriv *priv;
GtkTreePath *path;
gboolean done = FALSE;
@@ -404,13 +404,13 @@ animation_timeout (gpointer data)
}
static void
-gossip_cell_renderer_expander_start_animation (GossipCellRendererExpander *expander,
+empathy_cell_renderer_expander_start_animation (EmpathyCellRendererExpander *expander,
GtkTreeView *tree_view,
GtkTreePath *path,
gboolean expanding,
GdkRectangle *background_area)
{
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpanderPriv *priv;
priv = GET_PRIV (expander);
@@ -429,7 +429,7 @@ gossip_cell_renderer_expander_start_animation (GossipCellRendererExpander *expan
}
static gboolean
-gossip_cell_renderer_expander_activate (GtkCellRenderer *cell,
+empathy_cell_renderer_expander_activate (GtkCellRenderer *cell,
GdkEvent *event,
GtkWidget *widget,
const gchar *path_string,
@@ -437,13 +437,13 @@ gossip_cell_renderer_expander_activate (GtkCellRenderer *cell,
GdkRectangle *cell_area,
GtkCellRendererState flags)
{
- GossipCellRendererExpander *expander;
- GossipCellRendererExpanderPriv *priv;
+ EmpathyCellRendererExpander *expander;
+ EmpathyCellRendererExpanderPriv *priv;
GtkTreePath *path;
gboolean animate;
gboolean expanding;
- expander = GOSSIP_CELL_RENDERER_EXPANDER (cell);
+ expander = EMPATHY_CELL_RENDERER_EXPANDER (cell);
priv = GET_PRIV (cell);
if (!GTK_IS_TREE_VIEW (widget) || !priv->activatable)
@@ -469,7 +469,7 @@ gossip_cell_renderer_expander_activate (GtkCellRenderer *cell,
}
if (animate) {
- gossip_cell_renderer_expander_start_animation (expander,
+ empathy_cell_renderer_expander_start_animation (expander,
GTK_TREE_VIEW (widget),
path,
expanding,
diff --git a/libempathy-gtk/empathy-cell-renderer-expander.h b/libempathy-gtk/empathy-cell-renderer-expander.h
new file mode 100644
index 000000000..d7e5f74b0
--- /dev/null
+++ b/libempathy-gtk/empathy-cell-renderer-expander.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2006-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Kristian Rietveld <kris@imendio.com>
+ */
+
+#ifndef __EMPATHY_CELL_RENDERER_EXPANDER_H__
+#define __EMPATHY_CELL_RENDERER_EXPANDER_H__
+
+#include <gtk/gtkcellrenderer.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CELL_RENDERER_EXPANDER (empathy_cell_renderer_expander_get_type ())
+#define EMPATHY_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_CELL_RENDERER_EXPANDER, EmpathyCellRendererExpander))
+#define EMPATHY_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_CELL_RENDERER_EXPANDER, EmpathyCellRendererExpanderClass))
+#define EMPATHY_IS_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_CELL_RENDERER_EXPANDER))
+#define EMPATHY_IS_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_CELL_RENDERER_EXPANDER))
+#define EMPATHY_CELL_RENDERER_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_CELL_RENDERER_EXPANDER, EmpathyCellRendererExpanderClass))
+
+typedef struct _EmpathyCellRendererExpander EmpathyCellRendererExpander;
+typedef struct _EmpathyCellRendererExpanderClass EmpathyCellRendererExpanderClass;
+
+struct _EmpathyCellRendererExpander {
+ GtkCellRenderer parent;
+};
+
+struct _EmpathyCellRendererExpanderClass {
+ GtkCellRendererClass parent_class;
+
+ /* Padding for future expansion */
+ void (*_gtk_reserved1) (void);
+ void (*_gtk_reserved2) (void);
+ void (*_gtk_reserved3) (void);
+ void (*_gtk_reserved4) (void);
+};
+
+GType empathy_cell_renderer_expander_get_type (void) G_GNUC_CONST;
+GtkCellRenderer *empathy_cell_renderer_expander_new (void);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CELL_RENDERER_EXPANDER_H__ */
diff --git a/libempathy-gtk/gossip-cell-renderer-text.c b/libempathy-gtk/empathy-cell-renderer-text.c
index 2b54eedf5..d48de32b8 100644
--- a/libempathy-gtk/gossip-cell-renderer-text.c
+++ b/libempathy-gtk/empathy-cell-renderer-text.c
@@ -24,11 +24,11 @@
#include <string.h>
-#include "gossip-cell-renderer-text.h"
+#include "empathy-cell-renderer-text.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CELL_RENDERER_TEXT, GossipCellRendererTextPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CELL_RENDERER_TEXT, EmpathyCellRendererTextPriv))
-struct _GossipCellRendererTextPriv {
+struct _EmpathyCellRendererTextPriv {
gchar *name;
gchar *status;
gboolean is_group;
@@ -39,8 +39,8 @@ struct _GossipCellRendererTextPriv {
gboolean show_status;
};
-static void gossip_cell_renderer_text_class_init (GossipCellRendererTextClass *klass);
-static void gossip_cell_renderer_text_init (GossipCellRendererText *cell);
+static void empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass);
+static void empathy_cell_renderer_text_init (EmpathyCellRendererText *cell);
static void cell_renderer_text_finalize (GObject *object);
static void cell_renderer_text_get_property (GObject *object,
guint param_id,
@@ -64,7 +64,7 @@ static void cell_renderer_text_render (GtkCellRenderer *c
GdkRectangle *cell_area,
GdkRectangle *expose_area,
GtkCellRendererState flags);
-static void cell_renderer_text_update_text (GossipCellRendererText *cell,
+static void cell_renderer_text_update_text (EmpathyCellRendererText *cell,
GtkWidget *widget,
gboolean selected);
@@ -77,10 +77,10 @@ enum {
PROP_SHOW_STATUS,
};
-G_DEFINE_TYPE (GossipCellRendererText, gossip_cell_renderer_text, GTK_TYPE_CELL_RENDERER_TEXT);
+G_DEFINE_TYPE (EmpathyCellRendererText, empathy_cell_renderer_text, GTK_TYPE_CELL_RENDERER_TEXT);
static void
-gossip_cell_renderer_text_class_init (GossipCellRendererTextClass *klass)
+empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass)
{
GObjectClass *object_class;
GtkCellRendererClass *cell_class;
@@ -125,13 +125,13 @@ gossip_cell_renderer_text_class_init (GossipCellRendererTextClass *klass)
TRUE,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipCellRendererTextPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyCellRendererTextPriv));
}
static void
-gossip_cell_renderer_text_init (GossipCellRendererText *cell)
+empathy_cell_renderer_text_init (EmpathyCellRendererText *cell)
{
- GossipCellRendererTextPriv *priv;
+ EmpathyCellRendererTextPriv *priv;
priv = GET_PRIV (cell);
@@ -147,16 +147,16 @@ gossip_cell_renderer_text_init (GossipCellRendererText *cell)
static void
cell_renderer_text_finalize (GObject *object)
{
- GossipCellRendererText *cell;
- GossipCellRendererTextPriv *priv;
+ EmpathyCellRendererText *cell;
+ EmpathyCellRendererTextPriv *priv;
- cell = GOSSIP_CELL_RENDERER_TEXT (object);
+ cell = EMPATHY_CELL_RENDERER_TEXT (object);
priv = GET_PRIV (cell);
g_free (priv->name);
g_free (priv->status);
- (G_OBJECT_CLASS (gossip_cell_renderer_text_parent_class)->finalize) (object);
+ (G_OBJECT_CLASS (empathy_cell_renderer_text_parent_class)->finalize) (object);
}
static void
@@ -165,10 +165,10 @@ cell_renderer_text_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GossipCellRendererText *cell;
- GossipCellRendererTextPriv *priv;
+ EmpathyCellRendererText *cell;
+ EmpathyCellRendererTextPriv *priv;
- cell = GOSSIP_CELL_RENDERER_TEXT (object);
+ cell = EMPATHY_CELL_RENDERER_TEXT (object);
priv = GET_PRIV (cell);
switch (param_id) {
@@ -196,11 +196,11 @@ cell_renderer_text_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GossipCellRendererText *cell;
- GossipCellRendererTextPriv *priv;
+ EmpathyCellRendererText *cell;
+ EmpathyCellRendererTextPriv *priv;
const gchar *str;
- cell = GOSSIP_CELL_RENDERER_TEXT (object);
+ cell = EMPATHY_CELL_RENDERER_TEXT (object);
priv = GET_PRIV (cell);
switch (param_id) {
@@ -241,16 +241,16 @@ cell_renderer_text_get_size (GtkCellRenderer *cell,
gint *width,
gint *height)
{
- GossipCellRendererText *celltext;
- GossipCellRendererTextPriv *priv;
+ EmpathyCellRendererText *celltext;
+ EmpathyCellRendererTextPriv *priv;
- celltext = GOSSIP_CELL_RENDERER_TEXT (cell);
+ celltext = EMPATHY_CELL_RENDERER_TEXT (cell);
priv = GET_PRIV (cell);
/* Only update if not already valid so we get the right size. */
cell_renderer_text_update_text (celltext, widget, priv->is_selected);
- (GTK_CELL_RENDERER_CLASS (gossip_cell_renderer_text_parent_class)->get_size) (cell, widget,
+ (GTK_CELL_RENDERER_CLASS (empathy_cell_renderer_text_parent_class)->get_size) (cell, widget,
cell_area,
x_offset, y_offset,
width, height);
@@ -265,15 +265,15 @@ cell_renderer_text_render (GtkCellRenderer *cell,
GdkRectangle *expose_area,
GtkCellRendererState flags)
{
- GossipCellRendererText *celltext;
+ EmpathyCellRendererText *celltext;
- celltext = GOSSIP_CELL_RENDERER_TEXT (cell);
+ celltext = EMPATHY_CELL_RENDERER_TEXT (cell);
cell_renderer_text_update_text (celltext,
widget,
(flags & GTK_CELL_RENDERER_SELECTED));
- (GTK_CELL_RENDERER_CLASS (gossip_cell_renderer_text_parent_class)->render) (
+ (GTK_CELL_RENDERER_CLASS (empathy_cell_renderer_text_parent_class)->render) (
cell, window,
widget,
background_area,
@@ -282,11 +282,11 @@ cell_renderer_text_render (GtkCellRenderer *cell,
}
static void
-cell_renderer_text_update_text (GossipCellRendererText *cell,
+cell_renderer_text_update_text (EmpathyCellRendererText *cell,
GtkWidget *widget,
gboolean selected)
{
- GossipCellRendererTextPriv *priv;
+ EmpathyCellRendererTextPriv *priv;
PangoAttrList *attr_list;
PangoAttribute *attr_color, *attr_style, *attr_size;
GtkStyle *style;
@@ -362,7 +362,7 @@ cell_renderer_text_update_text (GossipCellRendererText *cell,
}
GtkCellRenderer *
-gossip_cell_renderer_text_new (void)
+empathy_cell_renderer_text_new (void)
{
- return g_object_new (GOSSIP_TYPE_CELL_RENDERER_TEXT, NULL);
+ return g_object_new (EMPATHY_TYPE_CELL_RENDERER_TEXT, NULL);
}
diff --git a/libempathy-gtk/empathy-cell-renderer-text.h b/libempathy-gtk/empathy-cell-renderer-text.h
new file mode 100644
index 000000000..76cef3120
--- /dev/null
+++ b/libempathy-gtk/empathy-cell-renderer-text.h
@@ -0,0 +1,56 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2004-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ */
+
+#ifndef __EMPATHY_CELL_RENDERER_TEXT_H__
+#define __EMPATHY_CELL_RENDERER_TEXT_H__
+
+#include <gtk/gtkcellrenderertext.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CELL_RENDERER_TEXT (empathy_cell_renderer_text_get_type ())
+#define EMPATHY_CELL_RENDERER_TEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CELL_RENDERER_TEXT, EmpathyCellRendererText))
+#define EMPATHY_CELL_RENDERER_TEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CELL_RENDERER_TEXT, EmpathyCellRendererTextClass))
+#define EMPATHY_IS_CELL_RENDERER_TEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CELL_RENDERER_TEXT))
+#define EMPATHY_IS_CELL_RENDERER_TEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CELL_RENDERER_TEXT))
+#define EMPATHY_CELL_RENDERER_TEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CELL_RENDERER_TEXT, EmpathyCellRendererTextClass))
+
+typedef struct _EmpathyCellRendererText EmpathyCellRendererText;
+typedef struct _EmpathyCellRendererTextClass EmpathyCellRendererTextClass;
+typedef struct _EmpathyCellRendererTextPriv EmpathyCellRendererTextPriv;
+
+struct _EmpathyCellRendererText {
+ GtkCellRendererText parent;
+
+ EmpathyCellRendererTextPriv *priv;
+};
+
+struct _EmpathyCellRendererTextClass {
+ GtkCellRendererTextClass parent_class;
+};
+
+GType empathy_cell_renderer_text_get_type (void) G_GNUC_CONST;
+GtkCellRenderer * empathy_cell_renderer_text_new (void);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CELL_RENDERER_TEXT_H__ */
diff --git a/libempathy-gtk/gossip-chat-view.c b/libempathy-gtk/empathy-chat-view.c
index e8db2628b..fda268676 100644
--- a/libempathy-gtk/gossip-chat-view.c
+++ b/libempathy-gtk/empathy-chat-view.c
@@ -41,15 +41,15 @@
#include <libmissioncontrol/mc-account.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-conf.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-conf.h>
-#include "gossip-chat-view.h"
-#include "gossip-chat.h"
-#include "gossip-preferences.h"
-#include "gossip-theme-manager.h"
-#include "gossip-ui-utils.h"
+#include "empathy-chat-view.h"
+#include "empathy-chat.h"
+#include "empathy-preferences.h"
+#include "empathy-theme-manager.h"
+#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "ChatView"
@@ -60,7 +60,7 @@
#define MAX_SCROLL_TIME 0.4 /* seconds */
#define SCROLL_DELAY 33 /* milliseconds */
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHAT_VIEW, GossipChatViewPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewPriv))
typedef enum {
BLOCK_TYPE_NONE,
@@ -71,7 +71,7 @@ typedef enum {
BLOCK_TYPE_INVITE
} BlockType;
-struct _GossipChatViewPriv {
+struct _EmpathyChatViewPriv {
GtkTextBuffer *buffer;
gboolean irc_style;
@@ -91,110 +91,110 @@ struct _GossipChatViewPriv {
/* This is for the group chat so we know if the "other" last contact
* changed, so we know whether to insert a header or not.
*/
- GossipContact *last_contact;
+ EmpathyContact *last_contact;
guint notify_system_fonts_id;
guint notify_show_avatars_id;
};
typedef struct {
- GossipSmiley smiley;
+ EmpathySmiley smiley;
const gchar *pattern;
-} GossipSmileyPattern;
+} EmpathySmileyPattern;
-static const GossipSmileyPattern smileys[] = {
+static const EmpathySmileyPattern smileys[] = {
/* Forward smileys. */
- { GOSSIP_SMILEY_NORMAL, ":)" },
- { GOSSIP_SMILEY_WINK, ";)" },
- { GOSSIP_SMILEY_WINK, ";-)" },
- { GOSSIP_SMILEY_BIGEYE, "=)" },
- { GOSSIP_SMILEY_NOSE, ":-)" },
- { GOSSIP_SMILEY_CRY, ":'(" },
- { GOSSIP_SMILEY_SAD, ":(" },
- { GOSSIP_SMILEY_SAD, ":-(" },
- { GOSSIP_SMILEY_SCEPTICAL, ":/" },
- { GOSSIP_SMILEY_SCEPTICAL, ":\\" },
- { GOSSIP_SMILEY_BIGSMILE, ":D" },
- { GOSSIP_SMILEY_BIGSMILE, ":-D" },
- { GOSSIP_SMILEY_INDIFFERENT, ":|" },
- { GOSSIP_SMILEY_TOUNGE, ":p" },
- { GOSSIP_SMILEY_TOUNGE, ":-p" },
- { GOSSIP_SMILEY_TOUNGE, ":P" },
- { GOSSIP_SMILEY_TOUNGE, ":-P" },
- { GOSSIP_SMILEY_TOUNGE, ";p" },
- { GOSSIP_SMILEY_TOUNGE, ";-p" },
- { GOSSIP_SMILEY_TOUNGE, ";P" },
- { GOSSIP_SMILEY_TOUNGE, ";-P" },
- { GOSSIP_SMILEY_SHOCKED, ":o" },
- { GOSSIP_SMILEY_SHOCKED, ":-o" },
- { GOSSIP_SMILEY_SHOCKED, ":O" },
- { GOSSIP_SMILEY_SHOCKED, ":-O" },
- { GOSSIP_SMILEY_COOL, "8)" },
- { GOSSIP_SMILEY_COOL, "B)" },
- { GOSSIP_SMILEY_SORRY, "*|" },
- { GOSSIP_SMILEY_KISS, ":*" },
- { GOSSIP_SMILEY_SHUTUP, ":#" },
- { GOSSIP_SMILEY_SHUTUP, ":-#" },
- { GOSSIP_SMILEY_YAWN, "|O" },
- { GOSSIP_SMILEY_CONFUSED, ":S" },
- { GOSSIP_SMILEY_CONFUSED, ":s" },
- { GOSSIP_SMILEY_ANGEL, "<)" },
- { GOSSIP_SMILEY_OOOH, ":x" },
- { GOSSIP_SMILEY_LOOKAWAY, "*)" },
- { GOSSIP_SMILEY_LOOKAWAY, "*-)" },
- { GOSSIP_SMILEY_BLUSH, "*S" },
- { GOSSIP_SMILEY_BLUSH, "*s" },
- { GOSSIP_SMILEY_BLUSH, "*$" },
- { GOSSIP_SMILEY_COOLBIGSMILE, "8D" },
- { GOSSIP_SMILEY_ANGRY, ":@" },
- { GOSSIP_SMILEY_BOSS, "@)" },
- { GOSSIP_SMILEY_MONKEY, "#)" },
- { GOSSIP_SMILEY_SILLY, "O)" },
- { GOSSIP_SMILEY_SICK, "+o(" },
+ { EMPATHY_SMILEY_NORMAL, ":)" },
+ { EMPATHY_SMILEY_WINK, ";)" },
+ { EMPATHY_SMILEY_WINK, ";-)" },
+ { EMPATHY_SMILEY_BIGEYE, "=)" },
+ { EMPATHY_SMILEY_NOSE, ":-)" },
+ { EMPATHY_SMILEY_CRY, ":'(" },
+ { EMPATHY_SMILEY_SAD, ":(" },
+ { EMPATHY_SMILEY_SAD, ":-(" },
+ { EMPATHY_SMILEY_SCEPTICAL, ":/" },
+ { EMPATHY_SMILEY_SCEPTICAL, ":\\" },
+ { EMPATHY_SMILEY_BIGSMILE, ":D" },
+ { EMPATHY_SMILEY_BIGSMILE, ":-D" },
+ { EMPATHY_SMILEY_INDIFFERENT, ":|" },
+ { EMPATHY_SMILEY_TOUNGE, ":p" },
+ { EMPATHY_SMILEY_TOUNGE, ":-p" },
+ { EMPATHY_SMILEY_TOUNGE, ":P" },
+ { EMPATHY_SMILEY_TOUNGE, ":-P" },
+ { EMPATHY_SMILEY_TOUNGE, ";p" },
+ { EMPATHY_SMILEY_TOUNGE, ";-p" },
+ { EMPATHY_SMILEY_TOUNGE, ";P" },
+ { EMPATHY_SMILEY_TOUNGE, ";-P" },
+ { EMPATHY_SMILEY_SHOCKED, ":o" },
+ { EMPATHY_SMILEY_SHOCKED, ":-o" },
+ { EMPATHY_SMILEY_SHOCKED, ":O" },
+ { EMPATHY_SMILEY_SHOCKED, ":-O" },
+ { EMPATHY_SMILEY_COOL, "8)" },
+ { EMPATHY_SMILEY_COOL, "B)" },
+ { EMPATHY_SMILEY_SORRY, "*|" },
+ { EMPATHY_SMILEY_KISS, ":*" },
+ { EMPATHY_SMILEY_SHUTUP, ":#" },
+ { EMPATHY_SMILEY_SHUTUP, ":-#" },
+ { EMPATHY_SMILEY_YAWN, "|O" },
+ { EMPATHY_SMILEY_CONFUSED, ":S" },
+ { EMPATHY_SMILEY_CONFUSED, ":s" },
+ { EMPATHY_SMILEY_ANGEL, "<)" },
+ { EMPATHY_SMILEY_OOOH, ":x" },
+ { EMPATHY_SMILEY_LOOKAWAY, "*)" },
+ { EMPATHY_SMILEY_LOOKAWAY, "*-)" },
+ { EMPATHY_SMILEY_BLUSH, "*S" },
+ { EMPATHY_SMILEY_BLUSH, "*s" },
+ { EMPATHY_SMILEY_BLUSH, "*$" },
+ { EMPATHY_SMILEY_COOLBIGSMILE, "8D" },
+ { EMPATHY_SMILEY_ANGRY, ":@" },
+ { EMPATHY_SMILEY_BOSS, "@)" },
+ { EMPATHY_SMILEY_MONKEY, "#)" },
+ { EMPATHY_SMILEY_SILLY, "O)" },
+ { EMPATHY_SMILEY_SICK, "+o(" },
/* Backward smileys. */
- { GOSSIP_SMILEY_NORMAL, "(:" },
- { GOSSIP_SMILEY_WINK, "(;" },
- { GOSSIP_SMILEY_WINK, "(-;" },
- { GOSSIP_SMILEY_BIGEYE, "(=" },
- { GOSSIP_SMILEY_NOSE, "(-:" },
- { GOSSIP_SMILEY_CRY, ")':" },
- { GOSSIP_SMILEY_SAD, "):" },
- { GOSSIP_SMILEY_SAD, ")-:" },
- { GOSSIP_SMILEY_SCEPTICAL, "/:" },
- { GOSSIP_SMILEY_SCEPTICAL, "//:" },
- { GOSSIP_SMILEY_INDIFFERENT, "|:" },
- { GOSSIP_SMILEY_TOUNGE, "d:" },
- { GOSSIP_SMILEY_TOUNGE, "d-:" },
- { GOSSIP_SMILEY_TOUNGE, "d;" },
- { GOSSIP_SMILEY_TOUNGE, "d-;" },
- { GOSSIP_SMILEY_SHOCKED, "o:" },
- { GOSSIP_SMILEY_SHOCKED, "O:" },
- { GOSSIP_SMILEY_COOL, "(8" },
- { GOSSIP_SMILEY_COOL, "(B" },
- { GOSSIP_SMILEY_SORRY, "|*" },
- { GOSSIP_SMILEY_KISS, "*:" },
- { GOSSIP_SMILEY_SHUTUP, "#:" },
- { GOSSIP_SMILEY_SHUTUP, "#-:" },
- { GOSSIP_SMILEY_YAWN, "O|" },
- { GOSSIP_SMILEY_CONFUSED, "S:" },
- { GOSSIP_SMILEY_CONFUSED, "s:" },
- { GOSSIP_SMILEY_ANGEL, "(>" },
- { GOSSIP_SMILEY_OOOH, "x:" },
- { GOSSIP_SMILEY_LOOKAWAY, "(*" },
- { GOSSIP_SMILEY_LOOKAWAY, "(-*" },
- { GOSSIP_SMILEY_BLUSH, "S*" },
- { GOSSIP_SMILEY_BLUSH, "s*" },
- { GOSSIP_SMILEY_BLUSH, "$*" },
- { GOSSIP_SMILEY_ANGRY, "@:" },
- { GOSSIP_SMILEY_BOSS, "(@" },
- { GOSSIP_SMILEY_MONKEY, "#)" },
- { GOSSIP_SMILEY_SILLY, "(O" },
- { GOSSIP_SMILEY_SICK, ")o+" }
+ { EMPATHY_SMILEY_NORMAL, "(:" },
+ { EMPATHY_SMILEY_WINK, "(;" },
+ { EMPATHY_SMILEY_WINK, "(-;" },
+ { EMPATHY_SMILEY_BIGEYE, "(=" },
+ { EMPATHY_SMILEY_NOSE, "(-:" },
+ { EMPATHY_SMILEY_CRY, ")':" },
+ { EMPATHY_SMILEY_SAD, "):" },
+ { EMPATHY_SMILEY_SAD, ")-:" },
+ { EMPATHY_SMILEY_SCEPTICAL, "/:" },
+ { EMPATHY_SMILEY_SCEPTICAL, "//:" },
+ { EMPATHY_SMILEY_INDIFFERENT, "|:" },
+ { EMPATHY_SMILEY_TOUNGE, "d:" },
+ { EMPATHY_SMILEY_TOUNGE, "d-:" },
+ { EMPATHY_SMILEY_TOUNGE, "d;" },
+ { EMPATHY_SMILEY_TOUNGE, "d-;" },
+ { EMPATHY_SMILEY_SHOCKED, "o:" },
+ { EMPATHY_SMILEY_SHOCKED, "O:" },
+ { EMPATHY_SMILEY_COOL, "(8" },
+ { EMPATHY_SMILEY_COOL, "(B" },
+ { EMPATHY_SMILEY_SORRY, "|*" },
+ { EMPATHY_SMILEY_KISS, "*:" },
+ { EMPATHY_SMILEY_SHUTUP, "#:" },
+ { EMPATHY_SMILEY_SHUTUP, "#-:" },
+ { EMPATHY_SMILEY_YAWN, "O|" },
+ { EMPATHY_SMILEY_CONFUSED, "S:" },
+ { EMPATHY_SMILEY_CONFUSED, "s:" },
+ { EMPATHY_SMILEY_ANGEL, "(>" },
+ { EMPATHY_SMILEY_OOOH, "x:" },
+ { EMPATHY_SMILEY_LOOKAWAY, "(*" },
+ { EMPATHY_SMILEY_LOOKAWAY, "(-*" },
+ { EMPATHY_SMILEY_BLUSH, "S*" },
+ { EMPATHY_SMILEY_BLUSH, "s*" },
+ { EMPATHY_SMILEY_BLUSH, "$*" },
+ { EMPATHY_SMILEY_ANGRY, "@:" },
+ { EMPATHY_SMILEY_BOSS, "(@" },
+ { EMPATHY_SMILEY_MONKEY, "#)" },
+ { EMPATHY_SMILEY_SILLY, "(O" },
+ { EMPATHY_SMILEY_SICK, ")o+" }
};
-static void gossip_chat_view_class_init (GossipChatViewClass *klass);
-static void gossip_chat_view_init (GossipChatView *view);
+static void empathy_chat_view_class_init (EmpathyChatViewClass *klass);
+static void empathy_chat_view_init (EmpathyChatView *view);
static void chat_view_finalize (GObject *object);
static gboolean chat_view_drag_motion (GtkWidget *widget,
GdkDragContext *context,
@@ -203,18 +203,18 @@ static gboolean chat_view_drag_motion (GtkWidget *
guint time);
static void chat_view_size_allocate (GtkWidget *widget,
GtkAllocation *alloc);
-static void chat_view_setup_tags (GossipChatView *view);
-static void chat_view_system_font_update (GossipChatView *view);
-static void chat_view_notify_system_font_cb (GossipConf *conf,
+static void chat_view_setup_tags (EmpathyChatView *view);
+static void chat_view_system_font_update (EmpathyChatView *view);
+static void chat_view_notify_system_font_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void chat_view_notify_show_avatars_cb (GossipConf *conf,
+static void chat_view_notify_show_avatars_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void chat_view_populate_popup (GossipChatView *view,
+static void chat_view_populate_popup (EmpathyChatView *view,
GtkMenu *menu,
gpointer user_data);
-static gboolean chat_view_event_cb (GossipChatView *view,
+static gboolean chat_view_event_cb (EmpathyChatView *view,
GdkEventMotion *event,
GtkTextTag *tag);
static gboolean chat_view_url_event_cb (GtkTextTag *tag,
@@ -227,38 +227,38 @@ static void chat_view_open_address_cb (GtkMenuItem *
static void chat_view_copy_address_cb (GtkMenuItem *menuitem,
const gchar *url);
static void chat_view_clear_view_cb (GtkMenuItem *menuitem,
- GossipChatView *view);
+ EmpathyChatView *view);
static void chat_view_insert_text_with_emoticons (GtkTextBuffer *buf,
GtkTextIter *iter,
const gchar *str);
-static gboolean chat_view_is_scrolled_down (GossipChatView *view);
-static void chat_view_theme_changed_cb (GossipThemeManager *manager,
- GossipChatView *view);
-static void chat_view_maybe_append_date_and_time (GossipChatView *view,
- GossipMessage *msg);
-static void chat_view_append_spacing (GossipChatView *view);
-static void chat_view_append_text (GossipChatView *view,
+static gboolean chat_view_is_scrolled_down (EmpathyChatView *view);
+static void chat_view_theme_changed_cb (EmpathyThemeManager *manager,
+ EmpathyChatView *view);
+static void chat_view_maybe_append_date_and_time (EmpathyChatView *view,
+ EmpathyMessage *msg);
+static void chat_view_append_spacing (EmpathyChatView *view);
+static void chat_view_append_text (EmpathyChatView *view,
const gchar *body,
const gchar *tag);
-static void chat_view_maybe_append_fancy_header (GossipChatView *view,
- GossipMessage *msg);
-static void chat_view_append_irc_action (GossipChatView *view,
- GossipMessage *msg);
-static void chat_view_append_fancy_action (GossipChatView *view,
- GossipMessage *msg);
-static void chat_view_append_irc_message (GossipChatView *view,
- GossipMessage *msg);
-static void chat_view_append_fancy_message (GossipChatView *view,
- GossipMessage *msg);
+static void chat_view_maybe_append_fancy_header (EmpathyChatView *view,
+ EmpathyMessage *msg);
+static void chat_view_append_irc_action (EmpathyChatView *view,
+ EmpathyMessage *msg);
+static void chat_view_append_fancy_action (EmpathyChatView *view,
+ EmpathyMessage *msg);
+static void chat_view_append_irc_message (EmpathyChatView *view,
+ EmpathyMessage *msg);
+static void chat_view_append_fancy_message (EmpathyChatView *view,
+ EmpathyMessage *msg);
static GdkPixbuf *chat_view_pad_to_size (GdkPixbuf *pixbuf,
gint width,
gint height,
gint extra_padding_right);
-G_DEFINE_TYPE (GossipChatView, gossip_chat_view, GTK_TYPE_TEXT_VIEW);
+G_DEFINE_TYPE (EmpathyChatView, empathy_chat_view, GTK_TYPE_TEXT_VIEW);
static void
-gossip_chat_view_class_init (GossipChatViewClass *klass)
+empathy_chat_view_class_init (EmpathyChatViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
@@ -267,13 +267,13 @@ gossip_chat_view_class_init (GossipChatViewClass *klass)
widget_class->size_allocate = chat_view_size_allocate;
widget_class->drag_motion = chat_view_drag_motion;
- g_type_class_add_private (object_class, sizeof (GossipChatViewPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyChatViewPriv));
}
static void
-gossip_chat_view_init (GossipChatView *view)
+empathy_chat_view_init (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
gboolean show_avatars;
priv = GET_PRIV (view);
@@ -294,28 +294,28 @@ gossip_chat_view_init (GossipChatView *view)
NULL);
priv->notify_system_fonts_id =
- gossip_conf_notify_add (gossip_conf_get (),
+ empathy_conf_notify_add (empathy_conf_get (),
"/desktop/gnome/interface/document_font_name",
chat_view_notify_system_font_cb,
view);
chat_view_system_font_update (view);
priv->notify_show_avatars_id =
- gossip_conf_notify_add (gossip_conf_get (),
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
chat_view_notify_show_avatars_cb,
view);
chat_view_setup_tags (view);
- gossip_theme_manager_apply_saved (gossip_theme_manager_get (), view);
+ empathy_theme_manager_apply_saved (empathy_theme_manager_get (), view);
show_avatars = FALSE;
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
&show_avatars);
- gossip_theme_manager_update_show_avatars (gossip_theme_manager_get (),
+ empathy_theme_manager_update_show_avatars (empathy_theme_manager_get (),
view, show_avatars);
g_signal_connect (view,
@@ -323,7 +323,7 @@ gossip_chat_view_init (GossipChatView *view)
G_CALLBACK (chat_view_populate_popup),
NULL);
- g_signal_connect_object (gossip_theme_manager_get (),
+ g_signal_connect_object (empathy_theme_manager_get (),
"theme-changed",
G_CALLBACK (chat_view_theme_changed_cb),
view,
@@ -333,16 +333,16 @@ gossip_chat_view_init (GossipChatView *view)
static void
chat_view_finalize (GObject *object)
{
- GossipChatView *view;
- GossipChatViewPriv *priv;
+ EmpathyChatView *view;
+ EmpathyChatViewPriv *priv;
- view = GOSSIP_CHAT_VIEW (object);
+ view = EMPATHY_CHAT_VIEW (object);
priv = GET_PRIV (view);
- gossip_debug (DEBUG_DOMAIN, "finalize: %p", object);
+ empathy_debug (DEBUG_DOMAIN, "finalize: %p", object);
- gossip_conf_notify_remove (gossip_conf_get (), priv->notify_system_fonts_id);
- gossip_conf_notify_remove (gossip_conf_get (), priv->notify_show_avatars_id);
+ empathy_conf_notify_remove (empathy_conf_get (), priv->notify_system_fonts_id);
+ empathy_conf_notify_remove (empathy_conf_get (), priv->notify_show_avatars_id);
if (priv->last_contact) {
g_object_unref (priv->last_contact);
@@ -354,7 +354,7 @@ chat_view_finalize (GObject *object)
g_source_remove (priv->scroll_timeout);
}
- G_OBJECT_CLASS (gossip_chat_view_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_chat_view_parent_class)->finalize (object);
}
static gboolean
@@ -377,9 +377,9 @@ chat_view_size_allocate (GtkWidget *widget,
{
gboolean down;
- down = chat_view_is_scrolled_down (GOSSIP_CHAT_VIEW (widget));
+ down = chat_view_is_scrolled_down (EMPATHY_CHAT_VIEW (widget));
- GTK_WIDGET_CLASS (gossip_chat_view_parent_class)->size_allocate (widget, alloc);
+ GTK_WIDGET_CLASS (empathy_chat_view_parent_class)->size_allocate (widget, alloc);
if (down) {
GtkAdjustment *adj;
@@ -390,9 +390,9 @@ chat_view_size_allocate (GtkWidget *widget,
}
static void
-chat_view_setup_tags (GossipChatView *view)
+chat_view_setup_tags (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextTag *tag;
priv = GET_PRIV (view);
@@ -425,12 +425,12 @@ chat_view_setup_tags (GossipChatView *view)
}
static void
-chat_view_system_font_update (GossipChatView *view)
+chat_view_system_font_update (EmpathyChatView *view)
{
PangoFontDescription *font_description = NULL;
gchar *font_name;
- if (gossip_conf_get_string (gossip_conf_get (),
+ if (empathy_conf_get_string (empathy_conf_get (),
"/desktop/gnome/interface/document_font_name",
&font_name) && font_name) {
font_description = pango_font_description_from_string (font_name);
@@ -447,11 +447,11 @@ chat_view_system_font_update (GossipChatView *view)
}
static void
-chat_view_notify_system_font_cb (GossipConf *conf,
+chat_view_notify_system_font_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
- GossipChatView *view;
+ EmpathyChatView *view;
gboolean show_avatars = FALSE;
view = user_data;
@@ -462,38 +462,38 @@ chat_view_notify_system_font_cb (GossipConf *conf,
* this when reworking the theme manager so that view register
* themselves with it instead of the other way around.
*/
- gossip_conf_get_bool (conf,
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_get_bool (conf,
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
&show_avatars);
- gossip_theme_manager_update_show_avatars (gossip_theme_manager_get (),
+ empathy_theme_manager_update_show_avatars (empathy_theme_manager_get (),
view, show_avatars);
}
static void
-chat_view_notify_show_avatars_cb (GossipConf *conf,
+chat_view_notify_show_avatars_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
- GossipChatView *view;
- GossipChatViewPriv *priv;
+ EmpathyChatView *view;
+ EmpathyChatViewPriv *priv;
gboolean show_avatars = FALSE;
view = user_data;
priv = GET_PRIV (view);
- gossip_conf_get_bool (conf, key, &show_avatars);
+ empathy_conf_get_bool (conf, key, &show_avatars);
- gossip_theme_manager_update_show_avatars (gossip_theme_manager_get (),
+ empathy_theme_manager_update_show_avatars (empathy_theme_manager_get (),
view, show_avatars);
}
static void
-chat_view_populate_popup (GossipChatView *view,
+chat_view_populate_popup (EmpathyChatView *view,
GtkMenu *menu,
gpointer user_data)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextTagTable *table;
GtkTextTag *tag;
gint x, y;
@@ -572,7 +572,7 @@ chat_view_populate_popup (GossipChatView *view,
}
static gboolean
-chat_view_event_cb (GossipChatView *view,
+chat_view_event_cb (EmpathyChatView *view,
GdkEventMotion *event,
GtkTextTag *tag)
{
@@ -649,7 +649,7 @@ chat_view_url_event_cb (GtkTextTag *tag,
&end,
FALSE);
- gossip_url_show (str);
+ empathy_url_show (str);
g_free (str);
}
}
@@ -660,7 +660,7 @@ chat_view_url_event_cb (GtkTextTag *tag,
static void
chat_view_open_address_cb (GtkMenuItem *menuitem, const gchar *url)
{
- gossip_url_show (url);
+ empathy_url_show (url);
}
static void
@@ -676,9 +676,9 @@ chat_view_copy_address_cb (GtkMenuItem *menuitem, const gchar *url)
}
static void
-chat_view_clear_view_cb (GtkMenuItem *menuitem, GossipChatView *view)
+chat_view_clear_view_cb (GtkMenuItem *menuitem, EmpathyChatView *view)
{
- gossip_chat_view_clear (view);
+ empathy_chat_view_clear (view);
}
static void
@@ -693,8 +693,8 @@ chat_view_insert_text_with_emoticons (GtkTextBuffer *buf,
gint submatch;
gboolean use_smileys = FALSE;
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_SHOW_SMILEYS,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SHOW_SMILEYS,
&use_smileys);
if (!use_smileys) {
@@ -765,7 +765,7 @@ chat_view_insert_text_with_emoticons (GtkTextBuffer *buf,
gtk_text_buffer_insert (buf, iter, str, len);
}
- pixbuf = gossip_chat_view_get_smiley_image (smileys[match].smiley);
+ pixbuf = empathy_chat_view_get_smiley_image (smileys[match].smiley);
gtk_text_buffer_insert_pixbuf (buf, iter, pixbuf);
gtk_text_buffer_insert (buf, iter, " ", 1);
@@ -775,7 +775,7 @@ chat_view_insert_text_with_emoticons (GtkTextBuffer *buf,
}
static gboolean
-chat_view_is_scrolled_down (GossipChatView *view)
+chat_view_is_scrolled_down (EmpathyChatView *view)
{
GtkWidget *sw;
@@ -794,9 +794,9 @@ chat_view_is_scrolled_down (GossipChatView *view)
}
static void
-chat_view_maybe_trim_buffer (GossipChatView *view)
+chat_view_maybe_trim_buffer (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextIter top, bottom;
gint line;
gint remove;
@@ -838,10 +838,10 @@ chat_view_maybe_trim_buffer (GossipChatView *view)
}
static void
-chat_view_maybe_append_date_and_time (GossipChatView *view,
- GossipMessage *msg)
+chat_view_maybe_append_date_and_time (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
const gchar *tag;
time_t timestamp;
GDate *date, *last_date;
@@ -865,11 +865,11 @@ chat_view_maybe_append_date_and_time (GossipChatView *view,
timestamp = 0;
if (msg) {
- timestamp = gossip_message_get_timestamp (msg);
+ timestamp = empathy_message_get_timestamp (msg);
}
if (timestamp <= 0) {
- timestamp = gossip_time_get_current ();
+ timestamp = empathy_time_get_current ();
}
date = g_date_new ();
@@ -913,7 +913,7 @@ chat_view_maybe_append_date_and_time (GossipChatView *view,
if (append_time) {
gchar *tmp;
- tmp = gossip_time_to_string_local (timestamp, GOSSIP_TIME_FORMAT_DISPLAY_SHORT);
+ tmp = empathy_time_to_string_local (timestamp, EMPATHY_TIME_FORMAT_DISPLAY_SHORT);
g_string_append (str, tmp);
g_free (tmp);
}
@@ -936,9 +936,9 @@ chat_view_maybe_append_date_and_time (GossipChatView *view,
}
static void
-chat_view_append_spacing (GossipChatView *view)
+chat_view_append_spacing (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
const gchar *tag;
GtkTextIter iter;
@@ -961,11 +961,11 @@ chat_view_append_spacing (GossipChatView *view)
}
static void
-chat_view_append_text (GossipChatView *view,
+chat_view_append_text (EmpathyChatView *view,
const gchar *body,
const gchar *tag)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextIter start_iter, end_iter;
GtkTextMark *mark;
GtkTextIter iter;
@@ -987,7 +987,7 @@ chat_view_append_text (GossipChatView *view,
start = g_array_new (FALSE, FALSE, sizeof (gint));
end = g_array_new (FALSE, FALSE, sizeof (gint));
- num_matches = gossip_regex_match (GOSSIP_REGEX_ALL, body, start, end);
+ num_matches = empathy_regex_match (EMPATHY_REGEX_ALL, body, start, end);
if (num_matches == 0) {
gtk_text_buffer_get_end_iter (priv->buffer, &iter);
@@ -1002,7 +1002,7 @@ chat_view_append_text (GossipChatView *view,
e = g_array_index (end, gint, i);
if (s > last) {
- tmp = gossip_substring (body, last, s);
+ tmp = empathy_substring (body, last, s);
gtk_text_buffer_get_end_iter (priv->buffer, &iter);
chat_view_insert_text_with_emoticons (priv->buffer,
@@ -1011,7 +1011,7 @@ chat_view_append_text (GossipChatView *view,
g_free (tmp);
}
- tmp = gossip_substring (body, s, e);
+ tmp = empathy_substring (body, s, e);
gtk_text_buffer_get_end_iter (priv->buffer, &iter);
gtk_text_buffer_insert_with_tags_by_name (priv->buffer,
@@ -1028,7 +1028,7 @@ chat_view_append_text (GossipChatView *view,
}
if (e < strlen (body)) {
- tmp = gossip_substring (body, e, strlen (body));
+ tmp = empathy_substring (body, e, strlen (body));
gtk_text_buffer_get_end_iter (priv->buffer, &iter);
chat_view_insert_text_with_emoticons (priv->buffer,
@@ -1057,11 +1057,11 @@ chat_view_append_text (GossipChatView *view,
}
static void
-chat_view_maybe_append_fancy_header (GossipChatView *view,
- GossipMessage *msg)
+chat_view_maybe_append_fancy_header (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
- GossipContact *sender;
+ EmpathyChatViewPriv *priv;
+ EmpathyContact *sender;
const gchar *name;
gboolean header;
GtkTextIter iter;
@@ -1076,11 +1076,11 @@ chat_view_maybe_append_fancy_header (GossipChatView *view,
priv = GET_PRIV (view);
- sender = gossip_message_get_sender (msg);
- name = gossip_contact_get_name (sender);
- from_self = gossip_contact_is_user (sender);
+ sender = empathy_message_get_sender (msg);
+ name = empathy_contact_get_name (sender);
+ from_self = empathy_contact_is_user (sender);
- gossip_debug (DEBUG_DOMAIN, "Maybe add fancy header");
+ empathy_debug (DEBUG_DOMAIN, "Maybe add fancy header");
if (from_self) {
tag = "fancy-header-self";
@@ -1109,7 +1109,7 @@ chat_view_maybe_append_fancy_header (GossipChatView *view,
}
else if (!from_self &&
(!priv->last_contact ||
- !gossip_contact_equal (sender, priv->last_contact))) {
+ !empathy_contact_equal (sender, priv->last_contact))) {
header = TRUE;
}
@@ -1128,7 +1128,7 @@ chat_view_maybe_append_fancy_header (GossipChatView *view,
NULL);
/* FIXME: we should have a cash of avatar pixbufs */
- pixbuf = gossip_pixbuf_avatar_from_contact_scaled (sender, 32, 32);
+ pixbuf = empathy_pixbuf_avatar_from_contact_scaled (sender, 32, 32);
if (pixbuf) {
avatar = chat_view_pad_to_size (pixbuf, 32, 32, 6);
g_object_unref (pixbuf);
@@ -1183,11 +1183,11 @@ chat_view_maybe_append_fancy_header (GossipChatView *view,
}
static void
-chat_view_append_irc_action (GossipChatView *view,
- GossipMessage *msg)
+chat_view_append_irc_action (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
- GossipContact *sender;
+ EmpathyChatViewPriv *priv;
+ EmpathyContact *sender;
const gchar *name;
GtkTextIter iter;
const gchar *body;
@@ -1196,12 +1196,12 @@ chat_view_append_irc_action (GossipChatView *view,
priv = GET_PRIV (view);
- gossip_debug (DEBUG_DOMAIN, "Add IRC action");
+ empathy_debug (DEBUG_DOMAIN, "Add IRC action");
- sender = gossip_message_get_sender (msg);
- name = gossip_contact_get_name (sender);
+ sender = empathy_message_get_sender (msg);
+ name = empathy_contact_get_name (sender);
- if (gossip_contact_is_user (sender)) {
+ if (empathy_contact_is_user (sender)) {
tag = "irc-action-self";
} else {
tag = "irc-action-other";
@@ -1224,16 +1224,16 @@ chat_view_append_irc_action (GossipChatView *view,
NULL);
g_free (tmp);
- body = gossip_message_get_body (msg);
+ body = empathy_message_get_body (msg);
chat_view_append_text (view, body, tag);
}
static void
-chat_view_append_fancy_action (GossipChatView *view,
- GossipMessage *msg)
+chat_view_append_fancy_action (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
- GossipContact *sender;
+ EmpathyChatViewPriv *priv;
+ EmpathyContact *sender;
const gchar *name;
const gchar *body;
GtkTextIter iter;
@@ -1243,12 +1243,12 @@ chat_view_append_fancy_action (GossipChatView *view,
priv = GET_PRIV (view);
- gossip_debug (DEBUG_DOMAIN, "Add fancy action");
+ empathy_debug (DEBUG_DOMAIN, "Add fancy action");
- sender = gossip_message_get_sender (msg);
- name = gossip_contact_get_name (sender);
+ sender = empathy_message_get_sender (msg);
+ name = empathy_contact_get_name (sender);
- if (gossip_contact_is_user (sender)) {
+ if (empathy_contact_is_user (sender)) {
tag = "fancy-action-self";
line_tag = "fancy-line-self";
} else {
@@ -1266,16 +1266,16 @@ chat_view_append_fancy_action (GossipChatView *view,
NULL);
g_free (tmp);
- body = gossip_message_get_body (msg);
+ body = empathy_message_get_body (msg);
chat_view_append_text (view, body, tag);
}
static void
-chat_view_append_irc_message (GossipChatView *view,
- GossipMessage *msg)
+chat_view_append_irc_message (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
- GossipContact *sender;
+ EmpathyChatViewPriv *priv;
+ EmpathyContact *sender;
const gchar *name;
const gchar *body;
const gchar *nick_tag;
@@ -1285,17 +1285,17 @@ chat_view_append_irc_message (GossipChatView *view,
priv = GET_PRIV (view);
- gossip_debug (DEBUG_DOMAIN, "Add IRC message");
+ empathy_debug (DEBUG_DOMAIN, "Add IRC message");
- body = gossip_message_get_body (msg);
- sender = gossip_message_get_sender (msg);
- name = gossip_contact_get_name (sender);
+ body = empathy_message_get_body (msg);
+ sender = empathy_message_get_sender (msg);
+ name = empathy_contact_get_name (sender);
- if (gossip_contact_is_user (sender)) {
+ if (empathy_contact_is_user (sender)) {
nick_tag = "irc-nick-self";
body_tag = "irc-body-self";
} else {
- if (gossip_chat_should_highlight_nick (msg)) {
+ if (empathy_chat_should_highlight_nick (msg)) {
nick_tag = "irc-nick-highlight";
} else {
nick_tag = "irc-nick-other";
@@ -1327,19 +1327,19 @@ chat_view_append_irc_message (GossipChatView *view,
}
static void
-chat_view_append_fancy_message (GossipChatView *view,
- GossipMessage *msg)
+chat_view_append_fancy_message (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
- GossipContact *sender;
+ EmpathyChatViewPriv *priv;
+ EmpathyContact *sender;
const gchar *body;
const gchar *tag;
priv = GET_PRIV (view);
- sender = gossip_message_get_sender (msg);
+ sender = empathy_message_get_sender (msg);
- if (gossip_contact_is_user (sender)) {
+ if (empathy_contact_is_user (sender)) {
tag = "fancy-body-self";
} else {
tag = "fancy-body-other";
@@ -1347,15 +1347,15 @@ chat_view_append_fancy_message (GossipChatView *view,
/* FIXME: Might want to support nick highlighting here... */
}
- body = gossip_message_get_body (msg);
+ body = empathy_message_get_body (msg);
chat_view_append_text (view, body, tag);
}
static void
-chat_view_theme_changed_cb (GossipThemeManager *manager,
- GossipChatView *view)
+chat_view_theme_changed_cb (EmpathyThemeManager *manager,
+ EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
gboolean show_avatars = FALSE;
gboolean theme_rooms = FALSE;
@@ -1363,22 +1363,22 @@ chat_view_theme_changed_cb (GossipThemeManager *manager,
priv->last_block_type = BLOCK_TYPE_NONE;
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_THEME_CHAT_ROOM,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
&theme_rooms);
if (!theme_rooms && priv->is_group_chat) {
- gossip_theme_manager_apply (manager, view, NULL);
+ empathy_theme_manager_apply (manager, view, NULL);
} else {
- gossip_theme_manager_apply_saved (manager, view);
+ empathy_theme_manager_apply_saved (manager, view);
}
/* Needed for now to update the "rise" property of the names to get it
* vertically centered.
*/
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
&show_avatars);
- gossip_theme_manager_update_show_avatars (manager, view, show_avatars);
+ empathy_theme_manager_update_show_avatars (manager, view, show_avatars);
}
/* Pads a pixbuf to the specified size, by centering it in a larger transparent
@@ -1420,28 +1420,28 @@ chat_view_pad_to_size (GdkPixbuf *pixbuf,
return padded;
}
-GossipChatView *
-gossip_chat_view_new (void)
+EmpathyChatView *
+empathy_chat_view_new (void)
{
- return g_object_new (GOSSIP_TYPE_CHAT_VIEW, NULL);
+ return g_object_new (EMPATHY_TYPE_CHAT_VIEW, NULL);
}
/* The name is optional, if NULL, the sender for msg is used. */
void
-gossip_chat_view_append_message (GossipChatView *view,
- GossipMessage *msg)
+empathy_chat_view_append_message (EmpathyChatView *view,
+ EmpathyMessage *msg)
{
- GossipChatViewPriv *priv;
- GossipContact *sender;
+ EmpathyChatViewPriv *priv;
+ EmpathyContact *sender;
const gchar *body;
gboolean scroll_down;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
- g_return_if_fail (GOSSIP_IS_MESSAGE (msg));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_MESSAGE (msg));
priv = GET_PRIV (view);
- body = gossip_message_get_body (msg);
+ body = empathy_message_get_body (msg);
if (!body) {
return;
}
@@ -1451,13 +1451,13 @@ gossip_chat_view_append_message (GossipChatView *view,
chat_view_maybe_trim_buffer (view);
chat_view_maybe_append_date_and_time (view, msg);
- sender = gossip_message_get_sender (msg);
+ sender = empathy_message_get_sender (msg);
if (!priv->irc_style) {
chat_view_maybe_append_fancy_header (view, msg);
}
- if (gossip_message_get_type (msg) == GOSSIP_MESSAGE_TYPE_ACTION) {
+ if (empathy_message_get_type (msg) == EMPATHY_MESSAGE_TYPE_ACTION) {
if (priv->irc_style) {
chat_view_append_irc_action (view, msg);
} else {
@@ -1476,7 +1476,7 @@ gossip_chat_view_append_message (GossipChatView *view,
g_object_unref (priv->last_contact);
}
- if (gossip_contact_is_user (sender)) {
+ if (empathy_contact_is_user (sender)) {
priv->last_block_type = BLOCK_TYPE_SELF;
priv->last_contact = NULL;
} else {
@@ -1485,21 +1485,21 @@ gossip_chat_view_append_message (GossipChatView *view,
}
if (scroll_down) {
- gossip_chat_view_scroll_down (view);
+ empathy_chat_view_scroll_down (view);
}
}
void
-gossip_chat_view_append_event (GossipChatView *view,
+empathy_chat_view_append_event (EmpathyChatView *view,
const gchar *str)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
gboolean bottom;
GtkTextIter iter;
gchar *msg;
const gchar *tag;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
g_return_if_fail (!G_STR_EMPTY (str));
priv = GET_PRIV (view);
@@ -1532,25 +1532,25 @@ gossip_chat_view_append_event (GossipChatView *view,
g_free (msg);
if (bottom) {
- gossip_chat_view_scroll_down (view);
+ empathy_chat_view_scroll_down (view);
}
priv->last_block_type = BLOCK_TYPE_EVENT;
}
void
-gossip_chat_view_append_button (GossipChatView *view,
+empathy_chat_view_append_button (EmpathyChatView *view,
const gchar *message,
GtkWidget *button1,
GtkWidget *button2)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextChildAnchor *anchor;
GtkTextIter iter;
gboolean bottom;
const gchar *tag;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
g_return_if_fail (button1 != NULL);
priv = GET_PRIV (view);
@@ -1606,33 +1606,33 @@ gossip_chat_view_append_button (GossipChatView *view,
NULL);
if (bottom) {
- gossip_chat_view_scroll_down (view);
+ empathy_chat_view_scroll_down (view);
}
priv->last_block_type = BLOCK_TYPE_INVITE;
}
void
-gossip_chat_view_scroll (GossipChatView *view,
+empathy_chat_view_scroll (EmpathyChatView *view,
gboolean allow_scrolling)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
priv = GET_PRIV (view);
priv->allow_scrolling = allow_scrolling;
- gossip_debug (DEBUG_DOMAIN, "Scrolling %s",
+ empathy_debug (DEBUG_DOMAIN, "Scrolling %s",
allow_scrolling ? "enabled" : "disabled");
}
/* Code stolen from pidgin/gtkimhtml.c */
static gboolean
-chat_view_scroll_cb (GossipChatView *view)
+chat_view_scroll_cb (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkAdjustment *adj;
gdouble max_val;
@@ -1657,11 +1657,11 @@ chat_view_scroll_cb (GossipChatView *view)
}
void
-gossip_chat_view_scroll_down (GossipChatView *view)
+empathy_chat_view_scroll_down (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
priv = GET_PRIV (view);
@@ -1669,7 +1669,7 @@ gossip_chat_view_scroll_down (GossipChatView *view)
return;
}
- gossip_debug (DEBUG_DOMAIN, "Scrolling down");
+ empathy_debug (DEBUG_DOMAIN, "Scrolling down");
if (priv->scroll_time) {
g_timer_reset (priv->scroll_time);
@@ -1684,13 +1684,13 @@ gossip_chat_view_scroll_down (GossipChatView *view)
}
gboolean
-gossip_chat_view_get_selection_bounds (GossipChatView *view,
+empathy_chat_view_get_selection_bounds (EmpathyChatView *view,
GtkTextIter *start,
GtkTextIter *end)
{
GtkTextBuffer *buffer;
- g_return_val_if_fail (GOSSIP_IS_CHAT_VIEW (view), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
@@ -1698,12 +1698,12 @@ gossip_chat_view_get_selection_bounds (GossipChatView *view,
}
void
-gossip_chat_view_clear (GossipChatView *view)
+empathy_chat_view_clear (EmpathyChatView *view)
{
GtkTextBuffer *buffer;
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_set_text (buffer, "", -1);
@@ -1719,11 +1719,11 @@ gossip_chat_view_clear (GossipChatView *view)
}
gboolean
-gossip_chat_view_find_previous (GossipChatView *view,
+empathy_chat_view_find_previous (EmpathyChatView *view,
const gchar *search_criteria,
gboolean new_search)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextBuffer *buffer;
GtkTextIter iter_at_mark;
GtkTextIter iter_match_start;
@@ -1731,7 +1731,7 @@ gossip_chat_view_find_previous (GossipChatView *view,
gboolean found;
gboolean from_start = FALSE;
- g_return_val_if_fail (GOSSIP_IS_CHAT_VIEW (view), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
g_return_val_if_fail (search_criteria != NULL, FALSE);
priv = GET_PRIV (view);
@@ -1774,7 +1774,7 @@ gossip_chat_view_find_previous (GossipChatView *view,
priv->find_last_direction = FALSE;
- found = gossip_text_iter_backward_search (&iter_at_mark,
+ found = empathy_text_iter_backward_search (&iter_at_mark,
search_criteria,
&iter_match_start,
&iter_match_end,
@@ -1790,7 +1790,7 @@ gossip_chat_view_find_previous (GossipChatView *view,
/* Here we wrap around. */
if (!new_search && !priv->find_wrapped) {
priv->find_wrapped = TRUE;
- result = gossip_chat_view_find_previous (view,
+ result = empathy_chat_view_find_previous (view,
search_criteria,
FALSE);
priv->find_wrapped = FALSE;
@@ -1834,11 +1834,11 @@ gossip_chat_view_find_previous (GossipChatView *view,
}
gboolean
-gossip_chat_view_find_next (GossipChatView *view,
+empathy_chat_view_find_next (EmpathyChatView *view,
const gchar *search_criteria,
gboolean new_search)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextBuffer *buffer;
GtkTextIter iter_at_mark;
GtkTextIter iter_match_start;
@@ -1846,7 +1846,7 @@ gossip_chat_view_find_next (GossipChatView *view,
gboolean found;
gboolean from_start = FALSE;
- g_return_val_if_fail (GOSSIP_IS_CHAT_VIEW (view), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
g_return_val_if_fail (search_criteria != NULL, FALSE);
priv = GET_PRIV (view);
@@ -1889,7 +1889,7 @@ gossip_chat_view_find_next (GossipChatView *view,
priv->find_last_direction = TRUE;
- found = gossip_text_iter_forward_search (&iter_at_mark,
+ found = empathy_text_iter_forward_search (&iter_at_mark,
search_criteria,
&iter_match_start,
&iter_match_end,
@@ -1905,7 +1905,7 @@ gossip_chat_view_find_next (GossipChatView *view,
/* Here we wrap around. */
if (!new_search && !priv->find_wrapped) {
priv->find_wrapped = TRUE;
- result = gossip_chat_view_find_next (view,
+ result = empathy_chat_view_find_next (view,
search_criteria,
FALSE);
priv->find_wrapped = FALSE;
@@ -1950,18 +1950,18 @@ gossip_chat_view_find_next (GossipChatView *view,
void
-gossip_chat_view_find_abilities (GossipChatView *view,
+empathy_chat_view_find_abilities (EmpathyChatView *view,
const gchar *search_criteria,
gboolean *can_do_previous,
gboolean *can_do_next)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
GtkTextBuffer *buffer;
GtkTextIter iter_at_mark;
GtkTextIter iter_match_start;
GtkTextIter iter_match_end;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
g_return_if_fail (search_criteria != NULL);
g_return_if_fail (can_do_previous != NULL && can_do_next != NULL);
@@ -1978,7 +1978,7 @@ gossip_chat_view_find_abilities (GossipChatView *view,
gtk_text_buffer_get_start_iter (buffer, &iter_at_mark);
}
- *can_do_previous = gossip_text_iter_backward_search (&iter_at_mark,
+ *can_do_previous = empathy_text_iter_backward_search (&iter_at_mark,
search_criteria,
&iter_match_start,
&iter_match_end,
@@ -1994,7 +1994,7 @@ gossip_chat_view_find_abilities (GossipChatView *view,
gtk_text_buffer_get_start_iter (buffer, &iter_at_mark);
}
- *can_do_next = gossip_text_iter_forward_search (&iter_at_mark,
+ *can_do_next = empathy_text_iter_forward_search (&iter_at_mark,
search_criteria,
&iter_match_start,
&iter_match_end,
@@ -2003,7 +2003,7 @@ gossip_chat_view_find_abilities (GossipChatView *view,
}
void
-gossip_chat_view_highlight (GossipChatView *view,
+empathy_chat_view_highlight (EmpathyChatView *view,
const gchar *text)
{
GtkTextBuffer *buffer;
@@ -2014,7 +2014,7 @@ gossip_chat_view_highlight (GossipChatView *view,
GtkTextIter iter_match_end;
gboolean found;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
@@ -2030,7 +2030,7 @@ gossip_chat_view_highlight (GossipChatView *view,
}
while (1) {
- found = gossip_text_iter_forward_search (&iter,
+ found = empathy_text_iter_forward_search (&iter,
text,
&iter_match_start,
&iter_match_end,
@@ -2050,12 +2050,12 @@ gossip_chat_view_highlight (GossipChatView *view,
}
void
-gossip_chat_view_copy_clipboard (GossipChatView *view)
+empathy_chat_view_copy_clipboard (EmpathyChatView *view)
{
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
@@ -2064,11 +2064,11 @@ gossip_chat_view_copy_clipboard (GossipChatView *view)
}
gboolean
-gossip_chat_view_get_irc_style (GossipChatView *view)
+empathy_chat_view_get_irc_style (EmpathyChatView *view)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CHAT_VIEW (view), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT_VIEW (view), FALSE);
priv = GET_PRIV (view);
@@ -2076,12 +2076,12 @@ gossip_chat_view_get_irc_style (GossipChatView *view)
}
void
-gossip_chat_view_set_irc_style (GossipChatView *view,
+empathy_chat_view_set_irc_style (EmpathyChatView *view,
gboolean irc_style)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
priv = GET_PRIV (view);
@@ -2089,12 +2089,12 @@ gossip_chat_view_set_irc_style (GossipChatView *view,
}
void
-gossip_chat_view_set_margin (GossipChatView *view,
+empathy_chat_view_set_margin (EmpathyChatView *view,
gint margin)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
priv = GET_PRIV (view);
@@ -2105,16 +2105,16 @@ gossip_chat_view_set_margin (GossipChatView *view,
}
GdkPixbuf *
-gossip_chat_view_get_smiley_image (GossipSmiley smiley)
+empathy_chat_view_get_smiley_image (EmpathySmiley smiley)
{
- static GdkPixbuf *pixbufs[GOSSIP_SMILEY_COUNT];
+ static GdkPixbuf *pixbufs[EMPATHY_SMILEY_COUNT];
static gboolean inited = FALSE;
if (!inited) {
gint i;
- for (i = 0; i < GOSSIP_SMILEY_COUNT; i++) {
- pixbufs[i] = gossip_pixbuf_from_smiley (i, GTK_ICON_SIZE_MENU);
+ for (i = 0; i < EMPATHY_SMILEY_COUNT; i++) {
+ pixbufs[i] = empathy_pixbuf_from_smiley (i, GTK_ICON_SIZE_MENU);
}
inited = TRUE;
@@ -2124,7 +2124,7 @@ gossip_chat_view_get_smiley_image (GossipSmiley smiley)
}
const gchar *
-gossip_chat_view_get_smiley_text (GossipSmiley smiley)
+empathy_chat_view_get_smiley_text (EmpathySmiley smiley)
{
gint i;
@@ -2140,7 +2140,7 @@ gossip_chat_view_get_smiley_text (GossipSmiley smiley)
}
GtkWidget *
-gossip_chat_view_get_smiley_menu (GCallback callback,
+empathy_chat_view_get_smiley_menu (GCallback callback,
gpointer user_data,
GtkTooltips *tooltips)
{
@@ -2153,13 +2153,13 @@ gossip_chat_view_get_smiley_menu (GCallback callback,
menu = gtk_menu_new ();
- for (i = 0, x = 0, y = 0; i < GOSSIP_SMILEY_COUNT; i++) {
+ for (i = 0, x = 0, y = 0; i < EMPATHY_SMILEY_COUNT; i++) {
GtkWidget *item;
GtkWidget *image;
GdkPixbuf *pixbuf;
const gchar *smiley_text;
- pixbuf = gossip_chat_view_get_smiley_image (i);
+ pixbuf = empathy_chat_view_get_smiley_image (i);
if (!pixbuf) {
continue;
}
@@ -2172,7 +2172,7 @@ gossip_chat_view_get_smiley_menu (GCallback callback,
gtk_menu_attach (GTK_MENU (menu), item,
x, x + 1, y, y + 1);
- smiley_text = gossip_chat_view_get_smiley_text (i);
+ smiley_text = empathy_chat_view_get_smiley_text (i);
gtk_tooltips_set_tip (tooltips,
item,
@@ -2199,28 +2199,28 @@ gossip_chat_view_get_smiley_menu (GCallback callback,
* we will never change it on the fly.
*/
void
-gossip_chat_view_set_is_group_chat (GossipChatView *view,
+empathy_chat_view_set_is_group_chat (EmpathyChatView *view,
gboolean is_group_chat)
{
- GossipChatViewPriv *priv;
+ EmpathyChatViewPriv *priv;
gboolean theme_rooms = FALSE;
- g_return_if_fail (GOSSIP_IS_CHAT_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CHAT_VIEW (view));
priv = GET_PRIV (view);
priv->is_group_chat = is_group_chat;
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_THEME_CHAT_ROOM,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
&theme_rooms);
if (!theme_rooms && is_group_chat) {
- gossip_theme_manager_apply (gossip_theme_manager_get (),
+ empathy_theme_manager_apply (empathy_theme_manager_get (),
view,
NULL);
} else {
- gossip_theme_manager_apply_saved (gossip_theme_manager_get (),
+ empathy_theme_manager_apply_saved (empathy_theme_manager_get (),
view);
}
}
diff --git a/libempathy-gtk/empathy-chat-view.h b/libempathy-gtk/empathy-chat-view.h
new file mode 100644
index 000000000..4478e2116
--- /dev/null
+++ b/libempathy-gtk/empathy-chat-view.h
@@ -0,0 +1,134 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2002-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ */
+
+#ifndef __EMPATHY_CHAT_VIEW_H__
+#define __EMPATHY_CHAT_VIEW_H__
+
+#include <gtk/gtktextview.h>
+#include <gtk/gtktooltips.h>
+
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-message.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CHAT_VIEW (empathy_chat_view_get_type ())
+#define EMPATHY_CHAT_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatView))
+#define EMPATHY_CHAT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewClass))
+#define EMPATHY_IS_CHAT_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT_VIEW))
+#define EMPATHY_IS_CHAT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT_VIEW))
+#define EMPATHY_CHAT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT_VIEW, EmpathyChatViewClass))
+
+typedef struct _EmpathyChatView EmpathyChatView;
+typedef struct _EmpathyChatViewClass EmpathyChatViewClass;
+typedef struct _EmpathyChatViewPriv EmpathyChatViewPriv;
+
+struct _EmpathyChatView {
+ GtkTextView parent;
+};
+
+struct _EmpathyChatViewClass {
+ GtkTextViewClass parent_class;
+};
+
+typedef enum {
+ EMPATHY_SMILEY_NORMAL, /* :) */
+ EMPATHY_SMILEY_WINK, /* ;) */
+ EMPATHY_SMILEY_BIGEYE, /* =) */
+ EMPATHY_SMILEY_NOSE, /* :-) */
+ EMPATHY_SMILEY_CRY, /* :'( */
+ EMPATHY_SMILEY_SAD, /* :( */
+ EMPATHY_SMILEY_SCEPTICAL, /* :/ */
+ EMPATHY_SMILEY_BIGSMILE, /* :D */
+ EMPATHY_SMILEY_INDIFFERENT, /* :| */
+ EMPATHY_SMILEY_TOUNGE, /* :p */
+ EMPATHY_SMILEY_SHOCKED, /* :o */
+ EMPATHY_SMILEY_COOL, /* 8) */
+ EMPATHY_SMILEY_SORRY, /* *| */
+ EMPATHY_SMILEY_KISS, /* :* */
+ EMPATHY_SMILEY_SHUTUP, /* :# */
+ EMPATHY_SMILEY_YAWN, /* |O */
+ EMPATHY_SMILEY_CONFUSED, /* :$ */
+ EMPATHY_SMILEY_ANGEL, /* <) */
+ EMPATHY_SMILEY_OOOH, /* :x */
+ EMPATHY_SMILEY_LOOKAWAY, /* *) */
+ EMPATHY_SMILEY_BLUSH, /* *S */
+ EMPATHY_SMILEY_COOLBIGSMILE, /* 8D */
+ EMPATHY_SMILEY_ANGRY, /* :@ */
+ EMPATHY_SMILEY_BOSS, /* @) */
+ EMPATHY_SMILEY_MONKEY, /* #) */
+ EMPATHY_SMILEY_SILLY, /* O) */
+ EMPATHY_SMILEY_SICK, /* +o( */
+
+ EMPATHY_SMILEY_COUNT
+} EmpathySmiley;
+
+GType empathy_chat_view_get_type (void) G_GNUC_CONST;
+EmpathyChatView *empathy_chat_view_new (void);
+void empathy_chat_view_append_message (EmpathyChatView *view,
+ EmpathyMessage *msg);
+void empathy_chat_view_append_event (EmpathyChatView *view,
+ const gchar *str);
+void empathy_chat_view_append_button (EmpathyChatView *view,
+ const gchar *message,
+ GtkWidget *button1,
+ GtkWidget *button2);
+void empathy_chat_view_set_margin (EmpathyChatView *view,
+ gint margin);
+void empathy_chat_view_scroll (EmpathyChatView *view,
+ gboolean allow_scrolling);
+void empathy_chat_view_scroll_down (EmpathyChatView *view);
+gboolean empathy_chat_view_get_selection_bounds (EmpathyChatView *view,
+ GtkTextIter *start,
+ GtkTextIter *end);
+void empathy_chat_view_clear (EmpathyChatView *view);
+gboolean empathy_chat_view_find_previous (EmpathyChatView *view,
+ const gchar *search_criteria,
+ gboolean new_search);
+gboolean empathy_chat_view_find_next (EmpathyChatView *view,
+ const gchar *search_criteria,
+ gboolean new_search);
+void empathy_chat_view_find_abilities (EmpathyChatView *view,
+ const gchar *search_criteria,
+ gboolean *can_do_previous,
+ gboolean *can_do_next);
+void empathy_chat_view_highlight (EmpathyChatView *view,
+ const gchar *text);
+void empathy_chat_view_copy_clipboard (EmpathyChatView *view);
+gboolean empathy_chat_view_get_irc_style (EmpathyChatView *view);
+void empathy_chat_view_set_irc_style (EmpathyChatView *view,
+ gboolean irc_style);
+void empathy_chat_view_set_margin (EmpathyChatView *view,
+ gint margin);
+GdkPixbuf * empathy_chat_view_get_smiley_image (EmpathySmiley smiley);
+const gchar * empathy_chat_view_get_smiley_text (EmpathySmiley smiley);
+GtkWidget * empathy_chat_view_get_smiley_menu (GCallback callback,
+ gpointer user_data,
+ GtkTooltips *tooltips);
+void empathy_chat_view_set_is_group_chat (EmpathyChatView *view,
+ gboolean is_group_chat);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CHAT_VIEW_H__ */
diff --git a/libempathy-gtk/gossip-chat-window.c b/libempathy-gtk/empathy-chat-window.c
index 854c31428..7d48abf8a 100644
--- a/libempathy-gtk/gossip-chat-window.c
+++ b/libempathy-gtk/empathy-chat-window.c
@@ -37,38 +37,38 @@
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-log-manager.h>
-#include <libempathy/gossip-chatroom-manager.h>
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-message.h>
-#include <libempathy/gossip-conf.h>
-#include <libempathy/gossip-utils.h>
-
-#include "gossip-chat-window.h"
+#include <libempathy/empathy-chatroom-manager.h>
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-message.h>
+#include <libempathy/empathy-conf.h>
+#include <libempathy/empathy-utils.h>
+
+#include "empathy-chat-window.h"
#include "empathy-images.h"
-//#include "gossip-chat-invite.h"
+//#include "empathy-chat-invite.h"
#include "empathy-contact-dialogs.h"
-#include "gossip-log-window.h"
-#include "gossip-new-chatroom-dialog.h"
-#include "gossip-preferences.h"
-#include "gossip-private-chat.h"
-#include "gossip-group-chat.h"
-//#include "gossip-sound.h"
-#include "gossip-ui-utils.h"
+#include "empathy-log-window.h"
+#include "empathy-new-chatroom-dialog.h"
+#include "empathy-preferences.h"
+#include "empathy-private-chat.h"
+#include "empathy-group-chat.h"
+//#include "empathy-sound.h"
+#include "empathy-ui-utils.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHAT_WINDOW, GossipChatWindowPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT_WINDOW, EmpathyChatWindowPriv))
#define DEBUG_DOMAIN "ChatWindow"
#define URGENCY_TIMEOUT 60*1000
-struct _GossipChatWindowPriv {
- GossipChatroomManager *chatroom_manager;
+struct _EmpathyChatWindowPriv {
+ EmpathyChatroomManager *chatroom_manager;
GList *chats;
GList *chats_new_msg;
GList *chats_composing;
- GossipChat *current_chat;
+ EmpathyChat *current_chat;
gboolean page_added;
gboolean dnd_same_window;
@@ -109,82 +109,82 @@ struct _GossipChatWindowPriv {
guint save_geometry_id;
};
-static void gossip_chat_window_class_init (GossipChatWindowClass *klass);
-static void gossip_chat_window_init (GossipChatWindow *window);
-static void gossip_chat_window_finalize (GObject *object);
+static void empathy_chat_window_class_init (EmpathyChatWindowClass *klass);
+static void empathy_chat_window_init (EmpathyChatWindow *window);
+static void empathy_chat_window_finalize (GObject *object);
static void chat_window_accel_cb (GtkAccelGroup *accelgroup,
GObject *object,
guint key,
GdkModifierType mod,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_close_clicked_cb (GtkWidget *button,
- GossipChat *chat);
-static GtkWidget *chat_window_create_label (GossipChatWindow *window,
- GossipChat *chat);
-static void chat_window_update_status (GossipChatWindow *window,
- GossipChat *chat);
-static void chat_window_update_title (GossipChatWindow *window,
- GossipChat *chat);
-static void chat_window_update_menu (GossipChatWindow *window);
-static gboolean chat_window_save_geometry_timeout_cb (GossipChatWindow *window);
+ EmpathyChat *chat);
+static GtkWidget *chat_window_create_label (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+static void chat_window_update_status (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+static void chat_window_update_title (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+static void chat_window_update_menu (EmpathyChatWindow *window);
+static gboolean chat_window_save_geometry_timeout_cb (EmpathyChatWindow *window);
static gboolean chat_window_configure_event_cb (GtkWidget *widget,
GdkEventConfigure *event,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_conv_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_clear_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_info_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_add_contact_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_log_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_show_contacts_toggled_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_edit_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_insert_smiley_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_close_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_room_set_topic_activate_cb(GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_room_join_new_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_room_invite_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_room_add_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_cut_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_copy_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_paste_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_tabs_left_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_tabs_right_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_detach_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static gboolean chat_window_delete_event_cb (GtkWidget *dialog,
GdkEvent *event,
- GossipChatWindow *window);
-static void chat_window_status_changed_cb (GossipChat *chat,
- GossipChatWindow *window);
-static void chat_window_update_tooltip (GossipChatWindow *window,
- GossipChat *chat);
-static void chat_window_name_changed_cb (GossipChat *chat,
+ EmpathyChatWindow *window);
+static void chat_window_status_changed_cb (EmpathyChat *chat,
+ EmpathyChatWindow *window);
+static void chat_window_update_tooltip (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+static void chat_window_name_changed_cb (EmpathyChat *chat,
const gchar *name,
- GossipChatWindow *window);
-static void chat_window_composing_cb (GossipChat *chat,
+ EmpathyChatWindow *window);
+static void chat_window_composing_cb (EmpathyChat *chat,
gboolean is_composing,
- GossipChatWindow *window);
-static void chat_window_new_message_cb (GossipChat *chat,
- GossipMessage *message,
+ EmpathyChatWindow *window);
+static void chat_window_new_message_cb (EmpathyChat *chat,
+ EmpathyMessage *message,
gboolean is_backlog,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static GtkNotebook* chat_window_detach_hook (GtkNotebook *source,
GtkWidget *page,
gint x,
@@ -193,22 +193,22 @@ static GtkNotebook* chat_window_detach_hook (GtkNotebook *
static void chat_window_page_switched_cb (GtkNotebook *notebook,
GtkNotebookPage *page,
gint page_num,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_page_reordered_cb (GtkNotebook *notebook,
GtkWidget *widget,
guint page_num,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_page_added_cb (GtkNotebook *notebook,
GtkWidget *child,
guint page_num,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_page_removed_cb (GtkNotebook *notebook,
GtkWidget *child,
guint page_num,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static gboolean chat_window_focus_in_event_cb (GtkWidget *widget,
GdkEvent *event,
- GossipChatWindow *window);
+ EmpathyChatWindow *window);
static void chat_window_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
int x,
@@ -216,8 +216,8 @@ static void chat_window_drag_data_received (GtkWidget *
GtkSelectionData *selection,
guint info,
guint time,
- GossipChatWindow *window);
-static void chat_window_set_urgency_hint (GossipChatWindow *window,
+ EmpathyChatWindow *window);
+static void chat_window_set_urgency_hint (EmpathyChatWindow *window,
gboolean urgent);
@@ -238,34 +238,34 @@ static const GtkTargetEntry drag_types_dest[] = {
{ "GTK_NOTEBOOK_TAB", GTK_TARGET_SAME_APP, DND_DRAG_TYPE_TAB },
};
-G_DEFINE_TYPE (GossipChatWindow, gossip_chat_window, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EmpathyChatWindow, empathy_chat_window, G_TYPE_OBJECT);
static void
-gossip_chat_window_class_init (GossipChatWindowClass *klass)
+empathy_chat_window_class_init (EmpathyChatWindowClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = gossip_chat_window_finalize;
+ object_class->finalize = empathy_chat_window_finalize;
- g_type_class_add_private (object_class, sizeof (GossipChatWindowPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyChatWindowPriv));
/* Set up a style for the close button with no focus padding. */
gtk_rc_parse_string (
- "style \"gossip-close-button-style\"\n"
+ "style \"empathy-close-button-style\"\n"
"{\n"
" GtkWidget::focus-padding = 0\n"
" xthickness = 0\n"
" ythickness = 0\n"
"}\n"
- "widget \"*.gossip-close-button\" style \"gossip-close-button-style\"");
+ "widget \"*.empathy-close-button\" style \"empathy-close-button-style\"");
gtk_notebook_set_window_creation_hook (chat_window_detach_hook, NULL, NULL);
}
static void
-gossip_chat_window_init (GossipChatWindow *window)
+empathy_chat_window_init (EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GladeXML *glade;
GtkAccelGroup *accel_group;
GtkWidget *image;
@@ -279,7 +279,7 @@ gossip_chat_window_init (GossipChatWindow *window)
priv->tooltips = g_object_ref_sink (gtk_tooltips_new ());
- glade = gossip_glade_get_file ("gossip-chat.glade",
+ glade = empathy_glade_get_file ("empathy-chat.glade",
"chat_window",
NULL,
"chat_window", &priv->dialog,
@@ -308,7 +308,7 @@ gossip_chat_window_init (GossipChatWindow *window)
"menu_tabs_detach", &priv->menu_tabs_detach,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
window,
"chat_window", "configure-event", chat_window_configure_event_cb,
"menu_conv", "activate", chat_window_conv_activate_cb,
@@ -333,7 +333,7 @@ gossip_chat_window_init (GossipChatWindow *window)
g_object_unref (glade);
/* Set up chatroom manager */
- priv->chatroom_manager = gossip_chatroom_manager_new ();
+ priv->chatroom_manager = empathy_chatroom_manager_new ();
g_signal_connect_swapped (priv->chatroom_manager, "chatroom-added",
G_CALLBACK (chat_window_update_menu),
window);
@@ -363,7 +363,7 @@ gossip_chat_window_init (GossipChatWindow *window)
g_object_unref (accel_group);
- /* Set the contact information menu item image to the Gossip
+ /* Set the contact information menu item image to the Empathy
* stock image
*/
image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (priv->menu_conv_info));
@@ -372,7 +372,7 @@ gossip_chat_window_init (GossipChatWindow *window)
GTK_ICON_SIZE_MENU);
/* Set up smiley menu */
- menu = gossip_chat_view_get_smiley_menu (
+ menu = empathy_chat_view_get_smiley_menu (
G_CALLBACK (chat_window_insert_smiley_activate_cb),
window,
priv->tooltips);
@@ -447,14 +447,14 @@ gossip_chat_window_init (GossipChatWindow *window)
* visble, otherwise, returns NULL indicating that a new window should
* be added.
*/
-GossipChatWindow *
-gossip_chat_window_get_default (void)
+EmpathyChatWindow *
+empathy_chat_window_get_default (void)
{
GList *l;
gboolean separate_windows = TRUE;
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_SEPARATE_CHAT_WINDOWS,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
&separate_windows);
if (separate_windows) {
@@ -463,14 +463,14 @@ gossip_chat_window_get_default (void)
}
for (l = chat_windows; l; l = l->next) {
- GossipChatWindow *chat_window;
+ EmpathyChatWindow *chat_window;
GtkWidget *dialog;
GdkWindow *window;
gboolean visible;
chat_window = l->data;
- dialog = gossip_chat_window_get_dialog (chat_window);
+ dialog = empathy_chat_window_get_dialog (chat_window);
window = dialog->window;
g_object_get (dialog,
@@ -489,15 +489,15 @@ gossip_chat_window_get_default (void)
}
static void
-gossip_chat_window_finalize (GObject *object)
+empathy_chat_window_finalize (GObject *object)
{
- GossipChatWindow *window;
- GossipChatWindowPriv *priv;
+ EmpathyChatWindow *window;
+ EmpathyChatWindowPriv *priv;
- window = GOSSIP_CHAT_WINDOW (object);
+ window = EMPATHY_CHAT_WINDOW (object);
priv = GET_PRIV (window);
- gossip_debug (DEBUG_DOMAIN, "Finalized: %p", object);
+ empathy_debug (DEBUG_DOMAIN, "Finalized: %p", object);
if (priv->save_geometry_id != 0) {
g_source_remove (priv->save_geometry_id);
@@ -516,7 +516,7 @@ gossip_chat_window_finalize (GObject *object)
window);
g_object_unref (priv->chatroom_manager);
- G_OBJECT_CLASS (gossip_chat_window_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_chat_window_parent_class)->finalize (object);
}
static void
@@ -524,9 +524,9 @@ chat_window_accel_cb (GtkAccelGroup *accelgroup,
GObject *object,
guint key,
GdkModifierType mod,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gint num = -1;
gint i;
@@ -546,12 +546,12 @@ chat_window_accel_cb (GtkAccelGroup *accelgroup,
static void
chat_window_close_clicked_cb (GtkWidget *button,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatWindow *window;
+ EmpathyChatWindow *window;
- window = gossip_chat_get_window (chat);
- gossip_chat_window_remove_chat (window, chat);
+ window = empathy_chat_get_window (chat);
+ empathy_chat_window_remove_chat (window, chat);
}
static void
@@ -568,10 +568,10 @@ chat_window_close_button_style_set_cb (GtkWidget *button,
}
static GtkWidget *
-chat_window_create_label (GossipChatWindow *window,
- GossipChat *chat)
+chat_window_create_label (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GtkWidget *hbox;
GtkWidget *name_label;
GtkWidget *status_image;
@@ -590,7 +590,7 @@ chat_window_create_label (GossipChatWindow *window,
event_box = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (event_box), FALSE);
- name_label = gtk_label_new (gossip_chat_get_name (chat));
+ name_label = gtk_label_new (empathy_chat_get_name (chat));
gtk_label_set_ellipsize (GTK_LABEL (name_label), PANGO_ELLIPSIZE_END);
attr_list = pango_attr_list_new ();
@@ -626,7 +626,7 @@ chat_window_create_label (GossipChatWindow *window,
GTK_WIDGET_UNSET_FLAGS (close_button, GTK_CAN_DEFAULT);
/* Set the name to make the special rc style match. */
- gtk_widget_set_name (close_button, "gossip-close-button");
+ gtk_widget_set_name (close_button, "empathy-close-button");
close_image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
@@ -658,10 +658,10 @@ chat_window_create_label (GossipChatWindow *window,
}
static void
-chat_window_update_status (GossipChatWindow *window,
- GossipChat *chat)
+chat_window_update_status (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GtkImage *image;
const gchar *icon_name = NULL;
@@ -674,7 +674,7 @@ chat_window_update_status (GossipChatWindow *window,
icon_name = EMPATHY_IMAGE_TYPING;
}
else {
- icon_name = gossip_chat_get_status_icon_name (chat);
+ icon_name = empathy_chat_get_status_icon_name (chat);
}
image = g_object_get_data (G_OBJECT (chat), "chat-window-tab-image");
gtk_image_set_from_icon_name (image, icon_name, GTK_ICON_SIZE_MENU);
@@ -684,10 +684,10 @@ chat_window_update_status (GossipChatWindow *window,
}
static void
-chat_window_update_title (GossipChatWindow *window,
- GossipChat *chat)
+chat_window_update_title (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
const gchar *str;
gchar *title;
gint n_chats;
@@ -699,18 +699,18 @@ chat_window_update_title (GossipChatWindow *window,
if (priv->chats_new_msg) {
title = g_strdup_printf (
"%s - %s",
- gossip_chat_get_name (priv->current_chat),
+ empathy_chat_get_name (priv->current_chat),
_("New Message"));
}
- else if (gossip_chat_is_group_chat (priv->current_chat)) {
+ else if (empathy_chat_is_group_chat (priv->current_chat)) {
title = g_strdup_printf (
"%s - %s",
- gossip_chat_get_name (priv->current_chat),
+ empathy_chat_get_name (priv->current_chat),
_("Chat Room"));
} else {
title = g_strdup_printf (
"%s - %s",
- gossip_chat_get_name (priv->current_chat),
+ empathy_chat_get_name (priv->current_chat),
_("Conversation"));
}
} else {
@@ -724,7 +724,7 @@ chat_window_update_title (GossipChatWindow *window,
for (l = priv->chats_new_msg; l; l = l->next) {
n_messages++;
g_string_append (names,
- gossip_chat_get_name (l->data));
+ empathy_chat_get_name (l->data));
if (l->next) {
g_string_append (names, ", ");
}
@@ -751,9 +751,9 @@ chat_window_update_title (GossipChatWindow *window,
}
static void
-chat_window_update_menu (GossipChatWindow *window)
+chat_window_update_menu (EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gboolean first_page;
gboolean last_page;
gboolean is_connected;
@@ -774,14 +774,14 @@ chat_window_update_menu (GossipChatWindow *window)
gtk_widget_set_sensitive (priv->menu_tabs_left, !first_page);
gtk_widget_set_sensitive (priv->menu_tabs_right, !last_page);
- is_connected = gossip_chat_is_connected (priv->current_chat);
+ is_connected = empathy_chat_is_connected (priv->current_chat);
- if (gossip_chat_is_group_chat (priv->current_chat)) {
- GossipGroupChat *group_chat;
- GossipChatroom *chatroom;
+ if (empathy_chat_is_group_chat (priv->current_chat)) {
+ EmpathyGroupChat *group_chat;
+ EmpathyChatroom *chatroom;
gboolean show_contacts;
- group_chat = GOSSIP_GROUP_CHAT (priv->current_chat);
+ group_chat = EMPATHY_GROUP_CHAT (priv->current_chat);
/* Show / Hide widgets */
gtk_widget_show (priv->menu_room);
@@ -793,9 +793,9 @@ chat_window_update_menu (GossipChatWindow *window)
/* Can we add this room to our favourites and are we
* connected to the room?
*/
- chatroom = gossip_chatroom_manager_find (priv->chatroom_manager,
+ chatroom = empathy_chatroom_manager_find (priv->chatroom_manager,
priv->current_chat->account,
- gossip_chat_get_id (priv->current_chat));
+ empathy_chat_get_id (priv->current_chat));
gtk_widget_set_sensitive (priv->menu_room_add, chatroom == NULL);
gtk_widget_set_sensitive (priv->menu_conv_insert_smiley, is_connected);
@@ -808,7 +808,7 @@ chat_window_update_menu (GossipChatWindow *window)
* with 2 or more group chat windows where showing
* contacts doesn't do anything.
*/
- show_contacts = gossip_group_chat_get_show_contacts (group_chat);
+ show_contacts = empathy_group_chat_get_show_contacts (group_chat);
g_signal_handlers_block_by_func (priv->menu_room_show_contacts,
chat_window_show_contacts_toggled_cb,
@@ -822,18 +822,18 @@ chat_window_update_menu (GossipChatWindow *window)
chat_window_show_contacts_toggled_cb,
window);
} else {
- GossipPrivateChat *chat;
- GossipSubscription subscription;
- GossipContact *contact;
+ EmpathyPrivateChat *chat;
+ EmpathySubscription subscription;
+ EmpathyContact *contact;
- chat = GOSSIP_PRIVATE_CHAT (priv->current_chat);
+ chat = EMPATHY_PRIVATE_CHAT (priv->current_chat);
/* Show / Hide widgets */
gtk_widget_hide (priv->menu_room);
- contact = gossip_private_chat_get_contact (chat);
- subscription = gossip_contact_get_subscription (contact);
- if (!(subscription & GOSSIP_SUBSCRIPTION_FROM)) {
+ contact = empathy_private_chat_get_contact (chat);
+ subscription = empathy_contact_get_subscription (contact);
+ if (!(subscription & EMPATHY_SUBSCRIPTION_FROM)) {
gtk_widget_show (priv->menu_conv_add_contact);
} else {
gtk_widget_hide (priv->menu_conv_add_contact);
@@ -851,10 +851,10 @@ chat_window_update_menu (GossipChatWindow *window)
static void
chat_window_insert_smiley_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChat *chat;
GtkTextBuffer *buffer;
GtkTextIter iter;
const gchar *smiley;
@@ -873,53 +873,53 @@ chat_window_insert_smiley_activate_cb (GtkWidget *menuitem,
static void
chat_window_clear_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
- gossip_chat_clear (priv->current_chat);
+ empathy_chat_clear (priv->current_chat);
}
static void
chat_window_add_contact_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- //GossipContact *contact;
+ EmpathyChatWindowPriv *priv;
+ //EmpathyContact *contact;
priv = GET_PRIV (window);
- //contact = gossip_chat_get_contact (priv->current_chat);
+ //contact = empathy_chat_get_contact (priv->current_chat);
- // FIXME: gossip_add_contact_dialog_show (NULL, contact);
+ // FIXME: empathy_add_contact_dialog_show (NULL, contact);
}
static void
chat_window_log_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
- gossip_log_window_show (priv->current_chat->account,
- gossip_chat_get_id (priv->current_chat),
- gossip_chat_is_group_chat (priv->current_chat),
+ empathy_log_window_show (priv->current_chat->account,
+ empathy_chat_get_id (priv->current_chat),
+ empathy_chat_is_group_chat (priv->current_chat),
GTK_WINDOW (priv->dialog));
}
static void
chat_window_info_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipContact *contact;
+ EmpathyChatWindowPriv *priv;
+ EmpathyContact *contact;
priv = GET_PRIV (window);
- contact = gossip_private_chat_get_contact (GOSSIP_PRIVATE_CHAT (priv->current_chat));
+ contact = empathy_private_chat_get_contact (EMPATHY_PRIVATE_CHAT (priv->current_chat));
empathy_contact_information_dialog_show (contact,
GTK_WINDOW (priv->dialog),
@@ -927,9 +927,9 @@ chat_window_info_activate_cb (GtkWidget *menuitem,
}
static gboolean
-chat_window_save_geometry_timeout_cb (GossipChatWindow *window)
+chat_window_save_geometry_timeout_cb (EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gint x, y, w, h;
priv = GET_PRIV (window);
@@ -937,7 +937,7 @@ chat_window_save_geometry_timeout_cb (GossipChatWindow *window)
gtk_window_get_size (GTK_WINDOW (priv->dialog), &w, &h);
gtk_window_get_position (GTK_WINDOW (priv->dialog), &x, &y);
- gossip_chat_save_geometry (priv->current_chat, x, y, w, h);
+ empathy_chat_save_geometry (priv->current_chat, x, y, w, h);
priv->save_geometry_id = 0;
@@ -947,9 +947,9 @@ chat_window_save_geometry_timeout_cb (GossipChatWindow *window)
static gboolean
chat_window_configure_event_cb (GtkWidget *widget,
GdkEventConfigure *event,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
@@ -972,9 +972,9 @@ chat_window_configure_event_cb (GtkWidget *widget,
static void
chat_window_conv_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
EmpathyLogManager *manager;
gboolean log_exists = FALSE;
@@ -983,8 +983,8 @@ chat_window_conv_activate_cb (GtkWidget *menuitem,
manager = empathy_log_manager_new ();
log_exists = empathy_log_manager_exists (manager,
priv->current_chat->account,
- gossip_chat_get_id (priv->current_chat),
- gossip_chat_is_group_chat (priv->current_chat));
+ empathy_chat_get_id (priv->current_chat),
+ empathy_chat_is_group_chat (priv->current_chat));
g_object_unref (manager);
gtk_widget_set_sensitive (priv->menu_conv_log, log_exists);
@@ -992,9 +992,9 @@ chat_window_conv_activate_cb (GtkWidget *menuitem,
static void
chat_window_show_contacts_toggled_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gboolean show;
priv = GET_PRIV (window);
@@ -1002,95 +1002,95 @@ chat_window_show_contacts_toggled_cb (GtkWidget *menuitem,
g_return_if_fail (priv->current_chat != NULL);
show = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (priv->menu_room_show_contacts));
- gossip_group_chat_set_show_contacts (GOSSIP_GROUP_CHAT (priv->current_chat), show);
+ empathy_group_chat_set_show_contacts (EMPATHY_GROUP_CHAT (priv->current_chat), show);
}
static void
chat_window_close_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
g_return_if_fail (priv->current_chat != NULL);
- gossip_chat_window_remove_chat (window, priv->current_chat);
+ empathy_chat_window_remove_chat (window, priv->current_chat);
}
static void
chat_window_room_set_topic_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
- if (gossip_chat_is_group_chat (priv->current_chat)) {
- GossipGroupChat *group_chat;
+ if (empathy_chat_is_group_chat (priv->current_chat)) {
+ EmpathyGroupChat *group_chat;
- group_chat = GOSSIP_GROUP_CHAT (priv->current_chat);
- gossip_group_chat_set_topic (group_chat);
+ group_chat = EMPATHY_GROUP_CHAT (priv->current_chat);
+ empathy_group_chat_set_topic (group_chat);
}
}
static void
chat_window_room_join_new_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
- gossip_new_chatroom_dialog_show (GTK_WINDOW (priv->dialog));
+ empathy_new_chatroom_dialog_show (GTK_WINDOW (priv->dialog));
}
static void
chat_window_room_invite_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
/* FIXME:
- GossipChatWindowPriv *priv;
- GossipContact *own_contact;
- GossipChatroomId id = 0;
+ EmpathyChatWindowPriv *priv;
+ EmpathyContact *own_contact;
+ EmpathyChatroomId id = 0;
priv = GET_PRIV (window);
- own_contact = gossip_chat_get_own_contact (priv->current_chat);
+ own_contact = empathy_chat_get_own_contact (priv->current_chat);
- if (gossip_chat_is_group_chat (priv->current_chat)) {
- GossipGroupChat *group_chat;
+ if (empathy_chat_is_group_chat (priv->current_chat)) {
+ EmpathyGroupChat *group_chat;
- group_chat = GOSSIP_GROUP_CHAT (priv->current_chat);
- id = gossip_group_chat_get_chatroom_id (group_chat);
+ group_chat = EMPATHY_GROUP_CHAT (priv->current_chat);
+ id = empathy_group_chat_get_chatroom_id (group_chat);
}
- gossip_chat_invite_dialog_show (own_contact, id);
+ empathy_chat_invite_dialog_show (own_contact, id);
*/
}
static void
chat_window_room_add_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChatroomManager *manager;
- GossipChatroom *chatroom;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChatroomManager *manager;
+ EmpathyChatroom *chatroom;
priv = GET_PRIV (window);
g_return_if_fail (priv->current_chat != NULL);
- if (!gossip_chat_is_group_chat (priv->current_chat)) {
+ if (!empathy_chat_is_group_chat (priv->current_chat)) {
return;
}
- chatroom = gossip_chatroom_new_full (priv->current_chat->account,
- gossip_chat_get_id (priv->current_chat),
- gossip_chat_get_name (priv->current_chat),
+ chatroom = empathy_chatroom_new_full (priv->current_chat->account,
+ empathy_chat_get_id (priv->current_chat),
+ empathy_chat_get_name (priv->current_chat),
FALSE);
- manager = gossip_chatroom_manager_new ();
- gossip_chatroom_manager_add (manager, chatroom);
+ manager = empathy_chatroom_manager_new ();
+ empathy_chatroom_manager_add (manager, chatroom);
chat_window_update_menu (window);
g_object_unref (chatroom);
@@ -1099,9 +1099,9 @@ chat_window_room_add_activate_cb (GtkWidget *menuitem,
static void
chat_window_edit_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GtkClipboard *clipboard;
GtkTextBuffer *buffer;
gboolean text_available;
@@ -1110,7 +1110,7 @@ chat_window_edit_activate_cb (GtkWidget *menuitem,
g_return_if_fail (priv->current_chat != NULL);
- if (!gossip_chat_is_connected (priv->current_chat)) {
+ if (!empathy_chat_is_connected (priv->current_chat)) {
gtk_widget_set_sensitive (priv->menu_edit_copy, FALSE);
gtk_widget_set_sensitive (priv->menu_edit_cut, FALSE);
gtk_widget_set_sensitive (priv->menu_edit_paste, FALSE);
@@ -1124,7 +1124,7 @@ chat_window_edit_activate_cb (GtkWidget *menuitem,
} else {
gboolean selection;
- selection = gossip_chat_view_get_selection_bounds (priv->current_chat->view,
+ selection = empathy_chat_view_get_selection_bounds (priv->current_chat->view,
NULL, NULL);
gtk_widget_set_sensitive (priv->menu_edit_cut, FALSE);
@@ -1138,49 +1138,49 @@ chat_window_edit_activate_cb (GtkWidget *menuitem,
static void
chat_window_cut_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_WINDOW (window));
+ g_return_if_fail (EMPATHY_IS_CHAT_WINDOW (window));
priv = GET_PRIV (window);
- gossip_chat_cut (priv->current_chat);
+ empathy_chat_cut (priv->current_chat);
}
static void
chat_window_copy_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_WINDOW (window));
+ g_return_if_fail (EMPATHY_IS_CHAT_WINDOW (window));
priv = GET_PRIV (window);
- gossip_chat_copy (priv->current_chat);
+ empathy_chat_copy (priv->current_chat);
}
static void
chat_window_paste_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT_WINDOW (window));
+ g_return_if_fail (EMPATHY_IS_CHAT_WINDOW (window));
priv = GET_PRIV (window);
- gossip_chat_paste (priv->current_chat);
+ empathy_chat_paste (priv->current_chat);
}
static void
chat_window_tabs_left_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChat *chat;
gint index;
priv = GET_PRIV (window);
@@ -1192,7 +1192,7 @@ chat_window_tabs_left_activate_cb (GtkWidget *menuitem,
}
gtk_notebook_reorder_child (GTK_NOTEBOOK (priv->notebook),
- gossip_chat_get_widget (chat),
+ empathy_chat_get_widget (chat),
index - 1);
chat_window_update_menu (window);
@@ -1201,10 +1201,10 @@ chat_window_tabs_left_activate_cb (GtkWidget *menuitem,
static void
chat_window_tabs_right_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChat *chat;
gint index;
priv = GET_PRIV (window);
@@ -1213,7 +1213,7 @@ chat_window_tabs_right_activate_cb (GtkWidget *menuitem,
index = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
gtk_notebook_reorder_child (GTK_NOTEBOOK (priv->notebook),
- gossip_chat_get_widget (chat),
+ empathy_chat_get_widget (chat),
index + 1);
chat_window_update_menu (window);
@@ -1222,18 +1222,18 @@ chat_window_tabs_right_activate_cb (GtkWidget *menuitem,
static void
chat_window_detach_activate_cb (GtkWidget *menuitem,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChatWindow *new_window;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChatWindow *new_window;
+ EmpathyChat *chat;
priv = GET_PRIV (window);
chat = priv->current_chat;
- new_window = gossip_chat_window_new ();
+ new_window = empathy_chat_window_new ();
- gossip_chat_window_move_chat (window, new_window, chat);
+ empathy_chat_window_move_chat (window, new_window, chat);
priv = GET_PRIV (new_window);
gtk_widget_show (priv->dialog);
@@ -1242,20 +1242,20 @@ chat_window_detach_activate_cb (GtkWidget *menuitem,
static gboolean
chat_window_delete_event_cb (GtkWidget *dialog,
GdkEvent *event,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GList *list;
GList *l;
priv = GET_PRIV (window);
- gossip_debug (DEBUG_DOMAIN, "Delete event received");
+ empathy_debug (DEBUG_DOMAIN, "Delete event received");
list = g_list_copy (priv->chats);
for (l = list; l; l = l->next) {
- gossip_chat_window_remove_chat (window, l->data);
+ empathy_chat_window_remove_chat (window, l->data);
}
g_list_free (list);
@@ -1264,25 +1264,25 @@ chat_window_delete_event_cb (GtkWidget *dialog,
}
static void
-chat_window_status_changed_cb (GossipChat *chat,
- GossipChatWindow *window)
+chat_window_status_changed_cb (EmpathyChat *chat,
+ EmpathyChatWindow *window)
{
chat_window_update_menu (window);
chat_window_update_status (window, chat);
}
static void
-chat_window_update_tooltip (GossipChatWindow *window,
- GossipChat *chat)
+chat_window_update_tooltip (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GtkWidget *widget;
gchar *current_tooltip;
gchar *str;
priv = GET_PRIV (window);
- current_tooltip = gossip_chat_get_tooltip (chat);
+ current_tooltip = empathy_chat_get_tooltip (chat);
if (g_list_find (priv->chats_composing, chat)) {
str = g_strconcat (current_tooltip, "\n", _("Typing a message."), NULL);
@@ -1301,9 +1301,9 @@ chat_window_update_tooltip (GossipChatWindow *window,
}
static void
-chat_window_name_changed_cb (GossipChat *chat,
+chat_window_name_changed_cb (EmpathyChat *chat,
const gchar *name,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
GtkLabel *label;
@@ -1313,11 +1313,11 @@ chat_window_name_changed_cb (GossipChat *chat,
}
static void
-chat_window_composing_cb (GossipChat *chat,
+chat_window_composing_cb (EmpathyChat *chat,
gboolean is_composing,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
@@ -1331,31 +1331,31 @@ chat_window_composing_cb (GossipChat *chat,
}
static void
-chat_window_new_message_cb (GossipChat *chat,
- GossipMessage *message,
+chat_window_new_message_cb (EmpathyChat *chat,
+ EmpathyMessage *message,
gboolean is_backlog,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gboolean has_focus;
gboolean needs_urgency;
priv = GET_PRIV (window);
- has_focus = gossip_chat_window_has_focus (window);
+ has_focus = empathy_chat_window_has_focus (window);
if (has_focus && priv->current_chat == chat) {
- gossip_debug (DEBUG_DOMAIN, "New message, we have focus");
+ empathy_debug (DEBUG_DOMAIN, "New message, we have focus");
return;
}
- gossip_debug (DEBUG_DOMAIN, "New message, no focus");
+ empathy_debug (DEBUG_DOMAIN, "New message, no focus");
needs_urgency = FALSE;
- if (gossip_chat_is_group_chat (chat)) {
+ if (empathy_chat_is_group_chat (chat)) {
if (!is_backlog &&
- gossip_chat_should_highlight_nick (message)) {
- gossip_debug (DEBUG_DOMAIN, "Highlight this nick");
+ empathy_chat_should_highlight_nick (message)) {
+ empathy_debug (DEBUG_DOMAIN, "Highlight this nick");
needs_urgency = TRUE;
}
} else {
@@ -1380,19 +1380,19 @@ chat_window_detach_hook (GtkNotebook *source,
gint y,
gpointer user_data)
{
- GossipChatWindowPriv *priv;
- GossipChatWindow *window, *new_window;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChatWindow *window, *new_window;
+ EmpathyChat *chat;
chat = g_object_get_data (G_OBJECT (page), "chat");
- window = gossip_chat_get_window (chat);
+ window = empathy_chat_get_window (chat);
- new_window = gossip_chat_window_new ();
+ new_window = empathy_chat_window_new ();
priv = GET_PRIV (new_window);
- gossip_debug (DEBUG_DOMAIN, "Detach hook called");
+ empathy_debug (DEBUG_DOMAIN, "Detach hook called");
- gossip_chat_window_move_chat (window, new_window, chat);
+ empathy_chat_window_move_chat (window, new_window, chat);
gtk_window_move (GTK_WINDOW (priv->dialog), x, y);
gtk_widget_show (priv->dialog);
@@ -1404,13 +1404,13 @@ static void
chat_window_page_switched_cb (GtkNotebook *notebook,
GtkNotebookPage *page,
gint page_num,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChat *chat;
GtkWidget *child;
- gossip_debug (DEBUG_DOMAIN, "Page switched");
+ empathy_debug (DEBUG_DOMAIN, "Page switched");
priv = GET_PRIV (window);
@@ -1419,7 +1419,7 @@ chat_window_page_switched_cb (GtkNotebook *notebook,
if (priv->page_added) {
priv->page_added = FALSE;
- gossip_chat_scroll_down (chat);
+ empathy_chat_scroll_down (chat);
}
else if (priv->current_chat == chat) {
return;
@@ -1436,9 +1436,9 @@ static void
chat_window_page_reordered_cb (GtkNotebook *notebook,
GtkWidget *widget,
guint page_num,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- gossip_debug (DEBUG_DOMAIN, "Page reordered");
+ empathy_debug (DEBUG_DOMAIN, "Page reordered");
chat_window_update_menu (window);
}
@@ -1447,10 +1447,10 @@ static void
chat_window_page_added_cb (GtkNotebook *notebook,
GtkWidget *child,
guint page_num,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChat *chat;
priv = GET_PRIV (window);
@@ -1459,18 +1459,18 @@ chat_window_page_added_cb (GtkNotebook *notebook,
* it, so we return here and in "page-added".
*/
if (priv->dnd_same_window) {
- gossip_debug (DEBUG_DOMAIN, "Page added (back to the same window)");
+ empathy_debug (DEBUG_DOMAIN, "Page added (back to the same window)");
priv->dnd_same_window = FALSE;
return;
}
- gossip_debug (DEBUG_DOMAIN, "Page added");
+ empathy_debug (DEBUG_DOMAIN, "Page added");
/* Get chat object */
chat = g_object_get_data (G_OBJECT (child), "chat");
/* Set the chat window */
- gossip_chat_set_window (chat, window);
+ empathy_chat_set_window (chat, window);
/* Connect chat signals for this window */
g_signal_connect (chat, "status-changed",
@@ -1499,10 +1499,10 @@ static void
chat_window_page_removed_cb (GtkNotebook *notebook,
GtkWidget *child,
guint page_num,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
- GossipChat *chat;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChat *chat;
priv = GET_PRIV (window);
@@ -1511,17 +1511,17 @@ chat_window_page_removed_cb (GtkNotebook *notebook,
* it, so we return here and in "page-added".
*/
if (priv->dnd_same_window) {
- gossip_debug (DEBUG_DOMAIN, "Page removed (and will be readded to same window)");
+ empathy_debug (DEBUG_DOMAIN, "Page removed (and will be readded to same window)");
return;
}
- gossip_debug (DEBUG_DOMAIN, "Page removed");
+ empathy_debug (DEBUG_DOMAIN, "Page removed");
/* Get chat object */
chat = g_object_get_data (G_OBJECT (child), "chat");
/* Unset the window associated with a chat */
- gossip_chat_set_window (chat, NULL);
+ empathy_chat_set_window (chat, NULL);
/* Disconnect all signal handlers for this chat and this window */
g_signal_handlers_disconnect_by_func (chat,
@@ -1553,11 +1553,11 @@ chat_window_page_removed_cb (GtkNotebook *notebook,
static gboolean
chat_window_focus_in_event_cb (GtkWidget *widget,
GdkEvent *event,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
- gossip_debug (DEBUG_DOMAIN, "Focus in event, updating title");
+ empathy_debug (DEBUG_DOMAIN, "Focus in event, updating title");
priv = GET_PRIV (window);
@@ -1579,14 +1579,14 @@ chat_window_drag_data_received (GtkWidget *widget,
GtkSelectionData *selection,
guint info,
guint time,
- GossipChatWindow *window)
+ EmpathyChatWindow *window)
{
/* FIXME: DnD of contact do not seems to work... */
if (info == DND_DRAG_TYPE_CONTACT_ID) {
EmpathyContactManager *manager;
- GossipContact *contact;
- GossipChat *chat;
- GossipChatWindow *old_window;
+ EmpathyContact *contact;
+ EmpathyChat *chat;
+ EmpathyChatWindow *old_window;
McAccount *account;
const gchar *id = NULL;
@@ -1594,20 +1594,20 @@ chat_window_drag_data_received (GtkWidget *widget,
id = (const gchar*) selection->data;
}
- gossip_debug (DEBUG_DOMAIN, "DND contact from roster with id:'%s'", id);
+ empathy_debug (DEBUG_DOMAIN, "DND contact from roster with id:'%s'", id);
manager = empathy_contact_manager_new ();
contact = empathy_contact_list_find (EMPATHY_CONTACT_LIST (manager), id);
g_object_unref (manager);
if (!contact) {
- gossip_debug (DEBUG_DOMAIN, "DND contact from roster not found");
+ empathy_debug (DEBUG_DOMAIN, "DND contact from roster not found");
return;
}
- account = gossip_contact_get_account (contact);
- chat = gossip_chat_window_find_chat (account, id);
- old_window = gossip_chat_get_window (chat);
+ account = empathy_contact_get_account (contact);
+ chat = empathy_chat_window_find_chat (account, id);
+ old_window = empathy_chat_get_window (chat);
if (old_window) {
if (old_window == window) {
@@ -1615,13 +1615,13 @@ chat_window_drag_data_received (GtkWidget *widget,
return;
}
- gossip_chat_window_move_chat (old_window, window, chat);
+ empathy_chat_window_move_chat (old_window, window, chat);
} else {
- gossip_chat_window_add_chat (window, chat);
+ empathy_chat_window_add_chat (window, chat);
}
/* Added to take care of any outstanding chat events */
- gossip_chat_present (chat);
+ empathy_chat_present (chat);
/* We should return TRUE to remove the data when doing
* GDK_ACTION_MOVE, but we don't here otherwise it has
@@ -1631,11 +1631,11 @@ chat_window_drag_data_received (GtkWidget *widget,
gtk_drag_finish (context, TRUE, FALSE, time);
}
else if (info == DND_DRAG_TYPE_TAB) {
- GossipChat *chat = NULL;
- GossipChatWindow *old_window;
+ EmpathyChat *chat = NULL;
+ EmpathyChatWindow *old_window;
GtkWidget **child = NULL;
- gossip_debug (DEBUG_DOMAIN, "DND tab");
+ empathy_debug (DEBUG_DOMAIN, "DND tab");
if (selection) {
child = (void*) selection->data;
@@ -1645,14 +1645,14 @@ chat_window_drag_data_received (GtkWidget *widget,
chat = g_object_get_data (G_OBJECT (*child), "chat");
}
- old_window = gossip_chat_get_window (chat);
+ old_window = empathy_chat_get_window (chat);
if (old_window) {
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
if (old_window == window) {
- gossip_debug (DEBUG_DOMAIN, "DND tab (within same window)");
+ empathy_debug (DEBUG_DOMAIN, "DND tab (within same window)");
priv->dnd_same_window = TRUE;
gtk_drag_finish (context, TRUE, FALSE, time);
return;
@@ -1668,19 +1668,19 @@ chat_window_drag_data_received (GtkWidget *widget,
*/
gtk_drag_finish (context, TRUE, FALSE, time);
} else {
- gossip_debug (DEBUG_DOMAIN, "DND from unknown source");
+ empathy_debug (DEBUG_DOMAIN, "DND from unknown source");
gtk_drag_finish (context, FALSE, FALSE, time);
}
}
static gboolean
-chat_window_urgency_timeout_func (GossipChatWindow *window)
+chat_window_urgency_timeout_func (EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
- gossip_debug (DEBUG_DOMAIN, "Turning off urgency hint");
+ empathy_debug (DEBUG_DOMAIN, "Turning off urgency hint");
gtk_window_set_urgency_hint (GTK_WINDOW (priv->dialog), FALSE);
priv->urgency_timeout_id = 0;
@@ -1689,17 +1689,17 @@ chat_window_urgency_timeout_func (GossipChatWindow *window)
}
static void
-chat_window_set_urgency_hint (GossipChatWindow *window,
+chat_window_set_urgency_hint (EmpathyChatWindow *window,
gboolean urgent)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
priv = GET_PRIV (window);
if (!urgent) {
/* Remove any existing hint and timeout. */
if (priv->urgency_timeout_id) {
- gossip_debug (DEBUG_DOMAIN, "Turning off urgency hint");
+ empathy_debug (DEBUG_DOMAIN, "Turning off urgency hint");
gtk_window_set_urgency_hint (GTK_WINDOW (priv->dialog), FALSE);
g_source_remove (priv->urgency_timeout_id);
priv->urgency_timeout_id = 0;
@@ -1711,7 +1711,7 @@ chat_window_set_urgency_hint (GossipChatWindow *window,
if (priv->urgency_timeout_id) {
g_source_remove (priv->urgency_timeout_id);
} else {
- gossip_debug (DEBUG_DOMAIN, "Turning on urgency hint");
+ empathy_debug (DEBUG_DOMAIN, "Turning on urgency hint");
gtk_window_set_urgency_hint (GTK_WINDOW (priv->dialog), TRUE);
}
@@ -1721,16 +1721,16 @@ chat_window_set_urgency_hint (GossipChatWindow *window,
window);
}
-GossipChatWindow *
-gossip_chat_window_new (void)
+EmpathyChatWindow *
+empathy_chat_window_new (void)
{
- return GOSSIP_CHAT_WINDOW (g_object_new (GOSSIP_TYPE_CHAT_WINDOW, NULL));
+ return EMPATHY_CHAT_WINDOW (g_object_new (EMPATHY_TYPE_CHAT_WINDOW, NULL));
}
GtkWidget *
-gossip_chat_window_get_dialog (GossipChatWindow *window)
+empathy_chat_window_get_dialog (EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
g_return_val_if_fail (window != NULL, NULL);
@@ -1740,10 +1740,10 @@ gossip_chat_window_get_dialog (GossipChatWindow *window)
}
void
-gossip_chat_window_add_chat (GossipChatWindow *window,
- GossipChat *chat)
+empathy_chat_window_add_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
GtkWidget *label;
GtkWidget *child;
@@ -1753,12 +1753,12 @@ gossip_chat_window_add_chat (GossipChatWindow *window,
g_object_ref (chat);
/* Set the chat window */
- gossip_chat_set_window (chat, window);
+ empathy_chat_set_window (chat, window);
if (g_list_length (priv->chats) == 0) {
gint x, y, w, h;
- gossip_chat_load_geometry (chat, &x, &y, &w, &h);
+ empathy_chat_load_geometry (chat, &x, &y, &w, &h);
if (x >= 0 && y >= 0) {
/* Let the window manager position it if we don't have
@@ -1775,7 +1775,7 @@ gossip_chat_window_add_chat (GossipChatWindow *window,
}
}
- child = gossip_chat_get_widget (chat);
+ child = empathy_chat_get_widget (chat);
label = chat_window_create_label (window, chat);
gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), child, label);
@@ -1784,25 +1784,25 @@ gossip_chat_window_add_chat (GossipChatWindow *window,
gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (priv->notebook), child,
TRUE, TRUE, GTK_PACK_START);
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Chat added (%d references)",
G_OBJECT (chat)->ref_count);
}
void
-gossip_chat_window_remove_chat (GossipChatWindow *window,
- GossipChat *chat)
+empathy_chat_window_remove_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gint position;
priv = GET_PRIV (window);
position = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook),
- gossip_chat_get_widget (chat));
+ empathy_chat_get_widget (chat));
gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), position);
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Chat removed (%d references)",
G_OBJECT (chat)->ref_count - 1);
@@ -1810,58 +1810,58 @@ gossip_chat_window_remove_chat (GossipChatWindow *window,
}
void
-gossip_chat_window_move_chat (GossipChatWindow *old_window,
- GossipChatWindow *new_window,
- GossipChat *chat)
+empathy_chat_window_move_chat (EmpathyChatWindow *old_window,
+ EmpathyChatWindow *new_window,
+ EmpathyChat *chat)
{
GtkWidget *widget;
- g_return_if_fail (GOSSIP_IS_CHAT_WINDOW (old_window));
- g_return_if_fail (GOSSIP_IS_CHAT_WINDOW (new_window));
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT_WINDOW (old_window));
+ g_return_if_fail (EMPATHY_IS_CHAT_WINDOW (new_window));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
- widget = gossip_chat_get_widget (chat);
+ widget = empathy_chat_get_widget (chat);
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Chat moving with widget:%p (%d references)",
widget,
G_OBJECT (widget)->ref_count);
/* We reference here to make sure we don't loose the widget
- * and the GossipChat object during the move.
+ * and the EmpathyChat object during the move.
*/
g_object_ref (chat);
g_object_ref (widget);
- gossip_chat_window_remove_chat (old_window, chat);
- gossip_chat_window_add_chat (new_window, chat);
+ empathy_chat_window_remove_chat (old_window, chat);
+ empathy_chat_window_add_chat (new_window, chat);
g_object_unref (widget);
g_object_unref (chat);
}
void
-gossip_chat_window_switch_to_chat (GossipChatWindow *window,
- GossipChat *chat)
+empathy_chat_window_switch_to_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gint page_num;
priv = GET_PRIV (window);
page_num = gtk_notebook_page_num (GTK_NOTEBOOK (priv->notebook),
- gossip_chat_get_widget (chat));
+ empathy_chat_get_widget (chat));
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
page_num);
}
gboolean
-gossip_chat_window_has_focus (GossipChatWindow *window)
+empathy_chat_window_has_focus (EmpathyChatWindow *window)
{
- GossipChatWindowPriv *priv;
+ EmpathyChatWindowPriv *priv;
gboolean has_focus;
- g_return_val_if_fail (GOSSIP_IS_CHAT_WINDOW (window), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT_WINDOW (window), FALSE);
priv = GET_PRIV (window);
@@ -1870,27 +1870,27 @@ gossip_chat_window_has_focus (GossipChatWindow *window)
return has_focus;
}
-GossipChat *
-gossip_chat_window_find_chat (McAccount *account,
+EmpathyChat *
+empathy_chat_window_find_chat (McAccount *account,
const gchar *id)
{
GList *l;
for (l = chat_windows; l; l = l->next) {
- GossipChatWindowPriv *priv;
- GossipChatWindow *window;
+ EmpathyChatWindowPriv *priv;
+ EmpathyChatWindow *window;
GList *ll;
window = l->data;
priv = GET_PRIV (window);
for (ll = priv->chats; ll; ll = ll->next) {
- GossipChat *chat;
+ EmpathyChat *chat;
chat = ll->data;
- if (gossip_account_equal (account, chat->account) &&
- strcmp (id, gossip_chat_get_id (chat)) == 0) {
+ if (empathy_account_equal (account, chat->account) &&
+ strcmp (id, empathy_chat_get_id (chat)) == 0) {
return chat;
}
}
diff --git a/libempathy-gtk/empathy-chat-window.h b/libempathy-gtk/empathy-chat-window.h
new file mode 100644
index 000000000..c79f7519e
--- /dev/null
+++ b/libempathy-gtk/empathy-chat-window.h
@@ -0,0 +1,80 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2003-2007 Imendio AB
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
+ * Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_CHAT_WINDOW_H__
+#define __EMPATHY_CHAT_WINDOW_H__
+
+#include <glib-object.h>
+
+#include <libmissioncontrol/mc-account.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CHAT_WINDOW (empathy_chat_window_get_type ())
+#define EMPATHY_CHAT_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT_WINDOW, EmpathyChatWindow))
+#define EMPATHY_CHAT_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_CHAT_WINDOW, EmpathyChatWindowClass))
+#define EMPATHY_IS_CHAT_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT_WINDOW))
+#define EMPATHY_IS_CHAT_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT_WINDOW))
+#define EMPATHY_CHAT_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT_WINDOW, EmpathyChatWindowClass))
+
+typedef struct _EmpathyChatWindow EmpathyChatWindow;
+typedef struct _EmpathyChatWindowClass EmpathyChatWindowClass;
+typedef struct _EmpathyChatWindowPriv EmpathyChatWindowPriv;
+
+#include "empathy-chat.h"
+
+struct _EmpathyChatWindow {
+ GObject parent;
+};
+
+struct _EmpathyChatWindowClass {
+ GObjectClass parent_class;
+};
+
+GType empathy_chat_window_get_type (void);
+EmpathyChatWindow *empathy_chat_window_get_default (void);
+
+EmpathyChatWindow *empathy_chat_window_new (void);
+
+GtkWidget * empathy_chat_window_get_dialog (EmpathyChatWindow *window);
+
+void empathy_chat_window_add_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+void empathy_chat_window_remove_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+void empathy_chat_window_move_chat (EmpathyChatWindow *old_window,
+ EmpathyChatWindow *new_window,
+ EmpathyChat *chat);
+void empathy_chat_window_switch_to_chat (EmpathyChatWindow *window,
+ EmpathyChat *chat);
+gboolean empathy_chat_window_has_focus (EmpathyChatWindow *window);
+EmpathyChat * empathy_chat_window_find_chat (McAccount *account,
+ const gchar *id);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CHAT_WINDOW_H__ */
diff --git a/libempathy-gtk/gossip-chat.c b/libempathy-gtk/empathy-chat.c
index 1ad76b7f5..0000e5d5a 100644
--- a/libempathy-gtk/gossip-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -36,20 +36,20 @@
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-log-manager.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-conf.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-conf.h>
#include <libempathy/empathy-marshal.h>
-#include "gossip-chat.h"
-#include "gossip-chat-window.h"
-#include "gossip-geometry.h"
-#include "gossip-preferences.h"
-#include "gossip-spell.h"
-#include "gossip-spell-dialog.h"
-#include "gossip-ui-utils.h"
+#include "empathy-chat.h"
+#include "empathy-chat-window.h"
+#include "empathy-geometry.h"
+#include "empathy-preferences.h"
+#include "empathy-spell.h"
+#include "empathy-spell-dialog.h"
+#include "empathy-ui-utils.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHAT, GossipChatPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT, EmpathyChatPriv))
#define DEBUG_DOMAIN "Chat"
@@ -62,11 +62,11 @@
#define COMPOSING_STOP_TIMEOUT 5
-struct _GossipChatPriv {
+struct _EmpathyChatPriv {
EmpathyContactManager *manager;
EmpathyLogManager *log_manager;
EmpathyTpChat *tp_chat;
- GossipChatWindow *window;
+ EmpathyChatWindow *window;
GtkTooltips *tooltips;
guint composing_stop_timeout_id;
gboolean sensitive;
@@ -76,7 +76,7 @@ struct _GossipChatPriv {
GList *compositors;
guint scroll_idle_id;
gboolean first_tp_chat;
- GossipTime time_joined;
+ EmpathyTime time_joined;
/* Used to automatically shrink a window that has temporarily
* grown due to long input.
*/
@@ -87,63 +87,63 @@ struct _GossipChatPriv {
};
typedef struct {
- GossipChat *chat;
+ EmpathyChat *chat;
gchar *word;
GtkTextIter start;
GtkTextIter end;
-} GossipChatSpell;
+} EmpathyChatSpell;
-static void gossip_chat_class_init (GossipChatClass *klass);
-static void gossip_chat_init (GossipChat *chat);
+static void empathy_chat_class_init (EmpathyChatClass *klass);
+static void empathy_chat_init (EmpathyChat *chat);
static void chat_finalize (GObject *object);
static void chat_destroy_cb (EmpathyTpChat *tp_chat,
- GossipChat *chat);
-static void chat_send (GossipChat *chat,
+ EmpathyChat *chat);
+static void chat_send (EmpathyChat *chat,
const gchar *msg);
-static void chat_input_text_view_send (GossipChat *chat);
+static void chat_input_text_view_send (EmpathyChat *chat);
static void chat_message_received_cb (EmpathyTpChat *tp_chat,
- GossipMessage *message,
- GossipChat *chat);
-void chat_sent_message_add (GossipChat *chat,
+ EmpathyMessage *message,
+ EmpathyChat *chat);
+void chat_sent_message_add (EmpathyChat *chat,
const gchar *str);
-const gchar * chat_sent_message_get_next (GossipChat *chat);
-const gchar * chat_sent_message_get_last (GossipChat *chat);
+const gchar * chat_sent_message_get_next (EmpathyChat *chat);
+const gchar * chat_sent_message_get_last (EmpathyChat *chat);
static gboolean chat_input_key_press_event_cb (GtkWidget *widget,
GdkEventKey *event,
- GossipChat *chat);
+ EmpathyChat *chat);
static void chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
- GossipChat *chat);
+ EmpathyChat *chat);
static gboolean chat_text_view_focus_in_event_cb (GtkWidget *widget,
GdkEvent *event,
- GossipChat *chat);
+ EmpathyChat *chat);
static void chat_text_view_scroll_hide_cb (GtkWidget *widget,
- GossipChat *chat);
+ EmpathyChat *chat);
static void chat_text_view_size_allocate_cb (GtkWidget *widget,
GtkAllocation *allocation,
- GossipChat *chat);
+ EmpathyChat *chat);
static void chat_text_view_realize_cb (GtkWidget *widget,
- GossipChat *chat);
+ EmpathyChat *chat);
static void chat_text_populate_popup_cb (GtkTextView *view,
GtkMenu *menu,
- GossipChat *chat);
+ EmpathyChat *chat);
static void chat_text_check_word_spelling_cb (GtkMenuItem *menuitem,
- GossipChatSpell *chat_spell);
-static GossipChatSpell *chat_spell_new (GossipChat *chat,
+ EmpathyChatSpell *chat_spell);
+static EmpathyChatSpell *chat_spell_new (EmpathyChat *chat,
const gchar *word,
GtkTextIter start,
GtkTextIter end);
-static void chat_spell_free (GossipChatSpell *chat_spell);
-static void chat_composing_start (GossipChat *chat);
-static void chat_composing_stop (GossipChat *chat);
-static void chat_composing_remove_timeout (GossipChat *chat);
-static gboolean chat_composing_stop_timeout_cb (GossipChat *chat);
+static void chat_spell_free (EmpathyChatSpell *chat_spell);
+static void chat_composing_start (EmpathyChat *chat);
+static void chat_composing_stop (EmpathyChat *chat);
+static void chat_composing_remove_timeout (EmpathyChat *chat);
+static gboolean chat_composing_stop_timeout_cb (EmpathyChat *chat);
static void chat_state_changed_cb (EmpathyTpChat *tp_chat,
- GossipContact *contact,
+ EmpathyContact *contact,
TelepathyChannelChatState state,
- GossipChat *chat);
-static void chat_add_logs (GossipChat *chat);
-static gboolean chat_scroll_down_idle_func (GossipChat *chat);
+ EmpathyChat *chat);
+static void chat_add_logs (EmpathyChat *chat);
+static gboolean chat_scroll_down_idle_func (EmpathyChat *chat);
enum {
COMPOSING,
@@ -155,10 +155,10 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
-G_DEFINE_TYPE (GossipChat, gossip_chat, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EmpathyChat, empathy_chat, G_TYPE_OBJECT);
static void
-gossip_chat_class_init (GossipChatClass *klass)
+empathy_chat_class_init (EmpathyChatClass *klass)
{
GObjectClass *object_class;
@@ -184,7 +184,7 @@ gossip_chat_class_init (GossipChatClass *klass)
NULL, NULL,
empathy_marshal_VOID__OBJECT_BOOLEAN,
G_TYPE_NONE,
- 2, GOSSIP_TYPE_MESSAGE, G_TYPE_BOOLEAN);
+ 2, EMPATHY_TYPE_MESSAGE, G_TYPE_BOOLEAN);
signals[NAME_CHANGED] =
g_signal_new ("name-changed",
@@ -206,16 +206,16 @@ gossip_chat_class_init (GossipChatClass *klass)
G_TYPE_NONE,
0);
- g_type_class_add_private (object_class, sizeof (GossipChatPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyChatPriv));
}
static void
-gossip_chat_init (GossipChat *chat)
+empathy_chat_init (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GtkTextBuffer *buffer;
- chat->view = gossip_chat_view_new ();
+ chat->view = empathy_chat_view_new ();
chat->input_text_view = gtk_text_view_new ();
chat->is_first_char = TRUE;
@@ -281,13 +281,13 @@ gossip_chat_init (GossipChat *chat)
static void
chat_finalize (GObject *object)
{
- GossipChat *chat;
- GossipChatPriv *priv;
+ EmpathyChat *chat;
+ EmpathyChatPriv *priv;
- chat = GOSSIP_CHAT (object);
+ chat = EMPATHY_CHAT (object);
priv = GET_PRIV (chat);
- gossip_debug (DEBUG_DOMAIN, "Finalized: %p", object);
+ empathy_debug (DEBUG_DOMAIN, "Finalized: %p", object);
g_slist_foreach (priv->sent_messages, (GFunc) g_free, NULL);
g_slist_free (priv->sent_messages);
@@ -311,14 +311,14 @@ chat_finalize (GObject *object)
g_free (priv->id);
- G_OBJECT_CLASS (gossip_chat_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_chat_parent_class)->finalize (object);
}
static void
chat_destroy_cb (EmpathyTpChat *tp_chat,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -328,20 +328,20 @@ chat_destroy_cb (EmpathyTpChat *tp_chat,
}
priv->sensitive = FALSE;
- gossip_chat_view_append_event (chat->view, _("Disconnected"));
+ empathy_chat_view_append_event (chat->view, _("Disconnected"));
gtk_widget_set_sensitive (chat->input_text_view, FALSE);
- if (GOSSIP_CHAT_GET_CLASS (chat)->set_tp_chat) {
- GOSSIP_CHAT_GET_CLASS (chat)->set_tp_chat (chat, NULL);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->set_tp_chat) {
+ EMPATHY_CHAT_GET_CLASS (chat)->set_tp_chat (chat, NULL);
}
}
static void
-chat_send (GossipChat *chat,
+chat_send (EmpathyChat *chat,
const gchar *msg)
{
- GossipChatPriv *priv;
- GossipMessage *message;
+ EmpathyChatPriv *priv;
+ EmpathyMessage *message;
priv = GET_PRIV (chat);
@@ -352,14 +352,14 @@ chat_send (GossipChat *chat,
chat_sent_message_add (chat, msg);
if (g_str_has_prefix (msg, "/clear")) {
- gossip_chat_view_clear (chat->view);
+ empathy_chat_view_clear (chat->view);
return;
}
/* FIXME: add here something to let group/privrate chat handle
* some special messages */
- message = gossip_message_new (msg);
+ message = empathy_message_new (msg);
empathy_tp_chat_send (priv->tp_chat, message);
@@ -367,9 +367,9 @@ chat_send (GossipChat *chat,
}
static void
-chat_input_text_view_send (GossipChat *chat)
+chat_input_text_view_send (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *msg;
@@ -393,42 +393,42 @@ chat_input_text_view_send (GossipChat *chat)
static void
chat_message_received_cb (EmpathyTpChat *tp_chat,
- GossipMessage *message,
- GossipChat *chat)
+ EmpathyMessage *message,
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
- GossipContact *sender;
- GossipTime timestamp;
+ EmpathyChatPriv *priv;
+ EmpathyContact *sender;
+ EmpathyTime timestamp;
priv = GET_PRIV (chat);
- sender = gossip_message_get_sender (message);
- gossip_debug (DEBUG_DOMAIN, "Appending message ('%s')",
- gossip_contact_get_name (sender));
+ sender = empathy_message_get_sender (message);
+ empathy_debug (DEBUG_DOMAIN, "Appending message ('%s')",
+ empathy_contact_get_name (sender));
/* Log the message only if it's not backlog */
- timestamp = gossip_message_get_timestamp (message);
+ timestamp = empathy_message_get_timestamp (message);
if (timestamp >= priv->time_joined) {
empathy_log_manager_add_message (priv->log_manager,
- gossip_chat_get_id (chat),
- gossip_chat_is_group_chat (chat),
+ empathy_chat_get_id (chat),
+ empathy_chat_is_group_chat (chat),
message);
}
- gossip_chat_view_append_message (chat->view, message);
+ empathy_chat_view_append_message (chat->view, message);
- if (gossip_chat_should_play_sound (chat)) {
- // FIXME: gossip_sound_play (GOSSIP_SOUND_CHAT);
+ if (empathy_chat_should_play_sound (chat)) {
+ // FIXME: empathy_sound_play (EMPATHY_SOUND_CHAT);
}
g_signal_emit (chat, signals[NEW_MESSAGE], 0, message, FALSE);
}
void
-chat_sent_message_add (GossipChat *chat,
+chat_sent_message_add (EmpathyChat *chat,
const gchar *str)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GSList *list;
GSList *item;
@@ -463,15 +463,15 @@ chat_sent_message_add (GossipChat *chat,
}
const gchar *
-chat_sent_message_get_next (GossipChat *chat)
+chat_sent_message_get_next (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
gint max;
priv = GET_PRIV (chat);
if (!priv->sent_messages) {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"No sent messages, next message is NULL");
return NULL;
}
@@ -482,7 +482,7 @@ chat_sent_message_get_next (GossipChat *chat)
priv->sent_messages_index++;
}
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Returning next message index:%d",
priv->sent_messages_index);
@@ -490,16 +490,16 @@ chat_sent_message_get_next (GossipChat *chat)
}
const gchar *
-chat_sent_message_get_last (GossipChat *chat)
+chat_sent_message_get_last (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL);
priv = GET_PRIV (chat);
if (!priv->sent_messages) {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"No sent messages, last message is NULL");
return NULL;
}
@@ -508,7 +508,7 @@ chat_sent_message_get_last (GossipChat *chat)
priv->sent_messages_index--;
}
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Returning last message index:%d",
priv->sent_messages_index);
@@ -518,9 +518,9 @@ chat_sent_message_get_last (GossipChat *chat)
static gboolean
chat_input_key_press_event_cb (GtkWidget *widget,
GdkEventKey *event,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GtkAdjustment *adj;
gdouble val;
GtkWidget *text_view_sw;
@@ -605,7 +605,7 @@ chat_input_key_press_event_cb (GtkWidget *widget,
static gboolean
chat_text_view_focus_in_event_cb (GtkWidget *widget,
GdkEvent *event,
- GossipChat *chat)
+ EmpathyChat *chat)
{
gtk_widget_grab_focus (chat->input_text_view);
@@ -614,9 +614,9 @@ chat_text_view_focus_in_event_cb (GtkWidget *widget,
static void
chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GtkTextIter start, end;
gchar *str;
gboolean spell_checker = FALSE;
@@ -629,8 +629,8 @@ chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
chat_composing_start (chat);
}
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_ENABLED,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
&spell_checker);
if (chat->is_first_char) {
@@ -640,7 +640,7 @@ chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
GtkAllocation *allocation;
/* Save the window's size */
- dialog = gossip_chat_window_get_dialog (priv->window);
+ dialog = empathy_chat_window_get_dialog (priv->window);
gtk_window_get_size (GTK_WINDOW (dialog),
NULL, &window_height);
@@ -663,7 +663,7 @@ chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
return;
}
- if (!gossip_spell_supported ()) {
+ if (!empathy_spell_supported ()) {
return;
}
@@ -694,8 +694,8 @@ chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
str = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
/* spell check string */
- if (!gossip_chat_get_is_command (str)) {
- correct = gossip_spell_check (str);
+ if (!empathy_chat_get_is_command (str)) {
+ correct = empathy_spell_check (str);
} else {
correct = TRUE;
}
@@ -730,9 +730,9 @@ chat_change_size_in_idle_cb (ChangeSizeData *data)
static void
chat_text_view_scroll_hide_cb (GtkWidget *widget,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GtkWidget *sw;
priv = GET_PRIV (chat);
@@ -750,9 +750,9 @@ chat_text_view_scroll_hide_cb (GtkWidget *widget,
static void
chat_text_view_size_allocate_cb (GtkWidget *widget,
GtkAllocation *allocation,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
gint width;
GtkWidget *dialog;
ChangeSizeData *data;
@@ -794,7 +794,7 @@ chat_text_view_size_allocate_cb (GtkWidget *widget,
view_allocation = &GTK_WIDGET (chat->view)->allocation;
- dialog = gossip_chat_window_get_dialog (priv->window);
+ dialog = empathy_chat_window_get_dialog (priv->window);
gtk_window_get_size (GTK_WINDOW (dialog), NULL, &current_height);
new_height = view_allocation->height + priv->padding_height + allocation->height - diff;
@@ -824,15 +824,15 @@ chat_text_view_size_allocate_cb (GtkWidget *widget,
static void
chat_text_view_realize_cb (GtkWidget *widget,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- gossip_debug (DEBUG_DOMAIN, "Setting focus to the input text view");
+ empathy_debug (DEBUG_DOMAIN, "Setting focus to the input text view");
gtk_widget_grab_focus (widget);
}
static void
chat_insert_smiley_activate_cb (GtkWidget *menuitem,
- GossipChat *chat)
+ EmpathyChat *chat)
{
GtkTextBuffer *buffer;
GtkTextIter iter;
@@ -852,9 +852,9 @@ chat_insert_smiley_activate_cb (GtkWidget *menuitem,
static void
chat_text_populate_popup_cb (GtkTextView *view,
GtkMenu *menu,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag;
@@ -862,7 +862,7 @@ chat_text_populate_popup_cb (GtkTextView *view,
GtkTextIter iter, start, end;
GtkWidget *item;
gchar *str = NULL;
- GossipChatSpell *chat_spell;
+ EmpathyChatSpell *chat_spell;
GtkWidget *smiley_menu;
priv = GET_PRIV (chat);
@@ -876,7 +876,7 @@ chat_text_populate_popup_cb (GtkTextView *view,
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
- smiley_menu = gossip_chat_view_get_smiley_menu (
+ smiley_menu = empathy_chat_view_get_smiley_menu (
G_CALLBACK (chat_insert_smiley_activate_cb),
chat,
priv->tooltips);
@@ -931,23 +931,23 @@ chat_text_populate_popup_cb (GtkTextView *view,
static void
chat_text_check_word_spelling_cb (GtkMenuItem *menuitem,
- GossipChatSpell *chat_spell)
+ EmpathyChatSpell *chat_spell)
{
- gossip_spell_dialog_show (chat_spell->chat,
+ empathy_spell_dialog_show (chat_spell->chat,
chat_spell->start,
chat_spell->end,
chat_spell->word);
}
-static GossipChatSpell *
-chat_spell_new (GossipChat *chat,
+static EmpathyChatSpell *
+chat_spell_new (EmpathyChat *chat,
const gchar *word,
GtkTextIter start,
GtkTextIter end)
{
- GossipChatSpell *chat_spell;
+ EmpathyChatSpell *chat_spell;
- chat_spell = g_new0 (GossipChatSpell, 1);
+ chat_spell = g_new0 (EmpathyChatSpell, 1);
chat_spell->chat = g_object_ref (chat);
chat_spell->word = g_strdup (word);
@@ -958,7 +958,7 @@ chat_spell_new (GossipChat *chat,
}
static void
-chat_spell_free (GossipChatSpell *chat_spell)
+chat_spell_free (EmpathyChatSpell *chat_spell)
{
g_object_unref (chat_spell->chat);
g_free (chat_spell->word);
@@ -966,9 +966,9 @@ chat_spell_free (GossipChatSpell *chat_spell)
}
static void
-chat_composing_start (GossipChat *chat)
+chat_composing_start (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -987,9 +987,9 @@ chat_composing_start (GossipChat *chat)
}
static void
-chat_composing_stop (GossipChat *chat)
+chat_composing_stop (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -999,9 +999,9 @@ chat_composing_stop (GossipChat *chat)
}
static void
-chat_composing_remove_timeout (GossipChat *chat)
+chat_composing_remove_timeout (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -1012,9 +1012,9 @@ chat_composing_remove_timeout (GossipChat *chat)
}
static gboolean
-chat_composing_stop_timeout_cb (GossipChat *chat)
+chat_composing_stop_timeout_cb (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -1027,17 +1027,17 @@ chat_composing_stop_timeout_cb (GossipChat *chat)
static void
chat_state_changed_cb (EmpathyTpChat *tp_chat,
- GossipContact *contact,
+ EmpathyContact *contact,
TelepathyChannelChatState state,
- GossipChat *chat)
+ EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GList *l;
gboolean was_composing;
priv = GET_PRIV (chat);
- if (gossip_contact_is_user (contact)) {
+ if (empathy_contact_is_user (contact)) {
/* We don't care about our own chat state */
return;
}
@@ -1046,7 +1046,7 @@ chat_state_changed_cb (EmpathyTpChat *tp_chat,
/* Find the contact in the list. After that l is the list elem or NULL */
for (l = priv->compositors; l; l = l->next) {
- if (gossip_contact_equal (contact, l->data)) {
+ if (empathy_contact_equal (contact, l->data)) {
break;
}
}
@@ -1074,7 +1074,7 @@ chat_state_changed_cb (EmpathyTpChat *tp_chat,
g_assert_not_reached ();
}
- gossip_debug (DEBUG_DOMAIN, "Was composing: %s now composing: %s",
+ empathy_debug (DEBUG_DOMAIN, "Was composing: %s now composing: %s",
was_composing ? "yes" : "no",
priv->compositors ? "yes" : "no");
@@ -1087,9 +1087,9 @@ chat_state_changed_cb (EmpathyTpChat *tp_chat,
}
static void
-chat_add_logs (GossipChat *chat)
+chat_add_logs (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
GList *messages, *l;
guint num_messages;
guint i;
@@ -1097,22 +1097,22 @@ chat_add_logs (GossipChat *chat)
priv = GET_PRIV (chat);
/* Do not display backlog for chatrooms */
- if (gossip_chat_is_group_chat (chat)) {
+ if (empathy_chat_is_group_chat (chat)) {
return;
}
/* Turn off scrolling temporarily */
- gossip_chat_view_scroll (chat->view, FALSE);
+ empathy_chat_view_scroll (chat->view, FALSE);
/* Add messages from last conversation */
messages = empathy_log_manager_get_last_messages (priv->log_manager,
chat->account,
- gossip_chat_get_id (chat),
- gossip_chat_is_group_chat (chat));
+ empathy_chat_get_id (chat),
+ empathy_chat_is_group_chat (chat));
num_messages = g_list_length (messages);
for (l = messages, i = 0; l; l = l->next, i++) {
- GossipMessage *message;
+ EmpathyMessage *message;
message = l->data;
@@ -1123,13 +1123,13 @@ chat_add_logs (GossipChat *chat)
}
- gossip_chat_view_append_message (chat->view, message);
+ empathy_chat_view_append_message (chat->view, message);
g_object_unref (message);
}
g_list_free (messages);
/* Turn back on scrolling */
- gossip_chat_view_scroll (chat->view, TRUE);
+ empathy_chat_view_scroll (chat->view, TRUE);
/* Scroll to the most recent messages, we reference the chat
* for the duration of the scroll func.
@@ -1140,13 +1140,13 @@ chat_add_logs (GossipChat *chat)
/* Scroll down after the back-log has been received. */
static gboolean
-chat_scroll_down_idle_func (GossipChat *chat)
+chat_scroll_down_idle_func (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
- gossip_chat_scroll_down (chat);
+ empathy_chat_scroll_down (chat);
g_object_unref (chat);
priv->scroll_idle_id = 0;
@@ -1155,7 +1155,7 @@ chat_scroll_down_idle_func (GossipChat *chat)
}
gboolean
-gossip_chat_get_is_command (const gchar *str)
+empathy_chat_get_is_command (const gchar *str)
{
g_return_val_if_fail (str != NULL, FALSE);
@@ -1177,7 +1177,7 @@ gossip_chat_get_is_command (const gchar *str)
}
void
-gossip_chat_correct_word (GossipChat *chat,
+empathy_chat_correct_word (EmpathyChat *chat,
GtkTextIter start,
GtkTextIter end,
const gchar *new_word)
@@ -1196,71 +1196,71 @@ gossip_chat_correct_word (GossipChat *chat,
}
const gchar *
-gossip_chat_get_name (GossipChat *chat)
+empathy_chat_get_name (EmpathyChat *chat)
{
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL);
- if (GOSSIP_CHAT_GET_CLASS (chat)->get_name) {
- return GOSSIP_CHAT_GET_CLASS (chat)->get_name (chat);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->get_name) {
+ return EMPATHY_CHAT_GET_CLASS (chat)->get_name (chat);
}
return NULL;
}
gchar *
-gossip_chat_get_tooltip (GossipChat *chat)
+empathy_chat_get_tooltip (EmpathyChat *chat)
{
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL);
- if (GOSSIP_CHAT_GET_CLASS (chat)->get_tooltip) {
- return GOSSIP_CHAT_GET_CLASS (chat)->get_tooltip (chat);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->get_tooltip) {
+ return EMPATHY_CHAT_GET_CLASS (chat)->get_tooltip (chat);
}
return NULL;
}
const gchar *
-gossip_chat_get_status_icon_name (GossipChat *chat)
+empathy_chat_get_status_icon_name (EmpathyChat *chat)
{
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL);
- if (GOSSIP_CHAT_GET_CLASS (chat)->get_status_icon_name) {
- return GOSSIP_CHAT_GET_CLASS (chat)->get_status_icon_name (chat);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->get_status_icon_name) {
+ return EMPATHY_CHAT_GET_CLASS (chat)->get_status_icon_name (chat);
}
return NULL;
}
GtkWidget *
-gossip_chat_get_widget (GossipChat *chat)
+empathy_chat_get_widget (EmpathyChat *chat)
{
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL);
- if (GOSSIP_CHAT_GET_CLASS (chat)->get_widget) {
- return GOSSIP_CHAT_GET_CLASS (chat)->get_widget (chat);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->get_widget) {
+ return EMPATHY_CHAT_GET_CLASS (chat)->get_widget (chat);
}
return NULL;
}
gboolean
-gossip_chat_is_group_chat (GossipChat *chat)
+empathy_chat_is_group_chat (EmpathyChat *chat)
{
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), FALSE);
- if (GOSSIP_CHAT_GET_CLASS (chat)->is_group_chat) {
- return GOSSIP_CHAT_GET_CLASS (chat)->is_group_chat (chat);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->is_group_chat) {
+ return EMPATHY_CHAT_GET_CLASS (chat)->is_group_chat (chat);
}
return FALSE;
}
gboolean
-gossip_chat_is_connected (GossipChat *chat)
+empathy_chat_is_connected (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), FALSE);
priv = GET_PRIV (chat);
@@ -1268,32 +1268,32 @@ gossip_chat_is_connected (GossipChat *chat)
}
void
-gossip_chat_save_geometry (GossipChat *chat,
+empathy_chat_save_geometry (EmpathyChat *chat,
gint x,
gint y,
gint w,
gint h)
{
- gossip_geometry_save (gossip_chat_get_id (chat), x, y, w, h);
+ empathy_geometry_save (empathy_chat_get_id (chat), x, y, w, h);
}
void
-gossip_chat_load_geometry (GossipChat *chat,
+empathy_chat_load_geometry (EmpathyChat *chat,
gint *x,
gint *y,
gint *w,
gint *h)
{
- gossip_geometry_load (gossip_chat_get_id (chat), x, y, w, h);
+ empathy_geometry_load (empathy_chat_get_id (chat), x, y, w, h);
}
void
-gossip_chat_set_tp_chat (GossipChat *chat,
+empathy_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
g_return_if_fail (EMPATHY_IS_TP_CHAT (tp_chat));
priv = GET_PRIV (chat);
@@ -1315,7 +1315,7 @@ gossip_chat_set_tp_chat (GossipChat *chat,
g_free (priv->id);
priv->tp_chat = g_object_ref (tp_chat);
priv->id = g_strdup (empathy_tp_chat_get_id (tp_chat));
- priv->time_joined = gossip_time_get_current ();
+ priv->time_joined = empathy_time_get_current ();
if (priv->first_tp_chat) {
chat_add_logs (chat);
@@ -1336,20 +1336,20 @@ gossip_chat_set_tp_chat (GossipChat *chat,
if (!priv->sensitive) {
gtk_widget_set_sensitive (chat->input_text_view, TRUE);
- gossip_chat_view_append_event (chat->view, _("Connected"));
+ empathy_chat_view_append_event (chat->view, _("Connected"));
priv->sensitive = TRUE;
}
- if (GOSSIP_CHAT_GET_CLASS (chat)->set_tp_chat) {
- GOSSIP_CHAT_GET_CLASS (chat)->set_tp_chat (chat, tp_chat);
+ if (EMPATHY_CHAT_GET_CLASS (chat)->set_tp_chat) {
+ EMPATHY_CHAT_GET_CLASS (chat)->set_tp_chat (chat, tp_chat);
}
}
const gchar *
-gossip_chat_get_id (GossipChat *chat)
+empathy_chat_get_id (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -1357,27 +1357,27 @@ gossip_chat_get_id (GossipChat *chat)
}
void
-gossip_chat_clear (GossipChat *chat)
+empathy_chat_clear (EmpathyChat *chat)
{
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
- gossip_chat_view_clear (chat->view);
+ empathy_chat_view_clear (chat->view);
}
void
-gossip_chat_set_window (GossipChat *chat,
- GossipChatWindow *window)
+empathy_chat_set_window (EmpathyChat *chat,
+ EmpathyChatWindow *window)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
priv->window = window;
}
-GossipChatWindow *
-gossip_chat_get_window (GossipChat *chat)
+EmpathyChatWindow *
+empathy_chat_get_window (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
priv = GET_PRIV (chat);
@@ -1385,19 +1385,19 @@ gossip_chat_get_window (GossipChat *chat)
}
void
-gossip_chat_scroll_down (GossipChat *chat)
+empathy_chat_scroll_down (EmpathyChat *chat)
{
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
- gossip_chat_view_scroll_down (chat->view);
+ empathy_chat_view_scroll_down (chat->view);
}
void
-gossip_chat_cut (GossipChat *chat)
+empathy_chat_cut (EmpathyChat *chat)
{
GtkTextBuffer *buffer;
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) {
@@ -1410,14 +1410,14 @@ gossip_chat_cut (GossipChat *chat)
}
void
-gossip_chat_copy (GossipChat *chat)
+empathy_chat_copy (EmpathyChat *chat)
{
GtkTextBuffer *buffer;
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
- if (gossip_chat_view_get_selection_bounds (chat->view, NULL, NULL)) {
- gossip_chat_view_copy_clipboard (chat->view);
+ if (empathy_chat_view_get_selection_bounds (chat->view, NULL, NULL)) {
+ empathy_chat_view_copy_clipboard (chat->view);
return;
}
@@ -1432,12 +1432,12 @@ gossip_chat_copy (GossipChat *chat)
}
void
-gossip_chat_paste (GossipChat *chat)
+empathy_chat_paste (EmpathyChat *chat)
{
GtkTextBuffer *buffer;
GtkClipboard *clipboard;
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (chat->input_text_view));
clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
@@ -1446,77 +1446,77 @@ gossip_chat_paste (GossipChat *chat)
}
void
-gossip_chat_present (GossipChat *chat)
+empathy_chat_present (EmpathyChat *chat)
{
- GossipChatPriv *priv;
+ EmpathyChatPriv *priv;
- g_return_if_fail (GOSSIP_IS_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_CHAT (chat));
priv = GET_PRIV (chat);
if (priv->window == NULL) {
- GossipChatWindow *window;
+ EmpathyChatWindow *window;
- window = gossip_chat_window_get_default ();
+ window = empathy_chat_window_get_default ();
if (!window) {
- window = gossip_chat_window_new ();
+ window = empathy_chat_window_new ();
}
- gossip_chat_window_add_chat (window, chat);
+ empathy_chat_window_add_chat (window, chat);
}
- gossip_chat_window_switch_to_chat (priv->window, chat);
- gossip_window_present (
- GTK_WINDOW (gossip_chat_window_get_dialog (priv->window)),
+ empathy_chat_window_switch_to_chat (priv->window, chat);
+ empathy_window_present (
+ GTK_WINDOW (empathy_chat_window_get_dialog (priv->window)),
TRUE);
gtk_widget_grab_focus (chat->input_text_view);
}
gboolean
-gossip_chat_should_play_sound (GossipChat *chat)
+empathy_chat_should_play_sound (EmpathyChat *chat)
{
- GossipChatWindow *window;
+ EmpathyChatWindow *window;
gboolean play = TRUE;
- g_return_val_if_fail (GOSSIP_IS_CHAT (chat), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CHAT (chat), FALSE);
- window = gossip_chat_get_window (chat);
+ window = empathy_chat_get_window (chat);
if (!window) {
return TRUE;
}
- play = !gossip_chat_window_has_focus (window);
+ play = !empathy_chat_window_has_focus (window);
return play;
}
gboolean
-gossip_chat_should_highlight_nick (GossipMessage *message)
+empathy_chat_should_highlight_nick (EmpathyMessage *message)
{
- GossipContact *contact;
+ EmpathyContact *contact;
const gchar *msg, *to;
gchar *cf_msg, *cf_to;
gchar *ch;
gboolean ret_val;
- g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_MESSAGE (message), FALSE);
- gossip_debug (DEBUG_DOMAIN, "Highlighting nickname");
+ empathy_debug (DEBUG_DOMAIN, "Highlighting nickname");
ret_val = FALSE;
- msg = gossip_message_get_body (message);
+ msg = empathy_message_get_body (message);
if (!msg) {
return FALSE;
}
- contact = gossip_message_get_receiver (message);
- if (!contact || !gossip_contact_is_user (contact)) {
+ contact = empathy_message_get_receiver (message);
+ if (!contact || !empathy_contact_is_user (contact)) {
return FALSE;
}
- to = gossip_contact_get_name (contact);
+ to = empathy_contact_get_name (contact);
if (!to) {
return FALSE;
}
diff --git a/libempathy-gtk/gossip-chat.glade b/libempathy-gtk/empathy-chat.glade
index d07bf77e6..d07bf77e6 100644
--- a/libempathy-gtk/gossip-chat.glade
+++ b/libempathy-gtk/empathy-chat.glade
diff --git a/libempathy-gtk/empathy-chat.h b/libempathy-gtk/empathy-chat.h
new file mode 100644
index 000000000..8eedf64ef
--- /dev/null
+++ b/libempathy-gtk/empathy-chat.h
@@ -0,0 +1,123 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2002-2007 Imendio AB
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
+ * Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_CHAT_H__
+#define __EMPATHY_CHAT_H__
+
+#include <glib-object.h>
+
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-message.h>
+#include <libempathy/empathy-tp-chat.h>
+
+#include "empathy-chat-view.h"
+#include "empathy-spell.h"
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CHAT (empathy_chat_get_type ())
+#define EMPATHY_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CHAT, EmpathyChat))
+#define EMPATHY_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_CHAT, EmpathyChatClass))
+#define EMPATHY_IS_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CHAT))
+#define EMPATHY_IS_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CHAT))
+#define EMPATHY_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CHAT, EmpathyChatClass))
+
+typedef struct _EmpathyChat EmpathyChat;
+typedef struct _EmpathyChatClass EmpathyChatClass;
+typedef struct _EmpathyChatPriv EmpathyChatPriv;
+
+#include "empathy-chat-window.h"
+
+struct _EmpathyChat {
+ GObject parent;
+
+ /* Protected */
+ EmpathyChatView *view;
+ EmpathyTpChat *tp_chat;
+ GtkWidget *input_text_view;
+ gboolean is_first_char;
+ McAccount *account;
+};
+
+struct _EmpathyChatClass {
+ GObjectClass parent;
+
+ /* VTable */
+ const gchar * (*get_name) (EmpathyChat *chat);
+ gchar * (*get_tooltip) (EmpathyChat *chat);
+ const gchar * (*get_status_icon_name)(EmpathyChat *chat);
+ GtkWidget * (*get_widget) (EmpathyChat *chat);
+ gboolean (*is_group_chat) (EmpathyChat *chat);
+ void (*set_tp_chat) (EmpathyChat *chat,
+ EmpathyTpChat *tp_chat);
+};
+
+GType empathy_chat_get_type (void);
+
+EmpathyChatView * empathy_chat_get_view (EmpathyChat *chat);
+EmpathyChatWindow *empathy_chat_get_window (EmpathyChat *chat);
+void empathy_chat_set_window (EmpathyChat *chat,
+ EmpathyChatWindow *window);
+void empathy_chat_present (EmpathyChat *chat);
+void empathy_chat_clear (EmpathyChat *chat);
+void empathy_chat_scroll_down (EmpathyChat *chat);
+void empathy_chat_cut (EmpathyChat *chat);
+void empathy_chat_copy (EmpathyChat *chat);
+void empathy_chat_paste (EmpathyChat *chat);
+const gchar * empathy_chat_get_name (EmpathyChat *chat);
+gchar * empathy_chat_get_tooltip (EmpathyChat *chat);
+const gchar * empathy_chat_get_status_icon_name (EmpathyChat *chat);
+GtkWidget * empathy_chat_get_widget (EmpathyChat *chat);
+gboolean empathy_chat_is_group_chat (EmpathyChat *chat);
+gboolean empathy_chat_is_connected (EmpathyChat *chat);
+
+void empathy_chat_save_geometry (EmpathyChat *chat,
+ gint x,
+ gint y,
+ gint w,
+ gint h);
+void empathy_chat_load_geometry (EmpathyChat *chat,
+ gint *x,
+ gint *y,
+ gint *w,
+ gint *h);
+void empathy_chat_set_tp_chat (EmpathyChat *chat,
+ EmpathyTpChat *tp_chat);
+const gchar * empathy_chat_get_id (EmpathyChat *chat);
+
+/* For spell checker dialog to correct the misspelled word. */
+gboolean empathy_chat_get_is_command (const gchar *str);
+void empathy_chat_correct_word (EmpathyChat *chat,
+ GtkTextIter start,
+ GtkTextIter end,
+ const gchar *new_word);
+gboolean empathy_chat_should_play_sound (EmpathyChat *chat);
+gboolean empathy_chat_should_highlight_nick (EmpathyMessage *message);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CHAT_H__ */
diff --git a/libempathy-gtk/gossip-chatrooms-window.c b/libempathy-gtk/empathy-chatrooms-window.c
index 4d4333e8d..c049e366f 100644
--- a/libempathy-gtk/gossip-chatrooms-window.c
+++ b/libempathy-gtk/empathy-chatrooms-window.c
@@ -33,17 +33,17 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <libempathy/gossip-chatroom-manager.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-chatroom-manager.h>
+#include <libempathy/empathy-utils.h>
-#include "gossip-account-chooser.h"
-#include "gossip-chatrooms-window.h"
-//#include "gossip-edit-chatroom-dialog.h"
-#include "gossip-new-chatroom-dialog.h"
-#include "gossip-ui-utils.h"
+#include "empathy-account-chooser.h"
+#include "empathy-chatrooms-window.h"
+//#include "empathy-edit-chatroom-dialog.h"
+#include "empathy-new-chatroom-dialog.h"
+#include "empathy-ui-utils.h"
typedef struct {
- GossipChatroomManager *manager;
+ EmpathyChatroomManager *manager;
GtkWidget *window;
GtkWidget *hbox_account;
@@ -55,44 +55,44 @@ typedef struct {
GtkWidget *button_close;
gint room_column;
-} GossipChatroomsWindow;
+} EmpathyChatroomsWindow;
static void chatrooms_window_destroy_cb (GtkWidget *widget,
- GossipChatroomsWindow *window);
-static void chatrooms_window_model_setup (GossipChatroomsWindow *window);
-static void chatrooms_window_model_add_columns (GossipChatroomsWindow *window);
-static void chatrooms_window_model_refresh_data (GossipChatroomsWindow *window,
+ EmpathyChatroomsWindow *window);
+static void chatrooms_window_model_setup (EmpathyChatroomsWindow *window);
+static void chatrooms_window_model_add_columns (EmpathyChatroomsWindow *window);
+static void chatrooms_window_model_refresh_data (EmpathyChatroomsWindow *window,
gboolean first_time);
-static void chatrooms_window_model_add (GossipChatroomsWindow *window,
- GossipChatroom *chatroom,
+static void chatrooms_window_model_add (EmpathyChatroomsWindow *window,
+ EmpathyChatroom *chatroom,
gboolean set_active);
static void chatrooms_window_model_cell_auto_connect_toggled (GtkCellRendererToggle *cell,
gchar *path_string,
- GossipChatroomsWindow *window);
-static GossipChatroom * chatrooms_window_model_get_selected (GossipChatroomsWindow *window);
-static void chatrooms_window_model_action_selected (GossipChatroomsWindow *window);
+ EmpathyChatroomsWindow *window);
+static EmpathyChatroom * chatrooms_window_model_get_selected (EmpathyChatroomsWindow *window);
+static void chatrooms_window_model_action_selected (EmpathyChatroomsWindow *window);
static void chatrooms_window_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipChatroomsWindow *window);
+ EmpathyChatroomsWindow *window);
static void chatrooms_window_button_remove_clicked_cb (GtkWidget *widget,
- GossipChatroomsWindow *window);
+ EmpathyChatroomsWindow *window);
static void chatrooms_window_button_edit_clicked_cb (GtkWidget *widget,
- GossipChatroomsWindow *window);
+ EmpathyChatroomsWindow *window);
static void chatrooms_window_button_close_clicked_cb (GtkWidget *widget,
- GossipChatroomsWindow *window);
-static void chatrooms_window_chatroom_added_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
- GossipChatroomsWindow *window);
-static void chatrooms_window_chatroom_removed_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
- GossipChatroomsWindow *window);
+ EmpathyChatroomsWindow *window);
+static void chatrooms_window_chatroom_added_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
+ EmpathyChatroomsWindow *window);
+static void chatrooms_window_chatroom_removed_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
+ EmpathyChatroomsWindow *window);
static gboolean chatrooms_window_remove_chatroom_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipChatroom *chatroom);
+ EmpathyChatroom *chatroom);
static void chatrooms_window_account_changed_cb (GtkWidget *combo_box,
- GossipChatroomsWindow *window);
+ EmpathyChatroomsWindow *window);
enum {
COL_IMAGE,
@@ -104,9 +104,9 @@ enum {
};
void
-gossip_chatrooms_window_show (GtkWindow *parent)
+empathy_chatrooms_window_show (GtkWindow *parent)
{
- static GossipChatroomsWindow *window = NULL;
+ static EmpathyChatroomsWindow *window = NULL;
GladeXML *glade;
if (window) {
@@ -114,9 +114,9 @@ gossip_chatrooms_window_show (GtkWindow *parent)
return;
}
- window = g_new0 (GossipChatroomsWindow, 1);
+ window = g_new0 (EmpathyChatroomsWindow, 1);
- glade = gossip_glade_get_file ("gossip-chatrooms-window.glade",
+ glade = empathy_glade_get_file ("empathy-chatrooms-window.glade",
"chatrooms_window",
NULL,
"chatrooms_window", &window->window,
@@ -128,7 +128,7 @@ gossip_chatrooms_window_show (GtkWindow *parent)
"button_close", &window->button_close,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
window,
"chatrooms_window", "destroy", chatrooms_window_destroy_cb,
"button_remove", "clicked", chatrooms_window_button_remove_clicked_cb,
@@ -141,7 +141,7 @@ gossip_chatrooms_window_show (GtkWindow *parent)
g_object_add_weak_pointer (G_OBJECT (window->window), (gpointer) &window);
/* Get the session and chat room manager */
- window->manager = gossip_chatroom_manager_new ();
+ window->manager = empathy_chatroom_manager_new ();
g_signal_connect (window->manager, "chatroom-added",
G_CALLBACK (chatrooms_window_chatroom_added_cb),
@@ -151,8 +151,8 @@ gossip_chatrooms_window_show (GtkWindow *parent)
window);
/* Account chooser for chat rooms */
- window->account_chooser = gossip_account_chooser_new ();
- gossip_account_chooser_set_account (GOSSIP_ACCOUNT_CHOOSER (window->account_chooser), NULL);
+ window->account_chooser = empathy_account_chooser_new ();
+ empathy_account_chooser_set_account (EMPATHY_ACCOUNT_CHOOSER (window->account_chooser), NULL);
g_object_set (window->account_chooser,
"can-select-all", TRUE,
"has-all-option", TRUE,
@@ -185,14 +185,14 @@ gossip_chatrooms_window_show (GtkWindow *parent)
static void
chatrooms_window_destroy_cb (GtkWidget *widget,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
g_object_unref (window->manager);
g_free (window);
}
static void
-chatrooms_window_model_setup (GossipChatroomsWindow *window)
+chatrooms_window_model_setup (EmpathyChatroomsWindow *window)
{
GtkTreeView *view;
GtkListStore *store;
@@ -211,7 +211,7 @@ chatrooms_window_model_setup (GossipChatroomsWindow *window)
G_TYPE_STRING, /* Name */
G_TYPE_STRING, /* Room */
G_TYPE_BOOLEAN, /* Auto start */
- GOSSIP_TYPE_CHATROOM); /* Chatroom */
+ EMPATHY_TYPE_CHATROOM); /* Chatroom */
gtk_tree_view_set_model (view, GTK_TREE_MODEL (store));
@@ -230,7 +230,7 @@ chatrooms_window_model_setup (GossipChatroomsWindow *window)
}
static void
-chatrooms_window_model_add_columns (GossipChatroomsWindow *window)
+chatrooms_window_model_add_columns (EmpathyChatroomsWindow *window)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -291,7 +291,7 @@ chatrooms_window_model_add_columns (GossipChatroomsWindow *window)
}
static void
-chatrooms_window_model_refresh_data (GossipChatroomsWindow *window,
+chatrooms_window_model_refresh_data (EmpathyChatroomsWindow *window,
gboolean first_time)
{
GtkTreeView *view;
@@ -300,7 +300,7 @@ chatrooms_window_model_refresh_data (GossipChatroomsWindow *window,
GtkListStore *store;
GtkTreeIter iter;
GtkTreeViewColumn *column;
- GossipAccountChooser *account_chooser;
+ EmpathyAccountChooser *account_chooser;
McAccount *account;
GList *chatrooms, *l;
@@ -310,10 +310,10 @@ chatrooms_window_model_refresh_data (GossipChatroomsWindow *window,
store = GTK_LIST_STORE (model);
/* Look up chatrooms */
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (window->account_chooser);
- account = gossip_account_chooser_get_account (account_chooser);
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser);
+ account = empathy_account_chooser_get_account (account_chooser);
- chatrooms = gossip_chatroom_manager_get_chatrooms (window->manager, account);
+ chatrooms = empathy_chatroom_manager_get_chatrooms (window->manager, account);
/* Sort out columns, we only show the server column for
* selected protocol types, such as Jabber.
@@ -346,8 +346,8 @@ chatrooms_window_model_refresh_data (GossipChatroomsWindow *window,
}
static void
-chatrooms_window_model_add (GossipChatroomsWindow *window,
- GossipChatroom *chatroom,
+chatrooms_window_model_add (EmpathyChatroomsWindow *window,
+ EmpathyChatroom *chatroom,
gboolean set_active)
{
GtkTreeView *view;
@@ -363,9 +363,9 @@ chatrooms_window_model_add (GossipChatroomsWindow *window,
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- COL_NAME, gossip_chatroom_get_name (chatroom),
- COL_ROOM, gossip_chatroom_get_room (chatroom),
- COL_AUTO_CONNECT, gossip_chatroom_get_auto_connect (chatroom),
+ COL_NAME, empathy_chatroom_get_name (chatroom),
+ COL_ROOM, empathy_chatroom_get_room (chatroom),
+ COL_AUTO_CONNECT, empathy_chatroom_get_auto_connect (chatroom),
COL_POINTER, chatroom,
-1);
@@ -377,9 +377,9 @@ chatrooms_window_model_add (GossipChatroomsWindow *window,
static void
chatrooms_window_model_cell_auto_connect_toggled (GtkCellRendererToggle *cell,
gchar *path_string,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
- GossipChatroom *chatroom;
+ EmpathyChatroom *chatroom;
gboolean enabled;
GtkTreeView *view;
GtkTreeModel *model;
@@ -401,22 +401,22 @@ chatrooms_window_model_cell_auto_connect_toggled (GtkCellRendererToggle *cell,
enabled = !enabled;
- gossip_chatroom_set_auto_connect (chatroom, enabled);
- gossip_chatroom_manager_store (window->manager);
+ empathy_chatroom_set_auto_connect (chatroom, enabled);
+ empathy_chatroom_manager_store (window->manager);
gtk_list_store_set (store, &iter, COL_AUTO_CONNECT, enabled, -1);
gtk_tree_path_free (path);
g_object_unref (chatroom);
}
-static GossipChatroom *
-chatrooms_window_model_get_selected (GossipChatroomsWindow *window)
+static EmpathyChatroom *
+chatrooms_window_model_get_selected (EmpathyChatroomsWindow *window)
{
GtkTreeView *view;
GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreeIter iter;
- GossipChatroom *chatroom = NULL;
+ EmpathyChatroom *chatroom = NULL;
view = GTK_TREE_VIEW (window->treeview);
selection = gtk_tree_view_get_selection (view);
@@ -429,9 +429,9 @@ chatrooms_window_model_get_selected (GossipChatroomsWindow *window)
}
static void
-chatrooms_window_model_action_selected (GossipChatroomsWindow *window)
+chatrooms_window_model_action_selected (EmpathyChatroomsWindow *window)
{
- GossipChatroom *chatroom;
+ EmpathyChatroom *chatroom;
GtkTreeView *view;
GtkTreeModel *model;
@@ -443,7 +443,7 @@ chatrooms_window_model_action_selected (GossipChatroomsWindow *window)
return;
}
- //gossip_edit_chatroom_dialog_show (GTK_WINDOW (window->window), chatroom);
+ //empathy_edit_chatroom_dialog_show (GTK_WINDOW (window->window), chatroom);
g_object_unref (chatroom);
}
@@ -452,7 +452,7 @@ static void
chatrooms_window_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
if (GTK_WIDGET_IS_SENSITIVE (window->button_edit)) {
chatrooms_window_model_action_selected (window);
@@ -461,9 +461,9 @@ chatrooms_window_row_activated_cb (GtkTreeView *tree_view,
static void
chatrooms_window_button_remove_clicked_cb (GtkWidget *widget,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
- GossipChatroom *chatroom;
+ EmpathyChatroom *chatroom;
GtkTreeView *view;
GtkTreeModel *model;
GtkTreeSelection *selection;
@@ -481,49 +481,49 @@ chatrooms_window_button_remove_clicked_cb (GtkWidget *widget,
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
/* Remove from config */
- gossip_chatroom_manager_remove (window->manager, chatroom);
+ empathy_chatroom_manager_remove (window->manager, chatroom);
g_object_unref (chatroom);
}
static void
chatrooms_window_button_edit_clicked_cb (GtkWidget *widget,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
- GossipChatroom *chatroom;
+ EmpathyChatroom *chatroom;
chatroom = chatrooms_window_model_get_selected (window);
if (!chatroom) {
return;
}
- //gossip_edit_chatroom_dialog_show (GTK_WINDOW (window->window), chatroom);
+ //empathy_edit_chatroom_dialog_show (GTK_WINDOW (window->window), chatroom);
g_object_unref (chatroom);
}
static void
chatrooms_window_button_close_clicked_cb (GtkWidget *widget,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
gtk_widget_destroy (window->window);
}
static void
-chatrooms_window_chatroom_added_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
- GossipChatroomsWindow *window)
+chatrooms_window_chatroom_added_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
+ EmpathyChatroomsWindow *window)
{
- GossipAccountChooser *account_chooser;
+ EmpathyAccountChooser *account_chooser;
McAccount *account;
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (window->account_chooser);
- account = gossip_account_chooser_get_account (account_chooser);
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser);
+ account = empathy_account_chooser_get_account (account_chooser);
if (!account) {
chatrooms_window_model_add (window, chatroom, FALSE);
} else {
- if (gossip_account_equal (account, gossip_chatroom_get_account (chatroom))) {
+ if (empathy_account_equal (account, empathy_chatroom_get_account (chatroom))) {
chatrooms_window_model_add (window, chatroom, FALSE);
}
@@ -532,9 +532,9 @@ chatrooms_window_chatroom_added_cb (GossipChatroomManager *manager,
}
static void
-chatrooms_window_chatroom_removed_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
- GossipChatroomsWindow *window)
+chatrooms_window_chatroom_removed_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
+ EmpathyChatroomsWindow *window)
{
GtkTreeModel *model;
@@ -549,13 +549,13 @@ static gboolean
chatrooms_window_remove_chatroom_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipChatroom *chatroom)
+ EmpathyChatroom *chatroom)
{
- GossipChatroom *this_chatroom;
+ EmpathyChatroom *this_chatroom;
gtk_tree_model_get (model, iter, COL_POINTER, &this_chatroom, -1);
- if (gossip_chatroom_equal (chatroom, this_chatroom)) {
+ if (empathy_chatroom_equal (chatroom, this_chatroom)) {
gtk_list_store_remove (GTK_LIST_STORE (model), iter);
g_object_unref (this_chatroom);
return TRUE;
@@ -568,7 +568,7 @@ chatrooms_window_remove_chatroom_foreach (GtkTreeModel *model,
static void
chatrooms_window_account_changed_cb (GtkWidget *combo_box,
- GossipChatroomsWindow *window)
+ EmpathyChatroomsWindow *window)
{
chatrooms_window_model_refresh_data (window, FALSE);
}
diff --git a/libempathy-gtk/gossip-chatrooms-window.glade b/libempathy-gtk/empathy-chatrooms-window.glade
index ad2971e00..c5f5dc991 100644
--- a/libempathy-gtk/gossip-chatrooms-window.glade
+++ b/libempathy-gtk/empathy-chatrooms-window.glade
@@ -281,7 +281,7 @@
<child>
<widget class="GtkCheckButton" id="checkbutton_auto_connect">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">Join this chat room when Gossip starts and you are connected</property>
+ <property name="tooltip" translatable="yes">Join this chat room when Empathy starts and you are connected</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Join room on start_up</property>
<property name="use_underline">True</property>
diff --git a/libempathy-gtk/gossip-chatrooms-window.h b/libempathy-gtk/empathy-chatrooms-window.h
index d1314ec29..179082052 100644
--- a/libempathy-gtk/gossip-chatrooms-window.h
+++ b/libempathy-gtk/empathy-chatrooms-window.h
@@ -23,13 +23,13 @@
* Mikael Hallendal <micke@imendio.com>
*/
-#ifndef __GOSSIP_CHATROOMS_WINDOW_H__
-#define __GOSSIP_CHATROOMS_WINDOW_H__
+#ifndef __EMPATHY_CHATROOMS_WINDOW_H__
+#define __EMPATHY_CHATROOMS_WINDOW_H__
G_BEGIN_DECLS
-void gossip_chatrooms_window_show (GtkWindow *parent);
+void empathy_chatrooms_window_show (GtkWindow *parent);
G_END_DECLS
-#endif /* __GOSSIP_CHATROOMS_WINDOW_H__ */
+#endif /* __EMPATHY_CHATROOMS_WINDOW_H__ */
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 7d1e2603a..659d91769 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -34,7 +34,7 @@
#include "empathy-contact-dialogs.h"
#include "empathy-contact-widget.h"
-#include "gossip-ui-utils.h"
+#include "empathy-ui-utils.h"
static GList *subscription_dialogs = NULL;
static GList *information_dialogs = NULL;
@@ -43,15 +43,15 @@ static GtkWidget *new_contact_dialog = NULL;
static gint
contact_dialogs_find (GtkDialog *dialog,
- GossipContact *contact)
+ EmpathyContact *contact)
{
GtkWidget *contact_widget;
- GossipContact *this_contact;
+ EmpathyContact *this_contact;
contact_widget = g_object_get_data (G_OBJECT (dialog), "contact_widget");
this_contact = empathy_contact_widget_get_contact (contact_widget);
- return !gossip_contact_equal (contact, this_contact);
+ return !empathy_contact_equal (contact, this_contact);
}
/*
@@ -64,7 +64,7 @@ subscription_dialog_response_cb (GtkDialog *dialog,
GtkWidget *contact_widget)
{
EmpathyContactManager *manager;
- GossipContact *contact;
+ EmpathyContact *contact;
manager = empathy_contact_manager_new ();
contact = empathy_contact_widget_get_contact (contact_widget);
@@ -84,7 +84,7 @@ subscription_dialog_response_cb (GtkDialog *dialog,
}
void
-empathy_subscription_dialog_show (GossipContact *contact,
+empathy_subscription_dialog_show (EmpathyContact *contact,
GtkWindow *parent)
{
GtkWidget *dialog;
@@ -92,7 +92,7 @@ empathy_subscription_dialog_show (GossipContact *contact,
GtkWidget *contact_widget;
GList *l;
- g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+ g_return_if_fail (EMPATHY_IS_CONTACT (contact));
l = g_list_find_custom (subscription_dialogs,
contact,
@@ -102,7 +102,7 @@ empathy_subscription_dialog_show (GossipContact *contact,
return;
}
- gossip_glade_get_file_simple ("empathy-contact-dialogs.glade",
+ empathy_glade_get_file_simple ("empathy-contact-dialogs.glade",
"subscription_request_dialog",
NULL,
"subscription_request_dialog", &dialog,
@@ -143,7 +143,7 @@ contact_information_response_cb (GtkDialog *dialog,
}
void
-empathy_contact_information_dialog_show (GossipContact *contact,
+empathy_contact_information_dialog_show (EmpathyContact *contact,
GtkWindow *parent,
gboolean edit)
{
@@ -152,7 +152,7 @@ empathy_contact_information_dialog_show (GossipContact *contact,
GtkWidget *contact_widget;
GList *l;
- g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+ g_return_if_fail (EMPATHY_IS_CONTACT (contact));
l = g_list_find_custom (information_dialogs,
contact,
@@ -205,7 +205,7 @@ new_contact_response_cb (GtkDialog *dialog,
GtkWidget *contact_widget)
{
EmpathyContactManager *manager;
- GossipContact *contact;
+ EmpathyContact *contact;
manager = empathy_contact_manager_new ();
contact = empathy_contact_widget_get_contact (contact_widget);
diff --git a/libempathy-gtk/empathy-contact-dialogs.h b/libempathy-gtk/empathy-contact-dialogs.h
index 55b5a186b..560ae8f2b 100644
--- a/libempathy-gtk/empathy-contact-dialogs.h
+++ b/libempathy-gtk/empathy-contact-dialogs.h
@@ -25,13 +25,13 @@
#include <gtk/gtk.h>
-#include <libempathy/gossip-contact.h>
+#include <libempathy/empathy-contact.h>
G_BEGIN_DECLS
-void empathy_subscription_dialog_show (GossipContact *contact,
+void empathy_subscription_dialog_show (EmpathyContact *contact,
GtkWindow *parent);
-void empathy_contact_information_dialog_show (GossipContact *contact,
+void empathy_contact_information_dialog_show (EmpathyContact *contact,
GtkWindow *parent,
gboolean edit);
void empathy_new_contact_dialog_show (GtkWindow *parent);
diff --git a/libempathy-gtk/gossip-contact-groups.c b/libempathy-gtk/empathy-contact-groups.c
index 8a6afda11..1e5fabe29 100644
--- a/libempathy-gtk/gossip-contact-groups.c
+++ b/libempathy-gtk/empathy-contact-groups.c
@@ -32,15 +32,15 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
-#include "gossip-contact-groups.h"
+#include "empathy-contact-groups.h"
#define DEBUG_DOMAIN "ContactGroups"
#define CONTACT_GROUPS_XML_FILENAME "contact-groups.xml"
-#define CONTACT_GROUPS_DTD_FILENAME "gossip-contact-groups.dtd"
+#define CONTACT_GROUPS_DTD_FILENAME "empathy-contact-groups.dtd"
typedef struct {
gchar *name;
@@ -56,7 +56,7 @@ static void contact_group_free (ContactGroup *group);
static GList *groups = NULL;
void
-gossip_contact_groups_get_all (void)
+empathy_contact_groups_get_all (void)
{
gchar *dir;
gchar *file_with_path;
@@ -88,7 +88,7 @@ contact_groups_file_parse (const gchar *filename)
xmlNodePtr account;
xmlNodePtr node;
- gossip_debug (DEBUG_DOMAIN, "Attempting to parse file:'%s'...", filename);
+ empathy_debug (DEBUG_DOMAIN, "Attempting to parse file:'%s'...", filename);
ctxt = xmlNewParserCtxt ();
@@ -100,7 +100,7 @@ contact_groups_file_parse (const gchar *filename)
return;
}
- if (!gossip_xml_validate (doc, CONTACT_GROUPS_DTD_FILENAME)) {
+ if (!empathy_xml_validate (doc, CONTACT_GROUPS_DTD_FILENAME)) {
g_warning ("Failed to validate file:'%s'", filename);
xmlFreeDoc(doc);
xmlFreeParserCtxt (ctxt);
@@ -151,7 +151,7 @@ contact_groups_file_parse (const gchar *filename)
node = node->next;
}
- gossip_debug (DEBUG_DOMAIN, "Parsed %d contact groups", g_list_length (groups));
+ empathy_debug (DEBUG_DOMAIN, "Parsed %d contact groups", g_list_length (groups));
xmlFreeDoc(doc);
xmlFreeParserCtxt (ctxt);
@@ -217,7 +217,7 @@ contact_groups_file_save (void)
/* Make sure the XML is indented properly */
xmlIndentTreeOutput = 1;
- gossip_debug (DEBUG_DOMAIN, "Saving file:'%s'", file);
+ empathy_debug (DEBUG_DOMAIN, "Saving file:'%s'", file);
xmlSaveFormatFileEnc (file, doc, "utf-8", 1);
xmlFreeDoc (doc);
@@ -230,7 +230,7 @@ contact_groups_file_save (void)
}
gboolean
-gossip_contact_group_get_expanded (const gchar *group)
+empathy_contact_group_get_expanded (const gchar *group)
{
GList *l;
gboolean default_val = TRUE;
@@ -253,7 +253,7 @@ gossip_contact_group_get_expanded (const gchar *group)
}
void
-gossip_contact_group_set_expanded (const gchar *group,
+empathy_contact_group_set_expanded (const gchar *group,
gboolean expanded)
{
GList *l;
diff --git a/libempathy-gtk/gossip-contact-groups.dtd b/libempathy-gtk/empathy-contact-groups.dtd
index 689220f0e..b4de2260a 100644
--- a/libempathy-gtk/gossip-contact-groups.dtd
+++ b/libempathy-gtk/empathy-contact-groups.dtd
@@ -1,5 +1,5 @@
<!--
- DTD for Gossips contact groups.
+ DTD for Empathys contact groups.
by Martyn Russell <mr@gnome.org>
-->
diff --git a/libempathy-gtk/gossip-contact-groups.h b/libempathy-gtk/empathy-contact-groups.h
index 88bbdc0cb..e2e9810e3 100644
--- a/libempathy-gtk/gossip-contact-groups.h
+++ b/libempathy-gtk/empathy-contact-groups.h
@@ -20,19 +20,19 @@
* Authors: Martyn Russell <martyn@imendio.com>
*/
-#ifndef __GOSSIP_CONTACT_GROUPS_H__
-#define __GOSSIP_CONTACT_GROUPS_H__
+#ifndef __EMPATHY_CONTACT_GROUPS_H__
+#define __EMPATHY_CONTACT_GROUPS_H__
G_BEGIN_DECLS
#include <glib.h>
-void gossip_contact_groups_get_all (void);
+void empathy_contact_groups_get_all (void);
-gboolean gossip_contact_group_get_expanded (const gchar *group);
-void gossip_contact_group_set_expanded (const gchar *group,
+gboolean empathy_contact_group_get_expanded (const gchar *group);
+void empathy_contact_group_set_expanded (const gchar *group,
gboolean expanded);
G_END_DECLS
-#endif /* __GOSSIP_CONTACT_GROUPS_H__ */
+#endif /* __EMPATHY_CONTACT_GROUPS_H__ */
diff --git a/libempathy-gtk/gossip-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c
index 3db336a72..44ea44830 100644
--- a/libempathy-gtk/gossip-contact-list-store.c
+++ b/libempathy-gtk/empathy-contact-list-store.c
@@ -30,11 +30,11 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include <libempathy/gossip-debug.h>
+#include <libempathy/empathy-debug.h>
-#include "gossip-contact-list-store.h"
-#include "gossip-contact-groups.h"
-#include "gossip-ui-utils.h"
+#include "empathy-contact-list-store.h"
+#include "empathy-contact-groups.h"
+#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "ContactListStore"
@@ -48,18 +48,18 @@
/* Time after connecting which we wait before active users are enabled */
#define ACTIVE_USER_WAIT_TO_ENABLE_TIME 5000
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStorePriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStorePriv))
-struct _GossipContactListStorePriv {
+struct _EmpathyContactListStorePriv {
EmpathyContactList *list;
gboolean show_offline;
gboolean show_avatars;
gboolean is_compact;
gboolean show_active;
- GossipContactListStoreSort sort_criterium;
+ EmpathyContactListStoreSort sort_criterium;
guint inhibit_active;
- GossipContactGroupsFunc get_contact_groups;
+ EmpathyContactGroupsFunc get_contact_groups;
gpointer get_contact_groups_data;
};
@@ -70,19 +70,19 @@ typedef struct {
} FindGroup;
typedef struct {
- GossipContact *contact;
+ EmpathyContact *contact;
gboolean found;
GList *iters;
} FindContact;
typedef struct {
- GossipContactListStore *store;
- GossipContact *contact;
+ EmpathyContactListStore *store;
+ EmpathyContact *contact;
gboolean remove;
} ShowActiveData;
-static void gossip_contact_list_store_class_init (GossipContactListStoreClass *klass);
-static void gossip_contact_list_store_init (GossipContactListStore *list);
+static void empathy_contact_list_store_class_init (EmpathyContactListStoreClass *klass);
+static void empathy_contact_list_store_init (EmpathyContactListStore *list);
static void contact_list_store_finalize (GObject *object);
static void contact_list_store_get_property (GObject *object,
guint param_id,
@@ -92,32 +92,32 @@ static void contact_list_store_set_property (GObject
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void contact_list_store_setup (GossipContactListStore *store);
-static gboolean contact_list_store_inibit_active_cb (GossipContactListStore *store);
+static void contact_list_store_setup (EmpathyContactListStore *store);
+static gboolean contact_list_store_inibit_active_cb (EmpathyContactListStore *store);
static void contact_list_store_contact_added_cb (EmpathyContactList *list_iface,
- GossipContact *contact,
- GossipContactListStore *store);
-static void contact_list_store_add_contact (GossipContactListStore *store,
- GossipContact *contact);
+ EmpathyContact *contact,
+ EmpathyContactListStore *store);
+static void contact_list_store_add_contact (EmpathyContactListStore *store,
+ EmpathyContact *contact);
static void contact_list_store_contact_removed_cb (EmpathyContactList *list_iface,
- GossipContact *contact,
- GossipContactListStore *store);
-static void contact_list_store_remove_contact (GossipContactListStore *store,
- GossipContact *contact);
-static void contact_list_store_contact_update (GossipContactListStore *store,
- GossipContact *contact);
-static void contact_list_store_contact_groups_updated_cb (GossipContact *contact,
+ EmpathyContact *contact,
+ EmpathyContactListStore *store);
+static void contact_list_store_remove_contact (EmpathyContactListStore *store,
+ EmpathyContact *contact);
+static void contact_list_store_contact_update (EmpathyContactListStore *store,
+ EmpathyContact *contact);
+static void contact_list_store_contact_groups_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipContactListStore *store);
-static void contact_list_store_contact_updated_cb (GossipContact *contact,
+ EmpathyContactListStore *store);
+static void contact_list_store_contact_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipContactListStore *store);
-static void contact_list_store_contact_set_active (GossipContactListStore *store,
- GossipContact *contact,
+ EmpathyContactListStore *store);
+static void contact_list_store_contact_set_active (EmpathyContactListStore *store,
+ EmpathyContact *contact,
gboolean active,
gboolean set_changed);
-static ShowActiveData * contact_list_store_contact_active_new (GossipContactListStore *store,
- GossipContact *contact,
+static ShowActiveData * contact_list_store_contact_active_new (EmpathyContactListStore *store,
+ EmpathyContact *contact,
gboolean remove);
static void contact_list_store_contact_active_free (ShowActiveData *data);
static gboolean contact_list_store_contact_active_cb (ShowActiveData *data);
@@ -125,7 +125,7 @@ static gboolean contact_list_store_get_group_foreach (GtkTreeMod
GtkTreePath *path,
GtkTreeIter *iter,
FindGroup *fg);
-static void contact_list_store_get_group (GossipContactListStore *store,
+static void contact_list_store_get_group (EmpathyContactListStore *store,
const gchar *name,
GtkTreeIter *iter_group_to_set,
GtkTreeIter *iter_separator_to_set,
@@ -142,12 +142,12 @@ static gboolean contact_list_store_find_contact_foreach (GtkTreeMod
GtkTreePath *path,
GtkTreeIter *iter,
FindContact *fc);
-static GList * contact_list_store_find_contact (GossipContactListStore *store,
- GossipContact *contact);
+static GList * contact_list_store_find_contact (EmpathyContactListStore *store,
+ EmpathyContact *contact);
static gboolean contact_list_store_update_list_mode_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipContactListStore *store);
+ EmpathyContactListStore *store);
enum {
PROP_0,
@@ -158,31 +158,31 @@ enum {
};
GType
-gossip_contact_list_store_sort_get_type (void)
+empathy_contact_list_store_sort_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
- { GOSSIP_CONTACT_LIST_STORE_SORT_NAME,
- "GOSSIP_CONTACT_LIST_STORE_SORT_NAME",
+ { EMPATHY_CONTACT_LIST_STORE_SORT_NAME,
+ "EMPATHY_CONTACT_LIST_STORE_SORT_NAME",
"name" },
- { GOSSIP_CONTACT_LIST_STORE_SORT_STATE,
- "GOSSIP_CONTACT_LIST_STORE_SORT_STATE",
+ { EMPATHY_CONTACT_LIST_STORE_SORT_STATE,
+ "EMPATHY_CONTACT_LIST_STORE_SORT_STATE",
"state" },
{ 0, NULL, NULL }
};
- etype = g_enum_register_static ("GossipContactListStoreSort", values);
+ etype = g_enum_register_static ("EmpathyContactListStoreSort", values);
}
return etype;
}
-G_DEFINE_TYPE (GossipContactListStore, gossip_contact_list_store, GTK_TYPE_TREE_STORE);
+G_DEFINE_TYPE (EmpathyContactListStore, empathy_contact_list_store, GTK_TYPE_TREE_STORE);
static void
-gossip_contact_list_store_class_init (GossipContactListStoreClass *klass)
+empathy_contact_list_store_class_init (EmpathyContactListStoreClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -219,17 +219,17 @@ gossip_contact_list_store_class_init (GossipContactListStoreClass *klass)
g_param_spec_enum ("sort-criterium",
"Sort citerium",
"The sort criterium to use for sorting the contact list",
- GOSSIP_TYPE_CONTACT_LIST_STORE_SORT,
- GOSSIP_CONTACT_LIST_STORE_SORT_NAME,
+ EMPATHY_TYPE_CONTACT_LIST_STORE_SORT,
+ EMPATHY_CONTACT_LIST_STORE_SORT_NAME,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipContactListStorePriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyContactListStorePriv));
}
static void
-gossip_contact_list_store_init (GossipContactListStore *store)
+empathy_contact_list_store_init (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (store);
@@ -241,7 +241,7 @@ gossip_contact_list_store_init (GossipContactListStore *store)
static void
contact_list_store_finalize (GObject *object)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (object);
@@ -255,7 +255,7 @@ contact_list_store_finalize (GObject *object)
g_source_remove (priv->inhibit_active);
}
- G_OBJECT_CLASS (gossip_contact_list_store_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_contact_list_store_parent_class)->finalize (object);
}
static void
@@ -264,7 +264,7 @@ contact_list_store_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (object);
@@ -293,25 +293,25 @@ contact_list_store_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (object);
switch (param_id) {
case PROP_SHOW_OFFLINE:
- gossip_contact_list_store_set_show_offline (GOSSIP_CONTACT_LIST_STORE (object),
+ empathy_contact_list_store_set_show_offline (EMPATHY_CONTACT_LIST_STORE (object),
g_value_get_boolean (value));
break;
case PROP_SHOW_AVATARS:
- gossip_contact_list_store_set_show_avatars (GOSSIP_CONTACT_LIST_STORE (object),
+ empathy_contact_list_store_set_show_avatars (EMPATHY_CONTACT_LIST_STORE (object),
g_value_get_boolean (value));
break;
case PROP_IS_COMPACT:
- gossip_contact_list_store_set_is_compact (GOSSIP_CONTACT_LIST_STORE (object),
+ empathy_contact_list_store_set_is_compact (EMPATHY_CONTACT_LIST_STORE (object),
g_value_get_boolean (value));
break;
case PROP_SORT_CRITERIUM:
- gossip_contact_list_store_set_sort_criterium (GOSSIP_CONTACT_LIST_STORE (object),
+ empathy_contact_list_store_set_sort_criterium (EMPATHY_CONTACT_LIST_STORE (object),
g_value_get_enum (value));
break;
default:
@@ -320,16 +320,16 @@ contact_list_store_set_property (GObject *object,
};
}
-GossipContactListStore *
-gossip_contact_list_store_new (EmpathyContactList *list_iface)
+EmpathyContactListStore *
+empathy_contact_list_store_new (EmpathyContactList *list_iface)
{
- GossipContactListStore *store;
- GossipContactListStorePriv *priv;
+ EmpathyContactListStore *store;
+ EmpathyContactListStorePriv *priv;
GList *contacts, *l;
g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST (list_iface), NULL);
- store = g_object_new (GOSSIP_TYPE_CONTACT_LIST_STORE, NULL);
+ store = g_object_new (EMPATHY_TYPE_CONTACT_LIST_STORE, NULL);
priv = GET_PRIV (store);
contact_list_store_setup (store);
@@ -348,7 +348,7 @@ gossip_contact_list_store_new (EmpathyContactList *list_iface)
/* Add contacts already created. */
contacts = empathy_contact_list_get_members (priv->list);
for (l = contacts; l; l = l->next) {
- GossipContact *contact;
+ EmpathyContact *contact;
contact = l->data;
@@ -362,11 +362,11 @@ gossip_contact_list_store_new (EmpathyContactList *list_iface)
}
EmpathyContactList *
-gossip_contact_list_store_get_list_iface (GossipContactListStore *store)
+empathy_contact_list_store_get_list_iface (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), FALSE);
priv = GET_PRIV (store);
@@ -374,11 +374,11 @@ gossip_contact_list_store_get_list_iface (GossipContactListStore *store)
}
gboolean
-gossip_contact_list_store_get_show_offline (GossipContactListStore *store)
+empathy_contact_list_store_get_show_offline (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), FALSE);
priv = GET_PRIV (store);
@@ -386,14 +386,14 @@ gossip_contact_list_store_get_show_offline (GossipContactListStore *store)
}
void
-gossip_contact_list_store_set_show_offline (GossipContactListStore *store,
+empathy_contact_list_store_set_show_offline (EmpathyContactListStore *store,
gboolean show_offline)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GList *contacts, *l;
gboolean show_active;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store));
priv = GET_PRIV (store);
@@ -405,9 +405,9 @@ gossip_contact_list_store_set_show_offline (GossipContactListStore *store,
contacts = empathy_contact_list_get_members (priv->list);
for (l = contacts; l; l = l->next) {
- GossipContact *contact;
+ EmpathyContact *contact;
- contact = GOSSIP_CONTACT (l->data);
+ contact = EMPATHY_CONTACT (l->data);
contact_list_store_contact_update (store, contact);
@@ -420,11 +420,11 @@ gossip_contact_list_store_set_show_offline (GossipContactListStore *store,
}
gboolean
-gossip_contact_list_store_get_show_avatars (GossipContactListStore *store)
+empathy_contact_list_store_get_show_avatars (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store), TRUE);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), TRUE);
priv = GET_PRIV (store);
@@ -432,13 +432,13 @@ gossip_contact_list_store_get_show_avatars (GossipContactListStore *store)
}
void
-gossip_contact_list_store_set_show_avatars (GossipContactListStore *store,
+empathy_contact_list_store_set_show_avatars (EmpathyContactListStore *store,
gboolean show_avatars)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store));
priv = GET_PRIV (store);
@@ -453,11 +453,11 @@ gossip_contact_list_store_set_show_avatars (GossipContactListStore *store,
}
gboolean
-gossip_contact_list_store_get_is_compact (GossipContactListStore *store)
+empathy_contact_list_store_get_is_compact (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store), TRUE);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), TRUE);
priv = GET_PRIV (store);
@@ -465,13 +465,13 @@ gossip_contact_list_store_get_is_compact (GossipContactListStore *store)
}
void
-gossip_contact_list_store_set_is_compact (GossipContactListStore *store,
+empathy_contact_list_store_set_is_compact (EmpathyContactListStore *store,
gboolean is_compact)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store));
priv = GET_PRIV (store);
@@ -485,12 +485,12 @@ gossip_contact_list_store_set_is_compact (GossipContactListStore *store,
store);
}
-GossipContactListStoreSort
-gossip_contact_list_store_get_sort_criterium (GossipContactListStore *store)
+EmpathyContactListStoreSort
+empathy_contact_list_store_get_sort_criterium (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store), 0);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store), 0);
priv = GET_PRIV (store);
@@ -498,25 +498,25 @@ gossip_contact_list_store_get_sort_criterium (GossipContactListStore *store)
}
void
-gossip_contact_list_store_set_sort_criterium (GossipContactListStore *store,
- GossipContactListStoreSort sort_criterium)
+empathy_contact_list_store_set_sort_criterium (EmpathyContactListStore *store,
+ EmpathyContactListStoreSort sort_criterium)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store));
priv = GET_PRIV (store);
priv->sort_criterium = sort_criterium;
switch (sort_criterium) {
- case GOSSIP_CONTACT_LIST_STORE_SORT_STATE:
+ case EMPATHY_CONTACT_LIST_STORE_SORT_STATE:
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
COL_STATUS,
GTK_SORT_ASCENDING);
break;
- case GOSSIP_CONTACT_LIST_STORE_SORT_NAME:
+ case EMPATHY_CONTACT_LIST_STORE_SORT_NAME:
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store),
COL_NAME,
GTK_SORT_ASCENDING);
@@ -525,7 +525,7 @@ gossip_contact_list_store_set_sort_criterium (GossipContactListStore *store,
}
gboolean
-gossip_contact_list_store_row_separator_func (GtkTreeModel *model,
+empathy_contact_list_store_row_separator_func (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
@@ -541,7 +541,7 @@ gossip_contact_list_store_row_separator_func (GtkTreeModel *model,
}
gchar *
-gossip_contact_list_store_get_parent_group (GtkTreeModel *model,
+empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
GtkTreePath *path,
gboolean *path_is_group)
{
@@ -592,7 +592,7 @@ gossip_contact_list_store_get_parent_group (GtkTreeModel *model,
}
gboolean
-gossip_contact_list_store_search_equal_func (GtkTreeModel *model,
+empathy_contact_list_store_search_equal_func (GtkTreeModel *model,
gint column,
const gchar *key,
GtkTreeIter *iter,
@@ -632,14 +632,14 @@ gossip_contact_list_store_search_equal_func (GtkTreeModel *model,
}
void
-gossip_contact_list_store_set_contact_groups_func (GossipContactListStore *store,
- GossipContactGroupsFunc func,
+empathy_contact_list_store_set_contact_groups_func (EmpathyContactListStore *store,
+ EmpathyContactGroupsFunc func,
gpointer user_data)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GList *contacts, *l;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store));
priv = GET_PRIV (store);
@@ -653,12 +653,12 @@ gossip_contact_list_store_set_contact_groups_func (GossipContactListStore *stor
/* If we set a custom function to get contacts groups we have to
* disconnect our default notify::groups signal and wait for the user
- * to call himself gossip_contact_list_store_update_contact_groups ()
+ * to call himself empathy_contact_list_store_update_contact_groups ()
* when needed. If func is NULL we come back to default.
*/
contacts = empathy_contact_list_get_members (priv->list);
for (l = contacts; l; l = l->next) {
- GossipContact *contact;
+ EmpathyContact *contact;
contact = l->data;
@@ -672,7 +672,7 @@ gossip_contact_list_store_set_contact_groups_func (GossipContactListStore *stor
store);
}
- gossip_contact_list_store_update_contact_groups (store, contact);
+ empathy_contact_list_store_update_contact_groups (store, contact);
g_object_unref (contact);
}
@@ -680,19 +680,19 @@ gossip_contact_list_store_set_contact_groups_func (GossipContactListStore *stor
}
void
-gossip_contact_list_store_update_contact_groups (GossipContactListStore *store,
- GossipContact *contact)
+empathy_contact_list_store_update_contact_groups (EmpathyContactListStore *store,
+ EmpathyContact *contact)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
gboolean show_active;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_STORE (store));
- g_return_if_fail (GOSSIP_IS_CONTACT (contact));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_STORE (store));
+ g_return_if_fail (EMPATHY_IS_CONTACT (contact));
priv = GET_PRIV (store);
- gossip_debug (DEBUG_DOMAIN, "Contact:'%s' updating groups",
- gossip_contact_get_name (contact));
+ empathy_debug (DEBUG_DOMAIN, "Contact:'%s' updating groups",
+ empathy_contact_get_name (contact));
/* We do this to make sure the groups are correct, if not, we
* would have to check the groups already set up for each
@@ -706,16 +706,16 @@ gossip_contact_list_store_update_contact_groups (GossipContactListStore *store,
}
static void
-contact_list_store_setup (GossipContactListStore *store)
+contact_list_store_setup (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GType types[] = {G_TYPE_STRING, /* Status icon-name */
GDK_TYPE_PIXBUF, /* Avatar pixbuf */
G_TYPE_BOOLEAN, /* Avatar pixbuf visible */
G_TYPE_STRING, /* Name */
G_TYPE_STRING, /* Status string */
G_TYPE_BOOLEAN, /* Show status */
- GOSSIP_TYPE_CONTACT, /* Contact type */
+ EMPATHY_TYPE_CONTACT, /* Contact type */
G_TYPE_BOOLEAN, /* Is group */
G_TYPE_BOOLEAN, /* Is active */
G_TYPE_BOOLEAN, /* Is online */
@@ -735,14 +735,14 @@ contact_list_store_setup (GossipContactListStore *store)
contact_list_store_state_sort_func,
store, NULL);
- priv->sort_criterium = GOSSIP_CONTACT_LIST_STORE_SORT_NAME;
- gossip_contact_list_store_set_sort_criterium (store, priv->sort_criterium);
+ priv->sort_criterium = EMPATHY_CONTACT_LIST_STORE_SORT_NAME;
+ empathy_contact_list_store_set_sort_criterium (store, priv->sort_criterium);
}
static gboolean
-contact_list_store_inibit_active_cb (GossipContactListStore *store)
+contact_list_store_inibit_active_cb (EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (store);
@@ -754,16 +754,16 @@ contact_list_store_inibit_active_cb (GossipContactListStore *store)
static void
contact_list_store_contact_added_cb (EmpathyContactList *list_iface,
- GossipContact *contact,
- GossipContactListStore *store)
+ EmpathyContact *contact,
+ EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (store);
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' added",
- gossip_contact_get_name (contact));
+ empathy_contact_get_name (contact));
if (!priv->get_contact_groups) {
g_signal_connect (contact, "notify::groups",
@@ -787,16 +787,16 @@ contact_list_store_contact_added_cb (EmpathyContactList *list_iface,
}
static void
-contact_list_store_add_contact (GossipContactListStore *store,
- GossipContact *contact)
+contact_list_store_add_contact (EmpathyContactListStore *store,
+ EmpathyContact *contact)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeIter iter;
GList *groups, *l;
priv = GET_PRIV (store);
- if (!priv->show_offline && !gossip_contact_is_online (contact)) {
+ if (!priv->show_offline && !empathy_contact_is_online (contact)) {
return;
}
@@ -805,13 +805,13 @@ contact_list_store_add_contact (GossipContactListStore *store,
groups = priv->get_contact_groups (contact,
priv->get_contact_groups_data);
} else {
- groups = gossip_contact_get_groups (contact);
+ groups = empathy_contact_get_groups (contact);
}
if (!groups) {
gtk_tree_store_append (GTK_TREE_STORE (store), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (store), &iter,
- COL_NAME, gossip_contact_get_name (contact),
+ COL_NAME, empathy_contact_get_name (contact),
COL_CONTACT, contact,
COL_IS_GROUP, FALSE,
COL_IS_SEPARATOR, FALSE,
@@ -833,7 +833,7 @@ contact_list_store_add_contact (GossipContactListStore *store,
gtk_tree_store_insert_after (GTK_TREE_STORE (store), &iter,
&iter_group, NULL);
gtk_tree_store_set (GTK_TREE_STORE (store), &iter,
- COL_NAME, gossip_contact_get_name (contact),
+ COL_NAME, empathy_contact_get_name (contact),
COL_CONTACT, contact,
COL_IS_GROUP, FALSE,
COL_IS_SEPARATOR, FALSE,
@@ -845,11 +845,11 @@ contact_list_store_add_contact (GossipContactListStore *store,
static void
contact_list_store_contact_removed_cb (EmpathyContactList *list_iface,
- GossipContact *contact,
- GossipContactListStore *store)
+ EmpathyContact *contact,
+ EmpathyContactListStore *store)
{
- gossip_debug (DEBUG_DOMAIN, "Contact:'%s' removed",
- gossip_contact_get_name (contact));
+ empathy_debug (DEBUG_DOMAIN, "Contact:'%s' removed",
+ empathy_contact_get_name (contact));
/* Disconnect signals */
g_signal_handlers_disconnect_by_func (contact,
@@ -863,10 +863,10 @@ contact_list_store_contact_removed_cb (EmpathyContactList *list_iface,
}
static void
-contact_list_store_remove_contact (GossipContactListStore *store,
- GossipContact *contact)
+contact_list_store_remove_contact (EmpathyContactListStore *store,
+ EmpathyContact *contact)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GList *iters, *l;
@@ -900,10 +900,10 @@ contact_list_store_remove_contact (GossipContactListStore *store,
}
static void
-contact_list_store_contact_update (GossipContactListStore *store,
- GossipContact *contact)
+contact_list_store_contact_update (EmpathyContactListStore *store,
+ EmpathyContact *contact)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
ShowActiveData *data;
GtkTreeModel *model;
GList *iters, *l;
@@ -929,7 +929,7 @@ contact_list_store_contact_update (GossipContactListStore *store,
}
/* Get online state now. */
- now_online = gossip_contact_is_online (contact);
+ now_online = empathy_contact_is_online (contact);
if (priv->show_offline || now_online) {
should_be_in_list = TRUE;
@@ -939,18 +939,18 @@ contact_list_store_contact_update (GossipContactListStore *store,
if (!in_list && !should_be_in_list) {
/* Nothing to do. */
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:NO, should be:NO",
- gossip_contact_get_name (contact));
+ empathy_contact_get_name (contact));
g_list_foreach (iters, (GFunc) gtk_tree_iter_free, NULL);
g_list_free (iters);
return;
}
else if (in_list && !should_be_in_list) {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:YES, should be:NO",
- gossip_contact_get_name (contact));
+ empathy_contact_get_name (contact));
if (priv->show_active) {
do_remove = TRUE;
@@ -958,28 +958,28 @@ contact_list_store_contact_update (GossipContactListStore *store,
do_set_refresh = TRUE;
set_model = TRUE;
- gossip_debug (DEBUG_DOMAIN, "Remove item (after timeout)");
+ empathy_debug (DEBUG_DOMAIN, "Remove item (after timeout)");
} else {
- gossip_debug (DEBUG_DOMAIN, "Remove item (now)!");
+ empathy_debug (DEBUG_DOMAIN, "Remove item (now)!");
contact_list_store_remove_contact (store, contact);
}
}
else if (!in_list && should_be_in_list) {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:NO, should be:YES",
- gossip_contact_get_name (contact));
+ empathy_contact_get_name (contact));
contact_list_store_add_contact (store, contact);
if (priv->show_active) {
do_set_active = TRUE;
- gossip_debug (DEBUG_DOMAIN, "Set active (contact added)");
+ empathy_debug (DEBUG_DOMAIN, "Set active (contact added)");
}
} else {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' in list:YES, should be:YES",
- gossip_contact_get_name (contact));
+ empathy_contact_get_name (contact));
/* Get online state before. */
if (iters && g_list_length (iters) > 0) {
@@ -994,7 +994,7 @@ contact_list_store_contact_update (GossipContactListStore *store,
do_set_active = TRUE;
do_set_refresh = TRUE;
- gossip_debug (DEBUG_DOMAIN, "Set active (contact updated %s)",
+ empathy_debug (DEBUG_DOMAIN, "Set active (contact updated %s)",
was_online ? "online -> offline" :
"offline -> online");
} else {
@@ -1002,21 +1002,21 @@ contact_list_store_contact_update (GossipContactListStore *store,
/* do_set_active = FALSE; */
do_set_refresh = TRUE;
- gossip_debug (DEBUG_DOMAIN, "Set active (contact updated)");
+ empathy_debug (DEBUG_DOMAIN, "Set active (contact updated)");
}
}
set_model = TRUE;
}
- pixbuf_avatar = gossip_pixbuf_avatar_from_contact_scaled (contact, 32, 32);
+ pixbuf_avatar = empathy_pixbuf_avatar_from_contact_scaled (contact, 32, 32);
for (l = iters; l && set_model; l = l->next) {
gtk_tree_store_set (GTK_TREE_STORE (store), l->data,
- COL_ICON_STATUS, gossip_icon_name_for_contact (contact),
+ COL_ICON_STATUS, empathy_icon_name_for_contact (contact),
COL_PIXBUF_AVATAR, pixbuf_avatar,
COL_PIXBUF_AVATAR_VISIBLE, priv->show_avatars,
- COL_NAME, gossip_contact_get_name (contact),
- COL_STATUS, gossip_contact_get_status (contact),
+ COL_NAME, empathy_contact_get_name (contact),
+ COL_STATUS, empathy_contact_get_status (contact),
COL_STATUS_VISIBLE, !priv->is_compact,
COL_IS_GROUP, FALSE,
COL_IS_ONLINE, now_online,
@@ -1049,32 +1049,32 @@ contact_list_store_contact_update (GossipContactListStore *store,
}
static void
-contact_list_store_contact_groups_updated_cb (GossipContact *contact,
+contact_list_store_contact_groups_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipContactListStore *store)
+ EmpathyContactListStore *store)
{
- gossip_contact_list_store_update_contact_groups (store, contact);
+ empathy_contact_list_store_update_contact_groups (store, contact);
}
static void
-contact_list_store_contact_updated_cb (GossipContact *contact,
+contact_list_store_contact_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipContactListStore *store)
+ EmpathyContactListStore *store)
{
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' updated, checking roster is in sync...",
- gossip_contact_get_name (contact));
+ empathy_contact_get_name (contact));
contact_list_store_contact_update (store, contact);
}
static void
-contact_list_store_contact_set_active (GossipContactListStore *store,
- GossipContact *contact,
+contact_list_store_contact_set_active (EmpathyContactListStore *store,
+ EmpathyContact *contact,
gboolean active,
gboolean set_changed)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GList *iters, *l;
@@ -1089,7 +1089,7 @@ contact_list_store_contact_set_active (GossipContactListStore *store,
COL_IS_ACTIVE, active,
-1);
- gossip_debug (DEBUG_DOMAIN, "Set item %s", active ? "active" : "inactive");
+ empathy_debug (DEBUG_DOMAIN, "Set item %s", active ? "active" : "inactive");
if (set_changed) {
path = gtk_tree_model_get_path (model, l->data);
@@ -1104,15 +1104,15 @@ contact_list_store_contact_set_active (GossipContactListStore *store,
}
static ShowActiveData *
-contact_list_store_contact_active_new (GossipContactListStore *store,
- GossipContact *contact,
+contact_list_store_contact_active_new (EmpathyContactListStore *store,
+ EmpathyContact *contact,
gboolean remove)
{
ShowActiveData *data;
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' now active, and %s be removed",
- gossip_contact_get_name (contact),
+ empathy_contact_get_name (contact),
remove ? "WILL" : "WILL NOT");
data = g_slice_new0 (ShowActiveData);
@@ -1136,22 +1136,22 @@ contact_list_store_contact_active_free (ShowActiveData *data)
static gboolean
contact_list_store_contact_active_cb (ShowActiveData *data)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
priv = GET_PRIV (data->store);
if (data->remove &&
!priv->show_offline &&
- !gossip_contact_is_online (data->contact)) {
- gossip_debug (DEBUG_DOMAIN,
+ !empathy_contact_is_online (data->contact)) {
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' active timeout, removing item",
- gossip_contact_get_name (data->contact));
+ empathy_contact_get_name (data->contact));
contact_list_store_remove_contact (data->store, data->contact);
}
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Contact:'%s' no longer active",
- gossip_contact_get_name (data->contact));
+ empathy_contact_get_name (data->contact));
contact_list_store_contact_set_active (data->store,
data->contact,
@@ -1193,13 +1193,13 @@ contact_list_store_get_group_foreach (GtkTreeModel *model,
}
static void
-contact_list_store_get_group (GossipContactListStore *store,
+contact_list_store_get_group (EmpathyContactListStore *store,
const gchar *name,
GtkTreeIter *iter_group_to_set,
GtkTreeIter *iter_separator_to_set,
gboolean *created)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GtkTreeIter iter_group;
GtkTreeIter iter_separator;
@@ -1278,8 +1278,8 @@ contact_list_store_state_sort_func (GtkTreeModel *model,
gint ret_val = 0;
gchar *name_a, *name_b;
gboolean is_separator_a, is_separator_b;
- GossipContact *contact_a, *contact_b;
- GossipPresence *presence_a, *presence_b;
+ EmpathyContact *contact_a, *contact_b;
+ EmpathyPresence *presence_a, *presence_b;
McPresence state_a, state_b;
gtk_tree_model_get (model, iter_a,
@@ -1316,8 +1316,8 @@ contact_list_store_state_sort_func (GtkTreeModel *model,
/* If we managed to get this far, we can start looking at
* the presences.
*/
- presence_a = gossip_contact_get_presence (GOSSIP_CONTACT (contact_a));
- presence_b = gossip_contact_get_presence (GOSSIP_CONTACT (contact_b));
+ presence_a = empathy_contact_get_presence (EMPATHY_CONTACT (contact_a));
+ presence_b = empathy_contact_get_presence (EMPATHY_CONTACT (contact_b));
if (!presence_a && presence_b) {
ret_val = 1;
@@ -1327,8 +1327,8 @@ contact_list_store_state_sort_func (GtkTreeModel *model,
/* Both offline, sort by name */
ret_val = g_utf8_collate (name_a, name_b);
} else {
- state_a = gossip_presence_get_state (presence_a);
- state_b = gossip_presence_get_state (presence_b);
+ state_a = empathy_presence_get_state (presence_a);
+ state_b = empathy_presence_get_state (presence_b);
if (state_a < state_b) {
ret_val = -1;
@@ -1362,7 +1362,7 @@ contact_list_store_name_sort_func (GtkTreeModel *model,
gpointer user_data)
{
gchar *name_a, *name_b;
- GossipContact *contact_a, *contact_b;
+ EmpathyContact *contact_a, *contact_b;
gboolean is_separator_a, is_separator_b;
gint ret_val;
@@ -1413,7 +1413,7 @@ contact_list_store_find_contact_foreach (GtkTreeModel *model,
GtkTreeIter *iter,
FindContact *fc)
{
- GossipContact *contact;
+ EmpathyContact *contact;
gtk_tree_model_get (model, iter,
COL_CONTACT, &contact,
@@ -1423,7 +1423,7 @@ contact_list_store_find_contact_foreach (GtkTreeModel *model,
return FALSE;
}
- if (gossip_contact_equal (contact, fc->contact)) {
+ if (empathy_contact_equal (contact, fc->contact)) {
fc->found = TRUE;
fc->iters = g_list_append (fc->iters, gtk_tree_iter_copy (iter));
}
@@ -1433,10 +1433,10 @@ contact_list_store_find_contact_foreach (GtkTreeModel *model,
}
static GList *
-contact_list_store_find_contact (GossipContactListStore *store,
- GossipContact *contact)
+contact_list_store_find_contact (EmpathyContactListStore *store,
+ EmpathyContact *contact)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
GtkTreeModel *model;
GList *l = NULL;
FindContact fc;
@@ -1463,9 +1463,9 @@ static gboolean
contact_list_store_update_list_mode_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipContactListStore *store)
+ EmpathyContactListStore *store)
{
- GossipContactListStorePriv *priv;
+ EmpathyContactListStorePriv *priv;
gboolean show_avatar = FALSE;
priv = GET_PRIV (store);
diff --git a/libempathy-gtk/empathy-contact-list-store.h b/libempathy-gtk/empathy-contact-list-store.h
new file mode 100644
index 000000000..2e40e8c72
--- /dev/null
+++ b/libempathy-gtk/empathy-contact-list-store.h
@@ -0,0 +1,122 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2005-2007 Imendio AB
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_CONTACT_LIST_STORE_H__
+#define __EMPATHY_CONTACT_LIST_STORE_H__
+
+#include <gtk/gtktreestore.h>
+
+#include <libempathy/empathy-contact-list.h>
+#include <libempathy/empathy-contact.h>
+
+G_BEGIN_DECLS
+
+/*
+ * EmpathyContactListStoreSort
+ */
+#define EMPATHY_TYPE_CONTACT_LIST_STORE_SORT (empathy_contact_list_store_sort_get_type ())
+
+typedef enum {
+ EMPATHY_CONTACT_LIST_STORE_SORT_STATE,
+ EMPATHY_CONTACT_LIST_STORE_SORT_NAME
+} EmpathyContactListStoreSort;
+
+GType empathy_contact_list_store_sort_get_type (void) G_GNUC_CONST;
+
+/*
+ * EmpathyContactListStore
+ */
+#define EMPATHY_TYPE_CONTACT_LIST_STORE (empathy_contact_list_store_get_type ())
+#define EMPATHY_CONTACT_LIST_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStore))
+#define EMPATHY_CONTACT_LIST_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStoreClass))
+#define EMPATHY_IS_CONTACT_LIST_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONTACT_LIST_STORE))
+#define EMPATHY_IS_CONTACT_LIST_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONTACT_LIST_STORE))
+#define EMPATHY_CONTACT_LIST_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONTACT_LIST_STORE, EmpathyContactListStoreClass))
+
+typedef struct _EmpathyContactListStore EmpathyContactListStore;
+typedef struct _EmpathyContactListStoreClass EmpathyContactListStoreClass;
+typedef struct _EmpathyContactListStorePriv EmpathyContactListStorePriv;
+
+enum {
+ COL_ICON_STATUS,
+ COL_PIXBUF_AVATAR,
+ COL_PIXBUF_AVATAR_VISIBLE,
+ COL_NAME,
+ COL_STATUS,
+ COL_STATUS_VISIBLE,
+ COL_CONTACT,
+ COL_IS_GROUP,
+ COL_IS_ACTIVE,
+ COL_IS_ONLINE,
+ COL_IS_SEPARATOR,
+ COL_COUNT
+} EmpathyContactListStoreCol;
+
+struct _EmpathyContactListStore {
+ GtkTreeStore parent;
+};
+
+struct _EmpathyContactListStoreClass {
+ GtkTreeStoreClass parent_class;
+};
+typedef GList * (*EmpathyContactGroupsFunc) (EmpathyContact *contact,
+ gpointer user_data);
+
+GType empathy_contact_list_store_get_type (void) G_GNUC_CONST;
+EmpathyContactListStore * empathy_contact_list_store_new (EmpathyContactList *list_iface);
+EmpathyContactList * empathy_contact_list_store_get_list_iface (EmpathyContactListStore *store);
+gboolean empathy_contact_list_store_get_show_offline (EmpathyContactListStore *store);
+void empathy_contact_list_store_set_show_offline (EmpathyContactListStore *store,
+ gboolean show_offline);
+gboolean empathy_contact_list_store_get_show_avatars (EmpathyContactListStore *store);
+void empathy_contact_list_store_set_show_avatars (EmpathyContactListStore *store,
+ gboolean show_avatars);
+gboolean empathy_contact_list_store_get_is_compact (EmpathyContactListStore *store);
+void empathy_contact_list_store_set_is_compact (EmpathyContactListStore *store,
+ gboolean is_compact);
+EmpathyContactListStoreSort empathy_contact_list_store_get_sort_criterium (EmpathyContactListStore *store);
+void empathy_contact_list_store_set_sort_criterium (EmpathyContactListStore *store,
+ EmpathyContactListStoreSort sort_criterium);
+gboolean empathy_contact_list_store_row_separator_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data);
+gchar * empathy_contact_list_store_get_parent_group (GtkTreeModel *model,
+ GtkTreePath *path,
+ gboolean *path_is_group);
+gboolean empathy_contact_list_store_search_equal_func (GtkTreeModel *model,
+ gint column,
+ const gchar *key,
+ GtkTreeIter *iter,
+ gpointer search_data);
+void empathy_contact_list_store_set_contact_groups_func (EmpathyContactListStore*store,
+ EmpathyContactGroupsFunc func,
+ gpointer user_data);
+void empathy_contact_list_store_update_contact_groups (EmpathyContactListStore *store,
+ EmpathyContact *contact);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CONTACT_LIST_STORE_H__ */
+
diff --git a/libempathy-gtk/gossip-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 5c3fd274d..2a5cf3406 100644
--- a/libempathy-gtk/gossip-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -37,21 +37,21 @@
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-log-manager.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-marshal.h>
-#include "gossip-contact-list-view.h"
-#include "gossip-contact-list-store.h"
+#include "empathy-contact-list-view.h"
+#include "empathy-contact-list-store.h"
#include "empathy-images.h"
-#include "gossip-contact-groups.h"
-#include "gossip-cell-renderer-expander.h"
-#include "gossip-cell-renderer-text.h"
-#include "gossip-ui-utils.h"
+#include "empathy-contact-groups.h"
+#include "empathy-cell-renderer-expander.h"
+#include "empathy-cell-renderer-text.h"
+#include "empathy-ui-utils.h"
#include "empathy-contact-dialogs.h"
-//#include "gossip-chat-invite.h"
-//#include "gossip-ft-window.h"
-#include "gossip-log-window.h"
+//#include "empathy-chat-invite.h"
+//#include "empathy-ft-window.h"
+#include "empathy-log-window.h"
#define DEBUG_DOMAIN "ContactListView"
@@ -62,33 +62,33 @@
* (e.g. online, offline or from normal to a busy state).
*/
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListViewPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewPriv))
-struct _GossipContactListViewPriv {
- GossipContactListStore *store;
+struct _EmpathyContactListViewPriv {
+ EmpathyContactListStore *store;
GtkUIManager *ui;
GtkTreeRowReference *drag_row;
GtkTreeModel *filter;
gchar *filter_text;
- GossipContactListViewDragReceivedFunc drag_received;
+ EmpathyContactListViewDragReceivedFunc drag_received;
gpointer drag_received_data;
};
typedef struct {
- GossipContactListView *view;
+ EmpathyContactListView *view;
GtkTreePath *path;
guint timeout_id;
} DragMotionData;
typedef struct {
- GossipContactListView *view;
- GossipContact *contact;
+ EmpathyContactListView *view;
+ EmpathyContact *contact;
gboolean remove;
} ShowActiveData;
-static void gossip_contact_list_view_class_init (GossipContactListViewClass *klass);
-static void gossip_contact_list_view_init (GossipContactListView *list);
+static void empathy_contact_list_view_class_init (EmpathyContactListViewClass *klass);
+static void empathy_contact_list_view_init (EmpathyContactListView *list);
static void contact_list_view_finalize (GObject *object);
static void contact_list_view_get_property (GObject *object,
guint param_id,
@@ -98,13 +98,13 @@ static void contact_list_view_set_property (GObject
guint param_id,
const GValue *value,
GParamSpec *pspec);
-static void contact_list_view_setup (GossipContactListView *view);
+static void contact_list_view_setup (EmpathyContactListView *view);
static void contact_list_view_row_has_child_toggled_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipContactListView *view);
-static void contact_list_view_contact_received (GossipContactListView *view,
- GossipContact *contact,
+ EmpathyContactListView *view);
+static void contact_list_view_contact_received (EmpathyContactListView *view,
+ EmpathyContact *contact,
GdkDragAction action,
const gchar *old_group,
const gchar *new_group);
@@ -135,7 +135,7 @@ static gboolean contact_list_view_drag_drop (GtkWidget
gint x,
gint y,
guint time);
-static void contact_list_view_cell_set_background (GossipContactListView *view,
+static void contact_list_view_cell_set_background (EmpathyContactListView *view,
GtkCellRenderer *cell,
gboolean is_group,
gboolean is_active);
@@ -143,48 +143,48 @@ static void contact_list_view_pixbuf_cell_data_func (GtkTreeViewColum
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view);
+ EmpathyContactListView *view);
static void contact_list_view_avatar_cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view);
+ EmpathyContactListView *view);
static void contact_list_view_text_cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view);
+ EmpathyContactListView *view);
static void contact_list_view_expander_cell_data_func (GtkTreeViewColumn *column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view);
-static GtkWidget * contact_list_view_get_contact_menu (GossipContactListView *view,
+ EmpathyContactListView *view);
+static GtkWidget * contact_list_view_get_contact_menu (EmpathyContactListView *view,
gboolean can_send_file,
gboolean can_show_log);
-static gboolean contact_list_view_button_press_event_cb (GossipContactListView *view,
+static gboolean contact_list_view_button_press_event_cb (EmpathyContactListView *view,
GdkEventButton *event,
gpointer user_data);
-static void contact_list_view_row_activated_cb (GossipContactListView *view,
+static void contact_list_view_row_activated_cb (EmpathyContactListView *view,
GtkTreePath *path,
GtkTreeViewColumn *col,
gpointer user_data);
-static void contact_list_view_row_expand_or_collapse_cb (GossipContactListView *view,
+static void contact_list_view_row_expand_or_collapse_cb (EmpathyContactListView *view,
GtkTreeIter *iter,
GtkTreePath *path,
gpointer user_data);
-static gboolean contact_list_view_filter_show_contact (GossipContact *contact,
+static gboolean contact_list_view_filter_show_contact (EmpathyContact *contact,
const gchar *filter);
-static gboolean contact_list_view_filter_show_group (GossipContactListView *view,
+static gboolean contact_list_view_filter_show_group (EmpathyContactListView *view,
const gchar *group,
const gchar *filter);
static gboolean contact_list_view_filter_func (GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view);
+ EmpathyContactListView *view);
static void contact_list_view_action_cb (GtkAction *action,
- GossipContactListView *view);
-static void contact_list_view_action_activated (GossipContactListView *view,
- GossipContact *contact);
+ EmpathyContactListView *view);
+static void contact_list_view_action_activated (EmpathyContactListView *view,
+ EmpathyContact *contact);
enum {
PROP_0,
@@ -282,10 +282,10 @@ enum {
static guint signals[LAST_SIGNAL];
-G_DEFINE_TYPE (GossipContactListView, gossip_contact_list_view, GTK_TYPE_TREE_VIEW);
+G_DEFINE_TYPE (EmpathyContactListView, empathy_contact_list_view, GTK_TYPE_TREE_VIEW);
static void
-gossip_contact_list_view_class_init (GossipContactListViewClass *klass)
+empathy_contact_list_view_class_init (EmpathyContactListViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
@@ -313,7 +313,7 @@ gossip_contact_list_view_class_init (GossipContactListViewClass *klass)
NULL, NULL,
empathy_marshal_VOID__OBJECT_STRING_STRING,
G_TYPE_NONE,
- 3, GOSSIP_TYPE_CONTACT, G_TYPE_STRING, G_TYPE_STRING);
+ 3, EMPATHY_TYPE_CONTACT, G_TYPE_STRING, G_TYPE_STRING);
g_object_class_install_property (object_class,
PROP_FILTER,
@@ -323,20 +323,20 @@ gossip_contact_list_view_class_init (GossipContactListViewClass *klass)
NULL,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipContactListViewPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyContactListViewPriv));
}
static void
-gossip_contact_list_view_init (GossipContactListView *view)
+empathy_contact_list_view_init (EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkActionGroup *action_group;
GError *error = NULL;
priv = GET_PRIV (view);
/* Get saved group states. */
- gossip_contact_groups_get_all ();
+ empathy_contact_groups_get_all ();
/* Set up UI Manager */
priv->ui = gtk_ui_manager_new ();
@@ -354,7 +354,7 @@ gossip_contact_list_view_init (GossipContactListView *view)
g_object_unref (action_group);
gtk_tree_view_set_row_separator_func (GTK_TREE_VIEW (view),
- gossip_contact_list_store_row_separator_func,
+ empathy_contact_list_store_row_separator_func,
NULL, NULL);
/* Connect to tree view signals rather than override. */
@@ -379,7 +379,7 @@ gossip_contact_list_view_init (GossipContactListView *view)
static void
contact_list_view_finalize (GObject *object)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
priv = GET_PRIV (object);
@@ -394,7 +394,7 @@ contact_list_view_finalize (GObject *object)
}
g_free (priv->filter_text);
- G_OBJECT_CLASS (gossip_contact_list_view_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_contact_list_view_parent_class)->finalize (object);
}
static void
@@ -403,7 +403,7 @@ contact_list_view_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
priv = GET_PRIV (object);
@@ -423,13 +423,13 @@ contact_list_view_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
priv = GET_PRIV (object);
switch (param_id) {
case PROP_FILTER:
- gossip_contact_list_view_set_filter (GOSSIP_CONTACT_LIST_VIEW (object),
+ empathy_contact_list_view_set_filter (EMPATHY_CONTACT_LIST_VIEW (object),
g_value_get_string (value));
break;
default:
@@ -438,13 +438,13 @@ contact_list_view_set_property (GObject *object,
};
}
-GossipContactListView *
-gossip_contact_list_view_new (GossipContactListStore *store)
+EmpathyContactListView *
+empathy_contact_list_view_new (EmpathyContactListStore *store)
{
- GossipContactListViewPriv *priv;
- GossipContactListView *view;
+ EmpathyContactListViewPriv *priv;
+ EmpathyContactListView *view;
- view = g_object_new (GOSSIP_TYPE_CONTACT_LIST_VIEW, NULL);
+ view = g_object_new (EMPATHY_TYPE_CONTACT_LIST_VIEW, NULL);
priv = GET_PRIV (view);
priv->store = g_object_ref (store);
@@ -453,16 +453,16 @@ gossip_contact_list_view_new (GossipContactListStore *store)
return view;
}
-GossipContact *
-gossip_contact_list_view_get_selected (GossipContactListView *view)
+EmpathyContact *
+empathy_contact_list_view_get_selected (EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
- GossipContact *contact;
+ EmpathyContact *contact;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
priv = GET_PRIV (view);
@@ -477,16 +477,16 @@ gossip_contact_list_view_get_selected (GossipContactListView *view)
}
gchar *
-gossip_contact_list_view_get_selected_group (GossipContactListView *view)
+empathy_contact_list_view_get_selected_group (EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
gboolean is_group;
gchar *name;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
priv = GET_PRIV (view);
@@ -509,12 +509,12 @@ gossip_contact_list_view_get_selected_group (GossipContactListView *view)
}
GtkWidget *
-gossip_contact_list_view_get_group_menu (GossipContactListView *view)
+empathy_contact_list_view_get_group_menu (EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkWidget *widget;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
priv = GET_PRIV (view);
@@ -524,20 +524,20 @@ gossip_contact_list_view_get_group_menu (GossipContactListView *view)
}
GtkWidget *
-gossip_contact_list_view_get_contact_menu (GossipContactListView *view,
- GossipContact *contact)
+empathy_contact_list_view_get_contact_menu (EmpathyContactListView *view,
+ EmpathyContact *contact)
{
EmpathyLogManager *log_manager;
gboolean can_show_log;
gboolean can_send_file;
- g_return_val_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view), NULL);
- g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
log_manager = empathy_log_manager_new ();
can_show_log = empathy_log_manager_exists (log_manager,
- gossip_contact_get_account (contact),
- gossip_contact_get_id (contact),
+ empathy_contact_get_account (contact),
+ empathy_contact_get_id (contact),
FALSE);
can_send_file = FALSE;
g_object_unref (log_manager);
@@ -548,12 +548,12 @@ gossip_contact_list_view_get_contact_menu (GossipContactListView *view,
}
void
-gossip_contact_list_view_set_filter (GossipContactListView *view,
+empathy_contact_list_view_set_filter (EmpathyContactListView *view,
const gchar *filter)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view));
priv = GET_PRIV (view);
@@ -564,18 +564,18 @@ gossip_contact_list_view_set_filter (GossipContactListView *view,
priv->filter_text = NULL;
}
- gossip_debug (DEBUG_DOMAIN, "Refiltering with filter:'%s' (case folded)", filter);
+ empathy_debug (DEBUG_DOMAIN, "Refiltering with filter:'%s' (case folded)", filter);
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (priv->filter));
}
void
-gossip_contact_list_view_set_drag_received_func (GossipContactListView *view,
- GossipContactListViewDragReceivedFunc func,
+empathy_contact_list_view_set_drag_received_func (EmpathyContactListView *view,
+ EmpathyContactListViewDragReceivedFunc func,
gpointer user_data)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
- g_return_if_fail (GOSSIP_IS_CONTACT_LIST_VIEW (view));
+ g_return_if_fail (EMPATHY_IS_CONTACT_LIST_VIEW (view));
priv = GET_PRIV (view);
@@ -589,9 +589,9 @@ gossip_contact_list_view_set_drag_received_func (GossipContactListView
}
static void
-contact_list_view_setup (GossipContactListView *view)
+contact_list_view_setup (EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkCellRenderer *cell;
GtkTreeViewColumn *col;
gint i;
@@ -606,7 +606,7 @@ contact_list_view_setup (GossipContactListView *view)
contact_list_view_filter_func,
view, NULL);
gtk_tree_view_set_search_equal_func (GTK_TREE_VIEW (view),
- gossip_contact_list_store_search_equal_func,
+ empathy_contact_list_store_search_equal_func,
view, NULL);
g_signal_connect (priv->filter, "row-has-child-toggled",
G_CALLBACK (contact_list_view_row_has_child_toggled_cb),
@@ -638,7 +638,7 @@ contact_list_view_setup (GossipContactListView *view)
NULL);
/* Name */
- cell = gossip_cell_renderer_text_new ();
+ cell = empathy_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (col, cell, TRUE);
gtk_tree_view_column_set_cell_data_func (
col, cell,
@@ -669,7 +669,7 @@ contact_list_view_setup (GossipContactListView *view)
NULL);
/* Expander */
- cell = gossip_cell_renderer_expander_new ();
+ cell = empathy_cell_renderer_expander_new ();
gtk_tree_view_column_pack_end (col, cell, FALSE);
gtk_tree_view_column_set_cell_data_func (
col, cell,
@@ -710,7 +710,7 @@ static void
contact_list_view_row_has_child_toggled_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
gboolean is_group = FALSE;
gchar *name = NULL;
@@ -725,7 +725,7 @@ contact_list_view_row_has_child_toggled_cb (GtkTreeModel *model,
return;
}
- if (gossip_contact_group_get_expanded (name)) {
+ if (empathy_contact_group_get_expanded (name)) {
g_signal_handlers_block_by_func (view,
contact_list_view_row_expand_or_collapse_cb,
GINT_TO_POINTER (TRUE));
@@ -747,19 +747,19 @@ contact_list_view_row_has_child_toggled_cb (GtkTreeModel *model,
}
static void
-contact_list_view_contact_received (GossipContactListView *view,
- GossipContact *contact,
+contact_list_view_contact_received (EmpathyContactListView *view,
+ EmpathyContact *contact,
GdkDragAction action,
const gchar *old_group,
const gchar *new_group)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GList *groups, *l;
GList *new_groups_list = NULL;
priv = GET_PRIV (view);
- groups = gossip_contact_get_groups (contact);
+ groups = empathy_contact_get_groups (contact);
for (l = groups; l; l = l->next) {
gchar *str;
@@ -783,7 +783,7 @@ contact_list_view_contact_received (GossipContactListView *view,
new_groups_list = g_list_prepend (new_groups_list, g_strdup (new_group));
}
- gossip_contact_set_groups (contact, new_groups_list);
+ empathy_contact_set_groups (contact, new_groups_list);
}
static void
@@ -795,12 +795,12 @@ contact_list_view_drag_data_received (GtkWidget *widget,
guint info,
guint time)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
EmpathyContactList *list;
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeViewDropPosition position;
- GossipContact *contact;
+ EmpathyContact *contact;
const gchar *id;
gchar *new_group = NULL;
gchar *old_group = NULL;
@@ -809,17 +809,17 @@ contact_list_view_drag_data_received (GtkWidget *widget,
priv = GET_PRIV (widget);
id = (const gchar*) selection->data;
- gossip_debug (DEBUG_DOMAIN, "Received %s%s drag & drop contact from roster with id:'%s'",
+ empathy_debug (DEBUG_DOMAIN, "Received %s%s drag & drop contact from roster with id:'%s'",
context->action == GDK_ACTION_MOVE ? "move" : "",
context->action == GDK_ACTION_COPY ? "copy" : "",
id);
/* FIXME: This is ambigous, an id can come from multiple accounts */
- list = gossip_contact_list_store_get_list_iface (priv->store);
+ list = empathy_contact_list_store_get_list_iface (priv->store);
contact = empathy_contact_list_find (list, id);
if (!contact) {
- gossip_debug (DEBUG_DOMAIN, "No contact found associated with drag & drop");
+ empathy_debug (DEBUG_DOMAIN, "No contact found associated with drag & drop");
return;
}
@@ -829,7 +829,7 @@ contact_list_view_drag_data_received (GtkWidget *widget,
if (priv->drag_row) {
path = gtk_tree_row_reference_get_path (priv->drag_row);
if (path) {
- old_group = gossip_contact_list_store_get_parent_group (model, path, NULL);
+ old_group = empathy_contact_list_store_get_parent_group (model, path, NULL);
gtk_tree_path_free (path);
}
}
@@ -842,13 +842,13 @@ contact_list_view_drag_data_received (GtkWidget *widget,
&position);
if (is_row) {
- new_group = gossip_contact_list_store_get_parent_group (model, path, NULL);
+ new_group = empathy_contact_list_store_get_parent_group (model, path, NULL);
gtk_tree_path_free (path);
}
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"contact '%s' dragged from '%s' to '%s'",
- gossip_contact_get_name (contact),
+ empathy_contact_get_name (contact),
old_group, new_group);
if (priv->drag_received) {
@@ -858,7 +858,7 @@ contact_list_view_drag_data_received (GtkWidget *widget,
new_group,
priv->drag_received_data);
} else {
- contact_list_view_contact_received (GOSSIP_CONTACT_LIST_VIEW (widget),
+ contact_list_view_contact_received (EMPATHY_CONTACT_LIST_VIEW (widget),
contact,
context->action,
old_group,
@@ -919,7 +919,7 @@ contact_list_view_drag_motion (GtkWidget *widget,
if (!gtk_tree_view_row_expanded (GTK_TREE_VIEW (widget), path)) {
dm = g_new0 (DragMotionData, 1);
- dm->view = GOSSIP_CONTACT_LIST_VIEW (widget);
+ dm->view = EMPATHY_CONTACT_LIST_VIEW (widget);
dm->path = gtk_tree_path_copy (path);
dm->timeout_id = g_timeout_add (
@@ -947,7 +947,7 @@ static void
contact_list_view_drag_begin (GtkWidget *widget,
GdkDragContext *context)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreePath *path;
@@ -955,7 +955,7 @@ contact_list_view_drag_begin (GtkWidget *widget,
priv = GET_PRIV (widget);
- GTK_WIDGET_CLASS (gossip_contact_list_view_parent_class)->drag_begin (widget,
+ GTK_WIDGET_CLASS (empathy_contact_list_view_parent_class)->drag_begin (widget,
context);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (widget));
@@ -975,11 +975,11 @@ contact_list_view_drag_data_get (GtkWidget *widget,
guint info,
guint time)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkTreePath *src_path;
GtkTreeIter iter;
GtkTreeModel *model;
- GossipContact *contact;
+ EmpathyContact *contact;
const gchar *id;
priv = GET_PRIV (widget);
@@ -1001,12 +1001,12 @@ contact_list_view_drag_data_get (GtkWidget *widget,
gtk_tree_path_free (src_path);
- contact = gossip_contact_list_view_get_selected (GOSSIP_CONTACT_LIST_VIEW (widget));
+ contact = empathy_contact_list_view_get_selected (EMPATHY_CONTACT_LIST_VIEW (widget));
if (!contact) {
return;
}
- id = gossip_contact_get_id (contact);
+ id = empathy_contact_get_id (contact);
g_object_unref (contact);
switch (info) {
@@ -1024,11 +1024,11 @@ static void
contact_list_view_drag_end (GtkWidget *widget,
GdkDragContext *context)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
priv = GET_PRIV (widget);
- GTK_WIDGET_CLASS (gossip_contact_list_view_parent_class)->drag_end (widget,
+ GTK_WIDGET_CLASS (empathy_contact_list_view_parent_class)->drag_end (widget,
context);
if (priv->drag_row) {
@@ -1048,7 +1048,7 @@ contact_list_view_drag_drop (GtkWidget *widget,
}
static void
-contact_list_view_cell_set_background (GossipContactListView *view,
+contact_list_view_cell_set_background (EmpathyContactListView *view,
GtkCellRenderer *cell,
gboolean is_group,
gboolean is_active)
@@ -1091,7 +1091,7 @@ contact_list_view_pixbuf_cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
gchar *icon_name;
gboolean is_group;
@@ -1118,7 +1118,7 @@ contact_list_view_avatar_cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
GdkPixbuf *pixbuf;
gboolean show_avatar;
@@ -1149,7 +1149,7 @@ contact_list_view_text_cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
gboolean is_group;
gboolean is_active;
@@ -1173,7 +1173,7 @@ contact_list_view_expander_cell_data_func (GtkTreeViewColumn *column,
GtkCellRenderer *cell,
GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
gboolean is_group;
gboolean is_active;
@@ -1203,11 +1203,11 @@ contact_list_view_expander_cell_data_func (GtkTreeViewColumn *column,
}
static GtkWidget *
-contact_list_view_get_contact_menu (GossipContactListView *view,
+contact_list_view_get_contact_menu (EmpathyContactListView *view,
gboolean can_send_file,
gboolean can_show_log)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
GtkAction *action;
GtkWidget *widget;
@@ -1226,12 +1226,12 @@ contact_list_view_get_contact_menu (GossipContactListView *view,
}
static gboolean
-contact_list_view_button_press_event_cb (GossipContactListView *view,
+contact_list_view_button_press_event_cb (EmpathyContactListView *view,
GdkEventButton *event,
gpointer user_data)
{
- GossipContactListViewPriv *priv;
- GossipContact *contact;
+ EmpathyContactListViewPriv *priv;
+ EmpathyContact *contact;
GtkTreePath *path;
GtkTreeSelection *selection;
GtkTreeModel *model;
@@ -1267,10 +1267,10 @@ contact_list_view_button_press_event_cb (GossipContactListView *view,
gtk_tree_model_get (model, &iter, COL_CONTACT, &contact, -1);
if (contact) {
- menu = gossip_contact_list_view_get_contact_menu (view, contact);
+ menu = empathy_contact_list_view_get_contact_menu (view, contact);
g_object_unref (contact);
} else {
- menu = gossip_contact_list_view_get_group_menu (view);
+ menu = empathy_contact_list_view_get_group_menu (view);
}
if (!menu) {
@@ -1287,12 +1287,12 @@ contact_list_view_button_press_event_cb (GossipContactListView *view,
}
static void
-contact_list_view_row_activated_cb (GossipContactListView *view,
+contact_list_view_row_activated_cb (EmpathyContactListView *view,
GtkTreePath *path,
GtkTreeViewColumn *col,
gpointer user_data)
{
- GossipContact *contact;
+ EmpathyContact *contact;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -1308,7 +1308,7 @@ contact_list_view_row_activated_cb (GossipContactListView *view,
}
static void
-contact_list_view_row_expand_or_collapse_cb (GossipContactListView *view,
+contact_list_view_row_expand_or_collapse_cb (EmpathyContactListView *view,
GtkTreeIter *iter,
GtkTreePath *path,
gpointer user_data)
@@ -1324,20 +1324,20 @@ contact_list_view_row_expand_or_collapse_cb (GossipContactListView *view,
-1);
expanded = GPOINTER_TO_INT (user_data);
- gossip_contact_group_set_expanded (name, expanded);
+ empathy_contact_group_set_expanded (name, expanded);
g_free (name);
}
static gboolean
-contact_list_view_filter_show_contact (GossipContact *contact,
+contact_list_view_filter_show_contact (EmpathyContact *contact,
const gchar *filter)
{
gchar *str;
gboolean visible;
/* Check contact id */
- str = g_utf8_casefold (gossip_contact_get_id (contact), -1);
+ str = g_utf8_casefold (empathy_contact_get_id (contact), -1);
visible = G_STR_EMPTY (str) || strstr (str, filter);
g_free (str);
@@ -1346,7 +1346,7 @@ contact_list_view_filter_show_contact (GossipContact *contact,
}
/* Check contact name */
- str = g_utf8_casefold (gossip_contact_get_name (contact), -1);
+ str = g_utf8_casefold (empathy_contact_get_name (contact), -1);
visible = G_STR_EMPTY (str) || strstr (str, filter);
g_free (str);
@@ -1354,11 +1354,11 @@ contact_list_view_filter_show_contact (GossipContact *contact,
}
static gboolean
-contact_list_view_filter_show_group (GossipContactListView *view,
+contact_list_view_filter_show_group (EmpathyContactListView *view,
const gchar *group,
const gchar *filter)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
EmpathyContactList *list;
GList *contacts, *l;
gchar *str;
@@ -1383,10 +1383,10 @@ contact_list_view_filter_show_group (GossipContactListView *view,
* group should be shown because a contact we want to
* show exists in it.
*/
- list = gossip_contact_list_store_get_list_iface (priv->store);
+ list = empathy_contact_list_store_get_list_iface (priv->store);
contacts = empathy_contact_list_get_members (list);
for (l = contacts; l && !show_group; l = l->next) {
- if (!gossip_contact_is_in_group (l->data, group)) {
+ if (!empathy_contact_is_in_group (l->data, group)) {
g_object_unref (l->data);
continue;
}
@@ -1405,9 +1405,9 @@ contact_list_view_filter_show_group (GossipContactListView *view,
static gboolean
contact_list_view_filter_func (GtkTreeModel *model,
GtkTreeIter *iter,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
+ EmpathyContactListViewPriv *priv;
gboolean is_group;
gboolean is_separator;
gboolean visible = TRUE;
@@ -1435,7 +1435,7 @@ contact_list_view_filter_func (GtkTreeModel *model,
} else if (is_separator) {
/* Do nothing here */
} else {
- GossipContact *contact;
+ EmpathyContact *contact;
/* Check contact id */
gtk_tree_model_get (model, iter, COL_CONTACT, &contact, -1);
@@ -1449,10 +1449,10 @@ contact_list_view_filter_func (GtkTreeModel *model,
static void
contact_list_view_action_cb (GtkAction *action,
- GossipContactListView *view)
+ EmpathyContactListView *view)
{
- GossipContactListViewPriv *priv;
- GossipContact *contact;
+ EmpathyContactListViewPriv *priv;
+ EmpathyContact *contact;
const gchar *name;
gchar *group;
GtkWindow *parent;
@@ -1464,11 +1464,11 @@ contact_list_view_action_cb (GtkAction *action,
return;
}
- gossip_debug (DEBUG_DOMAIN, "Action:'%s' activated", name);
+ empathy_debug (DEBUG_DOMAIN, "Action:'%s' activated", name);
- contact = gossip_contact_list_view_get_selected (view);
- group = gossip_contact_list_view_get_selected_group (view);
- parent = gossip_get_toplevel_window (GTK_WIDGET (view));
+ contact = empathy_contact_list_view_get_selected (view);
+ group = empathy_contact_list_view_get_selected_group (view);
+ parent = empathy_get_toplevel_window (GTK_WIDGET (view));
if (contact && strcmp (name, "Chat") == 0) {
contact_list_view_action_activated (view, contact);
@@ -1483,7 +1483,7 @@ contact_list_view_action_cb (GtkAction *action,
/* FIXME: Ask for confirmation */
EmpathyContactList *list;
- list = gossip_contact_list_store_get_list_iface (priv->store);
+ list = empathy_contact_list_store_get_list_iface (priv->store);
empathy_contact_list_remove (list, contact,
_("Sorry, I don't want you in my contact list anymore."));
}
@@ -1492,8 +1492,8 @@ contact_list_view_action_cb (GtkAction *action,
else if (contact && strcmp (name, "SendFile") == 0) {
}
else if (contact && strcmp (name, "Log") == 0) {
- gossip_log_window_show (gossip_contact_get_account (contact),
- gossip_contact_get_id (contact),
+ empathy_log_window_show (empathy_contact_get_account (contact),
+ empathy_contact_get_id (contact),
FALSE,
parent);
}
@@ -1507,16 +1507,16 @@ contact_list_view_action_cb (GtkAction *action,
}
static void
-contact_list_view_action_activated (GossipContactListView *view,
- GossipContact *contact)
+contact_list_view_action_activated (EmpathyContactListView *view,
+ EmpathyContact *contact)
{
MissionControl *mc;
- mc = gossip_mission_control_new ();
+ mc = empathy_mission_control_new ();
mission_control_request_channel (mc,
- gossip_contact_get_account (contact),
+ empathy_contact_get_account (contact),
TP_IFACE_CHANNEL_TYPE_TEXT,
- gossip_contact_get_handle (contact),
+ empathy_contact_get_handle (contact),
TP_HANDLE_TYPE_CONTACT,
NULL, NULL);
g_object_unref (mc);
diff --git a/libempathy-gtk/empathy-contact-list-view.h b/libempathy-gtk/empathy-contact-list-view.h
new file mode 100644
index 000000000..4d7cf1cb9
--- /dev/null
+++ b/libempathy-gtk/empathy-contact-list-view.h
@@ -0,0 +1,78 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2005-2007 Imendio AB
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_CONTACT_LIST_VIEW_H__
+#define __EMPATHY_CONTACT_LIST_VIEW_H__
+
+#include <gtk/gtktreeview.h>
+
+#include <libempathy/empathy-contact.h>
+
+#include "empathy-contact-list-store.h"
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_CONTACT_LIST_VIEW (empathy_contact_list_view_get_type ())
+#define EMPATHY_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListView))
+#define EMPATHY_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewClass))
+#define EMPATHY_IS_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW))
+#define EMPATHY_IS_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_CONTACT_LIST_VIEW))
+#define EMPATHY_CONTACT_LIST_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_CONTACT_LIST_VIEW, EmpathyContactListViewClass))
+
+typedef struct _EmpathyContactListView EmpathyContactListView;
+typedef struct _EmpathyContactListViewClass EmpathyContactListViewClass;
+typedef struct _EmpathyContactListViewPriv EmpathyContactListViewPriv;
+
+struct _EmpathyContactListView {
+ GtkTreeView parent;
+};
+
+struct _EmpathyContactListViewClass {
+ GtkTreeViewClass parent_class;
+};
+
+typedef void (*EmpathyContactListViewDragReceivedFunc) (EmpathyContact *contact,
+ GdkDragAction action,
+ const gchar *old_group,
+ const gchar *new_group,
+ gpointer user_data);
+
+GType empathy_contact_list_view_get_type (void) G_GNUC_CONST;
+EmpathyContactListView *empathy_contact_list_view_new (EmpathyContactListStore *store);
+EmpathyContact * empathy_contact_list_view_get_selected (EmpathyContactListView *view);
+gchar * empathy_contact_list_view_get_selected_group (EmpathyContactListView *view);
+GtkWidget * empathy_contact_list_view_get_contact_menu (EmpathyContactListView *view,
+ EmpathyContact *contact);
+GtkWidget * empathy_contact_list_view_get_group_menu (EmpathyContactListView *view);
+void empathy_contact_list_view_set_filter (EmpathyContactListView *view,
+ const gchar *filter);
+void empathy_contact_list_view_set_drag_received_func (EmpathyContactListView *view,
+ EmpathyContactListViewDragReceivedFunc func,
+ gpointer user_data);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_CONTACT_LIST_VIEW_H__ */
+
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index ac43700d0..2f56a6e50 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -34,11 +34,11 @@
#include <libempathy/empathy-contact-manager.h>
#include "empathy-contact-widget.h"
-#include "gossip-account-chooser.h"
-#include "gossip-ui-utils.h"
+#include "empathy-account-chooser.h"
+#include "empathy-ui-utils.h"
typedef struct {
- GossipContact *contact;
+ EmpathyContact *contact;
gboolean is_user;
gboolean editable;
gboolean can_change_contact;
@@ -89,7 +89,7 @@ static void contact_widget_destroy_cb (GtkWidget
EmpathyContactWidget *information);
static void contact_widget_remove_contact (EmpathyContactWidget *information);
static void contact_widget_set_contact (EmpathyContactWidget *information,
- GossipContact *contact);
+ EmpathyContact *contact);
static void contact_widget_contact_setup (EmpathyContactWidget *information);
static void contact_widget_contact_update (EmpathyContactWidget *information);
static gboolean contact_widget_update_contact (EmpathyContactWidget *information);
@@ -139,7 +139,7 @@ enum {
};
GtkWidget *
-empathy_contact_widget_new (GossipContact *contact,
+empathy_contact_widget_new (EmpathyContact *contact,
gboolean editable)
{
EmpathyContactWidget *information;
@@ -148,14 +148,14 @@ empathy_contact_widget_new (GossipContact *contact,
information = g_slice_new0 (EmpathyContactWidget);
information->editable = editable;
if (contact) {
- information->is_user = gossip_contact_is_user (contact);
+ information->is_user = empathy_contact_is_user (contact);
information->can_change_contact = FALSE;
} else {
information->is_user = FALSE;
information->can_change_contact = TRUE;
}
- glade = gossip_glade_get_file ("empathy-contact-widget.glade",
+ glade = empathy_glade_get_file ("empathy-contact-widget.glade",
"vbox_contact_widget",
NULL,
"vbox_contact_widget", &information->vbox_contact_widget,
@@ -178,7 +178,7 @@ empathy_contact_widget_new (GossipContact *contact,
"hbox_client_requested", &information->hbow_client_requested,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
information,
"vbox_contact_widget", "destroy", contact_widget_destroy_cb,
"entry_group", "changed", contact_widget_entry_group_changed_cb,
@@ -205,7 +205,7 @@ empathy_contact_widget_new (GossipContact *contact,
return information->vbox_contact_widget;
}
-GossipContact *
+EmpathyContact *
empathy_contact_widget_get_contact (GtkWidget *widget)
{
EmpathyContactWidget *information;
@@ -252,7 +252,7 @@ contact_widget_remove_contact (EmpathyContactWidget *information)
static void
contact_widget_set_contact (EmpathyContactWidget *information,
- GossipContact *contact)
+ EmpathyContact *contact)
{
contact_widget_remove_contact (information);
if (contact) {
@@ -269,7 +269,7 @@ contact_widget_set_contact (EmpathyContactWidget *information,
static void
contact_widget_contact_setup (EmpathyContactWidget *information)
{
- /* FIXME: Use GossipAvatarImage if (editable && is_user) */
+ /* FIXME: Use EmpathyAvatarImage if (editable && is_user) */
information->widget_avatar = gtk_image_new ();
gtk_box_pack_end (GTK_BOX (information->hbox_contact),
information->widget_avatar,
@@ -278,7 +278,7 @@ contact_widget_contact_setup (EmpathyContactWidget *information)
/* Setup account label/chooser */
if (information->can_change_contact) {
- information->widget_account = gossip_account_chooser_new ();
+ information->widget_account = empathy_account_chooser_new ();
g_signal_connect (information->widget_account, "changed",
G_CALLBACK (contact_widget_account_changed_cb),
information);
@@ -340,8 +340,8 @@ contact_widget_contact_update (EmpathyContactWidget *information)
G_CALLBACK (contact_widget_avatar_notify_cb),
information);
- account = gossip_contact_get_account (information->contact);
- id = gossip_contact_get_id (information->contact);
+ account = empathy_contact_get_account (information->contact);
+ id = empathy_contact_get_id (information->contact);
}
/* Update account widget */
@@ -350,7 +350,7 @@ contact_widget_contact_update (EmpathyContactWidget *information)
g_signal_handlers_block_by_func (information->widget_account,
contact_widget_account_changed_cb,
information);
- gossip_account_chooser_set_account (GOSSIP_ACCOUNT_CHOOSER (information->widget_account),
+ empathy_account_chooser_set_account (EMPATHY_ACCOUNT_CHOOSER (information->widget_account),
account);
g_signal_handlers_unblock_by_func (information->widget_account,
contact_widget_account_changed_cb,
@@ -396,12 +396,12 @@ contact_widget_update_contact (EmpathyContactWidget *information)
McAccount *account;
const gchar *id;
- account = gossip_account_chooser_get_account (GOSSIP_ACCOUNT_CHOOSER (information->widget_account));
+ account = empathy_account_chooser_get_account (EMPATHY_ACCOUNT_CHOOSER (information->widget_account));
id = gtk_entry_get_text (GTK_ENTRY (information->widget_id));
if (account && !G_STR_EMPTY (id)) {
EmpathyContactManager *manager;
- GossipContact *contact;
+ EmpathyContact *contact;
manager = empathy_contact_manager_new ();
contact = empathy_contact_manager_create (manager, account, id);
@@ -441,7 +441,7 @@ contact_widget_entry_alias_focus_event_cb (GtkEditable *editable,
const gchar *name;
name = gtk_entry_get_text (GTK_ENTRY (editable));
- gossip_contact_set_name (information->contact, name);
+ empathy_contact_set_name (information->contact, name);
}
return FALSE;
@@ -452,10 +452,10 @@ contact_widget_name_notify_cb (EmpathyContactWidget *information)
{
if (information->editable) {
gtk_entry_set_text (GTK_ENTRY (information->widget_alias),
- gossip_contact_get_name (information->contact));
+ empathy_contact_get_name (information->contact));
} else {
gtk_label_set_label (GTK_LABEL (information->widget_alias),
- gossip_contact_get_name (information->contact));
+ empathy_contact_get_name (information->contact));
}
}
@@ -463,9 +463,9 @@ static void
contact_widget_presence_notify_cb (EmpathyContactWidget *information)
{
gtk_label_set_text (GTK_LABEL (information->label_status),
- gossip_contact_get_status (information->contact));
+ empathy_contact_get_status (information->contact));
gtk_image_set_from_icon_name (GTK_IMAGE (information->image_state),
- gossip_icon_name_for_contact (information->contact),
+ empathy_icon_name_for_contact (information->contact),
GTK_ICON_SIZE_BUTTON);
}
@@ -475,7 +475,7 @@ contact_widget_avatar_notify_cb (EmpathyContactWidget *information)
{
GdkPixbuf *avatar_pixbuf;
- avatar_pixbuf = gossip_pixbuf_avatar_from_contact_scaled (information->contact,
+ avatar_pixbuf = empathy_pixbuf_avatar_from_contact_scaled (information->contact,
48, 48);
if (avatar_pixbuf) {
@@ -602,7 +602,7 @@ contact_widget_groups_populate_data (EmpathyContactWidget *information)
manager = empathy_contact_manager_new ();
all_groups = empathy_contact_manager_get_groups (manager);
- my_groups = gossip_contact_get_groups (information->contact);
+ my_groups = empathy_contact_get_groups (information->contact);
g_object_unref (manager);
for (l = all_groups; l; l = l->next) {
@@ -724,9 +724,9 @@ contact_widget_cell_toggled (GtkCellRendererToggle *cell,
if (group) {
if (enabled) {
- gossip_contact_remove_group (information->contact, group);
+ empathy_contact_remove_group (information->contact, group);
} else {
- gossip_contact_add_group (information->contact, group);
+ empathy_contact_add_group (information->contact, group);
}
g_free (group);
@@ -778,7 +778,7 @@ contact_widget_button_group_clicked_cb (GtkButton *button,
COL_ENABLED, TRUE,
-1);
- gossip_contact_add_group (information->contact, group);
+ empathy_contact_add_group (information->contact, group);
}
static void
diff --git a/libempathy-gtk/empathy-contact-widget.h b/libempathy-gtk/empathy-contact-widget.h
index 3d33c4055..f48d15e70 100644
--- a/libempathy-gtk/empathy-contact-widget.h
+++ b/libempathy-gtk/empathy-contact-widget.h
@@ -25,13 +25,13 @@
#include <gtk/gtk.h>
-#include <libempathy/gossip-contact.h>
+#include <libempathy/empathy-contact.h>
G_BEGIN_DECLS
-GtkWidget * empathy_contact_widget_new (GossipContact *contact,
+GtkWidget * empathy_contact_widget_new (EmpathyContact *contact,
gboolean editable);
-GossipContact *empathy_contact_widget_get_contact (GtkWidget *widget);
+EmpathyContact *empathy_contact_widget_get_contact (GtkWidget *widget);
G_END_DECLS
#endif /* __EMPATHY_CONTACT_WIDGET_H__ */
diff --git a/libempathy-gtk/gossip-geometry.c b/libempathy-gtk/empathy-geometry.c
index ad0bd8dd1..531d21a94 100644
--- a/libempathy-gtk/gossip-geometry.c
+++ b/libempathy-gtk/empathy-geometry.c
@@ -29,9 +29,9 @@
#include <glib.h>
#include <gdk/gdk.h>
-#include <libempathy/gossip-debug.h>
+#include <libempathy/empathy-debug.h>
-#include "gossip-geometry.h"
+#include "empathy-geometry.h"
#define DEBUG_DOMAIN "Geometry"
@@ -52,7 +52,7 @@ geometry_get_filename (void)
dir = g_build_filename (g_get_home_dir (), ".gnome2", PACKAGE_NAME, NULL);
if (!g_file_test (dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
- gossip_debug (DEBUG_DOMAIN, "Creating directory:'%s'", dir);
+ empathy_debug (DEBUG_DOMAIN, "Creating directory:'%s'", dir);
g_mkdir_with_parents (dir, GEOMETRY_DIR_CREATE_MODE);
}
@@ -63,7 +63,7 @@ geometry_get_filename (void)
}
void
-gossip_geometry_save (const gchar *name,
+empathy_geometry_save (const gchar *name,
gint x,
gint y,
gint w,
@@ -79,7 +79,7 @@ gossip_geometry_save (const gchar *name,
gsize length;
gchar *str;
- gossip_debug (DEBUG_DOMAIN, "Saving window geometry: x:%d, y:%d, w:%d, h:%d\n",
+ empathy_debug (DEBUG_DOMAIN, "Saving window geometry: x:%d, y:%d, w:%d, h:%d\n",
x, y, w, h);
screen = gdk_screen_get_default ();
@@ -116,7 +116,7 @@ gossip_geometry_save (const gchar *name,
}
void
-gossip_geometry_load (const gchar *name,
+empathy_geometry_load (const gchar *name,
gint *x,
gint *y,
gint *w,
@@ -174,7 +174,7 @@ gossip_geometry_load (const gchar *name,
g_free (str);
}
- gossip_debug (DEBUG_DOMAIN, "Loading window geometry: x:%d, y:%d, w:%d, h:%d\n",
+ empathy_debug (DEBUG_DOMAIN, "Loading window geometry: x:%d, y:%d, w:%d, h:%d\n",
x ? *x : -1,
y ? *y : -1,
w ? *w : -1,
diff --git a/libempathy-gtk/gossip-geometry.h b/libempathy-gtk/empathy-geometry.h
index 24534fb38..512b64696 100644
--- a/libempathy-gtk/gossip-geometry.h
+++ b/libempathy-gtk/empathy-geometry.h
@@ -22,19 +22,19 @@
* Xavier Claessens <xclaesse@gmail.com>
*/
-#ifndef __GOSSIP_GEOMETRY_H__
-#define __GOSSIP_GEOMETRY_H__
+#ifndef __EMPATHY_GEOMETRY_H__
+#define __EMPATHY_GEOMETRY_H__
#include <glib.h>
G_BEGIN_DECLS
-void gossip_geometry_save (const gchar *name,
+void empathy_geometry_save (const gchar *name,
gint x,
gint y,
gint w,
gint h);
-void gossip_geometry_load (const gchar *name,
+void empathy_geometry_load (const gchar *name,
gint *x,
gint *y,
gint *w,
@@ -42,4 +42,4 @@ void gossip_geometry_load (const gchar *name,
G_END_DECLS
-#endif /* __GOSSIP_GEOMETRY_H__ */
+#endif /* __EMPATHY_GEOMETRY_H__ */
diff --git a/libempathy-gtk/gossip-group-chat.c b/libempathy-gtk/empathy-group-chat.c
index 9f3a0f79f..623547d9b 100644
--- a/libempathy-gtk/gossip-group-chat.c
+++ b/libempathy-gtk/empathy-group-chat.c
@@ -34,27 +34,27 @@
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-tp-chatroom.h>
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-debug.h>
-
-#include "gossip-group-chat.h"
-#include "gossip-chat.h"
-#include "gossip-chat-view.h"
-#include "gossip-contact-list-store.h"
-#include "gossip-contact-list-view.h"
-//#include "gossip-chat-invite.h"
-//#include "gossip-sound.h"
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-debug.h>
+
+#include "empathy-group-chat.h"
+#include "empathy-chat.h"
+#include "empathy-chat-view.h"
+#include "empathy-contact-list-store.h"
+#include "empathy-contact-list-view.h"
+//#include "empathy-chat-invite.h"
+//#include "empathy-sound.h"
#include "empathy-images.h"
-#include "gossip-ui-utils.h"
+#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "GroupChat"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_GROUP_CHAT, GossipGroupChatPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_GROUP_CHAT, EmpathyGroupChatPriv))
-struct _GossipGroupChatPriv {
- GossipContactListStore *store;
- GossipContactListView *view;
+struct _EmpathyGroupChatPriv {
+ EmpathyContactListStore *store;
+ EmpathyContactListView *view;
EmpathyTpChatroom *tp_chat;
GtkWidget *widget;
@@ -75,53 +75,53 @@ struct _GossipGroupChatPriv {
};
static void group_chat_finalize (GObject *object);
-static void group_chat_create_ui (GossipGroupChat *chat);
+static void group_chat_create_ui (EmpathyGroupChat *chat);
static void group_chat_widget_destroy_cb (GtkWidget *widget,
- GossipGroupChat *chat);
+ EmpathyGroupChat *chat);
static void group_chat_contact_added_cb (EmpathyTpChatroom *tp_chat,
- GossipContact *contact,
- GossipGroupChat *chat);
+ EmpathyContact *contact,
+ EmpathyGroupChat *chat);
static void group_chat_contact_removed_cb (EmpathyTpChatroom *tp_chat,
- GossipContact *contact,
- GossipGroupChat *chat);
+ EmpathyContact *contact,
+ EmpathyGroupChat *chat);
/*static void group_chat_topic_changed_cb (EmpathyTpChatroom *tp_chat,
const gchar *new_topic,
- GossipGroupChat *chat);*/
+ EmpathyGroupChat *chat);*/
static void group_chat_topic_entry_activate_cb (GtkWidget *entry,
GtkDialog *dialog);
static void group_chat_topic_response_cb (GtkWidget *dialog,
gint response,
- GossipGroupChat *chat);
-static const gchar * group_chat_get_name (GossipChat *chat);
-static gchar * group_chat_get_tooltip (GossipChat *chat);
-static const gchar * group_chat_get_status_icon_name (GossipChat *chat);
-static GtkWidget * group_chat_get_widget (GossipChat *chat);
-static gboolean group_chat_is_group_chat (GossipChat *chat);
-static void group_chat_set_tp_chat (GossipChat *chat,
+ EmpathyGroupChat *chat);
+static const gchar * group_chat_get_name (EmpathyChat *chat);
+static gchar * group_chat_get_tooltip (EmpathyChat *chat);
+static const gchar * group_chat_get_status_icon_name (EmpathyChat *chat);
+static GtkWidget * group_chat_get_widget (EmpathyChat *chat);
+static gboolean group_chat_is_group_chat (EmpathyChat *chat);
+static void group_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat);
static void group_chat_subject_notify_cb (EmpathyTpChat *tp_chat,
GParamSpec *param,
- GossipGroupChat *chat);
+ EmpathyGroupChat *chat);
static void group_chat_name_notify_cb (EmpathyTpChat *tp_chat,
GParamSpec *param,
- GossipGroupChat *chat);
+ EmpathyGroupChat *chat);
/*static gboolean group_chat_key_press_event (GtkWidget *widget,
GdkEventKey *event,
- GossipGroupChat *chat);*/
+ EmpathyGroupChat *chat);*/
static gint group_chat_contacts_completion_func (const gchar *s1,
const gchar *s2,
gsize n);
-G_DEFINE_TYPE (GossipGroupChat, gossip_group_chat, GOSSIP_TYPE_CHAT)
+G_DEFINE_TYPE (EmpathyGroupChat, empathy_group_chat, EMPATHY_TYPE_CHAT)
static void
-gossip_group_chat_class_init (GossipGroupChatClass *klass)
+empathy_group_chat_class_init (EmpathyGroupChatClass *klass)
{
GObjectClass *object_class;
- GossipChatClass *chat_class;
+ EmpathyChatClass *chat_class;
object_class = G_OBJECT_CLASS (klass);
- chat_class = GOSSIP_CHAT_CLASS (klass);
+ chat_class = EMPATHY_CHAT_CLASS (klass);
object_class->finalize = group_chat_finalize;
@@ -132,21 +132,21 @@ gossip_group_chat_class_init (GossipGroupChatClass *klass)
chat_class->is_group_chat = group_chat_is_group_chat;
chat_class->set_tp_chat = group_chat_set_tp_chat;
- g_type_class_add_private (object_class, sizeof (GossipGroupChatPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyGroupChatPriv));
}
static void
-gossip_group_chat_init (GossipGroupChat *chat)
+empathy_group_chat_init (EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
- GossipChatView *chatview;
+ EmpathyGroupChatPriv *priv;
+ EmpathyChatView *chatview;
priv = GET_PRIV (chat);
priv->contacts_visible = TRUE;
- chatview = GOSSIP_CHAT_VIEW (GOSSIP_CHAT (chat)->view);
- gossip_chat_view_set_is_group_chat (chatview, TRUE);
+ chatview = EMPATHY_CHAT_VIEW (EMPATHY_CHAT (chat)->view);
+ empathy_chat_view_set_is_group_chat (chatview, TRUE);
group_chat_create_ui (chat);
}
@@ -154,12 +154,12 @@ gossip_group_chat_init (GossipGroupChat *chat)
static void
group_chat_finalize (GObject *object)
{
- GossipGroupChat *chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *chat;
+ EmpathyGroupChatPriv *priv;
- gossip_debug (DEBUG_DOMAIN, "Finalized:%p", object);
+ empathy_debug (DEBUG_DOMAIN, "Finalized:%p", object);
- chat = GOSSIP_GROUP_CHAT (object);
+ chat = EMPATHY_GROUP_CHAT (object);
priv = GET_PRIV (chat);
g_free (priv->name);
@@ -168,54 +168,54 @@ group_chat_finalize (GObject *object)
g_object_unref (priv->tp_chat);
g_completion_free (priv->completion);
- G_OBJECT_CLASS (gossip_group_chat_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_group_chat_parent_class)->finalize (object);
}
-GossipGroupChat *
-gossip_group_chat_new (McAccount *account,
+EmpathyGroupChat *
+empathy_group_chat_new (McAccount *account,
TpChan *tp_chan)
{
- GossipGroupChat *chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *chat;
+ EmpathyGroupChatPriv *priv;
g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (TELEPATHY_IS_CHAN (tp_chan), NULL);
- chat = g_object_new (GOSSIP_TYPE_GROUP_CHAT, NULL);
+ chat = g_object_new (EMPATHY_TYPE_GROUP_CHAT, NULL);
priv = GET_PRIV (chat);
- GOSSIP_CHAT (chat)->account = g_object_ref (account);
+ EMPATHY_CHAT (chat)->account = g_object_ref (account);
priv->tp_chat = empathy_tp_chatroom_new (account, tp_chan);
- gossip_chat_set_tp_chat (GOSSIP_CHAT (chat), EMPATHY_TP_CHAT (priv->tp_chat));
+ empathy_chat_set_tp_chat (EMPATHY_CHAT (chat), EMPATHY_TP_CHAT (priv->tp_chat));
return chat;
}
gboolean
-gossip_group_chat_get_show_contacts (GossipGroupChat *chat)
+empathy_group_chat_get_show_contacts (EmpathyGroupChat *chat)
{
- GossipGroupChat *group_chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *group_chat;
+ EmpathyGroupChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_GROUP_CHAT (chat), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_GROUP_CHAT (chat), FALSE);
- group_chat = GOSSIP_GROUP_CHAT (chat);
+ group_chat = EMPATHY_GROUP_CHAT (chat);
priv = GET_PRIV (group_chat);
return priv->contacts_visible;
}
void
-gossip_group_chat_set_show_contacts (GossipGroupChat *chat,
+empathy_group_chat_set_show_contacts (EmpathyGroupChat *chat,
gboolean show)
{
- GossipGroupChat *group_chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *group_chat;
+ EmpathyGroupChatPriv *priv;
- g_return_if_fail (GOSSIP_IS_GROUP_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_GROUP_CHAT (chat));
- group_chat = GOSSIP_GROUP_CHAT (chat);
+ group_chat = EMPATHY_GROUP_CHAT (chat);
priv = GET_PRIV (group_chat);
priv->contacts_visible = show;
@@ -231,22 +231,22 @@ gossip_group_chat_set_show_contacts (GossipGroupChat *chat,
}
void
-gossip_group_chat_set_topic (GossipGroupChat *chat)
+empathy_group_chat_set_topic (EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
- GossipChatWindow *chat_window;
+ EmpathyGroupChatPriv *priv;
+ EmpathyChatWindow *chat_window;
GtkWidget *chat_dialog;
GtkWidget *dialog;
GtkWidget *entry;
GtkWidget *hbox;
const gchar *topic;
- g_return_if_fail (GOSSIP_IS_GROUP_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_GROUP_CHAT (chat));
priv = GET_PRIV (chat);
- chat_window = gossip_chat_get_window (GOSSIP_CHAT (chat));
- chat_dialog = gossip_chat_window_get_dialog (chat_window);
+ chat_window = empathy_chat_get_window (EMPATHY_CHAT (chat));
+ chat_dialog = empathy_chat_window_get_dialog (chat_window);
dialog = gtk_message_dialog_new (GTK_WINDOW (chat_dialog),
0,
@@ -280,15 +280,15 @@ gossip_group_chat_set_topic (GossipGroupChat *chat)
}
static void
-group_chat_create_ui (GossipGroupChat *chat)
+group_chat_create_ui (EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
GladeXML *glade;
GList *list = NULL;
priv = GET_PRIV (chat);
- glade = gossip_glade_get_file ("gossip-group-chat.glade",
+ glade = empathy_glade_get_file ("empathy-group-chat.glade",
"group_chat_widget",
NULL,
"group_chat_widget", &priv->widget,
@@ -301,7 +301,7 @@ group_chat_create_ui (GossipGroupChat *chat)
"scrolled_window_contacts", &priv->scrolled_window_contacts,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
chat,
"group_chat_widget", "destroy", group_chat_widget_destroy_cb,
NULL);
@@ -312,13 +312,13 @@ group_chat_create_ui (GossipGroupChat *chat)
/* Add room GtkTextView. */
gtk_container_add (GTK_CONTAINER (priv->scrolled_window_chat),
- GTK_WIDGET (GOSSIP_CHAT (chat)->view));
- gtk_widget_show (GTK_WIDGET (GOSSIP_CHAT (chat)->view));
+ GTK_WIDGET (EMPATHY_CHAT (chat)->view));
+ gtk_widget_show (GTK_WIDGET (EMPATHY_CHAT (chat)->view));
/* Add input GtkTextView */
gtk_container_add (GTK_CONTAINER (priv->scrolled_window_input),
- GOSSIP_CHAT (chat)->input_text_view);
- gtk_widget_show (GOSSIP_CHAT (chat)->input_text_view);
+ EMPATHY_CHAT (chat)->input_text_view);
+ gtk_widget_show (EMPATHY_CHAT (chat)->input_text_view);
/* Add nick name completion */
priv->completion = g_completion_new (NULL);
@@ -343,42 +343,42 @@ group_chat_create_ui (GossipGroupChat *chat)
static void
group_chat_widget_destroy_cb (GtkWidget *widget,
- GossipGroupChat *chat)
+ EmpathyGroupChat *chat)
{
- gossip_debug (DEBUG_DOMAIN, "Destroyed");
+ empathy_debug (DEBUG_DOMAIN, "Destroyed");
g_object_unref (chat);
}
static void
group_chat_contact_added_cb (EmpathyTpChatroom *tp_chat,
- GossipContact *contact,
- GossipGroupChat *chat)
+ EmpathyContact *contact,
+ EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
gchar *str;
priv = GET_PRIV (chat);
str = g_strdup_printf (_("%s has joined the room"),
- gossip_contact_get_name (contact));
- gossip_chat_view_append_event (GOSSIP_CHAT (chat)->view, str);
+ empathy_contact_get_name (contact));
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
g_free (str);
}
static void
group_chat_contact_removed_cb (EmpathyTpChatroom *tp_chat,
- GossipContact *contact,
- GossipGroupChat *chat)
+ EmpathyContact *contact,
+ EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
gchar *str;
priv = GET_PRIV (chat);
str = g_strdup_printf (_("%s has left the room"),
- gossip_contact_get_name (contact));
- gossip_chat_view_append_event (GOSSIP_CHAT (chat)->view, str);
+ empathy_contact_get_name (contact));
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
g_free (str);
}
@@ -392,7 +392,7 @@ group_chat_topic_entry_activate_cb (GtkWidget *entry,
static void
group_chat_topic_response_cb (GtkWidget *dialog,
gint response,
- GossipGroupChat *chat)
+ EmpathyGroupChat *chat)
{
if (response == GTK_RESPONSE_OK) {
GtkWidget *entry;
@@ -402,7 +402,7 @@ group_chat_topic_response_cb (GtkWidget *dialog,
topic = gtk_entry_get_text (GTK_ENTRY (entry));
if (!G_STR_EMPTY (topic)) {
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
priv = GET_PRIV (chat);
@@ -414,21 +414,21 @@ group_chat_topic_response_cb (GtkWidget *dialog,
}
static const gchar *
-group_chat_get_name (GossipChat *chat)
+group_chat_get_name (EmpathyChat *chat)
{
- GossipGroupChat *group_chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *group_chat;
+ EmpathyGroupChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_GROUP_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_GROUP_CHAT (chat), NULL);
- group_chat = GOSSIP_GROUP_CHAT (chat);
+ group_chat = EMPATHY_GROUP_CHAT (chat);
priv = GET_PRIV (group_chat);
if (!priv->name) {
const gchar *id;
const gchar *server;
- id = gossip_chat_get_id (chat);
+ id = empathy_chat_get_id (chat);
server = strstr (id, "@");
if (server) {
@@ -442,14 +442,14 @@ group_chat_get_name (GossipChat *chat)
}
static gchar *
-group_chat_get_tooltip (GossipChat *chat)
+group_chat_get_tooltip (EmpathyChat *chat)
{
- GossipGroupChat *group_chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *group_chat;
+ EmpathyGroupChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_GROUP_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_GROUP_CHAT (chat), NULL);
- group_chat = GOSSIP_GROUP_CHAT (chat);
+ group_chat = EMPATHY_GROUP_CHAT (chat);
priv = GET_PRIV (group_chat);
if (priv->topic) {
@@ -466,43 +466,43 @@ group_chat_get_tooltip (GossipChat *chat)
}
static const gchar *
-group_chat_get_status_icon_name (GossipChat *chat)
+group_chat_get_status_icon_name (EmpathyChat *chat)
{
return EMPATHY_IMAGE_GROUP_MESSAGE;
}
static GtkWidget *
-group_chat_get_widget (GossipChat *chat)
+group_chat_get_widget (EmpathyChat *chat)
{
- GossipGroupChat *group_chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *group_chat;
+ EmpathyGroupChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_GROUP_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_GROUP_CHAT (chat), NULL);
- group_chat = GOSSIP_GROUP_CHAT (chat);
+ group_chat = EMPATHY_GROUP_CHAT (chat);
priv = GET_PRIV (group_chat);
return priv->widget;
}
static gboolean
-group_chat_is_group_chat (GossipChat *chat)
+group_chat_is_group_chat (EmpathyChat *chat)
{
- g_return_val_if_fail (GOSSIP_IS_GROUP_CHAT (chat), FALSE);
+ g_return_val_if_fail (EMPATHY_IS_GROUP_CHAT (chat), FALSE);
return TRUE;
}
static void
-group_chat_set_tp_chat (GossipChat *chat,
+group_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat)
{
- GossipGroupChat *group_chat;
- GossipGroupChatPriv *priv;
+ EmpathyGroupChat *group_chat;
+ EmpathyGroupChatPriv *priv;
- g_return_if_fail (GOSSIP_IS_GROUP_CHAT (chat));
+ g_return_if_fail (EMPATHY_IS_GROUP_CHAT (chat));
- group_chat = GOSSIP_GROUP_CHAT (chat);
+ group_chat = EMPATHY_GROUP_CHAT (chat);
priv = GET_PRIV (group_chat);
/* Free all resources related to tp_chat */
@@ -536,8 +536,8 @@ group_chat_set_tp_chat (GossipChat *chat,
empathy_tp_chatroom_accept_invitation (priv->tp_chat);
/* Create contact list */
- priv->store = gossip_contact_list_store_new (EMPATHY_CONTACT_LIST (priv->tp_chat));
- priv->view = gossip_contact_list_view_new (priv->store);
+ priv->store = empathy_contact_list_store_new (EMPATHY_CONTACT_LIST (priv->tp_chat));
+ priv->view = empathy_contact_list_view_new (priv->store);
gtk_container_add (GTK_CONTAINER (priv->scrolled_window_contacts),
GTK_WIDGET (priv->view));
gtk_widget_show (GTK_WIDGET (priv->view));
@@ -560,9 +560,9 @@ group_chat_set_tp_chat (GossipChat *chat,
static void
group_chat_subject_notify_cb (EmpathyTpChat *tp_chat,
GParamSpec *param,
- GossipGroupChat *chat)
+ EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
gchar *str;
priv = GET_PRIV (chat);
@@ -573,16 +573,16 @@ group_chat_subject_notify_cb (EmpathyTpChat *tp_chat,
gtk_label_set_text (GTK_LABEL (priv->label_topic), priv->topic);
str = g_strdup_printf (_("Topic set to: %s"), priv->topic);
- gossip_chat_view_append_event (GOSSIP_CHAT (chat)->view, str);
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, str);
g_free (str);
}
static void
group_chat_name_notify_cb (EmpathyTpChat *tp_chat,
GParamSpec *param,
- GossipGroupChat *chat)
+ EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
priv = GET_PRIV (chat);
@@ -594,9 +594,9 @@ group_chat_name_notify_cb (EmpathyTpChat *tp_chat,
static gboolean
group_chat_key_press_event (GtkWidget *widget,
GdkEventKey *event,
- GossipGroupChat *chat)
+ EmpathyGroupChat *chat)
{
- GossipGroupChatPriv *priv;
+ EmpathyGroupChatPriv *priv;
GtkAdjustment *adj;
gdouble val;
GtkTextBuffer *buffer;
@@ -611,7 +611,7 @@ group_chat_key_press_event (GtkWidget *widget,
if ((event->state & GDK_CONTROL_MASK) != GDK_CONTROL_MASK &&
(event->state & GDK_SHIFT_MASK) != GDK_SHIFT_MASK &&
event->keyval == GDK_Tab) {
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (GOSSIP_CHAT (chat)->input_text_view));
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (EMPATHY_CHAT (chat)->input_text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &current, gtk_text_buffer_get_insert (buffer));
/* Get the start of the nick to complete. */
diff --git a/libempathy-gtk/gossip-group-chat.glade b/libempathy-gtk/empathy-group-chat.glade
index 7b6f2c00f..885afc5b4 100644
--- a/libempathy-gtk/gossip-group-chat.glade
+++ b/libempathy-gtk/empathy-group-chat.glade
@@ -13,7 +13,7 @@
<property name="default_height">400</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
- <property name="icon">gossip-group-message.png</property>
+ <property name="icon">empathy-group-message.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
diff --git a/libempathy-gtk/empathy-group-chat.h b/libempathy-gtk/empathy-group-chat.h
new file mode 100644
index 000000000..fc7567856
--- /dev/null
+++ b/libempathy-gtk/empathy-group-chat.h
@@ -0,0 +1,69 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2002-2007 Imendio AB
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_GROUP_CHAT_H__
+#define __EMPATHY_GROUP_CHAT_H__
+
+G_BEGIN_DECLS
+
+#include <libtelepathy/tp-chan.h>
+
+#include <libmissioncontrol/mc-account.h>
+
+#define EMPATHY_TYPE_GROUP_CHAT (empathy_group_chat_get_type ())
+#define EMPATHY_GROUP_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_GROUP_CHAT, EmpathyGroupChat))
+#define EMPATHY_GROUP_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_GROUP_CHAT, EmpathyGroupChatClass))
+#define EMPATHY_IS_GROUP_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_GROUP_CHAT))
+#define EMPATHY_IS_GROUP_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_GROUP_CHAT))
+#define EMPATHY_GROUP_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_GROUP_CHAT, EmpathyGroupChatClass))
+
+typedef struct _EmpathyGroupChat EmpathyGroupChat;
+typedef struct _EmpathyGroupChatClass EmpathyGroupChatClass;
+typedef struct _EmpathyGroupChatPriv EmpathyGroupChatPriv;
+
+#include "empathy-chat.h"
+
+struct _EmpathyGroupChat {
+ EmpathyChat parent;
+
+ EmpathyGroupChatPriv *priv;
+};
+
+struct _EmpathyGroupChatClass {
+ EmpathyChatClass parent_class;
+};
+
+GType empathy_group_chat_get_type (void) G_GNUC_CONST;
+EmpathyGroupChat *empathy_group_chat_new (McAccount *account,
+ TpChan *tp_chan);
+gboolean empathy_group_chat_get_show_contacts (EmpathyGroupChat *chat);
+void empathy_group_chat_set_show_contacts (EmpathyGroupChat *chat,
+ gboolean show);
+void empathy_group_chat_set_topic (EmpathyGroupChat *chat);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_GROUP_CHAT_H__ */
diff --git a/libempathy-gtk/gossip-log-window.c b/libempathy-gtk/empathy-log-window.c
index dae8b79a9..53eb39c8f 100644
--- a/libempathy-gtk/gossip-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -32,17 +32,17 @@
#include <glade/glade.h>
#include <libempathy/empathy-log-manager.h>
-#include <libempathy/gossip-chatroom-manager.h>
-#include <libempathy/gossip-chatroom.h>
-#include <libempathy/gossip-message.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-time.h>
-
-#include "gossip-log-window.h"
-#include "gossip-account-chooser.h"
-#include "gossip-chat-view.h"
-#include "gossip-ui-utils.h"
+#include <libempathy/empathy-chatroom-manager.h>
+#include <libempathy/empathy-chatroom.h>
+#include <libempathy/empathy-message.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-time.h>
+
+#include "empathy-log-window.h"
+#include "empathy-account-chooser.h"
+#include "empathy-chat-view.h"
+#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "LogWindow"
@@ -55,7 +55,7 @@ typedef struct {
GtkWidget *button_find;
GtkWidget *treeview_find;
GtkWidget *scrolledwindow_find;
- GossipChatView *chatview_find;
+ EmpathyChatView *chatview_find;
GtkWidget *button_previous;
GtkWidget *button_next;
@@ -65,75 +65,75 @@ typedef struct {
GtkWidget *calendar_chats;
GtkWidget *treeview_chats;
GtkWidget *scrolledwindow_chats;
- GossipChatView *chatview_chats;
+ EmpathyChatView *chatview_chats;
gchar *last_find;
EmpathyLogManager *log_manager;
-} GossipLogWindow;
+} EmpathyLogWindow;
static void
log_window_destroy_cb (GtkWidget *widget,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_entry_find_changed_cb (GtkWidget *entry,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_find_changed_cb (GtkTreeSelection *selection,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
-log_window_find_populate (GossipLogWindow *window,
+log_window_find_populate (EmpathyLogWindow *window,
const gchar *search_criteria);
static void
-log_window_find_setup (GossipLogWindow *window);
+log_window_find_setup (EmpathyLogWindow *window);
static void
log_window_button_find_clicked_cb (GtkWidget *widget,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_button_next_clicked_cb (GtkWidget *widget,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_button_previous_clicked_cb (GtkWidget *widget,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_chats_changed_cb (GtkTreeSelection *selection,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
-log_window_chats_populate (GossipLogWindow *window);
+log_window_chats_populate (EmpathyLogWindow *window);
static void
-log_window_chats_setup (GossipLogWindow *window);
+log_window_chats_setup (EmpathyLogWindow *window);
static void
log_window_chats_accounts_changed_cb (GtkWidget *combobox,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
-log_window_chats_new_message_cb (GossipContact *own_contact,
- GossipMessage *message,
- GossipLogWindow *window);
+log_window_chats_new_message_cb (EmpathyContact *own_contact,
+ EmpathyMessage *message,
+ EmpathyLogWindow *window);
static void
-log_window_chats_set_selected (GossipLogWindow *window,
+log_window_chats_set_selected (EmpathyLogWindow *window,
McAccount *account,
const gchar *chat_id,
gboolean is_chatroom);
static gboolean
-log_window_chats_get_selected (GossipLogWindow *window,
+log_window_chats_get_selected (EmpathyLogWindow *window,
McAccount **account,
gchar **chat_id,
gboolean *is_chatroom);
static void
-log_window_chats_get_messages (GossipLogWindow *window,
+log_window_chats_get_messages (EmpathyLogWindow *window,
const gchar *date_to_show);
static void
log_window_calendar_chats_day_selected_cb (GtkWidget *calendar,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_entry_chats_changed_cb (GtkWidget *entry,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
static void
log_window_entry_chats_activate_cb (GtkWidget *entry,
- GossipLogWindow *window);
+ EmpathyLogWindow *window);
enum {
COL_FIND_ACCOUNT_ICON,
@@ -157,13 +157,13 @@ enum {
};
void
-gossip_log_window_show (McAccount *account,
+empathy_log_window_show (McAccount *account,
const gchar *chat_id,
gboolean is_chatroom,
GtkWindow *parent)
{
- static GossipLogWindow *window = NULL;
- GossipAccountChooser *account_chooser;
+ static EmpathyLogWindow *window = NULL;
+ EmpathyAccountChooser *account_chooser;
GList *accounts;
gint account_num;
GladeXML *glade;
@@ -180,10 +180,10 @@ gossip_log_window_show (McAccount *account,
return;
}
- window = g_new0 (GossipLogWindow, 1);
+ window = g_new0 (EmpathyLogWindow, 1);
window->log_manager = empathy_log_manager_new ();
- glade = gossip_glade_get_file ("gossip-log-window.glade",
+ glade = empathy_glade_get_file ("empathy-log-window.glade",
"log_window",
NULL,
"log_window", &window->window,
@@ -200,7 +200,7 @@ gossip_log_window_show (McAccount *account,
"treeview_chats", &window->treeview_chats,
"scrolledwindow_chats", &window->scrolledwindow_chats,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
window,
"log_window", "destroy", log_window_destroy_cb,
"entry_find", "changed", log_window_entry_find_changed_cb,
@@ -224,22 +224,22 @@ gossip_log_window_show (McAccount *account,
G_CALLBACK (log_window_calendar_chats_month_changed_cb),
window);
- /* Configure Search GossipChatView */
- window->chatview_find = gossip_chat_view_new ();
+ /* Configure Search EmpathyChatView */
+ window->chatview_find = empathy_chat_view_new ();
gtk_container_add (GTK_CONTAINER (window->scrolledwindow_find),
GTK_WIDGET (window->chatview_find));
gtk_widget_show (GTK_WIDGET (window->chatview_find));
- /* Configure Contacts GossipChatView */
- window->chatview_chats = gossip_chat_view_new ();
+ /* Configure Contacts EmpathyChatView */
+ window->chatview_chats = empathy_chat_view_new ();
gtk_container_add (GTK_CONTAINER (window->scrolledwindow_chats),
GTK_WIDGET (window->chatview_chats));
gtk_widget_show (GTK_WIDGET (window->chatview_chats));
/* Account chooser for chats */
- window->account_chooser_chats = gossip_account_chooser_new ();
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (window->account_chooser_chats);
- gossip_account_chooser_set_can_select_all (account_chooser, TRUE);
+ window->account_chooser_chats = empathy_account_chooser_new ();
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser_chats);
+ empathy_account_chooser_set_can_select_all (account_chooser, TRUE);
gtk_box_pack_start (GTK_BOX (window->vbox_chats),
window->account_chooser_chats,
@@ -286,7 +286,7 @@ gossip_log_window_show (McAccount *account,
static void
log_window_destroy_cb (GtkWidget *widget,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
g_signal_handlers_disconnect_by_func (window->log_manager,
log_window_chats_new_message_cb,
@@ -303,7 +303,7 @@ log_window_destroy_cb (GtkWidget *widget,
*/
static void
log_window_entry_find_changed_cb (GtkWidget *entry,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
const gchar *str;
gboolean is_sensitive = TRUE;
@@ -320,7 +320,7 @@ log_window_entry_find_changed_cb (GtkWidget *entry,
static void
log_window_find_changed_cb (GtkTreeSelection *selection,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -329,7 +329,7 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
gchar *chat_id;
gboolean is_chatroom;
gchar *date;
- GossipMessage *message;
+ EmpathyMessage *message;
GList *messages;
GList *l;
gboolean can_do_previous;
@@ -343,7 +343,7 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
gtk_widget_set_sensitive (window->button_previous, FALSE);
gtk_widget_set_sensitive (window->button_next, FALSE);
- gossip_chat_view_clear (window->chatview_find);
+ empathy_chat_view_clear (window->chatview_find);
return;
}
@@ -359,10 +359,10 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
-1);
/* Clear all current messages shown in the textview */
- gossip_chat_view_clear (window->chatview_find);
+ empathy_chat_view_clear (window->chatview_find);
/* Turn off scrolling temporarily */
- gossip_chat_view_scroll (window->chatview_find, FALSE);
+ empathy_chat_view_scroll (window->chatview_find, FALSE);
/* Get messages */
messages = empathy_log_manager_get_messages_for_date (window->log_manager,
@@ -376,21 +376,21 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
for (l = messages; l; l = l->next) {
message = l->data;
- gossip_chat_view_append_message (window->chatview_find, message);
+ empathy_chat_view_append_message (window->chatview_find, message);
g_object_unref (message);
}
g_list_free (messages);
/* Scroll to the most recent messages */
- gossip_chat_view_scroll (window->chatview_find, TRUE);
+ empathy_chat_view_scroll (window->chatview_find, TRUE);
/* Highlight and find messages */
- gossip_chat_view_highlight (window->chatview_find,
+ empathy_chat_view_highlight (window->chatview_find,
window->last_find);
- gossip_chat_view_find_next (window->chatview_find,
+ empathy_chat_view_find_next (window->chatview_find,
window->last_find,
TRUE);
- gossip_chat_view_find_abilities (window->chatview_find,
+ empathy_chat_view_find_abilities (window->chatview_find,
window->last_find,
&can_do_previous,
&can_do_next);
@@ -400,7 +400,7 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
}
static void
-log_window_find_populate (GossipLogWindow *window,
+log_window_find_populate (EmpathyLogWindow *window,
const gchar *search_criteria)
{
GList *hits, *l;
@@ -416,7 +416,7 @@ log_window_find_populate (GossipLogWindow *window,
selection = gtk_tree_view_get_selection (view);
store = GTK_LIST_STORE (model);
- gossip_chat_view_clear (window->chatview_find);
+ empathy_chat_view_clear (window->chatview_find);
gtk_list_store_clear (store);
@@ -442,7 +442,7 @@ log_window_find_populate (GossipLogWindow *window,
date_readable = empathy_log_manager_get_date_readable (hit->date);
account_name = mc_account_get_display_name (hit->account);
- account_icon = gossip_icon_name_from_account (hit->account);
+ account_icon = empathy_icon_name_from_account (hit->account);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
@@ -470,7 +470,7 @@ log_window_find_populate (GossipLogWindow *window,
}
static void
-log_window_find_setup (GossipLogWindow *window)
+log_window_find_setup (EmpathyLogWindow *window)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -557,7 +557,7 @@ log_window_find_setup (GossipLogWindow *window)
static void
log_window_button_find_clicked_cb (GtkWidget *widget,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
const gchar *str;
@@ -576,16 +576,16 @@ log_window_button_find_clicked_cb (GtkWidget *widget,
static void
log_window_button_next_clicked_cb (GtkWidget *widget,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
if (window->last_find) {
gboolean can_do_previous;
gboolean can_do_next;
- gossip_chat_view_find_next (window->chatview_find,
+ empathy_chat_view_find_next (window->chatview_find,
window->last_find,
FALSE);
- gossip_chat_view_find_abilities (window->chatview_find,
+ empathy_chat_view_find_abilities (window->chatview_find,
window->last_find,
&can_do_previous,
&can_do_next);
@@ -596,16 +596,16 @@ log_window_button_next_clicked_cb (GtkWidget *widget,
static void
log_window_button_previous_clicked_cb (GtkWidget *widget,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
if (window->last_find) {
gboolean can_do_previous;
gboolean can_do_next;
- gossip_chat_view_find_previous (window->chatview_find,
+ empathy_chat_view_find_previous (window->chatview_find,
window->last_find,
FALSE);
- gossip_chat_view_find_abilities (window->chatview_find,
+ empathy_chat_view_find_abilities (window->chatview_find,
window->last_find,
&can_do_previous,
&can_do_next);
@@ -620,7 +620,7 @@ log_window_button_previous_clicked_cb (GtkWidget *widget,
static void
log_window_chats_changed_cb (GtkTreeSelection *selection,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
/* Use last date by default */
gtk_calendar_clear_marks (GTK_CALENDAR (window->calendar_chats));
@@ -629,9 +629,9 @@ log_window_chats_changed_cb (GtkTreeSelection *selection,
}
static void
-log_window_chats_populate (GossipLogWindow *window)
+log_window_chats_populate (EmpathyLogWindow *window)
{
- GossipAccountChooser *account_chooser;
+ EmpathyAccountChooser *account_chooser;
McAccount *account;
GList *chats, *l;
@@ -641,8 +641,8 @@ log_window_chats_populate (GossipLogWindow *window)
GtkListStore *store;
GtkTreeIter iter;
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (window->account_chooser_chats);
- account = gossip_account_chooser_get_account (account_chooser);
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser_chats);
+ account = empathy_account_chooser_get_account (account_chooser);
view = GTK_TREE_VIEW (window->treeview_chats);
model = gtk_tree_view_get_model (view);
@@ -688,7 +688,7 @@ log_window_chats_populate (GossipLogWindow *window)
}
static void
-log_window_chats_setup (GossipLogWindow *window)
+log_window_chats_setup (EmpathyLogWindow *window)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -748,32 +748,32 @@ log_window_chats_setup (GossipLogWindow *window)
static void
log_window_chats_accounts_changed_cb (GtkWidget *combobox,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
/* Clear all current messages shown in the textview */
- gossip_chat_view_clear (window->chatview_chats);
+ empathy_chat_view_clear (window->chatview_chats);
log_window_chats_populate (window);
}
static void
-log_window_chats_new_message_cb (GossipContact *own_contact,
- GossipMessage *message,
- GossipLogWindow *window)
+log_window_chats_new_message_cb (EmpathyContact *own_contact,
+ EmpathyMessage *message,
+ EmpathyLogWindow *window)
{
- gossip_chat_view_append_message (window->chatview_chats, message);
+ empathy_chat_view_append_message (window->chatview_chats, message);
/* Scroll to the most recent messages */
- gossip_chat_view_scroll_down (window->chatview_chats);
+ empathy_chat_view_scroll_down (window->chatview_chats);
}
static void
-log_window_chats_set_selected (GossipLogWindow *window,
+log_window_chats_set_selected (EmpathyLogWindow *window,
McAccount *account,
const gchar *chat_id,
gboolean is_chatroom)
{
- GossipAccountChooser *account_chooser;
+ EmpathyAccountChooser *account_chooser;
GtkTreeView *view;
GtkTreeModel *model;
GtkTreeSelection *selection;
@@ -781,8 +781,8 @@ log_window_chats_set_selected (GossipLogWindow *window,
GtkTreePath *path;
gboolean ok;
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (window->account_chooser_chats);
- gossip_account_chooser_set_account (account_chooser, account);
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (window->account_chooser_chats);
+ empathy_account_chooser_set_account (account_chooser, account);
view = GTK_TREE_VIEW (window->treeview_chats);
model = gtk_tree_view_get_model (view);
@@ -803,7 +803,7 @@ log_window_chats_set_selected (GossipLogWindow *window,
COL_CHAT_IS_CHATROOM, &this_is_chatroom,
-1);
- if (gossip_account_equal (this_account, account) &&
+ if (empathy_account_equal (this_account, account) &&
strcmp (this_chat_id, chat_id) == 0 &&
this_is_chatroom == is_chatroom) {
gtk_tree_selection_select_iter (selection, &iter);
@@ -821,7 +821,7 @@ log_window_chats_set_selected (GossipLogWindow *window,
}
static gboolean
-log_window_chats_get_selected (GossipLogWindow *window,
+log_window_chats_get_selected (EmpathyLogWindow *window,
McAccount **account,
gchar **chat_id,
gboolean *is_chatroom)
@@ -866,13 +866,13 @@ log_window_chats_get_selected (GossipLogWindow *window,
}
static void
-log_window_chats_get_messages (GossipLogWindow *window,
+log_window_chats_get_messages (EmpathyLogWindow *window,
const gchar *date_to_show)
{
McAccount *account;
gchar *chat_id;
gboolean is_chatroom;
- GossipMessage *message;
+ EmpathyMessage *message;
GList *messages;
GList *dates = NULL;
GList *l;
@@ -927,7 +927,7 @@ log_window_chats_get_messages (GossipLogWindow *window,
}
- gossip_debug (DEBUG_DOMAIN, "Marking date:'%s'", str);
+ empathy_debug (DEBUG_DOMAIN, "Marking date:'%s'", str);
gtk_calendar_mark_day (GTK_CALENDAR (window->calendar_chats), day);
if (l->next) {
@@ -963,10 +963,10 @@ log_window_chats_get_messages (GossipLogWindow *window,
window);
/* Clear all current messages shown in the textview */
- gossip_chat_view_clear (window->chatview_chats);
+ empathy_chat_view_clear (window->chatview_chats);
/* Turn off scrolling temporarily */
- gossip_chat_view_scroll (window->chatview_find, FALSE);
+ empathy_chat_view_scroll (window->chatview_find, FALSE);
/* Get messages */
messages = empathy_log_manager_get_messages_for_date (window->log_manager,
@@ -977,7 +977,7 @@ log_window_chats_get_messages (GossipLogWindow *window,
for (l = messages; l; l = l->next) {
message = l->data;
- gossip_chat_view_append_message (window->chatview_chats,
+ empathy_chat_view_append_message (window->chatview_chats,
message);
g_object_unref (message);
}
@@ -990,10 +990,10 @@ log_window_chats_get_messages (GossipLogWindow *window,
g_free (chat_id);
/* Turn back on scrolling */
- gossip_chat_view_scroll (window->chatview_find, TRUE);
+ empathy_chat_view_scroll (window->chatview_find, TRUE);
/* Scroll to the most recent messages */
- gossip_chat_view_scroll_down (window->chatview_chats);
+ empathy_chat_view_scroll_down (window->chatview_chats);
/* Give the search entry main focus */
gtk_widget_grab_focus (window->entry_chats);
@@ -1001,7 +1001,7 @@ log_window_chats_get_messages (GossipLogWindow *window,
static void
log_window_calendar_chats_day_selected_cb (GtkWidget *calendar,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
guint year;
guint month;
@@ -1016,7 +1016,7 @@ log_window_calendar_chats_day_selected_cb (GtkWidget *calendar,
date = g_strdup_printf ("%4.4d%2.2d%2.2d", year, month, day);
- gossip_debug (DEBUG_DOMAIN, "Currently selected date is:'%s'", date);
+ empathy_debug (DEBUG_DOMAIN, "Currently selected date is:'%s'", date);
log_window_chats_get_messages (window, date);
@@ -1025,7 +1025,7 @@ log_window_calendar_chats_day_selected_cb (GtkWidget *calendar,
static void
log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
McAccount *account;
gchar *chat_id;
@@ -1040,7 +1040,7 @@ log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
if (!log_window_chats_get_selected (window, &account,
&chat_id, &is_chatroom)) {
- gossip_debug (DEBUG_DOMAIN, "No chat selected to get dates for...");
+ empathy_debug (DEBUG_DOMAIN, "No chat selected to get dates for...");
return;
}
@@ -1072,7 +1072,7 @@ log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
sscanf (str, "%4d%2d%2d", &year, &month, &day);
if (year == year_selected && month == month_selected) {
- gossip_debug (DEBUG_DOMAIN, "Marking date:'%s'", str);
+ empathy_debug (DEBUG_DOMAIN, "Marking date:'%s'", str);
gtk_calendar_mark_day (GTK_CALENDAR (window->calendar_chats), day);
}
}
@@ -1080,22 +1080,22 @@ log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
g_list_foreach (dates, (GFunc) g_free, NULL);
g_list_free (dates);
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Currently showing month %d and year %d",
month_selected, year_selected);
}
static void
log_window_entry_chats_changed_cb (GtkWidget *entry,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
const gchar *str;
str = gtk_entry_get_text (GTK_ENTRY (window->entry_chats));
- gossip_chat_view_highlight (window->chatview_chats, str);
+ empathy_chat_view_highlight (window->chatview_chats, str);
if (str) {
- gossip_chat_view_find_next (window->chatview_chats,
+ empathy_chat_view_find_next (window->chatview_chats,
str,
TRUE);
}
@@ -1103,14 +1103,14 @@ log_window_entry_chats_changed_cb (GtkWidget *entry,
static void
log_window_entry_chats_activate_cb (GtkWidget *entry,
- GossipLogWindow *window)
+ EmpathyLogWindow *window)
{
const gchar *str;
str = gtk_entry_get_text (GTK_ENTRY (window->entry_chats));
if (str) {
- gossip_chat_view_find_next (window->chatview_chats,
+ empathy_chat_view_find_next (window->chatview_chats,
str,
FALSE);
}
diff --git a/libempathy-gtk/gossip-log-window.glade b/libempathy-gtk/empathy-log-window.glade
index 4309a3544..4309a3544 100644
--- a/libempathy-gtk/gossip-log-window.glade
+++ b/libempathy-gtk/empathy-log-window.glade
diff --git a/libempathy-gtk/gossip-log-window.h b/libempathy-gtk/empathy-log-window.h
index 7801072fd..09a986399 100644
--- a/libempathy-gtk/gossip-log-window.h
+++ b/libempathy-gtk/empathy-log-window.h
@@ -22,18 +22,18 @@
* Xavier Claessens <xclaesse@gmail.com>
*/
-#ifndef __GOSSIP_LOG_WINDOW_H__
-#define __GOSSIP_LOG_WINDOW_H__
+#ifndef __EMPATHY_LOG_WINDOW_H__
+#define __EMPATHY_LOG_WINDOW_H__
#include <libmissioncontrol/mc-account.h>
G_BEGIN_DECLS
-void gossip_log_window_show (McAccount *account,
+void empathy_log_window_show (McAccount *account,
const gchar *chat_id,
gboolean chatroom,
GtkWindow *parent);
G_END_DECLS
-#endif /* __GOSSIP_LOG_WINDOW_H__ */
+#endif /* __EMPATHY_LOG_WINDOW_H__ */
diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c
index 0e7b1fdda..7f61afcdb 100644
--- a/libempathy-gtk/empathy-main-window.c
+++ b/libempathy-gtk/empathy-main-window.c
@@ -27,30 +27,30 @@
#include <glade/glade.h>
#include <glib/gi18n.h>
-#include <libempathy/gossip-conf.h>
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-chatroom-manager.h>
-#include <libempathy/gossip-chatroom.h>
+#include <libempathy/empathy-conf.h>
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-chatroom-manager.h>
+#include <libempathy/empathy-chatroom.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-contact-manager.h>
#include "empathy-main-window.h"
#include "empathy-contact-dialogs.h"
#include "ephy-spinner.h"
-#include "gossip-contact-list-store.h"
-#include "gossip-contact-list-view.h"
-#include "gossip-presence-chooser.h"
-#include "gossip-ui-utils.h"
-#include "gossip-status-presets.h"
-#include "gossip-geometry.h"
-#include "gossip-preferences.h"
-#include "gossip-accounts-dialog.h"
-#include "gossip-about-dialog.h"
-#include "gossip-new-chatroom-dialog.h"
-#include "gossip-chatrooms-window.h"
-#include "gossip-log-window.h"
+#include "empathy-contact-list-store.h"
+#include "empathy-contact-list-view.h"
+#include "empathy-presence-chooser.h"
+#include "empathy-ui-utils.h"
+#include "empathy-status-presets.h"
+#include "empathy-geometry.h"
+#include "empathy-preferences.h"
+#include "empathy-accounts-dialog.h"
+#include "empathy-about-dialog.h"
+#include "empathy-new-chatroom-dialog.h"
+#include "empathy-chatrooms-window.h"
+#include "empathy-log-window.h"
#define DEBUG_DOMAIN "MainWindow"
@@ -64,10 +64,10 @@
#define GEOMETRY_NAME "main-window"
typedef struct {
- GossipContactListView *list_view;
- GossipContactListStore *list_store;
+ EmpathyContactListView *list_view;
+ EmpathyContactListStore *list_store;
MissionControl *mc;
- GossipChatroomManager *chatroom_manager;
+ EmpathyChatroomManager *chatroom_manager;
/* Main widgets */
GtkWidget *window;
@@ -102,18 +102,18 @@ typedef struct {
static void main_window_destroy_cb (GtkWidget *widget,
EmpathyMainWindow *window);
static void main_window_favorite_chatroom_menu_setup (EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_added_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
+static void main_window_favorite_chatroom_menu_added_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_removed_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
+static void main_window_favorite_chatroom_menu_removed_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
EmpathyMainWindow *window);
static void main_window_favorite_chatroom_menu_activate_cb (GtkMenuItem *menu_item,
- GossipChatroom *chatroom);
+ EmpathyChatroom *chatroom);
static void main_window_favorite_chatroom_menu_update (EmpathyMainWindow *window);
static void main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
- GossipChatroom *chatroom);
-static void main_window_favorite_chatroom_join (GossipChatroom *chatroom);
+ EmpathyChatroom *chatroom);
+static void main_window_favorite_chatroom_join (EmpathyChatroom *chatroom);
static void main_window_chat_quit_cb (GtkWidget *widget,
EmpathyMainWindow *window);
static void main_window_chat_new_message_cb (GtkWidget *widget,
@@ -161,16 +161,16 @@ static gboolean main_window_configure_event_timeout_cb (EmpathyMainWindo
static gboolean main_window_configure_event_cb (GtkWidget *widget,
GdkEventConfigure *event,
EmpathyMainWindow *window);
-static void main_window_notify_show_offline_cb (GossipConf *conf,
+static void main_window_notify_show_offline_cb (EmpathyConf *conf,
const gchar *key,
gpointer check_menu_item);
-static void main_window_notify_show_avatars_cb (GossipConf *conf,
+static void main_window_notify_show_avatars_cb (EmpathyConf *conf,
const gchar *key,
EmpathyMainWindow *window);
-static void main_window_notify_compact_contact_list_cb (GossipConf *conf,
+static void main_window_notify_compact_contact_list_cb (EmpathyConf *conf,
const gchar *key,
EmpathyMainWindow *window);
-static void main_window_notify_sort_criterium_cb (GossipConf *conf,
+static void main_window_notify_sort_criterium_cb (EmpathyConf *conf,
const gchar *key,
EmpathyMainWindow *window);
@@ -180,7 +180,7 @@ empathy_main_window_show (void)
static EmpathyMainWindow *window = NULL;
EmpathyContactList *list_iface;
GladeXML *glade;
- GossipConf *conf;
+ EmpathyConf *conf;
GtkWidget *sw;
GtkWidget *show_offline_widget;
GtkWidget *ebox;
@@ -199,7 +199,7 @@ empathy_main_window_show (void)
window = g_new0 (EmpathyMainWindow, 1);
/* Set up interface */
- glade = gossip_glade_get_file ("empathy-main-window.glade",
+ glade = empathy_glade_get_file ("empathy-main-window.glade",
"main_window",
NULL,
"main_window", &window->window,
@@ -214,7 +214,7 @@ empathy_main_window_show (void)
"roster_scrolledwindow", &sw,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
window,
"main_window", "destroy", main_window_destroy_cb,
"main_window", "configure_event", main_window_configure_event_cb,
@@ -239,7 +239,7 @@ empathy_main_window_show (void)
g_object_unref (glade);
window->tooltips = g_object_ref_sink (gtk_tooltips_new ());
- window->mc = gossip_mission_control_new ();
+ window->mc = empathy_mission_control_new ();
dbus_g_proxy_connect_signal (DBUS_G_PROXY (window->mc), "AccountStatusChanged",
G_CALLBACK (main_window_status_changed_cb),
window, NULL);
@@ -251,7 +251,7 @@ empathy_main_window_show (void)
gtk_widget_hide (window->edit_context_separator);
/* Set up presence chooser */
- window->presence_chooser = gossip_presence_chooser_new ();
+ window->presence_chooser = empathy_presence_chooser_new ();
gtk_widget_show (window->presence_chooser);
item = gtk_tool_item_new ();
gtk_widget_show (GTK_WIDGET (item));
@@ -284,12 +284,12 @@ empathy_main_window_show (void)
window);
/* Set up contact list. */
- gossip_status_presets_get_all ();
+ empathy_status_presets_get_all ();
list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_new ());
empathy_contact_list_setup (list_iface);
- window->list_store = gossip_contact_list_store_new (list_iface);
- window->list_view = gossip_contact_list_view_new (window->list_store);
+ window->list_store = empathy_contact_list_store_new (list_iface);
+ window->list_view = empathy_contact_list_view_new (window->list_store);
g_object_unref (list_iface);
gtk_widget_show (GTK_WIDGET (window->list_view));
@@ -300,13 +300,13 @@ empathy_main_window_show (void)
main_window_accels_load ();
/* Set window size. */
- gossip_geometry_load (GEOMETRY_NAME, &x, &y, &w, &h);
+ empathy_geometry_load (GEOMETRY_NAME, &x, &y, &w, &h);
if (w >= 1 && h >= 1) {
/* Use the defaults from the glade file if we
* don't have good w, h geometry.
*/
- gossip_debug (DEBUG_DOMAIN, "Configuring window default size w:%d, h:%d", w, h);
+ empathy_debug (DEBUG_DOMAIN, "Configuring window default size w:%d, h:%d", w, h);
gtk_window_set_default_size (GTK_WINDOW (window->window), w, h);
}
@@ -314,18 +314,18 @@ empathy_main_window_show (void)
/* Let the window manager position it if we
* don't have good x, y coordinates.
*/
- gossip_debug (DEBUG_DOMAIN, "Configuring window default position x:%d, y:%d", x, y);
+ empathy_debug (DEBUG_DOMAIN, "Configuring window default position x:%d, y:%d", x, y);
gtk_window_move (GTK_WINDOW (window->window), x, y);
}
- conf = gossip_conf_get ();
+ conf = empathy_conf_get ();
/* Show offline ? */
- gossip_conf_get_bool (conf,
- GOSSIP_PREFS_CONTACTS_SHOW_OFFLINE,
+ empathy_conf_get_bool (conf,
+ EMPATHY_PREFS_CONTACTS_SHOW_OFFLINE,
&show_offline);
- gossip_conf_notify_add (conf,
- GOSSIP_PREFS_CONTACTS_SHOW_OFFLINE,
+ empathy_conf_notify_add (conf,
+ EMPATHY_PREFS_CONTACTS_SHOW_OFFLINE,
main_window_notify_show_offline_cb,
show_offline_widget);
@@ -333,32 +333,32 @@ empathy_main_window_show (void)
show_offline);
/* Show avatars ? */
- gossip_conf_get_bool (conf,
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_get_bool (conf,
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
&show_avatars);
- gossip_conf_notify_add (conf,
- GOSSIP_PREFS_UI_SHOW_AVATARS,
- (GossipConfNotifyFunc) main_window_notify_show_avatars_cb,
+ empathy_conf_notify_add (conf,
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
+ (EmpathyConfNotifyFunc) main_window_notify_show_avatars_cb,
window);
- gossip_contact_list_store_set_show_avatars (window->list_store, show_avatars);
+ empathy_contact_list_store_set_show_avatars (window->list_store, show_avatars);
/* Is compact ? */
- gossip_conf_get_bool (conf,
- GOSSIP_PREFS_UI_COMPACT_CONTACT_LIST,
+ empathy_conf_get_bool (conf,
+ EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
&compact_contact_list);
- gossip_conf_notify_add (conf,
- GOSSIP_PREFS_UI_COMPACT_CONTACT_LIST,
- (GossipConfNotifyFunc) main_window_notify_compact_contact_list_cb,
+ empathy_conf_notify_add (conf,
+ EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
+ (EmpathyConfNotifyFunc) main_window_notify_compact_contact_list_cb,
window);
- gossip_contact_list_store_set_is_compact (window->list_store, compact_contact_list);
+ empathy_contact_list_store_set_is_compact (window->list_store, compact_contact_list);
/* Sort criterium */
- gossip_conf_notify_add (conf,
- GOSSIP_PREFS_CONTACTS_SORT_CRITERIUM,
- (GossipConfNotifyFunc) main_window_notify_sort_criterium_cb,
+ empathy_conf_notify_add (conf,
+ EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
+ (EmpathyConfNotifyFunc) main_window_notify_sort_criterium_cb,
window);
main_window_notify_sort_criterium_cb (conf,
- GOSSIP_PREFS_CONTACTS_SORT_CRITERIUM,
+ EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
window);
main_window_update_status (window);
@@ -396,8 +396,8 @@ main_window_favorite_chatroom_menu_setup (EmpathyMainWindow *window)
{
GList *chatrooms, *l;
- window->chatroom_manager = gossip_chatroom_manager_new ();
- chatrooms = gossip_chatroom_manager_get_chatrooms (window->chatroom_manager, NULL);
+ window->chatroom_manager = empathy_chatroom_manager_new ();
+ chatrooms = empathy_chatroom_manager_get_chatrooms (window->chatroom_manager, NULL);
window->room_menu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (window->room));
for (l = chatrooms; l; l = l->next) {
@@ -421,8 +421,8 @@ main_window_favorite_chatroom_menu_setup (EmpathyMainWindow *window)
}
static void
-main_window_favorite_chatroom_menu_added_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
+main_window_favorite_chatroom_menu_added_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
EmpathyMainWindow *window)
{
main_window_favorite_chatroom_menu_add (window, chatroom);
@@ -431,8 +431,8 @@ main_window_favorite_chatroom_menu_added_cb (GossipChatroomManager *manager,
}
static void
-main_window_favorite_chatroom_menu_removed_cb (GossipChatroomManager *manager,
- GossipChatroom *chatroom,
+main_window_favorite_chatroom_menu_removed_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
EmpathyMainWindow *window)
{
GtkWidget *menu_item;
@@ -447,7 +447,7 @@ main_window_favorite_chatroom_menu_removed_cb (GossipChatroomManager *manager,
static void
main_window_favorite_chatroom_menu_activate_cb (GtkMenuItem *menu_item,
- GossipChatroom *chatroom)
+ EmpathyChatroom *chatroom)
{
main_window_favorite_chatroom_join (chatroom);
}
@@ -457,7 +457,7 @@ main_window_favorite_chatroom_menu_update (EmpathyMainWindow *window)
{
GList *chatrooms;
- chatrooms = gossip_chatroom_manager_get_chatrooms (window->chatroom_manager, NULL);
+ chatrooms = empathy_chatroom_manager_get_chatrooms (window->chatroom_manager, NULL);
if (chatrooms) {
gtk_widget_show (window->room_sep);
@@ -471,7 +471,7 @@ main_window_favorite_chatroom_menu_update (EmpathyMainWindow *window)
static void
main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
- GossipChatroom *chatroom)
+ EmpathyChatroom *chatroom)
{
GtkWidget *menu_item;
const gchar *name;
@@ -480,7 +480,7 @@ main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
return;
}
- name = gossip_chatroom_get_name (chatroom);
+ name = empathy_chatroom_get_name (chatroom);
menu_item = gtk_menu_item_new_with_label (name);
g_object_set_data (G_OBJECT (chatroom), "menu_item", menu_item);
@@ -495,17 +495,17 @@ main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
}
static void
-main_window_favorite_chatroom_join (GossipChatroom *chatroom)
+main_window_favorite_chatroom_join (EmpathyChatroom *chatroom)
{
MissionControl *mc;
McAccount *account;
const gchar *room;
- mc = gossip_mission_control_new ();
- account = gossip_chatroom_get_account (chatroom);
- room = gossip_chatroom_get_room (chatroom);
+ mc = empathy_mission_control_new ();
+ account = empathy_chatroom_get_account (chatroom);
+ room = empathy_chatroom_get_room (chatroom);
- gossip_debug (DEBUG_DOMAIN, "Requesting channel for '%s'", room);
+ empathy_debug (DEBUG_DOMAIN, "Requesting channel for '%s'", room);
mission_control_request_channel_with_string_handle (mc,
account,
@@ -527,21 +527,21 @@ static void
main_window_chat_new_message_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- //gossip_new_message_dialog_show (GTK_WINDOW (window->window));
+ //empathy_new_message_dialog_show (GTK_WINDOW (window->window));
}
static void
main_window_chat_history_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- gossip_log_window_show (NULL, NULL, FALSE, GTK_WINDOW (window->window));
+ empathy_log_window_show (NULL, NULL, FALSE, GTK_WINDOW (window->window));
}
static void
main_window_room_join_new_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- gossip_new_chatroom_dialog_show (GTK_WINDOW (window->window));
+ empathy_new_chatroom_dialog_show (GTK_WINDOW (window->window));
}
static void
@@ -550,7 +550,7 @@ main_window_room_join_favorites_cb (GtkWidget *widget,
{
GList *chatrooms, *l;
- chatrooms = gossip_chatroom_manager_get_chatrooms (window->chatroom_manager, NULL);
+ chatrooms = empathy_chatroom_manager_get_chatrooms (window->chatroom_manager, NULL);
for (l = chatrooms; l; l = l->next) {
main_window_favorite_chatroom_join (l->data);
}
@@ -561,7 +561,7 @@ static void
main_window_room_manage_favorites_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- gossip_chatrooms_window_show (GTK_WINDOW (window->window));
+ empathy_chatrooms_window_show (GTK_WINDOW (window->window));
}
static void
@@ -579,14 +579,14 @@ main_window_chat_show_offline_cb (GtkCheckMenuItem *item,
current = gtk_check_menu_item_get_active (item);
- gossip_conf_set_bool (gossip_conf_get (),
- GOSSIP_PREFS_CONTACTS_SHOW_OFFLINE,
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_CONTACTS_SHOW_OFFLINE,
current);
/* Turn off sound just while we alter the contact list. */
- // FIXME: gossip_sound_set_enabled (FALSE);
- gossip_contact_list_store_set_show_offline (window->list_store, current);
- //gossip_sound_set_enabled (TRUE);
+ // FIXME: empathy_sound_set_enabled (FALSE);
+ empathy_contact_list_store_set_show_offline (window->list_store, current);
+ //empathy_sound_set_enabled (TRUE);
}
static gboolean
@@ -594,14 +594,14 @@ main_window_edit_button_press_event_cb (GtkWidget *widget,
GdkEventButton *event,
EmpathyMainWindow *window)
{
- GossipContact *contact;
+ EmpathyContact *contact;
gchar *group;
if (!event->button == 1) {
return FALSE;
}
- group = gossip_contact_list_view_get_selected_group (window->list_view);
+ group = empathy_contact_list_view_get_selected_group (window->list_view);
if (group) {
GtkMenuItem *item;
GtkWidget *label;
@@ -614,7 +614,7 @@ main_window_edit_button_press_event_cb (GtkWidget *widget,
gtk_widget_show (window->edit_context);
gtk_widget_show (window->edit_context_separator);
- submenu = gossip_contact_list_view_get_group_menu (window->list_view);
+ submenu = empathy_contact_list_view_get_group_menu (window->list_view);
gtk_menu_item_set_submenu (item, submenu);
g_free (group);
@@ -622,7 +622,7 @@ main_window_edit_button_press_event_cb (GtkWidget *widget,
return FALSE;
}
- contact = gossip_contact_list_view_get_selected (window->list_view);
+ contact = empathy_contact_list_view_get_selected (window->list_view);
if (contact) {
GtkMenuItem *item;
GtkWidget *label;
@@ -635,7 +635,7 @@ main_window_edit_button_press_event_cb (GtkWidget *widget,
gtk_widget_show (window->edit_context);
gtk_widget_show (window->edit_context_separator);
- submenu = gossip_contact_list_view_get_contact_menu (window->list_view,
+ submenu = empathy_contact_list_view_get_contact_menu (window->list_view,
contact);
gtk_menu_item_set_submenu (item, submenu);
@@ -654,35 +654,35 @@ static void
main_window_edit_accounts_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- gossip_accounts_dialog_show (GTK_WINDOW (window->window));
+ empathy_accounts_dialog_show (GTK_WINDOW (window->window));
}
static void
main_window_edit_personal_information_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- //gossip_vcard_dialog_show (GTK_WINDOW (window->window));
+ //empathy_vcard_dialog_show (GTK_WINDOW (window->window));
}
static void
main_window_edit_preferences_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- gossip_preferences_show (GTK_WINDOW (window->window));
+ empathy_preferences_show (GTK_WINDOW (window->window));
}
static void
main_window_help_about_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- gossip_about_dialog_new (GTK_WINDOW (window->window));
+ empathy_about_dialog_new (GTK_WINDOW (window->window));
}
static void
main_window_help_contents_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- //gossip_help_show ();
+ //empathy_help_show ();
}
static gboolean
@@ -695,7 +695,7 @@ main_window_throbber_button_press_event_cb (GtkWidget *throbber_ebox,
return FALSE;
}
- gossip_accounts_dialog_show (GTK_WINDOW (window->window));
+ empathy_accounts_dialog_show (GTK_WINDOW (window->window));
return FALSE;
}
@@ -770,7 +770,7 @@ main_window_accels_load (void)
filename = g_build_filename (g_get_home_dir (), ".gnome2", PACKAGE_NAME, ACCELS_FILENAME, NULL);
if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
- gossip_debug (DEBUG_DOMAIN, "Loading from:'%s'", filename);
+ empathy_debug (DEBUG_DOMAIN, "Loading from:'%s'", filename);
gtk_accel_map_load (filename);
}
@@ -788,7 +788,7 @@ main_window_accels_save (void)
file_with_path = g_build_filename (dir, ACCELS_FILENAME, NULL);
g_free (dir);
- gossip_debug (DEBUG_DOMAIN, "Saving to:'%s'", file_with_path);
+ empathy_debug (DEBUG_DOMAIN, "Saving to:'%s'", file_with_path);
gtk_accel_map_save (file_with_path);
g_free (file_with_path);
@@ -833,7 +833,7 @@ main_window_configure_event_timeout_cb (EmpathyMainWindow *window)
gtk_window_get_size (GTK_WINDOW (window->window), &w, &h);
gtk_window_get_position (GTK_WINDOW (window->window), &x, &y);
- gossip_geometry_save (GEOMETRY_NAME, x, y, w, h);
+ empathy_geometry_save (GEOMETRY_NAME, x, y, w, h);
window->size_timeout_id = 0;
@@ -857,63 +857,63 @@ main_window_configure_event_cb (GtkWidget *widget,
}
static void
-main_window_notify_show_offline_cb (GossipConf *conf,
+main_window_notify_show_offline_cb (EmpathyConf *conf,
const gchar *key,
gpointer check_menu_item)
{
gboolean show_offline;
- if (gossip_conf_get_bool (conf, key, &show_offline)) {
+ if (empathy_conf_get_bool (conf, key, &show_offline)) {
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (check_menu_item),
show_offline);
}
}
static void
-main_window_notify_show_avatars_cb (GossipConf *conf,
+main_window_notify_show_avatars_cb (EmpathyConf *conf,
const gchar *key,
EmpathyMainWindow *window)
{
gboolean show_avatars;
- if (gossip_conf_get_bool (conf, key, &show_avatars)) {
- gossip_contact_list_store_set_show_avatars (window->list_store,
+ if (empathy_conf_get_bool (conf, key, &show_avatars)) {
+ empathy_contact_list_store_set_show_avatars (window->list_store,
show_avatars);
}
}
static void
-main_window_notify_compact_contact_list_cb (GossipConf *conf,
+main_window_notify_compact_contact_list_cb (EmpathyConf *conf,
const gchar *key,
EmpathyMainWindow *window)
{
gboolean compact_contact_list;
- if (gossip_conf_get_bool (conf, key, &compact_contact_list)) {
- gossip_contact_list_store_set_is_compact (window->list_store,
+ if (empathy_conf_get_bool (conf, key, &compact_contact_list)) {
+ empathy_contact_list_store_set_is_compact (window->list_store,
compact_contact_list);
}
}
static void
-main_window_notify_sort_criterium_cb (GossipConf *conf,
+main_window_notify_sort_criterium_cb (EmpathyConf *conf,
const gchar *key,
EmpathyMainWindow *window)
{
gchar *str = NULL;
- if (gossip_conf_get_string (conf, key, &str)) {
+ if (empathy_conf_get_string (conf, key, &str)) {
GType type;
GEnumClass *enum_class;
GEnumValue *enum_value;
- type = gossip_contact_list_store_sort_get_type ();
+ type = empathy_contact_list_store_sort_get_type ();
enum_class = G_ENUM_CLASS (g_type_class_peek (type));
enum_value = g_enum_get_value_by_nick (enum_class, str);
g_free (str);
if (enum_value) {
- gossip_contact_list_store_set_sort_criterium (window->list_store,
+ empathy_contact_list_store_set_sort_criterium (window->list_store,
enum_value->value);
}
}
diff --git a/libempathy-gtk/gossip-new-chatroom-dialog.c b/libempathy-gtk/empathy-new-chatroom-dialog.c
index 81594f1d1..31f610789 100644
--- a/libempathy-gtk/gossip-new-chatroom-dialog.c
+++ b/libempathy-gtk/empathy-new-chatroom-dialog.c
@@ -36,13 +36,13 @@
#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-profile.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-debug.h>
-#include "gossip-new-chatroom-dialog.h"
-#include "gossip-account-chooser.h"
-//#include "gossip-chatrooms-window.h"
-#include "gossip-ui-utils.h"
+#include "empathy-new-chatroom-dialog.h"
+#include "empathy-account-chooser.h"
+//#include "empathy-chatrooms-window.h"
+#include "empathy-ui-utils.h"
#include "ephy-spinner.h"
#define DEBUG_DOMAIN "NewChatroomDialog"
@@ -80,7 +80,7 @@ typedef struct {
GtkWidget *button_join;
GtkWidget *button_close;
-} GossipNewChatroomDialog;
+} EmpathyNewChatroomDialog;
typedef struct {
guint handle;
@@ -98,51 +98,51 @@ enum {
static void new_chatroom_dialog_response_cb (GtkWidget *widget,
gint response,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_destroy_cb (GtkWidget *widget,
- GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_model_setup (GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_model_add_columns (GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_update_buttons (GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_update_widgets (GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_model_setup (EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_update_buttons (EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
- GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_model_add (GossipNewChatroomDialog *dialog,
+ EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_model_add (EmpathyNewChatroomDialog *dialog,
EmpathyRoomListItem *item);
-static void new_chatroom_dialog_model_clear (GossipNewChatroomDialog *dialog);
-static GList * new_chatroom_dialog_model_get_selected (GossipNewChatroomDialog *dialog);
+static void new_chatroom_dialog_model_clear (EmpathyNewChatroomDialog *dialog);
+static GList * new_chatroom_dialog_model_get_selected (EmpathyNewChatroomDialog *dialog);
static gboolean new_chatroom_dialog_model_filter_func (GtkTreeModel *model,
GtkTreeIter *iter,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_model_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_model_row_inserted_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_model_row_deleted_cb (GtkTreeModel *model,
GtkTreePath *path,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_model_selection_changed (GtkTreeSelection *selection,
- GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_join (GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_entry_changed_cb (GtkWidget *entry,
- GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_browse_start (GossipNewChatroomDialog *dialog);
-static void new_chatroom_dialog_browse_stop (GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_browse_start (EmpathyNewChatroomDialog *dialog);
+static void new_chatroom_dialog_browse_stop (EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_entry_server_activate_cb (GtkWidget *widget,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
static void new_chatroom_dialog_togglebutton_refresh_toggled_cb (GtkWidget *widget,
- GossipNewChatroomDialog *dialog);
+ EmpathyNewChatroomDialog *dialog);
-static GossipNewChatroomDialog *dialog_p = NULL;
+static EmpathyNewChatroomDialog *dialog_p = NULL;
void
-gossip_new_chatroom_dialog_show (GtkWindow *parent)
+empathy_new_chatroom_dialog_show (GtkWindow *parent)
{
- GossipNewChatroomDialog *dialog;
+ EmpathyNewChatroomDialog *dialog;
GladeXML *glade;
GList *accounts;
gint account_num;
@@ -153,9 +153,9 @@ gossip_new_chatroom_dialog_show (GtkWindow *parent)
return;
}
- dialog_p = dialog = g_new0 (GossipNewChatroomDialog, 1);
+ dialog_p = dialog = g_new0 (EmpathyNewChatroomDialog, 1);
- glade = gossip_glade_get_file ("gossip-new-chatroom-dialog.glade",
+ glade = empathy_glade_get_file ("empathy-new-chatroom-dialog.glade",
"new_chatroom_dialog",
NULL,
"new_chatroom_dialog", &dialog->window,
@@ -180,7 +180,7 @@ gossip_new_chatroom_dialog_show (GtkWindow *parent)
"button_join", &dialog->button_join,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
dialog,
"new_chatroom_dialog", "response", new_chatroom_dialog_response_cb,
"new_chatroom_dialog", "destroy", new_chatroom_dialog_destroy_cb,
@@ -206,7 +206,7 @@ gossip_new_chatroom_dialog_show (GtkWindow *parent)
g_object_unref (size_group);
/* Account chooser for custom */
- dialog->account_chooser = gossip_account_chooser_new ();
+ dialog->account_chooser = empathy_account_chooser_new ();
gtk_box_pack_start (GTK_BOX (dialog->hbox_account),
dialog->account_chooser,
TRUE, TRUE, 0);
@@ -255,7 +255,7 @@ gossip_new_chatroom_dialog_show (GtkWindow *parent)
static void
new_chatroom_dialog_response_cb (GtkWidget *widget,
gint response,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
if (response == GTK_RESPONSE_OK) {
new_chatroom_dialog_join (dialog);
@@ -266,7 +266,7 @@ new_chatroom_dialog_response_cb (GtkWidget *widget,
static void
new_chatroom_dialog_destroy_cb (GtkWidget *widget,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
g_object_unref (dialog->model);
g_object_unref (dialog->filter);
@@ -275,7 +275,7 @@ new_chatroom_dialog_destroy_cb (GtkWidget *widget,
}
static void
-new_chatroom_dialog_model_setup (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_model_setup (EmpathyNewChatroomDialog *dialog)
{
GtkTreeView *view;
GtkListStore *store;
@@ -328,7 +328,7 @@ new_chatroom_dialog_model_setup (GossipNewChatroomDialog *dialog)
}
static void
-new_chatroom_dialog_model_add_columns (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_model_add_columns (EmpathyNewChatroomDialog *dialog)
{
GtkTreeView *view;
GtkTreeViewColumn *column;
@@ -358,7 +358,7 @@ new_chatroom_dialog_model_add_columns (GossipNewChatroomDialog *dialog)
}
static void
-new_chatroom_dialog_update_buttons (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_update_buttons (EmpathyNewChatroomDialog *dialog)
{
GtkButton *button;
GtkWidget *image;
@@ -400,15 +400,15 @@ new_chatroom_dialog_update_buttons (GossipNewChatroomDialog *dialog)
}
static void
-new_chatroom_dialog_update_widgets (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_update_widgets (EmpathyNewChatroomDialog *dialog)
{
- GossipAccountChooser *account_chooser;
+ EmpathyAccountChooser *account_chooser;
McAccount *account;
McProfile *profile;
const gchar *protocol;
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (dialog->account_chooser);
- account = gossip_account_chooser_get_account (account_chooser);
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
+ account = empathy_account_chooser_get_account (account_chooser);
profile = mc_account_get_profile (account);
protocol = mc_profile_get_protocol_name (profile);
@@ -458,13 +458,13 @@ new_chatroom_dialog_update_widgets (GossipNewChatroomDialog *dialog)
static void
new_chatroom_dialog_account_changed_cb (GtkComboBox *combobox,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
new_chatroom_dialog_update_widgets (dialog);
}
static void
-new_chatroom_dialog_model_add (GossipNewChatroomDialog *dialog,
+new_chatroom_dialog_model_add (EmpathyNewChatroomDialog *dialog,
EmpathyRoomListItem *item)
{
GtkTreeView *view;
@@ -486,7 +486,7 @@ new_chatroom_dialog_model_add (GossipNewChatroomDialog *dialog,
}
static void
-new_chatroom_dialog_model_clear (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_model_clear (EmpathyNewChatroomDialog *dialog)
{
GtkListStore *store;
@@ -495,7 +495,7 @@ new_chatroom_dialog_model_clear (GossipNewChatroomDialog *dialog)
}
static GList *
-new_chatroom_dialog_model_get_selected (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_model_get_selected (EmpathyNewChatroomDialog *dialog)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -529,7 +529,7 @@ new_chatroom_dialog_model_get_selected (GossipNewChatroomDialog *dialog)
static gboolean
new_chatroom_dialog_model_filter_func (GtkTreeModel *model,
GtkTreeIter *iter,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
EmpathyRoomListItem *chatroom;
const gchar *text;
@@ -565,7 +565,7 @@ static void
new_chatroom_dialog_model_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
gtk_widget_activate (dialog->button_join);
}
@@ -574,7 +574,7 @@ static void
new_chatroom_dialog_model_row_inserted_cb (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
new_chatroom_dialog_update_buttons (dialog);
}
@@ -582,23 +582,23 @@ new_chatroom_dialog_model_row_inserted_cb (GtkTreeModel *model,
static void
new_chatroom_dialog_model_row_deleted_cb (GtkTreeModel *model,
GtkTreePath *path,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
new_chatroom_dialog_update_buttons (dialog);
}
static void
new_chatroom_dialog_model_selection_changed (GtkTreeSelection *selection,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
new_chatroom_dialog_update_buttons (dialog);
}
static void
-new_chatroom_dialog_join (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_join (EmpathyNewChatroomDialog *dialog)
{
McAccount *account;
- GossipAccountChooser *account_chooser;
+ EmpathyAccountChooser *account_chooser;
MissionControl *mc;
GList *chatrooms, *l;
const gchar *room;
@@ -618,8 +618,8 @@ new_chatroom_dialog_join (GossipNewChatroomDialog *dialog)
if (GTK_WIDGET_VISIBLE (dialog->hbox_server)) {
server = gtk_entry_get_text (GTK_ENTRY (dialog->entry_server));
}
- account_chooser = GOSSIP_ACCOUNT_CHOOSER (dialog->account_chooser);
- account = gossip_account_chooser_get_account (account_chooser);
+ account_chooser = EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser);
+ account = empathy_account_chooser_get_account (account_chooser);
if (!G_STR_EMPTY (server)) {
room_name = g_strconcat (room, "@", server, NULL);
@@ -627,9 +627,9 @@ new_chatroom_dialog_join (GossipNewChatroomDialog *dialog)
room_name = g_strdup (room);
}
- gossip_debug (DEBUG_DOMAIN, "Requesting channel for '%s'", room_name);
+ empathy_debug (DEBUG_DOMAIN, "Requesting channel for '%s'", room_name);
- mc = gossip_mission_control_new ();
+ mc = empathy_mission_control_new ();
mission_control_request_channel_with_string_handle (mc,
account,
TP_IFACE_CHANNEL_TYPE_TEXT,
@@ -642,7 +642,7 @@ new_chatroom_dialog_join (GossipNewChatroomDialog *dialog)
static void
new_chatroom_dialog_entry_changed_cb (GtkWidget *entry,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
if (entry == dialog->entry_room) {
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (dialog->filter));
@@ -652,7 +652,7 @@ new_chatroom_dialog_entry_changed_cb (GtkWidget *entry,
}
static void
-new_chatroom_dialog_browse_start (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_browse_start (EmpathyNewChatroomDialog *dialog)
{
if (0) {
new_chatroom_dialog_model_clear (dialog);
@@ -661,13 +661,13 @@ new_chatroom_dialog_browse_start (GossipNewChatroomDialog *dialog)
}
static void
-new_chatroom_dialog_browse_stop (GossipNewChatroomDialog *dialog)
+new_chatroom_dialog_browse_stop (EmpathyNewChatroomDialog *dialog)
{
}
static void
new_chatroom_dialog_entry_server_activate_cb (GtkWidget *widget,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
new_chatroom_dialog_togglebutton_refresh_toggled_cb (dialog->togglebutton_refresh,
dialog);
@@ -675,7 +675,7 @@ new_chatroom_dialog_entry_server_activate_cb (GtkWidget *widget,
static void
new_chatroom_dialog_togglebutton_refresh_toggled_cb (GtkWidget *widget,
- GossipNewChatroomDialog *dialog)
+ EmpathyNewChatroomDialog *dialog)
{
gboolean toggled;
diff --git a/libempathy-gtk/gossip-new-chatroom-dialog.glade b/libempathy-gtk/empathy-new-chatroom-dialog.glade
index 49bdadb64..49bdadb64 100644
--- a/libempathy-gtk/gossip-new-chatroom-dialog.glade
+++ b/libempathy-gtk/empathy-new-chatroom-dialog.glade
diff --git a/libempathy-gtk/gossip-new-chatroom-dialog.h b/libempathy-gtk/empathy-new-chatroom-dialog.h
index 44b7ce67f..2a126085d 100644
--- a/libempathy-gtk/gossip-new-chatroom-dialog.h
+++ b/libempathy-gtk/empathy-new-chatroom-dialog.h
@@ -22,13 +22,13 @@
* Xavier Claessens <xclaesse@gmail.com>
*/
-#ifndef __GOSSIP_NEW_CHATROOMS_WINDOW_H__
-#define __GOSSIP_NEW_CHATROOMS_WINDOW_H__
+#ifndef __EMPATHY_NEW_CHATROOMS_WINDOW_H__
+#define __EMPATHY_NEW_CHATROOMS_WINDOW_H__
G_BEGIN_DECLS
-void gossip_new_chatroom_dialog_show (GtkWindow *parent);
+void empathy_new_chatroom_dialog_show (GtkWindow *parent);
G_END_DECLS
-#endif /* __GOSSIP_NEW_CHATROOMS_WINDOW_H__ */
+#endif /* __EMPATHY_NEW_CHATROOMS_WINDOW_H__ */
diff --git a/libempathy-gtk/gossip-preferences.c b/libempathy-gtk/empathy-preferences.c
index fd93353df..7c9a27b6d 100644
--- a/libempathy-gtk/gossip-preferences.c
+++ b/libempathy-gtk/empathy-preferences.c
@@ -30,13 +30,13 @@
#include <glade/glade.h>
#include <glib/gi18n.h>
-#include <libempathy/gossip-conf.h>
+#include <libempathy/empathy-conf.h>
-#include "gossip-preferences.h"
-#include "gossip-ui-utils.h"
-#include "gossip-theme-manager.h"
-#include "gossip-spell.h"
-#include "gossip-contact-list-store.h"
+#include "empathy-preferences.h"
+#include "empathy-ui-utils.h"
+#include "empathy-theme-manager.h"
+#include "empathy-spell.h"
+#include "empathy-contact-list-store.h"
typedef struct {
GtkWidget *dialog;
@@ -61,25 +61,25 @@ typedef struct {
GtkWidget *checkbutton_spell_checker;
GList *notify_ids;
-} GossipPreferences;
+} EmpathyPreferences;
-static void preferences_setup_widgets (GossipPreferences *preferences);
-static void preferences_languages_setup (GossipPreferences *preferences);
-static void preferences_languages_add (GossipPreferences *preferences);
-static void preferences_languages_save (GossipPreferences *preferences);
+static void preferences_setup_widgets (EmpathyPreferences *preferences);
+static void preferences_languages_setup (EmpathyPreferences *preferences);
+static void preferences_languages_add (EmpathyPreferences *preferences);
+static void preferences_languages_save (EmpathyPreferences *preferences);
static gboolean preferences_languages_save_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gchar **languages);
-static void preferences_languages_load (GossipPreferences *preferences);
+static void preferences_languages_load (EmpathyPreferences *preferences);
static gboolean preferences_languages_load_foreach (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
gchar **languages);
static void preferences_languages_cell_toggled_cb (GtkCellRendererToggle *cell,
gchar *path_string,
- GossipPreferences *preferences);
-static void preferences_themes_setup (GossipPreferences *preferences);
+ EmpathyPreferences *preferences);
+static void preferences_themes_setup (EmpathyPreferences *preferences);
static void preferences_widget_sync_bool (const gchar *key,
GtkWidget *widget);
static void preferences_widget_sync_int (const gchar *key,
@@ -88,37 +88,37 @@ static void preferences_widget_sync_string (const gchar
GtkWidget *widget);
static void preferences_widget_sync_string_combo (const gchar *key,
GtkWidget *widget);
-static void preferences_notify_int_cb (GossipConf *conf,
+static void preferences_notify_int_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void preferences_notify_string_cb (GossipConf *conf,
+static void preferences_notify_string_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void preferences_notify_string_combo_cb (GossipConf *conf,
+static void preferences_notify_string_combo_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void preferences_notify_bool_cb (GossipConf *conf,
+static void preferences_notify_bool_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void preferences_notify_sensitivity_cb (GossipConf *conf,
+static void preferences_notify_sensitivity_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void preferences_hookup_spin_button (GossipPreferences *preferences,
+static void preferences_hookup_spin_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget);
-static void preferences_hookup_entry (GossipPreferences *preferences,
+static void preferences_hookup_entry (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget);
-static void preferences_hookup_toggle_button (GossipPreferences *preferences,
+static void preferences_hookup_toggle_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget);
-static void preferences_hookup_radio_button (GossipPreferences *preferences,
+static void preferences_hookup_radio_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget);
-static void preferences_hookup_string_combo (GossipPreferences *preferences,
+static void preferences_hookup_string_combo (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget);
-static void preferences_hookup_sensitivity (GossipPreferences *preferences,
+static void preferences_hookup_sensitivity (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget);
static void preferences_spin_button_value_changed_cb (GtkWidget *button,
@@ -132,10 +132,10 @@ static void preferences_radio_button_toggled_cb (GtkWidget
static void preferences_string_combo_changed_cb (GtkWidget *button,
gpointer user_data);
static void preferences_destroy_cb (GtkWidget *widget,
- GossipPreferences *preferences);
+ EmpathyPreferences *preferences);
static void preferences_response_cb (GtkWidget *widget,
gint response,
- GossipPreferences *preferences);
+ EmpathyPreferences *preferences);
enum {
COL_LANG_ENABLED,
@@ -151,66 +151,66 @@ enum {
};
static void
-preferences_setup_widgets (GossipPreferences *preferences)
+preferences_setup_widgets (EmpathyPreferences *preferences)
{
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_SOUNDS_FOR_MESSAGES,
+ EMPATHY_PREFS_SOUNDS_FOR_MESSAGES,
preferences->checkbutton_sounds_for_messages);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_SOUNDS_WHEN_AWAY,
+ EMPATHY_PREFS_SOUNDS_WHEN_AWAY,
preferences->checkbutton_sounds_when_away);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_SOUNDS_WHEN_BUSY,
+ EMPATHY_PREFS_SOUNDS_WHEN_BUSY,
preferences->checkbutton_sounds_when_busy);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_POPUPS_WHEN_AVAILABLE,
+ EMPATHY_PREFS_POPUPS_WHEN_AVAILABLE,
preferences->checkbutton_popups_when_available);
preferences_hookup_sensitivity (preferences,
- GOSSIP_PREFS_SOUNDS_FOR_MESSAGES,
+ EMPATHY_PREFS_SOUNDS_FOR_MESSAGES,
preferences->checkbutton_sounds_when_away);
preferences_hookup_sensitivity (preferences,
- GOSSIP_PREFS_SOUNDS_FOR_MESSAGES,
+ EMPATHY_PREFS_SOUNDS_FOR_MESSAGES,
preferences->checkbutton_sounds_when_busy);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_UI_SEPARATE_CHAT_WINDOWS,
+ EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
preferences->checkbutton_separate_chat_windows);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
preferences->checkbutton_show_avatars);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_UI_COMPACT_CONTACT_LIST,
+ EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
preferences->checkbutton_compact_contact_list);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_CHAT_SHOW_SMILEYS,
+ EMPATHY_PREFS_CHAT_SHOW_SMILEYS,
preferences->checkbutton_show_smileys);
preferences_hookup_string_combo (preferences,
- GOSSIP_PREFS_CHAT_THEME,
+ EMPATHY_PREFS_CHAT_THEME,
preferences->combobox_chat_theme);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_CHAT_THEME_CHAT_ROOM,
+ EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
preferences->checkbutton_theme_chat_room);
preferences_hookup_toggle_button (preferences,
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_ENABLED,
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
preferences->checkbutton_spell_checker);
preferences_hookup_sensitivity (preferences,
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_ENABLED,
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED,
preferences->treeview_spell_checker);
preferences_hookup_radio_button (preferences,
- GOSSIP_PREFS_CONTACTS_SORT_CRITERIUM,
+ EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
preferences->radiobutton_contact_list_sort_by_name);
}
static void
-preferences_languages_setup (GossipPreferences *preferences)
+preferences_languages_setup (EmpathyPreferences *preferences)
{
GtkTreeView *view;
GtkListStore *store;
@@ -264,7 +264,7 @@ preferences_languages_setup (GossipPreferences *preferences)
}
static void
-preferences_languages_add (GossipPreferences *preferences)
+preferences_languages_add (EmpathyPreferences *preferences)
{
GtkTreeView *view;
GtkListStore *store;
@@ -273,14 +273,14 @@ preferences_languages_add (GossipPreferences *preferences)
view = GTK_TREE_VIEW (preferences->treeview_spell_checker);
store = GTK_LIST_STORE (gtk_tree_view_get_model (view));
- codes = gossip_spell_get_language_codes ();
+ codes = empathy_spell_get_language_codes ();
for (l = codes; l; l = l->next) {
GtkTreeIter iter;
const gchar *code;
const gchar *name;
code = l->data;
- name = gossip_spell_get_language_name (code);
+ name = empathy_spell_get_language_name (code);
if (!name) {
continue;
}
@@ -292,11 +292,11 @@ preferences_languages_add (GossipPreferences *preferences)
-1);
}
- gossip_spell_free_language_codes (codes);
+ empathy_spell_free_language_codes (codes);
}
static void
-preferences_languages_save (GossipPreferences *preferences)
+preferences_languages_save (EmpathyPreferences *preferences)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -315,8 +315,8 @@ preferences_languages_save (GossipPreferences *preferences)
languages = g_strdup ("en");
}
- gossip_conf_set_string (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
+ empathy_conf_set_string (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
languages);
g_free (languages);
@@ -359,15 +359,15 @@ preferences_languages_save_foreach (GtkTreeModel *model,
}
static void
-preferences_languages_load (GossipPreferences *preferences)
+preferences_languages_load (EmpathyPreferences *preferences)
{
GtkTreeView *view;
GtkTreeModel *model;
gchar *value;
gchar **vlanguages;
- if (!gossip_conf_get_string (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
+ if (!empathy_conf_get_string (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
&value) || !value) {
return;
}
@@ -418,7 +418,7 @@ preferences_languages_load_foreach (GtkTreeModel *model,
static void
preferences_languages_cell_toggled_cb (GtkCellRendererToggle *cell,
gchar *path_string,
- GossipPreferences *preferences)
+ EmpathyPreferences *preferences)
{
GtkTreeView *view;
GtkTreeModel *model;
@@ -445,7 +445,7 @@ preferences_languages_cell_toggled_cb (GtkCellRendererToggle *cell,
}
static void
-preferences_themes_setup (GossipPreferences *preferences)
+preferences_themes_setup (EmpathyPreferences *preferences)
{
GtkComboBox *combo;
GtkListStore *model;
@@ -459,7 +459,7 @@ preferences_themes_setup (GossipPreferences *preferences)
G_TYPE_STRING,
G_TYPE_STRING);
- themes = gossip_theme_manager_get_themes ();
+ themes = empathy_theme_manager_get_themes ();
for (i = 0; themes[i]; i += 2) {
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
@@ -477,7 +477,7 @@ preferences_widget_sync_bool (const gchar *key, GtkWidget *widget)
{
gboolean value;
- if (gossip_conf_get_bool (gossip_conf_get (), key, &value)) {
+ if (empathy_conf_get_bool (empathy_conf_get (), key, &value)) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
}
}
@@ -487,7 +487,7 @@ preferences_widget_sync_int (const gchar *key, GtkWidget *widget)
{
gint value;
- if (gossip_conf_get_int (gossip_conf_get (), key, &value)) {
+ if (empathy_conf_get_int (empathy_conf_get (), key, &value)) {
if (GTK_IS_SPIN_BUTTON (widget)) {
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value);
}
@@ -499,11 +499,11 @@ preferences_widget_sync_string (const gchar *key, GtkWidget *widget)
{
gchar *value;
- if (gossip_conf_get_string (gossip_conf_get (), key, &value) && value) {
+ if (empathy_conf_get_string (empathy_conf_get (), key, &value) && value) {
if (GTK_IS_ENTRY (widget)) {
gtk_entry_set_text (GTK_ENTRY (widget), value);
} else if (GTK_IS_RADIO_BUTTON (widget)) {
- if (strcmp (key, GOSSIP_PREFS_CONTACTS_SORT_CRITERIUM) == 0) {
+ if (strcmp (key, EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM) == 0) {
GType type;
GEnumClass *enum_class;
GEnumValue *enum_value;
@@ -511,7 +511,7 @@ preferences_widget_sync_string (const gchar *key, GtkWidget *widget)
GtkWidget *toggle_widget;
/* Get index from new string */
- type = gossip_contact_list_store_sort_get_type ();
+ type = empathy_contact_list_store_sort_get_type ();
enum_class = G_ENUM_CLASS (g_type_class_peek (type));
enum_value = g_enum_get_value_by_nick (enum_class, value);
@@ -537,7 +537,7 @@ preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget)
GtkTreeIter iter;
gboolean found;
- if (!gossip_conf_get_string (gossip_conf_get (), key, &value)) {
+ if (!empathy_conf_get_string (empathy_conf_get (), key, &value)) {
return;
}
@@ -575,7 +575,7 @@ preferences_widget_sync_string_combo (const gchar *key, GtkWidget *widget)
}
static void
-preferences_notify_int_cb (GossipConf *conf,
+preferences_notify_int_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
@@ -583,7 +583,7 @@ preferences_notify_int_cb (GossipConf *conf,
}
static void
-preferences_notify_string_cb (GossipConf *conf,
+preferences_notify_string_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
@@ -591,7 +591,7 @@ preferences_notify_string_cb (GossipConf *conf,
}
static void
-preferences_notify_string_combo_cb (GossipConf *conf,
+preferences_notify_string_combo_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
@@ -599,7 +599,7 @@ preferences_notify_string_combo_cb (GossipConf *conf,
}
static void
-preferences_notify_bool_cb (GossipConf *conf,
+preferences_notify_bool_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
@@ -607,26 +607,26 @@ preferences_notify_bool_cb (GossipConf *conf,
}
static void
-preferences_notify_sensitivity_cb (GossipConf *conf,
+preferences_notify_sensitivity_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
gboolean value;
- if (gossip_conf_get_bool (conf, key, &value)) {
+ if (empathy_conf_get_bool (conf, key, &value)) {
gtk_widget_set_sensitive (GTK_WIDGET (user_data), value);
}
}
static void
-preferences_add_id (GossipPreferences *preferences, guint id)
+preferences_add_id (EmpathyPreferences *preferences, guint id)
{
preferences->notify_ids = g_list_prepend (preferences->notify_ids,
GUINT_TO_POINTER (id));
}
static void
-preferences_hookup_spin_button (GossipPreferences *preferences,
+preferences_hookup_spin_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)
{
@@ -647,7 +647,7 @@ preferences_hookup_spin_button (GossipPreferences *preferences,
G_CALLBACK (preferences_spin_button_value_changed_cb),
NULL);
- id = gossip_conf_notify_add (gossip_conf_get (),
+ id = empathy_conf_notify_add (empathy_conf_get (),
key,
preferences_notify_int_cb,
widget);
@@ -657,7 +657,7 @@ preferences_hookup_spin_button (GossipPreferences *preferences,
}
static void
-preferences_hookup_entry (GossipPreferences *preferences,
+preferences_hookup_entry (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)
{
@@ -677,7 +677,7 @@ preferences_hookup_entry (GossipPreferences *preferences,
G_CALLBACK (preferences_entry_value_changed_cb),
NULL);
- id = gossip_conf_notify_add (gossip_conf_get (),
+ id = empathy_conf_notify_add (empathy_conf_get (),
key,
preferences_notify_string_cb,
widget);
@@ -687,7 +687,7 @@ preferences_hookup_entry (GossipPreferences *preferences,
}
static void
-preferences_hookup_toggle_button (GossipPreferences *preferences,
+preferences_hookup_toggle_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)
{
@@ -703,7 +703,7 @@ preferences_hookup_toggle_button (GossipPreferences *preferences,
G_CALLBACK (preferences_toggle_button_toggled_cb),
NULL);
- id = gossip_conf_notify_add (gossip_conf_get (),
+ id = empathy_conf_notify_add (empathy_conf_get (),
key,
preferences_notify_bool_cb,
widget);
@@ -713,7 +713,7 @@ preferences_hookup_toggle_button (GossipPreferences *preferences,
}
static void
-preferences_hookup_radio_button (GossipPreferences *preferences,
+preferences_hookup_radio_button (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)
{
@@ -733,7 +733,7 @@ preferences_hookup_radio_button (GossipPreferences *preferences,
g_strdup (key), g_free);
}
- id = gossip_conf_notify_add (gossip_conf_get (),
+ id = empathy_conf_notify_add (empathy_conf_get (),
key,
preferences_notify_string_cb,
widget);
@@ -743,7 +743,7 @@ preferences_hookup_radio_button (GossipPreferences *preferences,
}
static void
-preferences_hookup_string_combo (GossipPreferences *preferences,
+preferences_hookup_string_combo (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)
{
@@ -759,7 +759,7 @@ preferences_hookup_string_combo (GossipPreferences *preferences,
G_CALLBACK (preferences_string_combo_changed_cb),
NULL);
- id = gossip_conf_notify_add (gossip_conf_get (),
+ id = empathy_conf_notify_add (empathy_conf_get (),
key,
preferences_notify_string_combo_cb,
widget);
@@ -769,18 +769,18 @@ preferences_hookup_string_combo (GossipPreferences *preferences,
}
static void
-preferences_hookup_sensitivity (GossipPreferences *preferences,
+preferences_hookup_sensitivity (EmpathyPreferences *preferences,
const gchar *key,
GtkWidget *widget)
{
gboolean value;
guint id;
- if (gossip_conf_get_bool (gossip_conf_get (), key, &value)) {
+ if (empathy_conf_get_bool (empathy_conf_get (), key, &value)) {
gtk_widget_set_sensitive (widget, value);
}
- id = gossip_conf_notify_add (gossip_conf_get (),
+ id = empathy_conf_notify_add (empathy_conf_get (),
key,
preferences_notify_sensitivity_cb,
widget);
@@ -797,7 +797,7 @@ preferences_spin_button_value_changed_cb (GtkWidget *button,
key = g_object_get_data (G_OBJECT (button), "key");
- gossip_conf_set_int (gossip_conf_get (),
+ empathy_conf_set_int (empathy_conf_get (),
key,
gtk_spin_button_get_value (GTK_SPIN_BUTTON (button)));
}
@@ -810,7 +810,7 @@ preferences_entry_value_changed_cb (GtkWidget *entry,
key = g_object_get_data (G_OBJECT (entry), "key");
- gossip_conf_set_string (gossip_conf_get (),
+ empathy_conf_set_string (empathy_conf_get (),
key,
gtk_entry_get_text (GTK_ENTRY (entry)));
}
@@ -823,7 +823,7 @@ preferences_toggle_button_toggled_cb (GtkWidget *button,
key = g_object_get_data (G_OBJECT (button), "key");
- gossip_conf_set_bool (gossip_conf_get (),
+ empathy_conf_set_bool (empathy_conf_get (),
key,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)));
}
@@ -841,7 +841,7 @@ preferences_radio_button_toggled_cb (GtkWidget *button,
key = g_object_get_data (G_OBJECT (button), "key");
- if (key && strcmp (key, GOSSIP_PREFS_CONTACTS_SORT_CRITERIUM) == 0) {
+ if (key && strcmp (key, EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM) == 0) {
GSList *group;
GType type;
GEnumClass *enum_class;
@@ -850,12 +850,12 @@ preferences_radio_button_toggled_cb (GtkWidget *button,
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
/* Get string from index */
- type = gossip_contact_list_store_sort_get_type ();
+ type = empathy_contact_list_store_sort_get_type ();
enum_class = G_ENUM_CLASS (g_type_class_peek (type));
enum_value = g_enum_get_value (enum_class, g_slist_index (group, button));
if (!enum_value) {
- g_warning ("No GEnumValue for GossipContactListSort with GtkRadioButton index:%d",
+ g_warning ("No GEnumValue for EmpathyContactListSort with GtkRadioButton index:%d",
g_slist_index (group, button));
return;
}
@@ -863,7 +863,7 @@ preferences_radio_button_toggled_cb (GtkWidget *button,
value = enum_value->value_nick;
}
- gossip_conf_set_string (gossip_conf_get (), key, value);
+ empathy_conf_set_string (empathy_conf_get (), key, value);
}
static void
@@ -883,7 +883,7 @@ preferences_string_combo_changed_cb (GtkWidget *combo,
gtk_tree_model_get (model, &iter,
COL_COMBO_NAME, &name,
-1);
- gossip_conf_set_string (gossip_conf_get (), key, name);
+ empathy_conf_set_string (empathy_conf_get (), key, name);
g_free (name);
}
}
@@ -891,14 +891,14 @@ preferences_string_combo_changed_cb (GtkWidget *combo,
static void
preferences_response_cb (GtkWidget *widget,
gint response,
- GossipPreferences *preferences)
+ EmpathyPreferences *preferences)
{
gtk_widget_destroy (widget);
}
static void
preferences_destroy_cb (GtkWidget *widget,
- GossipPreferences *preferences)
+ EmpathyPreferences *preferences)
{
GList *l;
@@ -906,7 +906,7 @@ preferences_destroy_cb (GtkWidget *widget,
guint id;
id = GPOINTER_TO_UINT (l->data);
- gossip_conf_notify_remove (gossip_conf_get (), id);
+ empathy_conf_notify_remove (empathy_conf_get (), id);
}
g_list_free (preferences->notify_ids);
@@ -914,9 +914,9 @@ preferences_destroy_cb (GtkWidget *widget,
}
GtkWidget *
-gossip_preferences_show (GtkWindow *parent)
+empathy_preferences_show (GtkWindow *parent)
{
- static GossipPreferences *preferences;
+ static EmpathyPreferences *preferences;
GladeXML *glade;
if (preferences) {
@@ -924,10 +924,10 @@ gossip_preferences_show (GtkWindow *parent)
return preferences->dialog;
}
- preferences = g_new0 (GossipPreferences, 1);
+ preferences = g_new0 (EmpathyPreferences, 1);
- glade = gossip_glade_get_file (
- "gossip-preferences.glade",
+ glade = empathy_glade_get_file (
+ "empathy-preferences.glade",
"preferences_dialog",
NULL,
"preferences_dialog", &preferences->dialog,
@@ -948,7 +948,7 @@ gossip_preferences_show (GtkWindow *parent)
"checkbutton_spell_checker", &preferences->checkbutton_spell_checker,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
preferences,
"preferences_dialog", "destroy", preferences_destroy_cb,
"preferences_dialog", "response", preferences_response_cb,
@@ -966,7 +966,7 @@ gossip_preferences_show (GtkWindow *parent)
preferences_languages_add (preferences);
preferences_languages_load (preferences);
- if (gossip_spell_supported ()) {
+ if (empathy_spell_supported ()) {
GtkWidget *page;
page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (preferences->notebook), 2);
diff --git a/libempathy-gtk/gossip-preferences.glade b/libempathy-gtk/empathy-preferences.glade
index c5cd51470..c5cd51470 100644
--- a/libempathy-gtk/gossip-preferences.glade
+++ b/libempathy-gtk/empathy-preferences.glade
diff --git a/libempathy-gtk/empathy-preferences.h b/libempathy-gtk/empathy-preferences.h
new file mode 100644
index 000000000..dc058d7ec
--- /dev/null
+++ b/libempathy-gtk/empathy-preferences.h
@@ -0,0 +1,58 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2003-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ */
+
+#ifndef __EMPATHY_PREFERENCES_H__
+#define __EMPATHY_PREFERENCES_H__
+
+#include <gtk/gtkwindow.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_PREFS_PATH "/apps/empathy"
+
+#define EMPATHY_PREFS_SOUNDS_FOR_MESSAGES EMPATHY_PREFS_PATH "/notifications/sounds_for_messages"
+#define EMPATHY_PREFS_SOUNDS_WHEN_AWAY EMPATHY_PREFS_PATH "/notifications/sounds_when_away"
+#define EMPATHY_PREFS_SOUNDS_WHEN_BUSY EMPATHY_PREFS_PATH "/notifications/sounds_when_busy"
+#define EMPATHY_PREFS_POPUPS_WHEN_AVAILABLE EMPATHY_PREFS_PATH "/notifications/popups_when_available"
+#define EMPATHY_PREFS_CHAT_SHOW_SMILEYS EMPATHY_PREFS_PATH "/conversation/graphical_smileys"
+#define EMPATHY_PREFS_CHAT_THEME EMPATHY_PREFS_PATH "/conversation/theme"
+#define EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM EMPATHY_PREFS_PATH "/conversation/theme_chat_room"
+#define EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES EMPATHY_PREFS_PATH "/conversation/spell_checker_languages"
+#define EMPATHY_PREFS_CHAT_SPELL_CHECKER_ENABLED EMPATHY_PREFS_PATH "/conversation/spell_checker_enabled"
+#define EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS EMPATHY_PREFS_PATH "/ui/separate_chat_windows"
+#define EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN EMPATHY_PREFS_PATH "/ui/main_window_hidden"
+#define EMPATHY_PREFS_UI_AVATAR_DIRECTORY EMPATHY_PREFS_PATH "/ui/avatar_directory"
+#define EMPATHY_PREFS_UI_SHOW_AVATARS EMPATHY_PREFS_PATH "/ui/show_avatars"
+#define EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST EMPATHY_PREFS_PATH "/ui/compact_contact_list"
+#define EMPATHY_PREFS_CONTACTS_SHOW_OFFLINE EMPATHY_PREFS_PATH "/contacts/show_offline"
+#define EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM EMPATHY_PREFS_PATH "/contacts/sort_criterium"
+#define EMPATHY_PREFS_HINTS_CLOSE_MAIN_WINDOW EMPATHY_PREFS_PATH "/hints/close_main_window"
+
+GtkWidget * empathy_preferences_show (GtkWindow *parent);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_PREFERENCES_H__ */
+
+
diff --git a/libempathy-gtk/gossip-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 74c56e7a4..f8522c98d 100644
--- a/libempathy-gtk/gossip-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -31,16 +31,16 @@
#include <glade/glade.h>
#include <libempathy/empathy-idle.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-marshal.h>
-#include "gossip-ui-utils.h"
+#include "empathy-ui-utils.h"
#include "empathy-images.h"
-#include "gossip-presence-chooser.h"
-#include "gossip-status-presets.h"
+#include "empathy-presence-chooser.h"
+#include "empathy-status-presets.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_PRESENCE_CHOOSER, GossipPresenceChooserPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooserPriv))
#define DEBUG_DOMAIN "PresenceChooser"
@@ -65,7 +65,7 @@ typedef struct {
guint scroll_timeout_id;
McPresence scroll_state;
gchar *scroll_status;
-} GossipPresenceChooserPriv;
+} EmpathyPresenceChooserPriv;
typedef struct {
McPresence state;
@@ -77,35 +77,35 @@ static McPresence states[] = {MC_PRESENCE_AVAILABLE,
MC_PRESENCE_DO_NOT_DISTURB,
MC_PRESENCE_AWAY};
-static void gossip_presence_chooser_class_init (GossipPresenceChooserClass *klass);
-static void gossip_presence_chooser_init (GossipPresenceChooser *chooser);
+static void empathy_presence_chooser_class_init (EmpathyPresenceChooserClass *klass);
+static void empathy_presence_chooser_init (EmpathyPresenceChooser *chooser);
static void presence_chooser_finalize (GObject *object);
-static void presence_chooser_presence_changed_cb (GossipPresenceChooser *chooser);
-static void presence_chooser_reset_scroll_timeout (GossipPresenceChooser *chooser);
-static gboolean presence_chooser_scroll_timeout_cb (GossipPresenceChooser *chooser);
-static gboolean presence_chooser_scroll_event_cb (GossipPresenceChooser *chooser,
+static void presence_chooser_presence_changed_cb (EmpathyPresenceChooser *chooser);
+static void presence_chooser_reset_scroll_timeout (EmpathyPresenceChooser *chooser);
+static gboolean presence_chooser_scroll_timeout_cb (EmpathyPresenceChooser *chooser);
+static gboolean presence_chooser_scroll_event_cb (EmpathyPresenceChooser *chooser,
GdkEventScroll *event,
gpointer user_data);
-static GList * presence_chooser_get_presets (GossipPresenceChooser *chooser);
+static GList * presence_chooser_get_presets (EmpathyPresenceChooser *chooser);
static StateAndStatus *presence_chooser_state_and_status_new (McPresence state,
const gchar *status);
-static gboolean presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser);
-static void presence_chooser_flash_start (GossipPresenceChooser *chooser,
+static gboolean presence_chooser_flash_timeout_cb (EmpathyPresenceChooser *chooser);
+static void presence_chooser_flash_start (EmpathyPresenceChooser *chooser,
McPresence state_1,
McPresence state_2);
-static void presence_chooser_flash_stop (GossipPresenceChooser *chooser,
+static void presence_chooser_flash_stop (EmpathyPresenceChooser *chooser,
McPresence state);
static gboolean presence_chooser_button_press_event_cb (GtkWidget *chooser,
GdkEventButton *event,
gpointer user_data);
static void presence_chooser_toggled_cb (GtkWidget *chooser,
gpointer user_data);
-static void presence_chooser_menu_popup (GossipPresenceChooser *chooser);
-static void presence_chooser_menu_popdown (GossipPresenceChooser *chooser);
+static void presence_chooser_menu_popup (EmpathyPresenceChooser *chooser);
+static void presence_chooser_menu_popdown (EmpathyPresenceChooser *chooser);
static void presence_chooser_menu_selection_done_cb (GtkMenuShell *menushell,
- GossipPresenceChooser *chooser);
+ EmpathyPresenceChooser *chooser);
static void presence_chooser_menu_destroy_cb (GtkWidget *menu,
- GossipPresenceChooser *chooser);
+ EmpathyPresenceChooser *chooser);
static void presence_chooser_menu_detach (GtkWidget *attach_widget,
GtkMenu *menu);
static void presence_chooser_menu_align_func (GtkMenu *menu,
@@ -134,22 +134,22 @@ static void presence_chooser_dialog_response_cb (GtkWidget
gint response,
gpointer user_data);
-G_DEFINE_TYPE (GossipPresenceChooser, gossip_presence_chooser, GTK_TYPE_TOGGLE_BUTTON);
+G_DEFINE_TYPE (EmpathyPresenceChooser, empathy_presence_chooser, GTK_TYPE_TOGGLE_BUTTON);
static void
-gossip_presence_chooser_class_init (GossipPresenceChooserClass *klass)
+empathy_presence_chooser_class_init (EmpathyPresenceChooserClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = presence_chooser_finalize;
- g_type_class_add_private (object_class, sizeof (GossipPresenceChooserPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyPresenceChooserPriv));
}
static void
-gossip_presence_chooser_init (GossipPresenceChooser *chooser)
+empathy_presence_chooser_init (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
GtkWidget *arrow;
GtkWidget *alignment;
@@ -206,7 +206,7 @@ gossip_presence_chooser_init (GossipPresenceChooser *chooser)
static void
presence_chooser_finalize (GObject *object)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
priv = GET_PRIV (object);
@@ -223,23 +223,23 @@ presence_chooser_finalize (GObject *object)
object);
g_object_unref (priv->idle);
- G_OBJECT_CLASS (gossip_presence_chooser_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_presence_chooser_parent_class)->finalize (object);
}
GtkWidget *
-gossip_presence_chooser_new (void)
+empathy_presence_chooser_new (void)
{
GtkWidget *chooser;
- chooser = g_object_new (GOSSIP_TYPE_PRESENCE_CHOOSER, NULL);
+ chooser = g_object_new (EMPATHY_TYPE_PRESENCE_CHOOSER, NULL);
return chooser;
}
static void
-presence_chooser_presence_changed_cb (GossipPresenceChooser *chooser)
+presence_chooser_presence_changed_cb (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
McPresence state;
McPresence flash_state;
const gchar *status;
@@ -261,9 +261,9 @@ presence_chooser_presence_changed_cb (GossipPresenceChooser *chooser)
}
static void
-presence_chooser_reset_scroll_timeout (GossipPresenceChooser *chooser)
+presence_chooser_reset_scroll_timeout (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
priv = GET_PRIV (chooser);
@@ -277,9 +277,9 @@ presence_chooser_reset_scroll_timeout (GossipPresenceChooser *chooser)
}
static gboolean
-presence_chooser_scroll_timeout_cb (GossipPresenceChooser *chooser)
+presence_chooser_scroll_timeout_cb (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
priv = GET_PRIV (chooser);
@@ -296,11 +296,11 @@ presence_chooser_scroll_timeout_cb (GossipPresenceChooser *chooser)
}
static gboolean
-presence_chooser_scroll_event_cb (GossipPresenceChooser *chooser,
+presence_chooser_scroll_event_cb (EmpathyPresenceChooser *chooser,
GdkEventScroll *event,
gpointer user_data)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
GList *list, *l;
const gchar *current_status;
StateAndStatus *sas;
@@ -367,7 +367,7 @@ presence_chooser_scroll_event_cb (GossipPresenceChooser *chooser,
/* If we didn't get any match at all, it means the last state
* was a custom one. Just switch to the first one.
*/
- status = gossip_presence_state_get_default_status (states[0]);
+ status = empathy_presence_state_get_default_status (states[0]);
presence_chooser_reset_scroll_timeout (chooser);
empathy_idle_set_presence (priv->idle, states[0], status);
@@ -380,7 +380,7 @@ presence_chooser_scroll_event_cb (GossipPresenceChooser *chooser,
}
static GList *
-presence_chooser_get_presets (GossipPresenceChooser *chooser)
+presence_chooser_get_presets (EmpathyPresenceChooser *chooser)
{
GList *list = NULL;
guint i;
@@ -390,11 +390,11 @@ presence_chooser_get_presets (GossipPresenceChooser *chooser)
StateAndStatus *sas;
const gchar *status;
- status = gossip_presence_state_get_default_status (states[i]);
+ status = empathy_presence_state_get_default_status (states[i]);
sas = presence_chooser_state_and_status_new (states[i], status);
list = g_list_append (list, sas);
- presets = gossip_status_presets_get (states[i], 5);
+ presets = empathy_status_presets_get (states[i], 5);
for (p = presets; p; p = p->next) {
sas = presence_chooser_state_and_status_new (states[i], p->data);
list = g_list_append (list, sas);
@@ -420,9 +420,9 @@ presence_chooser_state_and_status_new (McPresence state,
}
static gboolean
-presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser)
+presence_chooser_flash_timeout_cb (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
McPresence state;
static gboolean on = FALSE;
@@ -435,7 +435,7 @@ presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser)
}
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- gossip_icon_name_for_presence_state (state),
+ empathy_icon_name_for_presence_state (state),
GTK_ICON_SIZE_MENU);
on = !on;
@@ -444,13 +444,13 @@ presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser)
}
static void
-presence_chooser_flash_start (GossipPresenceChooser *chooser,
+presence_chooser_flash_start (EmpathyPresenceChooser *chooser,
McPresence state_1,
McPresence state_2)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
- g_return_if_fail (GOSSIP_IS_PRESENCE_CHOOSER (chooser));
+ g_return_if_fail (EMPATHY_IS_PRESENCE_CHOOSER (chooser));
priv = GET_PRIV (chooser);
@@ -465,12 +465,12 @@ presence_chooser_flash_start (GossipPresenceChooser *chooser,
}
static void
-presence_chooser_flash_stop (GossipPresenceChooser *chooser,
+presence_chooser_flash_stop (EmpathyPresenceChooser *chooser,
McPresence state)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
- g_return_if_fail (GOSSIP_IS_PRESENCE_CHOOSER (chooser));
+ g_return_if_fail (EMPATHY_IS_PRESENCE_CHOOSER (chooser));
priv = GET_PRIV (chooser);
@@ -480,7 +480,7 @@ presence_chooser_flash_stop (GossipPresenceChooser *chooser,
}
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image),
- gossip_icon_name_for_presence_state (state),
+ empathy_icon_name_for_presence_state (state),
GTK_ICON_SIZE_MENU);
priv->last_state = state;
@@ -508,16 +508,16 @@ presence_chooser_toggled_cb (GtkWidget *chooser,
gpointer user_data)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (chooser))) {
- presence_chooser_menu_popup (GOSSIP_PRESENCE_CHOOSER (chooser));
+ presence_chooser_menu_popup (EMPATHY_PRESENCE_CHOOSER (chooser));
} else {
- presence_chooser_menu_popdown (GOSSIP_PRESENCE_CHOOSER (chooser));
+ presence_chooser_menu_popdown (EMPATHY_PRESENCE_CHOOSER (chooser));
}
}
static void
-presence_chooser_menu_popup (GossipPresenceChooser *chooser)
+presence_chooser_menu_popup (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
GtkWidget *menu;
priv = GET_PRIV (chooser);
@@ -526,7 +526,7 @@ presence_chooser_menu_popup (GossipPresenceChooser *chooser)
return;
}
- menu = gossip_presence_chooser_create_menu ();
+ menu = empathy_presence_chooser_create_menu ();
g_signal_connect_after (menu, "selection-done",
G_CALLBACK (presence_chooser_menu_selection_done_cb),
@@ -551,9 +551,9 @@ presence_chooser_menu_popup (GossipPresenceChooser *chooser)
}
static void
-presence_chooser_menu_popdown (GossipPresenceChooser *chooser)
+presence_chooser_menu_popdown (EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
priv = GET_PRIV (chooser);
@@ -564,7 +564,7 @@ presence_chooser_menu_popdown (GossipPresenceChooser *chooser)
static void
presence_chooser_menu_selection_done_cb (GtkMenuShell *menushell,
- GossipPresenceChooser *chooser)
+ EmpathyPresenceChooser *chooser)
{
gtk_widget_destroy (GTK_WIDGET (menushell));
@@ -573,9 +573,9 @@ presence_chooser_menu_selection_done_cb (GtkMenuShell *menushell,
static void
presence_chooser_menu_destroy_cb (GtkWidget *menu,
- GossipPresenceChooser *chooser)
+ EmpathyPresenceChooser *chooser)
{
- GossipPresenceChooserPriv *priv;
+ EmpathyPresenceChooserPriv *priv;
priv = GET_PRIV (chooser);
@@ -632,7 +632,7 @@ presence_chooser_menu_align_func (GtkMenu *menu,
}
GtkWidget *
-gossip_presence_chooser_create_menu (void)
+empathy_presence_chooser_create_menu (void)
{
const gchar *status;
GtkWidget *menu;
@@ -645,13 +645,13 @@ gossip_presence_chooser_create_menu (void)
for (i = 0; i < G_N_ELEMENTS (states); i++) {
GList *list, *l;
- status = gossip_presence_state_get_default_status (states[i]);
+ status = empathy_presence_state_get_default_status (states[i]);
presence_chooser_menu_add_item (menu,
status,
states[i],
FALSE);
- list = gossip_status_presets_get (states[i], 5);
+ list = empathy_status_presets_get (states[i], 5);
for (l = list; l; l = l->next) {
presence_chooser_menu_add_item (menu,
l->data,
@@ -672,7 +672,7 @@ gossip_presence_chooser_create_menu (void)
}
/* Offline to disconnect */
- status = gossip_presence_state_get_default_status (MC_PRESENCE_OFFLINE);
+ status = empathy_presence_state_get_default_status (MC_PRESENCE_OFFLINE);
presence_chooser_menu_add_item (menu,
status,
MC_PRESENCE_OFFLINE,
@@ -709,7 +709,7 @@ presence_chooser_menu_add_item (GtkWidget *menu,
const gchar *icon_name;
item = gtk_image_menu_item_new_with_label (str);
- icon_name = gossip_icon_name_for_presence_state (state);
+ icon_name = empathy_icon_name_for_presence_state (state);
if (custom) {
g_signal_connect (item, "activate",
@@ -751,7 +751,7 @@ presence_chooser_clear_activate_cb (GtkWidget *item,
gboolean visible;
window = GTK_WINDOW (toplevel);
- visible = gossip_window_get_is_visible (window);
+ visible = empathy_window_get_is_visible (window);
if (visible) {
parent = window;
@@ -789,7 +789,7 @@ presence_chooser_clear_response_cb (GtkWidget *widget,
gpointer user_data)
{
if (response == GTK_RESPONSE_OK) {
- gossip_status_presets_reset ();
+ empathy_status_presets_reset ();
}
gtk_widget_destroy (widget);
@@ -819,9 +819,9 @@ presence_chooser_set_state (McPresence state,
const gchar *default_status;
/* Only store the value if it differs from the default ones. */
- default_status = gossip_presence_state_get_default_status (state);
+ default_status = empathy_presence_state_get_default_status (state);
if (save && strcmp (status, default_status) != 0) {
- gossip_status_presets_set_last (state, status);
+ empathy_status_presets_set_last (state, status);
}
}
@@ -864,7 +864,7 @@ presence_chooser_show_dialog (McPresence state)
}
}
- glade = gossip_glade_get_file ("gossip-presence-chooser.glade",
+ glade = empathy_glade_get_file ("empathy-presence-chooser.glade",
"status_message_dialog",
NULL,
"status_message_dialog", &dialog,
@@ -883,7 +883,7 @@ presence_chooser_show_dialog (McPresence state)
NULL);
gtk_image_set_from_icon_name (GTK_IMAGE (image),
- gossip_icon_name_for_presence_state (state),
+ empathy_icon_name_for_presence_state (state),
GTK_ICON_SIZE_MENU);
if (!store[state]) {
@@ -892,7 +892,7 @@ presence_chooser_show_dialog (McPresence state)
store[state] = gtk_list_store_new (1, G_TYPE_STRING);
- presets = gossip_status_presets_get (state, -1);
+ presets = empathy_status_presets_get (state, -1);
for (l = presets; l; l = l->next) {
gtk_list_store_append (store[state], &iter);
gtk_list_store_set (store[state], &iter, 0, l->data, -1);
@@ -901,7 +901,7 @@ presence_chooser_show_dialog (McPresence state)
g_list_free (presets);
}
- default_status = gossip_presence_state_get_default_status (state);
+ default_status = empathy_presence_state_get_default_status (state);
entry = GTK_BIN (combo)->child;
gtk_entry_set_text (GTK_ENTRY (entry), default_status);
diff --git a/libempathy-gtk/gossip-presence-chooser.glade b/libempathy-gtk/empathy-presence-chooser.glade
index f9f1d4eb0..f9f1d4eb0 100644
--- a/libempathy-gtk/gossip-presence-chooser.glade
+++ b/libempathy-gtk/empathy-presence-chooser.glade
diff --git a/libempathy-gtk/empathy-presence-chooser.h b/libempathy-gtk/empathy-presence-chooser.h
new file mode 100644
index 000000000..09023c275
--- /dev/null
+++ b/libempathy-gtk/empathy-presence-chooser.h
@@ -0,0 +1,58 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2005-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ */
+
+#ifndef __EMPATHY_PRESENCE_CHOOSER_H__
+#define __EMPATHY_PRESENCE_CHOOSER_H__
+
+#include <gtk/gtk.h>
+
+#include <libempathy/empathy-presence.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_PRESENCE_CHOOSER (empathy_presence_chooser_get_type ())
+#define EMPATHY_PRESENCE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooser))
+#define EMPATHY_PRESENCE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooserClass))
+#define EMPATHY_IS_PRESENCE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_PRESENCE_CHOOSER))
+#define EMPATHY_IS_PRESENCE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_PRESENCE_CHOOSER))
+#define EMPATHY_PRESENCE_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooserClass))
+
+typedef struct _EmpathyPresenceChooser EmpathyPresenceChooser;
+typedef struct _EmpathyPresenceChooserClass EmpathyPresenceChooserClass;
+
+struct _EmpathyPresenceChooser {
+ GtkToggleButton parent;
+};
+
+struct _EmpathyPresenceChooserClass {
+ GtkToggleButtonClass parent_class;
+};
+
+GType empathy_presence_chooser_get_type (void) G_GNUC_CONST;
+GtkWidget *empathy_presence_chooser_new (void);
+GtkWidget *empathy_presence_chooser_create_menu (void);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_PRESENCE_CHOOSER_H__ */
+
diff --git a/libempathy-gtk/gossip-private-chat.c b/libempathy-gtk/empathy-private-chat.c
index a7ef8fb03..ddc0633e4 100644
--- a/libempathy-gtk/gossip-private-chat.c
+++ b/libempathy-gtk/empathy-private-chat.c
@@ -33,26 +33,26 @@
#include <glade/glade.h>
#include <glib/gi18n.h>
-#include <libempathy/gossip-debug.h>
+#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-tp-contact-list.h>
#include <libempathy/empathy-contact-manager.h>
-//#include <libgossip/gossip-log.h>
+//#include <libempathy/empathy-log.h>
-#include "gossip-private-chat.h"
-#include "gossip-chat-view.h"
-#include "gossip-chat.h"
-#include "gossip-preferences.h"
-//#include "gossip-sound.h"
+#include "empathy-private-chat.h"
+#include "empathy-chat-view.h"
+#include "empathy-chat.h"
+#include "empathy-preferences.h"
+//#include "empathy-sound.h"
#include "empathy-images.h"
-#include "gossip-ui-utils.h"
+#include "empathy-ui-utils.h"
#define DEBUG_DOMAIN "PrivateChat"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_PRIVATE_CHAT, GossipPrivateChatPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_PRIVATE_CHAT, EmpathyPrivateChatPriv))
-struct _GossipPrivateChatPriv {
- GossipContact *contact;
+struct _EmpathyPrivateChatPriv {
+ EmpathyContact *contact;
gchar *name;
gboolean is_online;
@@ -61,30 +61,30 @@ struct _GossipPrivateChatPriv {
GtkWidget *text_view_sw;
};
-static void gossip_private_chat_class_init (GossipPrivateChatClass *klass);
-static void gossip_private_chat_init (GossipPrivateChat *chat);
+static void empathy_private_chat_class_init (EmpathyPrivateChatClass *klass);
+static void empathy_private_chat_init (EmpathyPrivateChat *chat);
static void private_chat_finalize (GObject *object);
-static void private_chat_create_ui (GossipPrivateChat *chat);
-static void private_chat_contact_presence_updated_cb (GossipContact *contact,
+static void private_chat_create_ui (EmpathyPrivateChat *chat);
+static void private_chat_contact_presence_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipPrivateChat *chat);
-static void private_chat_contact_updated_cb (GossipContact *contact,
+ EmpathyPrivateChat *chat);
+static void private_chat_contact_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipPrivateChat *chat);
+ EmpathyPrivateChat *chat);
static void private_chat_widget_destroy_cb (GtkWidget *widget,
- GossipPrivateChat *chat);
-static const gchar * private_chat_get_name (GossipChat *chat);
-static gchar * private_chat_get_tooltip (GossipChat *chat);
-static const gchar * private_chat_get_status_icon_name (GossipChat *chat);
-static GtkWidget * private_chat_get_widget (GossipChat *chat);
+ EmpathyPrivateChat *chat);
+static const gchar * private_chat_get_name (EmpathyChat *chat);
+static gchar * private_chat_get_tooltip (EmpathyChat *chat);
+static const gchar * private_chat_get_status_icon_name (EmpathyChat *chat);
+static GtkWidget * private_chat_get_widget (EmpathyChat *chat);
-G_DEFINE_TYPE (GossipPrivateChat, gossip_private_chat, GOSSIP_TYPE_CHAT);
+G_DEFINE_TYPE (EmpathyPrivateChat, empathy_private_chat, EMPATHY_TYPE_CHAT);
static void
-gossip_private_chat_class_init (GossipPrivateChatClass *klass)
+empathy_private_chat_class_init (EmpathyPrivateChatClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- GossipChatClass *chat_class = GOSSIP_CHAT_CLASS (klass);
+ EmpathyChatClass *chat_class = EMPATHY_CHAT_CLASS (klass);
object_class->finalize = private_chat_finalize;
@@ -94,13 +94,13 @@ gossip_private_chat_class_init (GossipPrivateChatClass *klass)
chat_class->get_widget = private_chat_get_widget;
chat_class->set_tp_chat = NULL;
- g_type_class_add_private (object_class, sizeof (GossipPrivateChatPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyPrivateChatPriv));
}
static void
-gossip_private_chat_init (GossipPrivateChat *chat)
+empathy_private_chat_init (EmpathyPrivateChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
priv = GET_PRIV (chat);
@@ -112,10 +112,10 @@ gossip_private_chat_init (GossipPrivateChat *chat)
static void
private_chat_finalize (GObject *object)
{
- GossipPrivateChat *chat;
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChat *chat;
+ EmpathyPrivateChatPriv *priv;
- chat = GOSSIP_PRIVATE_CHAT (object);
+ chat = EMPATHY_PRIVATE_CHAT (object);
priv = GET_PRIV (chat);
g_signal_handlers_disconnect_by_func (priv->contact,
@@ -131,19 +131,19 @@ private_chat_finalize (GObject *object)
g_free (priv->name);
- G_OBJECT_CLASS (gossip_private_chat_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_private_chat_parent_class)->finalize (object);
}
static void
-private_chat_create_ui (GossipPrivateChat *chat)
+private_chat_create_ui (EmpathyPrivateChat *chat)
{
GladeXML *glade;
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
GtkWidget *input_text_view_sw;
priv = GET_PRIV (chat);
- glade = gossip_glade_get_file ("gossip-chat.glade",
+ glade = empathy_glade_get_file ("empathy-chat.glade",
"chat_widget",
NULL,
"chat_widget", &priv->widget,
@@ -151,7 +151,7 @@ private_chat_create_ui (GossipPrivateChat *chat)
"input_text_view_sw", &input_text_view_sw,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
chat,
"chat_widget", "destroy", private_chat_widget_destroy_cb,
NULL);
@@ -161,33 +161,33 @@ private_chat_create_ui (GossipPrivateChat *chat)
g_object_set_data (G_OBJECT (priv->widget), "chat", g_object_ref (chat));
gtk_container_add (GTK_CONTAINER (priv->text_view_sw),
- GTK_WIDGET (GOSSIP_CHAT (chat)->view));
- gtk_widget_show (GTK_WIDGET (GOSSIP_CHAT (chat)->view));
+ GTK_WIDGET (EMPATHY_CHAT (chat)->view));
+ gtk_widget_show (GTK_WIDGET (EMPATHY_CHAT (chat)->view));
gtk_container_add (GTK_CONTAINER (input_text_view_sw),
- GOSSIP_CHAT (chat)->input_text_view);
- gtk_widget_show (GOSSIP_CHAT (chat)->input_text_view);
+ EMPATHY_CHAT (chat)->input_text_view);
+ gtk_widget_show (EMPATHY_CHAT (chat)->input_text_view);
}
static void
-private_chat_contact_presence_updated_cb (GossipContact *contact,
+private_chat_contact_presence_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipPrivateChat *chat)
+ EmpathyPrivateChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
priv = GET_PRIV (chat);
- gossip_debug (DEBUG_DOMAIN, "Presence update for contact: %s",
- gossip_contact_get_id (contact));
+ empathy_debug (DEBUG_DOMAIN, "Presence update for contact: %s",
+ empathy_contact_get_id (contact));
- if (!gossip_contact_is_online (contact)) {
+ if (!empathy_contact_is_online (contact)) {
if (priv->is_online) {
gchar *msg;
msg = g_strdup_printf (_("%s went offline"),
- gossip_contact_get_name (priv->contact));
- gossip_chat_view_append_event (GOSSIP_CHAT (chat)->view, msg);
+ empathy_contact_get_name (priv->contact));
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, msg);
g_free (msg);
}
@@ -200,8 +200,8 @@ private_chat_contact_presence_updated_cb (GossipContact *contact,
gchar *msg;
msg = g_strdup_printf (_("%s has come online"),
- gossip_contact_get_name (priv->contact));
- gossip_chat_view_append_event (GOSSIP_CHAT (chat)->view, msg);
+ empathy_contact_get_name (priv->contact));
+ empathy_chat_view_append_event (EMPATHY_CHAT (chat)->view, msg);
g_free (msg);
}
@@ -212,36 +212,36 @@ private_chat_contact_presence_updated_cb (GossipContact *contact,
}
static void
-private_chat_contact_updated_cb (GossipContact *contact,
+private_chat_contact_updated_cb (EmpathyContact *contact,
GParamSpec *param,
- GossipPrivateChat *chat)
+ EmpathyPrivateChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
priv = GET_PRIV (chat);
- if (strcmp (priv->name, gossip_contact_get_name (contact)) != 0) {
+ if (strcmp (priv->name, empathy_contact_get_name (contact)) != 0) {
g_free (priv->name);
- priv->name = g_strdup (gossip_contact_get_name (contact));
+ priv->name = g_strdup (empathy_contact_get_name (contact));
g_signal_emit_by_name (chat, "name-changed", priv->name);
}
}
static void
private_chat_widget_destroy_cb (GtkWidget *widget,
- GossipPrivateChat *chat)
+ EmpathyPrivateChat *chat)
{
- gossip_debug (DEBUG_DOMAIN, "Destroyed");
+ empathy_debug (DEBUG_DOMAIN, "Destroyed");
g_object_unref (chat);
}
static const gchar *
-private_chat_get_name (GossipChat *chat)
+private_chat_get_name (EmpathyChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_PRIVATE_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_PRIVATE_CHAT (chat), NULL);
priv = GET_PRIV (chat);
@@ -249,40 +249,40 @@ private_chat_get_name (GossipChat *chat)
}
static gchar *
-private_chat_get_tooltip (GossipChat *chat)
+private_chat_get_tooltip (EmpathyChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
const gchar *status;
- g_return_val_if_fail (GOSSIP_IS_PRIVATE_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_PRIVATE_CHAT (chat), NULL);
priv = GET_PRIV (chat);
- status = gossip_contact_get_status (priv->contact);
+ status = empathy_contact_get_status (priv->contact);
return g_strdup_printf ("%s\n%s",
- gossip_contact_get_id (priv->contact),
+ empathy_contact_get_id (priv->contact),
status);
}
static const gchar *
-private_chat_get_status_icon_name (GossipChat *chat)
+private_chat_get_status_icon_name (EmpathyChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_PRIVATE_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_PRIVATE_CHAT (chat), NULL);
priv = GET_PRIV (chat);
- return gossip_icon_name_for_contact (priv->contact);
+ return empathy_icon_name_for_contact (priv->contact);
}
-GossipContact *
-gossip_private_chat_get_contact (GossipPrivateChat *chat)
+EmpathyContact *
+empathy_private_chat_get_contact (EmpathyPrivateChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
- g_return_val_if_fail (GOSSIP_IS_PRIVATE_CHAT (chat), NULL);
+ g_return_val_if_fail (EMPATHY_IS_PRIVATE_CHAT (chat), NULL);
priv = GET_PRIV (chat);
@@ -290,9 +290,9 @@ gossip_private_chat_get_contact (GossipPrivateChat *chat)
}
static GtkWidget *
-private_chat_get_widget (GossipChat *chat)
+private_chat_get_widget (EmpathyChat *chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
priv = GET_PRIV (chat);
@@ -300,19 +300,19 @@ private_chat_get_widget (GossipChat *chat)
}
static void
-private_chat_setup (GossipPrivateChat *chat,
- GossipContact *contact,
+private_chat_setup (EmpathyPrivateChat *chat,
+ EmpathyContact *contact,
EmpathyTpChat *tp_chat)
{
- GossipPrivateChatPriv *priv;
+ EmpathyPrivateChatPriv *priv;
priv = GET_PRIV (chat);
- GOSSIP_CHAT (chat)->account = g_object_ref (gossip_contact_get_account (contact));
+ EMPATHY_CHAT (chat)->account = g_object_ref (empathy_contact_get_account (contact));
priv->contact = g_object_ref (contact);
- priv->name = g_strdup (gossip_contact_get_name (contact));
+ priv->name = g_strdup (empathy_contact_get_name (contact));
- gossip_chat_set_tp_chat (GOSSIP_CHAT (chat), tp_chat);
+ empathy_chat_set_tp_chat (EMPATHY_CHAT (chat), tp_chat);
g_signal_connect (priv->contact,
"notify::name",
@@ -323,18 +323,18 @@ private_chat_setup (GossipPrivateChat *chat,
G_CALLBACK (private_chat_contact_presence_updated_cb),
chat);
- priv->is_online = gossip_contact_is_online (priv->contact);
+ priv->is_online = empathy_contact_is_online (priv->contact);
}
-GossipPrivateChat *
-gossip_private_chat_new (McAccount *account,
+EmpathyPrivateChat *
+empathy_private_chat_new (McAccount *account,
TpChan *tp_chan)
{
- GossipPrivateChat *chat;
+ EmpathyPrivateChat *chat;
EmpathyTpChat *tp_chat;
EmpathyContactManager *manager;
EmpathyTpContactList *list;
- GossipContact *contact;
+ EmpathyContact *contact;
g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (TELEPATHY_IS_CHAN (tp_chan), NULL);
@@ -343,7 +343,7 @@ gossip_private_chat_new (McAccount *account,
list = empathy_contact_manager_get_list (manager, account);
contact = empathy_tp_contact_list_get_from_handle (list, tp_chan->handle);
- chat = g_object_new (GOSSIP_TYPE_PRIVATE_CHAT, NULL);
+ chat = g_object_new (EMPATHY_TYPE_PRIVATE_CHAT, NULL);
tp_chat = empathy_tp_chat_new (account, tp_chan);
private_chat_setup (chat, contact, tp_chat);
@@ -355,15 +355,15 @@ gossip_private_chat_new (McAccount *account,
return chat;
}
-GossipPrivateChat *
-gossip_private_chat_new_with_contact (GossipContact *contact)
+EmpathyPrivateChat *
+empathy_private_chat_new_with_contact (EmpathyContact *contact)
{
- GossipPrivateChat *chat;
+ EmpathyPrivateChat *chat;
EmpathyTpChat *tp_chat;
- g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
- chat = g_object_new (GOSSIP_TYPE_PRIVATE_CHAT, NULL);
+ chat = g_object_new (EMPATHY_TYPE_PRIVATE_CHAT, NULL);
tp_chat = empathy_tp_chat_new_with_contact (contact);
private_chat_setup (chat, contact, tp_chat);
diff --git a/libempathy-gtk/empathy-private-chat.h b/libempathy-gtk/empathy-private-chat.h
new file mode 100644
index 000000000..b13eede7f
--- /dev/null
+++ b/libempathy-gtk/empathy-private-chat.h
@@ -0,0 +1,68 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2002-2007 Imendio AB
+ * Copyright (C) 2007 Collabora Ltd.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Mikael Hallendal <micke@imendio.com>
+ * Richard Hult <richard@imendio.com>
+ * Martyn Russell <martyn@imendio.com>
+ * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
+ * Xavier Claessens <xclaesse@gmail.com>
+ */
+
+#ifndef __EMPATHY_PRIVATE_CHAT_H__
+#define __EMPATHY_PRIVATE_CHAT_H__
+
+#include <libtelepathy/tp-chan.h>
+
+#include <libmissioncontrol/mc-account.h>
+
+#include <libempathy/empathy-contact.h>
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_PRIVATE_CHAT (empathy_private_chat_get_type ())
+#define EMPATHY_PRIVATE_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_PRIVATE_CHAT, EmpathyPrivateChat))
+#define EMPATHY_PRIVATE_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_PRIVATE_CHAT, EmpathyPrivateChatClass))
+#define EMPATHY_IS_PRIVATE_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_PRIVATE_CHAT))
+#define EMPATHY_IS_PRIVATE_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_PRIVATE_CHAT))
+#define EMPATHY_PRIVATE_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_PRIVATE_CHAT, EmpathyPrivateChatClass))
+
+typedef struct _EmpathyPrivateChat EmpathyPrivateChat;
+typedef struct _EmpathyPrivateChatClass EmpathyPrivateChatClass;
+typedef struct _EmpathyPrivateChatPriv EmpathyPrivateChatPriv;
+
+#include "empathy-chat.h"
+
+struct _EmpathyPrivateChat {
+ EmpathyChat parent;
+};
+
+struct _EmpathyPrivateChatClass {
+ EmpathyChatClass parent;
+};
+
+GType empathy_private_chat_get_type (void);
+EmpathyPrivateChat * empathy_private_chat_new (McAccount *account,
+ TpChan *tp_chan);
+EmpathyPrivateChat * empathy_private_chat_new_with_contact (EmpathyContact *contact);
+EmpathyContact * empathy_private_chat_get_contact (EmpathyPrivateChat *chat);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_PRIVATE_CHAT_H__ */
diff --git a/libempathy-gtk/gossip-profile-chooser.c b/libempathy-gtk/empathy-profile-chooser.c
index b55002896..1885c2fb2 100644
--- a/libempathy-gtk/gossip-profile-chooser.c
+++ b/libempathy-gtk/empathy-profile-chooser.c
@@ -25,9 +25,9 @@
#include <gtk/gtk.h>
#include <libmissioncontrol/mc-profile.h>
-#include <libempathy-gtk/gossip-ui-utils.h>
+#include <libempathy-gtk/empathy-ui-utils.h>
-#include "gossip-profile-chooser.h"
+#include "empathy-profile-chooser.h"
enum {
COL_ICON,
@@ -37,7 +37,7 @@ enum {
};
McProfile*
-gossip_profile_chooser_get_selected (GtkWidget *widget)
+empathy_profile_chooser_get_selected (GtkWidget *widget)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -54,7 +54,7 @@ gossip_profile_chooser_get_selected (GtkWidget *widget)
}
GtkWidget *
-gossip_profile_chooser_new (void)
+empathy_profile_chooser_new (void)
{
GList *profiles, *l;
GtkListStore *store;
diff --git a/libempathy-gtk/gossip-profile-chooser.h b/libempathy-gtk/empathy-profile-chooser.h
index a563109a0..6a9c405a2 100644
--- a/libempathy-gtk/gossip-profile-chooser.h
+++ b/libempathy-gtk/empathy-profile-chooser.h
@@ -20,15 +20,15 @@
* Authors: Xavier Claessens <xclaesse@gmail.com>
*/
-#ifndef __GOSSIP_PROTOCOL_CHOOSER_H__
-#define __GOSSIP_PROTOCOL_CHOOSER_H__
+#ifndef __EMPATHY_PROTOCOL_CHOOSER_H__
+#define __EMPATHY_PROTOCOL_CHOOSER_H__
#include <libmissioncontrol/mc-profile.h>
G_BEGIN_DECLS
-GtkWidget * gossip_profile_chooser_new (void);
-McProfile * gossip_profile_chooser_get_selected (GtkWidget *widget);
+GtkWidget * empathy_profile_chooser_new (void);
+McProfile * empathy_profile_chooser_get_selected (GtkWidget *widget);
G_END_DECLS
-#endif /* __GOSSIP_PROTOCOL_CHOOSER_H__ */
+#endif /* __EMPATHY_PROTOCOL_CHOOSER_H__ */
diff --git a/libempathy-gtk/gossip-spell-dialog.c b/libempathy-gtk/empathy-spell-dialog.c
index b34a8860c..7f4d75a13 100644
--- a/libempathy-gtk/gossip-spell-dialog.c
+++ b/libempathy-gtk/empathy-spell-dialog.c
@@ -32,9 +32,9 @@
#include <gtk/gtksizegroup.h>
#include <glade/glade.h>
-#include "gossip-chat.h"
-#include "gossip-spell-dialog.h"
-#include "gossip-ui-utils.h"
+#include "empathy-chat.h"
+#include "empathy-spell-dialog.h"
+#include "empathy-ui-utils.h"
typedef struct {
GtkWidget *window;
@@ -42,35 +42,35 @@ typedef struct {
GtkWidget *label_word;
GtkWidget *treeview_words;
- GossipChat *chat;
+ EmpathyChat *chat;
gchar *word;
GtkTextIter start;
GtkTextIter end;
-} GossipSpellDialog;
+} EmpathySpellDialog;
enum {
COL_SPELL_WORD,
COL_SPELL_COUNT
};
-static void spell_dialog_model_populate_columns (GossipSpellDialog *dialog);
-static void spell_dialog_model_populate_suggestions (GossipSpellDialog *dialog);
+static void spell_dialog_model_populate_columns (EmpathySpellDialog *dialog);
+static void spell_dialog_model_populate_suggestions (EmpathySpellDialog *dialog);
static void spell_dialog_model_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipSpellDialog *dialog);
+ EmpathySpellDialog *dialog);
static void spell_dialog_model_selection_changed_cb (GtkTreeSelection *treeselection,
- GossipSpellDialog *dialog);
-static void spell_dialog_model_setup (GossipSpellDialog *dialog);
+ EmpathySpellDialog *dialog);
+static void spell_dialog_model_setup (EmpathySpellDialog *dialog);
static void spell_dialog_response_cb (GtkWidget *widget,
gint response,
- GossipSpellDialog *dialog);
+ EmpathySpellDialog *dialog);
static void spell_dialog_destroy_cb (GtkWidget *widget,
- GossipSpellDialog *dialog);
+ EmpathySpellDialog *dialog);
static void
-spell_dialog_model_populate_columns (GossipSpellDialog *dialog)
+spell_dialog_model_populate_columns (EmpathySpellDialog *dialog)
{
GtkTreeModel *model;
GtkTreeViewColumn *column;
@@ -97,7 +97,7 @@ spell_dialog_model_populate_columns (GossipSpellDialog *dialog)
}
static void
-spell_dialog_model_populate_suggestions (GossipSpellDialog *dialog)
+spell_dialog_model_populate_suggestions (EmpathySpellDialog *dialog)
{
GtkTreeModel *model;
GtkListStore *store;
@@ -106,7 +106,7 @@ spell_dialog_model_populate_suggestions (GossipSpellDialog *dialog)
model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->treeview_words));
store = GTK_LIST_STORE (model);
- suggestions = gossip_spell_get_suggestions (dialog->word);
+ suggestions = empathy_spell_get_suggestions (dialog->word);
for (l = suggestions; l; l=l->next) {
GtkTreeIter iter;
gchar *word;
@@ -119,21 +119,21 @@ spell_dialog_model_populate_suggestions (GossipSpellDialog *dialog)
-1);
}
- gossip_spell_free_suggestions (suggestions);
+ empathy_spell_free_suggestions (suggestions);
}
static void
spell_dialog_model_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
- GossipSpellDialog *dialog)
+ EmpathySpellDialog *dialog)
{
spell_dialog_response_cb (dialog->window, GTK_RESPONSE_OK, dialog);
}
static void
spell_dialog_model_selection_changed_cb (GtkTreeSelection *treeselection,
- GossipSpellDialog *dialog)
+ EmpathySpellDialog *dialog)
{
gint count;
@@ -142,7 +142,7 @@ spell_dialog_model_selection_changed_cb (GtkTreeSelection *treeselection,
}
static void
-spell_dialog_model_setup (GossipSpellDialog *dialog)
+spell_dialog_model_setup (EmpathySpellDialog *dialog)
{
GtkTreeView *view;
GtkListStore *store;
@@ -174,7 +174,7 @@ spell_dialog_model_setup (GossipSpellDialog *dialog)
static void
spell_dialog_destroy_cb (GtkWidget *widget,
- GossipSpellDialog *dialog)
+ EmpathySpellDialog *dialog)
{
g_object_unref (dialog->chat);
g_free (dialog->word);
@@ -185,7 +185,7 @@ spell_dialog_destroy_cb (GtkWidget *widget,
static void
spell_dialog_response_cb (GtkWidget *widget,
gint response,
- GossipSpellDialog *dialog)
+ EmpathySpellDialog *dialog)
{
if (response == GTK_RESPONSE_OK) {
GtkTreeView *view;
@@ -204,7 +204,7 @@ spell_dialog_response_cb (GtkWidget *widget,
gtk_tree_model_get (model, &iter, COL_SPELL_WORD, &new_word, -1);
- gossip_chat_correct_word (dialog->chat,
+ empathy_chat_correct_word (dialog->chat,
dialog->start,
dialog->end,
new_word);
@@ -216,19 +216,19 @@ spell_dialog_response_cb (GtkWidget *widget,
}
void
-gossip_spell_dialog_show (GossipChat *chat,
+empathy_spell_dialog_show (EmpathyChat *chat,
GtkTextIter start,
GtkTextIter end,
const gchar *word)
{
- GossipSpellDialog *dialog;
+ EmpathySpellDialog *dialog;
GladeXML *gui;
gchar *str;
g_return_if_fail (chat != NULL);
g_return_if_fail (word != NULL);
- dialog = g_new0 (GossipSpellDialog, 1);
+ dialog = g_new0 (EmpathySpellDialog, 1);
dialog->chat = g_object_ref (chat);
@@ -237,7 +237,7 @@ gossip_spell_dialog_show (GossipChat *chat,
dialog->start = start;
dialog->end = end;
- gui = gossip_glade_get_file ("gossip-spell-dialog.glade",
+ gui = empathy_glade_get_file ("empathy-spell-dialog.glade",
"spell_dialog",
NULL,
"spell_dialog", &dialog->window,
@@ -246,7 +246,7 @@ gossip_spell_dialog_show (GossipChat *chat,
"treeview_words", &dialog->treeview_words,
NULL);
- gossip_glade_connect (gui,
+ empathy_glade_connect (gui,
dialog,
"spell_dialog", "response", spell_dialog_response_cb,
"spell_dialog", "destroy", spell_dialog_destroy_cb,
diff --git a/libempathy-gtk/gossip-spell-dialog.glade b/libempathy-gtk/empathy-spell-dialog.glade
index 502fb0d13..502fb0d13 100644
--- a/libempathy-gtk/gossip-spell-dialog.glade
+++ b/libempathy-gtk/empathy-spell-dialog.glade
diff --git a/libempathy-gtk/gossip-spell-dialog.h b/libempathy-gtk/empathy-spell-dialog.h
index 2f71033f0..e6d2e4c7a 100644
--- a/libempathy-gtk/gossip-spell-dialog.h
+++ b/libempathy-gtk/empathy-spell-dialog.h
@@ -21,19 +21,19 @@
* Richard Hult <richard@imendio.com>
*/
-#ifndef __GOSSIP_SPELL_DIALOG_H__
-#define __GOSSIP_SPELL_DIALOG_H__
+#ifndef __EMPATHY_SPELL_DIALOG_H__
+#define __EMPATHY_SPELL_DIALOG_H__
#include <gtk/gtktextiter.h>
-#include "gossip-chat.h"
+#include "empathy-chat.h"
G_BEGIN_DECLS
-void gossip_spell_dialog_show (GossipChat *chat,
+void empathy_spell_dialog_show (EmpathyChat *chat,
GtkTextIter start,
GtkTextIter end,
const gchar *word);
G_END_DECLS
-#endif /* __GOSSIP_SPELL_DIALOG_H__ */
+#endif /* __EMPATHY_SPELL_DIALOG_H__ */
diff --git a/libempathy-gtk/gossip-spell.c b/libempathy-gtk/empathy-spell.c
index 8d595f4c2..88696cca3 100644
--- a/libempathy-gtk/gossip-spell.c
+++ b/libempathy-gtk/empathy-spell.c
@@ -32,11 +32,11 @@
#include <aspell.h>
#endif
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-conf.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-conf.h>
-#include "gossip-spell.h"
-#include "gossip-preferences.h"
+#include "empathy-spell.h"
+#include "empathy-preferences.h"
#define DEBUG_DOMAIN "Spell"
@@ -57,7 +57,7 @@ typedef struct {
static GHashTable *iso_code_names = NULL;
static GList *languages = NULL;
-static gboolean gossip_conf_notify_inited = FALSE;
+static gboolean empathy_conf_notify_inited = FALSE;
static void
spell_iso_codes_parse_start_tag (GMarkupParseContext *ctx,
@@ -166,13 +166,13 @@ spell_iso_code_names_init (void)
}
static void
-spell_notify_languages_cb (GossipConf *conf,
+spell_notify_languages_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
GList *l;
- gossip_debug (DEBUG_DOMAIN, "Resetting languages due to config change");
+ empathy_debug (DEBUG_DOMAIN, "Resetting languages due to config change");
/* We just reset the languages list. */
for (l = languages; l; l = l->next) {
@@ -195,20 +195,20 @@ spell_setup_languages (void)
{
gchar *str;
- if (!gossip_conf_notify_inited) {
- gossip_conf_notify_add (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
+ if (!empathy_conf_notify_inited) {
+ empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
spell_notify_languages_cb, NULL);
- gossip_conf_notify_inited = TRUE;
+ empathy_conf_notify_inited = TRUE;
}
if (languages) {
return;
}
- if (gossip_conf_get_string (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
+ if (empathy_conf_get_string (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_SPELL_CHECKER_LANGUAGES,
&str) && str) {
gchar **strv;
gint i;
@@ -219,7 +219,7 @@ spell_setup_languages (void)
while (strv && strv[i]) {
SpellLanguage *lang;
- gossip_debug (DEBUG_DOMAIN, "Setting up language:'%s'", strv[i]);
+ empathy_debug (DEBUG_DOMAIN, "Setting up language:'%s'", strv[i]);
lang = g_slice_new0 (SpellLanguage);
@@ -248,7 +248,7 @@ spell_setup_languages (void)
}
const char *
-gossip_spell_get_language_name (const char *code)
+empathy_spell_get_language_name (const char *code)
{
const gchar *name;
@@ -267,7 +267,7 @@ gossip_spell_get_language_name (const char *code)
}
GList *
-gossip_spell_get_language_codes (void)
+empathy_spell_get_language_codes (void)
{
AspellConfig *config;
AspellDictInfoList *dlist;
@@ -294,14 +294,14 @@ gossip_spell_get_language_codes (void)
}
void
-gossip_spell_free_language_codes (GList *codes)
+empathy_spell_free_language_codes (GList *codes)
{
g_list_foreach (codes, (GFunc) g_free, NULL);
g_list_free (codes);
}
gboolean
-gossip_spell_check (const gchar *word)
+empathy_spell_check (const gchar *word)
{
GList *l;
gint n_langs;
@@ -316,7 +316,7 @@ gossip_spell_check (const gchar *word)
spell_setup_languages ();
if (!languages) {
- gossip_debug (DEBUG_DOMAIN, "No languages to check against");
+ empathy_debug (DEBUG_DOMAIN, "No languages to check against");
return TRUE;
}
@@ -328,7 +328,7 @@ gossip_spell_check (const gchar *word)
if (digit) {
/* We don't spell check digits. */
- gossip_debug (DEBUG_DOMAIN, "Not spell checking word:'%s', it is all digits", word);
+ empathy_debug (DEBUG_DOMAIN, "Not spell checking word:'%s', it is all digits", word);
return TRUE;
}
@@ -349,7 +349,7 @@ gossip_spell_check (const gchar *word)
}
GList *
-gossip_spell_get_suggestions (const gchar *word)
+empathy_spell_get_suggestions (const gchar *word)
{
GList *l1;
GList *l2 = NULL;
@@ -385,10 +385,10 @@ gossip_spell_get_suggestions (const gchar *word)
}
gboolean
-gossip_spell_supported (void)
+empathy_spell_supported (void)
{
- if (g_getenv ("GOSSIP_SPELL_DISABLED")) {
- gossip_debug (DEBUG_DOMAIN, "GOSSIP_SPELL_DISABLE env variable defined");
+ if (g_getenv ("EMPATHY_SPELL_DISABLED")) {
+ empathy_debug (DEBUG_DOMAIN, "EMPATHY_SPELL_DISABLE env variable defined");
return FALSE;
}
@@ -398,45 +398,45 @@ gossip_spell_supported (void)
#else /* not HAVE_ASPELL */
gboolean
-gossip_spell_supported (void)
+empathy_spell_supported (void)
{
return FALSE;
}
GList *
-gossip_spell_get_suggestions (const gchar *word)
+empathy_spell_get_suggestions (const gchar *word)
{
- gossip_debug (DEBUG_DOMAIN, "Support disabled, could not get suggestions");
+ empathy_debug (DEBUG_DOMAIN, "Support disabled, could not get suggestions");
return NULL;
}
gboolean
-gossip_spell_check (const gchar *word)
+empathy_spell_check (const gchar *word)
{
- gossip_debug (DEBUG_DOMAIN, "Support disabled, could not check spelling");
+ empathy_debug (DEBUG_DOMAIN, "Support disabled, could not check spelling");
return TRUE;
}
const char *
-gossip_spell_get_language_name (const char *lang)
+empathy_spell_get_language_name (const char *lang)
{
- gossip_debug (DEBUG_DOMAIN, "Support disabled, could not get language name");
+ empathy_debug (DEBUG_DOMAIN, "Support disabled, could not get language name");
return NULL;
}
GList *
-gossip_spell_get_language_codes (void)
+empathy_spell_get_language_codes (void)
{
- gossip_debug (DEBUG_DOMAIN, "Support disabled, could not get language codes");
+ empathy_debug (DEBUG_DOMAIN, "Support disabled, could not get language codes");
return NULL;
}
void
-gossip_spell_free_language_codes (GList *codes)
+empathy_spell_free_language_codes (GList *codes)
{
}
@@ -444,7 +444,7 @@ gossip_spell_free_language_codes (GList *codes)
void
-gossip_spell_free_suggestions (GList *suggestions)
+empathy_spell_free_suggestions (GList *suggestions)
{
g_list_foreach (suggestions, (GFunc) g_free, NULL);
g_list_free (suggestions);
diff --git a/libempathy-gtk/gossip-spell.h b/libempathy-gtk/empathy-spell.h
index f2d841b3a..4f483cf35 100644
--- a/libempathy-gtk/gossip-spell.h
+++ b/libempathy-gtk/empathy-spell.h
@@ -21,19 +21,19 @@
* Richard Hult <richard@imendio.com>
*/
-#ifndef __GOSSIP_SPELL_H__
-#define __GOSSIP_SPELL_H__
+#ifndef __EMPATHY_SPELL_H__
+#define __EMPATHY_SPELL_H__
G_BEGIN_DECLS
-gboolean gossip_spell_supported (void);
-const gchar *gossip_spell_get_language_name (const gchar *code);
-GList *gossip_spell_get_language_codes (void);
-void gossip_spell_free_language_codes (GList *codes);
-gboolean gossip_spell_check (const gchar *word);
-GList * gossip_spell_get_suggestions (const gchar *word);
-void gossip_spell_free_suggestions (GList *suggestions);
+gboolean empathy_spell_supported (void);
+const gchar *empathy_spell_get_language_name (const gchar *code);
+GList *empathy_spell_get_language_codes (void);
+void empathy_spell_free_language_codes (GList *codes);
+gboolean empathy_spell_check (const gchar *word);
+GList * empathy_spell_get_suggestions (const gchar *word);
+void empathy_spell_free_suggestions (GList *suggestions);
G_END_DECLS
-#endif /* __GOSSIP_SPELL_H__ */
+#endif /* __EMPATHY_SPELL_H__ */
diff --git a/libempathy-gtk/empathy-status-icon.c b/libempathy-gtk/empathy-status-icon.c
index 17d274ee6..b9c1af790 100644
--- a/libempathy-gtk/empathy-status-icon.c
+++ b/libempathy-gtk/empathy-status-icon.c
@@ -32,18 +32,18 @@
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-contact-manager.h>
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
-#include <libempathy/gossip-conf.h>
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-conf.h>
#include <libempathy/empathy-idle.h>
#include "empathy-status-icon.h"
#include "empathy-contact-dialogs.h"
-#include "gossip-presence-chooser.h"
-#include "gossip-preferences.h"
-#include "gossip-ui-utils.h"
-#include "gossip-accounts-dialog.h"
+#include "empathy-presence-chooser.h"
+#include "empathy-preferences.h"
+#include "empathy-ui-utils.h"
+#include "empathy-accounts-dialog.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
@@ -106,7 +106,7 @@ static void status_icon_quit_cb (GtkWidget *windo
static void status_icon_show_hide_window_cb (GtkWidget *widget,
EmpathyStatusIcon *icon);
static void status_icon_local_pending_cb (EmpathyContactManager *manager,
- GossipContact *contact,
+ EmpathyContact *contact,
gchar *message,
EmpathyStatusIcon *icon);
static void status_icon_event_subscribe_cb (StatusIconEvent *event);
@@ -211,10 +211,10 @@ empathy_status_icon_new (GtkWindow *window)
G_CALLBACK (status_icon_delete_event_cb),
icon);
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN,
&should_hide);
- visible = gossip_window_get_is_visible (window);
+ visible = empathy_window_get_is_visible (window);
if ((!should_hide && !visible) || (should_hide && visible)) {
status_icon_toggle_visibility (icon);
@@ -235,7 +235,7 @@ status_icon_idle_notify_cb (EmpathyStatusIcon *icon)
if (flash_state != MC_PRESENCE_UNSET) {
const gchar *icon_name;
- icon_name = gossip_icon_name_for_presence_state (flash_state);
+ icon_name = empathy_icon_name_for_presence_state (flash_state);
if (!priv->flash_state_event) {
/* We are now flashing */
priv->flash_state_event = status_icon_event_new (icon, icon_name, NULL);
@@ -293,7 +293,7 @@ status_icon_set_from_state (EmpathyStatusIcon *icon)
priv = GET_PRIV (icon);
state = empathy_idle_get_state (priv->idle);
- icon_name = gossip_icon_name_for_presence_state (state);
+ icon_name = empathy_icon_name_for_presence_state (state);
gtk_status_icon_set_from_icon_name (priv->icon, icon_name);
}
@@ -305,27 +305,27 @@ status_icon_toggle_visibility (EmpathyStatusIcon *icon)
priv = GET_PRIV (icon);
- visible = gossip_window_get_is_visible (GTK_WINDOW (priv->window));
+ visible = empathy_window_get_is_visible (GTK_WINDOW (priv->window));
if (visible) {
gtk_widget_hide (GTK_WIDGET (priv->window));
- gossip_conf_set_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN, TRUE);
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN, TRUE);
} else {
GList *accounts;
- gossip_window_present (GTK_WINDOW (priv->window), TRUE);
- gossip_conf_set_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN, FALSE);
+ empathy_window_present (GTK_WINDOW (priv->window), TRUE);
+ empathy_conf_set_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_MAIN_WINDOW_HIDDEN, FALSE);
/* Show the accounts dialog if there is no enabled accounts */
accounts = mc_accounts_list_by_enabled (TRUE);
if (accounts) {
mc_accounts_list_free (accounts);
} else {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"No enabled account, Showing account dialog");
- gossip_accounts_dialog_show (GTK_WINDOW (priv->window));
+ empathy_accounts_dialog_show (GTK_WINDOW (priv->window));
}
}
}
@@ -367,7 +367,7 @@ status_icon_popup_menu_cb (GtkStatusIcon *status_icon,
priv = GET_PRIV (icon);
- show = gossip_window_get_is_visible (GTK_WINDOW (priv->window));
+ show = empathy_window_get_is_visible (GTK_WINDOW (priv->window));
g_signal_handlers_block_by_func (priv->show_window_item,
status_icon_show_hide_window_cb,
@@ -378,7 +378,7 @@ status_icon_popup_menu_cb (GtkStatusIcon *status_icon,
status_icon_show_hide_window_cb,
icon);
- submenu = gossip_presence_chooser_create_menu ();
+ submenu = empathy_presence_chooser_create_menu ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (priv->status_item),
submenu);
@@ -398,7 +398,7 @@ status_icon_create_menu (EmpathyStatusIcon *icon)
priv = GET_PRIV (icon);
- glade = gossip_glade_get_file ("empathy-status-icon.glade",
+ glade = empathy_glade_get_file ("empathy-status-icon.glade",
"tray_menu",
NULL,
"tray_menu", &priv->popup_menu,
@@ -407,7 +407,7 @@ status_icon_create_menu (EmpathyStatusIcon *icon)
"tray_status", &priv->status_item,
NULL);
- gossip_glade_connect (glade,
+ empathy_glade_connect (glade,
icon,
"tray_new_message", "activate", status_icon_new_message_cb,
"tray_quit", "activate", status_icon_quit_cb,
@@ -428,7 +428,7 @@ status_icon_new_message_cb (GtkWidget *widget,
priv = GET_PRIV (icon);
- //gossip_new_message_dialog_show (GTK_WINDOW (priv->window));
+ //empathy_new_message_dialog_show (GTK_WINDOW (priv->window));
}
static void
@@ -447,7 +447,7 @@ status_icon_show_hide_window_cb (GtkWidget *widget,
static void
status_icon_local_pending_cb (EmpathyContactManager *manager,
- GossipContact *contact,
+ EmpathyContact *contact,
gchar *message,
EmpathyStatusIcon *icon)
{
@@ -459,14 +459,14 @@ status_icon_local_pending_cb (EmpathyContactManager *manager,
priv = GET_PRIV (icon);
for (l = priv->events; l; l = l->next) {
- if (gossip_contact_equal (contact, ((StatusIconEvent*)l->data)->user_data)) {
+ if (empathy_contact_equal (contact, ((StatusIconEvent*)l->data)->user_data)) {
return;
}
}
str = g_strdup_printf (_("Subscription requested for %s\n"
"Message: %s"),
- gossip_contact_get_name (contact),
+ empathy_contact_get_name (contact),
message);
event = status_icon_event_new (icon, GTK_STOCK_DIALOG_QUESTION, str);
@@ -479,9 +479,9 @@ status_icon_local_pending_cb (EmpathyContactManager *manager,
static void
status_icon_event_subscribe_cb (StatusIconEvent *event)
{
- GossipContact *contact;
+ EmpathyContact *contact;
- contact = GOSSIP_CONTACT (event->user_data);
+ contact = EMPATHY_CONTACT (event->user_data);
empathy_subscription_dialog_show (contact, NULL);
diff --git a/libempathy-gtk/gossip-status-presets.c b/libempathy-gtk/empathy-status-presets.c
index b27238d4f..80ce4149a 100644
--- a/libempathy-gtk/gossip-status-presets.c
+++ b/libempathy-gtk/empathy-status-presets.c
@@ -32,15 +32,15 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
-#include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-debug.h>
+#include <libempathy/empathy-utils.h>
-#include "gossip-status-presets.h"
+#include "empathy-status-presets.h"
#define DEBUG_DOMAIN "StatusPresets"
#define STATUS_PRESETS_XML_FILENAME "status-presets.xml"
-#define STATUS_PRESETS_DTD_FILENAME "gossip-status-presets.dtd"
+#define STATUS_PRESETS_DTD_FILENAME "empathy-status-presets.dtd"
#define STATUS_PRESETS_MAX_EACH 15
typedef struct {
@@ -89,7 +89,7 @@ status_presets_file_parse (const gchar *filename)
xmlNodePtr presets_node;
xmlNodePtr node;
- gossip_debug (DEBUG_DOMAIN, "Attempting to parse file:'%s'...", filename);
+ empathy_debug (DEBUG_DOMAIN, "Attempting to parse file:'%s'...", filename);
ctxt = xmlNewParserCtxt ();
@@ -101,7 +101,7 @@ status_presets_file_parse (const gchar *filename)
return;
}
- if (!gossip_xml_validate (doc, STATUS_PRESETS_DTD_FILENAME)) {
+ if (!empathy_xml_validate (doc, STATUS_PRESETS_DTD_FILENAME)) {
g_warning ("Failed to validate file:'%s'", filename);
xmlFreeDoc(doc);
xmlFreeParserCtxt (ctxt);
@@ -129,10 +129,10 @@ status_presets_file_parse (const gchar *filename)
state_str = (gchar *) xmlGetProp (node, "presence");
if (state_str) {
- state = gossip_presence_state_from_str (state_str);
+ state = empathy_presence_state_from_str (state_str);
if (is_default) {
- gossip_debug (DEBUG_DOMAIN,
+ empathy_debug (DEBUG_DOMAIN,
"Default status preset state is:'%s', status:'%s'",
state_str, status);
@@ -155,14 +155,14 @@ status_presets_file_parse (const gchar *filename)
status_presets_set_default (MC_PRESENCE_OFFLINE, NULL);
}
- gossip_debug (DEBUG_DOMAIN, "Parsed %d status presets", g_list_length (presets));
+ empathy_debug (DEBUG_DOMAIN, "Parsed %d status presets", g_list_length (presets));
xmlFreeDoc (doc);
xmlFreeParserCtxt (ctxt);
}
void
-gossip_status_presets_get_all (void)
+empathy_status_presets_get_all (void)
{
gchar *dir;
gchar *file_with_path;
@@ -214,7 +214,7 @@ status_presets_file_save (void)
xmlNodePtr subnode;
xmlChar *state;
- state = (gchar*) gossip_presence_state_to_str (default_preset->state);
+ state = (gchar*) empathy_presence_state_to_str (default_preset->state);
subnode = xmlNewTextChild (root, NULL, "default",
default_preset->status);
@@ -227,7 +227,7 @@ status_presets_file_save (void)
xmlChar *state;
sp = l->data;
- state = (gchar*) gossip_presence_state_to_str (sp->state);
+ state = (gchar*) empathy_presence_state_to_str (sp->state);
count[sp->state]++;
if (count[sp->state] > STATUS_PRESETS_MAX_EACH) {
@@ -242,7 +242,7 @@ status_presets_file_save (void)
/* Make sure the XML is indented properly */
xmlIndentTreeOutput = 1;
- gossip_debug (DEBUG_DOMAIN, "Saving file:'%s'", file);
+ empathy_debug (DEBUG_DOMAIN, "Saving file:'%s'", file);
xmlSaveFormatFileEnc (file, doc, "utf-8", 1);
xmlFreeDoc (doc);
@@ -252,7 +252,7 @@ status_presets_file_save (void)
}
GList *
-gossip_status_presets_get (McPresence state,
+empathy_status_presets_get (McPresence state,
gint max_number)
{
GList *list = NULL;
@@ -281,7 +281,7 @@ gossip_status_presets_get (McPresence state,
}
void
-gossip_status_presets_set_last (McPresence state,
+empathy_status_presets_set_last (McPresence state,
const gchar *status)
{
GList *l;
@@ -325,7 +325,7 @@ gossip_status_presets_set_last (McPresence state,
}
void
-gossip_status_presets_reset (void)
+empathy_status_presets_reset (void)
{
g_list_foreach (presets, (GFunc) status_preset_free, NULL);
g_list_free (presets);
@@ -338,7 +338,7 @@ gossip_status_presets_reset (void)
}
McPresence
-gossip_status_presets_get_default_state (void)
+empathy_status_presets_get_default_state (void)
{
if (!default_preset) {
return MC_PRESENCE_OFFLINE;
@@ -348,7 +348,7 @@ gossip_status_presets_get_default_state (void)
}
const gchar *
-gossip_status_presets_get_default_status (void)
+empathy_status_presets_get_default_status (void)
{
if (!default_preset ||
!default_preset->status) {
@@ -370,7 +370,7 @@ status_presets_set_default (McPresence state,
}
void
-gossip_status_presets_set_default (McPresence state,
+empathy_status_presets_set_default (McPresence state,
const gchar *status)
{
status_presets_set_default (state, status);
@@ -378,7 +378,7 @@ gossip_status_presets_set_default (McPresence state,
}
void
-gossip_status_presets_clear_default (void)
+empathy_status_presets_clear_default (void)
{
if (default_preset) {
status_preset_free (default_preset);
diff --git a/libempathy-gtk/gossip-status-presets.dtd b/libempathy-gtk/empathy-status-presets.dtd
index b7acc9620..872be6b4e 100644
--- a/libempathy-gtk/gossip-status-presets.dtd
+++ b/libempathy-gtk/empathy-status-presets.dtd
@@ -1,5 +1,5 @@
<!--
- DTD for Gossips status presets.
+ DTD for Empathys status presets.
by Martyn Russell <martyn@imendio.com>
-->
diff --git a/libempathy-gtk/gossip-status-presets.h b/libempathy-gtk/empathy-status-presets.h
index 4b2d92555..41df5592c 100644
--- a/libempathy-gtk/gossip-status-presets.h
+++ b/libempathy-gtk/empathy-status-presets.h
@@ -20,25 +20,25 @@
* Author: Martyn Russell <martyn@imendio.com>
*/
-#ifndef __GOSSIP_STATUS_PRESETS_H__
-#define __GOSSIP_STATUS_PRESETS_H__
+#ifndef __EMPATHY_STATUS_PRESETS_H__
+#define __EMPATHY_STATUS_PRESETS_H__
-#include <libempathy/gossip-presence.h>
+#include <libempathy/empathy-presence.h>
G_BEGIN_DECLS
-void gossip_status_presets_get_all (void);
-GList * gossip_status_presets_get (McPresence state,
+void empathy_status_presets_get_all (void);
+GList * empathy_status_presets_get (McPresence state,
gint max_number);
-void gossip_status_presets_set_last (McPresence state,
+void empathy_status_presets_set_last (McPresence state,
const gchar *status);
-void gossip_status_presets_reset (void);
-McPresence gossip_status_presets_get_default_state (void);
-const gchar * gossip_status_presets_get_default_status (void);
-void gossip_status_presets_set_default (McPresence state,
+void empathy_status_presets_reset (void);
+McPresence empathy_status_presets_get_default_state (void);
+const gchar * empathy_status_presets_get_default_status (void);
+void empathy_status_presets_set_default (McPresence state,
const gchar *status);
-void gossip_status_presets_clear_default (void);
+void empathy_status_presets_clear_default (void);
G_END_DECLS
-#endif /* __GOSSIP_STATUS_PRESETS_H__ */
+#endif /* __EMPATHY_STATUS_PRESETS_H__ */
diff --git a/libempathy-gtk/gossip-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c
index 6d5905e5a..268760a54 100644
--- a/libempathy-gtk/gossip-theme-manager.c
+++ b/libempathy-gtk/empathy-theme-manager.c
@@ -27,14 +27,14 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libempathy/gossip-conf.h>
-#include <libempathy/gossip-utils.h>
+#include <libempathy/empathy-conf.h>
+#include <libempathy/empathy-utils.h>
-#include "gossip-chat-view.h"
-#include "gossip-preferences.h"
-#include "gossip-theme-manager.h"
+#include "empathy-chat-view.h"
+#include "empathy-preferences.h"
+#include "empathy-theme-manager.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_THEME_MANAGER, GossipThemeManagerPriv))
+#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_THEME_MANAGER, EmpathyThemeManagerPriv))
typedef struct {
gchar *name;
@@ -45,16 +45,16 @@ typedef struct {
guint show_avatars_notify_id;
gboolean irc_style;
-} GossipThemeManagerPriv;
+} EmpathyThemeManagerPriv;
static void theme_manager_finalize (GObject *object);
-static void theme_manager_notify_name_cb (GossipConf *conf,
+static void theme_manager_notify_name_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void theme_manager_notify_room_cb (GossipConf *conf,
+static void theme_manager_notify_room_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
-static void theme_manager_notify_show_avatars_cb (GossipConf *conf,
+static void theme_manager_notify_show_avatars_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data);
static void theme_manager_ensure_tag_by_name (GtkTextBuffer *buffer,
@@ -64,16 +64,16 @@ static GtkTextTag *theme_manager_init_tag_by_name (GtkTextTagTable *t
const gchar *name);
static void theme_manager_add_tag (GtkTextTagTable *table,
GtkTextTag *tag);
-static void theme_manager_fixup_tag_table (GossipThemeManager *theme_manager,
- GossipChatView *view);
-static void theme_manager_apply_theme_classic (GossipThemeManager *manager,
- GossipChatView *view);
-static void theme_manager_apply_theme_clean (GossipThemeManager *manager,
- GossipChatView *view);
-static void theme_manager_apply_theme_blue (GossipThemeManager *manager,
- GossipChatView *view);
-static void theme_manager_apply_theme (GossipThemeManager *manager,
- GossipChatView *view,
+static void theme_manager_fixup_tag_table (EmpathyThemeManager *theme_manager,
+ EmpathyChatView *view);
+static void theme_manager_apply_theme_classic (EmpathyThemeManager *manager,
+ EmpathyChatView *view);
+static void theme_manager_apply_theme_clean (EmpathyThemeManager *manager,
+ EmpathyChatView *view);
+static void theme_manager_apply_theme_blue (EmpathyThemeManager *manager,
+ EmpathyChatView *view);
+static void theme_manager_apply_theme (EmpathyThemeManager *manager,
+ EmpathyChatView *view,
const gchar *name);
enum {
@@ -91,10 +91,10 @@ static const gchar *themes[] = {
NULL
};
-G_DEFINE_TYPE (GossipThemeManager, gossip_theme_manager, G_TYPE_OBJECT);
+G_DEFINE_TYPE (EmpathyThemeManager, empathy_theme_manager, G_TYPE_OBJECT);
static void
-gossip_theme_manager_class_init (GossipThemeManagerClass *klass)
+empathy_theme_manager_class_init (EmpathyThemeManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
@@ -108,69 +108,69 @@ gossip_theme_manager_class_init (GossipThemeManagerClass *klass)
G_TYPE_NONE,
0);
- g_type_class_add_private (object_class, sizeof (GossipThemeManagerPriv));
+ g_type_class_add_private (object_class, sizeof (EmpathyThemeManagerPriv));
object_class->finalize = theme_manager_finalize;
}
static void
-gossip_theme_manager_init (GossipThemeManager *manager)
+empathy_theme_manager_init (EmpathyThemeManager *manager)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
priv = GET_PRIV (manager);
priv->name_notify_id =
- gossip_conf_notify_add (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_THEME,
+ empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_THEME,
theme_manager_notify_name_cb,
manager);
priv->room_notify_id =
- gossip_conf_notify_add (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_THEME_CHAT_ROOM,
+ empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_THEME_CHAT_ROOM,
theme_manager_notify_room_cb,
manager);
- gossip_conf_get_string (gossip_conf_get (),
- GOSSIP_PREFS_CHAT_THEME,
+ empathy_conf_get_string (empathy_conf_get (),
+ EMPATHY_PREFS_CHAT_THEME,
&priv->name);
/* Unused right now, but will be used soon. */
priv->show_avatars_notify_id =
- gossip_conf_notify_add (gossip_conf_get (),
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_notify_add (empathy_conf_get (),
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
theme_manager_notify_show_avatars_cb,
manager);
- gossip_conf_get_bool (gossip_conf_get (),
- GOSSIP_PREFS_UI_SHOW_AVATARS,
+ empathy_conf_get_bool (empathy_conf_get (),
+ EMPATHY_PREFS_UI_SHOW_AVATARS,
&priv->show_avatars);
}
static void
theme_manager_finalize (GObject *object)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
priv = GET_PRIV (object);
- gossip_conf_notify_remove (gossip_conf_get (), priv->name_notify_id);
- gossip_conf_notify_remove (gossip_conf_get (), priv->room_notify_id);
- gossip_conf_notify_remove (gossip_conf_get (), priv->show_avatars_notify_id);
+ empathy_conf_notify_remove (empathy_conf_get (), priv->name_notify_id);
+ empathy_conf_notify_remove (empathy_conf_get (), priv->room_notify_id);
+ empathy_conf_notify_remove (empathy_conf_get (), priv->show_avatars_notify_id);
g_free (priv->name);
- G_OBJECT_CLASS (gossip_theme_manager_parent_class)->finalize (object);
+ G_OBJECT_CLASS (empathy_theme_manager_parent_class)->finalize (object);
}
static void
-theme_manager_notify_name_cb (GossipConf *conf,
+theme_manager_notify_name_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
- GossipThemeManager *manager;
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManager *manager;
+ EmpathyThemeManagerPriv *priv;
gchar *name;
manager = user_data;
@@ -179,7 +179,7 @@ theme_manager_notify_name_cb (GossipConf *conf,
g_free (priv->name);
name = NULL;
- if (!gossip_conf_get_string (conf, key, &name) ||
+ if (!empathy_conf_get_string (conf, key, &name) ||
name == NULL || name[0] == 0) {
priv->name = g_strdup ("classic");
g_free (name);
@@ -191,7 +191,7 @@ theme_manager_notify_name_cb (GossipConf *conf,
}
static void
-theme_manager_notify_room_cb (GossipConf *conf,
+theme_manager_notify_room_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
@@ -199,18 +199,18 @@ theme_manager_notify_room_cb (GossipConf *conf,
}
static void
-theme_manager_notify_show_avatars_cb (GossipConf *conf,
+theme_manager_notify_show_avatars_cb (EmpathyConf *conf,
const gchar *key,
gpointer user_data)
{
- GossipThemeManager *manager;
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManager *manager;
+ EmpathyThemeManagerPriv *priv;
gboolean value;
manager = user_data;
priv = GET_PRIV (manager);
- if (!gossip_conf_get_bool (conf, key, &value)) {
+ if (!empathy_conf_get_bool (conf, key, &value)) {
priv->show_avatars = FALSE;
} else {
priv->show_avatars = value;
@@ -303,8 +303,8 @@ theme_manager_add_tag (GtkTextTagTable *table,
}
static void
-theme_manager_fixup_tag_table (GossipThemeManager *theme_manager,
- GossipChatView *view)
+theme_manager_fixup_tag_table (EmpathyThemeManager *theme_manager,
+ EmpathyChatView *view)
{
GtkTextBuffer *buffer;
@@ -353,10 +353,10 @@ theme_manager_fixup_tag_table (GossipThemeManager *theme_manager,
}
static void
-theme_manager_apply_theme_classic (GossipThemeManager *manager,
- GossipChatView *view)
+theme_manager_apply_theme_classic (EmpathyThemeManager *manager,
+ EmpathyChatView *view)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag;
@@ -450,10 +450,10 @@ theme_manager_apply_theme_classic (GossipThemeManager *manager,
}
static void
-theme_manager_apply_theme_simple (GossipThemeManager *manager,
- GossipChatView *view)
+theme_manager_apply_theme_simple (EmpathyThemeManager *manager,
+ EmpathyChatView *view)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag;
@@ -602,10 +602,10 @@ theme_manager_apply_theme_simple (GossipThemeManager *manager,
}
static void
-theme_manager_apply_theme_clean (GossipThemeManager *manager,
- GossipChatView *view)
+theme_manager_apply_theme_clean (EmpathyThemeManager *manager,
+ EmpathyChatView *view)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag;
@@ -723,10 +723,10 @@ theme_manager_apply_theme_clean (GossipThemeManager *manager,
}
static void
-theme_manager_apply_theme_blue (GossipThemeManager *manager,
- GossipChatView *view)
+theme_manager_apply_theme_blue (EmpathyThemeManager *manager,
+ EmpathyChatView *view)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag;
@@ -899,11 +899,11 @@ theme_manager_apply_theme_blue (GossipThemeManager *manager,
}
static void
-theme_manager_apply_theme (GossipThemeManager *manager,
- GossipChatView *view,
+theme_manager_apply_theme (EmpathyThemeManager *manager,
+ EmpathyChatView *view,
const gchar *name)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
gint margin;
priv = GET_PRIV (manager);
@@ -934,34 +934,34 @@ theme_manager_apply_theme (GossipThemeManager *manager,
margin = 3;
}
- gossip_chat_view_set_margin (view, margin);
- gossip_chat_view_set_irc_style (view, priv->irc_style);
+ empathy_chat_view_set_margin (view, margin);
+ empathy_chat_view_set_irc_style (view, priv->irc_style);
}
-GossipThemeManager *
-gossip_theme_manager_get (void)
+EmpathyThemeManager *
+empathy_theme_manager_get (void)
{
- static GossipThemeManager *manager = NULL;
+ static EmpathyThemeManager *manager = NULL;
if (!manager) {
- manager = g_object_new (GOSSIP_TYPE_THEME_MANAGER, NULL);
+ manager = g_object_new (EMPATHY_TYPE_THEME_MANAGER, NULL);
}
return manager;
}
const gchar **
-gossip_theme_manager_get_themes (void)
+empathy_theme_manager_get_themes (void)
{
return themes;
}
void
-gossip_theme_manager_apply (GossipThemeManager *manager,
- GossipChatView *view,
+empathy_theme_manager_apply (EmpathyThemeManager *manager,
+ EmpathyChatView *view,
const gchar *name)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
priv = GET_PRIV (manager);
@@ -969,10 +969,10 @@ gossip_theme_manager_apply (GossipThemeManager *manager,
}
void
-gossip_theme_manager_apply_saved (GossipThemeManager *manager,
- GossipChatView *view)
+empathy_theme_manager_apply_saved (EmpathyThemeManager *manager,
+ EmpathyChatView *view)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
priv = GET_PRIV (manager);
@@ -983,11 +983,11 @@ gossip_theme_manager_apply_saved (GossipThemeManager *manager,
* the manager signalling, views are registered and applied to automatically.
*/
void
-gossip_theme_manager_update_show_avatars (GossipThemeManager *manager,
- GossipChatView *view,
+empathy_theme_manager_update_show_avatars (EmpathyThemeManager *manager,
+ EmpathyChatView *view,
gboolean show)
{
- GossipThemeManagerPriv *priv;
+ EmpathyThemeManagerPriv *priv;
GtkTextBuffer *buffer;
GtkTextTagTable *table;
GtkTextTag *tag_text_self, *tag_text_other;
diff --git a/libempathy-gtk/empathy-theme-manager.h b/libempathy-gtk/empathy-theme-manager.h
new file mode 100644
index 000000000..d20a916e1
--- /dev/null
+++ b/libempathy-gtk/empathy-theme-manager.h
@@ -0,0 +1,64 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Copyright (C) 2005-2007 Imendio AB
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors: Richard Hult <richard@imendio.com>
+ */
+
+#ifndef __EMPATHY_THEME_MANAGER_H__
+#define __EMPATHY_THEME_MANAGER_H__
+
+#include <glib-object.h>
+
+#include "empathy-chat-view.h"
+
+G_BEGIN_DECLS
+
+#define EMPATHY_TYPE_THEME_MANAGER (empathy_theme_manager_get_type ())
+#define EMPATHY_THEME_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_THEME_MANAGER, EmpathyThemeManager))
+#define EMPATHY_THEME_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_THEME_MANAGER, EmpathyThemeManagerClass))
+#define EMPATHY_IS_THEME_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_THEME_MANAGER))
+#define EMPATHY_IS_THEME_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_THEME_MANAGER))
+#define EMPATHY_THEME_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_THEME_MANAGER, EmpathyThemeManagerClass))
+
+typedef struct _EmpathyThemeManager EmpathyThemeManager;
+typedef struct _EmpathyThemeManagerClass EmpathyThemeManagerClass;
+
+struct _EmpathyThemeManager {
+ GObject parent;
+};
+
+struct _EmpathyThemeManagerClass {
+ GObjectClass parent_class;
+};
+
+GType empathy_theme_manager_get_type (void) G_GNUC_CONST;
+EmpathyThemeManager *empathy_theme_manager_get (void);
+const gchar ** empathy_theme_manager_get_themes (void);
+void empathy_theme_manager_apply (EmpathyThemeManager *manager,
+ EmpathyChatView *view,
+ const gchar *theme);
+void empathy_theme_manager_apply_saved (EmpathyThemeManager *manager,
+ EmpathyChatView *view);
+void empathy_theme_manager_update_show_avatars (EmpathyThemeManager *manager,
+ EmpathyChatView *view,
+ gboolean show);
+
+G_END_DECLS
+
+#endif /* __EMPATHY_THEME_MANAGER_H__ */
diff --git a/libempathy-gtk/gossip-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index b17e5776b..1331f3fb9 100644
--- a/libempathy-gtk/gossip-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -37,9 +37,9 @@
#include <libmissioncontrol/mc-profile.h>
-#include <libempathy/gossip-debug.h>
+#include <libempathy/empathy-debug.h>
-#include "gossip-ui-utils.h"
+#include "empathy-ui-utils.h"
#include "empathy-images.h"
#define DEBUG_DOMAIN "UiUtils"
@@ -87,7 +87,7 @@ get_glade_file (const gchar *filename,
}
void
-gossip_glade_get_file_simple (const gchar *filename,
+empathy_glade_get_file_simple (const gchar *filename,
const gchar *root,
const gchar *domain,
const gchar *first_required_widget, ...)
@@ -113,7 +113,7 @@ gossip_glade_get_file_simple (const gchar *filename,
}
GladeXML *
-gossip_glade_get_file (const gchar *filename,
+empathy_glade_get_file (const gchar *filename,
const gchar *root,
const gchar *domain,
const gchar *first_required_widget, ...)
@@ -139,7 +139,7 @@ gossip_glade_get_file (const gchar *filename,
}
void
-gossip_glade_connect (GladeXML *gui,
+empathy_glade_connect (GladeXML *gui,
gpointer user_data,
gchar *first_widget, ...)
{
@@ -172,7 +172,7 @@ gossip_glade_connect (GladeXML *gui,
}
void
-gossip_glade_setup_size_group (GladeXML *gui,
+empathy_glade_setup_size_group (GladeXML *gui,
GtkSizeGroupMode mode,
gchar *first_widget, ...)
{
@@ -201,7 +201,7 @@ gossip_glade_setup_size_group (GladeXML *gui,
}
GdkPixbuf *
-gossip_pixbuf_from_icon_name (const gchar *icon_name,
+empathy_pixbuf_from_icon_name (const gchar *icon_name,
GtkIconSize icon_size)
{
GtkIconTheme *theme;
@@ -222,7 +222,7 @@ gossip_pixbuf_from_icon_name (const gchar *icon_name,
0,
&error);
if (error) {
- gossip_debug (DEBUG_DOMAIN, "Error loading icon: %s", error->message);
+ empathy_debug (DEBUG_DOMAIN, "Error loading icon: %s", error->message);
g_clear_error (&error);
}
@@ -230,91 +230,91 @@ gossip_pixbuf_from_icon_name (const gchar *icon_name,
}
GdkPixbuf *
-gossip_pixbuf_from_smiley (GossipSmiley type,
+empathy_pixbuf_from_smiley (EmpathySmiley type,
GtkIconSize icon_size)
{
const gchar *icon_id;
switch (type) {
- case GOSSIP_SMILEY_NORMAL: /* :) */
+ case EMPATHY_SMILEY_NORMAL: /* :) */
icon_id = "stock_smiley-1";
break;
- case GOSSIP_SMILEY_WINK: /* ;) */
+ case EMPATHY_SMILEY_WINK: /* ;) */
icon_id = "stock_smiley-3";
break;
- case GOSSIP_SMILEY_BIGEYE: /* =) */
+ case EMPATHY_SMILEY_BIGEYE: /* =) */
icon_id = "stock_smiley-2";
break;
- case GOSSIP_SMILEY_NOSE: /* :-) */
+ case EMPATHY_SMILEY_NOSE: /* :-) */
icon_id = "stock_smiley-7";
break;
- case GOSSIP_SMILEY_CRY: /* :'( */
+ case EMPATHY_SMILEY_CRY: /* :'( */
icon_id = "stock_smiley-11";
break;
- case GOSSIP_SMILEY_SAD: /* :( */
+ case EMPATHY_SMILEY_SAD: /* :( */
icon_id = "stock_smiley-4";
break;
- case GOSSIP_SMILEY_SCEPTICAL: /* :/ */
+ case EMPATHY_SMILEY_SCEPTICAL: /* :/ */
icon_id = "stock_smiley-9";
break;
- case GOSSIP_SMILEY_BIGSMILE: /* :D */
+ case EMPATHY_SMILEY_BIGSMILE: /* :D */
icon_id = "stock_smiley-6";
break;
- case GOSSIP_SMILEY_INDIFFERENT: /* :| */
+ case EMPATHY_SMILEY_INDIFFERENT: /* :| */
icon_id = "stock_smiley-8";
break;
- case GOSSIP_SMILEY_TOUNGE: /* :p */
+ case EMPATHY_SMILEY_TOUNGE: /* :p */
icon_id = "stock_smiley-10";
break;
- case GOSSIP_SMILEY_SHOCKED: /* :o */
+ case EMPATHY_SMILEY_SHOCKED: /* :o */
icon_id = "stock_smiley-5";
break;
- case GOSSIP_SMILEY_COOL: /* 8) */
+ case EMPATHY_SMILEY_COOL: /* 8) */
icon_id = "stock_smiley-15";
break;
- case GOSSIP_SMILEY_SORRY: /* *| */
+ case EMPATHY_SMILEY_SORRY: /* *| */
icon_id = "stock_smiley-12";
break;
- case GOSSIP_SMILEY_KISS: /* :* */
+ case EMPATHY_SMILEY_KISS: /* :* */
icon_id = "stock_smiley-13";
break;
- case GOSSIP_SMILEY_SHUTUP: /* :# */
+ case EMPATHY_SMILEY_SHUTUP: /* :# */
icon_id = "stock_smiley-14";
break;
- case GOSSIP_SMILEY_YAWN: /* |O */
+ case EMPATHY_SMILEY_YAWN: /* |O */
icon_id = "";
break;
- case GOSSIP_SMILEY_CONFUSED: /* :$ */
+ case EMPATHY_SMILEY_CONFUSED: /* :$ */
icon_id = "stock_smiley-17";
break;
- case GOSSIP_SMILEY_ANGEL: /* O) */
+ case EMPATHY_SMILEY_ANGEL: /* O) */
icon_id = "stock_smiley-18";
break;
- case GOSSIP_SMILEY_OOOH: /* :x */
+ case EMPATHY_SMILEY_OOOH: /* :x */
icon_id = "stock_smiley-19";
break;
- case GOSSIP_SMILEY_LOOKAWAY: /* *) */
+ case EMPATHY_SMILEY_LOOKAWAY: /* *) */
icon_id = "stock_smiley-20";
break;
- case GOSSIP_SMILEY_BLUSH: /* *S */
+ case EMPATHY_SMILEY_BLUSH: /* *S */
icon_id = "stock_smiley-23";
break;
- case GOSSIP_SMILEY_COOLBIGSMILE: /* 8D */
+ case EMPATHY_SMILEY_COOLBIGSMILE: /* 8D */
icon_id = "stock_smiley-25";
break;
- case GOSSIP_SMILEY_ANGRY: /* :@ */
+ case EMPATHY_SMILEY_ANGRY: /* :@ */
icon_id = "stock_smiley-16";
break;
- case GOSSIP_SMILEY_BOSS: /* @) */
+ case EMPATHY_SMILEY_BOSS: /* @) */
icon_id = "stock_smiley-21";
break;
- case GOSSIP_SMILEY_MONKEY: /* #) */
+ case EMPATHY_SMILEY_MONKEY: /* #) */
icon_id = "stock_smiley-22";
break;
- case GOSSIP_SMILEY_SILLY: /* O) */
+ case EMPATHY_SMILEY_SILLY: /* O) */
icon_id = "stock_smiley-24";
break;
- case GOSSIP_SMILEY_SICK: /* +o( */
+ case EMPATHY_SMILEY_SICK: /* +o( */
icon_id = "stock_smiley-26";
break;
@@ -324,11 +324,11 @@ gossip_pixbuf_from_smiley (GossipSmiley type,
}
- return gossip_pixbuf_from_icon_name (icon_id, icon_size);
+ return empathy_pixbuf_from_icon_name (icon_id, icon_size);
}
const gchar *
-gossip_icon_name_from_account (McAccount *account)
+empathy_icon_name_from_account (McAccount *account)
{
McProfile *profile;
@@ -338,7 +338,7 @@ gossip_icon_name_from_account (McAccount *account)
}
const gchar *
-gossip_icon_name_for_presence_state (McPresence state)
+empathy_icon_name_for_presence_state (McPresence state)
{
switch (state) {
case MC_PRESENCE_AVAILABLE:
@@ -361,34 +361,34 @@ gossip_icon_name_for_presence_state (McPresence state)
}
const gchar *
-gossip_icon_name_for_presence (GossipPresence *presence)
+empathy_icon_name_for_presence (EmpathyPresence *presence)
{
McPresence state;
- g_return_val_if_fail (GOSSIP_IS_PRESENCE (presence),
+ g_return_val_if_fail (EMPATHY_IS_PRESENCE (presence),
EMPATHY_IMAGE_OFFLINE);
- state = gossip_presence_get_state (presence);
+ state = empathy_presence_get_state (presence);
- return gossip_icon_name_for_presence_state (state);
+ return empathy_icon_name_for_presence_state (state);
}
const gchar *
-gossip_icon_name_for_contact (GossipContact *contact)
+empathy_icon_name_for_contact (EmpathyContact *contact)
{
- GossipPresence *presence;
- GossipSubscription subscription;
+ EmpathyPresence *presence;
+ EmpathySubscription subscription;
- g_return_val_if_fail (GOSSIP_IS_CONTACT (contact),
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact),
EMPATHY_IMAGE_OFFLINE);
- presence = gossip_contact_get_presence (contact);
+ presence = empathy_contact_get_presence (contact);
if (presence) {
- return gossip_icon_name_for_presence (presence);
+ return empathy_icon_name_for_presence (presence);
}
- subscription = gossip_contact_get_subscription (contact);
- if (!(subscription & GOSSIP_SUBSCRIPTION_FROM)) {
+ subscription = empathy_contact_get_subscription (contact);
+ if (!(subscription & EMPATHY_SUBSCRIPTION_FROM)) {
return EMPATHY_IMAGE_PENDING;
}
@@ -396,16 +396,16 @@ gossip_icon_name_for_contact (GossipContact *contact)
}
GdkPixbuf *
-gossip_pixbuf_avatar_from_contact (GossipContact *contact)
+empathy_pixbuf_avatar_from_contact (EmpathyContact *contact)
{
GdkPixbuf *pixbuf;
GdkPixbufLoader *loader;
- GossipAvatar *avatar;
+ EmpathyAvatar *avatar;
GError *error = NULL;
- g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
- avatar = gossip_contact_get_avatar (contact);
+ avatar = empathy_contact_get_avatar (contact);
if (!avatar) {
return NULL;
}
@@ -472,7 +472,7 @@ pixbuf_from_avatar_size_prepared_cb (GdkPixbufLoader *loader,
}
GdkPixbuf *
-gossip_pixbuf_from_avatar_scaled (GossipAvatar *avatar,
+empathy_pixbuf_from_avatar_scaled (EmpathyAvatar *avatar,
gint width,
gint height)
{
@@ -514,17 +514,17 @@ gossip_pixbuf_from_avatar_scaled (GossipAvatar *avatar,
}
GdkPixbuf *
-gossip_pixbuf_avatar_from_contact_scaled (GossipContact *contact,
+empathy_pixbuf_avatar_from_contact_scaled (EmpathyContact *contact,
gint width,
gint height)
{
- GossipAvatar *avatar;
+ EmpathyAvatar *avatar;
- g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
+ g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), NULL);
- avatar = gossip_contact_get_avatar (contact);
+ avatar = empathy_contact_get_avatar (contact);
- return gossip_pixbuf_from_avatar_scaled (avatar, width, height);
+ return empathy_pixbuf_from_avatar_scaled (avatar, width, height);
}
/* Stolen from GtkSourceView, hence the weird intendation. Please keep it like
* that to make it easier to apply changes from the original code.
@@ -861,7 +861,7 @@ strbreakup (const char *string,
}
gboolean
-gossip_text_iter_forward_search (const GtkTextIter *iter,
+empathy_text_iter_forward_search (const GtkTextIter *iter,
const gchar *str,
GtkTextIter *match_start,
GtkTextIter *match_end,
@@ -1096,7 +1096,7 @@ backward_lines_match (const GtkTextIter *start,
}
gboolean
-gossip_text_iter_backward_search (const GtkTextIter *iter,
+empathy_text_iter_backward_search (const GtkTextIter *iter,
const gchar *str,
GtkTextIter *match_start,
GtkTextIter *match_end,
@@ -1204,7 +1204,7 @@ window_get_is_on_current_workspace (GtkWindow *window)
/* Checks if the window is visible as in visible on the current workspace. */
gboolean
-gossip_window_get_is_visible (GtkWindow *window)
+empathy_window_get_is_visible (GtkWindow *window)
{
gboolean visible;
@@ -1219,7 +1219,7 @@ gossip_window_get_is_visible (GtkWindow *window)
/* Takes care of moving the window to the current workspace. */
void
-gossip_window_present (GtkWindow *window,
+empathy_window_present (GtkWindow *window,
gboolean steal_focus)
{
gboolean visible;
@@ -1252,7 +1252,7 @@ gossip_window_present (GtkWindow *window,
}
GtkWindow *
-gossip_get_toplevel_window (GtkWidget *widget)
+empathy_get_toplevel_window (GtkWidget *widget)
{
GtkWidget *toplevel;
@@ -1288,7 +1288,7 @@ fixup_url (const gchar *url)
}
void
-gossip_url_show (const char *url)
+empathy_url_show (const char *url)
{
gchar *real_url;
GnomeVFSResult res;
@@ -1296,7 +1296,7 @@ gossip_url_show (const char *url)
real_url = fixup_url (url);
res = gnome_vfs_url_show (real_url);
if (res != GNOME_VFS_OK) {
- gossip_debug (DEBUG_DOMAIN, "Couldn't show URL %s: %s",
+ empathy_debug (DEBUG_DOMAIN, "Couldn't show URL %s: %s",
real_url,
gnome_vfs_result_to_string (res));
}
@@ -1309,11 +1309,11 @@ link_button_hook (GtkLinkButton *button,
const gchar *link,
gpointer user_data)
{
- gossip_url_show (link);
+ empathy_url_show (link);
}
GtkWidget *
-gossip_link_button_new (const gchar *url,
+empathy_link_button_new (const gchar *url,
const gchar *title)
{
static gboolean hook = FALSE;
@@ -1327,7 +1327,7 @@ gossip_link_button_new (const gchar *url,
}
void
-gossip_toggle_button_set_state_quietly (GtkWidget *widget,
+empathy_toggle_button_set_state_quietly (GtkWidget *widget,
GCallback callback,
gpointer user_data,
gboolean active)
diff --git a/libempathy-gtk/gossip-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 5a0804a9f..070f9e2b2 100644
--- a/libempathy-gtk/gossip-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -28,8 +28,8 @@
* Jeroen Zwartepoorte
*/
-#ifndef __GOSSIP_UI_UTILS_H__
-#define __GOSSIP_UI_UTILS_H__
+#ifndef __EMPATHY_UI_UTILS_H__
+#define __EMPATHY_UI_UTILS_H__
#include <gtk/gtk.h>
#include <glade/glade.h>
@@ -37,77 +37,77 @@
#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-profile.h>
-#include <libempathy/gossip-presence.h>
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-avatar.h>
+#include <libempathy/empathy-presence.h>
+#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-avatar.h>
-#include "gossip-chat-view.h"
+#include "empathy-chat-view.h"
G_BEGIN_DECLS
#define G_STR_EMPTY(x) ((x) == NULL || (x)[0] == '\0')
/* Glade */
-void gossip_glade_get_file_simple (const gchar *filename,
+void empathy_glade_get_file_simple (const gchar *filename,
const gchar *root,
const gchar *domain,
const gchar *first_required_widget,
...);
-GladeXML * gossip_glade_get_file (const gchar *filename,
+GladeXML * empathy_glade_get_file (const gchar *filename,
const gchar *root,
const gchar *domain,
const gchar *first_required_widget,
...);
-void gossip_glade_connect (GladeXML *gui,
+void empathy_glade_connect (GladeXML *gui,
gpointer user_data,
gchar *first_widget,
...);
-void gossip_glade_setup_size_group (GladeXML *gui,
+void empathy_glade_setup_size_group (GladeXML *gui,
GtkSizeGroupMode mode,
gchar *first_widget,
...);
/* Pixbufs */
-GdkPixbuf * gossip_pixbuf_from_icon_name (const gchar *icon_name,
+GdkPixbuf * empathy_pixbuf_from_icon_name (const gchar *icon_name,
GtkIconSize icon_size);
-GdkPixbuf * gossip_pixbuf_from_smiley (GossipSmiley type,
+GdkPixbuf * empathy_pixbuf_from_smiley (EmpathySmiley type,
GtkIconSize icon_size);
-const gchar * gossip_icon_name_from_account (McAccount *account);
-const gchar * gossip_icon_name_for_presence_state (McPresence state);
-const gchar * gossip_icon_name_for_presence (GossipPresence *presence);
-const gchar * gossip_icon_name_for_contact (GossipContact *contact);
-GdkPixbuf * gossip_pixbuf_from_avatar_scaled (GossipAvatar *avatar,
+const gchar * empathy_icon_name_from_account (McAccount *account);
+const gchar * empathy_icon_name_for_presence_state (McPresence state);
+const gchar * empathy_icon_name_for_presence (EmpathyPresence *presence);
+const gchar * empathy_icon_name_for_contact (EmpathyContact *contact);
+GdkPixbuf * empathy_pixbuf_from_avatar_scaled (EmpathyAvatar *avatar,
gint width,
gint height);
-GdkPixbuf * gossip_pixbuf_avatar_from_contact (GossipContact *contact);
-GdkPixbuf * gossip_pixbuf_avatar_from_contact_scaled (GossipContact *contact,
+GdkPixbuf * empathy_pixbuf_avatar_from_contact (EmpathyContact *contact);
+GdkPixbuf * empathy_pixbuf_avatar_from_contact_scaled (EmpathyContact *contact,
gint width,
gint height);
/* Text view */
-gboolean gossip_text_iter_forward_search (const GtkTextIter *iter,
+gboolean empathy_text_iter_forward_search (const GtkTextIter *iter,
const gchar *str,
GtkTextIter *match_start,
GtkTextIter *match_end,
const GtkTextIter *limit);
-gboolean gossip_text_iter_backward_search (const GtkTextIter *iter,
+gboolean empathy_text_iter_backward_search (const GtkTextIter *iter,
const gchar *str,
GtkTextIter *match_start,
GtkTextIter *match_end,
const GtkTextIter *limit);
/* Windows */
-gboolean gossip_window_get_is_visible (GtkWindow *window);
-void gossip_window_present (GtkWindow *window,
+gboolean empathy_window_get_is_visible (GtkWindow *window);
+void empathy_window_present (GtkWindow *window,
gboolean steal_focus);
-GtkWindow *gossip_get_toplevel_window (GtkWidget *widget);
-void gossip_url_show (const char *url);
-void gossip_toggle_button_set_state_quietly (GtkWidget *widget,
+GtkWindow *empathy_get_toplevel_window (GtkWidget *widget);
+void empathy_url_show (const char *url);
+void empathy_toggle_button_set_state_quietly (GtkWidget *widget,
GCallback callback,
gpointer user_data,
gboolean active);
-GtkWidget *gossip_link_button_new (const gchar *url,
+GtkWidget *empathy_link_button_new (const gchar *url,
const gchar *title);
G_END_DECLS
-#endif /* __GOSSIP_UI_UTILS_H__ */
+#endif /* __EMPATHY_UI_UTILS_H__ */
diff --git a/libempathy-gtk/gossip-account-chooser.h b/libempathy-gtk/gossip-account-chooser.h
deleted file mode 100644
index b2d7c0cdd..000000000
--- a/libempathy-gtk/gossip-account-chooser.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2005-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Martyn Russell <martyn@imendio.com>
- */
-
-#ifndef __GOSSIP_ACCOUNT_CHOOSER_H__
-#define __GOSSIP_ACCOUNT_CHOOSER_H__
-
-#include <gtk/gtkcombobox.h>
-
-#include <libmissioncontrol/mc-account.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_ACCOUNT_CHOOSER (gossip_account_chooser_get_type ())
-#define GOSSIP_ACCOUNT_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_ACCOUNT_CHOOSER, GossipAccountChooser))
-#define GOSSIP_ACCOUNT_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_ACCOUNT_CHOOSER, GossipAccountChooserClass))
-#define GOSSIP_IS_ACCOUNT_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_ACCOUNT_CHOOSER))
-#define GOSSIP_IS_ACCOUNT_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_ACCOUNT_CHOOSER))
-#define GOSSIP_ACCOUNT_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_ACCOUNT_CHOOSER, GossipAccountChooserClass))
-
-typedef struct _GossipAccountChooser GossipAccountChooser;
-typedef struct _GossipAccountChooserClass GossipAccountChooserClass;
-
-struct _GossipAccountChooser {
- GtkComboBox parent;
-};
-
-struct _GossipAccountChooserClass {
- GtkComboBoxClass parent_class;
-};
-
-GType gossip_account_chooser_get_type (void) G_GNUC_CONST;
-GtkWidget * gossip_account_chooser_new (void);
-McAccount * gossip_account_chooser_get_account (GossipAccountChooser *chooser);
-gboolean gossip_account_chooser_set_account (GossipAccountChooser *chooser,
- McAccount *account);
-gboolean gossip_account_chooser_get_can_select_all (GossipAccountChooser *chooser);
-
-void gossip_account_chooser_set_can_select_all (GossipAccountChooser *chooser,
- gboolean can_select_all);
-gboolean gossip_account_chooser_get_has_all_option (GossipAccountChooser *chooser);
-void gossip_account_chooser_set_has_all_option (GossipAccountChooser *chooser,
- gboolean has_all_option);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_ACCOUNT_CHOOSER_H__ */
-
diff --git a/libempathy-gtk/gossip-cell-renderer-expander.h b/libempathy-gtk/gossip-cell-renderer-expander.h
deleted file mode 100644
index 7df474668..000000000
--- a/libempathy-gtk/gossip-cell-renderer-expander.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Kristian Rietveld <kris@imendio.com>
- */
-
-#ifndef __GOSSIP_CELL_RENDERER_EXPANDER_H__
-#define __GOSSIP_CELL_RENDERER_EXPANDER_H__
-
-#include <gtk/gtkcellrenderer.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_CELL_RENDERER_EXPANDER (gossip_cell_renderer_expander_get_type ())
-#define GOSSIP_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOSSIP_TYPE_CELL_RENDERER_EXPANDER, GossipCellRendererExpander))
-#define GOSSIP_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOSSIP_TYPE_CELL_RENDERER_EXPANDER, GossipCellRendererExpanderClass))
-#define GOSSIP_IS_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOSSIP_TYPE_CELL_RENDERER_EXPANDER))
-#define GOSSIP_IS_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GOSSIP_TYPE_CELL_RENDERER_EXPANDER))
-#define GOSSIP_CELL_RENDERER_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GOSSIP_TYPE_CELL_RENDERER_EXPANDER, GossipCellRendererExpanderClass))
-
-typedef struct _GossipCellRendererExpander GossipCellRendererExpander;
-typedef struct _GossipCellRendererExpanderClass GossipCellRendererExpanderClass;
-
-struct _GossipCellRendererExpander {
- GtkCellRenderer parent;
-};
-
-struct _GossipCellRendererExpanderClass {
- GtkCellRendererClass parent_class;
-
- /* Padding for future expansion */
- void (*_gtk_reserved1) (void);
- void (*_gtk_reserved2) (void);
- void (*_gtk_reserved3) (void);
- void (*_gtk_reserved4) (void);
-};
-
-GType gossip_cell_renderer_expander_get_type (void) G_GNUC_CONST;
-GtkCellRenderer *gossip_cell_renderer_expander_new (void);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CELL_RENDERER_EXPANDER_H__ */
diff --git a/libempathy-gtk/gossip-cell-renderer-text.h b/libempathy-gtk/gossip-cell-renderer-text.h
deleted file mode 100644
index 9b5a413b7..000000000
--- a/libempathy-gtk/gossip-cell-renderer-text.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2004-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- */
-
-#ifndef __GOSSIP_CELL_RENDERER_TEXT_H__
-#define __GOSSIP_CELL_RENDERER_TEXT_H__
-
-#include <gtk/gtkcellrenderertext.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_CELL_RENDERER_TEXT (gossip_cell_renderer_text_get_type ())
-#define GOSSIP_CELL_RENDERER_TEXT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CELL_RENDERER_TEXT, GossipCellRendererText))
-#define GOSSIP_CELL_RENDERER_TEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CELL_RENDERER_TEXT, GossipCellRendererTextClass))
-#define GOSSIP_IS_CELL_RENDERER_TEXT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CELL_RENDERER_TEXT))
-#define GOSSIP_IS_CELL_RENDERER_TEXT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CELL_RENDERER_TEXT))
-#define GOSSIP_CELL_RENDERER_TEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CELL_RENDERER_TEXT, GossipCellRendererTextClass))
-
-typedef struct _GossipCellRendererText GossipCellRendererText;
-typedef struct _GossipCellRendererTextClass GossipCellRendererTextClass;
-typedef struct _GossipCellRendererTextPriv GossipCellRendererTextPriv;
-
-struct _GossipCellRendererText {
- GtkCellRendererText parent;
-
- GossipCellRendererTextPriv *priv;
-};
-
-struct _GossipCellRendererTextClass {
- GtkCellRendererTextClass parent_class;
-};
-
-GType gossip_cell_renderer_text_get_type (void) G_GNUC_CONST;
-GtkCellRenderer * gossip_cell_renderer_text_new (void);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CELL_RENDERER_TEXT_H__ */
diff --git a/libempathy-gtk/gossip-chat-manager.loT b/libempathy-gtk/gossip-chat-manager.loT
deleted file mode 100644
index 3d0d3ab0d..000000000
--- a/libempathy-gtk/gossip-chat-manager.loT
+++ /dev/null
@@ -1,7 +0,0 @@
-# gossip-chat-manager.lo - a libtool object file
-# Generated by ltmain.sh - GNU libtool 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18 22:14:06)
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
diff --git a/libempathy-gtk/gossip-chat-view.h b/libempathy-gtk/gossip-chat-view.h
deleted file mode 100644
index 2a7b11472..000000000
--- a/libempathy-gtk/gossip-chat-view.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- */
-
-#ifndef __GOSSIP_CHAT_VIEW_H__
-#define __GOSSIP_CHAT_VIEW_H__
-
-#include <gtk/gtktextview.h>
-#include <gtk/gtktooltips.h>
-
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-message.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_CHAT_VIEW (gossip_chat_view_get_type ())
-#define GOSSIP_CHAT_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CHAT_VIEW, GossipChatView))
-#define GOSSIP_CHAT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CHAT_VIEW, GossipChatViewClass))
-#define GOSSIP_IS_CHAT_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CHAT_VIEW))
-#define GOSSIP_IS_CHAT_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CHAT_VIEW))
-#define GOSSIP_CHAT_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CHAT_VIEW, GossipChatViewClass))
-
-typedef struct _GossipChatView GossipChatView;
-typedef struct _GossipChatViewClass GossipChatViewClass;
-typedef struct _GossipChatViewPriv GossipChatViewPriv;
-
-struct _GossipChatView {
- GtkTextView parent;
-};
-
-struct _GossipChatViewClass {
- GtkTextViewClass parent_class;
-};
-
-typedef enum {
- GOSSIP_SMILEY_NORMAL, /* :) */
- GOSSIP_SMILEY_WINK, /* ;) */
- GOSSIP_SMILEY_BIGEYE, /* =) */
- GOSSIP_SMILEY_NOSE, /* :-) */
- GOSSIP_SMILEY_CRY, /* :'( */
- GOSSIP_SMILEY_SAD, /* :( */
- GOSSIP_SMILEY_SCEPTICAL, /* :/ */
- GOSSIP_SMILEY_BIGSMILE, /* :D */
- GOSSIP_SMILEY_INDIFFERENT, /* :| */
- GOSSIP_SMILEY_TOUNGE, /* :p */
- GOSSIP_SMILEY_SHOCKED, /* :o */
- GOSSIP_SMILEY_COOL, /* 8) */
- GOSSIP_SMILEY_SORRY, /* *| */
- GOSSIP_SMILEY_KISS, /* :* */
- GOSSIP_SMILEY_SHUTUP, /* :# */
- GOSSIP_SMILEY_YAWN, /* |O */
- GOSSIP_SMILEY_CONFUSED, /* :$ */
- GOSSIP_SMILEY_ANGEL, /* <) */
- GOSSIP_SMILEY_OOOH, /* :x */
- GOSSIP_SMILEY_LOOKAWAY, /* *) */
- GOSSIP_SMILEY_BLUSH, /* *S */
- GOSSIP_SMILEY_COOLBIGSMILE, /* 8D */
- GOSSIP_SMILEY_ANGRY, /* :@ */
- GOSSIP_SMILEY_BOSS, /* @) */
- GOSSIP_SMILEY_MONKEY, /* #) */
- GOSSIP_SMILEY_SILLY, /* O) */
- GOSSIP_SMILEY_SICK, /* +o( */
-
- GOSSIP_SMILEY_COUNT
-} GossipSmiley;
-
-GType gossip_chat_view_get_type (void) G_GNUC_CONST;
-GossipChatView *gossip_chat_view_new (void);
-void gossip_chat_view_append_message (GossipChatView *view,
- GossipMessage *msg);
-void gossip_chat_view_append_event (GossipChatView *view,
- const gchar *str);
-void gossip_chat_view_append_button (GossipChatView *view,
- const gchar *message,
- GtkWidget *button1,
- GtkWidget *button2);
-void gossip_chat_view_set_margin (GossipChatView *view,
- gint margin);
-void gossip_chat_view_scroll (GossipChatView *view,
- gboolean allow_scrolling);
-void gossip_chat_view_scroll_down (GossipChatView *view);
-gboolean gossip_chat_view_get_selection_bounds (GossipChatView *view,
- GtkTextIter *start,
- GtkTextIter *end);
-void gossip_chat_view_clear (GossipChatView *view);
-gboolean gossip_chat_view_find_previous (GossipChatView *view,
- const gchar *search_criteria,
- gboolean new_search);
-gboolean gossip_chat_view_find_next (GossipChatView *view,
- const gchar *search_criteria,
- gboolean new_search);
-void gossip_chat_view_find_abilities (GossipChatView *view,
- const gchar *search_criteria,
- gboolean *can_do_previous,
- gboolean *can_do_next);
-void gossip_chat_view_highlight (GossipChatView *view,
- const gchar *text);
-void gossip_chat_view_copy_clipboard (GossipChatView *view);
-gboolean gossip_chat_view_get_irc_style (GossipChatView *view);
-void gossip_chat_view_set_irc_style (GossipChatView *view,
- gboolean irc_style);
-void gossip_chat_view_set_margin (GossipChatView *view,
- gint margin);
-GdkPixbuf * gossip_chat_view_get_smiley_image (GossipSmiley smiley);
-const gchar * gossip_chat_view_get_smiley_text (GossipSmiley smiley);
-GtkWidget * gossip_chat_view_get_smiley_menu (GCallback callback,
- gpointer user_data,
- GtkTooltips *tooltips);
-void gossip_chat_view_set_is_group_chat (GossipChatView *view,
- gboolean is_group_chat);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CHAT_VIEW_H__ */
diff --git a/libempathy-gtk/gossip-chat-window.h b/libempathy-gtk/gossip-chat-window.h
deleted file mode 100644
index b58e5dac3..000000000
--- a/libempathy-gtk/gossip-chat-window.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
- * Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __GOSSIP_CHAT_WINDOW_H__
-#define __GOSSIP_CHAT_WINDOW_H__
-
-#include <glib-object.h>
-
-#include <libmissioncontrol/mc-account.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_CHAT_WINDOW (gossip_chat_window_get_type ())
-#define GOSSIP_CHAT_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CHAT_WINDOW, GossipChatWindow))
-#define GOSSIP_CHAT_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_CHAT_WINDOW, GossipChatWindowClass))
-#define GOSSIP_IS_CHAT_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CHAT_WINDOW))
-#define GOSSIP_IS_CHAT_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CHAT_WINDOW))
-#define GOSSIP_CHAT_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CHAT_WINDOW, GossipChatWindowClass))
-
-typedef struct _GossipChatWindow GossipChatWindow;
-typedef struct _GossipChatWindowClass GossipChatWindowClass;
-typedef struct _GossipChatWindowPriv GossipChatWindowPriv;
-
-#include "gossip-chat.h"
-
-struct _GossipChatWindow {
- GObject parent;
-};
-
-struct _GossipChatWindowClass {
- GObjectClass parent_class;
-};
-
-GType gossip_chat_window_get_type (void);
-GossipChatWindow *gossip_chat_window_get_default (void);
-
-GossipChatWindow *gossip_chat_window_new (void);
-
-GtkWidget * gossip_chat_window_get_dialog (GossipChatWindow *window);
-
-void gossip_chat_window_add_chat (GossipChatWindow *window,
- GossipChat *chat);
-void gossip_chat_window_remove_chat (GossipChatWindow *window,
- GossipChat *chat);
-void gossip_chat_window_move_chat (GossipChatWindow *old_window,
- GossipChatWindow *new_window,
- GossipChat *chat);
-void gossip_chat_window_switch_to_chat (GossipChatWindow *window,
- GossipChat *chat);
-gboolean gossip_chat_window_has_focus (GossipChatWindow *window);
-GossipChat * gossip_chat_window_find_chat (McAccount *account,
- const gchar *id);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CHAT_WINDOW_H__ */
diff --git a/libempathy-gtk/gossip-chat.h b/libempathy-gtk/gossip-chat.h
deleted file mode 100644
index 85bfc66b9..000000000
--- a/libempathy-gtk/gossip-chat.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
- * Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __GOSSIP_CHAT_H__
-#define __GOSSIP_CHAT_H__
-
-#include <glib-object.h>
-
-#include <libempathy/gossip-contact.h>
-#include <libempathy/gossip-message.h>
-#include <libempathy/empathy-tp-chat.h>
-
-#include "gossip-chat-view.h"
-#include "gossip-spell.h"
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_CHAT (gossip_chat_get_type ())
-#define GOSSIP_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CHAT, GossipChat))
-#define GOSSIP_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_CHAT, GossipChatClass))
-#define GOSSIP_IS_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CHAT))
-#define GOSSIP_IS_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CHAT))
-#define GOSSIP_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CHAT, GossipChatClass))
-
-typedef struct _GossipChat GossipChat;
-typedef struct _GossipChatClass GossipChatClass;
-typedef struct _GossipChatPriv GossipChatPriv;
-
-#include "gossip-chat-window.h"
-
-struct _GossipChat {
- GObject parent;
-
- /* Protected */
- GossipChatView *view;
- EmpathyTpChat *tp_chat;
- GtkWidget *input_text_view;
- gboolean is_first_char;
- McAccount *account;
-};
-
-struct _GossipChatClass {
- GObjectClass parent;
-
- /* VTable */
- const gchar * (*get_name) (GossipChat *chat);
- gchar * (*get_tooltip) (GossipChat *chat);
- const gchar * (*get_status_icon_name)(GossipChat *chat);
- GtkWidget * (*get_widget) (GossipChat *chat);
- gboolean (*is_group_chat) (GossipChat *chat);
- void (*set_tp_chat) (GossipChat *chat,
- EmpathyTpChat *tp_chat);
-};
-
-GType gossip_chat_get_type (void);
-
-GossipChatView * gossip_chat_get_view (GossipChat *chat);
-GossipChatWindow *gossip_chat_get_window (GossipChat *chat);
-void gossip_chat_set_window (GossipChat *chat,
- GossipChatWindow *window);
-void gossip_chat_present (GossipChat *chat);
-void gossip_chat_clear (GossipChat *chat);
-void gossip_chat_scroll_down (GossipChat *chat);
-void gossip_chat_cut (GossipChat *chat);
-void gossip_chat_copy (GossipChat *chat);
-void gossip_chat_paste (GossipChat *chat);
-const gchar * gossip_chat_get_name (GossipChat *chat);
-gchar * gossip_chat_get_tooltip (GossipChat *chat);
-const gchar * gossip_chat_get_status_icon_name (GossipChat *chat);
-GtkWidget * gossip_chat_get_widget (GossipChat *chat);
-gboolean gossip_chat_is_group_chat (GossipChat *chat);
-gboolean gossip_chat_is_connected (GossipChat *chat);
-
-void gossip_chat_save_geometry (GossipChat *chat,
- gint x,
- gint y,
- gint w,
- gint h);
-void gossip_chat_load_geometry (GossipChat *chat,
- gint *x,
- gint *y,
- gint *w,
- gint *h);
-void gossip_chat_set_tp_chat (GossipChat *chat,
- EmpathyTpChat *tp_chat);
-const gchar * gossip_chat_get_id (GossipChat *chat);
-
-/* For spell checker dialog to correct the misspelled word. */
-gboolean gossip_chat_get_is_command (const gchar *str);
-void gossip_chat_correct_word (GossipChat *chat,
- GtkTextIter start,
- GtkTextIter end,
- const gchar *new_word);
-gboolean gossip_chat_should_play_sound (GossipChat *chat);
-gboolean gossip_chat_should_highlight_nick (GossipMessage *message);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CHAT_H__ */
diff --git a/libempathy-gtk/gossip-contact-list-store.h b/libempathy-gtk/gossip-contact-list-store.h
deleted file mode 100644
index b2131bcab..000000000
--- a/libempathy-gtk/gossip-contact-list-store.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2005-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- * Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __GOSSIP_CONTACT_LIST_STORE_H__
-#define __GOSSIP_CONTACT_LIST_STORE_H__
-
-#include <gtk/gtktreestore.h>
-
-#include <libempathy/empathy-contact-list.h>
-#include <libempathy/gossip-contact.h>
-
-G_BEGIN_DECLS
-
-/*
- * GossipContactListStoreSort
- */
-#define GOSSIP_TYPE_CONTACT_LIST_STORE_SORT (gossip_contact_list_store_sort_get_type ())
-
-typedef enum {
- GOSSIP_CONTACT_LIST_STORE_SORT_STATE,
- GOSSIP_CONTACT_LIST_STORE_SORT_NAME
-} GossipContactListStoreSort;
-
-GType gossip_contact_list_store_sort_get_type (void) G_GNUC_CONST;
-
-/*
- * GossipContactListStore
- */
-#define GOSSIP_TYPE_CONTACT_LIST_STORE (gossip_contact_list_store_get_type ())
-#define GOSSIP_CONTACT_LIST_STORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStore))
-#define GOSSIP_CONTACT_LIST_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStoreClass))
-#define GOSSIP_IS_CONTACT_LIST_STORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT_LIST_STORE))
-#define GOSSIP_IS_CONTACT_LIST_STORE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT_LIST_STORE))
-#define GOSSIP_CONTACT_LIST_STORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT_LIST_STORE, GossipContactListStoreClass))
-
-typedef struct _GossipContactListStore GossipContactListStore;
-typedef struct _GossipContactListStoreClass GossipContactListStoreClass;
-typedef struct _GossipContactListStorePriv GossipContactListStorePriv;
-
-enum {
- COL_ICON_STATUS,
- COL_PIXBUF_AVATAR,
- COL_PIXBUF_AVATAR_VISIBLE,
- COL_NAME,
- COL_STATUS,
- COL_STATUS_VISIBLE,
- COL_CONTACT,
- COL_IS_GROUP,
- COL_IS_ACTIVE,
- COL_IS_ONLINE,
- COL_IS_SEPARATOR,
- COL_COUNT
-} GossipContactListStoreCol;
-
-struct _GossipContactListStore {
- GtkTreeStore parent;
-};
-
-struct _GossipContactListStoreClass {
- GtkTreeStoreClass parent_class;
-};
-typedef GList * (*GossipContactGroupsFunc) (GossipContact *contact,
- gpointer user_data);
-
-GType gossip_contact_list_store_get_type (void) G_GNUC_CONST;
-GossipContactListStore * gossip_contact_list_store_new (EmpathyContactList *list_iface);
-EmpathyContactList * gossip_contact_list_store_get_list_iface (GossipContactListStore *store);
-gboolean gossip_contact_list_store_get_show_offline (GossipContactListStore *store);
-void gossip_contact_list_store_set_show_offline (GossipContactListStore *store,
- gboolean show_offline);
-gboolean gossip_contact_list_store_get_show_avatars (GossipContactListStore *store);
-void gossip_contact_list_store_set_show_avatars (GossipContactListStore *store,
- gboolean show_avatars);
-gboolean gossip_contact_list_store_get_is_compact (GossipContactListStore *store);
-void gossip_contact_list_store_set_is_compact (GossipContactListStore *store,
- gboolean is_compact);
-GossipContactListStoreSort gossip_contact_list_store_get_sort_criterium (GossipContactListStore *store);
-void gossip_contact_list_store_set_sort_criterium (GossipContactListStore *store,
- GossipContactListStoreSort sort_criterium);
-gboolean gossip_contact_list_store_row_separator_func (GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data);
-gchar * gossip_contact_list_store_get_parent_group (GtkTreeModel *model,
- GtkTreePath *path,
- gboolean *path_is_group);
-gboolean gossip_contact_list_store_search_equal_func (GtkTreeModel *model,
- gint column,
- const gchar *key,
- GtkTreeIter *iter,
- gpointer search_data);
-void gossip_contact_list_store_set_contact_groups_func (GossipContactListStore*store,
- GossipContactGroupsFunc func,
- gpointer user_data);
-void gossip_contact_list_store_update_contact_groups (GossipContactListStore *store,
- GossipContact *contact);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CONTACT_LIST_STORE_H__ */
-
diff --git a/libempathy-gtk/gossip-contact-list-view.h b/libempathy-gtk/gossip-contact-list-view.h
deleted file mode 100644
index 20262f8ad..000000000
--- a/libempathy-gtk/gossip-contact-list-view.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2005-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- * Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __GOSSIP_CONTACT_LIST_VIEW_H__
-#define __GOSSIP_CONTACT_LIST_VIEW_H__
-
-#include <gtk/gtktreeview.h>
-
-#include <libempathy/gossip-contact.h>
-
-#include "gossip-contact-list-store.h"
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_CONTACT_LIST_VIEW (gossip_contact_list_view_get_type ())
-#define GOSSIP_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListView))
-#define GOSSIP_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListViewClass))
-#define GOSSIP_IS_CONTACT_LIST_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_CONTACT_LIST_VIEW))
-#define GOSSIP_IS_CONTACT_LIST_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_CONTACT_LIST_VIEW))
-#define GOSSIP_CONTACT_LIST_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_CONTACT_LIST_VIEW, GossipContactListViewClass))
-
-typedef struct _GossipContactListView GossipContactListView;
-typedef struct _GossipContactListViewClass GossipContactListViewClass;
-typedef struct _GossipContactListViewPriv GossipContactListViewPriv;
-
-struct _GossipContactListView {
- GtkTreeView parent;
-};
-
-struct _GossipContactListViewClass {
- GtkTreeViewClass parent_class;
-};
-
-typedef void (*GossipContactListViewDragReceivedFunc) (GossipContact *contact,
- GdkDragAction action,
- const gchar *old_group,
- const gchar *new_group,
- gpointer user_data);
-
-GType gossip_contact_list_view_get_type (void) G_GNUC_CONST;
-GossipContactListView *gossip_contact_list_view_new (GossipContactListStore *store);
-GossipContact * gossip_contact_list_view_get_selected (GossipContactListView *view);
-gchar * gossip_contact_list_view_get_selected_group (GossipContactListView *view);
-GtkWidget * gossip_contact_list_view_get_contact_menu (GossipContactListView *view,
- GossipContact *contact);
-GtkWidget * gossip_contact_list_view_get_group_menu (GossipContactListView *view);
-void gossip_contact_list_view_set_filter (GossipContactListView *view,
- const gchar *filter);
-void gossip_contact_list_view_set_drag_received_func (GossipContactListView *view,
- GossipContactListViewDragReceivedFunc func,
- gpointer user_data);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_CONTACT_LIST_VIEW_H__ */
-
diff --git a/libempathy-gtk/gossip-group-chat.h b/libempathy-gtk/gossip-group-chat.h
deleted file mode 100644
index 37a7772bb..000000000
--- a/libempathy-gtk/gossip-group-chat.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- * Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __GOSSIP_GROUP_CHAT_H__
-#define __GOSSIP_GROUP_CHAT_H__
-
-G_BEGIN_DECLS
-
-#include <libtelepathy/tp-chan.h>
-
-#include <libmissioncontrol/mc-account.h>
-
-#define GOSSIP_TYPE_GROUP_CHAT (gossip_group_chat_get_type ())
-#define GOSSIP_GROUP_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_GROUP_CHAT, GossipGroupChat))
-#define GOSSIP_GROUP_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_GROUP_CHAT, GossipGroupChatClass))
-#define GOSSIP_IS_GROUP_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_GROUP_CHAT))
-#define GOSSIP_IS_GROUP_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_GROUP_CHAT))
-#define GOSSIP_GROUP_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_GROUP_CHAT, GossipGroupChatClass))
-
-typedef struct _GossipGroupChat GossipGroupChat;
-typedef struct _GossipGroupChatClass GossipGroupChatClass;
-typedef struct _GossipGroupChatPriv GossipGroupChatPriv;
-
-#include "gossip-chat.h"
-
-struct _GossipGroupChat {
- GossipChat parent;
-
- GossipGroupChatPriv *priv;
-};
-
-struct _GossipGroupChatClass {
- GossipChatClass parent_class;
-};
-
-GType gossip_group_chat_get_type (void) G_GNUC_CONST;
-GossipGroupChat *gossip_group_chat_new (McAccount *account,
- TpChan *tp_chan);
-gboolean gossip_group_chat_get_show_contacts (GossipGroupChat *chat);
-void gossip_group_chat_set_show_contacts (GossipGroupChat *chat,
- gboolean show);
-void gossip_group_chat_set_topic (GossipGroupChat *chat);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_GROUP_CHAT_H__ */
diff --git a/libempathy-gtk/gossip-preferences.h b/libempathy-gtk/gossip-preferences.h
deleted file mode 100644
index 35b26621f..000000000
--- a/libempathy-gtk/gossip-preferences.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2003-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- */
-
-#ifndef __GOSSIP_PREFERENCES_H__
-#define __GOSSIP_PREFERENCES_H__
-
-#include <gtk/gtkwindow.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_PREFS_PATH "/apps/empathy"
-
-#define GOSSIP_PREFS_SOUNDS_FOR_MESSAGES GOSSIP_PREFS_PATH "/notifications/sounds_for_messages"
-#define GOSSIP_PREFS_SOUNDS_WHEN_AWAY GOSSIP_PREFS_PATH "/notifications/sounds_when_away"
-#define GOSSIP_PREFS_SOUNDS_WHEN_BUSY GOSSIP_PREFS_PATH "/notifications/sounds_when_busy"
-#define GOSSIP_PREFS_POPUPS_WHEN_AVAILABLE GOSSIP_PREFS_PATH "/notifications/popups_when_available"
-#define GOSSIP_PREFS_CHAT_SHOW_SMILEYS GOSSIP_PREFS_PATH "/conversation/graphical_smileys"
-#define GOSSIP_PREFS_CHAT_THEME GOSSIP_PREFS_PATH "/conversation/theme"
-#define GOSSIP_PREFS_CHAT_THEME_CHAT_ROOM GOSSIP_PREFS_PATH "/conversation/theme_chat_room"
-#define GOSSIP_PREFS_CHAT_SPELL_CHECKER_LANGUAGES GOSSIP_PREFS_PATH "/conversation/spell_checker_languages"
-#define GOSSIP_PREFS_CHAT_SPELL_CHECKER_ENABLED GOSSIP_PREFS_PATH "/conversation/spell_checker_enabled"
-#define GOSSIP_PREFS_UI_SEPARATE_CHAT_WINDOWS GOSSIP_PREFS_PATH "/ui/separate_chat_windows"
-#define GOSSIP_PREFS_UI_MAIN_WINDOW_HIDDEN GOSSIP_PREFS_PATH "/ui/main_window_hidden"
-#define GOSSIP_PREFS_UI_AVATAR_DIRECTORY GOSSIP_PREFS_PATH "/ui/avatar_directory"
-#define GOSSIP_PREFS_UI_SHOW_AVATARS GOSSIP_PREFS_PATH "/ui/show_avatars"
-#define GOSSIP_PREFS_UI_COMPACT_CONTACT_LIST GOSSIP_PREFS_PATH "/ui/compact_contact_list"
-#define GOSSIP_PREFS_CONTACTS_SHOW_OFFLINE GOSSIP_PREFS_PATH "/contacts/show_offline"
-#define GOSSIP_PREFS_CONTACTS_SORT_CRITERIUM GOSSIP_PREFS_PATH "/contacts/sort_criterium"
-#define GOSSIP_PREFS_HINTS_CLOSE_MAIN_WINDOW GOSSIP_PREFS_PATH "/hints/close_main_window"
-
-GtkWidget * gossip_preferences_show (GtkWindow *parent);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_PREFERENCES_H__ */
-
-
diff --git a/libempathy-gtk/gossip-presence-chooser.h b/libempathy-gtk/gossip-presence-chooser.h
deleted file mode 100644
index 7175126ea..000000000
--- a/libempathy-gtk/gossip-presence-chooser.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2005-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- */
-
-#ifndef __GOSSIP_PRESENCE_CHOOSER_H__
-#define __GOSSIP_PRESENCE_CHOOSER_H__
-
-#include <gtk/gtk.h>
-
-#include <libempathy/gossip-presence.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_PRESENCE_CHOOSER (gossip_presence_chooser_get_type ())
-#define GOSSIP_PRESENCE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_PRESENCE_CHOOSER, GossipPresenceChooser))
-#define GOSSIP_PRESENCE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_PRESENCE_CHOOSER, GossipPresenceChooserClass))
-#define GOSSIP_IS_PRESENCE_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_PRESENCE_CHOOSER))
-#define GOSSIP_IS_PRESENCE_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_PRESENCE_CHOOSER))
-#define GOSSIP_PRESENCE_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_PRESENCE_CHOOSER, GossipPresenceChooserClass))
-
-typedef struct _GossipPresenceChooser GossipPresenceChooser;
-typedef struct _GossipPresenceChooserClass GossipPresenceChooserClass;
-
-struct _GossipPresenceChooser {
- GtkToggleButton parent;
-};
-
-struct _GossipPresenceChooserClass {
- GtkToggleButtonClass parent_class;
-};
-
-GType gossip_presence_chooser_get_type (void) G_GNUC_CONST;
-GtkWidget *gossip_presence_chooser_new (void);
-GtkWidget *gossip_presence_chooser_create_menu (void);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_PRESENCE_CHOOSER_H__ */
-
diff --git a/libempathy-gtk/gossip-private-chat.h b/libempathy-gtk/gossip-private-chat.h
deleted file mode 100644
index 326d0f60e..000000000
--- a/libempathy-gtk/gossip-private-chat.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2002-2007 Imendio AB
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Mikael Hallendal <micke@imendio.com>
- * Richard Hult <richard@imendio.com>
- * Martyn Russell <martyn@imendio.com>
- * Geert-Jan Van den Bogaerde <geertjan@gnome.org>
- * Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __GOSSIP_PRIVATE_CHAT_H__
-#define __GOSSIP_PRIVATE_CHAT_H__
-
-#include <libtelepathy/tp-chan.h>
-
-#include <libmissioncontrol/mc-account.h>
-
-#include <libempathy/gossip-contact.h>
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_PRIVATE_CHAT (gossip_private_chat_get_type ())
-#define GOSSIP_PRIVATE_CHAT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_PRIVATE_CHAT, GossipPrivateChat))
-#define GOSSIP_PRIVATE_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GOSSIP_TYPE_PRIVATE_CHAT, GossipPrivateChatClass))
-#define GOSSIP_IS_PRIVATE_CHAT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_PRIVATE_CHAT))
-#define GOSSIP_IS_PRIVATE_CHAT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_PRIVATE_CHAT))
-#define GOSSIP_PRIVATE_CHAT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_PRIVATE_CHAT, GossipPrivateChatClass))
-
-typedef struct _GossipPrivateChat GossipPrivateChat;
-typedef struct _GossipPrivateChatClass GossipPrivateChatClass;
-typedef struct _GossipPrivateChatPriv GossipPrivateChatPriv;
-
-#include "gossip-chat.h"
-
-struct _GossipPrivateChat {
- GossipChat parent;
-};
-
-struct _GossipPrivateChatClass {
- GossipChatClass parent;
-};
-
-GType gossip_private_chat_get_type (void);
-GossipPrivateChat * gossip_private_chat_new (McAccount *account,
- TpChan *tp_chan);
-GossipPrivateChat * gossip_private_chat_new_with_contact (GossipContact *contact);
-GossipContact * gossip_private_chat_get_contact (GossipPrivateChat *chat);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_PRIVATE_CHAT_H__ */
diff --git a/libempathy-gtk/gossip-theme-manager.h b/libempathy-gtk/gossip-theme-manager.h
deleted file mode 100644
index bb7e3cf70..000000000
--- a/libempathy-gtk/gossip-theme-manager.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2005-2007 Imendio AB
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Richard Hult <richard@imendio.com>
- */
-
-#ifndef __GOSSIP_THEME_MANAGER_H__
-#define __GOSSIP_THEME_MANAGER_H__
-
-#include <glib-object.h>
-
-#include "gossip-chat-view.h"
-
-G_BEGIN_DECLS
-
-#define GOSSIP_TYPE_THEME_MANAGER (gossip_theme_manager_get_type ())
-#define GOSSIP_THEME_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOSSIP_TYPE_THEME_MANAGER, GossipThemeManager))
-#define GOSSIP_THEME_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GOSSIP_TYPE_THEME_MANAGER, GossipThemeManagerClass))
-#define GOSSIP_IS_THEME_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOSSIP_TYPE_THEME_MANAGER))
-#define GOSSIP_IS_THEME_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GOSSIP_TYPE_THEME_MANAGER))
-#define GOSSIP_THEME_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GOSSIP_TYPE_THEME_MANAGER, GossipThemeManagerClass))
-
-typedef struct _GossipThemeManager GossipThemeManager;
-typedef struct _GossipThemeManagerClass GossipThemeManagerClass;
-
-struct _GossipThemeManager {
- GObject parent;
-};
-
-struct _GossipThemeManagerClass {
- GObjectClass parent_class;
-};
-
-GType gossip_theme_manager_get_type (void) G_GNUC_CONST;
-GossipThemeManager *gossip_theme_manager_get (void);
-const gchar ** gossip_theme_manager_get_themes (void);
-void gossip_theme_manager_apply (GossipThemeManager *manager,
- GossipChatView *view,
- const gchar *theme);
-void gossip_theme_manager_apply_saved (GossipThemeManager *manager,
- GossipChatView *view);
-void gossip_theme_manager_update_show_avatars (GossipThemeManager *manager,
- GossipChatView *view,
- gboolean show);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_THEME_MANAGER_H__ */