--- 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 @@
-conversation_exists(GaimConversation *conv) {
- GaimConversation *lconv;
+conversation_exists(PurpleConversation *conv) { + PurpleConversation *lconv; - 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; @@ -286,9 +286,9 @@
gf_action_execute_open_conv(GfDisplay *display, GdkEventButton *gdk_event) {
- 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 @@
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); serv_join_chat(account->gc, (GHashTable *)components);
gf_display_destroy(display);
@@ -323,20 +323,20 @@
} 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); - 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.. */
- conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, target, account);
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, target, account); - conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, target);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, target); - 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) {
+ PurpleAccount *account; g_return_if_fail(display);
@@ -373,8 +373,8 @@
gf_action_execute_log(GfDisplay *display, GdkEventButton *gdk_event) {
- 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);
- 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);
- 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);
- 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 @@
gf_action_context_im_cb(GtkWidget *menuitem, GfDisplay *display) {
- GaimConversation *conv = NULL;
+ PurpleAccount *account; + PurpleConversation *conv = NULL; PidginWindow *win = NULL;
@@ -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); - conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, target);
+ conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, target); @@ -483,8 +483,8 @@
gf_action_context_pounce_cb(GtkWidget *menuitem, GfDisplay *display) {
- GaimAccount *account = NULL;
- GaimBuddy *buddy = NULL;
+ PurpleAccount *account = NULL; + PurpleBuddy *buddy = NULL; info = gf_display_get_event_info(display);
@@ -502,7 +502,7 @@
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); 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);
@@ -532,13 +532,13 @@
conv = gf_event_info_get_conversation(info);
- pidgin_log_show(GAIM_LOG_CHAT, conv->name, account);
+ pidgin_log_show(PURPLE_LOG_CHAT, conv->name, account); 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);
@@ -552,9 +552,9 @@
gf_action_context_alias_chat_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL; + PurpleChat *chat = NULL; + PurpleConversation *conv = NULL; info = gf_display_get_event_info(display);
@@ -565,7 +565,7 @@
conv = gf_event_info_get_conversation(info);
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name); pidgindialogs_alias_chat(chat);
@@ -574,7 +574,7 @@
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); 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);
@@ -604,13 +604,13 @@
conv = gf_event_info_get_conversation(info);
- gaim_blist_request_add_chat(account, NULL, NULL, conv->name);
+ purple_blist_request_add_chat(account, NULL, NULL, conv->name); 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);
@@ -624,9 +624,9 @@
gf_action_context_remove_chat_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL; + PurpleChat *chat = NULL; + PurpleConversation *conv = NULL; info = gf_display_get_event_info(display);
@@ -637,7 +637,7 @@
conv = gf_event_info_get_conversation(info);
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name); pidgindialogs_remove_chat(chat);
@@ -646,7 +646,7 @@
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 @@
gf_action_context_autojoin_cb(GtkWidget *menuitem, GfDisplay *display) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimConversation *conv = NULL;
+ PurpleAccount *account = NULL; + PurpleChat *chat = NULL; + PurpleConversation *conv = NULL; info = gf_display_get_event_info(display);
@@ -677,10 +677,10 @@
conv = gf_event_info_get_conversation(info);
- chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name); - 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 @@
gf_action_execute_context(GfDisplay *display, GdkEventButton *gdk_event) {
GfEventInfo *info = NULL;
- GaimAccount *account = NULL;
- GaimBuddy *buddy = 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; const gchar *target = NULL;
gboolean chat_sep_added = FALSE;
@@ -723,12 +723,12 @@
target = gf_event_info_get_target(info);
- 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)); - prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl);
+ prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); @@ -762,7 +762,7 @@
- buddy = gaim_find_buddy(account, target);
+ buddy = purple_find_buddy(account, target); 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); @@ -804,11 +804,11 @@
- GaimBlistNode *node = (GaimBlistNode *)chat;
+ PurpleBlistNode *node = (PurpleBlistNode *)chat; - 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
- if(conv && conv->type == GAIM_CONV_TYPE_CHAT) {
+ if(conv && conv->type == PURPLE_CONV_TYPE_CHAT) { @@ -840,10 +840,10 @@
/* 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),
--- 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 @@
*****************************************************************************/
typedef struct _GfBlistDialog {
- GaimRequestField *theme_field;
+ PurpleRequestField *theme_field; @@ -71,32 +71,32 @@
*****************************************************************************/
-gf_blist_dialog_ok_cb(gpointer data, GaimRequestFields *fields) {
+gf_blist_dialog_ok_cb(gpointer data, PurpleRequestFields *fields) { GfBlistDialog *diag = (GfBlistDialog *)data;
const gchar *name = NULL;
- 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);
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); 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, 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, - 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 @@
-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 @@
*****************************************************************************/
-gf_blist_dialog_new(GaimBlistNode *node) {
+gf_blist_dialog_new(PurpleBlistNode *node) { GfBlistDialog *dialog = NULL;
- GaimRequestFields *fields;
- GaimRequestFieldGroup *group;
+ PurpleRequestFields *fields; + PurpleRequestFieldGroup *group; 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; @@ -144,8 +144,8 @@
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; @@ -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; 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", - 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 @@
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 @@
- 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);
- gaim_request_fields(NULL, _("Select Guifications theme"),
+ purple_request_fields(NULL, _("Select Guifications theme"), _("OK"), G_CALLBACK(gf_blist_dialog_ok_cb),
_("Cancel"), G_CALLBACK(gf_blist_dialog_cancel_cb),
@@ -217,7 +217,7 @@
*****************************************************************************/
-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 @@
-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
- if(GAIM_BLIST_NODE_IS_CHAT(node))
+ if(PURPLE_BLIST_NODE_IS_CHAT(node)) (*menu) = g_list_append(*menu, NULL);
- 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 @@
*****************************************************************************/
-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",
- GAIM_CALLBACK(gf_blist_drawing_menu_cb),
+ PURPLE_CALLBACK(gf_blist_drawing_menu_cb), @@ -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);
@@ -280,13 +280,13 @@
-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); return GF_BLIST_THEME_UNASSIGNED;
@@ -310,13 +310,13 @@
-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 @@
- action = gf_action_find_with_name(gaim_prefs_get_string(pref));
+ action = gf_action_find_with_name(purple_prefs_get_string(pref)); @@ -835,7 +835,7 @@
display->partial.width, display->partial.height);
- 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);
- contact1 = gaim_buddy_get_contact(buddy1);
+ contact1 = purple_buddy_get_contact(buddy1); ck1 = g_utf8_collate_key(target1, -1);
@@ -976,7 +976,7 @@
- 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.
- 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 @@
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 : "");
@@ -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 */
@@ -1236,17 +1236,17 @@
-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_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)
-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 @@
-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;
-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,
- 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,
- 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,
#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_display_screen_changed_cb,
- 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,
@@ -1323,10 +1323,10 @@
- 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);
- gaim_debug_info("Guifications", "Event already exists\n");
+ purple_debug_info("Guifications", "Event already exists\n"); @@ -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); @@ -237,17 +237,17 @@
gf_event_connection_throttle_cb(gpointer data) {
- GaimAccount *account = (GaimAccount *)data;
+ PurpleAccount *account = (PurpleAccount *)data; - if(!gaim_account_get_connection(account)) {
+ if(!purple_account_get_connection(account)) { accounts = g_list_remove(accounts, account);
- if(!gaim_account_is_connected(account))
+ if(!purple_account_is_connected(account)) accounts = g_list_remove(accounts, account);
@@ -255,13 +255,13 @@
-gf_event_connection_throttle(GaimConnection *gc, gpointer data) {
+gf_event_connection_throttle(PurpleConnection *gc, gpointer data) { + PurpleAccount *account; - account = gaim_connection_get_account(gc);
+ account = purple_connection_get_account(gc); @@ -276,7 +276,7 @@
gf_event_conversation_throttle_cb(gpointer data) {
- GaimConversation *conv = (GaimConversation *)data;
+ PurpleConversation *conv = (PurpleConversation *)data; chats = g_list_remove(chats, conv);
@@ -285,11 +285,11 @@
-gf_event_conversation_throttle(GaimConversation *conv, gpointer data) {
+gf_event_conversation_throttle(PurpleConversation *conv, gpointer data) { - if(gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_CHAT)
+ if(purple_conversation_get_type(conv) != PURPLE_CONV_TYPE_CHAT) chats = g_list_append(chats, conv);
@@ -301,11 +301,11 @@
******************************************************************************/
/* first pass to see if a notification should be shown.. */
-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())
- if(!gaim_account_is_connected(account))
+ if(!purple_account_is_connected(account)) if(g_list_find(accounts, account))
@@ -314,8 +314,8 @@
if(!gf_event_show_notification(notification))
- 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)) @@ -323,21 +323,21 @@
/* second pass to see if a conversation notification should be shown */
-gf_event_conversation_show(GaimConversation *conv, const gchar *sender) {
+gf_event_conversation_show(PurpleConversation *conv, const gchar *sender) { - if(gaim_conversation_has_focus(conv))
+ if(purple_conversation_has_focus(conv)) - 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))
- nick = gaim_conv_chat_get_nick(GAIM_CONV_CHAT(conv));
+ nick = purple_conv_chat_get_nick(PURPLE_CONV_CHAT(conv)); if(!strcmp(nick, sender))
@@ -347,9 +347,9 @@
-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 @@
******************************************************************************/
-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))
gf_event_common(notification, buddy->account, buddy, NULL, buddy->name,
- NULL, GAIM_CBFLAGS_NONE, NULL, NULL);
+ NULL, PURPLE_CBFLAGS_NONE, NULL, NULL); -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)) { - } else if (!gaim_status_is_available(oldstatus) &&
- gaim_status_is_available(newstatus)) {
+ } else if (!purple_status_is_available(oldstatus) && + purple_status_is_available(newstatus)) { gf_event_common(notification, buddy->account, buddy, NULL, buddy->name,
- NULL, GAIM_CBFLAGS_NONE, NULL, NULL);
+ NULL, PURPLE_CBFLAGS_NONE, NULL, NULL); -gf_event_buddy_idle(GaimBuddy *buddy, gboolean oldidle, gboolean newidle,
+gf_event_buddy_idle(PurpleBuddy *buddy, gboolean oldidle, gboolean newidle, 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); /*******************************************************************************
******************************************************************************/
-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, - 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); -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, - 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); -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, - 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))
if(!g_strstr_len(message, strlen(message), nick))
- 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); -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); -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, - 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,
-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); -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) : - 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); -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(""); - 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); @@ -600,17 +600,17 @@
******************************************************************************/
-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);
-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 @@
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 @@
******************************************************************************/
-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); /*******************************************************************************
******************************************************************************/
-gf_events_init(GaimPlugin *plugin) {
+gf_events_init(PurplePlugin *plugin) { 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); /* now that the pref is created, set the events that are supposed to be displayed
- 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 @@
/* 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(); - 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); - 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"); --- 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);
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);
@@ -293,20 +293,20 @@
original = gdk_pixbuf_new_from_file(filename, NULL);
- 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; - 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));
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.
- GaimAccount *account = gf_event_info_get_account(info);
+ PurpleAccount *account = gf_event_info_get_account(info); original = pidgin_create_prpl_icon(account, 1.0);
--- 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 @@
# 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);
@@ -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);
@@ -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");
@@ -408,9 +408,9 @@
GfNotification *notification;
- GaimConversation *conv = NULL;
+ PurpleAccount *account; + PurpleConversation *conv = NULL; const gchar *tokens, *format, *time_format, *date_format, *warning;
@@ -474,28 +474,28 @@
str = g_string_append_c(str, '%');
case 'a': /* account name */
- str = g_string_append(str, gaim_account_get_username(account));
+ str = g_string_append(str, purple_account_get_username(account)); 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); case 'c': /* conversation name */
- if(conv->type == GAIM_CONV_TYPE_IM) {
+ if(conv->type == PURPLE_CONV_TYPE_IM) { - buddy = gaim_find_buddy(account, conv->name);
+ buddy = purple_find_buddy(account, conv->name); - str = g_string_append(str, gaim_buddy_get_contact_alias(buddy));
+ str = g_string_append(str, purple_buddy_get_contact_alias(buddy)); str = g_string_append(str, conv->name);
- } else if(conv->type == GAIM_CONV_TYPE_CHAT) {
+ } else if(conv->type == PURPLE_CONV_TYPE_CHAT) { - chat = gaim_blist_find_chat(account, conv->name);
+ chat = purple_blist_find_chat(account, conv->name); - str = g_string_append(str, gaim_chat_get_name(chat));
+ str = g_string_append(str, purple_chat_get_name(chat)); str = g_string_append(str, conv->name);
@@ -536,7 +536,7 @@
str = g_string_append(str, buff);
- str = g_string_append(str, gaim_network_get_public_ip());
+ str = g_string_append(str, purple_network_get_public_ip()); strftime(buff, sizeof(buff), "%m", ltime);
@@ -554,7 +554,7 @@
buddy = gf_event_info_get_buddy(info);
- const gchar *alias = gaim_buddy_get_contact_alias(buddy);
+ const gchar *alias = purple_buddy_get_contact_alias(buddy); str = g_string_append(str, alias);
const gchar *target = gf_event_info_get_target(info);
@@ -563,12 +563,12 @@
target = gf_event_info_get_target(info);
- buddy = gaim_find_buddy(account, target);
+ buddy = purple_find_buddy(account, target); - alias = gaim_buddy_get_contact_alias(buddy);
+ alias = purple_buddy_get_contact_alias(buddy); str = g_string_append(str, alias);
str = g_string_append(str, target);
@@ -578,7 +578,7 @@
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)); case 'r': /* received message */
@@ -600,7 +600,7 @@
case 'u': /* computer user name */
str = g_string_append(str, g_get_user_name());
-#if !GAIM_VERSION_CHECK(2,0,0)
+#if !PURPLE_VERSION_CHECK(2,0,0) str = g_string_append(str, target);
@@ -612,7 +612,7 @@
- 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_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 @@
/*******************************************************************************
******************************************************************************/
-GaimPlugin *guifications;
+PurplePlugin *guifications; /*******************************************************************************
******************************************************************************/
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)); @@ -88,7 +88,7 @@
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),
@@ -226,7 +226,7 @@
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,
_("Horizontally"), FALSE,
@@ -235,7 +235,7 @@
gtk_size_group_add_widget(sg, label);
label = pidgin_prefs_dropdown(frame, _("Show _while away:"),
GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY,
@@ -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,
@@ -581,7 +581,7 @@
else if ((tail = strrchr(path, '.')) == NULL)
- 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);
- if(!gtkwgaim_gz_untar(path, destdir)) {
+ if(!gtkwpurple_gz_untar(path, destdir)) { @@ -614,13 +614,13 @@
-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)
- f = gaim_mkstemp(&path, FALSE);
+ f = purple_mkstemp(&path, FALSE); fwrite(themedata, len, 1, 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"));
@@ -665,7 +665,7 @@
* other platforms, if need be */
/* Q: shouldn't tgz be tail? */
- 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 @@
- 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 @@
- 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?"),
G_CALLBACK(theme_list_delete_yes_cb),
@@ -961,10 +961,10 @@
- newpath = g_build_filename(gaim_user_dir(), "guifications", "themes",
+ newpath = g_build_filename(purple_user_dir(), "guifications", "themes", - 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 @@
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"); @@ -1315,7 +1315,7 @@
******************************************************************************/
-gf_preferences_get_frame(GaimPlugin *plugin) {
+gf_preferences_get_frame(PurplePlugin *plugin) { @@ -1343,62 +1343,62 @@
- 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); - 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_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"); 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"); 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"); 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"); @@ -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"); 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"); @@ -257,7 +257,7 @@
fp = g_fopen(filename, "wb");
- gaim_debug_info("guifications", "Error trying to save theme %s\n", filename);
+ purple_debug_info("guifications", "Error trying to save theme %s\n", filename); @@ -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", @@ -369,7 +369,7 @@
path = g_build_filename(probe_dirs[i], file, "theme.xml", NULL);
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); @@ -380,7 +380,7 @@
/* 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); @@ -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); @@ -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",
@@ -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");
@@ -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); @@ -656,7 +656,7 @@
- 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 @@
@@ -227,7 +227,7 @@
/*******************************************************************************
******************************************************************************/
-GaimPlugin *plugin_handle = NULL;
+PurplePlugin *plugin_handle = NULL; gpointer image_dialog = NULL;
GtkWidget *opt_dialog = NULL;
struct GfThemeEditor editor;
@@ -456,7 +456,7 @@
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_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
@@ -564,7 +564,7 @@
- gaim_request_close(GAIM_REQUEST_FILE, image_dialog);
+ purple_request_close(PURPLE_REQUEST_FILE, image_dialog); @@ -942,7 +942,7 @@
- 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 @@
- gaim_debug_misc("guifications",
+ purple_debug_misc("guifications", "ouch, I don't know where to put this, aborting\n");
@@ -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),
@@ -2187,7 +2187,7 @@
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 @@
******************************************************************************/
-gf_theme_editor_init(GaimPlugin *plugin) {
+gf_theme_editor_init(PurplePlugin *plugin) {