grim/guifications2

Some magic toward making Guifications 2.x completely Pidginized:
org.guifications.gf2
2007-04-11, John Bailey
14301625343d
Parents b5c2e9cb069a
Children cd9fbf4ea495
Some magic toward making Guifications 2.x completely Pidginized:

cd src
for i in *.c; do cat $i | sed 's/gaim_gtk/pidgin/g' | \
sed 's/gaim_/purple_/g' | sed 's/GaimGtk/Pidgin/g' | \
sed 's/Gaim/Purple/g' | sed 's/GAIM_GTK/PIDGIN/g' | \
sed 's/GAIM/PURPLE/g' > $i.new; rm $i; mv $i.new $i; done
mtn commit
--- a/src/gf_action.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_action.c Wed Apr 11 05:15:38 2007 -0400
@@ -268,12 +268,12 @@
}
static gboolean
-conversation_exists(GaimConversation *conv) {
- GaimConversation *lconv;
+conversation_exists(PurpleConversation *conv) {
+ PurpleConversation *lconv;
GList *l;
- for(l = gaim_get_conversations(); l; l = l->next) {
- lconv = (GaimConversation *)l->data;
+ for(l = purple_get_conversations(); l; l = l->next) {
+ lconv = (PurpleConversation *)l->data;
if(conv == lconv)
return TRUE;
@@ -286,9 +286,9 @@
gf_action_execute_open_conv(GfDisplay *display, GdkEventButton *gdk_event) {
GfEvent *event;
GfEventInfo *info;
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL;
+ PurpleBuddy *buddy = NULL;
+ PurpleConversation *conv = NULL;
const GHashTable *components = NULL;
const gchar *n_type, *target;
@@ -310,12 +310,12 @@
const gchar *target;
target = gf_event_info_get_target(info);
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_ANY, target, account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, target, account);
}
} else if(components) { /* it's a chat invite */
const gchar *extra = gf_event_info_get_extra(info);
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT, extra, account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, extra, account);
if(!conv) {
serv_join_chat(account->gc, (GHashTable *)components);
gf_display_destroy(display);
@@ -323,20 +323,20 @@
return;
}
} else if (buddy) { /* we have a buddy or a target */
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, buddy->name, account);
if(!conv)
- conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, buddy->name);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, buddy->name);
} else { /* the only thing that _should_ be left is warnings.. */
if(target) {
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, target, account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, target, account);
if(!conv)
- conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, target);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, target);
}
}
if(conv) {
- gaim_conversation_present(conv);
+ purple_conversation_present(conv);
gf_display_destroy(display);
}
@@ -346,7 +346,7 @@
gf_action_execute_info(GfDisplay *display, GdkEventButton *gdk_event) {
GfEventInfo *info;
const gchar *target;
- GaimAccount *account;
+ PurpleAccount *account;
g_return_if_fail(display);
@@ -373,8 +373,8 @@
gf_action_execute_log(GfDisplay *display, GdkEventButton *gdk_event) {
GfEvent *event;
GfEventInfo *info;
- GaimAccount *account;
- GaimConversation *conv;
+ PurpleAccount *account;
+ PurpleConversation *conv;
const gchar *n_type, *target;
g_return_if_fail(display);
@@ -389,15 +389,15 @@
n_type = gf_event_get_notification_type(event);
if(conv) {
- GaimConversationType type;
+ PurpleConversationType type;
- type = gaim_conversation_get_type(conv);
- if(type == GAIM_CONV_TYPE_IM || type == GAIM_CONV_TYPE_CHAT) {
- pidgin_log_show(type, (type == GAIM_CONV_TYPE_IM) ? target : conv->name, account);
+ type = purple_conversation_get_type(conv);
+ if(type == PURPLE_CONV_TYPE_IM || type == PURPLE_CONV_TYPE_CHAT) {
+ pidgin_log_show(type, (type == PURPLE_CONV_TYPE_IM) ? target : conv->name, account);
gf_display_destroy(display);
}
} else if(target) {
- pidgin_log_show(GAIM_CONV_TYPE_IM, target, account);
+ pidgin_log_show(PURPLE_CONV_TYPE_IM, target, account);
gf_display_destroy(display);
}
@@ -427,7 +427,7 @@
info = gf_display_get_event_info(display);
g_return_if_fail(info);
- display_time = gaim_prefs_get_int(GF_PREF_BEHAVIOR_DISPLAY_TIME);
+ display_time = purple_prefs_get_int(GF_PREF_BEHAVIOR_DISPLAY_TIME);
timeout_id = g_timeout_add(display_time * 500,
gf_action_context_destroy_cb, display);
@@ -449,8 +449,8 @@
static void
gf_action_context_im_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info;
- GaimAccount *account;
- GaimConversation *conv = NULL;
+ PurpleAccount *account;
+ PurpleConversation *conv = NULL;
PidginWindow *win = NULL;
const gchar *target;
@@ -459,10 +459,10 @@
account = gf_event_info_get_account(info);
target = gf_event_info_get_target(info);
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, target, account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, target, account);
if(!conv) {
- conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, target);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, target);
}
if(conv) {
@@ -483,8 +483,8 @@
static void
gf_action_context_pounce_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info;
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleAccount *account = NULL;
+ PurpleBuddy *buddy = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -502,7 +502,7 @@
static void
gf_action_context_log_buddy_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
+ PurpleAccount *account = NULL;
const gchar *target = NULL;
info = gf_display_get_event_info(display);
@@ -514,14 +514,14 @@
target = gf_event_info_get_target(info);
g_return_if_fail(target);
- pidgin_log_show(GAIM_LOG_IM, target, account);
+ pidgin_log_show(PURPLE_LOG_IM, target, account);
}
static void
gf_action_context_log_chat_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL;
+ PurpleConversation *conv = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -532,13 +532,13 @@
conv = gf_event_info_get_conversation(info);
g_return_if_fail(conv);
- pidgin_log_show(GAIM_LOG_CHAT, conv->name, account);
+ pidgin_log_show(PURPLE_LOG_CHAT, conv->name, account);
}
static void
gf_action_context_alias_buddy_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -552,9 +552,9 @@
static void
gf_action_context_alias_chat_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimChat *chat = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL;
+ PurpleChat *chat = NULL;
+ PurpleConversation *conv = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -565,7 +565,7 @@
conv = gf_event_info_get_conversation(info);
g_return_if_fail(conv);
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name);
g_return_if_fail(chat);
pidgindialogs_alias_chat(chat);
@@ -574,7 +574,7 @@
static void
gf_action_context_add_buddy_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
+ PurpleAccount *account = NULL;
const gchar *target = NULL;
info = gf_display_get_event_info(display);
@@ -586,14 +586,14 @@
target = gf_event_info_get_target(info);
g_return_if_fail(target);
- gaim_blist_request_add_buddy(account, target, NULL, NULL);
+ purple_blist_request_add_buddy(account, target, NULL, NULL);
}
static void
gf_action_context_add_chat_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL;
+ PurpleConversation *conv = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -604,13 +604,13 @@
conv = gf_event_info_get_conversation(info);
g_return_if_fail(conv);
- gaim_blist_request_add_chat(account, NULL, NULL, conv->name);
+ purple_blist_request_add_chat(account, NULL, NULL, conv->name);
}
static void
gf_action_context_remove_buddy_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -624,9 +624,9 @@
static void
gf_action_context_remove_chat_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimChat *chat = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL;
+ PurpleChat *chat = NULL;
+ PurpleConversation *conv = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -637,7 +637,7 @@
conv = gf_event_info_get_conversation(info);
g_return_if_fail(conv);
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name);
g_return_if_fail(chat);
pidgindialogs_remove_chat(chat);
@@ -646,7 +646,7 @@
static void
gf_action_context_join_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
+ PurpleAccount *account = NULL;
const GHashTable *components = NULL;
info = gf_display_get_event_info(display);
@@ -664,9 +664,9 @@
static void
gf_action_context_autojoin_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimChat *chat = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL;
+ PurpleChat *chat = NULL;
+ PurpleConversation *conv = NULL;
info = gf_display_get_event_info(display);
g_return_if_fail(info);
@@ -677,10 +677,10 @@
conv = gf_event_info_get_conversation(info);
g_return_if_fail(conv);
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name);
g_return_if_fail(chat);
- gaim_blist_node_set_bool((GaimBlistNode *)chat, "gtk-autojoin",
+ purple_blist_node_set_bool((PurpleBlistNode *)chat, "gtk-autojoin",
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)));
}
@@ -690,12 +690,12 @@
void
gf_action_execute_context(GfDisplay *display, GdkEventButton *gdk_event) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
- GaimChat *chat = NULL;
- GaimConversation *conv = NULL;
- GaimPlugin *prpl = NULL;
- GaimPluginProtocolInfo *prpl_info = NULL;
+ PurpleAccount *account = NULL;
+ PurpleBuddy *buddy = NULL;
+ PurpleChat *chat = NULL;
+ PurpleConversation *conv = NULL;
+ PurplePlugin *prpl = NULL;
+ PurplePluginProtocolInfo *prpl_info = NULL;
GtkWidget *menu;
const gchar *target = NULL;
gboolean chat_sep_added = FALSE;
@@ -723,12 +723,12 @@
target = gf_event_info_get_target(info);
if(conv)
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name);
/* find the prpl and it's info */
- prpl = gaim_find_prpl(gaim_account_get_protocol_id(account));
+ prpl = purple_find_prpl(purple_account_get_protocol_id(account));
if(prpl)
- prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
/* create the menu */
menu = gtk_menu_new();
@@ -762,7 +762,7 @@
}
if(!buddy && target)
- buddy = gaim_find_buddy(account, target);
+ buddy = purple_find_buddy(account, target);
if(buddy) {
pidgin_new_item_from_stock(menu, _("View IM log"), NULL,
@@ -771,10 +771,10 @@
/* add the protocol menu */
pidgin_append_blist_node_proto_menu(menu, account->gc,
- (GaimBlistNode *)buddy);
+ (PurpleBlistNode *)buddy);
/* and now the extended menu */
- pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode*)buddy);
+ pidgin_append_blist_node_extended_menu(menu, (PurpleBlistNode*)buddy);
/* separate it! */
pidgin_separator(menu);
@@ -804,11 +804,11 @@
}
if(chat) {
- GaimBlistNode *node = (GaimBlistNode *)chat;
+ PurpleBlistNode *node = (PurpleBlistNode *)chat;
gboolean checked;
- checked = (gaim_blist_node_get_bool(node, "gtk-autojoin") ||
- (gaim_blist_node_get_string(node, "gtk-autojoin") != NULL));
+ checked = (purple_blist_node_get_bool(node, "gtk-autojoin") ||
+ (purple_blist_node_get_string(node, "gtk-autojoin") != NULL));
/* add the join item, possibly redundant.. */
pidgin_new_item_from_stock(menu, _("Join"), PIDGIN_STOCK_CHAT,
@@ -826,7 +826,7 @@
* if we don't do this check we end up with two menu items to view the
* same log..
*/
- if(conv && conv->type == GAIM_CONV_TYPE_CHAT) {
+ if(conv && conv->type == PURPLE_CONV_TYPE_CHAT) {
if(!chat_sep_added) {
pidgin_separator(menu);
chat_sep_added = TRUE;
@@ -840,10 +840,10 @@
if(chat) {
/* add the proto menu for the chat */
pidgin_append_blist_node_proto_menu(menu, account->gc,
- (GaimBlistNode *)chat);
+ (PurpleBlistNode *)chat);
/* add the extended menu for the chat */
- pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode *)chat);
+ pidgin_append_blist_node_extended_menu(menu, (PurpleBlistNode *)chat);
/* add the alias and remove buttons */
pidgin_new_item_from_stock(menu, _("Alias Chat"), PIDGIN_STOCK_ALIAS,
@@ -856,7 +856,7 @@
}
/* add the add chat item if it's not on our blist.. */
- if(!chat && conv && conv->type == GAIM_CONV_TYPE_CHAT) {
+ if(!chat && conv && conv->type == PURPLE_CONV_TYPE_CHAT) {
pidgin_new_item_from_stock(menu, _("Add Chat"), GTK_STOCK_ADD,
G_CALLBACK(gf_action_context_add_chat_cb),
display, 0, 0, NULL);
--- a/src/gf_blist.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_blist.c Wed Apr 11 05:15:38 2007 -0400
@@ -46,8 +46,8 @@
* Structs
*****************************************************************************/
typedef struct _GfBlistDialog {
- GaimBlistNode *node;
- GaimRequestField *theme_field;
+ PurpleBlistNode *node;
+ PurpleRequestField *theme_field;
gpointer handle;
} GfBlistDialog;
@@ -71,32 +71,32 @@
* Dialog Callbacks
*****************************************************************************/
static void
-gf_blist_dialog_ok_cb(gpointer data, GaimRequestFields *fields) {
+gf_blist_dialog_ok_cb(gpointer data, PurpleRequestFields *fields) {
GfBlistDialog *diag = (GfBlistDialog *)data;
GList *l;
const gchar *name = NULL;
gint value = 0;
- value = gaim_request_field_choice_get_value(diag->theme_field);
+ value = purple_request_field_choice_get_value(diag->theme_field);
- l = gaim_request_field_choice_get_labels(diag->theme_field);
+ l = purple_request_field_choice_get_labels(diag->theme_field);
name = g_list_nth_data(l, value);
if(diag->node) {
switch(value) {
case GF_BLIST_THEME_UNASSIGNED:
- gaim_blist_node_remove_setting(diag->node, GF_NODE_SETTING);
+ purple_blist_node_remove_setting(diag->node, GF_NODE_SETTING);
break;
case GF_BLIST_THEME_RANDOM:
- gaim_blist_node_set_string(diag->node, GF_NODE_SETTING,
+ purple_blist_node_set_string(diag->node, GF_NODE_SETTING,
"(RANDOM)");
break;
case GF_BLIST_THEME_NONE:
- gaim_blist_node_set_string(diag->node, GF_NODE_SETTING,
+ purple_blist_node_set_string(diag->node, GF_NODE_SETTING,
"(NONE)");
break;
default:
- gaim_blist_node_set_string(diag->node, GF_NODE_SETTING, name);
+ purple_blist_node_set_string(diag->node, GF_NODE_SETTING, name);
}
}
@@ -105,7 +105,7 @@
}
static void
-gf_blist_dialog_cancel_cb(gpointer data, GaimRequestFields *fields) {
+gf_blist_dialog_cancel_cb(gpointer data, PurpleRequestFields *fields) {
GfBlistDialog *diag = (GfBlistDialog *)data;
dialogs = g_list_remove(dialogs, diag);
@@ -116,10 +116,10 @@
* Dialog Stuff
*****************************************************************************/
static void
-gf_blist_dialog_new(GaimBlistNode *node) {
+gf_blist_dialog_new(PurpleBlistNode *node) {
GfBlistDialog *dialog = NULL;
- GaimRequestFields *fields;
- GaimRequestFieldGroup *group;
+ PurpleRequestFields *fields;
+ PurpleRequestFieldGroup *group;
GList *l;
gchar *info;
const gchar *name = NULL, *format = NULL, *current = NULL;
@@ -135,8 +135,8 @@
/* wow this should really be in blist.[ch] someone remind me to
* write a patch at some point.
*/
- if(GAIM_BLIST_NODE_IS_BUDDY(node)) {
- GaimBuddy *buddy = (GaimBuddy *)node;
+ if(PURPLE_BLIST_NODE_IS_BUDDY(node)) {
+ PurpleBuddy *buddy = (PurpleBuddy *)node;
if(buddy->alias)
name = buddy->alias;
@@ -144,8 +144,8 @@
name = buddy->name;
format = N_("Please select a theme for the buddy %s");
- } else if(GAIM_BLIST_NODE_IS_CONTACT(node)) {
- GaimContact *contact = (GaimContact *)node;
+ } else if(PURPLE_BLIST_NODE_IS_CONTACT(node)) {
+ PurpleContact *contact = (PurpleContact *)node;
if(contact->alias)
name = contact->alias;
@@ -157,29 +157,29 @@
}
format = N_("Please select a theme for the contact %s");
- } else if(GAIM_BLIST_NODE_IS_GROUP(node)) {
- GaimGroup *group = (GaimGroup *)node;
+ } else if(PURPLE_BLIST_NODE_IS_GROUP(node)) {
+ PurpleGroup *group = (PurpleGroup *)node;
name = group->name;
format = N_("Please select a theme for the group %s");
}
- current = gaim_blist_node_get_string(node, GF_NODE_SETTING);
+ current = purple_blist_node_get_string(node, GF_NODE_SETTING);
- fields = gaim_request_fields_new();
- group = gaim_request_field_group_new(NULL);
- gaim_request_fields_add_group(fields, group);
+ fields = purple_request_fields_new();
+ group = purple_request_field_group_new(NULL);
+ purple_request_fields_add_group(fields, group);
- dialog->theme_field = gaim_request_field_choice_new("theme",
+ dialog->theme_field = purple_request_field_choice_new("theme",
_("_Theme"), 1);
- gaim_request_field_group_add_field(group, dialog->theme_field);
+ purple_request_field_group_add_field(group, dialog->theme_field);
- gaim_request_field_choice_add(dialog->theme_field, _("Clear setting"));
+ purple_request_field_choice_add(dialog->theme_field, _("Clear setting"));
- gaim_request_field_choice_add(dialog->theme_field, _("Random"));
+ purple_request_field_choice_add(dialog->theme_field, _("Random"));
if(!gf_utils_strcmp("(RANDOM)", current))
history = GF_BLIST_THEME_RANDOM;
- gaim_request_field_choice_add(dialog->theme_field, _("None"));
+ purple_request_field_choice_add(dialog->theme_field, _("None"));
if(!gf_utils_strcmp("(NONE)", current))
history = GF_BLIST_THEME_NONE;
@@ -189,7 +189,7 @@
const gchar *theme_name;
theme_name = gf_theme_info_get_name(info);
- gaim_request_field_choice_add(dialog->theme_field, theme_name);
+ purple_request_field_choice_add(dialog->theme_field, theme_name);
if(!gf_utils_strcmp(theme_name, current))
history = i + GF_BLIST_THEME_SPECIFIC;
@@ -197,13 +197,13 @@
i++;
}
- gaim_request_field_choice_set_default_value(dialog->theme_field, history);
- gaim_request_field_choice_set_value(dialog->theme_field, history);
+ purple_request_field_choice_set_default_value(dialog->theme_field, history);
+ purple_request_field_choice_set_value(dialog->theme_field, history);
info = g_strdup_printf(_(format), name);
dialog->handle =
- gaim_request_fields(NULL, _("Select Guifications theme"),
+ purple_request_fields(NULL, _("Select Guifications theme"),
NULL, info, fields,
_("OK"), G_CALLBACK(gf_blist_dialog_ok_cb),
_("Cancel"), G_CALLBACK(gf_blist_dialog_cancel_cb),
@@ -217,7 +217,7 @@
* Menu Callbacks
*****************************************************************************/
static void
-gf_blist_menu_cb(GaimBlistNode *node, gpointer data) {
+gf_blist_menu_cb(PurpleBlistNode *node, gpointer data) {
/* Fix this up when we actually have a way to know if a request window
* is still visible, ie: remind me to write a patch for that and to
* "show" that window for the next gaim release..
@@ -226,20 +226,20 @@
}
static void
-gf_blist_drawing_menu_cb(GaimBlistNode *node, GList **menu) {
- GaimMenuAction *action;
+gf_blist_drawing_menu_cb(PurpleBlistNode *node, GList **menu) {
+ PurpleMenuAction *action;
/* theres no way to get the name of a chat yet so we don't support
* them yet.
*/
- if(GAIM_BLIST_NODE_IS_CHAT(node))
+ if(PURPLE_BLIST_NODE_IS_CHAT(node))
return;
/* add a separator */
(*menu) = g_list_append(*menu, NULL);
/* add our menu item */
- action = gaim_menu_action_new(_("Guifications Theme"), GAIM_CALLBACK(gf_blist_menu_cb), NULL, NULL);
+ action = purple_menu_action_new(_("Guifications Theme"), PURPLE_CALLBACK(gf_blist_menu_cb), NULL, NULL);
(*menu) = g_list_append(*menu, action);
}
@@ -248,11 +248,11 @@
* Subsystem
*****************************************************************************/
void
-gf_blist_init(GaimPlugin *plugin) {
- gaim_signal_connect(gaim_blist_get_handle(),
+gf_blist_init(PurplePlugin *plugin) {
+ purple_signal_connect(purple_blist_get_handle(),
"blist-node-extended-menu",
plugin,
- GAIM_CALLBACK(gf_blist_drawing_menu_cb),
+ PURPLE_CALLBACK(gf_blist_drawing_menu_cb),
NULL);
}
@@ -266,7 +266,7 @@
diag = (GfBlistDialog *)l->data;
- gaim_request_close(GAIM_REQUEST_FIELDS, diag->handle);
+ purple_request_close(PURPLE_REQUEST_FIELDS, diag->handle);
dialogs = g_list_remove(dialogs, diag);
g_free(diag);
@@ -280,13 +280,13 @@
* calling function.
*/
static GfBlistThemeType
-gf_blist_get_theme_type(GaimBlistNode *node, GfTheme **theme) {
+gf_blist_get_theme_type(PurpleBlistNode *node, GfTheme **theme) {
const gchar *node_theme = NULL;
g_return_val_if_fail(node, GF_BLIST_THEME_NONE);
g_return_val_if_fail(theme, GF_BLIST_THEME_NONE);
- node_theme = gaim_blist_node_get_string(node, GF_NODE_SETTING);
+ node_theme = purple_blist_node_get_string(node, GF_NODE_SETTING);
if(!node_theme)
return GF_BLIST_THEME_UNASSIGNED;
@@ -310,13 +310,13 @@
}
GfNotification *
-gf_blist_get_notification_for_buddy(GaimBuddy *buddy, const gchar *n_type) {
- GaimBlistNode *node = NULL;
+gf_blist_get_notification_for_buddy(PurpleBuddy *buddy, const gchar *n_type) {
+ PurpleBlistNode *node = NULL;
g_return_val_if_fail(buddy, NULL);
g_return_val_if_fail(n_type, NULL);
- node = (GaimBlistNode *)buddy;
+ node = (PurpleBlistNode *)buddy;
g_return_val_if_fail(node, NULL);
/* i don't really like the way this is setup.. but I also don't liek the
--- a/src/gf_display.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_display.c Wed Apr 11 05:15:38 2007 -0400
@@ -145,7 +145,7 @@
if(!pref)
return FALSE;
- action = gf_action_find_with_name(gaim_prefs_get_string(pref));
+ action = gf_action_find_with_name(purple_prefs_get_string(pref));
if(!action)
return FALSE;
@@ -835,7 +835,7 @@
display->partial.width, display->partial.height);
if(!pixbuf) {
- gaim_debug_info("guifications", "failed to created partial pixbuf, "
+ purple_debug_info("guifications", "failed to created partial pixbuf, "
"destroying display %p\n", display);
gf_display_destroy(display);
@@ -941,9 +941,9 @@
GfDisplay *display = NULL;
GfEvent *event1 = NULL, *event2 = NULL;
GfEventPriority priority1, priority2;
- GaimBuddy *buddy1 = NULL, *buddy2 = NULL;
- GaimContact *contact1 = NULL, *contact2 = NULL;
- GaimConversation *conv1 = NULL, *conv2 = NULL;
+ PurpleBuddy *buddy1 = NULL, *buddy2 = NULL;
+ PurpleContact *contact1 = NULL, *contact2 = NULL;
+ PurpleConversation *conv1 = NULL, *conv2 = NULL;
GList *l = NULL, *ll = NULL;
gchar *ck1 = NULL, *ck2 = NULL;
const gchar *target1 = NULL, *target2 = NULL;
@@ -957,7 +957,7 @@
target1 = gf_event_info_get_target(info);
if(buddy1)
- contact1 = gaim_buddy_get_contact(buddy1);
+ contact1 = purple_buddy_get_contact(buddy1);
if(target1)
ck1 = g_utf8_collate_key(target1, -1);
@@ -976,7 +976,7 @@
/* check contacts */
if(buddy2) {
- contact2 = gaim_buddy_get_contact(buddy2);
+ contact2 = purple_buddy_get_contact(buddy2);
if(contact1 && contact1 == contact2) {
ck2 = g_utf8_collate_key(buddy2->name, -1);
@@ -1038,7 +1038,7 @@
* has been removed, so we have space.
*/
if(ret == FALSE) {
- gint throttle = gaim_prefs_get_int(GF_PREF_BEHAVIOR_THROTTLE);
+ gint throttle = purple_prefs_get_int(GF_PREF_BEHAVIOR_THROTTLE);
if(throttle > 0 && g_list_length(displays) + 1 > throttle) {
display = GF_DISPLAY(g_list_nth_data(displays, 0));
@@ -1113,7 +1113,7 @@
if(!notification) {
const gchar *event_name = gf_event_get_name(gf_event_info_get_event(info));
- gaim_debug_info("Guifications",
+ purple_debug_info("Guifications",
"could not find a notification for the event \"%s\"\n",
event_name ? event_name : "");
return;
@@ -1137,7 +1137,7 @@
GfTheme *theme = gf_notification_get_theme(notification);
GfThemeInfo *info = gf_theme_get_theme_info(theme);
- gaim_debug_info("Guifications", "render '%s' failed for theme '%s'\n",
+ purple_debug_info("Guifications", "render '%s' failed for theme '%s'\n",
gf_notification_get_type(notification),
gf_theme_info_get_name(info));
gf_display_destroy(display);
@@ -1174,7 +1174,7 @@
gtk_container_add(GTK_CONTAINER(display->event), display->image);
/* grab the display time */
- display_time = 1000 * gaim_prefs_get_int(GF_PREF_BEHAVIOR_DISPLAY_TIME);
+ display_time = 1000 * purple_prefs_get_int(GF_PREF_BEHAVIOR_DISPLAY_TIME);
/* animation is set, this is a new notification, so we animate it */
if(animate) {
@@ -1236,17 +1236,17 @@
}
static void
-gf_display_position_changed_cb(const gchar *name, GaimPrefType type,
+gf_display_position_changed_cb(const gchar *name, PurplePrefType type,
gconstpointer val, gpointer data)
{
- vertical = gaim_prefs_get_bool(GF_PREF_APPEARANCE_VERTICAL);
- position = gaim_prefs_get_int(GF_PREF_APPEARANCE_POSITION);
+ vertical = purple_prefs_get_bool(GF_PREF_APPEARANCE_VERTICAL);
+ position = purple_prefs_get_int(GF_PREF_APPEARANCE_POSITION);
gf_displays_position();
}
static void
-gf_display_animate_changed_cb(const gchar *name, GaimPrefType type,
+gf_display_animate_changed_cb(const gchar *name, PurplePrefType type,
gconstpointer val, gpointer data)
{
animate = GPOINTER_TO_INT(val);
@@ -1257,7 +1257,7 @@
******************************************************************************/
#if GTK_CHECK_VERSION(2,2,0)
static void
-gf_display_screen_changed_cb(const gchar *name, GaimPrefType type,
+gf_display_screen_changed_cb(const gchar *name, PurplePrefType type,
gconstpointer val, gpointer data)
{
disp_screen = GPOINTER_TO_INT(val);
@@ -1267,7 +1267,7 @@
}
static void
-gf_display_monitor_changed_cb(const gchar *name, GaimPrefType type,
+gf_display_monitor_changed_cb(const gchar *name, PurplePrefType type,
gconstpointer val, gpointer data)
{
disp_monitor = GPOINTER_TO_INT(val);
@@ -1283,38 +1283,38 @@
static guint pos_chg_id = 0, ver_chg_id = 0, ani_chg_id = 0;
void
-gf_display_init(GaimPlugin *plugin) {
+gf_display_init(PurplePlugin *plugin) {
/* since we just use the callbacks to get the changes we need to know
* what these are initially at.
*/
- position = gaim_prefs_get_int(GF_PREF_APPEARANCE_POSITION);
- vertical = gaim_prefs_get_bool(GF_PREF_APPEARANCE_VERTICAL);
- animate = gaim_prefs_get_bool(GF_PREF_APPEARANCE_ANIMATE);
+ position = purple_prefs_get_int(GF_PREF_APPEARANCE_POSITION);
+ vertical = purple_prefs_get_bool(GF_PREF_APPEARANCE_VERTICAL);
+ animate = purple_prefs_get_bool(GF_PREF_APPEARANCE_ANIMATE);
/* Connect our pref callbacks */
- pos_chg_id = gaim_prefs_connect_callback(plugin,
+ pos_chg_id = purple_prefs_connect_callback(plugin,
GF_PREF_APPEARANCE_POSITION,
gf_display_position_changed_cb,
NULL);
- ver_chg_id = gaim_prefs_connect_callback(plugin,
+ ver_chg_id = purple_prefs_connect_callback(plugin,
GF_PREF_APPEARANCE_VERTICAL,
gf_display_position_changed_cb,
NULL);
- ani_chg_id = gaim_prefs_connect_callback(plugin,
+ ani_chg_id = purple_prefs_connect_callback(plugin,
GF_PREF_APPEARANCE_ANIMATE,
gf_display_animate_changed_cb,
NULL);
#if GTK_CHECK_VERSION(2,2,0)
/* setup our multi screen prefs */
- disp_screen = gaim_prefs_get_int(GF_PREF_ADVANCED_SCREEN);
- disp_monitor = gaim_prefs_get_int(GF_PREF_ADVANCED_MONITOR);
+ disp_screen = purple_prefs_get_int(GF_PREF_ADVANCED_SCREEN);
+ disp_monitor = purple_prefs_get_int(GF_PREF_ADVANCED_MONITOR);
- scr_chg_id = gaim_prefs_connect_callback(plugin,
+ scr_chg_id = purple_prefs_connect_callback(plugin,
GF_PREF_ADVANCED_SCREEN,
gf_display_screen_changed_cb,
NULL);
- mon_chg_id = gaim_prefs_connect_callback(plugin,
+ mon_chg_id = purple_prefs_connect_callback(plugin,
GF_PREF_ADVANCED_MONITOR,
gf_display_monitor_changed_cb,
NULL);
@@ -1323,10 +1323,10 @@
void
gf_display_uninit() {
- gaim_prefs_disconnect_callback(pos_chg_id);
- gaim_prefs_disconnect_callback(ver_chg_id);
+ purple_prefs_disconnect_callback(pos_chg_id);
+ purple_prefs_disconnect_callback(ver_chg_id);
#if GTK_CHECK_VERSION(2,2,0)
- gaim_prefs_disconnect_callback(scr_chg_id);
- gaim_prefs_disconnect_callback(mon_chg_id);
+ purple_prefs_disconnect_callback(scr_chg_id);
+ purple_prefs_disconnect_callback(mon_chg_id);
#endif /* GTK_CHECK_VERSION(2,2,0) */
}
--- a/src/gf_event.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_event.c Wed Apr 11 05:15:38 2007 -0400
@@ -59,9 +59,9 @@
static GList *events = NULL;
-void *(*real_notify_email)(GaimConnection *gc, const char *subject, const char *from,
+void *(*real_notify_email)(PurpleConnection *gc, const char *subject, const char *from,
const char *to, const char *url);
-void *(*real_notify_emails)(GaimConnection *gc, size_t count, gboolean detailed,
+void *(*real_notify_emails)(PurpleConnection *gc, size_t count, gboolean detailed,
const char **subject, const char **from,
const char **to, const char **url);
@@ -95,7 +95,7 @@
if(!g_list_find(events, event))
events = g_list_append(events, event);
else {
- gaim_debug_info("Guifications", "Event already exists\n");
+ purple_debug_info("Guifications", "Event already exists\n");
gf_event_destroy(event);
}
@@ -207,7 +207,7 @@
l = g_list_append(l, event->n_type);
}
- gaim_prefs_set_string_list(GF_PREF_BEHAVIOR_NOTIFICATIONS, l);
+ purple_prefs_set_string_list(GF_PREF_BEHAVIOR_NOTIFICATIONS, l);
g_list_free(l);
}
@@ -237,17 +237,17 @@
static gboolean
gf_event_connection_throttle_cb(gpointer data) {
- GaimAccount *account = (GaimAccount *)data;
+ PurpleAccount *account = (PurpleAccount *)data;
if(!account)
return FALSE;
- if(!gaim_account_get_connection(account)) {
+ if(!purple_account_get_connection(account)) {
accounts = g_list_remove(accounts, account);
return FALSE;
}
- if(!gaim_account_is_connected(account))
+ if(!purple_account_is_connected(account))
return TRUE;
accounts = g_list_remove(accounts, account);
@@ -255,13 +255,13 @@
}
static void
-gf_event_connection_throttle(GaimConnection *gc, gpointer data) {
- GaimAccount *account;
+gf_event_connection_throttle(PurpleConnection *gc, gpointer data) {
+ PurpleAccount *account;
if(!gc)
return;
- account = gaim_connection_get_account(gc);
+ account = purple_connection_get_account(gc);
if(!account)
return;
@@ -276,7 +276,7 @@
static gboolean
gf_event_conversation_throttle_cb(gpointer data) {
- GaimConversation *conv = (GaimConversation *)data;
+ PurpleConversation *conv = (PurpleConversation *)data;
if(conv)
chats = g_list_remove(chats, conv);
@@ -285,11 +285,11 @@
}
static void
-gf_event_conversation_throttle(GaimConversation *conv, gpointer data) {
+gf_event_conversation_throttle(PurpleConversation *conv, gpointer data) {
if(!conv)
return;
- if(gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT)
+ if(purple_conversation_get_type(conv) != PURPLE_CONV_TYPE_CHAT)
return;
chats = g_list_append(chats, conv);
@@ -301,11 +301,11 @@
******************************************************************************/
/* first pass to see if a notification should be shown.. */
static gboolean
-gf_event_should_show(const gchar *notification, GaimAccount *account) {
+gf_event_should_show(const gchar *notification, PurpleAccount *account) {
if(gf_display_screen_saver_is_running())
return FALSE;
- if(!gaim_account_is_connected(account))
+ if(!purple_account_is_connected(account))
return FALSE;
if(g_list_find(accounts, account))
@@ -314,8 +314,8 @@
if(!gf_event_show_notification(notification))
return FALSE;
- if(!gaim_prefs_get_bool(GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY))
- if(!gaim_presence_is_available(account->presence))
+ if(!purple_prefs_get_bool(GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY))
+ if(!purple_presence_is_available(account->presence))
return FALSE;
return TRUE;
@@ -323,21 +323,21 @@
/* second pass to see if a conversation notification should be shown */
static gboolean
-gf_event_conversation_show(GaimConversation *conv, const gchar *sender) {
+gf_event_conversation_show(PurpleConversation *conv, const gchar *sender) {
if(!conv)
return FALSE;
- if(gaim_conversation_has_focus(conv))
+ if(purple_conversation_has_focus(conv))
return FALSE;
- if(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) {
+ if(purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
if(g_list_find(chats, conv))
return FALSE;
if(sender) {
const gchar *nick;
- nick = gaim_conv_chat_get_nick(GAIM_CONV_CHAT(conv));
+ nick = purple_conv_chat_get_nick(PURPLE_CONV_CHAT(conv));
if(!strcmp(nick, sender))
return FALSE;
}
@@ -347,9 +347,9 @@
}
static void
-gf_event_common(const gchar *n_type, GaimAccount *account, GaimBuddy *buddy,
- GaimConversation *conv, const gchar *target,
- const gchar *message, GaimConvChatBuddyFlags flags,
+gf_event_common(const gchar *n_type, PurpleAccount *account, PurpleBuddy *buddy,
+ PurpleConversation *conv, const gchar *target,
+ const gchar *message, PurpleConvChatBuddyFlags flags,
const GHashTable *components, const gchar *extra)
{
GfNotification *notification = NULL;
@@ -406,37 +406,37 @@
* Buddy callbacks
******************************************************************************/
static void
-gf_event_buddy(GaimBuddy *buddy, gpointer data) {
+gf_event_buddy(PurpleBuddy *buddy, gpointer data) {
const gchar *notification = (const gchar *)data;
if(!gf_event_should_show(notification, buddy->account))
return;
gf_event_common(notification, buddy->account, buddy, NULL, buddy->name,
- NULL, GAIM_CBFLAGS_NONE, NULL, NULL);
+ NULL, PURPLE_CBFLAGS_NONE, NULL, NULL);
}
static void
-gf_event_buddy_status(GaimBuddy *buddy, GaimStatus *oldstatus,
- GaimStatus *newstatus, gpointer data)
+gf_event_buddy_status(PurpleBuddy *buddy, PurpleStatus *oldstatus,
+ PurpleStatus *newstatus, gpointer data)
{
const gchar *notification;
- if (gaim_status_is_available(oldstatus) &&
- !gaim_status_is_available(newstatus)) {
+ if (purple_status_is_available(oldstatus) &&
+ !purple_status_is_available(newstatus)) {
notification = "away";
- } else if (!gaim_status_is_available(oldstatus) &&
- gaim_status_is_available(newstatus)) {
+ } else if (!purple_status_is_available(oldstatus) &&
+ purple_status_is_available(newstatus)) {
notification = "back";
} else
return;
gf_event_common(notification, buddy->account, buddy, NULL, buddy->name,
- NULL, GAIM_CBFLAGS_NONE, NULL, NULL);
+ NULL, PURPLE_CBFLAGS_NONE, NULL, NULL);
}
static void
-gf_event_buddy_idle(GaimBuddy *buddy, gboolean oldidle, gboolean newidle,
+gf_event_buddy_idle(PurpleBuddy *buddy, gboolean oldidle, gboolean newidle,
gpointer data)
{
const gchar *notification;
@@ -444,154 +444,154 @@
notification = (newidle) ? "idle" : "unidle";
gf_event_common(notification, buddy->account, buddy, NULL, buddy->name,
- NULL, GAIM_CBFLAGS_NONE, NULL, NULL);
+ NULL, PURPLE_CBFLAGS_NONE, NULL, NULL);
}
/*******************************************************************************
* Conversation callbacks
******************************************************************************/
static void
-gf_event_im_message(GaimAccount *account, const gchar *sender,
- const gchar *message, GaimConversation *conv, gint flags,
+gf_event_im_message(PurpleAccount *account, const gchar *sender,
+ const gchar *message, PurpleConversation *conv, gint flags,
gpointer data)
{
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
gchar *plain_message = NULL;
- buddy = gaim_find_buddy(account, sender);
- plain_message = gaim_markup_strip_html(message);
+ buddy = purple_find_buddy(account, sender);
+ plain_message = purple_markup_strip_html(message);
gf_event_common(notification, account, buddy, conv, sender, plain_message,
- GAIM_CBFLAGS_NONE, NULL, NULL);
+ PURPLE_CBFLAGS_NONE, NULL, NULL);
g_free(plain_message);
}
static void
-gf_event_chat_message(GaimAccount *account, const gchar *sender,
- const gchar *message, GaimConversation *conv, gint flags,
+gf_event_chat_message(PurpleAccount *account, const gchar *sender,
+ const gchar *message, PurpleConversation *conv, gint flags,
gpointer data)
{
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
gchar *plain_message = NULL;
- plain_message = gaim_markup_strip_html(message);
- buddy = gaim_find_buddy(account, sender);
+ plain_message = purple_markup_strip_html(message);
+ buddy = purple_find_buddy(account, sender);
gf_event_common(notification, account, buddy, conv, sender, plain_message,
- GAIM_CBFLAGS_NONE, NULL, NULL);
+ PURPLE_CBFLAGS_NONE, NULL, NULL);
g_free(plain_message);
}
static void
-gf_event_chat_nick(GaimAccount *account, const gchar *sender,
- const gchar *message, GaimConversation *conv, GaimMessageFlags flags,
+gf_event_chat_nick(PurpleAccount *account, const gchar *sender,
+ const gchar *message, PurpleConversation *conv, PurpleMessageFlags flags,
gpointer data)
{
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
gchar *plain_message = NULL;
const gchar *nick = NULL;
- nick = gaim_conv_chat_get_nick(GAIM_CONV_CHAT(conv));
+ nick = purple_conv_chat_get_nick(PURPLE_CONV_CHAT(conv));
if (nick && !strcmp(sender, nick))
return;
if(!g_strstr_len(message, strlen(message), nick))
return;
- plain_message = gaim_markup_strip_html(message);
- buddy = gaim_find_buddy(account, sender);
+ plain_message = purple_markup_strip_html(message);
+ buddy = purple_find_buddy(account, sender);
gf_event_common(notification, account, buddy, conv, sender, plain_message,
- GAIM_CBFLAGS_NONE, NULL, NULL);
+ PURPLE_CBFLAGS_NONE, NULL, NULL);
g_free(plain_message);
}
static void
-gf_event_typing(GaimAccount *account, const char *name, gpointer data) {
- GaimBuddy *buddy = NULL;
+gf_event_typing(PurpleAccount *account, const char *name, gpointer data) {
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
- GaimConversation *conv;
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account);
+ PurpleConversation *conv;
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, account);
- buddy = gaim_find_buddy(account, name);
+ buddy = purple_find_buddy(account, name);
gf_event_common(notification, account, buddy, conv, name, NULL,
- GAIM_CBFLAGS_NONE, NULL, NULL);
+ PURPLE_CBFLAGS_NONE, NULL, NULL);
}
static void
-gf_event_chat_join(GaimConversation *conv, const gchar *name,
- GaimConvChatBuddyFlags flags, gboolean *new_arrival,
+gf_event_chat_join(PurpleConversation *conv, const gchar *name,
+ PurpleConvChatBuddyFlags flags, gboolean *new_arrival,
gpointer data) {
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleAccount *account = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
- account = gaim_conversation_get_account(conv);
- buddy = gaim_find_buddy(account, name);
+ account = purple_conversation_get_account(conv);
+ buddy = purple_find_buddy(account, name);
gf_event_common(notification, account, buddy, conv, name, NULL, flags,
NULL, NULL);
}
static void
-gf_event_chat_part(GaimConversation *conv, const gchar *name,
+gf_event_chat_part(PurpleConversation *conv, const gchar *name,
const gchar *reason, gpointer data)
{
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleAccount *account = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
gchar *plain_message = NULL;
- account = gaim_conversation_get_account(conv);
- plain_message = (reason) ? gaim_markup_strip_html(reason) : g_strdup("");
- buddy = gaim_find_buddy(account, name);
+ account = purple_conversation_get_account(conv);
+ plain_message = (reason) ? purple_markup_strip_html(reason) : g_strdup("");
+ buddy = purple_find_buddy(account, name);
gf_event_common(notification, account, buddy, conv, name, plain_message,
- GAIM_CBFLAGS_NONE, NULL, NULL);
+ PURPLE_CBFLAGS_NONE, NULL, NULL);
g_free(plain_message);
}
static gint
-gf_event_chat_invite(GaimAccount *account, const gchar *inviter,
+gf_event_chat_invite(PurpleAccount *account, const gchar *inviter,
const gchar *chat, const gchar *invite_message,
const GHashTable *components, gpointer data)
{
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
gchar *plain_message = NULL;
- plain_message = (invite_message) ? gaim_markup_strip_html(invite_message) :
+ plain_message = (invite_message) ? purple_markup_strip_html(invite_message) :
g_strdup("");
- buddy = gaim_find_buddy(account, inviter);
+ buddy = purple_find_buddy(account, inviter);
gf_event_common(notification, account, buddy, NULL, inviter, plain_message,
- GAIM_CBFLAGS_NONE, components, chat);
+ PURPLE_CBFLAGS_NONE, components, chat);
g_free(plain_message);
return 0;
}
static void
-gf_event_topic_changed(GaimConversation *conv, const gchar *who,
+gf_event_topic_changed(PurpleConversation *conv, const gchar *who,
const gchar *topic, gpointer data)
{
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleAccount *account = NULL;
+ PurpleBuddy *buddy = NULL;
const gchar *notification = (const gchar *)data;
gchar *plain_message = NULL;
- account = gaim_conversation_get_account(conv);
- plain_message = (topic) ? gaim_markup_strip_html(topic) : g_strdup("");
+ account = purple_conversation_get_account(conv);
+ plain_message = (topic) ? purple_markup_strip_html(topic) : g_strdup("");
if(who)
- buddy = gaim_find_buddy(account, who);
+ buddy = purple_find_buddy(account, who);
gf_event_common(notification, account, buddy, conv, who, plain_message,
- GAIM_CBFLAGS_NONE, NULL, NULL);
+ PURPLE_CBFLAGS_NONE, NULL, NULL);
g_free(plain_message);
}
@@ -600,17 +600,17 @@
* Mail Stuff
******************************************************************************/
static void *
-gf_event_email(GaimConnection *gc, const char *subject, const char *from,
+gf_event_email(PurpleConnection *gc, const char *subject, const char *from,
const char *to, const char *url)
{
gf_event_common("new-email", gc->account,
- gaim_find_buddy(gc->account, from),
- NULL, from, NULL, GAIM_CBFLAGS_NONE, NULL, subject);
+ purple_find_buddy(gc->account, from),
+ NULL, from, NULL, PURPLE_CBFLAGS_NONE, NULL, subject);
return real_notify_email(gc, subject, from, to, url);
}
static void *
-gf_event_emails(GaimConnection *gc, size_t count, gboolean detailed,
+gf_event_emails(PurpleConnection *gc, size_t count, gboolean detailed,
const char **subject, const char **from,
const char **to, const char **url)
{
@@ -624,7 +624,7 @@
gf_event_email_init() {
g_return_if_fail(!real_notify_email);
- GaimNotifyUiOps *notify_ops_orig = gaim_notify_get_ui_ops();
+ PurpleNotifyUiOps *notify_ops_orig = purple_notify_get_ui_ops();
real_notify_email = notify_ops_orig->notify_email;
notify_ops_orig->notify_email = gf_event_email;
@@ -635,7 +635,7 @@
static void gf_event_email_uninit() {
g_return_if_fail(real_notify_email);
- GaimNotifyUiOps *notify_ops_orig = gaim_notify_get_ui_ops();
+ PurpleNotifyUiOps *notify_ops_orig = purple_notify_get_ui_ops();
notify_ops_orig->notify_email = real_notify_email;
notify_ops_orig->notify_emails = real_notify_emails;
@@ -645,18 +645,18 @@
* File transfer stuff
******************************************************************************/
static void
-gf_event_file_recv_cancel(GaimXfer *xfer, gpointer data)
+gf_event_file_recv_cancel(PurpleXfer *xfer, gpointer data)
{
const gchar *notification = data;
gf_event_common(notification, xfer->account, NULL, NULL, xfer->who,
- NULL, GAIM_CBFLAGS_NONE, NULL, xfer->local_filename);
+ NULL, PURPLE_CBFLAGS_NONE, NULL, xfer->local_filename);
}
/*******************************************************************************
* Subsystem
******************************************************************************/
void
-gf_events_init(GaimPlugin *plugin) {
+gf_events_init(PurplePlugin *plugin) {
GList *l, *ll = NULL;
void *blist_handle, *accounts_handle, *conv_handle;
@@ -740,13 +740,13 @@
ll = g_list_append(ll, event->n_type);
}
- gaim_prefs_add_string_list(GF_PREF_BEHAVIOR_NOTIFICATIONS, ll);
+ purple_prefs_add_string_list(GF_PREF_BEHAVIOR_NOTIFICATIONS, ll);
g_list_free(ll);
/* now that the pref is created, set the events that are supposed to be displayed
* to allow displaying
*/
- l = gaim_prefs_get_string_list(GF_PREF_BEHAVIOR_NOTIFICATIONS);
+ l = purple_prefs_get_string_list(GF_PREF_BEHAVIOR_NOTIFICATIONS);
for(ll = l; ll; ll = ll->next) {
gchar *event_name = (gchar *)ll->data;
@@ -761,58 +761,58 @@
g_list_free(l);
/* connect all of our signals */
- blist_handle = gaim_blist_get_handle();
- accounts_handle = gaim_accounts_get_handle();
- conv_handle = gaim_conversations_get_handle();
+ blist_handle = purple_blist_get_handle();
+ accounts_handle = purple_accounts_get_handle();
+ conv_handle = purple_conversations_get_handle();
/* blist signals */
- gaim_signal_connect(blist_handle, "buddy-signed-on", plugin,
- GAIM_CALLBACK(gf_event_buddy), "sign-on");
- gaim_signal_connect(blist_handle, "buddy-signed-off", plugin,
- GAIM_CALLBACK(gf_event_buddy), "sign-off");
- gaim_signal_connect(blist_handle, "buddy-status-changed", plugin,
- GAIM_CALLBACK(gf_event_buddy_status), NULL);
- gaim_signal_connect(blist_handle, "buddy-idle-changed", plugin,
- GAIM_CALLBACK(gf_event_buddy_idle), NULL);
+ purple_signal_connect(blist_handle, "buddy-signed-on", plugin,
+ PURPLE_CALLBACK(gf_event_buddy), "sign-on");
+ purple_signal_connect(blist_handle, "buddy-signed-off", plugin,
+ PURPLE_CALLBACK(gf_event_buddy), "sign-off");
+ purple_signal_connect(blist_handle, "buddy-status-changed", plugin,
+ PURPLE_CALLBACK(gf_event_buddy_status), NULL);
+ purple_signal_connect(blist_handle, "buddy-idle-changed", plugin,
+ PURPLE_CALLBACK(gf_event_buddy_idle), NULL);
/* conversation signals */
- gaim_signal_connect(conv_handle, "received-im-msg", plugin,
- GAIM_CALLBACK(gf_event_im_message), "im-message");
- gaim_signal_connect(conv_handle, "received-chat-msg", plugin,
- GAIM_CALLBACK(gf_event_chat_message), "chat-message");
- gaim_signal_connect(conv_handle, "received-chat-msg", plugin,
- GAIM_CALLBACK(gf_event_chat_nick), "nick-highlight");
- gaim_signal_connect(conv_handle, "chat-buddy-joined", plugin,
- GAIM_CALLBACK(gf_event_chat_join), "chat-join");
- gaim_signal_connect(conv_handle, "chat-buddy-left", plugin,
- GAIM_CALLBACK(gf_event_chat_part), "chat-part");
- gaim_signal_connect(conv_handle, "chat-invited", plugin,
- GAIM_CALLBACK(gf_event_chat_invite), "chat-invite");
- gaim_signal_connect(conv_handle, "buddy-typing", plugin,
- GAIM_CALLBACK(gf_event_typing), "typing");
- gaim_signal_connect(conv_handle, "buddy-typing-stopped", plugin,
- GAIM_CALLBACK(gf_event_typing), "typed");
- gaim_signal_connect(conv_handle, "chat-topic-changed", plugin,
- GAIM_CALLBACK(gf_event_topic_changed), "topic-changed");
+ purple_signal_connect(conv_handle, "received-im-msg", plugin,
+ PURPLE_CALLBACK(gf_event_im_message), "im-message");
+ purple_signal_connect(conv_handle, "received-chat-msg", plugin,
+ PURPLE_CALLBACK(gf_event_chat_message), "chat-message");
+ purple_signal_connect(conv_handle, "received-chat-msg", plugin,
+ PURPLE_CALLBACK(gf_event_chat_nick), "nick-highlight");
+ purple_signal_connect(conv_handle, "chat-buddy-joined", plugin,
+ PURPLE_CALLBACK(gf_event_chat_join), "chat-join");
+ purple_signal_connect(conv_handle, "chat-buddy-left", plugin,
+ PURPLE_CALLBACK(gf_event_chat_part), "chat-part");
+ purple_signal_connect(conv_handle, "chat-invited", plugin,
+ PURPLE_CALLBACK(gf_event_chat_invite), "chat-invite");
+ purple_signal_connect(conv_handle, "buddy-typing", plugin,
+ PURPLE_CALLBACK(gf_event_typing), "typing");
+ purple_signal_connect(conv_handle, "buddy-typing-stopped", plugin,
+ PURPLE_CALLBACK(gf_event_typing), "typed");
+ purple_signal_connect(conv_handle, "chat-topic-changed", plugin,
+ PURPLE_CALLBACK(gf_event_topic_changed), "topic-changed");
/* both of these are used just to not display the flood of guifications we'd get if
* we weren't throttling them. Makes it look much prettier im my opinion :)
*/
- gaim_signal_connect(gaim_connections_get_handle(), "signed-on", plugin,
- GAIM_CALLBACK(gf_event_connection_throttle), NULL);
+ purple_signal_connect(purple_connections_get_handle(), "signed-on", plugin,
+ PURPLE_CALLBACK(gf_event_connection_throttle), NULL);
- gaim_signal_connect(conv_handle, "chat-joined", plugin,
- GAIM_CALLBACK(gf_event_conversation_throttle), NULL);
+ purple_signal_connect(conv_handle, "chat-joined", plugin,
+ PURPLE_CALLBACK(gf_event_conversation_throttle), NULL);
/* mail stuff */
gf_event_email_init();
- gaim_signal_connect(gaim_xfers_get_handle(), "file-recv-cancel", plugin,
- GAIM_CALLBACK(gf_event_file_recv_cancel), "file-remote-cancel");
- gaim_signal_connect(gaim_xfers_get_handle(), "file-recv-complete", plugin,
- GAIM_CALLBACK(gf_event_file_recv_cancel), "file-recv-complete");
- gaim_signal_connect(gaim_xfers_get_handle(), "file-send-complete", plugin,
- GAIM_CALLBACK(gf_event_file_recv_cancel), "file-send-complete");
+ purple_signal_connect(purple_xfers_get_handle(), "file-recv-cancel", plugin,
+ PURPLE_CALLBACK(gf_event_file_recv_cancel), "file-remote-cancel");
+ purple_signal_connect(purple_xfers_get_handle(), "file-recv-complete", plugin,
+ PURPLE_CALLBACK(gf_event_file_recv_cancel), "file-recv-complete");
+ purple_signal_connect(purple_xfers_get_handle(), "file-send-complete", plugin,
+ PURPLE_CALLBACK(gf_event_file_recv_cancel), "file-send-complete");
}
void
--- a/src/gf_event_info.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_event_info.c Wed Apr 11 05:15:38 2007 -0400
@@ -32,13 +32,13 @@
struct _GfEventInfo {
GfEvent *event;
- GaimAccount *account;
+ PurpleAccount *account;
guint timeout_id;
- GaimBuddy *buddy;
- GaimConversation *conv;
- GaimConvChatBuddyFlags flags;
+ PurpleBuddy *buddy;
+ PurpleConversation *conv;
+ PurpleConvChatBuddyFlags flags;
gboolean contact;
gchar *target;
@@ -106,14 +106,14 @@
}
void
-gf_event_info_set_account(GfEventInfo *info, GaimAccount *account) {
+gf_event_info_set_account(GfEventInfo *info, PurpleAccount *account) {
g_return_if_fail(info);
g_return_if_fail(account);
info->account = account;
}
-GaimAccount *
+PurpleAccount *
gf_event_info_get_account(GfEventInfo *info) {
g_return_val_if_fail(info, NULL);
@@ -121,14 +121,14 @@
}
void
-gf_event_info_set_buddy(GfEventInfo *info, GaimBuddy *buddy) {
+gf_event_info_set_buddy(GfEventInfo *info, PurpleBuddy *buddy) {
g_return_if_fail(info);
g_return_if_fail(buddy);
info->buddy = buddy;
}
-GaimBuddy *
+PurpleBuddy *
gf_event_info_get_buddy(GfEventInfo *info) {
g_return_val_if_fail(info, NULL);
@@ -136,14 +136,14 @@
}
void
-gf_event_info_set_conversation(GfEventInfo *info, GaimConversation *conv) {
+gf_event_info_set_conversation(GfEventInfo *info, PurpleConversation *conv) {
g_return_if_fail(info);
g_return_if_fail(conv);
info->conv = conv;
}
-GaimConversation *
+PurpleConversation *
gf_event_info_get_conversation(GfEventInfo *info) {
g_return_val_if_fail(info, NULL);
@@ -230,15 +230,15 @@
}
void
-gf_event_info_set_conv_chat_buddy_flags(GfEventInfo *info, GaimConvChatBuddyFlags flags) {
+gf_event_info_set_conv_chat_buddy_flags(GfEventInfo *info, PurpleConvChatBuddyFlags flags) {
g_return_if_fail(info);
info->flags = flags;
}
-GaimConvChatBuddyFlags
+PurpleConvChatBuddyFlags
gf_event_info_get_chat_buddy_flags(GfEventInfo *info) {
- g_return_val_if_fail(info, GAIM_CBFLAGS_NONE);
+ g_return_val_if_fail(info, PURPLE_CBFLAGS_NONE);
return info->flags;
}
--- a/src/gf_item.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_item.c Wed Apr 11 05:15:38 2007 -0400
@@ -223,7 +223,7 @@
item->type = gf_item_type_from_string(xmlnode_get_attrib(node, "type"), FALSE);
if(item->type == GF_ITEM_TYPE_UNKNOWN) {
- gaim_debug_info("Guifications", "** Error: unknown item type\n");
+ purple_debug_info("Guifications", "** Error: unknown item type\n");
gf_item_destroy(item);
return NULL;
}
@@ -231,12 +231,12 @@
if((child = xmlnode_get_child(node, "position"))) {
item->position = gf_item_position_from_string(xmlnode_get_attrib(child, "value"), FALSE);
if(item->position == GF_ITEM_POSITION_UNKNOWN) {
- gaim_debug_info("Guifications", "** Error: invalid position\n");
+ purple_debug_info("Guifications", "** Error: invalid position\n");
gf_item_destroy(item);
return NULL;
}
} else { /* if we don't have a position we drop the item */
- gaim_debug_info("Guifications", "** Error: no positioning found for item\n");
+ purple_debug_info("Guifications", "** Error: no positioning found for item\n");
gf_item_destroy(item);
return NULL;
}
@@ -263,7 +263,7 @@
return NULL;
}
} else {
- gaim_debug_info("Guifications", "** Error loading icon item: 'No icon element found'\n");
+ purple_debug_info("Guifications", "** Error loading icon item: 'No icon element found'\n");
gf_item_destroy(item);
return NULL;
}
@@ -277,7 +277,7 @@
return NULL;
}
} else {
- gaim_debug_info("Guifications", "** Error loading image item: 'No image element found'\n");
+ purple_debug_info("Guifications", "** Error loading image item: 'No image element found'\n");
gf_item_destroy(item);
return NULL;
}
@@ -291,7 +291,7 @@
return NULL;
}
} else {
- gaim_debug_info("Guifications", "** Error loading text item: 'No text element found'\n");
+ purple_debug_info("Guifications", "** Error loading text item: 'No text element found'\n");
gf_item_destroy(item);
return NULL;
}
@@ -299,7 +299,7 @@
break;
case GF_ITEM_TYPE_UNKNOWN:
default:
- gaim_debug_info("Guifications", "** Error loading item: 'Unknown item type'\n");
+ purple_debug_info("Guifications", "** Error loading item: 'Unknown item type'\n");
gf_item_destroy(item);
return NULL;
break;
--- a/src/gf_item_icon.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_item_icon.c Wed Apr 11 05:15:38 2007 -0400
@@ -146,14 +146,14 @@
item_icon->type = item_icon_type_from_string(xmlnode_get_attrib(node, "type"));
if(item_icon->type == GF_ITEM_ICON_TYPE_UNKNOWN) {
- gaim_debug_info("Guifications", "** Error loading icon item: 'Unknown icon type'\n");
+ purple_debug_info("Guifications", "** Error loading icon item: 'Unknown icon type'\n");
gf_item_icon_destroy(item_icon);
return NULL;
}
item_icon->size = item_icon_size_from_string(xmlnode_get_attrib(node, "size"));
if(item_icon->size == GF_ITEM_ICON_SIZE_UNKNOWN) {
- gaim_debug_info("Guifications", "** Error loading icon item: 'Unknown icon size'\n");
+ purple_debug_info("Guifications", "** Error loading icon item: 'Unknown icon size'\n");
gf_item_icon_destroy(item_icon);
return NULL;
}
@@ -293,20 +293,20 @@
original = gdk_pixbuf_new_from_file(filename, NULL);
g_free(filename);
} else {
- GaimAccount *account = gf_event_info_get_account(info);
+ PurpleAccount *account = gf_event_info_get_account(info);
original = pidgin_create_prpl_icon(account, 1.0);
}
} else if(item_icon->type == GF_ITEM_ICON_TYPE_BUDDY) {
- GaimBuddyIcon *icon = NULL;
+ PurpleBuddyIcon *icon = NULL;
GdkPixbufLoader *loader;
const guchar *data;
size_t len;
- icon = gaim_buddy_icons_find(gf_event_info_get_account(info),
+ icon = purple_buddy_icons_find(gf_event_info_get_account(info),
gf_event_info_get_target(info));
if(icon) {
loader = gdk_pixbuf_loader_new();
- data = gaim_buddy_icon_get_data(icon, &len);
+ data = purple_buddy_icon_get_data(icon, &len);
gdk_pixbuf_loader_write(loader, data, len, NULL);
if((original = gdk_pixbuf_loader_get_pixbuf(loader)))
@@ -316,10 +316,10 @@
g_object_unref(G_OBJECT(loader));
}
} else if(item_icon->type == GF_ITEM_ICON_TYPE_STATUS) {
- GaimBuddy *buddy = NULL;
+ PurpleBuddy *buddy = NULL;
if((buddy = gf_event_info_get_buddy(info))) {
- original = pidgin_blist_get_status_icon((GaimBlistNode *)buddy,
+ original = pidgin_blist_get_status_icon((PurpleBlistNode *)buddy,
PIDGIN_STATUS_ICON_LARGE);
}
}
@@ -329,7 +329,7 @@
* "enhance" the theme format. If it fails we return like we used to.
*/
if(!original) {
- GaimAccount *account = gf_event_info_get_account(info);
+ PurpleAccount *account = gf_event_info_get_account(info);
original = pidgin_create_prpl_icon(account, 1.0);
if(!original)
--- a/src/gf_item_image.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_item_image.c Wed Apr 11 05:15:38 2007 -0400
@@ -75,7 +75,7 @@
item_image->filename = g_strdup(xmlnode_get_attrib(node, "filename"));
if(!item_image) {
- gaim_debug_info("Guifications",
+ purple_debug_info("Guifications",
"** Error loading image item: 'Unknown filename'\n");
gf_item_image_destroy(item_image);
return NULL;
--- a/src/gf_item_text.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_item_text.c Wed Apr 11 05:15:38 2007 -0400
@@ -107,7 +107,7 @@
#ifndef _WIN32
# if GTK_CHECK_VERSION(2,2,0)
display = gdk_display_get_default();
- screen = gdk_display_get_screen(display, gaim_prefs_get_int(GF_PREF_ADVANCED_SCREEN));
+ screen = gdk_display_get_screen(display, purple_prefs_get_int(GF_PREF_ADVANCED_SCREEN));
xdpi = (double)((float)gdk_screen_get_width(screen) / (float)gdk_screen_get_width_mm(screen) * 25.4);
ydpi = (double)((float)gdk_screen_get_height(screen) / (float)gdk_screen_get_height_mm(screen) * 25.4);
# endif
@@ -219,7 +219,7 @@
item_text = gf_item_text_new(item);
if(!(data = xmlnode_get_attrib(node, "format"))) {
- gaim_debug_info("Guifications", "** Error loading text item: 'No format given'\n");
+ purple_debug_info("Guifications", "** Error loading text item: 'No format given'\n");
gf_item_text_destroy(item_text);
return NULL;
}
@@ -234,7 +234,7 @@
data = xmlnode_get_attrib(node, "clipping");
item_text->clipping = text_clipping_from_string(data);
if(item_text->clipping == GF_ITEM_TEXT_CLIPPING_UNKNOWN) {
- gaim_debug_info("Guifications", "** Error loading text item: "
+ purple_debug_info("Guifications", "** Error loading text item: "
"'Unknown clipping type'\n");
gf_item_destroy(item);
return NULL;
@@ -408,9 +408,9 @@
GfNotification *notification;
GfTheme *theme;
GfThemeOptions *ops;
- GaimAccount *account;
- GaimBuddy *buddy;
- GaimConversation *conv = NULL;
+ PurpleAccount *account;
+ PurpleBuddy *buddy;
+ PurpleConversation *conv = NULL;
GString *str;
gchar *ret;
const gchar *tokens, *format, *time_format, *date_format, *warning;
@@ -474,28 +474,28 @@
str = g_string_append_c(str, '%');
break;
case 'a': /* account name */
- str = g_string_append(str, gaim_account_get_username(account));
+ str = g_string_append(str, purple_account_get_username(account));
break;
case 'C': /* conversation title */
- str = g_string_append(str, conv ? gaim_conversation_get_title(conv) : target);
+ str = g_string_append(str, conv ? purple_conversation_get_title(conv) : target);
break;
case 'c': /* conversation name */
if (conv) {
- if(conv->type == GAIM_CONV_TYPE_IM) {
- GaimBuddy *buddy;
+ if(conv->type == PURPLE_CONV_TYPE_IM) {
+ PurpleBuddy *buddy;
- buddy = gaim_find_buddy(account, conv->name);
+ buddy = purple_find_buddy(account, conv->name);
if(buddy)
- str = g_string_append(str, gaim_buddy_get_contact_alias(buddy));
+ str = g_string_append(str, purple_buddy_get_contact_alias(buddy));
else
str = g_string_append(str, conv->name);
- } else if(conv->type == GAIM_CONV_TYPE_CHAT) {
- GaimChat *chat;
+ } else if(conv->type == PURPLE_CONV_TYPE_CHAT) {
+ PurpleChat *chat;
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name);
if(chat) {
- str = g_string_append(str, gaim_chat_get_name(chat));
+ str = g_string_append(str, purple_chat_get_name(chat));
} else {
str = g_string_append(str, conv->name);
}
@@ -536,7 +536,7 @@
str = g_string_append(str, buff);
break;
case 'i': /* ip */
- str = g_string_append(str, gaim_network_get_public_ip());
+ str = g_string_append(str, purple_network_get_public_ip());
break;
case 'M': /* month */
strftime(buff, sizeof(buff), "%m", ltime);
@@ -554,7 +554,7 @@
buddy = gf_event_info_get_buddy(info);
if(buddy) {
- const gchar *alias = gaim_buddy_get_contact_alias(buddy);
+ const gchar *alias = purple_buddy_get_contact_alias(buddy);
str = g_string_append(str, alias);
} else {
const gchar *target = gf_event_info_get_target(info);
@@ -563,12 +563,12 @@
const gchar *target;
target = gf_event_info_get_target(info);
- buddy = gaim_find_buddy(account, target);
+ buddy = purple_find_buddy(account, target);
if(buddy) {
const gchar *alias;
- alias = gaim_buddy_get_contact_alias(buddy);
+ alias = purple_buddy_get_contact_alias(buddy);
str = g_string_append(str, alias);
} else {
str = g_string_append(str, target);
@@ -578,7 +578,7 @@
break;
case 'p': /* protocol name */
- str = g_string_append(str, gaim_account_get_protocol_id(account));
+ str = g_string_append(str, purple_account_get_protocol_id(account));
break;
case 'r': /* received message */
if(message)
@@ -600,7 +600,7 @@
case 'u': /* computer user name */
str = g_string_append(str, g_get_user_name());
break;
-#if !GAIM_VERSION_CHECK(2,0,0)
+#if !PURPLE_VERSION_CHECK(2,0,0)
case 'W': /* warner */
if(target)
str = g_string_append(str, target);
@@ -612,7 +612,7 @@
if(buddy) {
const char *prpl_id;
- prpl_id = gaim_account_get_protocol_id(account);
+ prpl_id = purple_account_get_protocol_id(account);
if(!g_ascii_strcasecmp(prpl_id, "prpl-toc") ||
!g_ascii_strcasecmp(prpl_id, "prpl-oscar"))
--- a/src/gf_notification.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_notification.c Wed Apr 11 05:15:38 2007 -0400
@@ -79,7 +79,7 @@
notification->n_type = g_strdup(xmlnode_get_attrib(node, "type"));
if(!notification->n_type) {
- gaim_debug_info("Guifications", "** Error: Notification type unknown\n");
+ purple_debug_info("Guifications", "** Error: Notification type unknown\n");
gf_notification_destroy(notification);
return NULL;
}
@@ -111,7 +111,7 @@
if(notification->width < GF_NOTIFICATION_MIN ||
notification->height < GF_NOTIFICATION_MIN)
{
- gaim_debug_info("Guifications", "** Error: notification '%s' is using the "
+ purple_debug_info("Guifications", "** Error: notification '%s' is using the "
"gtk background but %dx%d is less than the %dx%d minimum\n",
notification->n_type,
notification->width, notification->height,
@@ -120,7 +120,7 @@
return NULL;
}
} else if(!notification->background) {
- gaim_debug_info("Guifications", "** Error: notification '%s' is not using the "
+ purple_debug_info("Guifications", "** Error: notification '%s' is not using the "
"gtk background and does not have a background image\n",
notification->n_type);
gf_notification_destroy(notification);
@@ -490,7 +490,7 @@
g_free(filename);
if(!pixbuf) {
- gaim_debug_info("Guifications", "Couldn't not load notification background\n");
+ purple_debug_info("Guifications", "Couldn't not load notification background\n");
return NULL;
}
} else {
@@ -508,7 +508,7 @@
0, 0, 0, 0, width, height);
if(!tile) {
- gaim_debug_info("Guifications", "Failed to get the gtk theme "
+ purple_debug_info("Guifications", "Failed to get the gtk theme "
"background image\n");
return NULL;
}
@@ -526,7 +526,7 @@
notification->width, notification->height);
if(!pixbuf) {
- gaim_debug_info("Guifications", "Failed to create notification background\n");
+ purple_debug_info("Guifications", "Failed to create notification background\n");
return NULL;
}
--- a/src/gf_preferences.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_preferences.c Wed Apr 11 05:15:38 2007 -0400
@@ -73,14 +73,14 @@
/*******************************************************************************
* Globals
******************************************************************************/
-GaimPlugin *guifications;
+PurplePlugin *guifications;
/*******************************************************************************
* callbacks
******************************************************************************/
static void
option_menu_cb(GtkOptionMenu *option_menu, gchar *pref) {
- gaim_prefs_set_int(pref, gtk_option_menu_get_history(option_menu));
+ purple_prefs_set_int(pref, gtk_option_menu_get_history(option_menu));
}
static void
@@ -88,7 +88,7 @@
const gchar *name;
name = gf_actions_get_nth_name(gtk_option_menu_get_history(option_menu));
- gaim_prefs_set_string(pref, name);
+ purple_prefs_set_string(pref, name);
}
/***********************************************************************
@@ -163,7 +163,7 @@
menu = gf_menu_build(builder, NULL);
gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu);
gtk_option_menu_set_history(GTK_OPTION_MENU(option_menu),
- gaim_prefs_get_int(pref));
+ purple_prefs_get_int(pref));
g_signal_connect(G_OBJECT(option_menu), "changed",
G_CALLBACK(option_menu_cb), pref);
@@ -191,7 +191,7 @@
menu = gf_menu_build(gf_menu_mouse, NULL);
gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu);
- action = gf_action_find_with_name(gaim_prefs_get_string(pref));
+ action = gf_action_find_with_name(purple_prefs_get_string(pref));
if(action && (position = gf_action_get_position(action)) > -1) {
gtk_option_menu_set_history(GTK_OPTION_MENU(option_menu),
position);
@@ -226,7 +226,7 @@
gf_menu_position);
gtk_box_pack_start(GTK_BOX(frame), option, FALSE, FALSE, 0);
- label = pidgin_prefs_dropdown(frame, _("_Stack:"), GAIM_PREF_BOOLEAN,
+ label = pidgin_prefs_dropdown(frame, _("_Stack:"), PURPLE_PREF_BOOLEAN,
GF_PREF_APPEARANCE_VERTICAL,
_("Vertically"), TRUE,
_("Horizontally"), FALSE,
@@ -235,7 +235,7 @@
gtk_size_group_add_widget(sg, label);
label = pidgin_prefs_dropdown(frame, _("Show _while away:"),
- GAIM_PREF_BOOLEAN,
+ PURPLE_PREF_BOOLEAN,
GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY,
_("Yes"), TRUE,
_("No"), FALSE,
@@ -243,7 +243,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_size_group_add_widget(sg, label);
- label = pidgin_prefs_dropdown(frame, _("_Animate:"), GAIM_PREF_BOOLEAN,
+ label = pidgin_prefs_dropdown(frame, _("_Animate:"), PURPLE_PREF_BOOLEAN,
GF_PREF_APPEARANCE_ANIMATE,
_("Yes"), TRUE,
_("No"), FALSE,
@@ -581,7 +581,7 @@
else if ((tail = strrchr(path, '.')) == NULL)
return;
- destdir = g_build_filename(gaim_user_dir(), "guifications", "themes", NULL);
+ destdir = g_build_filename(purple_user_dir(), "guifications", "themes", NULL);
/* We'll check this just to make sure. This also lets us do something
* different on other platforms, if need be */
@@ -591,7 +591,7 @@
command = g_strdup_printf("tar > /dev/null xzf %s -C %s", escaped, destdir);
g_free(escaped);
#else
- if(!gtkwgaim_gz_untar(path, destdir)) {
+ if(!gtkwpurple_gz_untar(path, destdir)) {
g_free(destdir);
return;
}
@@ -614,13 +614,13 @@
}
static void
-theme_got_url(GaimUtilFetchUrlData *url_data, void *data,
+theme_got_url(PurpleUtilFetchUrlData *url_data, void *data,
const char *themedata, size_t len, const gchar *err_msg)
{
FILE *f;
gchar *path;
- f = gaim_mkstemp(&path, FALSE);
+ f = purple_mkstemp(&path, FALSE);
fwrite(themedata, len, 1, f);
fclose(f);
@@ -646,7 +646,7 @@
/* It looks like we're dealing with a local file. Let's
* just untar it in the right place */
if(!(tmp = g_filename_from_uri(name, NULL, &converr))) {
- gaim_debug_error("guifications", "theme dnd %s\n",
+ purple_debug_error("guifications", "theme dnd %s\n",
(converr ? converr->message :
"g_filename_from_uri error"));
return;
@@ -665,7 +665,7 @@
* other platforms, if need be */
/* Q: shouldn't tgz be tail? */
/* A: no. */
- gaim_util_fetch_url(name, TRUE, NULL, FALSE, theme_got_url, ".tgz");
+ purple_util_fetch_url(name, TRUE, NULL, FALSE, theme_got_url, ".tgz");
}
gtk_drag_finish(dc, TRUE, FALSE, t);
@@ -772,7 +772,7 @@
gf_themes_unprobe();
gf_themes_probe();
- gaim_debug_info("Guifications", "probes refreshed\n");
+ purple_debug_info("Guifications", "probes refreshed\n");
store = gtk_list_store_new(9, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
@@ -917,7 +917,7 @@
if(!filename)
return;
- gaim_request_yes_no(guifications, _("Delete theme?"), NULL,
+ purple_request_yes_no(guifications, _("Delete theme?"), NULL,
_("Are you sure you want to delete this theme?"),
0, filename,
G_CALLBACK(theme_list_delete_yes_cb),
@@ -961,10 +961,10 @@
return;
}
- newpath = g_build_filename(gaim_user_dir(), "guifications", "themes",
+ newpath = g_build_filename(purple_user_dir(), "guifications", "themes",
dir, NULL);
g_free(dir);
- gaim_build_dir(newpath, S_IRUSR | S_IWUSR | S_IXUSR);
+ purple_build_dir(newpath, S_IRUSR | S_IWUSR | S_IXUSR);
fullname = g_build_filename(newpath, "theme.xml", NULL);
@@ -984,7 +984,7 @@
static void
theme_list_get_more_cb(GtkWidget *w, gpointer data) {
- gaim_notify_uri(NULL, "http://sourceforge.net/tracker/?atid=676821&group_id=92888&func=browse");
+ purple_notify_uri(NULL, "http://sourceforge.net/tracker/?atid=676821&group_id=92888&func=browse");
}
static gboolean
@@ -1315,7 +1315,7 @@
* exports
******************************************************************************/
GtkWidget *
-gf_preferences_get_frame(GaimPlugin *plugin) {
+gf_preferences_get_frame(PurplePlugin *plugin) {
GtkWidget *notebook;
guifications = plugin;
@@ -1343,62 +1343,62 @@
GList *l = NULL;
gchar *def_theme = NULL;
- gaim_prefs_add_none(GF_PREF_ROOT);
- gaim_prefs_add_none(GF_PREF_PLUGIN_ROOT);
+ purple_prefs_add_none(GF_PREF_ROOT);
+ purple_prefs_add_none(GF_PREF_PLUGIN_ROOT);
- gaim_prefs_add_none(GF_PREF_BEHAVIOR_ROOT);
- gaim_prefs_add_int(GF_PREF_BEHAVIOR_DISPLAY_TIME, 6);
- gaim_prefs_add_int(GF_PREF_BEHAVIOR_THROTTLE, 6);
- gaim_prefs_add_bool(GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY, TRUE);
+ purple_prefs_add_none(GF_PREF_BEHAVIOR_ROOT);
+ purple_prefs_add_int(GF_PREF_BEHAVIOR_DISPLAY_TIME, 6);
+ purple_prefs_add_int(GF_PREF_BEHAVIOR_THROTTLE, 6);
+ purple_prefs_add_bool(GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY, TRUE);
- gaim_prefs_add_none(GF_PREF_APPEARANCE_ROOT);
- gaim_prefs_add_int(GF_PREF_APPEARANCE_POSITION, GF_DISPLAY_POSITION_SE);
- gaim_prefs_add_bool(GF_PREF_APPEARANCE_VERTICAL, TRUE);
- gaim_prefs_add_bool(GF_PREF_APPEARANCE_ANIMATE, TRUE);
+ purple_prefs_add_none(GF_PREF_APPEARANCE_ROOT);
+ purple_prefs_add_int(GF_PREF_APPEARANCE_POSITION, GF_DISPLAY_POSITION_SE);
+ purple_prefs_add_bool(GF_PREF_APPEARANCE_VERTICAL, TRUE);
+ purple_prefs_add_bool(GF_PREF_APPEARANCE_ANIMATE, TRUE);
- gaim_prefs_add_none(GF_PREF_MOUSE_ROOT);
- gaim_prefs_add_string(GF_PREF_MOUSE_LEFT, "open");
- gaim_prefs_add_string(GF_PREF_MOUSE_MIDDLE, "close");
- gaim_prefs_add_string(GF_PREF_MOUSE_RIGHT, "context");
+ purple_prefs_add_none(GF_PREF_MOUSE_ROOT);
+ purple_prefs_add_string(GF_PREF_MOUSE_LEFT, "open");
+ purple_prefs_add_string(GF_PREF_MOUSE_MIDDLE, "close");
+ purple_prefs_add_string(GF_PREF_MOUSE_RIGHT, "context");
def_theme = g_build_filename(DATADIR, "pixmaps", "gaim", "guifications",
"themes", "default", "theme.xml", NULL);
l = g_list_append(l, def_theme);
- gaim_prefs_add_string_list(GF_PREF_LOADED_THEMES, l);
+ purple_prefs_add_string_list(GF_PREF_LOADED_THEMES, l);
g_free(def_theme);
g_list_free(l);
- gaim_prefs_add_none(GF_PREF_ADVANCED_ROOT);
- gaim_prefs_add_bool(GF_PREF_ADVANCED_RELEASE_NOTIFICATION, TRUE);
- gaim_prefs_add_int(GF_PREF_ADVANCED_RELEASE_LAST_CHECK, 0);
+ purple_prefs_add_none(GF_PREF_ADVANCED_ROOT);
+ purple_prefs_add_bool(GF_PREF_ADVANCED_RELEASE_NOTIFICATION, TRUE);
+ purple_prefs_add_int(GF_PREF_ADVANCED_RELEASE_LAST_CHECK, 0);
#if GTK_CHECK_VERSION(2,2,0)
- gaim_prefs_add_int(GF_PREF_ADVANCED_SCREEN, 0);
- gaim_prefs_add_int(GF_PREF_ADVANCED_MONITOR, 0);
+ purple_prefs_add_int(GF_PREF_ADVANCED_SCREEN, 0);
+ purple_prefs_add_int(GF_PREF_ADVANCED_MONITOR, 0);
- if(gaim_prefs_get_int(GF_PREF_ADVANCED_SCREEN) >
+ if(purple_prefs_get_int(GF_PREF_ADVANCED_SCREEN) >
gf_display_get_screen_count())
{
- gaim_prefs_set_int(GF_PREF_ADVANCED_SCREEN,
+ purple_prefs_set_int(GF_PREF_ADVANCED_SCREEN,
gf_display_get_default_screen());
}
- if(gaim_prefs_get_int(GF_PREF_ADVANCED_MONITOR) >
+ if(purple_prefs_get_int(GF_PREF_ADVANCED_MONITOR) >
gf_display_get_monitor_count())
{
- gaim_prefs_set_int(GF_PREF_ADVANCED_MONITOR,
+ purple_prefs_set_int(GF_PREF_ADVANCED_MONITOR,
gf_display_get_default_monitor());
}
#endif /* GTK_CHECK_VERSION(2,2,0) */
/* clean up old prefs if they exist */
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/behavior/show_during_screen_saver");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/h_offset");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/v_offset");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/zoom");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/show_contacts");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/alias");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/advanced/sign_on_delay");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/advanced/hide_joinleave");
- gaim_prefs_remove("/plugins/gtk/amc_grim/guifications2/advanced/hide_conv_focused");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/behavior/show_during_screen_saver");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/h_offset");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/v_offset");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/zoom");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/show_contacts");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/appearance/alias");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/advanced/sign_on_delay");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/advanced/hide_joinleave");
+ purple_prefs_remove("/plugins/gtk/amc_grim/guifications2/advanced/hide_conv_focused");
}
--- a/src/gf_stock.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_stock.c Wed Apr 11 05:15:38 2007 -0400
@@ -48,7 +48,7 @@
g_free(file);
if(!pixbuf) {
- gaim_debug_info("Guifications", "failed to load stock item '%s'\n",
+ purple_debug_info("Guifications", "failed to load stock item '%s'\n",
stock_name);
return;
}
--- a/src/gf_theme.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_theme.c Wed Apr 11 05:15:38 2007 -0400
@@ -82,26 +82,26 @@
g_return_val_if_fail(filename, NULL);
if(!g_file_get_contents(filename, &contents, &length, NULL)) {
- gaim_debug_info("Guifications", "** Error: failed to get file contents\n");
+ purple_debug_info("Guifications", "** Error: failed to get file contents\n");
return NULL;
}
if(!(root = xmlnode_from_str(contents, length))) {
- gaim_debug_info("Guifications", "** Error: Could not parse file\n");
+ purple_debug_info("Guifications", "** Error: Could not parse file\n");
return NULL;
}
g_free(contents);
if(!(parent = xmlnode_get_child(root, "theme"))) {
- gaim_debug_info("Guifications", "** Error: No theme element found\n");
+ purple_debug_info("Guifications", "** Error: No theme element found\n");
xmlnode_free(root);
return NULL;
}
api_version = atoi(xmlnode_get_attrib(parent, "api"));
if(api_version != GF_THEME_API_VERSION) {
- gaim_debug_info("Guifications", "** Error: Theme API version mismatch\n");
+ purple_debug_info("Guifications", "** Error: Theme API version mismatch\n");
xmlnode_free(root);
return NULL;
}
@@ -116,14 +116,14 @@
/* get the themes info */
if(!(child = xmlnode_get_child(parent, "info"))) {
- gaim_debug_info("Guifications", "** Error: No info element found\n");
+ purple_debug_info("Guifications", "** Error: No info element found\n");
gf_theme_unload(theme);
xmlnode_free(root);
return NULL;
}
if(!(theme->info = gf_theme_info_new_from_xmlnode(child))) {
- gaim_debug_info("Guifications", "** Error: could not load theme info\n");
+ purple_debug_info("Guifications", "** Error: could not load theme info\n");
gf_theme_unload(theme);
xmlnode_free(root);
return NULL;
@@ -257,7 +257,7 @@
fp = g_fopen(filename, "wb");
if(!fp) {
- gaim_debug_info("guifications", "Error trying to save theme %s\n", filename);
+ purple_debug_info("guifications", "Error trying to save theme %s\n", filename);
} else {
if(data)
fprintf(fp, "%s", data);
@@ -353,7 +353,7 @@
probe_dirs[0] = g_build_filename(DATADIR, "pixmaps", "pidgin",
"guifications", "themes", NULL);
- probe_dirs[1] = g_build_filename(gaim_user_dir(), "guifications", "themes",
+ probe_dirs[1] = g_build_filename(purple_user_dir(), "guifications", "themes",
NULL);
probe_dirs[2] = NULL;
@@ -369,7 +369,7 @@
path = g_build_filename(probe_dirs[i], file, "theme.xml", NULL);
if(path) {
if(g_file_test(path, G_FILE_TEST_EXISTS)) {
- gaim_debug_info("Guifications", "Probing %s\n", path);
+ purple_debug_info("Guifications", "Probing %s\n", path);
gf_theme_probe(path);
}
@@ -380,7 +380,7 @@
g_dir_close(dir);
} else if(i == 1) {
/* if the user theme dir doesn't exist, create it */
- gaim_build_dir(probe_dirs[i], S_IRUSR | S_IWUSR | S_IXUSR);
+ purple_build_dir(probe_dirs[i], S_IRUSR | S_IWUSR | S_IXUSR);
}
g_free(probe_dirs[i]);
@@ -412,7 +412,7 @@
for(l = probed_themes; l; l = l->next) {
if((file = (gchar*)l->data)) {
- gaim_debug_info("Guifications", "unprobing %s\n", file);
+ purple_debug_info("Guifications", "unprobing %s\n", file);
g_free(file);
}
}
@@ -567,7 +567,7 @@
const gchar *name = NULL;
name = gf_theme_info_get_name(theme->info);
- gaim_debug_info("Guifications",
+ purple_debug_info("Guifications",
"Theme %s already has a master notification\n",
name ? name : "(NULL)");
return;
@@ -588,7 +588,7 @@
type = gf_notification_get_type(notification);
if(!g_utf8_collate(GF_NOTIFICATION_MASTER, type)) {
- gaim_debug_info("Guifications",
+ purple_debug_info("Guifications",
"Master notifications can not be removed\n");
return;
}
@@ -646,7 +646,7 @@
s = g_list_append(s, theme->file);
}
- gaim_prefs_set_string_list(GF_PREF_LOADED_THEMES, s);
+ purple_prefs_set_string_list(GF_PREF_LOADED_THEMES, s);
g_list_free(s);
}
@@ -656,7 +656,7 @@
GList *s = NULL;
gchar *filename = NULL;
- for(s = gaim_prefs_get_string_list(GF_PREF_LOADED_THEMES); s; s = s->next) {
+ for(s = purple_prefs_get_string_list(GF_PREF_LOADED_THEMES); s; s = s->next) {
filename = (gchar*)s->data;
if(gf_theme_is_probed(filename))
--- a/src/gf_theme_editor.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/gf_theme_editor.c Wed Apr 11 05:15:38 2007 -0400
@@ -26,7 +26,7 @@
#include <sys/types.h>
#include <string.h>
-#define GAIM_PLUGINS
+#define PURPLE_PLUGINS
#include <debug.h>
#include <pidgin.h>
@@ -227,7 +227,7 @@
/*******************************************************************************
* Globals
******************************************************************************/
-GaimPlugin *plugin_handle = NULL;
+PurplePlugin *plugin_handle = NULL;
gpointer image_dialog = NULL;
GtkWidget *opt_dialog = NULL;
struct GfThemeEditor editor;
@@ -456,7 +456,7 @@
gchar *path, *dir;
dir = g_strdup_printf(".%x", g_random_int());
- path = g_build_filename(gaim_user_dir(), "guifications", "themes", dir, NULL);
+ path = g_build_filename(purple_user_dir(), "guifications", "themes", dir, NULL);
g_free(dir);
g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
@@ -564,7 +564,7 @@
}
if(image_dialog) {
- gaim_request_close(GAIM_REQUEST_FILE, image_dialog);
+ purple_request_close(PURPLE_REQUEST_FILE, image_dialog);
image_dialog = NULL;
}
@@ -942,7 +942,7 @@
-1);
if(object == NULL) {
- gaim_debug_misc("guifications", "ouch, I don't know where to put this, aborting\n");
+ purple_debug_misc("guifications", "ouch, I don't know where to put this, aborting\n");
if(new_notification.window)
gtk_widget_destroy(new_notification.window);
new_notification.window = NULL;
@@ -1118,7 +1118,7 @@
g_free(title);
if(!object) {
- gaim_debug_misc("guifications",
+ purple_debug_misc("guifications",
"ouch, I don't know where to put this, aborting\n");
if(new_item.window)
@@ -1965,7 +1965,7 @@
value = gfte_get_value(button, page, object);
if(type == GFTE_BUTTON_FILE) {
- image_dialog = gaim_request_file(plugin_handle, _("Open"), "", FALSE,
+ image_dialog = purple_request_file(plugin_handle, _("Open"), "", FALSE,
G_CALLBACK(gfte_dialog_file_ok_cb),
G_CALLBACK(gfte_dialog_file_cancel_cb),
(gpointer)button);
@@ -2187,7 +2187,7 @@
static void
gfte_help(GtkButton *button, gpointer data) {
- gaim_notify_uri(NULL, GF_WEBSITE "/themes/theme_howto/");
+ purple_notify_uri(NULL, GF_WEBSITE "/themes/theme_howto/");
}
/*******************************************************************************
@@ -2775,7 +2775,7 @@
* Exports
******************************************************************************/
void
-gf_theme_editor_init(GaimPlugin *plugin) {
+gf_theme_editor_init(PurplePlugin *plugin) {
plugin_handle = plugin;
}
--- a/src/guifications.c Sun Apr 01 18:49:32 2007 -0400
+++ b/src/guifications.c Wed Apr 11 05:15:38 2007 -0400
@@ -46,7 +46,7 @@
#include <time.h>
static gboolean
-gf_load(GaimPlugin *plugin) {
+gf_load(PurplePlugin *plugin) {
gf_actions_init();
gf_blist_init(plugin);
@@ -63,7 +63,7 @@
}
static gboolean
-gf_unload(GaimPlugin *plugin) {
+gf_unload(PurplePlugin *plugin) {
time_t t;
/* seed the random number generator here so that two notifications that
@@ -89,15 +89,15 @@
static PidginPluginUiInfo ui_info = { gf_preferences_get_frame };
-static GaimPluginInfo gf_info = {
- GAIM_PLUGIN_MAGIC, /* plugin magic */
- GAIM_MAJOR_VERSION, /* major gaim version */
- GAIM_MINOR_VERSION, /* minor gaim version */
- GAIM_PLUGIN_STANDARD, /* type */
+static PurplePluginInfo gf_info = {
+ PURPLE_PLUGIN_MAGIC, /* plugin magic */
+ PURPLE_MAJOR_VERSION, /* major gaim version */
+ PURPLE_MINOR_VERSION, /* minor gaim version */
+ PURPLE_PLUGIN_STANDARD, /* type */
PIDGIN_PLUGIN_TYPE, /* ui requirement */
0, /* flags */
NULL, /* dependencies */
- GAIM_PRIORITY_DEFAULT, /* priority */
+ PURPLE_PRIORITY_DEFAULT, /* priority */
"gtk-amc_grim-Guifications", /* id */
NULL, /* name */
@@ -123,7 +123,7 @@
};
static void
-init_plugin(GaimPlugin *plugin) {
+init_plugin(PurplePlugin *plugin) {
#ifdef ENABLE_NLS
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);