grim/guifications2

And we *FINALLY* work with pidgin!!!!
org.guifications.gf2
2007-02-24, Gary Kramlich
83af6f055aab
Parents 18bc4637bca7
Children 81e6940b7c9f
And we *FINALLY* work with pidgin!!!!
--- a/src/gf_action.c Sat Feb 24 22:24:08 2007 -0500
+++ b/src/gf_action.c Sat Feb 24 22:25:50 2007 -0500
@@ -391,11 +391,11 @@
type = gaim_conversation_get_type(conv);
if(type == GAIM_CONV_TYPE_IM || type == GAIM_CONV_TYPE_CHAT) {
- gaim_gtk_log_show(type, (type == GAIM_CONV_TYPE_IM) ? target : conv->name, account);
+ pidgin_log_show(type, (type == GAIM_CONV_TYPE_IM) ? target : conv->name, account);
gf_display_destroy(display);
}
} else if(target) {
- gaim_gtk_log_show(GAIM_CONV_TYPE_IM, target, account);
+ pidgin_log_show(GAIM_CONV_TYPE_IM, target, account);
gf_display_destroy(display);
}
@@ -449,7 +449,7 @@
GfEventInfo *info;
GaimAccount *account;
GaimConversation *conv = NULL;
- GaimGtkWindow *win = NULL;
+ PidginWindow *win = NULL;
const gchar *target;
info = gf_display_get_event_info(display);
@@ -464,13 +464,13 @@
}
if(conv) {
- win = GAIM_GTK_CONVERSATION(conv)->win;
+ win = PIDGIN_CONVERSATION(conv)->win;
if(!win) {
gf_display_destroy(display);
return;
}
- gaim_gtk_conv_window_switch_gtkconv(win, GAIM_GTK_CONVERSATION(conv));
+ pidgin_conv_window_switch_gtkconv(win, PIDGIN_CONVERSATION(conv));
gtk_window_present(GTK_WINDOW(win->window));
}
@@ -493,7 +493,7 @@
buddy = gf_event_info_get_buddy(info);
g_return_if_fail(buddy);
- gaim_gtk_pounce_editor_show(account, buddy->name, NULL);
+ pidgin_pounce_editor_show(account, buddy->name, NULL);
}
@@ -512,7 +512,7 @@
target = gf_event_info_get_target(info);
g_return_if_fail(target);
- gaim_gtk_log_show(GAIM_LOG_IM, target, account);
+ pidgin_log_show(GAIM_LOG_IM, target, account);
}
static void
@@ -530,7 +530,7 @@
conv = gf_event_info_get_conversation(info);
g_return_if_fail(conv);
- gaim_gtk_log_show(GAIM_LOG_CHAT, conv->name, account);
+ pidgin_log_show(GAIM_LOG_CHAT, conv->name, account);
}
static void
@@ -544,7 +544,7 @@
buddy = gf_event_info_get_buddy(info);
g_return_if_fail(buddy);
- gaim_gtkdialogs_alias_buddy(buddy);
+ pidgindialogs_alias_buddy(buddy);
}
static void
@@ -566,7 +566,7 @@
chat = gaim_blist_find_chat(account, conv->name);
g_return_if_fail(chat);
- gaim_gtkdialogs_alias_chat(chat);
+ pidgindialogs_alias_chat(chat);
}
static void
@@ -616,7 +616,7 @@
buddy = gf_event_info_get_buddy(info);
g_return_if_fail(buddy);
- gaim_gtkdialogs_remove_buddy(buddy);
+ pidgindialogs_remove_buddy(buddy);
}
static void
@@ -638,7 +638,7 @@
chat = gaim_blist_find_chat(account, conv->name);
g_return_if_fail(chat);
- gaim_gtkdialogs_remove_chat(chat);
+ pidgindialogs_remove_chat(chat);
}
static void
@@ -737,13 +737,13 @@
if(buddy || target) {
/* add get info if the prpl supports it */
if(prpl_info && prpl_info->get_info) {
- gaim_new_item_from_stock(menu, _("Get Info"), GAIM_STOCK_INFO,
+ pidgin_new_item_from_stock(menu, _("Get Info"), PIDGIN_STOCK_DIALOG_INFO,
G_CALLBACK(gf_action_context_info_cb),
display, 0, 0, NULL);
}
/* we can im anyone.. so.. */
- gaim_new_item_from_stock(menu, _("IM"), GAIM_STOCK_IM,
+ pidgin_new_item_from_stock(menu, _("IM"), PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW,
G_CALLBACK(gf_action_context_im_cb),
display, 0, 0, NULL);
@@ -754,7 +754,7 @@
* written a patch yet..
*/
if(buddy) {
- gaim_new_item_from_stock(menu, _("Add Buddy Pounce"), NULL,
+ pidgin_new_item_from_stock(menu, _("Add Buddy Pounce"), NULL,
G_CALLBACK(gf_action_context_pounce_cb),
display, 0, 0, NULL);
}
@@ -763,19 +763,19 @@
buddy = gaim_find_buddy(account, target);
if(buddy) {
- gaim_new_item_from_stock(menu, _("View IM log"), NULL,
+ pidgin_new_item_from_stock(menu, _("View IM log"), NULL,
G_CALLBACK(gf_action_context_log_buddy_cb),
display, 0, 0, NULL);
/* add the protocol menu */
- gaim_gtk_append_blist_node_proto_menu(menu, account->gc,
+ pidgin_append_blist_node_proto_menu(menu, account->gc,
(GaimBlistNode *)buddy);
/* and now the extended menu */
- gaim_gtk_append_blist_node_extended_menu(menu, (GaimBlistNode*)buddy);
+ pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode*)buddy);
/* separate it! */
- gaim_separator(menu);
+ pidgin_separator(menu);
}
/* we can't alias a non buddy, and we can't remove them either.. But if
@@ -783,21 +783,21 @@
*/
if(buddy) {
/* add the alias and remove button */
- gaim_new_item_from_stock(menu, _("Alias Buddy"), GAIM_STOCK_ALIAS,
+ pidgin_new_item_from_stock(menu, _("Alias Buddy"), PIDGIN_STOCK_ALIAS,
G_CALLBACK(gf_action_context_alias_buddy_cb),
display, 0, 0, NULL);
- gaim_new_item_from_stock(menu, _("Remove Buddy"), GTK_STOCK_REMOVE,
+ pidgin_new_item_from_stock(menu, _("Remove Buddy"), GTK_STOCK_REMOVE,
G_CALLBACK(gf_action_context_remove_buddy_cb),
display, 0, 0, NULL);
} else if(target) {
- gaim_new_item_from_stock(menu, _("Add Buddy"), GTK_STOCK_ADD,
+ pidgin_new_item_from_stock(menu, _("Add Buddy"), GTK_STOCK_ADD,
G_CALLBACK(gf_action_context_add_buddy_cb),
display, 0, 0, NULL);
}
/* Add a separtor if we have a buddy or target, and we have a chat */
if((buddy || target) && chat) {
- gaim_separator(menu);
+ pidgin_separator(menu);
chat_sep_added = TRUE;
}
@@ -809,11 +809,11 @@
(gaim_blist_node_get_string(node, "gtk-autojoin") != NULL));
/* add the join item, possibly redundant.. */
- gaim_new_item_from_stock(menu, _("Join"), GAIM_STOCK_CHAT,
+ pidgin_new_item_from_stock(menu, _("Join"), PIDGIN_STOCK_CHAT,
G_CALLBACK(gf_action_context_join_cb),
display, 0, 0, NULL);
- gaim_new_check_item(menu, _("Auto-join"),
+ pidgin_new_check_item(menu, _("Auto-join"),
G_CALLBACK(gf_action_context_autojoin_cb),
display, checked);
@@ -826,36 +826,36 @@
*/
if(conv && conv->type == GAIM_CONV_TYPE_CHAT) {
if(!chat_sep_added) {
- gaim_separator(menu);
+ pidgin_separator(menu);
chat_sep_added = TRUE;
}
- gaim_new_item_from_stock(menu, _("View Chat Log"), NULL,
+ pidgin_new_item_from_stock(menu, _("View Chat Log"), NULL,
G_CALLBACK(gf_action_context_log_chat_cb),
display, 0, 0, NULL);
}
if(chat) {
/* add the proto menu for the chat */
- gaim_gtk_append_blist_node_proto_menu(menu, account->gc,
+ pidgin_append_blist_node_proto_menu(menu, account->gc,
(GaimBlistNode *)chat);
/* add the extended menu for the chat */
- gaim_gtk_append_blist_node_extended_menu(menu, (GaimBlistNode *)chat);
+ pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode *)chat);
/* add the alias and remove buttons */
- gaim_new_item_from_stock(menu, _("Alias Chat"), GAIM_STOCK_ALIAS,
+ pidgin_new_item_from_stock(menu, _("Alias Chat"), PIDGIN_STOCK_ALIAS,
G_CALLBACK(gf_action_context_alias_chat_cb),
display, 0, 0, NULL);
- gaim_new_item_from_stock(menu, _("Remove Chat"), GTK_STOCK_REMOVE,
+ pidgin_new_item_from_stock(menu, _("Remove Chat"), GTK_STOCK_REMOVE,
G_CALLBACK(gf_action_context_remove_chat_cb),
display, 0, 0, NULL);
}
/* add the add chat item if it's not on our blist.. */
if(!chat && conv && conv->type == GAIM_CONV_TYPE_CHAT) {
- gaim_new_item_from_stock(menu, _("Add Chat"), GTK_STOCK_ADD,
+ 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_item_icon.c Sat Feb 24 22:24:08 2007 -0500
+++ b/src/gf_item_icon.c Sat Feb 24 22:25:50 2007 -0500
@@ -292,7 +292,7 @@
g_free(filename);
} else {
GaimAccount *account = gf_event_info_get_account(info);
- original = gaim_gtk_create_prpl_icon(account, 1.0);
+ original = pidgin_create_prpl_icon(account, 1.0);
}
} else if(item_icon->type == GF_ITEM_ICON_TYPE_BUDDY) {
GaimBuddyIcon *icon = NULL;
@@ -317,8 +317,8 @@
GaimBuddy *buddy = NULL;
if((buddy = gf_event_info_get_buddy(info))) {
- original = gaim_gtk_blist_get_status_icon((GaimBlistNode *)buddy,
- GAIM_STATUS_ICON_LARGE);
+ original = pidgin_blist_get_status_icon((GaimBlistNode *)buddy,
+ PIDGIN_STATUS_ICON_LARGE);
}
}
@@ -328,7 +328,7 @@
*/
if(!original) {
GaimAccount *account = gf_event_info_get_account(info);
- original = gaim_gtk_create_prpl_icon(account, 1.0);
+ original = pidgin_create_prpl_icon(account, 1.0);
if(!original)
return;
--- a/src/gf_preferences.c Sat Feb 24 22:24:08 2007 -0500
+++ b/src/gf_preferences.c Sat Feb 24 22:25:50 2007 -0500
@@ -217,14 +217,14 @@
sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
/* Display Options */
- frame = gaim_gtk_make_frame(vbox, _("Display Options"));
+ frame = pidgin_make_frame(vbox, _("Display Options"));
gtk_widget_show(frame);
option = make_option_menu(_("_Position:"), GF_PREF_APPEARANCE_POSITION, sg,
gf_menu_position);
gtk_box_pack_start(GTK_BOX(frame), option, FALSE, FALSE, 0);
- label = gaim_gtk_prefs_dropdown(frame, _("_Stack:"), GAIM_PREF_BOOLEAN,
+ label = pidgin_prefs_dropdown(frame, _("_Stack:"), GAIM_PREF_BOOLEAN,
GF_PREF_APPEARANCE_VERTICAL,
_("Vertically"), TRUE,
_("Horizontally"), FALSE,
@@ -232,7 +232,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_size_group_add_widget(sg, label);
- label = gaim_gtk_prefs_dropdown(frame, _("Show _while away:"),
+ label = pidgin_prefs_dropdown(frame, _("Show _while away:"),
GAIM_PREF_BOOLEAN,
GF_PREF_BEHAVIOR_SHOW_WHILE_AWAY,
_("Yes"), TRUE,
@@ -241,7 +241,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_size_group_add_widget(sg, label);
- label = gaim_gtk_prefs_dropdown(frame, _("_Animate:"), GAIM_PREF_BOOLEAN,
+ label = pidgin_prefs_dropdown(frame, _("_Animate:"), GAIM_PREF_BOOLEAN,
GF_PREF_APPEARANCE_ANIMATE,
_("Yes"), TRUE,
_("No"), FALSE,
@@ -249,14 +249,14 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
gtk_size_group_add_widget(sg, label);
- spin = gaim_gtk_prefs_labeled_spin_button(frame, _("_Display Time:"),
+ spin = pidgin_prefs_labeled_spin_button(frame, _("_Display Time:"),
GF_PREF_BEHAVIOR_DISPLAY_TIME,
1, 60, sg);
label = make_label(_("seconds"), NULL);
gtk_box_pack_start(GTK_BOX(spin), label, FALSE, FALSE, 0);
/* Mouse Options */
- frame = gaim_gtk_make_frame(vbox, _("Mouse"));
+ frame = pidgin_make_frame(vbox, _("Mouse"));
gtk_widget_show(frame);
option = make_mouse_option_menu(_("_Left:"), GF_PREF_MOUSE_LEFT, sg);
@@ -995,7 +995,7 @@
menu = gtk_menu_new();
- gaim_new_item_from_stock(menu, _("New"), GTK_STOCK_NEW,
+ pidgin_new_item_from_stock(menu, _("New"), GTK_STOCK_NEW,
G_CALLBACK(theme_list_new_cb), NULL,
0, 0, NULL);
@@ -1007,11 +1007,11 @@
GF_THEME_COL_FILE, &filename, -1);
if(!gf_file_access(filename, W_OK)) {
- gaim_new_item_from_stock(menu, _("Edit"), GTK_STOCK_PREFERENCES,
+ pidgin_new_item_from_stock(menu, _("Edit"), GTK_STOCK_PREFERENCES,
G_CALLBACK(theme_list_edit_cb),
sel, 0, 0, NULL);
- gaim_new_item_from_stock(menu, _("Delete"), GTK_STOCK_DELETE,
+ pidgin_new_item_from_stock(menu, _("Delete"), GTK_STOCK_DELETE,
G_CALLBACK(theme_list_delete_cb),
sel, 0, 0, NULL);
}
@@ -1020,9 +1020,9 @@
g_free(filename);
}
- gaim_separator(menu);
+ pidgin_separator(menu);
- gaim_new_item_from_stock(menu, _("Refresh"), GTK_STOCK_REFRESH,
+ pidgin_new_item_from_stock(menu, _("Refresh"), GTK_STOCK_REFRESH,
G_CALLBACK(theme_list_refresh_cb), NULL,
0, 0, NULL);
@@ -1102,9 +1102,9 @@
gtk_box_pack_start(GTK_BOX(hbox), theme_data.theme_new, FALSE, FALSE, 0);
theme_data.theme_edit =
- gaim_pixbuf_button_from_stock(_("_Edit"),
+ pidgin_pixbuf_button_from_stock(_("_Edit"),
GTK_STOCK_PREFERENCES,
- GAIM_BUTTON_HORIZONTAL);
+ PIDGIN_BUTTON_HORIZONTAL);
gtk_button_set_relief(GTK_BUTTON(theme_data.theme_edit), GTK_RELIEF_NONE);
gtk_widget_set_sensitive(theme_data.theme_edit, FALSE);
g_signal_connect(G_OBJECT(theme_data.theme_edit), "clicked",
@@ -1132,9 +1132,9 @@
gtk_box_pack_start(GTK_BOX(hbox), theme_data.theme_refresh, FALSE, FALSE, 0);
theme_data.theme_get_more =
- gaim_pixbuf_button_from_stock(_("_Get More"),
+ pidgin_pixbuf_button_from_stock(_("_Get More"),
GTK_STOCK_JUMP_TO,
- GAIM_BUTTON_HORIZONTAL);
+ PIDGIN_BUTTON_HORIZONTAL);
gtk_button_set_relief(GTK_BUTTON(theme_data.theme_get_more), GTK_RELIEF_NONE);
g_signal_connect(G_OBJECT(theme_data.theme_get_more), "clicked",
G_CALLBACK(theme_list_get_more_cb), NULL);
@@ -1271,26 +1271,26 @@
vbox = make_notebook_page(GTK_NOTEBOOK(notebook), _("Advanced"), -1);
- frame = gaim_gtk_make_frame(vbox, _("Display Options"));
+ frame = pidgin_make_frame(vbox, _("Display Options"));
- gaim_gtk_prefs_labeled_spin_button(frame, _("Max _Visible Guifications:"),
+ pidgin_prefs_labeled_spin_button(frame, _("Max _Visible Guifications:"),
GF_PREF_BEHAVIOR_THROTTLE,
0, 255, sg);
#if GTK_CHECK_VERSION(2,2,0)
screen_count = gf_display_get_screen_count();
monitor_count = gf_display_get_monitor_count();
if(screen_count > 0 || monitor_count > 0) {
- frame = gaim_gtk_make_frame(vbox, _("Placement"));
+ frame = pidgin_make_frame(vbox, _("Placement"));
if(screen_count > 0) {
- gaim_gtk_prefs_labeled_spin_button(frame,
+ pidgin_prefs_labeled_spin_button(frame,
_("Show notifications on _screen:"),
GF_PREF_ADVANCED_SCREEN,
0, screen_count, sg);
}
if(monitor_count > 0) {
- gaim_gtk_prefs_labeled_spin_button(frame,
+ pidgin_prefs_labeled_spin_button(frame,
_("Show notifications on _monitor:"),
GF_PREF_ADVANCED_MONITOR,
0, monitor_count, sg);
--- a/src/guifications.c Sat Feb 24 22:24:08 2007 -0500
+++ b/src/guifications.c Sat Feb 24 22:25:50 2007 -0500
@@ -85,14 +85,14 @@
return TRUE;
}
-static GaimGtkPluginUiInfo ui_info = { gf_preferences_get_frame };
+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 */
- GAIM_GTK_PLUGIN_TYPE, /* ui requirement */
+ PIDGIN_PLUGIN_TYPE, /* ui requirement */
0, /* flags */
NULL, /* dependencies */
GAIM_PRIORITY_DEFAULT, /* priority */