aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuele Aina <emanuele.aina@collabora.com>2013-04-03 19:14:33 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:04 +0800
commit42456ae2a2c758db70cc093679d05675293758cb (patch)
tree1e546367d2d44970c664f841b6834a2b8890fb8e
parent75df7ae67b78f94dd69ac5c6ad079e3d360c8461 (diff)
downloadgsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.gz
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.bz2
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.lz
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.xz
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.tar.zst
gsoc2013-empathy-42456ae2a2c758db70cc093679d05675293758cb.zip
tp-account-widgets: Switch the symbols namespace to tpaw
The file names have been kept unchanged to keep the diff simple and will be updated later. This makes easier to spot where the account widgets still rely on libempathy. https://bugzilla.gnome.org/show_bug.cgi?id=699492
-rw-r--r--libempathy-gtk/empathy-local-xmpp-assistant-widget.c8
-rw-r--r--libempathy-gtk/empathy-new-account-dialog.c12
-rw-r--r--src/empathy-accounts-dialog.c26
-rw-r--r--tests/empathy-irc-network-manager-test.c146
-rw-r--r--tests/empathy-irc-network-test.c66
-rw-r--r--tests/empathy-irc-server-test.c18
-rw-r--r--tests/test-irc-helper.c8
-rw-r--r--tests/test-irc-helper.h4
-rw-r--r--tp-account-widgets/empathy-account-widget-irc.c46
-rw-r--r--tp-account-widgets/empathy-account-widget-irc.h14
-rw-r--r--tp-account-widgets/empathy-account-widget-private.h12
-rw-r--r--tp-account-widgets/empathy-account-widget-sip.c34
-rw-r--r--tp-account-widgets/empathy-account-widget-sip.h8
-rw-r--r--tp-account-widgets/empathy-account-widget.c232
-rw-r--r--tp-account-widgets/empathy-account-widget.h76
-rw-r--r--tp-account-widgets/empathy-irc-network-chooser-dialog.c188
-rw-r--r--tp-account-widgets/empathy-irc-network-chooser-dialog.h48
-rw-r--r--tp-account-widgets/empathy-irc-network-chooser.c132
-rw-r--r--tp-account-widgets/empathy-irc-network-chooser.h42
-rw-r--r--tp-account-widgets/empathy-irc-network-dialog.c80
-rw-r--r--tp-account-widgets/empathy-irc-network-dialog.h8
-rw-r--r--tp-account-widgets/empathy-irc-network-manager.c230
-rw-r--r--tp-account-widgets/empathy-irc-network-manager.h72
-rw-r--r--tp-account-widgets/empathy-irc-network.c158
-rw-r--r--tp-account-widgets/empathy-irc-network.h66
-rw-r--r--tp-account-widgets/empathy-irc-server.c56
-rw-r--r--tp-account-widgets/empathy-irc-server.h44
27 files changed, 917 insertions, 917 deletions
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
index f0f6aefec..26d2bbf8b 100644
--- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
@@ -54,7 +54,7 @@ empathy_local_xmpp_assistant_widget_init (EmpathyLocalXmppAssistantWidget *self)
}
static void
-handle_apply_cb (EmpathyAccountWidget *widget_object,
+handle_apply_cb (TpawAccountWidget *widget_object,
gboolean is_valid,
EmpathyLocalXmppAssistantWidget *self)
{
@@ -68,7 +68,7 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object)
object;
GtkWidget *w;
GdkPixbuf *pix;
- EmpathyAccountWidget *account_widget;
+ TpawAccountWidget *account_widget;
gchar *markup;
G_OBJECT_CLASS (empathy_local_xmpp_assistant_widget_parent_class)->
@@ -99,9 +99,9 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object)
self->priv->settings = empathy_account_settings_new ("salut", "local-xmpp",
NULL, _("People nearby"));
- account_widget = empathy_account_widget_new_for_protocol (
+ account_widget = tpaw_account_widget_new_for_protocol (
self->priv->settings, TRUE);
- empathy_account_widget_hide_buttons (account_widget);
+ tpaw_account_widget_hide_buttons (account_widget);
g_signal_connect (account_widget, "handle-apply",
G_CALLBACK (handle_apply_cb), self);
diff --git a/libempathy-gtk/empathy-new-account-dialog.c b/libempathy-gtk/empathy-new-account-dialog.c
index 6d13d15e3..b26423f91 100644
--- a/libempathy-gtk/empathy-new-account-dialog.c
+++ b/libempathy-gtk/empathy-new-account-dialog.c
@@ -34,7 +34,7 @@ G_DEFINE_TYPE (EmpathyNewAccountDialog, empathy_new_account_dialog, \
struct _EmpathyNewAccountDialogPrivate
{
GtkWidget *chooser;
- EmpathyAccountWidget *current_account_widget;
+ TpawAccountWidget *current_account_widget;
GtkWidget *main_vbox;
GtkWidget *connect_button;
@@ -42,7 +42,7 @@ struct _EmpathyNewAccountDialogPrivate
};
static void
-close_cb (EmpathyAccountWidget *widget,
+close_cb (TpawAccountWidget *widget,
GtkResponseType response,
EmpathyNewAccountDialog *self)
{
@@ -54,7 +54,7 @@ protocol_changed_cb (GtkComboBox *chooser,
EmpathyNewAccountDialog *self)
{
EmpathyAccountSettings *settings;
- EmpathyAccountWidget *account_widget;
+ TpawAccountWidget *account_widget;
gchar *password = NULL, *account = NULL;
settings = empathy_protocol_chooser_create_account_settings (
@@ -75,7 +75,7 @@ protocol_changed_cb (GtkComboBox *chooser,
g_object_unref (self->priv->settings);
}
- account_widget = empathy_account_widget_new_for_protocol (settings, TRUE);
+ account_widget = tpaw_account_widget_new_for_protocol (settings, TRUE);
if (self->priv->current_account_widget != NULL)
{
@@ -95,13 +95,13 @@ protocol_changed_cb (GtkComboBox *chooser,
/* Restore "account" and "password" parameters in the new widget */
if (account != NULL)
{
- empathy_account_widget_set_account_param (account_widget, account);
+ tpaw_account_widget_set_account_param (account_widget, account);
g_free (account);
}
if (password != NULL)
{
- empathy_account_widget_set_password_param (account_widget, password);
+ tpaw_account_widget_set_password_param (account_widget, password);
g_free (password);
}
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 8a582088c..2d971994d 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -93,19 +93,19 @@ typedef struct {
GtkWidget *spinner;
gboolean loading;
- /* We have to keep a weak reference on the actual EmpathyAccountWidget, not
+ /* We have to keep a weak reference on the actual TpawAccountWidget, not
* just its GtkWidget. It is the only reliable source we can query to know if
* there are any unsaved changes to the currently selected account. We can't
* look at the account settings because it does not contain everything that
- * can be changed using the EmpathyAccountWidget. For instance, it does not
+ * can be changed using the TpawAccountWidget. For instance, it does not
* contain the state of the "Enabled" checkbox.
*
* Even if we create it ourself, we just get a weak ref and not a strong one
- * as EmpathyAccountWidget unrefs itself when the GtkWidget is destroyed.
+ * as TpawAccountWidget unrefs itself when the GtkWidget is destroyed.
* That's kinda ugly; cf bgo #640417.
*
* */
- EmpathyAccountWidget *setting_widget;
+ TpawAccountWidget *setting_widget;
gboolean connecting_show;
guint connecting_id;
@@ -518,7 +518,7 @@ empathy_account_dialog_cancel (EmpathyAccountsDialog *dialog)
COL_ACCOUNT_SETTINGS, &settings,
COL_ACCOUNT, &account, -1);
- empathy_account_widget_discard_pending_changes (priv->setting_widget);
+ tpaw_account_widget_discard_pending_changes (priv->setting_widget);
if (account == NULL)
{
@@ -544,7 +544,7 @@ empathy_account_dialog_cancel (EmpathyAccountsDialog *dialog)
static void
empathy_account_dialog_widget_cancelled_cb (
- EmpathyAccountWidget *widget_object,
+ TpawAccountWidget *widget_object,
EmpathyAccountsDialog *dialog)
{
empathy_account_dialog_cancel (dialog);
@@ -590,14 +590,14 @@ account_dialog_create_edit_params_dialog (EmpathyAccountsDialog *dialog)
gtk_window_set_resizable (GTK_WINDOW (subdialog), FALSE);
- priv->setting_widget = (EmpathyAccountWidget *)
- empathy_account_widget_new_for_protocol (settings, FALSE);
+ priv->setting_widget = (TpawAccountWidget *)
+ tpaw_account_widget_new_for_protocol (settings, FALSE);
g_object_add_weak_pointer (G_OBJECT (priv->setting_widget),
(gpointer *) &priv->setting_widget);
if (accounts_dialog_has_valid_accounts (dialog))
- empathy_account_widget_set_other_accounts_exist (
+ tpaw_account_widget_set_other_accounts_exist (
priv->setting_widget, TRUE);
g_signal_connect (priv->setting_widget, "cancelled",
@@ -783,7 +783,7 @@ accounts_dialog_has_pending_change (EmpathyAccountsDialog *dialog,
gtk_tree_model_get (model, &iter, COL_ACCOUNT, account, -1);
return priv->setting_widget != NULL
- && empathy_account_widget_contains_pending_changes (
+ && tpaw_account_widget_contains_pending_changes (
priv->setting_widget);
}
@@ -1395,7 +1395,7 @@ accounts_dialog_selection_change_response_cb (GtkDialog *message_dialog,
GtkTreeSelection *selection;
priv->force_change_row = TRUE;
- empathy_account_widget_discard_pending_changes (
+ tpaw_account_widget_discard_pending_changes (
priv->setting_widget);
path = gtk_tree_row_reference_get_path (priv->destination_row);
@@ -1922,7 +1922,7 @@ accounts_dialog_accounts_model_row_inserted_cb (GtkTreeModel *model,
if (priv->setting_widget != NULL &&
accounts_dialog_has_valid_accounts (dialog))
{
- empathy_account_widget_set_other_accounts_exist (
+ tpaw_account_widget_set_other_accounts_exist (
priv->setting_widget, TRUE);
}
}
@@ -1937,7 +1937,7 @@ accounts_dialog_accounts_model_row_deleted_cb (GtkTreeModel *model,
if (priv->setting_widget != NULL &&
!accounts_dialog_has_valid_accounts (dialog))
{
- empathy_account_widget_set_other_accounts_exist (
+ tpaw_account_widget_set_other_accounts_exist (
priv->setting_widget, FALSE);
}
}
diff --git a/tests/empathy-irc-network-manager-test.c b/tests/empathy-irc-network-manager-test.c
index 7fb195f02..ac6d4bbd1 100644
--- a/tests/empathy-irc-network-manager-test.c
+++ b/tests/empathy-irc-network-manager-test.c
@@ -12,26 +12,26 @@
#define USER_FILE "user-irc-networks.xml"
static void
-test_empathy_irc_network_manager_add (void)
+test_tpaw_irc_network_manager_add (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
GSList *networks;
gchar *name;
- mgr = empathy_irc_network_manager_new (NULL, NULL);
+ mgr = tpaw_irc_network_manager_new (NULL, NULL);
g_assert (mgr != NULL);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert (networks == NULL);
/* add a network */
- network = empathy_irc_network_new ("My Network");
+ network = tpaw_irc_network_new ("My Network");
g_assert (network != NULL);
- empathy_irc_network_manager_add (mgr, network);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (network);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 1);
g_object_get (networks->data, "name", &name, NULL);
g_assert_cmpstr (name, ==, "My Network");
@@ -40,12 +40,12 @@ test_empathy_irc_network_manager_add (void)
g_slist_free (networks);
/* add another network having the same name */
- network = empathy_irc_network_new ("My Network");
+ network = tpaw_irc_network_new ("My Network");
g_assert (network != NULL);
- empathy_irc_network_manager_add (mgr, network);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (network);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 2);
g_object_get (networks->data, "name", &name, NULL);
g_assert_cmpstr (name, ==, "My Network");
@@ -62,7 +62,7 @@ test_empathy_irc_network_manager_add (void)
static void
test_load_global_file (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t freenode_servers[] = {
@@ -79,7 +79,7 @@ test_load_global_file (void)
gchar *global_file_orig;
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, NULL);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, NULL);
g_object_get (mgr,
"global-file", &global_file,
@@ -90,7 +90,7 @@ test_load_global_file (void)
g_free (global_file_orig);
g_free (user_file);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 4);
network_checked[0] = network_checked[1] = network_checked[2] =
@@ -139,18 +139,18 @@ test_load_global_file (void)
}
static gboolean
-remove_network_named (EmpathyIrcNetworkManager *mgr,
+remove_network_named (TpawIrcNetworkManager *mgr,
const gchar *network_name)
{
GSList *networks, *l;
gboolean removed = FALSE;
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
/* check networks and servers */
for (l = networks; l != NULL && !removed; l = g_slist_next (l))
{
- EmpathyIrcNetwork *network = l->data;
+ TpawIrcNetwork *network = l->data;
gchar *name;
g_object_get (network, "name", &name, NULL);
@@ -158,7 +158,7 @@ remove_network_named (EmpathyIrcNetworkManager *mgr,
if (strcmp (name, network_name) == 0)
{
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
removed = TRUE;
}
@@ -172,9 +172,9 @@ remove_network_named (EmpathyIrcNetworkManager *mgr,
}
static void
-test_empathy_irc_network_manager_remove (void)
+test_tpaw_irc_network_manager_remove (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
GSList *networks, *l;
struct server_t freenode_servers[] = {
{ "irc.freenode.net", 6667, FALSE },
@@ -188,13 +188,13 @@ test_empathy_irc_network_manager_remove (void)
gchar *global_file_orig;
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, NULL);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, NULL);
g_free (global_file_orig);
result = remove_network_named (mgr, "GIMPNet");
g_assert (result);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_checked[0] = network_checked[1] = network_checked[2] = FALSE;
@@ -238,7 +238,7 @@ test_empathy_irc_network_manager_remove (void)
static void
test_load_user_file (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t gimpnet_servers[] = {
@@ -254,7 +254,7 @@ test_load_user_file (void)
copy_xml_file (USER_SAMPLE, USER_FILE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -266,7 +266,7 @@ test_load_user_file (void)
g_free (user_file);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_checked[0] = network_checked[1] = network_checked[2] = FALSE;
@@ -310,7 +310,7 @@ test_load_user_file (void)
static void
test_load_both_files (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t freenode_servers[] = {
@@ -331,7 +331,7 @@ test_load_both_files (void)
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -344,7 +344,7 @@ test_load_both_files (void)
g_free (user_file);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 5);
network_checked[0] = network_checked[1] = network_checked[2] =
@@ -400,9 +400,9 @@ test_load_both_files (void)
static void
test_modify_user_file (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t gimpnet_servers[] = {
@@ -418,7 +418,7 @@ test_modify_user_file (void)
copy_xml_file (USER_SAMPLE, USER_FILE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -429,7 +429,7 @@ test_modify_user_file (void)
g_free (global_file);
g_free (user_file);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_modified[0] = network_modified[1] = FALSE;
@@ -449,7 +449,7 @@ test_modify_user_file (void)
/* change charset */
g_object_set (network, "charset", "ISO-8859-1", NULL);
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
for (ll = servers; ll != NULL; ll = g_slist_next (ll))
{
gchar *address;
@@ -469,7 +469,7 @@ test_modify_user_file (void)
else if (strcmp (address, "irc.au.gimp.org") == 0)
{
/* remove this server */
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
}
else
{
@@ -487,7 +487,7 @@ test_modify_user_file (void)
else if (strcmp (name, "My Server") == 0)
{
/* remove this network */
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
network_modified[1] = TRUE;
}
else if (strcmp (name, "Another Server") == 0)
@@ -504,10 +504,10 @@ test_modify_user_file (void)
g_assert (network_modified[0] && network_modified[1]);
/* Add a new network */
- network = empathy_irc_network_new ("Great Server");
- server = empathy_irc_server_new ("irc.greatserver.com", 7873, TRUE);
- empathy_irc_network_append_server (network, server);
- empathy_irc_network_manager_add (mgr, network);
+ network = tpaw_irc_network_new ("Great Server");
+ server = tpaw_irc_server_new ("irc.greatserver.com", 7873, TRUE);
+ tpaw_irc_network_append_server (network, server);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (server);
g_object_unref (network);
@@ -517,10 +517,10 @@ test_modify_user_file (void)
/* Now let's reload the file and check its contain */
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 3);
network_checked[0] = network_checked[1] = network_checked[2] = FALSE;
@@ -564,9 +564,9 @@ test_modify_user_file (void)
static void
test_modify_both_files (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
gchar *global_file, *user_file;
GSList *networks, *l;
struct server_t gimpnet_servers[] = {
@@ -586,7 +586,7 @@ test_modify_both_files (void)
copy_xml_file (USER_SAMPLE, USER_FILE);
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_object_get (mgr,
"global-file", &global_file,
@@ -599,7 +599,7 @@ test_modify_both_files (void)
g_free (user_file);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 5);
network_modified[0] = network_modified[1] = network_modified[2] =
@@ -618,7 +618,7 @@ test_modify_both_files (void)
/* Modify user network */
GSList *servers, *ll;
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
for (ll = servers; ll != NULL; ll = g_slist_next (ll))
{
gchar *address;
@@ -638,7 +638,7 @@ test_modify_both_files (void)
else if (strcmp (address, "irc.au.gimp.org") == 0)
{
/* remove this server */
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
}
else
{
@@ -656,20 +656,20 @@ test_modify_both_files (void)
else if (strcmp (name, "My Server") == 0)
{
/* remove user network */
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
network_modified[1] = TRUE;
}
else if (strcmp (name, "Freenode") == 0)
{
/* remove global network */
- empathy_irc_network_manager_remove (mgr, network);
+ tpaw_irc_network_manager_remove (mgr, network);
network_modified[2] = TRUE;
}
else if (strcmp (name, "Undernet") == 0)
{
/* modify global network */
- server = empathy_irc_server_new ("us.undernet.org", 6667, FALSE);
- empathy_irc_network_append_server (network, server);
+ server = tpaw_irc_server_new ("us.undernet.org", 6667, FALSE);
+ tpaw_irc_network_append_server (network, server);
g_object_unref (server);
network_modified[3] = TRUE;
@@ -689,10 +689,10 @@ test_modify_both_files (void)
&& network_modified[3]);
/* Add a new network */
- network = empathy_irc_network_new ("Great Server");
- server = empathy_irc_server_new ("irc.greatserver.com", 7873, TRUE);
- empathy_irc_network_append_server (network, server);
- empathy_irc_network_manager_add (mgr, network);
+ network = tpaw_irc_network_new ("Great Server");
+ server = tpaw_irc_server_new ("irc.greatserver.com", 7873, TRUE);
+ tpaw_irc_network_append_server (network, server);
+ tpaw_irc_network_manager_add (mgr, network);
g_object_unref (server);
g_object_unref (network);
@@ -704,11 +704,11 @@ test_modify_both_files (void)
/* Now let's reload the file and check its contain */
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
user_file_orig = get_user_xml_file (USER_FILE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_free (global_file_orig);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 4);
network_checked[0] = network_checked[1] = network_checked[2] =
@@ -757,30 +757,30 @@ test_modify_both_files (void)
}
static void
-test_empathy_irc_network_manager_find_network_by_address (void)
+test_tpaw_irc_network_manager_find_network_by_address (void)
{
- EmpathyIrcNetworkManager *mgr;
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkManager *mgr;
+ TpawIrcNetwork *network;
struct server_t freenode_servers[] = {
{ "irc.freenode.net", 6667, FALSE },
{ "irc.eu.freenode.net", 6667, FALSE }};
gchar *global_file_orig;
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, NULL);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, NULL);
g_free (global_file_orig);
- network = empathy_irc_network_manager_find_network_by_address (mgr,
+ network = tpaw_irc_network_manager_find_network_by_address (mgr,
"irc.freenode.net");
g_assert (network != NULL);
check_network (network, "Freenode", "UTF-8", freenode_servers, 2);
- network = empathy_irc_network_manager_find_network_by_address (mgr,
+ network = tpaw_irc_network_manager_find_network_by_address (mgr,
"irc.eu.freenode.net");
g_assert (network != NULL);
check_network (network, "Freenode", "UTF-8", freenode_servers, 2);
- network = empathy_irc_network_manager_find_network_by_address (mgr,
+ network = tpaw_irc_network_manager_find_network_by_address (mgr,
"unknown");
g_assert (network == NULL);
@@ -790,7 +790,7 @@ test_empathy_irc_network_manager_find_network_by_address (void)
static void
test_no_modify_with_empty_user_file (void)
{
- EmpathyIrcNetworkManager *mgr;
+ TpawIrcNetworkManager *mgr;
GSList *networks;
gchar *global_file_orig;
gchar *user_file_orig;
@@ -800,15 +800,15 @@ test_no_modify_with_empty_user_file (void)
g_unlink (user_file_orig);
global_file_orig = get_xml_file (GLOBAL_SAMPLE);
- mgr = empathy_irc_network_manager_new (global_file_orig, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (global_file_orig, user_file_orig);
g_free (global_file_orig);
g_object_unref (mgr);
/* We didn't modify anything so USER_FILE should be empty */
- mgr = empathy_irc_network_manager_new (NULL, user_file_orig);
+ mgr = tpaw_irc_network_manager_new (NULL, user_file_orig);
g_free (user_file_orig);
- networks = empathy_irc_network_manager_get_networks (mgr);
+ networks = tpaw_irc_network_manager_get_networks (mgr);
g_assert_cmpuint (g_slist_length (networks), ==, 0);
g_slist_foreach (networks, (GFunc) g_object_unref, NULL);
@@ -825,11 +825,11 @@ main (int argc,
test_init (argc, argv);
g_test_add_func ("/irc-network-manager/add",
- test_empathy_irc_network_manager_add);
+ test_tpaw_irc_network_manager_add);
g_test_add_func ("/irc-network-manager/load-global-file",
test_load_global_file);
g_test_add_func ("/irc-network-manager/remove",
- test_empathy_irc_network_manager_remove);
+ test_tpaw_irc_network_manager_remove);
g_test_add_func ("/irc-network-manager/load-user-file", test_load_user_file);
g_test_add_func ("/irc-network-manager/load-both-files",
test_load_both_files);
@@ -838,7 +838,7 @@ main (int argc,
g_test_add_func ("/irc-network-manager/modify-both-files",
test_modify_both_files);
g_test_add_func ("/irc-network-manager/find-network-by-address",
- test_empathy_irc_network_manager_find_network_by_address);
+ test_tpaw_irc_network_manager_find_network_by_address);
g_test_add_func ("/irc-network-manager/no-modify-with-empty-user-file",
test_no_modify_with_empty_user_file);
diff --git a/tests/empathy-irc-network-test.c b/tests/empathy-irc-network-test.c
index 5ca4fba73..2657d788a 100644
--- a/tests/empathy-irc-network-test.c
+++ b/tests/empathy-irc-network-test.c
@@ -7,11 +7,11 @@
#include "test-irc-helper.h"
static void
-test_empathy_irc_network_new (void)
+test_tpaw_irc_network_new (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
g_object_unref (network);
@@ -20,9 +20,9 @@ test_empathy_irc_network_new (void)
static void
test_property_change (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
g_object_set (network,
@@ -39,7 +39,7 @@ test_property_change (void)
static gboolean modified;
static void
-modified_cb (EmpathyIrcNetwork *network,
+modified_cb (TpawIrcNetwork *network,
gpointer unused)
{
modified = TRUE;
@@ -48,9 +48,9 @@ modified_cb (EmpathyIrcNetwork *network,
static void
test_modified_signal (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
modified = FALSE;
@@ -66,7 +66,7 @@ test_modified_signal (void)
}
static void
-add_servers (EmpathyIrcNetwork *network,
+add_servers (TpawIrcNetwork *network,
struct server_t *servers,
guint nb_servers)
{
@@ -74,12 +74,12 @@ add_servers (EmpathyIrcNetwork *network,
for (i = 0; i < nb_servers; i ++)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new (servers[i].address,
+ server = tpaw_irc_server_new (servers[i].address,
servers[i].port, servers[i].ssl);
modified = FALSE;
- empathy_irc_network_append_server (network, server);
+ tpaw_irc_network_append_server (network, server);
g_assert (modified);
g_object_unref (server);
}
@@ -88,8 +88,8 @@ add_servers (EmpathyIrcNetwork *network,
static void
test_add_server (void)
{
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
GSList *servers, *l;
struct server_t test_servers[] = {
{ "server1", 6667, FALSE },
@@ -101,7 +101,7 @@ test_add_server (void)
{ "server2", 6668, TRUE },
{ "server4", 6669, TRUE }};
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
modified = FALSE;
@@ -115,12 +115,12 @@ test_add_server (void)
check_network (network, "Network1", "UTF-8", test_servers, 4);
/* Now let's remove the 3rd server */
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
l = g_slist_nth (servers, 2);
g_assert (l != NULL);
server = l->data;
modified = FALSE;
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
g_assert (modified);
/* free the list */
@@ -136,16 +136,16 @@ test_add_server (void)
static void
test_modified_signal_because_of_server (void)
{
- EmpathyIrcNetwork *network;
- EmpathyIrcServer *server;
+ TpawIrcNetwork *network;
+ TpawIrcServer *server;
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
g_signal_connect (network, "modified", G_CALLBACK (modified_cb), NULL);
- server = empathy_irc_server_new ("server1", 6667, FALSE);
- empathy_irc_network_append_server (network, server);
+ server = tpaw_irc_server_new ("server1", 6667, FALSE);
+ tpaw_irc_network_append_server (network, server);
/* Change server properties */
modified = FALSE;
@@ -158,7 +158,7 @@ test_modified_signal_because_of_server (void)
g_object_set (server, "ssl", TRUE, NULL);
g_assert (modified);
- empathy_irc_network_remove_server (network, server);
+ tpaw_irc_network_remove_server (network, server);
modified = FALSE;
g_object_set (server, "address", "server3", NULL);
/* We removed the server so the network is not modified anymore */
@@ -168,9 +168,9 @@ test_modified_signal_because_of_server (void)
}
static void
-test_empathy_irc_network_set_server_position (void)
+test_tpaw_irc_network_set_server_position (void)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
GSList *servers, *l;
struct server_t test_servers[] = {
{ "server1", 6667, FALSE },
@@ -183,7 +183,7 @@ test_empathy_irc_network_set_server_position (void)
{ "server3", 6667, FALSE },
{ "server1", 6667, FALSE }};
- network = empathy_irc_network_new ("Network1");
+ network = tpaw_irc_network_new ("Network1");
check_network (network, "Network1", "UTF-8", NULL, 0);
modified = FALSE;
@@ -194,24 +194,24 @@ test_empathy_irc_network_set_server_position (void)
check_network (network, "Network1", "UTF-8", test_servers, 4);
/* get servers list */
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
g_assert (g_slist_length (servers) == 4);
modified = FALSE;
/* server1 go to the last position */
- empathy_irc_network_set_server_position (network, servers->data, -1);
+ tpaw_irc_network_set_server_position (network, servers->data, -1);
/* server2 go to the first position */
l = servers->next;
- empathy_irc_network_set_server_position (network, l->data, 0);
+ tpaw_irc_network_set_server_position (network, l->data, 0);
/* server3 go to the third position */
l = l->next;
- empathy_irc_network_set_server_position (network, l->data, 2);
+ tpaw_irc_network_set_server_position (network, l->data, 2);
/* server4 go to the second position*/
l = l->next;
- empathy_irc_network_set_server_position (network, l->data, 1);
+ tpaw_irc_network_set_server_position (network, l->data, 1);
g_assert (modified);
@@ -231,14 +231,14 @@ main (int argc,
test_init (argc, argv);
- g_test_add_func ("/irc-network/new", test_empathy_irc_network_new);
+ g_test_add_func ("/irc-network/new", test_tpaw_irc_network_new);
g_test_add_func ("/irc-network/property-change", test_property_change);
g_test_add_func ("/irc-network/modified-signal", test_modified_signal);
g_test_add_func ("/irc-network/add-server", test_add_server);
g_test_add_func ("/irc-network/modified-signal-because-of-server",
test_modified_signal_because_of_server);
g_test_add_func ("/irc-network/set-server-position",
- test_empathy_irc_network_set_server_position);
+ test_tpaw_irc_network_set_server_position);
result = g_test_run ();
test_deinit ();
diff --git a/tests/empathy-irc-server-test.c b/tests/empathy-irc-server-test.c
index 225d57bc8..ff56a02da 100644
--- a/tests/empathy-irc-server-test.c
+++ b/tests/empathy-irc-server-test.c
@@ -7,11 +7,11 @@
#include "test-irc-helper.h"
static void
-test_empathy_irc_server_new (void)
+test_tpaw_irc_server_new (void)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ server = tpaw_irc_server_new ("test.localhost", 6667, TRUE);
check_server (server, "test.localhost", 6667, TRUE);
g_object_unref (server);
@@ -20,9 +20,9 @@ test_empathy_irc_server_new (void)
static void
test_property_change (void)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ server = tpaw_irc_server_new ("test.localhost", 6667, TRUE);
g_assert (server != NULL);
g_object_set (server,
@@ -39,7 +39,7 @@ test_property_change (void)
static gboolean modified = FALSE;
static void
-modified_cb (EmpathyIrcServer *server,
+modified_cb (TpawIrcServer *server,
gpointer unused)
{
modified = TRUE;
@@ -48,9 +48,9 @@ modified_cb (EmpathyIrcServer *server,
static void
test_modified_signal (void)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
- server = empathy_irc_server_new ("test.localhost", 6667, TRUE);
+ server = tpaw_irc_server_new ("test.localhost", 6667, TRUE);
g_assert (server != NULL);
g_signal_connect (server, "modified", G_CALLBACK (modified_cb), NULL);
@@ -87,7 +87,7 @@ main (int argc,
test_init (argc, argv);
- g_test_add_func ("/irc-server/new", test_empathy_irc_server_new);
+ g_test_add_func ("/irc-server/new", test_tpaw_irc_server_new);
g_test_add_func ("/irc-server/property-change", test_property_change);
g_test_add_func ("/irc-server/modified-signal", test_modified_signal);
diff --git a/tests/test-irc-helper.c b/tests/test-irc-helper.c
index 6fafac804..82d933a7d 100644
--- a/tests/test-irc-helper.c
+++ b/tests/test-irc-helper.c
@@ -2,7 +2,7 @@
#include "test-irc-helper.h"
void
-check_server (EmpathyIrcServer *server,
+check_server (TpawIrcServer *server,
const gchar *_address,
guint _port,
gboolean _ssl)
@@ -27,7 +27,7 @@ check_server (EmpathyIrcServer *server,
}
void
-check_network (EmpathyIrcNetwork *network,
+check_network (TpawIrcNetwork *network,
const gchar *_name,
const gchar *_charset,
struct server_t *_servers,
@@ -47,13 +47,13 @@ check_network (EmpathyIrcNetwork *network,
g_assert (name != NULL && strcmp (name, _name) == 0);
g_assert (charset != NULL && strcmp (charset, _charset) == 0);
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
g_assert (g_slist_length (servers) == nb_servers);
/* Is that the right servers ? */
for (l = servers, i = 0; l != NULL; l = g_slist_next (l), i++)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
gchar *address;
guint port;
gboolean ssl;
diff --git a/tests/test-irc-helper.h b/tests/test-irc-helper.h
index 6010bc186..2dedf50c9 100644
--- a/tests/test-irc-helper.h
+++ b/tests/test-irc-helper.h
@@ -12,10 +12,10 @@ struct server_t
gboolean ssl;
};
-void check_server (EmpathyIrcServer *server, const gchar *_address,
+void check_server (TpawIrcServer *server, const gchar *_address,
guint _port, gboolean _ssl);
-void check_network (EmpathyIrcNetwork *network, const gchar *_name,
+void check_network (TpawIrcNetwork *network, const gchar *_name,
const gchar *_charset, struct server_t *_servers, guint nb_servers);
#endif /* __CHECK_IRC_HELPER_H__ */
diff --git a/tp-account-widgets/empathy-account-widget-irc.c b/tp-account-widgets/empathy-account-widget-irc.c
index e86cec417..417d309ce 100644
--- a/tp-account-widgets/empathy-account-widget-irc.c
+++ b/tp-account-widgets/empathy-account-widget-irc.c
@@ -28,22 +28,22 @@
#include "empathy-debug.h"
typedef struct {
- EmpathyAccountWidget *self;
+ TpawAccountWidget *self;
GtkWidget *vbox_settings;
GtkWidget *network_chooser;
-} EmpathyAccountWidgetIrc;
+} TpawAccountWidgetIrc;
static void
account_widget_irc_destroy_cb (GtkWidget *widget,
- EmpathyAccountWidgetIrc *settings)
+ TpawAccountWidgetIrc *settings)
{
- g_slice_free (EmpathyAccountWidgetIrc, settings);
+ g_slice_free (TpawAccountWidgetIrc, settings);
}
static void
-account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
+account_widget_irc_setup (TpawAccountWidgetIrc *settings)
{
gchar *nick = NULL;
gchar *fullname = NULL;
@@ -79,10 +79,10 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
}
static void
-network_changed_cb (EmpathyIrcNetworkChooser *chooser,
- EmpathyAccountWidgetIrc *settings)
+network_changed_cb (TpawIrcNetworkChooser *chooser,
+ TpawAccountWidgetIrc *settings)
{
- empathy_account_widget_changed (settings->self);
+ tpaw_account_widget_changed (settings->self);
}
/**
@@ -114,7 +114,7 @@ set_password_prompt_if_needed (EmpathyAccountSettings *ac_settings,
static void
entry_password_changed_cb (GtkEntry *entry,
- EmpathyAccountWidgetIrc *settings)
+ TpawAccountWidgetIrc *settings)
{
const gchar *password;
EmpathyAccountSettings *ac_settings;
@@ -128,18 +128,18 @@ entry_password_changed_cb (GtkEntry *entry,
g_object_unref (ac_settings);
}
-EmpathyIrcNetworkChooser *
-empathy_account_widget_irc_build (EmpathyAccountWidget *self,
+TpawIrcNetworkChooser *
+tpaw_account_widget_irc_build (TpawAccountWidget *self,
const char *filename,
GtkWidget **table_common_settings,
GtkWidget **box)
{
- EmpathyAccountWidgetIrc *settings;
+ TpawAccountWidgetIrc *settings;
EmpathyAccountSettings *ac_settings;
GtkWidget *entry_password;
gchar *password;
- settings = g_slice_new0 (EmpathyAccountWidgetIrc);
+ settings = g_slice_new0 (TpawAccountWidgetIrc);
settings->self = self;
self->ui_details->gui = empathy_builder_get_resource (filename,
@@ -152,7 +152,7 @@ empathy_account_widget_irc_build (EmpathyAccountWidget *self,
/* Add network chooser button */
g_object_get (settings->self, "settings", &ac_settings, NULL);
- settings->network_chooser = empathy_irc_network_chooser_new (ac_settings);
+ settings->network_chooser = tpaw_irc_network_chooser_new (ac_settings);
g_signal_connect (settings->network_chooser, "changed",
G_CALLBACK (network_changed_cb), settings);
@@ -164,7 +164,7 @@ empathy_account_widget_irc_build (EmpathyAccountWidget *self,
account_widget_irc_setup (settings);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_nick", "account",
"entry_fullname", "fullname",
"entry_password", "password",
@@ -194,19 +194,19 @@ empathy_account_widget_irc_build (EmpathyAccountWidget *self,
g_signal_connect (entry_password, "changed",
G_CALLBACK (entry_password_changed_cb), settings);
- return EMPATHY_IRC_NETWORK_CHOOSER (settings->network_chooser);
+ return TPAW_IRC_NETWORK_CHOOSER (settings->network_chooser);
}
-EmpathyIrcNetworkChooser *
-empathy_account_widget_irc_build_simple (EmpathyAccountWidget *self,
+TpawIrcNetworkChooser *
+tpaw_account_widget_irc_build_simple (TpawAccountWidget *self,
const char *filename,
GtkWidget **box)
{
- EmpathyAccountWidgetIrc *settings;
+ TpawAccountWidgetIrc *settings;
EmpathyAccountSettings *ac_settings;
GtkAlignment *alignment;
- settings = g_slice_new0 (EmpathyAccountWidgetIrc);
+ settings = g_slice_new0 (TpawAccountWidgetIrc);
settings->self = self;
self->ui_details->gui = empathy_builder_get_resource (filename,
@@ -217,7 +217,7 @@ empathy_account_widget_irc_build_simple (EmpathyAccountWidget *self,
/* Add network chooser button */
g_object_get (settings->self, "settings", &ac_settings, NULL);
- settings->network_chooser = empathy_irc_network_chooser_new (ac_settings);
+ settings->network_chooser = tpaw_irc_network_chooser_new (ac_settings);
g_signal_connect (settings->network_chooser, "changed",
G_CALLBACK (network_changed_cb), settings);
@@ -226,7 +226,7 @@ empathy_account_widget_irc_build_simple (EmpathyAccountWidget *self,
gtk_widget_show (settings->network_chooser);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_nick_simple", "account",
NULL);
@@ -238,5 +238,5 @@ empathy_account_widget_irc_build_simple (EmpathyAccountWidget *self,
g_object_unref (ac_settings);
- return EMPATHY_IRC_NETWORK_CHOOSER (settings->network_chooser);
+ return TPAW_IRC_NETWORK_CHOOSER (settings->network_chooser);
}
diff --git a/tp-account-widgets/empathy-account-widget-irc.h b/tp-account-widgets/empathy-account-widget-irc.h
index c102d6ea6..991ab9ad7 100644
--- a/tp-account-widgets/empathy-account-widget-irc.h
+++ b/tp-account-widgets/empathy-account-widget-irc.h
@@ -18,25 +18,25 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_ACCOUNT_WIDGET_IRC_H__
-#define __EMPATHY_ACCOUNT_WIDGET_IRC_H__
+#ifndef __TPAW_ACCOUNT_WIDGET_IRC_H__
+#define __TPAW_ACCOUNT_WIDGET_IRC_H__
#include "empathy-account-widget.h"
#include "empathy-irc-network-chooser.h"
G_BEGIN_DECLS
-EmpathyIrcNetworkChooser * empathy_account_widget_irc_build (
- EmpathyAccountWidget *self,
+TpawIrcNetworkChooser * tpaw_account_widget_irc_build (
+ TpawAccountWidget *self,
const char *filename,
GtkWidget **table_common_settings,
GtkWidget **box);
-EmpathyIrcNetworkChooser * empathy_account_widget_irc_build_simple (
- EmpathyAccountWidget *self,
+TpawIrcNetworkChooser * tpaw_account_widget_irc_build_simple (
+ TpawAccountWidget *self,
const char *filename,
GtkWidget **box);
G_END_DECLS
-#endif /* __EMPATHY_ACCOUNT_WIDGET_IRC_H__ */
+#endif /* __TPAW_ACCOUNT_WIDGET_IRC_H__ */
diff --git a/tp-account-widgets/empathy-account-widget-private.h b/tp-account-widgets/empathy-account-widget-private.h
index 044e3a991..6b5c06086 100644
--- a/tp-account-widgets/empathy-account-widget-private.h
+++ b/tp-account-widgets/empathy-account-widget-private.h
@@ -19,28 +19,28 @@
* Authors: Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
*/
-#ifndef __EMPATHY_ACCOUNT_WIDGET_PRIVATE_H__
-#define __EMPATHY_ACCOUNT_WIDGET_PRIVATE_H__
+#ifndef __TPAW_ACCOUNT_WIDGET_PRIVATE_H__
+#define __TPAW_ACCOUNT_WIDGET_PRIVATE_H__
#include "empathy-account-widget.h"
G_BEGIN_DECLS
-struct _EmpathyAccountWidgetUIDetails {
+struct _TpawAccountWidgetUIDetails {
GtkBuilder *gui;
char *default_focus;
};
-void empathy_account_widget_handle_params (EmpathyAccountWidget *self,
+void tpaw_account_widget_handle_params (TpawAccountWidget *self,
const gchar *first_widget,
...);
-void empathy_account_widget_setup_widget (EmpathyAccountWidget *self,
+void tpaw_account_widget_setup_widget (TpawAccountWidget *self,
GtkWidget *widget,
const gchar *param_name);
G_END_DECLS
-#endif /* __EMPATHY_ACCOUNT_WIDGET_PRIVATE_H__ */
+#endif /* __TPAW_ACCOUNT_WIDGET_PRIVATE_H__ */
diff --git a/tp-account-widgets/empathy-account-widget-sip.c b/tp-account-widgets/empathy-account-widget-sip.c
index b76078d5c..eb4a27a18 100644
--- a/tp-account-widgets/empathy-account-widget-sip.c
+++ b/tp-account-widgets/empathy-account-widget-sip.c
@@ -28,7 +28,7 @@
#include "empathy-ui-utils.h"
typedef struct {
- EmpathyAccountWidget *self;
+ TpawAccountWidget *self;
GtkWidget *vbox_settings;
GtkWidget *label_stun_server;
@@ -39,19 +39,19 @@ typedef struct {
GtkWidget *combobox_transport;
GtkWidget *combobox_keep_alive_mechanism;
GtkWidget *spinbutton_keepalive_interval;
-} EmpathyAccountWidgetSip;
+} TpawAccountWidgetSip;
static void
account_widget_sip_destroy_cb (GtkWidget *widget,
- EmpathyAccountWidgetSip *settings)
+ TpawAccountWidgetSip *settings)
{
- g_slice_free (EmpathyAccountWidgetSip, settings);
+ g_slice_free (TpawAccountWidgetSip, settings);
}
static void
account_widget_sip_discover_stun_toggled_cb (
GtkWidget *checkbox,
- EmpathyAccountWidgetSip *settings)
+ TpawAccountWidgetSip *settings)
{
gboolean active;
@@ -64,7 +64,7 @@ account_widget_sip_discover_stun_toggled_cb (
static void
keep_alive_mechanism_combobox_change_cb (GtkWidget *widget,
- EmpathyAccountWidgetSip *self)
+ TpawAccountWidgetSip *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -87,24 +87,24 @@ keep_alive_mechanism_combobox_change_cb (GtkWidget *widget,
static void
checkbutton_tel_toggled (
GtkWidget *checkbox,
- EmpathyAccountWidgetSip *sip_settings)
+ TpawAccountWidgetSip *sip_settings)
{
EmpathyAccountSettings *settings;
- settings = empathy_account_widget_get_settings (sip_settings->self);
+ settings = tpaw_account_widget_get_settings (sip_settings->self);
empathy_account_settings_set_uri_scheme_tel (settings,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)));
- empathy_account_widget_changed (sip_settings->self);
+ tpaw_account_widget_changed (sip_settings->self);
}
GtkWidget *
-empathy_account_widget_sip_build (EmpathyAccountWidget *self,
+tpaw_account_widget_sip_build (TpawAccountWidget *self,
const char *filename,
GtkWidget **grid_common_settings)
{
- EmpathyAccountWidgetSip *settings;
+ TpawAccountWidgetSip *settings;
GtkWidget *vbox_settings;
gboolean is_simple;
GtkWidget *grid_advanced;
@@ -117,7 +117,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
"vbox_sip_simple", &vbox_settings,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_userid_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -130,7 +130,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
GtkCellRenderer *renderer;
GtkToggleButton *checkbutton_tel;
- settings = g_slice_new0 (EmpathyAccountWidgetSip);
+ settings = g_slice_new0 (TpawAccountWidgetSip);
settings->self = self;
self->ui_details->gui = empathy_builder_get_resource (filename,
@@ -150,9 +150,9 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
gtk_toggle_button_set_active (checkbutton_tel,
empathy_account_settings_has_uri_scheme_tel (
- empathy_account_widget_get_settings (self)));
+ tpaw_account_widget_get_settings (self)));
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_userid", "account",
"entry_password", "password",
"checkbutton_discover-stun", "discover-stun",
@@ -206,7 +206,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
gtk_list_store_insert_with_values (store, NULL, -1,
0, "tls", 1, _("TLS"), -1);
- empathy_account_widget_setup_widget (self, settings->combobox_transport,
+ tpaw_account_widget_setup_widget (self, settings->combobox_transport,
"transport");
gtk_grid_attach (GTK_GRID (grid_advanced), settings->combobox_transport,
@@ -246,7 +246,7 @@ empathy_account_widget_sip_build (EmpathyAccountWidget *self,
g_signal_connect (settings->combobox_keep_alive_mechanism, "changed",
G_CALLBACK (keep_alive_mechanism_combobox_change_cb), settings);
- empathy_account_widget_setup_widget (self,
+ tpaw_account_widget_setup_widget (self,
settings->combobox_keep_alive_mechanism, "keepalive-mechanism");
gtk_grid_attach (GTK_GRID (grid_advanced),
diff --git a/tp-account-widgets/empathy-account-widget-sip.h b/tp-account-widgets/empathy-account-widget-sip.h
index 4fed35ec9..aac3004e2 100644
--- a/tp-account-widgets/empathy-account-widget-sip.h
+++ b/tp-account-widgets/empathy-account-widget-sip.h
@@ -18,17 +18,17 @@
* Authors: Frederic Peters <fpeters@0d.be>
*/
-#ifndef __EMPATHY_ACCOUNT_WIDGET_SIP_H__
-#define __EMPATHY_ACCOUNT_WIDGET_SIP_H__
+#ifndef __TPAW_ACCOUNT_WIDGET_SIP_H__
+#define __TPAW_ACCOUNT_WIDGET_SIP_H__
#include "empathy-account-widget.h"
G_BEGIN_DECLS
-GtkWidget * empathy_account_widget_sip_build (EmpathyAccountWidget *self,
+GtkWidget * tpaw_account_widget_sip_build (TpawAccountWidget *self,
const char *filename,
GtkWidget **grid_common_settings);
G_END_DECLS
-#endif /* __EMPATHY_ACCOUNT_WIDGET_SIP_H__ */
+#endif /* __TPAW_ACCOUNT_WIDGET_SIP_H__ */
diff --git a/tp-account-widgets/empathy-account-widget.c b/tp-account-widgets/empathy-account-widget.c
index 0751b24a4..a26d2ab0b 100644
--- a/tp-account-widgets/empathy-account-widget.c
+++ b/tp-account-widgets/empathy-account-widget.c
@@ -40,7 +40,7 @@
#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
#include "empathy-debug.h"
-G_DEFINE_TYPE (EmpathyAccountWidget, empathy_account_widget, GTK_TYPE_BOX)
+G_DEFINE_TYPE (TpawAccountWidget, tpaw_account_widget, GTK_TYPE_BOX)
typedef enum
{
@@ -62,7 +62,7 @@ static ServiceInfo services_infos[N_SERVICES] = {
{ "label_username_f_example", FALSE },
};
-struct _EmpathyAccountWidgetPriv {
+struct _TpawAccountWidgetPriv {
EmpathyAccountSettings *settings;
GtkWidget *grid_common_settings;
@@ -77,7 +77,7 @@ struct _EmpathyAccountWidgetPriv {
gboolean contains_pending_changes;
- /* An EmpathyAccountWidget can be used to either create an account or
+ /* An TpawAccountWidget can be used to either create an account or
* modify it. When we are creating an account, this member is set to TRUE */
gboolean creating_account;
@@ -101,7 +101,7 @@ struct _EmpathyAccountWidgetPriv {
GtkWidget *remember_password_widget;
/* Used only for IRC accounts */
- EmpathyIrcNetworkChooser *irc_network_chooser;
+ TpawIrcNetworkChooser *irc_network_chooser;
/* Used for 'special' XMPP account having a service associated ensuring that
* JIDs have a specific suffix; such as Facebook for example */
@@ -183,7 +183,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
#define ACCOUNT_REGEX_YAHOO "^"YAHOO_USER_NAME"$"
static void
-account_widget_set_control_buttons_sensitivity (EmpathyAccountWidget *self,
+account_widget_set_control_buttons_sensitivity (TpawAccountWidget *self,
gboolean sensitive)
{
/* we hit this case because of the 'other-accounts-exist' property handler
@@ -240,7 +240,7 @@ account_widget_set_entry_highlighting (GtkEntry *entry,
}
static void
-account_widget_handle_control_buttons_sensitivity (EmpathyAccountWidget *self)
+account_widget_handle_control_buttons_sensitivity (TpawAccountWidget *self)
{
gboolean is_valid;
@@ -252,7 +252,7 @@ account_widget_handle_control_buttons_sensitivity (EmpathyAccountWidget *self)
}
static void
-account_widget_entry_changed_common (EmpathyAccountWidget *self,
+account_widget_entry_changed_common (TpawAccountWidget *self,
GtkEntry *entry, gboolean focus)
{
const gchar *str;
@@ -298,18 +298,18 @@ account_widget_entry_changed_common (EmpathyAccountWidget *self,
static void
account_widget_entry_changed_cb (GtkEditable *entry,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
if (self->priv->automatic_change)
return;
account_widget_entry_changed_common (self, GTK_ENTRY (entry), FALSE);
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
}
static void
account_widget_entry_map_cb (GtkEntry *entry,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
const gchar *param_name;
gboolean is_valid;
@@ -323,7 +323,7 @@ account_widget_entry_map_cb (GtkEntry *entry,
static void
account_widget_int_changed_cb (GtkWidget *widget,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
const gchar *param_name;
gint value;
@@ -362,12 +362,12 @@ account_widget_int_changed_cb (GtkWidget *widget,
g_return_if_reached ();
}
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
}
static void
account_widget_checkbutton_toggled_cb (GtkWidget *widget,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
gboolean value;
gboolean default_value;
@@ -394,12 +394,12 @@ account_widget_checkbutton_toggled_cb (GtkWidget *widget,
g_variant_new_boolean (value));
}
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
}
static void
account_widget_jabber_ssl_toggled_cb (GtkWidget *checkbutton_ssl,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
gboolean value;
gint32 port = 0;
@@ -426,7 +426,7 @@ account_widget_jabber_ssl_toggled_cb (GtkWidget *checkbutton_ssl,
static void
account_widget_combobox_changed_cb (GtkWidget *widget,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
@@ -460,7 +460,7 @@ account_widget_combobox_changed_cb (GtkWidget *widget,
g_variant_new_string (value));
}
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
tp_clear_pointer (&v, g_variant_unref);
}
@@ -469,7 +469,7 @@ static void
clear_icon_released_cb (GtkEntry *entry,
GtkEntryIconPosition icon_pos,
GdkEvent *event,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
const gchar *param_name;
@@ -479,12 +479,12 @@ clear_icon_released_cb (GtkEntry *entry,
empathy_account_settings_unset (self->priv->settings, param_name);
gtk_entry_set_text (entry, "");
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
}
static void
password_entry_changed_cb (GtkEditable *entry,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
const gchar *str;
@@ -496,22 +496,22 @@ password_entry_changed_cb (GtkEditable *entry,
static void
password_entry_activated_cb (GtkEntry *entry,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
if (gtk_widget_get_sensitive (self->priv->apply_button))
- empathy_account_widget_apply_and_log_in (self);
+ tpaw_account_widget_apply_and_log_in (self);
}
static void
account_entry_activated_cb (GtkEntry *entry,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
if (gtk_widget_get_sensitive (self->priv->apply_button))
- empathy_account_widget_apply_and_log_in (self);
+ tpaw_account_widget_apply_and_log_in (self);
}
void
-empathy_account_widget_setup_widget (EmpathyAccountWidget *self,
+tpaw_account_widget_setup_widget (TpawAccountWidget *self,
GtkWidget *widget,
const gchar *param_name)
{
@@ -710,7 +710,7 @@ account_widget_generic_format_param_name (const gchar *param_name)
}
static void
-accounts_widget_generic_setup (EmpathyAccountWidget *self,
+accounts_widget_generic_setup (TpawAccountWidget *self,
GtkWidget *grid_common_settings,
GtkWidget *grid_advanced_settings)
{
@@ -835,7 +835,7 @@ accounts_widget_generic_setup (EmpathyAccountWidget *self,
}
if (widget)
- empathy_account_widget_setup_widget (self, widget,
+ tpaw_account_widget_setup_widget (self, widget,
tp_connection_manager_param_get_name (param));
g_free (param_name_formatted);
@@ -845,7 +845,7 @@ accounts_widget_generic_setup (EmpathyAccountWidget *self,
}
static void
-account_widget_handle_params_valist (EmpathyAccountWidget *self,
+account_widget_handle_params_valist (TpawAccountWidget *self,
const gchar *first_widget,
va_list args)
{
@@ -865,14 +865,14 @@ account_widget_handle_params_valist (EmpathyAccountWidget *self,
continue;
}
- empathy_account_widget_setup_widget (self, GTK_WIDGET (object),
+ tpaw_account_widget_setup_widget (self, GTK_WIDGET (object),
param_name);
}
}
static void
account_widget_cancel_clicked_cb (GtkWidget *button,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
g_signal_emit (self, signals[CANCELLED], 0);
g_signal_emit (self, signals[CLOSE], 0, GTK_RESPONSE_CANCEL);
@@ -885,7 +885,7 @@ account_widget_account_enabled_cb (GObject *source_object,
{
GError *error = NULL;
TpAccount *account = TP_ACCOUNT (source_object);
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (user_data);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (user_data);
tp_account_set_enabled_finish (account, res, &error);
@@ -913,7 +913,7 @@ account_widget_applied_cb (GObject *source_object,
GError *error = NULL;
TpAccount *account;
EmpathyAccountSettings *settings = EMPATHY_ACCOUNT_SETTINGS (source_object);
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (user_data);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (user_data);
gboolean reconnect_required;
gboolean fire_close = TRUE;
@@ -982,7 +982,7 @@ account_widget_applied_cb (GObject *source_object,
}
void
-empathy_account_widget_apply_and_log_in (EmpathyAccountWidget *self)
+tpaw_account_widget_apply_and_log_in (TpawAccountWidget *self)
{
gboolean display_name_overridden;
@@ -1005,7 +1005,7 @@ empathy_account_widget_apply_and_log_in (EmpathyAccountWidget *self)
/* set default display name for new accounts or update if user didn't
* manually override it. */
- display_name = empathy_account_widget_get_default_display_name (self);
+ display_name = tpaw_account_widget_get_default_display_name (self);
empathy_account_settings_set_display_name_async (self->priv->settings,
display_name, NULL, NULL);
@@ -1021,13 +1021,13 @@ empathy_account_widget_apply_and_log_in (EmpathyAccountWidget *self)
static void
account_widget_apply_clicked_cb (GtkWidget *button,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
- empathy_account_widget_apply_and_log_in (self);
+ tpaw_account_widget_apply_and_log_in (self);
}
static void
-account_widget_setup_generic (EmpathyAccountWidget *self)
+account_widget_setup_generic (TpawAccountWidget *self)
{
GtkWidget *grid_common_settings;
GtkWidget *grid_advanced_settings;
@@ -1048,14 +1048,14 @@ account_widget_settings_ready_cb (EmpathyAccountSettings *settings,
GParamSpec *pspec,
gpointer user_data)
{
- EmpathyAccountWidget *self = user_data;
+ TpawAccountWidget *self = user_data;
if (empathy_account_settings_is_ready (self->priv->settings))
account_widget_setup_generic (self);
}
static GtkWidget *
-account_widget_build_generic (EmpathyAccountWidget *self,
+account_widget_build_generic (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *expander_advanced, *box;
@@ -1081,7 +1081,7 @@ account_widget_build_generic (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_salut (EmpathyAccountWidget *self,
+account_widget_build_salut (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *expander_advanced, *box;
@@ -1092,7 +1092,7 @@ account_widget_build_salut (EmpathyAccountWidget *self,
"expander_advanced_settings", &expander_advanced,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_published", "published-name",
"entry_nickname", "nickname",
"entry_first_name", "first-name",
@@ -1110,7 +1110,7 @@ account_widget_build_salut (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_irc (EmpathyAccountWidget *self,
+account_widget_build_irc (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *box;
@@ -1120,12 +1120,12 @@ account_widget_build_irc (EmpathyAccountWidget *self,
if (self->priv->simple)
{
- self->priv->irc_network_chooser = empathy_account_widget_irc_build_simple
+ self->priv->irc_network_chooser = tpaw_account_widget_irc_build_simple
(self, filename, &box);
}
else
{
- self->priv->irc_network_chooser = empathy_account_widget_irc_build (self,
+ self->priv->irc_network_chooser = tpaw_account_widget_irc_build (self,
filename, &self->priv->grid_common_settings, &box);
}
@@ -1133,12 +1133,12 @@ account_widget_build_irc (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_sip (EmpathyAccountWidget *self,
+account_widget_build_sip (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *box;
- box = empathy_account_widget_sip_build (self, filename,
+ box = tpaw_account_widget_sip_build (self, filename,
&self->priv->grid_common_settings);
if (self->priv->simple)
@@ -1157,7 +1157,7 @@ account_widget_build_sip (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_msn (EmpathyAccountWidget *self,
+account_widget_build_msn (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *box;
@@ -1171,7 +1171,7 @@ account_widget_build_msn (EmpathyAccountWidget *self,
"vbox_msn_simple", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -1189,7 +1189,7 @@ account_widget_build_msn (EmpathyAccountWidget *self,
"vbox_msn_settings", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id", "account",
"entry_password", "password",
"entry_server", "server",
@@ -1207,7 +1207,7 @@ account_widget_build_msn (EmpathyAccountWidget *self,
static void
suffix_id_widget_changed_cb (GtkWidget *entry,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
gchar *account;
@@ -1232,13 +1232,13 @@ suffix_id_widget_changed_cb (GtkWidget *entry,
g_free (tmp);
}
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
g_free (account);
}
static gchar *
-remove_jid_suffix (EmpathyAccountWidget *self,
+remove_jid_suffix (TpawAccountWidget *self,
const gchar *str)
{
g_assert (self->priv->jid_suffix != NULL);
@@ -1250,7 +1250,7 @@ remove_jid_suffix (EmpathyAccountWidget *self,
}
static void
-setup_id_widget_with_suffix (EmpathyAccountWidget *self,
+setup_id_widget_with_suffix (TpawAccountWidget *self,
GtkWidget *widget,
const gchar *suffix)
{
@@ -1280,14 +1280,14 @@ setup_id_widget_with_suffix (EmpathyAccountWidget *self,
}
static Service
-account_widget_get_service (EmpathyAccountWidget *self)
+account_widget_get_service (TpawAccountWidget *self)
{
const gchar *icon_name, *service;
icon_name = empathy_account_settings_get_icon_name (self->priv->settings);
service = empathy_account_settings_get_service (self->priv->settings);
- /* Previous versions of Empathy didn't set the Service property on Facebook
+ /* Previous versions of Tpaw didn't set the Service property on Facebook
* and gtalk accounts, so we check using the icon name as well. */
if (!tp_strdiff (icon_name, "im-google-talk") ||
!tp_strdiff (service, "google-talk"))
@@ -1301,7 +1301,7 @@ account_widget_get_service (EmpathyAccountWidget *self)
}
static GtkWidget *
-account_widget_build_jabber (EmpathyAccountWidget *self,
+account_widget_build_jabber (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *spinbutton_port;
@@ -1340,7 +1340,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
gtk_widget_show (label_password_create);
}
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -1358,7 +1358,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
"vbox_gtalk_simple", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id_g_simple", "account",
"entry_password_g_simple", "password",
NULL);
@@ -1377,7 +1377,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
"entry_id_fb_simple", &entry_id,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_password_fb_simple", "password",
NULL);
@@ -1406,7 +1406,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
"label_id", &label_id,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_password", "password",
"entry_resource", "resource",
"entry_server", "server",
@@ -1427,7 +1427,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
}
else
{
- empathy_account_widget_setup_widget (self, entry_id, "account");
+ tpaw_account_widget_setup_widget (self, entry_id, "account");
}
self->ui_details->default_focus = g_strdup ("entry_id");
@@ -1463,7 +1463,7 @@ account_widget_build_jabber (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_icq (EmpathyAccountWidget *self,
+account_widget_build_icq (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *spinbutton_port;
@@ -1478,7 +1478,7 @@ account_widget_build_icq (EmpathyAccountWidget *self,
"vbox_icq_simple", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_uin_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -1497,7 +1497,7 @@ account_widget_build_icq (EmpathyAccountWidget *self,
"spinbutton_port", &spinbutton_port,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_uin", "account",
"entry_password", "password",
"entry_server", "server",
@@ -1515,7 +1515,7 @@ account_widget_build_icq (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_aim (EmpathyAccountWidget *self,
+account_widget_build_aim (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *spinbutton_port, *box;
@@ -1526,7 +1526,7 @@ account_widget_build_aim (EmpathyAccountWidget *self,
"vbox_aim_simple", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_screenname_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -1545,7 +1545,7 @@ account_widget_build_aim (EmpathyAccountWidget *self,
"spinbutton_port", &spinbutton_port,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_screenname", "account",
"entry_password", "password",
"entry_server", "server",
@@ -1562,7 +1562,7 @@ account_widget_build_aim (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_yahoo (EmpathyAccountWidget *self,
+account_widget_build_yahoo (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *box;
@@ -1576,7 +1576,7 @@ account_widget_build_yahoo (EmpathyAccountWidget *self,
"vbox_yahoo_simple", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -1594,7 +1594,7 @@ account_widget_build_yahoo (EmpathyAccountWidget *self,
"vbox_yahoo_settings", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id", "account",
"entry_password", "password",
"entry_locale", "room-list-locale",
@@ -1613,7 +1613,7 @@ account_widget_build_yahoo (EmpathyAccountWidget *self,
}
static GtkWidget *
-account_widget_build_groupwise (EmpathyAccountWidget *self,
+account_widget_build_groupwise (TpawAccountWidget *self,
const char *filename)
{
GtkWidget *box;
@@ -1624,7 +1624,7 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
"vbox_groupwise_simple", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id_simple", "account",
"entry_password_simple", "password",
NULL);
@@ -1642,7 +1642,7 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
"vbox_groupwise_settings", &box,
NULL);
- empathy_account_widget_handle_params (self,
+ tpaw_account_widget_handle_params (self,
"entry_id", "account",
"entry_password", "password",
"entry_server", "server",
@@ -1659,7 +1659,7 @@ account_widget_build_groupwise (EmpathyAccountWidget *self,
}
void
-empathy_account_widget_set_other_accounts_exist (EmpathyAccountWidget *self,
+tpaw_account_widget_set_other_accounts_exist (TpawAccountWidget *self,
gboolean others_exist)
{
self->priv->other_accounts_exist = others_exist;
@@ -1674,7 +1674,7 @@ do_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (object);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (object);
switch (prop_id)
{
@@ -1688,8 +1688,8 @@ do_set_property (GObject *object,
self->priv->creating_account = g_value_get_boolean (value);
break;
case PROP_OTHER_ACCOUNTS_EXIST:
- empathy_account_widget_set_other_accounts_exist (
- EMPATHY_ACCOUNT_WIDGET (object), g_value_get_boolean (value));
+ tpaw_account_widget_set_other_accounts_exist (
+ TPAW_ACCOUNT_WIDGET (object), g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1702,7 +1702,7 @@ do_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (object);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (object);
switch (prop_id)
{
@@ -1728,7 +1728,7 @@ do_get_property (GObject *object,
}
static void
-set_apply_button (EmpathyAccountWidget *self)
+set_apply_button (TpawAccountWidget *self)
{
GtkWidget *image;
@@ -1748,7 +1748,7 @@ presence_changed_cb (TpAccountManager *manager,
TpConnectionPresenceType state,
const gchar *status,
const gchar *message,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
if (self->priv->destroyed)
return;
@@ -1784,7 +1784,7 @@ account_manager_ready_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
{
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (user_data);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (user_data);
TpAccountManager *account_manager = TP_ACCOUNT_MANAGER (source_object);
GError *error = NULL;
TpConnectionPresenceType state;
@@ -1812,7 +1812,7 @@ out:
account_widget_build_##proto }
static void
-add_register_buttons (EmpathyAccountWidget *self,
+add_register_buttons (TpawAccountWidget *self,
TpAccount *account)
{
TpProtocol *protocol;
@@ -1852,20 +1852,20 @@ add_register_buttons (EmpathyAccountWidget *self,
static void
remember_password_toggled_cb (GtkToggleButton *button,
- EmpathyAccountWidget *self)
+ TpawAccountWidget *self)
{
empathy_account_settings_set_remember_password (self->priv->settings,
gtk_toggle_button_get_active (button));
if (!self->priv->automatic_change)
- empathy_account_widget_changed (self);
+ tpaw_account_widget_changed (self);
}
static void
account_settings_password_retrieved_cb (GObject *object,
gpointer user_data)
{
- EmpathyAccountWidget *self = user_data;
+ TpawAccountWidget *self = user_data;
gchar *password;
password = empathy_account_settings_dup_string (
@@ -1894,7 +1894,7 @@ account_settings_password_retrieved_cb (GObject *object,
static void
do_constructed (GObject *obj)
{
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (obj);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (obj);
TpAccount *account;
const gchar *display_name, *default_display_name;
guint i = 0;
@@ -1902,7 +1902,7 @@ do_constructed (GObject *obj)
const gchar *cm_name;
const gchar *protocol;
const char *file;
- GtkWidget * (*func)(EmpathyAccountWidget *self, const gchar *filename);
+ GtkWidget * (*func)(TpawAccountWidget *self, const gchar *filename);
} widgets [] = {
{ "salut", "local-xmpp", ACCOUNT_WIDGETS_RESOURCES_PREFIX "/empathy-account-widget-local-xmpp.ui",
account_widget_build_salut },
@@ -2057,7 +2057,7 @@ do_constructed (GObject *obj)
display_name = empathy_account_settings_get_display_name (
self->priv->settings);
- default_display_name = empathy_account_widget_get_default_display_name (self);
+ default_display_name = tpaw_account_widget_get_default_display_name (self);
if (tp_strdiff (display_name, default_display_name) &&
!self->priv->creating_account)
@@ -2072,31 +2072,31 @@ do_constructed (GObject *obj)
static void
do_dispose (GObject *obj)
{
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (obj);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (obj);
g_clear_object (&self->priv->settings);
g_clear_object (&self->priv->account_manager);
- if (G_OBJECT_CLASS (empathy_account_widget_parent_class)->dispose != NULL)
- G_OBJECT_CLASS (empathy_account_widget_parent_class)->dispose (obj);
+ if (G_OBJECT_CLASS (tpaw_account_widget_parent_class)->dispose != NULL)
+ G_OBJECT_CLASS (tpaw_account_widget_parent_class)->dispose (obj);
}
static void
do_finalize (GObject *obj)
{
- EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (obj);
+ TpawAccountWidget *self = TPAW_ACCOUNT_WIDGET (obj);
g_free (self->ui_details->default_focus);
- g_slice_free (EmpathyAccountWidgetUIDetails, self->ui_details);
+ g_slice_free (TpawAccountWidgetUIDetails, self->ui_details);
g_free (self->priv->jid_suffix);
- if (G_OBJECT_CLASS (empathy_account_widget_parent_class)->finalize != NULL)
- G_OBJECT_CLASS (empathy_account_widget_parent_class)->finalize (obj);
+ if (G_OBJECT_CLASS (tpaw_account_widget_parent_class)->finalize != NULL)
+ G_OBJECT_CLASS (tpaw_account_widget_parent_class)->finalize (obj);
}
static void
-empathy_account_widget_class_init (EmpathyAccountWidgetClass *klass)
+tpaw_account_widget_class_init (TpawAccountWidgetClass *klass)
{
GObjectClass *oclass = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
@@ -2169,35 +2169,35 @@ empathy_account_widget_class_init (EmpathyAccountWidgetClass *klass)
G_TYPE_NONE,
1, G_TYPE_INT);
- g_type_class_add_private (klass, sizeof (EmpathyAccountWidgetPriv));
+ g_type_class_add_private (klass, sizeof (TpawAccountWidgetPriv));
}
static void
-empathy_account_widget_init (EmpathyAccountWidget *self)
+tpaw_account_widget_init (TpawAccountWidget *self)
{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), EMPATHY_TYPE_ACCOUNT_WIDGET,
- EmpathyAccountWidgetPriv);
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), TPAW_TYPE_ACCOUNT_WIDGET,
+ TpawAccountWidgetPriv);
- self->ui_details = g_slice_new0 (EmpathyAccountWidgetUIDetails);
+ self->ui_details = g_slice_new0 (TpawAccountWidgetUIDetails);
}
/* public methods */
void
-empathy_account_widget_discard_pending_changes (EmpathyAccountWidget *self)
+tpaw_account_widget_discard_pending_changes (TpawAccountWidget *self)
{
empathy_account_settings_discard_changes (self->priv->settings);
self->priv->contains_pending_changes = FALSE;
}
gboolean
-empathy_account_widget_contains_pending_changes (EmpathyAccountWidget *self)
+tpaw_account_widget_contains_pending_changes (TpawAccountWidget *self)
{
return self->priv->contains_pending_changes;
}
void
-empathy_account_widget_handle_params (EmpathyAccountWidget *self,
+tpaw_account_widget_handle_params (TpawAccountWidget *self,
const gchar *first_widget,
...)
{
@@ -2208,13 +2208,13 @@ empathy_account_widget_handle_params (EmpathyAccountWidget *self,
va_end (args);
}
-EmpathyAccountWidget *
-empathy_account_widget_new_for_protocol (EmpathyAccountSettings *settings,
+TpawAccountWidget *
+tpaw_account_widget_new_for_protocol (EmpathyAccountSettings *settings,
gboolean simple)
{
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_SETTINGS (settings), NULL);
- return g_object_new (EMPATHY_TYPE_ACCOUNT_WIDGET,
+ return g_object_new (TPAW_TYPE_ACCOUNT_WIDGET,
"orientation", GTK_ORIENTATION_VERTICAL,
"settings", settings,
"simple", simple,
@@ -2224,7 +2224,7 @@ empathy_account_widget_new_for_protocol (EmpathyAccountSettings *settings,
}
gchar *
-empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self)
+tpaw_account_widget_get_default_display_name (TpawAccountWidget *self)
{
gchar *login_id;
const gchar *protocol, *p;
@@ -2241,9 +2241,9 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self)
/* TODO: this should be done in empathy-account-widget-irc */
if (!tp_strdiff (protocol, "irc"))
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- network = empathy_irc_network_chooser_get_network (
+ network = tpaw_irc_network_chooser_get_network (
self->priv->irc_network_chooser);
g_assert (network != NULL);
@@ -2253,7 +2253,7 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self)
* You should reverse the order of these arguments if the
* server should come before the login id in your locale.*/
default_display_name = g_strdup_printf (_("%1$s on %2$s"),
- login_id, empathy_irc_network_get_name (network));
+ login_id, tpaw_irc_network_get_name (network));
}
else if (service == FACEBOOK_SERVICE && self->priv->jid_suffix != NULL)
{
@@ -2292,14 +2292,14 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self)
/* Used by subclass to indicate that widget contains pending changes */
void
-empathy_account_widget_changed (EmpathyAccountWidget *self)
+tpaw_account_widget_changed (TpawAccountWidget *self)
{
account_widget_handle_control_buttons_sensitivity (self);
self->priv->contains_pending_changes = TRUE;
}
void
-empathy_account_widget_set_account_param (EmpathyAccountWidget *self,
+tpaw_account_widget_set_account_param (TpawAccountWidget *self,
const gchar *account)
{
if (self->priv->param_account_widget == NULL)
@@ -2309,7 +2309,7 @@ empathy_account_widget_set_account_param (EmpathyAccountWidget *self,
}
void
-empathy_account_widget_set_password_param (EmpathyAccountWidget *self,
+tpaw_account_widget_set_password_param (TpawAccountWidget *self,
const gchar *account)
{
if (self->priv->param_password_widget == NULL)
@@ -2319,13 +2319,13 @@ empathy_account_widget_set_password_param (EmpathyAccountWidget *self,
}
EmpathyAccountSettings *
-empathy_account_widget_get_settings (EmpathyAccountWidget *self)
+tpaw_account_widget_get_settings (TpawAccountWidget *self)
{
return self->priv->settings;
}
void
-empathy_account_widget_hide_buttons (EmpathyAccountWidget *self)
+tpaw_account_widget_hide_buttons (TpawAccountWidget *self)
{
gtk_widget_hide (self->priv->hbox_buttons);
}
diff --git a/tp-account-widgets/empathy-account-widget.h b/tp-account-widgets/empathy-account-widget.h
index 65de952c7..261901fe7 100644
--- a/tp-account-widgets/empathy-account-widget.h
+++ b/tp-account-widgets/empathy-account-widget.h
@@ -21,8 +21,8 @@
* Martyn Russell <martyn@imendio.com>
*/
-#ifndef __EMPATHY_ACCOUNT_WIDGET_H__
-#define __EMPATHY_ACCOUNT_WIDGET_H__
+#ifndef __TPAW_ACCOUNT_WIDGET_H__
+#define __TPAW_ACCOUNT_WIDGET_H__
#include <gtk/gtk.h>
@@ -30,66 +30,66 @@
G_BEGIN_DECLS
-#define EMPATHY_TYPE_ACCOUNT_WIDGET empathy_account_widget_get_type()
-#define EMPATHY_ACCOUNT_WIDGET(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMPATHY_TYPE_ACCOUNT_WIDGET, EmpathyAccountWidget))
-#define EMPATHY_ACCOUNT_WIDGET_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), EMPATHY_TYPE_ACCOUNT_WIDGET, EmpathyAccountWidgetClass))
-#define EMPATHY_IS_ACCOUNT_WIDGET(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMPATHY_TYPE_ACCOUNT_WIDGET))
-#define EMPATHY_IS_ACCOUNT_WIDGET_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), EMPATHY_TYPE_ACCOUNT_WIDGET))
-#define EMPATHY_ACCOUNT_WIDGET_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_ACCOUNT_WIDGET, EmpathyAccountWidgetClass))
-
-typedef struct _EmpathyAccountWidgetPriv EmpathyAccountWidgetPriv;
-typedef struct _EmpathyAccountWidgetUIDetails EmpathyAccountWidgetUIDetails;
+#define TPAW_TYPE_ACCOUNT_WIDGET tpaw_account_widget_get_type()
+#define TPAW_ACCOUNT_WIDGET(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TPAW_TYPE_ACCOUNT_WIDGET, TpawAccountWidget))
+#define TPAW_ACCOUNT_WIDGET_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), TPAW_TYPE_ACCOUNT_WIDGET, TpawAccountWidgetClass))
+#define TPAW_IS_ACCOUNT_WIDGET(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TPAW_TYPE_ACCOUNT_WIDGET))
+#define TPAW_IS_ACCOUNT_WIDGET_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), TPAW_TYPE_ACCOUNT_WIDGET))
+#define TPAW_ACCOUNT_WIDGET_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TPAW_TYPE_ACCOUNT_WIDGET, TpawAccountWidgetClass))
+
+typedef struct _TpawAccountWidgetPriv TpawAccountWidgetPriv;
+typedef struct _TpawAccountWidgetUIDetails TpawAccountWidgetUIDetails;
typedef struct {
GtkBox parent;
- EmpathyAccountWidgetUIDetails *ui_details;
+ TpawAccountWidgetUIDetails *ui_details;
- EmpathyAccountWidgetPriv *priv;
-} EmpathyAccountWidget;
+ TpawAccountWidgetPriv *priv;
+} TpawAccountWidget;
typedef struct {
GtkBoxClass parent_class;
-} EmpathyAccountWidgetClass;
+} TpawAccountWidgetClass;
-GType empathy_account_widget_get_type (void);
+GType tpaw_account_widget_get_type (void);
-EmpathyAccountWidget * empathy_account_widget_new_for_protocol (
+TpawAccountWidget * tpaw_account_widget_new_for_protocol (
EmpathyAccountSettings *settings,
gboolean simple);
-gboolean empathy_account_widget_contains_pending_changes
- (EmpathyAccountWidget *widget);
-void empathy_account_widget_discard_pending_changes
- (EmpathyAccountWidget *widget);
+gboolean tpaw_account_widget_contains_pending_changes
+ (TpawAccountWidget *widget);
+void tpaw_account_widget_discard_pending_changes
+ (TpawAccountWidget *widget);
-gchar * empathy_account_widget_get_default_display_name (
- EmpathyAccountWidget *widget);
+gchar * tpaw_account_widget_get_default_display_name (
+ TpawAccountWidget *widget);
-void empathy_account_widget_set_account_param (EmpathyAccountWidget *widget,
+void tpaw_account_widget_set_account_param (TpawAccountWidget *widget,
const gchar *account);
-void empathy_account_widget_set_password_param (EmpathyAccountWidget *self,
+void tpaw_account_widget_set_password_param (TpawAccountWidget *self,
const gchar *password);
-void empathy_account_widget_set_other_accounts_exist (
- EmpathyAccountWidget *self, gboolean others_exist);
+void tpaw_account_widget_set_other_accounts_exist (
+ TpawAccountWidget *self, gboolean others_exist);
-void empathy_account_widget_hide_buttons (EmpathyAccountWidget *self);
+void tpaw_account_widget_hide_buttons (TpawAccountWidget *self);
-void empathy_account_widget_apply_and_log_in (EmpathyAccountWidget *self);
+void tpaw_account_widget_apply_and_log_in (TpawAccountWidget *self);
/* protected methods */
-void empathy_account_widget_changed (EmpathyAccountWidget *widget);
+void tpaw_account_widget_changed (TpawAccountWidget *widget);
-EmpathyAccountSettings * empathy_account_widget_get_settings (
- EmpathyAccountWidget *self);
+EmpathyAccountSettings * tpaw_account_widget_get_settings (
+ TpawAccountWidget *self);
G_END_DECLS
-#endif /* __EMPATHY_ACCOUNT_WIDGET_H__ */
+#endif /* __TPAW_ACCOUNT_WIDGET_H__ */
diff --git a/tp-account-widgets/empathy-irc-network-chooser-dialog.c b/tp-account-widgets/empathy-irc-network-chooser-dialog.c
index 60945aed6..cd0a71681 100644
--- a/tp-account-widgets/empathy-irc-network-chooser-dialog.c
+++ b/tp-account-widgets/empathy-irc-network-chooser-dialog.c
@@ -34,7 +34,7 @@
#include "empathy-irc-network-chooser-dialog.h"
-#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIrcNetworkChooserDialog)
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, TpawIrcNetworkChooserDialog)
enum {
PROP_SETTINGS = 1,
@@ -47,9 +47,9 @@ enum {
typedef struct {
EmpathyAccountSettings *settings;
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
- EmpathyIrcNetworkManager *network_manager;
+ TpawIrcNetworkManager *network_manager;
gboolean changed;
GtkWidget *treeview;
@@ -60,23 +60,23 @@ typedef struct {
gulong search_sig;
gulong activate_sig;
-} EmpathyIrcNetworkChooserDialogPriv;
+} TpawIrcNetworkChooserDialogPriv;
enum {
COL_NETWORK_OBJ,
COL_NETWORK_NAME,
};
-G_DEFINE_TYPE (EmpathyIrcNetworkChooserDialog, empathy_irc_network_chooser_dialog,
+G_DEFINE_TYPE (TpawIrcNetworkChooserDialog, tpaw_irc_network_chooser_dialog,
GTK_TYPE_DIALOG);
static void
-empathy_irc_network_chooser_dialog_set_property (GObject *object,
+tpaw_irc_network_chooser_dialog_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (object);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (object);
switch (prop_id)
{
@@ -93,12 +93,12 @@ empathy_irc_network_chooser_dialog_set_property (GObject *object,
}
static void
-empathy_irc_network_chooser_dialog_get_property (GObject *object,
+tpaw_irc_network_chooser_dialog_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (object);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (object);
switch (prop_id)
{
@@ -115,12 +115,12 @@ empathy_irc_network_chooser_dialog_get_property (GObject *object,
}
/* The iter returned by *it is a priv->store iter (not a filter one) */
-static EmpathyIrcNetwork *
-dup_selected_network (EmpathyIrcNetworkChooserDialog *self,
+static TpawIrcNetwork *
+dup_selected_network (TpawIrcNetworkChooserDialog *self,
GtkTreeIter *it)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
GtkTreeSelection *selection;
GtkTreeIter iter;
GtkTreeModel *model;
@@ -146,10 +146,10 @@ dup_selected_network (EmpathyIrcNetworkChooserDialog *self,
static void
treeview_changed_cb (GtkTreeView *treeview,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
network = dup_selected_network (self, NULL);
if (network == priv->network)
@@ -167,10 +167,10 @@ treeview_changed_cb (GtkTreeView *treeview,
/* Take a filter iterator as argument */
static void
-scroll_to_iter (EmpathyIrcNetworkChooserDialog *self,
+scroll_to_iter (TpawIrcNetworkChooserDialog *self,
GtkTreeIter *filter_iter)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GtkTreePath *path;
path = gtk_tree_model_get_path (GTK_TREE_MODEL (priv->filter), filter_iter);
@@ -186,11 +186,11 @@ scroll_to_iter (EmpathyIrcNetworkChooserDialog *self,
/* Take a filter iterator as argument */
static void
-select_iter (EmpathyIrcNetworkChooserDialog *self,
+select_iter (TpawIrcNetworkChooserDialog *self,
GtkTreeIter *filter_iter,
gboolean emulate_changed)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GtkTreeSelection *selection;
GtkTreePath *path;
@@ -221,10 +221,10 @@ select_iter (EmpathyIrcNetworkChooserDialog *self,
}
static GtkTreeIter
-iter_to_filter_iter (EmpathyIrcNetworkChooserDialog *self,
+iter_to_filter_iter (TpawIrcNetworkChooserDialog *self,
GtkTreeIter *iter)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GtkTreeIter filter_iter;
g_assert (gtk_tree_model_filter_convert_child_iter_to_iter (priv->filter,
@@ -234,22 +234,22 @@ iter_to_filter_iter (EmpathyIrcNetworkChooserDialog *self,
}
static void
-fill_store (EmpathyIrcNetworkChooserDialog *self)
+fill_store (TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GSList *networks, *l;
- networks = empathy_irc_network_manager_get_networks (
+ networks = tpaw_irc_network_manager_get_networks (
priv->network_manager);
for (l = networks; l != NULL; l = g_slist_next (l))
{
- EmpathyIrcNetwork *network = l->data;
+ TpawIrcNetwork *network = l->data;
GtkTreeIter iter;
gtk_list_store_insert_with_values (priv->store, &iter, -1,
COL_NETWORK_OBJ, network,
- COL_NETWORK_NAME, empathy_irc_network_get_name (network),
+ COL_NETWORK_NAME, tpaw_irc_network_get_name (network),
-1);
if (network == priv->network)
@@ -267,10 +267,10 @@ fill_store (EmpathyIrcNetworkChooserDialog *self)
static void
irc_network_dialog_destroy_cb (GtkWidget *widget,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
GtkTreeIter iter, filter_iter;
priv->changed = TRUE;
@@ -281,7 +281,7 @@ irc_network_dialog_destroy_cb (GtkWidget *widget,
/* name could be changed */
gtk_list_store_set (GTK_LIST_STORE (priv->store), &iter,
- COL_NETWORK_NAME, empathy_irc_network_get_name (network), -1);
+ COL_NETWORK_NAME, tpaw_irc_network_get_name (network), -1);
filter_iter = iter_to_filter_iter (self, &iter);
scroll_to_iter (self, &filter_iter);
@@ -292,21 +292,21 @@ irc_network_dialog_destroy_cb (GtkWidget *widget,
}
static void
-display_irc_network_dialog (EmpathyIrcNetworkChooserDialog *self,
- EmpathyIrcNetwork *network)
+display_irc_network_dialog (TpawIrcNetworkChooserDialog *self,
+ TpawIrcNetwork *network)
{
GtkWidget *dialog;
- dialog = empathy_irc_network_dialog_show (network, GTK_WIDGET (self));
+ dialog = tpaw_irc_network_dialog_show (network, GTK_WIDGET (self));
g_signal_connect (dialog, "destroy",
G_CALLBACK (irc_network_dialog_destroy_cb), self);
}
static void
-edit_network (EmpathyIrcNetworkChooserDialog *self)
+edit_network (TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
network = dup_selected_network (self, NULL);
if (network == NULL)
@@ -318,20 +318,20 @@ edit_network (EmpathyIrcNetworkChooserDialog *self)
}
static void
-add_network (EmpathyIrcNetworkChooserDialog *self)
+add_network (TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
GtkTreeIter iter, filter_iter;
gtk_widget_hide (priv->search);
- network = empathy_irc_network_new (_("New Network"));
- empathy_irc_network_manager_add (priv->network_manager, network);
+ network = tpaw_irc_network_new (_("New Network"));
+ tpaw_irc_network_manager_add (priv->network_manager, network);
gtk_list_store_insert_with_values (priv->store, &iter, -1,
COL_NETWORK_OBJ, network,
- COL_NETWORK_NAME, empathy_irc_network_get_name (network),
+ COL_NETWORK_NAME, tpaw_irc_network_get_name (network),
-1);
filter_iter = iter_to_filter_iter (self, &iter);
@@ -343,10 +343,10 @@ add_network (EmpathyIrcNetworkChooserDialog *self)
}
static void
-remove_network (EmpathyIrcNetworkChooserDialog *self)
+remove_network (TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
GtkTreeIter iter;
network = dup_selected_network (self, &iter);
@@ -356,7 +356,7 @@ remove_network (EmpathyIrcNetworkChooserDialog *self)
/* Hide the search after picking the network to get the right one */
gtk_widget_hide (priv->search);
- DEBUG ("Remove network %s", empathy_irc_network_get_name (network));
+ DEBUG ("Remove network %s", tpaw_irc_network_get_name (network));
/* Delete network and select next network */
if (gtk_list_store_remove (priv->store, &iter))
@@ -384,32 +384,32 @@ remove_network (EmpathyIrcNetworkChooserDialog *self)
}
}
- empathy_irc_network_manager_remove (priv->network_manager, network);
+ tpaw_irc_network_manager_remove (priv->network_manager, network);
gtk_widget_grab_focus (priv->treeview);
g_object_unref (network);
}
static void
-reset_networks (EmpathyIrcNetworkChooserDialog *self)
+reset_networks (TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GSList *networks, *l;
- networks = empathy_irc_network_manager_get_dropped_networks (
+ networks = tpaw_irc_network_manager_get_dropped_networks (
priv->network_manager);
for (l = networks; l != NULL; l = g_slist_next (l))
{
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
GtkTreeIter iter;
- network = EMPATHY_IRC_NETWORK (l->data);
- empathy_irc_network_activate (network);
+ network = TPAW_IRC_NETWORK (l->data);
+ tpaw_irc_network_activate (network);
gtk_list_store_insert_with_values (priv->store, &iter, -1,
COL_NETWORK_OBJ, network,
- COL_NETWORK_NAME, empathy_irc_network_get_name (network),
+ COL_NETWORK_NAME, tpaw_irc_network_get_name (network),
-1);
}
@@ -419,7 +419,7 @@ reset_networks (EmpathyIrcNetworkChooserDialog *self)
static void
dialog_response_cb (GtkDialog *dialog,
gint response,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
if (response == RESPONSE_RESET)
reset_networks (self);
@@ -430,14 +430,14 @@ filter_visible_func (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (user_data);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (user_data);
+ TpawIrcNetwork *network;
gboolean visible;
gtk_tree_model_get (model, iter, COL_NETWORK_OBJ, &network, -1);
visible = empathy_live_search_match (EMPATHY_LIVE_SEARCH (priv->search),
- empathy_irc_network_get_name (network));
+ tpaw_irc_network_get_name (network));
g_object_unref (network);
return visible;
@@ -445,7 +445,7 @@ filter_visible_func (GtkTreeModel *model,
static void
search_activate_cb (GtkWidget *search,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
gtk_widget_hide (search);
gtk_dialog_response (GTK_DIALOG (self), GTK_RESPONSE_CLOSE);
@@ -454,9 +454,9 @@ search_activate_cb (GtkWidget *search,
static void
search_text_notify_cb (EmpathyLiveSearch *search,
GParamSpec *pspec,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GtkTreeIter filter_iter;
gboolean sensitive = FALSE;
@@ -494,30 +494,30 @@ search_text_notify_cb (EmpathyLiveSearch *search,
static void
add_clicked_cb (GtkToolButton *button,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
add_network (self);
}
static void
remove_clicked_cb (GtkToolButton *button,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
remove_network (self);
}
static void
edit_clicked_cb (GtkToolButton *button,
- EmpathyIrcNetworkChooserDialog *self)
+ TpawIrcNetworkChooserDialog *self)
{
edit_network (self);
}
static void
-empathy_irc_network_chooser_dialog_constructed (GObject *object)
+tpaw_irc_network_chooser_dialog_constructed (GObject *object)
{
- EmpathyIrcNetworkChooserDialog *self = (EmpathyIrcNetworkChooserDialog *) object;
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialog *self = (TpawIrcNetworkChooserDialog *) object;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
GtkDialog *dialog = GTK_DIALOG (self);
GtkCellRenderer *renderer;
GtkWidget *vbox;
@@ -634,10 +634,10 @@ empathy_irc_network_chooser_dialog_constructed (GObject *object)
}
static void
-empathy_irc_network_chooser_dialog_dispose (GObject *object)
+tpaw_irc_network_chooser_dialog_dispose (GObject *object)
{
- EmpathyIrcNetworkManager *self = (EmpathyIrcNetworkManager *) object;
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManager *self = (TpawIrcNetworkManager *) object;
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
if (priv->search_sig != 0)
{
@@ -665,19 +665,19 @@ empathy_irc_network_chooser_dialog_dispose (GObject *object)
tp_clear_object (&priv->store);
tp_clear_object (&priv->filter);
- if (G_OBJECT_CLASS (empathy_irc_network_chooser_dialog_parent_class)->dispose)
- G_OBJECT_CLASS (empathy_irc_network_chooser_dialog_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (tpaw_irc_network_chooser_dialog_parent_class)->dispose)
+ G_OBJECT_CLASS (tpaw_irc_network_chooser_dialog_parent_class)->dispose (object);
}
static void
-empathy_irc_network_chooser_dialog_class_init (EmpathyIrcNetworkChooserDialogClass *klass)
+tpaw_irc_network_chooser_dialog_class_init (TpawIrcNetworkChooserDialogClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = empathy_irc_network_chooser_dialog_get_property;
- object_class->set_property = empathy_irc_network_chooser_dialog_set_property;
- object_class->constructed = empathy_irc_network_chooser_dialog_constructed;
- object_class->dispose = empathy_irc_network_chooser_dialog_dispose;
+ object_class->get_property = tpaw_irc_network_chooser_dialog_get_property;
+ object_class->set_property = tpaw_irc_network_chooser_dialog_set_property;
+ object_class->constructed = tpaw_irc_network_chooser_dialog_constructed;
+ object_class->dispose = tpaw_irc_network_chooser_dialog_dispose;
g_object_class_install_property (object_class, PROP_SETTINGS,
g_param_spec_object ("settings",
@@ -689,52 +689,52 @@ empathy_irc_network_chooser_dialog_class_init (EmpathyIrcNetworkChooserDialogCla
g_object_class_install_property (object_class, PROP_NETWORK,
g_param_spec_object ("network",
"Network",
- "The EmpathyIrcNetwork selected in the treeview",
- EMPATHY_TYPE_IRC_NETWORK,
+ "The TpawIrcNetwork selected in the treeview",
+ TPAW_TYPE_IRC_NETWORK,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
g_type_class_add_private (object_class,
- sizeof (EmpathyIrcNetworkChooserDialogPriv));
+ sizeof (TpawIrcNetworkChooserDialogPriv));
}
static void
-empathy_irc_network_chooser_dialog_init (EmpathyIrcNetworkChooserDialog *self)
+tpaw_irc_network_chooser_dialog_init (TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv;
+ TpawIrcNetworkChooserDialogPriv *priv;
priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG, EmpathyIrcNetworkChooserDialogPriv);
+ TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG, TpawIrcNetworkChooserDialogPriv);
self->priv = priv;
- priv->network_manager = empathy_irc_network_manager_dup_default ();
+ priv->network_manager = tpaw_irc_network_manager_dup_default ();
}
GtkWidget *
-empathy_irc_network_chooser_dialog_new (EmpathyAccountSettings *settings,
- EmpathyIrcNetwork *network,
+tpaw_irc_network_chooser_dialog_new (EmpathyAccountSettings *settings,
+ TpawIrcNetwork *network,
GtkWindow *parent)
{
- return g_object_new (EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG,
+ return g_object_new (TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG,
"settings", settings,
"network", network,
"transient-for", parent,
NULL);
}
-EmpathyIrcNetwork *
-empathy_irc_network_chooser_dialog_get_network (
- EmpathyIrcNetworkChooserDialog *self)
+TpawIrcNetwork *
+tpaw_irc_network_chooser_dialog_get_network (
+ TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
return priv->network;
}
gboolean
-empathy_irc_network_chooser_dialog_get_changed (
- EmpathyIrcNetworkChooserDialog *self)
+tpaw_irc_network_chooser_dialog_get_changed (
+ TpawIrcNetworkChooserDialog *self)
{
- EmpathyIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialogPriv *priv = GET_PRIV (self);
return priv->changed;
}
diff --git a/tp-account-widgets/empathy-irc-network-chooser-dialog.h b/tp-account-widgets/empathy-irc-network-chooser-dialog.h
index 1e4654916..b1d5c21c8 100644
--- a/tp-account-widgets/empathy-irc-network-chooser-dialog.h
+++ b/tp-account-widgets/empathy-irc-network-chooser-dialog.h
@@ -19,8 +19,8 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_IRC_NETWORK_CHOOSER_DIALOG_H__
-#define __EMPATHY_IRC_NETWORK_CHOOSER_DIALOG_H__
+#ifndef __TPAW_IRC_NETWORK_CHOOSER_DIALOG_H__
+#define __TPAW_IRC_NETWORK_CHOOSER_DIALOG_H__
#include <gtk/gtk.h>
@@ -29,43 +29,43 @@
G_BEGIN_DECLS
-#define EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG (empathy_irc_network_chooser_dialog_get_type ())
-#define EMPATHY_IRC_NETWORK_CHOOSER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG, EmpathyIrcNetworkChooserDialog))
-#define EMPATHY_IRC_NETWORK_CHOOSER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG, EmpathyIrcNetworkChooserDialogClass))
-#define EMPATHY_IS_IRC_NETWORK_CHOOSER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG))
-#define EMPATHY_IS_IRC_NETWORK_CHOOSER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG))
-#define EMPATHY_IRC_NETWORK_CHOOSER_DIALOG_GET_CLASS(o) ( \
- G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_IRC_NETWORK_CHOOSER_DIALOG, \
- EmpathyIrcNetworkChooserDialogClass))
+#define TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG (tpaw_irc_network_chooser_dialog_get_type ())
+#define TPAW_IRC_NETWORK_CHOOSER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG, TpawIrcNetworkChooserDialog))
+#define TPAW_IRC_NETWORK_CHOOSER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG, TpawIrcNetworkChooserDialogClass))
+#define TPAW_IS_IRC_NETWORK_CHOOSER_DIALOG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG))
+#define TPAW_IS_IRC_NETWORK_CHOOSER_DIALOG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG))
+#define TPAW_IRC_NETWORK_CHOOSER_DIALOG_GET_CLASS(o) ( \
+ G_TYPE_INSTANCE_GET_CLASS ((o), TPAW_TYPE_IRC_NETWORK_CHOOSER_DIALOG, \
+ TpawIrcNetworkChooserDialogClass))
typedef struct {
GtkDialog parent;
/*<private>*/
gpointer priv;
-} EmpathyIrcNetworkChooserDialog;
+} TpawIrcNetworkChooserDialog;
typedef struct {
GtkDialogClass parent_class;
-} EmpathyIrcNetworkChooserDialogClass;
+} TpawIrcNetworkChooserDialogClass;
-GType empathy_irc_network_chooser_dialog_get_type (void) G_GNUC_CONST;
+GType tpaw_irc_network_chooser_dialog_get_type (void) G_GNUC_CONST;
-GtkWidget * empathy_irc_network_chooser_dialog_new (
+GtkWidget * tpaw_irc_network_chooser_dialog_new (
EmpathyAccountSettings *settings,
- EmpathyIrcNetwork *network,
+ TpawIrcNetwork *network,
GtkWindow *parent);
-EmpathyIrcNetwork * empathy_irc_network_chooser_dialog_get_network (
- EmpathyIrcNetworkChooserDialog *self);
+TpawIrcNetwork * tpaw_irc_network_chooser_dialog_get_network (
+ TpawIrcNetworkChooserDialog *self);
-gboolean empathy_irc_network_chooser_dialog_get_changed (
- EmpathyIrcNetworkChooserDialog *self);
+gboolean tpaw_irc_network_chooser_dialog_get_changed (
+ TpawIrcNetworkChooserDialog *self);
G_END_DECLS
-#endif /* __EMPATHY_IRC_NETWORK_CHOOSER_DIALOG_H__ */
+#endif /* __TPAW_IRC_NETWORK_CHOOSER_DIALOG_H__ */
diff --git a/tp-account-widgets/empathy-irc-network-chooser.c b/tp-account-widgets/empathy-irc-network-chooser.c
index fab6a3a3f..e64fdaec7 100644
--- a/tp-account-widgets/empathy-irc-network-chooser.c
+++ b/tp-account-widgets/empathy-irc-network-chooser.c
@@ -34,7 +34,7 @@
#define DEFAULT_IRC_PORT 6667
#define DEFAULT_IRC_SSL FALSE
-#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIrcNetworkChooser)
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, TpawIrcNetworkChooser)
enum {
PROP_SETTINGS = 1
@@ -50,22 +50,22 @@ static guint signals[LAST_SIGNAL] = { 0 };
typedef struct {
EmpathyAccountSettings *settings;
- EmpathyIrcNetworkManager *network_manager;
+ TpawIrcNetworkManager *network_manager;
GtkWidget *dialog;
/* Displayed network */
- EmpathyIrcNetwork *network;
-} EmpathyIrcNetworkChooserPriv;
+ TpawIrcNetwork *network;
+} TpawIrcNetworkChooserPriv;
-G_DEFINE_TYPE (EmpathyIrcNetworkChooser, empathy_irc_network_chooser,
+G_DEFINE_TYPE (TpawIrcNetworkChooser, tpaw_irc_network_chooser,
GTK_TYPE_BUTTON);
static void
-empathy_irc_network_chooser_set_property (GObject *object,
+tpaw_irc_network_chooser_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (object);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (object);
switch (prop_id)
{
@@ -79,12 +79,12 @@ empathy_irc_network_chooser_set_property (GObject *object,
}
static void
-empathy_irc_network_chooser_get_property (GObject *object,
+tpaw_irc_network_chooser_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (object);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (object);
switch (prop_id)
{
@@ -98,9 +98,9 @@ empathy_irc_network_chooser_get_property (GObject *object,
}
static void
-unset_server_params (EmpathyIrcNetworkChooser *self)
+unset_server_params (TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
DEBUG ("Unset server, port and use-ssl");
empathy_account_settings_unset (priv->settings, "server");
@@ -109,14 +109,14 @@ unset_server_params (EmpathyIrcNetworkChooser *self)
}
static gchar *
-dup_network_service (EmpathyIrcNetwork *network)
+dup_network_service (TpawIrcNetwork *network)
{
/* Account.Service has to be a lower case alphanumeric string which may
* also contain '-' but not start with it. */
#define VALID G_CSET_a_2_z G_CSET_DIGITS "-"
gchar *service, *tmp;
- service = g_strdup (empathy_irc_network_get_name (network));
+ service = g_strdup (tpaw_irc_network_get_name (network));
service = g_strstrip (service);
if (tp_str_empty (service))
@@ -143,24 +143,24 @@ dup_network_service (EmpathyIrcNetwork *network)
}
static void
-update_server_params (EmpathyIrcNetworkChooser *self)
+update_server_params (TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
GSList *servers;
const gchar *charset;
g_assert (priv->network != NULL);
- charset = empathy_irc_network_get_charset (priv->network);
+ charset = tpaw_irc_network_get_charset (priv->network);
DEBUG ("Setting charset to %s", charset);
empathy_account_settings_set (priv->settings, "charset",
g_variant_new_string (charset));
- servers = empathy_irc_network_get_servers (priv->network);
+ servers = tpaw_irc_network_get_servers (priv->network);
if (g_slist_length (servers) > 0)
{
/* set the first server as CM server */
- EmpathyIrcServer *server = servers->data;
+ TpawIrcServer *server = servers->data;
gchar *address;
guint port;
gboolean ssl;
@@ -201,20 +201,20 @@ update_server_params (EmpathyIrcNetworkChooser *self)
}
static void
-set_label (EmpathyIrcNetworkChooser *self)
+set_label (TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
g_assert (priv->network != NULL);
gtk_button_set_label (GTK_BUTTON (self),
- empathy_irc_network_get_name (priv->network));
+ tpaw_irc_network_get_name (priv->network));
}
static void
-set_label_from_settings (EmpathyIrcNetworkChooser *self)
+set_label_from_settings (TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
gchar *server;
tp_clear_object (&priv->network);
@@ -223,11 +223,11 @@ set_label_from_settings (EmpathyIrcNetworkChooser *self)
if (server != NULL)
{
- EmpathyIrcServer *srv;
+ TpawIrcServer *srv;
gint port;
gboolean ssl;
- priv->network = empathy_irc_network_manager_find_network_by_address (
+ priv->network = tpaw_irc_network_manager_find_network_by_address (
priv->network_manager, server);
if (priv->network != NULL)
@@ -244,11 +244,11 @@ set_label_from_settings (EmpathyIrcNetworkChooser *self)
"use-ssl");
DEBUG ("Create a network %s", server);
- priv->network = empathy_irc_network_new (server);
- srv = empathy_irc_server_new (server, port, ssl);
+ priv->network = tpaw_irc_network_new (server);
+ srv = tpaw_irc_server_new (server, port, ssl);
- empathy_irc_network_append_server (priv->network, srv);
- empathy_irc_network_manager_add (priv->network_manager, priv->network);
+ tpaw_irc_network_append_server (priv->network, srv);
+ tpaw_irc_network_manager_add (priv->network_manager, priv->network);
set_label (self);
@@ -258,21 +258,21 @@ set_label_from_settings (EmpathyIrcNetworkChooser *self)
}
/* Set default network */
- priv->network = empathy_irc_network_manager_find_network_by_address (
+ priv->network = tpaw_irc_network_manager_find_network_by_address (
priv->network_manager, DEFAULT_IRC_NETWORK);
if (priv->network == NULL)
{
/* Default network is not known, recreate it */
- EmpathyIrcServer *srv;
+ TpawIrcServer *srv;
- priv->network = empathy_irc_network_new (DEFAULT_IRC_NETWORK);
+ priv->network = tpaw_irc_network_new (DEFAULT_IRC_NETWORK);
- srv = empathy_irc_server_new (DEFAULT_IRC_NETWORK, DEFAULT_IRC_PORT,
+ srv = tpaw_irc_server_new (DEFAULT_IRC_NETWORK, DEFAULT_IRC_PORT,
DEFAULT_IRC_SSL);
- empathy_irc_network_append_server (priv->network, srv);
- empathy_irc_network_manager_add (priv->network_manager, priv->network);
+ tpaw_irc_network_append_server (priv->network, srv);
+ tpaw_irc_network_manager_add (priv->network_manager, priv->network);
g_object_unref (srv);
}
@@ -285,22 +285,22 @@ set_label_from_settings (EmpathyIrcNetworkChooser *self)
static void
dialog_response_cb (GtkDialog *dialog,
gint response,
- EmpathyIrcNetworkChooser *self)
+ TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
- EmpathyIrcNetworkChooserDialog *chooser =
- EMPATHY_IRC_NETWORK_CHOOSER_DIALOG (priv->dialog);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserDialog *chooser =
+ TPAW_IRC_NETWORK_CHOOSER_DIALOG (priv->dialog);
if (response != GTK_RESPONSE_CLOSE &&
response != GTK_RESPONSE_DELETE_EVENT)
return;
- if (empathy_irc_network_chooser_dialog_get_changed (chooser))
+ if (tpaw_irc_network_chooser_dialog_get_changed (chooser))
{
tp_clear_object (&priv->network);
priv->network = g_object_ref (
- empathy_irc_network_chooser_dialog_get_network (chooser));
+ tpaw_irc_network_chooser_dialog_get_network (chooser));
update_server_params (self);
set_label (self);
@@ -316,7 +316,7 @@ static void
clicked_cb (GtkButton *button,
gpointer user_data)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (button);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (button);
GtkWindow *window;
if (priv->dialog != NULL)
@@ -324,7 +324,7 @@ clicked_cb (GtkButton *button,
window = empathy_get_toplevel_window (GTK_WIDGET (button));
- priv->dialog = empathy_irc_network_chooser_dialog_new (priv->settings,
+ priv->dialog = tpaw_irc_network_chooser_dialog_new (priv->settings,
priv->network, window);
gtk_widget_show_all (priv->dialog);
@@ -336,10 +336,10 @@ out:
}
static void
-empathy_irc_network_chooser_constructed (GObject *object)
+tpaw_irc_network_chooser_constructed (GObject *object)
{
- EmpathyIrcNetworkChooser *self = (EmpathyIrcNetworkChooser *) object;
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooser *self = (TpawIrcNetworkChooser *) object;
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
g_assert (priv->settings != NULL);
@@ -349,28 +349,28 @@ empathy_irc_network_chooser_constructed (GObject *object)
}
static void
-empathy_irc_network_chooser_dispose (GObject *object)
+tpaw_irc_network_chooser_dispose (GObject *object)
{
- EmpathyIrcNetworkManager *self = (EmpathyIrcNetworkManager *) object;
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManager *self = (TpawIrcNetworkManager *) object;
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
tp_clear_object (&priv->settings);
tp_clear_object (&priv->network_manager);
tp_clear_object (&priv->network);
- if (G_OBJECT_CLASS (empathy_irc_network_chooser_parent_class)->dispose)
- G_OBJECT_CLASS (empathy_irc_network_chooser_parent_class)->dispose (object);
+ if (G_OBJECT_CLASS (tpaw_irc_network_chooser_parent_class)->dispose)
+ G_OBJECT_CLASS (tpaw_irc_network_chooser_parent_class)->dispose (object);
}
static void
-empathy_irc_network_chooser_class_init (EmpathyIrcNetworkChooserClass *klass)
+tpaw_irc_network_chooser_class_init (TpawIrcNetworkChooserClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = empathy_irc_network_chooser_get_property;
- object_class->set_property = empathy_irc_network_chooser_set_property;
- object_class->constructed = empathy_irc_network_chooser_constructed;
- object_class->dispose = empathy_irc_network_chooser_dispose;
+ object_class->get_property = tpaw_irc_network_chooser_get_property;
+ object_class->set_property = tpaw_irc_network_chooser_set_property;
+ object_class->constructed = tpaw_irc_network_chooser_constructed;
+ object_class->dispose = tpaw_irc_network_chooser_dispose;
g_object_class_install_property (object_class, PROP_SETTINGS,
g_param_spec_object ("settings",
@@ -389,33 +389,33 @@ empathy_irc_network_chooser_class_init (EmpathyIrcNetworkChooserClass *klass)
0);
g_type_class_add_private (object_class,
- sizeof (EmpathyIrcNetworkChooserPriv));
+ sizeof (TpawIrcNetworkChooserPriv));
}
static void
-empathy_irc_network_chooser_init (EmpathyIrcNetworkChooser *self)
+tpaw_irc_network_chooser_init (TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv;
+ TpawIrcNetworkChooserPriv *priv;
priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER, EmpathyIrcNetworkChooserPriv);
+ TPAW_TYPE_IRC_NETWORK_CHOOSER, TpawIrcNetworkChooserPriv);
self->priv = priv;
- priv->network_manager = empathy_irc_network_manager_dup_default ();
+ priv->network_manager = tpaw_irc_network_manager_dup_default ();
}
GtkWidget *
-empathy_irc_network_chooser_new (EmpathyAccountSettings *settings)
+tpaw_irc_network_chooser_new (EmpathyAccountSettings *settings)
{
- return g_object_new (EMPATHY_TYPE_IRC_NETWORK_CHOOSER,
+ return g_object_new (TPAW_TYPE_IRC_NETWORK_CHOOSER,
"settings", settings,
NULL);
}
-EmpathyIrcNetwork *
-empathy_irc_network_chooser_get_network (EmpathyIrcNetworkChooser *self)
+TpawIrcNetwork *
+tpaw_irc_network_chooser_get_network (TpawIrcNetworkChooser *self)
{
- EmpathyIrcNetworkChooserPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkChooserPriv *priv = GET_PRIV (self);
return priv->network;
}
diff --git a/tp-account-widgets/empathy-irc-network-chooser.h b/tp-account-widgets/empathy-irc-network-chooser.h
index f4c603288..e2bb1577a 100644
--- a/tp-account-widgets/empathy-irc-network-chooser.h
+++ b/tp-account-widgets/empathy-irc-network-chooser.h
@@ -19,8 +19,8 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_IRC_NETWORK_CHOOSER_H__
-#define __EMPATHY_IRC_NETWORK_CHOOSER_H__
+#ifndef __TPAW_IRC_NETWORK_CHOOSER_H__
+#define __TPAW_IRC_NETWORK_CHOOSER_H__
#include <gtk/gtk.h>
@@ -29,37 +29,37 @@
G_BEGIN_DECLS
-#define EMPATHY_TYPE_IRC_NETWORK_CHOOSER (empathy_irc_network_chooser_get_type ())
-#define EMPATHY_IRC_NETWORK_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER, EmpathyIrcNetworkChooser))
-#define EMPATHY_IRC_NETWORK_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER, EmpathyIrcNetworkChooserClass))
-#define EMPATHY_IS_IRC_NETWORK_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER))
-#define EMPATHY_IS_IRC_NETWORK_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
- EMPATHY_TYPE_IRC_NETWORK_CHOOSER))
-#define EMPATHY_IRC_NETWORK_CHOOSER_GET_CLASS(o) ( \
- G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_IRC_NETWORK_CHOOSER, \
- EmpathyIrcNetworkChooserClass))
+#define TPAW_TYPE_IRC_NETWORK_CHOOSER (tpaw_irc_network_chooser_get_type ())
+#define TPAW_IRC_NETWORK_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER, TpawIrcNetworkChooser))
+#define TPAW_IRC_NETWORK_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER, TpawIrcNetworkChooserClass))
+#define TPAW_IS_IRC_NETWORK_CHOOSER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER))
+#define TPAW_IS_IRC_NETWORK_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \
+ TPAW_TYPE_IRC_NETWORK_CHOOSER))
+#define TPAW_IRC_NETWORK_CHOOSER_GET_CLASS(o) ( \
+ G_TYPE_INSTANCE_GET_CLASS ((o), TPAW_TYPE_IRC_NETWORK_CHOOSER, \
+ TpawIrcNetworkChooserClass))
typedef struct {
GtkButton parent;
/*<private>*/
gpointer priv;
-} EmpathyIrcNetworkChooser;
+} TpawIrcNetworkChooser;
typedef struct {
GtkButtonClass parent_class;
-} EmpathyIrcNetworkChooserClass;
+} TpawIrcNetworkChooserClass;
-GType empathy_irc_network_chooser_get_type (void) G_GNUC_CONST;
+GType tpaw_irc_network_chooser_get_type (void) G_GNUC_CONST;
-GtkWidget * empathy_irc_network_chooser_new (EmpathyAccountSettings *settings);
+GtkWidget * tpaw_irc_network_chooser_new (EmpathyAccountSettings *settings);
-EmpathyIrcNetwork * empathy_irc_network_chooser_get_network (
- EmpathyIrcNetworkChooser *self);
+TpawIrcNetwork * tpaw_irc_network_chooser_get_network (
+ TpawIrcNetworkChooser *self);
G_END_DECLS
-#endif /* __EMPATHY_IRC_NETWORK_CHOOSER_H__ */
+#endif /* __TPAW_IRC_NETWORK_CHOOSER_H__ */
diff --git a/tp-account-widgets/empathy-irc-network-dialog.c b/tp-account-widgets/empathy-irc-network-dialog.c
index 35457f592..868363767 100644
--- a/tp-account-widgets/empathy-irc-network-dialog.c
+++ b/tp-account-widgets/empathy-irc-network-dialog.c
@@ -27,7 +27,7 @@
#include "totem-subtitle-encoding.h"
typedef struct {
- EmpathyIrcNetwork *network;
+ TpawIrcNetwork *network;
GtkWidget *dialog;
GtkWidget *button_close;
@@ -40,20 +40,20 @@ typedef struct {
GtkWidget *button_remove;
GtkWidget *button_up;
GtkWidget *button_down;
-} EmpathyIrcNetworkDialog;
+} TpawIrcNetworkDialog;
static void
irc_network_dialog_destroy_cb (GtkWidget *widget,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
g_object_unref (dialog->network);
- g_slice_free (EmpathyIrcNetworkDialog, dialog);
+ g_slice_free (TpawIrcNetworkDialog, dialog);
}
static void
irc_network_dialog_close_clicked_cb (GtkWidget *widget,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
gtk_widget_destroy (dialog->dialog);
}
@@ -67,7 +67,7 @@ enum {
static void
add_server_to_store (GtkListStore *store,
- EmpathyIrcServer *server,
+ TpawIrcServer *server,
GtkTreeIter *iter)
{
gchar *address;
@@ -91,7 +91,7 @@ add_server_to_store (GtkListStore *store,
}
static void
-irc_network_dialog_setup (EmpathyIrcNetworkDialog *dialog)
+irc_network_dialog_setup (TpawIrcNetworkDialog *dialog)
{
gchar *name, *charset;
GSList *servers, *l;
@@ -106,10 +106,10 @@ irc_network_dialog_setup (EmpathyIrcNetworkDialog *dialog)
store = GTK_LIST_STORE (gtk_tree_view_get_model (
GTK_TREE_VIEW (dialog->treeview_servers)));
- servers = empathy_irc_network_get_servers (dialog->network);
+ servers = tpaw_irc_network_get_servers (dialog->network);
for (l = servers; l != NULL; l = g_slist_next (l))
{
- EmpathyIrcServer *server = l->data;
+ TpawIrcServer *server = l->data;
GtkTreeIter iter;
add_server_to_store (store, server, &iter);
@@ -128,9 +128,9 @@ static void
irc_network_dialog_address_edited_cb (GtkCellRendererText *renderer,
gchar *path,
gchar *new_text,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
GtkTreeModel *model;
GtkTreePath *treepath;
GtkTreeIter iter;
@@ -155,9 +155,9 @@ static void
irc_network_dialog_port_edited_cb (GtkCellRendererText *renderer,
gchar *path,
gchar *new_text,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
GtkTreeModel *model;
GtkTreePath *treepath;
GtkTreeIter iter;
@@ -183,9 +183,9 @@ irc_network_dialog_port_edited_cb (GtkCellRendererText *renderer,
static void
irc_network_dialog_ssl_toggled_cb (GtkCellRendererText *renderer,
gchar *path,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
GtkTreeModel *model;
GtkTreePath *treepath;
GtkTreeIter iter;
@@ -212,7 +212,7 @@ irc_network_dialog_ssl_toggled_cb (GtkCellRendererText *renderer,
static gboolean
irc_network_dialog_network_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
const gchar *str;
@@ -224,7 +224,7 @@ irc_network_dialog_network_focus_cb (GtkWidget *widget,
}
static void
-irc_network_dialog_network_update_buttons (EmpathyIrcNetworkDialog *dialog)
+irc_network_dialog_network_update_buttons (TpawIrcNetworkDialog *dialog)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
@@ -257,9 +257,9 @@ irc_network_dialog_network_update_buttons (EmpathyIrcNetworkDialog *dialog)
static void
irc_network_dialog_button_add_clicked_cb (GtkWidget *widget,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
GtkListStore *store;
GtkTreeIter iter;
GtkTreePath *path;
@@ -268,8 +268,8 @@ irc_network_dialog_button_add_clicked_cb (GtkWidget *widget,
store = GTK_LIST_STORE (gtk_tree_view_get_model (
GTK_TREE_VIEW (dialog->treeview_servers)));
- server = empathy_irc_server_new (_("new server"), 6667, FALSE);
- empathy_irc_network_append_server (dialog->network, server);
+ server = tpaw_irc_server_new (_("new server"), 6667, FALSE);
+ tpaw_irc_network_append_server (dialog->network, server);
add_server_to_store (store, server, &iter);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
@@ -286,12 +286,12 @@ irc_network_dialog_button_add_clicked_cb (GtkWidget *widget,
static void
irc_network_dialog_button_remove_clicked_cb (GtkWidget *widget,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
selection = gtk_tree_view_get_selection (
GTK_TREE_VIEW (dialog->treeview_servers));
@@ -302,7 +302,7 @@ irc_network_dialog_button_remove_clicked_cb (GtkWidget *widget,
gtk_tree_model_get (model, &iter, COL_SRV_OBJ, &server, -1);
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
- empathy_irc_network_remove_server (dialog->network, server);
+ tpaw_irc_network_remove_server (dialog->network, server);
irc_network_dialog_network_update_buttons (dialog);
@@ -311,14 +311,14 @@ irc_network_dialog_button_remove_clicked_cb (GtkWidget *widget,
static void
irc_network_dialog_button_up_clicked_cb (GtkWidget *widget,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter, iter_prev;
GtkTreePath *path;
gint *pos;
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
selection = gtk_tree_view_get_selection (
GTK_TREE_VIEW (dialog->treeview_servers));
@@ -340,7 +340,7 @@ irc_network_dialog_button_up_clicked_cb (GtkWidget *widget,
gtk_list_store_swap (GTK_LIST_STORE (model), &iter_prev, &iter);
pos = gtk_tree_path_get_indices (path);
- empathy_irc_network_set_server_position (dialog->network, server, *pos);
+ tpaw_irc_network_set_server_position (dialog->network, server, *pos);
irc_network_dialog_network_update_buttons (dialog);
@@ -350,13 +350,13 @@ irc_network_dialog_button_up_clicked_cb (GtkWidget *widget,
static void
irc_network_dialog_button_down_clicked_cb (GtkWidget *widget,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter, iter_prev;
GtkTreePath *path;
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
gint *pos;
selection = gtk_tree_view_get_selection (
@@ -379,7 +379,7 @@ irc_network_dialog_button_down_clicked_cb (GtkWidget *widget,
gtk_list_store_swap (GTK_LIST_STORE (model), &iter_prev, &iter);
pos = gtk_tree_path_get_indices (path);
- empathy_irc_network_set_server_position (dialog->network, server, *pos);
+ tpaw_irc_network_set_server_position (dialog->network, server, *pos);
irc_network_dialog_network_update_buttons (dialog);
@@ -388,14 +388,14 @@ irc_network_dialog_button_down_clicked_cb (GtkWidget *widget,
static void
irc_network_dialog_selection_changed_cb (GtkTreeSelection *treeselection,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
irc_network_dialog_network_update_buttons (dialog);
}
static void
irc_network_dialog_combobox_charset_changed_cb (GtkWidget *combobox,
- EmpathyIrcNetworkDialog *dialog)
+ TpawIrcNetworkDialog *dialog)
{
const gchar *charset;
@@ -404,8 +404,8 @@ irc_network_dialog_combobox_charset_changed_cb (GtkWidget *combobox,
}
static void
-change_network (EmpathyIrcNetworkDialog *dialog,
- EmpathyIrcNetwork *network)
+change_network (TpawIrcNetworkDialog *dialog,
+ TpawIrcNetwork *network)
{
GtkListStore *store;
@@ -429,21 +429,21 @@ change_network (EmpathyIrcNetworkDialog *dialog,
}
/**
- * empathy_irc_network_dialog_show:
- * @network: the #EmpathyIrcNetwork to configure
+ * tpaw_irc_network_dialog_show:
+ * @network: the #TpawIrcNetwork to configure
* @parent: the parent of this dialog
*
- * Display a dialog to configure a given #EmpathyIrcNetwork.
+ * Display a dialog to configure a given #TpawIrcNetwork.
* This function is a singleton so if a configuration dialog already
* exists we use this one to edit the network.
*
* Returns: The displayed #GtkDialog
*/
GtkWidget *
-empathy_irc_network_dialog_show (EmpathyIrcNetwork *network,
+tpaw_irc_network_dialog_show (TpawIrcNetwork *network,
GtkWidget *parent)
{
- static EmpathyIrcNetworkDialog *dialog = NULL;
+ static TpawIrcNetworkDialog *dialog = NULL;
GtkBuilder *gui;
GtkListStore *store;
GtkCellRenderer *renderer;
@@ -463,7 +463,7 @@ empathy_irc_network_dialog_show (EmpathyIrcNetwork *network,
return dialog->dialog;
}
- dialog = g_slice_new0 (EmpathyIrcNetworkDialog);
+ dialog = g_slice_new0 (TpawIrcNetworkDialog);
dialog->network = network;
g_object_ref (dialog->network);
diff --git a/tp-account-widgets/empathy-irc-network-dialog.h b/tp-account-widgets/empathy-irc-network-dialog.h
index a49c63da9..a879ea481 100644
--- a/tp-account-widgets/empathy-irc-network-dialog.h
+++ b/tp-account-widgets/empathy-irc-network-dialog.h
@@ -18,8 +18,8 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_IRC_NETWORK_DIALOG_H__
-#define __EMPATHY_IRC_NETWORK_DIALOG_H__
+#ifndef __TPAW_IRC_NETWORK_DIALOG_H__
+#define __TPAW_IRC_NETWORK_DIALOG_H__
#include <gtk/gtk.h>
@@ -27,9 +27,9 @@
G_BEGIN_DECLS
-GtkWidget * empathy_irc_network_dialog_show (EmpathyIrcNetwork *network,
+GtkWidget * tpaw_irc_network_dialog_show (TpawIrcNetwork *network,
GtkWidget *parent);
G_END_DECLS
-#endif /* __EMPATHY_IRC_NETWORK_DIALOG_H__ */
+#endif /* __TPAW_IRC_NETWORK_DIALOG_H__ */
diff --git a/tp-account-widgets/empathy-irc-network-manager.c b/tp-account-widgets/empathy-irc-network-manager.c
index 26530338b..2bf84e2d0 100644
--- a/tp-account-widgets/empathy-irc-network-manager.c
+++ b/tp-account-widgets/empathy-irc-network-manager.c
@@ -32,7 +32,7 @@
#define IRC_NETWORKS_FILENAME "irc-networks.xml"
#define SAVE_TIMER 4
-#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIrcNetworkManager)
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, TpawIrcNetworkManager)
typedef struct {
GHashTable *networks;
@@ -46,7 +46,7 @@ typedef struct {
gboolean loading;
/* source id of the autosave timer */
gint save_timer_id;
-} EmpathyIrcNetworkManagerPriv;
+} TpawIrcNetworkManagerPriv;
/* properties */
enum
@@ -56,25 +56,25 @@ enum
LAST_PROPERTY
};
-G_DEFINE_TYPE (EmpathyIrcNetworkManager, empathy_irc_network_manager,
+G_DEFINE_TYPE (TpawIrcNetworkManager, tpaw_irc_network_manager,
G_TYPE_OBJECT);
static void irc_network_manager_load_servers (
- EmpathyIrcNetworkManager *manager);
+ TpawIrcNetworkManager *manager);
static gboolean irc_network_manager_file_parse (
- EmpathyIrcNetworkManager *manager, const gchar *filename,
+ TpawIrcNetworkManager *manager, const gchar *filename,
gboolean user_defined);
static gboolean irc_network_manager_file_save (
- EmpathyIrcNetworkManager *manager);
+ TpawIrcNetworkManager *manager);
static void
-empathy_irc_network_manager_get_property (GObject *object,
+tpaw_irc_network_manager_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetworkManager *self = EMPATHY_IRC_NETWORK_MANAGER (object);
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManager *self = TPAW_IRC_NETWORK_MANAGER (object);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
switch (property_id)
{
@@ -91,13 +91,13 @@ empathy_irc_network_manager_get_property (GObject *object,
}
static void
-empathy_irc_network_manager_set_property (GObject *object,
+tpaw_irc_network_manager_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetworkManager *self = EMPATHY_IRC_NETWORK_MANAGER (object);
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManager *self = TPAW_IRC_NETWORK_MANAGER (object);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
switch (property_id)
{
@@ -116,28 +116,28 @@ empathy_irc_network_manager_set_property (GObject *object,
}
static GObject *
-empathy_irc_network_manager_constructor (GType type,
+tpaw_irc_network_manager_constructor (GType type,
guint n_props,
GObjectConstructParam *props)
{
GObject *obj;
- EmpathyIrcNetworkManager *self;
+ TpawIrcNetworkManager *self;
/* Parent constructor chain */
- obj = G_OBJECT_CLASS (empathy_irc_network_manager_parent_class)->
+ obj = G_OBJECT_CLASS (tpaw_irc_network_manager_parent_class)->
constructor (type, n_props, props);
- self = EMPATHY_IRC_NETWORK_MANAGER (obj);
+ self = TPAW_IRC_NETWORK_MANAGER (obj);
irc_network_manager_load_servers (self);
return obj;
}
static void
-empathy_irc_network_manager_finalize (GObject *object)
+tpaw_irc_network_manager_finalize (GObject *object)
{
- EmpathyIrcNetworkManager *self = EMPATHY_IRC_NETWORK_MANAGER (object);
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManager *self = TPAW_IRC_NETWORK_MANAGER (object);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
if (priv->save_timer_id > 0)
{
@@ -154,14 +154,14 @@ empathy_irc_network_manager_finalize (GObject *object)
g_hash_table_unref (priv->networks);
- G_OBJECT_CLASS (empathy_irc_network_manager_parent_class)->finalize (object);
+ G_OBJECT_CLASS (tpaw_irc_network_manager_parent_class)->finalize (object);
}
static void
-empathy_irc_network_manager_init (EmpathyIrcNetworkManager *self)
+tpaw_irc_network_manager_init (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- EMPATHY_TYPE_IRC_NETWORK_MANAGER, EmpathyIrcNetworkManagerPriv);
+ TpawIrcNetworkManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ TPAW_TYPE_IRC_NETWORK_MANAGER, TpawIrcNetworkManagerPriv);
self->priv = priv;
@@ -176,18 +176,18 @@ empathy_irc_network_manager_init (EmpathyIrcNetworkManager *self)
}
static void
-empathy_irc_network_manager_class_init (EmpathyIrcNetworkManagerClass *klass)
+tpaw_irc_network_manager_class_init (TpawIrcNetworkManagerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- object_class->constructor = empathy_irc_network_manager_constructor;
- object_class->get_property = empathy_irc_network_manager_get_property;
- object_class->set_property = empathy_irc_network_manager_set_property;
+ object_class->constructor = tpaw_irc_network_manager_constructor;
+ object_class->get_property = tpaw_irc_network_manager_get_property;
+ object_class->set_property = tpaw_irc_network_manager_set_property;
- g_type_class_add_private (object_class, sizeof (EmpathyIrcNetworkManagerPriv));
+ g_type_class_add_private (object_class, sizeof (TpawIrcNetworkManagerPriv));
- object_class->finalize = empathy_irc_network_manager_finalize;
+ object_class->finalize = tpaw_irc_network_manager_finalize;
param_spec = g_param_spec_string (
"global-file",
@@ -217,21 +217,21 @@ empathy_irc_network_manager_class_init (EmpathyIrcNetworkManagerClass *klass)
}
/**
- * empathy_irc_network_manager_new:
+ * tpaw_irc_network_manager_new:
* @global_file: the path of the global networks file, or %NULL
* @user_file: the path of the user networks file, or %NULL
*
- * Creates a new #EmpathyIrcNetworkManager
+ * Creates a new #TpawIrcNetworkManager
*
- * Returns: a new #EmpathyIrcNetworkManager
+ * Returns: a new #TpawIrcNetworkManager
*/
-EmpathyIrcNetworkManager *
-empathy_irc_network_manager_new (const gchar *global_file,
+TpawIrcNetworkManager *
+tpaw_irc_network_manager_new (const gchar *global_file,
const gchar *user_file)
{
- EmpathyIrcNetworkManager *manager;
+ TpawIrcNetworkManager *manager;
- manager = g_object_new (EMPATHY_TYPE_IRC_NETWORK_MANAGER,
+ manager = g_object_new (TPAW_TYPE_IRC_NETWORK_MANAGER,
"global-file", global_file,
"user-file", user_file,
NULL);
@@ -240,9 +240,9 @@ empathy_irc_network_manager_new (const gchar *global_file,
}
static gboolean
-save_timeout (EmpathyIrcNetworkManager *self)
+save_timeout (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
priv->save_timer_id = 0;
irc_network_manager_file_save (self);
@@ -251,9 +251,9 @@ save_timeout (EmpathyIrcNetworkManager *self)
}
static void
-reset_save_timeout (EmpathyIrcNetworkManager *self)
+reset_save_timeout (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
if (priv->save_timer_id > 0)
{
@@ -265,10 +265,10 @@ reset_save_timeout (EmpathyIrcNetworkManager *self)
}
static void
-network_modified (EmpathyIrcNetwork *network,
- EmpathyIrcNetworkManager *self)
+network_modified (TpawIrcNetwork *network,
+ TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
network->user_defined = TRUE;
@@ -280,11 +280,11 @@ network_modified (EmpathyIrcNetwork *network,
}
static void
-add_network (EmpathyIrcNetworkManager *self,
- EmpathyIrcNetwork *network,
+add_network (TpawIrcNetworkManager *self,
+ TpawIrcNetwork *network,
const gchar *id)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
g_hash_table_insert (priv->networks, g_strdup (id), g_object_ref (network));
@@ -292,22 +292,22 @@ add_network (EmpathyIrcNetworkManager *self,
}
/**
- * empathy_irc_network_manager_add:
- * @manager: an #EmpathyIrcNetworkManager
- * @network: the #EmpathyIrcNetwork to add
+ * tpaw_irc_network_manager_add:
+ * @manager: an #TpawIrcNetworkManager
+ * @network: the #TpawIrcNetwork to add
*
- * Add an #EmpathyIrcNetwork to the given #EmpathyIrcNetworkManager.
+ * Add an #TpawIrcNetwork to the given #TpawIrcNetworkManager.
*
*/
void
-empathy_irc_network_manager_add (EmpathyIrcNetworkManager *self,
- EmpathyIrcNetwork *network)
+tpaw_irc_network_manager_add (TpawIrcNetworkManager *self,
+ TpawIrcNetwork *network)
{
- EmpathyIrcNetworkManagerPriv *priv;
+ TpawIrcNetworkManagerPriv *priv;
gchar *id = NULL;
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK_MANAGER (self));
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK (network));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK_MANAGER (self));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK (network));
priv = GET_PRIV (self);
@@ -337,21 +337,21 @@ empathy_irc_network_manager_add (EmpathyIrcNetworkManager *self,
}
/**
- * empathy_irc_network_manager_remove:
- * @manager: an #EmpathyIrcNetworkManager
- * @network: the #EmpathyIrcNetwork to remove
+ * tpaw_irc_network_manager_remove:
+ * @manager: an #TpawIrcNetworkManager
+ * @network: the #TpawIrcNetwork to remove
*
- * Remove an #EmpathyIrcNetwork from the given #EmpathyIrcNetworkManager.
+ * Remove an #TpawIrcNetwork from the given #TpawIrcNetworkManager.
*
*/
void
-empathy_irc_network_manager_remove (EmpathyIrcNetworkManager *self,
- EmpathyIrcNetwork *network)
+tpaw_irc_network_manager_remove (TpawIrcNetworkManager *self,
+ TpawIrcNetwork *network)
{
- EmpathyIrcNetworkManagerPriv *priv;
+ TpawIrcNetworkManagerPriv *priv;
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK_MANAGER (self));
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK (network));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK_MANAGER (self));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK (network));
priv = GET_PRIV (self);
@@ -364,7 +364,7 @@ empathy_irc_network_manager_remove (EmpathyIrcNetworkManager *self,
static void
append_active_networks_to_list (const gchar *id,
- EmpathyIrcNetwork *network,
+ TpawIrcNetwork *network,
GSList **list)
{
if (network->dropped)
@@ -375,7 +375,7 @@ append_active_networks_to_list (const gchar *id,
static void
append_dropped_networks_to_list (const gchar *id,
- EmpathyIrcNetwork *network,
+ TpawIrcNetwork *network,
GSList **list)
{
if (!network->dropped)
@@ -385,13 +385,13 @@ append_dropped_networks_to_list (const gchar *id,
}
static GSList *
-get_network_list (EmpathyIrcNetworkManager *self,
+get_network_list (TpawIrcNetworkManager *self,
gboolean get_active)
{
- EmpathyIrcNetworkManagerPriv *priv;
+ TpawIrcNetworkManagerPriv *priv;
GSList *irc_networks = NULL;
- g_return_val_if_fail (EMPATHY_IS_IRC_NETWORK_MANAGER (self), NULL);
+ g_return_val_if_fail (TPAW_IS_IRC_NETWORK_MANAGER (self), NULL);
priv = GET_PRIV (self);
@@ -410,31 +410,31 @@ get_network_list (EmpathyIrcNetworkManager *self,
}
/**
- * empathy_irc_network_manager_get_networks:
- * @manager: an #EmpathyIrcNetworkManager
+ * tpaw_irc_network_manager_get_networks:
+ * @manager: an #TpawIrcNetworkManager
*
- * Get the list of #EmpathyIrcNetwork associated with the given
+ * Get the list of #TpawIrcNetwork associated with the given
* manager.
*
- * Returns: a new #GSList of refed #EmpathyIrcNetwork
+ * Returns: a new #GSList of refed #TpawIrcNetwork
*/
GSList *
-empathy_irc_network_manager_get_networks (EmpathyIrcNetworkManager *self)
+tpaw_irc_network_manager_get_networks (TpawIrcNetworkManager *self)
{
return get_network_list (self, TRUE);
}
/**
- * empathy_irc_network_manager_get_dropped_networks:
- * @manager: an #EmpathyIrcNetworkManager
+ * tpaw_irc_network_manager_get_dropped_networks:
+ * @manager: an #TpawIrcNetworkManager
*
- * Get the list of dropped #EmpathyIrcNetworks associated with the given
+ * Get the list of dropped #TpawIrcNetworks associated with the given
* manager.
*
- * Returns: a new #GSList of refed dropped #EmpathyIrcNetworks
+ * Returns: a new #GSList of refed dropped #TpawIrcNetworks
*/
GSList *
-empathy_irc_network_manager_get_dropped_networks (EmpathyIrcNetworkManager *self)
+tpaw_irc_network_manager_get_dropped_networks (TpawIrcNetworkManager *self)
{
return get_network_list (self, FALSE);
}
@@ -444,9 +444,9 @@ empathy_irc_network_manager_get_dropped_networks (EmpathyIrcNetworkManager *self
*/
static void
-load_global_file (EmpathyIrcNetworkManager *self)
+load_global_file (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
if (priv->global_file == NULL)
return;
@@ -461,9 +461,9 @@ load_global_file (EmpathyIrcNetworkManager *self)
}
static void
-load_user_file (EmpathyIrcNetworkManager *self)
+load_user_file (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
if (priv->user_file == NULL)
return;
@@ -478,9 +478,9 @@ load_user_file (EmpathyIrcNetworkManager *self)
}
static void
-irc_network_manager_load_servers (EmpathyIrcNetworkManager *self)
+irc_network_manager_load_servers (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
priv->loading = TRUE;
@@ -492,7 +492,7 @@ irc_network_manager_load_servers (EmpathyIrcNetworkManager *self)
}
static void
-irc_network_manager_parse_irc_server (EmpathyIrcNetwork *network,
+irc_network_manager_parse_irc_server (TpawIrcNetwork *network,
xmlNodePtr node)
{
xmlNodePtr server_node;
@@ -513,7 +513,7 @@ irc_network_manager_parse_irc_server (EmpathyIrcNetwork *network,
{
gint port_nb = 0;
gboolean have_ssl = FALSE;
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
if (port != NULL)
port_nb = strtol (port, NULL, 10);
@@ -526,8 +526,8 @@ irc_network_manager_parse_irc_server (EmpathyIrcNetwork *network,
DEBUG ("parsed server %s port %d ssl %d", address, port_nb, have_ssl);
- server = empathy_irc_server_new (address, port_nb, have_ssl);
- empathy_irc_network_append_server (network, server);
+ server = tpaw_irc_server_new (address, port_nb, have_ssl);
+ tpaw_irc_network_append_server (network, server);
}
if (address)
@@ -540,12 +540,12 @@ irc_network_manager_parse_irc_server (EmpathyIrcNetwork *network,
}
static void
-irc_network_manager_parse_irc_network (EmpathyIrcNetworkManager *self,
+irc_network_manager_parse_irc_network (TpawIrcNetworkManager *self,
xmlNodePtr node,
gboolean user_defined)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
xmlNodePtr child;
gchar *str;
gchar *id, *name;
@@ -572,7 +572,7 @@ irc_network_manager_parse_irc_network (EmpathyIrcNetworkManager *self,
return;
name = (gchar *) xmlGetProp (node, (const xmlChar *) "name");
- network = empathy_irc_network_new (name);
+ network = tpaw_irc_network_new (name);
if (xmlHasProp (node, (const xmlChar *) "network_charset"))
{
@@ -610,7 +610,7 @@ irc_network_manager_parse_irc_network (EmpathyIrcNetworkManager *self,
}
static gboolean
-irc_network_manager_file_parse (EmpathyIrcNetworkManager *self,
+irc_network_manager_file_parse (TpawIrcNetworkManager *self,
const gchar *filename,
gboolean user_defined)
{
@@ -655,7 +655,7 @@ irc_network_manager_file_parse (EmpathyIrcNetworkManager *self,
static void
write_network_to_xml (const gchar *id,
- EmpathyIrcNetwork *network,
+ TpawIrcNetwork *network,
xmlNodePtr root)
{
xmlNodePtr network_node, servers_node;
@@ -686,13 +686,13 @@ write_network_to_xml (const gchar *id,
g_free (name);
g_free (charset);
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
servers_node = xmlNewChild (network_node, NULL, (const xmlChar *) "servers",
NULL);
for (l = servers; l != NULL; l = g_slist_next (l))
{
- EmpathyIrcServer *server;
+ TpawIrcServer *server;
xmlNodePtr server_node;
gchar *address, *tmp;
guint port;
@@ -729,9 +729,9 @@ write_network_to_xml (const gchar *id,
}
static gboolean
-irc_network_manager_file_save (EmpathyIrcNetworkManager *self)
+irc_network_manager_file_save (TpawIrcNetworkManager *self)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
xmlDocPtr doc;
xmlNodePtr root;
@@ -764,7 +764,7 @@ irc_network_manager_file_save (EmpathyIrcNetworkManager *self)
static gboolean
find_network_by_address (const gchar *id,
- EmpathyIrcNetwork *network,
+ TpawIrcNetwork *network,
const gchar *address)
{
GSList *servers, *l;
@@ -773,11 +773,11 @@ find_network_by_address (const gchar *id,
if (network->dropped)
return FALSE;
- servers = empathy_irc_network_get_servers (network);
+ servers = tpaw_irc_network_get_servers (network);
for (l = servers; l != NULL && !found; l = g_slist_next (l))
{
- EmpathyIrcServer *server = l->data;
+ TpawIrcServer *server = l->data;
gchar *_address;
g_object_get (server, "address", &_address, NULL);
@@ -793,22 +793,22 @@ find_network_by_address (const gchar *id,
}
/**
- * empathy_irc_network_manager_find_network_by_address:
- * @manager: an #EmpathyIrcNetworkManager
+ * tpaw_irc_network_manager_find_network_by_address:
+ * @manager: an #TpawIrcNetworkManager
* @address: the server address to look for
*
- * Find the #EmpathyIrcNetwork which owns an #EmpathyIrcServer
+ * Find the #TpawIrcNetwork which owns an #TpawIrcServer
* that has the given address.
*
- * Returns: the found #EmpathyIrcNetwork, or %NULL if not found.
+ * Returns: the found #TpawIrcNetwork, or %NULL if not found.
*/
-EmpathyIrcNetwork *
-empathy_irc_network_manager_find_network_by_address (
- EmpathyIrcNetworkManager *self,
+TpawIrcNetwork *
+tpaw_irc_network_manager_find_network_by_address (
+ TpawIrcNetworkManager *self,
const gchar *address)
{
- EmpathyIrcNetworkManagerPriv *priv = GET_PRIV (self);
- EmpathyIrcNetwork *network;
+ TpawIrcNetworkManagerPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *network;
g_return_val_if_fail (address != NULL, NULL);
@@ -818,10 +818,10 @@ empathy_irc_network_manager_find_network_by_address (
return network;
}
-EmpathyIrcNetworkManager *
-empathy_irc_network_manager_dup_default (void)
+TpawIrcNetworkManager *
+tpaw_irc_network_manager_dup_default (void)
{
- static EmpathyIrcNetworkManager *default_mgr = NULL;
+ static TpawIrcNetworkManager *default_mgr = NULL;
gchar *dir, *user_file_with_path, *global_file_with_path;
if (default_mgr != NULL)
@@ -841,7 +841,7 @@ empathy_irc_network_manager_dup_default (void)
IRC_NETWORKS_FILENAME, NULL);
}
- default_mgr = empathy_irc_network_manager_new (
+ default_mgr = tpaw_irc_network_manager_new (
global_file_with_path, user_file_with_path);
g_object_add_weak_pointer (G_OBJECT (default_mgr), (gpointer *) &default_mgr);
diff --git a/tp-account-widgets/empathy-irc-network-manager.h b/tp-account-widgets/empathy-irc-network-manager.h
index 19df2f7e1..a708a3e23 100644
--- a/tp-account-widgets/empathy-irc-network-manager.h
+++ b/tp-account-widgets/empathy-irc-network-manager.h
@@ -18,8 +18,8 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_IRC_NETWORK_MANAGER_H__
-#define __EMPATHY_IRC_NETWORK_MANAGER_H__
+#ifndef __TPAW_IRC_NETWORK_MANAGER_H__
+#define __TPAW_IRC_NETWORK_MANAGER_H__
#include <glib-object.h>
@@ -27,59 +27,59 @@
G_BEGIN_DECLS
-typedef struct _EmpathyIrcNetworkManager EmpathyIrcNetworkManager;
-typedef struct _EmpathyIrcNetworkManagerClass EmpathyIrcNetworkManagerClass;
+typedef struct _TpawIrcNetworkManager TpawIrcNetworkManager;
+typedef struct _TpawIrcNetworkManagerClass TpawIrcNetworkManagerClass;
-struct _EmpathyIrcNetworkManager
+struct _TpawIrcNetworkManager
{
GObject parent;
gpointer priv;
};
-struct _EmpathyIrcNetworkManagerClass
+struct _TpawIrcNetworkManagerClass
{
GObjectClass parent_class;
};
-GType empathy_irc_network_manager_get_type (void);
+GType tpaw_irc_network_manager_get_type (void);
/* TYPE MACROS */
-#define EMPATHY_TYPE_IRC_NETWORK_MANAGER \
- (empathy_irc_network_manager_get_type ())
-#define EMPATHY_IRC_NETWORK_MANAGER(o) \
- (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_IRC_NETWORK_MANAGER, \
- EmpathyIrcNetworkManager))
-#define EMPATHY_IRC_NETWORK_MANAGER_CLASS(k) \
- (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_IRC_NETWORK_MANAGER, \
- EmpathyIrcNetworkManagerClass))
-#define EMPATHY_IS_IRC_NETWORK_MANAGER(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_IRC_NETWORK_MANAGER))
-#define EMPATHY_IS_IRC_NETWORK_MANAGER_CLASS(k) \
- (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_IRC_NETWORK_MANAGER))
-#define EMPATHY_IRC_NETWORK_MANAGER_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_IRC_NETWORK_MANAGER, \
- EmpathyIrcNetworkManagerClass))
-
-EmpathyIrcNetworkManager * empathy_irc_network_manager_new (
+#define TPAW_TYPE_IRC_NETWORK_MANAGER \
+ (tpaw_irc_network_manager_get_type ())
+#define TPAW_IRC_NETWORK_MANAGER(o) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((o), TPAW_TYPE_IRC_NETWORK_MANAGER, \
+ TpawIrcNetworkManager))
+#define TPAW_IRC_NETWORK_MANAGER_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_CAST ((k), TPAW_TYPE_IRC_NETWORK_MANAGER, \
+ TpawIrcNetworkManagerClass))
+#define TPAW_IS_IRC_NETWORK_MANAGER(o) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((o), TPAW_TYPE_IRC_NETWORK_MANAGER))
+#define TPAW_IS_IRC_NETWORK_MANAGER_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_TYPE ((k), TPAW_TYPE_IRC_NETWORK_MANAGER))
+#define TPAW_IRC_NETWORK_MANAGER_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), TPAW_TYPE_IRC_NETWORK_MANAGER, \
+ TpawIrcNetworkManagerClass))
+
+TpawIrcNetworkManager * tpaw_irc_network_manager_new (
const gchar *global_file, const gchar *user_file);
-EmpathyIrcNetworkManager * empathy_irc_network_manager_dup_default (void);
+TpawIrcNetworkManager * tpaw_irc_network_manager_dup_default (void);
-void empathy_irc_network_manager_add (EmpathyIrcNetworkManager *manager,
- EmpathyIrcNetwork *network);
+void tpaw_irc_network_manager_add (TpawIrcNetworkManager *manager,
+ TpawIrcNetwork *network);
-void empathy_irc_network_manager_remove (EmpathyIrcNetworkManager *manager,
- EmpathyIrcNetwork *network);
+void tpaw_irc_network_manager_remove (TpawIrcNetworkManager *manager,
+ TpawIrcNetwork *network);
-GSList * empathy_irc_network_manager_get_networks (
- EmpathyIrcNetworkManager *manager);
+GSList * tpaw_irc_network_manager_get_networks (
+ TpawIrcNetworkManager *manager);
-GSList * empathy_irc_network_manager_get_dropped_networks (
- EmpathyIrcNetworkManager *manager);
+GSList * tpaw_irc_network_manager_get_dropped_networks (
+ TpawIrcNetworkManager *manager);
-EmpathyIrcNetwork * empathy_irc_network_manager_find_network_by_address (
- EmpathyIrcNetworkManager *manager, const gchar *address);
+TpawIrcNetwork * tpaw_irc_network_manager_find_network_by_address (
+ TpawIrcNetworkManager *manager, const gchar *address);
G_END_DECLS
-#endif /* __EMPATHY_IRC_NETWORK_MANAGER_H__ */
+#endif /* __TPAW_IRC_NETWORK_MANAGER_H__ */
diff --git a/tp-account-widgets/empathy-irc-network.c b/tp-account-widgets/empathy-irc-network.c
index e01116e96..cda171b75 100644
--- a/tp-account-widgets/empathy-irc-network.c
+++ b/tp-account-widgets/empathy-irc-network.c
@@ -24,13 +24,13 @@
#include "empathy-utils.h"
-#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIrcNetwork)
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, TpawIrcNetwork)
typedef struct
{
gchar *name;
gchar *charset;
GSList *servers;
-} EmpathyIrcNetworkPriv;
+} TpawIrcNetworkPriv;
/* properties */
enum
@@ -49,23 +49,23 @@ enum
static guint signals[LAST_SIGNAL] = {0};
-G_DEFINE_TYPE (EmpathyIrcNetwork, empathy_irc_network, G_TYPE_OBJECT);
+G_DEFINE_TYPE (TpawIrcNetwork, tpaw_irc_network, G_TYPE_OBJECT);
static void
-server_modified_cb (EmpathyIrcServer *server,
- EmpathyIrcNetwork *self)
+server_modified_cb (TpawIrcServer *server,
+ TpawIrcNetwork *self)
{
g_signal_emit (self, signals[MODIFIED], 0);
}
static void
-empathy_irc_network_get_property (GObject *object,
+tpaw_irc_network_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetwork *self = EMPATHY_IRC_NETWORK (object);
- EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *self = TPAW_IRC_NETWORK (object);
+ TpawIrcNetworkPriv *priv = GET_PRIV (self);
switch (property_id)
{
@@ -82,13 +82,13 @@ empathy_irc_network_get_property (GObject *object,
}
static void
-empathy_irc_network_set_property (GObject *object,
+tpaw_irc_network_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcNetwork *self = EMPATHY_IRC_NETWORK (object);
- EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *self = TPAW_IRC_NETWORK (object);
+ TpawIrcNetworkPriv *priv = GET_PRIV (self);
switch (property_id)
{
@@ -115,10 +115,10 @@ empathy_irc_network_set_property (GObject *object,
}
static void
-empathy_irc_network_dispose (GObject *object)
+tpaw_irc_network_dispose (GObject *object)
{
- EmpathyIrcNetwork *self = EMPATHY_IRC_NETWORK (object);
- EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *self = TPAW_IRC_NETWORK (object);
+ TpawIrcNetworkPriv *priv = GET_PRIV (self);
GSList *l;
for (l = priv->servers; l != NULL; l = g_slist_next (l))
@@ -128,27 +128,27 @@ empathy_irc_network_dispose (GObject *object)
g_object_unref (l->data);
}
- G_OBJECT_CLASS (empathy_irc_network_parent_class)->dispose (object);
+ G_OBJECT_CLASS (tpaw_irc_network_parent_class)->dispose (object);
}
static void
-empathy_irc_network_finalize (GObject *object)
+tpaw_irc_network_finalize (GObject *object)
{
- EmpathyIrcNetwork *self = EMPATHY_IRC_NETWORK (object);
- EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+ TpawIrcNetwork *self = TPAW_IRC_NETWORK (object);
+ TpawIrcNetworkPriv *priv = GET_PRIV (self);
g_slist_free (priv->servers);
g_free (priv->name);
g_free (priv->charset);
- G_OBJECT_CLASS (empathy_irc_network_parent_class)->finalize (object);
+ G_OBJECT_CLASS (tpaw_irc_network_parent_class)->finalize (object);
}
static void
-empathy_irc_network_init (EmpathyIrcNetwork *self)
+tpaw_irc_network_init (TpawIrcNetwork *self)
{
- EmpathyIrcNetworkPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- EMPATHY_TYPE_IRC_NETWORK, EmpathyIrcNetworkPriv);
+ TpawIrcNetworkPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ TPAW_TYPE_IRC_NETWORK, TpawIrcNetworkPriv);
self->priv = priv;
@@ -159,18 +159,18 @@ empathy_irc_network_init (EmpathyIrcNetwork *self)
}
static void
-empathy_irc_network_class_init (EmpathyIrcNetworkClass *klass)
+tpaw_irc_network_class_init (TpawIrcNetworkClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- object_class->get_property = empathy_irc_network_get_property;
- object_class->set_property = empathy_irc_network_set_property;
+ object_class->get_property = tpaw_irc_network_get_property;
+ object_class->set_property = tpaw_irc_network_set_property;
- g_type_class_add_private (object_class, sizeof (EmpathyIrcNetworkPriv));
+ g_type_class_add_private (object_class, sizeof (TpawIrcNetworkPriv));
- object_class->dispose = empathy_irc_network_dispose;
- object_class->finalize = empathy_irc_network_finalize;
+ object_class->dispose = tpaw_irc_network_dispose;
+ object_class->finalize = tpaw_irc_network_finalize;
param_spec = g_param_spec_string (
"name",
@@ -196,7 +196,7 @@ empathy_irc_network_class_init (EmpathyIrcNetworkClass *klass)
g_object_class_install_property (object_class, PROP_CHARSET, param_spec);
/**
- * EmpathyIrcNetwork::modified:
+ * TpawIrcNetwork::modified:
* @network: the object that received the signal
*
* Emitted when either a property or a server of the network is modified or
@@ -214,16 +214,16 @@ empathy_irc_network_class_init (EmpathyIrcNetworkClass *klass)
}
/**
- * empathy_irc_network_activate:
+ * tpaw_irc_network_activate:
* @self: the name of the network
*
- * Activates a #EmpathyIrcNetwork.
+ * Activates a #TpawIrcNetwork.
*
*/
void
-empathy_irc_network_activate (EmpathyIrcNetwork *self)
+tpaw_irc_network_activate (TpawIrcNetwork *self)
{
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK (self));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK (self));
g_return_if_fail (self->dropped);
self->dropped = FALSE;
@@ -232,39 +232,39 @@ empathy_irc_network_activate (EmpathyIrcNetwork *self)
}
/**
- * empathy_irc_network_new:
+ * tpaw_irc_network_new:
* @name: the name of the network
*
- * Creates a new #EmpathyIrcNetwork.
+ * Creates a new #TpawIrcNetwork.
*
- * Returns: a new #EmpathyIrcNetwork
+ * Returns: a new #TpawIrcNetwork
*/
-EmpathyIrcNetwork *
-empathy_irc_network_new (const gchar *name)
+TpawIrcNetwork *
+tpaw_irc_network_new (const gchar *name)
{
- return g_object_new (EMPATHY_TYPE_IRC_NETWORK,
+ return g_object_new (TPAW_TYPE_IRC_NETWORK,
"name", name,
NULL);
}
/**
- * empathy_irc_network_get_servers:
- * @network: an #EmpathyIrcNetwork
+ * tpaw_irc_network_get_servers:
+ * @network: an #TpawIrcNetwork
*
- * Get the list of #EmpathyIrcServer that belongs to this network.
+ * Get the list of #TpawIrcServer that belongs to this network.
* These servers are sorted according their priority.
* So the first one will be the first used when trying to connect to
* the network.
*
- * Returns: a new #GSList of refed #EmpathyIrcServer.
+ * Returns: a new #GSList of refed #TpawIrcServer.
*/
GSList *
-empathy_irc_network_get_servers (EmpathyIrcNetwork *self)
+tpaw_irc_network_get_servers (TpawIrcNetwork *self)
{
- EmpathyIrcNetworkPriv *priv;
+ TpawIrcNetworkPriv *priv;
GSList *servers = NULL, *l;
- g_return_val_if_fail (EMPATHY_IS_IRC_NETWORK (self), NULL);
+ g_return_val_if_fail (TPAW_IS_IRC_NETWORK (self), NULL);
priv = GET_PRIV (self);
for (l = priv->servers; l != NULL; l = g_slist_next (l))
@@ -276,22 +276,22 @@ empathy_irc_network_get_servers (EmpathyIrcNetwork *self)
}
/**
- * empathy_irc_network_append_server:
- * @network: an #EmpathyIrcNetwork
- * @server: the #EmpathyIrcServer to add
+ * tpaw_irc_network_append_server:
+ * @network: an #TpawIrcNetwork
+ * @server: the #TpawIrcServer to add
*
- * Add an #EmpathyIrcServer to the given #EmpathyIrcNetwork. The server
+ * Add an #TpawIrcServer to the given #TpawIrcNetwork. The server
* is added at the last position in network's servers list.
*
*/
void
-empathy_irc_network_append_server (EmpathyIrcNetwork *self,
- EmpathyIrcServer *server)
+tpaw_irc_network_append_server (TpawIrcNetwork *self,
+ TpawIrcServer *server)
{
- EmpathyIrcNetworkPriv *priv;
+ TpawIrcNetworkPriv *priv;
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK (self));
- g_return_if_fail (server != NULL && EMPATHY_IS_IRC_SERVER (server));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK (self));
+ g_return_if_fail (server != NULL && TPAW_IS_IRC_SERVER (server));
priv = GET_PRIV (self);
@@ -305,23 +305,23 @@ empathy_irc_network_append_server (EmpathyIrcNetwork *self,
}
/**
- * empathy_irc_network_remove_server:
- * @network: an #EmpathyIrcNetwork
- * @server: the #EmpathyIrcServer to remove
+ * tpaw_irc_network_remove_server:
+ * @network: an #TpawIrcNetwork
+ * @server: the #TpawIrcServer to remove
*
- * Remove an #EmpathyIrcServer from the servers list of the
- * given #EmpathyIrcNetwork.
+ * Remove an #TpawIrcServer from the servers list of the
+ * given #TpawIrcNetwork.
*
*/
void
-empathy_irc_network_remove_server (EmpathyIrcNetwork *self,
- EmpathyIrcServer *server)
+tpaw_irc_network_remove_server (TpawIrcNetwork *self,
+ TpawIrcServer *server)
{
- EmpathyIrcNetworkPriv *priv;
+ TpawIrcNetworkPriv *priv;
GSList *l;
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK (self));
- g_return_if_fail (server != NULL && EMPATHY_IS_IRC_SERVER (server));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK (self));
+ g_return_if_fail (server != NULL && TPAW_IS_IRC_SERVER (server));
priv = GET_PRIV (self);
@@ -338,27 +338,27 @@ empathy_irc_network_remove_server (EmpathyIrcNetwork *self,
}
/**
- * empathy_irc_network_set_server_position:
- * @network: an #EmpathyIrcNetwork
- * @server: the #EmpathyIrcServer to move
+ * tpaw_irc_network_set_server_position:
+ * @network: an #TpawIrcNetwork
+ * @server: the #TpawIrcServer to move
* @pos: the position to move the server. If this is negative, or is larger than
* the number of servers in the list, the server is moved to the end of the
* list.
*
- * Move an #EmpathyIrcServer in the servers list of the given
- * #EmpathyIrcNetwork.
+ * Move an #TpawIrcServer in the servers list of the given
+ * #TpawIrcNetwork.
*
*/
void
-empathy_irc_network_set_server_position (EmpathyIrcNetwork *self,
- EmpathyIrcServer *server,
+tpaw_irc_network_set_server_position (TpawIrcNetwork *self,
+ TpawIrcServer *server,
gint pos)
{
- EmpathyIrcNetworkPriv *priv;
+ TpawIrcNetworkPriv *priv;
GSList *l;
- g_return_if_fail (EMPATHY_IS_IRC_NETWORK (self));
- g_return_if_fail (server != NULL && EMPATHY_IS_IRC_SERVER (server));
+ g_return_if_fail (TPAW_IS_IRC_NETWORK (self));
+ g_return_if_fail (server != NULL && TPAW_IS_IRC_SERVER (server));
priv = GET_PRIV (self);
@@ -373,17 +373,17 @@ empathy_irc_network_set_server_position (EmpathyIrcNetwork *self,
}
const gchar *
-empathy_irc_network_get_name (EmpathyIrcNetwork *self)
+tpaw_irc_network_get_name (TpawIrcNetwork *self)
{
- EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkPriv *priv = GET_PRIV (self);
return priv->name;
}
const gchar *
-empathy_irc_network_get_charset (EmpathyIrcNetwork *self)
+tpaw_irc_network_get_charset (TpawIrcNetwork *self)
{
- EmpathyIrcNetworkPriv *priv = GET_PRIV (self);
+ TpawIrcNetworkPriv *priv = GET_PRIV (self);
return priv->charset;
}
diff --git a/tp-account-widgets/empathy-irc-network.h b/tp-account-widgets/empathy-irc-network.h
index a298ced9a..e5a6aa3f4 100644
--- a/tp-account-widgets/empathy-irc-network.h
+++ b/tp-account-widgets/empathy-irc-network.h
@@ -18,8 +18,8 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_IRC_NETWORK_H__
-#define __EMPATHY_IRC_NETWORK_H__
+#ifndef __TPAW_IRC_NETWORK_H__
+#define __TPAW_IRC_NETWORK_H__
#include <glib-object.h>
@@ -27,10 +27,10 @@
G_BEGIN_DECLS
-typedef struct _EmpathyIrcNetwork EmpathyIrcNetwork;
-typedef struct _EmpathyIrcNetworkClass EmpathyIrcNetworkClass;
+typedef struct _TpawIrcNetwork TpawIrcNetwork;
+typedef struct _TpawIrcNetworkClass TpawIrcNetworkClass;
-struct _EmpathyIrcNetwork
+struct _TpawIrcNetwork
{
GObject parent;
gpointer priv;
@@ -39,48 +39,48 @@ struct _EmpathyIrcNetwork
gboolean dropped;
};
-struct _EmpathyIrcNetworkClass
+struct _TpawIrcNetworkClass
{
GObjectClass parent_class;
};
-GType empathy_irc_network_get_type (void);
+GType tpaw_irc_network_get_type (void);
/* TYPE MACROS */
-#define EMPATHY_TYPE_IRC_NETWORK (empathy_irc_network_get_type ())
-#define EMPATHY_IRC_NETWORK(o) \
- (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_IRC_NETWORK, \
- EmpathyIrcNetwork))
-#define EMPATHY_IRC_NETWORK_CLASS(k) \
- (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_IRC_NETWORK,\
- EmpathyIrcNetworkClass))
-#define EMPATHY_IS_IRC_NETWORK(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_IRC_NETWORK))
-#define EMPATHY_IS_IRC_NETWORK_CLASS(k) \
- (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_IRC_NETWORK))
-#define EMPATHY_IRC_NETWORK_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_IRC_NETWORK, \
- EmpathyIrcNetworkClass))
+#define TPAW_TYPE_IRC_NETWORK (tpaw_irc_network_get_type ())
+#define TPAW_IRC_NETWORK(o) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((o), TPAW_TYPE_IRC_NETWORK, \
+ TpawIrcNetwork))
+#define TPAW_IRC_NETWORK_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_CAST ((k), TPAW_TYPE_IRC_NETWORK,\
+ TpawIrcNetworkClass))
+#define TPAW_IS_IRC_NETWORK(o) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((o), TPAW_TYPE_IRC_NETWORK))
+#define TPAW_IS_IRC_NETWORK_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_TYPE ((k), TPAW_TYPE_IRC_NETWORK))
+#define TPAW_IRC_NETWORK_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), TPAW_TYPE_IRC_NETWORK, \
+ TpawIrcNetworkClass))
-void empathy_irc_network_activate (EmpathyIrcNetwork *self);
+void tpaw_irc_network_activate (TpawIrcNetwork *self);
-EmpathyIrcNetwork * empathy_irc_network_new (const gchar *name);
+TpawIrcNetwork * tpaw_irc_network_new (const gchar *name);
-GSList * empathy_irc_network_get_servers (EmpathyIrcNetwork *network);
+GSList * tpaw_irc_network_get_servers (TpawIrcNetwork *network);
-void empathy_irc_network_append_server (EmpathyIrcNetwork *network,
- EmpathyIrcServer *server);
+void tpaw_irc_network_append_server (TpawIrcNetwork *network,
+ TpawIrcServer *server);
-void empathy_irc_network_remove_server (EmpathyIrcNetwork *network,
- EmpathyIrcServer *server);
+void tpaw_irc_network_remove_server (TpawIrcNetwork *network,
+ TpawIrcServer *server);
-void empathy_irc_network_set_server_position (EmpathyIrcNetwork *network,
- EmpathyIrcServer *server, gint pos);
+void tpaw_irc_network_set_server_position (TpawIrcNetwork *network,
+ TpawIrcServer *server, gint pos);
-const gchar * empathy_irc_network_get_name (EmpathyIrcNetwork *network);
+const gchar * tpaw_irc_network_get_name (TpawIrcNetwork *network);
-const gchar * empathy_irc_network_get_charset (EmpathyIrcNetwork *network);
+const gchar * tpaw_irc_network_get_charset (TpawIrcNetwork *network);
G_END_DECLS
-#endif /* __EMPATHY_IRC_NETWORK_H__ */
+#endif /* __TPAW_IRC_NETWORK_H__ */
diff --git a/tp-account-widgets/empathy-irc-server.c b/tp-account-widgets/empathy-irc-server.c
index 75eb016dd..4b0857064 100644
--- a/tp-account-widgets/empathy-irc-server.c
+++ b/tp-account-widgets/empathy-irc-server.c
@@ -23,13 +23,13 @@
#include "empathy-utils.h"
-#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIrcServer)
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, TpawIrcServer)
typedef struct
{
gchar *address;
guint port;
gboolean ssl;
-} EmpathyIrcServerPriv;
+} TpawIrcServerPriv;
/* properties */
enum
@@ -49,16 +49,16 @@ enum
static guint signals[LAST_SIGNAL] = {0};
-G_DEFINE_TYPE (EmpathyIrcServer, empathy_irc_server, G_TYPE_OBJECT);
+G_DEFINE_TYPE (TpawIrcServer, tpaw_irc_server, G_TYPE_OBJECT);
static void
-empathy_irc_server_get_property (GObject *object,
+tpaw_irc_server_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcServer *self = EMPATHY_IRC_SERVER (object);
- EmpathyIrcServerPriv *priv = GET_PRIV (self);
+ TpawIrcServer *self = TPAW_IRC_SERVER (object);
+ TpawIrcServerPriv *priv = GET_PRIV (self);
switch (property_id)
{
@@ -78,13 +78,13 @@ empathy_irc_server_get_property (GObject *object,
}
static void
-empathy_irc_server_set_property (GObject *object,
+tpaw_irc_server_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- EmpathyIrcServer *self = EMPATHY_IRC_SERVER (object);
- EmpathyIrcServerPriv *priv = GET_PRIV (self);
+ TpawIrcServer *self = TPAW_IRC_SERVER (object);
+ TpawIrcServerPriv *priv = GET_PRIV (self);
switch (property_id)
{
@@ -117,37 +117,37 @@ empathy_irc_server_set_property (GObject *object,
}
static void
-empathy_irc_server_finalize (GObject *object)
+tpaw_irc_server_finalize (GObject *object)
{
- EmpathyIrcServer *self = EMPATHY_IRC_SERVER (object);
- EmpathyIrcServerPriv *priv = GET_PRIV (self);
+ TpawIrcServer *self = TPAW_IRC_SERVER (object);
+ TpawIrcServerPriv *priv = GET_PRIV (self);
g_free (priv->address);
- G_OBJECT_CLASS (empathy_irc_server_parent_class)->finalize (object);
+ G_OBJECT_CLASS (tpaw_irc_server_parent_class)->finalize (object);
}
static void
-empathy_irc_server_init (EmpathyIrcServer *self)
+tpaw_irc_server_init (TpawIrcServer *self)
{
- EmpathyIrcServerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- EMPATHY_TYPE_IRC_SERVER, EmpathyIrcServerPriv);
+ TpawIrcServerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
+ TPAW_TYPE_IRC_SERVER, TpawIrcServerPriv);
self->priv = priv;
}
static void
-empathy_irc_server_class_init (EmpathyIrcServerClass *klass)
+tpaw_irc_server_class_init (TpawIrcServerClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GParamSpec *param_spec;
- object_class->get_property = empathy_irc_server_get_property;
- object_class->set_property = empathy_irc_server_set_property;
+ object_class->get_property = tpaw_irc_server_get_property;
+ object_class->set_property = tpaw_irc_server_set_property;
- g_type_class_add_private (object_class, sizeof (EmpathyIrcServerPriv));
+ g_type_class_add_private (object_class, sizeof (TpawIrcServerPriv));
- object_class->finalize = empathy_irc_server_finalize;
+ object_class->finalize = tpaw_irc_server_finalize;
param_spec = g_param_spec_string (
"address",
@@ -183,7 +183,7 @@ empathy_irc_server_class_init (EmpathyIrcServerClass *klass)
g_object_class_install_property (object_class, PROP_SSL, param_spec);
/**
- * EmpathyIrcServer::modified:
+ * TpawIrcServer::modified:
* @server: the object that received the signal
*
* Emitted when a property of the server is modified.
@@ -200,21 +200,21 @@ empathy_irc_server_class_init (EmpathyIrcServerClass *klass)
}
/**
- * empathy_irc_server_new:
+ * tpaw_irc_server_new:
* @address: the address
* @port: the port
* @ssl: %TRUE if the server needs a SSL connection
*
- * Creates a new #EmpathyIrcServer
+ * Creates a new #TpawIrcServer
*
- * Returns: a new #EmpathyIrcServer
+ * Returns: a new #TpawIrcServer
*/
-EmpathyIrcServer *
-empathy_irc_server_new (const gchar *address,
+TpawIrcServer *
+tpaw_irc_server_new (const gchar *address,
guint port,
gboolean ssl)
{
- return g_object_new (EMPATHY_TYPE_IRC_SERVER,
+ return g_object_new (TPAW_TYPE_IRC_SERVER,
"address", address,
"port", port,
"ssl", ssl,
diff --git a/tp-account-widgets/empathy-irc-server.h b/tp-account-widgets/empathy-irc-server.h
index d72af64ac..ef9e0c872 100644
--- a/tp-account-widgets/empathy-irc-server.h
+++ b/tp-account-widgets/empathy-irc-server.h
@@ -18,47 +18,47 @@
* Authors: Guillaume Desmottes <gdesmott@gnome.org>
*/
-#ifndef __EMPATHY_IRC_SERVER_H__
-#define __EMPATHY_IRC_SERVER_H__
+#ifndef __TPAW_IRC_SERVER_H__
+#define __TPAW_IRC_SERVER_H__
#include <glib-object.h>
G_BEGIN_DECLS
-typedef struct _EmpathyIrcServer EmpathyIrcServer;
-typedef struct _EmpathyIrcServerClass EmpathyIrcServerClass;
+typedef struct _TpawIrcServer TpawIrcServer;
+typedef struct _TpawIrcServerClass TpawIrcServerClass;
-struct _EmpathyIrcServer
+struct _TpawIrcServer
{
GObject parent;
gpointer priv;
};
-struct _EmpathyIrcServerClass
+struct _TpawIrcServerClass
{
GObjectClass parent_class;
};
-GType empathy_irc_server_get_type (void);
+GType tpaw_irc_server_get_type (void);
/* TYPE MACROS */
-#define EMPATHY_TYPE_IRC_SERVER (empathy_irc_server_get_type ())
-#define EMPATHY_IRC_SERVER(o) \
- (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_IRC_SERVER, EmpathyIrcServer))
-#define EMPATHY_IRC_SERVER_CLASS(k) \
- (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_IRC_SERVER, \
- EmpathyIrcServerClass))
-#define EMPATHY_IS_IRC_SERVER(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_IRC_SERVER))
-#define EMPATHY_IS_IRC_SERVER_CLASS(k) \
- (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_IRC_SERVER))
-#define EMPATHY_IRC_SERVER_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_IRC_SERVER,\
- EmpathyIrcServerClass))
+#define TPAW_TYPE_IRC_SERVER (tpaw_irc_server_get_type ())
+#define TPAW_IRC_SERVER(o) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((o), TPAW_TYPE_IRC_SERVER, TpawIrcServer))
+#define TPAW_IRC_SERVER_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_CAST ((k), TPAW_TYPE_IRC_SERVER, \
+ TpawIrcServerClass))
+#define TPAW_IS_IRC_SERVER(o) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((o), TPAW_TYPE_IRC_SERVER))
+#define TPAW_IS_IRC_SERVER_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_TYPE ((k), TPAW_TYPE_IRC_SERVER))
+#define TPAW_IRC_SERVER_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), TPAW_TYPE_IRC_SERVER,\
+ TpawIrcServerClass))
-EmpathyIrcServer * empathy_irc_server_new (const gchar *address, guint port,
+TpawIrcServer * tpaw_irc_server_new (const gchar *address, guint port,
gboolean ssl);
G_END_DECLS
-#endif /* __EMPATHY_IRC_SERVER_H__ */
+#endif /* __TPAW_IRC_SERVER_H__ */