Mercurial > pidgin
changeset 9759:b64ee81c7bcb
[gaim-migrate @ 10626]
A patch from Good Stu to make the gaim_gtkconv_button_new() function
public, which lets plugin authors use it. Plugin authors should
use it to create a button to be added to conversation windows.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 15 Aug 2004 23:09:53 +0000 |
parents | 4f2b50a06224 |
children | cee4e4cae56a |
files | plugins/ChangeLog.API src/gtkconv.c src/gtkconv.h |
diffstat | 3 files changed, 55 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/ChangeLog.API Sun Aug 15 23:07:54 2004 +0000 +++ b/plugins/ChangeLog.API Sun Aug 15 23:09:53 2004 +0000 @@ -2,21 +2,23 @@ version 0.82cvs: Gaim API: - * Removed multi.h - * Renamed ui.h to gtkdialogs.h - * Renamed show_info_dialog to gaim_gtkdialogs_info - * Renamed show_log_dialog to gaim_gtkdialogs_log - * Renamed show_warn_dialog to gaim_gtkdialogs_warn - * Renamed show_im_dialog to gaim_gtkdialogs_im - * Renamed gaim_gtkdialogs_new_im to gaim_gtkdialogs_im_with_user - * Renamed destroy_all_dialogs to gaim_gtkdialogs_destroy_all - * Renamed alias_dialog_bud to gaim_gtkdialogs_alias_buddy - * Renamed alias_dialog_contact to gaim_gtkdialogs_alias_contact - * Renamed alias_dialog_blist_chat to gaim_gtkdialogs_alias_chat - * Renamed show_confirm_del to gaim_gtkdialogs_remove_buddy - * Renamed show_confirm_del_group to gaim_gtkdialogs_remove_group - * Renamed show_confirm_del_blist_chat to gaim_gtkdialogs_remove_chat - * Renamed show_confirm_del_contact to gaim_gtkdialogs_remove_contact + * Removed: gaim_gtk_get_dispstyle(), gaim_gtk_change_text() + * Added: gaim_gtkconv_button_new() + * Removed: multi.h + * Renamed: ui.h to gtkdialogs.h + * Renamed: show_info_dialog to gaim_gtkdialogs_info + * Renamed: show_log_dialog to gaim_gtkdialogs_log + * Renamed: show_warn_dialog to gaim_gtkdialogs_warn + * Renamed: show_im_dialog to gaim_gtkdialogs_im + * Renamed: gaim_gtkdialogs_new_im to gaim_gtkdialogs_im_with_user + * Renamed: destroy_all_dialogs to gaim_gtkdialogs_destroy_all + * Renamed: alias_dialog_bud to gaim_gtkdialogs_alias_buddy + * Renamed: alias_dialog_contact to gaim_gtkdialogs_alias_contact + * Renamed: alias_dialog_blist_chat to gaim_gtkdialogs_alias_chat + * Renamed: show_confirm_del to gaim_gtkdialogs_remove_buddy + * Renamed: show_confirm_del_group to gaim_gtkdialogs_remove_group + * Renamed: show_confirm_del_blist_chat to gaim_gtkdialogs_remove_chat + * Renamed: show_confirm_del_contact to gaim_gtkdialogs_remove_contact Signals: * Added: conversation-updated for any update to the data associated @@ -27,17 +29,17 @@ * Most functions now have a void *data argument. Blist API: - * Added gaim_buddy_get_contact_alias - * Renamed gaim_get_buddy_alias to gaim_buddy_get_alias - * Renamed gaim_get_buddy_alias_only to gaim_buddy_get_alias_only + * Added: gaim_buddy_get_contact_alias + * Renamed: gaim_get_buddy_alias to gaim_buddy_get_alias + * Renamed: gaim_get_buddy_alias_only to gaim_buddy_get_alias_only Conversation API: - * Changed gaim_conv_chat_add_user(), added flags parameter - * Changed gaim_conv_chat_add_users(), added GList of flags parameter - * Changed gaim_conv_chat_get_users(), now returns a GList of - GaimChatBuddy's - * Changed gaim_conv_chat_set_users() now expects a GList of - GaimChatBuddy's + * Changed: gaim_conv_chat_add_user(), added flags parameter + * Changed: gaim_conv_chat_add_users(), added GList of flags parameter + * Changed: gaim_conv_chat_get_users(), now returns a GList of + GaimConvChatBuddy's + * Changed: gaim_conv_chat_set_users() now expects a GList of + GaimConvChatBuddy's * Added: gaim_conv_chat_set_user_flags() * Added: gaim_conv_chat_get_user_flags() * Added: gaim_conv_chat_find_user()
--- a/src/gtkconv.c Sun Aug 15 23:07:54 2004 +0000 +++ b/src/gtkconv.c Sun Aug 15 23:09:53 2004 +0000 @@ -3659,8 +3659,8 @@ return gtkwin->menu.menubar; } -static GtkWidget * -new_gtkconv_button(const char *icon, const char *text, const char *tooltip, GtkTooltips *tooltips, void *callback, void *data) +GtkWidget * +gaim_gtkconv_button_new(const char *icon, const char *text, const char *tooltip, GtkTooltips *tooltips, void *callback, void *data) { GtkWidget *button; int buttons; @@ -3701,49 +3701,49 @@ /* The buttons, from left to right */ /* Warn button */ - gtkim->warn = new_gtkconv_button(GAIM_STOCK_WARN, _("Warn"), + gtkim->warn = gaim_gtkconv_button_new(GAIM_STOCK_WARN, _("Warn"), _("Warn the user"), gtkconv->tooltips, warn_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkim->warn, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkim->warn); /* Block button */ - gtkim->block = new_gtkconv_button(GAIM_STOCK_BLOCK, _("Block"), + gtkim->block = gaim_gtkconv_button_new(GAIM_STOCK_BLOCK, _("Block"), _("Block the user"), gtkconv->tooltips, block_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkim->block, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkim->block); /* Send File button */ - gtkim->send_file = new_gtkconv_button(GAIM_STOCK_FILE_TRANSFER, _("Send File"), + gtkim->send_file = gaim_gtkconv_button_new(GAIM_STOCK_FILE_TRANSFER, _("Send File"), _("Send a file to the user"), gtkconv->tooltips, send_file_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkim->send_file, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkim->send_file); /* Add button */ - gtkconv->add = new_gtkconv_button(GTK_STOCK_ADD, _("Add"), + gtkconv->add = gaim_gtkconv_button_new(GTK_STOCK_ADD, _("Add"), _("Add the user to your buddy list"), gtkconv->tooltips, add_remove_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkconv->add, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkconv->add); /* Remove button */ - gtkconv->remove = new_gtkconv_button(GTK_STOCK_REMOVE, _("Remove"), + gtkconv->remove = gaim_gtkconv_button_new(GTK_STOCK_REMOVE, _("Remove"), _("Remove the user from your buddy list"), gtkconv->tooltips, add_remove_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkconv->remove, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkconv->remove); /* Info button */ - gtkconv->info = new_gtkconv_button(GAIM_STOCK_INFO, _("Info"), + gtkconv->info = gaim_gtkconv_button_new(GAIM_STOCK_INFO, _("Info"), _("Get the user's information"), gtkconv->tooltips, info_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkconv->info, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkconv->info); /* Send button */ - gtkconv->send = new_gtkconv_button(GAIM_STOCK_SEND, _("Send"), + gtkconv->send = gaim_gtkconv_button_new(GAIM_STOCK_SEND, _("Send"), _("Send message"), gtkconv->tooltips, send_cb, conv); gtk_box_pack_end(GTK_BOX(parent), gtkconv->send, FALSE, FALSE, 0); @@ -3786,28 +3786,28 @@ /* The buttons, from left to right */ /* Invite */ - gtkchat->invite = new_gtkconv_button(GAIM_STOCK_INVITE, _("Invite"), + gtkchat->invite = gaim_gtkconv_button_new(GAIM_STOCK_INVITE, _("Invite"), _("Invite a usuer"), gtkconv->tooltips, invite_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkchat->invite, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkchat->invite); /* Add button */ - gtkconv->add = new_gtkconv_button(GTK_STOCK_ADD, _("Add"), + gtkconv->add = gaim_gtkconv_button_new(GTK_STOCK_ADD, _("Add"), _("Add the chat to your buddy list"), gtkconv->tooltips, add_remove_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkconv->add, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkconv->add); /* Remove button */ - gtkconv->remove = new_gtkconv_button(GTK_STOCK_REMOVE, _("Remove"), + gtkconv->remove = gaim_gtkconv_button_new(GTK_STOCK_REMOVE, _("Remove"), _("Remove the chat from your buddy list"), gtkconv->tooltips, add_remove_cb, conv); gtk_box_pack_start(GTK_BOX(parent), gtkconv->remove, TRUE, TRUE, 0); gtk_size_group_add_widget(gtkconv->sg, gtkconv->remove); /* Send button */ - gtkconv->send = new_gtkconv_button(GAIM_STOCK_SEND, _("Send"), + gtkconv->send = gaim_gtkconv_button_new(GAIM_STOCK_SEND, _("Send"), _("Send message"), gtkconv->tooltips, send_cb, conv); gtk_box_pack_end(GTK_BOX(parent), gtkconv->send, FALSE, FALSE, 0);
--- a/src/gtkconv.h Sun Aug 15 23:07:54 2004 +0000 +++ b/src/gtkconv.h Sun Aug 15 23:09:53 2004 +0000 @@ -252,6 +252,22 @@ void gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv); /** + * Creates a conversation button + * + * @param icon The stock icon name. + * @param text The text for the button. + * @param tooltip The tooltip text. + * @param tooltips The group of tooltips. + * @param callback A function to call when the button is clicked. + * @param data Data to pass to the callback. + * + * @return The button + */ +GtkWidget *gaim_gtkconv_button_new(const char *icon, const char *text, + const char *tooltip, GtkTooltips *tooltips, + void *callback, void *data); + +/** * Returns the window at the specified X, Y location. * * If the window is not a GTK+ window, @c NULL is returned.