Mercurial > pidgin
changeset 15562:0b5db3387ded
merge of '491b12f6ff9efa13852cc40405bac9bd52b6a8b9'
and 'fdbbb7eccaa94a05c61e3e900be3507a63aa9445'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 05 Feb 2007 03:37:27 +0000 |
parents | 0c61cd8e5898 (diff) feee34cfff5f (current diff) |
children | 2286aac43694 |
files | pidgin/gtkgaim.h pidgin/pixmaps/emblems/16/message-pending.png pidgin/pixmaps/emblems/16/scalable/message-pending.svg pidgin/pixmaps/status/16/invisible.png |
diffstat | 196 files changed, 6475 insertions(+), 4988 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Sun Feb 04 23:14:06 2007 +0000 +++ b/COPYRIGHT Mon Feb 05 03:37:27 2007 +0000 @@ -1,9 +1,10 @@ Gaim -Copyright (C) 1998-2006 by the following: +Copyright (C) 1998-2007 by the following: If you have contributed to Gaim, you deserve to be on this list. Contact us (see: AUTHORS) and we'll add you. +Saleem Abdulrasool Dave Ahlswede Manuel Amador Matt Amato @@ -243,6 +244,7 @@ Havoc Pennington Ted Percival Eduardo Pérez +Celso Pinto Joao LuÃs Marques Pinto Aleksander Piotrowski Julien Pivotto
--- a/NEWS Sun Feb 04 23:14:06 2007 +0000 +++ b/NEWS Mon Feb 05 03:37:27 2007 +0000 @@ -10,7 +10,9 @@ Gary: Long time no news. My silence will end soon ;) - Evan: My first news! I knocked out a nice collection of crashes, thanks in part to my ever-patient Adium beta testers. Gaim 2.0.0 is going to be delicious. :) + Evan: My first news! I knocked out a nice collection of crashes, + thanks in part to my ever-patient Adium beta testers. Gaim 2.0.0 + is going to be delicious. :) 2.0.0beta5 (11/9/2006): Sean: Another release in our endless stream in betas. This one's
--- a/configure.ac Sun Feb 04 23:14:06 2007 +0000 +++ b/configure.ac Mon Feb 05 03:37:27 2007 +0000 @@ -1026,7 +1026,7 @@ dnl ####################################################################### dnl # Check for Mono support dnl ####################################################################### -AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no) +AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support (experimental)])], , enable_mono=no) if test x"$enable_mono" = x"yes" ; then AC_MSG_CHECKING(for Mono compile flags) MONO_CFLAGS=`pkg-config --cflags mono 2> /dev/null`
--- a/gaim.spec.in Sun Feb 04 23:14:06 2007 +0000 +++ b/gaim.spec.in Mon Feb 05 03:37:27 2007 +0000 @@ -6,7 +6,7 @@ # When not doing betas comment this out # NOTE: %defines in spec files are evaluated in comments so the correct # way to comment it out is to replace the % with # -%define beta 6 +#define beta 7 %if 0%{?beta} %define gaimver %(echo "@VERSION@"|sed -e 's/dev//; s/beta.*//') @@ -29,8 +29,6 @@ # Generic build requirements BuildRequires: libtool, pkgconfig, intltool, gettext, libxml2-devel %{?_with_avahi:BuildRequires: avahi-compat-howl-devel} -%{?_with_dbus:BuildRequires: dbus-devel >= 0.35} -%{!?_without_gstreamer:BuildRequires: gstreamer-devel >= 0.10} %{!?_without_gtkspell:BuildRequires: gtkspell-devel} %{?_with_howl:BuildRequires: howl-devel} %{?_with_meanwhile:BuildRequires: meanwhile-devel} @@ -40,6 +38,16 @@ %{?_with_tcl:BuildRequires: tcl, tk, /usr/include/tcl.h} %{!?_without_text:BuildRequires: ncurses-devel} +%if "%{_vendor}" == "suse" +# For SuSE: +BuildRequires: gnutls-devel +%{?_with_dbus:BuildRequires: dbus-1-devel >= 0.35} +%{!?_without_gstreamer:BuildRequires: gstreamer010-devel >= 0.10} +%else +%{?_with_dbus:BuildRequires: dbus-devel >= 0.35} +%{!?_without_gstreamer:BuildRequires: gstreamer-devel >= 0.10} +%endif + # Mandrake 10.1 and lower || Mandrake 10.2 (and higher?) %if "%{_vendor}" == "MandrakeSoft" || "%{_vendor}" == "Mandrakesoft" || "%{_vendor}" == "Mandriva" # For Mandrake/Mandriva: @@ -48,10 +56,7 @@ %else # For SuSE, Red Hat, Fedora and others: BuildRequires: gtk2-devel -%if "%{_vendor}" == "suse" -# For SuSE: -BuildRequires: gnutls-devel -%else +%if "%{_vendor}" != "suse" # For Red Hat, Fedora and others: # let's assume RH & FC1 are the only brain-dead distros missing the # perl-XML-Parser dependency on intltool and that other RH/FC releases
--- a/libpurple/gaim-compat.h Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/gaim-compat.h Mon Feb 05 03:37:27 2007 +0000 @@ -1148,4 +1148,700 @@ #define gaim_notify_init purple_notify_init #define gaim_notify_uninit purple_notify_uninit +/* from ntlm.h */ + +#define gaim_ntlm_gen_type1 purple_ntlm_gen_type1 +#define gaim_ntlm_parse_type2 purple_ntlm_parse_type2 +#define gaim_ntlm_gen_type3 purple_ntlm_gen_type3 + +/* from plugin.h */ + +#define GaimPlugin PurplePlugin +#define GaimPluginInfo PurplePluginInfo +#define GaimPluginUiInfo PurplePluginUiInfo +#define GaimPluginLoaderInfo PurplePluginLoaderInfo +#define GaimPluginAction PurplePluginAction +#define GaimPluginPriority PurplePluginPriority + +#define GAIM_PLUGIN_UNKNOWN PURPLE_PLUGIN_UNKNOWN +#define GAIM_PLUGIN_STANDARD PURPLE_PLUGIN_STANDARD +#define GAIM_PLUGIN_LOADER PURPLE_PLUGIN_LOADER +#define GAIM_PLUGIN_PROTOCOL PURPLE_PLUGIN_PROTOCOL + +#define GaimPluginType PurplePluginType + +#define GAIM_PRIORITY_DEFAULT PURPLE_PRIORITY_DEFAULT +#define GAIM_PRIORITY_HIGHEST PURPLE_PRIORITY_HIGHEST +#define GAIM_PRIORITY_LOWEST PURPLE_PRIORITY_LOWEST + +#define GAIM_PLUGIN_FLAG_INVISIBLE PURPLE_PLUGIN_FLAG_INVISIBLE + +#define GAIM_PLUGIN_MAGIC PURPLE_PLUGIN_MAGIC + +#define GAIM_PLUGIN_LOADER_INFO PURPLE_PLUGIN_LOADER_INFO +#define GAIM_PLUGIN_HAS_PREF_FRAME PURPLE_PLUGIN_HAS_PREF_FRAME +#define GAIM_PLUGIN_UI_INFO PURPLE_PLUGIN_UI_INFO + +#define GAIM_PLUGIN_HAS_ACTIONS PURPLE_PLUGIN_HAS_ACTIONS +#define GAIM_PLUGIN_ACTIONS PURPLE_PLUGIN_ACTIONS + +#define GAIM_INIT_PLUGIN PURPLE_INIT_PLUGIN + +#define gaim_plugin_new purple_plugin_new +#define gaim_plugin_probe purple_plugin_probe +#define gaim_plugin_register purple_plugin_register +#define gaim_plugin_load purple_plugin_load +#define gaim_plugin_unload purple_plugin_unload +#define gaim_plugin_reload purple_plugin_reload +#define gaim_plugin_destroy purple_plugin_destroy +#define gaim_plugin_is_loaded purple_plugin_is_loaded +#define gaim_plugin_is_unloadable purple_plugin_is_unloadable +#define gaim_plugin_get_id purple_plugin_get_id +#define gaim_plugin_get_name purple_plugin_get_name +#define gaim_plugin_get_version purple_plugin_get_version +#define gaim_plugin_get_summary purple_plugin_get_summary +#define gaim_plugin_get_description purple_plugin_get_description +#define gaim_plugin_get_author purple_plugin_get_author +#define gaim_plugin_get_homepage purple_plugin_get_homepage + +#define gaim_plugin_ipc_register purple_plugin_ipc_register +#define gaim_plugin_ipc_unregister purple_plugin_ipc_unregister +#define gaim_plugin_ipc_unregister_all purple_plugin_ipc_unregister_all +#define gaim_plugin_ipc_get_params purple_plugin_ipc_get_params +#define gaim_plugin_ipc_call purple_plugin_ipc_call + +#define gaim_plugins_add_search_path purple_plugins_add_search_path +#define gaim_plugins_unload_all purple_plugins_unload_all +#define gaim_plugins_destroy_all purple_plugins_destroy_all +#define gaim_plugins_save_loaded purple_plugins_save_loaded +#define gaim_plugins_load_saved purple_plugins_load_saved +#define gaim_plugins_probe purple_plugins_probe +#define gaim_plugins_enabled purple_plugins_enabled + +#define gaim_plugins_register_probe_notify_cb purple_plugins_register_probe_notify_cb +#define gaim_plugins_unregister_probe_notify_cb purple_plugins_unregister_probe_notify_cb +#define gaim_plugins_register_load_notify_cb purple_plugins_register_load_notify_cb +#define gaim_plugins_unregister_load_notify_cb purple_plugins_unregister_load_notify_cb +#define gaim_plugins_register_unload_notify_cb purple_plugins_register_unload_notify_cb +#define gaim_plugins_unregister_unload_notify_cb purple_plugins_unregister_unload_notify_cb + +#define gaim_plugins_find_with_name purple_plugins_find_with_name +#define gaim_plugins_find_with_filename purple_plugins_find_with_filename +#define gaim_plugins_find_with_basename purple_plugins_find_with_basename +#define gaim_plugins_find_with_id purple_plugins_find_with_id + +#define gaim_plugins_get_loaded purple_plugins_get_loaded +#define gaim_plugins_get_protocols purple_plugins_get_protocols +#define gaim_plugins_get_all purple_plugins_get_all + +#define gaim_plugins_get_handle purple_plugins_get_handle +#define gaim_plugins_init purple_plugins_init +#define gaim_plugins_uninit purple_plugins_uninit + +#define gaim_plugin_action_new purple_plugin_action_new +#define gaim_plugin_action_free purple_plugin_action_free + +/* pluginpref.h */ + +#define GaimPluginPrefFrame PurplePluginPrefFrame +#define GaimPluginPref PurplePluginPref + +#define GAIM_STRING_FORMAT_TYPE_NONE PURPLE_STRING_FORMAT_TYPE_NONE +#define GAIM_STRING_FORMAT_TYPE_MULTILINE PURPLE_STRING_FORMAT_TYPE_MULTILINE +#define GAIM_STRING_FORMAT_TYPE_HTML PURPLE_STRING_FORMAT_TYPE_HTML + +#define GaimStringFormatType PurpleStringFormatType + +#define GAIM_PLUGIN_PREF_NONE PURPLE_PLUGIN_PREF_NONE +#define GAIM_PLUGIN_PREF_CHOICE PURPLE_PLUGIN_PREF_CHOICE +#define GAIM_PLUGIN_PREF_INFO PURPLE_PLUGIN_PREF_INFO +#define GAIM_PLUGIN_PREF_STRING_FORMAT PURPLE_PLUGIN_PREF_STRING_FORMAT + +#define GaimPluginPrefType PurplePluginPrefType + +#define gaim_plugin_pref_frame_new purple_plugin_pref_frame_new +#define gaim_plugin_pref_frame_destroy purple_plugin_pref_frame_destroy +#define gaim_plugin_pref_frame_add purple_plugin_pref_frame_add +#define gaim_plugin_pref_frame_get_prefs purple_plugin_pref_frame_get_prefs + +#define gaim_plugin_pref_new purple_plugin_pref_new +#define gaim_plugin_pref_new_with_name purple_plugin_pref_new_with_name +#define gaim_plugin_pref_new_with_label purple_plugin_pref_new_with_label +#define gaim_plugin_pref_new_with_name_and_label purple_plugin_pref_new_with_name_and_label +#define gaim_plugin_pref_destroy purple_plugin_pref_destroy +#define gaim_plugin_pref_set_name purple_plugin_pref_set_name +#define gaim_plugin_pref_get_name purple_plugin_pref_get_name +#define gaim_plugin_pref_set_label purple_plugin_pref_set_label +#define gaim_plugin_pref_get_label purple_plugin_pref_get_label +#define gaim_plugin_pref_set_bounds purple_plugin_pref_set_bounds +#define gaim_plugin_pref_get_bounds purple_plugin_pref_get_bounds +#define gaim_plugin_pref_set_type purple_plugin_pref_set_type +#define gaim_plugin_pref_get_type purple_plugin_pref_get_type +#define gaim_plugin_pref_add_choice purple_plugin_pref_add_choice +#define gaim_plugin_pref_get_choices purple_plugin_pref_get_choices +#define gaim_plugin_pref_set_max_length purple_plugin_pref_set_max_length +#define gaim_plugin_pref_get_max_length purple_plugin_pref_get_max_length +#define gaim_plugin_pref_set_masked purple_plugin_pref_set_masked +#define gaim_plugin_pref_get_masked purple_plugin_pref_get_masked +#define gaim_plugin_pref_set_format_type purple_plugin_pref_set_format_type +#define gaim_plugin_pref_get_format_type purple_plugin_pref_get_format_type + +/* from pounce.h */ + +#define GaimPounce PurplePounce + +#define GAIM_POUNCE_NONE PURPLE_POUNCE_NONE +#define GAIM_POUNCE_SIGNON PURPLE_POUNCE_SIGNON +#define GAIM_POUNCE_SIGNOFF PURPLE_POUNCE_SIGNOFF +#define GAIM_POUNCE_AWAY PURPLE_POUNCE_AWAY +#define GAIM_POUNCE_AWAY_RETURN PURPLE_POUNCE_AWAY_RETURN +#define GAIM_POUNCE_IDLE PURPLE_POUNCE_IDLE +#define GAIM_POUNCE_IDLE_RETURN PURPLE_POUNCE_IDLE_RETURN +#define GAIM_POUNCE_TYPING PURPLE_POUNCE_TYPING +#define GAIM_POUNCE_TYPED PURPLE_POUNCE_TYPED +#define GAIM_POUNCE_TYPING_STOPPED PURPLE_POUNCE_TYPING_STOPPED +#define GAIM_POUNCE_MESSAGE_RECEIVED PURPLE_POUNCE_MESSAGE_RECEIVED +#define GaimPounceEvent PurplePounceEvent + +#define GAIM_POUNCE_OPTION_NONE PURPLE_POUNCE_OPTION_NONE +#define GAIM_POUNCE_OPTION_AWAY PURPLE_POUNCE_OPTION_AWAY +#define GaimPounceOption PurplePounceOption + +#define GaimPounceCb PurplePounceCb + +#define gaim_pounce_new purple_pounce_new +#define gaim_pounce_destroy purple_pounce_destroy +#define gaim_pounce_destroy_all_by_account purple_pounce_destroy_all_by_account +#define gaim_pounce_set_events purple_pounce_set_events +#define gaim_pounce_set_options purple_pounce_set_options +#define gaim_pounce_set_pouncer purple_pounce_set_pouncer +#define gaim_pounce_set_pouncee purple_pounce_set_pouncee +#define gaim_pounce_set_save purple_pounce_set_save +#define gaim_pounce_action_register purple_pounce_action_register +#define gaim_pounce_action_set_enabled purple_pounce_action_set_enabled +#define gaim_pounce_action_set_attribute purple_pounce_action_set_attribute +#define gaim_pounce_set_data purple_pounce_set_data +#define gaim_pounce_get_events purple_pounce_get_events +#define gaim_pounce_get_options purple_pounce_get_options +#define gaim_pounce_get_pouncer purple_pounce_get_pouncer +#define gaim_pounce_get_pouncee purple_pounce_get_pouncee +#define gaim_pounce_get_save purple_pounce_get_save +#define gaim_pounce_action_is_enabled purple_pounce_action_is_enabled +#define gaim_pounce_action_get_attribute purple_pounce_action_get_attribute +#define gaim_pounce_get_data purple_pounce_get_data +#define gaim_pounce_execute purple_pounce_execute + +#define gaim_find_pounce purple_find_pounce +#define gaim_pounces_load purple_pounces_load +#define gaim_pounces_register_handler purple_pounces_register_handler +#define gaim_pounces_unregister_handler purple_pounces_unregister_handler +#define gaim_pounces_get_all purple_pounces_get_all +#define gaim_pounces_get_handle purple_pounces_get_handle +#define gaim_pounces_init purple_pounces_init +#define gaim_pounces_uninit purple_pounces_uninit + +/* from prefs.h */ + + +#define GAIM_PREF_NONE PURPLE_PREF_NONE +#define GAIM_PREF_BOOLEAN PURPLE_PREF_BOOLEAN +#define GAIM_PREF_INT PURPLE_PREF_INT +#define GAIM_PREF_STRING PURPLE_PREF_STRING +#define GAIM_PREF_STRING_LIST PURPLE_PREF_STRING_LIST +#define GAIM_PREF_PATH PURPLE_PREF_PATH +#define GAIM_PREF_PATH_LIST PURPLE_PREF_PATH_LIST +#define GaimPrefType PurplePrefType + +#define GaimPrefCallback PurplePrefCallback + +#define gaim_prefs_get_handle purple_prefs_get_handle +#define gaim_prefs_init purple_prefs_init +#define gaim_prefs_uninit purple_prefs_uninit +#define gaim_prefs_add_none purple_prefs_add_none +#define gaim_prefs_add_bool purple_prefs_add_bool +#define gaim_prefs_add_int purple_prefs_add_int +#define gaim_prefs_add_string purple_prefs_add_string +#define gaim_prefs_add_string_list purple_prefs_add_string_list +#define gaim_prefs_add_path purple_prefs_add_path +#define gaim_prefs_add_path_list purple_prefs_add_path_list +#define gaim_prefs_remove purple_prefs_remove +#define gaim_prefs_rename purple_prefs_rename +#define gaim_prefs_rename_boolean_toggle purple_prefs_rename_boolean_toggle +#define gaim_prefs_destroy purple_prefs_destroy +#define gaim_prefs_set_generic purple_prefs_set_generic +#define gaim_prefs_set_bool purple_prefs_set_bool +#define gaim_prefs_set_int purple_prefs_set_int +#define gaim_prefs_set_string purple_prefs_set_string +#define gaim_prefs_set_string_list purple_prefs_set_string_list +#define gaim_prefs_set_path purple_prefs_set_path +#define gaim_prefs_set_path_list purple_prefs_set_path_list +#define gaim_prefs_exists purple_prefs_exists +#define gaim_prefs_get_type purple_prefs_get_type +#define gaim_prefs_get_bool purple_prefs_get_bool +#define gaim_prefs_get_int purple_prefs_get_int +#define gaim_prefs_get_string purple_prefs_get_string +#define gaim_prefs_get_string_list purple_prefs_get_string_list +#define gaim_prefs_get_path purple_prefs_get_path +#define gaim_prefs_get_path_list purple_prefs_get_path_list +#define gaim_prefs_connect_callback purple_prefs_connect_callback +#define gaim_prefs_disconnect_callback purple_prefs_disconnect_callback +#define gaim_prefs_disconnect_by_handle purple_prefs_disconnect_by_handle +#define gaim_prefs_trigger_callback purple_prefs_trigger_callback +#define gaim_prefs_load purple_prefs_load +#define gaim_prefs_update_old purple_prefs_update_old + +/* from privacy.h */ + +#define GAIM_PRIVACY_ALLOW_ALL PURPLE_PRIVACY_ALLOW_ALL +#define GAIM_PRIVACY_DENY_ALL PURPLE_PRIVACY_DENY_ALL +#define GAIM_PRIVACY_ALLOW_USERS PURPLE_PRIVACY_ALLOW_USERS +#define GAIM_PRIVACY_DENY_USERS PURPLE_PRIVACY_DENY_USERS +#define GAIM_PRIVACY_ALLOW_BUDDYLIST PURPLE_PRIVACY_ALLOW_BUDDYLIST +#define GaimPrivacyType PurplePrivacyType + +#define GaimPrivacyUiOps PurplePrivacyUiOps + +#define gaim_privacy_permit_add purple_privacy_permit_add +#define gaim_privacy_permit_remove purple_privacy_permit_remove +#define gaim_privacy_deny_add purple_privacy_deny_add +#define gaim_privacy_deny_remove purple_privacy_deny_remove +#define gaim_privacy_allow purple_privacy_allow +#define gaim_privacy_deny purple_privacy_deny +#define gaim_privacy_check purple_privacy_check +#define gaim_privacy_set_ui_ops purple_privacy_set_ui_ops +#define gaim_privacy_get_ui_ops purple_privacy_get_ui_ops +#define gaim_privacy_init purple_privacy_init + +/* from proxy.h */ + +#define GAIM_PROXY_USE_GLOBAL PURPLE_PROXY_USE_GLOBAL +#define GAIM_PROXY_NONE PURPLE_PROXY_NONE +#define GAIM_PROXY_HTTP PURPLE_PROXY_HTTP +#define GAIM_PROXY_SOCKS4 PURPLE_PROXY_SOCKS4 +#define GAIM_PROXY_SOCKS5 PURPLE_PROXY_SOCKS5 +#define GAIM_PROXY_USE_ENVVAR PURPLE_PROXY_USE_ENVVAR +#define GaimProxyType PurpleProxyType + +#define GaimProxyInfo PurpleProxyInfo + +#define GaimProxyConnectData PurpleProxyConnectData +#define GaimProxyConnectFunction PurpleProxyConnectFunction + +#define gaim_proxy_info_new purple_proxy_info_new +#define gaim_proxy_info_destroy purple_proxy_info_destroy +#define gaim_proxy_info_set_type purple_proxy_info_set_type +#define gaim_proxy_info_set_host purple_proxy_info_set_host +#define gaim_proxy_info_set_port purple_proxy_info_set_port +#define gaim_proxy_info_set_username purple_proxy_info_set_username +#define gaim_proxy_info_set_password purple_proxy_info_set_password +#define gaim_proxy_info_get_type purple_proxy_info_get_type +#define gaim_proxy_info_get_host purple_proxy_info_get_host +#define gaim_proxy_info_get_port purple_proxy_info_get_port +#define gaim_proxy_info_get_username purple_proxy_info_get_username +#define gaim_proxy_info_get_password purple_proxy_info_get_password + +#define gaim_global_proxy_get_info purple_global_proxy_get_info +#define gaim_proxy_get_handle purple_proxy_get_handle +#define gaim_proxy_init purple_proxy_init +#define gaim_proxy_uninit purple_proxy_uninit +#define gaim_proxy_get_setup purple_proxy_get_setup + +#define gaim_proxy_connect purple_proxy_connect +#define gaim_proxy_connect_socks5 purple_proxy_connect_socks5 +#define gaim_proxy_connect_cancel purple_proxy_connect_cancel +#define gaim_proxy_connect_cancel_with_handle purple_proxy_connect_cancel_with_handle + +/* from prpl.h */ + +#define GaimPluginProtocolInfo PurplePluginProtocolInfo + +#define GAIM_ICON_SCALE_DISPLAY PURPLE_ICON_SCALE_DISPLAY +#define GAIM_ICON_SCALE_SEND PURPLE_ICON_SCALE_SEND +#define GaimIconScaleRules PurpleIconScaleRules + +#define GaimBuddyIconSpec PurpleBuddyIconSpec + +#define GaimProtocolOptions PurpleProtocolOptions + +#define GAIM_IS_PROTOCOL_PLUGIN PURPLE_IS_PROTOCOL_PLUGIN + +#define GAIM_PLUGIN_PROTOCOL_INFO PURPLE_PLUGIN_PROTOCOL_INFO + +#define gaim_prpl_got_account_idle purple_prpl_got_account_idle +#define gaim_prpl_got_account_login_time purple_prpl_got_account_login_time +#define gaim_prpl_got_account_status purple_prpl_got_account_status +#define gaim_prpl_got_user_idle purple_prpl_got_user_idle +#define gaim_prpl_got_user_login_time purple_prpl_got_user_login_time +#define gaim_prpl_got_user_status purple_prpl_got_user_status +#define gaim_prpl_change_account_status purple_prpl_change_account_status +#define gaim_prpl_get_statuses purple_prpl_get_statuses + +#define gaim_find_prpl purple_find_prpl + +/* from request.h */ + +#define GAIM_DEFAULT_ACTION_NONE PURPLE_DEFAULT_ACTION_NONE + +#define GAIM_REQUEST_INPUT PURPLE_REQUEST_INPUT +#define GAIM_REQUEST_CHOICE PURPLE_REQUEST_CHOICE +#define GAIM_REQUEST_ACTION PURPLE_REQUEST_ACTION +#define GAIM_REQUEST_FIELDS PURPLE_REQUEST_FIELDS +#define GAIM_REQUEST_FILE PURPLE_REQUEST_FILE +#define GAIM_REQUEST_FOLDER PURPLE_REQUEST_FOLDER +#define GaimRequestType PurpleRequestType + +#define GAIM_REQUEST_FIELD_NONE PURPLE_REQUEST_FIELD_NONE +#define GAIM_REQUEST_FIELD_STRING PURPLE_REQUEST_FIELD_STRING +#define GAIM_REQUEST_FIELD_INTEGER PURPLE_REQUEST_FIELD_INTEGER +#define GAIM_REQUEST_FIELD_BOOLEAN PURPLE_REQUEST_FIELD_BOOLEAN +#define GAIM_REQUEST_FIELD_CHOICE PURPLE_REQUEST_FIELD_CHOICE +#define GAIM_REQUEST_FIELD_LIST PURPLE_REQUEST_FIELD_LIST +#define GAIM_REQUEST_FIELD_LABEL PURPLE_REQUEST_FIELD_LABEL +#define GAIM_REQUEST_FIELD_IMAGE PURPLE_REQUEST_FIELD_IMAGE +#define GAIM_REQUEST_FIELD_ACCOUNT PURPLE_REQUEST_FIELD_ACCOUNT +#define GaimRequestFieldType PurpleRequestFieldType + +#define GaimRequestFields PurpleRequestFields + +#define GaimRequestFieldGroup PurpleRequestFieldGroup + +#define GaimRequestField PurpleRequestField + +#define GaimRequestUiOps PurpleRequestUiOps + +#define GaimRequestInputCb PurpleRequestInputCb +#define GaimRequestActionCb PurpleRequestActionCb +#define GaimRequestChoiceCb PurpleRequestChoiceCb +#define GaimRequestFieldsCb PurpleRequestFieldsCb +#define GaimRequestFileCb PurpleRequestFileCb + +#define gaim_request_fields_new purple_request_fields_new +#define gaim_request_fields_destroy purple_request_fields_destroy +#define gaim_request_fields_add_group purple_request_fields_add_group +#define gaim_request_fields_get_groups purple_request_fields_get_groups +#define gaim_request_fields_exists purple_request_fields_exists +#define gaim_request_fields_get_required purple_request_fields_get_required +#define gaim_request_fields_is_field_required purple_request_fields_is_field_required +#define gaim_request_fields_all_required_filled purple_request_fields_all_required_filled +#define gaim_request_fields_get_field purple_request_fields_get_field +#define gaim_request_fields_get_string purple_request_fields_get_string +#define gaim_request_fields_get_integer purple_request_fields_get_integer +#define gaim_request_fields_get_bool purple_request_fields_get_bool +#define gaim_request_fields_get_choice purple_request_fields_get_choice +#define gaim_request_fields_get_account purple_request_fields_get_account + +#define gaim_request_field_group_new purple_request_field_group_new +#define gaim_request_field_group_destroy purple_request_field_group_destroy +#define gaim_request_field_group_add_field purple_request_field_group_add_field +#define gaim_request_field_group_get_title purple_request_field_group_get_title +#define gaim_request_field_group_get_fields purple_request_field_group_get_fields + +#define gaim_request_field_new purple_request_field_new +#define gaim_request_field_destroy purple_request_field_destroy +#define gaim_request_field_set_label purple_request_field_set_label +#define gaim_request_field_set_visible purple_request_field_set_visible +#define gaim_request_field_set_type_hint purple_request_field_set_type_hint +#define gaim_request_field_set_required purple_request_field_set_required +#define gaim_request_field_get_type purple_request_field_get_type +#define gaim_request_field_get_id purple_request_field_get_id +#define gaim_request_field_get_label purple_request_field_get_label +#define gaim_request_field_is_visible purple_request_field_is_visible +#define gaim_request_field_get_type_hint purple_request_field_get_type_hint +#define gaim_request_field_is_required purple_request_field_is_required + +#define gaim_request_field_string_new purple_request_field_string_new +#define gaim_request_field_string_set_default_value \ + purple_request_field_string_set_default_value +#define gaim_request_field_string_set_value purple_request_field_string_set_value +#define gaim_request_field_string_set_masked purple_request_field_string_set_masked +#define gaim_request_field_string_set_editable purple_request_field_string_set_editable +#define gaim_request_field_string_get_default_value \ + purple_request_field_string_get_default_value +#define gaim_request_field_string_get_value purple_request_field_string_get_value +#define gaim_request_field_string_is_multiline purple_request_field_string_is_multiline +#define gaim_request_field_string_is_masked purple_request_field_string_is_masked +#define gaim_request_field_string_is_editable purple_request_field_string_is_editable + +#define gaim_request_field_int_new purple_request_field_int_new +#define gaim_request_field_int_set_default_value \ + purple_request_field_int_set_default_value +#define gaim_request_field_int_set_value purple_request_field_int_set_value +#define gaim_request_field_int_get_default_value \ + purple_request_field_int_get_default_value +#define gaim_request_field_int_get_value purple_request_field_int_get_value + +#define gaim_request_field_bool_new purple_request_field_bool_new +#define gaim_request_field_bool_set_default_value \ + purple_request_field_book_set_default_value +#define gaim_request_field_bool_set_value purple_request_field_bool_set_value +#define gaim_request_field_bool_get_default_value \ + purple_request_field_bool_get_default_value +#define gaim_request_field_bool_get_value purple_request_field_bool_get_value + +#define gaim_request_field_choice_new purple_request_field_choice_new +#define gaim_request_field_choice_add purple_request_field_choice_add +#define gaim_request_field_choice_set_default_value \ + purple_request_field_choice_set_default_value +#define gaim_request_field_choice_set_value purple_request_field_choice_set_value +#define gaim_request_field_choice_get_default_value \ + purple_request_field_choice_get_default_value +#define gaim_request_field_choice_get_value purple_request_field_choice_get_value +#define gaim_request_field_choice_get_labels purple_request_field_choice_get_labels + +#define gaim_request_field_list_new purple_request_field_list_new +#define gaim_request_field_list_set_multi_select purple_request_field_list_set_multi_select +#define gaim_request_field_list_get_multi_select purple_request_field_list_get_multi_select +#define gaim_request_field_list_get_data purple_request_field_list_get_data +#define gaim_request_field_list_add purple_request_field_list_add +#define gaim_request_field_list_add_selected purple_request_field_list_add_selected +#define gaim_request_field_list_clear_selected purple_request_field_list_clear_selected +#define gaim_request_field_list_set_selected purple_request_field_list_set_selected +#define gaim_request_field_list_is_selected purple_request_field_list_is_selected +#define gaim_request_field_list_get_selected purple_request_field_list_get_selected +#define gaim_request_field_list_get_items purple_request_field_list_get_items + +#define gaim_request_field_label_new purple_request_field_label_new + +#define gaim_request_field_image_new purple_request_field_image_new +#define gaim_request_field_image_set_scale purple_request_field_image_set_scale +#define gaim_request_field_image_get_buffer purple_request_field_image_get_buffer +#define gaim_request_field_image_get_size purple_request_field_image_get_size +#define gaim_request_field_image_get_scale_x purple_request_field_image_get_scale_x +#define gaim_request_field_image_get_scale_y purple_request_field_image_get_scale_y + +#define gaim_request_field_account_new purple_request_field_account_new +#define gaim_request_field_account_set_default_value purple_request_field_account_set_default_value +#define gaim_request_field_account_set_value purple_request_field_account_set_value +#define gaim_request_field_account_set_show_all purple_request_field_account_set_show_all +#define gaim_request_field_account_set_filter purple_request_field_account_set_filter +#define gaim_request_field_account_get_default_value purple_request_field_account_get_default_value +#define gaim_request_field_account_get_value purple_request_field_account_get_value +#define gaim_request_field_account_get_show_all purple_request_field_account_get_show_all +#define gaim_request_field_account_get_filter purple_request_field_account_get_filter + +#define gaim_request_input purple_request_input +#define gaim_request_choice purple_request_choice +#define gaim_request_choice_varg purple_request_choice_varg +#define gaim_request_action purple_request_action +#define gaim_request_action_varg purple_request_action_varg +#define gaim_request_fields purple_request_fields +#define gaim_request_close purple_request_close +#define gaim_request_close_with_handle purple_request_close_with_handle + +#define gaim_request_yes_no purple_request_yes_no +#define gaim_request_ok_cancel purple_request_ok_cancel +#define gaim_request_accept_cancel purple_request_accept_cancel + +#define gaim_request_file purple_request_file +#define gaim_request_folder purple_request_folder + +#define gaim_request_set_ui_ops purple_request_set_ui_ops +#define gaim_request_get_ui_ops purple_request_get_ui_ops + +/* from roomlist.h */ + +#define GaimRoomlist PurpleRoomlist +#define GaimRoomlistRoom PurpleRoomlistRoom +#define GaimRoomlistField PurpleRoomlistField +#define GaimRoomlistUiOps PurpleRoomlistUiOps + +#define GAIM_ROOMLIST_ROOMTYPE_CATEGORY PURPLE_ROOMLIST_ROOMTYPE_CATEGORY +#define GAIM_ROOMLIST_ROOMTYPE_ROOM PURPLE_ROOMLIST_ROOMTYPE_ROOM +#define GaimRoomlistRoomType PurpleRoomlistRoomType + +#define GAIM_ROOMLIST_FIELD_BOOL PURPLE_ROOMLIST_BOOL +#define GAIM_ROOMLIST_FIELD_INT PURPLE_ROOMLIST_INT +#define GAIM_ROOMLIST_FIELD_STRING PURPLE_ROOMLIST_STRING +#define GaimRoomlistFieldType PurpleRoomlistFieldType + +#define gaim_roomlist_show_with_account purple_roomlist_show_with_account +#define gaim_roomlist_new purple_roomlist_new +#define gaim_roomlist_ref purple_roomlist_ref +#define gaim_roomlist_unref purple_roomlist_unref +#define gaim_roomlist_set_fields purple_roomlist_set_fields +#define gaim_roomlist_set_in_progress purple_roomlist_set_in_progress +#define gaim_roomlist_get_in_progress purple_roomlist_get_in_progress +#define gaim_roomlist_room_add purple_roomlist_room_add + +#define gaim_roomlist_get_list purple_roomlist_get_list +#define gaim_roomlist_cancel_get_list purple_roomlist_cancel_get_list +#define gaim_roomlist_expand_category purple_roomlist_expand_category + +#define gaim_roomlist_room_new purple_roomlist_room_new +#define gaim_roomlist_room_add_field purple_roomlist_room_add_field +#define gaim_roomlist_room_join purple_roomlist_room_join +#define gaim_roomlist_field_new purple_roomlist_field_new + +#define gaim_roomlist_set_ui_ops purple_roomlist_set_ui_ops +#define gaim_roomlist_get_ui_ops purple_roomlist_get_ui_ops + +/* from savedstatuses.h */ + +#define GaimSavedStatus PurpleSavedStatus +#define GaimSavedStatusSub PurpleSavedStatusSub + +#define gaim_savedstatus_new purple_savedstatus_new +#define gaim_savedstatus_set_title purple_savedstatus_set_title +#define gaim_savedstatus_set_type purple_savedstatus_set_type +#define gaim_savedstatus_set_message purple_savedstatus_set_message +#define gaim_savedstatus_set_substatus purple_savedstatus_set_substatus +#define gaim_savedstatus_unset_substatus purple_savedstatus_unset_substatus +#define gaim_savedstatus_delete purple_savedstatus_delete + +#define gaim_savedstatuses_get_all purple_savedstatuses_get_all +#define gaim_savedstatuses_get_popular purple_savedstatuses_get_popular +#define gaim_savedstatus_get_current purple_savedstatus_get_current +#define gaim_savedstatus_get_default purple_savedstatus_get_default +#define gaim_savedstatus_get_idleaway purple_savedstatus_get_idleaway +#define gaim_savedstatus_is_idleaway purple_savedstatus_is_idleaway +#define gaim_savedstatus_set_idleaway purple_savedstatus_set_idleaway +#define gaim_savedstatus_get_startup purple_savedstatus_get_startup +#define gaim_savedstatus_find purple_savedstatus_find +#define gaim_savedstatus_find_by_creation_time purple_savedstatus_find_by_creation_time +#define gaim_savedstatus_find_transient_by_type_and_message \ + purple_savedstatus_find_transient_by_type_and_message + +#define gaim_savedstatus_is_transient purple_savedstatus_is_transient +#define gaim_savedstatus_get_title purple_savedstatus_get_title +#define gaim_savedstatus_get_type purple_savedstatus_get_type +#define gaim_savedstatus_get_message purple_savedstatus_get_message +#define gaim_savedstatus_get_creation_time purple_savedstatus_get_creation_time +#define gaim_savedstatus_has_substatuses purple_savedstatus_has_substatuses +#define gaim_savedstatus_get_substatus purple_savedstatus_get_substatus +#define gaim_savedstatus_substatus_get_type purple_savedstatus_substatus_get_type +#define gaim_savedstatus_substatus_get_message purple_savedstatus_substatus_get_message +#define gaim_savedstatus_activate purple_savedstatus_activate +#define gaim_savedstatus_activate_for_account purple_savedstatus_activate_for_account + +#define gaim_savedstatuses_get_handle purple_savedstatuses_get_handle +#define gaim_savedstatuses_init purple_savedstatuses_init +#define gaim_savedstatuses_uninit purple_savedstatuses_uninit + +/* from signals.h */ + +#define GAIM_CALLBACK PURPLE_CALLBACK + +#define GaimCallback PurpleCallback +#define GaimSignalMarshalFunc PurpleSignalMarshalFunc + +#define GAIM_SIGNAL_PRIORITY_DEFAULT PURPLE_SIGNAL_PRIORITY_DEFAULT +#define GAIM_SIGNAL_PRIORITY_HIGHEST PURPLE_SIGNAL_PRIORITY_HIGHEST +#define GAIM_SIGNAL_PRIORITY_LOWEST PURPLE_SIGNAL_PRIORITY_LOWEST + +#define gaim_signal_register purple_signal_register +#define gaim_signal_unregister purple_signal_unregister + +#define gaim_signals_unregister_by_instance purple_signals_unregister_by_instance + +#define gaim_signal_get_values purple_signal_get_values +#define gaim_signal_connect_priority purple_signal_connect_priority +#define gaim_signal_connect purple_signal_connect +#define gaim_signal_connect_priority_vargs purple_signal_connect_priority_vargs +#define gaim_signal_connect_vargs purple_signal_connect_vargs +#define gaim_signal_disconnect purple_signal_disconnect + +#define gaim_signals_disconnect_by_handle purple_signals_disconnect_by_handle + +#define gaim_signal_emit purple_signal_emit +#define gaim_signal_emit_vargs purple_signal_emit_vargs +#define gaim_signal_emit_return_1 purple_signal_emit_vargs +#define gaim_signal_emit_vargs_return_1 purple_signal_emit_vargs_return_1 + +#define gaim_signals_init purple_signals_init +#define gaim_signals_uninit purple_signals_uninit + +#define gaim_marshal_VOID \ + purple_marshal_VOID +#define gaim_marshal_VOID__INT \ + purple_marshal_VOID__INT +#define gaim_marshal_VOID__INT_INT \ + purple_marshal_VOID_INT_INT +#define gaim_marshal_VOID__POINTER \ + purple_marshal_VOID__POINTER +#define gaim_marshal_VOID__POINTER_UINT \ + purple_marshal_VOID__POINTER_UINT +#define gaim_marshal_VOID__POINTER_INT_INT \ + purple_marshal_VOID__POINTER_INT_INT +#define gaim_marshal_VOID__POINTER_POINTER \ + purple_marshal_VOID__POINTER_POINTER +#define gaim_marshal_VOID__POINTER_POINTER_UINT \ + purple_marshal_VOID__POINTER_POINTER_UINT +#define gaim_marshal_VOID__POINTER_POINTER_UINT_UINT \ + purple_marshal_VOID__POINTER_POINTER_UINT_UINT +#define gaim_marshal_VOID__POINTER_POINTER_POINTER \ + purple_marshal_VOID__POINTER_POINTER_POINTER +#define gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER \ + purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER +#define gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER \ + purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_POINTER +#define gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT \ + purple_marshal_VOID__POINTER_POINTER_POINTER_UINT +#define gaim_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT \ + purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER_UINT +#define gaim_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT \ + purple_marshal_VOID__POINTER_POINTER_POINTER_UINT_UINT + +#define gaim_marshal_INT__INT \ + purple_marshal_INT__INT +#define gaim_marshal_INT__INT_INT \ + purple_marshal_INT__INT_INT +#define gaim_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER \ + purple_marshal_INT__POINTER_POINTER_POINTER_POINTER_POINTER + +#define gaim_marshal_BOOLEAN__POINTER \ + purple_marshal_BOOLEAN__POINTER +#define gaim_marshal_BOOLEAN__POINTER_POINTER \ + purple_marshal_BOOLEAN__POINTER_POINTER +#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER \ + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER +#define gaim_marshal_BOOLEAN__POINTER_POINTER_UINT \ + purple_marshal_BOOLEAN__POINTER_POINTER_UINT +#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT \ + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_UINT +#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER \ + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER +#define gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER \ + purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER + +#define gaim_marshal_BOOLEAN__INT_POINTER \ + purple_marshal_BOOLEAN__INT_POINTER + +#define gaim_marshal_POINTER__POINTER_INT \ + purple_marshal_POINTER__POINTER_INT +#define gaim_marshal_POINTER__POINTER_INT64 \ + purple_marshal_POINTER__POINTER_INT64 +#define gaim_marshal_POINTER__POINTER_INT_BOOLEAN \ + purple_marshal_POINTER__POINTER_INT_BOOLEAN +#define gaim_marshal_POINTER__POINTER_INT64_BOOLEAN \ + purple_marshal_POINTER__POINTER_INT64_BOOLEAN +#define gaim_marshal_POINTER__POINTER_POINTER \ + purple_marshal_POINTER__POINTER_POINTER + +/* from sound.h */ + +#define GAIM_SOUND_BUDDY_ARRIVE PURPLE_SOUND_BUDDY_ARRIVE +#define GAIM_SOUND_BUDDY_LEAVE PURPLE_SOUND_BUDDY_LEAVE +#define GAIM_SOUND_RECEIVE PURPLE_SOUND_RECEIVE +#define GAIM_SOUND_FIRST_RECEIVE PURPLE_SOUND_FIRST_RECEIVE +#define GAIM_SOUND_SEND PURPLE_SOUND_SEND +#define GAIM_SOUND_CHAT_JOIN PURPLE_SOUND_CHAT_JOIN +#define GAIM_SOUND_CHAT_LEAVE PURPLE_SOUND_CHAT_LEAVE +#define GAIM_SOUND_CHAT_YOU_SAY PURPLE_SOUND_CHAT_YOU_SAY +#define GAIM_SOUND_CHAT_SAY PURPLE_SOUND_CHAT_SAY +#define GAIM_SOUND_POUNCE_DEFAULT PURPLE_SOUND_POUNCE_DEFAULT +#define GAIM_SOUND_CHAT_NICK PURPLE_SOUND_CHAT_NICK +#define GAIM_NUM_SOUNDS PURPLE_NUM_SOUNDS +#define GaimSoundEventID PurpleSoundEventID + +#define GaimSoundUiOps PurpleSoundUiOps + +#define gaim_sound_play_file purple_sound_play_file +#define gaim_sound_play_event purple_sound_play_event +#define gaim_sound_set_ui_ops purple_sound_set_ui_ops +#define gaim_sound_get_ui_ops purple_sound_get_ui_ops +#define gaim_sound_init purple_sound_init +#define gaim_sound_uninit purple_sound_uninit + +#define gaim_sounds_get_handle purple_sounds_get_handle + #endif /* _GAIM_COMPAT_H_ */
--- a/libpurple/log.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/log.c Mon Feb 05 03:37:27 2007 +0000 @@ -248,6 +248,31 @@ return size; } +gboolean gaim_log_is_deletable(GaimLog *log) +{ + g_return_val_if_fail(log != NULL, FALSE); + g_return_val_if_fail(log->logger != NULL, FALSE); + + if (log->logger->delete == NULL) + return FALSE; + + if (log->logger->is_deletable != NULL) + return log->logger->is_deletable(log); + + return TRUE; +} + +gboolean gaim_log_delete(GaimLog *log) +{ + g_return_val_if_fail(log != NULL, FALSE); + g_return_val_if_fail(log->logger != NULL, FALSE); + + if (log->logger->delete != NULL) + return log->logger->delete(log); + + return FALSE; +} + char * gaim_log_get_log_dir(GaimLogType type, const char *name, GaimAccount *account) { @@ -318,7 +343,9 @@ int(*size)(GaimLog*), int(*total_size)(GaimLogType type, const char *name, GaimAccount *account), GList*(*list_syslog)(GaimAccount *account), - void(*get_log_sets)(GaimLogSetCallback cb, GHashTable *sets)) + void(*get_log_sets)(GaimLogSetCallback cb, GHashTable *sets), + gboolean(*delete)(GaimLog *log), + gboolean(*is_deletable)(GaimLog *log)) { #endif GaimLogLogger *logger; @@ -352,8 +379,12 @@ logger->list_syslog = va_arg(args, void *); if (functions >= 9) logger->get_log_sets = va_arg(args, void *); + if (functions >= 10) + logger->delete = va_arg(args, void *); + if (functions >= 11) + logger->is_deletable = va_arg(args, void *); - if (functions > 9) + if (functions >= 12) gaim_debug_info("log", "Dropping new functions for logger: %s (%s)\n", name, id); va_end(args); @@ -559,7 +590,7 @@ gaim_prefs_add_string("/core/logging/format", "txt"); - html_logger = gaim_log_logger_new("html", _("HTML"), 8, + html_logger = gaim_log_logger_new("html", _("HTML"), 11, NULL, html_logger_write, html_logger_finalize, @@ -567,10 +598,13 @@ html_logger_read, gaim_log_common_sizer, html_logger_total_size, - html_logger_list_syslog); + html_logger_list_syslog, + NULL, + gaim_log_common_deleter, + gaim_log_common_is_deletable); gaim_log_logger_add(html_logger); - txt_logger = gaim_log_logger_new("txt", _("Plain text"), 8, + txt_logger = gaim_log_logger_new("txt", _("Plain text"), 11, NULL, txt_logger_write, txt_logger_finalize, @@ -578,7 +612,10 @@ txt_logger_read, gaim_log_common_sizer, txt_logger_total_size, - txt_logger_list_syslog); + txt_logger_list_syslog, + NULL, + gaim_log_common_deleter, + gaim_log_common_is_deletable); gaim_log_logger_add(txt_logger); old_logger = gaim_log_logger_new("old", _("Old flat format"), 9, @@ -595,22 +632,23 @@ gaim_signal_register(handle, "log-timestamp", #if SIZEOF_TIME_T == 4 - gaim_marshal_POINTER__POINTER_INT, + gaim_marshal_POINTER__POINTER_INT_BOOLEAN, #elif SIZEOF_TIME_T == 8 - gaim_marshal_POINTER__POINTER_INT64, + gaim_marshal_POINTER__POINTER_INT64_BOOLEAN, #else #error Unknown size of time_t #endif - gaim_value_new(GAIM_TYPE_POINTER), 2, + gaim_value_new(GAIM_TYPE_STRING), 2, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_LOG), #if SIZEOF_TIME_T == 4 - gaim_value_new(GAIM_TYPE_INT)); + gaim_value_new(GAIM_TYPE_INT), #elif SIZEOF_TIME_T == 8 - gaim_value_new(GAIM_TYPE_INT64)); + gaim_value_new(GAIM_TYPE_INT64), #else # error Unknown size of time_t #endif + gaim_value_new(GAIM_TYPE_BOOLEAN)); gaim_prefs_connect_callback(NULL, "/core/logging/format", logger_pref_cb, NULL); @@ -633,17 +671,20 @@ static char *log_get_timestamp(GaimLog *log, time_t when) { + gboolean show_date; char *date; struct tm tm; + show_date = (log->type == GAIM_LOG_SYSTEM) || (time(NULL) > when + 20*60); + date = gaim_signal_emit_return_1(gaim_log_get_handle(), "log-timestamp", - log, when); + log, when, show_date); if (date != NULL) return date; tm = *(localtime(&when)); - if (log->type == GAIM_LOG_SYSTEM || time(NULL) > when + 20*60) + if (show_date) return g_strdup(gaim_date_format_long(&tm)); else return g_strdup(gaim_time_format(&tm)); @@ -813,6 +854,8 @@ struct stat st; GaimLogCommonLoggerData *data = log->logger_data; + g_return_val_if_fail(data != NULL, 0); + if (!data->path || g_stat(data->path, &st)) st.st_size = 0; @@ -939,6 +982,95 @@ g_dir_close(log_dir); } +gboolean gaim_log_common_deleter(GaimLog *log) +{ + GaimLogCommonLoggerData *data; + int ret; + + g_return_val_if_fail(log != NULL, FALSE); + + data = log->logger_data; + if (data == NULL) + return FALSE; + + if (data->path == NULL) + return FALSE; + + ret = g_unlink(data->path); + if (ret == 0) + return TRUE; + else if (ret == -1) + { + gaim_debug_error("log", "Failed to delete: %s - %s\n", data->path, strerror(errno)); + } + else + { + /* I'm not sure that g_unlink() will ever return + * something other than 0 or -1. -- rlaager */ + gaim_debug_error("log", "Failed to delete: %s\n", data->path); + } + + return FALSE; +} + +gboolean gaim_log_common_is_deletable(GaimLog *log) +{ + GaimLogCommonLoggerData *data; + gchar *dirname; + + g_return_val_if_fail(log != NULL, FALSE); + + data = log->logger_data; + if (data == NULL) + return FALSE; + + if (data->path == NULL) + return FALSE; + +#ifndef _WIN32 + dirname = g_path_get_dirname(data->path); + if (g_access(dirname, W_OK) == 0) + { + g_free(dirname); + return TRUE; + } + gaim_debug_info("log", "access(%s) failed: %s\n", dirname, strerror(errno)); + g_free(dirname); +#else + /* Unless and until someone writes equivalent win32 code, + * we'll assume the file is deletable. */ + return TRUE; +#endif + + return FALSE; +} + +static char *process_txt_log(char *txt, char *to_free) +{ + char *tmp; + + /* The to_free argument allows us to save a + * g_strdup() in some cases. */ + + if (to_free == NULL) + to_free = txt; + + /* g_markup_escape_text requires valid UTF-8 */ + if (!g_utf8_validate(txt, -1, NULL)) + { + tmp = gaim_utf8_salvage(txt); + g_free(to_free); + to_free = txt = tmp; + } + + tmp = g_markup_escape_text(txt, -1); + g_free(to_free); + txt = gaim_markup_linkify(tmp); + g_free(tmp); + + return txt; +} + #if 0 /* Maybe some other time. */ /**************** ** XML LOGGER ** @@ -1310,16 +1442,11 @@ return g_strdup(_("<font color=\"red\"><b>Unable to find log path!</b></font>")); if (g_file_get_contents(data->path, &read, NULL, NULL)) { minus_header = strchr(read, '\n'); - if (!minus_header) - minus_header = g_strdup(read); + + if (minus_header) + return process_txt_log(minus_header + 1, read); else - minus_header = g_strdup(minus_header + 1); - g_free(read); - minus_header2 = g_markup_escape_text(minus_header, -1); - g_free(minus_header); - read = gaim_markup_linkify(minus_header2); - g_free(minus_header2); - return read; + return process_txt_log(read, NULL); } return g_strdup_printf(_("<font color=\"red\"><b>Could not read file: %s</b></font>"), data->path); } @@ -1624,15 +1751,13 @@ fclose(file); read[data->length] = '\0'; *flags = 0; - if(strstr(read, "<BR>")) + if (strstr(read, "<BR>")) + { *flags |= GAIM_LOG_READ_NO_NEWLINE; - else { - tmp = g_markup_escape_text(read, -1); - g_free(read); - read = gaim_markup_linkify(tmp); - g_free(tmp); + return read; } - return read; + + return process_txt_log(read, NULL); } static int old_logger_size (GaimLog *log)
--- a/libpurple/log.h Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/log.h Mon Feb 05 03:37:27 2007 +0000 @@ -80,15 +80,15 @@ GList *(*list)(GaimLogType type, const char *name, GaimAccount *account); /** Given one of the logs returned by the logger's list function, - * this returns the contents of the log in GtkIMHtml markup */ + * this returns the contents of the log in GtkIMHtml markup */ char *(*read)(GaimLog *log, GaimLogReadFlags *flags); /** Given one of the logs returned by the logger's list function, - * this returns the size of the log in bytes */ + * this returns the size of the log in bytes */ int (*size)(GaimLog *log); /** Returns the total size of all the logs. If this is undefined a default - * implementation is used */ + * implementation is used */ int (*total_size)(GaimLogType type, const char *name, GaimAccount *account); /** This function returns a sorted GList of available system GaimLogs */ @@ -103,6 +103,12 @@ * Loggers which implement this function must create a GaimLogSet, * then call @a cb with @a sets and the newly created GaimLogSet. */ void (*get_log_sets)(GaimLogSetCallback cb, GHashTable *sets); + + /* Attempts to delete the specified log, indicating success or failure */ + gboolean (*delete)(GaimLog *log); + + /* Tests whether a log is deletable */ + gboolean (*is_deletable)(GaimLog *log); }; /** @@ -281,6 +287,26 @@ int gaim_log_get_total_size(GaimLogType type, const char *name, GaimAccount *account); /** + * Tests whether a log is deletable + * + * A return value of @c FALSE indicates that gaim_log_delete() will fail on this + * log, unless something changes between the two calls. A return value of @c TRUE, + * however, does not guarantee the log can be deleted. + * + * @param log The log + * @return A boolean indicating if the log is deletable + */ +gboolean gaim_log_is_deletable(GaimLog *log); + +/** + * Deletes a log + * + * @param log The log + * @return A boolean indicating success or failure + */ +gboolean gaim_log_delete(GaimLog *log); + +/** * Returns the default logger directory Gaim uses for a given account * and username. This would be where Gaim stores logs created by * the built-in text or HTML loggers. @@ -332,6 +358,11 @@ * set to a GaimLogCommonLoggerData struct containing the log * file handle and log path. * + * This function is intended to be used as a "common" + * implementation of a logger's @c write function. + * It should only be passed to gaim_log_logger_new() and never + * called directly. + * * @param log The log to write to. * @param ext The file extension to give to this log file. */ @@ -339,8 +370,12 @@ /** * Returns a sorted GList of GaimLogs of the requested type. + * * This function should only be used with logs that are written - * with gaim_log_common_writer(). + * with gaim_log_common_writer(). It's intended to be used as + * a "common" implementation of a logger's @c list function. + * It should only be passed to gaim_log_logger_new() and never + * called directly. * * @param type The type of the logs being listed. * @param name The name of the log. @@ -356,10 +391,13 @@ /** * Returns the total size of all the logs for a given user, with - * a given extension. This is the "common" implemention of a - * logger's total_size function. + * a given extension. + * * This function should only be used with logs that are written - * with gaim_log_common_writer(). + * with gaim_log_common_writer(). It's intended to be used as + * a "common" implementation of a logger's @c total_size function. + * It should only be passed to gaim_log_logger_new() and never + * called directly. * * @param type The type of the logs being sized. * @param name The name of the logs to size @@ -375,14 +413,49 @@ /** * Returns the size of a given GaimLog. + * * This function should only be used with logs that are written - * with gaim_log_common_writer(). + * with gaim_log_common_writer(). It's intended to be used as + * a "common" implementation of a logger's @c size function. + * It should only be passed to gaim_log_logger_new() and never + * called directly. * * @param log The GaimLog to size. * * @return An integer indicating the size of the log in bytes. */ int gaim_log_common_sizer(GaimLog *log); + +/** + * Deletes a log + * + * This function should only be used with logs that are written + * with gaim_log_common_writer(). It's intended to be used as + * a "common" implementation of a logger's @c delete function. + * It should only be passed to gaim_log_logger_new() and never + * called directly. + * + * @param log The GaimLog to delete. + * + * @return A boolean indicating success or failure. + */ +gboolean gaim_log_common_deleter(GaimLog *log); + +/** + * Checks to see if a log is deletable + * + * This function should only be used with logs that are written + * with gaim_log_common_writer(). It's intended to be used as + * a "common" implementation of a logger's @c is_deletable function. + * It should only be passed to gaim_log_logger_new() and never + * called directly. + * + * @param log The GaimLog to check. + * + * @return A boolean indicating if the log is deletable. + */ +gboolean gaim_log_common_is_deletable(GaimLog *log); + /*@}*/ /******************************************/ @@ -398,8 +471,9 @@ * @param functions The number of functions being passed. The following * functions are currently available (in order): @c create, * @c write, @c finalize, @c list, @c read, @c size, - * @c total_size, @c list_syslog, @c get_log_sets. For - * details on these functions, see GaimLogLogger. + * @c total_size, @c list_syslog, @c get_log_sets, + * @c delete, @c is_deletable. + * For details on these functions, see GaimLogLogger. * Functions may not be skipped. For example, passing * @c create and @c write is acceptable (for a total of * two functions). Passing @c create and @c finalize,
--- a/libpurple/plugins/mono/GetBuddyBack.cs Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/plugins/mono/GetBuddyBack.cs Mon Feb 05 03:37:27 2007 +0000 @@ -1,7 +1,14 @@ using Gaim; -public class GetBuddyBack : GaimPlugin +public class GetBuddyBack : Plugin { + private static PluginInfo info = new PluginInfo("C# Get Buddy Back", "0.1", "Prints when a Buddy returns", "Longer Description", "Eoin Coffey", "urled"); + + public GetBuddyBack() + : base (info) + { + } + public void HandleSig(object[] args) { Buddy buddy = (Buddy)args[0]; @@ -24,9 +31,4 @@ public override void Destroy() { } - - public override GaimPluginInfo Info() - { - return new GaimPluginInfo("C# Get Buddy Back", "0.1", "Prints when a Buddy returns", "Longer Description", "Eoin Coffey", "urled"); - } }
--- a/libpurple/plugins/mono/MPlugin.cs Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/plugins/mono/MPlugin.cs Mon Feb 05 03:37:27 2007 +0000 @@ -1,7 +1,14 @@ using Gaim; -public class MPlugin : GaimPlugin +public class MPlugin : Plugin { + private static PluginInfo info = new PluginInfo("C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled"); + + public MPlugin() + : base(info) + { + } + public void HandleSig(object[] args) { Buddy buddy = (Buddy)args[0]; @@ -28,9 +35,4 @@ { Debug.debug(Debug.INFO, "mplug", "destroying...\n"); } - - public override GaimPluginInfo Info() - { - return new GaimPluginInfo("C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled"); - } }
--- a/libpurple/protocols/jabber/disco.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/disco.c Mon Feb 05 03:37:27 2007 +0000 @@ -257,7 +257,7 @@ return; } - for (child = xmlnode_get_child(query, "category"); child; + for (child = xmlnode_get_child(query, "identity"); child; child = xmlnode_get_next_twin(child)) { const char *category, *type, *name; category = xmlnode_get_attrib(child, "category"); @@ -273,8 +273,10 @@ g_free(js->server_name); js->server_name = g_strdup(name); - if (!strcmp(name, "Google Talk")) - js->googletalk = TRUE; + if (!strcmp(name, "Google Talk")) { + printf("ADSFADFAFAFADF !!!!\n"); + js->googletalk = TRUE; + } } for (child = xmlnode_get_child(query, "feature"); child;
--- a/libpurple/protocols/jabber/google.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/google.c Mon Feb 05 03:37:27 2007 +0000 @@ -21,6 +21,7 @@ #include "internal.h" #include "debug.h" +#include "util.h" #include "privacy.h" #include "buddy.h" @@ -368,3 +369,119 @@ /* See if he's online */ jabber_presence_subscription_set(js, who, "probe"); } + +/* This does two passes on the string. The first pass goes through + * and determine if all the structured text is properly balanced, and + * how many instances of each there is. The second pass goes and converts + * everything to HTML, depending on what's figured out by the first pass. + * It will short circuit once it knows it has no more replacements to make + */ +char *jabber_google_format_to_html(const char *text) +{ + const char *p; + + /* The start of the screen may be consdiered a space for this purpose */ + gboolean preceding_space = TRUE; + + gboolean in_bold = FALSE, in_italic = FALSE; + gboolean in_tag = FALSE; + + gint bold_count = 0, italic_count = 0; + + GString *str; + + for (p = text; *p != '\0'; p = g_utf8_next_char(p)) { + gunichar c = g_utf8_get_char(p); + if (c == '*' && !in_tag) { + if (in_bold && (g_unichar_isspace(*(p+1)) || + *(p+1) == '\0' || + *(p+1) == '<')) { + bold_count++; + in_bold = FALSE; + } else if (preceding_space && !in_bold) { + bold_count++; + in_bold = TRUE; + } + preceding_space = TRUE; + } else if (c == '_' && !in_tag) { + if (in_italic && (g_unichar_isspace(*(p+1)) || + *(p+1) == '\0' || + *(p+1) == '<')) { + italic_count++; + in_italic = FALSE; + } else if (preceding_space && !in_italic) { + italic_count++; + in_italic = TRUE; + } + preceding_space = TRUE; + } else if (c == '<' && !in_tag) { + in_tag = TRUE; + } else if (c == '>' && in_tag) { + in_tag = FALSE; + } else if (!in_tag) { + if (g_unichar_isspace(c)) + preceding_space = TRUE; + else + preceding_space = FALSE; + } + } + + str = g_string_new(NULL); + in_bold = in_italic = in_tag = FALSE; + preceding_space = TRUE; + + for (p = text; *p != '\0'; p = g_utf8_next_char(p)) { + gunichar c = g_utf8_get_char(p); + + if (bold_count < 2 && italic_count < 2 && !in_bold && !in_italic) { + g_string_append(str, p); + return g_string_free(str, FALSE); + } + + + if (c == '*' && !in_tag) { + if (in_bold && + (g_unichar_isspace(*(p+1))||*(p+1)=='<')) { /* This is safe in UTF-8 */ + str = g_string_append(str, "</b>"); + in_bold = FALSE; + bold_count--; + } else if (preceding_space && bold_count > 1) { + str = g_string_append(str, "<b>"); + bold_count--; + in_bold = TRUE; + } else { + str = g_string_append_unichar(str, c); + } + preceding_space = TRUE; + } else if (c == '_' && !in_tag) { + if (in_italic && + (g_unichar_isspace(*(p+1))||*(p+1)=='<')) { + str = g_string_append(str, "</i>"); + italic_count--; + in_italic = FALSE; + } else if (preceding_space && italic_count > 1) { + str = g_string_append(str, "<i>"); + italic_count--; + in_italic = TRUE; + } else { + str = g_string_append_unichar(str, c); + } + preceding_space = TRUE; + } else if (c == '<' && !in_tag) { + str = g_string_append_unichar(str, c); + in_tag = TRUE; + } else if (c == '>' && in_tag) { + str = g_string_append_unichar(str, c); + in_tag = FALSE; + } else if (!in_tag) { + str = g_string_append_unichar(str, c); + if (g_unichar_isspace(c)) + preceding_space = TRUE; + else + preceding_space = FALSE; + } else { + str = g_string_append_unichar(str, c); + } + } + return g_string_free(str, FALSE); +}
--- a/libpurple/protocols/jabber/google.h Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/google.h Mon Feb 05 03:37:27 2007 +0000 @@ -39,6 +39,8 @@ void jabber_google_roster_add_deny(GaimConnection *gc, const char *who); void jabber_google_roster_rem_deny(GaimConnection *gc, const char *who); +char *jabber_google_format_to_html(const char *text); + #endif /* _GAIM_GOOGLE_H_ */
--- a/libpurple/protocols/jabber/jabber.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/jabber.c Mon Feb 05 03:37:27 2007 +0000 @@ -1074,7 +1074,8 @@ JabberBuddy *jb = NULL; if(!b->account->gc) - return; + return NULL; + js = b->account->gc->proto_data; if(js) jb = jabber_buddy_find(js, b->name, FALSE);
--- a/libpurple/protocols/jabber/message.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/message.c Mon Feb 05 03:37:27 2007 +0000 @@ -27,6 +27,7 @@ #include "buddy.h" #include "chat.h" +#include "google.h" #include "message.h" #include "xmlnode.h" @@ -99,6 +100,12 @@ g_free(jbr->thread_id); jbr->thread_id = g_strdup(jbr->thread_id); } + + if (jm->js->googletalk && jm->xhtml == NULL) { + char *tmp = jm->body; + jm->body = jabber_google_format_to_html(jm->body); + g_free(tmp); + } serv_got_im(jm->js->gc, from, jm->xhtml ? jm->xhtml : jm->body, 0, jm->sent); } @@ -210,14 +217,12 @@ if(!jid) return; - components = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + components = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free); - g_hash_table_replace(components, g_strdup("room"), g_strdup(jid->node)); - g_hash_table_replace(components, g_strdup("server"), g_strdup(jid->domain)); - g_hash_table_replace(components, g_strdup("handle"), - g_strdup(jm->js->user->node)); - g_hash_table_replace(components, g_strdup("password"), - g_strdup(jm->password)); + g_hash_table_replace(components, "room", g_strdup(jid->node)); + g_hash_table_replace(components, "server", g_strdup(jid->domain)); + g_hash_table_replace(components, "handle", g_strdup(jm->js->user->node)); + g_hash_table_replace(components, "password", g_strdup(jm->password)); jabber_id_free(jid); serv_got_chat_invite(jm->js->gc, jm->to, jm->from, jm->body, components); @@ -255,7 +260,7 @@ if(type) { if(!strcmp(type, "normal")) jm->type = JABBER_MESSAGE_NORMAL; - else if(!strcmp(type, "chat")) + else if(!strcmp(type, "chat")) jm->type = JABBER_MESSAGE_CHAT; else if(!strcmp(type, "groupchat")) jm->type = JABBER_MESSAGE_GROUPCHAT;
--- a/libpurple/protocols/jabber/parser.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/parser.c Mon Feb 05 03:37:27 2007 +0000 @@ -79,7 +79,7 @@ char *attrib_ns = NULL; if (attributes[i+2]) { - attrib_ns = g_strdup(attributes[i+2]);; + attrib_ns = g_strdup((char*)attributes[i+2]);; } memcpy(attrib, attributes[i+3], attrib_len);
--- a/libpurple/protocols/jabber/roster.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/jabber/roster.c Mon Feb 05 03:37:27 2007 +0000 @@ -53,7 +53,7 @@ g_slist_free(buddies); } -static void add_gaim_buddies_in_groups(JabberStream *js, const char *jid, +static void add_gaim_buddies_to_groups(JabberStream *js, const char *jid, const char *alias, GSList *groups) { GSList *buddies, *g2, *l; @@ -228,7 +228,7 @@ if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) if (!jabber_google_roster_incoming(js, item)) continue; - add_gaim_buddies_in_groups(js, jid, name, groups); + add_gaim_buddies_to_groups(js, jid, name, groups); } } }
--- a/libpurple/protocols/msn/msn.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Mon Feb 05 03:37:27 2007 +0000 @@ -479,16 +479,6 @@ return "msn"; } -static const char* -msn_list_emblem(GaimBuddy *b) -{ - MsnUser *user; - user = b->proto_data; - if (user && user->mobile) - return "mobile"; - return NULL; -} - static char * msn_status_text(GaimBuddy *buddy) { @@ -576,7 +566,11 @@ status = gaim_status_type_new_full(GAIM_STATUS_OFFLINE, NULL, NULL, FALSE, TRUE, FALSE); types = g_list_append(types, status); - + + status = gaim_status_type_new_full(GAIM_STATUS_MOBILE, + "mobile", NULL, FALSE, FALSE, TRUE); + types = g_list_append(types, status); + return types; } @@ -743,12 +737,23 @@ GaimMessageFlags flags) { GaimAccount *account; + GaimBuddy *buddy = gaim_find_buddy(gc->account, who); MsnMessage *msg; char *msgformat; char *msgtext; account = gaim_connection_get_account(gc); + if (buddy) { + GaimPresence *p = gaim_buddy_get_presence(buddy); + if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_MOBILE)) { + char *text = gaim_markup_strip_html(message); + send_to_mobile(gc, who, text); + g_free(text); + return; + } + } + msn_import_html(message, &msgformat, &msgtext); if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) @@ -1930,7 +1935,7 @@ NULL, /* protocol_options */ {"png", 0, 0, 96, 96, 0, GAIM_ICON_SCALE_SEND}, /* icon_spec */ msn_list_icon, /* list_icon */ - msn_list_emblem, /* list_emblems */ + NULL, /* list_emblems */ msn_status_text, /* status_text */ msn_tooltip_text, /* tooltip_text */ msn_status_types, /* away_states */
--- a/libpurple/protocols/msn/user.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/msn/user.c Mon Feb 05 03:37:27 2007 +0000 @@ -81,8 +81,15 @@ account = user->userlist->session->account; - if (user->status != NULL) - gaim_prpl_got_user_status(account, user->passport, user->status, NULL); + if (user->status != NULL) { + if (!strcmp(user->status, "offline") && user->mobile) { + gaim_prpl_got_user_status(account, user->passport, "available", NULL); + gaim_prpl_got_user_status(account, user->passport, "mobile", NULL); + } else { + gaim_prpl_got_user_status(account, user->passport, user->status, NULL); + gaim_prpl_got_user_status_deactive(account, user->passport, "mobile"); + } + } if (user->idle) gaim_prpl_got_user_idle(account, user->passport, TRUE, -1);
--- a/libpurple/protocols/oscar/misc.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/oscar/misc.c Mon Feb 05 03:37:27 2007 +0000 @@ -70,7 +70,10 @@ aim_snacid_t snacid; if (!longdata) - return aim_genericreq_n(od, conn, family, subtype); + { + aim_genericreq_n(od, conn, family, subtype); + return; + } frame = flap_frame_new(od, 0x02, 10+4); @@ -89,7 +92,10 @@ aim_snacid_t snacid; if (!shortdata) - return aim_genericreq_n(od, conn, family, subtype); + { + aim_genericreq_n(od, conn, family, subtype); + return; + } frame = flap_frame_new(od, 0x02, 10+2);
--- a/libpurple/protocols/oscar/oscar.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Mon Feb 05 03:37:27 2007 +0000 @@ -58,6 +58,7 @@ #define OSCAR_STATUS_ID_OCCUPIED "occupied" #define OSCAR_STATUS_ID_FREE4CHAT "free4chat" #define OSCAR_STATUS_ID_CUSTOM "custom" +#define OSCAR_STATUS_ID_MOBILE "mobile" #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3" @@ -1767,6 +1768,13 @@ info->status, info->status_len); } + if (info->flags & AIM_FLAG_WIRELESS || info->capabilities & OSCAR_CAPABILITY_HIPTOP) + { + gaim_prpl_got_user_status(account, info->sn, OSCAR_STATUS_ID_MOBILE, NULL); + } else { + gaim_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE); + } + if (have_status_message) { gaim_prpl_got_user_status(account, info->sn, status_id, @@ -1881,7 +1889,7 @@ va_end(ap); gaim_prpl_got_user_status(account, info->sn, OSCAR_STATUS_ID_OFFLINE, NULL); - + gaim_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE); g_hash_table_remove(od->buddyinfo, gaim_normalize(gc->account, info->sn)); return 1; @@ -5431,10 +5439,6 @@ if (userinfo != NULL ) { if (userinfo->flags & AIM_FLAG_ADMINISTRATOR) return "admin"; - if (userinfo->flags & AIM_FLAG_WIRELESS) - return "mobile"; - if (userinfo->capabilities & OSCAR_CAPABILITY_HIPTOP) - return "mobile"; if (userinfo->flags & AIM_FLAG_ACTIVEBUDDY) return "bot"; if (userinfo->flags & AIM_FLAG_AOL) @@ -5718,6 +5722,9 @@ NULL, TRUE, TRUE, FALSE); status_types = g_list_prepend(status_types, type); + type = gaim_status_type_new_full(GAIM_STATUS_MOBILE, OSCAR_STATUS_ID_MOBILE, NULL, FALSE, FALSE, TRUE); + status_types = g_list_prepend(status_types, type); + /* ICQ-specific status types */ type = gaim_status_type_new_with_attrs(GAIM_STATUS_UNAVAILABLE, OSCAR_STATUS_ID_OCCUPIED,
--- a/libpurple/protocols/qq/keep_alive.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/qq/keep_alive.c Mon Feb 05 03:37:27 2007 +0000 @@ -164,6 +164,11 @@ } gaim_debug(GAIM_DEBUG_INFO, "QQ", "set buddy %d to %s\n", q_bud->uid, status_id); gaim_prpl_got_user_status(gc->account, name, status_id, NULL); + + if (q_bud->comm_flag & QQ_COMM_FLAG_BIND_MOBILE && q_bud->status != QQ_BUDDY_OFFLINE) + gaim_prpl_got_user_status(gc->account, name, "mobile", NULL); + else + gaim_prpl_got_user_status_deactive(gc->account, name, "mobile"); } else { gaim_debug(GAIM_DEBUG_ERROR, "QQ", "unknown buddy: %d\n", q_bud->uid); }
--- a/libpurple/protocols/qq/qq.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/qq/qq.c Mon Feb 05 03:37:27 2007 +0000 @@ -257,8 +257,6 @@ qq_buddy *q_bud = b->proto_data; if (q_bud) { - if (q_bud->comm_flag & QQ_COMM_FLAG_BIND_MOBILE) - return "mobile"; if (q_bud->comm_flag & QQ_COMM_FLAG_QQ_MEMBER) return "qq_member"; /* @@ -292,6 +290,10 @@ "offline", _("QQ: Offline"), FALSE, TRUE, FALSE); types = g_list_append(types, status); + status = gaim_status_type_new_full(GAIM_STATUS_MOBILE, + "mobile", NULL, FALSE, FALSE, TRUE); + types = g_list_append(types, status); + return types; }
--- a/libpurple/protocols/yahoo/yahoo.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Mon Feb 05 03:37:27 2007 +0000 @@ -176,6 +176,11 @@ gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, TRUE, f->idle); else gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, FALSE, 0); + + if (f->sms) + gaim_prpl_got_user_status(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE, NULL); + else + gaim_prpl_got_user_status_deactive(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE); } static void yahoo_process_status(GaimConnection *gc, struct yahoo_packet *pkt) @@ -300,8 +305,10 @@ if (strtol(pair->value, NULL, 10) == 0) { if (f) f->status = YAHOO_STATUS_OFFLINE; - if (name) + if (name) { gaim_prpl_got_user_status(account, name, "offline", NULL); + gaim_prpl_got_user_status_deactive(account, name, YAHOO_STATUS_TYPE_MOBILE); + } break; } break; @@ -2811,7 +2818,7 @@ if (!b || !(account = b->account) || !(gc = gaim_account_get_connection(account)) || !(yd = gc->proto_data)) - return; + return NULL; f = yahoo_friend_find(gc, b->name); if (!f) { @@ -2821,8 +2828,6 @@ presence = gaim_buddy_get_presence(b); if (gaim_presence_is_online(presence)) { - if (f->sms) - return "mobile"; if (yahoo_friend_get_game(f)) return "game"; if (f->protocol == 2) @@ -3473,6 +3478,9 @@ type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, NULL, TRUE); types = g_list_append(types, type); + type = gaim_status_type_new_full(GAIM_STATUS_MOBILE, YAHOO_STATUS_TYPE_MOBILE, NULL, FALSE, FALSE, TRUE); + types = g_list_append(types, type); + return types; }
--- a/libpurple/protocols/yahoo/yahoo.h Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.h Mon Feb 05 03:37:27 2007 +0000 @@ -66,6 +66,7 @@ #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout" #define YAHOO_STATUS_TYPE_AWAY "away" #define YAHOO_STATUS_TYPE_INVISIBLE "invisible" +#define YAHOO_STATUS_TYPE_MOBILE "mobile" enum yahoo_status { YAHOO_STATUS_AVAILABLE = 0,
--- a/libpurple/proxy.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/proxy.c Mon Feb 05 03:37:27 2007 +0000 @@ -597,7 +597,7 @@ { int major; p = connect_data->read_buffer + 5; - major = strtol((const char *)p, (char **)&p, 10); + major = strtol((const char *)p, (char**)&p, 10); error = (major == 0) || (*p != '.'); if(!error) { int minor;
--- a/libpurple/prpl.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/prpl.c Mon Feb 05 03:37:27 2007 +0000 @@ -162,6 +162,31 @@ serv_got_typing_stopped(gaim_account_get_connection(account), name); } +void gaim_prpl_got_user_status_deactive(GaimAccount *account, const char *name, + const char *status_id) +{ + GSList *list; + GaimBuddy *buddy; + GaimPresence *presence; + GaimStatus *status; + GaimStatus *old_status; + va_list args; + + g_return_if_fail(account != NULL); + g_return_if_fail(name != NULL); + g_return_if_fail(status_id != NULL); + g_return_if_fail(gaim_account_is_connected(account) || gaim_account_is_connecting(account)); + + if ((buddy = gaim_find_buddy(account, name)) == NULL) + return; + + presence = gaim_buddy_get_presence(buddy); + status = gaim_presence_get_status(presence, status_id); + + g_return_if_fail(status != NULL); + gaim_status_set_active(status, FALSE); +} + static void do_prpl_change_account_status(GaimAccount *account, GaimStatus *old_status, GaimStatus *new_status)
--- a/libpurple/prpl.h Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/prpl.h Mon Feb 05 03:37:27 2007 +0000 @@ -388,7 +388,7 @@ time_t login_time); /** - * Notifies Gaim that a user's status has changed. + * Notifies Gaim that a user's status has been activated. * * This is meant to be called from protocol plugins. * @@ -400,6 +400,19 @@ */ void gaim_prpl_got_user_status(GaimAccount *account, const char *name, const char *status_id, ...); + +/** + * Notifies libpurple that a user's status has been deactivated + * + * This is meant to be called from protocol plugins. + * + * @param account The account the user is on. + * @param name The screen name of the user. + * @param status_id The status ID. + */ +void gaim_prpl_got_user_status_deactive(GaimAccount *account, const char *name, + const char *status_id); + /** * Informs the server that an account's status changed. *
--- a/libpurple/signals.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/signals.c Mon Feb 05 03:37:27 2007 +0000 @@ -976,6 +976,38 @@ } void +gaim_marshal_POINTER__POINTER_INT_BOOLEAN( + GaimCallback cb, va_list args, void *data, + void **return_val) +{ + gpointer ret_val; + void *arg1 = va_arg(args, void *); + gint arg2 = va_arg(args, gint); + gboolean arg3 = va_arg(args, gboolean); + + ret_val = ((gpointer(*)(void *, gint, gboolean, void *))cb)(arg1, arg2, arg3, data); + + if (return_val != NULL) + *return_val = ret_val; +} + +void +gaim_marshal_POINTER__POINTER_INT64_BOOLEAN( + GaimCallback cb, va_list args, void *data, + void **return_val) +{ + gpointer ret_val; + void *arg1 = va_arg(args, void *); + gint64 arg2 = va_arg(args, gint64); + gboolean arg3 = va_arg(args, gboolean); + + ret_val = ((gpointer(*)(void *, gint64, gboolean, void *))cb)(arg1, arg2, arg3, data); + + if (return_val != NULL) + *return_val = ret_val; +} + +void gaim_marshal_POINTER__POINTER_POINTER(GaimCallback cb, va_list args, void *data, void **return_val) {
--- a/libpurple/signals.h Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/signals.h Mon Feb 05 03:37:27 2007 +0000 @@ -331,6 +331,10 @@ GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_POINTER__POINTER_INT64( GaimCallback cb, va_list args, void *data, void **return_val); +void gaim_marshal_POINTER__POINTER_INT_BOOLEAN( + GaimCallback cb, va_list args, void *data, void **return_val); +void gaim_marshal_POINTER__POINTER_INT64_BOOLEAN( + GaimCallback cb, va_list args, void *data, void **return_val); void gaim_marshal_POINTER__POINTER_POINTER( GaimCallback cb, va_list args, void *data, void **return_val); /*@}*/
--- a/libpurple/status.c Sun Feb 04 23:14:06 2007 +0000 +++ b/libpurple/status.c Mon Feb 05 03:37:27 2007 +0000 @@ -1549,18 +1549,20 @@ gaim_presence_is_status_primitive_active(const GaimPresence *presence, GaimStatusPrimitive primitive) { - GaimStatus *status; - GaimStatusType *status_type; + GList *l; g_return_val_if_fail(presence != NULL, FALSE); g_return_val_if_fail(primitive != GAIM_STATUS_UNSET, FALSE); - status = gaim_presence_get_active_status(presence); - status_type = gaim_status_get_type(status); + for (l = gaim_presence_get_statuses(presence); + l != NULL; l = l->next) { + GaimStatus *temp_status = l->data; + GaimStatusType *type = gaim_status_get_type(temp_status); - if (gaim_status_type_get_primitive(status_type) == primitive) - return TRUE; - + if (gaim_status_type_get_primitive(type) == primitive && + gaim_status_is_active(temp_status)) + return TRUE; + } return FALSE; }
--- a/pidgin/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -128,7 +128,6 @@ gtkeventloop.h \ gtkexpander.h \ gtkft.h \ - gtkgaim.h \ gtkidle.h \ gtkimhtml.h \ gtkimhtmltoolbar.h \ @@ -152,7 +151,8 @@ gaimstock.h \ gtkthemes.h \ gtkutils.h \ - gtkwhiteboard.h + gtkwhiteboard.h \ + pidgin.h pidginincludedir=$(includedir)/pidgin pidgininclude_HEADERS = \
--- a/pidgin/gaimcombobox.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gaimcombobox.c Mon Feb 05 03:37:27 2007 +0000 @@ -21,9 +21,10 @@ #include <config.h> */ #include <gtk/gtkversion.h> -#if !GTK_CHECK_VERSION(2,4,0) +#if !GTK_CHECK_VERSION(2,6,0) #include "gaimcombobox.h" +#if !GTK_CHECK_VERSION(2,4,0) #include <gtk/gtkarrow.h> #include <gtk/gtkbindings.h> #include "gtkcelllayout.h" @@ -414,7 +415,7 @@ }; combo_box_type = g_type_register_static (GTK_TYPE_BIN, - "GaimGtkComboBox", + "PidginComboBox", &combo_box_info, 0); @@ -3557,21 +3558,6 @@ gtk_list_store_remove (store, &iter); } -static gchar * -gtk_combo_box_get_active_text (GtkComboBox *combo_box) -{ - GtkTreeIter iter; - gchar *text = NULL; - - g_return_val_if_fail (GTK_IS_LIST_STORE (combo_box->priv->model), NULL); - - if (gtk_combo_box_get_active_iter (combo_box, &iter)) - gtk_tree_model_get (combo_box->priv->model, &iter, - 0, &text, -1); - return text; -} - - static gboolean gtk_combo_box_mnemonic_activate (GtkWidget *widget, gboolean group_cycling) @@ -3745,3 +3731,19 @@ } } #endif /* Gtk 2.4 */ + +gchar * +gtk_combo_box_get_active_text (GtkComboBox *combo_box) +{ + GtkTreeIter iter; + gchar *text = NULL; + + /* g_return_val_if_fail (GTK_IS_LIST_STORE (combo_box->priv->model), NULL); */ + + if (gtk_combo_box_get_active_iter (combo_box, &iter)) + gtk_tree_model_get (gtk_combo_box_get_model(combo_box), &iter, + 0, &text, -1); + return text; +} + +#endif
--- a/pidgin/gaimcombobox.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gaimcombobox.h Mon Feb 05 03:37:27 2007 +0000 @@ -17,6 +17,9 @@ * Boston, MA 02111-1307, USA. */ +#ifndef __GAIM_COMBO_BOX_H__ +#define __GAIM_COMBO_BOX_H__ + #ifndef __GTK_COMBO_BOX_H__ #define __GTK_COMBO_BOX_H__ @@ -98,8 +101,6 @@ const gchar *text); void gtk_combo_box_remove_text (GtkComboBox *combo_box, gint position); -gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box); - /* programmatic control */ void gtk_combo_box_popup (GtkComboBox *combo_box); void gtk_combo_box_popdown (GtkComboBox *combo_box); @@ -107,3 +108,7 @@ G_END_DECLS #endif /* __GTK_COMBO_BOX_H__ */ + +gchar *gtk_combo_box_get_active_text (GtkComboBox *combo_box); + +#endif /* __GAIM_COMBOX_BOX_H__ */
--- a/pidgin/gaimstock.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gaimstock.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gaimstock.h" @@ -36,105 +36,96 @@ } const stock_icons[] = { - { GAIM_STOCK_ABOUT, "buttons", "about_menu.png" }, - { GAIM_STOCK_ACCOUNTS, "buttons", "accounts.png" }, - { GAIM_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE }, + { PIDGIN_STOCK_ABOUT, "buttons", "about_menu.png" }, + { PIDGIN_STOCK_ACCOUNTS, "buttons", "accounts.png" }, + { PIDGIN_STOCK_ACTION, NULL, GTK_STOCK_EXECUTE }, #if GTK_CHECK_VERSION(2,6,0) - { GAIM_STOCK_ALIAS, NULL, GTK_STOCK_EDIT }, + { PIDGIN_STOCK_ALIAS, NULL, GTK_STOCK_EDIT }, #else - { GAIM_STOCK_ALIAS, "buttons", "edit.png" }, + { PIDGIN_STOCK_ALIAS, "buttons", "edit.png" }, #endif - { GAIM_STOCK_BGCOLOR, "buttons", "change-bgcolor-small.png" }, - { GAIM_STOCK_BLOCK, NULL, GTK_STOCK_STOP }, - { GAIM_STOCK_UNBLOCK, NULL, GTK_STOCK_STOP /* XXX: */ }, - { GAIM_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO }, - { GAIM_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, - { GAIM_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, + { PIDGIN_STOCK_BGCOLOR, "buttons", "change-bgcolor-small.png" }, + { PIDGIN_STOCK_BLOCK, NULL, GTK_STOCK_STOP }, + { PIDGIN_STOCK_UNBLOCK, NULL, GTK_STOCK_STOP /* XXX: */ }, + { PIDGIN_STOCK_CHAT, NULL, GTK_STOCK_JUMP_TO }, + { PIDGIN_STOCK_CLEAR, NULL, GTK_STOCK_CLEAR }, + { PIDGIN_STOCK_CLOSE_TABS, NULL, GTK_STOCK_CLOSE }, #if GTK_CHECK_VERSION(2,6,0) - { GAIM_STOCK_CONNECT, NULL, GTK_STOCK_CONNECT }, + { PIDGIN_STOCK_CONNECT, NULL, GTK_STOCK_CONNECT }, #else - { GAIM_STOCK_CONNECT, "icons", "stock_connect_16.png" }, + { PIDGIN_STOCK_CONNECT, "icons", "stock_connect_16.png" }, #endif - { GAIM_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES }, - { GAIM_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN }, + { PIDGIN_STOCK_DEBUG, NULL, GTK_STOCK_PROPERTIES }, + { PIDGIN_STOCK_DOWNLOAD, NULL, GTK_STOCK_GO_DOWN }, #if GTK_CHECK_VERSION(2,6,0) - { GAIM_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT }, + { PIDGIN_STOCK_DISCONNECT, NULL, GTK_STOCK_DISCONNECT }, #else - { GAIM_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" }, + { PIDGIN_STOCK_DISCONNECT, "icons", "stock_disconnect_16.png" }, #endif - { GAIM_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" }, + { PIDGIN_STOCK_FGCOLOR, "buttons", "change-fgcolor-small.png" }, #if GTK_CHECK_VERSION(2,6,0) - { GAIM_STOCK_EDIT, NULL, GTK_STOCK_EDIT }, + { PIDGIN_STOCK_EDIT, NULL, GTK_STOCK_EDIT }, #else - { GAIM_STOCK_EDIT, "buttons", "edit.png" }, + { PIDGIN_STOCK_EDIT, "buttons", "edit.png" }, #endif - { GAIM_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL }, - { GAIM_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY }, - { GAIM_STOCK_FILE_TRANSFER, NULL, GTK_STOCK_REVERT_TO_SAVED }, - { GAIM_STOCK_ICON_AWAY, "icons", "away.png" }, - { GAIM_STOCK_ICON_AWAY_MSG, "icons", "msgpend.png" }, - { GAIM_STOCK_ICON_CONNECT, "icons", "connect.png" }, - { GAIM_STOCK_ICON_OFFLINE, "icons", "offline.png" }, - { GAIM_STOCK_ICON_ONLINE, "icons", "online.png" }, - { GAIM_STOCK_ICON_ONLINE_MSG, "icons", "msgunread.png" }, - { GAIM_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, - { GAIM_STOCK_IM, "buttons", "send-im.png" }, - { GAIM_STOCK_IMAGE, "buttons", "insert-image-small.png" }, + { PIDGIN_STOCK_FILE_CANCELED, NULL, GTK_STOCK_CANCEL }, + { PIDGIN_STOCK_FILE_DONE, NULL, GTK_STOCK_APPLY }, + { PIDGIN_STOCK_FILE_TRANSFER, NULL, GTK_STOCK_REVERT_TO_SAVED }, + { PIDGIN_STOCK_ICON_AWAY, "icons", "away.png" }, + { PIDGIN_STOCK_ICON_AWAY_MSG, "icons", "msgpend.png" }, + { PIDGIN_STOCK_ICON_CONNECT, "icons", "connect.png" }, + { PIDGIN_STOCK_ICON_OFFLINE, "icons", "offline.png" }, + { PIDGIN_STOCK_ICON_ONLINE, "icons", "online.png" }, + { PIDGIN_STOCK_ICON_ONLINE_MSG, "icons", "msgunread.png" }, + { PIDGIN_STOCK_IGNORE, NULL, GTK_STOCK_DIALOG_ERROR }, + { PIDGIN_STOCK_IM, "buttons", "send-im.png" }, + { PIDGIN_STOCK_IMAGE, "buttons", "insert-image-small.png" }, #if GTK_CHECK_VERSION(2,8,0) - { GAIM_STOCK_INFO, NULL, GTK_STOCK_INFO }, + { PIDGIN_STOCK_INFO, NULL, GTK_STOCK_INFO }, #else - { GAIM_STOCK_INFO, "buttons", "info.png" }, -#endif - { GAIM_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, - { GAIM_STOCK_LINK, "buttons", "insert-link-small.png" }, - { GAIM_STOCK_LOG, NULL, GTK_STOCK_DND_MULTIPLE }, - { GAIM_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, -#if GTK_CHECK_VERSION(2,6,0) - { GAIM_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, -#else - { GAIM_STOCK_PAUSE, "buttons", "pause.png" }, + { PIDGIN_STOCK_INFO, "buttons", "info.png" }, #endif - { GAIM_STOCK_PENDING, "buttons", "send-im.png" }, + { PIDGIN_STOCK_INVITE, NULL, GTK_STOCK_JUMP_TO }, + { PIDGIN_STOCK_LINK, "buttons", "insert-link-small.png" }, + { PIDGIN_STOCK_LOG, NULL, GTK_STOCK_DND_MULTIPLE }, + { PIDGIN_STOCK_MODIFY, NULL, GTK_STOCK_PREFERENCES }, #if GTK_CHECK_VERSION(2,6,0) - { GAIM_STOCK_PLUGIN, NULL, GTK_STOCK_DISCONNECT }, + { PIDGIN_STOCK_PAUSE, NULL, GTK_STOCK_MEDIA_PAUSE }, #else - { GAIM_STOCK_PLUGIN, "icons", "stock_disconnect_16.png" }, + { PIDGIN_STOCK_PAUSE, "buttons", "pause.png" }, #endif - { GAIM_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, - { GAIM_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, - { GAIM_STOCK_SEND, "buttons", "send-im.png" }, - { GAIM_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, - { GAIM_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, - { GAIM_STOCK_SMILEY, "buttons", "insert-smiley-small.png" }, - { GAIM_STOCK_TEXT_BIGGER, "buttons", "text_bigger.png" }, - { GAIM_STOCK_TEXT_NORMAL, "buttons", "text_normal.png" }, - { GAIM_STOCK_TEXT_SMALLER, "buttons", "text_smaller.png" }, - { GAIM_STOCK_TYPED, "gaim", "typed.png" }, - { GAIM_STOCK_TYPING, "gaim", "typing.png" }, - { GAIM_STOCK_VOICE_CHAT, "gaim", "phone.png" }, - { GAIM_STOCK_STATUS_INVISIBLE,"gaim", "status-invisible.png" }, - { GAIM_STOCK_STATUS_TYPING0, "gaim", "status-typing0.png" }, - { GAIM_STOCK_STATUS_TYPING1, "gaim", "status-typing1.png" }, - { GAIM_STOCK_STATUS_TYPING2, "gaim", "status-typing2.png" }, - { GAIM_STOCK_STATUS_TYPING3, "gaim", "status-typing3.png" }, - { GAIM_STOCK_STATUS_CONNECT0, "gaim", "status-connect0.png" }, - { GAIM_STOCK_STATUS_CONNECT1, "gaim", "status-connect1.png" }, - { GAIM_STOCK_STATUS_CONNECT2, "gaim", "status-connect2.png" }, - { GAIM_STOCK_STATUS_CONNECT3, "gaim", "status-connect3.png" }, - { GAIM_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, + { PIDGIN_STOCK_PENDING, "buttons", "send-im.png" }, +#if GTK_CHECK_VERSION(2,6,0) + { PIDGIN_STOCK_PLUGIN, NULL, GTK_STOCK_DISCONNECT }, +#else + { PIDGIN_STOCK_PLUGIN, "icons", "stock_disconnect_16.png" }, +#endif + { PIDGIN_STOCK_POUNCE, NULL, GTK_STOCK_REDO }, + { PIDGIN_STOCK_OPEN_MAIL, NULL, GTK_STOCK_JUMP_TO }, + { PIDGIN_STOCK_SEND, "buttons", "send-im.png" }, + { PIDGIN_STOCK_SIGN_ON, NULL, GTK_STOCK_EXECUTE }, + { PIDGIN_STOCK_SIGN_OFF, NULL, GTK_STOCK_CLOSE }, + { PIDGIN_STOCK_SMILEY, "buttons", "insert-smiley-small.png" }, + { PIDGIN_STOCK_TEXT_BIGGER, "buttons", "text_bigger.png" }, + { PIDGIN_STOCK_TEXT_NORMAL, "buttons", "text_normal.png" }, + { PIDGIN_STOCK_TEXT_SMALLER, "buttons", "text_smaller.png" }, + { PIDGIN_STOCK_TYPED, "gaim", "typed.png" }, + { PIDGIN_STOCK_TYPING, "gaim", "typing.png" }, + { PIDGIN_STOCK_VOICE_CHAT, "gaim", "phone.png" }, + { PIDGIN_STOCK_UPLOAD, NULL, GTK_STOCK_GO_UP }, }; static const GtkStockItem stock_items[] = { - { GAIM_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, - { GAIM_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, - { GAIM_STOCK_CLOSE_TABS, N_("Close _tabs"), 0, 0, NULL }, - { GAIM_STOCK_IM, N_("I_M"), 0, 0, NULL }, - { GAIM_STOCK_INFO, N_("_Get Info"), 0, 0, NULL }, - { GAIM_STOCK_INVITE, N_("_Invite"), 0, 0, NULL }, - { GAIM_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, - { GAIM_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, - { GAIM_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, + { PIDGIN_STOCK_ALIAS, N_("_Alias"), 0, 0, NULL }, + { PIDGIN_STOCK_CHAT, N_("_Join"), 0, 0, NULL }, + { PIDGIN_STOCK_CLOSE_TABS, N_("Close _tabs"), 0, 0, NULL }, + { PIDGIN_STOCK_IM, N_("I_M"), 0, 0, NULL }, + { PIDGIN_STOCK_INFO, N_("_Get Info"), 0, 0, NULL }, + { PIDGIN_STOCK_INVITE, N_("_Invite"), 0, 0, NULL }, + { PIDGIN_STOCK_MODIFY, N_("_Modify"), 0, 0, NULL }, + { PIDGIN_STOCK_OPEN_MAIL, N_("_Open Mail"), 0, 0, NULL }, + { PIDGIN_STOCK_PAUSE, N_("_Pause"), 0, 0, NULL }, }; static struct SizedStockIcon { @@ -146,18 +137,22 @@ gboolean medium; gboolean huge; } const sized_stock_icons [] = { - { PIDGIN_STOCK_STATUS_AVAILABLE,"status", "available.png", TRUE, TRUE, TRUE, FALSE }, - { PIDGIN_STOCK_STATUS_AWAY, "status", "away.png", TRUE, TRUE, TRUE, FALSE }, + { PIDGIN_STOCK_STATUS_AVAILABLE, "status", "available.png", TRUE, TRUE, TRUE, FALSE }, + { PIDGIN_STOCK_STATUS_AVAILABLE_I, "status", "available_i.png", TRUE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_STATUS_AWAY, "status", "away.png", TRUE, TRUE, TRUE, FALSE }, + { PIDGIN_STOCK_STATUS_AWAY_I, "status", "away_i.png", TRUE, FALSE, FALSE, FALSE }, { PIDGIN_STOCK_STATUS_BUSY, "status", "busy.png", TRUE, TRUE, TRUE, FALSE }, + { PIDGIN_STOCK_STATUS_BUSY_I, "status", "busy_i.png", TRUE, FALSE, FALSE, FALSE }, { PIDGIN_STOCK_STATUS_CHAT, "status", "chat.png", TRUE, TRUE, TRUE, FALSE }, - { PIDGIN_STOCK_STATUS_INVISIBLE,"status", "invisible.png", TRUE, TRUE, TRUE, FALSE }, { PIDGIN_STOCK_STATUS_XA, "status", "extended-away.png", TRUE, TRUE, TRUE, FALSE }, + { PIDGIN_STOCK_STATUS_XA_I, "status", "extended-away_i.png",TRUE, FALSE, FALSE, FALSE }, { PIDGIN_STOCK_STATUS_LOGIN, "status", "log-in.png", TRUE, TRUE, TRUE, FALSE }, { PIDGIN_STOCK_STATUS_LOGOUT, "status", "log-out.png", TRUE, TRUE, TRUE, FALSE }, { PIDGIN_STOCK_STATUS_OFFLINE, "status", "offline.png", TRUE, TRUE, TRUE, FALSE }, { PIDGIN_STOCK_STATUS_PERSON, "status", "person.png", TRUE, TRUE, TRUE, FALSE }, { PIDGIN_STOCK_STATUS_OPERATOR, "status", "operator.png", TRUE, FALSE, FALSE, FALSE }, { PIDGIN_STOCK_STATUS_HALFOP, "status", "half-operator.png", TRUE, FALSE, FALSE, FALSE }, + { PIDGIN_STOCK_STATUS_MESSAGE, "status", "message-pending.png",TRUE, FALSE, FALSE, FALSE }, { PIDGIN_STOCK_DIALOG_AUTH, "dialogs", "auth.png", TRUE, FALSE, FALSE, TRUE }, { PIDGIN_STOCK_DIALOG_COOL, "dialogs", "cool.png", FALSE, FALSE, FALSE, TRUE }, @@ -216,7 +211,7 @@ } void -gaim_gtk_stock_init(void) +pidgin_stock_init(void) { static gboolean stock_initted = FALSE; GtkIconFactory *icon_factory;
--- a/pidgin/gaimstock.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gaimstock.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -24,89 +24,81 @@ */ #include <gtk/gtkstock.h> -#ifndef _GAIM_STOCK_H_ -#define _GAIM_STOCK_H_ +#ifndef _PIDGIN_STOCK_H_ +#define _PIDGIN_STOCK_H_ /**************************************************************************/ /** @name Stock images */ /**************************************************************************/ /*@{*/ -#define GAIM_STOCK_ABOUT "gaim-about" -#define GAIM_STOCK_ACCOUNTS "gaim-accounts" -#define GAIM_STOCK_ACTION "gaim-action" -#define GAIM_STOCK_ALIAS "gaim-alias" -#define GAIM_STOCK_AWAY "gaim-away" -#define GAIM_STOCK_BGCOLOR "gaim-bgcolor" -#define GAIM_STOCK_BLOCK "gaim-block" -#define GAIM_STOCK_UNBLOCK "gaim-unblock" -#define GAIM_STOCK_CHAT "gaim-chat" -#define GAIM_STOCK_CLEAR "gaim-clear" -#define GAIM_STOCK_CLOSE_TABS "gaim-close-tab" -#define GAIM_STOCK_CONNECT "gaim-connect" -#define GAIM_STOCK_DEBUG "gaim-debug" -#define GAIM_STOCK_DISCONNECT "gaim-disconnect" -#define GAIM_STOCK_DOWNLOAD "gaim-download" -#define GAIM_STOCK_EDIT "gaim-edit" -#define GAIM_STOCK_FGCOLOR "gaim-fgcolor" -#define GAIM_STOCK_FILE_CANCELED "gaim-file-canceled" -#define GAIM_STOCK_FILE_DONE "gaim-file-done" -#define GAIM_STOCK_FILE_TRANSFER "gaim-file-transfer" -#define GAIM_STOCK_ICON_AWAY "gaim-icon-away" -#define GAIM_STOCK_ICON_AWAY_MSG "gaim-icon-away-msg" -#define GAIM_STOCK_ICON_CONNECT "gaim-icon-away-connect" -#define GAIM_STOCK_ICON_OFFLINE "gaim-icon-offline" -#define GAIM_STOCK_ICON_ONLINE "gaim-icon-online" -#define GAIM_STOCK_ICON_ONLINE_MSG "gaim-icon-online-msg" -#define GAIM_STOCK_IGNORE "gaim-ignore" -#define GAIM_STOCK_IM "gaim-im" -#define GAIM_STOCK_IMAGE "gaim-image" -#define GAIM_STOCK_INFO "gaim-info" -#define GAIM_STOCK_INVITE "gaim-invite" -#define GAIM_STOCK_LINK "gaim-link" -#define GAIM_STOCK_LOG "gaim-log" -#define GAIM_STOCK_MODIFY "gaim-modify" -#define GAIM_STOCK_OPEN_MAIL "gaim-stock-open-mail" -#define GAIM_STOCK_PAUSE "gaim-pause" -#define GAIM_STOCK_PENDING "gaim-pending" -#define GAIM_STOCK_PLUGIN "gaim-plugin" -#define GAIM_STOCK_POUNCE "gaim-pounce" -#define GAIM_STOCK_SEND "gaim-send" -#define GAIM_STOCK_SIGN_OFF "gaim-sign-off" -#define GAIM_STOCK_SIGN_ON "gaim-sign-on" -#define GAIM_STOCK_SMILEY "gaim-smiley" -#define GAIM_STOCK_STATUS_ONLINE "gaim-status-online" -#define GAIM_STOCK_STATUS_AWAY "gaim-status-away" -#define GAIM_STOCK_STATUS_INVISIBLE "gaim-status-invisible" -#define GAIM_STOCK_STATUS_OFFLINE "gaim-status-offline" -#define GAIM_STOCK_STATUS_TYPING0 "gaim-status-typing0" -#define GAIM_STOCK_STATUS_TYPING1 "gaim-status-typing1" -#define GAIM_STOCK_STATUS_TYPING2 "gaim-status-typing2" -#define GAIM_STOCK_STATUS_TYPING3 "gaim-status-typing3" -#define GAIM_STOCK_STATUS_CONNECT0 "gaim-status-connect0" -#define GAIM_STOCK_STATUS_CONNECT1 "gaim-status-connect1" -#define GAIM_STOCK_STATUS_CONNECT2 "gaim-status-connect2" -#define GAIM_STOCK_STATUS_CONNECT3 "gaim-status-connect3" -#define GAIM_STOCK_TEXT_BIGGER "gaim-text-bigger" -#define GAIM_STOCK_TEXT_NORMAL "gaim-text-normal" -#define GAIM_STOCK_TEXT_SMALLER "gaim-text-smaller" -#define GAIM_STOCK_TYPED "gaim-typed" -#define GAIM_STOCK_TYPING "gaim-typing" -#define GAIM_STOCK_UPLOAD "gaim-upload" -#define GAIM_STOCK_VOICE_CHAT "gaim-voice-chat" +#define PIDGIN_STOCK_ABOUT "pidgin-about" +#define PIDGIN_STOCK_ACCOUNTS "pidgin-accounts" +#define PIDGIN_STOCK_ACTION "pidgin-action" +#define PIDGIN_STOCK_ALIAS "pidgin-alias" +#define PIDGIN_STOCK_AWAY "pidgin-away" +#define PIDGIN_STOCK_BGCOLOR "pidgin-bgcolor" +#define PIDGIN_STOCK_BLOCK "pidgin-block" +#define PIDGIN_STOCK_UNBLOCK "pidgin-unblock" +#define PIDGIN_STOCK_CHAT "pidgin-chat" +#define PIDGIN_STOCK_CLEAR "pidgin-clear" +#define PIDGIN_STOCK_CLOSE_TABS "pidgin-close-tab" +#define PIDGIN_STOCK_CONNECT "pidgin-connect" +#define PIDGIN_STOCK_DEBUG "pidgin-debug" +#define PIDGIN_STOCK_DISCONNECT "pidgin-disconnect" +#define PIDGIN_STOCK_DOWNLOAD "pidgin-download" +#define PIDGIN_STOCK_EDIT "pidgin-edit" +#define PIDGIN_STOCK_FGCOLOR "pidgin-fgcolor" +#define PIDGIN_STOCK_FILE_CANCELED "pidgin-file-canceled" +#define PIDGIN_STOCK_FILE_DONE "pidgin-file-done" +#define PIDGIN_STOCK_FILE_TRANSFER "pidgin-file-transfer" +#define PIDGIN_STOCK_ICON_AWAY "pidgin-icon-away" +#define PIDGIN_STOCK_ICON_AWAY_MSG "pidgin-icon-away-msg" +#define PIDGIN_STOCK_ICON_CONNECT "pidgin-icon-away-connect" +#define PIDGIN_STOCK_ICON_OFFLINE "pidgin-icon-offline" +#define PIDGIN_STOCK_ICON_ONLINE "pidgin-icon-online" +#define PIDGIN_STOCK_ICON_ONLINE_MSG "pidgin-icon-online-msg" +#define PIDGIN_STOCK_IGNORE "pidgin-ignore" +#define PIDGIN_STOCK_IM "pidgin-im" +#define PIDGIN_STOCK_IMAGE "pidgin-image" +#define PIDGIN_STOCK_INFO "pidgin-info" +#define PIDGIN_STOCK_INVITE "pidgin-invite" +#define PIDGIN_STOCK_LINK "pidgin-link" +#define PIDGIN_STOCK_LOG "pidgin-log" +#define PIDGIN_STOCK_MODIFY "pidgin-modify" +#define PIDGIN_STOCK_OPEN_MAIL "pidgin-stock-open-mail" +#define PIDGIN_STOCK_PAUSE "pidgin-pause" +#define PIDGIN_STOCK_PENDING "pidgin-pending" +#define PIDGIN_STOCK_PLUGIN "pidgin-plugin" +#define PIDGIN_STOCK_POUNCE "pidgin-pounce" +#define PIDGIN_STOCK_SEND "pidgin-send" +#define PIDGIN_STOCK_SIGN_OFF "pidgin-sign-off" +#define PIDGIN_STOCK_SIGN_ON "pidgin-sign-on" +#define PIDGIN_STOCK_SMILEY "pidgin-smiley" +#define PIDGIN_STOCK_TEXT_BIGGER "pidgin-text-bigger" +#define PIDGIN_STOCK_TEXT_NORMAL "pidgin-text-normal" +#define PIDGIN_STOCK_TEXT_SMALLER "pidgin-text-smaller" +#define PIDGIN_STOCK_TYPED "pidgin-typed" +#define PIDGIN_STOCK_TYPING "pidgin-typing" +#define PIDGIN_STOCK_UPLOAD "pidgin-upload" +#define PIDGIN_STOCK_VOICE_CHAT "pidgin-voice-chat" /* Status icons */ -#define PIDGIN_STOCK_STATUS_AVAILABLE "pidgin-status-available" -#define PIDGIN_STOCK_STATUS_AWAY "pidgin-status-away" -#define PIDGIN_STOCK_STATUS_BUSY "pidgin-status-busy" -#define PIDGIN_STOCK_STATUS_CHAT "pidgin-status-chat" -#define PIDGIN_STOCK_STATUS_INVISIBLE "pidgin-status-invisible" -#define PIDGIN_STOCK_STATUS_XA "pidgin-status-xa" -#define PIDGIN_STOCK_STATUS_LOGIN "pidgin-status-login" -#define PIDGIN_STOCK_STATUS_LOGOUT "pidgin-status-logout" -#define PIDGIN_STOCK_STATUS_OFFLINE "pidgin-status-offline" -#define PIDGIN_STOCK_STATUS_PERSON "pidgin-status-person" -#define PIDGIN_STOCK_STATUS_OPERATOR "pidgin-status-operator" -#define PIDGIN_STOCK_STATUS_HALFOP "pidgin-status-halfop" +#define PIDGIN_STOCK_STATUS_AVAILABLE "pidgin-status-available" +#define PIDGIN_STOCK_STATUS_AVAILABLE_I "pidgin-status-available-i" +#define PIDGIN_STOCK_STATUS_AWAY "pidgin-status-away" +#define PIDGIN_STOCK_STATUS_AWAY_I "pidgin-status-away-i" +#define PIDGIN_STOCK_STATUS_BUSY "pidgin-status-busy" +#define PIDGIN_STOCK_STATUS_BUSY_I "pidgin-status-busy-i" +#define PIDGIN_STOCK_STATUS_CHAT "pidgin-status-chat" +#define PIDGIN_STOCK_STATUS_XA "pidgin-status-xa" +#define PIDGIN_STOCK_STATUS_XA_I "pidgin-status-xa-i" +#define PIDGIN_STOCK_STATUS_LOGIN "pidgin-status-login" +#define PIDGIN_STOCK_STATUS_LOGOUT "pidgin-status-logout" +#define PIDGIN_STOCK_STATUS_OFFLINE "pidgin-status-offline" +#define PIDGIN_STOCK_STATUS_PERSON "pidgin-status-person" +#define PIDGIN_STOCK_STATUS_OPERATOR "pidgin-status-operator" +#define PIDGIN_STOCK_STATUS_HALFOP "pidgin-status-halfop" +#define PIDGIN_STOCK_STATUS_MESSAGE "pidgin-status-message" /* Dialog icons */ #define PIDGIN_STOCK_DIALOG_AUTH "pidgin-dialog-auth" @@ -139,6 +131,6 @@ /** * Sets up the gaim stock repository. */ -void gaim_gtk_stock_init(void); +void pidgin_stock_init(void); -#endif /* _GAIM_STOCK_H_ */ +#endif /* _PIDGIN_STOCK_H_ */
--- a/pidgin/getopt.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/getopt.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu before changing it! - Gaim is the legal property of its developers, whose names are too numerous + Pidgin is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.
--- a/pidgin/gtkaccount.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkaccount.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" #include "accountopt.h" @@ -64,7 +64,7 @@ char *username; char *alias; -} GaimGtkAccountAddUserData; +} PidginAccountAddUserData; typedef struct { @@ -84,7 +84,7 @@ typedef struct { - GaimGtkAccountDialogType type; + PidginAccountDialogType type; GaimAccount *account; char *protocol_id; @@ -151,7 +151,7 @@ GaimAccount *account; GtkTreeModel *model; -} GaimGtkPulseData; +} PidginPulseData; static AccountsWindow *accounts_window = NULL; @@ -189,7 +189,7 @@ gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, GAIM_HIG_BORDER); gtk_widget_show(widget); - gaim_set_accessible_label (widget, label); + pidgin_set_accessible_label (widget, label); return hbox; } @@ -218,7 +218,7 @@ int width, height; GdkPixbuf *scale; - gaim_gtk_buddy_icon_get_scale_size(pixbuf, &dialog->prpl_info->icon_spec, + pidgin_buddy_icon_get_scale_size(pixbuf, &dialog->prpl_info->icon_spec, GAIM_ICON_SCALE_DISPLAY, &width, &height); scale = gdk_pixbuf_scale_simple(pixbuf, width, height, GDK_INTERP_BILINEAR); @@ -305,7 +305,7 @@ dialog = data; if (filename != NULL) - set_dialog_icon(dialog, gaim_gtk_convert_buddy_icon(dialog->plugin, filename), g_strdup(filename)); + set_dialog_icon(dialog, pidgin_convert_buddy_icon(dialog->plugin, filename), g_strdup(filename)); dialog->icon_filesel = NULL; } @@ -313,7 +313,7 @@ static void icon_select_cb(GtkWidget *button, AccountPrefsDialog *dialog) { - dialog->icon_filesel = gaim_gtk_buddy_icon_chooser_new(GTK_WINDOW(dialog->window), icon_filesel_choose_cb, dialog); + dialog->icon_filesel = pidgin_buddy_icon_chooser_new(GTK_WINDOW(dialog->window), icon_filesel_choose_cb, dialog); gtk_widget_show_all(dialog->icon_filesel); } @@ -345,7 +345,7 @@ } if ((rtmp = strchr(tmp, '\r')) || (rtmp = strchr(tmp, '\n'))) *rtmp = '\0'; - set_dialog_icon(dialog, gaim_gtk_convert_buddy_icon(dialog->plugin, tmp), g_strdup(tmp)); + set_dialog_icon(dialog, pidgin_convert_buddy_icon(dialog->plugin, tmp), g_strdup(tmp)); g_free(tmp); } gtk_drag_finish(dc, TRUE, FALSE, t); @@ -387,7 +387,7 @@ gtk_widget_destroy(dialog->login_frame); /* Build the login options frame. */ - frame = gaim_gtk_make_frame(parent, _("Login Options")); + frame = pidgin_make_frame(parent, _("Login Options")); /* cringe */ dialog->login_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); @@ -401,7 +401,7 @@ gtk_widget_show(vbox); /* Protocol */ - dialog->protocol_menu = gaim_gtk_protocol_option_menu_new( + dialog->protocol_menu = pidgin_protocol_option_menu_new( dialog->protocol_id, G_CALLBACK(set_account_protocol_cb), dialog); add_pref_box(dialog, vbox, _("Protocol:"), dialog->protocol_menu); @@ -551,7 +551,7 @@ gtk_widget_destroy(dialog->user_frame); /* Build the user options frame. */ - frame = gaim_gtk_make_frame(parent, _("User Options")); + frame = pidgin_make_frame(parent, _("User Options")); dialog->user_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); gtk_box_reorder_child(GTK_BOX(parent), dialog->user_frame, 1); @@ -593,7 +593,7 @@ gtk_container_add(GTK_CONTAINER(button), dialog->icon_entry); gtk_widget_show(dialog->icon_entry); /* TODO: Uh, isn't this next line pretty useless? */ - gaim_set_accessible_label (dialog->icon_entry, label); + pidgin_set_accessible_label (dialog->icon_entry, label); dialog->cached_icon_path = NULL; dialog->icon_path = NULL; @@ -628,9 +628,9 @@ TRUE)); set_dialog_icon(dialog, g_strdup(gaim_account_get_ui_string(dialog->account, - GAIM_GTK_UI, "non-global-buddyicon-cached-path", NULL)), + PIDGIN_UI, "non-global-buddyicon-cached-path", NULL)), g_strdup(gaim_account_get_ui_string(dialog->account, - GAIM_GTK_UI, "non-global-buddyicon-path", NULL))); + PIDGIN_UI, "non-global-buddyicon-path", NULL))); } else { set_dialog_icon(dialog, NULL, NULL); } @@ -683,7 +683,7 @@ /* Build the protocol options frame. */ g_snprintf(buf, sizeof(buf), _("%s Options"), dialog->plugin->info->name); - frame = gaim_gtk_make_frame(parent, buf); + frame = pidgin_make_frame(parent, buf); dialog->protocol_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); @@ -972,7 +972,7 @@ if (dialog->proxy_frame != NULL) gtk_widget_destroy(dialog->proxy_frame); - frame = gaim_gtk_make_frame(parent, _("Proxy Options")); + frame = pidgin_make_frame(parent, _("Proxy Options")); dialog->proxy_frame = gtk_widget_get_parent(gtk_widget_get_parent(frame)); gtk_box_reorder_child(GTK_BOX(parent), dialog->proxy_frame, 1); @@ -1077,7 +1077,7 @@ if (dialog->cached_icon_path != NULL) { - const char *icon = gaim_account_get_ui_string(dialog->account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", NULL); + const char *icon = gaim_account_get_ui_string(dialog->account, PIDGIN_UI, "non-global-buddyicon-cached-path", NULL); if (dialog->cached_icon_path != NULL && (icon == NULL || strcmp(dialog->cached_icon_path, icon))) { /* The user set an icon, which would've been cached by convert_buddy_icon, @@ -1152,8 +1152,8 @@ icon_change = TRUE; } gaim_account_set_bool(account, "use-global-buddyicon", !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))); - gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", dialog->cached_icon_path); - gaim_account_set_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-path", dialog->icon_path); + gaim_account_set_ui_string(account, PIDGIN_UI, "non-global-buddyicon-cached-path", dialog->cached_icon_path); + gaim_account_set_ui_string(account, PIDGIN_UI, "non-global-buddyicon-path", dialog->icon_path); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->icon_check))) { gaim_account_set_buddy_icon_path(account, dialog->icon_path); @@ -1162,7 +1162,7 @@ else if (gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon") && icon_change) { const char *filename = gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon"); - char *icon = gaim_gtk_convert_buddy_icon(dialog->plugin, filename); + char *icon = pidgin_convert_buddy_icon(dialog->plugin, filename); gaim_account_set_buddy_icon_path(account, filename); gaim_account_set_buddy_icon(account, icon); g_free(icon); @@ -1339,7 +1339,7 @@ if (new) gaim_accounts_add(account); else - gaim_signal_emit(gaim_gtk_account_get_handle(), "account-modified", account); + gaim_signal_emit(pidgin_account_get_handle(), "account-modified", account); /* If this is a new account, then sign on! */ if (new && !dialog->registering) { @@ -1348,7 +1348,7 @@ saved_status = gaim_savedstatus_get_current(); if (saved_status != NULL) { gaim_savedstatus_activate_for_account(saved_status, account); - gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); + gaim_account_set_enabled(account, PIDGIN_UI, TRUE); } } @@ -1375,7 +1375,7 @@ }; void -gaim_gtk_account_dialog_show(GaimGtkAccountDialogType type, +pidgin_account_dialog_show(PidginAccountDialogType type, GaimAccount *account) { AccountPrefsDialog *dialog; @@ -1424,7 +1424,7 @@ dialog->window = win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_role(GTK_WINDOW(win), "account"); - if (type == GAIM_GTK_ADD_ACCOUNT_DIALOG) + if (type == PIDGIN_ADD_ACCOUNT_DIALOG) gtk_window_set_title(GTK_WINDOW(win), _("Add Account")); else gtk_window_set_title(GTK_WINDOW(win), _("Modify Account")); @@ -1534,7 +1534,7 @@ signed_on_off_cb(GaimConnection *gc, gpointer user_data) { GaimAccount *account; - GaimGtkPulseData *pulse_data; + PidginPulseData *pulse_data; GtkTreeModel *model; GtkTreeIter iter; GdkPixbuf *pixbuf; @@ -1563,7 +1563,7 @@ g_free(pulse_data); } - pixbuf = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); if ((pixbuf != NULL) && gaim_account_is_disconnected(account)) gdk_pixbuf_saturate_and_pixelate(pixbuf, pixbuf, 0.0, FALSE); @@ -1774,7 +1774,7 @@ static gint accedit_win_destroy_cb(GtkWidget *w, GdkEvent *event, AccountsWindow *dialog) { - gaim_gtk_accounts_window_hide(); + pidgin_accounts_window_hide(); return 0; } @@ -1815,7 +1815,7 @@ static void add_account_cb(GtkWidget *w, AccountsWindow *dialog) { - gaim_gtk_account_dialog_show(GAIM_GTK_ADD_ACCOUNT_DIALOG, NULL); + pidgin_account_dialog_show(PIDGIN_ADD_ACCOUNT_DIALOG, NULL); } static void @@ -1827,7 +1827,7 @@ gtk_tree_model_get(model, iter, COLUMN_DATA, &account, -1); if (account != NULL) - gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account); + pidgin_account_dialog_show(PIDGIN_MODIFY_ACCOUNT_DIALOG, account); } static void @@ -1884,7 +1884,7 @@ { gtk_widget_destroy(dialog->window); - gaim_gtk_accounts_window_hide(); + pidgin_accounts_window_hide(); } @@ -1915,7 +1915,7 @@ gaim_savedstatus_activate_for_account(saved_status, account); } - gaim_account_set_enabled(account, GAIM_GTK_UI, !enabled); + gaim_account_set_enabled(account, PIDGIN_UI, !enabled); } static void @@ -1980,7 +1980,7 @@ GdkPixbuf *pixbuf, *buddyicon = NULL; const char *path = NULL; - pixbuf = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); if ((pixbuf != NULL) && gaim_account_is_disconnected(account)) gdk_pixbuf_saturate_and_pixelate(pixbuf, pixbuf, 0.0, FALSE); @@ -1991,7 +1991,7 @@ else path = gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon"); } else - path = gaim_account_get_ui_string(account, GAIM_GTK_UI, "non-global-buddyicon-path", NULL); + path = gaim_account_get_ui_string(account, PIDGIN_UI, "non-global-buddyicon-path", NULL); if (path != NULL) { GdkPixbuf *buddyicon_pixbuf = gdk_pixbuf_new_from_file(path, NULL); @@ -2005,7 +2005,7 @@ COLUMN_ICON, pixbuf, COLUMN_BUDDYICON, buddyicon, COLUMN_SCREENNAME, gaim_account_get_username(account), - COLUMN_ENABLED, gaim_account_get_enabled(account, GAIM_GTK_UI), + COLUMN_ENABLED, gaim_account_get_enabled(account, PIDGIN_UI), COLUMN_PROTOCOL, gaim_account_get_protocol_name(account), COLUMN_DATA, account, -1); @@ -2111,7 +2111,7 @@ (event->type == GDK_2BUTTON_PRESS) && (strcmp(gtk_tree_view_column_get_title(column), title))) { - gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account); + pidgin_account_dialog_show(PIDGIN_MODIFY_ACCOUNT_DIALOG, account); return TRUE; } @@ -2140,7 +2140,7 @@ /* Create a helpful first-time-use label */ label = gtk_label_new(NULL); /* Translators: Please maintain the use of -> or <- to represent the menu heirarchy */ - pretty = gaim_gtk_make_pretty_arrows(_( + pretty = pidgin_make_pretty_arrows(_( "<span size='larger' weight='bold'>Welcome to " PIDGIN_NAME "!</span>\n\n" "You have no IM accounts configured. To start connecting with " PIDGIN_NAME " " @@ -2243,7 +2243,7 @@ } void -gaim_gtk_accounts_window_show(void) +pidgin_accounts_window_show(void) { AccountsWindow *dialog; GtkWidget *win; @@ -2301,7 +2301,7 @@ G_CALLBACK(add_account_cb), dialog); /* Modify button */ - button = gtk_button_new_from_stock(GAIM_STOCK_MODIFY); + button = gtk_button_new_from_stock(PIDGIN_STOCK_MODIFY); dialog->modify_button = button; gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_set_sensitive(button, FALSE); @@ -2328,7 +2328,7 @@ g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(close_accounts_cb), dialog); - gaim_signal_connect(gaim_gtk_account_get_handle(), "account-modified", + gaim_signal_connect(pidgin_account_get_handle(), "account-modified", accounts_window, GAIM_CALLBACK(account_modified_cb), accounts_window); gaim_prefs_connect_callback(accounts_window, @@ -2339,7 +2339,7 @@ } void -gaim_gtk_accounts_window_hide(void) +pidgin_accounts_window_hide(void) { if (accounts_window == NULL) return; @@ -2351,7 +2351,7 @@ accounts_window = NULL; /* See if we're the main window here. */ - if (GAIM_GTK_BLIST(gaim_get_blist())->window == NULL && + if (PIDGIN_BLIST(gaim_get_blist())->window == NULL && gaim_connections_get_all() == NULL) { gaim_core_quit(); @@ -2359,7 +2359,7 @@ } static void -free_add_user_data(GaimGtkAccountAddUserData *data) +free_add_user_data(PidginAccountAddUserData *data) { g_free(data->username); g_free(data->alias); @@ -2367,7 +2367,7 @@ } static void -add_user_cb(GaimGtkAccountAddUserData *data) +add_user_cb(PidginAccountAddUserData *data) { GaimConnection *gc = gaim_account_get_connection(data->account); @@ -2402,7 +2402,7 @@ } static void -gaim_gtk_accounts_notify_added(GaimAccount *account, const char *remote_user, +pidgin_accounts_notify_added(GaimAccount *account, const char *remote_user, const char *id, const char *alias, const char *msg) { @@ -2413,36 +2413,36 @@ gc = gaim_account_get_connection(account); buffer = make_info(account, gc, remote_user, id, alias, msg); - alert = gaim_gtk_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_INFO, buffer, + alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_INFO, buffer, NULL, NULL, _("Close"), NULL, NULL); - gaim_gtk_blist_add_alert(alert); + pidgin_blist_add_alert(alert); g_free(buffer); } static void -gaim_gtk_accounts_request_add(GaimAccount *account, const char *remote_user, +pidgin_accounts_request_add(GaimAccount *account, const char *remote_user, const char *id, const char *alias, const char *msg) { char *buffer; GaimConnection *gc; - GaimGtkAccountAddUserData *data; + PidginAccountAddUserData *data; GtkWidget *alert; gc = gaim_account_get_connection(account); - data = g_new0(GaimGtkAccountAddUserData, 1); + data = g_new0(PidginAccountAddUserData, 1); data->account = account; data->username = g_strdup(remote_user); data->alias = g_strdup(alias); buffer = make_info(account, gc, remote_user, id, alias, msg); - alert = gaim_gtk_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, + alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, _("Add buddy to your list?"), buffer, data, _("Add"), G_CALLBACK(add_user_cb), _("Cancel"), G_CALLBACK(free_add_user_data), NULL); - gaim_gtk_blist_add_alert(alert); + pidgin_blist_add_alert(alert); g_free(buffer); } @@ -2479,7 +2479,7 @@ } static void * -gaim_gtk_accounts_request_authorization(GaimAccount *account, const char *remote_user, +pidgin_accounts_request_authorization(GaimAccount *account, const char *remote_user, const char *id, const char *alias, const char *message, gboolean on_list, GCallback auth_cb, GCallback deny_cb, void *user_data) { @@ -2513,19 +2513,19 @@ aa->username = g_strdup(remote_user); aa->alias = g_strdup(alias); aa->account = account; - alert = gaim_gtk_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, + alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, _("Authorize buddy?"), buffer, aa, _("Authorize"), authorize_and_add_cb, _("Deny"), deny_no_add_cb, NULL); } else { - alert = gaim_gtk_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, + alert = pidgin_make_mini_dialog(gc, PIDGIN_STOCK_DIALOG_QUESTION, _("Authorize buddy?"), buffer, user_data, _("Authorize"), auth_cb, _("Deny"), deny_cb, NULL); } - gaim_gtk_blist_add_alert(alert); + pidgin_blist_add_alert(alert); g_free(buffer); @@ -2533,35 +2533,35 @@ } static void -gaim_gtk_accounts_request_close(void *ui_handle) +pidgin_accounts_request_close(void *ui_handle) { } static GaimAccountUiOps ui_ops = { - gaim_gtk_accounts_notify_added, + pidgin_accounts_notify_added, NULL, - gaim_gtk_accounts_request_add, - gaim_gtk_accounts_request_authorization, - gaim_gtk_accounts_request_close + pidgin_accounts_request_add, + pidgin_accounts_request_authorization, + pidgin_accounts_request_close }; GaimAccountUiOps * -gaim_gtk_accounts_get_ui_ops(void) +pidgin_accounts_get_ui_ops(void) { return &ui_ops; } void * -gaim_gtk_account_get_handle(void) { +pidgin_account_get_handle(void) { static int handle; return &handle; } void -gaim_gtk_account_init(void) +pidgin_account_init(void) { gaim_prefs_add_none("/gaim/gtk/accounts"); gaim_prefs_add_none("/gaim/gtk/accounts/dialog"); @@ -2569,29 +2569,29 @@ gaim_prefs_add_int("/gaim/gtk/accounts/dialog/height", 321); gaim_prefs_add_path("/gaim/gtk/accounts/buddyicon", NULL); - gaim_signal_register(gaim_gtk_account_get_handle(), "account-modified", + gaim_signal_register(pidgin_account_get_handle(), "account-modified", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT)); /* Setup some gaim signal handlers. */ gaim_signal_connect(gaim_connections_get_handle(), "signed-on", - gaim_gtk_account_get_handle(), + pidgin_account_get_handle(), GAIM_CALLBACK(signed_on_off_cb), NULL); gaim_signal_connect(gaim_connections_get_handle(), "signed-off", - gaim_gtk_account_get_handle(), + pidgin_account_get_handle(), GAIM_CALLBACK(signed_on_off_cb), NULL); gaim_signal_connect(gaim_accounts_get_handle(), "account-added", - gaim_gtk_account_get_handle(), + pidgin_account_get_handle(), GAIM_CALLBACK(add_account_to_liststore), NULL); gaim_signal_connect(gaim_accounts_get_handle(), "account-removed", - gaim_gtk_account_get_handle(), + pidgin_account_get_handle(), GAIM_CALLBACK(account_removed_cb), NULL); gaim_signal_connect(gaim_accounts_get_handle(), "account-disabled", - gaim_gtk_account_get_handle(), + pidgin_account_get_handle(), GAIM_CALLBACK(account_abled_cb), GINT_TO_POINTER(FALSE)); gaim_signal_connect(gaim_accounts_get_handle(), "account-enabled", - gaim_gtk_account_get_handle(), + pidgin_account_get_handle(), GAIM_CALLBACK(account_abled_cb), GINT_TO_POINTER(TRUE)); account_pref_wins = @@ -2599,7 +2599,7 @@ } void -gaim_gtk_account_uninit(void) +pidgin_account_uninit(void) { /* * TODO: Need to free all the dialogs in here. Could probably create @@ -2608,7 +2608,7 @@ */ g_hash_table_destroy(account_pref_wins); - gaim_signals_disconnect_by_handle(gaim_gtk_account_get_handle()); - gaim_signals_unregister_by_instance(gaim_gtk_account_get_handle()); + gaim_signals_disconnect_by_handle(pidgin_account_get_handle()); + gaim_signals_unregister_by_instance(pidgin_account_get_handle()); }
--- a/pidgin/gtkaccount.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkaccount.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,28 +22,28 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKACCOUNT_H_ -#define _GAIM_GTKACCOUNT_H_ +#ifndef _PIDGINACCOUNT_H_ +#define _PIDGINACCOUNT_H_ #include "account.h" typedef enum { - GAIM_GTK_ADD_ACCOUNT_DIALOG, - GAIM_GTK_MODIFY_ACCOUNT_DIALOG + PIDGIN_ADD_ACCOUNT_DIALOG, + PIDGIN_MODIFY_ACCOUNT_DIALOG -} GaimGtkAccountDialogType; +} PidginAccountDialogType; /** * Shows the accounts window. */ -void gaim_gtk_accounts_window_show(void); +void pidgin_accounts_window_show(void); /** * Hides the accounts window. */ -void gaim_gtk_accounts_window_hide(void); +void pidgin_accounts_window_hide(void); /** * Shows an add/modify account dialog. @@ -51,7 +51,7 @@ * @param type The type of dialog. * @param account The associated account, or @c NULL for an Add dialog. */ -void gaim_gtk_account_dialog_show(GaimGtkAccountDialogType type, +void pidgin_account_dialog_show(PidginAccountDialogType type, GaimAccount *account); /** @@ -59,23 +59,23 @@ * * @return The UI operations structure. */ -GaimAccountUiOps *gaim_gtk_accounts_get_ui_ops(void); +GaimAccountUiOps *pidgin_accounts_get_ui_ops(void); /** * Returns the gtkaccounts handle * * @return The handle to the GTK+ account system */ -void *gaim_gtk_account_get_handle(void); +void *pidgin_account_get_handle(void); /** * Initializes the GTK+ account system */ -void gaim_gtk_account_init(void); +void pidgin_account_init(void); /** * Uninitializes the GTK+ account system */ -void gaim_gtk_account_uninit(void); +void pidgin_account_uninit(void); -#endif /* _GAIM_GTKACCOUNT_H_ */ +#endif /* _PIDGINACCOUNT_H_ */
--- a/pidgin/gtkblist.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkblist.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" #include "connection.h" @@ -73,7 +73,7 @@ GtkWidget *entry_for_alias; GtkWidget *account_box; -} GaimGtkAddBuddyData; +} PidginAddBuddyData; typedef struct { @@ -89,7 +89,7 @@ GList *entries; -} GaimGtkAddChatData; +} PidginAddChatData; typedef struct { @@ -101,7 +101,7 @@ GtkSizeGroup *sg; GList *entries; -} GaimGtkJoinChatData; +} PidginJoinChatData; static GtkWidget *accountmenu = NULL; @@ -109,8 +109,8 @@ static guint visibility_manager_count = 0; static gboolean gtk_blist_obscured = FALSE; -static GList *gaim_gtk_blist_sort_methods = NULL; -static struct gaim_gtk_blist_sort_method *current_sort_method = NULL; +static GList *pidgin_blist_sort_methods = NULL; +static struct pidgin_blist_sort_method *current_sort_method = NULL; static void sort_method_none(GaimBlistNode *node, GaimBuddyList *blist, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter); /* The functions we use for sorting aren't available in gtk 2.0.x, and @@ -120,23 +120,23 @@ static void sort_method_status(GaimBlistNode *node, GaimBuddyList *blist, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter); static void sort_method_log(GaimBlistNode *node, GaimBuddyList *blist, GtkTreeIter groupiter, GtkTreeIter *cur, GtkTreeIter *iter); #endif -static GaimGtkBuddyList *gtkblist = NULL; - -static gboolean gaim_gtk_blist_refresh_timer(GaimBuddyList *list); -static void gaim_gtk_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node, gboolean statusChange); -static void gaim_gtk_blist_selection_changed(GtkTreeSelection *selection, gpointer data); -static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node); -static void gaim_gtk_blist_update_contact(GaimBuddyList *list, GaimBlistNode *node); +static PidginBuddyList *gtkblist = NULL; + +static gboolean pidgin_blist_refresh_timer(GaimBuddyList *list); +static void pidgin_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node, gboolean statusChange); +static void pidgin_blist_selection_changed(GtkTreeSelection *selection, gpointer data); +static void pidgin_blist_update(GaimBuddyList *list, GaimBlistNode *node); +static void pidgin_blist_update_contact(GaimBuddyList *list, GaimBlistNode *node); static char *gaim_get_tooltip_text(GaimBlistNode *node, gboolean full); static const char *item_factory_translate_func (const char *path, gpointer func_data); static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter); static void redo_buddy_list(GaimBuddyList *list, gboolean remove, gboolean rerender); -static void gaim_gtk_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node); +static void pidgin_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node); static char *gaim_get_group_title(GaimBlistNode *gnode, gboolean expanded); -static void gaim_gtk_blist_tooltip_destroy(void); - -struct _gaim_gtk_blist_node { +static void pidgin_blist_tooltip_destroy(void); + +struct _pidgin_blist_node { GtkTreeRowReference *row; gboolean contact_expanded; gboolean recent_signonoff; @@ -167,7 +167,7 @@ gtk_blist_obscured = TRUE; else if (gtk_blist_obscured) { gtk_blist_obscured = FALSE; - gaim_gtk_blist_refresh_timer(gaim_get_blist()); + pidgin_blist_refresh_timer(gaim_get_blist()); } /* continue to handle event normally */ @@ -181,7 +181,7 @@ gaim_prefs_set_bool("/gaim/gtk/blist/list_visible", FALSE); else { gaim_prefs_set_bool("/gaim/gtk/blist/list_visible", TRUE); - gaim_gtk_blist_refresh_timer(gaim_get_blist()); + pidgin_blist_refresh_timer(gaim_get_blist()); } } @@ -195,7 +195,7 @@ /* Refresh gtkblist if un-iconifying */ if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED){ if (!(event->new_window_state & GDK_WINDOW_STATE_ICONIFIED)) - gaim_gtk_blist_refresh_timer(gaim_get_blist()); + pidgin_blist_refresh_timer(gaim_get_blist()); } return FALSE; @@ -278,7 +278,7 @@ static void gtk_blist_menu_im_cb(GtkWidget *w, GaimBuddy *b) { - gaim_gtkdialogs_im_with_user(b->account, b->name); + pidgindialogs_im_with_user(b->account, b->name); } static void gtk_blist_menu_send_file_cb(GtkWidget *w, GaimBuddy *b) @@ -301,7 +301,7 @@ chat->account); if (conv != NULL) - gaim_gtkconv_present_conversation(conv); + pidgin_conv_present_conversation(conv); serv_join_chat(chat->account->gc, chat->components); } @@ -334,7 +334,7 @@ case GAIM_BLIST_CONTACT_NODE: { GaimContact *contact = (GaimContact *)node; - struct _gaim_gtk_blist_node *gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; if (contact->alias || gtknode->contact_expanded) gaim_blist_alias_contact(contact, arg2); @@ -354,7 +354,7 @@ case GAIM_BLIST_GROUP_NODE: dest = gaim_find_group(arg2); if (dest != NULL && strcmp(arg2, ((GaimGroup*) node)->name)) { - gaim_gtkdialogs_merge_groups((GaimGroup*) node, arg2); + pidgindialogs_merge_groups((GaimGroup*) node, arg2); } else gaim_blist_rename_group((GaimGroup*)node, arg2); break; @@ -417,7 +417,7 @@ static void gtk_blist_menu_bp_cb(GtkWidget *w, GaimBuddy *b) { - gaim_gtk_pounce_editor_show(b->account, b->name, NULL); + pidgin_pounce_editor_show(b->account, b->name, NULL); } static void gtk_blist_menu_showlog_cb(GtkWidget *w, GaimBlistNode *node) @@ -426,7 +426,7 @@ GaimAccount *account; char *name = NULL; - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + pidgin_set_cursor(gtkblist->window, GDK_WATCH); if (GAIM_BLIST_NODE_IS_BUDDY(node)) { GaimBuddy *b = (GaimBuddy*) node; @@ -443,11 +443,11 @@ name = prpl_info->get_chat_name(c->components); } } else if (GAIM_BLIST_NODE_IS_CONTACT(node)) { - gaim_gtk_log_show_contact((GaimContact *)node); - gaim_gtk_clear_cursor(gtkblist->window); + pidgin_log_show_contact((GaimContact *)node); + pidgin_clear_cursor(gtkblist->window); return; } else { - gaim_gtk_clear_cursor(gtkblist->window); + pidgin_clear_cursor(gtkblist->window); /* This callback should not have been registered for a node * that doesn't match the type of one of the blocks above. */ @@ -455,16 +455,16 @@ } if (name && account) { - gaim_gtk_log_show(type, name, account); + pidgin_log_show(type, name, account); g_free(name); - gaim_gtk_clear_cursor(gtkblist->window); + pidgin_clear_cursor(gtkblist->window); } } static void gtk_blist_show_systemlog_cb() { - gaim_gtk_syslog_show(); + pidgin_syslog_show(); } static void gtk_blist_show_onlinehelp_cb() @@ -473,7 +473,7 @@ } static void -do_join_chat(GaimGtkJoinChatData *data) +do_join_chat(PidginJoinChatData *data) { if (data) { @@ -506,7 +506,7 @@ } static void -do_joinchat(GtkWidget *dialog, int id, GaimGtkJoinChatData *info) +do_joinchat(GtkWidget *dialog, int id, PidginJoinChatData *info) { switch(id) { @@ -528,7 +528,7 @@ static void joinchat_set_sensitive_if_input_cb(GtkWidget *entry, gpointer user_data) { - GaimGtkJoinChatData *data; + PidginJoinChatData *data; GList *tmp; const char *text; gboolean required; @@ -551,13 +551,13 @@ } static void -gaim_gtk_blist_update_privacy_cb(GaimBuddy *buddy) -{ - gaim_gtk_blist_update_buddy(gaim_get_blist(), (GaimBlistNode*)(buddy), TRUE); +pidgin_blist_update_privacy_cb(GaimBuddy *buddy) +{ + pidgin_blist_update_buddy(gaim_get_blist(), (GaimBlistNode*)(buddy), TRUE); } static void -rebuild_joinchat_entries(GaimGtkJoinChatData *data) +rebuild_joinchat_entries(PidginJoinChatData *data) { GaimConnection *gc; GList *list = NULL, *tmp; @@ -632,7 +632,7 @@ focus = FALSE; } gtk_label_set_mnemonic_widget(GTK_LABEL(label), input); - gaim_set_accessible_label(input, label); + pidgin_set_accessible_label(input, label); g_object_set_data(G_OBJECT(input), "identifier", (gpointer)pce->identifier); g_object_set_data(G_OBJECT(input), "is_spin", GINT_TO_POINTER(pce->is_int)); g_object_set_data(G_OBJECT(input), "required", GINT_TO_POINTER(pce->required)); @@ -652,7 +652,7 @@ static void joinchat_select_account_cb(GObject *w, GaimAccount *account, - GaimGtkJoinChatData *data) + PidginJoinChatData *data) { data->account = account; rebuild_joinchat_entries(data); @@ -670,7 +670,7 @@ } gboolean -gaim_gtk_blist_joinchat_is_showable() +pidgin_blist_joinchat_is_showable() { GList *c; GaimConnection *gc; @@ -686,24 +686,24 @@ } void -gaim_gtk_blist_joinchat_show(void) +pidgin_blist_joinchat_show(void) { GtkWidget *hbox, *vbox; GtkWidget *rowbox; GtkWidget *label; - GaimGtkBuddyList *gtkblist; + PidginBuddyList *gtkblist; GtkWidget *img = NULL; - GaimGtkJoinChatData *data = NULL; - - gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); + PidginJoinChatData *data = NULL; + + gtkblist = PIDGIN_BLIST(gaim_get_blist()); img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); - data = g_new0(GaimGtkJoinChatData, 1); + data = g_new0(PidginJoinChatData, 1); data->window = gtk_dialog_new_with_buttons(_("Join a Chat"), NULL, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GAIM_STOCK_CHAT, GTK_RESPONSE_OK, NULL); + PIDGIN_STOCK_CHAT, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(data->window), GTK_RESPONSE_OK); gtk_container_set_border_width(GTK_CONTAINER(data->window), GAIM_HIG_BOX_SPACE); gtk_window_set_resizable(GTK_WINDOW(data->window), FALSE); @@ -737,19 +737,19 @@ gtk_box_pack_start(GTK_BOX(rowbox), label, FALSE, FALSE, 0); gtk_size_group_add_widget(data->sg, label); - data->account_menu = gaim_gtk_account_option_menu_new(NULL, FALSE, + data->account_menu = pidgin_account_option_menu_new(NULL, FALSE, G_CALLBACK(joinchat_select_account_cb), chat_account_filter_func, data); gtk_box_pack_start(GTK_BOX(rowbox), data->account_menu, TRUE, TRUE, 0); gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(data->account_menu)); - gaim_set_accessible_label (data->account_menu, label); + pidgin_set_accessible_label (data->account_menu, label); data->entries_box = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(vbox), data->entries_box); gtk_container_set_border_width(GTK_CONTAINER(data->entries_box), 0); - data->account = gaim_gtk_account_option_menu_get_selected(data->account_menu); + data->account = pidgin_account_option_menu_get_selected(data->account_menu); rebuild_joinchat_entries(data); @@ -807,7 +807,7 @@ gaim_blist_node_set_bool(node, "collapsed", TRUE); } else if(GAIM_BLIST_NODE_IS_CONTACT(node)) { - gaim_gtk_blist_collapse_contact_cb(NULL, node); + pidgin_blist_collapse_contact_cb(NULL, node); } } @@ -830,7 +830,7 @@ else buddy = (GaimBuddy*)node; - gaim_gtkdialogs_im_with_user(buddy->account, buddy->name); + pidgindialogs_im_with_user(buddy->account, buddy->name); } else if (GAIM_BLIST_NODE_IS_CHAT(node)) { gtk_blist_join_chat((GaimChat *)node); } else if (GAIM_BLIST_NODE_IS_GROUP(node)) { @@ -841,7 +841,7 @@ } } -static void gaim_gtk_blist_add_chat_cb() +static void pidgin_blist_add_chat_cb() { GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview)); GtkTreeIter iter; @@ -861,7 +861,7 @@ } } -static void gaim_gtk_blist_add_buddy_cb() +static void pidgin_blist_add_buddy_cb() { GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview)); GtkTreeIter iter; @@ -885,16 +885,16 @@ } static void -gaim_gtk_blist_remove_cb (GtkWidget *w, GaimBlistNode *node) +pidgin_blist_remove_cb (GtkWidget *w, GaimBlistNode *node) { if (GAIM_BLIST_NODE_IS_BUDDY(node)) { - gaim_gtkdialogs_remove_buddy((GaimBuddy*)node); + pidgindialogs_remove_buddy((GaimBuddy*)node); } else if (GAIM_BLIST_NODE_IS_CHAT(node)) { - gaim_gtkdialogs_remove_chat((GaimChat*)node); + pidgindialogs_remove_chat((GaimChat*)node); } else if (GAIM_BLIST_NODE_IS_GROUP(node)) { - gaim_gtkdialogs_remove_group((GaimGroup*)node); + pidgindialogs_remove_group((GaimGroup*)node); } else if (GAIM_BLIST_NODE_IS_CONTACT(node)) { - gaim_gtkdialogs_remove_contact((GaimContact*)node); + pidgindialogs_remove_contact((GaimContact*)node); } } @@ -909,7 +909,7 @@ { struct _expand *ex = data; gtk_tree_view_scroll_to_cell(ex->treeview, ex->path, NULL, FALSE, 0, 0); - gaim_gtk_blist_update_contact(NULL, ex->node); + pidgin_blist_update_contact(NULL, ex->node); gtk_tree_path_free(ex->path); g_free(ex); @@ -918,9 +918,9 @@ } static void -gaim_gtk_blist_expand_contact_cb(GtkWidget *w, GaimBlistNode *node) -{ - struct _gaim_gtk_blist_node *gtknode; +pidgin_blist_expand_contact_cb(GtkWidget *w, GaimBlistNode *node) +{ + struct _pidgin_blist_node *gtknode; GtkTreeIter iter, parent; GaimBlistNode *bnode; GtkTreePath *path; @@ -928,12 +928,12 @@ if(!GAIM_BLIST_NODE_IS_CONTACT(node)) return; - gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + gtknode = (struct _pidgin_blist_node *)node->ui_data; gtknode->contact_expanded = TRUE; for(bnode = node->child; bnode; bnode = bnode->next) { - gaim_gtk_blist_update(NULL, bnode); + pidgin_blist_update(NULL, bnode); } /* This ensures that the bottom buddy is visible, i.e. not scrolled off the alignment */ @@ -953,20 +953,20 @@ } static void -gaim_gtk_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node) +pidgin_blist_collapse_contact_cb(GtkWidget *w, GaimBlistNode *node) { GaimBlistNode *bnode; - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; if(!GAIM_BLIST_NODE_IS_CONTACT(node)) return; - gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + gtknode = (struct _pidgin_blist_node *)node->ui_data; gtknode->contact_expanded = FALSE; for(bnode = node->child; bnode; bnode = bnode->next) { - gaim_gtk_blist_update(NULL, bnode); + pidgin_blist_update(NULL, bnode); } } @@ -994,10 +994,10 @@ else gaim_privacy_allow(account, name, FALSE, FALSE); - gaim_gtk_blist_update(gaim_get_blist(), node); -} - -void gaim_gtk_append_blist_node_privacy_menu(GtkWidget *menu, GaimBlistNode *node) + pidgin_blist_update(gaim_get_blist(), node); +} + +void pidgin_append_blist_node_privacy_menu(GtkWidget *menu, GaimBlistNode *node) { GaimBuddy *buddy = (GaimBuddy *)node; GaimAccount *account; @@ -1006,13 +1006,13 @@ account = gaim_buddy_get_account(buddy); permitted = gaim_privacy_check(account, gaim_buddy_get_name(buddy)); - gaim_new_item_from_stock(menu, permitted ? _("_Block") : _("Un_block"), - GAIM_STOCK_BLOCK, G_CALLBACK(toggle_privacy), + pidgin_new_item_from_stock(menu, permitted ? _("_Block") : _("Un_block"), + PIDGIN_STOCK_BLOCK, G_CALLBACK(toggle_privacy), node, 0 ,0, NULL); } void -gaim_gtk_append_blist_node_proto_menu(GtkWidget *menu, GaimConnection *gc, +pidgin_append_blist_node_proto_menu(GtkWidget *menu, GaimConnection *gc, GaimBlistNode *node) { GList *l, *ll; @@ -1023,25 +1023,25 @@ for(l = ll = prpl_info->blist_node_menu(node); l; l = l->next) { GaimMenuAction *act = (GaimMenuAction *) l->data; - gaim_gtk_append_menu_action(menu, act, node); + pidgin_append_menu_action(menu, act, node); } g_list_free(ll); } void -gaim_gtk_append_blist_node_extended_menu(GtkWidget *menu, GaimBlistNode *node) +pidgin_append_blist_node_extended_menu(GtkWidget *menu, GaimBlistNode *node) { GList *l, *ll; for(l = ll = gaim_blist_node_get_extended_menu(node); l; l = l->next) { GaimMenuAction *act = (GaimMenuAction *) l->data; - gaim_gtk_append_menu_action(menu, act, node); + pidgin_append_menu_action(menu, act, node); } g_list_free(ll); } void -gaim_gtk_blist_make_buddy_menu(GtkWidget *menu, GaimBuddy *buddy, gboolean sub) { +pidgin_blist_make_buddy_menu(GtkWidget *menu, GaimBuddy *buddy, gboolean sub) { GaimPluginProtocolInfo *prpl_info; GaimContact *contact; gboolean contact_expanded = FALSE; @@ -1053,60 +1053,60 @@ contact = gaim_buddy_get_contact(buddy); if (contact) { - contact_expanded = ((struct _gaim_gtk_blist_node *)(((GaimBlistNode*)contact)->ui_data))->contact_expanded; + contact_expanded = ((struct _pidgin_blist_node *)(((GaimBlistNode*)contact)->ui_data))->contact_expanded; } 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_INFO, G_CALLBACK(gtk_blist_menu_info_cb), buddy, 0, 0, NULL); } - gaim_new_item_from_stock(menu, _("I_M"), GAIM_STOCK_IM, + pidgin_new_item_from_stock(menu, _("I_M"), PIDGIN_STOCK_IM, G_CALLBACK(gtk_blist_menu_im_cb), buddy, 0, 0, NULL); if (prpl_info && prpl_info->send_file) { if (!prpl_info->can_receive_file || prpl_info->can_receive_file(buddy->account->gc, buddy->name)) { - gaim_new_item_from_stock(menu, _("_Send File"), - GAIM_STOCK_FILE_TRANSFER, + pidgin_new_item_from_stock(menu, _("_Send File"), + PIDGIN_STOCK_FILE_TRANSFER, G_CALLBACK(gtk_blist_menu_send_file_cb), buddy, 0, 0, NULL); } } - gaim_new_item_from_stock(menu, _("Add Buddy _Pounce"), GAIM_STOCK_POUNCE, + pidgin_new_item_from_stock(menu, _("Add Buddy _Pounce"), PIDGIN_STOCK_POUNCE, G_CALLBACK(gtk_blist_menu_bp_cb), buddy, 0, 0, NULL); if(((GaimBlistNode*)buddy)->parent->child->next && !sub && !contact_expanded) { - gaim_new_item_from_stock(menu, _("View _Log"), GAIM_STOCK_LOG, + pidgin_new_item_from_stock(menu, _("View _Log"), PIDGIN_STOCK_LOG, G_CALLBACK(gtk_blist_menu_showlog_cb), contact, 0, 0, NULL); } else if (!sub) { - gaim_new_item_from_stock(menu, _("View _Log"), GAIM_STOCK_LOG, + pidgin_new_item_from_stock(menu, _("View _Log"), PIDGIN_STOCK_LOG, G_CALLBACK(gtk_blist_menu_showlog_cb), buddy, 0, 0, NULL); } - gaim_gtk_append_blist_node_privacy_menu(menu, (GaimBlistNode *)buddy); - - gaim_gtk_append_blist_node_proto_menu(menu, buddy->account->gc, + pidgin_append_blist_node_privacy_menu(menu, (GaimBlistNode *)buddy); + + pidgin_append_blist_node_proto_menu(menu, buddy->account->gc, (GaimBlistNode *)buddy); - gaim_gtk_append_blist_node_extended_menu(menu, (GaimBlistNode *)buddy); + pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode *)buddy); if (((GaimBlistNode*)buddy)->parent->child->next && !sub && !contact_expanded) { - gaim_separator(menu); - - gaim_new_item_from_stock(menu, _("Alias..."), GAIM_STOCK_ALIAS, + pidgin_separator(menu); + + pidgin_new_item_from_stock(menu, _("Alias..."), PIDGIN_STOCK_ALIAS, G_CALLBACK(gtk_blist_menu_alias_cb), contact, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Remove"), GTK_STOCK_REMOVE, - G_CALLBACK(gaim_gtk_blist_remove_cb), + pidgin_new_item_from_stock(menu, _("Remove"), GTK_STOCK_REMOVE, + G_CALLBACK(pidgin_blist_remove_cb), contact, 0, 0, NULL); } else if (!sub || contact_expanded) { - gaim_separator(menu); - - gaim_new_item_from_stock(menu, _("_Alias..."), GAIM_STOCK_ALIAS, + pidgin_separator(menu); + + pidgin_new_item_from_stock(menu, _("_Alias..."), PIDGIN_STOCK_ALIAS, G_CALLBACK(gtk_blist_menu_alias_cb), buddy, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, - G_CALLBACK(gaim_gtk_blist_remove_cb), buddy, + pidgin_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, + G_CALLBACK(pidgin_blist_remove_cb), buddy, 0, 0, NULL); } } @@ -1152,17 +1152,17 @@ GtkWidget *item; menu = gtk_menu_new(); - gaim_new_item_from_stock(menu, _("Add a _Buddy"), GTK_STOCK_ADD, - G_CALLBACK(gaim_gtk_blist_add_buddy_cb), node, 0, 0, NULL); - item = gaim_new_item_from_stock(menu, _("Add a C_hat"), GTK_STOCK_ADD, - G_CALLBACK(gaim_gtk_blist_add_chat_cb), node, 0, 0, NULL); - gtk_widget_set_sensitive(item, gaim_gtk_blist_joinchat_is_showable()); - gaim_new_item_from_stock(menu, _("_Delete Group"), GTK_STOCK_REMOVE, - G_CALLBACK(gaim_gtk_blist_remove_cb), node, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("_Rename"), NULL, + pidgin_new_item_from_stock(menu, _("Add a _Buddy"), GTK_STOCK_ADD, + G_CALLBACK(pidgin_blist_add_buddy_cb), node, 0, 0, NULL); + item = pidgin_new_item_from_stock(menu, _("Add a C_hat"), GTK_STOCK_ADD, + G_CALLBACK(pidgin_blist_add_chat_cb), node, 0, 0, NULL); + gtk_widget_set_sensitive(item, pidgin_blist_joinchat_is_showable()); + pidgin_new_item_from_stock(menu, _("_Delete Group"), GTK_STOCK_REMOVE, + G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL); + pidgin_new_item_from_stock(menu, _("_Rename"), NULL, G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); - gaim_gtk_append_blist_node_extended_menu(menu, node); + pidgin_append_blist_node_extended_menu(menu, node); return menu; } @@ -1177,22 +1177,22 @@ autojoin = (gaim_blist_node_get_bool(node, "gtk-autojoin") || (gaim_blist_node_get_string(node, "gtk-autojoin") != NULL)); - gaim_new_item_from_stock(menu, _("_Join"), GAIM_STOCK_CHAT, + pidgin_new_item_from_stock(menu, _("_Join"), PIDGIN_STOCK_CHAT, G_CALLBACK(gtk_blist_menu_join_cb), node, 0, 0, NULL); - gaim_new_check_item(menu, _("Auto-Join"), + pidgin_new_check_item(menu, _("Auto-Join"), G_CALLBACK(gtk_blist_menu_autojoin_cb), node, autojoin); - gaim_new_item_from_stock(menu, _("View _Log"), GAIM_STOCK_LOG, + pidgin_new_item_from_stock(menu, _("View _Log"), PIDGIN_STOCK_LOG, G_CALLBACK(gtk_blist_menu_showlog_cb), node, 0, 0, NULL); - gaim_gtk_append_blist_node_proto_menu(menu, c->account->gc, node); - gaim_gtk_append_blist_node_extended_menu(menu, node); - - gaim_separator(menu); - - gaim_new_item_from_stock(menu, _("_Alias..."), GAIM_STOCK_ALIAS, + pidgin_append_blist_node_proto_menu(menu, c->account->gc, node); + pidgin_append_blist_node_extended_menu(menu, node); + + pidgin_separator(menu); + + pidgin_new_item_from_stock(menu, _("_Alias..."), PIDGIN_STOCK_ALIAS, G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, - G_CALLBACK(gaim_gtk_blist_remove_cb), node, 0, 0, NULL); + pidgin_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, + G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL); return menu; } @@ -1204,50 +1204,50 @@ menu = gtk_menu_new(); - gaim_new_item_from_stock(menu, _("View _Log"), GAIM_STOCK_LOG, + pidgin_new_item_from_stock(menu, _("View _Log"), PIDGIN_STOCK_LOG, G_CALLBACK(gtk_blist_menu_showlog_cb), node, 0, 0, NULL); - gaim_separator(menu); - - gaim_new_item_from_stock(menu, _("_Alias..."), GAIM_STOCK_ALIAS, + pidgin_separator(menu); + + pidgin_new_item_from_stock(menu, _("_Alias..."), PIDGIN_STOCK_ALIAS, G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, - G_CALLBACK(gaim_gtk_blist_remove_cb), node, 0, 0, NULL); - - gaim_separator(menu); - - gaim_new_item_from_stock(menu, _("_Collapse"), GTK_STOCK_ZOOM_OUT, - G_CALLBACK(gaim_gtk_blist_collapse_contact_cb), + pidgin_new_item_from_stock(menu, _("_Remove"), GTK_STOCK_REMOVE, + G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL); + + pidgin_separator(menu); + + pidgin_new_item_from_stock(menu, _("_Collapse"), GTK_STOCK_ZOOM_OUT, + G_CALLBACK(pidgin_blist_collapse_contact_cb), node, 0, 0, NULL); - gaim_gtk_append_blist_node_extended_menu(menu, node); + pidgin_append_blist_node_extended_menu(menu, node); return menu; } static GtkWidget * create_buddy_menu(GaimBlistNode *node, GaimBuddy *b) { - struct _gaim_gtk_blist_node *gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; GtkWidget *menu; GtkWidget *menuitem; gboolean show_offline = gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies"); menu = gtk_menu_new(); - gaim_gtk_blist_make_buddy_menu(menu, b, FALSE); + pidgin_blist_make_buddy_menu(menu, b, FALSE); if(GAIM_BLIST_NODE_IS_CONTACT(node)) { - gaim_separator(menu); + pidgin_separator(menu); if(gtknode->contact_expanded) { - gaim_new_item_from_stock(menu, _("_Collapse"), + pidgin_new_item_from_stock(menu, _("_Collapse"), GTK_STOCK_ZOOM_OUT, - G_CALLBACK(gaim_gtk_blist_collapse_contact_cb), + G_CALLBACK(pidgin_blist_collapse_contact_cb), node, 0, 0, NULL); } else { - gaim_new_item_from_stock(menu, _("_Expand"), + pidgin_new_item_from_stock(menu, _("_Expand"), GTK_STOCK_ZOOM_IN, - G_CALLBACK(gaim_gtk_blist_expand_contact_cb), node, + G_CALLBACK(pidgin_blist_expand_contact_cb), node, 0, 0, NULL); } if(node->child->next) { @@ -1267,7 +1267,7 @@ continue; menuitem = gtk_image_menu_item_new_with_label(buddy->name); - buf = gaim_gtk_create_prpl_icon(buddy->account,PIDGIN_PRPL_ICON_SMALL); + buf = pidgin_create_prpl_icon(buddy->account,PIDGIN_PRPL_ICON_SMALL); image = gtk_image_new_from_pixbuf(buf); g_object_unref(G_OBJECT(buf)); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), @@ -1280,7 +1280,7 @@ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); gtk_widget_show(submenu); - gaim_gtk_blist_make_buddy_menu(submenu, buddy, TRUE); + pidgin_blist_make_buddy_menu(submenu, buddy, TRUE); } } } @@ -1288,17 +1288,17 @@ } static gboolean -gaim_gtk_blist_show_context_menu(GaimBlistNode *node, +pidgin_blist_show_context_menu(GaimBlistNode *node, GtkMenuPositionFunc func, GtkWidget *tv, guint button, guint32 time) { - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; GtkWidget *menu = NULL; gboolean handled = FALSE; - gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + gtknode = (struct _pidgin_blist_node *)node->ui_data; /* Create a menu based on the thing we right-clicked on */ if (GAIM_BLIST_NODE_IS_GROUP(node)) { @@ -1351,7 +1351,7 @@ GtkTreeSelection *sel; GaimPlugin *prpl = NULL; GaimPluginProtocolInfo *prpl_info = NULL; - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; gboolean handled = FALSE; /* Here we figure out which node was clicked */ @@ -1361,19 +1361,19 @@ val.g_type = 0; gtk_tree_model_get_value(GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &val); node = g_value_get_pointer(&val); - gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + gtknode = (struct _pidgin_blist_node *)node->ui_data; /* Right click draws a context menu */ if ((event->button == 3) && (event->type == GDK_BUTTON_PRESS)) { - handled = gaim_gtk_blist_show_context_menu(node, NULL, tv, 3, event->time); + handled = pidgin_blist_show_context_menu(node, NULL, tv, 3, event->time); /* CTRL+middle click expands or collapse a contact */ } else if ((event->button == 2) && (event->type == GDK_BUTTON_PRESS) && (event->state & GDK_CONTROL_MASK) && (GAIM_BLIST_NODE_IS_CONTACT(node))) { if (gtknode->contact_expanded) - gaim_gtk_blist_collapse_contact_cb(NULL, node); + pidgin_blist_collapse_contact_cb(NULL, node); else - gaim_gtk_blist_expand_contact_cb(NULL, node); + pidgin_blist_expand_contact_cb(NULL, node); handled = TRUE; /* Double middle click gets info */ @@ -1416,7 +1416,7 @@ } static gboolean -gaim_gtk_blist_popup_menu_cb(GtkWidget *tv, void *user_data) +pidgin_blist_popup_menu_cb(GtkWidget *tv, void *user_data) { GaimBlistNode *node; GValue val; @@ -1434,59 +1434,59 @@ node = g_value_get_pointer(&val); /* Shift+F10 draws a context menu */ - handled = gaim_gtk_blist_show_context_menu(node, gaim_gtk_treeview_popup_menu_position_func, tv, 0, GDK_CURRENT_TIME); + handled = pidgin_blist_show_context_menu(node, pidgin_treeview_popup_menu_position_func, tv, 0, GDK_CURRENT_TIME); return handled; } -static void gaim_gtk_blist_buddy_details_cb(gpointer data, guint action, GtkWidget *item) -{ - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); +static void pidgin_blist_buddy_details_cb(gpointer data, guint action, GtkWidget *item) +{ + pidgin_set_cursor(gtkblist->window, GDK_WATCH); gaim_prefs_set_bool("/gaim/gtk/blist/show_buddy_icons", gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(item))); - gaim_gtk_clear_cursor(gtkblist->window); -} - -static void gaim_gtk_blist_show_idle_time_cb(gpointer data, guint action, GtkWidget *item) -{ - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + pidgin_clear_cursor(gtkblist->window); +} + +static void pidgin_blist_show_idle_time_cb(gpointer data, guint action, GtkWidget *item) +{ + pidgin_set_cursor(gtkblist->window, GDK_WATCH); gaim_prefs_set_bool("/gaim/gtk/blist/show_idle_time", gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(item))); - gaim_gtk_clear_cursor(gtkblist->window); -} - -static void gaim_gtk_blist_show_empty_groups_cb(gpointer data, guint action, GtkWidget *item) -{ - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + pidgin_clear_cursor(gtkblist->window); +} + +static void pidgin_blist_show_empty_groups_cb(gpointer data, guint action, GtkWidget *item) +{ + pidgin_set_cursor(gtkblist->window, GDK_WATCH); gaim_prefs_set_bool("/gaim/gtk/blist/show_empty_groups", gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(item))); - gaim_gtk_clear_cursor(gtkblist->window); -} - -static void gaim_gtk_blist_edit_mode_cb(gpointer callback_data, guint callback_action, + pidgin_clear_cursor(gtkblist->window); +} + +static void pidgin_blist_edit_mode_cb(gpointer callback_data, guint callback_action, GtkWidget *checkitem) { - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + pidgin_set_cursor(gtkblist->window, GDK_WATCH); gaim_prefs_set_bool("/gaim/gtk/blist/show_offline_buddies", gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(checkitem))); - gaim_gtk_clear_cursor(gtkblist->window); -} - -static void gaim_gtk_blist_mute_sounds_cb(gpointer data, guint action, GtkWidget *item) + pidgin_clear_cursor(gtkblist->window); +} + +static void pidgin_blist_mute_sounds_cb(gpointer data, guint action, GtkWidget *item) { gaim_prefs_set_bool("/gaim/gtk/sound/mute", GTK_CHECK_MENU_ITEM(item)->active); } static void -gaim_gtk_blist_mute_pref_cb(const char *name, GaimPrefType type, +pidgin_blist_mute_pref_cb(const char *name, GaimPrefType type, gconstpointer value, gpointer data) { gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtk_item_factory_get_item(gtkblist->ift, @@ -1494,7 +1494,7 @@ } static void -gaim_gtk_blist_sound_method_pref_cb(const char *name, GaimPrefType type, +pidgin_blist_sound_method_pref_cb(const char *name, GaimPrefType type, gconstpointer value, gpointer data) { gboolean sensitive = TRUE; @@ -1636,10 +1636,10 @@ } #ifdef _WIN32 -static void gaim_gtk_blist_drag_begin(GtkWidget *widget, +static void pidgin_blist_drag_begin(GtkWidget *widget, GdkDragContext *drag_context, gpointer user_data) { - gaim_gtk_blist_tooltip_destroy(); + pidgin_blist_tooltip_destroy(); /* Unhook the tooltip-timeout since we don't want a tooltip @@ -1652,7 +1652,7 @@ } #endif -static void gaim_gtk_blist_drag_data_get_cb(GtkWidget *widget, +static void pidgin_blist_drag_data_get_cb(GtkWidget *widget, GdkDragContext *dc, GtkSelectionData *data, guint info, @@ -1762,7 +1762,7 @@ } } -static void gaim_gtk_blist_drag_data_rcv_cb(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, +static void pidgin_blist_drag_data_rcv_cb(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, GtkSelectionData *sd, guint info, guint t) { if (gtkblist->drag_timeout) { @@ -1780,7 +1780,7 @@ GtkTreeIter iter; GaimBlistNode *node; GValue val; - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, path); @@ -1956,7 +1956,7 @@ } } - if (gaim_gtk_parse_x_im_contact((const char *)sd->data, FALSE, &account, + if (pidgin_parse_x_im_contact((const char *)sd->data, FALSE, &account, &protocol, &username, &alias)) { if (account == NULL) @@ -2041,7 +2041,7 @@ if (GAIM_BLIST_NODE_IS_BUDDY(node) || GAIM_BLIST_NODE_IS_CONTACT(node)) { GaimBuddy *b = GAIM_BLIST_NODE_IS_BUDDY(node) ? (GaimBuddy*)node : gaim_contact_get_priority_buddy((GaimContact*)node); - gaim_dnd_file_manage(sd, b->account, b->name); + pidgin_dnd_file_manage(sd, b->account, b->name); gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); } else { gtk_drag_finish(dc, FALSE, FALSE, t); @@ -2050,7 +2050,46 @@ } } -static GdkPixbuf *gaim_gtk_blist_get_buddy_icon(GaimBlistNode *node, +/* Altered from do_colorshift in gnome-panel */ +static void +do_alphashift (GdkPixbuf *dest, GdkPixbuf *src, int shift) +{ + gint i, j; + gint width, height, has_alpha, srcrowstride, destrowstride; + guchar *target_pixels; + guchar *original_pixels; + guchar *pixsrc; + guchar *pixdest; + int val; + guchar a; + + has_alpha = gdk_pixbuf_get_has_alpha (src); + if (!has_alpha) + return; + + width = gdk_pixbuf_get_width (src); + height = gdk_pixbuf_get_height (src); + srcrowstride = gdk_pixbuf_get_rowstride (src); + destrowstride = gdk_pixbuf_get_rowstride (dest); + target_pixels = gdk_pixbuf_get_pixels (dest); + original_pixels = gdk_pixbuf_get_pixels (src); + + for (i = 0; i < height; i++) { + pixdest = target_pixels + i*destrowstride; + pixsrc = original_pixels + i*srcrowstride; + for (j = 0; j < width; j++) { + *(pixdest++) = *(pixsrc++); + *(pixdest++) = *(pixsrc++); + *(pixdest++) = *(pixsrc++); + a = *(pixsrc++); + val = a - shift; + *(pixdest++) = CLAMP(val, 0, 255); + } + } +} + + +static GdkPixbuf *pidgin_blist_get_buddy_icon(GaimBlistNode *node, gboolean scaled, gboolean greyed, gboolean custom) { GdkPixbuf *buf, *ret = NULL; @@ -2136,7 +2175,7 @@ gdk_pixbuf_saturate_and_pixelate(buf, buf, 0.25, FALSE); } - /* i'd use the gaim_gtk_buddy_icon_get_scale_size() thing, + /* i'd use the pidgin_buddy_icon_get_scale_size() thing, * but it won't tell me the original size, which I need for scaling * purposes */ scale_width = orig_width = gdk_pixbuf_get_width(buf); @@ -2195,11 +2234,11 @@ * * */ -#define STATUS_SIZE 32 +#define STATUS_SIZE 22 #define TOOLTIP_BORDER 12 #define SMALL_SPACE 6 #define LARGE_SPACE 12 -#define PRPL_SIZE 22 +#define PRPL_SIZE 16 struct tooltip_data { PangoLayout *layout; PangoLayout *name_layout; @@ -2228,9 +2267,9 @@ account = ((GaimChat*)(node))->account; } - td->status_icon = gaim_gtk_blist_get_status_icon(node, GAIM_STATUS_ICON_LARGE); - td->avatar = gaim_gtk_blist_get_buddy_icon(node, !full, FALSE, TRUE); - td->prpl_icon = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + td->status_icon = pidgin_blist_get_status_icon(node, PIDGIN_STATUS_ICON_LARGE); + td->avatar = pidgin_blist_get_buddy_icon(node, !full, FALSE, TRUE); + td->prpl_icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); tooltip_text = gaim_get_tooltip_text(node, full); td->layout = gtk_widget_create_pango_layout(gtkblist->tipwindow, NULL); td->name_layout = gtk_widget_create_pango_layout(gtkblist->tipwindow, NULL); @@ -2258,7 +2297,7 @@ td->name_height = MAX(PANGO_PIXELS(td->name_height), PRPL_SIZE + SMALL_SPACE); #if 0 /* PRPL Icon as avatar */ if(!td->avatar && full) { - td->avatar = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_LARGE); + td->avatar = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_LARGE); td->avatar_is_prpl_icon = TRUE; } #endif @@ -2270,7 +2309,7 @@ return td; } -static void gaim_gtk_blist_paint_tip(GtkWidget *widget, GdkEventExpose *event, GaimBlistNode *node) +static void pidgin_blist_paint_tip(GtkWidget *widget, GdkEventExpose *event, GaimBlistNode *node) { GtkStyle *style; int current_height, max_width; @@ -2306,7 +2345,7 @@ { struct tooltip_data *td = l->data; - if (td->avatar && gaim_gdk_pixbuf_is_opaque(td->avatar)) + if (td->avatar && pidgin_gdk_pixbuf_is_opaque(td->avatar)) gtk_paint_flat_box(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gtkblist->tipwindow, "tooltip", max_width - (td->avatar_width+ TOOLTIP_BORDER)-1, @@ -2344,14 +2383,11 @@ TOOLTIP_BORDER + STATUS_SIZE + SMALL_SPACE, current_height + td->name_height, td->layout); current_height += MAX(td->name_height + td->height, td->avatar_height) + TOOLTIP_BORDER; - if(l->next) - gtk_paint_hline(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, - NULL, NULL, NULL, 4, max_width - 4, current_height-6); - } -} - - -static void gaim_gtk_blist_tooltip_destroy() + } +} + + +static void pidgin_blist_tooltip_destroy() { while(gtkblist->tooltipdata) { struct tooltip_data *td = gtkblist->tooltipdata->data; @@ -2375,13 +2411,13 @@ gtkblist->tipwindow = NULL; } -static gboolean gaim_gtk_blist_expand_timeout(GtkWidget *tv) +static gboolean pidgin_blist_expand_timeout(GtkWidget *tv) { GtkTreePath *path; GtkTreeIter iter; GaimBlistNode *node; GValue val; - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), gtkblist->tip_rect.x, gtkblist->tip_rect.y, &path, NULL, NULL, NULL)) return FALSE; @@ -2400,7 +2436,7 @@ if (!gtknode->contact_expanded) { GtkTreeIter i; - gaim_gtk_blist_expand_contact_cb(NULL, node); + pidgin_blist_expand_contact_cb(NULL, node); gtk_tree_view_get_cell_area(GTK_TREE_VIEW(tv), path, NULL, >kblist->contact_rect); gdk_drawable_get_size(GDK_DRAWABLE(tv->window), &(gtkblist->contact_rect.width), NULL); @@ -2419,7 +2455,7 @@ static gboolean buddy_is_displayable(GaimBuddy *buddy) { - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; if(!buddy) return FALSE; @@ -2433,7 +2469,7 @@ gaim_blist_node_get_bool((GaimBlistNode*)buddy, "show_offline"))); } -static gboolean gaim_gtk_blist_tooltip_timeout(GtkWidget *tv) +static gboolean pidgin_blist_tooltip_timeout(GtkWidget *tv) { GtkTreePath *path; GtkTreeIter iter; @@ -2445,14 +2481,14 @@ GdkScreen *screen = NULL; #endif gboolean tooltip_top = FALSE; - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; GdkRectangle mon_size; /* * Attempt to free the previous tooltip. I have a feeling * this is never needed... but just in case. */ - gaim_gtk_blist_tooltip_destroy(); + pidgin_blist_tooltip_destroy(); if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(tv), gtkblist->tip_rect.x, gtkblist->tip_rect.y, &path, NULL, NULL, NULL)) return FALSE; @@ -2513,7 +2549,7 @@ gtk_window_set_resizable(GTK_WINDOW(gtkblist->tipwindow), FALSE); gtk_widget_set_name(gtkblist->tipwindow, "gtk-tooltips"); g_signal_connect(G_OBJECT(gtkblist->tipwindow), "expose_event", - G_CALLBACK(gaim_gtk_blist_paint_tip), NULL); + G_CALLBACK(pidgin_blist_paint_tip), NULL); gtk_widget_ensure_style (gtkblist->tipwindow); @@ -2571,7 +2607,7 @@ return FALSE; } -static gboolean gaim_gtk_blist_drag_motion_cb(GtkWidget *tv, GdkDragContext *drag_context, +static gboolean pidgin_blist_drag_motion_cb(GtkWidget *tv, GdkDragContext *drag_context, gint x, gint y, guint time, gpointer user_data) { GtkTreePath *path; @@ -2595,11 +2631,11 @@ if (path) gtk_tree_path_free(path); - gtkblist->drag_timeout = g_timeout_add(delay, (GSourceFunc)gaim_gtk_blist_expand_timeout, tv); + gtkblist->drag_timeout = g_timeout_add(delay, (GSourceFunc)pidgin_blist_expand_timeout, tv); if (gtkblist->mouseover_contact) { if ((y < gtkblist->contact_rect.y) || ((y - gtkblist->contact_rect.height) > gtkblist->contact_rect.y)) { - gaim_gtk_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact); + pidgin_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact); gtkblist->mouseover_contact = NULL; } } @@ -2607,7 +2643,7 @@ return FALSE; } -static gboolean gaim_gtk_blist_motion_cb (GtkWidget *tv, GdkEventMotion *event, gpointer null) +static gboolean pidgin_blist_motion_cb (GtkWidget *tv, GdkEventMotion *event, gpointer null) { GtkTreePath *path; int delay; @@ -2621,7 +2657,7 @@ if ((event->y > gtkblist->tip_rect.y) && ((event->y - gtkblist->tip_rect.height) < gtkblist->tip_rect.y)) return FALSE; /* We've left the cell. Remove the timeout and create a new one below */ - gaim_gtk_blist_tooltip_destroy(); + pidgin_blist_tooltip_destroy(); g_source_remove(gtkblist->timeout); } @@ -2630,11 +2666,11 @@ if (path) gtk_tree_path_free(path); - gtkblist->timeout = g_timeout_add(delay, (GSourceFunc)gaim_gtk_blist_tooltip_timeout, tv); + gtkblist->timeout = g_timeout_add(delay, (GSourceFunc)pidgin_blist_tooltip_timeout, tv); if (gtkblist->mouseover_contact) { if ((event->y < gtkblist->contact_rect.y) || ((event->y - gtkblist->contact_rect.height) > gtkblist->contact_rect.y)) { - gaim_gtk_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact); + pidgin_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact); gtkblist->mouseover_contact = NULL; } } @@ -2642,7 +2678,7 @@ return FALSE; } -static void gaim_gtk_blist_leave_cb (GtkWidget *w, GdkEventCrossing *e, gpointer n) +static void pidgin_blist_leave_cb (GtkWidget *w, GdkEventCrossing *e, gpointer n) { if (gtkblist->timeout) { @@ -2655,12 +2691,12 @@ gtkblist->drag_timeout = 0; } - gaim_gtk_blist_tooltip_destroy(); + pidgin_blist_tooltip_destroy(); if (gtkblist->mouseover_contact && !((e->x > gtkblist->contact_rect.x) && (e->x < (gtkblist->contact_rect.x + gtkblist->contact_rect.width)) && (e->y > gtkblist->contact_rect.y) && (e->y < (gtkblist->contact_rect.y + gtkblist->contact_rect.height)))) { - gaim_gtk_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact); + pidgin_blist_collapse_contact_cb(NULL, gtkblist->mouseover_contact); gtkblist->mouseover_contact = NULL; } } @@ -2680,45 +2716,45 @@ { /* Buddies menu */ { N_("/_Buddies"), NULL, NULL, 0, "<Branch>", NULL }, - { N_("/Buddies/New Instant _Message..."), "<CTL>M", gaim_gtkdialogs_im, 0, "<StockItem>", GAIM_STOCK_IM }, - { N_("/Buddies/Join a _Chat..."), "<CTL>C", gaim_gtk_blist_joinchat_show, 0, "<StockItem>", GAIM_STOCK_CHAT }, - { N_("/Buddies/Get User _Info..."), "<CTL>I", gaim_gtkdialogs_info, 0, "<StockItem>", GAIM_STOCK_INFO }, - { N_("/Buddies/View User _Log..."), "<CTL>L", gaim_gtkdialogs_log, 0, "<StockItem>", GAIM_STOCK_LOG }, + { N_("/Buddies/New Instant _Message..."), "<CTL>M", pidgindialogs_im, 0, "<StockItem>", PIDGIN_STOCK_IM }, + { N_("/Buddies/Join a _Chat..."), "<CTL>C", pidgin_blist_joinchat_show, 0, "<Item>", NULL }, + { N_("/Buddies/Get User _Info..."), "<CTL>I", pidgindialogs_info, 0, "<StockItem>", PIDGIN_STOCK_INFO }, + { N_("/Buddies/View User _Log..."), "<CTL>L", pidgindialogs_log, 0, "<Item>", NULL }, { "/Buddies/sep1", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Buddies/Show _Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, "<CheckItem>", NULL }, - { N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, "<CheckItem>", NULL }, - { N_("/Buddies/Show Buddy _Details"), NULL, gaim_gtk_blist_buddy_details_cb, 1, "<CheckItem>", NULL }, - { N_("/Buddies/Show Idle _Times"), NULL, gaim_gtk_blist_show_idle_time_cb, 1, "<CheckItem>", NULL }, + { N_("/Buddies/Show _Offline Buddies"), NULL, pidgin_blist_edit_mode_cb, 1, "<CheckItem>", NULL }, + { N_("/Buddies/Show _Empty Groups"), NULL, pidgin_blist_show_empty_groups_cb, 1, "<CheckItem>", NULL }, + { N_("/Buddies/Show Buddy _Details"), NULL, pidgin_blist_buddy_details_cb, 1, "<CheckItem>", NULL }, + { N_("/Buddies/Show Idle _Times"), NULL, pidgin_blist_show_idle_time_cb, 1, "<CheckItem>", NULL }, { N_("/Buddies/_Sort Buddies"), NULL, NULL, 0, "<Branch>", NULL }, { "/Buddies/sep2", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Buddies/_Add Buddy..."), "<CTL>B", gaim_gtk_blist_add_buddy_cb, 0, "<StockItem>", GTK_STOCK_ADD }, - { N_("/Buddies/Add C_hat..."), NULL, gaim_gtk_blist_add_chat_cb, 0, "<StockItem>", GTK_STOCK_ADD }, + { N_("/Buddies/_Add Buddy..."), "<CTL>B", pidgin_blist_add_buddy_cb, 0, "<StockItem>", GTK_STOCK_ADD }, + { N_("/Buddies/Add C_hat..."), NULL, pidgin_blist_add_chat_cb, 0, "<StockItem>", GTK_STOCK_ADD }, { N_("/Buddies/Add _Group..."), NULL, gaim_blist_request_add_group, 0, "<StockItem>", GTK_STOCK_ADD }, { "/Buddies/sep3", NULL, NULL, 0, "<Separator>", NULL }, { N_("/Buddies/_Quit"), "<CTL>Q", gaim_core_quit, 0, "<StockItem>", GTK_STOCK_QUIT }, /* Accounts menu */ { N_("/_Accounts"), NULL, NULL, 0, "<Branch>", NULL }, - { N_("/Accounts/Add\\/Edit"), "<CTL>A", gaim_gtk_accounts_window_show, 0, "<StockItem>", GAIM_STOCK_ACCOUNTS }, + { N_("/Accounts/Add\\/Edit"), "<CTL>A", pidgin_accounts_window_show, 0, "<Item>", NULL }, /* Tools */ { N_("/_Tools"), NULL, NULL, 0, "<Branch>", NULL }, - { N_("/Tools/Buddy _Pounces"), NULL, gaim_gtk_pounces_manager_show, 0, "<StockItem>", GAIM_STOCK_POUNCE }, - { N_("/Tools/Plu_gins"), "<CTL>U", gaim_gtk_plugin_dialog_show, 0, "<StockItem>", GAIM_STOCK_PLUGIN }, - { N_("/Tools/Pr_eferences"), "<CTL>P", gaim_gtk_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES }, - { N_("/Tools/Pr_ivacy"), NULL, gaim_gtk_privacy_dialog_show, 0, "<StockItem>", PIDGIN_STOCK_DIALOG_ERROR }, + { N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "<Item>", NULL }, + { N_("/Tools/Plu_gins"), "<CTL>U", pidgin_plugin_dialog_show, 0, "<StockItem>", PIDGIN_STOCK_PLUGIN }, + { N_("/Tools/Pr_eferences"), "<CTL>P", pidgin_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES }, + { N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "<Item>", NULL }, { "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Tools/_File Transfers"), "<CTL>T", gaim_gtkxfer_dialog_show, 0, "<StockItem>", GAIM_STOCK_FILE_TRANSFER }, - { N_("/Tools/R_oom List"), NULL, gaim_gtk_roomlist_dialog_show, 0, "<StockItem>", GTK_STOCK_INDEX }, - { N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<StockItem>", GAIM_STOCK_LOG }, + { N_("/Tools/_File Transfers"), "<CTL>T", pidginxfer_dialog_show, 0, "<Item>", NULL }, + { N_("/Tools/R_oom List"), NULL, pidgin_roomlist_dialog_show, 0, "<Item>", NULL }, + { N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<Item>", NULL }, { "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Tools/Mute _Sounds"), "<CTL>S", gaim_gtk_blist_mute_sounds_cb, 0, "<CheckItem>", NULL }, + { N_("/Tools/Mute _Sounds"), "<CTL>S", pidgin_blist_mute_sounds_cb, 0, "<CheckItem>", NULL }, /* Help */ { N_("/_Help"), NULL, NULL, 0, "<Branch>", NULL }, { N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "<StockItem>", GTK_STOCK_HELP }, - { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<StockItem>", GAIM_STOCK_DEBUG }, - { N_("/Help/_About"), NULL, gaim_gtkdialogs_about, 0, "<StockItem>", GAIM_STOCK_ABOUT }, + { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL }, + { N_("/Help/_About"), NULL, pidgindialogs_about, 0, "<StockItem>", PIDGIN_STOCK_ABOUT }, }; /********************************************************* @@ -2864,7 +2900,7 @@ /* Last Seen */ if (full && !GAIM_BUDDY_IS_ONLINE(b)) { - struct _gaim_gtk_blist_node *gtknode = ((GaimBlistNode *)c)->ui_data; + struct _pidgin_blist_node *gtknode = ((GaimBlistNode *)c)->ui_data; GaimBlistNode *bnode; int lastseen = 0; @@ -2924,23 +2960,27 @@ gaim_notify_user_info_destroy(user_info); } - gaim_signal_emit(gaim_gtk_blist_get_handle(), + gaim_signal_emit(pidgin_blist_get_handle(), "drawing-tooltip", node, str, full); return g_string_free(str, FALSE); } GdkPixbuf * -gaim_gtk_blist_get_emblem(GaimBlistNode *node) +pidgin_blist_get_emblem(GaimBlistNode *node) { GaimBuddy *buddy = NULL; - struct _gaim_gtk_blist_node *gtknode = node->ui_data; - struct _gaim_gtk_blist_node *gtkbuddynode = NULL; + struct _pidgin_blist_node *gtknode = node->ui_data; + struct _pidgin_blist_node *gtkbuddynode = NULL; GaimPlugin *prpl; GaimPluginProtocolInfo *prpl_info; const char *name = NULL; char *filename, *path; GdkPixbuf *ret; + GaimPresence *p; + + + if(GAIM_BLIST_NODE_IS_CONTACT(node)) { if(!gtknode->contact_expanded) { buddy = gaim_contact_get_priority_buddy((GaimContact*)node); @@ -2949,13 +2989,28 @@ } else if(GAIM_BLIST_NODE_IS_BUDDY(node)) { buddy = (GaimBuddy*)node; gtkbuddynode = node->ui_data; - if (((struct _gaim_gtk_blist_node*)(node->parent->ui_data))->contact_expanded) - return gaim_gtk_create_prpl_icon(((GaimBuddy*)node)->account, PIDGIN_PRPL_ICON_SMALL); + if (((struct _pidgin_blist_node*)(node->parent->ui_data))->contact_expanded) + return pidgin_create_prpl_icon(((GaimBuddy*)node)->account, PIDGIN_PRPL_ICON_SMALL); } else if(GAIM_BLIST_NODE_IS_CHAT(node)) { - return gaim_gtk_create_prpl_icon(((GaimChat*)node)->account, PIDGIN_PRPL_ICON_SMALL); + return pidgin_create_prpl_icon(((GaimChat*)node)->account, PIDGIN_PRPL_ICON_SMALL); } else { return NULL; } + + if (!gaim_privacy_check(buddy->account, gaim_buddy_get_name(buddy))) { + path = g_build_filename(DATADIR, "pixmaps", "pidgin", "emblems", "16", "blocked.png", NULL); + ret = gdk_pixbuf_new_from_file(path, NULL); + g_free(path); + return ret; + } + + p = gaim_buddy_get_presence(buddy); + if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_MOBILE)) { + path = g_build_filename(DATADIR, "pixmaps", "pidgin", "emblems", "16", "mobile.png", NULL); + ret = gdk_pixbuf_new_from_file(path, NULL); + g_free(path); + return ret; + } prpl = gaim_find_prpl(gaim_account_get_protocol_id(buddy->account)); if (!prpl) @@ -2981,15 +3036,15 @@ GdkPixbuf * -gaim_gtk_blist_get_status_icon(GaimBlistNode *node, GaimStatusIconSize size) +pidgin_blist_get_status_icon(GaimBlistNode *node, PidginStatusIconSize size) { GdkPixbuf *ret; const char *protoname = NULL; - struct _gaim_gtk_blist_node *gtknode = node->ui_data; - struct _gaim_gtk_blist_node *gtkbuddynode = NULL; + struct _pidgin_blist_node *gtknode = node->ui_data; + struct _pidgin_blist_node *gtkbuddynode = NULL; GaimBuddy *buddy = NULL; GaimChat *chat = NULL; - GtkIconSize icon_size = gtk_icon_size_from_name((size == GAIM_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_MEDIUM : + GtkIconSize icon_size = gtk_icon_size_from_name((size == PIDGIN_STATUS_ICON_LARGE) ? PIDGIN_ICON_SIZE_TANGO_SMALL : PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL); if(GAIM_BLIST_NODE_IS_CONTACT(node)) { @@ -3028,7 +3083,19 @@ } if(buddy) { - GaimPresence *p = gaim_buddy_get_presence(buddy); + GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, + gaim_buddy_get_name(buddy), + gaim_buddy_get_account(buddy)); + GaimPresence *p; + if(conv != NULL) { + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); + if(gtkconv != NULL && pidgin_conv_is_hidden(gtkconv) && size == PIDGIN_STATUS_ICON_SMALL) { + return gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_MESSAGE, + icon_size, "GtkTreeView"); + } + } + p = gaim_buddy_get_presence(buddy); + if (GAIM_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff) ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_LOGIN, icon_size, "GtkTreeView"); @@ -3036,19 +3103,34 @@ ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_LOGOUT, icon_size, "GtkTreeView"); else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_UNAVAILABLE)) - ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_BUSY, - icon_size, "GtkTreeView"); + if (gaim_presence_is_idle(p) && size == PIDGIN_STATUS_ICON_SMALL) + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_BUSY_I, + icon_size, "GtkTreeView"); + else + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_BUSY, + icon_size, "GtkTreeView"); else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_AWAY)) - ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AWAY, - icon_size, "GtkTreeView"); + if (gaim_presence_is_idle(p) && size == PIDGIN_STATUS_ICON_SMALL) + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AWAY_I, + icon_size, "GtkTreeView"); + else + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AWAY, + icon_size, "GtkTreeView"); else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_EXTENDED_AWAY)) - ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_XA, - icon_size, "GtkTreeView"); + if (gaim_presence_is_idle(p) && size == PIDGIN_STATUS_ICON_SMALL) + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_XA_I, + icon_size, "GtkTreeView"); + else + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_XA, + icon_size, "GtkTreeView"); else if (gaim_presence_is_status_primitive_active(p, GAIM_STATUS_OFFLINE)) ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_OFFLINE, icon_size, "GtkTreeView"); + else if (gaim_presence_is_idle(p) && size == PIDGIN_STATUS_ICON_SMALL) + ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AVAILABLE_I, + icon_size, "GtkTreeView"); else - ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AVAILABLE, + ret = gtk_widget_render_icon(GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_AVAILABLE, icon_size, "GtkTreeView"); } else if (chat) { ret = gtk_widget_render_icon (GTK_WIDGET(gtkblist->treeview), PIDGIN_STOCK_STATUS_CHAT, @@ -3059,108 +3141,9 @@ } return ret; - -#if 0 - if(buddy) { - GaimAccount *account; - GaimPlugin *prpl; - GaimPluginProtocolInfo *prpl_info; - GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, - gaim_buddy_get_name(buddy), - gaim_buddy_get_account(buddy)); - - account = buddy->account; - - prpl = gaim_find_prpl(gaim_account_get_protocol_id(account)); - if(!prpl) - return NULL; - - prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(prpl); - - if(prpl_info && prpl_info->list_icon) { - protoname = prpl_info->list_icon(account, buddy); - } - - if(conv != NULL) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); - if(gtkconv != NULL && gaim_gtkconv_is_hidden(gtkconv)) { - /* add pending emblem */ - if(size == GAIM_STATUS_ICON_SMALL) { - emblems[0].filename="pending"; - } - else { - emblems[3].filename=emblems[2].filename; - emblems[2].filename="pending"; - } - } - } - } - - if(buddy && GAIM_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff) { - filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", "login.png", NULL); - } else if(buddy && !GAIM_BUDDY_IS_ONLINE(buddy) && gtkbuddynode && gtkbuddynode->recent_signonoff) { - filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", "logout.png", NULL); - } else if(buddy || chat) { - char *image = g_strdup_printf("%s.png", protoname); - filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", image, NULL); - g_free(image); - } else { - /* gaim dude */ - filename = g_build_filename(DATADIR, "pixmaps", "gaim.png", NULL); - } - - status = gdk_pixbuf_new_from_file(filename, NULL); - g_free(filename); - - if(!status) { - g_string_free(key, TRUE); - return NULL; - } - - scale = gdk_pixbuf_scale_simple(status, scalesize, scalesize, - GDK_INTERP_BILINEAR); - g_object_unref(status); - - if(buddy) { - presence = gaim_buddy_get_presence(buddy); - if (!GAIM_BUDDY_IS_ONLINE(buddy)) - gdk_pixbuf_saturate_and_pixelate(scale, scale, 0.0, FALSE); - else if (gaim_presence_is_idle(presence)) - { - gdk_pixbuf_saturate_and_pixelate(scale, scale, 0.25, FALSE); - } - - if (!gaim_privacy_check(buddy->account, gaim_buddy_get_name(buddy))) - { - GdkPixbuf *emblem; - char *filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", "blocked.png", NULL); - - emblem = gdk_pixbuf_new_from_file(filename, NULL); - g_free(filename); - - if (emblem) - { - gdk_pixbuf_composite(emblem, scale, - 0, 0, scalesize, scalesize, - 0, 0, - (double)scalesize / gdk_pixbuf_get_width(emblem), - (double)scalesize / gdk_pixbuf_get_height(emblem), - GDK_INTERP_BILINEAR, - 224); - g_object_unref(emblem); - } - } - } - - /* Insert the new icon into the status icon hash table */ - g_hash_table_insert (status_icon_hash_table, key, scale); - gdk_pixbuf_ref(scale); - - return scale; -#endif -} - -static gchar *gaim_gtk_blist_get_name_markup(GaimBuddy *b, gboolean selected) +} + +static gchar *pidgin_blist_get_name_markup(GaimBuddy *b, gboolean selected) { const char *name; char *esc, *text = NULL; @@ -3168,9 +3151,22 @@ GaimPluginProtocolInfo *prpl_info = NULL; GaimContact *contact; GaimPresence *presence; - struct _gaim_gtk_blist_node *gtkcontactnode = NULL; + struct _pidgin_blist_node *gtkcontactnode = NULL; char *idletime = NULL, *statustext = NULL; time_t t; + GaimConversation *conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, + gaim_buddy_get_name(b), + gaim_buddy_get_account(b)); + PidginConversation *gtkconv; + gboolean hidden_conv = FALSE; + + if(conv != NULL) { + gtkconv = PIDGIN_CONVERSATION(conv); + if(gtkconv != NULL && pidgin_conv_is_hidden(gtkconv)) { + hidden_conv = TRUE; + } + } + /* XXX Good luck cleaning up this crap */ contact = (GaimContact*)((GaimBlistNode*)b)->parent; @@ -3192,9 +3188,19 @@ text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc); g_free(esc); + if (hidden_conv) { + char *tmp = text; + text = g_strdup_printf("<b>%s</b>", text); + g_free(tmp); + } return text; } else + if (hidden_conv) { + char *tmp = esc; + esc = g_strdup_printf("<b>%s</b>", esc); + g_free(tmp); + } return esc; } @@ -3315,11 +3321,17 @@ g_free(idletime); g_free(statustext); g_free(esc); - + + if (hidden_conv) { + char *tmp = text; + text = g_strdup_printf("<b>%s</b>", tmp); + g_free(tmp); + } + return text; } -static void gaim_gtk_blist_restore_position() +static void pidgin_blist_restore_position() { int blist_x, blist_y, blist_width, blist_height; @@ -3353,7 +3365,7 @@ } } -static gboolean gaim_gtk_blist_refresh_timer(GaimBuddyList *list) +static gboolean pidgin_blist_refresh_timer(GaimBuddyList *list) { GaimBlistNode *gnode, *cnode; @@ -3371,7 +3383,7 @@ if (buddy && gaim_presence_is_idle(gaim_buddy_get_presence(buddy))) - gaim_gtk_blist_update_contact(list, (GaimBlistNode*)buddy); + pidgin_blist_update_contact(list, (GaimBlistNode*)buddy); } } } @@ -3380,9 +3392,9 @@ return TRUE; } -static void gaim_gtk_blist_hide_node(GaimBuddyList *list, GaimBlistNode *node, gboolean update) -{ - struct _gaim_gtk_blist_node *gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; +static void pidgin_blist_hide_node(GaimBuddyList *list, GaimBlistNode *node, gboolean update) +{ + struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; GtkTreeIter iter; if (!gtknode || !gtknode->row || !gtkblist) @@ -3394,7 +3406,7 @@ gtk_tree_store_remove(gtkblist->treemodel, &iter); if(update && (GAIM_BLIST_NODE_IS_CONTACT(node) || GAIM_BLIST_NODE_IS_BUDDY(node) || GAIM_BLIST_NODE_IS_CHAT(node))) { - gaim_gtk_blist_update(list, node->parent); + pidgin_blist_update(list, node->parent); } } gtk_tree_row_reference_free(gtknode->row); @@ -3419,7 +3431,7 @@ * where appropriate. */ static void -update_menu_bar(GaimGtkBuddyList *gtkblist) +update_menu_bar(PidginBuddyList *gtkblist) { GtkWidget *widget; gboolean sensitive; @@ -3427,7 +3439,7 @@ g_return_if_fail(gtkblist != NULL); - gaim_gtk_blist_update_accounts_menu(); + pidgin_blist_update_accounts_menu(); sensitive = (gaim_connections_get_all() != NULL); @@ -3438,10 +3450,10 @@ } widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Buddies/Join a Chat...")); - gtk_widget_set_sensitive(widget, gaim_gtk_blist_joinchat_is_showable()); + gtk_widget_set_sensitive(widget, pidgin_blist_joinchat_is_showable()); widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Buddies/Add Chat...")); - gtk_widget_set_sensitive(widget, gaim_gtk_blist_joinchat_is_showable()); + gtk_widget_set_sensitive(widget, pidgin_blist_joinchat_is_showable()); widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Buddy Pounces")); gtk_widget_set_sensitive(widget, (gaim_accounts_get_all() != NULL)); @@ -3450,13 +3462,13 @@ gtk_widget_set_sensitive(widget, (gaim_connections_get_all() != NULL)); widget = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Room List")); - gtk_widget_set_sensitive(widget, gaim_gtk_roomlist_is_showable()); + gtk_widget_set_sensitive(widget, pidgin_roomlist_is_showable()); } static void sign_on_off_cb(GaimConnection *gc, GaimBuddyList *blist) { - GaimGtkBuddyList *gtkblist = GAIM_GTK_BLIST(blist); + PidginBuddyList *gtkblist = PIDGIN_BLIST(blist); update_menu_bar(gtkblist); } @@ -3464,7 +3476,7 @@ static void plugin_changed_cb(GaimPlugin *p, gpointer *data) { - gaim_gtk_blist_update_plugin_actions(); + pidgin_blist_update_plugin_actions(); } static void @@ -3478,14 +3490,14 @@ menu = NULL; } - convs = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, GAIM_UNSEEN_TEXT, TRUE, 0); + convs = pidgin_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, PIDGIN_UNSEEN_TEXT, TRUE, 0); if (!convs) /* no conversations added, don't show the menu */ return; menu = gtk_menu_new(); - gaim_gtk_conversations_fill_menu(menu, convs); + pidgin_conversations_fill_menu(menu, convs); g_list_free(convs); gtk_widget_show_all(menu); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, @@ -3499,10 +3511,10 @@ switch (event->button) { case 1: - convs = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, - GAIM_UNSEEN_TEXT, TRUE, 1); + convs = pidgin_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, + PIDGIN_UNSEEN_TEXT, TRUE, 1); if (convs) { - gaim_gtkconv_present_conversation((GaimConversation*)convs->data); + pidgin_conv_present_conversation((GaimConversation*)convs->data); g_list_free(convs); } break; @@ -3515,7 +3527,7 @@ static void conversation_updated_cb(GaimConversation *conv, GaimConvUpdateType type, - GaimGtkBuddyList *gtkblist) + PidginBuddyList *gtkblist) { GList *convs = NULL; GList *l = NULL; @@ -3526,7 +3538,7 @@ if(conv->account != NULL && conv->name != NULL) { GaimBuddy *buddy = gaim_find_buddy(conv->account, conv->name); if(buddy != NULL) - gaim_gtk_blist_update_buddy(NULL, (GaimBlistNode *)buddy, TRUE); + pidgin_blist_update_buddy(NULL, (GaimBlistNode *)buddy, TRUE); } if (gtkblist->menutrayicon) { @@ -3534,7 +3546,7 @@ gtkblist->menutrayicon = NULL; } - convs = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, GAIM_UNSEEN_TEXT, TRUE, 0); + convs = pidgin_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, PIDGIN_UNSEEN_TEXT, TRUE, 0); if (convs) { GtkWidget *img = NULL; GString *tooltip_text = NULL; @@ -3543,7 +3555,7 @@ l = convs; while (l != NULL) { if (GAIM_IS_GTK_CONVERSATION(l->data)) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION((GaimConversation *)l->data); + PidginConversation *gtkconv = PIDGIN_CONVERSATION((GaimConversation *)l->data); g_string_append_printf(tooltip_text, ngettext("%d unread message from %s\n", "%d unread messages from %s\n", gtkconv->unseen_count), @@ -3555,7 +3567,7 @@ if(tooltip_text->len > 0) { /* get rid of the last newline */ g_string_truncate(tooltip_text, tooltip_text->len -1); - img = gtk_image_new_from_stock(GAIM_STOCK_PENDING, GTK_ICON_SIZE_MENU); + img = gtk_image_new_from_stock(PIDGIN_STOCK_PENDING, GTK_ICON_SIZE_MENU); gtkblist->menutrayicon = gtk_event_box_new(); gtk_container_add(GTK_CONTAINER(gtkblist->menutrayicon), img); @@ -3563,7 +3575,7 @@ gtk_widget_show(gtkblist->menutrayicon); g_signal_connect(G_OBJECT(gtkblist->menutrayicon), "button-press-event", G_CALLBACK(menutray_press_cb), NULL); - gaim_gtk_menu_tray_append(GAIM_GTK_MENU_TRAY(gtkblist->menutray), gtkblist->menutrayicon, tooltip_text->str); + pidgin_menu_tray_append(PIDGIN_MENU_TRAY(gtkblist->menutray), gtkblist->menutrayicon, tooltip_text->str); } g_string_free(tooltip_text, TRUE); g_list_free(convs); @@ -3571,7 +3583,7 @@ } static void -conversation_deleting_cb(GaimConversation *conv, GaimGtkBuddyList *gtkblist) +conversation_deleting_cb(GaimConversation *conv, PidginBuddyList *gtkblist) { conversation_updated_cb(conv, GAIM_CONV_UPDATE_UNSEEN, gtkblist); } @@ -3580,29 +3592,29 @@ * Public API Functions * **********************************************************************************/ -static void gaim_gtk_blist_new_list(GaimBuddyList *blist) -{ - GaimGtkBuddyList *gtkblist; - - gtkblist = g_new0(GaimGtkBuddyList, 1); +static void pidgin_blist_new_list(GaimBuddyList *blist) +{ + PidginBuddyList *gtkblist; + + gtkblist = g_new0(PidginBuddyList, 1); gtkblist->connection_errors = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free); blist->ui_data = gtkblist; } -static void gaim_gtk_blist_new_node(GaimBlistNode *node) -{ - node->ui_data = g_new0(struct _gaim_gtk_blist_node, 1); -} - -gboolean gaim_gtk_blist_node_is_contact_expanded(GaimBlistNode *node) +static void pidgin_blist_new_node(GaimBlistNode *node) +{ + node->ui_data = g_new0(struct _pidgin_blist_node, 1); +} + +gboolean pidgin_blist_node_is_contact_expanded(GaimBlistNode *node) { if GAIM_BLIST_NODE_IS_BUDDY(node) node = node->parent; g_return_val_if_fail(GAIM_BLIST_NODE_IS_CONTACT(node), FALSE); - return ((struct _gaim_gtk_blist_node *)node->ui_data)->contact_expanded; + return ((struct _pidgin_blist_node *)node->ui_data)->contact_expanded; } enum { @@ -3620,15 +3632,15 @@ return _((char *)path); } -void gaim_gtk_blist_setup_sort_methods() -{ - gaim_gtk_blist_sort_method_reg("none", _("Manually"), sort_method_none); +void pidgin_blist_setup_sort_methods() +{ + pidgin_blist_sort_method_reg("none", _("Manually"), sort_method_none); #if GTK_CHECK_VERSION(2,2,1) - gaim_gtk_blist_sort_method_reg("alphabetical", _("Alphabetically"), sort_method_alphabetical); - gaim_gtk_blist_sort_method_reg("status", _("By status"), sort_method_status); - gaim_gtk_blist_sort_method_reg("log_size", _("By log size"), sort_method_log); + pidgin_blist_sort_method_reg("alphabetical", _("Alphabetically"), sort_method_alphabetical); + pidgin_blist_sort_method_reg("status", _("By status"), sort_method_status); + pidgin_blist_sort_method_reg("log_size", _("By log size"), sort_method_log); #endif - gaim_gtk_blist_sort_method_set(gaim_prefs_get_string("/gaim/gtk/blist/sort_type")); + pidgin_blist_sort_method_set(gaim_prefs_get_string("/gaim/gtk/blist/sort_type")); } static void _prefs_change_redo_list() @@ -3650,7 +3662,7 @@ if (node) { - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; GtkTreePath *path; gtknode = node->ui_data; @@ -3668,10 +3680,10 @@ gconstpointer val, gpointer data) { if(!strcmp(pref_name, "/gaim/gtk/blist/sort_type")) - gaim_gtk_blist_sort_method_set(val); -} - -static void account_modified(GaimAccount *account, GaimGtkBuddyList *gtkblist) + pidgin_blist_sort_method_set(val); +} + +static void account_modified(GaimAccount *account, PidginBuddyList *gtkblist) { GList *list; if (!gtkblist) @@ -3688,7 +3700,7 @@ static void account_status_changed(GaimAccount *account, GaimStatus *old, - GaimStatus *new, GaimGtkBuddyList *gtkblist) + GaimStatus *new, PidginBuddyList *gtkblist) { if (!gtkblist) return; @@ -3697,7 +3709,7 @@ } static gboolean -gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, GaimGtkBuddyList *gtkblist) +gtk_blist_window_key_press_cb(GtkWidget *w, GdkEventKey *event, PidginBuddyList *gtkblist) { GtkWidget *imhtml; @@ -3722,7 +3734,7 @@ } static gboolean -headline_box_enter_cb(GtkWidget *widget, GdkEventCrossing *event, GaimGtkBuddyList *gtkblist) +headline_box_enter_cb(GtkWidget *widget, GdkEventCrossing *event, PidginBuddyList *gtkblist) { gdk_window_set_cursor(widget->window, gtkblist->hand_cursor); @@ -3748,7 +3760,7 @@ #if 0 static gboolean -headline_box_motion_cb(GtkWidget *widget, GdkEventMotion *event, GaimGtkBuddyList *gtkblist) +headline_box_motion_cb(GtkWidget *widget, GdkEventMotion *event, PidginBuddyList *gtkblist) { gaim_debug_fatal("motion", "%d %d\n", (int)event->x, (int)event->y); if (headline_hover_close((int)event->x, (int)event->y)) @@ -3761,7 +3773,7 @@ #endif static gboolean -headline_box_leave_cb(GtkWidget *widget, GdkEventCrossing *event, GaimGtkBuddyList *gtkblist) +headline_box_leave_cb(GtkWidget *widget, GdkEventCrossing *event, PidginBuddyList *gtkblist) { gdk_window_set_cursor(widget->window, gtkblist->arrow_cursor); if (gtkblist->headline_close) { @@ -3773,12 +3785,12 @@ } static void -reset_headline(GaimGtkBuddyList *gtkblist) +reset_headline(PidginBuddyList *gtkblist) { gtkblist->headline_callback = NULL; gtkblist->headline_data = NULL; gtkblist->headline_destroy = NULL; - gaim_gtk_set_urgent(GTK_WINDOW(gtkblist->window), FALSE); + pidgin_set_urgent(GTK_WINDOW(gtkblist->window), FALSE); } static gboolean @@ -3790,7 +3802,7 @@ } static gboolean -headline_box_press_cb(GtkWidget *widget, GdkEventButton *event, GaimGtkBuddyList *gtkblist) +headline_box_press_cb(GtkWidget *widget, GdkEventButton *event, PidginBuddyList *gtkblist) { gtk_widget_hide(gtkblist->headline_hbox); if (gtkblist->headline_callback && !headline_hover_close((int)event->x, (int)event->y)) @@ -3810,7 +3822,7 @@ static void ce_modify_account_cb(GaimAccount *account) { - gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, account); + pidgin_account_dialog_show(PIDGIN_MODIFY_ACCOUNT_DIALOG, account); } static void @@ -3868,7 +3880,7 @@ /* Create the icon */ if ((status_type = gaim_account_get_status_type_with_primitive(account, GAIM_STATUS_OFFLINE))) { - pixbuf = gaim_gtk_create_prpl_icon_with_status(account, status_type, 0.5); + pixbuf = pidgin_create_prpl_icon_with_status(account, status_type, 0.5); if (pixbuf != NULL) { image = gtk_image_new_from_pixbuf(pixbuf); g_object_unref(pixbuf); @@ -3900,7 +3912,7 @@ } void -gaim_gtk_blist_update_account_error_state(GaimAccount *account, const char *text) +pidgin_blist_update_account_error_state(GaimAccount *account, const char *text) { GList *l; @@ -3975,9 +3987,9 @@ /******************************************/ static int -blist_focus_cb(GtkWidget *widget, gpointer data, GaimGtkBuddyList *gtkblist) -{ - gaim_gtk_set_urgent(GTK_WINDOW(gtkblist->window), FALSE); +blist_focus_cb(GtkWidget *widget, gpointer data, PidginBuddyList *gtkblist) +{ + pidgin_set_urgent(GTK_WINDOW(gtkblist->window), FALSE); return 0; } @@ -4028,7 +4040,7 @@ } #endif -static void gaim_gtk_blist_show(GaimBuddyList *list) +static void pidgin_blist_show(GaimBuddyList *list) { void *handle; GtkCellRenderer *rend; @@ -4055,7 +4067,7 @@ return; } - gtkblist = GAIM_GTK_BLIST(list); + gtkblist = PIDGIN_BLIST(list); gtkblist->empty_avatar = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 32, 32); gdk_pixbuf_fill(gtkblist->empty_avatar, 0x00000000); @@ -4088,11 +4100,11 @@ NULL, NULL); gtk_item_factory_create_items(gtkblist->ift, sizeof(blist_menu) / sizeof(*blist_menu), blist_menu, NULL); - gaim_gtk_load_accels(); + pidgin_load_accels(); g_signal_connect(G_OBJECT(accel_group), "accel-changed", - G_CALLBACK(gaim_gtk_save_accels_cb), NULL); + G_CALLBACK(pidgin_save_accels_cb), NULL); menu = gtk_item_factory_get_widget(gtkblist->ift, "<GaimMain>"); - gtkblist->menutray = gaim_gtk_menu_tray_new(); + gtkblist->menutray = pidgin_menu_tray_new(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), gtkblist->menutray); gtk_widget_show(gtkblist->menutray); gtk_widget_show(menu); @@ -4112,7 +4124,7 @@ #endif /* Translators: Please maintain the use of -> and <- to refer to menu heirarchy */ - pretty = gaim_gtk_make_pretty_arrows(_("<span weight='bold' size='larger'>Welcome to " PIDGIN_NAME "!</span>\n\n" + pretty = pidgin_make_pretty_arrows(_("<span weight='bold' size='larger'>Welcome to " PIDGIN_NAME "!</span>\n\n" "You have no accounts enabled. Enable your IM accounts from the " "<b>Accounts</b> window at <b>Accounts->Add/Edit</b>. Once you " @@ -4203,12 +4215,12 @@ gtkblist->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(gtkblist->treemodel)); gtk_widget_show(gtkblist->treeview); - gtk_widget_set_name(gtkblist->treeview, "gaim_gtkblist_treeview"); + gtk_widget_set_name(gtkblist->treeview, "pidginblist_treeview"); /* gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(gtkblist->treeview), TRUE); */ /* Set up selection stuff */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview)); - g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(gaim_gtk_blist_selection_changed), NULL); + g_signal_connect(G_OBJECT(selection), "changed", G_CALLBACK(pidgin_blist_selection_changed), NULL); /* Set up dnd */ gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(gtkblist->treeview), @@ -4218,17 +4230,17 @@ dte, 5, GDK_ACTION_COPY | GDK_ACTION_MOVE); - g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-data-received", G_CALLBACK(gaim_gtk_blist_drag_data_rcv_cb), NULL); - g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-data-get", G_CALLBACK(gaim_gtk_blist_drag_data_get_cb), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-data-received", G_CALLBACK(pidgin_blist_drag_data_rcv_cb), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-data-get", G_CALLBACK(pidgin_blist_drag_data_get_cb), NULL); #ifdef _WIN32 - g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-begin", G_CALLBACK(gaim_gtk_blist_drag_begin), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-begin", G_CALLBACK(pidgin_blist_drag_begin), NULL); #endif - g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-motion", G_CALLBACK(gaim_gtk_blist_drag_motion_cb), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "drag-motion", G_CALLBACK(pidgin_blist_drag_motion_cb), NULL); /* Tooltips */ - g_signal_connect(G_OBJECT(gtkblist->treeview), "motion-notify-event", G_CALLBACK(gaim_gtk_blist_motion_cb), NULL); - g_signal_connect(G_OBJECT(gtkblist->treeview), "leave-notify-event", G_CALLBACK(gaim_gtk_blist_leave_cb), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "motion-notify-event", G_CALLBACK(pidgin_blist_motion_cb), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "leave-notify-event", G_CALLBACK(pidgin_blist_leave_cb), NULL); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(gtkblist->treeview), FALSE); @@ -4238,7 +4250,7 @@ gtk_tree_view_set_expander_column(GTK_TREE_VIEW(gtkblist->treeview), column); gtkblist->text_column = column = gtk_tree_view_column_new (); - rend = gaim_gtk_cell_renderer_expander_new(); + rend = pidgin_cell_renderer_expander_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, "expander-visible", GROUP_EXPANDER_COLUMN, @@ -4248,7 +4260,7 @@ #endif NULL); - rend = gaim_gtk_cell_renderer_expander_new(); + rend = pidgin_cell_renderer_expander_new(); gtk_tree_view_column_pack_start(column, rend, FALSE); gtk_tree_view_column_set_attributes(column, rend, "expander-visible", CONTACT_EXPANDER_COLUMN, @@ -4321,11 +4333,11 @@ g_signal_connect(G_OBJECT(gtkblist->treeview), "row-collapsed", G_CALLBACK(gtk_blist_row_collapsed_cb), NULL); g_signal_connect(G_OBJECT(gtkblist->treeview), "button-press-event", G_CALLBACK(gtk_blist_button_press_cb), NULL); g_signal_connect(G_OBJECT(gtkblist->treeview), "key-press-event", G_CALLBACK(gtk_blist_key_press_cb), NULL); - g_signal_connect(G_OBJECT(gtkblist->treeview), "popup-menu", G_CALLBACK(gaim_gtk_blist_popup_menu_cb), NULL); + g_signal_connect(G_OBJECT(gtkblist->treeview), "popup-menu", G_CALLBACK(pidgin_blist_popup_menu_cb), NULL); /* Enable CTRL+F searching */ gtk_tree_view_set_search_column(GTK_TREE_VIEW(gtkblist->treeview), NAME_COLUMN); - gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(gtkblist->treeview), gaim_gtk_tree_view_search_equal_func, NULL, NULL); + gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(gtkblist->treeview), pidgin_tree_view_search_equal_func, NULL, NULL); gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sw, TRUE, TRUE, 0); gtk_container_add(GTK_CONTAINER(sw), gtkblist->treeview); @@ -4333,7 +4345,7 @@ sep = gtk_hseparator_new(); gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sep, FALSE, FALSE, 0); - gtkblist->scrollbook = gtk_gaim_scroll_book_new(); + gtkblist->scrollbook = pidgin_scroll_book_new(); gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->scrollbook, FALSE, FALSE, 0); /* Create an empty vbox used for showing connection errors */ @@ -4341,9 +4353,9 @@ gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->error_buttons, FALSE, FALSE, 0); /* Add the statusbox */ - gtkblist->statusbox = gtk_gaim_status_box_new(); + gtkblist->statusbox = pidgin_status_box_new(); gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->statusbox, FALSE, TRUE, 0); - gtk_widget_set_name(gtkblist->statusbox, "gaim_gtkblist_statusbox"); + gtk_widget_set_name(gtkblist->statusbox, "pidginblist_statusbox"); gtk_container_set_border_width(GTK_CONTAINER(gtkblist->statusbox), 3); gtk_widget_show(gtkblist->statusbox); @@ -4370,20 +4382,20 @@ /* Update some dynamic things */ update_menu_bar(gtkblist); - gaim_gtk_blist_update_plugin_actions(); - gaim_gtk_blist_update_sort_methods(); + pidgin_blist_update_plugin_actions(); + pidgin_blist_update_sort_methods(); /* OK... let's show this bad boy. */ - gaim_gtk_blist_refresh(list); - gaim_gtk_blist_restore_position(); + pidgin_blist_refresh(list); + pidgin_blist_restore_position(); gtk_widget_show_all(GTK_WIDGET(gtkblist->vbox)); gtk_widget_realize(GTK_WIDGET(gtkblist->window)); gaim_blist_set_visible(gaim_prefs_get_bool("/gaim/gtk/blist/list_visible")); /* start the refresh timer */ - gtkblist->refresh_timer = g_timeout_add(30000, (GSourceFunc)gaim_gtk_blist_refresh_timer, list); - - handle = gaim_gtk_blist_get_handle(); + gtkblist->refresh_timer = g_timeout_add(30000, (GSourceFunc)pidgin_blist_refresh_timer, list); + + handle = pidgin_blist_get_handle(); /* things that affect how buddies are displayed */ gaim_prefs_connect_callback(handle, "/gaim/gtk/blist/show_buddy_icons", @@ -4401,9 +4413,9 @@ /* menus */ gaim_prefs_connect_callback(handle, "/gaim/gtk/sound/mute", - gaim_gtk_blist_mute_pref_cb, NULL); + pidgin_blist_mute_pref_cb, NULL); gaim_prefs_connect_callback(handle, "/gaim/gtk/sound/method", - gaim_gtk_blist_sound_method_pref_cb, NULL); + pidgin_blist_sound_method_pref_cb, NULL); /* Setup some gaim signal handlers. */ gaim_signal_connect(gaim_accounts_get_handle(), "account-enabled", @@ -4415,7 +4427,7 @@ gaim_signal_connect(gaim_accounts_get_handle(), "account-status-changed", gtkblist, GAIM_CALLBACK(account_status_changed), gtkblist); - gaim_signal_connect(gaim_gtk_account_get_handle(), "account-modified", + gaim_signal_connect(pidgin_account_get_handle(), "account-modified", gtkblist, GAIM_CALLBACK(account_modified), gtkblist); gaim_signal_connect(gaim_connections_get_handle(), "signed-on", @@ -4445,7 +4457,7 @@ { GaimBlistNode *node; - gtkblist = GAIM_GTK_BLIST(list); + gtkblist = PIDGIN_BLIST(list); if(!gtkblist || !gtkblist->treeview) return; @@ -4457,38 +4469,38 @@ * status. We shouldn't need to remove otherwise. */ if (remove && !GAIM_BLIST_NODE_IS_GROUP(node)) - gaim_gtk_blist_hide_node(list, node, FALSE); + pidgin_blist_hide_node(list, node, FALSE); if (GAIM_BLIST_NODE_IS_BUDDY(node)) - gaim_gtk_blist_update_buddy(list, node, rerender); + pidgin_blist_update_buddy(list, node, rerender); else if (GAIM_BLIST_NODE_IS_CHAT(node)) - gaim_gtk_blist_update(list, node); + pidgin_blist_update(list, node); else if (GAIM_BLIST_NODE_IS_GROUP(node)) - gaim_gtk_blist_update(list, node); + pidgin_blist_update(list, node); node = gaim_blist_node_next(node, FALSE); } } -void gaim_gtk_blist_refresh(GaimBuddyList *list) +void pidgin_blist_refresh(GaimBuddyList *list) { redo_buddy_list(list, FALSE, TRUE); } void -gaim_gtk_blist_update_refresh_timeout() +pidgin_blist_update_refresh_timeout() { GaimBuddyList *blist; - GaimGtkBuddyList *gtkblist; + PidginBuddyList *gtkblist; blist = gaim_get_blist(); - gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); - - gtkblist->refresh_timer = g_timeout_add(30000,(GSourceFunc)gaim_gtk_blist_refresh_timer, blist); + gtkblist = PIDGIN_BLIST(gaim_get_blist()); + + gtkblist->refresh_timer = g_timeout_add(30000,(GSourceFunc)pidgin_blist_refresh_timer, blist); } static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter) { - struct _gaim_gtk_blist_node *gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + struct _pidgin_blist_node *gtknode = (struct _pidgin_blist_node *)node->ui_data; GtkTreePath *path; if (!gtknode) { @@ -4515,16 +4527,16 @@ return TRUE; } -static void gaim_gtk_blist_remove(GaimBuddyList *list, GaimBlistNode *node) -{ - struct _gaim_gtk_blist_node *gtknode = node->ui_data; +static void pidgin_blist_remove(GaimBuddyList *list, GaimBlistNode *node) +{ + struct _pidgin_blist_node *gtknode = node->ui_data; gaim_request_close_with_handle(node); - gaim_gtk_blist_hide_node(list, node, TRUE); + pidgin_blist_hide_node(list, node, TRUE); if(node->parent) - gaim_gtk_blist_update(list, node->parent); + pidgin_blist_update(list, node->parent); /* There's something I don't understand here - Ethan */ /* Ethan said that back in 2003, but this g_free has been left commented @@ -4553,15 +4565,15 @@ old_selection = gtkblist->selected_node; gtkblist->selected_node = new_selection; if(new_selection) - gaim_gtk_blist_update(NULL, new_selection); + pidgin_blist_update(NULL, new_selection); if(old_selection) - gaim_gtk_blist_update(NULL, old_selection); + pidgin_blist_update(NULL, old_selection); } return FALSE; } -static void gaim_gtk_blist_selection_changed(GtkTreeSelection *selection, gpointer data) +static void pidgin_blist_selection_changed(GtkTreeSelection *selection, gpointer data) { GaimBlistNode *new_selection = NULL; GtkTreeIter iter; @@ -4578,7 +4590,7 @@ static gboolean insert_node(GaimBuddyList *list, GaimBlistNode *node, GtkTreeIter *iter) { GtkTreeIter parent_iter, cur, *curptr = NULL; - struct _gaim_gtk_blist_node *gtknode = node->ui_data; + struct _pidgin_blist_node *gtknode = node->ui_data; GtkTreePath *newpath; if(!iter) @@ -4599,8 +4611,8 @@ if(gtknode != NULL) { gtk_tree_row_reference_free(gtknode->row); } else { - gaim_gtk_blist_new_node(node); - gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; + pidgin_blist_new_node(node); + gtknode = (struct _pidgin_blist_node *)node->ui_data; } newpath = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), @@ -4617,7 +4629,7 @@ if(node->parent) { GtkTreePath *expand = NULL; - struct _gaim_gtk_blist_node *gtkparentnode = node->parent->ui_data; + struct _pidgin_blist_node *gtkparentnode = node->parent->ui_data; if(GAIM_BLIST_NODE_IS_GROUP(node->parent)) { if(!gaim_blist_node_get_bool(node->parent, "collapsed")) @@ -4635,9 +4647,9 @@ return TRUE; } -/*This version of gaim_gtk_blist_update_group can take the original buddy +/*This version of pidgin_blist_update_group can take the original buddy or a group, but has much better algorithmic performance with a pre-known buddy*/ -static void gaim_gtk_blist_update_group(GaimBuddyList *list, GaimBlistNode *node) +static void pidgin_blist_update_group(GaimBuddyList *list, GaimBlistNode *node) { GaimGroup *group; int count; @@ -4701,7 +4713,7 @@ -1); g_free(title); } else { - gaim_gtk_blist_hide_node(list, gnode, TRUE); + pidgin_blist_hide_node(list, gnode, TRUE); } } @@ -4741,21 +4753,24 @@ GdkPixbuf *status, *avatar, *emblem; char *mark; char *idle = NULL; - gboolean expanded = ((struct _gaim_gtk_blist_node *)(node->parent->ui_data))->contact_expanded; + gboolean expanded = ((struct _pidgin_blist_node *)(node->parent->ui_data))->contact_expanded; gboolean selected = (gtkblist->selected_node == node); gboolean biglist = gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons"); presence = gaim_buddy_get_presence(buddy); - status = gaim_gtk_blist_get_status_icon((GaimBlistNode*)buddy, - GAIM_STATUS_ICON_SMALL); - - avatar = gaim_gtk_blist_get_buddy_icon((GaimBlistNode *)buddy, TRUE, TRUE, TRUE); + status = pidgin_blist_get_status_icon((GaimBlistNode*)buddy, + PIDGIN_STATUS_ICON_SMALL); + + avatar = pidgin_blist_get_buddy_icon((GaimBlistNode *)buddy, TRUE, TRUE, TRUE); if (!avatar) { g_object_ref(G_OBJECT(gtkblist->empty_avatar)); avatar = gtkblist->empty_avatar; - } - emblem = gaim_gtk_blist_get_emblem((GaimBlistNode*) buddy); - mark = gaim_gtk_blist_get_name_markup(buddy, selected); + } else if ((!GAIM_BUDDY_IS_ONLINE(buddy) || gaim_presence_is_idle(presence))) { + do_alphashift(avatar, avatar, 77); + } + + emblem = pidgin_blist_get_emblem((GaimBlistNode*) buddy); + mark = pidgin_blist_get_name_markup(buddy, selected); if (gaim_prefs_get_bool("/gaim/gtk/blist/show_idle_time") && gaim_presence_is_idle(presence) && @@ -4809,12 +4824,12 @@ /* This is a variation on the original gtk_blist_update_contact. Here we can know in advance which buddy has changed so we can just update that */ -static void gaim_gtk_blist_update_contact(GaimBuddyList *list, GaimBlistNode *node) +static void pidgin_blist_update_contact(GaimBuddyList *list, GaimBlistNode *node) { GaimBlistNode *cnode; GaimContact *contact; GaimBuddy *buddy; - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; if (GAIM_BLIST_NODE_IS_BUDDY(node)) cnode = node->parent; @@ -4825,9 +4840,9 @@ /* First things first, update the group */ if (GAIM_BLIST_NODE_IS_BUDDY(node)) - gaim_gtk_blist_update_group(list, node); + pidgin_blist_update_group(list, node); else - gaim_gtk_blist_update_group(list, cnode->parent); + pidgin_blist_update_group(list, cnode->parent); contact = (GaimContact*)cnode; buddy = gaim_contact_get_priority_buddy(contact); @@ -4839,14 +4854,14 @@ if(!insert_node(list, cnode, &iter)) return; - gtknode = (struct _gaim_gtk_blist_node *)cnode->ui_data; + gtknode = (struct _pidgin_blist_node *)cnode->ui_data; if(gtknode->contact_expanded) { GdkPixbuf *status; char *mark; - status = gaim_gtk_blist_get_status_icon(cnode, - GAIM_STATUS_ICON_SMALL); + status = pidgin_blist_get_status_icon(cnode, + PIDGIN_STATUS_ICON_SMALL); mark = g_markup_escape_text(gaim_contact_get_alias(contact), -1); gtk_tree_store_set(gtkblist->treemodel, &iter, @@ -4867,16 +4882,16 @@ buddy_node(buddy, &iter, cnode); } } else { - gaim_gtk_blist_hide_node(list, cnode, TRUE); - } -} - - - -static void gaim_gtk_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node, gboolean statusChange) + pidgin_blist_hide_node(list, cnode, TRUE); + } +} + + + +static void pidgin_blist_update_buddy(GaimBuddyList *list, GaimBlistNode *node, gboolean statusChange) { GaimBuddy *buddy; - struct _gaim_gtk_blist_node *gtkparentnode; + struct _pidgin_blist_node *gtkparentnode; g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(node)); @@ -4886,9 +4901,9 @@ buddy = (GaimBuddy*)node; /* First things first, update the contact */ - gaim_gtk_blist_update_contact(list, node); - - gtkparentnode = (struct _gaim_gtk_blist_node *)node->parent->ui_data; + pidgin_blist_update_contact(list, node); + + gtkparentnode = (struct _pidgin_blist_node *)node->parent->ui_data; if (gtkparentnode->contact_expanded && buddy_is_displayable(buddy)) { @@ -4900,19 +4915,19 @@ buddy_node(buddy, &iter, node); } else { - gaim_gtk_blist_hide_node(list, node, TRUE); - } - -} - -static void gaim_gtk_blist_update_chat(GaimBuddyList *list, GaimBlistNode *node) + pidgin_blist_hide_node(list, node, TRUE); + } + +} + +static void pidgin_blist_update_chat(GaimBuddyList *list, GaimBlistNode *node) { GaimChat *chat; g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT(node)); /* First things first, update the group */ - gaim_gtk_blist_update_group(list, node->parent); + pidgin_blist_update_group(list, node->parent); chat = (GaimChat*)node; @@ -4926,10 +4941,10 @@ if(!insert_node(list, node, &iter)) return; - status = gaim_gtk_blist_get_status_icon(node, - GAIM_STATUS_ICON_SMALL); - emblem = gaim_gtk_blist_get_emblem(node); - avatar = gaim_gtk_blist_get_buddy_icon(node, TRUE, FALSE, TRUE); + status = pidgin_blist_get_status_icon(node, + PIDGIN_STATUS_ICON_SMALL); + emblem = pidgin_blist_get_emblem(node); + avatar = pidgin_blist_get_buddy_icon(node, TRUE, FALSE, TRUE); mark = g_markup_escape_text(gaim_chat_get_name(chat), -1); @@ -4949,32 +4964,32 @@ if(avatar) g_object_unref(avatar); } else { - gaim_gtk_blist_hide_node(list, node, TRUE); - } -} - -static void gaim_gtk_blist_update(GaimBuddyList *list, GaimBlistNode *node) + pidgin_blist_hide_node(list, node, TRUE); + } +} + +static void pidgin_blist_update(GaimBuddyList *list, GaimBlistNode *node) { if (list) - gtkblist = GAIM_GTK_BLIST(list); + gtkblist = PIDGIN_BLIST(list); if(!gtkblist || !gtkblist->treeview || !node) return; if (node->ui_data == NULL) - gaim_gtk_blist_new_node(node); + pidgin_blist_new_node(node); switch(node->type) { case GAIM_BLIST_GROUP_NODE: - gaim_gtk_blist_update_group(list, node); + pidgin_blist_update_group(list, node); break; case GAIM_BLIST_CONTACT_NODE: - gaim_gtk_blist_update_contact(list, node); + pidgin_blist_update_contact(list, node); break; case GAIM_BLIST_BUDDY_NODE: - gaim_gtk_blist_update_buddy(list, node, TRUE); + pidgin_blist_update_buddy(list, node, TRUE); break; case GAIM_BLIST_CHAT_NODE: - gaim_gtk_blist_update_chat(list, node); + pidgin_blist_update_chat(list, node); break; case GAIM_BLIST_OTHER_NODE: return; @@ -4986,7 +5001,7 @@ } -static void gaim_gtk_blist_destroy(GaimBuddyList *list) +static void pidgin_blist_destroy(GaimBuddyList *list) { if (!gtkblist) return; @@ -4998,7 +5013,7 @@ gtk_widget_destroy(gtkblist->window); - gaim_gtk_blist_tooltip_destroy(); + pidgin_blist_tooltip_destroy(); if (gtkblist->refresh_timer) g_source_remove(gtkblist->refresh_timer); @@ -5024,22 +5039,22 @@ g_free(gtkblist); accountmenu = NULL; gtkblist = NULL; - gaim_prefs_disconnect_by_handle(gaim_gtk_blist_get_handle()); -} - -static void gaim_gtk_blist_set_visible(GaimBuddyList *list, gboolean show) + gaim_prefs_disconnect_by_handle(pidgin_blist_get_handle()); +} + +static void pidgin_blist_set_visible(GaimBuddyList *list, gboolean show) { if (!(gtkblist && gtkblist->window)) return; if (show) { - if(!GAIM_WINDOW_ICONIFIED(gtkblist->window) && !GTK_WIDGET_VISIBLE(gtkblist->window)) - gaim_signal_emit(gaim_gtk_blist_get_handle(), "gtkblist-unhiding", gtkblist); - gaim_gtk_blist_restore_position(); + if(!PIDGIN_WINDOW_ICONIFIED(gtkblist->window) && !GTK_WIDGET_VISIBLE(gtkblist->window)) + gaim_signal_emit(pidgin_blist_get_handle(), "gtkblist-unhiding", gtkblist); + pidgin_blist_restore_position(); gtk_window_present(GTK_WINDOW(gtkblist->window)); } else { if(visibility_manager_count) { - gaim_signal_emit(gaim_gtk_blist_get_handle(), "gtkblist-hiding", gtkblist); + gaim_signal_emit(pidgin_blist_get_handle(), "gtkblist-hiding", gtkblist); gtk_widget_hide(gtkblist->window); } else { if (!GTK_WIDGET_VISIBLE(gtkblist->window)) @@ -5082,20 +5097,20 @@ static void add_buddy_select_account_cb(GObject *w, GaimAccount *account, - GaimGtkAddBuddyData *data) + PidginAddBuddyData *data) { /* Save our account */ data->account = account; } static void -destroy_add_buddy_dialog_cb(GtkWidget *win, GaimGtkAddBuddyData *data) +destroy_add_buddy_dialog_cb(GtkWidget *win, PidginAddBuddyData *data) { g_free(data); } static void -add_buddy_cb(GtkWidget *w, int resp, GaimGtkAddBuddyData *data) +add_buddy_cb(GtkWidget *w, int resp, PidginAddBuddyData *data) { const char *grp, *who, *whoalias; GaimGroup *g; @@ -5148,7 +5163,7 @@ } static void -gaim_gtk_blist_request_add_buddy(GaimAccount *account, const char *username, +pidgin_blist_request_add_buddy(GaimAccount *account, const char *username, const char *group, const char *alias) { GtkWidget *table; @@ -5156,8 +5171,8 @@ GtkWidget *hbox; GtkWidget *vbox; GtkWidget *img; - GaimGtkBuddyList *gtkblist; - GaimGtkAddBuddyData *data = g_new0(GaimGtkAddBuddyData, 1); + PidginBuddyList *gtkblist; + PidginAddBuddyData *data = g_new0(PidginAddBuddyData, 1); data->account = (account != NULL @@ -5167,7 +5182,7 @@ img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); - gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); + gtkblist = PIDGIN_BLIST(gaim_get_blist()); data->window = gtk_dialog_new_with_buttons(_("Add Buddy"), NULL, GTK_DIALOG_NO_SEPARATOR, @@ -5230,10 +5245,10 @@ GTK_RESPONSE_OK, FALSE); gtk_entry_set_activates_default (GTK_ENTRY(data->entry), TRUE); - gaim_set_accessible_label (data->entry, label); + pidgin_set_accessible_label (data->entry, label); g_signal_connect(G_OBJECT(data->entry), "changed", - G_CALLBACK(gaim_gtk_set_sensitive_if_input), + G_CALLBACK(pidgin_set_sensitive_if_input), data->window); label = gtk_label_new(_("Alias:")); @@ -5251,7 +5266,7 @@ gtk_widget_grab_focus(GTK_WIDGET(data->entry_for_alias)); gtk_entry_set_activates_default (GTK_ENTRY(data->entry_for_alias), TRUE); - gaim_set_accessible_label (data->entry_for_alias, label); + pidgin_set_accessible_label (data->entry_for_alias, label); label = gtk_label_new(_("Group:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); @@ -5260,18 +5275,18 @@ data->combo = gtk_combo_new(); gtk_combo_set_popdown_strings(GTK_COMBO(data->combo), groups_tree()); gtk_table_attach_defaults(GTK_TABLE(table), data->combo, 1, 2, 2, 3); - gaim_set_accessible_label (data->combo, label); + pidgin_set_accessible_label (data->combo, label); /* Set up stuff for the account box */ label = gtk_label_new(_("Account:")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4); - data->account_box = gaim_gtk_account_option_menu_new(account, FALSE, + data->account_box = pidgin_account_option_menu_new(account, FALSE, G_CALLBACK(add_buddy_select_account_cb), NULL, data); gtk_table_attach_defaults(GTK_TABLE(table), data->account_box, 1, 2, 3, 4); - gaim_set_accessible_label (data->account_box, label); + pidgin_set_accessible_label (data->account_box, label); /* End of account box */ g_signal_connect(G_OBJECT(data->window), "response", @@ -5284,7 +5299,7 @@ } static void -add_chat_cb(GtkWidget *w, GaimGtkAddChatData *data) +add_chat_cb(GtkWidget *w, PidginAddChatData *data) { GHashTable *components; GList *tmp; @@ -5339,7 +5354,7 @@ } static void -add_chat_resp_cb(GtkWidget *w, int resp, GaimGtkAddChatData *data) +add_chat_resp_cb(GtkWidget *w, int resp, PidginAddChatData *data) { if (resp == GTK_RESPONSE_OK) { @@ -5361,7 +5376,7 @@ static void addchat_set_sensitive_if_input_cb(GtkWidget *entry, gpointer user_data) { - GaimGtkAddChatData *data; + PidginAddChatData *data; GList *tmp; const char *text; gboolean required; @@ -5384,7 +5399,7 @@ } static void -rebuild_addchat_entries(GaimGtkAddChatData *data) +rebuild_addchat_entries(PidginAddChatData *data) { GaimConnection *gc; GList *list = NULL, *tmp; @@ -5460,7 +5475,7 @@ focus = FALSE; } gtk_label_set_mnemonic_widget(GTK_LABEL(label), input); - gaim_set_accessible_label(input, label); + pidgin_set_accessible_label(input, label); g_object_set_data(G_OBJECT(input), "identifier", (gpointer)pce->identifier); g_object_set_data(G_OBJECT(input), "is_spin", GINT_TO_POINTER(pce->is_int)); g_object_set_data(G_OBJECT(input), "required", GINT_TO_POINTER(pce->required)); @@ -5480,7 +5495,7 @@ static void addchat_select_account_cb(GObject *w, GaimAccount *account, - GaimGtkAddChatData *data) + PidginAddChatData *data) { if (strcmp(gaim_account_get_protocol_id(data->account), gaim_account_get_protocol_id(account)) == 0) @@ -5495,11 +5510,11 @@ } static void -gaim_gtk_blist_request_add_chat(GaimAccount *account, GaimGroup *group, +pidgin_blist_request_add_chat(GaimAccount *account, GaimGroup *group, const char *alias, const char *name) { - GaimGtkAddChatData *data; - GaimGtkBuddyList *gtkblist; + PidginAddChatData *data; + PidginBuddyList *gtkblist; GList *l; GaimConnection *gc; GtkWidget *label; @@ -5534,14 +5549,14 @@ } } - data = g_new0(GaimGtkAddChatData, 1); + data = g_new0(PidginAddChatData, 1); data->account = account; data->default_chat_name = g_strdup(name); img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); - gtkblist = GAIM_GTK_BLIST(gaim_get_blist()); + gtkblist = PIDGIN_BLIST(gaim_get_blist()); data->sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); @@ -5584,11 +5599,11 @@ gtk_size_group_add_widget(data->sg, label); gtk_box_pack_start(GTK_BOX(rowbox), label, FALSE, FALSE, 0); - data->account_menu = gaim_gtk_account_option_menu_new(account, FALSE, + data->account_menu = pidgin_account_option_menu_new(account, FALSE, G_CALLBACK(addchat_select_account_cb), chat_account_filter_func, data); gtk_box_pack_start(GTK_BOX(rowbox), data->account_menu, TRUE, TRUE, 0); - gaim_set_accessible_label (data->account_menu, label); + pidgin_set_accessible_label (data->account_menu, label); data->entries_box = gtk_vbox_new(FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(data->entries_box), 0); @@ -5609,7 +5624,7 @@ gtk_entry_set_text(GTK_ENTRY(data->alias_entry), alias); gtk_box_pack_end(GTK_BOX(rowbox), data->alias_entry, TRUE, TRUE, 0); gtk_entry_set_activates_default(GTK_ENTRY(data->alias_entry), TRUE); - gaim_set_accessible_label (data->alias_entry, label); + pidgin_set_accessible_label (data->alias_entry, label); rowbox = gtk_hbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(vbox), rowbox, FALSE, FALSE, 0); @@ -5628,7 +5643,7 @@ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(data->group_combo)->entry), group->name); } - gaim_set_accessible_label (data->group_combo, label); + pidgin_set_accessible_label (data->group_combo, label); g_signal_connect(G_OBJECT(data->window), "response", G_CALLBACK(add_chat_resp_cb), data); @@ -5649,7 +5664,7 @@ } static void -gaim_gtk_blist_request_add_group(void) +pidgin_blist_request_add_group(void) { gaim_request_input(NULL, _("Add Group"), NULL, _("Please enter the name of the group to be added."), @@ -5659,11 +5674,11 @@ } void -gaim_gtk_blist_toggle_visibility() +pidgin_blist_toggle_visibility() { if (gtkblist && gtkblist->window) { if (GTK_WIDGET_VISIBLE(gtkblist->window)) { - gaim_blist_set_visible(GAIM_WINDOW_ICONIFIED(gtkblist->window) || gtk_blist_obscured); + gaim_blist_set_visible(PIDGIN_WINDOW_ICONIFIED(gtkblist->window) || gtk_blist_obscured); } else { gaim_blist_set_visible(TRUE); } @@ -5671,14 +5686,14 @@ } void -gaim_gtk_blist_visibility_manager_add() +pidgin_blist_visibility_manager_add() { visibility_manager_count++; gaim_debug_info("gtkblist", "added visibility manager: %d\n", visibility_manager_count); } void -gaim_gtk_blist_visibility_manager_remove() +pidgin_blist_visibility_manager_remove() { if (visibility_manager_count) visibility_manager_count--; @@ -5687,15 +5702,15 @@ gaim_debug_info("gtkblist", "removed visibility manager: %d\n", visibility_manager_count); } -void gaim_gtk_blist_add_alert(GtkWidget *widget) +void pidgin_blist_add_alert(GtkWidget *widget) { gtk_container_add(GTK_CONTAINER(gtkblist->scrollbook), widget); if (!GTK_WIDGET_HAS_FOCUS(gtkblist->window)) - gaim_gtk_set_urgent(GTK_WINDOW(gtkblist->window), TRUE); + pidgin_set_urgent(GTK_WINDOW(gtkblist->window), TRUE); } void -gaim_gtk_blist_set_headline(const char *text, GdkPixbuf *pixbuf, GCallback callback, +pidgin_blist_set_headline(const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data, GDestroyNotify destroy) { /* Destroy any existing headline first */ @@ -5709,32 +5724,32 @@ gtkblist->headline_data = user_data; gtkblist->headline_destroy = destroy; if (!GTK_WIDGET_HAS_FOCUS(gtkblist->window)) - gaim_gtk_set_urgent(GTK_WINDOW(gtkblist->window), TRUE); + pidgin_set_urgent(GTK_WINDOW(gtkblist->window), TRUE); gtk_widget_show_all(gtkblist->headline_hbox); } static GaimBlistUiOps blist_ui_ops = { - gaim_gtk_blist_new_list, - gaim_gtk_blist_new_node, - gaim_gtk_blist_show, - gaim_gtk_blist_update, - gaim_gtk_blist_remove, - gaim_gtk_blist_destroy, - gaim_gtk_blist_set_visible, - gaim_gtk_blist_request_add_buddy, - gaim_gtk_blist_request_add_chat, - gaim_gtk_blist_request_add_group + pidgin_blist_new_list, + pidgin_blist_new_node, + pidgin_blist_show, + pidgin_blist_update, + pidgin_blist_remove, + pidgin_blist_destroy, + pidgin_blist_set_visible, + pidgin_blist_request_add_buddy, + pidgin_blist_request_add_chat, + pidgin_blist_request_add_group }; GaimBlistUiOps * -gaim_gtk_blist_get_ui_ops(void) +pidgin_blist_get_ui_ops(void) { return &blist_ui_ops; } -GaimGtkBuddyList *gaim_gtk_blist_get_default_gtk_blist() +PidginBuddyList *pidgin_blist_get_default_gtk_blist() { return gtkblist; } @@ -5768,7 +5783,7 @@ } void * -gaim_gtk_blist_get_handle() { +pidgin_blist_get_handle() { static int handle; return &handle; @@ -5776,22 +5791,22 @@ static gboolean buddy_signonoff_timeout_cb(GaimBuddy *buddy) { - struct _gaim_gtk_blist_node *gtknode = ((GaimBlistNode*)buddy)->ui_data; + struct _pidgin_blist_node *gtknode = ((GaimBlistNode*)buddy)->ui_data; gtknode->recent_signonoff = FALSE; gtknode->recent_signonoff_timer = 0; - gaim_gtk_blist_update(NULL, (GaimBlistNode*)buddy); + pidgin_blist_update(NULL, (GaimBlistNode*)buddy); return FALSE; } static void buddy_signonoff_cb(GaimBuddy *buddy) { - struct _gaim_gtk_blist_node *gtknode; + struct _pidgin_blist_node *gtknode; if(!((GaimBlistNode*)buddy)->ui_data) { - gaim_gtk_blist_new_node((GaimBlistNode*)buddy); + pidgin_blist_new_node((GaimBlistNode*)buddy); } gtknode = ((GaimBlistNode*)buddy)->ui_data; @@ -5804,9 +5819,9 @@ (GSourceFunc)buddy_signonoff_timeout_cb, buddy); } -void gaim_gtk_blist_init(void) -{ - void *gtk_blist_handle = gaim_gtk_blist_get_handle(); +void pidgin_blist_init(void) +{ + void *gtk_blist_handle = pidgin_blist_get_handle(); gaim_signal_connect(gaim_connections_get_handle(), "signed-on", gtk_blist_handle, GAIM_CALLBACK(account_signon_cb), @@ -5853,63 +5868,63 @@ gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-on", gtk_blist_handle, GAIM_CALLBACK(buddy_signonoff_cb), NULL); gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-off", gtk_blist_handle, GAIM_CALLBACK(buddy_signonoff_cb), NULL); - gaim_signal_connect(gaim_blist_get_handle(), "buddy-privacy-changed", gtk_blist_handle, GAIM_CALLBACK(gaim_gtk_blist_update_privacy_cb), NULL); + gaim_signal_connect(gaim_blist_get_handle(), "buddy-privacy-changed", gtk_blist_handle, GAIM_CALLBACK(pidgin_blist_update_privacy_cb), NULL); } void -gaim_gtk_blist_uninit(void) { - gaim_signals_unregister_by_instance(gaim_gtk_blist_get_handle()); - gaim_signals_disconnect_by_handle(gaim_gtk_blist_get_handle()); +pidgin_blist_uninit(void) { + gaim_signals_unregister_by_instance(pidgin_blist_get_handle()); + gaim_signals_disconnect_by_handle(pidgin_blist_get_handle()); } /********************************************************************* * Buddy List sorting functions * *********************************************************************/ -GList *gaim_gtk_blist_get_sort_methods() -{ - return gaim_gtk_blist_sort_methods; -} - -void gaim_gtk_blist_sort_method_reg(const char *id, const char *name, gaim_gtk_blist_sort_function func) -{ - struct gaim_gtk_blist_sort_method *method = g_new0(struct gaim_gtk_blist_sort_method, 1); +GList *pidgin_blist_get_sort_methods() +{ + return pidgin_blist_sort_methods; +} + +void pidgin_blist_sort_method_reg(const char *id, const char *name, pidgin_blist_sort_function func) +{ + struct pidgin_blist_sort_method *method = g_new0(struct pidgin_blist_sort_method, 1); method->id = g_strdup(id); method->name = g_strdup(name); method->func = func; - gaim_gtk_blist_sort_methods = g_list_append(gaim_gtk_blist_sort_methods, method); - gaim_gtk_blist_update_sort_methods(); -} - -void gaim_gtk_blist_sort_method_unreg(const char *id){ - GList *l = gaim_gtk_blist_sort_methods; + pidgin_blist_sort_methods = g_list_append(pidgin_blist_sort_methods, method); + pidgin_blist_update_sort_methods(); +} + +void pidgin_blist_sort_method_unreg(const char *id){ + GList *l = pidgin_blist_sort_methods; while(l) { - struct gaim_gtk_blist_sort_method *method = l->data; + struct pidgin_blist_sort_method *method = l->data; if(!strcmp(method->id, id)) { - gaim_gtk_blist_sort_methods = g_list_delete_link(gaim_gtk_blist_sort_methods, l); + pidgin_blist_sort_methods = g_list_delete_link(pidgin_blist_sort_methods, l); g_free(method->id); g_free(method->name); g_free(method); break; } } - gaim_gtk_blist_update_sort_methods(); -} - -void gaim_gtk_blist_sort_method_set(const char *id){ - GList *l = gaim_gtk_blist_sort_methods; + pidgin_blist_update_sort_methods(); +} + +void pidgin_blist_sort_method_set(const char *id){ + GList *l = pidgin_blist_sort_methods; if(!id) id = "none"; - while (l && strcmp(((struct gaim_gtk_blist_sort_method*)l->data)->id, id)) + while (l && strcmp(((struct pidgin_blist_sort_method*)l->data)->id, id)) l = l->next; if (l) { current_sort_method = l->data; } else if (!current_sort_method) { - gaim_gtk_blist_sort_method_set("none"); + pidgin_blist_sort_method_set("none"); return; } if (!strcmp(id, "none")) { @@ -6218,7 +6233,7 @@ gtk_widget_show(menuitem); } else - gaim_separator(menu); + pidgin_separator(menu); } g_list_free(actions); @@ -6227,7 +6242,7 @@ static void modify_account_cb(GtkWidget *widget, gpointer data) { - gaim_gtk_account_dialog_show(GAIM_GTK_MODIFY_ACCOUNT_DIALOG, data); + pidgin_account_dialog_show(PIDGIN_MODIFY_ACCOUNT_DIALOG, data); } static void @@ -6239,7 +6254,7 @@ saved_status = gaim_savedstatus_get_current(); gaim_savedstatus_activate_for_account(saved_status, account); - gaim_account_set_enabled(account, GAIM_GTK_UI, TRUE); + gaim_account_set_enabled(account, PIDGIN_UI, TRUE); } static void @@ -6247,11 +6262,11 @@ { GaimAccount *account = data; - gaim_account_set_enabled(account, GAIM_GTK_UI, FALSE); + gaim_account_set_enabled(account, PIDGIN_UI, FALSE); } void -gaim_gtk_blist_update_accounts_menu(void) +pidgin_blist_update_accounts_menu(void) { GtkWidget *menuitem = NULL, *submenu = NULL; GtkAccelGroup *accel_group = NULL; @@ -6281,14 +6296,14 @@ account = accounts->data; accel_group = gtk_menu_get_accel_group(GTK_MENU(accountmenu)); - if(gaim_account_get_enabled(account, GAIM_GTK_UI)) { + if(gaim_account_get_enabled(account, PIDGIN_UI)) { buf = g_strconcat(gaim_account_get_username(account), " (", gaim_account_get_protocol_name(account), ")", NULL); menuitem = gtk_image_menu_item_new_with_label(buf); accel_path_buf = g_strconcat(N_("<GaimMain>/Accounts/"), buf, NULL); g_free(buf); status = gaim_account_get_active_status(account); - pixbuf = gaim_gtk_create_prpl_icon_with_status(account, gaim_status_get_type(status), 0.5); + pixbuf = pidgin_create_prpl_icon_with_status(account, gaim_status_get_type(status), 0.5); if (pixbuf != NULL) { if (!gaim_account_is_connected(account)) @@ -6316,7 +6331,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); gtk_widget_show(menuitem); - gaim_separator(submenu); + pidgin_separator(submenu); gc = gaim_account_get_connection(account); if (gc && GAIM_CONNECTION_IS_CONNECTED(gc)) { @@ -6340,7 +6355,7 @@ g_object_set_data_full(G_OBJECT(menuitem), "plugin_action", action, (GDestroyNotify)gaim_plugin_action_free); gtk_widget_show(menuitem); } else - gaim_separator(submenu); + pidgin_separator(submenu); } } else { menuitem = gtk_menu_item_new_with_label(_("No actions available")); @@ -6355,7 +6370,7 @@ gtk_widget_show(menuitem); } - gaim_separator(submenu); + pidgin_separator(submenu); menuitem = gtk_menu_item_new_with_mnemonic(_("_Disable")); g_signal_connect(G_OBJECT(menuitem), "activate", @@ -6368,7 +6383,7 @@ } if(disabled_accounts) { - gaim_separator(accountmenu); + pidgin_separator(accountmenu); menuitem = gtk_menu_item_new_with_label(_("Enable Account")); gtk_menu_shell_append(GTK_MENU_SHELL(accountmenu), menuitem); gtk_widget_show(menuitem); @@ -6387,7 +6402,7 @@ account = accounts->data; - if(!gaim_account_get_enabled(account, GAIM_GTK_UI)) { + if(!gaim_account_get_enabled(account, PIDGIN_UI)) { disabled_accounts = TRUE; @@ -6395,7 +6410,7 @@ gaim_account_get_protocol_name(account), ")", NULL); menuitem = gtk_image_menu_item_new_with_label(buf); g_free(buf); - pixbuf = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); if (pixbuf != NULL) { if (!gaim_account_is_connected(account)) @@ -6417,7 +6432,7 @@ static GList *plugin_submenus = NULL; void -gaim_gtk_blist_update_plugin_actions(void) +pidgin_blist_update_plugin_actions(void) { GtkWidget *menuitem, *submenu; GaimPlugin *plugin = NULL; @@ -6472,20 +6487,20 @@ { if (gtk_check_menu_item_get_active(checkmenuitem)) { - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + pidgin_set_cursor(gtkblist->window, GDK_WATCH); /* This is redundant. I think. */ - /* gaim_gtk_blist_sort_method_set(id); */ + /* pidgin_blist_sort_method_set(id); */ gaim_prefs_set_string("/gaim/gtk/blist/sort_type", id); - gaim_gtk_clear_cursor(gtkblist->window); + pidgin_clear_cursor(gtkblist->window); } } void -gaim_gtk_blist_update_sort_methods(void) +pidgin_blist_update_sort_methods(void) { GtkWidget *menuitem = NULL, *activeitem = NULL; - GaimGtkBlistSortMethod *method = NULL; + PidginBlistSortMethod *method = NULL; GList *l; GSList *sl = NULL; GtkWidget *sortmenu; @@ -6505,8 +6520,8 @@ gtk_widget_destroy(GTK_WIDGET(menuitem)); } - for (l = gaim_gtk_blist_sort_methods; l; l = l->next) { - method = (GaimGtkBlistSortMethod *) l->data; + for (l = pidgin_blist_sort_methods; l; l = l->next) { + method = (PidginBlistSortMethod *) l->data; menuitem = gtk_radio_menu_item_new_with_label(sl, _(method->name)); if (!strcmp(m, method->id)) activeitem = menuitem;
--- a/pidgin/gtkblist.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkblist.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,10 +22,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKBLIST_H_ -#define _GAIM_GTKBLIST_H_ +#ifndef _PIDGINBLIST_H_ +#define _PIDGINBLIST_H_ -typedef struct _GaimGtkBuddyList GaimGtkBuddyList; +typedef struct _PidginBuddyList PidginBuddyList; enum { STATUS_ICON_COLUMN, @@ -47,12 +47,12 @@ }; typedef enum { - GAIM_STATUS_ICON_LARGE, - GAIM_STATUS_ICON_SMALL + PIDGIN_STATUS_ICON_LARGE, + PIDGIN_STATUS_ICON_SMALL -} GaimStatusIconSize; +} PidginStatusIconSize; -#include "gtkgaim.h" +#include "pidgin.h" #include "blist.h" /************************************************************************** @@ -61,7 +61,7 @@ /** * Like, everything you need to know about the gtk buddy list */ -struct _GaimGtkBuddyList { +struct _PidginBuddyList { GtkWidget *window; GtkWidget *notebook; /**< The notebook that switches between the real buddy list and the helpful instructions page */ @@ -116,9 +116,9 @@ GdkPixbuf *empty_avatar; /**< A 32x32 transparent pixbuf */ }; -#define GAIM_GTK_BLIST(list) ((GaimGtkBuddyList *)(list)->ui_data) +#define PIDGIN_BLIST(list) ((PidginBuddyList *)(list)->ui_data) #define GAIM_IS_GTK_BLIST(list) \ - ((list)->ui_ops == gaim_gtk_blist_get_ui_ops()) + ((list)->ui_ops == pidgin_blist_get_ui_ops()) /************************************************************************** * @name GTK+ Buddy List API @@ -129,35 +129,35 @@ * * @return the handle to the blist system */ -void *gaim_gtk_blist_get_handle(void); +void *pidgin_blist_get_handle(void); /** * Initializes the GTK+ blist system. */ -void gaim_gtk_blist_init(void); +void pidgin_blist_init(void); /** * Uninitializes the GTK+ blist system. */ -void gaim_gtk_blist_uninit(void); +void pidgin_blist_uninit(void); /** * Returns the UI operations structure for the buddy list. * * @return The GTK+ list operations structure. */ -GaimBlistUiOps *gaim_gtk_blist_get_ui_ops(void); +GaimBlistUiOps *pidgin_blist_get_ui_ops(void); /** * Returns the default gtk buddy list * * There's normally only one buddy list window, but that isn't a necessity. This function - * returns the GaimGtkBuddyList we're most likely wanting to work with. This is slightly + * returns the PidginBuddyList we're most likely wanting to work with. This is slightly * cleaner than an externed global. * * @return The default GTK+ buddy list */ -GaimGtkBuddyList *gaim_gtk_blist_get_default_gtk_blist(void); +PidginBuddyList *pidgin_blist_get_default_gtk_blist(void); /** * Populates a menu with the items shown on the buddy list for a buddy. @@ -166,7 +166,7 @@ * @param buddy The buddy whose menu to get * @param sub TRUE if this is a sub-menu, FALSE otherwise */ -void gaim_gtk_blist_make_buddy_menu(GtkWidget *menu, GaimBuddy *buddy, gboolean sub); +void pidgin_blist_make_buddy_menu(GtkWidget *menu, GaimBuddy *buddy, gboolean sub); /** * Refreshes all the nodes of the buddy list. @@ -174,10 +174,10 @@ * * @param list This is the core list that gets updated from */ -void gaim_gtk_blist_refresh(GaimBuddyList *list); +void pidgin_blist_refresh(GaimBuddyList *list); -void gaim_gtk_blist_update_columns(void); -void gaim_gtk_blist_update_refresh_timeout(void); +void pidgin_blist_update_columns(void); +void pidgin_blist_update_refresh_timeout(void); /** * Returns the blist emblem @@ -187,13 +187,13 @@ * @return A newly created GdkPixbuf, or NULL */ GdkPixbuf * -gaim_gtk_blist_get_emblem(GaimBlistNode *node); +pidgin_blist_get_emblem(GaimBlistNode *node); /** * Useful for the buddy ticker */ -GdkPixbuf *gaim_gtk_blist_get_status_icon(GaimBlistNode *node, - GaimStatusIconSize size); +GdkPixbuf *pidgin_blist_get_status_icon(GaimBlistNode *node, + PidginStatusIconSize size); /** * Returns a boolean indicating if @a node is part of an expanded contact. @@ -204,14 +204,14 @@ * @param node The node in question. * @return A boolean indicating if @a node is part of an expanded contact. */ -gboolean gaim_gtk_blist_node_is_contact_expanded(GaimBlistNode *node); +gboolean pidgin_blist_node_is_contact_expanded(GaimBlistNode *node); /** * Intelligently toggles the visibility of the buddy list. If the buddy * list is obscured, it is brought to the front. If it is not obscured, * it is hidden. If it is hidden it is shown. */ -void gaim_gtk_blist_toggle_visibility(void); +void pidgin_blist_toggle_visibility(void); /** * Increases the reference count of visibility managers. Callers should @@ -221,42 +221,42 @@ * A visibility manager is something that provides some method for * showing the buddy list after it is hidden (e.g. docklet plugin). */ -void gaim_gtk_blist_visibility_manager_add(void); +void pidgin_blist_visibility_manager_add(void); /** * Decreases the reference count of visibility managers. If the count * drops below zero, the buddy list is shown. */ -void gaim_gtk_blist_visibility_manager_remove(void); +void pidgin_blist_visibility_manager_remove(void); /** * Adds a mini-alert to the blist scrollbook * * @param widget The widget to add */ -void gaim_gtk_blist_add_alert(GtkWidget *widget); +void pidgin_blist_add_alert(GtkWidget *widget); /************************************************************************** * @name GTK+ Buddy List sorting functions **************************************************************************/ -typedef void (*gaim_gtk_blist_sort_function)(GaimBlistNode *new, GaimBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter); +typedef void (*pidgin_blist_sort_function)(GaimBlistNode *new, GaimBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter); /** * Gets the current list of sort methods. * * @return A GSlist of sort methods */ -GList *gaim_gtk_blist_get_sort_methods(void); +GList *pidgin_blist_get_sort_methods(void); -struct gaim_gtk_blist_sort_method { +struct pidgin_blist_sort_method { char *id; char *name; - gaim_gtk_blist_sort_function func; + pidgin_blist_sort_function func; }; -typedef struct gaim_gtk_blist_sort_method GaimGtkBlistSortMethod; +typedef struct pidgin_blist_sort_method PidginBlistSortMethod; /** * Registers a buddy list sorting method. @@ -266,41 +266,41 @@ * @param func A pointer to the function. * */ -void gaim_gtk_blist_sort_method_reg(const char *id, const char *name, gaim_gtk_blist_sort_function func); +void pidgin_blist_sort_method_reg(const char *id, const char *name, pidgin_blist_sort_function func); /** * Unregisters a buddy list sorting method. * * @param id The method's id */ -void gaim_gtk_blist_sort_method_unreg(const char *id); +void pidgin_blist_sort_method_unreg(const char *id); /** * Sets a buddy list sorting method. * * @param id The method's id. */ -void gaim_gtk_blist_sort_method_set(const char *id); +void pidgin_blist_sort_method_set(const char *id); /** * Sets up the programs default sort methods */ -void gaim_gtk_blist_setup_sort_methods(void); +void pidgin_blist_setup_sort_methods(void); /** * Updates the accounts menu on the GTK+ buddy list window. */ -void gaim_gtk_blist_update_accounts_menu(void); +void pidgin_blist_update_accounts_menu(void); /** * Updates the plugin actions menu on the GTK+ buddy list window. */ -void gaim_gtk_blist_update_plugin_actions(void); +void pidgin_blist_update_plugin_actions(void); /** * Updates the Sorting menu on the GTK+ buddy list window. */ -void gaim_gtk_blist_update_sort_methods(void); +void pidgin_blist_update_sort_methods(void); /** * Determines if showing the join chat dialog is a valid action. @@ -308,30 +308,30 @@ * @return Returns TRUE if there are accounts online capable of * joining chat rooms. Otherwise returns FALSE. */ -gboolean gaim_gtk_blist_joinchat_is_showable(void); +gboolean pidgin_blist_joinchat_is_showable(void); /** * Shows the join chat dialog. */ -void gaim_gtk_blist_joinchat_show(void); +void pidgin_blist_joinchat_show(void); /** * Appends the privacy menu items for a GaimBlistNode * TODO: Rename these. */ -void gaim_gtk_append_blist_node_privacy_menu(GtkWidget *menu, GaimBlistNode *node); +void pidgin_append_blist_node_privacy_menu(GtkWidget *menu, GaimBlistNode *node); /** * Appends the protocol specific menu items for a GaimBlistNode * TODO: Rename these. */ -void gaim_gtk_append_blist_node_proto_menu (GtkWidget *menu, GaimConnection *gc, GaimBlistNode *node); +void pidgin_append_blist_node_proto_menu (GtkWidget *menu, GaimConnection *gc, GaimBlistNode *node); /** * Appends the extended menu items for a GaimBlistNode * TODO: Rename these. */ -void gaim_gtk_append_blist_node_extended_menu(GtkWidget *menu, GaimBlistNode *node); +void pidgin_append_blist_node_extended_menu(GtkWidget *menu, GaimBlistNode *node); /** * Used by the connection API to tell the blist if an account @@ -342,7 +342,7 @@ * @param message The connection error message, or NULL if this * account is no longer in an error state. */ -void gaim_gtk_blist_update_account_error_state(GaimAccount *account, const char *message); +void pidgin_blist_update_account_error_state(GaimAccount *account, const char *message); /** * Sets a headline notification @@ -356,7 +356,7 @@ * @param user_data The userdata to include in the callback * @param destroy The callback to call when headline is closed or replaced by another headline. */ -void gaim_gtk_blist_set_headline(const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data, +void pidgin_blist_set_headline(const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data, GDestroyNotify destroy); -#endif /* _GAIM_GTKBLIST_H_ */ +#endif /* _PIDGINBLIST_H_ */
--- a/pidgin/gtkcelllayout.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcelllayout.c Mon Feb 05 03:37:27 2007 +0000 @@ -45,7 +45,7 @@ }; cell_layout_type = - g_type_register_static (G_TYPE_INTERFACE, "GaimGtkCellLayout", + g_type_register_static (G_TYPE_INTERFACE, "PidginCellLayout", &cell_layout_info, 0); g_type_interface_add_prerequisite (cell_layout_type, G_TYPE_OBJECT);
--- a/pidgin/gtkcellrendererexpander.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcellrendererexpander.c Mon Feb 05 03:37:27 2007 +0000 @@ -32,38 +32,38 @@ #include <gtk/gtktreeview.h> #include "gtkcellrendererexpander.h" -static void gaim_gtk_cell_renderer_expander_get_property (GObject *object, +static void pidgin_cell_renderer_expander_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec); -static void gaim_gtk_cell_renderer_expander_set_property (GObject *object, +static void pidgin_cell_renderer_expander_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); -static void gaim_gtk_cell_renderer_expander_init (GaimGtkCellRendererExpander *cellexpander); -static void gaim_gtk_cell_renderer_expander_class_init (GaimGtkCellRendererExpanderClass *class); -static void gaim_gtk_cell_renderer_expander_get_size (GtkCellRenderer *cell, +static void pidgin_cell_renderer_expander_init (PidginCellRendererExpander *cellexpander); +static void pidgin_cell_renderer_expander_class_init (PidginCellRendererExpanderClass *class); +static void pidgin_cell_renderer_expander_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); -static void gaim_gtk_cell_renderer_expander_render (GtkCellRenderer *cell, +static void pidgin_cell_renderer_expander_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, guint flags); -static gboolean gaim_gtk_cell_renderer_expander_activate (GtkCellRenderer *r, +static gboolean pidgin_cell_renderer_expander_activate (GtkCellRenderer *r, GdkEvent *event, GtkWidget *widget, const gchar *p, GdkRectangle *bg, GdkRectangle *cell, GtkCellRendererState flags); -static void gaim_gtk_cell_renderer_expander_finalize (GObject *gobject); +static void pidgin_cell_renderer_expander_finalize (GObject *gobject); enum { LAST_SIGNAL @@ -77,7 +77,7 @@ static gpointer parent_class; /* static guint expander_cell_renderer_signals [LAST_SIGNAL]; */ -GType gaim_gtk_cell_renderer_expander_get_type (void) +GType pidgin_cell_renderer_expander_get_type (void) { static GType cell_expander_type = 0; @@ -85,48 +85,48 @@ { static const GTypeInfo cell_expander_info = { - sizeof (GaimGtkCellRendererExpanderClass), + sizeof (PidginCellRendererExpanderClass), NULL, /* base_init */ NULL, /* base_finalize */ - (GClassInitFunc) gaim_gtk_cell_renderer_expander_class_init, + (GClassInitFunc) pidgin_cell_renderer_expander_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (GaimGtkCellRendererExpander), + sizeof (PidginCellRendererExpander), 0, /* n_preallocs */ - (GInstanceInitFunc) gaim_gtk_cell_renderer_expander_init, + (GInstanceInitFunc) pidgin_cell_renderer_expander_init, NULL /* value_table */ }; cell_expander_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, - "GaimGtkCellRendererExpander", + "PidginCellRendererExpander", &cell_expander_info, 0); } return cell_expander_type; } -static void gaim_gtk_cell_renderer_expander_init (GaimGtkCellRendererExpander *cellexpander) +static void pidgin_cell_renderer_expander_init (PidginCellRendererExpander *cellexpander) { GTK_CELL_RENDERER(cellexpander)->mode = GTK_CELL_RENDERER_MODE_ACTIVATABLE; GTK_CELL_RENDERER(cellexpander)->xpad = 0; GTK_CELL_RENDERER(cellexpander)->ypad = 2; } -static void gaim_gtk_cell_renderer_expander_class_init (GaimGtkCellRendererExpanderClass *class) +static void pidgin_cell_renderer_expander_class_init (PidginCellRendererExpanderClass *class) { GObjectClass *object_class = G_OBJECT_CLASS(class); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(class); parent_class = g_type_class_peek_parent (class); - object_class->finalize = gaim_gtk_cell_renderer_expander_finalize; + object_class->finalize = pidgin_cell_renderer_expander_finalize; - object_class->get_property = gaim_gtk_cell_renderer_expander_get_property; - object_class->set_property = gaim_gtk_cell_renderer_expander_set_property; + object_class->get_property = pidgin_cell_renderer_expander_get_property; + object_class->set_property = pidgin_cell_renderer_expander_set_property; - cell_class->get_size = gaim_gtk_cell_renderer_expander_get_size; - cell_class->render = gaim_gtk_cell_renderer_expander_render; - cell_class->activate = gaim_gtk_cell_renderer_expander_activate; + cell_class->get_size = pidgin_cell_renderer_expander_get_size; + cell_class->render = pidgin_cell_renderer_expander_render; + cell_class->activate = pidgin_cell_renderer_expander_activate; g_object_class_install_property (object_class, PROP_IS_EXPANDER, @@ -137,21 +137,21 @@ G_PARAM_READWRITE)); } -static void gaim_gtk_cell_renderer_expander_finalize (GObject *object) +static void pidgin_cell_renderer_expander_finalize (GObject *object) { /* - GaimGtkCellRendererExpander *cellexpander = GAIM_GTK_CELL_RENDERER_EXPANDER(object); + PidginCellRendererExpander *cellexpander = PIDGIN_CELL_RENDERER_EXPANDER(object); */ (* G_OBJECT_CLASS (parent_class)->finalize) (object); } -static void gaim_gtk_cell_renderer_expander_get_property (GObject *object, +static void pidgin_cell_renderer_expander_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *psec) { - GaimGtkCellRendererExpander *cellexpander = GAIM_GTK_CELL_RENDERER_EXPANDER(object); + PidginCellRendererExpander *cellexpander = PIDGIN_CELL_RENDERER_EXPANDER(object); switch (param_id) { @@ -165,12 +165,12 @@ } } -static void gaim_gtk_cell_renderer_expander_set_property (GObject *object, +static void pidgin_cell_renderer_expander_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { - GaimGtkCellRendererExpander *cellexpander = GAIM_GTK_CELL_RENDERER_EXPANDER (object); + PidginCellRendererExpander *cellexpander = PIDGIN_CELL_RENDERER_EXPANDER (object); switch (param_id) { @@ -183,12 +183,12 @@ } } -GtkCellRenderer *gaim_gtk_cell_renderer_expander_new(void) +GtkCellRenderer *pidgin_cell_renderer_expander_new(void) { return g_object_new(GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, NULL); } -static void gaim_gtk_cell_renderer_expander_get_size (GtkCellRenderer *cell, +static void pidgin_cell_renderer_expander_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, @@ -227,7 +227,7 @@ } -static void gaim_gtk_cell_renderer_expander_render (GtkCellRenderer *cell, +static void pidgin_cell_renderer_expander_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, @@ -235,7 +235,7 @@ GdkRectangle *expose_area, guint flags) { - GaimGtkCellRendererExpander *cellexpander = (GaimGtkCellRendererExpander *) cell; + PidginCellRendererExpander *cellexpander = (PidginCellRendererExpander *) cell; gint width, height; GtkStateType state; @@ -271,7 +271,7 @@ cell->is_expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED); } -static gboolean gaim_gtk_cell_renderer_expander_activate(GtkCellRenderer *r, +static gboolean pidgin_cell_renderer_expander_activate(GtkCellRenderer *r, GdkEvent *event, GtkWidget *widget, const gchar *p,
--- a/pidgin/gtkcellrendererexpander.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcellrendererexpander.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,5 +1,5 @@ /* gtkxcellrendererexpander.h - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -18,8 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifndef _GAIM_GTKCELLRENDEREREXPANDER_H_ -#define _GAIM_GTKCELLRENDEREREXPANDER_H_ +#ifndef _PIDGINCELLRENDEREREXPANDER_H_ +#define _PIDGINCELLRENDEREREXPANDER_H_ #include <gtk/gtkcellrenderer.h> @@ -28,32 +28,32 @@ #endif /* __cplusplus */ -#define GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER (gaim_gtk_cell_renderer_expander_get_type()) -#define GAIM_GTK_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, GaimGtkCellRendererExpander)) -#define GAIM_GTK_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, GaimGtkCellRendererExpanderClass)) +#define GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER (pidgin_cell_renderer_expander_get_type()) +#define PIDGIN_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, PidginCellRendererExpander)) +#define PIDGIN_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, PidginCellRendererExpanderClass)) #define GAIM_IS_GTK_CELL_RENDERER_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER)) #define GAIM_IS_GTK_CELL_RENDERER_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER)) -#define GAIM_GTK_CELL_RENDERER_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, GaimGtkCellRendererExpanderClass)) +#define PIDGIN_CELL_RENDERER_EXPANDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIM_TYPE_GTK_CELL_RENDERER_EXPANDER, PidginCellRendererExpanderClass)) -typedef struct _GaimGtkCellRendererExpander GaimGtkCellRendererExpander; -typedef struct _GaimGtkCellRendererExpanderClass GaimGtkCellRendererExpanderClass; +typedef struct _PidginCellRendererExpander PidginCellRendererExpander; +typedef struct _PidginCellRendererExpanderClass PidginCellRendererExpanderClass; -struct _GaimGtkCellRendererExpander { +struct _PidginCellRendererExpander { GtkCellRenderer parent; gboolean is_expander; }; -struct _GaimGtkCellRendererExpanderClass { +struct _PidginCellRendererExpanderClass { GtkCellRendererClass parent_class; }; -GType gaim_gtk_cell_renderer_expander_get_type (void); -GtkCellRenderer *gaim_gtk_cell_renderer_expander_new (void); +GType pidgin_cell_renderer_expander_get_type (void); +GtkCellRenderer *pidgin_cell_renderer_expander_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* _GAIM_GTKCELLRENDEREREXPANDER_H_ */ +#endif /* _PIDGINCELLRENDEREREXPANDER_H_ */
--- a/pidgin/gtkcellrendererprogress.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcellrendererprogress.c Mon Feb 05 03:37:27 2007 +0000 @@ -30,24 +30,24 @@ #include "gtkcellrendererprogress.h" -static void gaim_gtk_cell_renderer_progress_get_property (GObject *object, +static void pidgin_cell_renderer_progress_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec); -static void gaim_gtk_cell_renderer_progress_set_property (GObject *object, +static void pidgin_cell_renderer_progress_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); -static void gaim_gtk_cell_renderer_progress_init (GaimGtkCellRendererProgress *cellprogress); -static void gaim_gtk_cell_renderer_progress_class_init (GaimGtkCellRendererProgressClass *class); -static void gaim_gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, +static void pidgin_cell_renderer_progress_init (PidginCellRendererProgress *cellprogress); +static void pidgin_cell_renderer_progress_class_init (PidginCellRendererProgressClass *class); +static void pidgin_cell_renderer_progress_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); -static void gaim_gtk_cell_renderer_progress_render (GtkCellRenderer *cell, +static void pidgin_cell_renderer_progress_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, @@ -55,7 +55,7 @@ GdkRectangle *expose_area, guint flags); #if 0 -static gboolean gaim_gtk_cell_renderer_progress_activate (GtkCellRenderer *cell, +static gboolean pidgin_cell_renderer_progress_activate (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path, @@ -63,7 +63,7 @@ GdkRectangle *cell_area, guint flags); #endif -static void gaim_gtk_cell_renderer_progress_finalize (GObject *gobject); +static void pidgin_cell_renderer_progress_finalize (GObject *gobject); enum { LAST_SIGNAL @@ -79,7 +79,7 @@ static gpointer parent_class; /* static guint progress_cell_renderer_signals [LAST_SIGNAL]; */ -GType gaim_gtk_cell_renderer_progress_get_type (void) +GType pidgin_cell_renderer_progress_get_type (void) { static GType cell_progress_type = 0; @@ -87,47 +87,47 @@ { static const GTypeInfo cell_progress_info = { - sizeof (GaimGtkCellRendererProgressClass), + sizeof (PidginCellRendererProgressClass), NULL, /* base_init */ NULL, /* base_finalize */ - (GClassInitFunc) gaim_gtk_cell_renderer_progress_class_init, + (GClassInitFunc) pidgin_cell_renderer_progress_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (GaimGtkCellRendererProgress), + sizeof (PidginCellRendererProgress), 0, /* n_preallocs */ - (GInstanceInitFunc) gaim_gtk_cell_renderer_progress_init, + (GInstanceInitFunc) pidgin_cell_renderer_progress_init, NULL /* value_table */ }; cell_progress_type = g_type_register_static (GTK_TYPE_CELL_RENDERER, - "GaimGtkCellRendererProgress", + "PidginCellRendererProgress", &cell_progress_info, 0); } return cell_progress_type; } -static void gaim_gtk_cell_renderer_progress_init (GaimGtkCellRendererProgress *cellprogress) +static void pidgin_cell_renderer_progress_init (PidginCellRendererProgress *cellprogress) { GTK_CELL_RENDERER(cellprogress)->mode = GTK_CELL_RENDERER_MODE_INERT; GTK_CELL_RENDERER(cellprogress)->xpad = 2; GTK_CELL_RENDERER(cellprogress)->ypad = 2; } -static void gaim_gtk_cell_renderer_progress_class_init (GaimGtkCellRendererProgressClass *class) +static void pidgin_cell_renderer_progress_class_init (PidginCellRendererProgressClass *class) { GObjectClass *object_class = G_OBJECT_CLASS(class); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(class); parent_class = g_type_class_peek_parent (class); - object_class->finalize = gaim_gtk_cell_renderer_progress_finalize; + object_class->finalize = pidgin_cell_renderer_progress_finalize; - object_class->get_property = gaim_gtk_cell_renderer_progress_get_property; - object_class->set_property = gaim_gtk_cell_renderer_progress_set_property; + object_class->get_property = pidgin_cell_renderer_progress_get_property; + object_class->set_property = pidgin_cell_renderer_progress_set_property; - cell_class->get_size = gaim_gtk_cell_renderer_progress_get_size; - cell_class->render = gaim_gtk_cell_renderer_progress_render; + cell_class->get_size = pidgin_cell_renderer_progress_get_size; + cell_class->render = pidgin_cell_renderer_progress_render; g_object_class_install_property (object_class, PROP_PERCENTAGE, @@ -152,21 +152,21 @@ G_PARAM_READABLE | G_PARAM_WRITABLE)); } -static void gaim_gtk_cell_renderer_progress_finalize (GObject *object) +static void pidgin_cell_renderer_progress_finalize (GObject *object) { /* - GaimGtkCellRendererProgress *cellprogress = GAIM_GTK_CELL_RENDERER_PROGRESS(object); + PidginCellRendererProgress *cellprogress = PIDGIN_CELL_RENDERER_PROGRESS(object); */ (* G_OBJECT_CLASS (parent_class)->finalize) (object); } -static void gaim_gtk_cell_renderer_progress_get_property (GObject *object, +static void pidgin_cell_renderer_progress_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *psec) { - GaimGtkCellRendererProgress *cellprogress = GAIM_GTK_CELL_RENDERER_PROGRESS(object); + PidginCellRendererProgress *cellprogress = PIDGIN_CELL_RENDERER_PROGRESS(object); switch (param_id) { @@ -185,12 +185,12 @@ } } -static void gaim_gtk_cell_renderer_progress_set_property (GObject *object, +static void pidgin_cell_renderer_progress_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { - GaimGtkCellRendererProgress *cellprogress = GAIM_GTK_CELL_RENDERER_PROGRESS (object); + PidginCellRendererProgress *cellprogress = PIDGIN_CELL_RENDERER_PROGRESS (object); switch (param_id) { @@ -212,12 +212,12 @@ } } -GtkCellRenderer *gaim_gtk_cell_renderer_progress_new(void) +GtkCellRenderer *pidgin_cell_renderer_progress_new(void) { return g_object_new(GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, NULL); } -static void gaim_gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell, +static void pidgin_cell_renderer_progress_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, @@ -253,7 +253,7 @@ } -static void gaim_gtk_cell_renderer_progress_render (GtkCellRenderer *cell, +static void pidgin_cell_renderer_progress_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, @@ -261,7 +261,7 @@ GdkRectangle *expose_area, guint flags) { - GaimGtkCellRendererProgress *cellprogress = (GaimGtkCellRendererProgress *) cell; + PidginCellRendererProgress *cellprogress = (PidginCellRendererProgress *) cell; gint width, height; GtkStateType state;
--- a/pidgin/gtkcellrendererprogress.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcellrendererprogress.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,5 +1,5 @@ /* gtkxcellrendererprogress.h - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -18,8 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifndef _GAIM_GTKCELLRENDERERPROGRESS_H_ -#define _GAIM_GTKCELLRENDERERPROGRESS_H_ +#ifndef _PIDGINCELLRENDERERPROGRESS_H_ +#define _PIDGINCELLRENDERERPROGRESS_H_ #include <gtk/gtkcellrenderer.h> @@ -28,17 +28,17 @@ #endif /* __cplusplus */ -#define GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS (gaim_gtk_cell_renderer_progress_get_type()) -#define GAIM_GTK_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, GaimGtkCellRendererProgress)) -#define GAIM_GTK_CELL_RENDERER_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, GaimGtkCellRendererProgressClass)) +#define GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS (pidgin_cell_renderer_progress_get_type()) +#define PIDGIN_CELL_RENDERER_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, PidginCellRendererProgress)) +#define PIDGIN_CELL_RENDERER_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, PidginCellRendererProgressClass)) #define GAIM_IS_GTK_CELL_PROGRESS_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS)) #define GAIM_IS_GTK_CELL_PROGRESS_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS)) -#define GAIM_GTK_CELL_RENDERER_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, GaimGtkCellRendererProgressClass)) +#define PIDGIN_CELL_RENDERER_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIM_TYPE_GTK_CELL_RENDERER_PROGRESS, PidginCellRendererProgressClass)) -typedef struct _GaimGtkCellRendererProgress GaimGtkCellRendererProgress; -typedef struct _GaimGtkCellRendererProgressClass GaimGtkCellRendererProgressClass; +typedef struct _PidginCellRendererProgress PidginCellRendererProgress; +typedef struct _PidginCellRendererProgressClass PidginCellRendererProgressClass; -struct _GaimGtkCellRendererProgress { +struct _PidginCellRendererProgress { GtkCellRenderer parent; gdouble progress; @@ -46,16 +46,16 @@ gboolean text_set; }; -struct _GaimGtkCellRendererProgressClass { +struct _PidginCellRendererProgressClass { GtkCellRendererClass parent_class; }; -GType gaim_gtk_cell_renderer_progress_get_type (void); -GtkCellRenderer *gaim_gtk_cell_renderer_progress_new (void); +GType pidgin_cell_renderer_progress_get_type (void); +GtkCellRenderer *pidgin_cell_renderer_progress_new (void); #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /* _GAIM_GTKCELLRENDERERPROGRESS_H_ */ +#endif /* _PIDGINCELLRENDERERPROGRESS_H_ */
--- a/pidgin/gtkcellview.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcellview.c Mon Feb 05 03:37:27 2007 +0000 @@ -153,7 +153,7 @@ NULL }; - cell_view_type = g_type_register_static (GTK_TYPE_WIDGET, "GaimGtkCellView", + cell_view_type = g_type_register_static (GTK_TYPE_WIDGET, "PidginCellView", &cell_view_info, 0); g_type_add_interface_static (cell_view_type, GTK_TYPE_CELL_LAYOUT,
--- a/pidgin/gtkcellviewmenuitem.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkcellviewmenuitem.c Mon Feb 05 03:37:27 2007 +0000 @@ -56,7 +56,7 @@ }; cell_view_menu_item_type = - g_type_register_static (GTK_TYPE_MENU_ITEM, "GaimGtkCellViewMenuItem", + g_type_register_static (GTK_TYPE_MENU_ITEM, "PidginCellViewMenuItem", &cell_view_menu_item_info, 0); }
--- a/pidgin/gtkconn.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkconn.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" #include "debug.h" @@ -55,48 +55,48 @@ static GHashTable *hash = NULL; static void -gaim_gtk_connection_connect_progress(GaimConnection *gc, +pidgin_connection_connect_progress(GaimConnection *gc, const char *text, size_t step, size_t step_count) { - GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist(); if (!gtkblist) return; - gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), + pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox), (gaim_connections_get_connecting() != NULL)); - gtk_gaim_status_box_pulse_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox)); + pidgin_status_box_pulse_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox)); } static void -gaim_gtk_connection_connected(GaimConnection *gc) +pidgin_connection_connected(GaimConnection *gc) { GaimAccount *account; - GaimGtkBuddyList *gtkblist; + PidginBuddyList *gtkblist; account = gaim_connection_get_account(gc); - gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + gtkblist = pidgin_blist_get_default_gtk_blist(); if (gtkblist != NULL) - gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), + pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox), (gaim_connections_get_connecting() != NULL)); g_hash_table_remove(hash, account); - gaim_gtk_blist_update_account_error_state(account, NULL); + pidgin_blist_update_account_error_state(account, NULL); } static void -gaim_gtk_connection_disconnected(GaimConnection *gc) +pidgin_connection_disconnected(GaimConnection *gc) { - GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist(); if (!gtkblist) return; - gtk_gaim_status_box_set_connecting(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), + pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox), (gaim_connections_get_connecting() != NULL)); if (gaim_connections_get_all() != NULL) return; - gaim_gtkdialogs_destroy_all(); + pidgindialogs_destroy_all(); } static void @@ -136,7 +136,7 @@ } static void -gaim_gtk_connection_report_disconnect(GaimConnection *gc, const char *text) +pidgin_connection_report_disconnect(GaimConnection *gc, const char *text) { GaimAccount *account = NULL; GaimAutoRecon *info; @@ -144,7 +144,7 @@ account = gaim_connection_get_account(gc); info = g_hash_table_lookup(hash, account); - gaim_gtk_blist_update_account_error_state(account, text); + pidgin_blist_update_account_error_state(account, text); if (!gc->wants_to_die) { if (info == NULL) { info = g_new0(GaimAutoRecon, 1); @@ -189,17 +189,17 @@ * disconnected by wants_to_die? This happens when you sign * on from somewhere else, or when you enter an invalid password. */ - gaim_account_set_enabled(account, GAIM_GTK_UI, FALSE); + gaim_account_set_enabled(account, PIDGIN_UI, FALSE); } } -static void gaim_gtk_connection_network_connected () +static void pidgin_connection_network_connected () { GList *list = gaim_accounts_get_all_active(); - GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist(); if(gtkblist) - gtk_gaim_status_box_set_network_available(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), TRUE); + pidgin_status_box_set_network_available(PIDGIN_STATUS_BOX(gtkblist->statusbox), TRUE); while (list) { GaimAccount *account = (GaimAccount*)list->data; @@ -210,15 +210,15 @@ } } -static void gaim_gtk_connection_network_disconnected () +static void pidgin_connection_network_disconnected () { GList *l = gaim_accounts_get_all_active(); - GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist(); GaimPluginProtocolInfo *prpl_info = NULL; GaimConnection *gc = NULL; if(gtkblist) - gtk_gaim_status_box_set_network_available(GTK_GAIM_STATUS_BOX(gtkblist->statusbox), FALSE); + pidgin_status_box_set_network_available(PIDGIN_STATUS_BOX(gtkblist->statusbox), FALSE); while (l) { GaimAccount *a = (GaimAccount*)l->data; @@ -237,22 +237,22 @@ } } -static void gaim_gtk_connection_notice(GaimConnection *gc, const char *text) +static void pidgin_connection_notice(GaimConnection *gc, const char *text) { } static GaimConnectionUiOps conn_ui_ops = { - gaim_gtk_connection_connect_progress, - gaim_gtk_connection_connected, - gaim_gtk_connection_disconnected, - gaim_gtk_connection_notice, - gaim_gtk_connection_report_disconnect, - gaim_gtk_connection_network_connected, - gaim_gtk_connection_network_disconnected + pidgin_connection_connect_progress, + pidgin_connection_connected, + pidgin_connection_disconnected, + pidgin_connection_notice, + pidgin_connection_report_disconnect, + pidgin_connection_network_connected, + pidgin_connection_network_disconnected }; GaimConnectionUiOps * -gaim_gtk_connections_get_ui_ops(void) +pidgin_connections_get_ui_ops(void) { return &conn_ui_ops; } @@ -262,7 +262,7 @@ { g_hash_table_remove(hash, account); - gaim_gtk_blist_update_account_error_state(account, NULL); + pidgin_blist_update_account_error_state(account, NULL); } @@ -271,7 +271,7 @@ **************************************************************************/ void * -gaim_gtk_connection_get_handle(void) +pidgin_connection_get_handle(void) { static int handle; @@ -279,21 +279,21 @@ } void -gaim_gtk_connection_init(void) +pidgin_connection_init(void) { hash = g_hash_table_new_full( g_direct_hash, g_direct_equal, NULL, free_auto_recon); gaim_signal_connect(gaim_accounts_get_handle(), "account-removed", - gaim_gtk_connection_get_handle(), + pidgin_connection_get_handle(), GAIM_CALLBACK(account_removed_cb), NULL); } void -gaim_gtk_connection_uninit(void) +pidgin_connection_uninit(void) { - gaim_signals_disconnect_by_handle(gaim_gtk_connection_get_handle()); + gaim_signals_disconnect_by_handle(pidgin_connection_get_handle()); g_hash_table_destroy(hash); }
--- a/pidgin/gtkconn.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkconn.h Mon Feb 05 03:37:27 2007 +0000 @@ -3,7 +3,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -21,8 +21,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKCONN_H_ -#define _GAIM_GTKCONN_H_ +#ifndef _PIDGINCONN_H_ +#define _PIDGINCONN_H_ /**************************************************************************/ /** @name GTK+ Connection API */ @@ -34,7 +34,7 @@ * * @return UI operations struct */ -GaimConnectionUiOps *gaim_gtk_connections_get_ui_ops(void); +GaimConnectionUiOps *pidgin_connections_get_ui_ops(void); /*@}*/ @@ -43,16 +43,16 @@ * * @return The handle to the GTK+ connection system. */ -void *gaim_gtk_connection_get_handle(void); +void *pidgin_connection_get_handle(void); /** * Initializes the GTK+ connection system. */ -void gaim_gtk_connection_init(void); +void pidgin_connection_init(void); /** * Uninitializes the GTK+ connection system. */ -void gaim_gtk_connection_uninit(void); +void pidgin_connection_uninit(void); -#endif /* _GAIM_GTKCONN_H_ */ +#endif /* _PIDGINCONN_H_ */
--- a/pidgin/gtkconv.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkconv.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #ifndef _WIN32 # include <X11/Xlib.h> @@ -72,16 +72,16 @@ typedef enum { - GAIM_GTKCONV_SET_TITLE = 1 << 0, - GAIM_GTKCONV_BUDDY_ICON = 1 << 1, - GAIM_GTKCONV_MENU = 1 << 2, - GAIM_GTKCONV_TAB_ICON = 1 << 3, - GAIM_GTKCONV_TOPIC = 1 << 4, - GAIM_GTKCONV_SMILEY_THEME = 1 << 5, - GAIM_GTKCONV_COLORIZE_TITLE = 1 << 6 -}GaimGtkConvFields; - -#define GAIM_GTKCONV_ALL ((1 << 7) - 1) + PIDGIN_CONV_SET_TITLE = 1 << 0, + PIDGIN_CONV_BUDDY_ICON = 1 << 1, + PIDGIN_CONV_MENU = 1 << 2, + PIDGIN_CONV_TAB_ICON = 1 << 3, + PIDGIN_CONV_TOPIC = 1 << 4, + PIDGIN_CONV_SMILEY_THEME = 1 << 5, + PIDGIN_CONV_COLORIZE_TITLE = 1 << 6 +}PidginConvFields; + +#define PIDGIN_CONV_ALL ((1 << 7) - 1) #define SEND_COLOR "#204a87" #define RECV_COLOR "#cc0000" @@ -143,32 +143,32 @@ static GtkWidget *invite_dialog = NULL; static GtkWidget *warn_close_dialog = NULL; -static GaimGtkWindow *hidden_convwin = NULL; +static PidginWindow *hidden_convwin = NULL; static GList *window_list = NULL; -static gboolean update_send_to_selection(GaimGtkWindow *win); -static void generate_send_to_items(GaimGtkWindow *win); +static gboolean update_send_to_selection(PidginWindow *win); +static void generate_send_to_items(PidginWindow *win); /* Prototypes. <-- because Paco-Paco hates this comment. */ -static void got_typing_keypress(GaimGtkConversation *gtkconv, gboolean first); -static void gray_stuff_out(GaimGtkConversation *gtkconv); +static void got_typing_keypress(PidginConversation *gtkconv, gboolean first); +static void gray_stuff_out(PidginConversation *gtkconv); static GList *generate_invite_user_names(GaimConnection *gc); static void add_chat_buddy_common(GaimConversation *conv, GaimConvChatBuddy *cb, const char *old_name); static gboolean tab_complete(GaimConversation *conv); -static void gaim_gtkconv_updated(GaimConversation *conv, GaimConvUpdateType type); -static void gtkconv_set_unseen(GaimGtkConversation *gtkconv, GaimUnseenState state); -static void update_typing_icon(GaimGtkConversation *gtkconv); +static void pidgin_conv_updated(GaimConversation *conv, GaimConvUpdateType type); +static void gtkconv_set_unseen(PidginConversation *gtkconv, GaimUnseenState state); +static void update_typing_icon(PidginConversation *gtkconv); static const char *item_factory_translate_func (const char *path, gpointer func_data); -gboolean gaim_gtkconv_has_focus(GaimConversation *conv); -static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data); -static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data); +gboolean pidgin_conv_has_focus(GaimConversation *conv); +static void pidgin_conv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data); +static void pidgin_conv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data); static GdkColor* generate_nick_colors(guint *numcolors, GdkColor background); static gboolean color_is_visible(GdkColor foreground, GdkColor background, int color_contrast, int brightness_contrast); -static void gaim_gtkconv_update_fields(GaimConversation *conv, GaimGtkConvFields fields); -static void focus_out_from_menubar(GtkWidget *wid, GaimGtkWindow *win); - -static GdkColor *get_nick_color(GaimGtkConversation *gtkconv, const char *name) { +static void pidgin_conv_update_fields(GaimConversation *conv, PidginConvFields fields); +static void focus_out_from_menubar(GtkWidget *wid, PidginWindow *win); + +static GdkColor *get_nick_color(PidginConversation *gtkconv, const char *name) { static GdkColor col; GtkStyle *style = gtk_widget_get_style(gtkconv->imhtml); float scale; @@ -192,7 +192,7 @@ **************************************************************************/ static gint -close_conv_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +close_conv_cb(GtkWidget *w, PidginConversation *gtkconv) { GList *list = g_list_copy(gtkconv->convs); @@ -211,7 +211,7 @@ } static gboolean -size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, GaimGtkConversation *gtkconv) +size_allocate_cb(GtkWidget *w, GtkAllocation *allocation, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; @@ -254,7 +254,7 @@ } static void -default_formatize(GaimGtkConversation *c) +default_formatize(PidginConversation *c) { GaimConversation *conv = c->active_conv; @@ -319,13 +319,13 @@ } static void -clear_formatting_cb(GtkIMHtml *imhtml, GaimGtkConversation *gtkconv) +clear_formatting_cb(GtkIMHtml *imhtml, PidginConversation *gtkconv) { default_formatize(gtkconv); } static const char * -gaim_gtk_get_cmd_prefix(void) +pidgin_get_cmd_prefix(void) { return "/"; } @@ -386,9 +386,9 @@ clear_command_cb(GaimConversation *conv, const char *cmd, char **args, char **error, void *data) { - GaimGtkConversation *gtkconv = NULL; - - gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv = NULL; + + gtkconv = PIDGIN_CONVERSATION(conv); gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml)); return GAIM_CMD_STATUS_OK; @@ -434,7 +434,7 @@ } static void -send_history_add(GaimGtkConversation *gtkconv, const char *message) +send_history_add(PidginConversation *gtkconv, const char *message) { GList *first; @@ -445,7 +445,7 @@ } static void -reset_default_size(GaimGtkConversation *gtkconv) +reset_default_size(PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) @@ -459,13 +459,13 @@ static gboolean check_for_and_do_command(GaimConversation *conv) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; char *cmd; const char *prefix; GtkTextIter start; - gtkconv = GAIM_GTK_CONVERSATION(conv); - prefix = gaim_gtk_get_cmd_prefix(); + gtkconv = PIDGIN_CONVERSATION(conv); + prefix = pidgin_get_cmd_prefix(); cmd = gtk_imhtml_get_text(GTK_IMHTML(gtkconv->entry), NULL, NULL); gtk_text_buffer_get_start_iter(GTK_IMHTML(gtkconv->entry)->text_buffer, &start); @@ -524,7 +524,7 @@ } static void -send_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +send_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; GaimAccount *account; @@ -599,11 +599,11 @@ reset_default_size(gtkconv); gtkconv->entry_growing = FALSE; } - gtkconv_set_unseen(gtkconv, GAIM_UNSEEN_NONE); -} - -static void -add_remove_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) + gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE); +} + +static void +add_remove_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimAccount *account; const char *name; @@ -617,7 +617,7 @@ b = gaim_find_buddy(account, name); if (b != NULL) - gaim_gtkdialogs_remove_buddy(b); + pidgindialogs_remove_buddy(b); else if (account != NULL && gaim_account_is_connected(account)) gaim_blist_request_add_buddy(account, (char *)name, NULL, NULL); } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { @@ -625,15 +625,15 @@ c = gaim_blist_find_chat(account, name); if (c != NULL) - gaim_gtkdialogs_remove_chat(c); + pidgindialogs_remove_chat(c); else if (account != NULL && gaim_account_is_connected(account)) gaim_blist_request_add_chat(account, NULL, NULL, name); } - gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); -} - -static void chat_do_info(GaimGtkConversation *gtkconv, const char *who) + gtk_widget_grab_focus(PIDGIN_CONVERSATION(conv)->entry); +} + +static void chat_do_info(PidginConversation *gtkconv, const char *who) { GaimConversation *conv = gtkconv->active_conv; GaimPluginProtocolInfo *prpl_info = NULL; @@ -658,7 +658,7 @@ static void -info_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +info_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; @@ -669,7 +669,7 @@ gtk_widget_grab_focus(gtkconv->entry); } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { /* Get info of the person currently selected in the GtkTreeView */ - GaimGtkChatPane *gtkchat; + PidginChatPane *gtkchat; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *sel; @@ -691,7 +691,7 @@ } static void -block_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +block_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; GaimAccount *account; @@ -699,13 +699,13 @@ account = gaim_conversation_get_account(conv); if (account != NULL && gaim_account_is_connected(account)) - gaim_gtk_request_add_block(account, gaim_conversation_get_name(conv)); - - gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); -} - -static void -unblock_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) + pidgin_request_add_block(account, gaim_conversation_get_name(conv)); + + gtk_widget_grab_focus(PIDGIN_CONVERSATION(conv)->entry); +} + +static void +unblock_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; GaimAccount *account; @@ -713,18 +713,18 @@ account = gaim_conversation_get_account(conv); if (account != NULL && gaim_account_is_connected(account)) - gaim_gtk_request_add_permit(account, gaim_conversation_get_name(conv)); - - gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); + pidgin_request_add_permit(account, gaim_conversation_get_name(conv)); + + gtk_widget_grab_focus(PIDGIN_CONVERSATION(conv)->entry); } static void do_invite(GtkWidget *w, int resp, InviteBuddyInfo *info) { const char *buddy, *message; - GaimGtkConversation *gtkconv; - - gtkconv = GAIM_GTK_CONVERSATION(info->conv); + PidginConversation *gtkconv; + + gtkconv = PIDGIN_CONVERSATION(info->conv); if (resp == GTK_RESPONSE_OK) { buddy = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(info->entry)->entry)); @@ -769,7 +769,7 @@ if (strcmp(convprotocol, gaim_account_get_protocol_id(buddy->account))) { - gaim_notify_error(GAIM_GTK_CONVERSATION(info->conv), NULL, + gaim_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, _("That buddy is not on the same protocol as this " "chat."), NULL); } @@ -784,18 +784,18 @@ char *username = NULL; GaimAccount *account; - if (gaim_gtk_parse_x_im_contact((const char *)sd->data, FALSE, &account, + if (pidgin_parse_x_im_contact((const char *)sd->data, FALSE, &account, &protocol, &username, NULL)) { if (account == NULL) { - gaim_notify_error(GAIM_GTK_CONVERSATION(info->conv), NULL, + gaim_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, _("You are not currently signed on with an account that " "can invite that buddy."), NULL); } else if (strcmp(convprotocol, gaim_account_get_protocol_id(account))) { - gaim_notify_error(GAIM_GTK_CONVERSATION(info->conv), NULL, + gaim_notify_error(PIDGIN_CONVERSATION(info->conv), NULL, _("That buddy is not on the same protocol as this " "chat."), NULL); } @@ -819,14 +819,14 @@ }; static void -invite_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +invite_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; InviteBuddyInfo *info = NULL; if (invite_dialog == NULL) { GaimConnection *gc; - GaimGtkWindow *gtkwin; + PidginWindow *gtkwin; GtkWidget *label; GtkWidget *vbox, *hbox; GtkWidget *table; @@ -839,14 +839,14 @@ info->conv = conv; gc = gaim_conversation_get_gc(conv); - gtkwin = gaim_gtkconv_get_window(gtkconv); + gtkwin = pidgin_conv_get_window(gtkconv); /* Create the new dialog. */ invite_dialog = gtk_dialog_new_with_buttons( _("Invite Buddy Into Chat Room"), GTK_WINDOW(gtkwin->window), 0, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GAIM_STOCK_INVITE, GTK_RESPONSE_OK, NULL); + PIDGIN_STOCK_INVITE, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(invite_dialog), GTK_RESPONSE_OK); @@ -959,7 +959,7 @@ static void menu_new_conv_cb(gpointer data, guint action, GtkWidget *widget) { - gaim_gtkdialogs_im(); + pidgindialogs_im(); } static void @@ -971,7 +971,7 @@ gchar *text; if ((fp = g_fopen(filename, "w+")) == NULL) { - gaim_notify_error(GAIM_GTK_CONVERSATION(conv), NULL, _("Unable to open file."), NULL); + gaim_notify_error(PIDGIN_CONVERSATION(conv), NULL, _("Unable to open file."), NULL); return; } @@ -980,7 +980,7 @@ fprintf(fp, _("<h1>Conversation with %s</h1>\n"), name); text = gtk_imhtml_get_markup( - GTK_IMHTML(GAIM_GTK_CONVERSATION(conv)->imhtml)); + GTK_IMHTML(PIDGIN_CONVERSATION(conv)->imhtml)); fprintf(fp, "%s", text); g_free(text); @@ -995,13 +995,13 @@ static void menu_save_as_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; - GaimConversation *conv = gaim_gtk_conv_window_get_active_conversation(win); + PidginWindow *win = data; + GaimConversation *conv = pidgin_conv_window_get_active_conversation(win); gchar *buf; buf = g_strdup_printf("%s.html", gaim_normalize(conv->account, conv->name)); - gaim_request_file(GAIM_GTK_CONVERSATION(conv), _("Save Conversation"), + gaim_request_file(PIDGIN_CONVERSATION(conv), _("Save Conversation"), gaim_escape_filename(buf), TRUE, G_CALLBACK(savelog_writefile_cb), NULL, conv); @@ -1011,17 +1011,17 @@ static void menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; GaimLogType type; - GaimGtkBuddyList *gtkblist; + PidginBuddyList *gtkblist; GdkCursor *cursor; const char *name; GaimAccount *account; GSList *buddies; GSList *cur; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) type = GAIM_LOG_IM; @@ -1030,7 +1030,7 @@ else return; - gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + gtkblist = pidgin_blist_get_default_gtk_blist(); cursor = gdk_cursor_new(GDK_WATCH); gdk_window_set_cursor(gtkblist->window->window, cursor); @@ -1051,7 +1051,7 @@ GaimBlistNode *node = cur->data; if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL))) { - gaim_gtk_log_show_contact((GaimContact *)node->parent); + pidgin_log_show_contact((GaimContact *)node->parent); g_slist_free(buddies); gdk_window_set_cursor(gtkblist->window->window, NULL); gdk_window_set_cursor(win->window->window, NULL); @@ -1060,7 +1060,7 @@ } g_slist_free(buddies); - gaim_gtk_log_show(type, name, account); + pidgin_log_show(type, name, account); gdk_window_set_cursor(gtkblist->window->window, NULL); gdk_window_set_cursor(win->window->window, NULL); @@ -1069,38 +1069,38 @@ static void menu_clear_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - GaimGtkConversation *gtkconv; - - conv = gaim_gtk_conv_window_get_active_conversation(win); - gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv; + + conv = pidgin_conv_window_get_active_conversation(win); + gtkconv = PIDGIN_CONVERSATION(conv); gtk_imhtml_clear(GTK_IMHTML(gtkconv->imhtml)); } struct _search { - GaimGtkWindow *gtkwin; + PidginWindow *gtkwin; GtkWidget *entry; }; static void do_search_cb(GtkWidget *widget, gint resp, struct _search *s) { GaimConversation *conv; - GaimGtkConversation *gtk_active_conv; + PidginConversation *gtk_active_conv; GList *iter; - conv = gaim_gtk_conv_window_get_active_conversation(s->gtkwin); - gtk_active_conv = GAIM_GTK_CONVERSATION(conv); + conv = pidgin_conv_window_get_active_conversation(s->gtkwin); + gtk_active_conv = PIDGIN_CONVERSATION(conv); switch (resp) { case GTK_RESPONSE_OK: /* clear highlighting except the active conversation window * highlight the keywords in the active conversation window */ - for (iter = gaim_gtk_conv_window_get_gtkconvs(s->gtkwin) ; iter ; iter = iter->next) + for (iter = pidgin_conv_window_get_gtkconvs(s->gtkwin) ; iter ; iter = iter->next) { - GaimGtkConversation *gtkconv = iter->data; + PidginConversation *gtkconv = iter->data; if (gtkconv != gtk_active_conv) { @@ -1117,9 +1117,9 @@ case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CLOSE: /* clear the keyword highlighting in all the conversation windows */ - for (iter = gaim_gtk_conv_window_get_gtkconvs(s->gtkwin); iter; iter=iter->next) + for (iter = pidgin_conv_window_get_gtkconvs(s->gtkwin); iter; iter=iter->next) { - GaimGtkConversation *gconv = iter->data; + PidginConversation *gconv = iter->data; gtk_imhtml_search_clear(GTK_IMHTML(gconv->imhtml)); } @@ -1133,7 +1133,7 @@ static void menu_find_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *gtkwin = data; + PidginWindow *gtkwin = data; GtkWidget *hbox; GtkWidget *img = gtk_image_new_from_stock(PIDGIN_STOCK_DIALOG_QUESTION, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); @@ -1181,7 +1181,7 @@ gtk_entry_set_activates_default(GTK_ENTRY(s->entry), TRUE); gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(s->entry)); g_signal_connect(G_OBJECT(s->entry), "changed", - G_CALLBACK(gaim_gtk_set_sensitive_if_input), + G_CALLBACK(pidgin_set_sensitive_if_input), gtkwin->dialogs.search); gtk_box_pack_start(GTK_BOX(hbox), s->entry, FALSE, FALSE, 0); @@ -1192,8 +1192,8 @@ static void menu_send_file_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; - GaimConversation *conv = gaim_gtk_conv_window_get_active_conversation(win); + PidginWindow *win = data; + GaimConversation *conv = pidgin_conv_window_get_active_conversation(win); if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) { serv_send_file(gaim_conversation_get_gc(conv), gaim_conversation_get_name(conv), NULL); @@ -1204,23 +1204,23 @@ static void menu_add_pounce_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - conv = gaim_gtk_conv_window_get_active_gtkconv(win)->active_conv; - - gaim_gtk_pounce_editor_show(gaim_conversation_get_account(conv), + conv = pidgin_conv_window_get_active_gtkconv(win)->active_conv; + + pidgin_pounce_editor_show(gaim_conversation_get_account(conv), gaim_conversation_get_name(conv), NULL); } static void menu_insert_link_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; - GaimGtkConversation *gtkconv; + PidginWindow *win = data; + PidginConversation *gtkconv; GtkIMHtmlToolbar *toolbar; - gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); + gtkconv = pidgin_conv_window_get_active_gtkconv(win); toolbar = GTK_IMHTMLTOOLBAR(gtkconv->toolbar); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->link), @@ -1230,12 +1230,12 @@ static void menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkIMHtmlToolbar *toolbar; - gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); + gtkconv = pidgin_conv_window_get_active_gtkconv(win); conv = gtkconv->active_conv; toolbar = GTK_IMHTMLTOOLBAR(gtkconv->toolbar); @@ -1246,12 +1246,12 @@ static void menu_alias_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; GaimAccount *account; const char *name; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); account = gaim_conversation_get_account(conv); name = gaim_conversation_get_name(conv); @@ -1260,87 +1260,87 @@ b = gaim_find_buddy(account, name); if (b != NULL) - gaim_gtkdialogs_alias_buddy(b); + pidgindialogs_alias_buddy(b); } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { GaimChat *c; c = gaim_blist_find_chat(account, name); if (c != NULL) - gaim_gtkdialogs_alias_chat(c); + pidgindialogs_alias_chat(c); } } static void menu_get_info_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - conv = gaim_gtk_conv_window_get_active_conversation(win); - - info_cb(NULL, GAIM_GTK_CONVERSATION(conv)); + conv = pidgin_conv_window_get_active_conversation(win); + + info_cb(NULL, PIDGIN_CONVERSATION(conv)); } static void menu_invite_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - conv = gaim_gtk_conv_window_get_active_conversation(win); - - invite_cb(NULL, GAIM_GTK_CONVERSATION(conv)); + conv = pidgin_conv_window_get_active_conversation(win); + + invite_cb(NULL, PIDGIN_CONVERSATION(conv)); } static void menu_block_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - conv = gaim_gtk_conv_window_get_active_conversation(win); - - block_cb(NULL, GAIM_GTK_CONVERSATION(conv)); + conv = pidgin_conv_window_get_active_conversation(win); + + block_cb(NULL, PIDGIN_CONVERSATION(conv)); } static void menu_unblock_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - conv = gaim_gtk_conv_window_get_active_conversation(win); - - unblock_cb(NULL, GAIM_GTK_CONVERSATION(conv)); + conv = pidgin_conv_window_get_active_conversation(win); + + unblock_cb(NULL, PIDGIN_CONVERSATION(conv)); } static void menu_add_remove_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - conv = gaim_gtk_conv_window_get_active_conversation(win); - - add_remove_cb(NULL, GAIM_GTK_CONVERSATION(conv)); + conv = pidgin_conv_window_get_active_conversation(win); + + add_remove_cb(NULL, PIDGIN_CONVERSATION(conv)); } static void menu_close_conv_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; - - close_conv_cb(NULL, GAIM_GTK_CONVERSATION(gaim_gtk_conv_window_get_active_conversation(win))); + PidginWindow *win = data; + + close_conv_cb(NULL, PIDGIN_CONVERSATION(pidgin_conv_window_get_active_conversation(win))); } static void menu_logging_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; gboolean logging; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); if (conv == NULL) return; @@ -1384,16 +1384,16 @@ static void menu_sounds_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - GaimGtkConversation *gtkconv; - - conv = gaim_gtk_conv_window_get_active_conversation(win); + PidginConversation *gtkconv; + + conv = pidgin_conv_window_get_active_conversation(win); if (!conv) return; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkconv->make_sound = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); @@ -1407,7 +1407,7 @@ } static void -chat_do_im(GaimGtkConversation *gtkconv, const char *who) +chat_do_im(PidginConversation *gtkconv, const char *who) { GaimConversation *conv = gtkconv->active_conv; GaimAccount *account; @@ -1432,16 +1432,16 @@ if(!real_who) return; - gaim_gtkdialogs_im_with_user(account, real_who); + pidgindialogs_im_with_user(account, real_who); g_free(real_who); } static void -ignore_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +ignore_cb(GtkWidget *w, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; - GaimGtkChatPane *gtkchat; + PidginChatPane *gtkchat; GaimConvChatBuddy *cbuddy; GaimConvChat *chat; GaimConvChatBuddyFlags flags; @@ -1481,7 +1481,7 @@ } static void -menu_chat_im_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +menu_chat_im_cb(GtkWidget *w, PidginConversation *gtkconv) { const char *who = g_object_get_data(G_OBJECT(w), "user_data"); @@ -1489,7 +1489,7 @@ } static void -menu_chat_send_file_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +menu_chat_send_file_cb(GtkWidget *w, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; const char *who = g_object_get_data(G_OBJECT(w), "user_data"); @@ -1499,7 +1499,7 @@ } static void -menu_chat_info_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +menu_chat_info_cb(GtkWidget *w, PidginConversation *gtkconv) { char *who; @@ -1509,7 +1509,7 @@ } static void -menu_chat_get_away_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +menu_chat_get_away_cb(GtkWidget *w, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; GaimPluginProtocolInfo *prpl_info = NULL; @@ -1535,7 +1535,7 @@ } static void -menu_chat_add_remove_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +menu_chat_add_remove_cb(GtkWidget *w, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; GaimAccount *account; @@ -1547,15 +1547,15 @@ b = gaim_find_buddy(account, name); if (b != NULL) - gaim_gtkdialogs_remove_buddy(b); + pidgindialogs_remove_buddy(b); else if (account != NULL && gaim_account_is_connected(account)) gaim_blist_request_add_buddy(account, name, NULL, NULL); - gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); + gtk_widget_grab_focus(PIDGIN_CONVERSATION(conv)->entry); } static GtkTextMark * -get_mark_for_user(GaimGtkConversation *gtkconv, const char *who) +get_mark_for_user(PidginConversation *gtkconv, const char *who) { GtkTextBuffer *buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->imhtml)); char *tmp = g_strconcat("user:", who, NULL); @@ -1566,7 +1566,7 @@ } static void -menu_last_said_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +menu_last_said_cb(GtkWidget *w, PidginConversation *gtkconv) { GtkTextMark *mark; const char *who; @@ -1606,8 +1606,8 @@ menu = gtk_menu_new(); if (!is_me) { - button = gaim_new_item_from_stock(menu, _("IM"), GAIM_STOCK_IM, - G_CALLBACK(menu_chat_im_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("IM"), PIDGIN_STOCK_IM, + G_CALLBACK(menu_chat_im_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); if (gc == NULL) gtk_widget_set_sensitive(button, FALSE); @@ -1617,9 +1617,9 @@ if (prpl_info && prpl_info->send_file) { - button = gaim_new_item_from_stock(menu, _("Send File"), - GAIM_STOCK_FILE_TRANSFER, G_CALLBACK(menu_chat_send_file_cb), - GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Send File"), + PIDGIN_STOCK_FILE_TRANSFER, G_CALLBACK(menu_chat_send_file_cb), + PIDGIN_CONVERSATION(conv), 0, 0, NULL); if (gc == NULL || prpl_info == NULL || !(!prpl_info->can_receive_file || prpl_info->can_receive_file(gc, who))) @@ -1632,11 +1632,11 @@ if (gaim_conv_chat_is_user_ignored(GAIM_CONV_CHAT(conv), who)) - button = gaim_new_item_from_stock(menu, _("Un-Ignore"), GAIM_STOCK_IGNORE, - G_CALLBACK(ignore_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Un-Ignore"), PIDGIN_STOCK_IGNORE, + G_CALLBACK(ignore_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); else - button = gaim_new_item_from_stock(menu, _("Ignore"), GAIM_STOCK_IGNORE, - G_CALLBACK(ignore_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Ignore"), PIDGIN_STOCK_IGNORE, + G_CALLBACK(ignore_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); if (gc == NULL) gtk_widget_set_sensitive(button, FALSE); @@ -1645,8 +1645,8 @@ } if (prpl_info && (prpl_info->get_info || prpl_info->get_cb_info)) { - button = gaim_new_item_from_stock(menu, _("Info"), GAIM_STOCK_INFO, - G_CALLBACK(menu_chat_info_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Info"), PIDGIN_STOCK_INFO, + G_CALLBACK(menu_chat_info_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); if (gc == NULL) gtk_widget_set_sensitive(button, FALSE); @@ -1655,8 +1655,8 @@ } if (prpl_info && prpl_info->get_cb_away) { - button = gaim_new_item_from_stock(menu, _("Get Away Message"), GAIM_STOCK_AWAY, - G_CALLBACK(menu_chat_get_away_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Get Away Message"), PIDGIN_STOCK_AWAY, + G_CALLBACK(menu_chat_get_away_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); if (gc == NULL) gtk_widget_set_sensitive(button, FALSE); @@ -1666,11 +1666,11 @@ if (!is_me && prpl_info && !(prpl_info->options & OPT_PROTO_UNIQUE_CHATNAME)) { if ((buddy = gaim_find_buddy(conv->account, who)) != NULL) - button = gaim_new_item_from_stock(menu, _("Remove"), GTK_STOCK_REMOVE, - G_CALLBACK(menu_chat_add_remove_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Remove"), GTK_STOCK_REMOVE, + G_CALLBACK(menu_chat_add_remove_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); else - button = gaim_new_item_from_stock(menu, _("Add"), GTK_STOCK_ADD, - G_CALLBACK(menu_chat_add_remove_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Add"), GTK_STOCK_ADD, + G_CALLBACK(menu_chat_add_remove_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); if (gc == NULL) gtk_widget_set_sensitive(button, FALSE); @@ -1678,18 +1678,18 @@ g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free); } - button = gaim_new_item_from_stock(menu, _("Last said"), GTK_STOCK_INDEX, - G_CALLBACK(menu_last_said_cb), GAIM_GTK_CONVERSATION(conv), 0, 0, NULL); + button = pidgin_new_item_from_stock(menu, _("Last said"), GTK_STOCK_INDEX, + G_CALLBACK(menu_last_said_cb), PIDGIN_CONVERSATION(conv), 0, 0, NULL); g_object_set_data_full(G_OBJECT(button), "user_data", g_strdup(who), g_free); - if (!get_mark_for_user(GAIM_GTK_CONVERSATION(conv), who)) + if (!get_mark_for_user(PIDGIN_CONVERSATION(conv), who)) gtk_widget_set_sensitive(button, FALSE); if (buddy != NULL) { if (gaim_account_is_connected(conv->account)) - gaim_gtk_append_blist_node_proto_menu(menu, conv->account->gc, + pidgin_append_blist_node_proto_menu(menu, conv->account->gc, (GaimBlistNode *)buddy); - gaim_gtk_append_blist_node_extended_menu(menu, (GaimBlistNode *)buddy); + pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode *)buddy); gtk_widget_show_all(menu); } @@ -1698,10 +1698,10 @@ static gint -gtkconv_chat_popup_menu_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +gtkconv_chat_popup_menu_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; - GaimGtkChatPane *gtkchat; + PidginChatPane *gtkchat; GaimConnection *gc; GaimAccount *account; GtkTreeSelection *sel; @@ -1710,7 +1710,7 @@ GtkWidget *menu; gchar *who; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; account = gaim_conversation_get_account(conv); gc = account->gc; @@ -1724,7 +1724,7 @@ gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, CHAT_USERS_NAME_COLUMN, &who, -1); menu = create_chat_menu (conv, who, gc); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, - gaim_gtk_treeview_popup_menu_position_func, widget, + pidgin_treeview_popup_menu_position_func, widget, 0, GDK_CURRENT_TIME); g_free(who); @@ -1734,10 +1734,10 @@ static gint right_click_chat_cb(GtkWidget *widget, GdkEventButton *event, - GaimGtkConversation *gtkconv) + PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; - GaimGtkChatPane *gtkchat; + PidginChatPane *gtkchat; GaimConnection *gc; GaimAccount *account; GtkTreePath *path; @@ -1786,16 +1786,16 @@ } static void -move_to_next_unread_tab(GaimGtkConversation *gtkconv, gboolean forward) -{ - GaimGtkConversation *next_gtkconv = NULL; - GaimGtkWindow *win; +move_to_next_unread_tab(PidginConversation *gtkconv, gboolean forward) +{ + PidginConversation *next_gtkconv = NULL; + PidginWindow *win; int initial, i, total, diff; win = gtkconv->win; initial = gtk_notebook_page_num(GTK_NOTEBOOK(win->notebook), gtkconv->tab_cont); - total = gaim_gtk_conv_window_get_gtkconv_count(win); + total = pidgin_conv_window_get_gtkconv_count(win); /* By adding total here, the moduli calculated later will always have two * positive arguments. x % y where x < 0 is not guaranteed to return a * positive number. @@ -1803,29 +1803,29 @@ diff = (forward ? 1 : -1) + total; for (i = (initial + diff) % total; i != initial; i = (i + diff) % total) { - next_gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, i); + next_gtkconv = pidgin_conv_window_get_gtkconv_at_index(win, i); if (next_gtkconv->unseen_state > 0) break; } if (i == initial) { /* no new messages */ i = (i + diff) % total; - next_gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, i); + next_gtkconv = pidgin_conv_window_get_gtkconv_at_index(win, i); } if (next_gtkconv != NULL && next_gtkconv != gtkconv) - gaim_gtk_conv_window_switch_gtkconv(win, next_gtkconv); + pidgin_conv_window_switch_gtkconv(win, next_gtkconv); } static gboolean entry_key_press_cb(GtkWidget *entry, GdkEventKey *event, gpointer data) { - GaimGtkWindow *win; + PidginWindow *win; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; int curconv; - gtkconv = (GaimGtkConversation *)data; + gtkconv = (PidginConversation *)data; conv = gtkconv->active_conv; win = gtkconv->win; curconv = gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook)); @@ -1923,7 +1923,7 @@ case GDK_Page_Down: case ']': - if (!gaim_gtk_conv_window_get_gtkconv_at_index(win, curconv + 1)) + if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv + 1)) gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0); else gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv + 1); @@ -1932,7 +1932,7 @@ case GDK_Page_Up: case '[': - if (!gaim_gtk_conv_window_get_gtkconv_at_index(win, curconv - 1)) + if (!pidgin_conv_window_get_gtkconv_at_index(win, curconv - 1)) gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), -1); else gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), curconv - 1); @@ -1975,7 +1975,7 @@ if (event->keyval > '0' && event->keyval <= '9') { guint switchto = event->keyval - '1'; - if (switchto < gaim_gtk_conv_window_get_gtkconv_count(win)) + if (switchto < pidgin_conv_window_get_gtkconv_count(win)) gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), switchto); return TRUE; @@ -2036,7 +2036,7 @@ static gboolean refocus_entry_cb(GtkWidget *widget, GdkEventKey *event, gpointer data) { - GaimGtkConversation *gtkconv = data; + PidginConversation *gtkconv = data; /* If we have a valid key for the conversation display, then exit */ if ((event->state & GDK_CONTROL_MASK) || @@ -2063,16 +2063,16 @@ } void -gaim_gtkconv_switch_active_conversation(GaimConversation *conv) -{ - GaimGtkConversation *gtkconv; +pidgin_conv_switch_active_conversation(GaimConversation *conv) +{ + PidginConversation *gtkconv; GaimConversation *old_conv; GtkIMHtml *entry; const char *protocol_name; g_return_if_fail(conv != NULL); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); old_conv = gtkconv->active_conv; if (old_conv == conv) @@ -2158,7 +2158,7 @@ (conv->features & GAIM_CONNECTION_FORMATTING_WBFO)); } - gaim_signal_emit(gaim_gtk_conversations_get_handle(), "conversation-switched", conv); + gaim_signal_emit(pidgin_conversations_get_handle(), "conversation-switched", conv); gray_stuff_out(gtkconv); update_typing_icon(gtkconv); @@ -2178,14 +2178,14 @@ return; conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, name); - gaim_gtkconv_switch_active_conversation(conv); + pidgin_conv_switch_active_conversation(conv); } static void insert_text_cb(GtkTextBuffer *textbuffer, GtkTextIter *position, gchar *new_text, gint new_text_length, gpointer user_data) { - GaimGtkConversation *gtkconv = (GaimGtkConversation *)user_data; + PidginConversation *gtkconv = (PidginConversation *)user_data; GaimConversation *conv; g_return_if_fail(gtkconv != NULL); @@ -2203,7 +2203,7 @@ delete_text_cb(GtkTextBuffer *textbuffer, GtkTextIter *start_pos, GtkTextIter *end_pos, gpointer user_data) { - GaimGtkConversation *gtkconv = (GaimGtkConversation *)user_data; + PidginConversation *gtkconv = (PidginConversation *)user_data; GaimConversation *conv; GaimConvIm *im; @@ -2235,7 +2235,7 @@ * A bunch of buddy icon functions **************************************************************************/ GdkPixbuf * -gaim_gtkconv_get_tab_icon(GaimConversation *conv, gboolean small_icon) +pidgin_conv_get_tab_icon(GaimConversation *conv, gboolean small_icon) { GaimAccount *account = NULL; const char *name = NULL; @@ -2260,14 +2260,14 @@ if (ops && ops->update) ops->update(NULL, (GaimBlistNode*)b); - status = gaim_gtk_blist_get_status_icon((GaimBlistNode*)b, - (small_icon ? GAIM_STATUS_ICON_SMALL : GAIM_STATUS_ICON_LARGE)); + status = pidgin_blist_get_status_icon((GaimBlistNode*)b, + (small_icon ? PIDGIN_STATUS_ICON_SMALL : PIDGIN_STATUS_ICON_LARGE)); } } /* If they don't have a buddy icon, then use the PRPL icon */ if (status == NULL) - status = gaim_gtk_create_prpl_icon(account, small_icon ? PIDGIN_PRPL_ICON_SMALL : PIDGIN_PRPL_ICON_LARGE); + status = pidgin_create_prpl_icon(account, small_icon ? PIDGIN_PRPL_ICON_SMALL : PIDGIN_PRPL_ICON_LARGE); return status; } @@ -2275,18 +2275,18 @@ static void update_tab_icon(GaimConversation *conv) { - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; GdkPixbuf *status = NULL; g_return_if_fail(conv != NULL); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); win = gtkconv->win; if (conv != gtkconv->active_conv) return; - status = gaim_gtkconv_get_tab_icon(conv, TRUE); + status = pidgin_conv_get_tab_icon(conv, TRUE); g_return_if_fail(status != NULL); @@ -2296,11 +2296,11 @@ if (status != NULL) g_object_unref(status); - if (gaim_gtk_conv_window_is_active_conversation(conv) && + if (pidgin_conv_window_is_active_conversation(conv) && (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM || gtkconv->u.im->anim == NULL)) { - status = gaim_gtkconv_get_tab_icon(conv, FALSE); + status = pidgin_conv_get_tab_icon(conv, FALSE); gtk_window_set_icon(GTK_WINDOW(win->window), status); @@ -2317,7 +2317,7 @@ */ static gboolean reset_auto_resize_cb(gpointer data) { - GaimGtkConversation *gtkconv = (GaimGtkConversation *)data; + PidginConversation *gtkconv = (PidginConversation *)data; gtkconv->auto_resize = FALSE; return FALSE; } @@ -2325,7 +2325,7 @@ static gboolean redraw_icon(gpointer data) { - GaimGtkConversation *gtkconv = (GaimGtkConversation *)data; + PidginConversation *gtkconv = (PidginConversation *)data; GaimConversation *conv = gtkconv->active_conv; GaimAccount *account; GaimPluginProtocolInfo *prpl_info = NULL; @@ -2335,7 +2335,7 @@ gint delay; int scale_width, scale_height; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); account = gaim_conversation_get_account(conv); if(account && account->gc) prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(account->gc->prpl); @@ -2346,7 +2346,7 @@ gdk_pixbuf_animation_iter_advance(gtkconv->u.im->iter, NULL); buf = gdk_pixbuf_animation_iter_get_pixbuf(gtkconv->u.im->iter); - gaim_gtk_buddy_icon_get_scale_size(buf, &prpl_info->icon_spec, + pidgin_buddy_icon_get_scale_size(buf, &prpl_info->icon_spec, GAIM_ICON_SCALE_DISPLAY, &scale_width, &scale_height); /* this code is ugly, and scares me */ @@ -2372,7 +2372,7 @@ } static void -start_anim(GtkObject *obj, GaimGtkConversation *gtkconv) +start_anim(GtkObject *obj, PidginConversation *gtkconv) { int delay; @@ -2394,10 +2394,10 @@ } static void -remove_icon(GtkWidget *widget, GaimGtkConversation *gtkconv) +remove_icon(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; - GaimGtkWindow *gtkwin; + PidginWindow *gtkwin; g_return_if_fail(conv != NULL); @@ -2427,7 +2427,7 @@ static void saveicon_writefile_cb(void *user_data, const char *filename) { - GaimGtkConversation *gtkconv = (GaimGtkConversation *)user_data; + PidginConversation *gtkconv = (PidginConversation *)user_data; GaimConversation *conv = gtkconv->active_conv; FILE *fp; GaimBuddyIcon *icon; @@ -2452,7 +2452,7 @@ } static const char * -custom_icon_pref_name(GaimGtkConversation *gtkconv) +custom_icon_pref_name(PidginConversation *gtkconv) { GaimConversation *conv; GaimAccount *account; @@ -2472,34 +2472,34 @@ custom_icon_sel_cb(const char *filename, gpointer data) { if (filename) { - GaimGtkConversation *gtkconv = data; + PidginConversation *gtkconv = data; GaimConversation *conv = gtkconv->active_conv; GaimAccount *account = gaim_conversation_get_account(conv); - gaim_gtk_set_custom_buddy_icon(account, gaim_conversation_get_name(conv), filename); - } -} - -static void -set_custom_icon_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) -{ - GtkWidget *win = gaim_gtk_buddy_icon_chooser_new(GTK_WINDOW(gtkconv->win->window), + pidgin_set_custom_buddy_icon(account, gaim_conversation_get_name(conv), filename); + } +} + +static void +set_custom_icon_cb(GtkWidget *widget, PidginConversation *gtkconv) +{ + GtkWidget *win = pidgin_buddy_icon_chooser_new(GTK_WINDOW(gtkconv->win->window), custom_icon_sel_cb, gtkconv); gtk_widget_show_all(win); } static void -remove_custom_icon_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +remove_custom_icon_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv; GaimAccount *account; conv = gtkconv->active_conv; account = gaim_conversation_get_account(conv); - gaim_gtk_set_custom_buddy_icon(account, gaim_conversation_get_name(conv), NULL); -} - -static void -icon_menu_save_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) + pidgin_set_custom_buddy_icon(account, gaim_conversation_get_name(conv), NULL); +} + +static void +icon_menu_save_cb(GtkWidget *widget, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; const gchar *ext; @@ -2520,7 +2520,7 @@ } static void -stop_anim(GtkObject *obj, GaimGtkConversation *gtkconv) +stop_anim(GtkObject *obj, PidginConversation *gtkconv) { if (gtkconv->u.im->icon_timer != 0) g_source_remove(gtkconv->u.im->icon_timer); @@ -2530,7 +2530,7 @@ static void -toggle_icon_animate_cb(GtkWidget *w, GaimGtkConversation *gtkconv) +toggle_icon_animate_cb(GtkWidget *w, PidginConversation *gtkconv) { gtkconv->u.im->animate = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w)); @@ -2542,7 +2542,7 @@ } static gboolean -icon_menu(GtkObject *obj, GdkEventButton *e, GaimGtkConversation *gtkconv) +icon_menu(GtkObject *obj, GdkEventButton *e, PidginConversation *gtkconv) { static GtkWidget *menu = NULL; const char *pref; @@ -2562,26 +2562,26 @@ if (gtkconv->u.im->anim && !(gdk_pixbuf_animation_is_static_image(gtkconv->u.im->anim))) { - gaim_new_check_item(menu, _("Animate"), + pidgin_new_check_item(menu, _("Animate"), G_CALLBACK(toggle_icon_animate_cb), gtkconv, gtkconv->u.im->icon_timer); } - gaim_new_item_from_stock(menu, _("Hide Icon"), NULL, G_CALLBACK(remove_icon), + pidgin_new_item_from_stock(menu, _("Hide Icon"), NULL, G_CALLBACK(remove_icon), gtkconv, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Save Icon As..."), GTK_STOCK_SAVE_AS, + pidgin_new_item_from_stock(menu, _("Save Icon As..."), GTK_STOCK_SAVE_AS, G_CALLBACK(icon_menu_save_cb), gtkconv, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Set Custom Icon..."), NULL, + pidgin_new_item_from_stock(menu, _("Set Custom Icon..."), NULL, G_CALLBACK(set_custom_icon_cb), gtkconv, 0, 0, NULL); /* Is there a custom icon for this person? */ pref = custom_icon_pref_name(gtkconv); if (pref && *pref) { - gaim_new_item_from_stock(menu, _("Remove Custom Icon"), NULL, + pidgin_new_item_from_stock(menu, _("Remove Custom Icon"), NULL, G_CALLBACK(remove_custom_icon_cb), gtkconv, 0, 0, NULL); } @@ -2594,24 +2594,24 @@ static void menu_buddyicon_cb(gpointer data, guint action, GtkWidget *widget) { - GaimGtkWindow *win = data; + PidginWindow *win = data; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; gboolean active; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); if (!conv) return; g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); gtkconv->u.im->show_icon = active; if (active) - gaim_gtkconv_update_buddy_icon(conv); + pidgin_conv_update_buddy_icon(conv); else remove_icon(NULL, gtkconv); } @@ -2620,22 +2620,22 @@ * End of the bunch of buddy icon functions **************************************************************************/ void -gaim_gtkconv_present_conversation(GaimConversation *conv) -{ - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); +pidgin_conv_present_conversation(GaimConversation *conv) +{ + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); if(gtkconv->win==hidden_convwin) { - gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); - gaim_gtkconv_placement_place(gtkconv); - } - - gaim_gtkconv_switch_active_conversation(conv); - gaim_gtk_conv_window_switch_gtkconv(gtkconv->win, gtkconv); + pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); + pidgin_conv_placement_place(gtkconv); + } + + pidgin_conv_switch_active_conversation(conv); + pidgin_conv_window_switch_gtkconv(gtkconv->win, gtkconv); gtk_window_present(GTK_WINDOW(gtkconv->win->window)); } GList * -gaim_gtk_conversations_find_unseen_list(GaimConversationType type, +pidgin_conversations_find_unseen_list(GaimConversationType type, GaimUnseenState min_state, gboolean hidden_only, guint max_count) @@ -2654,7 +2654,7 @@ for (; l != NULL && (max_count == 0 || c < max_count); l = l->next) { GaimConversation *conv = (GaimConversation*)l->data; - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); if(gtkconv->active_conv != conv) continue; @@ -2675,11 +2675,11 @@ unseen_conv_menu_cb(GtkMenuItem *item, GaimConversation *conv) { g_return_if_fail(conv != NULL); - gaim_gtkconv_present_conversation(conv); + pidgin_conv_present_conversation(conv); } guint -gaim_gtk_conversations_fill_menu(GtkWidget *menu, GList *convs) +pidgin_conversations_fill_menu(GtkWidget *menu, GList *convs) { GList *l; guint ret=0; @@ -2689,10 +2689,10 @@ for (l = convs; l != NULL ; l = l->next) { GaimConversation *conv = (GaimConversation*)l->data; - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); GtkWidget *icon = gtk_image_new(); - GdkPixbuf *pbuf = gaim_gtkconv_get_tab_icon(conv, TRUE); + GdkPixbuf *pbuf = pidgin_conv_get_tab_icon(conv, TRUE); GtkWidget *item; gchar *text = g_strdup_printf("%s (%d)", gtk_label_get_text(GTK_LABEL(gtkconv->tab_label)), @@ -2712,8 +2712,8 @@ return ret; } -GaimGtkWindow * -gaim_gtkconv_get_window(GaimGtkConversation *gtkconv) +PidginWindow * +pidgin_conv_get_window(PidginConversation *gtkconv) { g_return_val_if_fail(gtkconv != NULL, NULL); return gtkconv->win; @@ -2725,36 +2725,36 @@ { N_("/_Conversation"), NULL, NULL, 0, "<Branch>", NULL }, { N_("/Conversation/New Instant _Message..."), "<CTL>M", menu_new_conv_cb, - 0, "<StockItem>", GAIM_STOCK_IM }, + 0, "<StockItem>", PIDGIN_STOCK_IM }, { "/Conversation/sep0", NULL, NULL, 0, "<Separator>", NULL }, { N_("/Conversation/_Find..."), NULL, menu_find_cb, 0, "<StockItem>", GTK_STOCK_FIND }, - { N_("/Conversation/View _Log"), NULL, menu_view_log_cb, 0, "<StockItem>", GAIM_STOCK_LOG }, + { N_("/Conversation/View _Log"), NULL, menu_view_log_cb, 0, "<Item>", NULL }, { N_("/Conversation/_Save As..."), NULL, menu_save_as_cb, 0, "<StockItem>", GTK_STOCK_SAVE_AS }, { N_("/Conversation/Clea_r Scrollback"), "<CTL>L", menu_clear_cb, 0, "<StockItem>", GTK_STOCK_CLEAR }, { "/Conversation/sep1", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Conversation/Se_nd File..."), NULL, menu_send_file_cb, 0, "<StockItem>", GAIM_STOCK_FILE_TRANSFER }, + { N_("/Conversation/Se_nd File..."), NULL, menu_send_file_cb, 0, "<StockItem>", PIDGIN_STOCK_FILE_TRANSFER }, { N_("/Conversation/Add Buddy _Pounce..."), NULL, menu_add_pounce_cb, - 0, "<StockItem>", GAIM_STOCK_POUNCE }, + 0, "<Item>", NULL }, { N_("/Conversation/_Get Info"), "<CTL>O", menu_get_info_cb, 0, - "<StockItem>", GAIM_STOCK_INFO }, + "<StockItem>", PIDGIN_STOCK_INFO }, { N_("/Conversation/In_vite..."), NULL, menu_invite_cb, 0, - "<StockItem>", GAIM_STOCK_INVITE }, + "<Item>", NULL }, { N_("/Conversation/M_ore"), NULL, NULL, 0, "<Branch>", NULL }, { "/Conversation/sep2", NULL, NULL, 0, "<Separator>", NULL }, { N_("/Conversation/Al_ias..."), NULL, menu_alias_cb, 0, - "<StockItem>", GAIM_STOCK_EDIT }, + "<Item>", NULL }, { N_("/Conversation/_Block..."), NULL, menu_block_cb, 0, - "<StockItem>", GAIM_STOCK_BLOCK }, + "<StockItem>", PIDGIN_STOCK_BLOCK }, { N_("/Conversation/_Unblock..."), NULL, menu_unblock_cb, 0, - "<StockItem>", GAIM_STOCK_UNBLOCK }, + "<StockItem>", PIDGIN_STOCK_UNBLOCK }, { N_("/Conversation/_Add..."), NULL, menu_add_remove_cb, 0, "<StockItem>", GTK_STOCK_ADD }, { N_("/Conversation/_Remove..."), NULL, menu_add_remove_cb, 0, @@ -2762,13 +2762,6 @@ { "/Conversation/sep3", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Conversation/Insert Lin_k..."), NULL, menu_insert_link_cb, 0, - "<StockItem>", GAIM_STOCK_LINK }, - { N_("/Conversation/Insert Imag_e..."), NULL, menu_insert_image_cb, 0, - "<StockItem>", GAIM_STOCK_IMAGE }, - - { "/Conversation/sep4", NULL, NULL, 0, "<Separator>", NULL }, - { N_("/Conversation/_Close"), NULL, menu_close_conv_cb, 0, "<StockItem>", GTK_STOCK_CLOSE }, @@ -2795,7 +2788,7 @@ sound_method_pref_changed_cb(const char *name, GaimPrefType type, gconstpointer value, gpointer data) { - GaimGtkWindow *win = data; + PidginWindow *win = data; const char *method = value; if (!strcmp(method, "none")) @@ -2806,7 +2799,7 @@ } else { - GaimGtkConversation *gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); + PidginConversation *gtkconv = pidgin_conv_window_get_active_gtkconv(win); if (gtkconv != NULL) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.sounds), @@ -2820,7 +2813,7 @@ show_buddy_icons_pref_changed_cb(const char *name, GaimPrefType type, gconstpointer value, gpointer data) { - GaimGtkWindow *win = data; + PidginWindow *win = data; gboolean show_icons = GPOINTER_TO_INT(value); if (!show_icons) @@ -2831,7 +2824,7 @@ } else { - GaimGtkConversation *gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); + PidginConversation *gtkconv = pidgin_conv_window_get_active_gtkconv(win); if (gtkconv != NULL) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(win->menu.show_icon), @@ -2842,15 +2835,15 @@ } static void -regenerate_options_items(GaimGtkWindow *win) +regenerate_options_items(PidginWindow *win) { GtkWidget *menu; GList *list; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GaimConversation *conv; GaimBuddy *buddy; - gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); + gtkconv = pidgin_conv_window_get_active_gtkconv(win); conv = gtkconv->active_conv; buddy = gaim_find_buddy(conv->account, conv->name); @@ -2868,9 +2861,9 @@ if (buddy) { if (gaim_account_is_connected(conv->account)) - gaim_gtk_append_blist_node_proto_menu(menu, conv->account->gc, + pidgin_append_blist_node_proto_menu(menu, conv->account->gc, (GaimBlistNode *)buddy); - gaim_gtk_append_blist_node_extended_menu(menu, (GaimBlistNode *)buddy); + pidgin_append_blist_node_extended_menu(menu, (GaimBlistNode *)buddy); } if ((list = gtk_container_get_children(GTK_CONTAINER(menu))) == NULL) @@ -2885,7 +2878,7 @@ static void menubar_activated(GtkWidget *item, gpointer data) { - GaimGtkWindow *win = data; + PidginWindow *win = data; regenerate_options_items(win); /* The following are to make sure the 'More' submenu is not regenerated every time @@ -2895,7 +2888,7 @@ } static void -focus_out_from_menubar(GtkWidget *wid, GaimGtkWindow *win) +focus_out_from_menubar(GtkWidget *wid, PidginWindow *win) { /* The menubar has been deactivated. Make sure the 'More' submenu is regenerated next time * the 'Conversation' menu pops up. */ @@ -2906,7 +2899,7 @@ } static GtkWidget * -setup_menubar(GaimGtkWindow *win) +setup_menubar(PidginWindow *win) { GtkAccelGroup *accel_group; const char *method; @@ -2926,7 +2919,7 @@ gtk_item_factory_create_items(win->menu.item_factory, menu_item_count, menu_items, win); g_signal_connect(G_OBJECT(accel_group), "accel-changed", - G_CALLBACK(gaim_gtk_save_accels_cb), NULL); + G_CALLBACK(pidgin_save_accels_cb), NULL); /* Make sure the 'Conversation -> More' menuitems are regenerated whenever * the 'Conversation' menu pops up because the entries can change after the @@ -3029,7 +3022,7 @@ gaim_prefs_connect_callback(win, "/gaim/gtk/conversations/im/show_buddy_icons", show_buddy_icons_pref_changed_cb, win); - win->menu.tray = gaim_gtk_menu_tray_new(); + win->menu.tray = pidgin_menu_tray_new(); gtk_menu_shell_append(GTK_MENU_SHELL(win->menu.menubar), win->menu.tray); gtk_widget_show(win->menu.tray); @@ -3045,7 +3038,7 @@ **************************************************************************/ static void -got_typing_keypress(GaimGtkConversation *gtkconv, gboolean first) +got_typing_keypress(PidginConversation *gtkconv, gboolean first) { GaimConversation *conv = gtkconv->active_conv; GaimConvIm *im; @@ -3073,9 +3066,9 @@ } static void -update_typing_icon(GaimGtkConversation *gtkconv) -{ - GaimGtkWindow *gtkwin; +update_typing_icon(PidginConversation *gtkconv) +{ + PidginWindow *gtkwin; GaimConvIm *im = NULL; GaimConversation *conv = gtkconv->active_conv; char *stock_id; @@ -3094,24 +3087,24 @@ return; if (gaim_conv_im_get_typing_state(im) == GAIM_TYPING) { - stock_id = GAIM_STOCK_TYPING; + stock_id = PIDGIN_STOCK_TYPING; tooltip = _("User is typing..."); } else { - stock_id = GAIM_STOCK_TYPED; + stock_id = PIDGIN_STOCK_TYPED; tooltip = _("User has typed something and stopped"); } if (gtkwin->menu.typing_icon == NULL) { gtkwin->menu.typing_icon = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU); - gaim_gtk_menu_tray_append(GAIM_GTK_MENU_TRAY(gtkwin->menu.tray), + pidgin_menu_tray_append(PIDGIN_MENU_TRAY(gtkwin->menu.tray), gtkwin->menu.typing_icon, tooltip); } else { gtk_image_set_from_stock(GTK_IMAGE(gtkwin->menu.typing_icon), stock_id, GTK_ICON_SIZE_MENU); - gaim_gtk_menu_tray_set_tooltip(GAIM_GTK_MENU_TRAY(gtkwin->menu.tray), + pidgin_menu_tray_set_tooltip(PIDGIN_MENU_TRAY(gtkwin->menu.tray), gtkwin->menu.typing_icon, tooltip); } @@ -3120,7 +3113,7 @@ } static gboolean -update_send_to_selection(GaimGtkWindow *win) +update_send_to_selection(PidginWindow *win) { GaimAccount *account; GaimConversation *conv; @@ -3128,7 +3121,7 @@ GList *child; GaimBuddy *b; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); if (conv == NULL) return FALSE; @@ -3195,10 +3188,7 @@ gchar *text; /* Create a pixmap for the protocol icon. */ - if (buddy != NULL) - pixbuf = gaim_gtk_blist_get_status_icon((GaimBlistNode*)buddy, GAIM_STATUS_ICON_SMALL); - else - pixbuf = gaim_gtk_create_prpl_icon(account, 0.5); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); /* Now convert it to GtkImage */ if (pixbuf == NULL) @@ -3263,17 +3253,17 @@ } static void -generate_send_to_items(GaimGtkWindow *win) +generate_send_to_items(PidginWindow *win) { GtkWidget *menu; GSList *group = NULL; GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GSList *l, *buds; g_return_if_fail(win != NULL); - gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); + gtkconv = pidgin_conv_window_get_active_gtkconv(win); g_return_if_fail(gtkconv != NULL); @@ -3434,8 +3424,8 @@ static void add_chat_buddy_common(GaimConversation *conv, GaimConvChatBuddy *cb, const char *old_name) { - GaimGtkConversation *gtkconv; - GaimGtkChatPane *gtkchat; + PidginConversation *gtkconv; + PidginChatPane *gtkchat; GaimConvChat *chat; GaimConnection *gc; GaimPluginProtocolInfo *prpl_info; @@ -3452,7 +3442,7 @@ flags = GPOINTER_TO_INT(cb->flags); chat = GAIM_CONV_CHAT(conv); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; gc = gaim_conversation_get_gc(conv); @@ -3580,7 +3570,7 @@ static gboolean tab_complete(GaimConversation *conv) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkTextIter cursor, word_start, start_buffer; int start; int most_matched = -1; @@ -3591,7 +3581,7 @@ GList *matches = NULL; gboolean command = FALSE; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtk_text_buffer_get_start_iter(gtkconv->entry_buffer, &start_buffer); gtk_text_buffer_get_iter_at_mark(gtkconv->entry_buffer, &cursor, @@ -3620,7 +3610,7 @@ start--; } - prefix = gaim_gtk_get_cmd_prefix(); + prefix = pidgin_get_cmd_prefix(); if (start == -1 && (strlen(text) >= strlen(prefix)) && !strncmp(text, prefix, strlen(prefix))) { command = TRUE; gtk_text_iter_forward_chars(&word_start, strlen(prefix)); @@ -3651,7 +3641,7 @@ } else if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { GaimConvChat *chat = GAIM_CONV_CHAT(conv); GList *l = gaim_conv_chat_get_users(chat); - GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(GAIM_GTK_CONVERSATION(conv)->u.chat->list)); + GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(PIDGIN_CONVERSATION(conv)->u.chat->list)); GtkTreeIter iter; int f; @@ -3747,12 +3737,12 @@ return TRUE; } -static void topic_callback(GtkWidget *w, GaimGtkConversation *gtkconv) +static void topic_callback(GtkWidget *w, PidginConversation *gtkconv) { GaimPluginProtocolInfo *prpl_info = NULL; GaimConnection *gc; GaimConversation *conv = gtkconv->active_conv; - GaimGtkChatPane *gtkchat; + PidginChatPane *gtkchat; char *new_topic; const char *current_topic; @@ -3764,7 +3754,7 @@ if(prpl_info->set_chat_topic == NULL) return; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; new_topic = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtkchat->topic_text))); current_topic = gaim_conv_chat_get_topic(GAIM_CONV_CHAT(conv)); @@ -3822,7 +3812,7 @@ static void update_chat_alias(GaimBuddy *buddy, GaimConversation *conv, GaimConnection *gc, GaimPluginProtocolInfo *prpl_info) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); GaimConvChat *chat = GAIM_CONV_CHAT(conv); GtkTreeModel *model; char *normalized_name; @@ -3929,7 +3919,7 @@ return; /* This is safe because this callback is only used in chats, not IMs. */ - model = gtk_tree_view_get_model(GTK_TREE_VIEW(GAIM_GTK_CONVERSATION(conv)->u.chat->list)); + model = gtk_tree_view_get_model(GTK_TREE_VIEW(PIDGIN_CONVERSATION(conv)->u.chat->list)); if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model), &iter)) return; @@ -3974,7 +3964,7 @@ buddy_cb_common(buddy, conv, FALSE); } -static void send_menu_cb(GtkWidget *widget, GaimGtkConversation *gtkconv) +static void send_menu_cb(GtkWidget *widget, PidginConversation *gtkconv) { g_signal_emit_by_name(gtkconv->entry, "message_send"); } @@ -3983,12 +3973,12 @@ entry_popup_menu_cb(GtkIMHtml *imhtml, GtkMenu *menu, gpointer data) { GtkWidget *menuitem; - GaimGtkConversation *gtkconv = data; + PidginConversation *gtkconv = data; g_return_if_fail(menu != NULL); g_return_if_fail(gtkconv != NULL); - menuitem = gaim_new_item_from_stock(NULL, _("_Send"), GAIM_STOCK_SEND, + menuitem = pidgin_new_item_from_stock(NULL, _("_Send"), PIDGIN_STOCK_SEND, G_CALLBACK(send_menu_cb), gtkconv, 0, 0, NULL); if (gtk_text_buffer_get_char_count(imhtml->text_buffer) == 0) @@ -4001,7 +3991,7 @@ } -static void resize_imhtml_cb(GaimGtkConversation *gtkconv) +static void resize_imhtml_cb(PidginConversation *gtkconv) { GtkTextBuffer *buffer; GtkTextIter iter; @@ -4043,11 +4033,11 @@ } static GtkWidget * -setup_chat_pane(GaimGtkConversation *gtkconv) +setup_chat_pane(PidginConversation *gtkconv) { GaimPluginProtocolInfo *prpl_info; GaimConversation *conv = gtkconv->active_conv; - GaimGtkChatPane *gtkchat; + PidginChatPane *gtkchat; GaimConnection *gc; GtkWidget *vpaned, *hpaned; GtkWidget *vbox, *hbox, *frame; @@ -4107,8 +4097,8 @@ gtk_widget_show(hpaned); /* Setup gtkihmtml. */ - frame = gaim_gtk_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); - gtk_widget_set_name(gtkconv->imhtml, "gaim_gtkconv_imhtml"); + frame = pidgin_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); + gtk_widget_set_name(gtkconv->imhtml, "pidgin_conv_imhtml"); gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), TRUE); gtk_paned_pack1(GTK_PANED(hpaned), frame, TRUE, TRUE); gtk_widget_show(frame); @@ -4219,14 +4209,14 @@ gtk_widget_show(vbox); /* Setup the toolbar, entry widget and all signals */ - frame = gaim_gtk_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar, NULL); + frame = pidgin_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar, NULL); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); g_signal_connect(G_OBJECT(gtkconv->entry), "populate-popup", G_CALLBACK(entry_popup_menu_cb), gtkconv); - gtk_widget_set_name(gtkconv->entry, "gaim_gtkconv_entry"); + gtk_widget_set_name(gtkconv->entry, "pidgin_conv_entry"); gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->entry), gaim_account_get_protocol_name(conv->account)); gtk_widget_set_size_request(gtkconv->lower_hbox, -1, @@ -4260,7 +4250,7 @@ } static GtkWidget * -setup_im_pane(GaimGtkConversation *gtkconv) +setup_im_pane(PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; GtkWidget *frame; @@ -4281,8 +4271,8 @@ gtk_widget_show(vbox); /* Setup the gtkimhtml widget */ - frame = gaim_gtk_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); - gtk_widget_set_name(gtkconv->imhtml, "gaim_gtkconv_imhtml"); + frame = pidgin_create_imhtml(FALSE, >kconv->imhtml, NULL, &imhtml_sw); + gtk_widget_set_name(gtkconv->imhtml, "pidgin_conv_imhtml"); gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml),TRUE); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); @@ -4318,14 +4308,14 @@ gtk_widget_show(vbox2); /* Setup the toolbar, entry widget and all signals */ - frame = gaim_gtk_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar, NULL); + frame = pidgin_create_imhtml(TRUE, >kconv->entry, >kconv->toolbar, NULL); gtk_box_pack_start(GTK_BOX(vbox2), frame, TRUE, TRUE, 0); gtk_widget_show(frame); g_signal_connect(G_OBJECT(gtkconv->entry), "populate-popup", G_CALLBACK(entry_popup_menu_cb), gtkconv); - gtk_widget_set_name(gtkconv->entry, "gaim_gtkconv_entry"); + gtk_widget_set_name(gtkconv->entry, "pidgin_conv_entry"); gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->entry), gaim_account_get_protocol_name(conv->account)); gtk_widget_set_size_request(gtkconv->lower_hbox, -1, @@ -4374,16 +4364,16 @@ static void conv_dnd_recv(GtkWidget *widget, GdkDragContext *dc, guint x, guint y, GtkSelectionData *sd, guint info, guint t, - GaimGtkConversation *gtkconv) + PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; - GaimGtkWindow *win = gtkconv->win; + PidginWindow *win = gtkconv->win; GaimConversation *c; if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { GaimBlistNode *n = NULL; GaimBuddy *b; - GaimGtkConversation *gtkconv = NULL; + PidginConversation *gtkconv = NULL; n = *(GaimBlistNode **)sd->data; @@ -4401,25 +4391,25 @@ */ c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, b->name, b->account); if (c != NULL) { - GaimGtkWindow *oldwin; - gtkconv = GAIM_GTK_CONVERSATION(c); + PidginWindow *oldwin; + gtkconv = PIDGIN_CONVERSATION(c); oldwin = gtkconv->win; if (oldwin != win) { - gaim_gtk_conv_window_remove_gtkconv(oldwin, gtkconv); - gaim_gtk_conv_window_add_gtkconv(win, gtkconv); + pidgin_conv_window_remove_gtkconv(oldwin, gtkconv); + pidgin_conv_window_add_gtkconv(win, gtkconv); } } else { c = gaim_conversation_new(GAIM_CONV_TYPE_IM, b->account, b->name); - gtkconv = GAIM_GTK_CONVERSATION(c); + gtkconv = PIDGIN_CONVERSATION(c); if (gtkconv->win != win) { - gaim_gtk_conv_window_remove_gtkconv(gtkconv->win, gtkconv); - gaim_gtk_conv_window_add_gtkconv(win, gtkconv); + pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv); + pidgin_conv_window_add_gtkconv(win, gtkconv); } } /* Make this conversation the active conversation */ - gaim_gtk_conv_window_switch_gtkconv(win, gtkconv); + pidgin_conv_window_switch_gtkconv(win, gtkconv); gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); } @@ -4428,9 +4418,9 @@ char *protocol = NULL; char *username = NULL; GaimAccount *account; - GaimGtkConversation *gtkconv; - - if (gaim_gtk_parse_x_im_contact((const char *)sd->data, FALSE, &account, + PidginConversation *gtkconv; + + if (pidgin_parse_x_im_contact((const char *)sd->data, FALSE, &account, &protocol, &username, NULL)) { if (account == NULL) @@ -4442,11 +4432,11 @@ else { c = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); - gtkconv = GAIM_GTK_CONVERSATION(c); + gtkconv = PIDGIN_CONVERSATION(c); if (gtkconv->win != win) { - gaim_gtk_conv_window_remove_gtkconv(gtkconv->win, gtkconv); - gaim_gtk_conv_window_add_gtkconv(win, gtkconv); + pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv); + pidgin_conv_window_add_gtkconv(win, gtkconv); } } } @@ -4458,7 +4448,7 @@ } else if (sd->target == gdk_atom_intern("text/uri-list", FALSE)) { if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) - gaim_dnd_file_manage(sd, gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)); + pidgin_dnd_file_manage(sd, gaim_conversation_get_account(conv), gaim_conversation_get_name(conv)); gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); } else @@ -4473,8 +4463,8 @@ {"application/x-im-contact", 0, GTK_IMHTML_DRAG_NUM + 1} }; -static GaimGtkConversation * -gaim_gtk_conv_find_gtkconv(GaimConversation * conv) +static PidginConversation * +pidgin_conv_find_gtkconv(GaimConversation * conv) { GaimBuddy *bud = gaim_find_buddy(conv->account, conv->name), *b; GaimContact *c; @@ -4506,15 +4496,15 @@ g_return_if_fail(bnode); g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY(bnode)); - for (list = gaim_gtk_conv_windows_get_list(); list; list = list->next) + for (list = pidgin_conv_windows_get_list(); list; list = list->next) { - GaimGtkWindow *win = list->data; - GaimConversation *conv = gaim_gtk_conv_window_get_active_conversation(win); + PidginWindow *win = list->data; + GaimConversation *conv = pidgin_conv_window_get_active_conversation(win); if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM) continue; - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_MENU); + pidgin_conv_update_fields(conv, PIDGIN_CONV_MENU); } } @@ -4524,20 +4514,20 @@ static void private_gtkconv_new(GaimConversation *conv, gboolean hidden) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GaimConversationType conv_type = gaim_conversation_get_type(conv); GtkWidget *pane = NULL; GtkWidget *tab_cont; - if (conv_type == GAIM_CONV_TYPE_IM && (gtkconv = gaim_gtk_conv_find_gtkconv(conv))) { + if (conv_type == GAIM_CONV_TYPE_IM && (gtkconv = pidgin_conv_find_gtkconv(conv))) { conv->ui_data = gtkconv; if (!g_list_find(gtkconv->convs, conv)) gtkconv->convs = g_list_prepend(gtkconv->convs, conv); - gaim_gtkconv_switch_active_conversation(conv); + pidgin_conv_switch_active_conversation(conv); return; } - gtkconv = g_new0(GaimGtkConversation, 1); + gtkconv = g_new0(PidginConversation, 1); conv->ui_data = gtkconv; gtkconv->active_conv = conv; gtkconv->convs = g_list_prepend(gtkconv->convs, conv); @@ -4546,15 +4536,15 @@ /* Setup some initial variables. */ gtkconv->sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); gtkconv->tooltips = gtk_tooltips_new(); - gtkconv->unseen_state = GAIM_UNSEEN_NONE; + gtkconv->unseen_state = PIDGIN_UNSEEN_NONE; gtkconv->unseen_count = 0; if (conv_type == GAIM_CONV_TYPE_IM) { - gtkconv->u.im = g_malloc0(sizeof(GaimGtkImPane)); + gtkconv->u.im = g_malloc0(sizeof(PidginImPane)); pane = setup_im_pane(gtkconv); } else if (conv_type == GAIM_CONV_TYPE_CHAT) { - gtkconv->u.chat = g_malloc0(sizeof(GaimGtkChatPane)); + gtkconv->u.chat = g_malloc0(sizeof(PidginChatPane)); pane = setup_chat_pane(gtkconv); } @@ -4600,7 +4590,7 @@ /* Setup the container for the tab. */ gtkconv->tab_cont = tab_cont = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); - g_object_set_data(G_OBJECT(tab_cont), "GaimGtkConversation", gtkconv); + g_object_set_data(G_OBJECT(tab_cont), "PidginConversation", gtkconv); gtk_container_set_border_width(GTK_CONTAINER(tab_cont), GAIM_HIG_BOX_SPACE); gtk_container_add(GTK_CONTAINER(tab_cont), pane); gtk_widget_show(pane); @@ -4622,9 +4612,9 @@ gtkconv->entry); if (hidden) - gaim_gtk_conv_window_add_gtkconv(hidden_convwin, gtkconv); + pidgin_conv_window_add_gtkconv(hidden_convwin, gtkconv); else - gaim_gtkconv_placement_place(gtkconv); + pidgin_conv_placement_place(gtkconv); if (nick_colors == NULL) { nbr_nick_colors = NUM_NICK_COLORS; @@ -4633,13 +4623,13 @@ } static void -gaim_gtkconv_new_hidden(GaimConversation *conv) +pidgin_conv_new_hidden(GaimConversation *conv) { private_gtkconv_new(conv, TRUE); } void -gaim_gtkconv_new(GaimConversation *conv) +pidgin_conv_new(GaimConversation *conv) { private_gtkconv_new(conv, FALSE); } @@ -4648,16 +4638,16 @@ received_im_msg_cb(GaimAccount *account, char *sender, char *message, GaimConversation *conv, GaimMessageFlags flags) { - GaimConversationUiOps *ui_ops = gaim_gtk_conversations_get_conv_ui_ops(); + GaimConversationUiOps *ui_ops = pidgin_conversations_get_conv_ui_ops(); if (conv != NULL) return; /* create hidden conv if hide_new pref is always */ if (strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "always") == 0) { - ui_ops->create_conversation = gaim_gtkconv_new_hidden; + ui_ops->create_conversation = pidgin_conv_new_hidden; gaim_conversation_new(GAIM_CONV_TYPE_IM, account, sender); - ui_ops->create_conversation = gaim_gtkconv_new; + ui_ops->create_conversation = pidgin_conv_new; return; } @@ -4665,24 +4655,24 @@ if (strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away") == 0 && !gaim_status_is_available(gaim_account_get_active_status(account))) { - ui_ops->create_conversation = gaim_gtkconv_new_hidden; + ui_ops->create_conversation = pidgin_conv_new_hidden; gaim_conversation_new(GAIM_CONV_TYPE_IM, account, sender); - ui_ops->create_conversation = gaim_gtkconv_new; + ui_ops->create_conversation = pidgin_conv_new; return; } } static void -gaim_gtkconv_destroy(GaimConversation *conv) -{ - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); +pidgin_conv_destroy(GaimConversation *conv) +{ + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); gtkconv->convs = g_list_remove(gtkconv->convs, conv); /* Don't destroy ourselves until all our convos are gone */ if (gtkconv->convs) return; - gaim_gtk_conv_window_remove_gtkconv(gtkconv->win, gtkconv); + pidgin_conv_window_remove_gtkconv(gtkconv->win, gtkconv); /* If the "Save Conversation" or "Save Icon" dialogs are open then close them */ gaim_request_close_with_handle(gtkconv); @@ -4715,13 +4705,13 @@ static void -gaim_gtkconv_write_im(GaimConversation *conv, const char *who, +pidgin_conv_write_im(GaimConversation *conv, const char *who, const char *message, GaimMessageFlags flags, time_t mtime) { - GaimGtkConversation *gtkconv; - - gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv; + + gtkconv = PIDGIN_CONVERSATION(conv); if (conv != gtkconv->active_conv && flags & GAIM_MESSAGE_ACTIVE_ONLY) @@ -4730,7 +4720,7 @@ * calling gaim_conv_im_write(), so they get suppressed here, * before being written to the log. */ gaim_debug_info("gtkconv", - "Suppressing message for an inactive conversation in gaim_gtkconv_write_im()\n"); + "Suppressing message for an inactive conversation in pidgin_conv_write_im()\n"); return; } @@ -4754,7 +4744,7 @@ if (btn_event->button == 2 && event->type == GDK_2BUTTON_PRESS) { - chat_do_info(GAIM_GTK_CONVERSATION(conv), buddyname); + chat_do_info(PIDGIN_CONVERSATION(conv), buddyname); return TRUE; } else if (btn_event->button == 3 @@ -4787,7 +4777,7 @@ } static GtkTextTag *get_buddy_tag(GaimConversation *conv, const char *who) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); GtkTextTag *buddytag; gchar *str; @@ -4810,13 +4800,23 @@ return buddytag; } -static void -gaim_gtkconv_write_conv(GaimConversation *conv, const char *name, const char *alias, +static void pidgin_conv_calculate_newday(PidginConversation *gtkconv, time_t mtime) +{ + struct tm *tm = localtime(&mtime); + + tm->tm_hour = tm->tm_min = tm->tm_sec = 0; + tm->tm_mday++; + + gtkconv->newday = mktime(tm); +} + +static void +pidgin_conv_write_conv(GaimConversation *conv, const char *name, const char *alias, const char *message, GaimMessageFlags flags, time_t mtime) { - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; GaimConnection *gc; GaimAccount *account; GaimPluginProtocolInfo *prpl_info; @@ -4825,6 +4825,7 @@ int max_scrollback_lines; int line_count; char buf2[BUF_LONG]; + gboolean show_date; char *mdate; char color[10]; char *str; @@ -4838,7 +4839,7 @@ int tag_count = 0; g_return_if_fail(conv != NULL); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); g_return_if_fail(gtkconv != NULL); if (conv != gtkconv->active_conv) @@ -4850,14 +4851,14 @@ * you wanted, call gaim_conv_im_write() instead of * gaim_conversation_write(). */ gaim_debug_info("gtkconv", - "Suppressing message for an inactive conversation in gaim_gtkconv_write_conv()\n"); + "Suppressing message for an inactive conversation in pidgin_conv_write_conv()\n"); return; } /* Set the active conversation to the one that just messaged us. */ /* TODO: consider not doing this if the account is offline or something */ if (flags & (GAIM_MESSAGE_SEND | GAIM_MESSAGE_RECV)) - gaim_gtkconv_switch_active_conversation(conv); + pidgin_conv_switch_active_conversation(conv); } type = gaim_conversation_get_type(conv); @@ -4868,7 +4869,7 @@ displaying = g_strdup(message); plugin_return = GPOINTER_TO_INT(gaim_signal_emit_return_1( - gaim_gtk_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? + pidgin_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? "displaying-im-msg" : "displaying-chat-msg"), account, name, &displaying, conv, flags)); if (plugin_return) @@ -4876,22 +4877,21 @@ g_free(displaying); return; } - message = displaying; - length = strlen(message) + 1; + length = strlen(displaying) + 1; /* Awful hack to work around GtkIMHtml's inefficient rendering of messages with lots of formatting changes. * If a message has over 100 '<' characters, strip formatting before appending it. Hopefully nobody actually * needs that much formatting, anyway. */ - for (bracket = strchr(message, '<'); bracket && *(bracket + 1); bracket = strchr(bracket + 1, '<')) + for (bracket = strchr(displaying, '<'); bracket && *(bracket + 1); bracket = strchr(bracket + 1, '<')) tag_count++; - + if (tag_count > 100) { - char *tmp = message; - message = displaying = gaim_markup_strip_html(message); + char *tmp = displaying; + displaying = gaim_markup_strip_html(tmp); g_free(tmp); - } - + } + win = gtkconv->win; prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); @@ -4933,18 +4933,30 @@ if (gtk_text_buffer_get_char_count(gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->imhtml)))) gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "<BR>", gtk_font_options_all); - mdate = gaim_signal_emit_return_1(gaim_gtk_conversations_get_handle(), + /* First message in a conversation. */ + if (gtkconv->newday == 0) + pidgin_conv_calculate_newday(gtkconv, mtime); + + /* Show the date on the first message in a new day, or if the message is + * older than 20 minutes. */ + show_date = (mtime >= gtkconv->newday) || (time(NULL) > mtime + 20*60); + + mdate = gaim_signal_emit_return_1(pidgin_conversations_get_handle(), "conversation-timestamp", - conv, mtime); + conv, mtime, show_date); + if (mdate == NULL) { struct tm *tm = localtime(&mtime); - if (time(NULL) > mtime + 20*60) /* show date if older than 20 minutes */ + if (show_date) mdate = g_strdup(gaim_date_format_long(tm)); else mdate = g_strdup(gaim_time_format(tm)); } + if (mtime >= gtkconv->newday) + pidgin_conv_calculate_newday(gtkconv, mtime); + sml_attrib = g_strdup_printf("sml=\"%s\"", gaim_account_get_protocol_name(account)); gtk_font_options |= GTK_IMHTML_NO_COMMENTS; @@ -4964,27 +4976,27 @@ if (flags & GAIM_MESSAGE_SYSTEM) { g_snprintf(buf2, sizeof(buf2), "<FONT %s><FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B></FONT>", - sml_attrib ? sml_attrib : "", mdate, message); + sml_attrib ? sml_attrib : "", mdate, displaying); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all); } else if (flags & GAIM_MESSAGE_ERROR) { g_snprintf(buf2, sizeof(buf2), "<FONT COLOR=\"#ff0000\"><FONT %s><FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B></FONT></FONT>", - sml_attrib ? sml_attrib : "", mdate, message); + sml_attrib ? sml_attrib : "", mdate, displaying); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all); } else if (flags & GAIM_MESSAGE_NO_LOG) { g_snprintf(buf2, BUF_LONG, "<B><FONT %s COLOR=\"#777777\">%s</FONT></B>", - sml_attrib ? sml_attrib : "", message); + sml_attrib ? sml_attrib : "", displaying); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all); } else if (flags & GAIM_MESSAGE_RAW) { - gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), message, gtk_font_options_all); + gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), displaying, gtk_font_options_all); } else { - char *new_message = g_memdup(message, length); + char *new_message = g_memdup(displaying, length); char *alias_escaped = (alias ? g_markup_escape_text(alias, strlen(alias)) : g_strdup("")); /* The initial offset is to deal with * escaped entities making the string longer */ @@ -5161,34 +5173,34 @@ g_free(sml_attrib); /* Tab highlighting stuff */ - if (!(flags & GAIM_MESSAGE_SEND) && !gaim_gtkconv_has_focus(conv)) + if (!(flags & GAIM_MESSAGE_SEND) && !pidgin_conv_has_focus(conv)) { - GaimUnseenState unseen = GAIM_UNSEEN_NONE; + GaimUnseenState unseen = PIDGIN_UNSEEN_NONE; if ((flags & GAIM_MESSAGE_NICK) == GAIM_MESSAGE_NICK) - unseen = GAIM_UNSEEN_NICK; + unseen = PIDGIN_UNSEEN_NICK; else if (((flags & GAIM_MESSAGE_SYSTEM) == GAIM_MESSAGE_SYSTEM) || ((flags & GAIM_MESSAGE_ERROR) == GAIM_MESSAGE_ERROR)) - unseen = GAIM_UNSEEN_EVENT; + unseen = PIDGIN_UNSEEN_EVENT; else if ((flags & GAIM_MESSAGE_NO_LOG) == GAIM_MESSAGE_NO_LOG) - unseen = GAIM_UNSEEN_NO_LOG; + unseen = PIDGIN_UNSEEN_NO_LOG; else - unseen = GAIM_UNSEEN_TEXT; + unseen = PIDGIN_UNSEEN_TEXT; gtkconv_set_unseen(gtkconv, unseen); } - gaim_signal_emit(gaim_gtk_conversations_get_handle(), + gaim_signal_emit(pidgin_conversations_get_handle(), (type == GAIM_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"), - account, name, message, conv, flags); + account, name, displaying, conv, flags); g_free(displaying); } static void -gaim_gtkconv_chat_add_users(GaimConversation *conv, GList *cbuddies, gboolean new_arrivals) +pidgin_conv_chat_add_users(GaimConversation *conv, GList *cbuddies, gboolean new_arrivals) { GaimConvChat *chat; - GaimGtkConversation *gtkconv; - GaimGtkChatPane *gtkchat; + PidginConversation *gtkconv; + PidginChatPane *gtkchat; GtkListStore *ls; GList *l; @@ -5196,7 +5208,7 @@ int num_users; chat = GAIM_CONV_CHAT(conv); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; num_users = g_list_length(gaim_conv_chat_get_users(chat)); @@ -5229,12 +5241,12 @@ } static void -gaim_gtkconv_chat_rename_user(GaimConversation *conv, const char *old_name, +pidgin_conv_chat_rename_user(GaimConversation *conv, const char *old_name, const char *new_name, const char *new_alias) { GaimConvChat *chat; - GaimGtkConversation *gtkconv; - GaimGtkChatPane *gtkchat; + PidginConversation *gtkconv; + PidginChatPane *gtkchat; GaimConvChatBuddyFlags flags; GaimConvChatBuddy *cbuddy; GtkTreeIter iter; @@ -5242,7 +5254,7 @@ int f = 1; chat = GAIM_CONV_CHAT(conv); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)); @@ -5277,11 +5289,11 @@ } static void -gaim_gtkconv_chat_remove_users(GaimConversation *conv, GList *users) +pidgin_conv_chat_remove_users(GaimConversation *conv, GList *users) { GaimConvChat *chat; - GaimGtkConversation *gtkconv; - GaimGtkChatPane *gtkchat; + PidginConversation *gtkconv; + PidginChatPane *gtkchat; GtkTreeIter iter; GtkTreeModel *model; GList *l; @@ -5290,7 +5302,7 @@ gboolean f; chat = GAIM_CONV_CHAT(conv); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; num_users = g_list_length(gaim_conv_chat_get_users(chat)); @@ -5330,20 +5342,20 @@ } static void -gaim_gtkconv_chat_update_user(GaimConversation *conv, const char *user) +pidgin_conv_chat_update_user(GaimConversation *conv, const char *user) { GaimConvChat *chat; GaimConvChatBuddyFlags flags; GaimConvChatBuddy *cbuddy; - GaimGtkConversation *gtkconv; - GaimGtkChatPane *gtkchat; + PidginConversation *gtkconv; + PidginChatPane *gtkchat; GtkTreeIter iter; GtkTreeModel *model; int f = 1; char *alias = NULL; chat = GAIM_CONV_CHAT(conv); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkchat = gtkconv->u.chat; model = gtk_tree_view_get_model(GTK_TREE_VIEW(gtkchat->list)); @@ -5385,23 +5397,23 @@ } gboolean -gaim_gtkconv_has_focus(GaimConversation *conv) -{ - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); - GaimGtkWindow *win; +pidgin_conv_has_focus(GaimConversation *conv) +{ + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); + PidginWindow *win; gboolean has_focus; win = gtkconv->win; g_object_get(G_OBJECT(win->window), "has-toplevel-focus", &has_focus, NULL); - if (has_focus && gaim_gtk_conv_window_is_active_conversation(conv)) + if (has_focus && pidgin_conv_window_is_active_conversation(conv)) return TRUE; return FALSE; } -static void gaim_gtkconv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data) +static void pidgin_conv_custom_smiley_allocated(GdkPixbufLoader *loader, gpointer user_data) { GtkIMHtmlSmiley *smiley; @@ -5411,11 +5423,11 @@ if (smiley->icon) g_object_ref(G_OBJECT(smiley->icon)); #ifdef DEBUG_CUSTOM_SMILEY - gaim_debug_info("custom-smiley", "gaim_gtkconv_custom_smiley_allocated(): got GdkPixbufAnimation %p for smiley '%s'\n", smiley->icon, smiley->smile); + gaim_debug_info("custom-smiley", "pidgin_conv_custom_smiley_allocated(): got GdkPixbufAnimation %p for smiley '%s'\n", smiley->icon, smiley->smile); #endif } -static void gaim_gtkconv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data) +static void pidgin_conv_custom_smiley_closed(GdkPixbufLoader *loader, gpointer user_data) { GtkIMHtmlSmiley *smiley; GtkWidget *icon = NULL; @@ -5425,7 +5437,7 @@ smiley = (GtkIMHtmlSmiley *)user_data; if (!smiley->imhtml) { #ifdef DEBUG_CUSTOM_SMILEY - gaim_debug_error("custom-smiley", "gaim_gtkconv_custom_smiley_closed(): orphan smiley found: %p\n", smiley); + gaim_debug_error("custom-smiley", "pidgin_conv_custom_smiley_closed(): orphan smiley found: %p\n", smiley); #endif g_object_unref(G_OBJECT(loader)); smiley->loader = NULL; @@ -5437,7 +5449,7 @@ icon = gtk_image_new_from_animation(smiley->icon); #ifdef DEBUG_CUSTOM_SMILEY - gaim_debug_info("custom-smiley", "gaim_gtkconv_custom_smiley_closed(): got GtkImage %p from GtkPixbufAnimation %p for smiley '%s'\n", + gaim_debug_info("custom-smiley", "pidgin_conv_custom_smiley_closed(): got GtkImage %p from GtkPixbufAnimation %p for smiley '%s'\n", icon, smiley->icon, smiley->smile); #endif if (icon) { @@ -5483,8 +5495,8 @@ smiley->loader = gdk_pixbuf_loader_new(); smiley->icon = NULL; - g_signal_connect(smiley->loader, "area_prepared", G_CALLBACK(gaim_gtkconv_custom_smiley_allocated), smiley); - g_signal_connect(smiley->loader, "closed", G_CALLBACK(gaim_gtkconv_custom_smiley_closed), smiley); + g_signal_connect(smiley->loader, "area_prepared", G_CALLBACK(pidgin_conv_custom_smiley_allocated), smiley); + g_signal_connect(smiley->loader, "closed", G_CALLBACK(pidgin_conv_custom_smiley_closed), smiley); return TRUE; } @@ -5500,8 +5512,8 @@ smiley->loader = loader; smiley->flags = smiley->flags | GTK_IMHTML_SMILEY_CUSTOM; - g_signal_connect(smiley->loader, "area_prepared", G_CALLBACK(gaim_gtkconv_custom_smiley_allocated), smiley); - g_signal_connect(smiley->loader, "closed", G_CALLBACK(gaim_gtkconv_custom_smiley_closed), smiley); + g_signal_connect(smiley->loader, "area_prepared", G_CALLBACK(pidgin_conv_custom_smiley_allocated), smiley); + g_signal_connect(smiley->loader, "closed", G_CALLBACK(pidgin_conv_custom_smiley_closed), smiley); gtk_imhtml_associate_smiley(imhtml, sml, smiley); @@ -5509,9 +5521,9 @@ } static gboolean -gaim_gtkconv_custom_smiley_add(GaimConversation *conv, const char *smile, gboolean remote) -{ - GaimGtkConversation *gtkconv; +pidgin_conv_custom_smiley_add(GaimConversation *conv, const char *smile, gboolean remote) +{ + PidginConversation *gtkconv; struct smiley_list *list; const char *sml = NULL, *conv_sml; @@ -5520,13 +5532,13 @@ } /* If smileys are off, return false */ - if (gaim_gtkthemes_smileys_disabled()) + if (pidginthemes_smileys_disabled()) return FALSE; /* If possible add this smiley to the current theme. * The addition is only temporary: custom smilies aren't saved to disk. */ conv_sml = gaim_account_get_protocol_name(conv->account); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); for (list = (struct smiley_list *)current_smiley_theme->list; list; list = list->next) { if (!strcmp(list->sml, conv_sml)) { @@ -5546,16 +5558,16 @@ } static void -gaim_gtkconv_custom_smiley_write(GaimConversation *conv, const char *smile, +pidgin_conv_custom_smiley_write(GaimConversation *conv, const char *smile, const guchar *data, gsize size) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkIMHtmlSmiley *smiley; GdkPixbufLoader *loader; const char *sml; sml = gaim_account_get_protocol_name(conv->account); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); smiley = gtk_imhtml_smiley_get(GTK_IMHTML(gtkconv->imhtml), sml, smile); if (!smiley) @@ -5569,9 +5581,9 @@ } static void -gaim_gtkconv_custom_smiley_close(GaimConversation *conv, const char *smile) -{ - GaimGtkConversation *gtkconv; +pidgin_conv_custom_smiley_close(GaimConversation *conv, const char *smile) +{ + PidginConversation *gtkconv; GtkIMHtmlSmiley *smiley; GdkPixbufLoader *loader; const char *sml; @@ -5580,7 +5592,7 @@ g_return_if_fail(smile != NULL); sml = gaim_account_get_protocol_name(conv->account); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); smiley = gtk_imhtml_smiley_get(GTK_IMHTML(gtkconv->imhtml), sml, smile); if (!smiley) @@ -5600,9 +5612,9 @@ } static void -gaim_gtkconv_send_confirm(GaimConversation *conv, const char *message) -{ - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); +pidgin_conv_send_confirm(GaimConversation *conv, const char *message) +{ + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); gtk_imhtml_append_text(GTK_IMHTML(gtkconv->entry), message, 0); } @@ -5613,9 +5625,9 @@ * account signs on or off. */ static void -gray_stuff_out(GaimGtkConversation *gtkconv) -{ - GaimGtkWindow *win; +gray_stuff_out(PidginConversation *gtkconv) +{ + PidginWindow *win; GaimConversation *conv = gtkconv->active_conv; GaimConnection *gc; GaimPluginProtocolInfo *prpl_info = NULL; @@ -5623,7 +5635,7 @@ GtkIMHtmlButtons buttons; GaimAccount *account; - win = gaim_gtkconv_get_window(gtkconv); + win = pidgin_conv_get_window(gtkconv); gc = gaim_conversation_get_gc(conv); account = gaim_conversation_get_account(conv); @@ -5780,7 +5792,7 @@ /* * Update the window's icon */ - if (gaim_gtk_conv_window_is_active_conversation(conv)) + if (pidgin_conv_window_is_active_conversation(conv)) { if ((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && (gtkconv->u.im->anim)) @@ -5789,7 +5801,7 @@ gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); g_object_ref(window_icon); } else { - window_icon = gaim_gtkconv_get_tab_icon(conv, FALSE); + window_icon = pidgin_conv_get_tab_icon(conv, FALSE); } gtk_window_set_icon(GTK_WINDOW(win->window), window_icon); if (window_icon != NULL) @@ -5798,47 +5810,47 @@ } static void -gaim_gtkconv_update_fields(GaimConversation *conv, GaimGtkConvFields fields) -{ - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; - - gtkconv = GAIM_GTK_CONVERSATION(conv); +pidgin_conv_update_fields(GaimConversation *conv, PidginConvFields fields) +{ + PidginConversation *gtkconv; + PidginWindow *win; + + gtkconv = PIDGIN_CONVERSATION(conv); if (!gtkconv) return; - win = gaim_gtkconv_get_window(gtkconv); + win = pidgin_conv_get_window(gtkconv); if (!win) return; - if (fields & GAIM_GTKCONV_SET_TITLE) + if (fields & PIDGIN_CONV_SET_TITLE) { gaim_conversation_autoset_title(conv); } - if (fields & GAIM_GTKCONV_BUDDY_ICON) + if (fields & PIDGIN_CONV_BUDDY_ICON) { if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) - gaim_gtkconv_update_buddy_icon(conv); - } - - if (fields & GAIM_GTKCONV_MENU) + pidgin_conv_update_buddy_icon(conv); + } + + if (fields & PIDGIN_CONV_MENU) { - gray_stuff_out(GAIM_GTK_CONVERSATION(conv)); + gray_stuff_out(PIDGIN_CONVERSATION(conv)); generate_send_to_items(win); } - if (fields & GAIM_GTKCONV_TAB_ICON) + if (fields & PIDGIN_CONV_TAB_ICON) { update_tab_icon(conv); generate_send_to_items(win); /* To update the icons in SendTo menu */ } - if ((fields & GAIM_GTKCONV_TOPIC) && + if ((fields & PIDGIN_CONV_TOPIC) && gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT) { const char *topic; GaimConvChat *chat = GAIM_CONV_CHAT(conv); - GaimGtkChatPane *gtkchat = gtkconv->u.chat; + PidginChatPane *gtkchat = gtkconv->u.chat; if (gtkchat->topic_text != NULL) { @@ -5850,11 +5862,11 @@ } } - if (fields & GAIM_GTKCONV_SMILEY_THEME) - gaim_gtkthemes_smiley_themeize(GAIM_GTK_CONVERSATION(conv)->imhtml); - - if ((fields & GAIM_GTKCONV_COLORIZE_TITLE) || - (fields & GAIM_GTKCONV_SET_TITLE)) + if (fields & PIDGIN_CONV_SMILEY_THEME) + pidginthemes_smiley_themeize(PIDGIN_CONVERSATION(conv)->imhtml); + + if ((fields & PIDGIN_CONV_COLORIZE_TITLE) || + (fields & PIDGIN_CONV_SET_TITLE)) { char *title; GaimConvIm *im = NULL; @@ -5892,17 +5904,17 @@ atk_object_set_description(accessibility_obj, _("Stopped Typing")); strncpy(style, "color=\"#D1940C\"", sizeof(style)); } - else if (gtkconv->unseen_state == GAIM_UNSEEN_NICK) + else if (gtkconv->unseen_state == PIDGIN_UNSEEN_NICK) { atk_object_set_description(accessibility_obj, _("Nick Said")); strncpy(style, "color=\"#0D4E91\" style=\"italic\" weight=\"bold\"", sizeof(style)); } - else if (gtkconv->unseen_state == GAIM_UNSEEN_TEXT) + else if (gtkconv->unseen_state == PIDGIN_UNSEEN_TEXT) { atk_object_set_description(accessibility_obj, _("Unread Messages")); strncpy(style, "color=\"#DF421E\" weight=\"bold\"", sizeof(style)); } - else if (gtkconv->unseen_state == GAIM_UNSEEN_EVENT) + else if (gtkconv->unseen_state == PIDGIN_UNSEEN_EVENT) { atk_object_set_description(accessibility_obj, _("New Event")); strncpy(style, "color=\"#868272\" style=\"italic\"", sizeof(style)); @@ -5923,11 +5935,11 @@ else gtk_label_set_text(GTK_LABEL(gtkconv->tab_label), title); - if (gaim_gtk_conv_window_is_active_conversation(conv)) + if (pidgin_conv_window_is_active_conversation(conv)) update_typing_icon(gtkconv); gtk_label_set_text(GTK_LABEL(gtkconv->menu_label), title); - if (gaim_gtk_conv_window_is_active_conversation(conv)) + if (pidgin_conv_window_is_active_conversation(conv)) gtk_window_set_title(GTK_WINDOW(win->window), title); g_free(title); @@ -5935,74 +5947,74 @@ } static void -gaim_gtkconv_updated(GaimConversation *conv, GaimConvUpdateType type) -{ - GaimGtkConvFields flags = 0; +pidgin_conv_updated(GaimConversation *conv, GaimConvUpdateType type) +{ + PidginConvFields flags = 0; g_return_if_fail(conv != NULL); if (type == GAIM_CONV_UPDATE_ACCOUNT) { - flags = GAIM_GTKCONV_ALL; + flags = PIDGIN_CONV_ALL; } else if (type == GAIM_CONV_UPDATE_TYPING || type == GAIM_CONV_UPDATE_UNSEEN || type == GAIM_CONV_UPDATE_TITLE) { - flags = GAIM_GTKCONV_COLORIZE_TITLE; + flags = PIDGIN_CONV_COLORIZE_TITLE; } else if (type == GAIM_CONV_UPDATE_TOPIC) { - flags = GAIM_GTKCONV_TOPIC; + flags = PIDGIN_CONV_TOPIC; } else if (type == GAIM_CONV_ACCOUNT_ONLINE || type == GAIM_CONV_ACCOUNT_OFFLINE) { - flags = GAIM_GTKCONV_MENU | GAIM_GTKCONV_TAB_ICON | GAIM_GTKCONV_SET_TITLE; + flags = PIDGIN_CONV_MENU | PIDGIN_CONV_TAB_ICON | PIDGIN_CONV_SET_TITLE; } else if (type == GAIM_CONV_UPDATE_AWAY) { - flags = GAIM_GTKCONV_TAB_ICON; + flags = PIDGIN_CONV_TAB_ICON; } else if (type == GAIM_CONV_UPDATE_ADD || type == GAIM_CONV_UPDATE_REMOVE || type == GAIM_CONV_UPDATE_CHATLEFT) { - flags = GAIM_GTKCONV_SET_TITLE | GAIM_GTKCONV_MENU; + flags = PIDGIN_CONV_SET_TITLE | PIDGIN_CONV_MENU; } else if (type == GAIM_CONV_UPDATE_ICON) { - flags = GAIM_GTKCONV_BUDDY_ICON; + flags = PIDGIN_CONV_BUDDY_ICON; } else if (type == GAIM_CONV_UPDATE_FEATURES) { - flags = GAIM_GTKCONV_MENU; - } - - gaim_gtkconv_update_fields(conv, flags); + flags = PIDGIN_CONV_MENU; + } + + pidgin_conv_update_fields(conv, flags); } static GaimConversationUiOps conversation_ui_ops = { - gaim_gtkconv_new, - gaim_gtkconv_destroy, /* destroy_conversation */ + pidgin_conv_new, + pidgin_conv_destroy, /* destroy_conversation */ NULL, /* write_chat */ - gaim_gtkconv_write_im, /* write_im */ - gaim_gtkconv_write_conv, /* write_conv */ - gaim_gtkconv_chat_add_users, /* chat_add_users */ - gaim_gtkconv_chat_rename_user, /* chat_rename_user */ - gaim_gtkconv_chat_remove_users, /* chat_remove_users */ - gaim_gtkconv_chat_update_user, /* chat_update_user */ - gaim_gtkconv_present_conversation, /* present */ - gaim_gtkconv_has_focus, /* has_focus */ - gaim_gtkconv_custom_smiley_add, /* custom_smiley_add */ - gaim_gtkconv_custom_smiley_write, /* custom_smiley_write */ - gaim_gtkconv_custom_smiley_close, /* custom_smiley_close */ - gaim_gtkconv_send_confirm, /* send_confirm */ + pidgin_conv_write_im, /* write_im */ + pidgin_conv_write_conv, /* write_conv */ + pidgin_conv_chat_add_users, /* chat_add_users */ + pidgin_conv_chat_rename_user, /* chat_rename_user */ + pidgin_conv_chat_remove_users, /* chat_remove_users */ + pidgin_conv_chat_update_user, /* chat_update_user */ + pidgin_conv_present_conversation, /* present */ + pidgin_conv_has_focus, /* has_focus */ + pidgin_conv_custom_smiley_add, /* custom_smiley_add */ + pidgin_conv_custom_smiley_write, /* custom_smiley_write */ + pidgin_conv_custom_smiley_close, /* custom_smiley_close */ + pidgin_conv_send_confirm, /* send_confirm */ }; GaimConversationUiOps * -gaim_gtk_conversations_get_conv_ui_ops(void) +pidgin_conversations_get_conv_ui_ops(void) { return &conversation_ui_ops; } @@ -6011,10 +6023,10 @@ * Public conversation utility functions **************************************************************************/ void -gaim_gtkconv_update_buddy_icon(GaimConversation *conv) -{ - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; +pidgin_conv_update_buddy_icon(GaimConversation *conv) +{ + PidginConversation *gtkconv; + PidginWindow *win; GdkPixbufLoader *loader; GdkPixbufAnimation *anim; @@ -6040,7 +6052,7 @@ g_return_if_fail(GAIM_IS_GTK_CONVERSATION(conv)); g_return_if_fail(gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); win = gtkconv->win; if (conv != gtkconv->active_conv) return; @@ -6136,7 +6148,7 @@ start_anim(NULL, gtkconv); } - gaim_gtk_buddy_icon_get_scale_size(buf, &prpl_info->icon_spec, + pidgin_buddy_icon_get_scale_size(buf, &prpl_info->icon_spec, GAIM_ICON_SCALE_DISPLAY, &scale_width, &scale_height); scale = gdk_pixbuf_scale_simple(buf, MAX(gdk_pixbuf_get_width(buf) * scale_width / @@ -6176,7 +6188,7 @@ gtk_widget_show(frame); /* The buddy icon code needs badly to be fixed. */ - if(gaim_gtk_conv_window_is_active_conversation(conv)) + if(pidgin_conv_window_is_active_conversation(conv)) { buf = gdk_pixbuf_animation_get_static_image(gtkconv->u.im->anim); gtk_window_set_icon(GTK_WINDOW(win->window), buf); @@ -6184,21 +6196,21 @@ } void -gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv) -{ - GaimGtkWindow *win; +pidgin_conv_update_buttons_by_protocol(GaimConversation *conv) +{ + PidginWindow *win; if (!GAIM_IS_GTK_CONVERSATION(conv)) return; - win = GAIM_GTK_CONVERSATION(conv)->win; - - if (win != NULL && gaim_gtk_conv_window_is_active_conversation(conv)) - gray_stuff_out(GAIM_GTK_CONVERSATION(conv)); + win = PIDGIN_CONVERSATION(conv)->win; + + if (win != NULL && pidgin_conv_window_is_active_conversation(conv)) + gray_stuff_out(PIDGIN_CONVERSATION(conv)); } int -gaim_gtkconv_get_tab_at_xy(GaimGtkWindow *win, int x, int y, gboolean *to_right) +pidgin_conv_get_tab_at_xy(PidginWindow *win, int x, int y, gboolean *to_right) { gint nb_x, nb_y, x_rel, y_rel; GtkNotebook *notebook; @@ -6272,7 +6284,7 @@ { GList *l; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; for (l = gaim_get_conversations(); l != NULL; l = l->next) { conv = (GaimConversation *)l->data; @@ -6280,7 +6292,7 @@ if (!GAIM_IS_GTK_CONVERSATION(conv)) continue; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); if (value) gtk_widget_show(gtkconv->close); @@ -6296,7 +6308,7 @@ #ifdef USE_GTKSPELL GList *cl; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkSpell *spell; for (cl = gaim_get_conversations(); cl != NULL; cl = cl->next) { @@ -6306,10 +6318,10 @@ if (!GAIM_IS_GTK_CONVERSATION(conv)) continue; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); if (value) - gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(gtkconv->entry)); + pidgin_setup_gtkspell(GTK_TEXT_VIEW(gtkconv->entry)); else { spell = gtkspell_get_from_text_view(GTK_TEXT_VIEW(gtkconv->entry)); gtkspell_detach(spell); @@ -6324,11 +6336,11 @@ { GList *l; GtkPositionType pos; - GaimGtkWindow *win; + PidginWindow *win; pos = GPOINTER_TO_INT(value); - for (l = gaim_gtk_conv_windows_get_list(); l != NULL; l = l->next) { + for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) { win = l->data; gtk_notebook_set_tab_pos(GTK_NOTEBOOK(win->notebook), pos&~8); @@ -6341,8 +6353,8 @@ { GList *l; GaimConversation *conv; - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; for (l = gaim_get_conversations(); l != NULL; l = l->next) { @@ -6351,7 +6363,7 @@ if (!GAIM_IS_GTK_CONVERSATION(conv)) continue; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); win = gtkconv->win; gtk_check_menu_item_set_active( @@ -6369,8 +6381,8 @@ { GList *l; GaimConversation *conv; - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; for (l = gaim_get_conversations(); l != NULL; l = l->next) { @@ -6379,7 +6391,7 @@ if (!GAIM_IS_GTK_CONVERSATION(conv)) continue; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); win = gtkconv->win; gtk_check_menu_item_set_active( @@ -6399,8 +6411,8 @@ { GList *l; GaimConversation *conv; - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; if (!gaim_prefs_get_bool("/gaim/gtk/conversations/im/show_buddy_icons")) return; @@ -6408,15 +6420,15 @@ /* Set the "animate" flag for each icon based on the new preference */ for (l = gaim_get_ims(); l != NULL; l = l->next) { conv = (GaimConversation *)l->data; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtkconv->u.im->animate = GPOINTER_TO_INT(value); } /* Now either stop or start animation for the active conversation in each window */ - for (l = gaim_gtk_conv_windows_get_list(); l != NULL; l = l->next) { + for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) { win = l->data; - conv = gaim_gtk_conv_window_get_active_conversation(win); - gaim_gtkconv_update_buddy_icon(conv); + conv = pidgin_conv_window_get_active_conversation(win); + pidgin_conv_update_buddy_icon(conv); } } @@ -6430,7 +6442,7 @@ GaimConversation *conv = l->data; if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) - gaim_gtkconv_update_buddy_icon(conv); + pidgin_conv_update_buddy_icon(conv); } } @@ -6447,7 +6459,7 @@ { GList *l; GaimConversation *conv = NULL; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; if(strcmp(gaim_prefs_get_string("/gaim/gtk/conversations/im/hide_new"), "away")!=0) return; @@ -6468,8 +6480,8 @@ if (!l) break; - gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); - gaim_gtkconv_placement_place(gtkconv); + pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); + pidgin_conv_placement_place(gtkconv); /* TODO: do we need to do anything for any other conversations that are in the same gtkconv here? * I'm a little concerned that not doing so will cause the "pending" indicator in the gtkblist not to be cleared. -DAA*/ @@ -6483,7 +6495,7 @@ { GList *l; GaimConversation *conv = NULL; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; gboolean when_away = FALSE; if(!hidden_convwin) @@ -6506,8 +6518,8 @@ gaim_conversation_get_account(conv)))) continue; - gaim_gtk_conv_window_remove_gtkconv(hidden_convwin, gtkconv); - gaim_gtkconv_placement_place(gtkconv); + pidgin_conv_window_remove_gtkconv(hidden_convwin, gtkconv); + pidgin_conv_placement_place(gtkconv); } } @@ -6521,15 +6533,15 @@ if (strcmp(name, "/gaim/gtk/conversations/placement")) return; - func = gaim_gtkconv_placement_get_fnc(value); + func = pidgin_conv_placement_get_fnc(value); if (func == NULL) return; - gaim_gtkconv_placement_set_current_func(func); -} - -static GaimGtkConversation * + pidgin_conv_placement_set_current_func(func); +} + +static PidginConversation * get_gtkconv_with_contact(GaimContact *contact) { GaimBlistNode *node; @@ -6542,7 +6554,7 @@ GaimConversation *conv; conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) - return GAIM_GTK_CONVERSATION(conv); + return PIDGIN_CONVERSATION(conv); } return NULL; } @@ -6561,8 +6573,8 @@ * one of the contacts containing the buddy corresponding to * a conversation. It's easier to just update them all. */ /* if (gaim_conversation_get_account(conv) == account) */ - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TAB_ICON | - GAIM_GTKCONV_MENU | GAIM_GTKCONV_COLORIZE_TITLE); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON | + PIDGIN_CONV_MENU | PIDGIN_CONV_COLORIZE_TITLE); } } @@ -6574,7 +6586,7 @@ conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TAB_ICON); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON); return FALSE; } @@ -6582,16 +6594,16 @@ static void update_buddy_status_changed(GaimBuddy *buddy, GaimStatus *old, GaimStatus *newstatus) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GaimConversation *conv; gtkconv = get_gtkconv_with_contact(gaim_buddy_get_contact(buddy)); if (gtkconv) { conv = gtkconv->active_conv; - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TAB_ICON | GAIM_GTKCONV_COLORIZE_TITLE); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON | PIDGIN_CONV_COLORIZE_TITLE); if ((gaim_status_is_online(old) ^ gaim_status_is_online(newstatus)) != 0) - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_MENU); + pidgin_conv_update_fields(conv, PIDGIN_CONV_MENU); } /* In case a conversation is started after the buddy has signed-on/off */ @@ -6601,13 +6613,13 @@ static void update_buddy_privacy_changed(GaimBuddy *buddy) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GaimConversation *conv; gtkconv = get_gtkconv_with_contact(gaim_buddy_get_contact(buddy)); if (gtkconv) { conv = gtkconv->active_conv; - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TAB_ICON | GAIM_GTKCONV_MENU); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON | PIDGIN_CONV_MENU); } } @@ -6618,7 +6630,7 @@ conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TAB_ICON); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON); } static void @@ -6628,7 +6640,7 @@ conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, buddy->name, buddy->account); if (conv) - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_BUDDY_ICON); + pidgin_conv_update_fields(conv, PIDGIN_CONV_BUDDY_ICON); } static void @@ -6652,40 +6664,40 @@ static void update_conversation_switched(GaimConversation *conv) { - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TAB_ICON | GAIM_GTKCONV_SET_TITLE | - GAIM_GTKCONV_MENU | GAIM_GTKCONV_BUDDY_ICON); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TAB_ICON | PIDGIN_CONV_SET_TITLE | + PIDGIN_CONV_MENU | PIDGIN_CONV_BUDDY_ICON); } static void update_buddy_typing(GaimAccount *account, const char *who) { GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, account); if (!conv) return; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); if (gtkconv && gtkconv->active_conv == conv) - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_COLORIZE_TITLE); + pidgin_conv_update_fields(conv, PIDGIN_CONV_COLORIZE_TITLE); } static void update_chat(GaimConversation *conv) { - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TOPIC | - GAIM_GTKCONV_MENU | GAIM_GTKCONV_SET_TITLE); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TOPIC | + PIDGIN_CONV_MENU | PIDGIN_CONV_SET_TITLE); } static void update_chat_topic(GaimConversation *conv, const char *old, const char *new) { - gaim_gtkconv_update_fields(conv, GAIM_GTKCONV_TOPIC); + pidgin_conv_update_fields(conv, PIDGIN_CONV_TOPIC); } void * -gaim_gtk_conversations_get_handle(void) +pidgin_conversations_get_handle(void) { static int handle; @@ -6693,9 +6705,9 @@ } void -gaim_gtk_conversations_init(void) -{ - void *handle = gaim_gtk_conversations_get_handle(); +pidgin_conversations_init(void) +{ + void *handle = pidgin_conversations_get_handle(); void *blist_handle = gaim_blist_get_handle(); /* Conversations */ @@ -6774,28 +6786,29 @@ gaim_signal_register(handle, "conversation-dragging", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_BOXED, - "GaimGtkWindow *"), + "PidginWindow *"), gaim_value_new(GAIM_TYPE_BOXED, - "GaimGtkWindow *")); + "PidginWindow *")); gaim_signal_register(handle, "conversation-timestamp", #if SIZEOF_TIME_T == 4 - gaim_marshal_POINTER__POINTER_INT, + gaim_marshal_POINTER__POINTER_INT_BOOLEAN, #elif SIZEOF_TIME_T == 8 - gaim_marshal_POINTER__POINTER_INT64, + gaim_marshal_POINTER__POINTER_INT64_BOOLEAN, #else #error Unkown size of time_t #endif - gaim_value_new(GAIM_TYPE_POINTER), 2, + gaim_value_new(GAIM_TYPE_STRING), 3, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONVERSATION), #if SIZEOF_TIME_T == 4 - gaim_value_new(GAIM_TYPE_INT)); + gaim_value_new(GAIM_TYPE_INT), #elif SIZEOF_TIME_T == 8 - gaim_value_new(GAIM_TYPE_INT64)); + gaim_value_new(GAIM_TYPE_INT64), #else # error Unknown size of time_t #endif + gaim_value_new(GAIM_TYPE_BOOLEAN)); gaim_signal_register(handle, "displaying-im-msg", gaim_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER, @@ -6881,7 +6894,7 @@ gaim_conversations_set_ui_ops(&conversation_ui_ops); - hidden_convwin = gaim_gtk_conv_window_new(); + hidden_convwin = pidgin_conv_window_new(); window_list = g_list_remove(window_list, hidden_convwin); gaim_signal_connect(gaim_accounts_get_handle(), "account-status-changed", @@ -6908,7 +6921,7 @@ handle, GAIM_CALLBACK(update_buddy_typing), NULL); gaim_signal_connect(gaim_conversations_get_handle(), "buddy-typing-stopped", handle, GAIM_CALLBACK(update_buddy_typing), NULL); - gaim_signal_connect(gaim_gtk_conversations_get_handle(), "conversation-switched", + gaim_signal_connect(pidgin_conversations_get_handle(), "conversation-switched", handle, GAIM_CALLBACK(update_conversation_switched), NULL); gaim_signal_connect(gaim_conversations_get_handle(), "chat-left", handle, GAIM_CALLBACK(update_chat), NULL); @@ -6917,17 +6930,17 @@ gaim_signal_connect(gaim_conversations_get_handle(), "chat-topic-changed", handle, GAIM_CALLBACK(update_chat_topic), NULL); gaim_signal_connect_priority(gaim_conversations_get_handle(), "conversation-updated", handle, - GAIM_CALLBACK(gaim_gtkconv_updated), NULL, + GAIM_CALLBACK(pidgin_conv_updated), NULL, GAIM_SIGNAL_PRIORITY_LOWEST); } void -gaim_gtk_conversations_uninit(void) -{ - gaim_prefs_disconnect_by_handle(gaim_gtk_conversations_get_handle()); - gaim_signals_disconnect_by_handle(gaim_gtk_conversations_get_handle()); - gaim_signals_unregister_by_instance(gaim_gtk_conversations_get_handle()); - gaim_gtk_conv_window_destroy(hidden_convwin); +pidgin_conversations_uninit(void) +{ + gaim_prefs_disconnect_by_handle(pidgin_conversations_get_handle()); + gaim_signals_disconnect_by_handle(pidgin_conversations_get_handle()); + gaim_signals_unregister_by_instance(pidgin_conversations_get_handle()); + pidgin_conv_window_destroy(hidden_convwin); hidden_convwin=NULL; } @@ -6975,7 +6988,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include <gdk/gdkkeysyms.h> @@ -7004,17 +7017,17 @@ #include "gtkimhtmltoolbar.h" static void -do_close(GtkWidget *w, int resp, GaimGtkWindow *win) +do_close(GtkWidget *w, int resp, PidginWindow *win) { gtk_widget_destroy(warn_close_dialog); warn_close_dialog = NULL; if (resp == GTK_RESPONSE_OK) - gaim_gtk_conv_window_destroy(win); -} - -static void -build_warn_close_dialog(GaimGtkWindow *gtkwin) + pidgin_conv_window_destroy(win); +} + +static void +build_warn_close_dialog(PidginWindow *gtkwin) { GtkWidget *label; GtkWidget *vbox, *hbox; @@ -7027,7 +7040,7 @@ _("Confirm close"), GTK_WINDOW(gtkwin->window), GTK_DIALOG_MODAL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GAIM_STOCK_CLOSE_TABS, GTK_RESPONSE_OK, NULL); + PIDGIN_STOCK_CLOSE_TABS, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(warn_close_dialog), GTK_RESPONSE_OK); @@ -7075,16 +7088,16 @@ static gboolean close_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) { - GaimGtkWindow *win = d; + PidginWindow *win = d; GList *l; /* If there are unread messages then show a warning dialog */ - for (l = gaim_gtk_conv_window_get_gtkconvs(win); + for (l = pidgin_conv_window_get_gtkconvs(win); l != NULL; l = l->next) { - GaimGtkConversation *gtkconv = l->data; + PidginConversation *gtkconv = l->data; if (gaim_conversation_get_type(gtkconv->active_conv) == GAIM_CONV_TYPE_IM && - gtkconv->unseen_state >= GAIM_UNSEEN_TEXT) + gtkconv->unseen_state >= PIDGIN_UNSEEN_TEXT) { build_warn_close_dialog(win); gtk_widget_show_all(warn_close_dialog); @@ -7093,22 +7106,22 @@ } } - gaim_gtk_conv_window_destroy(win); + pidgin_conv_window_destroy(win); return TRUE; } static void -gtkconv_set_unseen(GaimGtkConversation *gtkconv, GaimUnseenState state) -{ - if (state == GAIM_UNSEEN_NONE) +gtkconv_set_unseen(PidginConversation *gtkconv, GaimUnseenState state) +{ + if (state == PIDGIN_UNSEEN_NONE) { gtkconv->unseen_count = 0; - gtkconv->unseen_state = GAIM_UNSEEN_NONE; + gtkconv->unseen_state = PIDGIN_UNSEEN_NONE; } else { - if (state >= GAIM_UNSEEN_TEXT) + if (state >= PIDGIN_UNSEEN_TEXT) gtkconv->unseen_count++; if (state > gtkconv->unseen_state) @@ -7126,10 +7139,10 @@ static gint focus_win_cb(GtkWidget *w, GdkEventFocus *e, gpointer d) { - GaimGtkWindow *win = d; - GaimGtkConversation *gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); - - gtkconv_set_unseen(gtkconv, GAIM_UNSEEN_NONE); + PidginWindow *win = d; + PidginConversation *gtkconv = pidgin_conv_window_get_active_gtkconv(win); + + gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE); return FALSE; } @@ -7145,7 +7158,7 @@ #endif static void -notebook_init_grab(GaimGtkWindow *gtkwin, GtkWidget *widget) +notebook_init_grab(PidginWindow *gtkwin, GtkWidget *widget) { static GdkCursor *cursor = NULL; @@ -7173,7 +7186,7 @@ } static gboolean -notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, GaimGtkWindow *win) +notebook_motion_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win) { /* @@ -7191,17 +7204,17 @@ } } else { /* Otherwise, draw the arrows. */ - GaimGtkWindow *dest_win; + PidginWindow *dest_win; GtkNotebook *dest_notebook; GtkWidget *tab; gint nb_x, nb_y, page_num; gint arrow1_x, arrow1_y, arrow2_x, arrow2_y; gboolean horiz_tabs = FALSE; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; gboolean to_right = FALSE; /* Get the window that the cursor is over. */ - dest_win = gaim_gtk_conv_window_get_at_xy(e->x_root, e->y_root); + dest_win = pidgin_conv_window_get_at_xy(e->x_root, e->y_root); if (dest_win == NULL) { dnd_hints_hide_all(); @@ -7216,7 +7229,7 @@ arrow1_x = arrow2_x = nb_x; arrow1_y = arrow2_y = nb_y; - page_num = gaim_gtkconv_get_tab_at_xy(dest_win, + page_num = pidgin_conv_get_tab_at_xy(dest_win, e->x_root, e->y_root, &to_right); to_right = to_right && (win != dest_win); @@ -7226,7 +7239,7 @@ horiz_tabs = TRUE; } - gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(dest_win, page_num); + gtkconv = pidgin_conv_window_get_gtkconv_at_index(dest_win, page_num); tab = gtkconv->tabby; if (horiz_tabs) { @@ -7263,7 +7276,7 @@ } static gboolean -notebook_leave_cb(GtkWidget *widget, GdkEventCrossing *e, GaimGtkWindow *win) +notebook_leave_cb(GtkWidget *widget, GdkEventCrossing *e, PidginWindow *win) { if (win->in_drag) return FALSE; @@ -7284,7 +7297,7 @@ * THANK YOU GALEON! */ static gboolean -notebook_press_cb(GtkWidget *widget, GdkEventButton *e, GaimGtkWindow *win) +notebook_press_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win) { gint nb_x, nb_y, x_rel, y_rel; int tab_clicked; @@ -7292,13 +7305,13 @@ GtkWidget *tab; if (e->button == 2) { - GaimGtkConversation *gtkconv; - tab_clicked = gaim_gtkconv_get_tab_at_xy(win, e->x_root, e->y_root, NULL); + PidginConversation *gtkconv; + tab_clicked = pidgin_conv_get_tab_at_xy(win, e->x_root, e->y_root, NULL); if (tab_clicked == -1) return FALSE; - gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, tab_clicked); + gtkconv = pidgin_conv_window_get_gtkconv_at_index(win, tab_clicked); close_conv_cb(NULL, gtkconv); return TRUE; } @@ -7318,7 +7331,7 @@ * Make sure a tab was actually clicked. The arrow buttons * mess things up. */ - tab_clicked = gaim_gtkconv_get_tab_at_xy(win, e->x_root, e->y_root, NULL); + tab_clicked = pidgin_conv_get_tab_at_xy(win, e->x_root, e->y_root, NULL); if (tab_clicked == -1) return FALSE; @@ -7372,11 +7385,11 @@ } static gboolean -notebook_release_cb(GtkWidget *widget, GdkEventButton *e, GaimGtkWindow *win) -{ - GaimGtkWindow *dest_win; +notebook_release_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win) +{ + PidginWindow *dest_win; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; gint dest_page_num = 0; gboolean new_window = FALSE; gboolean to_right = FALSE; @@ -7429,16 +7442,16 @@ dnd_hints_hide_all(); - dest_win = gaim_gtk_conv_window_get_at_xy(e->x_root, e->y_root); - - conv = gaim_gtk_conv_window_get_active_conversation(win); + dest_win = pidgin_conv_window_get_at_xy(e->x_root, e->y_root); + + conv = pidgin_conv_window_get_active_conversation(win); if (dest_win == NULL) { /* If the current window doesn't have any other conversations, * there isn't much point transferring the conv to a new window. */ - if (gaim_gtk_conv_window_get_gtkconv_count(win) > 1) { + if (pidgin_conv_window_get_gtkconv_count(win) > 1) { /* Make a new window to stick this to. */ - dest_win = gaim_gtk_conv_window_new(); + dest_win = pidgin_conv_window_new(); new_window = TRUE; } } @@ -7446,23 +7459,23 @@ if (dest_win == NULL) return FALSE; - gaim_signal_emit(gaim_gtk_conversations_get_handle(), + gaim_signal_emit(pidgin_conversations_get_handle(), "conversation-dragging", win, dest_win); /* Get the destination page number. */ if (!new_window) - dest_page_num = gaim_gtkconv_get_tab_at_xy(dest_win, + dest_page_num = pidgin_conv_get_tab_at_xy(dest_win, e->x_root, e->y_root, &to_right); - gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, win->drag_tab); + gtkconv = pidgin_conv_window_get_gtkconv_at_index(win, win->drag_tab); if (win == dest_win) { gtk_notebook_reorder_child(GTK_NOTEBOOK(win->notebook), gtkconv->tab_cont, dest_page_num); } else { - gaim_gtk_conv_window_remove_gtkconv(win, gtkconv); - gaim_gtk_conv_window_add_gtkconv(dest_win, gtkconv); + pidgin_conv_window_remove_gtkconv(win, gtkconv); + pidgin_conv_window_add_gtkconv(dest_win, gtkconv); gtk_notebook_reorder_child(GTK_NOTEBOOK(dest_win->notebook), gtkconv->tab_cont, dest_page_num + to_right); - gaim_gtk_conv_window_switch_gtkconv(dest_win, gtkconv); + pidgin_conv_window_switch_gtkconv(dest_win, gtkconv); if (new_window) { gint win_width, win_height; @@ -7473,11 +7486,11 @@ e->x_root - (win_width / 2), e->y_root - (win_height / 2)); - gaim_gtk_conv_window_show(dest_win); + pidgin_conv_window_show(dest_win); } } - gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry); + gtk_widget_grab_focus(PIDGIN_CONVERSATION(conv)->entry); return TRUE; } @@ -7487,24 +7500,24 @@ before_switch_conv_cb(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer user_data) { - GaimGtkWindow *win; + PidginWindow *win; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; win = user_data; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); g_return_if_fail(conv != NULL); if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM) return; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); stop_anim(NULL, gtkconv); } static void -close_window(GtkWidget *w, GaimGtkWindow *win) +close_window(GtkWidget *w, PidginWindow *win) { close_win_cb(w, NULL, win); } @@ -7512,43 +7525,43 @@ static void detach_tab_cb(GtkWidget *w, GObject *menu) { - GaimGtkWindow *win, *new_window; - GaimGtkConversation *gtkconv; + PidginWindow *win, *new_window; + PidginConversation *gtkconv; gtkconv = g_object_get_data(menu, "clicked_tab"); if (!gtkconv) return; - win = gaim_gtkconv_get_window(gtkconv); + win = pidgin_conv_get_window(gtkconv); /* Nothing to do if there's only one tab in the window */ - if (gaim_gtk_conv_window_get_gtkconv_count(win) == 1) + if (pidgin_conv_window_get_gtkconv_count(win) == 1) return; - gaim_gtk_conv_window_remove_gtkconv(win, gtkconv); - - new_window = gaim_gtk_conv_window_new(); - gaim_gtk_conv_window_add_gtkconv(new_window, gtkconv); - gaim_gtk_conv_window_show(new_window); + pidgin_conv_window_remove_gtkconv(win, gtkconv); + + new_window = pidgin_conv_window_new(); + pidgin_conv_window_add_gtkconv(new_window, gtkconv); + pidgin_conv_window_show(new_window); } static void close_others_cb(GtkWidget *w, GObject *menu) { GList *iter; - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; gtkconv = g_object_get_data(menu, "clicked_tab"); if (!gtkconv) return; - win = gaim_gtkconv_get_window(gtkconv); - - for (iter = gaim_gtk_conv_window_get_gtkconvs(win); iter; ) + win = pidgin_conv_get_window(gtkconv); + + for (iter = pidgin_conv_window_get_gtkconvs(win); iter; ) { - GaimGtkConversation *gconv = iter->data; + PidginConversation *gconv = iter->data; iter = iter->next; if (gconv != gtkconv) @@ -7560,7 +7573,7 @@ static void close_tab_cb(GtkWidget *w, GObject *menu) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; gtkconv = g_object_get_data(menu, "clicked_tab"); @@ -7569,16 +7582,16 @@ } static gboolean -right_click_menu_cb(GtkNotebook *notebook, GdkEventButton *event, GaimGtkWindow *win) +right_click_menu_cb(GtkNotebook *notebook, GdkEventButton *event, PidginWindow *win) { GtkWidget *item, *menu; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; if (event->type != GDK_BUTTON_PRESS || event->button != 3) return FALSE; - gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, - gaim_gtkconv_get_tab_at_xy(win, event->x_root, event->y_root, NULL)); + gtkconv = pidgin_conv_window_get_gtkconv_at_index(win, + pidgin_conv_get_tab_at_xy(win, event->x_root, event->y_root, NULL)); if (g_object_get_data(G_OBJECT(notebook->menu), "clicked_tab")) { @@ -7589,7 +7602,7 @@ g_object_set_data(G_OBJECT(notebook->menu), "clicked_tab", gtkconv); menu = notebook->menu; - gaim_separator(GTK_WIDGET(menu)); + pidgin_separator(GTK_WIDGET(menu)); item = gtk_menu_item_new_with_label(_("Close other tabs")); gtk_widget_show(item); @@ -7603,7 +7616,7 @@ g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(close_window), win); - gaim_separator(menu); + pidgin_separator(menu); item = gtk_menu_item_new_with_label(_("Detach this tab")); gtk_widget_show(item); @@ -7624,20 +7637,20 @@ switch_conv_cb(GtkNotebook *notebook, GtkWidget *page, gint page_num, gpointer user_data) { - GaimGtkWindow *win; + PidginWindow *win; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; const char *sound_method; win = user_data; - gtkconv = gaim_gtk_conv_window_get_gtkconv_at_index(win, page_num); + gtkconv = pidgin_conv_window_get_gtkconv_at_index(win, page_num); conv = gtkconv->active_conv; g_return_if_fail(conv != NULL); /* clear unseen flag if conversation is not hidden */ - if(!gaim_gtkconv_is_hidden(gtkconv)) { - gtkconv_set_unseen(gtkconv, GAIM_UNSEEN_NONE); + if(!pidgin_conv_is_hidden(gtkconv)) { + gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE); } /* Update the menubar */ @@ -7648,7 +7661,7 @@ generate_send_to_items(win); regenerate_options_items(win); - gaim_gtkconv_switch_active_conversation(conv); + pidgin_conv_switch_active_conversation(conv); sound_method = gaim_prefs_get_string("/gaim/gtk/sound/method"); if (strcmp(sound_method, "none") != 0) @@ -7676,7 +7689,7 @@ (gtkconv->u.im->animate)) start_anim(NULL, gtkconv); - gaim_signal_emit(gaim_gtk_conversations_get_handle(), "conversation-switched", conv); + gaim_signal_emit(pidgin_conversations_get_handle(), "conversation-switched", conv); } /************************************************************************** @@ -7684,20 +7697,20 @@ **************************************************************************/ GList * -gaim_gtk_conv_windows_get_list() +pidgin_conv_windows_get_list() { return window_list; } -GaimGtkWindow * -gaim_gtk_conv_window_new() -{ - GaimGtkWindow *win; +PidginWindow * +pidgin_conv_window_new() +{ + PidginWindow *win; GtkPositionType pos; GtkWidget *testidea; GtkWidget *menubar; - win = g_malloc0(sizeof(GaimGtkWindow)); + win = g_malloc0(sizeof(PidginWindow)); window_list = g_list_append(window_list, win); @@ -7761,14 +7774,14 @@ #ifdef _WIN32 g_signal_connect(G_OBJECT(win->window), "show", - G_CALLBACK(gtkwgaim_ensure_onscreen), win->window); + G_CALLBACK(winpidgin_ensure_onscreen), win->window); #endif return win; } void -gaim_gtk_conv_window_destroy(GaimGtkWindow *win) +pidgin_conv_window_destroy(PidginWindow *win) { gaim_prefs_disconnect_by_handle(win); window_list = g_list_remove(window_list, win); @@ -7782,7 +7795,7 @@ if (win->gtkconvs) { while (win->gtkconvs) { GList *nextgtk = win->gtkconvs->next; - GaimGtkConversation *gtkconv = win->gtkconvs->data; + PidginConversation *gtkconv = win->gtkconvs->data; GList *nextcore = gtkconv->convs->next; GaimConversation *conv = gtkconv->convs->data; gaim_conversation_destroy(conv); @@ -7803,25 +7816,25 @@ } void -gaim_gtk_conv_window_show(GaimGtkWindow *win) +pidgin_conv_window_show(PidginWindow *win) { gtk_widget_show(win->window); } void -gaim_gtk_conv_window_hide(GaimGtkWindow *win) +pidgin_conv_window_hide(PidginWindow *win) { gtk_widget_hide(win->window); } void -gaim_gtk_conv_window_raise(GaimGtkWindow *win) +pidgin_conv_window_raise(PidginWindow *win) { gdk_window_raise(GDK_WINDOW(win->window->window)); } void -gaim_gtk_conv_window_switch_gtkconv(GaimGtkWindow *win, GaimGtkConversation *gtkconv) +pidgin_conv_window_switch_gtkconv(PidginWindow *win, PidginConversation *gtkconv) { gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), gtk_notebook_page_num(GTK_NOTEBOOK(win->notebook), @@ -7829,10 +7842,10 @@ } void -gaim_gtk_conv_window_add_gtkconv(GaimGtkWindow *win, GaimGtkConversation *gtkconv) +pidgin_conv_window_add_gtkconv(PidginWindow *win, PidginConversation *gtkconv) { GaimConversation *conv = gtkconv->active_conv; - GaimGtkConversation *focus_gtkconv; + PidginConversation *focus_gtkconv; GtkWidget *tabby, *menu_tabby; GtkWidget *tab_cont = gtkconv->tab_cont; GtkWidget *close_image; @@ -7949,7 +7962,7 @@ gtk_widget_show(menu_tabby); if (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) - gaim_gtkconv_update_buddy_icon(conv); + pidgin_conv_update_buddy_icon(conv); /* Add this pane to the conversation's notebook. */ gtk_notebook_append_page_menu(GTK_NOTEBOOK(win->notebook), tab_cont, tabby, menu_tabby); @@ -7958,7 +7971,7 @@ gtk_widget_show(tab_cont); - if (gaim_gtk_conv_window_get_gtkconv_count(win) == 1) { + if (pidgin_conv_window_get_gtkconv_count(win) == 1) { /* Er, bug in notebooks? Switch to the page manually. */ gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), 0); @@ -7967,16 +7980,16 @@ } else gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win->notebook), TRUE); - focus_gtkconv = g_list_nth_data(gaim_gtk_conv_window_get_gtkconvs(win), + focus_gtkconv = g_list_nth_data(pidgin_conv_window_get_gtkconvs(win), gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook))); gtk_widget_grab_focus(focus_gtkconv->entry); - if (gaim_gtk_conv_window_get_gtkconv_count(win) == 1) + if (pidgin_conv_window_get_gtkconv_count(win) == 1) update_send_to_selection(win); } void -gaim_gtk_conv_window_remove_gtkconv(GaimGtkWindow *win, GaimGtkConversation *gtkconv) +pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv) { unsigned int index; GaimConversationType conv_type; @@ -7990,7 +8003,7 @@ gtk_notebook_remove_page(GTK_NOTEBOOK(win->notebook), index); /* go back to tabless if need be */ - if (gaim_gtk_conv_window_get_gtkconv_count(win) <= 2) { + if (pidgin_conv_window_get_gtkconv_count(win) <= 2) { gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win->notebook), gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")); } @@ -7998,22 +8011,22 @@ win->gtkconvs = g_list_remove(win->gtkconvs, gtkconv); if (!win->gtkconvs && win != hidden_convwin) - gaim_gtk_conv_window_destroy(win); -} - -GaimGtkConversation * -gaim_gtk_conv_window_get_gtkconv_at_index(const GaimGtkWindow *win, int index) + pidgin_conv_window_destroy(win); +} + +PidginConversation * +pidgin_conv_window_get_gtkconv_at_index(const PidginWindow *win, int index) { GtkWidget *tab_cont; if (index == -1) index = 0; tab_cont = gtk_notebook_get_nth_page(GTK_NOTEBOOK(win->notebook), index); - return tab_cont ? g_object_get_data(G_OBJECT(tab_cont), "GaimGtkConversation") : NULL; -} - -GaimGtkConversation * -gaim_gtk_conv_window_get_active_gtkconv(const GaimGtkWindow *win) + return tab_cont ? g_object_get_data(G_OBJECT(tab_cont), "PidginConversation") : NULL; +} + +PidginConversation * +pidgin_conv_window_get_active_gtkconv(const PidginWindow *win) { int index; GtkWidget *tab_cont; @@ -8024,27 +8037,27 @@ tab_cont = gtk_notebook_get_nth_page(GTK_NOTEBOOK(win->notebook), index); if (!tab_cont) return NULL; - return g_object_get_data(G_OBJECT(tab_cont), "GaimGtkConversation"); + return g_object_get_data(G_OBJECT(tab_cont), "PidginConversation"); } GaimConversation * -gaim_gtk_conv_window_get_active_conversation(const GaimGtkWindow *win) -{ - GaimGtkConversation *gtkconv; - - gtkconv = gaim_gtk_conv_window_get_active_gtkconv(win); +pidgin_conv_window_get_active_conversation(const PidginWindow *win) +{ + PidginConversation *gtkconv; + + gtkconv = pidgin_conv_window_get_active_gtkconv(win); return gtkconv ? gtkconv->active_conv : NULL; } gboolean -gaim_gtk_conv_window_is_active_conversation(const GaimConversation *conv) -{ - return conv == gaim_gtk_conv_window_get_active_conversation(GAIM_GTK_CONVERSATION(conv)->win); +pidgin_conv_window_is_active_conversation(const GaimConversation *conv) +{ + return conv == pidgin_conv_window_get_active_conversation(PIDGIN_CONVERSATION(conv)->win); } gboolean -gaim_gtk_conv_window_has_focus(GaimGtkWindow *win) +pidgin_conv_window_has_focus(PidginWindow *win) { gboolean has_focus = FALSE; @@ -8053,10 +8066,10 @@ return has_focus; } -GaimGtkWindow * -gaim_gtk_conv_window_get_at_xy(int x, int y) -{ - GaimGtkWindow *win; +PidginWindow * +pidgin_conv_window_get_at_xy(int x, int y) +{ + PidginWindow *win; GdkWindow *gdkwin; GList *l; @@ -8065,7 +8078,7 @@ if (gdkwin) gdkwin = gdk_window_get_toplevel(gdkwin); - for (l = gaim_gtk_conv_windows_get_list(); l != NULL; l = l->next) { + for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) { win = l->data; if (gdkwin == win->window->window) @@ -8076,28 +8089,28 @@ } GList * -gaim_gtk_conv_window_get_gtkconvs(GaimGtkWindow *win) +pidgin_conv_window_get_gtkconvs(PidginWindow *win) { return win->gtkconvs; } guint -gaim_gtk_conv_window_get_gtkconv_count(GaimGtkWindow *win) +pidgin_conv_window_get_gtkconv_count(PidginWindow *win) { return g_list_length(win->gtkconvs); } -GaimGtkWindow * -gaim_gtk_conv_window_first_with_type(GaimConversationType type) +PidginWindow * +pidgin_conv_window_first_with_type(GaimConversationType type) { GList *wins, *convs; - GaimGtkWindow *win; - GaimGtkConversation *conv; + PidginWindow *win; + PidginConversation *conv; if (type == GAIM_CONV_TYPE_UNKNOWN) return NULL; - for (wins = gaim_gtk_conv_windows_get_list(); wins != NULL; wins = wins->next) { + for (wins = pidgin_conv_windows_get_list(); wins != NULL; wins = wins->next) { win = wins->data; for (convs = win->gtkconvs; @@ -8114,17 +8127,17 @@ return NULL; } -GaimGtkWindow * -gaim_gtk_conv_window_last_with_type(GaimConversationType type) +PidginWindow * +pidgin_conv_window_last_with_type(GaimConversationType type) { GList *wins, *convs; - GaimGtkWindow *win; - GaimGtkConversation *conv; + PidginWindow *win; + PidginConversation *conv; if (type == GAIM_CONV_TYPE_UNKNOWN) return NULL; - for (wins = g_list_last(gaim_gtk_conv_windows_get_list()); + for (wins = g_list_last(pidgin_conv_windows_get_list()); wins != NULL; wins = wins->prev) { @@ -8161,55 +8174,55 @@ /* This one places conversations in the last made window. */ static void -conv_placement_last_created_win(GaimGtkConversation *conv) -{ - GaimGtkWindow *win; - - GList *l = g_list_last(gaim_gtk_conv_windows_get_list()); +conv_placement_last_created_win(PidginConversation *conv) +{ + PidginWindow *win; + + GList *l = g_list_last(pidgin_conv_windows_get_list()); win = l ? l->data : NULL;; if (win == NULL) { - win = gaim_gtk_conv_window_new(); - - gaim_gtk_conv_window_add_gtkconv(win, conv); - gaim_gtk_conv_window_show(win); + win = pidgin_conv_window_new(); + + pidgin_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_show(win); } else { - gaim_gtk_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_add_gtkconv(win, conv); } } /* This one places conversations in the last made window of the same type. */ static void -conv_placement_last_created_win_type(GaimGtkConversation *conv) -{ - GaimGtkWindow *win; - - win = gaim_gtk_conv_window_last_with_type(gaim_conversation_get_type(conv->active_conv)); +conv_placement_last_created_win_type(PidginConversation *conv) +{ + PidginWindow *win; + + win = pidgin_conv_window_last_with_type(gaim_conversation_get_type(conv->active_conv)); if (win == NULL) { - win = gaim_gtk_conv_window_new(); - - gaim_gtk_conv_window_add_gtkconv(win, conv); - gaim_gtk_conv_window_show(win); + win = pidgin_conv_window_new(); + + pidgin_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_show(win); } else - gaim_gtk_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_add_gtkconv(win, conv); } /* This one places each conversation in its own window. */ static void -conv_placement_new_window(GaimGtkConversation *conv) -{ - GaimGtkWindow *win; - - win = gaim_gtk_conv_window_new(); - - gaim_gtk_conv_window_add_gtkconv(win, conv); - - gaim_gtk_conv_window_show(win); +conv_placement_new_window(PidginConversation *conv) +{ + PidginWindow *win; + + win = pidgin_conv_window_new(); + + pidgin_conv_window_add_gtkconv(win, conv); + + pidgin_conv_window_show(win); } static GaimGroup * -conv_get_group(GaimGtkConversation *conv) +conv_get_group(PidginConversation *conv) { GaimGroup *group = NULL; @@ -8241,7 +8254,7 @@ * open windows will get a new window. */ static void -conv_placement_by_group(GaimGtkConversation *conv) +conv_placement_by_group(PidginConversation *conv) { GaimConversationType type; GaimGroup *group = NULL; @@ -8252,9 +8265,9 @@ group = conv_get_group(conv); /* Go through the list of IMs and find one with this group. */ - for (wl = gaim_gtk_conv_windows_get_list(); wl != NULL; wl = wl->next) { - GaimGtkWindow *win2; - GaimGtkConversation *conv2; + for (wl = pidgin_conv_windows_get_list(); wl != NULL; wl = wl->next) { + PidginWindow *win2; + PidginConversation *conv2; GaimGroup *group2 = NULL; win2 = wl->data; @@ -8267,7 +8280,7 @@ group2 = conv_get_group(conv2); if (group == group2) { - gaim_gtk_conv_window_add_gtkconv(win2, conv); + pidgin_conv_window_add_gtkconv(win2, conv); return; } @@ -8280,7 +8293,7 @@ /* This groups things by account. Otherwise, the same semantics as above */ static void -conv_placement_by_account(GaimGtkConversation *conv) +conv_placement_by_account(PidginConversation *conv) { GaimConversationType type; GList *wins, *convs; @@ -8290,9 +8303,9 @@ type = gaim_conversation_get_type(conv->active_conv); /* Go through the list of IMs and find one with this group. */ - for (wins = gaim_gtk_conv_windows_get_list(); wins != NULL; wins = wins->next) { - GaimGtkWindow *win2; - GaimGtkConversation *conv2; + for (wins = pidgin_conv_windows_get_list(); wins != NULL; wins = wins->next) { + PidginWindow *win2; + PidginConversation *conv2; win2 = wins->data; @@ -8302,7 +8315,7 @@ conv2 = convs->data; if (account == gaim_conversation_get_account(conv2->active_conv)) { - gaim_gtk_conv_window_add_gtkconv(win2, conv); + pidgin_conv_window_add_gtkconv(win2, conv); return; } } @@ -8360,7 +8373,7 @@ } GList * -gaim_gtkconv_placement_get_options(void) +pidgin_conv_placement_get_options(void) { GList *n, *list = NULL; ConvPlacementData *data; @@ -8378,7 +8391,7 @@ void -gaim_gtkconv_placement_add_fnc(const char *id, const char *name, +pidgin_conv_placement_add_fnc(const char *id, const char *name, GaimConvPlacementFunc fnc) { g_return_if_fail(id != NULL); @@ -8391,7 +8404,7 @@ } void -gaim_gtkconv_placement_remove_fnc(const char *id) +pidgin_conv_placement_remove_fnc(const char *id) { ConvPlacementData *data = get_conv_placement_data(id); @@ -8406,7 +8419,7 @@ } const char * -gaim_gtkconv_placement_get_name(const char *id) +pidgin_conv_placement_get_name(const char *id) { ConvPlacementData *data; @@ -8421,7 +8434,7 @@ } GaimConvPlacementFunc -gaim_gtkconv_placement_get_fnc(const char *id) +pidgin_conv_placement_get_fnc(const char *id) { ConvPlacementData *data; @@ -8436,7 +8449,7 @@ } void -gaim_gtkconv_placement_set_current_func(GaimConvPlacementFunc func) +pidgin_conv_placement_set_current_func(GaimConvPlacementFunc func) { g_return_if_fail(func != NULL); @@ -8448,13 +8461,13 @@ } GaimConvPlacementFunc -gaim_gtkconv_placement_get_current_func(void) +pidgin_conv_placement_get_current_func(void) { return place_conv; } void -gaim_gtkconv_placement_place(GaimGtkConversation *gtkconv) +pidgin_conv_placement_place(PidginConversation *gtkconv) { if (place_conv) place_conv(gtkconv); @@ -8463,7 +8476,7 @@ } gboolean -gaim_gtkconv_is_hidden(GaimGtkConversation *gtkconv) +pidgin_conv_is_hidden(PidginConversation *gtkconv) { g_return_val_if_fail(gtkconv != NULL, FALSE);
--- a/pidgin/gtkconv.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkconv.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,23 +22,23 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKCONVERSATION_H_ -#define _GAIM_GTKCONVERSATION_H_ +#ifndef _PIDGIN_CONVERSATION_H_ +#define _PIDGIN_CONVERSATION_H_ -typedef struct _GaimGtkImPane GaimGtkImPane; -typedef struct _GaimGtkChatPane GaimGtkChatPane; -typedef struct _GaimGtkConversation GaimGtkConversation; +typedef struct _PidginImPane PidginImPane; +typedef struct _PidginChatPane PidginChatPane; +typedef struct _PidginConversation PidginConversation; /** * Unseen text states. */ typedef enum { - GAIM_UNSEEN_NONE, /**< No unseen text in the conversation. */ - GAIM_UNSEEN_EVENT, /**< Unseen events in the conversation. */ - GAIM_UNSEEN_NO_LOG, /**< Unseen text with NO_LOG flag. */ - GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ - GAIM_UNSEEN_NICK /**< Unseen text and the nick was said. */ + PIDGIN_UNSEEN_NONE, /**< No unseen text in the conversation. */ + PIDGIN_UNSEEN_EVENT, /**< Unseen events in the conversation. */ + PIDGIN_UNSEEN_NO_LOG, /**< Unseen text with NO_LOG flag. */ + PIDGIN_UNSEEN_TEXT, /**< Unseen text in the conversation. */ + PIDGIN_UNSEEN_NICK /**< Unseen text and the nick was said. */ } GaimUnseenState; enum { @@ -52,14 +52,14 @@ CHAT_USERS_COLUMNS }; -#define GAIM_GTK_CONVERSATION(conv) \ - ((GaimGtkConversation *)(conv)->ui_data) +#define PIDGIN_CONVERSATION(conv) \ + ((PidginConversation *)(conv)->ui_data) #define GAIM_IS_GTK_CONVERSATION(conv) \ (gaim_conversation_get_ui_ops(conv) == \ - gaim_gtk_conversations_get_conv_ui_ops()) + pidgin_conversations_get_conv_ui_ops()) -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" #include "gtkconvwin.h" @@ -76,7 +76,7 @@ /** * A GTK+ Instant Message pane. */ -struct _GaimGtkImPane +struct _PidginImPane { GtkWidget *block; GtkWidget *send_file; @@ -98,7 +98,7 @@ /** * GTK+ Chat panes. */ -struct _GaimGtkChatPane +struct _PidginChatPane { GtkWidget *count; GtkWidget *list; @@ -108,13 +108,13 @@ /** * A GTK+ conversation pane. */ -struct _GaimGtkConversation +struct _PidginConversation { GaimConversation *active_conv; GList *convs; GList *send_history; - GaimGtkWindow *win; + PidginWindow *win; gboolean make_sound; @@ -151,10 +151,12 @@ union { - GaimGtkImPane *im; - GaimGtkChatPane *chat; + PidginImPane *im; + PidginChatPane *chat; } u; + + time_t newday; }; /*@}*/ @@ -169,28 +171,28 @@ * * @return The GTK+ conversation operations structure. */ -GaimConversationUiOps *gaim_gtk_conversations_get_conv_ui_ops(void); +GaimConversationUiOps *pidgin_conversations_get_conv_ui_ops(void); /** * Updates the buddy icon on a conversation. * * @param conv The conversation. */ -void gaim_gtkconv_update_buddy_icon(GaimConversation *conv); +void pidgin_conv_update_buddy_icon(GaimConversation *conv); /** * Sets the active conversation within a GTK-conversation. * * @param conv The conversation */ -void gaim_gtkconv_switch_active_conversation(GaimConversation *conv); +void pidgin_conv_switch_active_conversation(GaimConversation *conv); /** * Updates conversation buttons by protocol. * * @param conv The conversation. */ -void gaim_gtkconv_update_buttons_by_protocol(GaimConversation *conv); +void pidgin_conv_update_buttons_by_protocol(GaimConversation *conv); /** * Returns a list of conversations of the given type which have an unseen @@ -208,7 +210,7 @@ * @return List of GaimConversation matching criteria, or NULL. */ GList * -gaim_gtk_conversations_find_unseen_list(GaimConversationType type, +pidgin_conversations_find_unseen_list(GaimConversationType type, GaimUnseenState min_state, gboolean hidden_only, guint max_count); @@ -222,20 +224,20 @@ * @return Number of conversations added to menu. */ guint -gaim_gtk_conversations_fill_menu(GtkWidget *menu, GList *convs); +pidgin_conversations_fill_menu(GtkWidget *menu, GList *convs); /** * Presents a gaim conversation to the user. * * @param conv The conversation. */ -void gaim_gtkconv_present_conversation(GaimConversation *conv); +void pidgin_conv_present_conversation(GaimConversation *conv); -GaimGtkWindow *gaim_gtkconv_get_window(GaimGtkConversation *gtkconv); -GdkPixbuf *gaim_gtkconv_get_tab_icon(GaimConversation *conv, gboolean small_icon); -void gaim_gtkconv_new(GaimConversation *conv); -int gaim_gtkconv_get_tab_at_xy(GaimGtkWindow *win, int x, int y, gboolean *to_right); -gboolean gaim_gtkconv_is_hidden(GaimGtkConversation *gtkconv); +PidginWindow *pidgin_conv_get_window(PidginConversation *gtkconv); +GdkPixbuf *pidgin_conv_get_tab_icon(GaimConversation *conv, gboolean small_icon); +void pidgin_conv_new(GaimConversation *conv); +int pidgin_conv_get_tab_at_xy(PidginWindow *win, int x, int y, gboolean *to_right); +gboolean pidgin_conv_is_hidden(PidginConversation *gtkconv); /*@}*/ /**************************************************************************/ @@ -248,18 +250,18 @@ * * @return The conversations subsystem handle. */ -void *gaim_gtk_conversations_get_handle(void); +void *pidgin_conversations_get_handle(void); /** * Initializes the GTK+ conversations subsystem. */ -void gaim_gtk_conversations_init(void); +void pidgin_conversations_init(void); /** * Uninitialized the GTK+ conversation subsystem. */ -void gaim_gtk_conversations_uninit(void); +void pidgin_conversations_uninit(void); /*@}*/ -#endif /* _GAIM_GTKCONVERSATION_H_ */ +#endif /* _PIDGIN_CONVERSATION_H_ */
--- a/pidgin/gtkconvwin.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkconvwin.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,10 +22,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKCONVERSATION_WINDOW_H_ -#define _GAIM_GTKCONVERSATION_WINDOW_H_ +#ifndef _PIDGIN_CONVERSATION_WINDOW_H_ +#define _PIDGIN_CONVERSATION_WINDOW_H_ -typedef struct _GaimGtkWindow GaimGtkWindow; +typedef struct _PidginWindow PidginWindow; /************************************************************************** @@ -37,7 +37,7 @@ * A GTK+ representation of a graphical window containing one or more * conversations. */ -struct _GaimGtkWindow +struct _PidginWindow { GtkWidget *window; /**< The window. */ GtkWidget *notebook; /**< The notebook of conversations. */ @@ -104,26 +104,26 @@ **************************************************************************/ /*@{*/ -GaimGtkWindow * gaim_gtk_conv_window_new(void); -void gaim_gtk_conv_window_destroy(GaimGtkWindow *win); -GList *gaim_gtk_conv_windows_get_list(void); -void gaim_gtk_conv_window_show(GaimGtkWindow *win); -void gaim_gtk_conv_window_hide(GaimGtkWindow *win); -void gaim_gtk_conv_window_raise(GaimGtkWindow *win); -void gaim_gtk_conv_window_switch_gtkconv(GaimGtkWindow *win, GaimGtkConversation *gtkconv); -void gaim_gtk_conv_window_add_gtkconv(GaimGtkWindow *win, GaimGtkConversation *gtkconv); -void gaim_gtk_conv_window_remove_gtkconv(GaimGtkWindow *win, GaimGtkConversation *gtkconv); -GaimGtkConversation *gaim_gtk_conv_window_get_gtkconv_at_index(const GaimGtkWindow *win, int index); -GaimGtkConversation *gaim_gtk_conv_window_get_active_gtkconv(const GaimGtkWindow *win); -GaimConversation *gaim_gtk_conv_window_get_active_conversation(const GaimGtkWindow *win); -gboolean gaim_gtk_conv_window_is_active_conversation(const GaimConversation *conv); -gboolean gaim_gtk_conv_window_has_focus(GaimGtkWindow *win); -GaimGtkWindow *gaim_gtk_conv_window_get_at_xy(int x, int y); -GList *gaim_gtk_conv_window_get_gtkconvs(GaimGtkWindow *win); -guint gaim_gtk_conv_window_get_gtkconv_count(GaimGtkWindow *win); +PidginWindow * pidgin_conv_window_new(void); +void pidgin_conv_window_destroy(PidginWindow *win); +GList *pidgin_conv_windows_get_list(void); +void pidgin_conv_window_show(PidginWindow *win); +void pidgin_conv_window_hide(PidginWindow *win); +void pidgin_conv_window_raise(PidginWindow *win); +void pidgin_conv_window_switch_gtkconv(PidginWindow *win, PidginConversation *gtkconv); +void pidgin_conv_window_add_gtkconv(PidginWindow *win, PidginConversation *gtkconv); +void pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv); +PidginConversation *pidgin_conv_window_get_gtkconv_at_index(const PidginWindow *win, int index); +PidginConversation *pidgin_conv_window_get_active_gtkconv(const PidginWindow *win); +GaimConversation *pidgin_conv_window_get_active_conversation(const PidginWindow *win); +gboolean pidgin_conv_window_is_active_conversation(const GaimConversation *conv); +gboolean pidgin_conv_window_has_focus(PidginWindow *win); +PidginWindow *pidgin_conv_window_get_at_xy(int x, int y); +GList *pidgin_conv_window_get_gtkconvs(PidginWindow *win); +guint pidgin_conv_window_get_gtkconv_count(PidginWindow *win); -GaimGtkWindow *gaim_gtk_conv_window_first_with_type(GaimConversationType type); -GaimGtkWindow *gaim_gtk_conv_window_last_with_type(GaimConversationType type); +PidginWindow *pidgin_conv_window_first_with_type(GaimConversationType type); +PidginWindow *pidgin_conv_window_last_with_type(GaimConversationType type); /*@}*/ @@ -132,17 +132,17 @@ **************************************************************************/ /*@{*/ -typedef void (*GaimConvPlacementFunc)(GaimGtkConversation *); +typedef void (*GaimConvPlacementFunc)(PidginConversation *); -GList *gaim_gtkconv_placement_get_options(void); -void gaim_gtkconv_placement_add_fnc(const char *id, const char *name, GaimConvPlacementFunc fnc); -void gaim_gtkconv_placement_remove_fnc(const char *id); -const char *gaim_gtkconv_placement_get_name(const char *id); -GaimConvPlacementFunc gaim_gtkconv_placement_get_fnc(const char *id); -void gaim_gtkconv_placement_set_current_func(GaimConvPlacementFunc func); -GaimConvPlacementFunc gaim_gtkconv_placement_get_current_func(void); -void gaim_gtkconv_placement_place(GaimGtkConversation *gtkconv); +GList *pidgin_conv_placement_get_options(void); +void pidgin_conv_placement_add_fnc(const char *id, const char *name, GaimConvPlacementFunc fnc); +void pidgin_conv_placement_remove_fnc(const char *id); +const char *pidgin_conv_placement_get_name(const char *id); +GaimConvPlacementFunc pidgin_conv_placement_get_fnc(const char *id); +void pidgin_conv_placement_set_current_func(GaimConvPlacementFunc func); +GaimConvPlacementFunc pidgin_conv_placement_get_current_func(void); +void pidgin_conv_placement_place(PidginConversation *gtkconv); /*@}*/ -#endif /* _GAIM_GTKCONVERSATION_WINDOW_H_ */ +#endif /* _PIDGIN_CONVERSATION_WINDOW_H_ */
--- a/pidgin/gtkdebug.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdebug.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "notify.h" #include "prefs.h" @@ -87,7 +87,7 @@ static gint debug_window_destroy(GtkWidget *w, GdkEvent *event, void *unused) { - gaim_prefs_disconnect_by_handle(gaim_gtk_debug_get_handle()); + gaim_prefs_disconnect_by_handle(pidgin_debug_get_handle()); #ifdef HAVE_REGEX_H if(debug_win->timer != 0) { @@ -198,7 +198,7 @@ gtk_entry_set_activates_default(GTK_ENTRY(f->entry), TRUE); gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(f->entry)); g_signal_connect(G_OBJECT(f->entry), "changed", - G_CALLBACK(gaim_gtk_set_sensitive_if_input), + G_CALLBACK(pidgin_set_sensitive_if_input), win->find); gtk_box_pack_start(GTK_BOX(hbox), f->entry, FALSE, FALSE, 0); @@ -590,11 +590,11 @@ static void regex_popup_cb(GtkEntry *entry, GtkWidget *menu, DebugWindow *win) { - gaim_separator(menu); - gaim_new_check_item(menu, _("Invert"), + pidgin_separator(menu); + pidgin_new_check_item(menu, _("Invert"), G_CALLBACK(regex_menu_cb), "/gaim/gtk/debug/invert", win->invert); - gaim_new_check_item(menu, _("Highlight matches"), + pidgin_new_check_item(menu, _("Highlight matches"), G_CALLBACK(regex_menu_cb), "/gaim/gtk/debug/highlight", win->highlight); } @@ -699,7 +699,7 @@ width = gaim_prefs_get_int("/gaim/gtk/debug/width"); height = gaim_prefs_get_int("/gaim/gtk/debug/height"); - GAIM_DIALOG(win->window); + PIDGIN_DIALOG(win->window); gaim_debug_info("gtkdebug", "Setting dimensions to %d, %d\n", width, height); @@ -712,7 +712,7 @@ g_signal_connect(G_OBJECT(win->window), "configure_event", G_CALLBACK(configure_cb), win); - handle = gaim_gtk_debug_get_handle(); + handle = pidgin_debug_get_handle(); #ifdef HAVE_REGEX_H /* the list store for all the messages */ @@ -770,7 +770,7 @@ gtk_toolbar_insert_space(GTK_TOOLBAR(toolbar), -1); /* Pause */ - image = gtk_image_new_from_stock(GAIM_STOCK_PAUSE, GTK_ICON_SIZE_MENU); + image = gtk_image_new_from_stock(PIDGIN_STOCK_PAUSE, GTK_ICON_SIZE_MENU); gtk_toolbar_append_element(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_CHILD_TOGGLEBUTTON, NULL, _("Pause"), _("Pause"), @@ -874,7 +874,7 @@ } /* Add the gtkimhtml */ - frame = gaim_gtk_create_imhtml(FALSE, &win->text, NULL, NULL); + frame = pidgin_create_imhtml(FALSE, &win->text, NULL, NULL); gtk_imhtml_set_format_functions(GTK_IMHTML(win->text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY ^ GTK_IMHTML_IMAGE); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); @@ -898,9 +898,9 @@ gconstpointer value, gpointer data) { if (value) - gaim_gtk_debug_window_show(); + pidgin_debug_window_show(); else - gaim_gtk_debug_window_hide(); + pidgin_debug_window_hide(); } static void @@ -956,7 +956,7 @@ #endif void -gaim_gtk_debug_init(void) +pidgin_debug_init(void) { /* Debug window preferences. */ /* @@ -1010,13 +1010,13 @@ } void -gaim_gtk_debug_uninit(void) +pidgin_debug_uninit(void) { gaim_debug_set_ui_ops(NULL); } void -gaim_gtk_debug_window_show(void) +pidgin_debug_window_show(void) { if (debug_win == NULL) debug_win = debug_window_new(); @@ -1027,7 +1027,7 @@ } void -gaim_gtk_debug_window_hide(void) +pidgin_debug_window_hide(void) { if (debug_win != NULL) { gtk_widget_destroy(debug_win->window); @@ -1036,7 +1036,7 @@ } static void -gaim_gtk_debug_print(GaimDebugLevel level, const char *category, +pidgin_debug_print(GaimDebugLevel level, const char *category, const char *arg_s) { #ifdef HAVE_REGEX_H @@ -1106,17 +1106,17 @@ static GaimDebugUiOps ops = { - gaim_gtk_debug_print, + pidgin_debug_print, }; GaimDebugUiOps * -gaim_gtk_debug_get_ui_ops(void) +pidgin_debug_get_ui_ops(void) { return &ops; } void * -gaim_gtk_debug_get_handle() { +pidgin_debug_get_handle() { static int handle; return &handle;
--- a/pidgin/gtkdebug.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdebug.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,43 +22,43 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKDEBUG_H_ -#define _GAIM_GTKDEBUG_H_ +#ifndef _PIDGINDEBUG_H_ +#define _PIDGINDEBUG_H_ #include "debug.h" /** * Initializes the GTK+ debug system. */ -void gaim_gtk_debug_init(void); +void pidgin_debug_init(void); /** * Uninitialized the GTK+ debug system. */ -void gaim_gtk_debug_uninit(void); +void pidgin_debug_uninit(void); /** * Get the handle for the GTK+ debug system. * * @return the handle to the debug system */ -void *gaim_gtk_debug_get_handle(void); +void *pidgin_debug_get_handle(void); /** * Shows the debug window. */ -void gaim_gtk_debug_window_show(void); +void pidgin_debug_window_show(void); /** * Hides the debug window. */ -void gaim_gtk_debug_window_hide(void); +void pidgin_debug_window_hide(void); /** * Returns the UI operations structure for GTK+ debug output. * * @return The GTK+ UI debug operations structure. */ -GaimDebugUiOps *gaim_gtk_debug_get_ui_ops(void); +GaimDebugUiOps *pidgin_debug_get_ui_ops(void); -#endif /* _GAIM_GTKDEBUG_H_ */ +#endif /* _PIDGINDEBUG_H_ */
--- a/pidgin/gtkdialogs.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdialogs.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "debug.h" #include "notify.h" @@ -233,7 +233,7 @@ }; void -gaim_gtkdialogs_destroy_all() +pidgindialogs_destroy_all() { while (dialogwindows) { gtk_widget_destroy(dialogwindows->data); @@ -251,7 +251,7 @@ /* This function puts the version number onto the pixmap we use in the 'about' * screen in Gaim. */ static void -gaim_gtk_logo_versionize(GdkPixbuf **original, GtkWidget *widget) { +pidgin_logo_versionize(GdkPixbuf **original, GtkWidget *widget) { GdkPixmap *pixmap; GtkStyle *style; PangoContext *context; @@ -286,7 +286,7 @@ g_object_unref(G_OBJECT(pixmap)); } -void gaim_gtkdialogs_about() +void pidgindialogs_about() { GtkWidget *hbox; GtkWidget *vbox; @@ -307,7 +307,7 @@ return; } - GAIM_DIALOG(about); + PIDGIN_DIALOG(about); gtk_window_set_title(GTK_WINDOW(about), _("About " PIDGIN_NAME)); gtk_window_set_role(GTK_WINDOW(about), "about"); gtk_window_set_resizable(GTK_WINDOW(about), TRUE); @@ -326,7 +326,7 @@ filename = g_build_filename(DATADIR, "pixmaps", "gaim", "logo.png", NULL); pixbuf = gdk_pixbuf_new_from_file(filename, NULL); g_free(filename); - gaim_gtk_logo_versionize(&pixbuf, logo); + pidgin_logo_versionize(&pixbuf, logo); gtk_widget_destroy(logo); logo = gtk_image_new_from_pixbuf(pixbuf); gdk_pixbuf_unref(pixbuf); @@ -335,7 +335,7 @@ atk_object_set_description(obj, PIDGIN_NAME " " VERSION); gtk_box_pack_start(GTK_BOX(vbox), logo, FALSE, FALSE, 0); - frame = gaim_gtk_create_imhtml(FALSE, &text, NULL, NULL); + frame = pidgin_create_imhtml(FALSE, &text, NULL, NULL); gtk_imhtml_set_format_functions(GTK_IMHTML(text), GTK_IMHTML_ALL ^ GTK_IMHTML_SMILEY); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); @@ -665,7 +665,7 @@ } static void -gaim_gtkdialogs_im_cb(gpointer data, GaimRequestFields *fields) +pidgindialogs_im_cb(gpointer data, GaimRequestFields *fields) { GaimAccount *account; const char *username; @@ -673,11 +673,11 @@ account = gaim_request_fields_get_account(fields, "account"); username = gaim_request_fields_get_string(fields, "screenname"); - gaim_gtkdialogs_im_with_user(account, username); + pidgindialogs_im_with_user(account, username); } void -gaim_gtkdialogs_im(void) +pidgindialogs_im(void) { GaimRequestFields *fields; GaimRequestFieldGroup *group; @@ -706,13 +706,13 @@ _("Please enter the screen name or alias of the person " "you would like to IM."), fields, - _("OK"), G_CALLBACK(gaim_gtkdialogs_im_cb), + _("OK"), G_CALLBACK(pidgindialogs_im_cb), _("Cancel"), NULL, NULL); } void -gaim_gtkdialogs_im_with_user(GaimAccount *account, const char *username) +pidgindialogs_im_with_user(GaimAccount *account, const char *username) { GaimConversation *conv; @@ -724,11 +724,11 @@ if (conv == NULL) conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, username); - gaim_gtkconv_present_conversation(conv); + pidgin_conv_present_conversation(conv); } static gboolean -gaim_gtkdialogs_ee(const char *ee) +pidgindialogs_ee(const char *ee) { GtkWidget *window; GtkWidget *hbox; @@ -793,7 +793,7 @@ } static void -gaim_gtkdialogs_info_cb(gpointer data, GaimRequestFields *fields) +pidgindialogs_info_cb(gpointer data, GaimRequestFields *fields) { char *username; gboolean found = FALSE; @@ -805,7 +805,7 @@ gaim_request_fields_get_string(fields, "screenname"))); if (username != NULL && gaim_str_has_suffix(username, "rocksmyworld")) - found = gaim_gtkdialogs_ee(username); + found = pidgindialogs_ee(username); if (!found && username != NULL && *username != '\0' && account != NULL) serv_get_info(gaim_account_get_connection(account), username); @@ -814,7 +814,7 @@ } void -gaim_gtkdialogs_info(void) +pidgindialogs_info(void) { GaimRequestFields *fields; GaimRequestFieldGroup *group; @@ -843,13 +843,13 @@ _("Please enter the screen name or alias of the person " "whose info you would like to view."), fields, - _("OK"), G_CALLBACK(gaim_gtkdialogs_info_cb), + _("OK"), G_CALLBACK(pidgindialogs_info_cb), _("Cancel"), NULL, NULL); } static void -gaim_gtkdialogs_log_cb(gpointer data, GaimRequestFields *fields) +pidgindialogs_log_cb(gpointer data, GaimRequestFields *fields) { char *username; GaimAccount *account; @@ -862,10 +862,10 @@ if (username != NULL && *username != '\0' && account != NULL) { - GaimGtkBuddyList *gtkblist = gaim_gtk_blist_get_default_gtk_blist(); + PidginBuddyList *gtkblist = pidgin_blist_get_default_gtk_blist(); GSList *buddies; - gaim_gtk_set_cursor(gtkblist->window, GDK_WATCH); + pidgin_set_cursor(gtkblist->window, GDK_WATCH); buddies = gaim_find_buddies(account, username); for (cur = buddies; cur != NULL; cur = cur->next) @@ -873,18 +873,18 @@ GaimBlistNode *node = cur->data; if ((node != NULL) && ((node->prev != NULL) || (node->next != NULL))) { - gaim_gtk_log_show_contact((GaimContact *)node->parent); + pidgin_log_show_contact((GaimContact *)node->parent); g_slist_free(buddies); - gaim_gtk_clear_cursor(gtkblist->window); + pidgin_clear_cursor(gtkblist->window); g_free(username); return; } } g_slist_free(buddies); - gaim_gtk_log_show(GAIM_LOG_IM, username, account); + pidgin_log_show(GAIM_LOG_IM, username, account); - gaim_gtk_clear_cursor(gtkblist->window); + pidgin_clear_cursor(gtkblist->window); } g_free(username); @@ -894,7 +894,7 @@ * TODO - This needs to deal with logs of all types, not just IM logs. */ void -gaim_gtkdialogs_log(void) +pidgindialogs_log(void) { GaimRequestFields *fields; GaimRequestFieldGroup *group; @@ -934,38 +934,38 @@ _("Please enter the screen name or alias of the person " "whose log you would like to view."), fields, - _("OK"), G_CALLBACK(gaim_gtkdialogs_log_cb), + _("OK"), G_CALLBACK(pidgindialogs_log_cb), _("Cancel"), NULL, NULL); } static void -gaim_gtkdialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) +pidgindialogs_alias_contact_cb(GaimContact *contact, const char *new_alias) { gaim_contact_set_alias(contact, new_alias); } void -gaim_gtkdialogs_alias_contact(GaimContact *contact) +pidgindialogs_alias_contact(GaimContact *contact) { g_return_if_fail(contact != NULL); gaim_request_input(NULL, _("Alias Contact"), NULL, _("Enter an alias for this contact."), contact->alias, FALSE, FALSE, NULL, - _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_contact_cb), + _("Alias"), G_CALLBACK(pidgindialogs_alias_contact_cb), _("Cancel"), NULL, contact); } static void -gaim_gtkdialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias) +pidgindialogs_alias_buddy_cb(GaimBuddy *buddy, const char *new_alias) { gaim_blist_alias_buddy(buddy, new_alias); serv_alias_buddy(buddy); } void -gaim_gtkdialogs_alias_buddy(GaimBuddy *buddy) +pidgindialogs_alias_buddy(GaimBuddy *buddy) { gchar *secondary; @@ -975,32 +975,32 @@ gaim_request_input(NULL, _("Alias Buddy"), NULL, secondary, buddy->alias, FALSE, FALSE, NULL, - _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_buddy_cb), + _("Alias"), G_CALLBACK(pidgindialogs_alias_buddy_cb), _("Cancel"), NULL, buddy); g_free(secondary); } static void -gaim_gtkdialogs_alias_chat_cb(GaimChat *chat, const char *new_alias) +pidgindialogs_alias_chat_cb(GaimChat *chat, const char *new_alias) { gaim_blist_alias_chat(chat, new_alias); } void -gaim_gtkdialogs_alias_chat(GaimChat *chat) +pidgindialogs_alias_chat(GaimChat *chat) { g_return_if_fail(chat != NULL); gaim_request_input(NULL, _("Alias Chat"), NULL, _("Enter an alias for this chat."), chat->alias, FALSE, FALSE, NULL, - _("Alias"), G_CALLBACK(gaim_gtkdialogs_alias_chat_cb), + _("Alias"), G_CALLBACK(pidgindialogs_alias_chat_cb), _("Cancel"), NULL, chat); } static void -gaim_gtkdialogs_remove_contact_cb(GaimContact *contact) +pidgindialogs_remove_contact_cb(GaimContact *contact) { GaimBlistNode *bnode, *cnode; GaimGroup *group; @@ -1016,7 +1016,7 @@ } void -gaim_gtkdialogs_remove_contact(GaimContact *contact) +pidgindialogs_remove_contact(GaimContact *contact) { GaimBuddy *buddy = gaim_contact_get_priority_buddy(contact); @@ -1025,7 +1025,7 @@ if (((GaimBlistNode*)contact)->child == (GaimBlistNode*)buddy && !((GaimBlistNode*)buddy)->next) { - gaim_gtkdialogs_remove_buddy(buddy); + pidgindialogs_remove_buddy(buddy); } else { gchar *text; text = g_strdup_printf( @@ -1039,7 +1039,7 @@ buddy->name, contact->totalsize - 1); gaim_request_action(contact, NULL, _("Remove Contact"), text, 0, contact, 2, - _("_Remove Contact"), G_CALLBACK(gaim_gtkdialogs_remove_contact_cb), + _("_Remove Contact"), G_CALLBACK(pidgindialogs_remove_contact_cb), _("Cancel"), NULL); g_free(text); @@ -1053,14 +1053,14 @@ } static void -gaim_gtkdialogs_merge_groups_cb(struct _GaimGroupMergeObject *GGP) +pidgindialogs_merge_groups_cb(struct _GaimGroupMergeObject *GGP) { gaim_blist_rename_group(GGP->parent, GGP->new_name); free_ggmo(GGP); } void -gaim_gtkdialogs_merge_groups(GaimGroup *source, const char *new_name) +pidgindialogs_merge_groups(GaimGroup *source, const char *new_name) { gchar *text; struct _GaimGroupMergeObject *ggp; @@ -1077,14 +1077,14 @@ ggp->new_name = g_strdup(new_name); gaim_request_action(source, NULL, _("Merge Groups"), text, 0, ggp, 2, - _("_Merge Groups"), G_CALLBACK(gaim_gtkdialogs_merge_groups_cb), + _("_Merge Groups"), G_CALLBACK(pidgindialogs_merge_groups_cb), _("Cancel"), G_CALLBACK(free_ggmo)); g_free(text); } static void -gaim_gtkdialogs_remove_group_cb(GaimGroup *group) +pidgindialogs_remove_group_cb(GaimGroup *group) { GaimBlistNode *cnode, *bnode; @@ -1121,7 +1121,7 @@ } void -gaim_gtkdialogs_remove_group(GaimGroup *group) +pidgindialogs_remove_group(GaimGroup *group) { gchar *text; @@ -1131,7 +1131,7 @@ group->name); gaim_request_action(group, NULL, _("Remove Group"), text, 0, group, 2, - _("_Remove Group"), G_CALLBACK(gaim_gtkdialogs_remove_group_cb), + _("_Remove Group"), G_CALLBACK(pidgindialogs_remove_group_cb), _("Cancel"), NULL); g_free(text); @@ -1139,7 +1139,7 @@ /* XXX - Some of this should be moved into the core, methinks. */ static void -gaim_gtkdialogs_remove_buddy_cb(GaimBuddy *buddy) +pidgindialogs_remove_buddy_cb(GaimBuddy *buddy) { GaimGroup *group; gchar *name; @@ -1158,7 +1158,7 @@ } void -gaim_gtkdialogs_remove_buddy(GaimBuddy *buddy) +pidgindialogs_remove_buddy(GaimBuddy *buddy) { gchar *text; @@ -1168,20 +1168,20 @@ buddy->name); gaim_request_action(buddy, NULL, _("Remove Buddy"), text, 0, buddy, 2, - _("_Remove Buddy"), G_CALLBACK(gaim_gtkdialogs_remove_buddy_cb), + _("_Remove Buddy"), G_CALLBACK(pidgindialogs_remove_buddy_cb), _("Cancel"), NULL); g_free(text); } static void -gaim_gtkdialogs_remove_chat_cb(GaimChat *chat) +pidgindialogs_remove_chat_cb(GaimChat *chat) { gaim_blist_remove_chat(chat); } void -gaim_gtkdialogs_remove_chat(GaimChat *chat) +pidgindialogs_remove_chat(GaimChat *chat) { const gchar *name; gchar *text; @@ -1193,7 +1193,7 @@ name ? name : ""); gaim_request_action(chat, NULL, _("Remove Chat"), text, 0, chat, 2, - _("_Remove Chat"), G_CALLBACK(gaim_gtkdialogs_remove_chat_cb), + _("_Remove Chat"), G_CALLBACK(pidgindialogs_remove_chat_cb), _("Cancel"), NULL); g_free(text);
--- a/pidgin/gtkdialogs.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdialogs.h Mon Feb 05 03:37:27 2007 +0000 @@ -3,7 +3,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -21,38 +21,38 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKDIALOGS_H_ -#define _GAIM_GTKDIALOGS_H_ +#ifndef _PIDGINDIALOGS_H_ +#define _PIDGINDIALOGS_H_ -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" #include "conversation.h" /* Functions in gtkdialogs.c (these should actually stay in this file) */ -void gaim_gtkdialogs_destroy_all(void); -void gaim_gtkdialogs_about(void); -void gaim_gtkdialogs_im(void); -void gaim_gtkdialogs_im_with_user(GaimAccount *, const char *); -void gaim_gtkdialogs_info(void); -void gaim_gtkdialogs_log(void); -void gaim_gtkdialogs_alias_contact(GaimContact *); -void gaim_gtkdialogs_alias_buddy(GaimBuddy *); -void gaim_gtkdialogs_alias_chat(GaimChat *); +void pidgindialogs_destroy_all(void); +void pidgindialogs_about(void); +void pidgindialogs_im(void); +void pidgindialogs_im_with_user(GaimAccount *, const char *); +void pidgindialogs_info(void); +void pidgindialogs_log(void); +void pidgindialogs_alias_contact(GaimContact *); +void pidgindialogs_alias_buddy(GaimBuddy *); +void pidgindialogs_alias_chat(GaimChat *); -void gaim_gtkdialogs_remove_buddy(GaimBuddy *); -void gaim_gtkdialogs_remove_group(GaimGroup *); -void gaim_gtkdialogs_remove_chat(GaimChat *); -void gaim_gtkdialogs_remove_contact(GaimContact *); -void gaim_gtkdialogs_merge_groups(GaimGroup *, const char *); +void pidgindialogs_remove_buddy(GaimBuddy *); +void pidgindialogs_remove_group(GaimGroup *); +void pidgindialogs_remove_chat(GaimChat *); +void pidgindialogs_remove_contact(GaimContact *); +void pidgindialogs_merge_groups(GaimGroup *, const char *); /* Everything after this should probably be moved elsewhere */ /** * Our UI's identifier. */ -#define GAIM_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \ +#define PIDGIN_DIALOG(x) x = gtk_window_new(GTK_WINDOW_TOPLEVEL); \ gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG) -#define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED) +#define PIDGIN_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED) -#endif /* _GAIM_GTKDIALOGS_H_ */ +#endif /* _PIDGINDIALOGS_H_ */
--- a/pidgin/gtkdnd-hints.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdnd-hints.h Mon Feb 05 03:37:27 2007 +0000 @@ -2,7 +2,7 @@ * @file gtkdnd-hints.h GTK+ Drag-and-Drop arrow hints * @ingroup gtkui * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. *
--- a/pidgin/gtkdocklet-x11.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdocklet-x11.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "debug.h" #include "gaimstock.h" @@ -59,7 +59,7 @@ g_source_remove(embed_timeout); embed_timeout = 0; - gaim_gtk_docklet_embedded(); + pidgin_docklet_embedded(); } static void @@ -67,7 +67,7 @@ { gaim_debug(GAIM_DEBUG_INFO, "docklet", "destroyed\n"); - gaim_gtk_docklet_remove(); + pidgin_docklet_remove(); g_object_unref(G_OBJECT(docklet)); docklet = NULL; @@ -81,7 +81,7 @@ if (event->type != GDK_BUTTON_RELEASE) return; - gaim_gtk_docklet_clicked(event->button); + pidgin_docklet_clicked(event->button); } static void @@ -93,22 +93,22 @@ switch (icon) { case DOCKLET_STATUS_OFFLINE: - icon_name = GAIM_STOCK_ICON_OFFLINE; + icon_name = PIDGIN_STOCK_ICON_OFFLINE; break; case DOCKLET_STATUS_CONNECTING: - icon_name = GAIM_STOCK_ICON_CONNECT; + icon_name = PIDGIN_STOCK_ICON_CONNECT; break; case DOCKLET_STATUS_ONLINE: - icon_name = GAIM_STOCK_ICON_ONLINE; + icon_name = PIDGIN_STOCK_ICON_ONLINE; break; case DOCKLET_STATUS_ONLINE_PENDING: - icon_name = GAIM_STOCK_ICON_ONLINE_MSG; + icon_name = PIDGIN_STOCK_ICON_ONLINE_MSG; break; case DOCKLET_STATUS_AWAY: - icon_name = GAIM_STOCK_ICON_AWAY; + icon_name = PIDGIN_STOCK_ICON_AWAY; break; case DOCKLET_STATUS_AWAY_PENDING: - icon_name = GAIM_STOCK_ICON_AWAY_MSG; + icon_name = PIDGIN_STOCK_ICON_AWAY_MSG; break; } @@ -210,7 +210,7 @@ if (embed_timeout) g_source_remove(embed_timeout); - gaim_gtk_docklet_remove(); + pidgin_docklet_remove(); g_signal_handlers_disconnect_by_func(G_OBJECT(docklet), G_CALLBACK(docklet_x11_destroyed_cb), NULL); gtk_widget_destroy(GTK_WIDGET(docklet)); @@ -236,7 +236,7 @@ * area becomes available. */ gaim_debug_info("docklet", "failed to embed within timeout\n"); - gaim_gtk_docklet_remove(); + pidgin_docklet_remove(); return FALSE; } @@ -280,7 +280,7 @@ * get embedded. Ideally, we would only call docklet_embedded() when the * icon was actually embedded. */ - gaim_gtk_docklet_embedded(); + pidgin_docklet_embedded(); embed_timeout = g_timeout_add(EMBED_TIMEOUT, docklet_x11_embed_timeout_cb, NULL); gaim_debug(GAIM_DEBUG_INFO, "docklet", "created\n"); @@ -303,5 +303,5 @@ void docklet_ui_init() { - gaim_gtk_docklet_set_ui_ops(&ui_ops); + pidgin_docklet_set_ui_ops(&ui_ops); }
--- a/pidgin/gtkdocklet.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdocklet.c Mon Feb 05 03:37:27 2007 +0000 @@ -22,7 +22,7 @@ * 02111-1307, USA. */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "core.h" #include "conversation.h" @@ -93,12 +93,12 @@ GList *l_im = NULL; GList *l_chat = NULL; - l_im = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, - GAIM_UNSEEN_TEXT, + l_im = pidgin_conversations_find_unseen_list(GAIM_CONV_TYPE_IM, + PIDGIN_UNSEEN_TEXT, FALSE, max); - l_chat = gaim_gtk_conversations_find_unseen_list(GAIM_CONV_TYPE_CHAT, - GAIM_UNSEEN_NICK, + l_chat = pidgin_conversations_find_unseen_list(GAIM_CONV_TYPE_CHAT, + PIDGIN_UNSEEN_NICK, FALSE, max); if (l_im != NULL && l_chat != NULL) @@ -144,7 +144,7 @@ GString *tooltip_text = g_string_new(""); for (l = convs, count = 0 ; l != NULL ; l = l->next, count++) { if (GAIM_IS_GTK_CONVERSATION(l->data)) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION((GaimConversation *)l->data); + PidginConversation *gtkconv = PIDGIN_CONVERSATION((GaimConversation *)l->data); if (count == DOCKLET_TOOLTIP_LINE_LIMIT - 1) g_string_append(tooltip_text, _("Right-click for more unread messages...\n")); else @@ -187,7 +187,7 @@ GaimAccount *account = (GaimAccount*)l->data; GaimStatus *account_status; - if (!gaim_account_get_enabled(account, GAIM_GTK_UI)) + if (!gaim_account_get_enabled(account, PIDGIN_UI)) continue; if (gaim_account_is_disconnected(account)) @@ -306,7 +306,7 @@ if (!visible) ui_ops->create(); else if (!visibility_manager) { - gaim_gtk_blist_visibility_manager_add(); + pidgin_blist_visibility_manager_add(); visibility_manager = TRUE; } } @@ -315,7 +315,7 @@ ui_ops->destroy(); } else { if (visibility_manager) { - gaim_gtk_blist_visibility_manager_remove(); + pidgin_blist_visibility_manager_remove(); visibility_manager = FALSE; } docklet_update_status(); @@ -386,7 +386,7 @@ { GaimSavedStatus *saved_status; saved_status = gaim_savedstatus_get_current(); - gaim_gtk_status_editor_show(FALSE, + pidgin_status_editor_show(FALSE, gaim_savedstatus_is_transient(saved_status) ? saved_status : NULL); } @@ -436,7 +436,7 @@ if (sf) g_signal_connect(G_OBJECT(menuitem), "activate", sf, data); - pixbuf = gaim_gtk_create_gaim_icon_with_status(primitive, 0.5); + pixbuf = pidgin_create_gaim_icon_with_status(primitive, 0.5); image = gtk_image_new_from_pixbuf(pixbuf); g_object_unref(pixbuf); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menuitem), image); @@ -474,7 +474,7 @@ popular_statuses = gaim_savedstatuses_get_popular(6); if (popular_statuses != NULL) - gaim_separator(submenu); + pidgin_separator(submenu); for (cur = popular_statuses; cur != NULL; cur = cur->next) { GaimSavedStatus *saved_status = cur->data; @@ -486,10 +486,10 @@ } g_list_free(popular_statuses); - gaim_separator(submenu); + pidgin_separator(submenu); new_menu_item_with_gaim_icon(submenu, _("New..."), GAIM_STATUS_AVAILABLE, G_CALLBACK(show_custom_status_editor_cb), NULL, 0, 0, NULL); - new_menu_item_with_gaim_icon(submenu, _("Saved..."), GAIM_STATUS_AVAILABLE, G_CALLBACK(gaim_gtk_status_window_show), NULL, 0, 0, NULL); + new_menu_item_with_gaim_icon(submenu, _("Saved..."), GAIM_STATUS_AVAILABLE, G_CALLBACK(pidgin_status_window_show), NULL, 0, 0, NULL); return menuitem; } @@ -520,7 +520,7 @@ gaim_debug_warning("docklet", "status indicates messages pending, but no conversations with unseen messages were found."); } else { - gaim_gtk_conversations_fill_menu(submenu, l); + pidgin_conversations_fill_menu(submenu, l); g_list_free(l); gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); } @@ -529,22 +529,22 @@ } gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); - gaim_separator(menu); + pidgin_separator(menu); - menuitem = gaim_new_item_from_stock(menu, _("New Message..."), GAIM_STOCK_IM, G_CALLBACK(gaim_gtkdialogs_im), NULL, 0, 0, NULL); + menuitem = pidgin_new_item_from_stock(menu, _("New Message..."), PIDGIN_STOCK_IM, G_CALLBACK(pidgindialogs_im), NULL, 0, 0, NULL); if (status == DOCKLET_STATUS_OFFLINE) gtk_widget_set_sensitive(menuitem, FALSE); menuitem = docklet_status_submenu(); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); - gaim_separator(menu); + pidgin_separator(menu); - gaim_new_item_from_stock(menu, _("Accounts"), GAIM_STOCK_ACCOUNTS, G_CALLBACK(gaim_gtk_accounts_window_show), NULL, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Plugins"), GAIM_STOCK_PLUGIN, G_CALLBACK(gaim_gtk_plugin_dialog_show), NULL, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("Preferences"), GTK_STOCK_PREFERENCES, G_CALLBACK(gaim_gtk_prefs_show), NULL, 0, 0, NULL); + pidgin_new_item_from_stock(menu, _("Accounts"), PIDGIN_STOCK_ACCOUNTS, G_CALLBACK(pidgin_accounts_window_show), NULL, 0, 0, NULL); + pidgin_new_item_from_stock(menu, _("Plugins"), PIDGIN_STOCK_PLUGIN, G_CALLBACK(pidgin_plugin_dialog_show), NULL, 0, 0, NULL); + pidgin_new_item_from_stock(menu, _("Preferences"), GTK_STOCK_PREFERENCES, G_CALLBACK(pidgin_prefs_show), NULL, 0, 0, NULL); - gaim_separator(menu); + pidgin_separator(menu); menuitem = gtk_check_menu_item_new_with_label(_("Mute Sounds")); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), gaim_prefs_get_bool("/gaim/gtk/sound/mute")); @@ -558,13 +558,13 @@ g_signal_connect(G_OBJECT(menuitem), "toggled", G_CALLBACK(docklet_toggle_blink), NULL); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); - gaim_separator(menu); + pidgin_separator(menu); /* TODO: need a submenu to change status, this needs to "link" * to the status in the buddy list gtkstatusbox */ - gaim_new_item_from_stock(menu, _("Quit"), GTK_STOCK_QUIT, G_CALLBACK(gaim_core_quit), NULL, 0, 0, NULL); + pidgin_new_item_from_stock(menu, _("Quit"), GTK_STOCK_QUIT, G_CALLBACK(gaim_core_quit), NULL, 0, 0, NULL); #ifdef _WIN32 g_signal_connect(menu, "leave-notify-event", G_CALLBACK(docklet_menu_leave_enter), NULL); @@ -580,18 +580,18 @@ * public api for ui_ops **************************************************************************/ void -gaim_gtk_docklet_clicked(int button_type) +pidgin_docklet_clicked(int button_type) { switch (button_type) { case 1: if (status == DOCKLET_STATUS_ONLINE_PENDING || status == DOCKLET_STATUS_AWAY_PENDING) { GList *l = get_pending_list(1); if (l != NULL) { - gaim_gtkconv_present_conversation((GaimConversation *)l->data); + pidgin_conv_present_conversation((GaimConversation *)l->data); g_list_free(l); } } else { - gaim_gtk_blist_toggle_visibility(); + pidgin_blist_toggle_visibility(); } break; case 3: @@ -601,11 +601,11 @@ } void -gaim_gtk_docklet_embedded() +pidgin_docklet_embedded() { if (!visibility_manager && strcmp(gaim_prefs_get_string("/gaim/gtk/docklet/show"), "pending")) { - gaim_gtk_blist_visibility_manager_add(); + pidgin_blist_visibility_manager_add(); visibility_manager = TRUE; } visible = TRUE; @@ -615,11 +615,11 @@ } void -gaim_gtk_docklet_remove() +pidgin_docklet_remove() { if (visible) { if (visibility_manager) { - gaim_gtk_blist_visibility_manager_remove(); + pidgin_blist_visibility_manager_remove(); visibility_manager = FALSE; } if (docklet_blinking_timer) { @@ -632,25 +632,25 @@ } void -gaim_gtk_docklet_set_ui_ops(struct docklet_ui_ops *ops) +pidgin_docklet_set_ui_ops(struct docklet_ui_ops *ops) { ui_ops = ops; } void* -gaim_gtk_docklet_get_handle() +pidgin_docklet_get_handle() { static int i; return &i; } void -gaim_gtk_docklet_init() +pidgin_docklet_init() { void *conn_handle = gaim_connections_get_handle(); void *conv_handle = gaim_conversations_get_handle(); void *accounts_handle = gaim_accounts_get_handle(); - void *docklet_handle = gaim_gtk_docklet_get_handle(); + void *docklet_handle = pidgin_docklet_get_handle(); gaim_prefs_add_none("/gaim/gtk/docklet"); gaim_prefs_add_bool("/gaim/gtk/docklet/blink", FALSE); @@ -685,7 +685,7 @@ } void -gaim_gtk_docklet_uninit() +pidgin_docklet_uninit() { if (visible && ui_ops && ui_ops->destroy) ui_ops->destroy();
--- a/pidgin/gtkdocklet.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkdocklet.h Mon Feb 05 03:37:27 2007 +0000 @@ -47,14 +47,14 @@ /* functions in gtkdocklet.c */ -void gaim_gtk_docklet_clicked(int); -void gaim_gtk_docklet_embedded(void); -void gaim_gtk_docklet_remove(void); -void gaim_gtk_docklet_set_ui_ops(struct docklet_ui_ops *); -void gaim_gtk_docklet_unload(void); -void gaim_gtk_docklet_init(void); -void gaim_gtk_docklet_uninit(void); -void*gaim_gtk_docklet_get_handle(void); +void pidgin_docklet_clicked(int); +void pidgin_docklet_embedded(void); +void pidgin_docklet_remove(void); +void pidgin_docklet_set_ui_ops(struct docklet_ui_ops *); +void pidgin_docklet_unload(void); +void pidgin_docklet_init(void); +void pidgin_docklet_uninit(void); +void*pidgin_docklet_get_handle(void); /* function in gtkdocklet-{x11,win32}.c */ void docklet_ui_init(void);
--- a/pidgin/gtkeventloop.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkeventloop.c Mon Feb 05 03:37:27 2007 +0000 @@ -30,29 +30,29 @@ #include "win32dep.h" #endif -#define GAIM_GTK_READ_COND (G_IO_IN | G_IO_HUP | G_IO_ERR) -#define GAIM_GTK_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL) +#define PIDGIN_READ_COND (G_IO_IN | G_IO_HUP | G_IO_ERR) +#define PIDGIN_WRITE_COND (G_IO_OUT | G_IO_HUP | G_IO_ERR | G_IO_NVAL) -typedef struct _GaimGtkIOClosure { +typedef struct _PidginIOClosure { GaimInputFunction function; guint result; gpointer data; -} GaimGtkIOClosure; +} PidginIOClosure; -static void gaim_gtk_io_destroy(gpointer data) +static void pidgin_io_destroy(gpointer data) { g_free(data); } -static gboolean gaim_gtk_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) +static gboolean pidgin_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) { - GaimGtkIOClosure *closure = data; + PidginIOClosure *closure = data; GaimInputCondition gaim_cond = 0; - if (condition & GAIM_GTK_READ_COND) + if (condition & PIDGIN_READ_COND) gaim_cond |= GAIM_INPUT_READ; - if (condition & GAIM_GTK_WRITE_COND) + if (condition & PIDGIN_WRITE_COND) gaim_cond |= GAIM_INPUT_WRITE; #if 0 @@ -67,7 +67,7 @@ gaim_debug(GAIM_DEBUG_MISC, "gtk_eventloop", "CLOSURE received GIOCondition of 0x%x, which does not" " match 0x%x (READ) or 0x%x (WRITE)\n", - condition, GAIM_GTK_READ_COND, GAIM_GTK_WRITE_COND); + condition, PIDGIN_READ_COND, PIDGIN_WRITE_COND); #endif /* DEBUG */ return TRUE; @@ -80,10 +80,10 @@ return TRUE; } -static guint gaim_gtk_input_add(gint fd, GaimInputCondition condition, GaimInputFunction function, +static guint pidgin_input_add(gint fd, GaimInputCondition condition, GaimInputFunction function, gpointer data) { - GaimGtkIOClosure *closure = g_new0(GaimGtkIOClosure, 1); + PidginIOClosure *closure = g_new0(PidginIOClosure, 1); GIOChannel *channel; GIOCondition cond = 0; @@ -91,9 +91,9 @@ closure->data = data; if (condition & GAIM_INPUT_READ) - cond |= GAIM_GTK_READ_COND; + cond |= PIDGIN_READ_COND; if (condition & GAIM_INPUT_WRITE) - cond |= GAIM_GTK_WRITE_COND; + cond |= PIDGIN_WRITE_COND; #ifdef _WIN32 channel = wgaim_g_io_channel_win32_new_socket(fd); @@ -101,7 +101,7 @@ channel = g_io_channel_unix_new(fd); #endif closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond, - gaim_gtk_io_invoke, closure, gaim_gtk_io_destroy); + pidgin_io_invoke, closure, pidgin_io_destroy); #if 0 gaim_debug(GAIM_DEBUG_MISC, "gtk_eventloop", @@ -117,12 +117,12 @@ { g_timeout_add, (guint (*)(guint))g_source_remove, - gaim_gtk_input_add, + pidgin_input_add, (guint (*)(guint))g_source_remove }; GaimEventLoopUiOps * -gaim_gtk_eventloop_get_ui_ops(void) +pidgin_eventloop_get_ui_ops(void) { return &eventloop_ops; }
--- a/pidgin/gtkeventloop.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkeventloop.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,10 +1,10 @@ /** - * @file gtkeventloop.h Gaim GTK+ Event Loop Implementation + * @file gtkeventloop.h Pidgin GTK+ Event Loop Implementation * @ingroup gtkui * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKEVENTLOOP_H_ -#define _GAIM_GTKEVENTLOOP_H_ +#ifndef _PIDGINEVENTLOOP_H_ +#define _PIDGINEVENTLOOP_H_ #include "eventloop.h" @@ -32,6 +32,6 @@ * * @return The GTK+ event loop UI operations structure. */ -GaimEventLoopUiOps *gaim_gtk_eventloop_get_ui_ops(void); +GaimEventLoopUiOps *pidgin_eventloop_get_ui_ops(void); -#endif /* _GAIM_GTKEVENTLOOP_H_ */ +#endif /* _PIDGINEVENTLOOP_H_ */
--- a/pidgin/gtkft.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkft.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "debug.h" #include "notify.h" @@ -38,10 +38,10 @@ #include "gaimstock.h" #include "gtkutils.h" -#define GAIM_GTKXFER(xfer) \ - (GaimGtkXferUiData *)(xfer)->ui_data +#define PIDGINXFER(xfer) \ + (PidginXferUiData *)(xfer)->ui_data -struct _GaimGtkXferDialog +struct _PidginXferDialog { gboolean keep_open; gboolean auto_clear; @@ -89,9 +89,9 @@ char *name; -} GaimGtkXferUiData; +} PidginXferUiData; -static GaimGtkXferDialog *xfer_dialog = NULL; +static PidginXferDialog *xfer_dialog = NULL; enum { @@ -112,12 +112,12 @@ get_xfer_info_strings(GaimXfer *xfer, char **kbsec, char **time_elapsed, char **time_remaining) { - GaimGtkXferUiData *data; + PidginXferUiData *data; double kb_sent, kb_rem; double kbps = 0.0; time_t elapsed, now; - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); if (xfer->end_time != 0) now = xfer->end_time; @@ -183,7 +183,7 @@ } static void -update_title_progress(GaimGtkXferDialog *dialog) +update_title_progress(PidginXferDialog *dialog) { gboolean valid; GtkTreeIter iter; @@ -235,16 +235,16 @@ } static void -update_detailed_info(GaimGtkXferDialog *dialog, GaimXfer *xfer) +update_detailed_info(PidginXferDialog *dialog, GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; char *kbsec, *time_elapsed, *time_remaining; char *status, *utf8; if (dialog == NULL || xfer == NULL) return; - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); get_xfer_info_strings(xfer, &kbsec, &time_elapsed, &time_remaining); @@ -258,7 +258,7 @@ GdkPixbuf *pixbuf = NULL; pixbuf = gtk_widget_render_icon(xfer_dialog->window, - GAIM_STOCK_FILE_DONE, + PIDGIN_STOCK_FILE_DONE, GTK_ICON_SIZE_MENU, NULL); gtk_list_store_set(GTK_LIST_STORE(xfer_dialog->model), &data->iter, @@ -322,7 +322,7 @@ } static void -update_buttons(GaimGtkXferDialog *dialog, GaimXfer *xfer) +update_buttons(PidginXferDialog *dialog, GaimXfer *xfer) { if (dialog->selected_xfer == NULL) { gtk_widget_set_sensitive(dialog->expander, FALSE); @@ -385,7 +385,7 @@ } static void -ensure_row_selected(GaimGtkXferDialog *dialog) +ensure_row_selected(PidginXferDialog *dialog) { GtkTreeIter iter; GtkTreeSelection *selection; @@ -405,17 +405,17 @@ static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) { - GaimGtkXferDialog *dialog; + PidginXferDialog *dialog; - dialog = (GaimGtkXferDialog *)d; + dialog = (PidginXferDialog *)d; - gaim_gtkxfer_dialog_hide(dialog); + pidginxfer_dialog_hide(dialog); return TRUE; } static void -toggle_keep_open_cb(GtkWidget *w, GaimGtkXferDialog *dialog) +toggle_keep_open_cb(GtkWidget *w, PidginXferDialog *dialog) { dialog->keep_open = !dialog->keep_open; gaim_prefs_set_bool("/gaim/gtk/filetransfer/keep_open", @@ -423,7 +423,7 @@ } static void -toggle_clear_finished_cb(GtkWidget *w, GaimGtkXferDialog *dialog) +toggle_clear_finished_cb(GtkWidget *w, PidginXferDialog *dialog) { dialog->auto_clear = !dialog->auto_clear; gaim_prefs_set_bool("/gaim/gtk/filetransfer/clear_finished", @@ -431,7 +431,7 @@ } static void -selection_changed_cb(GtkTreeSelection *selection, GaimGtkXferDialog *dialog) +selection_changed_cb(GtkTreeSelection *selection, PidginXferDialog *dialog) { GtkTreeIter iter; GaimXfer *xfer = NULL; @@ -464,7 +464,7 @@ } static void -open_button_cb(GtkButton *button, GaimGtkXferDialog *dialog) +open_button_cb(GtkButton *button, PidginXferDialog *dialog) { #ifdef _WIN32 /* If using Win32... */ @@ -556,31 +556,31 @@ } static void -pause_button_cb(GtkButton *button, GaimGtkXferDialog *dialog) +pause_button_cb(GtkButton *button, PidginXferDialog *dialog) { } static void -resume_button_cb(GtkButton *button, GaimGtkXferDialog *dialog) +resume_button_cb(GtkButton *button, PidginXferDialog *dialog) { } static void -remove_button_cb(GtkButton *button, GaimGtkXferDialog *dialog) +remove_button_cb(GtkButton *button, PidginXferDialog *dialog) { - gaim_gtkxfer_dialog_remove_xfer(dialog, dialog->selected_xfer); + pidginxfer_dialog_remove_xfer(dialog, dialog->selected_xfer); } static void -stop_button_cb(GtkButton *button, GaimGtkXferDialog *dialog) +stop_button_cb(GtkButton *button, PidginXferDialog *dialog) { gaim_xfer_cancel_local(dialog->selected_xfer); } static void -close_button_cb(GtkButton *button, GaimGtkXferDialog *dialog) +close_button_cb(GtkButton *button, PidginXferDialog *dialog) { - gaim_gtkxfer_dialog_hide(dialog); + pidginxfer_dialog_hide(dialog); } @@ -588,7 +588,7 @@ * Dialog Building Functions **************************************************************************/ static GtkWidget * -setup_tree(GaimGtkXferDialog *dialog) +setup_tree(PidginXferDialog *dialog) { GtkWidget *sw; GtkWidget *tree; @@ -640,7 +640,7 @@ gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); /* Progress bar column */ - renderer = gaim_gtk_cell_renderer_progress_new(); + renderer = pidgin_cell_renderer_progress_new(); column = gtk_tree_view_column_new_with_attributes(_("Progress"), renderer, "percentage", COLUMN_PROGRESS, NULL); gtk_tree_view_column_set_resizable(GTK_TREE_VIEW_COLUMN(column), TRUE); @@ -676,7 +676,7 @@ } static GtkWidget * -make_info_table(GaimGtkXferDialog *dialog) +make_info_table(PidginXferDialog *dialog) { GtkWidget *table; GtkWidget *label; @@ -738,10 +738,10 @@ return table; } -GaimGtkXferDialog * -gaim_gtkxfer_dialog_new(void) +PidginXferDialog * +pidginxfer_dialog_new(void) { - GaimGtkXferDialog *dialog; + PidginXferDialog *dialog; GtkWidget *window; GtkWidget *vbox1, *vbox2; GtkWidget *bbox; @@ -751,7 +751,7 @@ GtkWidget *table; GtkWidget *checkbox; - dialog = g_new0(GaimGtkXferDialog, 1); + dialog = g_new0(PidginXferDialog, 1); dialog->keep_open = gaim_prefs_get_bool("/gaim/gtk/filetransfer/keep_open"); dialog->auto_clear = @@ -881,14 +881,14 @@ #ifdef _WIN32 g_signal_connect(G_OBJECT(dialog->window), "show", - G_CALLBACK(gtkwgaim_ensure_onscreen), dialog->window); + G_CALLBACK(winpidgin_ensure_onscreen), dialog->window); #endif return dialog; } void -gaim_gtkxfer_dialog_destroy(GaimGtkXferDialog *dialog) +pidginxfer_dialog_destroy(PidginXferDialog *dialog) { g_return_if_fail(dialog != NULL); @@ -900,15 +900,15 @@ } void -gaim_gtkxfer_dialog_show(GaimGtkXferDialog *dialog) +pidginxfer_dialog_show(PidginXferDialog *dialog) { - GaimGtkXferDialog *tmp; + PidginXferDialog *tmp; if (dialog == NULL) { tmp = gaim_get_gtkxfer_dialog(); if (tmp == NULL) { - tmp = gaim_gtkxfer_dialog_new(); + tmp = pidginxfer_dialog_new(); gaim_set_gtkxfer_dialog(tmp); } @@ -919,7 +919,7 @@ } void -gaim_gtkxfer_dialog_hide(GaimGtkXferDialog *dialog) +pidginxfer_dialog_hide(PidginXferDialog *dialog) { g_return_if_fail(dialog != NULL); @@ -929,9 +929,9 @@ } void -gaim_gtkxfer_dialog_add_xfer(GaimGtkXferDialog *dialog, GaimXfer *xfer) +pidginxfer_dialog_add_xfer(PidginXferDialog *dialog, GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; GaimXferType type; GdkPixbuf *pixbuf; char *size_str, *remaining_str; @@ -942,10 +942,10 @@ gaim_xfer_ref(xfer); - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); data->in_list = TRUE; - gaim_gtkxfer_dialog_show(dialog); + pidginxfer_dialog_show(dialog); data->last_updated_time = 0; @@ -956,8 +956,8 @@ pixbuf = gtk_widget_render_icon(dialog->window, (type == GAIM_XFER_RECEIVE - ? GAIM_STOCK_DOWNLOAD - : GAIM_STOCK_UPLOAD), + ? PIDGIN_STOCK_DOWNLOAD + : PIDGIN_STOCK_UPLOAD), GTK_ICON_SIZE_MENU, NULL); gtk_list_store_append(dialog->model, &data->iter); @@ -991,15 +991,15 @@ } void -gaim_gtkxfer_dialog_remove_xfer(GaimGtkXferDialog *dialog, +pidginxfer_dialog_remove_xfer(PidginXferDialog *dialog, GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; g_return_if_fail(dialog != NULL); g_return_if_fail(xfer != NULL); - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); if (data == NULL) return; @@ -1020,17 +1020,17 @@ } void -gaim_gtkxfer_dialog_cancel_xfer(GaimGtkXferDialog *dialog, +pidginxfer_dialog_cancel_xfer(PidginXferDialog *dialog, GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; GdkPixbuf *pixbuf; const gchar *status; g_return_if_fail(dialog != NULL); g_return_if_fail(xfer != NULL); - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); if (data == NULL) return; @@ -1039,17 +1039,17 @@ return; if ((gaim_xfer_get_status(xfer) == GAIM_XFER_STATUS_CANCEL_LOCAL) && (dialog->auto_clear)) { - gaim_gtkxfer_dialog_remove_xfer(dialog, xfer); + pidginxfer_dialog_remove_xfer(dialog, xfer); return; } - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); update_detailed_info(dialog, xfer); update_title_progress(dialog); pixbuf = gtk_widget_render_icon(dialog->window, - GAIM_STOCK_FILE_CANCELED, + PIDGIN_STOCK_FILE_CANCELED, GTK_ICON_SIZE_MENU, NULL); if (gaim_xfer_is_canceled(xfer)) @@ -1068,10 +1068,10 @@ } void -gaim_gtkxfer_dialog_update_xfer(GaimGtkXferDialog *dialog, +pidginxfer_dialog_update_xfer(PidginXferDialog *dialog, GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; char *size_str, *remaining_str; GtkTreeSelection *selection; time_t current_time; @@ -1081,7 +1081,7 @@ g_return_if_fail(dialog != NULL); g_return_if_fail(xfer != NULL); - if ((data = GAIM_GTKXFER(xfer)) == NULL) + if ((data = PIDGINXFER(xfer)) == NULL) return; if (data->in_list == FALSE) @@ -1110,7 +1110,7 @@ GdkPixbuf *pixbuf; pixbuf = gtk_widget_render_icon(dialog->window, - GAIM_STOCK_FILE_DONE, + PIDGIN_STOCK_FILE_DONE, GTK_ICON_SIZE_MENU, NULL); gtk_list_store_set(GTK_LIST_STORE(xfer_dialog->model), &data->iter, @@ -1128,7 +1128,7 @@ update_detailed_info(xfer_dialog, xfer); if (gaim_xfer_is_completed(xfer) && dialog->auto_clear) - gaim_gtkxfer_dialog_remove_xfer(dialog, xfer); + pidginxfer_dialog_remove_xfer(dialog, xfer); else update_buttons(dialog, xfer); @@ -1157,28 +1157,28 @@ } /* If we got to this point then we know everything is finished */ - gaim_gtkxfer_dialog_hide(dialog); + pidginxfer_dialog_hide(dialog); } /************************************************************************** * File Transfer UI Ops **************************************************************************/ static void -gaim_gtkxfer_new_xfer(GaimXfer *xfer) +pidginxfer_new_xfer(GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; /* This is where we're setting xfer->ui_data for the first time. */ - data = g_new0(GaimGtkXferUiData, 1); + data = g_new0(PidginXferUiData, 1); xfer->ui_data = data; } static void -gaim_gtkxfer_destroy(GaimXfer *xfer) +pidginxfer_destroy(GaimXfer *xfer) { - GaimGtkXferUiData *data; + PidginXferUiData *data; - data = GAIM_GTKXFER(xfer); + data = PIDGINXFER(xfer); if (data) { g_free(data->name); g_free(data); @@ -1187,49 +1187,49 @@ } static void -gaim_gtkxfer_add_xfer(GaimXfer *xfer) +pidginxfer_add_xfer(GaimXfer *xfer) { if (xfer_dialog == NULL) - xfer_dialog = gaim_gtkxfer_dialog_new(); + xfer_dialog = pidginxfer_dialog_new(); - gaim_gtkxfer_dialog_add_xfer(xfer_dialog, xfer); + pidginxfer_dialog_add_xfer(xfer_dialog, xfer); } static void -gaim_gtkxfer_update_progress(GaimXfer *xfer, double percent) +pidginxfer_update_progress(GaimXfer *xfer, double percent) { - gaim_gtkxfer_dialog_update_xfer(xfer_dialog, xfer); + pidginxfer_dialog_update_xfer(xfer_dialog, xfer); } static void -gaim_gtkxfer_cancel_local(GaimXfer *xfer) +pidginxfer_cancel_local(GaimXfer *xfer) { if (xfer_dialog) - gaim_gtkxfer_dialog_cancel_xfer(xfer_dialog, xfer); + pidginxfer_dialog_cancel_xfer(xfer_dialog, xfer); } static void -gaim_gtkxfer_cancel_remote(GaimXfer *xfer) +pidginxfer_cancel_remote(GaimXfer *xfer) { if (xfer_dialog) - gaim_gtkxfer_dialog_cancel_xfer(xfer_dialog, xfer); + pidginxfer_dialog_cancel_xfer(xfer_dialog, xfer); } static GaimXferUiOps ops = { - gaim_gtkxfer_new_xfer, - gaim_gtkxfer_destroy, - gaim_gtkxfer_add_xfer, - gaim_gtkxfer_update_progress, - gaim_gtkxfer_cancel_local, - gaim_gtkxfer_cancel_remote + pidginxfer_new_xfer, + pidginxfer_destroy, + pidginxfer_add_xfer, + pidginxfer_update_progress, + pidginxfer_cancel_local, + pidginxfer_cancel_remote }; /************************************************************************** * GTK+ File Transfer API **************************************************************************/ void -gaim_gtk_xfers_init(void) +pidgin_xfers_init(void) { gaim_prefs_add_none("/gaim/gtk/filetransfer"); gaim_prefs_add_bool("/gaim/gtk/filetransfer/clear_finished", TRUE); @@ -1237,26 +1237,26 @@ } void -gaim_gtk_xfers_uninit(void) +pidgin_xfers_uninit(void) { if (xfer_dialog != NULL) - gaim_gtkxfer_dialog_destroy(xfer_dialog); + pidginxfer_dialog_destroy(xfer_dialog); } void -gaim_set_gtkxfer_dialog(GaimGtkXferDialog *dialog) +gaim_set_gtkxfer_dialog(PidginXferDialog *dialog) { xfer_dialog = dialog; } -GaimGtkXferDialog * +PidginXferDialog * gaim_get_gtkxfer_dialog(void) { return xfer_dialog; } GaimXferUiOps * -gaim_gtk_xfers_get_ui_ops(void) +pidgin_xfers_get_ui_ops(void) { return &ops; }
--- a/pidgin/gtkft.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkft.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKFT_H_ -#define _GAIM_GTKFT_H_ +#ifndef _PIDGINFT_H_ +#define _PIDGINFT_H_ #include "ft.h" @@ -33,7 +33,7 @@ * The structure is opaque, as nobody should be touching anything inside of * it. */ -typedef struct _GaimGtkXferDialog GaimGtkXferDialog; +typedef struct _PidginXferDialog PidginXferDialog; /**************************************************************************/ /** @name GTK+ File Transfer Dialog API */ @@ -45,14 +45,14 @@ * * @return The new dialog. */ -GaimGtkXferDialog *gaim_gtkxfer_dialog_new(void); +PidginXferDialog *pidginxfer_dialog_new(void); /** * Destroys a file transfer dialog. * * @param dialog The file transfer dialog. */ -void gaim_gtkxfer_dialog_destroy(GaimGtkXferDialog *dialog); +void pidginxfer_dialog_destroy(PidginXferDialog *dialog); /** * Displays the file transfer dialog given. @@ -60,14 +60,14 @@ * * @param dialog The file transfer dialog to show. */ -void gaim_gtkxfer_dialog_show(GaimGtkXferDialog *dialog); +void pidginxfer_dialog_show(PidginXferDialog *dialog); /** * Hides the file transfer dialog. * * @param dialog The file transfer dialog to hide. */ -void gaim_gtkxfer_dialog_hide(GaimGtkXferDialog *dialog); +void pidginxfer_dialog_hide(PidginXferDialog *dialog); /** * Adds a file transfer to the dialog. @@ -75,7 +75,7 @@ * @param dialog The file transfer dialog. * @param xfer The file transfer. */ -void gaim_gtkxfer_dialog_add_xfer(GaimGtkXferDialog *dialog, GaimXfer *xfer); +void pidginxfer_dialog_add_xfer(PidginXferDialog *dialog, GaimXfer *xfer); /** * Removes a file transfer from the dialog. @@ -83,7 +83,7 @@ * @param dialog The file transfer dialog. * @param xfer The file transfer. */ -void gaim_gtkxfer_dialog_remove_xfer(GaimGtkXferDialog *dialog, +void pidginxfer_dialog_remove_xfer(PidginXferDialog *dialog, GaimXfer *xfer); /** @@ -92,7 +92,7 @@ * @param dialog The file transfer dialog. * @param xfer The file transfer that was canceled. */ -void gaim_gtkxfer_dialog_cancel_xfer(GaimGtkXferDialog *dialog, +void pidginxfer_dialog_cancel_xfer(PidginXferDialog *dialog, GaimXfer *xfer); /** @@ -101,7 +101,7 @@ * @param dialog The file transfer dialog. * @param xfer The file transfer. */ -void gaim_gtkxfer_dialog_update_xfer(GaimGtkXferDialog *dialog, +void pidginxfer_dialog_update_xfer(PidginXferDialog *dialog, GaimXfer *xfer); /*@}*/ @@ -114,34 +114,34 @@ /** * Initializes the GTK+ file transfer system. */ -void gaim_gtk_xfers_init(void); +void pidgin_xfers_init(void); /** * Uninitializes the GTK+ file transfer system. */ -void gaim_gtk_xfers_uninit(void); +void pidgin_xfers_uninit(void); /** * Sets gaim's main file transfer dialog. * * @param dialog The main dialog. */ -void gaim_set_gtkxfer_dialog(GaimGtkXferDialog *dialog); +void gaim_set_gtkxfer_dialog(PidginXferDialog *dialog); /** * Returns gaim's main file transfer dialog. * * @return The main dialog. */ -GaimGtkXferDialog *gaim_get_gtkxfer_dialog(void); +PidginXferDialog *gaim_get_gtkxfer_dialog(void); /** * Returns the UI operations structure for the GTK+ file transfer UI. * * @return The GTK+ file transfer UI operations structure. */ -GaimXferUiOps *gaim_gtk_xfers_get_ui_ops(void); +GaimXferUiOps *pidgin_xfers_get_ui_ops(void); /*@}*/ -#endif /* _GAIM_GTKFT_H_ */ +#endif /* _PIDGINFT_H_ */
--- a/pidgin/gtkgaim.h Sun Feb 04 23:14:06 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/** - * @file gtkgaim.h UI definitions and includes - * @ingroup gtkui - * - * gaim - * - * Gaim is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* #warning ***gtkgaim*** */ -#ifndef _GAIM_GTKGAIM_H_ -#define _GAIM_GTKGAIM_H_ - -#ifndef _WIN32 -# include <gdk/gdkx.h> -#endif - -#include <gtk/gtk.h> - -#ifdef _WIN32 -# include "gtkwin32dep.h" -#endif - -/** - * Our UI's identifier. - */ -#define GAIM_GTK_UI "gtk-gaim" - -#ifndef _WIN32 -# define GAIM_ALERT_TITLE "" -#else -# define GAIM_ALERT_TITLE PIDGIN_NAME -#endif - -/* - * This is backwards-compatibility code for older versions of GTK+ (< 2.4.x) - * It defines the new wrap behavior (unknown in earlier versions) - * as the old (slightly buggy) wrap behavior. - * It also includes our back-ported GtkExpander - */ -/** @cond */ -#if (!GTK_CHECK_VERSION(2,4,0)) -#define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD -#include "gtkexpander.h" -#endif -/** @endcond */ - -/* - * We include the sources for GtkComboBox and GtkCellView because - * they don't exist in older version of Gtk+, and we use them - * in a few places. - */ -#if !GTK_CHECK_VERSION(2,6,0) -# include "gtkcellview.h" -# include "gtkcellviewmenuitem.h" -# if !GTK_CHECK_VERSION(2,4,0) -# include "gtkcelllayout.h" -# include "gaimcombobox.h" -# endif /* Gtk 2.4 */ -#endif /* Gtk 2.6 */ - -/* - * Spacings between components, as defined by the - * GNOME Human Interface Guidelines. - */ -#define GAIM_HIG_CAT_SPACE 18 -#define GAIM_HIG_BORDER 12 -#define GAIM_HIG_BOX_SPACE 6 - -/* - * See GNOME bug #307304 for some discussion about the invisible - * character. 0x25cf is a good choice, too. - */ -#define GAIM_INVISIBLE_CHAR (gunichar)0x2022 - -#endif /* _GAIM_GTKGAIM_H_ */ -
--- a/pidgin/gtkidle.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkidle.c Mon Feb 05 03:37:27 2007 +0000 @@ -69,7 +69,7 @@ */ #if defined(USE_SCREENSAVER) || defined(HAVE_IOKIT) static time_t -gaim_gtk_get_time_idle() +pidgin_get_time_idle() { # ifdef HAVE_IOKIT /* Query the IOKit API */ @@ -97,7 +97,7 @@ # else # ifdef _WIN32 /* Query Windows */ - return (GetTickCount() - wgaim_get_lastactive()) / 1000; + return (GetTickCount() - winpidgin_get_lastactive()) / 1000; # else /* We're on X11 and not MacOS X with IOKit. */ @@ -120,14 +120,14 @@ static GaimIdleUiOps ui_ops = { #if defined(USE_SCREENSAVER) || defined(HAVE_IOKIT) - gaim_gtk_get_time_idle + pidgin_get_time_idle #else NULL #endif /* USE_SCREENSAVER || HAVE_IOKIT */ }; GaimIdleUiOps * -gaim_gtk_idle_get_ui_ops() +pidgin_idle_get_ui_ops() { return &ui_ops; }
--- a/pidgin/gtkidle.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkidle.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTK_IDLE_H_ -#define _GAIM_GTK_IDLE_H_ +#ifndef _PIDGIN_IDLE_H_ +#define _PIDGIN_IDLE_H_ #include "idle.h" @@ -37,8 +37,8 @@ * * @return The UI operations structure. */ -GaimIdleUiOps *gaim_gtk_idle_get_ui_ops(void); +GaimIdleUiOps *pidgin_idle_get_ui_ops(void); /*@}*/ -#endif /* _GAIM_GTK_IDLE_H_ */ +#endif /* _PIDGIN_IDLE_H_ */
--- a/pidgin/gtkimhtml.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkimhtml.c Mon Feb 05 03:37:27 2007 +0000 @@ -63,7 +63,7 @@ #include <pango/pango-font.h> -/* GTK+ < 2.4.x hack, see gtkgaim.h for details. */ +/* GTK+ < 2.4.x hack, see pidgin.h for details. */ #if (!GTK_CHECK_VERSION(2,4,0)) #define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD #endif
--- a/pidgin/gtkimhtml.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkimhtml.h Mon Feb 05 03:37:27 2007 +0000 @@ -2,7 +2,7 @@ * @file gtkimhtml.h GTK+ IM/HTML rendering component * @ingroup gtkui * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -20,8 +20,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKIMHTML_H_ -#define _GAIM_GTKIMHTML_H_ +#ifndef _PIDGINIMHTML_H_ +#define _PIDGINIMHTML_H_ #include <gdk/gdk.h> #include <gtk/gtktextview.h> @@ -790,4 +790,4 @@ } #endif -#endif /* _GAIM_GTKIMHTML_H_ */ +#endif /* _PIDGINIMHTML_H_ */
--- a/pidgin/gtkimhtmltoolbar.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "imgstore.h" #include "notify.h" @@ -459,7 +459,7 @@ } #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ - if (gaim_gtk_check_if_dir(filename, GTK_FILE_SELECTION(widget))) { + if (pidgin_check_if_dir(filename, GTK_FILE_SELECTION(widget))) { g_free(filename); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->image), FALSE); return; @@ -653,9 +653,9 @@ } if (toolbar->sml) - smileys = gaim_gtkthemes_get_proto_smileys(toolbar->sml); + smileys = pidginthemes_get_proto_smileys(toolbar->sml); else - smileys = gaim_gtkthemes_get_proto_smileys(NULL); + smileys = pidginthemes_get_proto_smileys(NULL); while(smileys) { GtkIMHtmlSmiley *smiley = smileys->data; @@ -666,7 +666,7 @@ smileys = smileys->next; } - GAIM_DIALOG(dialog); + PIDGIN_DIALOG(dialog); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_window_set_role(GTK_WINDOW(dialog), "smiley_dialog"); @@ -916,7 +916,7 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH); /* Bold */ - button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_BOLD); + button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_BOLD); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, _("Bold"), NULL); @@ -927,7 +927,7 @@ toolbar->bold = button; /* Italic */ - button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_ITALIC); + button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_ITALIC); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, _("Italic"), NULL); @@ -938,7 +938,7 @@ toolbar->italic = button; /* Underline */ - button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_UNDERLINE); + button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_UNDERLINE); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, _("Underline"), NULL); @@ -953,7 +953,7 @@ gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); /* Increase font size */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_BIGGER); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_TEXT_BIGGER); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, @@ -965,7 +965,7 @@ toolbar->larger_size = button; /* Decrease font size */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_TEXT_SMALLER); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_TEXT_SMALLER); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, @@ -982,7 +982,7 @@ /* Font Face */ - button = gaim_pixbuf_toolbar_button_from_stock(GTK_STOCK_SELECT_FONT); + button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_SELECT_FONT); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, @@ -994,7 +994,7 @@ toolbar->font = button; /* Foreground Color */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_FGCOLOR); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_FGCOLOR); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, @@ -1006,7 +1006,7 @@ toolbar->fgcolor = button; /* Background Color */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_BGCOLOR); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_BGCOLOR); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, @@ -1022,7 +1022,7 @@ gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); /* Reset Formatting */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_CLEAR); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_CLEAR); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, @@ -1038,7 +1038,7 @@ gtk_box_pack_start(GTK_BOX(hbox), sep, FALSE, FALSE, 0); /* Insert Link */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_LINK); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_LINK); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert link"), NULL); @@ -1048,7 +1048,7 @@ toolbar->link = button; /* Insert IM Image */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_IMAGE); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_IMAGE); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert image"), NULL); @@ -1059,7 +1059,7 @@ toolbar->image = button; /* Insert Smiley */ - button = gaim_pixbuf_toolbar_button_from_stock(GAIM_STOCK_SMILEY); + button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_SMILEY); gtk_size_group_add_widget(sg, button); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_tooltips_set_tip(toolbar->tooltips, button, _("Insert smiley"), NULL);
--- a/pidgin/gtkimhtmltoolbar.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,7 +1,7 @@ /* * GtkIMHtmlToolbar * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -20,8 +20,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifndef _GAIM_GTKIMHTMLTOOLBAR_H_ -#define _GAIM_GTKIMHTMLTOOLBAR_H_ +#ifndef _PIDGINIMHTMLTOOLBAR_H_ +#define _PIDGINIMHTMLTOOLBAR_H_ #include <gtk/gtkvbox.h> #include "gtkimhtml.h" @@ -92,4 +92,4 @@ } #endif -#endif /* _GAIM_GTKIMHTMLTOOLBAR_H_ */ +#endif /* _PIDGINIMHTMLTOOLBAR_H_ */
--- a/pidgin/gtklog.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtklog.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,20 +23,23 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" +#include "debug.h" +#include "log.h" +#include "notify.h" +#include "request.h" +#include "util.h" + #include "gtkblist.h" #include "gtkimhtml.h" #include "gtklog.h" #include "gtkutils.h" -#include "log.h" -#include "notify.h" -#include "util.h" static GHashTable *log_viewers = NULL; -static void populate_log_tree(GaimGtkLogViewer *lv); -static GaimGtkLogViewer *syslog_viewer = NULL; +static void populate_log_tree(PidginLogViewer *lv); +static PidginLogViewer *syslog_viewer = NULL; struct log_viewer_hash_t { GaimLogType type; @@ -83,7 +86,7 @@ return ret; } -static void select_first_log(GaimGtkLogViewer *lv) +static void select_first_log(PidginLogViewer *lv) { GtkTreeModel *model; GtkTreeIter iter, it; @@ -114,7 +117,7 @@ return gaim_date_format_full(localtime(&log->time)); } -static void search_cb(GtkWidget *button, GaimGtkLogViewer *lv) +static void search_cb(GtkWidget *button, PidginLogViewer *lv) { const char *search_term = gtk_entry_get_text(GTK_ENTRY(lv->entry)); GList *logs; @@ -137,7 +140,7 @@ return; } - gaim_gtk_set_cursor(lv->window, GDK_WATCH); + pidgin_set_cursor(lv->window, GDK_WATCH); g_free(lv->search); lv->search = g_strdup(search_term); @@ -160,16 +163,16 @@ } select_first_log(lv); - gaim_gtk_clear_cursor(lv->window); + pidgin_clear_cursor(lv->window); } static void destroy_cb(GtkWidget *w, gint resp, struct log_viewer_hash_t *ht) { - GaimGtkLogViewer *lv = syslog_viewer; + PidginLogViewer *lv = syslog_viewer; #ifdef _WIN32 if (resp == GTK_RESPONSE_HELP) { char *logdir = g_build_filename(gaim_user_dir(), "logs", NULL); - gtkwgaim_shell_execute(logdir, "explore", NULL); + winpidgin_shell_execute(logdir, "explore", NULL); g_free(logdir); return; } @@ -184,6 +187,8 @@ } else syslog_viewer = NULL; + gaim_request_close_with_handle(lv); + g_list_foreach(lv->logs, (GFunc)gaim_log_free, NULL); g_list_free(lv->logs); @@ -193,21 +198,154 @@ gtk_widget_destroy(w); } -static void log_row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *col, GaimGtkLogViewer *viewer) { +static void log_row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *col, PidginLogViewer *viewer) { if (gtk_tree_view_row_expanded(tv, path)) gtk_tree_view_collapse_row(tv, path); else gtk_tree_view_expand_row(tv, path, FALSE); } +static void delete_log_cb(GaimLog *log) +{ + if (!gaim_log_delete(log)) + { + gaim_notify_error(NULL, NULL, "Log Deletion Failed", + "Check permissions and try again."); + } +} + +static void log_delete_log_cb(GtkWidget *menuitem, gpointer *data) +{ + PidginLogViewer *lv = data[0]; + GaimLog *log = data[1]; + const char *time = log_get_date(log); + const char *name; + char *tmp; + + if (log->type == GAIM_LOG_IM) + { + GaimBuddy *buddy = gaim_find_buddy(log->account, log->name); + if (buddy != NULL) + name = gaim_buddy_get_contact_alias(buddy); + else + name = log->name; + + tmp = g_strdup_printf(_("Are you sure you want to permanently delete the log of the " + "conversation with %s which started at %s?"), name, time); + } + else if (log->type == GAIM_LOG_CHAT) + { + GaimChat *chat = gaim_blist_find_chat(log->account, log->name); + if (chat != NULL) + name = gaim_chat_get_name(chat); + else + name = log->name; + + tmp = g_strdup_printf(_("Are you sure you want to permanently delete the log of the " + "conversation in %s which started at %s?"), name, time); + } + else if (log->type == GAIM_LOG_SYSTEM) + { + tmp = g_strdup_printf(_("Are you sure you want to permanently delete the system log " + "which started at %s?"), time); + } + else + g_return_if_reached(); + + gaim_request_action(lv, NULL, "Delete Log?", tmp, + 0, log, 2, _("Delete"), delete_log_cb, _("Cancel"), NULL); + g_free(tmp); +} + +static void log_show_popup_menu(GtkWidget *treeview, GdkEventButton *event, gpointer *data) +{ + GtkWidget *menu = gtk_menu_new(); + GtkWidget *menuitem = gtk_menu_item_new_with_label("Delete Log..."); + + if (!gaim_log_is_deletable((GaimLog *)data[1])) + gtk_widget_set_sensitive(menuitem, FALSE); + + g_signal_connect(menuitem, "activate", G_CALLBACK(log_delete_log_cb), data); + g_object_set_data_full(menuitem, "log-viewer-data", data, g_free); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); + gtk_widget_show_all(menu); + + gtk_menu_popup(GTK_MENU(menu), NULL, (GtkMenuPositionFunc)data[2], NULL, NULL, + (event != NULL) ? event->button : 0, + gdk_event_get_time((GdkEvent *)event)); +} + +static gboolean log_button_press_cb(GtkWidget *treeview, GdkEventButton *event, PidginLogViewer *lv) +{ + if (event->type == GDK_BUTTON_PRESS && event->button == 3) + { + GtkTreePath *path; + GtkTreeIter iter; + GValue val; + GaimLog *log; + gpointer *data; + + if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), event->x, event->y, &path, NULL, NULL, NULL)) + return FALSE; + gtk_tree_model_get_iter(GTK_TREE_MODEL(lv->treestore), &iter, path); + val.g_type = 0; + gtk_tree_model_get_value(GTK_TREE_MODEL(lv->treestore), &iter, 1, &val); + + log = g_value_get_pointer(&val); + + if (log == NULL) + return FALSE; + + data = g_new(gpointer, 3); + data[0] = lv; + data[1] = log; + data[2] = NULL; + + log_show_popup_menu(treeview, event, data); + return TRUE; + } + + return FALSE; +} + +static gboolean log_popup_menu_cb(GtkWidget *treeview, PidginLogViewer *lv) +{ + GtkTreeSelection *sel; + GtkTreeIter iter; + GValue val; + GaimLog *log; + gpointer *data; + + sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(lv)); + if (!gtk_tree_selection_get_selected(sel, NULL, &iter)) + return FALSE; + + val.g_type = 0; + gtk_tree_model_get_value(GTK_TREE_MODEL(lv->treestore), + &iter, NODE_COLUMN, &val); + + log = g_value_get_pointer(&val); + + if (log == NULL) + return FALSE; + + data = g_new(gpointer, 3); + data[0] = lv; + data[1] = log; + data[2] = pidgin_treeview_popup_menu_position_func; + + log_show_popup_menu(treeview, NULL, data); + return TRUE; +} + static gboolean search_find_cb(gpointer data) { - GaimGtkLogViewer *viewer = data; + PidginLogViewer *viewer = data; gtk_imhtml_search_find(GTK_IMHTML(viewer->imhtml), viewer->search); return FALSE; } -static void log_select_cb(GtkTreeSelection *sel, GaimGtkLogViewer *viewer) { +static void log_select_cb(GtkTreeSelection *sel, PidginLogViewer *viewer) { GtkTreeIter iter; GValue val; GtkTreeModel *model = GTK_TREE_MODEL(viewer->treestore); @@ -226,7 +364,7 @@ if (log == NULL) return; - gaim_gtk_set_cursor(viewer->window, GDK_WATCH); + pidgin_set_cursor(viewer->window, GDK_WATCH); if (log->type != GAIM_LOG_SYSTEM) { char *title; @@ -248,7 +386,7 @@ gtk_imhtml_set_protocol_name(GTK_IMHTML(viewer->imhtml), gaim_account_get_protocol_name(log->account)); - gaim_signal_emit(gaim_gtk_log_get_handle(), "log-displaying", viewer, log); + gaim_signal_emit(pidgin_log_get_handle(), "log-displaying", viewer, log); gtk_imhtml_append_text(GTK_IMHTML(viewer->imhtml), read, GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_SCROLL | @@ -260,7 +398,7 @@ g_idle_add(search_find_cb, viewer); } - gaim_gtk_clear_cursor(viewer->window); + pidgin_clear_cursor(viewer->window); } /* I want to make this smarter, but haven't come up with a cool algorithm to do so, yet. @@ -269,7 +407,7 @@ * * For now, I'll just make it a flat list. */ -static void populate_log_tree(GaimGtkLogViewer *lv) +static void populate_log_tree(PidginLogViewer *lv) /* Logs are made from trees in real life. This is a tree made from logs */ { @@ -304,10 +442,10 @@ } } -static GaimGtkLogViewer *display_log_viewer(struct log_viewer_hash_t *ht, GList *logs, +static PidginLogViewer *display_log_viewer(struct log_viewer_hash_t *ht, GList *logs, const char *title, GdkPixbuf *pixbuf, int log_size) { - GaimGtkLogViewer *lv; + PidginLogViewer *lv; GtkWidget *title_box; char *text; GtkWidget *pane; @@ -343,7 +481,7 @@ return NULL; } - lv = g_new0(GaimGtkLogViewer, 1); + lv = g_new0(PidginLogViewer, 1); lv->logs = logs; if (ht != NULL) @@ -414,7 +552,10 @@ g_signal_connect (G_OBJECT(lv->treeview), "row-activated", G_CALLBACK(log_row_activated_cb), lv); - gaim_set_accessible_label(lv->treeview, lv->label); + pidgin_set_accessible_label(lv->treeview, lv->label); + + g_signal_connect(lv->treeview, "button-press-event", G_CALLBACK(log_button_press_cb), lv); + g_signal_connect(lv->treeview, "popup-menu", G_CALLBACK(log_popup_menu_cb), lv); /* Log size ************/ if(log_size) { @@ -434,8 +575,8 @@ gtk_paned_add2(GTK_PANED(pane), vbox); /* Viewer ************/ - frame = gaim_gtk_create_imhtml(FALSE, &lv->imhtml, NULL, NULL); - gtk_widget_set_name(lv->imhtml, "gaim_gtklog_imhtml"); + frame = pidgin_create_imhtml(FALSE, &lv->imhtml, NULL, NULL); + gtk_widget_set_name(lv->imhtml, "pidginlog_imhtml"); gtk_widget_set_size_request(lv->imhtml, 320, 200); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); gtk_widget_show(frame); @@ -457,9 +598,9 @@ return lv; } -void gaim_gtk_log_show(GaimLogType type, const char *screenname, GaimAccount *account) { +void pidgin_log_show(GaimLogType type, const char *screenname, GaimAccount *account) { struct log_viewer_hash_t *ht; - GaimGtkLogViewer *lv = NULL; + PidginLogViewer *lv = NULL; const char *name = screenname; char *title; @@ -500,15 +641,15 @@ } display_log_viewer(ht, gaim_log_get_logs(type, screenname, account), - title, gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM), + title, pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM), gaim_log_get_total_size(type, screenname, account)); g_free(title); } -void gaim_gtk_log_show_contact(GaimContact *contact) { +void pidgin_log_show_contact(GaimContact *contact) { struct log_viewer_hash_t *ht = g_new0(struct log_viewer_hash_t, 1); GaimBlistNode *child; - GaimGtkLogViewer *lv = NULL; + PidginLogViewer *lv = NULL; GList *logs = NULL; char *filename; GdkPixbuf *pixbuf; @@ -553,7 +694,7 @@ g_free(title); } -void gaim_gtk_syslog_show() +void pidgin_syslog_show() { GList *accounts = NULL; GList *logs = NULL; @@ -581,28 +722,28 @@ ****************************************************************************/ void * -gaim_gtk_log_get_handle(void) +pidgin_log_get_handle(void) { static int handle; return &handle; } -void gaim_gtk_log_init(void) +void pidgin_log_init(void) { - void *handle = gaim_gtk_log_get_handle(); + void *handle = pidgin_log_get_handle(); gaim_signal_register(handle, "log-displaying", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_BOXED, - "GaimGtkLogViewer *"), + "PidginLogViewer *"), gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_LOG)); } void -gaim_gtk_log_uninit(void) +pidgin_log_uninit(void) { - gaim_signals_unregister_by_instance(gaim_gtk_log_get_handle()); + gaim_signals_unregister_by_instance(pidgin_log_get_handle()); }
--- a/pidgin/gtklog.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtklog.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,20 +22,20 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKLOG_H_ -#define _GAIM_GTKLOG_H_ +#ifndef _PIDGINLOG_H_ +#define _PIDGINLOG_H_ -#include "gtkgaim.h" +#include "pidgin.h" #include "log.h" #include "account.h" -typedef struct _GaimGtkLogViewer GaimGtkLogViewer; +typedef struct _PidginLogViewer PidginLogViewer; /** * A GTK+ Log Viewer. You can look at logs with it. */ -struct _GaimGtkLogViewer { +struct _PidginLogViewer { GList *logs; /**< The list of logs viewed in this viewer */ GtkWidget *window; /**< The viewer's window */ @@ -51,10 +51,10 @@ -void gaim_gtk_log_show(GaimLogType type, const char *screenname, GaimAccount *account); -void gaim_gtk_log_show_contact(GaimContact *contact); +void pidgin_log_show(GaimLogType type, const char *screenname, GaimAccount *account); +void pidgin_log_show_contact(GaimContact *contact); -void gaim_gtk_syslog_show(void); +void pidgin_syslog_show(void); /**************************************************************************/ /** @name GTK+ Log Subsystem */ @@ -64,19 +64,19 @@ /** * Initializes the GTK+ log subsystem. */ -void gaim_gtk_log_init(void); +void pidgin_log_init(void); /** * Returns the GTK+ log subsystem handle. * * @return The GTK+ log subsystem handle. */ -void *gaim_gtk_log_get_handle(void); +void *pidgin_log_get_handle(void); /** * Uninitializes the GTK+ log subsystem. */ -void gaim_gtk_log_uninit(void); +void pidgin_log_uninit(void); /*@}*/
--- a/pidgin/gtkmain.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkmain.c Mon Feb 05 03:37:27 2007 +0000 @@ -22,7 +22,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" #include "conversation.h" @@ -236,9 +236,9 @@ char *icon_path; #endif - gaim_gtkthemes_init(); + pidginthemes_init(); - gaim_gtk_blist_setup_sort_methods(); + pidgin_blist_setup_sort_methods(); #ifndef _WIN32 /* use the nice PNG icon for all the windows */ @@ -262,60 +262,60 @@ static void debug_init(void) { - gaim_debug_set_ui_ops(gaim_gtk_debug_get_ui_ops()); - gaim_gtk_debug_init(); + gaim_debug_set_ui_ops(pidgin_debug_get_ui_ops()); + pidgin_debug_init(); } static void -gaim_gtk_ui_init(void) +pidgin_ui_init(void) { /* Set the UI operation structures. */ - gaim_accounts_set_ui_ops(gaim_gtk_accounts_get_ui_ops()); - gaim_xfers_set_ui_ops(gaim_gtk_xfers_get_ui_ops()); - gaim_blist_set_ui_ops(gaim_gtk_blist_get_ui_ops()); - gaim_notify_set_ui_ops(gaim_gtk_notify_get_ui_ops()); - gaim_privacy_set_ui_ops(gaim_gtk_privacy_get_ui_ops()); - gaim_request_set_ui_ops(gaim_gtk_request_get_ui_ops()); - gaim_sound_set_ui_ops(gaim_gtk_sound_get_ui_ops()); - gaim_connections_set_ui_ops(gaim_gtk_connections_get_ui_ops()); - gaim_whiteboard_set_ui_ops(gaim_gtk_whiteboard_get_ui_ops()); + gaim_accounts_set_ui_ops(pidgin_accounts_get_ui_ops()); + gaim_xfers_set_ui_ops(pidgin_xfers_get_ui_ops()); + gaim_blist_set_ui_ops(pidgin_blist_get_ui_ops()); + gaim_notify_set_ui_ops(pidgin_notify_get_ui_ops()); + gaim_privacy_set_ui_ops(pidgin_privacy_get_ui_ops()); + gaim_request_set_ui_ops(pidgin_request_get_ui_ops()); + gaim_sound_set_ui_ops(pidgin_sound_get_ui_ops()); + gaim_connections_set_ui_ops(pidgin_connections_get_ui_ops()); + gaim_whiteboard_set_ui_ops(pidgin_whiteboard_get_ui_ops()); #ifdef USE_SCREENSAVER - gaim_idle_set_ui_ops(gaim_gtk_idle_get_ui_ops()); + gaim_idle_set_ui_ops(pidgin_idle_get_ui_ops()); #endif - gaim_gtk_stock_init(); - gaim_gtk_account_init(); - gaim_gtk_connection_init(); - gaim_gtk_blist_init(); - gaim_gtk_status_init(); - gaim_gtk_conversations_init(); - gaim_gtk_pounces_init(); - gaim_gtk_privacy_init(); - gaim_gtk_xfers_init(); - gaim_gtk_roomlist_init(); - gaim_gtk_log_init(); + pidgin_stock_init(); + pidgin_account_init(); + pidgin_connection_init(); + pidgin_blist_init(); + pidgin_status_init(); + pidgin_conversations_init(); + pidgin_pounces_init(); + pidgin_privacy_init(); + pidgin_xfers_init(); + pidgin_roomlist_init(); + pidgin_log_init(); } static void -gaim_gtk_quit(void) +pidgin_quit(void) { #ifdef USE_SM /* unplug */ - gaim_gtk_session_end(); + pidgin_session_end(); #endif /* Save the plugins we have loaded for next time. */ - gaim_gtk_plugins_save(); + pidgin_plugins_save(); /* Uninit */ - gaim_gtk_conversations_uninit(); - gaim_gtk_status_uninit(); - gaim_gtk_docklet_uninit(); - gaim_gtk_blist_uninit(); - gaim_gtk_connection_uninit(); - gaim_gtk_account_uninit(); - gaim_gtk_xfers_uninit(); - gaim_gtk_debug_uninit(); + pidgin_conversations_uninit(); + pidgin_status_uninit(); + pidgin_docklet_uninit(); + pidgin_blist_uninit(); + pidgin_connection_uninit(); + pidgin_account_uninit(); + pidgin_xfers_uninit(); + pidgin_debug_uninit(); /* and end it all... */ gtk_main_quit(); @@ -323,14 +323,14 @@ static GaimCoreUiOps core_ops = { - gaim_gtk_prefs_init, + pidgin_prefs_init, debug_init, - gaim_gtk_ui_init, - gaim_gtk_quit + pidgin_ui_init, + pidgin_quit }; static GaimCoreUiOps * -gaim_gtk_core_get_ui_ops(void) +pidgin_core_get_ui_ops(void) { return &core_ops; } @@ -395,7 +395,7 @@ #endif /* HAVE_STARTUP_NOTIFICATION */ #ifndef _WIN32 -static char *gaim_find_binary_location(void *symbol, void *data) +static char *pidgin_find_binary_location(void *symbol, void *data) { static char *fullname = NULL; static gboolean first = TRUE; @@ -455,7 +455,7 @@ /* FUCKING GET ME A TOWEL! */ #ifdef _WIN32 -int gaim_main(HINSTANCE hint, int argc, char *argv[]) +int pidgin_main(HINSTANCE hint, int argc, char *argv[]) #else int main(int argc, char *argv[]) #endif @@ -507,7 +507,7 @@ #endif #ifndef _WIN32 - br_set_locate_fallback_func(gaim_find_binary_location, argv[0]); + br_set_locate_fallback_func(pidgin_find_binary_location, argv[0]); #endif #ifdef ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); @@ -688,11 +688,11 @@ } #ifdef _WIN32 - gtkwgaim_init(hint); + winpidgin_init(hint); #endif - gaim_core_set_ui_ops(gaim_gtk_core_get_ui_ops()); - gaim_eventloop_set_ui_ops(gaim_gtk_eventloop_get_ui_ops()); + gaim_core_set_ui_ops(pidgin_core_get_ui_ops()); + gaim_eventloop_set_ui_ops(pidgin_eventloop_get_ui_ops()); /* * Set plugin search directories. Give priority to the plugins @@ -703,7 +703,7 @@ g_free(search_path); gaim_plugins_add_search_path(LIBDIR); - if (!gaim_core_init(GAIM_GTK_UI)) { + if (!gaim_core_init(PIDGIN_UI)) { fprintf(stderr, "Initialization of the " PIDGIN_NAME " core failed. Dumping core.\n" "Please report this!\n"); @@ -717,11 +717,11 @@ /* TODO: Move prefs loading into gaim_prefs_init() */ gaim_prefs_load(); gaim_prefs_update_old(); - gaim_gtk_prefs_update_old(); + pidgin_prefs_update_old(); /* load plugins we had when we quit */ gaim_plugins_load_saved("/gaim/gtk/plugins/loaded"); - gaim_gtk_docklet_init(); + pidgin_docklet_init(); /* TODO: Move pounces loading into gaim_pounces_init() */ gaim_pounces_load(); @@ -737,7 +737,7 @@ if (!strcmp(gaim_account_get_protocol_id(account), "prpl-oscar")) { if (isdigit(*gaim_account_get_username(account))) gaim_account_set_protocol_id(account, "prpl-icq"); - else + else gaim_account_set_protocol_id(account, "prpl-aim"); } } @@ -745,7 +745,7 @@ ui_main(); #ifdef USE_SM - gaim_gtk_session_init(argv[0], opt_session_arg, opt_config_dir_arg); + pidgin_session_init(argv[0], opt_session_arg, opt_config_dir_arg); #endif if (opt_session_arg != NULL) { g_free(opt_session_arg); @@ -763,7 +763,7 @@ gaim_blist_show(); if (gaim_prefs_get_bool("/gaim/gtk/debug/enabled")) - gaim_gtk_debug_window_show(); + pidgin_debug_window_show(); if (opt_login) { dologin_ret = dologin_named(opt_login_arg); @@ -799,7 +799,7 @@ if ((accounts = gaim_accounts_get_all_active()) == NULL) { - gaim_gtk_accounts_window_show(); + pidgin_accounts_window_show(); } else { @@ -811,7 +811,7 @@ #endif #ifdef _WIN32 - gtkwgaim_post_init(); + winpidgin_post_init(); #endif gtk_main(); @@ -821,7 +821,7 @@ #endif #ifdef _WIN32 - gtkwgaim_cleanup(); + winpidgin_cleanup(); #endif return 0;
--- a/pidgin/gtkmenutray.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkmenutray.c Mon Feb 05 03:37:27 2007 +0000 @@ -46,7 +46,7 @@ * Item Stuff *****************************************************************************/ static void -gaim_gtk_menu_tray_select(GtkItem *item) { +pidgin_menu_tray_select(GtkItem *item) { /* this may look like nothing, but it's really overriding the * GtkMenuItem's select function so that it doesn't get highlighted like * a normal menu item would. @@ -54,7 +54,7 @@ } static void -gaim_gtk_menu_tray_deselect(GtkItem *item) { +pidgin_menu_tray_deselect(GtkItem *item) { /* Probably not necessary, but I'd rather be safe than sorry. We're * overridding the select, so it makes sense to override deselect as well. */ @@ -68,14 +68,14 @@ * Object Stuff *****************************************************************************/ static void -gaim_gtk_menu_tray_get_property(GObject *obj, guint param_id, GValue *value, +pidgin_menu_tray_get_property(GObject *obj, guint param_id, GValue *value, GParamSpec *pspec) { - GaimGtkMenuTray *menu_tray = GAIM_GTK_MENU_TRAY(obj); + PidginMenuTray *menu_tray = PIDGIN_MENU_TRAY(obj); switch(param_id) { case PROP_BOX: - g_value_set_object(value, gaim_gtk_menu_tray_get_box(menu_tray)); + g_value_set_object(value, pidgin_menu_tray_get_box(menu_tray)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); @@ -84,14 +84,14 @@ } static void -gaim_gtk_menu_tray_finalize(GObject *obj) { +pidgin_menu_tray_finalize(GObject *obj) { #if 0 /* This _might_ be leaking, but I have a sneaking suspicion that the widget is * getting destroyed in GtkContainer's finalize function. But if were are * leaking here, be sure to figure out why this causes a crash. * -- Gary */ - GaimGtkMenuTray *tray = GAIM_GTK_MENU_TRAY(obj); + PidginMenuTray *tray = PIDGIN_MENU_TRAY(obj); if(GTK_IS_WIDGET(tray->tray)) gtk_widget_destroy(GTK_WIDGET(tray->tray)); @@ -101,18 +101,18 @@ } static void -gaim_gtk_menu_tray_class_init(GaimGtkMenuTrayClass *klass) { +pidgin_menu_tray_class_init(PidginMenuTrayClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); GtkItemClass *item_class = GTK_ITEM_CLASS(klass); GParamSpec *pspec; parent_class = g_type_class_peek_parent(klass); - object_class->finalize = gaim_gtk_menu_tray_finalize; - object_class->get_property = gaim_gtk_menu_tray_get_property; + object_class->finalize = pidgin_menu_tray_finalize; + object_class->get_property = pidgin_menu_tray_get_property; - item_class->select = gaim_gtk_menu_tray_select; - item_class->deselect = gaim_gtk_menu_tray_deselect; + item_class->select = pidgin_menu_tray_select; + item_class->deselect = pidgin_menu_tray_deselect; pspec = g_param_spec_object("box", "The box", "The box", @@ -122,7 +122,7 @@ } static void -gaim_gtk_menu_tray_init(GaimGtkMenuTray *menu_tray) { +pidgin_menu_tray_init(PidginMenuTray *menu_tray) { GtkWidget *widget = GTK_WIDGET(menu_tray); #if GTK_CHECK_VERSION(2,2,0) GtkSettings *settings; @@ -158,25 +158,25 @@ * API *****************************************************************************/ GType -gaim_gtk_menu_tray_get_gtype(void) { +pidgin_menu_tray_get_gtype(void) { static GType type = 0; if(type == 0) { static const GTypeInfo info = { - sizeof(GaimGtkMenuTrayClass), + sizeof(PidginMenuTrayClass), NULL, NULL, - (GClassInitFunc)gaim_gtk_menu_tray_class_init, + (GClassInitFunc)pidgin_menu_tray_class_init, NULL, NULL, - sizeof(GaimGtkMenuTray), + sizeof(PidginMenuTray), 0, - (GInstanceInitFunc)gaim_gtk_menu_tray_init, + (GInstanceInitFunc)pidgin_menu_tray_init, NULL }; type = g_type_register_static(GTK_TYPE_MENU_ITEM, - "GaimGtkMenuTray", + "PidginMenuTray", &info, 0); } @@ -184,21 +184,21 @@ } GtkWidget * -gaim_gtk_menu_tray_new() { - return g_object_new(GAIM_GTK_TYPE_MENU_TRAY, NULL); +pidgin_menu_tray_new() { + return g_object_new(PIDGIN_TYPE_MENU_TRAY, NULL); } GtkWidget * -gaim_gtk_menu_tray_get_box(GaimGtkMenuTray *menu_tray) { - g_return_val_if_fail(GAIM_GTK_IS_MENU_TRAY(menu_tray), NULL); +pidgin_menu_tray_get_box(PidginMenuTray *menu_tray) { + g_return_val_if_fail(PIDGIN_IS_MENU_TRAY(menu_tray), NULL); return menu_tray->tray; } static void -gaim_gtk_menu_tray_add(GaimGtkMenuTray *menu_tray, GtkWidget *widget, +pidgin_menu_tray_add(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip, gboolean prepend) { - g_return_if_fail(GAIM_GTK_IS_MENU_TRAY(menu_tray)); + g_return_if_fail(PIDGIN_IS_MENU_TRAY(menu_tray)); g_return_if_fail(GTK_IS_WIDGET(widget)); if (GTK_WIDGET_NO_WINDOW(widget)) @@ -211,7 +211,7 @@ widget = event; } - gaim_gtk_menu_tray_set_tooltip(menu_tray, widget, tooltip); + pidgin_menu_tray_set_tooltip(menu_tray, widget, tooltip); if (prepend) gtk_box_pack_start(GTK_BOX(menu_tray->tray), widget, FALSE, FALSE, 0); @@ -220,19 +220,19 @@ } void -gaim_gtk_menu_tray_append(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) +pidgin_menu_tray_append(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) { - gaim_gtk_menu_tray_add(menu_tray, widget, tooltip, FALSE); + pidgin_menu_tray_add(menu_tray, widget, tooltip, FALSE); } void -gaim_gtk_menu_tray_prepend(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) +pidgin_menu_tray_prepend(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) { - gaim_gtk_menu_tray_add(menu_tray, widget, tooltip, TRUE); + pidgin_menu_tray_add(menu_tray, widget, tooltip, TRUE); } void -gaim_gtk_menu_tray_set_tooltip(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) +pidgin_menu_tray_set_tooltip(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) { if (!menu_tray->tooltips) return;
--- a/pidgin/gtkmenutray.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkmenutray.h Mon Feb 05 03:37:27 2007 +0000 @@ -2,7 +2,7 @@ * @file gtkmenutray.h GTK+ Tray menu item * @ingroup gtkui * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -20,60 +20,60 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef GAIM_GTK_MENU_TRAY_H -#define GAIM_GTK_MENU_TRAY_H +#ifndef PIDGIN_MENU_TRAY_H +#define PIDGIN_MENU_TRAY_H #include <gtk/gtkhbox.h> #include <gtk/gtkmenuitem.h> #include <gtk/gtktooltips.h> -#define GAIM_GTK_TYPE_MENU_TRAY (gaim_gtk_menu_tray_get_gtype()) -#define GAIM_GTK_MENU_TRAY(obj) (GTK_CHECK_CAST((obj), GAIM_GTK_TYPE_MENU_TRAY, GaimGtkMenuTray)) -#define GAIM_GTK_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), GAIM_GTK_TYPE_MENU_TRAY, GaimGtkMenuTrayClass)) -#define GAIM_GTK_IS_MENU_TRAY(obj) (GTK_CHECK_TYPE((obj), GAIM_GTK_TYPE_MENU_TRAY)) -#define GAIM_GTK_IS_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), GAIM_GTK_TYPE_MENU_TRAY)) -#define GAIM_GTK_MENU_TRAY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), GAIM_GTK_TYPE_MENU_TRAY, GaimGtkMenuTrayClass)) +#define PIDGIN_TYPE_MENU_TRAY (pidgin_menu_tray_get_gtype()) +#define PIDGIN_MENU_TRAY(obj) (GTK_CHECK_CAST((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTray)) +#define PIDGIN_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass)) +#define PIDGIN_IS_MENU_TRAY(obj) (GTK_CHECK_TYPE((obj), PIDGIN_TYPE_MENU_TRAY)) +#define PIDGIN_IS_MENU_TRAY_CLASS(klass) (GTK_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_MENU_TRAY)) +#define PIDGIN_MENU_TRAY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS((obj), PIDGIN_TYPE_MENU_TRAY, PidginMenuTrayClass)) -typedef struct _GaimGtkMenuTray GaimGtkMenuTray; -typedef struct _GaimGtkMenuTrayClass GaimGtkMenuTrayClass; +typedef struct _PidginMenuTray PidginMenuTray; +typedef struct _PidginMenuTrayClass PidginMenuTrayClass; -/** A GaimGtkMenuTray */ -struct _GaimGtkMenuTray { +/** A PidginMenuTray */ +struct _PidginMenuTray { GtkMenuItem gparent; /**< The parent instance */ GtkWidget *tray; /**< The tray */ GtkTooltips *tooltips; /**< Tooltips */ }; -/** A GaimGtkMenuTrayClass */ -struct _GaimGtkMenuTrayClass { +/** A PidginMenuTrayClass */ +struct _PidginMenuTrayClass { GtkMenuItemClass gparent; /**< The parent class */ }; G_BEGIN_DECLS /** - * Registers the GaimGtkMenuTray class if necessary and returns the + * Registers the PidginMenuTray class if necessary and returns the * type ID assigned to it. * - * @return The GaimGtkMenuTray type ID + * @return The PidginMenuTray type ID */ -GType gaim_gtk_menu_tray_get_gtype(void); +GType pidgin_menu_tray_get_gtype(void); /** - * Creates a new GaimGtkMenuTray + * Creates a new PidginMenuTray * - * @return A new GaimGtkMenuTray + * @return A new PidginMenuTray */ -GtkWidget *gaim_gtk_menu_tray_new(void); +GtkWidget *pidgin_menu_tray_new(void); /** - * Gets the box for the GaimGtkMenuTray + * Gets the box for the PidginMenuTray * - * @param menu_tray The GaimGtkMenuTray + * @param menu_tray The PidginMenuTray * * @return The box that this menu tray is using */ -GtkWidget *gaim_gtk_menu_tray_get_box(GaimGtkMenuTray *menu_tray); +GtkWidget *pidgin_menu_tray_get_box(PidginMenuTray *menu_tray); /** * Appends a widget into the tray @@ -82,7 +82,7 @@ * @param widget The widget * @param tooltip The tooltip for this widget (widget requires its own X-window) */ -void gaim_gtk_menu_tray_append(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); +void pidgin_menu_tray_append(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); /** * Prepends a widget into the tray @@ -91,7 +91,7 @@ * @param widget The widget * @param tooltip The tooltip for this widget (widget requires its own X-window) */ -void gaim_gtk_menu_tray_prepend(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); +void pidgin_menu_tray_prepend(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); /** * Set the tooltip for a widget @@ -100,8 +100,8 @@ * @param widget The widget * @param tooltip The tooltip to set for the widget (widget requires its own X-window) */ -void gaim_gtk_menu_tray_set_tooltip(GaimGtkMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); +void pidgin_menu_tray_set_tooltip(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip); G_END_DECLS -#endif /* GAIM_GTK_MENU_TRAY_H */ +#endif /* PIDGIN_MENU_TRAY_H */
--- a/pidgin/gtknickcolors.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtknickcolors.h Mon Feb 05 03:37:27 2007 +0000 @@ -3,7 +3,7 @@ * @ingroup gtkui * * gaim - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -21,32 +21,34 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKNICKCOLORS_H_ -#define _GAIM_GTKNICKCOLORS_H_ +#ifndef _PIDGINNICKCOLORS_H_ +#define _PIDGINNICKCOLORS_H_ static GdkColor nick_seed_colors[] = { - {0, 47616, 46336, 43776}, /* Basic 3D Medium */ - {0, 32768, 32000, 29696}, /* Basic 3D Dark */ - {0, 22016, 20992, 18432}, /* 3D Shadow */ - {0, 33536, 42496, 32512}, /* Green Medium */ - {0, 23808, 29952, 21760}, /* Green Dark */ - {0, 17408, 22016, 12800}, /* Green Shadow */ - {0, 57344, 46592, 44800}, /* Red Hilight */ - {0, 49408, 26112, 23040}, /* Red Medium */ - {0, 34816, 17920, 12544}, /* Red Dark */ - {0, 49408, 14336, 8704}, /* Red Shadow */ - {0, 34816, 32512, 41728}, /* Purple Medium */ - {0, 25088, 23296, 33024}, /* Purple Dark */ - {0, 18688, 16384, 26112}, /* Purple Shadow */ - {0, 40192, 47104, 53760}, /* Blue Hilight */ - {0, 29952, 36864, 44544}, /* Blue Medium */ - {0, 57344, 49920, 40448}, /* Face Skin Medium */ - {0, 45824, 37120, 26880}, /* Face skin Dark */ - {0, 33280, 26112, 18176}, /* Face Skin Shadow */ - {0, 57088, 16896, 7680}, /* Accent Red */ - {0, 39168, 0, 0}, /* Accent Red Dark */ - {0, 17920, 40960, 17920}, /* Accent Green */ - {0, 9728, 50944, 9728} /* Accent Green Dark */ + {0, 64764, 59881, 20303}, /* Butter #1 */ + {0, 60909, 54484, 0}, /* Butter #2 */ + {0, 50372, 41120, 0}, /* Butter #3 */ + {0, 64764, 44975, 15934}, /* Orange #1 */ + {0, 62965, 31097, 0}, /* Orange #2 */ + {0, 52942, 23644, 0}, /* Orange #3 */ + {0, 59811, 47545, 28270}, /* Chocolate #1 */ + {0, 49601, 32125, 4369}, /* Chocolate #2 */ + {0, 36751, 22873, 514}, /* Chocolate #3 */ + {0, 35466, 58082, 13364}, /* Chameleon #1 */ + {0, 29555, 53970, 5654}, /* Chameleon #2 */ + {0, 20046, 39578, 1542}, /* Chameleon #3 */ + {0, 29289, 40863, 53199}, /* Sky Blue #1 */ + {0, 13364, 25957, 42148}, /* Sky Blue #2 */ + {0, 8224, 19018, 34695}, /* Sky Blue #3 */ + {0, 44461, 32639, 43167}, /* Plum #1 */ + {0, 30069, 20560, 31611}, /* Plum #2 */ + {0, 23644, 13621, 26214}, /* Plum #3 */ + {0, 61423, 10537, 10537}, /* Scarlet Red #1 */ + {0, 52428, 0, 0}, /* Scarlet Red #2 */ + {0, 42148, 0, 0}, /* Scarlet Red #3 */ + {0, 34952, 35466, 34181}, /* Aluminium #4*/ + {0, 21845, 22359, 21331}, /* Aluminium #5*/ + {0, 11822, 13364, 13878} /* Aluminium #6*/ }; #define NUM_NICK_SEED_COLORS (sizeof(nick_seed_colors) / sizeof(nick_seed_colors[0]))
--- a/pidgin/gtknotify.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtknotify.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include <gdk/gdkkeysyms.h> @@ -88,7 +88,7 @@ static GaimMailDialog *mail_dialog = NULL; -static void *gaim_gtk_notify_emails(GaimConnection *gc, size_t count, gboolean detailed, +static void *pidgin_notify_emails(GaimConnection *gc, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls); @@ -199,7 +199,7 @@ } static void * -gaim_gtk_notify_message(GaimNotifyMsgType type, const char *title, +pidgin_notify_message(GaimNotifyMsgType type, const char *title, const char *primary, const char *secondary) { GtkWidget *dialog; @@ -297,10 +297,10 @@ } static void * -gaim_gtk_notify_email(GaimConnection *gc, const char *subject, const char *from, +pidgin_notify_email(GaimConnection *gc, const char *subject, const char *from, const char *to, const char *url) { - return gaim_gtk_notify_emails(gc, 1, (subject != NULL), + return pidgin_notify_emails(gc, 1, (subject != NULL), (subject == NULL ? NULL : &subject), (from == NULL ? NULL : &from), (to == NULL ? NULL : &to), @@ -308,7 +308,7 @@ } static GtkWidget * -gaim_gtk_get_mail_dialog() +pidgin_get_mail_dialog() { if (mail_dialog == NULL) { GtkWidget *dialog = NULL; @@ -328,7 +328,7 @@ _("Open All Messages"), GTK_RESPONSE_ACCEPT); button = gtk_dialog_add_button(GTK_DIALOG(dialog), - GAIM_STOCK_OPEN_MAIL, GTK_RESPONSE_YES); + PIDGIN_STOCK_OPEN_MAIL, GTK_RESPONSE_YES); /* Setup the dialog */ gtk_container_set_border_width(GTK_CONTAINER(dialog), GAIM_HIG_BOX_SPACE); @@ -355,7 +355,7 @@ mail_dialog->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(mail_dialog->treemodel)); gtk_tree_view_set_search_column(GTK_TREE_VIEW(mail_dialog->treeview), GAIM_MAIL_TEXT); gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(mail_dialog->treeview), - gaim_gtk_tree_view_search_equal_func, NULL, NULL); + pidgin_tree_view_search_equal_func, NULL, NULL); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(email_response_cb), mail_dialog); @@ -391,14 +391,14 @@ * count > 0 mean non-detailed. */ static void * -gaim_gtk_notify_add_mail(GtkTreeStore *treemodel, GaimAccount *account, char *notification, const char *url, int count) +pidgin_notify_add_mail(GtkTreeStore *treemodel, GaimAccount *account, char *notification, const char *url, int count) { GaimNotifyMailData *data = NULL; GtkTreeIter iter; GdkPixbuf *icon; gboolean new_n = TRUE; - icon = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); if (count > 0) { /* Allow only one non-detailed email notification for each account */ @@ -441,7 +441,7 @@ } static void * -gaim_gtk_notify_emails(GaimConnection *gc, size_t count, gboolean detailed, +pidgin_notify_emails(GaimConnection *gc, size_t count, gboolean detailed, const char **subjects, const char **froms, const char **tos, const char **urls) { @@ -451,7 +451,7 @@ GaimNotifyMailData *data = NULL; account = gaim_connection_get_account(gc); - dialog = gaim_gtk_get_mail_dialog(); /* This creates mail_dialog if necessary */ + dialog = pidgin_get_mail_dialog(); /* This creates mail_dialog if necessary */ mail_dialog->total_count += count; if (detailed) { @@ -490,7 +490,7 @@ g_free(from_text); g_free(subject_text); - data = gaim_gtk_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, 0); + data = pidgin_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, 0); g_free(notification); if (urls != NULL) @@ -501,7 +501,7 @@ "%s has %d new messages.", (int)count), *tos, (int)count); - data = gaim_gtk_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, count); + data = pidgin_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, count); g_free(notification); } @@ -514,7 +514,7 @@ mail_dialog->in_use = TRUE; /* So that _set_headline doesn't accidentally remove the notifications when replacing an old notification. */ - gaim_gtk_blist_set_headline(label_text, + pidgin_blist_set_headline(label_text, pixbuf, G_CALLBACK(gtk_widget_show_all), dialog, (GDestroyNotify)reset_mail_dialog); mail_dialog->in_use = FALSE; @@ -540,7 +540,7 @@ } static void * -gaim_gtk_notify_formatted(const char *title, const char *primary, +pidgin_notify_formatted(const char *title, const char *primary, const char *secondary, const char *text) { GtkWidget *window; @@ -586,8 +586,8 @@ gtk_widget_show(label); /* Add the imhtml */ - frame = gaim_gtk_create_imhtml(FALSE, &imhtml, NULL, NULL); - gtk_widget_set_name(imhtml, "gaim_gtknotify_imhtml"); + frame = pidgin_create_imhtml(FALSE, &imhtml, NULL, NULL); + gtk_widget_set_name(imhtml, "pidginnotify_imhtml"); gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), gtk_imhtml_get_format_functions(GTK_IMHTML(imhtml)) | GTK_IMHTML_IMAGE); gtk_widget_set_size_request(imhtml, 300, 250); @@ -625,7 +625,7 @@ } static void -gaim_gtk_notify_searchresults_new_rows(GaimConnection *gc, GaimNotifySearchResults *results, +pidgin_notify_searchresults_new_rows(GaimConnection *gc, GaimNotifySearchResults *results, void *data_) { GaimNotifySearchResultsData *data = data_; @@ -638,7 +638,7 @@ gtk_list_store_clear(data->model); - pixbuf = gaim_gtk_create_prpl_icon(gaim_connection_get_account(gc), 0.5); + pixbuf = pidgin_create_prpl_icon(gaim_connection_get_account(gc), 0.5); /* +1 is for the automagically created Status column. */ col_num = gaim_notify_searchresults_get_columns_count(results) + 1; @@ -666,7 +666,7 @@ } static void * -gaim_gtk_notify_searchresults(GaimConnection *gc, const char *title, +pidgin_notify_searchresults(GaimConnection *gc, const char *title, const char *primary, const char *secondary, GaimNotifySearchResults *results, gpointer user_data) { @@ -795,16 +795,16 @@ button = gtk_button_new_from_stock(GTK_STOCK_ADD); break; case GAIM_NOTIFY_BUTTON_INFO: - button = gtk_button_new_from_stock(GAIM_STOCK_INFO); + button = gtk_button_new_from_stock(PIDGIN_STOCK_INFO); break; case GAIM_NOTIFY_BUTTON_IM: - button = gtk_button_new_from_stock(GAIM_STOCK_IM); + button = gtk_button_new_from_stock(PIDGIN_STOCK_IM); break; case GAIM_NOTIFY_BUTTON_JOIN: - button = gtk_button_new_from_stock(GAIM_STOCK_CHAT); + button = gtk_button_new_from_stock(PIDGIN_STOCK_CHAT); break; case GAIM_NOTIFY_BUTTON_INVITE: - button = gtk_button_new_from_stock(GAIM_STOCK_INVITE); + button = gtk_button_new_from_stock(PIDGIN_STOCK_INVITE); break; default: gaim_debug_warning("gtknotify", "Incorrect button type: %d\n", b->type); @@ -839,7 +839,7 @@ data->window = window; /* Insert rows. */ - gaim_gtk_notify_searchresults_new_rows(gc, results, data); + pidgin_notify_searchresults_new_rows(gc, results, data); /* Show the window */ gtk_widget_show(window); @@ -847,7 +847,7 @@ } static void * -gaim_gtk_notify_userinfo(GaimConnection *gc, const char *who, +pidgin_notify_userinfo(GaimConnection *gc, const char *who, GaimNotifyUserInfo *user_info) { char *primary, *info; @@ -855,14 +855,14 @@ primary = g_strdup_printf(_("Info for %s"), who); info = gaim_notify_user_info_get_text_with_newline(user_info, "<br />"); - ui_handle = gaim_gtk_notify_formatted(_("Buddy Information"), primary, NULL, info); + ui_handle = pidgin_notify_formatted(_("Buddy Information"), primary, NULL, info); g_free(info); g_free(primary); return ui_handle; } static void -gaim_gtk_close_notify(GaimNotifyType type, void *ui_handle) +pidgin_close_notify(GaimNotifyType type, void *ui_handle) { if (type == GAIM_NOTIFY_EMAIL || type == GAIM_NOTIFY_EMAILS) { @@ -934,7 +934,7 @@ #endif /* _WIN32 */ static void * -gaim_gtk_notify_uri(const char *uri) +pidgin_notify_uri(const char *uri) { #ifndef _WIN32 char *escaped = g_shell_quote(uri); @@ -958,9 +958,9 @@ else if (!strcmp(web_browser, "epiphany") || !strcmp(web_browser, "galeon")) { - if (place == GAIM_BROWSER_NEW_WINDOW) + if (place == PIDGIN_BROWSER_NEW_WINDOW) command = g_strdup_printf("%s -w %s", web_browser, escaped); - else if (place == GAIM_BROWSER_NEW_TAB) + else if (place == PIDGIN_BROWSER_NEW_TAB) command = g_strdup_printf("%s -n %s", web_browser, escaped); else command = g_strdup_printf("%s %s", web_browser, escaped); @@ -998,15 +998,15 @@ if (!strcmp(web_browser, "firefox")) args = "-a firefox"; - if (place == GAIM_BROWSER_NEW_WINDOW) + if (place == PIDGIN_BROWSER_NEW_WINDOW) remote_command = g_strdup_printf("%s %s -remote " "openURL(%s,new-window)", web_browser, args, escaped); - else if (place == GAIM_BROWSER_NEW_TAB) + else if (place == PIDGIN_BROWSER_NEW_TAB) remote_command = g_strdup_printf("%s %s -remote " "openURL(%s,new-tab)", web_browser, args, escaped); - else if (place == GAIM_BROWSER_CURRENT) + else if (place == PIDGIN_BROWSER_CURRENT) remote_command = g_strdup_printf("%s %s -remote " "openURL(%s)", web_browser, args, escaped); @@ -1015,13 +1015,13 @@ { command = g_strdup_printf("netscape %s", escaped); - if (place == GAIM_BROWSER_NEW_WINDOW) + if (place == PIDGIN_BROWSER_NEW_WINDOW) { remote_command = g_strdup_printf("netscape -remote " "openURL(%s,new-window)", escaped); } - else if (place == GAIM_BROWSER_CURRENT) + else if (place == PIDGIN_BROWSER_CURRENT) { remote_command = g_strdup_printf("netscape -remote " "openURL(%s)", escaped); @@ -1029,11 +1029,11 @@ } else if (!strcmp(web_browser, "opera")) { - if (place == GAIM_BROWSER_NEW_WINDOW) + if (place == PIDGIN_BROWSER_NEW_WINDOW) command = g_strdup_printf("opera -newwindow %s", escaped); - else if (place == GAIM_BROWSER_NEW_TAB) + else if (place == PIDGIN_BROWSER_NEW_TAB) command = g_strdup_printf("opera -newpage %s", escaped); - else if (place == GAIM_BROWSER_CURRENT) + else if (place == PIDGIN_BROWSER_CURRENT) { remote_command = g_strdup_printf("opera -remote " "openURL(%s)", escaped); @@ -1086,7 +1086,7 @@ g_free(command); #else /* !_WIN32 */ - gtkwgaim_notify_uri(uri); + winpidgin_notify_uri(uri); #endif /* !_WIN32 */ return NULL; @@ -1094,19 +1094,19 @@ static GaimNotifyUiOps ops = { - gaim_gtk_notify_message, - gaim_gtk_notify_email, - gaim_gtk_notify_emails, - gaim_gtk_notify_formatted, - gaim_gtk_notify_searchresults, - gaim_gtk_notify_searchresults_new_rows, - gaim_gtk_notify_userinfo, - gaim_gtk_notify_uri, - gaim_gtk_close_notify + pidgin_notify_message, + pidgin_notify_email, + pidgin_notify_emails, + pidgin_notify_formatted, + pidgin_notify_searchresults, + pidgin_notify_searchresults_new_rows, + pidgin_notify_userinfo, + pidgin_notify_uri, + pidgin_close_notify }; GaimNotifyUiOps * -gaim_gtk_notify_get_ui_ops(void) +pidgin_notify_get_ui_ops(void) { return &ops; }
--- a/pidgin/gtknotify.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtknotify.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKNOTIFY_H_ -#define _GAIM_GTKNOTIFY_H_ +#ifndef _PIDGINNOTIFY_H_ +#define _PIDGINNOTIFY_H_ #include "notify.h" @@ -32,6 +32,6 @@ * * @return The GTK+ UI notify operations structure. */ -GaimNotifyUiOps *gaim_gtk_notify_get_ui_ops(void); +GaimNotifyUiOps *pidgin_notify_get_ui_ops(void); -#endif /* _GAIM_GTKNOTIFY_H_ */ +#endif /* _PIDGINNOTIFY_H_ */
--- a/pidgin/gtkplugin.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkplugin.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkplugin.h" #include "gtkpluginpref.h" #include "gtkutils.h" @@ -45,18 +45,18 @@ static GHashTable *plugin_pref_dialogs = NULL; GtkWidget * -gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin) +pidgin_plugin_get_config_frame(GaimPlugin *plugin) { GtkWidget *config = NULL; g_return_val_if_fail(plugin != NULL, NULL); if (GAIM_IS_GTK_PLUGIN(plugin) && plugin->info->ui_info - && GAIM_GTK_PLUGIN_UI_INFO(plugin)->get_config_frame) + && PIDGIN_PLUGIN_UI_INFO(plugin)->get_config_frame) { - GaimGtkPluginUiInfo *ui_info; + PidginPluginUiInfo *ui_info; - ui_info = GAIM_GTK_PLUGIN_UI_INFO(plugin); + ui_info = PIDGIN_PLUGIN_UI_INFO(plugin); config = ui_info->get_config_frame(plugin); @@ -77,7 +77,7 @@ frame = plugin->info->prefs_info->get_plugin_pref_frame(plugin); - config = gaim_gtk_plugin_pref_create_frame(frame); + config = pidgin_plugin_pref_create_frame(frame); /* XXX According to bug #1407047 this broke saving pluging preferences, I'll look at fixing it correctly later. gaim_plugin_pref_frame_destroy(frame); @@ -88,7 +88,7 @@ } void -gaim_gtk_plugins_save(void) +pidgin_plugins_save(void) { gaim_plugins_save_loaded("/gaim/gtk/plugins/loaded"); } @@ -176,7 +176,7 @@ gtk_widget_set_sensitive(pref_button, loaded && ((GAIM_IS_GTK_PLUGIN(plug) && plug->info->ui_info - && GAIM_GTK_PLUGIN_UI_INFO(plug)->get_config_frame) + && PIDGIN_PLUGIN_UI_INFO(plug)->get_config_frame) || (plug->info->prefs_info && plug->info->prefs_info->get_plugin_pref_frame))); } @@ -246,12 +246,12 @@ if (!gaim_plugin_is_loaded(plug)) { - gaim_gtk_set_cursor(plugin_dialog, GDK_WATCH); + pidgin_set_cursor(plugin_dialog, GDK_WATCH); gaim_plugin_load(plug); plugin_toggled_stage_two(plug, model, iter, FALSE); - gaim_gtk_clear_cursor(plugin_dialog); + pidgin_clear_cursor(plugin_dialog); } else { @@ -298,17 +298,17 @@ if (unload) { - gaim_gtk_set_cursor(plugin_dialog, GDK_WATCH); + pidgin_set_cursor(plugin_dialog, GDK_WATCH); gaim_plugin_unload(plug); - gaim_gtk_clear_cursor(plugin_dialog); + pidgin_clear_cursor(plugin_dialog); } gtk_widget_set_sensitive(pref_button, gaim_plugin_is_loaded(plug) && ((GAIM_IS_GTK_PLUGIN(plug) && plug->info->ui_info - && GAIM_GTK_PLUGIN_UI_INFO(plug)->get_config_frame) + && PIDGIN_PLUGIN_UI_INFO(plug)->get_config_frame) || (plug->info->prefs_info && plug->info->prefs_info->get_plugin_pref_frame))); @@ -342,7 +342,7 @@ -1); g_free(iter); - gaim_gtk_plugins_save(); + pidgin_plugins_save(); } static gboolean ensure_plugin_visible(void *data) @@ -417,7 +417,7 @@ gtk_widget_set_sensitive(pref_button, gaim_plugin_is_loaded(plug) && ((GAIM_IS_GTK_PLUGIN(plug) && plug->info->ui_info - && GAIM_GTK_PLUGIN_UI_INFO(plug)->get_config_frame) + && PIDGIN_PLUGIN_UI_INFO(plug)->get_config_frame) || (plug->info->prefs_info && plug->info->prefs_info->get_plugin_pref_frame))); @@ -466,7 +466,7 @@ if (plugin_pref_dialogs != NULL && g_hash_table_lookup(plugin_pref_dialogs, plug)) break; - box = gaim_gtk_plugin_get_config_frame(plug); + box = pidgin_plugin_get_config_frame(plug); if (box == NULL) break; @@ -511,7 +511,7 @@ plugin_dialog_response_cb(dialog, GAIM_RESPONSE_CONFIGURE, sel); } -void gaim_gtk_plugin_dialog_show() +void pidgin_plugin_dialog_show() { GtkWidget *sw; GtkWidget *event_view; @@ -591,7 +591,7 @@ gtk_container_add(GTK_CONTAINER(sw), event_view); gtk_tree_view_set_search_column(GTK_TREE_VIEW(event_view), 1); gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(event_view), - gaim_gtk_tree_view_search_equal_func, NULL, NULL); + pidgin_tree_view_search_equal_func, NULL, NULL); expander = gtk_expander_new(_("<b>Plugin Details</b>")); gtk_expander_set_use_markup(GTK_EXPANDER(expander), TRUE);
--- a/pidgin/gtkplugin.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkplugin.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,32 +22,32 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKPLUGIN_H_ -#define _GAIM_GTKPLUGIN_H_ +#ifndef _PIDGINPLUGIN_H_ +#define _PIDGINPLUGIN_H_ -#include "gtkgaim.h" +#include "pidgin.h" #include "plugin.h" -typedef struct _GaimGtkPluginUiInfo GaimGtkPluginUiInfo; +typedef struct _PidginPluginUiInfo PidginPluginUiInfo; /** * A GTK+ UI structure for plugins. */ -struct _GaimGtkPluginUiInfo +struct _PidginPluginUiInfo { GtkWidget *(*get_config_frame)(GaimPlugin *plugin); int page_num; /**< Reserved */ }; -#define GAIM_GTK_PLUGIN_TYPE GAIM_GTK_UI +#define PIDGIN_PLUGIN_TYPE PIDGIN_UI #define GAIM_IS_GTK_PLUGIN(plugin) \ ((plugin)->info != NULL && (plugin)->info->ui_info != NULL && \ - !strcmp((plugin)->info->ui_requirement, GAIM_GTK_PLUGIN_TYPE)) + !strcmp((plugin)->info->ui_requirement, PIDGIN_PLUGIN_TYPE)) -#define GAIM_GTK_PLUGIN_UI_INFO(plugin) \ - ((GaimGtkPluginUiInfo *)(plugin)->info->ui_info) +#define PIDGIN_PLUGIN_UI_INFO(plugin) \ + ((PidginPluginUiInfo *)(plugin)->info->ui_info) /** * Returns the configuration frame widget for a GTK+ plugin, if one @@ -58,16 +58,16 @@ * @return The frame, if the plugin is a GTK+ plugin and provides a * configuration frame. */ -GtkWidget *gaim_gtk_plugin_get_config_frame(GaimPlugin *plugin); +GtkWidget *pidgin_plugin_get_config_frame(GaimPlugin *plugin); /** * Saves all loaded plugins. */ -void gaim_gtk_plugins_save(void); +void pidgin_plugins_save(void); /** * Shows the Plugins dialog */ -void gaim_gtk_plugin_dialog_show(void); +void pidgin_plugin_dialog_show(void); -#endif /* _GAIM_GTKPLUGIN_H_ */ +#endif /* _PIDGINPLUGIN_H_ */
--- a/pidgin/gtkpluginpref.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkpluginpref.c Mon Feb 05 03:37:27 2007 +0000 @@ -80,7 +80,7 @@ switch(gaim_plugin_pref_get_type(pref)) { case GAIM_PLUGIN_PREF_CHOICE: - gtk_label = gaim_gtk_prefs_dropdown_from_list(parent, pref_label, + gtk_label = pidgin_prefs_dropdown_from_list(parent, pref_label, GAIM_PREF_STRING, pref_name, gaim_plugin_pref_get_choices(pref)); gtk_misc_set_alignment(GTK_MISC(gtk_label), 0, 0.5); @@ -142,7 +142,7 @@ gtk_box_pack_start(GTK_BOX(hbox), spacer, FALSE, FALSE, 0); gtk_widget_show(spacer); - frame = gaim_gtk_create_imhtml(TRUE, &imhtml, &toolbar, NULL); + frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, NULL); if (!(format & GAIM_STRING_FORMAT_TYPE_HTML)) gtk_widget_destroy(toolbar); @@ -174,7 +174,7 @@ switch(gaim_plugin_pref_get_type(pref)) { case GAIM_PLUGIN_PREF_CHOICE: - gtk_label = gaim_gtk_prefs_dropdown_from_list(parent, pref_label, + gtk_label = pidgin_prefs_dropdown_from_list(parent, pref_label, GAIM_PREF_INT, pref_name, gaim_plugin_pref_get_choices(pref)); gtk_misc_set_alignment(GTK_MISC(gtk_label), 0, 0.5); @@ -185,7 +185,7 @@ case GAIM_PLUGIN_PREF_NONE: default: gaim_plugin_pref_get_bounds(pref, &min, &max); - gaim_gtk_prefs_labeled_spin_button(parent, pref_label, + pidgin_prefs_labeled_spin_button(parent, pref_label, pref_name, min, max, sg); break; } @@ -203,7 +203,7 @@ GtkWidget * -gaim_gtk_plugin_pref_create_frame(GaimPluginPrefFrame *frame) { +pidgin_plugin_pref_create_frame(GaimPluginPrefFrame *frame) { GtkWidget *ret, *parent; GtkSizeGroup *sg; GList *pp; @@ -232,7 +232,7 @@ if(gaim_plugin_pref_get_type(pref) == GAIM_PLUGIN_PREF_INFO) { make_info_pref(parent, pref); } else { - parent = gaim_gtk_make_frame(ret, label); + parent = pidgin_make_frame(ret, label); gtk_widget_show(parent); } @@ -241,7 +241,7 @@ switch(gaim_prefs_get_type(name)) { case GAIM_PREF_BOOLEAN: - gaim_gtk_prefs_checkbox(label, name, parent); + pidgin_prefs_checkbox(label, name, parent); break; case GAIM_PREF_INT: make_int_pref(parent, pref, sg);
--- a/pidgin/gtkpluginpref.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkpluginpref.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -23,12 +23,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifndef _GAIM_GTKPLUGINPREF_H_ -#define _GAIM_GTKPLUGINPREF_H_ +#ifndef _PIDGINPLUGINPREF_H_ +#define _PIDGINPLUGINPREF_H_ #include "pluginpref.h" -#include "gtkgaim.h" +#include "pidgin.h" #ifdef __cplusplus extern "C" { @@ -40,10 +40,10 @@ * @param frame GaimPluginPrefFrame * @return The gtk preference frame */ -GtkWidget *gaim_gtk_plugin_pref_create_frame(GaimPluginPrefFrame *frame); +GtkWidget *pidgin_plugin_pref_create_frame(GaimPluginPrefFrame *frame); #ifdef __cplusplus } #endif -#endif /* _GAIM_GTKPLUGINPREF_H_ */ +#endif /* _PIDGINPLUGINPREF_H_ */
--- a/pidgin/gtkpounce.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkpounce.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "account.h" #include "conversation.h" @@ -104,7 +104,7 @@ /* Buttons */ GtkWidget *save_button; -} GaimGtkPounceDialog; +} PidginPounceDialog; typedef struct { @@ -121,7 +121,7 @@ * Callbacks **************************************************************************/ static gint -delete_win_cb(GtkWidget *w, GdkEventAny *e, GaimGtkPounceDialog *dialog) +delete_win_cb(GtkWidget *w, GdkEventAny *e, PidginPounceDialog *dialog) { gtk_widget_destroy(dialog->window); g_free(dialog); @@ -130,7 +130,7 @@ } static void -cancel_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) +cancel_cb(GtkWidget *w, PidginPounceDialog *dialog) { delete_win_cb(NULL, NULL, dialog); } @@ -186,7 +186,7 @@ events = gaim_pounce_get_events(pounce); - pixbuf = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); pouncer = gaim_account_get_username(account); pouncee = gaim_pounce_get_pouncee(pounce); @@ -236,7 +236,7 @@ } static void -save_pounce_cb(GtkWidget *w, GaimGtkPounceDialog *dialog) +save_pounce_cb(GtkWidget *w, PidginPounceDialog *dialog) { const char *name; const char *message, *command, *sound, *reason; @@ -300,7 +300,7 @@ if (dialog->pounce == NULL) { - dialog->pounce = gaim_pounce_new(GAIM_GTK_UI, dialog->account, + dialog->pounce = gaim_pounce_new(PIDGIN_UI, dialog->account, name, events, options); } else { @@ -353,13 +353,13 @@ static void pounce_choose_cb(GtkWidget *item, GaimAccount *account, - GaimGtkPounceDialog *dialog) + PidginPounceDialog *dialog) { dialog->account = account; } static void -buddy_changed_cb(GtkEntry *entry, GaimGtkPounceDialog *dialog) +buddy_changed_cb(GtkEntry *entry, PidginPounceDialog *dialog) { if (dialog->save_button == NULL) return; @@ -382,7 +382,7 @@ pounce_dnd_recv(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, GtkSelectionData *sd, guint info, guint t, gpointer data) { - GaimGtkPounceDialog *dialog; + PidginPounceDialog *dialog; if (sd->target == gdk_atom_intern("GAIM_BLIST_NODE", FALSE)) { @@ -398,11 +398,11 @@ else return; - dialog = (GaimGtkPounceDialog *)data; + dialog = (PidginPounceDialog *)data; gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), buddy->name); dialog->account = buddy->account; - gaim_gtk_account_option_menu_set_selected(dialog->account_menu, buddy->account); + pidgin_account_option_menu_set_selected(dialog->account_menu, buddy->account); gtk_drag_finish(dc, TRUE, (dc->action == GDK_ACTION_MOVE), t); } @@ -412,7 +412,7 @@ char *username = NULL; GaimAccount *account; - if (gaim_gtk_parse_x_im_contact((const char *)sd->data, FALSE, &account, + if (pidgin_parse_x_im_contact((const char *)sd->data, FALSE, &account, &protocol, &username, NULL)) { if (account == NULL) @@ -423,11 +423,11 @@ } else { - dialog = (GaimGtkPounceDialog *)data; + dialog = (PidginPounceDialog *)data; gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), username); dialog->account = account; - gaim_gtk_account_option_menu_set_selected(dialog->account_menu, account); + pidgin_account_option_menu_set_selected(dialog->account_menu, account); } } @@ -445,10 +445,10 @@ }; void -gaim_gtk_pounce_editor_show(GaimAccount *account, const char *name, +pidgin_pounce_editor_show(GaimAccount *account, const char *name, GaimPounce *cur_pounce) { - GaimGtkPounceDialog *dialog; + PidginPounceDialog *dialog; GtkWidget *window; GtkWidget *label; GtkWidget *bbox; @@ -465,7 +465,7 @@ (account != NULL) || (gaim_accounts_get_all() != NULL)); - dialog = g_new0(GaimGtkPounceDialog, 1); + dialog = g_new0(PidginPounceDialog, 1); if (cur_pounce != NULL) { @@ -519,7 +519,7 @@ gtk_box_pack_start(GTK_BOX(vbox1), vbox2, TRUE, TRUE, 0); /* Create the "Pounce on Whom" frame. */ - frame = gaim_gtk_make_frame(vbox2, _("Pounce on Whom")); + frame = pidgin_make_frame(vbox2, _("Pounce on Whom")); /* Account: */ hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); @@ -533,13 +533,13 @@ gtk_size_group_add_widget(sg, label); dialog->account_menu = - gaim_gtk_account_option_menu_new(dialog->account, TRUE, + pidgin_account_option_menu_new(dialog->account, TRUE, G_CALLBACK(pounce_choose_cb), NULL, dialog); gtk_box_pack_start(GTK_BOX(hbox), dialog->account_menu, FALSE, FALSE, 0); gtk_widget_show(dialog->account_menu); - gaim_set_accessible_label (dialog->account_menu, label); + pidgin_set_accessible_label (dialog->account_menu, label); /* Buddy: */ hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); @@ -554,14 +554,14 @@ dialog->buddy_entry = gtk_entry_new(); - gaim_gtk_setup_screenname_autocomplete(dialog->buddy_entry, dialog->account_menu, FALSE); + pidgin_setup_screenname_autocomplete(dialog->buddy_entry, dialog->account_menu, FALSE); gtk_box_pack_start(GTK_BOX(hbox), dialog->buddy_entry, TRUE, TRUE, 0); gtk_widget_show(dialog->buddy_entry); g_signal_connect(G_OBJECT(dialog->buddy_entry), "changed", G_CALLBACK(buddy_changed_cb), dialog); - gaim_set_accessible_label (dialog->buddy_entry, label); + pidgin_set_accessible_label (dialog->buddy_entry, label); if (cur_pounce != NULL) { gtk_entry_set_text(GTK_ENTRY(dialog->buddy_entry), @@ -572,7 +572,7 @@ } /* Create the "Pounce When Buddy..." frame. */ - frame = gaim_gtk_make_frame(vbox2, _("Pounce When Buddy...")); + frame = pidgin_make_frame(vbox2, _("Pounce When Buddy...")); table = gtk_table_new(5, 2, FALSE); gtk_container_add(GTK_CONTAINER(frame), table); @@ -633,7 +633,7 @@ gtk_widget_show(dialog->message_recv); /* Create the "Action" frame. */ - frame = gaim_gtk_make_frame(vbox2, _("Action")); + frame = pidgin_make_frame(vbox2, _("Action")); table = gtk_table_new(3, 5, FALSE); gtk_container_add(GTK_CONTAINER(frame), table); @@ -726,11 +726,11 @@ dialog->send_msg); g_signal_connect(G_OBJECT(dialog->send_msg), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), + G_CALLBACK(pidgin_toggle_sensitive), dialog->send_msg_entry); g_signal_connect(G_OBJECT(dialog->popup), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), + G_CALLBACK(pidgin_toggle_sensitive), dialog->popup_entry); exec_widgets = g_ptr_array_new(); @@ -738,7 +738,7 @@ g_ptr_array_add(exec_widgets,dialog->exec_cmd_browse); g_signal_connect(G_OBJECT(dialog->exec_cmd), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive_array), + G_CALLBACK(pidgin_toggle_sensitive_array), exec_widgets); g_signal_connect(G_OBJECT(dialog->exec_cmd_browse), "clicked", G_CALLBACK(filesel), @@ -752,7 +752,7 @@ g_ptr_array_add(sound_widgets,dialog->play_sound_test); g_signal_connect(G_OBJECT(dialog->play_sound), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive_array), + G_CALLBACK(pidgin_toggle_sensitive_array), sound_widgets); g_signal_connect(G_OBJECT(dialog->play_sound_browse), "clicked", G_CALLBACK(filesel), @@ -773,7 +773,7 @@ G_CALLBACK(save_pounce_cb), dialog); /* Create the "Options" frame. */ - frame = gaim_gtk_make_frame(vbox2, _("Options")); + frame = pidgin_make_frame(vbox2, _("Options")); table = gtk_table_new(2, 1, FALSE); gtk_container_add(GTK_CONTAINER(frame), table); @@ -1019,7 +1019,7 @@ PouncesManager *dialog = user_data; dialog->window = NULL; - gaim_gtk_pounces_manager_hide(); + pidgin_pounces_manager_hide(); return FALSE; } @@ -1042,7 +1042,7 @@ static void pounces_manager_add_cb(GtkButton *button, gpointer user_data) { - gaim_gtk_pounce_editor_show(NULL, NULL, NULL); + pidgin_pounce_editor_show(NULL, NULL, NULL); } static void @@ -1052,7 +1052,7 @@ GaimPounce *pounce; gtk_tree_model_get(model, iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1); - gaim_gtk_pounce_editor_show(NULL, NULL, pounce); + pidgin_pounce_editor_show(NULL, NULL, pounce); } static void @@ -1113,7 +1113,7 @@ static void pounces_manager_close_cb(GtkButton *button, gpointer user_data) { - gaim_gtk_pounces_manager_hide(); + pidgin_pounces_manager_hide(); } static void @@ -1150,7 +1150,7 @@ if ((pounce != NULL) && (event->button == 1) && (event->type == GDK_2BUTTON_PRESS)) { - gaim_gtk_pounce_editor_show(NULL, NULL, pounce); + pidgin_pounce_editor_show(NULL, NULL, pounce); return TRUE; } @@ -1299,7 +1299,7 @@ } void -gaim_gtk_pounces_manager_show(void) +pidgin_pounces_manager_show(void) { PouncesManager *dialog; GtkWidget *bbox; @@ -1360,7 +1360,7 @@ G_CALLBACK(pounces_manager_add_cb), dialog); /* Modify button */ - button = gtk_button_new_from_stock(GAIM_STOCK_MODIFY); + button = gtk_button_new_from_stock(PIDGIN_STOCK_MODIFY); dialog->modify_button = button; gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_set_sensitive(button, FALSE); @@ -1391,7 +1391,7 @@ } void -gaim_gtk_pounces_manager_hide(void) +pidgin_pounces_manager_hide(void) { if (pounces_manager == NULL) return; @@ -1629,16 +1629,16 @@ } void * -gaim_gtk_pounces_get_handle() { +pidgin_pounces_get_handle() { static int handle; return &handle; } void -gaim_gtk_pounces_init(void) +pidgin_pounces_init(void) { - gaim_pounces_register_handler(GAIM_GTK_UI, pounce_cb, new_pounce, + gaim_pounces_register_handler(PIDGIN_UI, pounce_cb, new_pounce, free_pounce); gaim_prefs_add_none("/gaim/gtk/pounces"); @@ -1658,9 +1658,9 @@ gaim_prefs_add_int("/gaim/gtk/pounces/dialog/height", 321); gaim_signal_connect(gaim_connections_get_handle(), "signed-on", - gaim_gtk_pounces_get_handle(), + pidgin_pounces_get_handle(), GAIM_CALLBACK(signed_on_off_cb), NULL); gaim_signal_connect(gaim_connections_get_handle(), "signed-off", - gaim_gtk_pounces_get_handle(), + pidgin_pounces_get_handle(), GAIM_CALLBACK(signed_on_off_cb), NULL); }
--- a/pidgin/gtkpounce.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkpounce.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKPOUNCE_H_ -#define _GAIM_GTKPOUNCE_H_ +#ifndef _PIDGINPOUNCE_H_ +#define _PIDGINPOUNCE_H_ #include "pounce.h" @@ -34,29 +34,29 @@ * @param name The optional name to pounce on. * @param cur_pounce The current buddy pounce, if editing an existing one. */ -void gaim_gtk_pounce_editor_show(GaimAccount *account, const char *name, +void pidgin_pounce_editor_show(GaimAccount *account, const char *name, GaimPounce *cur_pounce); /** * Shows the pounces manager window. */ -void gaim_gtk_pounces_manager_show(void); +void pidgin_pounces_manager_show(void); /** * Hides the pounces manager window. */ -void gaim_gtk_pounces_manager_hide(void); +void pidgin_pounces_manager_hide(void); /** * Returns the gtkpounces handle * * @return The handle to the GTK+ pounces system */ -void *gaim_gtk_pounces_get_handle(void); +void *pidgin_pounces_get_handle(void); /** * Initializes the GTK+ pounces subsystem. */ -void gaim_gtk_pounces_init(void); +void pidgin_pounces_init(void); -#endif /* _GAIM_GTKPOUNCE_H_ */ +#endif /* _PIDGINPOUNCE_H_ */
--- a/pidgin/gtkprefs.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkprefs.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "debug.h" #include "notify.h" @@ -84,7 +84,7 @@ } GtkWidget * -gaim_gtk_prefs_labeled_spin_button(GtkWidget *box, const gchar *title, +pidgin_prefs_labeled_spin_button(GtkWidget *box, const gchar *title, const char *key, int min, int max, GtkSizeGroup *sg) { GtkWidget *hbox; @@ -123,7 +123,7 @@ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); } - gaim_set_accessible_label (spin, label); + pidgin_set_accessible_label (spin, label); return hbox; } @@ -136,7 +136,7 @@ } GtkWidget * -gaim_gtk_prefs_labeled_entry(GtkWidget *page, const gchar *title, +pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title, const char *key, GtkSizeGroup *sg) { GtkWidget *hbox, *label, *entry; @@ -167,7 +167,7 @@ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); } - gaim_set_accessible_label(entry, label); + pidgin_set_accessible_label(entry, label); return hbox; } @@ -198,7 +198,7 @@ } GtkWidget * -gaim_gtk_prefs_dropdown_from_list(GtkWidget *box, const gchar *title, +pidgin_prefs_dropdown_from_list(GtkWidget *box, const gchar *title, GaimPrefType type, const char *key, GList *menuitems) { GtkWidget *dropdown, *opt, *menu; @@ -239,7 +239,7 @@ if (label != NULL) { gtk_label_set_mnemonic_widget(GTK_LABEL(label), dropdown); - gaim_set_accessible_label (dropdown, label); + pidgin_set_accessible_label (dropdown, label); } if (type == GAIM_PREF_INT) @@ -298,7 +298,7 @@ } GtkWidget * -gaim_gtk_prefs_dropdown(GtkWidget *box, const gchar *title, GaimPrefType type, +pidgin_prefs_dropdown(GtkWidget *box, const gchar *title, GaimPrefType type, const char *key, ...) { va_list ap; @@ -331,7 +331,7 @@ menuitems = g_list_reverse(menuitems); - dropdown = gaim_gtk_prefs_dropdown_from_list(box, title, type, key, + dropdown = pidgin_prefs_dropdown_from_list(box, title, type, key, menuitems); g_list_free(menuitems); @@ -415,7 +415,7 @@ gtk_tree_row_reference_free(previous_smiley_row); previous_smiley_row = NULL; - gaim_gtkthemes_smiley_theme_probe(); + pidginthemes_smiley_theme_probe(); if (!(themes = smiley_themes)) return NULL; @@ -491,7 +491,7 @@ g_free(path_escaped); g_free(destdir_escaped); #else - if(!gtkwgaim_gz_untar(path, destdir)) { + if(!winpidgin_gz_untar(path, destdir)) { g_free(destdir); return; } @@ -696,7 +696,7 @@ gtk_widget_show_all(ret); - gaim_set_accessible_label (view, label); + pidgin_set_accessible_label (view, label); return ret; } @@ -813,8 +813,8 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = gaim_gtk_make_frame(ret, _("System Tray Icon")); - label = gaim_gtk_prefs_dropdown(vbox, _("_Show system tray icon:"), GAIM_PREF_STRING, + vbox = pidgin_make_frame(ret, _("System Tray Icon")); + label = pidgin_prefs_dropdown(vbox, _("_Show system tray icon:"), GAIM_PREF_STRING, "/gaim/gtk/docklet/show", _("Always"), "always", _("Never"), "never", @@ -823,8 +823,8 @@ gtk_size_group_add_widget(sg, label); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - vbox = gaim_gtk_make_frame(ret, _("Conversation Window Hiding")); - label = gaim_gtk_prefs_dropdown(vbox, _("_Hide new IM conversations:"), + vbox = pidgin_make_frame(ret, _("Conversation Window Hiding")); + label = pidgin_prefs_dropdown(vbox, _("_Hide new IM conversations:"), GAIM_PREF_STRING, "/gaim/gtk/conversations/im/hide_new", _("Never"), "never", _("When away"), "away", @@ -835,9 +835,9 @@ /* All the tab options! */ - vbox = gaim_gtk_make_frame(ret, _("Tabs")); + vbox = pidgin_make_frame(ret, _("Tabs")); - gaim_gtk_prefs_checkbox(_("Show IMs and chats in _tabbed windows"), + pidgin_prefs_checkbox(_("Show IMs and chats in _tabbed windows"), "/gaim/gtk/conversations/tabs", vbox); /* @@ -851,10 +851,10 @@ if (!gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) gtk_widget_set_sensitive(vbox2, FALSE); - gaim_gtk_prefs_checkbox(_("Show close b_utton on tabs"), + pidgin_prefs_checkbox(_("Show close b_utton on tabs"), "/gaim/gtk/conversations/close_on_tabs", vbox2); - label = gaim_gtk_prefs_dropdown(vbox2, _("_Placement:"), GAIM_PREF_INT, + label = pidgin_prefs_dropdown(vbox2, _("_Placement:"), GAIM_PREF_INT, "/gaim/gtk/conversations/tab_side", _("Top"), GTK_POS_TOP, _("Bottom"), GTK_POS_BOTTOM, @@ -868,8 +868,8 @@ gtk_size_group_add_widget(sg, label); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); - names = gaim_gtkconv_placement_get_options(); - label = gaim_gtk_prefs_dropdown_from_list(vbox2, _("N_ew conversations:"), + names = pidgin_conv_placement_get_options(); + label = pidgin_prefs_dropdown_from_list(vbox2, _("N_ew conversations:"), GAIM_PREF_STRING, "/gaim/gtk/conversations/placement", names); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); @@ -895,37 +895,37 @@ ret = gtk_vbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_container_set_border_width(GTK_CONTAINER(ret), GAIM_HIG_BORDER); - vbox = gaim_gtk_make_frame(ret, _("Conversations")); + vbox = pidgin_make_frame(ret, _("Conversations")); - gaim_gtk_prefs_checkbox(_("Show _formatting on incoming messages"), + pidgin_prefs_checkbox(_("Show _formatting on incoming messages"), "/gaim/gtk/conversations/show_incoming_formatting", vbox); - iconpref1 = gaim_gtk_prefs_checkbox(_("Show buddy _icons"), + iconpref1 = pidgin_prefs_checkbox(_("Show buddy _icons"), "/gaim/gtk/conversations/im/show_buddy_icons", vbox); - iconpref2 = gaim_gtk_prefs_checkbox(_("Enable buddy ic_on animation"), + iconpref2 = pidgin_prefs_checkbox(_("Enable buddy ic_on animation"), "/gaim/gtk/conversations/im/animate_buddy_icons", vbox); if (!gaim_prefs_get_bool("/gaim/gtk/conversations/im/show_buddy_icons")) gtk_widget_set_sensitive(iconpref2, FALSE); g_signal_connect(G_OBJECT(iconpref1), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), iconpref2); + G_CALLBACK(pidgin_toggle_sensitive), iconpref2); - gaim_gtk_prefs_checkbox(_("_Notify buddies that you are typing to them"), + pidgin_prefs_checkbox(_("_Notify buddies that you are typing to them"), "/core/conversations/im/send_typing", vbox); #ifdef USE_GTKSPELL - gaim_gtk_prefs_checkbox(_("Highlight _misspelled words"), + pidgin_prefs_checkbox(_("Highlight _misspelled words"), "/gaim/gtk/conversations/spellcheck", vbox); #endif - gaim_gtk_prefs_checkbox(_("Use smooth-scrolling"), "/gaim/gtk/conversations/use_smooth_scrolling", vbox); + pidgin_prefs_checkbox(_("Use smooth-scrolling"), "/gaim/gtk/conversations/use_smooth_scrolling", vbox); #ifdef _WIN32 - gaim_gtk_prefs_checkbox(_("F_lash window when IMs are received"), "/gaim/gtk/win32/blink_im", vbox); + pidgin_prefs_checkbox(_("F_lash window when IMs are received"), "/gaim/gtk/win32/blink_im", vbox); #endif - vbox = gaim_gtk_make_frame(ret, _("Default Formatting")); + vbox = pidgin_make_frame(ret, _("Default Formatting")); - frame = gaim_gtk_create_imhtml(TRUE, &imhtml, &toolbar, NULL); - gtk_widget_set_name(imhtml, "gaim_gtkprefs_font_imhtml"); + frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, NULL); + gtk_widget_set_name(imhtml, "pidginprefs_font_imhtml"); gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(imhtml), TRUE); gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml), GTK_IMHTML_BOLD | @@ -1012,9 +1012,9 @@ ret = gtk_vbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_container_set_border_width (GTK_CONTAINER (ret), GAIM_HIG_BORDER); - vbox = gaim_gtk_make_frame (ret, _("IP Address")); + vbox = pidgin_make_frame (ret, _("IP Address")); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - gaim_gtk_prefs_labeled_entry(vbox,_("ST_UN server:"), + pidgin_prefs_labeled_entry(vbox,_("ST_UN server:"), "/core/network/stun_server", sg); hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); @@ -1030,7 +1030,7 @@ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_container_add(GTK_CONTAINER(hbox), label); - auto_ip_checkbox = gaim_gtk_prefs_checkbox(_("_Autodetect IP address"), + auto_ip_checkbox = pidgin_prefs_checkbox(_("_Autodetect IP address"), "/core/network/auto_ip", vbox); table = gtk_table_new(2, 2, FALSE); @@ -1058,7 +1058,7 @@ gtk_entry_set_text(GTK_ENTRY(entry), gaim_network_get_my_ip(-1)); - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); if (gaim_prefs_get_bool("/core/network/auto_ip")) { @@ -1066,32 +1066,32 @@ } g_signal_connect(G_OBJECT(auto_ip_checkbox), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), table); + G_CALLBACK(pidgin_toggle_sensitive), table); - vbox = gaim_gtk_make_frame (ret, _("Ports")); + vbox = pidgin_make_frame (ret, _("Ports")); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - ports_checkbox = gaim_gtk_prefs_checkbox(_("_Manually specify range of ports to listen on"), + ports_checkbox = pidgin_prefs_checkbox(_("_Manually specify range of ports to listen on"), "/core/network/ports_range_use", vbox); - spin_button = gaim_gtk_prefs_labeled_spin_button(vbox, _("_Start port:"), + spin_button = pidgin_prefs_labeled_spin_button(vbox, _("_Start port:"), "/core/network/ports_range_start", 0, 65535, sg); if (!gaim_prefs_get_bool("/core/network/ports_range_use")) gtk_widget_set_sensitive(GTK_WIDGET(spin_button), FALSE); g_signal_connect(G_OBJECT(ports_checkbox), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), spin_button); + G_CALLBACK(pidgin_toggle_sensitive), spin_button); - spin_button = gaim_gtk_prefs_labeled_spin_button(vbox, _("_End port:"), + spin_button = pidgin_prefs_labeled_spin_button(vbox, _("_End port:"), "/core/network/ports_range_end", 0, 65535, sg); if (!gaim_prefs_get_bool("/core/network/ports_range_use")) gtk_widget_set_sensitive(GTK_WIDGET(spin_button), FALSE); g_signal_connect(G_OBJECT(ports_checkbox), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), spin_button); + G_CALLBACK(pidgin_toggle_sensitive), spin_button); if (!gaim_running_gnome()) { - vbox = gaim_gtk_make_frame(ret, _("Proxy Server")); + vbox = pidgin_make_frame(ret, _("Proxy Server")); prefs_proxy_frame = gtk_vbox_new(FALSE, 0); - gaim_gtk_prefs_dropdown(vbox, _("Proxy _type:"), GAIM_PREF_STRING, + pidgin_prefs_dropdown(vbox, _("Proxy _type:"), GAIM_PREF_STRING, "/core/proxy/type", _("No proxy"), "none", "SOCKS 4", "socks4", @@ -1128,7 +1128,7 @@ hbox = gtk_hbox_new(TRUE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); label = gtk_label_new_with_mnemonic(_("_Port:")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); @@ -1147,7 +1147,7 @@ gtk_entry_set_text(GTK_ENTRY(entry), buf); } - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); label = gtk_label_new_with_mnemonic(_("_User:")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); @@ -1165,7 +1165,7 @@ hbox = gtk_hbox_new(TRUE, 5); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); label = gtk_label_new_with_mnemonic(_("Pa_ssword:")); gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); @@ -1183,7 +1183,7 @@ if (proxy_info != NULL && gaim_proxy_info_get_password(proxy_info) != NULL) gtk_entry_set_text(GTK_ENTRY(entry), gaim_proxy_info_get_password(proxy_info)); - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); } gtk_widget_show_all(ret); @@ -1284,11 +1284,11 @@ gtk_container_set_border_width (GTK_CONTAINER (ret), GAIM_HIG_BORDER); sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - vbox = gaim_gtk_make_frame (ret, _("Browser Selection")); + vbox = pidgin_make_frame (ret, _("Browser Selection")); browsers = get_available_browsers(); if (browsers != NULL) { - label = gaim_gtk_prefs_dropdown_from_list(vbox,_("_Browser:"), GAIM_PREF_STRING, + label = pidgin_prefs_dropdown_from_list(vbox,_("_Browser:"), GAIM_PREF_STRING, "/gaim/gtk/browsers/browser", browsers); g_list_free(browsers); @@ -1296,12 +1296,12 @@ gtk_size_group_add_widget(sg, label); hbox = gtk_hbox_new(FALSE, 0); - label = gaim_gtk_prefs_dropdown(hbox, _("_Open link in:"), GAIM_PREF_INT, + label = pidgin_prefs_dropdown(hbox, _("_Open link in:"), GAIM_PREF_INT, "/gaim/gtk/browsers/place", - _("Browser default"), GAIM_BROWSER_DEFAULT, - _("Existing window"), GAIM_BROWSER_CURRENT, - _("New window"), GAIM_BROWSER_NEW_WINDOW, - _("New tab"), GAIM_BROWSER_NEW_TAB, + _("Browser default"), PIDGIN_BROWSER_DEFAULT, + _("Existing window"), PIDGIN_BROWSER_CURRENT, + _("New window"), PIDGIN_BROWSER_NEW_WINDOW, + _("New tab"), PIDGIN_BROWSER_NEW_TAB, NULL); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_size_group_add_widget(sg, label); @@ -1334,7 +1334,7 @@ gaim_prefs_get_path("/gaim/gtk/browsers/command")); g_signal_connect(G_OBJECT(entry), "focus-out-event", G_CALLBACK(manual_browser_set), NULL); - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); gtk_widget_show_all(ret); return ret; @@ -1352,19 +1352,19 @@ gtk_container_set_border_width (GTK_CONTAINER (ret), GAIM_HIG_BORDER); - vbox = gaim_gtk_make_frame (ret, _("Logging")); + vbox = pidgin_make_frame (ret, _("Logging")); names = gaim_log_logger_get_options(); - gaim_gtk_prefs_dropdown_from_list(vbox, _("Log _format:"), GAIM_PREF_STRING, + pidgin_prefs_dropdown_from_list(vbox, _("Log _format:"), GAIM_PREF_STRING, "/core/logging/format", names); g_list_free(names); - gaim_gtk_prefs_checkbox(_("Log all _instant messages"), + pidgin_prefs_checkbox(_("Log all _instant messages"), "/core/logging/log_ims", vbox); - gaim_gtk_prefs_checkbox(_("Log all c_hats"), + pidgin_prefs_checkbox(_("Log all c_hats"), "/core/logging/log_chats", vbox); - gaim_gtk_prefs_checkbox(_("Log all _status changes to system log"), + pidgin_prefs_checkbox(_("Log all _status changes to system log"), "/core/logging/log_system", vbox); gtk_widget_show_all(ret); @@ -1446,7 +1446,7 @@ gboolean temp_value; pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s", - gaim_gtk_sound_get_event_option(sound_row_sel)); + pidgin_sound_get_event_option(sound_row_sel)); temp_value = gaim_prefs_get_bool(pref); @@ -1468,7 +1468,7 @@ gchar *pref; pref = g_strdup_printf("/gaim/gtk/sound/file/%s", - gaim_gtk_sound_get_event_option(sound_row_sel)); + pidgin_sound_get_event_option(sound_row_sel)); gaim_prefs_set_path(pref, ""); g_free(pref); @@ -1485,7 +1485,7 @@ /* Set it -- and forget it */ pref = g_strdup_printf("/gaim/gtk/sound/file/%s", - gaim_gtk_sound_get_event_option(sound)); + pidgin_sound_get_event_option(sound)); gaim_prefs_set_path(pref, filename); g_free(pref); @@ -1503,7 +1503,7 @@ const char *filename; pref = g_strdup_printf("/gaim/gtk/sound/file/%s", - gaim_gtk_sound_get_event_option(sound_row_sel)); + pidgin_sound_get_event_option(sound_row_sel)); filename = gaim_prefs_get_path(pref); g_free(pref); @@ -1555,7 +1555,7 @@ sound_row_sel = g_value_get_uint(&val); pref = g_strdup_printf("/gaim/gtk/sound/file/%s", - gaim_gtk_sound_get_event_option(sound_row_sel)); + pidgin_sound_get_event_option(sound_row_sel)); file = gaim_prefs_get_path(pref); g_free(pref); if (sound_entry) @@ -1593,8 +1593,8 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); #ifndef _WIN32 - vbox = gaim_gtk_make_frame (ret, _("Sound Method")); - dd = gaim_gtk_prefs_dropdown(vbox, _("_Method:"), GAIM_PREF_STRING, + vbox = pidgin_make_frame (ret, _("Sound Method")); + dd = pidgin_prefs_dropdown(vbox, _("_Method:"), GAIM_PREF_STRING, "/gaim/gtk/sound/method", _("Console beep"), "beep", #ifdef USE_GSTREAMER @@ -1633,13 +1633,13 @@ !strcmp(gaim_prefs_get_string("/gaim/gtk/sound/method"), "custom")); - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); #endif /* _WIN32 */ - vbox = gaim_gtk_make_frame (ret, _("Sound Options")); - gaim_gtk_prefs_checkbox(_("Sounds when conversation has _focus"), + vbox = pidgin_make_frame (ret, _("Sound Options")); + pidgin_prefs_checkbox(_("Sounds when conversation has _focus"), "/gaim/gtk/sound/conv_focus", vbox); - gaim_gtk_prefs_dropdown(vbox, _("Enable sounds:"), + pidgin_prefs_dropdown(vbox, _("Enable sounds:"), GAIM_PREF_INT, "/core/sound/while_status", _("Only when available"), 1, _("Only when not available"), 2, @@ -1678,7 +1678,7 @@ sound_changed2_cb, vbox); #endif - vbox = gaim_gtk_make_frame(ret, _("Sound Events")); + vbox = pidgin_make_frame(ret, _("Sound Events")); /* The following is an ugly hack to make the frame expand so the * sound events list is big enough to be usable */ @@ -1698,8 +1698,8 @@ for (j=0; j < GAIM_NUM_SOUNDS; j++) { char *pref = g_strdup_printf("/gaim/gtk/sound/enabled/%s", - gaim_gtk_sound_get_event_option(j)); - const char *label = gaim_gtk_sound_get_event_label(j); + pidgin_sound_get_event_option(j)); + const char *label = pidgin_sound_get_event_label(j); if (label == NULL) { g_free(pref); @@ -1748,7 +1748,7 @@ gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); sound_entry = gtk_entry_new(); pref = g_strdup_printf("/gaim/gtk/sound/file/%s", - gaim_gtk_sound_get_event_option(0)); + pidgin_sound_get_event_option(0)); file = gaim_prefs_get_path(pref); g_free(pref); gtk_entry_set_text(GTK_ENTRY(sound_entry), (file && *file != '\0') ? file : "(default)"); @@ -1804,9 +1804,9 @@ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); /* Idle stuff */ - vbox = gaim_gtk_make_frame(ret, _("Idle")); + vbox = pidgin_make_frame(ret, _("Idle")); - dd = gaim_gtk_prefs_dropdown(vbox, _("_Report idle time:"), + dd = pidgin_prefs_dropdown(vbox, _("_Report idle time:"), GAIM_PREF_STRING, "/core/away/idle_reporting", _("Never"), "none", _("From last sent message"), "gaim", @@ -1818,9 +1818,9 @@ gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); /* Away stuff */ - vbox = gaim_gtk_make_frame(ret, _("Away")); + vbox = pidgin_make_frame(ret, _("Away")); - dd = gaim_gtk_prefs_dropdown(vbox, _("_Auto-reply:"), + dd = pidgin_prefs_dropdown(vbox, _("_Auto-reply:"), GAIM_PREF_STRING, "/core/away/auto_reply", _("Never"), "never", _("When away"), "away", @@ -1830,16 +1830,16 @@ gtk_misc_set_alignment(GTK_MISC(dd), 0, 0.5); /* Auto-away stuff */ - vbox = gaim_gtk_make_frame(ret, _("Auto-away")); + vbox = pidgin_make_frame(ret, _("Auto-away")); - button = gaim_gtk_prefs_checkbox(_("Change status when _idle"), + button = pidgin_prefs_checkbox(_("Change status when _idle"), "/core/away/away_when_idle", vbox); - select = gaim_gtk_prefs_labeled_spin_button(vbox, + select = pidgin_prefs_labeled_spin_button(vbox, _("_Minutes before changing status:"), "/core/away/mins_before_away", 1, 24 * 60, sg); g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), select); + G_CALLBACK(pidgin_toggle_sensitive), select); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(vbox), hbox); @@ -1848,14 +1848,14 @@ gtk_size_group_add_widget(sg, label); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), label); + G_CALLBACK(pidgin_toggle_sensitive), label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); /* TODO: Show something useful if we don't have any saved statuses. */ - menu = gaim_gtk_status_menu(gaim_savedstatus_get_idleaway(), G_CALLBACK(set_idle_away)); + menu = pidgin_status_menu(gaim_savedstatus_get_idleaway(), G_CALLBACK(set_idle_away)); gtk_box_pack_start(GTK_BOX(hbox), menu, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), menu); + G_CALLBACK(pidgin_toggle_sensitive), menu); gtk_label_set_mnemonic_widget(GTK_LABEL(label), menu); if (!gaim_prefs_get_bool("/core/away/away_when_idle")) { @@ -1865,9 +1865,9 @@ } /* Signon status stuff */ - vbox = gaim_gtk_make_frame(ret, _("Status at Startup")); + vbox = pidgin_make_frame(ret, _("Status at Startup")); - button = gaim_gtk_prefs_checkbox(_("Use status from last _exit at startup"), + button = pidgin_prefs_checkbox(_("Use status from last _exit at startup"), "/core/savedstatus/startup_current_status", vbox); hbox = gtk_hbox_new(FALSE, 0); @@ -1877,14 +1877,14 @@ gtk_size_group_add_widget(sg, label); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), label); + G_CALLBACK(pidgin_toggle_sensitive), label); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); /* TODO: Show something useful if we don't have any saved statuses. */ - menu = gaim_gtk_status_menu(gaim_savedstatus_get_startup(), G_CALLBACK(set_startupstatus)); + menu = pidgin_status_menu(gaim_savedstatus_get_startup(), G_CALLBACK(set_startupstatus)); gtk_box_pack_start(GTK_BOX(hbox), menu, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", - G_CALLBACK(gaim_gtk_toggle_sensitive), menu); + G_CALLBACK(pidgin_toggle_sensitive), menu); gtk_label_set_mnemonic_widget(GTK_LABEL(label), menu); if (gaim_prefs_get_bool("/core/savedstatus/startup_current_status")) { @@ -1927,7 +1927,7 @@ prefs_notebook_add_page(_("Status / Idle"), away_page(), notebook_page++); } -void gaim_gtk_prefs_show(void) +void pidgin_prefs_show(void) { GtkWidget *vbox; GtkWidget *bbox; @@ -1990,7 +1990,7 @@ } GtkWidget * -gaim_gtk_prefs_checkbox(const char *text, const char *key, GtkWidget *page) +pidgin_prefs_checkbox(const char *text, const char *key, GtkWidget *page) { GtkWidget *button; @@ -2018,14 +2018,14 @@ for (themes = smiley_themes; themes; themes = themes->next) { struct smiley_theme *smile = themes->data; if (smile->name && strcmp(themename, smile->name) == 0) { - gaim_gtkthemes_load_smiley_theme(smile->path, TRUE); + pidginthemes_load_smiley_theme(smile->path, TRUE); break; } } } void -gaim_gtk_prefs_init(void) +pidgin_prefs_init(void) { gaim_prefs_add_none("/gaim"); gaim_prefs_add_none("/gaim/gtk"); @@ -2034,7 +2034,7 @@ #ifndef _WIN32 /* Browsers */ gaim_prefs_add_none("/gaim/gtk/browsers"); - gaim_prefs_add_int("/gaim/gtk/browsers/place", GAIM_BROWSER_DEFAULT); + gaim_prefs_add_int("/gaim/gtk/browsers/place", PIDGIN_BROWSER_DEFAULT); gaim_prefs_add_path("/gaim/gtk/browsers/command", ""); gaim_prefs_add_string("/gaim/gtk/browsers/browser", "mozilla"); #endif @@ -2058,7 +2058,7 @@ smiley_theme_pref_cb, NULL); } -void gaim_gtk_prefs_update_old() { +void pidgin_prefs_update_old() { /* Rename some old prefs */ gaim_prefs_rename("/gaim/gtk/logging/log_ims", "/core/logging/log_ims"); gaim_prefs_rename("/gaim/gtk/logging/log_chats", "/core/logging/log_chats");
--- a/pidgin/gtkprefs.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkprefs.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -23,20 +23,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#ifndef _GAIM_GTKPREFS_H_ -#define _GAIM_GTKPREFS_H_ +#ifndef _PIDGINPREFS_H_ +#define _PIDGINPREFS_H_ #include "prefs.h" /** * Initializes all UI-specific preferences. */ -void gaim_gtk_prefs_init(void); +void pidgin_prefs_init(void); /** * Shows the preferences dialog. */ -void gaim_gtk_prefs_show(void); +void pidgin_prefs_show(void); /** * Add a new checkbox for a boolean preference @@ -45,7 +45,7 @@ * @param key The key of the gaim bool pref that will be represented by the checkbox * @param page The page to which the new checkbox will be added */ -GtkWidget *gaim_gtk_prefs_checkbox(const char *title, const char *key, +GtkWidget *pidgin_prefs_checkbox(const char *title, const char *key, GtkWidget *page); /** @@ -61,7 +61,7 @@ * used to set the widgets to sensitive or insensitive based on the * value of a checkbox. */ -GtkWidget *gaim_gtk_prefs_labeled_spin_button(GtkWidget *page, +GtkWidget *pidgin_prefs_labeled_spin_button(GtkWidget *page, const gchar *title, const char *key, int min, int max, GtkSizeGroup *sg); /** @@ -76,7 +76,7 @@ * the widgets to sensitive or insensitive based on the value of a * checkbox. */ -GtkWidget *gaim_gtk_prefs_labeled_entry(GtkWidget *page, const gchar *title, +GtkWidget *pidgin_prefs_labeled_entry(GtkWidget *page, const gchar *title, const char *key, GtkSizeGroup *sg); /** @@ -89,7 +89,7 @@ * @param ... The choices to be added to the dropdown, choices should be * paired as label/value */ -GtkWidget *gaim_gtk_prefs_dropdown(GtkWidget *page, const gchar *title, +GtkWidget *pidgin_prefs_dropdown(GtkWidget *page, const gchar *title, GaimPrefType type, const char *key, ...); /** @@ -102,13 +102,13 @@ * @param menuitems The choices to be added to the dropdown, choices should * be paired as label/value */ -GtkWidget *gaim_gtk_prefs_dropdown_from_list(GtkWidget *page, +GtkWidget *pidgin_prefs_dropdown_from_list(GtkWidget *page, const gchar * title, GaimPrefType type, const char *key, GList *menuitems); /** * Rename legacy prefs and delete some that no longer exist. */ -void gaim_gtk_prefs_update_old(void); +void pidgin_prefs_update_old(void); -#endif /* _GAIM_GTKPREFS_H_ */ +#endif /* _PIDGINPREFS_H_ */
--- a/pidgin/gtkprivacy.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkprivacy.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "connection.h" #include "debug.h" @@ -59,7 +59,7 @@ GaimAccount *account; -} GaimGtkPrivacyDialog; +} PidginPrivacyDialog; typedef struct { @@ -67,7 +67,7 @@ char *name; gboolean block; -} GaimGtkPrivacyRequestData; +} PidginPrivacyRequestData; static struct { @@ -85,10 +85,10 @@ static size_t menu_entry_count = sizeof(menu_entries) / sizeof(*menu_entries); -static GaimGtkPrivacyDialog *privacy_dialog = NULL; +static PidginPrivacyDialog *privacy_dialog = NULL; static void -rebuild_allow_list(GaimGtkPrivacyDialog *dialog) +rebuild_allow_list(PidginPrivacyDialog *dialog) { GSList *l; GtkTreeIter iter; @@ -102,7 +102,7 @@ } static void -rebuild_block_list(GaimGtkPrivacyDialog *dialog) +rebuild_block_list(PidginPrivacyDialog *dialog) { GSList *l; GtkTreeIter iter; @@ -133,13 +133,13 @@ } static void -user_selected_cb(GtkTreeSelection *sel, GaimGtkPrivacyDialog *dialog) +user_selected_cb(GtkTreeSelection *sel, PidginPrivacyDialog *dialog) { gtk_widget_set_sensitive(dialog->remove_button, TRUE); } static GtkWidget * -build_list(GaimGtkPrivacyDialog *dialog, GtkListStore *model, +build_list(PidginPrivacyDialog *dialog, GtkListStore *model, GtkWidget **ret_treeview) { GtkWidget *sw; @@ -180,7 +180,7 @@ } static GtkWidget * -build_allow_list(GaimGtkPrivacyDialog *dialog) +build_allow_list(PidginPrivacyDialog *dialog) { GtkWidget *widget; GtkWidget *list; @@ -199,7 +199,7 @@ } static GtkWidget * -build_block_list(GaimGtkPrivacyDialog *dialog) +build_block_list(PidginPrivacyDialog *dialog) { GtkWidget *widget; GtkWidget *list; @@ -218,16 +218,16 @@ } static gint -destroy_cb(GtkWidget *w, GdkEvent *event, GaimGtkPrivacyDialog *dialog) +destroy_cb(GtkWidget *w, GdkEvent *event, PidginPrivacyDialog *dialog) { - gaim_gtk_privacy_dialog_hide(); + pidgin_privacy_dialog_hide(); return 0; } static void select_account_cb(GtkWidget *dropdown, GaimAccount *account, - GaimGtkPrivacyDialog *dialog) + PidginPrivacyDialog *dialog) { int i; @@ -249,7 +249,7 @@ * Even better: the privacy API needs to not suck. */ static void -type_changed_cb(GtkOptionMenu *optmenu, GaimGtkPrivacyDialog *dialog) +type_changed_cb(GtkOptionMenu *optmenu, PidginPrivacyDialog *dialog) { int new_type = menu_entries[gtk_option_menu_get_history(optmenu)].num; @@ -272,20 +272,20 @@ } gaim_blist_schedule_save(); - gaim_gtk_blist_refresh(gaim_get_blist()); + pidgin_blist_refresh(gaim_get_blist()); } static void -add_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog) +add_cb(GtkWidget *button, PidginPrivacyDialog *dialog) { if (dialog->in_allow_list) - gaim_gtk_request_add_permit(dialog->account, NULL); + pidgin_request_add_permit(dialog->account, NULL); else - gaim_gtk_request_add_block(dialog->account, NULL); + pidgin_request_add_block(dialog->account, NULL); } static void -remove_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog) +remove_cb(GtkWidget *button, PidginPrivacyDialog *dialog) { GtkTreeIter iter; GtkTreeModel *model; @@ -324,7 +324,7 @@ } static void -clear_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog) +clear_cb(GtkWidget *button, PidginPrivacyDialog *dialog) { GSList *l; if (dialog->in_allow_list) @@ -343,17 +343,17 @@ } static void -close_cb(GtkWidget *button, GaimGtkPrivacyDialog *dialog) +close_cb(GtkWidget *button, PidginPrivacyDialog *dialog) { gtk_widget_destroy(dialog->win); - gaim_gtk_privacy_dialog_hide(); + pidgin_privacy_dialog_hide(); } -static GaimGtkPrivacyDialog * +static PidginPrivacyDialog * privacy_dialog_new(void) { - GaimGtkPrivacyDialog *dialog; + PidginPrivacyDialog *dialog; GtkWidget *bbox; GtkWidget *hbox; GtkWidget *vbox; @@ -364,7 +364,7 @@ int selected = 0; int i; - dialog = g_new0(GaimGtkPrivacyDialog, 1); + dialog = g_new0(PidginPrivacyDialog, 1); dialog->win = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_resizable(GTK_WINDOW(dialog->win), FALSE); @@ -399,12 +399,12 @@ gtk_widget_show(label); /* Accounts drop-down */ - dropdown = gaim_gtk_account_option_menu_new(NULL, FALSE, + dropdown = pidgin_account_option_menu_new(NULL, FALSE, G_CALLBACK(select_account_cb), NULL, dialog); gtk_box_pack_start(GTK_BOX(hbox), dropdown, FALSE, FALSE, 0); gtk_widget_show(dropdown); - gaim_set_accessible_label (dropdown, label); - dialog->account = gaim_gtk_account_option_menu_get_selected(dropdown); + pidgin_set_accessible_label (dropdown, label); + dialog->account = pidgin_account_option_menu_get_selected(dropdown); /* Add the drop-down list with the allow/block types. */ dialog->type_menu = gtk_option_menu_new(); @@ -415,7 +415,7 @@ menu = gtk_menu_new(); for (i = 0; i < menu_entry_count; i++) { - gaim_new_item(menu, _(menu_entries[i].text)); + pidgin_new_item(menu, _(menu_entries[i].text)); if (menu_entries[i].num == dialog->account->perm_deny) selected = i; @@ -497,7 +497,7 @@ } void -gaim_gtk_privacy_dialog_show(void) +pidgin_privacy_dialog_show(void) { g_return_if_fail(gaim_connections_get_all() != NULL); @@ -509,7 +509,7 @@ } void -gaim_gtk_privacy_dialog_hide(void) +pidgin_privacy_dialog_hide(void) { if (privacy_dialog == NULL) return; @@ -519,14 +519,14 @@ } static void -destroy_request_data(GaimGtkPrivacyRequestData *data) +destroy_request_data(PidginPrivacyRequestData *data) { g_free(data->name); g_free(data); } static void -confirm_permit_block_cb(GaimGtkPrivacyRequestData *data, int option) +confirm_permit_block_cb(PidginPrivacyRequestData *data, int option) { if (data->block) gaim_privacy_deny(data->account, data->name, FALSE, FALSE); @@ -537,7 +537,7 @@ } static void -add_permit_block_cb(GaimGtkPrivacyRequestData *data, const char *name) +add_permit_block_cb(PidginPrivacyRequestData *data, const char *name) { data->name = g_strdup(name); @@ -545,13 +545,13 @@ } void -gaim_gtk_request_add_permit(GaimAccount *account, const char *name) +pidgin_request_add_permit(GaimAccount *account, const char *name) { - GaimGtkPrivacyRequestData *data; + PidginPrivacyRequestData *data; g_return_if_fail(account != NULL); - data = g_new0(GaimGtkPrivacyRequestData, 1); + data = g_new0(PidginPrivacyRequestData, 1); data->account = account; data->name = g_strdup(name); data->block = FALSE; @@ -584,13 +584,13 @@ } void -gaim_gtk_request_add_block(GaimAccount *account, const char *name) +pidgin_request_add_block(GaimAccount *account, const char *name) { - GaimGtkPrivacyRequestData *data; + PidginPrivacyRequestData *data; g_return_if_fail(account != NULL); - data = g_new0(GaimGtkPrivacyRequestData, 1); + data = g_new0(PidginPrivacyRequestData, 1); data->account = account; data->name = g_strdup(name); data->block = TRUE; @@ -620,14 +620,14 @@ } static void -gaim_gtk_permit_added_removed(GaimAccount *account, const char *name) +pidgin_permit_added_removed(GaimAccount *account, const char *name) { if (privacy_dialog != NULL) rebuild_allow_list(privacy_dialog); } static void -gaim_gtk_deny_added_removed(GaimAccount *account, const char *name) +pidgin_deny_added_removed(GaimAccount *account, const char *name) { if (privacy_dialog != NULL) rebuild_block_list(privacy_dialog); @@ -635,19 +635,19 @@ static GaimPrivacyUiOps privacy_ops = { - gaim_gtk_permit_added_removed, - gaim_gtk_permit_added_removed, - gaim_gtk_deny_added_removed, - gaim_gtk_deny_added_removed + pidgin_permit_added_removed, + pidgin_permit_added_removed, + pidgin_deny_added_removed, + pidgin_deny_added_removed }; GaimPrivacyUiOps * -gaim_gtk_privacy_get_ui_ops(void) +pidgin_privacy_get_ui_ops(void) { return &privacy_ops; } void -gaim_gtk_privacy_init(void) +pidgin_privacy_init(void) { }
--- a/pidgin/gtkprivacy.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkprivacy.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,25 +22,25 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKPRIVACY_H_ -#define _GAIM_GTKPRIVACY_H_ +#ifndef _PIDGINPRIVACY_H_ +#define _PIDGINPRIVACY_H_ #include "privacy.h" /** * Initializes the GTK+ privacy subsystem. */ -void gaim_gtk_privacy_init(void); +void pidgin_privacy_init(void); /** * Shows the privacy dialog. */ -void gaim_gtk_privacy_dialog_show(void); +void pidgin_privacy_dialog_show(void); /** * Hides the privacy dialog. */ -void gaim_gtk_privacy_dialog_hide(void); +void pidgin_privacy_dialog_hide(void); /** * Requests confirmation to add a user to the allow list for an account, @@ -51,7 +51,7 @@ * @param account The account. * @param name The name of the user to add. */ -void gaim_gtk_request_add_permit(GaimAccount *account, const char *name); +void pidgin_request_add_permit(GaimAccount *account, const char *name); /** * Requests confirmation to add a user to the block list for an account, @@ -62,13 +62,13 @@ * @param account The account. * @param name The name of the user to add. */ -void gaim_gtk_request_add_block(GaimAccount *account, const char *name); +void pidgin_request_add_block(GaimAccount *account, const char *name); /** * Returns the UI operations structure for the GTK+ privacy subsystem. * * @return The GTK+ UI privacy operations structure. */ -GaimPrivacyUiOps *gaim_gtk_privacy_get_ui_ops(void); +GaimPrivacyUiOps *pidgin_privacy_get_ui_ops(void); -#endif /* _GAIM_GTKPRIVACY_H_ */ +#endif /* _PIDGINPRIVACY_H_ */
--- a/pidgin/gtkrequest.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkrequest.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "prefs.h" #include "util.h" @@ -76,19 +76,19 @@ } u; -} GaimGtkRequestData; +} PidginRequestData; static void -generic_response_start(GaimGtkRequestData *data) +generic_response_start(PidginRequestData *data) { g_return_if_fail(data != NULL); /* Tell the user we're doing something. */ - gaim_gtk_set_cursor(GTK_WIDGET(data->dialog), GDK_WATCH); + pidgin_set_cursor(GTK_WIDGET(data->dialog), GDK_WATCH); } static void -input_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data) +input_response_cb(GtkDialog *dialog, gint id, PidginRequestData *data) { const char *value; char *multiline_value = NULL; @@ -126,7 +126,7 @@ } static void -action_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data) +action_response_cb(GtkDialog *dialog, gint id, PidginRequestData *data) { generic_response_start(data); @@ -138,7 +138,7 @@ static void -choice_response_cb(GtkDialog *dialog, gint id, GaimGtkRequestData *data) +choice_response_cb(GtkDialog *dialog, gint id, PidginRequestData *data) { GtkWidget *radio = g_object_get_data(G_OBJECT(dialog), "radio"); GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); @@ -223,7 +223,7 @@ } static void -multifield_ok_cb(GtkWidget *button, GaimGtkRequestData *data) +multifield_ok_cb(GtkWidget *button, PidginRequestData *data) { generic_response_start(data); @@ -238,7 +238,7 @@ } static void -multifield_cancel_cb(GtkWidget *button, GaimGtkRequestData *data) +multifield_cancel_cb(GtkWidget *button, PidginRequestData *data) { generic_response_start(data); @@ -251,7 +251,7 @@ static void destroy_multifield_cb(GtkWidget *dialog, GdkEvent *event, - GaimGtkRequestData *data) + PidginRequestData *data) { multifield_cancel_cb(NULL, data); } @@ -274,20 +274,20 @@ STOCK_ITEMIZE(_("Add"), GTK_STOCK_ADD); STOCK_ITEMIZE(_("Remove"), GTK_STOCK_REMOVE); STOCK_ITEMIZE(_("Save"), GTK_STOCK_SAVE); - STOCK_ITEMIZE(_("Alias"), GAIM_STOCK_ALIAS); + STOCK_ITEMIZE(_("Alias"), PIDGIN_STOCK_ALIAS); return text; } static void * -gaim_gtk_request_input(const char *title, const char *primary, +pidgin_request_input(const char *title, const char *primary, const char *secondary, const char *default_value, gboolean multiline, gboolean masked, gchar *hint, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, void *user_data) { - GaimGtkRequestData *data; + PidginRequestData *data; GtkWidget *dialog; GtkWidget *vbox; GtkWidget *hbox; @@ -298,7 +298,7 @@ char *label_text; char *primary_esc, *secondary_esc; - data = g_new0(GaimGtkRequestData, 1); + data = g_new0(PidginRequestData, 1); data->type = GAIM_REQUEST_INPUT; data->user_data = user_data; @@ -370,9 +370,9 @@ GtkWidget *frame; /* imhtml */ - frame = gaim_gtk_create_imhtml(TRUE, &entry, &toolbar, NULL); + frame = pidgin_create_imhtml(TRUE, &entry, &toolbar, NULL); gtk_widget_set_size_request(entry, 320, 130); - gtk_widget_set_name(entry, "gaim_gtkrequest_imhtml"); + gtk_widget_set_name(entry, "pidginrequest_imhtml"); if (default_value != NULL) gtk_imhtml_append_text(GTK_IMHTML(entry), default_value, GTK_IMHTML_NO_SCROLL); gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); @@ -406,7 +406,7 @@ gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(entry)); + pidgin_setup_gtkspell(GTK_TEXT_VIEW(entry)); gtk_container_add(GTK_CONTAINER(sw), entry); } @@ -429,7 +429,7 @@ } } - gaim_set_accessible_label (entry, label); + pidgin_set_accessible_label (entry, label); data->u.input.entry = entry; /* Show everything. */ @@ -439,13 +439,13 @@ } static void * -gaim_gtk_request_choice(const char *title, const char *primary, +pidgin_request_choice(const char *title, const char *primary, const char *secondary, unsigned int default_value, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, void *user_data, va_list args) { - GaimGtkRequestData *data; + PidginRequestData *data; GtkWidget *dialog; GtkWidget *vbox, *vbox2; GtkWidget *hbox; @@ -456,7 +456,7 @@ char *radio_text; char *primary_esc, *secondary_esc; - data = g_new0(GaimGtkRequestData, 1); + data = g_new0(PidginRequestData, 1); data->type = GAIM_REQUEST_ACTION; data->user_data = user_data; @@ -542,11 +542,11 @@ } static void * -gaim_gtk_request_action(const char *title, const char *primary, +pidgin_request_action(const char *title, const char *primary, const char *secondary, unsigned int default_action, void *user_data, size_t action_count, va_list actions) { - GaimGtkRequestData *data; + PidginRequestData *data; GtkWidget *dialog; GtkWidget *vbox; GtkWidget *hbox; @@ -557,7 +557,7 @@ char *primary_esc, *secondary_esc; int i; - data = g_new0(GaimGtkRequestData, 1); + data = g_new0(PidginRequestData, 1); data->type = GAIM_REQUEST_ACTION; data->user_data = user_data; @@ -650,12 +650,12 @@ static void req_entry_field_changed_cb(GtkWidget *entry, GaimRequestField *field) { - GaimGtkRequestData *req_data; + PidginRequestData *req_data; const char *text = gtk_entry_get_text(GTK_ENTRY(entry)); gaim_request_field_string_set_value(field, (*text == '\0' ? NULL : text)); - req_data = (GaimGtkRequestData *)field->group->fields_list->ui_data; + req_data = (PidginRequestData *)field->group->fields_list->ui_data; gtk_widget_set_sensitive(req_data->ok_button, gaim_request_fields_all_required_filled(field->group->fields_list)); @@ -697,7 +697,7 @@ } } } - gaim_gtk_setup_screenname_autocomplete(entry, optmenu, !strcmp(type_hint, "screenname-all")); + pidgin_setup_screenname_autocomplete(entry, optmenu, !strcmp(type_hint, "screenname-all")); } } } @@ -727,7 +727,7 @@ GTK_WRAP_WORD_CHAR); if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(textview)); + pidgin_setup_gtkspell(GTK_TEXT_VIEW(textview)); gtk_container_add(GTK_CONTAINER(widget), textview); gtk_widget_show(textview); @@ -924,7 +924,7 @@ { GtkWidget *widget; - widget = gaim_gtk_account_option_menu_new( + widget = pidgin_account_option_menu_new( gaim_request_field_account_get_default_value(field), gaim_request_field_account_get_show_all(field), G_CALLBACK(field_account_cb), @@ -1021,13 +1021,13 @@ } static void * -gaim_gtk_request_fields(const char *title, const char *primary, +pidgin_request_fields(const char *title, const char *primary, const char *secondary, GaimRequestFields *fields, const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, void *user_data) { - GaimGtkRequestData *data; + PidginRequestData *data; GtkWidget *win; GtkWidget *vbox; GtkWidget *vbox2; @@ -1047,7 +1047,7 @@ char *primary_esc, *secondary_esc; int total_fields = 0; - data = g_new0(GaimGtkRequestData, 1); + data = g_new0(PidginRequestData, 1); data->type = GAIM_REQUEST_FIELDS; data->user_data = user_data; data->u.multifield.fields = fields; @@ -1154,7 +1154,7 @@ if (gaim_request_field_group_get_title(group) != NULL) { - frame = gaim_gtk_make_frame(vbox2, + frame = pidgin_make_frame(vbox2, gaim_request_field_group_get_title(group)); } else @@ -1382,7 +1382,7 @@ } static void -file_yes_no_cb(GaimGtkRequestData *data, gint id) +file_yes_no_cb(PidginRequestData *data, gint id) { /* Only call the callback if yes was selected, otherwise the request * (eg. file transfer) will be cancelled, then when a new filename is chosen @@ -1392,13 +1392,13 @@ ((GaimRequestFileCb)data->cbs[1])(data->user_data, data->u.file.name); gaim_request_close(data->type, data); } else { - gaim_gtk_clear_cursor(GTK_WIDGET(data->dialog)); + pidgin_clear_cursor(GTK_WIDGET(data->dialog)); } } #if GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ static void -file_ok_check_if_exists_cb(GtkWidget *widget, gint response, GaimGtkRequestData *data) +file_ok_check_if_exists_cb(GtkWidget *widget, gint response, PidginRequestData *data) { gchar *current_folder; @@ -1425,7 +1425,7 @@ #else /* FILECHOOSER */ static void -file_ok_check_if_exists_cb(GtkWidget *button, GaimGtkRequestData *data) +file_ok_check_if_exists_cb(GtkWidget *button, PidginRequestData *data) { const gchar *name; gchar *current_folder; @@ -1436,7 +1436,7 @@ /* If name is a directory then change directories */ if (data->type == GAIM_REQUEST_FILE) { - if (gaim_gtk_check_if_dir(name, GTK_FILE_SELECTION(data->dialog))) + if (pidgin_check_if_dir(name, GTK_FILE_SELECTION(data->dialog))) return; } @@ -1476,7 +1476,7 @@ #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ static void -file_cancel_cb(GaimGtkRequestData *data) +file_cancel_cb(PidginRequestData *data) { generic_response_start(data); @@ -1488,19 +1488,19 @@ #endif /* FILECHOOSER */ static void * -gaim_gtk_request_file(const char *title, const char *filename, +pidgin_request_file(const char *title, const char *filename, gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, void *user_data) { - GaimGtkRequestData *data; + PidginRequestData *data; GtkWidget *filesel; const gchar *current_folder; #if GTK_CHECK_VERSION(2,4,0) gboolean folder_set = FALSE; #endif - data = g_new0(GaimGtkRequestData, 1); + data = g_new0(PidginRequestData, 1); data->type = GAIM_REQUEST_FILE; data->user_data = user_data; data->cb_count = 2; @@ -1586,14 +1586,14 @@ } static void * -gaim_gtk_request_folder(const char *title, const char *dirname, +pidgin_request_folder(const char *title, const char *dirname, GCallback ok_cb, GCallback cancel_cb, void *user_data) { - GaimGtkRequestData *data; + PidginRequestData *data; GtkWidget *dirsel; - data = g_new0(GaimGtkRequestData, 1); + data = g_new0(PidginRequestData, 1); data->type = GAIM_REQUEST_FOLDER; data->user_data = user_data; data->cb_count = 2; @@ -1635,9 +1635,9 @@ } static void -gaim_gtk_close_request(GaimRequestType type, void *ui_handle) +pidgin_close_request(GaimRequestType type, void *ui_handle) { - GaimGtkRequestData *data = (GaimGtkRequestData *)ui_handle; + PidginRequestData *data = (PidginRequestData *)ui_handle; g_free(data->cbs); @@ -1653,17 +1653,17 @@ static GaimRequestUiOps ops = { - gaim_gtk_request_input, - gaim_gtk_request_choice, - gaim_gtk_request_action, - gaim_gtk_request_fields, - gaim_gtk_request_file, - gaim_gtk_close_request, - gaim_gtk_request_folder + pidgin_request_input, + pidgin_request_choice, + pidgin_request_action, + pidgin_request_fields, + pidgin_request_file, + pidgin_close_request, + pidgin_request_folder }; GaimRequestUiOps * -gaim_gtk_request_get_ui_ops(void) +pidgin_request_get_ui_ops(void) { return &ops; }
--- a/pidgin/gtkrequest.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkrequest.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKREQUEST_H_ -#define _GAIM_GTKREQUEST_H_ +#ifndef _PIDGINREQUEST_H_ +#define _PIDGINREQUEST_H_ #include "request.h" @@ -32,6 +32,6 @@ * * @return The GTK+ UI request operations structure. */ -GaimRequestUiOps *gaim_gtk_request_get_ui_ops(void); +GaimRequestUiOps *pidgin_request_get_ui_ops(void); -#endif /* _GAIM_GTKREQUEST_H_ */ +#endif /* _PIDGINREQUEST_H_ */
--- a/pidgin/gtkroomlist.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkroomlist.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkutils.h" #include "gaimstock.h" #include "debug.h" @@ -34,7 +34,7 @@ #include "gtkroomlist.h" -typedef struct _GaimGtkRoomlistDialog { +typedef struct _PidginRoomlistDialog { GtkWidget *window; GtkWidget *account_widget; GtkWidget *progress; @@ -52,15 +52,15 @@ gboolean pg_needs_pulse; gboolean pg_to_active; guint pg_update_to; -} GaimGtkRoomlistDialog; +} PidginRoomlistDialog; -typedef struct _GaimGtkRoomlist { - GaimGtkRoomlistDialog *dialog; +typedef struct _PidginRoomlist { + PidginRoomlistDialog *dialog; GtkTreeStore *model; GtkWidget *tree; GHashTable *cats; /**< Meow. */ gint num_rooms, total_rooms; -} GaimGtkRoomlist; +} PidginRoomlist; enum { NAME_COLUMN = 0, @@ -72,9 +72,9 @@ static gint delete_win_cb(GtkWidget *w, GdkEventAny *e, gpointer d) { - GaimGtkRoomlistDialog *dialog; + PidginRoomlistDialog *dialog; - dialog = (GaimGtkRoomlistDialog *) d; + dialog = (PidginRoomlistDialog *) d; if (dialog->roomlist && gaim_roomlist_get_in_progress(dialog->roomlist)) gaim_roomlist_cancel_get_list(dialog->roomlist); @@ -97,15 +97,15 @@ } static void dialog_select_account_cb(GObject *w, GaimAccount *account, - GaimGtkRoomlistDialog *dialog) + PidginRoomlistDialog *dialog) { dialog->account = account; } -static void list_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) +static void list_button_cb(GtkButton *button, PidginRoomlistDialog *dialog) { GaimConnection *gc; - GaimGtkRoomlist *rl; + PidginRoomlist *rl; gc = gaim_account_get_connection(dialog->account); if (!gc) @@ -142,7 +142,7 @@ gtk_widget_set_sensitive(dialog->join_button, FALSE); } -static void stop_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) +static void stop_button_cb(GtkButton *button, PidginRoomlistDialog *dialog) { gaim_roomlist_cancel_get_list(dialog->roomlist); @@ -155,7 +155,7 @@ gtk_widget_set_sensitive(dialog->join_button, FALSE); } -static void close_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) +static void close_button_cb(GtkButton *button, PidginRoomlistDialog *dialog) { GtkWidget *window = dialog->window; @@ -169,12 +169,12 @@ }; static void -selection_changed_cb(GtkTreeSelection *selection, GaimGtkRoomlist *grl) { +selection_changed_cb(GtkTreeSelection *selection, PidginRoomlist *grl) { GtkTreeIter iter; GValue val; GaimRoomlistRoom *room; static struct _menu_cb_info *info; - GaimGtkRoomlistDialog *dialog; + PidginRoomlistDialog *dialog; dialog = grl->dialog; @@ -223,10 +223,10 @@ g_free(name); } -static void add_room_to_blist_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) +static void add_room_to_blist_cb(GtkButton *button, PidginRoomlistDialog *dialog) { GaimRoomlist *rl = dialog->roomlist; - GaimGtkRoomlist *grl = rl->ui_data; + PidginRoomlist *grl = rl->ui_data; struct _menu_cb_info *info; info = (struct _menu_cb_info*)g_object_get_data(G_OBJECT(button), "room-info"); @@ -240,10 +240,10 @@ gaim_roomlist_room_join(info->list, info->room); } -static void join_button_cb(GtkButton *button, GaimGtkRoomlistDialog *dialog) +static void join_button_cb(GtkButton *button, PidginRoomlistDialog *dialog) { GaimRoomlist *rl = dialog->roomlist; - GaimGtkRoomlist *grl = rl->ui_data; + PidginRoomlist *grl = rl->ui_data; struct _menu_cb_info *info; info = (struct _menu_cb_info*)g_object_get_data(G_OBJECT(button), "room-info"); @@ -255,7 +255,7 @@ static void row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *arg2, GaimRoomlist *list) { - GaimGtkRoomlist *grl = list->ui_data; + PidginRoomlist *grl = list->ui_data; GtkTreeIter iter; GaimRoomlistRoom *room; GValue val; @@ -277,7 +277,7 @@ static gboolean room_click_cb(GtkWidget *tv, GdkEventButton *event, GaimRoomlist *list) { GtkTreePath *path; - GaimGtkRoomlist *grl = list->ui_data; + PidginRoomlist *grl = list->ui_data; GValue val; GaimRoomlistRoom *room; GtkTreeIter iter; @@ -303,9 +303,9 @@ info.room = room; menu = gtk_menu_new(); - gaim_new_item_from_stock(menu, _("_Join"), GAIM_STOCK_CHAT, + pidgin_new_item_from_stock(menu, _("_Join"), PIDGIN_STOCK_CHAT, G_CALLBACK(do_join_cb), &info, 0, 0, NULL); - gaim_new_item_from_stock(menu, _("_Add"), GTK_STOCK_ADD, + pidgin_new_item_from_stock(menu, _("_Add"), GTK_STOCK_ADD, G_CALLBACK(do_add_room_cb), &info, 0, 0, NULL); gtk_widget_show_all(menu); @@ -341,7 +341,7 @@ } gboolean -gaim_gtk_roomlist_is_showable() +pidgin_roomlist_is_showable() { GList *c; GaimConnection *gc; @@ -356,10 +356,10 @@ return FALSE; } -static GaimGtkRoomlistDialog * -gaim_gtk_roomlist_dialog_new_with_account(GaimAccount *account) +static PidginRoomlistDialog * +pidgin_roomlist_dialog_new_with_account(GaimAccount *account) { - GaimGtkRoomlistDialog *dialog; + PidginRoomlistDialog *dialog; GtkWidget *window; GtkWidget *vbox; GtkWidget *vbox2; @@ -367,7 +367,7 @@ GtkWidget *bbox; GtkWidget *label; - dialog = g_new0(GaimGtkRoomlistDialog, 1); + dialog = g_new0(PidginRoomlistDialog, 1); dialog->account = account; /* Create the window. */ @@ -400,11 +400,11 @@ gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); gtk_widget_show(label); - dialog->account_widget = gaim_gtk_account_option_menu_new(dialog->account, FALSE, + dialog->account_widget = pidgin_account_option_menu_new(dialog->account, FALSE, G_CALLBACK(dialog_select_account_cb), account_filter_func, dialog); if (!dialog->account) /* this is normally null, and we normally don't care what the first selected item is */ - dialog->account = gaim_gtk_account_option_menu_get_selected(dialog->account_widget); + dialog->account = pidgin_account_option_menu_get_selected(dialog->account_widget); gtk_box_pack_start(GTK_BOX(account_hbox), dialog->account_widget, TRUE, TRUE, 0); gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(dialog->account_widget)); @@ -443,16 +443,16 @@ gtk_widget_show(dialog->stop_button); /* list button */ - dialog->list_button = gaim_pixbuf_button_from_stock(_("_Get List"), GTK_STOCK_REFRESH, - GAIM_BUTTON_HORIZONTAL); + dialog->list_button = pidgin_pixbuf_button_from_stock(_("_Get List"), GTK_STOCK_REFRESH, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(bbox), dialog->list_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(dialog->list_button), "clicked", G_CALLBACK(list_button_cb), dialog); gtk_widget_show(dialog->list_button); /* add button */ - dialog->add_button = gaim_pixbuf_button_from_stock(_("_Add Chat"), GTK_STOCK_ADD, - GAIM_BUTTON_HORIZONTAL); + dialog->add_button = pidgin_pixbuf_button_from_stock(_("_Add Chat"), GTK_STOCK_ADD, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(bbox), dialog->add_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(dialog->add_button), "clicked", G_CALLBACK(add_room_to_blist_cb), dialog); @@ -460,8 +460,8 @@ gtk_widget_show(dialog->add_button); /* join button */ - dialog->join_button = gaim_pixbuf_button_from_stock(_("_Join"), GAIM_STOCK_CHAT, - GAIM_BUTTON_HORIZONTAL); + dialog->join_button = pidgin_pixbuf_button_from_stock(_("_Join"), PIDGIN_STOCK_CHAT, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(bbox), dialog->join_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(dialog->join_button), "clicked", G_CALLBACK(join_button_cb), dialog); @@ -481,27 +481,27 @@ return dialog; } -void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account) +void pidgin_roomlist_dialog_show_with_account(GaimAccount *account) { - GaimGtkRoomlistDialog *dialog; + PidginRoomlistDialog *dialog; - dialog = gaim_gtk_roomlist_dialog_new_with_account(account); + dialog = pidgin_roomlist_dialog_new_with_account(account); if (!dialog) return; list_button_cb(GTK_BUTTON(dialog->list_button), dialog); } -void gaim_gtk_roomlist_dialog_show(void) +void pidgin_roomlist_dialog_show(void) { - gaim_gtk_roomlist_dialog_new_with_account(NULL); + pidgin_roomlist_dialog_new_with_account(NULL); } -static void gaim_gtk_roomlist_new(GaimRoomlist *list) +static void pidgin_roomlist_new(GaimRoomlist *list) { - GaimGtkRoomlist *rl; + PidginRoomlist *rl; - rl = g_new0(GaimGtkRoomlist, 1); + rl = g_new0(PidginRoomlist, 1); list->ui_data = rl; @@ -564,9 +564,9 @@ return result; } -static void gaim_gtk_roomlist_set_fields(GaimRoomlist *list, GList *fields) +static void pidgin_roomlist_set_fields(GaimRoomlist *list, GList *fields) { - GaimGtkRoomlist *grl = list->ui_data; + PidginRoomlist *grl = list->ui_data; gint columns = NUM_OF_COLUMNS; int j; GtkTreeStore *model; @@ -660,10 +660,10 @@ } -static gboolean gaim_gtk_progress_bar_pulse(gpointer data) +static gboolean pidgin_progress_bar_pulse(gpointer data) { GaimRoomlist *list = data; - GaimGtkRoomlist *rl = list->ui_data; + PidginRoomlist *rl = list->ui_data; if (!rl || !rl->dialog || !rl->dialog->pg_needs_pulse) { if (rl && rl->dialog) @@ -677,9 +677,9 @@ return TRUE; } -static void gaim_gtk_roomlist_add_room(GaimRoomlist *list, GaimRoomlistRoom *room) +static void pidgin_roomlist_add_room(GaimRoomlist *list, GaimRoomlistRoom *room) { - GaimGtkRoomlist *rl = list->ui_data; + PidginRoomlist *rl = list->ui_data; GtkTreeRowReference *rr, *parentrr = NULL; GtkTreePath *path; GtkTreeIter iter, parent, child; @@ -695,7 +695,7 @@ if (!rl->dialog->pg_to_active) { rl->dialog->pg_to_active = TRUE; gaim_roomlist_ref(list); - rl->dialog->pg_update_to = g_timeout_add(100, gaim_gtk_progress_bar_pulse, list); + rl->dialog->pg_update_to = g_timeout_add(100, pidgin_progress_bar_pulse, list); gtk_progress_bar_pulse(GTK_PROGRESS_BAR(rl->dialog->progress)); } else { rl->dialog->pg_needs_pulse = TRUE; @@ -746,9 +746,9 @@ } } -static void gaim_gtk_roomlist_in_progress(GaimRoomlist *list, gboolean flag) +static void pidgin_roomlist_in_progress(GaimRoomlist *list, gboolean flag) { - GaimGtkRoomlist *rl = list->ui_data; + PidginRoomlist *rl = list->ui_data; if (!rl || !rl->dialog) return; @@ -768,9 +768,9 @@ } } -static void gaim_gtk_roomlist_destroy(GaimRoomlist *list) +static void pidgin_roomlist_destroy(GaimRoomlist *list) { - GaimGtkRoomlist *rl; + PidginRoomlist *rl; roomlists = g_list_remove(roomlists, list); @@ -784,16 +784,16 @@ } static GaimRoomlistUiOps ops = { - gaim_gtk_roomlist_dialog_show_with_account, - gaim_gtk_roomlist_new, - gaim_gtk_roomlist_set_fields, - gaim_gtk_roomlist_add_room, - gaim_gtk_roomlist_in_progress, - gaim_gtk_roomlist_destroy + pidgin_roomlist_dialog_show_with_account, + pidgin_roomlist_new, + pidgin_roomlist_set_fields, + pidgin_roomlist_add_room, + pidgin_roomlist_in_progress, + pidgin_roomlist_destroy }; -void gaim_gtk_roomlist_init(void) +void pidgin_roomlist_init(void) { gaim_roomlist_set_ui_ops(&ops); }
--- a/pidgin/gtkroomlist.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkroomlist.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,15 +22,15 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKROOMLIST_H_ -#define _GAIM_GTKROOMLIST_H_ +#ifndef _PIDGINROOMLIST_H_ +#define _PIDGINROOMLIST_H_ #include "roomlist.h" /** * Initializes the room list subsystem. */ -void gaim_gtk_roomlist_init(void); +void pidgin_roomlist_init(void); /** * Determines if showing the room list dialog is a valid action. @@ -38,18 +38,18 @@ * @return TRUE if there are accounts online that support listing * chat rooms. Otherwise return FALSE. */ -gboolean gaim_gtk_roomlist_is_showable(void); +gboolean pidgin_roomlist_is_showable(void); /** * Shows a new roomlist dialog. */ -void gaim_gtk_roomlist_dialog_show(void); +void pidgin_roomlist_dialog_show(void); /** * Shows a new room list dialog and fetches the list for the specified account. * * @param account The account to use. */ -void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account); +void pidgin_roomlist_dialog_show_with_account(GaimAccount *account); -#endif /* _GAIM_GTKROOMLIST_H_ */ +#endif /* _PIDGINROOMLIST_H_ */
--- a/pidgin/gtksavedstatuses.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksavedstatuses.c Mon Feb 05 03:37:27 2007 +0000 @@ -33,7 +33,7 @@ #include "gtkblist.h" #include "gtkexpander.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkimhtml.h" #include "gtkimhtmltoolbar.h" #include "gtksavedstatuses.h" @@ -171,7 +171,7 @@ StatusWindow *dialog = user_data; dialog->window = NULL; - gaim_gtk_status_window_hide(); + pidgin_status_window_hide(); return FALSE; } @@ -241,7 +241,7 @@ static void status_window_add_cb(GtkButton *button, gpointer user_data) { - gaim_gtk_status_editor_show(FALSE, NULL); + pidgin_status_editor_show(FALSE, NULL); } static void @@ -254,7 +254,7 @@ gtk_tree_model_get(model, iter, STATUS_WINDOW_COLUMN_TITLE, &title, -1); saved_status = gaim_savedstatus_find(title); g_free(title); - gaim_gtk_status_editor_show(TRUE, saved_status); + pidgin_status_editor_show(TRUE, saved_status); } static void @@ -341,7 +341,7 @@ static void status_window_close_cb(GtkButton *button, gpointer user_data) { - gaim_gtk_status_window_hide(); + pidgin_status_window_hide(); } static void @@ -529,7 +529,7 @@ } void -gaim_gtk_status_window_show(void) +pidgin_status_window_show(void) { StatusWindow *dialog; GtkWidget *bbox; @@ -576,8 +576,8 @@ gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, TRUE, 0); /* Use button */ - button = gaim_pixbuf_button_from_stock(_("_Use"), GTK_STOCK_EXECUTE, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(_("_Use"), GTK_STOCK_EXECUTE, + PIDGIN_BUTTON_HORIZONTAL); dialog->use_button = button; gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_set_sensitive(button, FALSE); @@ -593,7 +593,7 @@ G_CALLBACK(status_window_add_cb), dialog); /* Modify button */ - button = gtk_button_new_from_stock(GAIM_STOCK_MODIFY); + button = gtk_button_new_from_stock(PIDGIN_STOCK_MODIFY); dialog->modify_button = button; gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_set_sensitive(button, FALSE); @@ -621,7 +621,7 @@ } void -gaim_gtk_status_window_hide(void) +pidgin_status_window_hide(void) { if (status_window == NULL) return; @@ -969,7 +969,7 @@ GdkPixbuf *pixbuf; const char *id = NULL, *name = NULL, *message = NULL; - pixbuf = gaim_gtk_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM); if ((pixbuf != NULL) && !gaim_account_is_connected(account)) { gdk_pixbuf_saturate_and_pixelate(pixbuf, pixbuf, 0.0, FALSE); @@ -1033,7 +1033,7 @@ } void -gaim_gtk_status_editor_show(gboolean edit, GaimSavedStatus *saved_status) +pidgin_status_editor_show(gboolean edit, GaimSavedStatus *saved_status) { GtkTreeIter iter; StatusEditor *dialog; @@ -1143,7 +1143,7 @@ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_size_group_add_widget(sg, label); - frame = gaim_gtk_create_imhtml(TRUE, &text, &toolbar, NULL); + frame = pidgin_create_imhtml(TRUE, &text, &toolbar, NULL); dialog->message = GTK_IMHTML(text); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); focus_chain = g_list_prepend(focus_chain, dialog->message); @@ -1210,16 +1210,16 @@ G_CALLBACK(status_editor_cancel_cb), dialog); /* Use button */ - button = gaim_pixbuf_button_from_stock(_("_Use"), GTK_STOCK_EXECUTE, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(_("_Use"), GTK_STOCK_EXECUTE, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(status_editor_ok_cb), dialog); /* Save & Use button */ - button = gaim_pixbuf_button_from_stock(_("Sa_ve & Use"), GTK_STOCK_OK, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(_("Sa_ve & Use"), GTK_STOCK_OK, + PIDGIN_BUTTON_HORIZONTAL); dialog->saveanduse_button = GTK_BUTTON(button); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); if (dialog->original_title == NULL) @@ -1479,7 +1479,7 @@ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_size_group_add_widget(sg, label); - frame = gaim_gtk_create_imhtml(TRUE, &text, &toolbar, NULL); + frame = pidgin_create_imhtml(TRUE, &text, &toolbar, NULL); dialog->message = GTK_IMHTML(text); dialog->toolbar = GTK_IMHTMLTOOLBAR(toolbar); gtk_box_pack_start(GTK_BOX(hbox), frame, TRUE, TRUE, 0); @@ -1538,7 +1538,7 @@ continue; id = gaim_status_type_get_id(status_type); - pixbuf = gaim_gtk_create_prpl_icon_with_status(account, status_type, PIDGIN_PRPL_ICON_MEDIUM); + pixbuf = pidgin_create_prpl_icon_with_status(account, status_type, PIDGIN_PRPL_ICON_MEDIUM); name = gaim_status_type_get_name(status_type); gtk_list_store_append(dialog->model, &iter); @@ -1633,12 +1633,12 @@ gaim_savedstatus_get_title(saved_status_b)); } -static gboolean gaim_gtk_status_menu_add_primitive(GtkListStore *model, GaimStatusPrimitive primitive, +static gboolean pidgin_status_menu_add_primitive(GtkListStore *model, GaimStatusPrimitive primitive, GaimSavedStatus *current_status) { GtkTreeIter iter; gboolean currently_selected = FALSE; - GdkPixbuf *pixbuf = gaim_gtk_create_gaim_icon_with_status(primitive, 0.5); + GdkPixbuf *pixbuf = pidgin_create_gaim_icon_with_status(primitive, 0.5); gtk_list_store_append(model, &iter); gtk_list_store_set(model, &iter, @@ -1656,7 +1656,7 @@ return currently_selected; } -GtkWidget *gaim_gtk_status_menu(GaimSavedStatus *current_status, GCallback callback) +GtkWidget *pidgin_status_menu(GaimSavedStatus *current_status, GCallback callback) { GtkWidget *combobox; GtkListStore *model; @@ -1672,19 +1672,19 @@ combobox = gtk_combo_box_new(); - if (gaim_gtk_status_menu_add_primitive(model, GAIM_STATUS_AVAILABLE, current_status)) + if (pidgin_status_menu_add_primitive(model, GAIM_STATUS_AVAILABLE, current_status)) index = i; i++; - if (gaim_gtk_status_menu_add_primitive(model, GAIM_STATUS_AWAY, current_status)) + if (pidgin_status_menu_add_primitive(model, GAIM_STATUS_AWAY, current_status)) index = i; i++; - if (gaim_gtk_status_menu_add_primitive(model, GAIM_STATUS_INVISIBLE, current_status)) + if (pidgin_status_menu_add_primitive(model, GAIM_STATUS_INVISIBLE, current_status)) index = i; i++; - if (gaim_gtk_status_menu_add_primitive(model, GAIM_STATUS_OFFLINE, current_status)) + if (pidgin_status_menu_add_primitive(model, GAIM_STATUS_OFFLINE, current_status)) index = i; i++; @@ -1696,12 +1696,12 @@ if (!gaim_savedstatus_is_transient(status)) { /* Get an appropriate status icon */ - pixbuf = gaim_gtk_create_gaim_icon_with_status( + pixbuf = pidgin_create_gaim_icon_with_status( gaim_savedstatus_get_type(status), 0.5); /* Overlay a disk in the bottom left corner */ emblem = gtk_widget_render_icon(GTK_WIDGET(combobox), - GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU, "GtkGaimStatusMenu"); + GTK_STOCK_SAVE, GTK_ICON_SIZE_MENU, "PidginStatusMenu"); if (emblem != NULL) { int width = gdk_pixbuf_get_width(pixbuf) / 2; @@ -1749,7 +1749,7 @@ **************************************************************************/ void * -gaim_gtk_status_get_handle(void) +pidgin_status_get_handle(void) { static int handle; @@ -1757,7 +1757,7 @@ } void -gaim_gtk_status_init(void) +pidgin_status_init(void) { gaim_prefs_add_none("/gaim/gtk/status"); gaim_prefs_add_none("/gaim/gtk/status/dialog"); @@ -1766,7 +1766,7 @@ } void -gaim_gtk_status_uninit(void) +pidgin_status_uninit(void) { - gaim_gtk_status_window_hide(); + pidgin_status_window_hide(); }
--- a/pidgin/gtksavedstatuses.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksavedstatuses.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKSAVEDSTATUSES_H_ -#define _GAIM_GTKSAVEDSTATUSES_H_ +#ifndef _PIDGINSAVEDSTATUSES_H_ +#define _PIDGINSAVEDSTATUSES_H_ #include "savedstatuses.h" #include "status.h" @@ -31,12 +31,12 @@ /** * Shows the status window. */ -void gaim_gtk_status_window_show(void); +void pidgin_status_window_show(void); /** * Hides the status window. */ -void gaim_gtk_status_window_hide(void); +void pidgin_status_window_hide(void); /** * Shows a status editor (used for adding a new saved status or @@ -55,7 +55,7 @@ * or you can pass in a saved status to * seed the initial values of the new status. */ -void gaim_gtk_status_editor_show(gboolean edit, GaimSavedStatus *status); +void pidgin_status_editor_show(gboolean edit, GaimSavedStatus *status); /** * Creates a dropdown menu of saved statuses and calls a callback @@ -65,23 +65,23 @@ * @param callback The callback to call when the selection changes * @return The menu widget */ -GtkWidget *gaim_gtk_status_menu(GaimSavedStatus *status, GCallback callback); +GtkWidget *pidgin_status_menu(GaimSavedStatus *status, GCallback callback); /** * Returns the GTK+ status handle. * * @return The handle to the GTK+ status system. */ -void *gaim_gtk_status_get_handle(void); +void *pidgin_status_get_handle(void); /** * Initializes the GTK+ status system. */ -void gaim_gtk_status_init(void); +void pidgin_status_init(void); /** * Uninitializes the GTK+ status system. */ -void gaim_gtk_status_uninit(void); +void pidgin_status_uninit(void); -#endif /* _GAIM_GTKSAVEDSTATUSES_H_ */ +#endif /* _PIDGINSAVEDSTATUSES_H_ */
--- a/pidgin/gtkscrollbook.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkscrollbook.c Mon Feb 05 03:37:27 2007 +0000 @@ -26,15 +26,15 @@ #include "gtkscrollbook.h" -static void gtk_gaim_scroll_book_init (GtkGaimScrollBook *scroll_book); -static void gtk_gaim_scroll_book_class_init (GtkGaimScrollBookClass *klass); -static void gtk_gaim_scroll_book_forall (GtkContainer *c, +static void pidgin_scroll_book_init (PidginScrollBook *scroll_book); +static void pidgin_scroll_book_class_init (PidginScrollBookClass *klass); +static void pidgin_scroll_book_forall (GtkContainer *c, gboolean include_internals, GtkCallback callback, gpointer user_data); GType -gtk_gaim_scroll_book_get_type (void) +pidgin_scroll_book_get_type (void) { static GType scroll_book_type = 0; @@ -42,20 +42,20 @@ { static const GTypeInfo scroll_book_info = { - sizeof (GtkGaimScrollBookClass), + sizeof (PidginScrollBookClass), NULL, /* base_init */ NULL, /* base_finalize */ - (GClassInitFunc) gtk_gaim_scroll_book_class_init, + (GClassInitFunc) pidgin_scroll_book_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (GtkGaimScrollBook), + sizeof (PidginScrollBook), 0, - (GInstanceInitFunc) gtk_gaim_scroll_book_init, + (GInstanceInitFunc) pidgin_scroll_book_init, NULL /* value_table */ }; scroll_book_type = g_type_register_static(GTK_TYPE_VBOX, - "GtkGaimScrollBook", + "PidginScrollBook", &scroll_book_info, 0); } @@ -64,7 +64,7 @@ } static void -scroll_left_cb(GtkGaimScrollBook *scroll_book) +scroll_left_cb(PidginScrollBook *scroll_book) { int index; index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook)); @@ -74,7 +74,7 @@ } static void -scroll_right_cb(GtkGaimScrollBook *scroll_book) +scroll_right_cb(PidginScrollBook *scroll_book) { int index, count; index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook)); @@ -89,7 +89,7 @@ } static void -refresh_scroll_box(GtkGaimScrollBook *scroll_book, int index, int count) +refresh_scroll_box(PidginScrollBook *scroll_book, int index, int count) { char *label; gtk_widget_show_all(GTK_WIDGET(scroll_book)); @@ -117,7 +117,7 @@ static void -page_count_change_cb(GtkGaimScrollBook *scroll_book) +page_count_change_cb(PidginScrollBook *scroll_book) { int count; int index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook)); @@ -131,7 +131,7 @@ } static void -switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, GtkGaimScrollBook *scroll_book) +switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, PidginScrollBook *scroll_book) { int count; #if GTK_CHECK_VERSION(2,2,0) @@ -143,37 +143,37 @@ } static void -gtk_gaim_scroll_book_add(GtkContainer *container, GtkWidget *widget) +pidgin_scroll_book_add(GtkContainer *container, GtkWidget *widget) { gtk_widget_show(widget); - gtk_notebook_append_page(GTK_NOTEBOOK(GTK_GAIM_SCROLL_BOOK(container)->notebook), widget, NULL); - page_count_change_cb(GTK_GAIM_SCROLL_BOOK(container)); + gtk_notebook_append_page(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), widget, NULL); + page_count_change_cb(PIDGIN_SCROLL_BOOK(container)); } static void -gtk_gaim_scroll_book_forall(GtkContainer *container, +pidgin_scroll_book_forall(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { - GtkGaimScrollBook *scroll_book = GTK_GAIM_SCROLL_BOOK(container); + PidginScrollBook *scroll_book = PIDGIN_SCROLL_BOOK(container); if (include_internals) (*callback)(scroll_book->hbox, callback_data); (*callback)(scroll_book->notebook, callback_data); } static void -gtk_gaim_scroll_book_class_init (GtkGaimScrollBookClass *klass) +pidgin_scroll_book_class_init (PidginScrollBookClass *klass) { GtkContainerClass *container_class = (GtkContainerClass*)klass; - container_class->add = gtk_gaim_scroll_book_add; - container_class->forall = gtk_gaim_scroll_book_forall; + container_class->add = pidgin_scroll_book_add; + container_class->forall = pidgin_scroll_book_forall; } static void -gtk_gaim_scroll_book_init (GtkGaimScrollBook *scroll_book) +pidgin_scroll_book_init (PidginScrollBook *scroll_book) { GtkWidget *eb; @@ -210,7 +210,7 @@ GtkWidget * -gtk_gaim_scroll_book_new() +pidgin_scroll_book_new() { - return g_object_new(GTK_GAIM_TYPE_SCROLL_BOOK, NULL); + return g_object_new(PIDGIN_TYPE_SCROLL_BOOK, NULL); }
--- a/pidgin/gtkscrollbook.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkscrollbook.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -23,8 +23,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef __GTK_GAIM_SCROLL_BOOK_H__ -#define __GTK_GAIM_SCROLL_BOOK_H__ +#ifndef __PIDGIN_SCROLL_BOOK_H__ +#define __PIDGIN_SCROLL_BOOK_H__ #include <gtk/gtk.h> @@ -34,17 +34,17 @@ G_BEGIN_DECLS -#define GTK_GAIM_TYPE_SCROLL_BOOK (gtk_gaim_scroll_book_get_type ()) -#define GTK_GAIM_SCROLL_BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_GAIM_TYPE_SCROLL_BOOK, GtkGaimScrollBook)) -#define GTK_GAIM_SCROLL_BOOK_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_GAIM_TYPE_SCROLL_BOOK, GtkGaimScrollBookClass)) -#define GTK_GAIM_IS_SCROLL_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_GAIM_TYPE_SCROLL_BOOK)) -#define GTK_GAIM_IS_SCROLL_BOOK_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_GAIM_TYPE_SCROLL_BOOK)) -#define GTK_GAIM_SCROLL_BOOK_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_GAIM_TYPE_SCROLL_BOOK, GtkGaimScrollBookClass)) +#define PIDGIN_TYPE_SCROLL_BOOK (pidgin_scroll_book_get_type ()) +#define PIDGIN_SCROLL_BOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_SCROLL_BOOK, PidginScrollBook)) +#define PIDGIN_SCROLL_BOOK_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), PIDGIN_TYPE_SCROLL_BOOK, PidginScrollBookClass)) +#define PIDGIN_IS_SCROLL_BOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_SCROLL_BOOK)) +#define PIDGIN_IS_SCROLL_BOOK_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), PIDGIN_TYPE_SCROLL_BOOK)) +#define PIDGIN_SCROLL_BOOK_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), PIDGIN_TYPE_SCROLL_BOOK, PidginScrollBookClass)) -typedef struct _GtkGaimScrollBook GtkGaimScrollBook; -typedef struct _GtkGaimScrollBookClass GtkGaimScrollBookClass; +typedef struct _PidginScrollBook PidginScrollBook; +typedef struct _PidginScrollBookClass PidginScrollBookClass; -struct _GtkGaimScrollBook +struct _PidginScrollBook { GtkVBox parent_instance; @@ -63,7 +63,7 @@ }; -struct _GtkGaimScrollBookClass +struct _PidginScrollBookClass { GtkComboBoxClass parent_class; @@ -75,9 +75,9 @@ }; -GType gtk_gaim_scroll_book_get_type (void) G_GNUC_CONST; -GtkWidget *gtk_gaim_scroll_book_new (void); +GType pidgin_scroll_book_get_type (void) G_GNUC_CONST; +GtkWidget *pidgin_scroll_book_new (void); G_END_DECLS -#endif /* __GTK_GAIM_SCROLL_BOOK_H__ */ +#endif /* __PIDGIN_SCROLL_BOOK_H__ */
--- a/pidgin/gtksession.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksession.c Mon Feb 05 03:37:27 2007 +0000 @@ -279,7 +279,7 @@ /* setup functions */ void -gaim_gtk_session_init(gchar *argv0, gchar *previous_id, gchar *config_dir) +pidgin_session_init(gchar *argv0, gchar *previous_id, gchar *config_dir) { #ifdef USE_SM SmcCallbacks callbacks; @@ -291,7 +291,7 @@ if (session != NULL) { /* session is already established, what the hell is going on? */ gaim_debug(GAIM_DEBUG_WARNING, "Session Management", - "Duplicated call to gaim_gtk_session_init!\n"); + "Duplicated call to pidgin_session_init!\n"); return; } @@ -386,7 +386,7 @@ } void -gaim_gtk_session_end() +pidgin_session_end() { #ifdef USE_SM if (session == NULL) /* no session to close */
--- a/pidgin/gtksession.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksession.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKSESSION_H_ -#define _GAIM_GTKSESSION_H_ +#ifndef _PIDGINSESSION_H_ +#define _PIDGINSESSION_H_ /**************************************************************************/ /** @name X Windows session subsystem */ @@ -31,7 +31,7 @@ /*@{*/ /** - * Register this instance of Gaim with the user's current session + * Register this instance of Pidgin with the user's current session * manager. * * @param argv0 The first argument passed into the program. This @@ -40,14 +40,14 @@ * @param config_dir The path to the configuration directory used by * this instance of this program, e.g. '/home/user/.gaim' */ -void gaim_gtk_session_init(gchar *argv0, gchar *previous_id, gchar *config_dir); +void pidgin_session_init(gchar *argv0, gchar *previous_id, gchar *config_dir); /** - * Unregister this instance of Gaim with the user's current session + * Unregister this instance of Pidgin with the user's current session * manager. */ -void gaim_gtk_session_end(void); +void pidgin_session_end(void); /*@}*/ -#endif /* _GAIM_GTKSESSION_H_ */ +#endif /* _PIDGINSESSION_H_ */
--- a/pidgin/gtksound.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksound.c Mon Feb 05 03:37:27 2007 +0000 @@ -24,7 +24,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #ifdef _WIN32 #include <windows.h> @@ -116,11 +116,11 @@ /* If we should not play the sound for some reason, then exit early */ if (conv != NULL) { - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; gboolean has_focus; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); win = gtkconv->win; has_focus = gaim_conversation_has_focus(conv); @@ -234,7 +234,7 @@ } const char * -gaim_gtk_sound_get_event_option(GaimSoundEventID event) +pidgin_sound_get_event_option(GaimSoundEventID event) { if(event >= GAIM_NUM_SOUNDS) return 0; @@ -243,7 +243,7 @@ } const char * -gaim_gtk_sound_get_event_label(GaimSoundEventID event) +pidgin_sound_get_event_label(GaimSoundEventID event) { if(event >= GAIM_NUM_SOUNDS) return NULL; @@ -252,7 +252,7 @@ } void * -gaim_gtk_sound_get_handle() +pidgin_sound_get_handle() { static int handle; @@ -260,9 +260,9 @@ } static void -gaim_gtk_sound_init(void) +pidgin_sound_init(void) { - void *gtk_sound_handle = gaim_gtk_sound_get_handle(); + void *gtk_sound_handle = pidgin_sound_get_handle(); void *blist_handle = gaim_blist_get_handle(); void *conv_handle = gaim_conversations_get_handle(); #ifdef USE_GSTREAMER @@ -344,14 +344,14 @@ } static void -gaim_gtk_sound_uninit(void) +pidgin_sound_uninit(void) { #ifdef USE_GSTREAMER if (!gst_init_failed) gst_deinit(); #endif - gaim_signals_disconnect_by_handle(gaim_gtk_sound_get_handle()); + gaim_signals_disconnect_by_handle(pidgin_sound_get_handle()); } #ifdef USE_GSTREAMER @@ -386,7 +386,7 @@ #endif static void -gaim_gtk_sound_play_file(const char *filename) +pidgin_sound_play_file(const char *filename) { const char *method; #ifdef USE_GSTREAMER @@ -508,7 +508,7 @@ } static void -gaim_gtk_sound_play_event(GaimSoundEventID event) +pidgin_sound_play_event(GaimSoundEventID event) { char *enable_pref; char *file_pref; @@ -543,14 +543,14 @@ static GaimSoundUiOps sound_ui_ops = { - gaim_gtk_sound_init, - gaim_gtk_sound_uninit, - gaim_gtk_sound_play_file, - gaim_gtk_sound_play_event + pidgin_sound_init, + pidgin_sound_uninit, + pidgin_sound_play_file, + pidgin_sound_play_event }; GaimSoundUiOps * -gaim_gtk_sound_get_ui_ops(void) +pidgin_sound_get_ui_ops(void) { return &sound_ui_ops; }
--- a/pidgin/gtksound.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksound.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKSOUND_H_ -#define _GAIM_GTKSOUND_H_ +#ifndef _PIDGINSOUND_H_ +#define _PIDGINSOUND_H_ #include "sound.h" @@ -38,7 +38,7 @@ * @param event The event. * @return The option. */ -const char *gaim_gtk_sound_get_event_option(GaimSoundEventID event); +const char *pidgin_sound_get_event_option(GaimSoundEventID event); /** * Get the label for an event. @@ -46,22 +46,22 @@ * @param event The event. * @return The label. */ -const char *gaim_gtk_sound_get_event_label(GaimSoundEventID event); +const char *pidgin_sound_get_event_label(GaimSoundEventID event); /** * Gets GTK+ sound UI ops. * * @return The UI operations structure. */ -GaimSoundUiOps *gaim_gtk_sound_get_ui_ops(void); +GaimSoundUiOps *pidgin_sound_get_ui_ops(void); /** * Get the handle for the GTK+ sound system. * * @return The handle to the sound system */ -void *gaim_gtk_sound_get_handle(void); +void *pidgin_sound_get_handle(void); /*@}*/ -#endif /* _GAIM_GTKSOUND_H_ */ +#endif /* _PIDGINSOUND_H_ */
--- a/pidgin/gtksourceiter.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtksourceiter.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,7 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * gtksourceiter.h * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -25,8 +25,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _GAIM_GTKSOURCEITER_H_ -#define _GAIM_GTKSOURCEITER_H_ +#ifndef _PIDGINSOURCEITER_H_ +#define _PIDGINSOURCEITER_H_ #include <gtk/gtktextiter.h> @@ -58,4 +58,4 @@ G_END_DECLS -#endif /* _GAIM_GTKSOURCEITER_H_ */ +#endif /* _PIDGINSOURCEITER_H_ */
--- a/pidgin/gtkstatusbox.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkstatusbox.c Mon Feb 05 03:37:27 2007 +0000 @@ -48,7 +48,7 @@ #include "status.h" #include "debug.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtksavedstatuses.h" #include "gaimstock.h" #include "gtkstatusbox.h" @@ -65,29 +65,29 @@ static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data); static void imhtml_format_changed_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, void *data); -static void remove_typing_cb(GtkGaimStatusBox *box); -static void update_size (GtkGaimStatusBox *box); -static gint get_statusbox_index(GtkGaimStatusBox *box, GaimSavedStatus *saved_status); +static void remove_typing_cb(PidginStatusBox *box); +static void update_size (PidginStatusBox *box); +static gint get_statusbox_index(PidginStatusBox *box, GaimSavedStatus *saved_status); -static void gtk_gaim_status_box_pulse_typing(GtkGaimStatusBox *status_box); -static void gtk_gaim_status_box_refresh(GtkGaimStatusBox *status_box); -static void status_menu_refresh_iter(GtkGaimStatusBox *status_box); -static void gtk_gaim_status_box_regenerate(GtkGaimStatusBox *status_box); -static void gtk_gaim_status_box_changed(GtkGaimStatusBox *box); -static void gtk_gaim_status_box_size_request (GtkWidget *widget, GtkRequisition *requisition); -static void gtk_gaim_status_box_size_allocate (GtkWidget *widget, GtkAllocation *allocation); -static gboolean gtk_gaim_status_box_expose_event (GtkWidget *widget, GdkEventExpose *event); -static void gtk_gaim_status_box_redisplay_buddy_icon(GtkGaimStatusBox *status_box); -static void gtk_gaim_status_box_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data); -static void gaim_gtk_status_box_popup(GtkGaimStatusBox *box); -static void gaim_gtk_status_box_popdown(GtkGaimStatusBox *box); +static void pidgin_status_box_pulse_typing(PidginStatusBox *status_box); +static void pidgin_status_box_refresh(PidginStatusBox *status_box); +static void status_menu_refresh_iter(PidginStatusBox *status_box); +static void pidgin_status_box_regenerate(PidginStatusBox *status_box); +static void pidgin_status_box_changed(PidginStatusBox *box); +static void pidgin_status_box_size_request (GtkWidget *widget, GtkRequisition *requisition); +static void pidgin_status_box_size_allocate (GtkWidget *widget, GtkAllocation *allocation); +static gboolean pidgin_status_box_expose_event (GtkWidget *widget, GdkEventExpose *event); +static void pidgin_status_box_redisplay_buddy_icon(PidginStatusBox *status_box); +static void pidgin_status_box_forall (GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data); +static void pidgin_status_box_popup(PidginStatusBox *box); +static void pidgin_status_box_popdown(PidginStatusBox *box); static void do_colorshift (GdkPixbuf *dest, GdkPixbuf *src, int shift); static void icon_choose_cb(const char *filename, gpointer data); -static void remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box); +static void remove_buddy_icon_cb(GtkWidget *w, PidginStatusBox *box); enum { - /** A GtkGaimStatusBoxItemType */ + /** A PidginStatusBoxItemType */ TYPE_COLUMN, /** @@ -123,11 +123,11 @@ GtkContainerClass *parent_class = NULL; -static void gtk_gaim_status_box_class_init (GtkGaimStatusBoxClass *klass); -static void gtk_gaim_status_box_init (GtkGaimStatusBox *status_box); +static void pidgin_status_box_class_init (PidginStatusBoxClass *klass); +static void pidgin_status_box_init (PidginStatusBox *status_box); GType -gtk_gaim_status_box_get_type (void) +pidgin_status_box_get_type (void) { static GType status_box_type = 0; @@ -135,20 +135,20 @@ { static const GTypeInfo status_box_info = { - sizeof (GtkGaimStatusBoxClass), + sizeof (PidginStatusBoxClass), NULL, /* base_init */ NULL, /* base_finalize */ - (GClassInitFunc) gtk_gaim_status_box_class_init, + (GClassInitFunc) pidgin_status_box_class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof (GtkGaimStatusBox), + sizeof (PidginStatusBox), 0, - (GInstanceInitFunc) gtk_gaim_status_box_init, + (GInstanceInitFunc) pidgin_status_box_init, NULL /* value_table */ }; status_box_type = g_type_register_static(GTK_TYPE_CONTAINER, - "GtkGaimStatusBox", + "PidginStatusBox", &status_box_info, 0); } @@ -157,10 +157,10 @@ } static void -gtk_gaim_status_box_get_property(GObject *object, guint param_id, +pidgin_status_box_get_property(GObject *object, guint param_id, GValue *value, GParamSpec *psec) { - GtkGaimStatusBox *statusbox = GTK_GAIM_STATUS_BOX(object); + PidginStatusBox *statusbox = PIDGIN_STATUS_BOX(object); switch (param_id) { case PROP_ACCOUNT: @@ -176,7 +176,7 @@ } static void -update_to_reflect_account_status(GtkGaimStatusBox *status_box, GaimAccount *account, GaimStatus *newstatus) +update_to_reflect_account_status(PidginStatusBox *status_box, GaimAccount *account, GaimStatus *newstatus) { const GList *l; int status_no = -1; @@ -221,12 +221,12 @@ gtk_imhtml_append_text(GTK_IMHTML(status_box->imhtml), message, 0); } gtk_widget_set_sensitive(GTK_WIDGET(status_box), TRUE); - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } } static void -account_status_changed_cb(GaimAccount *account, GaimStatus *oldstatus, GaimStatus *newstatus, GtkGaimStatusBox *status_box) +account_status_changed_cb(GaimAccount *account, GaimStatus *oldstatus, GaimStatus *newstatus, PidginStatusBox *status_box) { if (status_box->account == account) update_to_reflect_account_status(status_box, account, newstatus); @@ -235,7 +235,7 @@ } static gboolean -icon_box_press_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) +icon_box_press_cb(GtkWidget *widget, GdkEventButton *event, PidginStatusBox *box) { if (event->button == 3) { GtkWidget *menu_item; @@ -245,7 +245,7 @@ box->icon_box_menu = gtk_menu_new(); - menu_item = gaim_new_item_from_stock(box->icon_box_menu, _("Remove"), GTK_STOCK_REMOVE, + menu_item = pidgin_new_item_from_stock(box->icon_box_menu, _("Remove"), GTK_STOCK_REMOVE, G_CALLBACK(remove_buddy_icon_cb), box, 0, 0, NULL); if (gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon") == NULL) @@ -260,7 +260,7 @@ return FALSE; } - box->buddy_icon_sel = gaim_gtk_buddy_icon_chooser_new(NULL, icon_choose_cb, box); + box->buddy_icon_sel = pidgin_buddy_icon_chooser_new(NULL, icon_choose_cb, box); gtk_widget_show_all(box->buddy_icon_sel); } return FALSE; @@ -268,7 +268,7 @@ static void icon_box_dnd_cb(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, - GtkSelectionData *sd, guint info, guint t, GtkGaimStatusBox *box) + GtkSelectionData *sd, guint info, guint t, PidginStatusBox *box) { gchar *name = (gchar *)sd->data; @@ -297,7 +297,7 @@ static gboolean -icon_box_enter_cb(GtkWidget *widget, GdkEventCrossing *event, GtkGaimStatusBox *box) +icon_box_enter_cb(GtkWidget *widget, GdkEventCrossing *event, PidginStatusBox *box) { gdk_window_set_cursor(widget->window, box->hand_cursor); gtk_image_set_from_pixbuf(GTK_IMAGE(box->icon), box->buddy_icon_hover); @@ -305,7 +305,7 @@ } static gboolean -icon_box_leave_cb(GtkWidget *widget, GdkEventCrossing *event, GtkGaimStatusBox *box) +icon_box_leave_cb(GtkWidget *widget, GdkEventCrossing *event, PidginStatusBox *box) { gdk_window_set_cursor(widget->window, box->arrow_cursor); gtk_image_set_from_pixbuf(GTK_IMAGE(box->icon), box->buddy_icon) ; @@ -320,7 +320,7 @@ }; static void -setup_icon_box(GtkGaimStatusBox *status_box) +setup_icon_box(PidginStatusBox *status_box) { if (status_box->icon_box != NULL) return; @@ -334,12 +334,12 @@ !gaim_account_get_bool(status_box->account, "use-global-buddyicon", TRUE)) { char *string = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(status_box->account)); - gtk_gaim_status_box_set_buddy_icon(status_box, string); + pidgin_status_box_set_buddy_icon(status_box, string); g_free(string); } else { - gtk_gaim_status_box_set_buddy_icon(status_box, gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon")); + pidgin_status_box_set_buddy_icon(status_box, gaim_prefs_get_path("/gaim/gtk/accounts/buddyicon")); } status_box->hand_cursor = gdk_cursor_new (GDK_HAND2); @@ -363,7 +363,7 @@ } static void -destroy_icon_box(GtkGaimStatusBox *statusbox) +destroy_icon_box(PidginStatusBox *statusbox) { if (statusbox->icon_box == NULL) return; @@ -394,10 +394,10 @@ } static void -gtk_gaim_status_box_set_property(GObject *object, guint param_id, +pidgin_status_box_set_property(GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { - GtkGaimStatusBox *statusbox = GTK_GAIM_STATUS_BOX(object); + PidginStatusBox *statusbox = PIDGIN_STATUS_BOX(object); switch (param_id) { case PROP_ICON_SEL: @@ -419,7 +419,7 @@ case PROP_ACCOUNT: statusbox->account = g_value_get_pointer(value); - gtk_gaim_status_box_regenerate(statusbox); + pidgin_status_box_regenerate(statusbox); break; default: @@ -429,9 +429,9 @@ } static void -gtk_gaim_status_box_finalize(GObject *obj) +pidgin_status_box_finalize(GObject *obj) { - GtkGaimStatusBox *statusbox = GTK_GAIM_STATUS_BOX(obj); + PidginStatusBox *statusbox = PIDGIN_STATUS_BOX(obj); gaim_signals_disconnect_by_handle(statusbox); gaim_prefs_disconnect_by_handle(statusbox); @@ -451,13 +451,13 @@ } static GType -gtk_gaim_status_box_child_type (GtkContainer *container) +pidgin_status_box_child_type (GtkContainer *container) { return GTK_TYPE_WIDGET; } static void -gtk_gaim_status_box_class_init (GtkGaimStatusBoxClass *klass) +pidgin_status_box_class_init (PidginStatusBoxClass *klass) { GObjectClass *object_class; GtkWidgetClass *widget_class; @@ -466,20 +466,20 @@ parent_class = g_type_class_peek_parent(klass); widget_class = (GtkWidgetClass*)klass; - widget_class->size_request = gtk_gaim_status_box_size_request; - widget_class->size_allocate = gtk_gaim_status_box_size_allocate; - widget_class->expose_event = gtk_gaim_status_box_expose_event; + widget_class->size_request = pidgin_status_box_size_request; + widget_class->size_allocate = pidgin_status_box_size_allocate; + widget_class->expose_event = pidgin_status_box_expose_event; - container_class->child_type = gtk_gaim_status_box_child_type; - container_class->forall = gtk_gaim_status_box_forall; + container_class->child_type = pidgin_status_box_child_type; + container_class->forall = pidgin_status_box_forall; container_class->remove = NULL; object_class = (GObjectClass *)klass; - object_class->finalize = gtk_gaim_status_box_finalize; + object_class->finalize = pidgin_status_box_finalize; - object_class->get_property = gtk_gaim_status_box_get_property; - object_class->set_property = gtk_gaim_status_box_set_property; + object_class->get_property = pidgin_status_box_get_property; + object_class->set_property = pidgin_status_box_set_property; g_object_class_install_property(object_class, PROP_ACCOUNT, @@ -506,7 +506,7 @@ * should modify status_box->store */ static void -gtk_gaim_status_box_refresh(GtkGaimStatusBox *status_box) +pidgin_status_box_refresh(PidginStatusBox *status_box) { GtkIconSize icon_size; GtkStyle *style; @@ -536,7 +536,7 @@ if (status_box->typing != 0) { GtkTreeIter iter; - GtkGaimStatusBoxItemType type; + PidginStatusBoxItemType type; gpointer data; /* Primary (get the status selected in the dropdown) */ @@ -549,7 +549,7 @@ TYPE_COLUMN, &type, DATA_COLUMN, &data, -1); - if (type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE) + if (type == PIDGIN_STATUS_BOX_TYPE_PRIMITIVE) primary = g_strdup(gaim_primitive_get_name_from_type(GPOINTER_TO_INT(data))); else /* This should never happen, but just in case... */ @@ -621,11 +621,11 @@ icon_size, "PidginStatusBox"); #if 0 if (account_status) - pixbuf = gaim_gtk_create_prpl_icon_with_status(acct, + pixbuf = pidgin_create_prpl_icon_with_status(acct, gaim_status_get_type(gaim_account_get_active_status(acct)), 0.5); else - pixbuf = gaim_gtk_create_gaim_icon_with_status( + pixbuf = pidgin_create_gaim_icon_with_status( gaim_savedstatus_get_type(saved_status), 0.5); @@ -635,7 +635,7 @@ /* Overlay a disk in the bottom left corner */ emblem = gtk_widget_render_icon(GTK_WIDGET(status_box->vbox), - GTK_STOCK_SAVE, icon_size, "GtkGaimStatusBox"); + GTK_STOCK_SAVE, icon_size, "PidginStatusBox"); if (emblem != NULL) { int width, height; @@ -714,7 +714,7 @@ * keyboard signals instead of the changed signal? */ static void -status_menu_refresh_iter(GtkGaimStatusBox *status_box) +status_menu_refresh_iter(PidginStatusBox *status_box) { GaimSavedStatus *saved_status; GaimStatusPrimitive primitive; @@ -750,7 +750,7 @@ else { GtkTreeIter iter; - GtkGaimStatusBoxItemType type; + PidginStatusBoxItemType type; gpointer data; /* If this saved status is in the list store, then set it as the active item */ @@ -766,7 +766,7 @@ /* This is a special case because Primitives for the token_status_account are actually * saved statuses with substatuses for the enabled accounts */ if (status_box->token_status_account && gaim_savedstatus_is_transient(saved_status) - && type == GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE && primitive == GPOINTER_TO_INT(data)) + && type == PIDGIN_STATUS_BOX_TYPE_PRIMITIVE && primitive == GPOINTER_TO_INT(data)) { char *name; const char *acct_status_name = gaim_status_get_name( @@ -785,7 +785,7 @@ } g_free(name); - } else if ((type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) && + } else if ((type == PIDGIN_STATUS_BOX_TYPE_POPULAR) && (GPOINTER_TO_INT(data) == gaim_savedstatus_get_creation_time(saved_status))) { /* Found! */ @@ -834,7 +834,7 @@ } static void -add_popular_statuses(GtkGaimStatusBox *statusbox) +add_popular_statuses(PidginStatusBox *statusbox) { GtkIconSize icon_size; GList *list, *cur; @@ -848,7 +848,7 @@ icon_size = gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL); - gtk_gaim_status_box_add_separator(statusbox); + pidgin_status_box_add_separator(statusbox); for (cur = list; cur != NULL; cur = cur->next) { @@ -895,7 +895,7 @@ #if 0 /* Overlay a disk in the bottom left corner */ emblem = gtk_widget_render_icon(GTK_WIDGET(statusbox->vbox), - GTK_STOCK_SAVE, icon_size, "GtkGaimStatusBox"); + GTK_STOCK_SAVE, icon_size, "PidginStatusBox"); if (emblem != NULL) { width = gdk_pixbuf_get_width(pixbuf) / 2; @@ -908,7 +908,7 @@ #endif } - gtk_gaim_status_box_add(statusbox, GTK_GAIM_STATUS_BOX_TYPE_POPULAR, + pidgin_status_box_add(statusbox, PIDGIN_STATUS_BOX_TYPE_POPULAR, pixbuf, gaim_savedstatus_get_title(saved), stripped, GINT_TO_POINTER(gaim_savedstatus_get_creation_time(saved))); g_free(stripped); @@ -970,7 +970,7 @@ } static void -add_account_statuses(GtkGaimStatusBox *status_box, GaimAccount *account) +add_account_statuses(PidginStatusBox *status_box, GaimAccount *account) { /* Per-account */ const GList *l; @@ -1003,8 +1003,8 @@ pixbuf = gtk_widget_render_icon (GTK_WIDGET(status_box), PIDGIN_STOCK_STATUS_AVAILABLE, icon_size, "PidginStatusBox"); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), - GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf, + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), + PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, pixbuf, gaim_status_type_get_name(status_type), NULL, GINT_TO_POINTER(gaim_status_type_get_primitive(status_type))); @@ -1014,7 +1014,7 @@ } static void -gtk_gaim_status_box_regenerate(GtkGaimStatusBox *status_box) +pidgin_status_box_regenerate(PidginStatusBox *status_box) { GdkPixbuf *pixbuf, *pixbuf2, *pixbuf3, *pixbuf4; GtkIconSize icon_size; @@ -1032,7 +1032,7 @@ if (status_box->account == NULL) { pixbuf = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_STATUS_AVAILABLE, - icon_size, "GtkGaimStatusBox"); + icon_size, "PidginStatusBox"); /* Do all the currently enabled accounts have the same statuses? * If so, display them instead of our global list. */ @@ -1044,13 +1044,13 @@ icon_size, "PidginStatusBox"); pixbuf3 = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_STATUS_OFFLINE, icon_size, "PidginStatusBox"); - pixbuf4 = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_STATUS_INVISIBLE, + pixbuf4 = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), PIDGIN_STOCK_STATUS_AVAILABLE_I, icon_size, "PidginStatusBox"); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf, _("Available"), NULL, GINT_TO_POINTER(GAIM_STATUS_AVAILABLE)); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf2, _("Away"), NULL, GINT_TO_POINTER(GAIM_STATUS_AWAY)); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf4, _("Invisible"), NULL, GINT_TO_POINTER(GAIM_STATUS_INVISIBLE)); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, pixbuf3, _("Offline"), NULL, GINT_TO_POINTER(GAIM_STATUS_OFFLINE)); + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, pixbuf, _("Available"), NULL, GINT_TO_POINTER(GAIM_STATUS_AVAILABLE)); + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, pixbuf2, _("Away"), NULL, GINT_TO_POINTER(GAIM_STATUS_AWAY)); + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, pixbuf4, _("Invisible"), NULL, GINT_TO_POINTER(GAIM_STATUS_INVISIBLE)); + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, pixbuf3, _("Offline"), NULL, GINT_TO_POINTER(GAIM_STATUS_OFFLINE)); if (pixbuf2) g_object_unref(G_OBJECT(pixbuf2)); if (pixbuf3) g_object_unref(G_OBJECT(pixbuf3)); @@ -1059,13 +1059,13 @@ add_popular_statuses(status_box); - gtk_gaim_status_box_add_separator(GTK_GAIM_STATUS_BOX(status_box)); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_CUSTOM, pixbuf, _("New..."), NULL, NULL); - gtk_gaim_status_box_add(GTK_GAIM_STATUS_BOX(status_box), GTK_GAIM_STATUS_BOX_TYPE_SAVED, pixbuf, _("Saved..."), NULL, NULL); + pidgin_status_box_add_separator(PIDGIN_STATUS_BOX(status_box)); + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), PIDGIN_STATUS_BOX_TYPE_CUSTOM, pixbuf, _("New..."), NULL, NULL); + pidgin_status_box_add(PIDGIN_STATUS_BOX(status_box), PIDGIN_STATUS_BOX_TYPE_SAVED, pixbuf, _("Saved..."), NULL, NULL); if (pixbuf) g_object_unref(G_OBJECT(pixbuf)); status_menu_refresh_iter(status_box); - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } else { add_account_statuses(status_box, status_box->account); @@ -1078,7 +1078,7 @@ static gboolean combo_box_scroll_event_cb(GtkWidget *w, GdkEventScroll *event, GtkIMHtml *imhtml) { - gaim_gtk_status_box_popup(GTK_GAIM_STATUS_BOX(w)); + pidgin_status_box_popup(PIDGIN_STATUS_BOX(w)); return TRUE; } @@ -1091,7 +1091,7 @@ return TRUE; } -static int imhtml_remove_focus(GtkWidget *w, GdkEventKey *event, GtkGaimStatusBox *status_box) +static int imhtml_remove_focus(GtkWidget *w, GdkEventKey *event, PidginStatusBox *status_box) { if (event->keyval == GDK_Tab || event->keyval == GDK_KP_Tab) { @@ -1115,12 +1115,12 @@ gaim_account_get_active_status(status_box->account)); else { status_menu_refresh_iter(status_box); - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } return TRUE; } - gtk_gaim_status_box_pulse_typing(status_box); + pidgin_status_box_pulse_typing(status_box); g_source_remove(status_box->typing); status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); @@ -1132,11 +1132,11 @@ dropdown_store_row_separator_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { - GtkGaimStatusBoxItemType type; + PidginStatusBoxItemType type; gtk_tree_model_get(model, iter, TYPE_COLUMN, &type, -1); - if (type == GTK_GAIM_STATUS_BOX_TYPE_SEPARATOR) + if (type == PIDGIN_STATUS_BOX_TYPE_SEPARATOR) return TRUE; return FALSE; @@ -1144,7 +1144,7 @@ #endif static void -cache_pixbufs(GtkGaimStatusBox *status_box) +cache_pixbufs(PidginStatusBox *status_box) { GtkIconSize icon_size; @@ -1190,23 +1190,23 @@ icon_size, "PidginStatusBox"); } -static void account_enabled_cb(GaimAccount *acct, GtkGaimStatusBox *status_box) { +static void account_enabled_cb(GaimAccount *acct, PidginStatusBox *status_box) { GaimAccount *initial_token_acct = status_box->token_status_account; status_box->token_status_account = check_active_accounts_for_identical_statuses(); /* Regenerate the list if it has changed */ if (initial_token_acct != status_box->token_status_account) { - gtk_gaim_status_box_regenerate(status_box); + pidgin_status_box_regenerate(status_box); } } static void -current_savedstatus_changed_cb(GaimSavedStatus *now, GaimSavedStatus *old, GtkGaimStatusBox *status_box) +current_savedstatus_changed_cb(GaimSavedStatus *now, GaimSavedStatus *old, PidginStatusBox *status_box) { /* Make sure our current status is added to the list of popular statuses */ - gtk_gaim_status_box_regenerate(status_box); + pidgin_status_box_regenerate(status_box); } static void @@ -1214,10 +1214,10 @@ gconstpointer value, gpointer data) { #ifdef USE_GTKSPELL - GtkGaimStatusBox *status_box = (GtkGaimStatusBox *)data; + PidginStatusBox *status_box = (PidginStatusBox *)data; if (value) - gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(status_box->imhtml)); + pidgin_setup_gtkspell(GTK_TEXT_VIEW(status_box->imhtml)); else { GtkSpell *spell; @@ -1228,7 +1228,7 @@ } #if 0 -static gboolean button_released_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) +static gboolean button_released_cb(GtkWidget *widget, GdkEventButton *event, PidginStatusBox *box) { if (event->button != 1) @@ -1239,7 +1239,7 @@ return TRUE; } -static gboolean button_pressed_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *box) +static gboolean button_pressed_cb(GtkWidget *widget, GdkEventButton *event, PidginStatusBox *box) { if (event->button != 1) return FALSE; @@ -1251,7 +1251,7 @@ #endif static void -gtk_gaim_status_box_list_position (GtkGaimStatusBox *status_box, int *x, int *y, int *width, int *height) +pidgin_status_box_list_position (PidginStatusBox *status_box, int *x, int *y, int *width, int *height) { #if GTK_CHECK_VERSION(2,2,0) GdkScreen *screen; @@ -1351,10 +1351,10 @@ static void -gaim_gtk_status_box_popup(GtkGaimStatusBox *box) +pidgin_status_box_popup(PidginStatusBox *box) { int width, height, x, y; - gtk_gaim_status_box_list_position (box, &x, &y, &width, &height); + pidgin_status_box_list_position (box, &x, &y, &width, &height); gtk_widget_set_size_request (box->popup_window, width, height); gtk_window_move (GTK_WINDOW (box->popup_window), x, y); @@ -1378,7 +1378,7 @@ } static void -gaim_gtk_status_box_popdown(GtkGaimStatusBox *box) { +pidgin_status_box_popdown(PidginStatusBox *box) { gtk_widget_hide(box->popup_window); box->popup_in_progress = FALSE; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (box->toggle_button), @@ -1388,18 +1388,18 @@ static void -toggled_cb(GtkWidget *widget, GtkGaimStatusBox *box) +toggled_cb(GtkWidget *widget, PidginStatusBox *box) { if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { if (!box->popup_in_progress) - gaim_gtk_status_box_popup (box); + pidgin_status_box_popup (box); } else { - gaim_gtk_status_box_popdown(box); + pidgin_status_box_popdown(box); } } static void -buddy_icon_set_cb(const char *filename, GtkGaimStatusBox *box) +buddy_icon_set_cb(const char *filename, PidginStatusBox *box) { if (box->account) { @@ -1409,9 +1409,9 @@ if (prplinfo && prplinfo->icon_spec.format) { char *icon = NULL; if (filename) - icon = gaim_gtk_convert_buddy_icon(plug, filename); + icon = pidgin_convert_buddy_icon(plug, filename); gaim_account_set_bool(box->account, "use-global-buddyicon", (filename != NULL)); - gaim_account_set_ui_string(box->account, GAIM_GTK_UI, "non-global-buddyicon-cached-path", icon); + gaim_account_set_ui_string(box->account, PIDGIN_UI, "non-global-buddyicon-cached-path", icon); gaim_account_set_buddy_icon_path(box->account, filename); gaim_account_set_buddy_icon(box->account, icon); g_free(icon); @@ -1429,7 +1429,7 @@ prplinfo->icon_spec.format) { char *icon = NULL; if (filename) - icon = gaim_gtk_convert_buddy_icon(plug, filename); + icon = pidgin_convert_buddy_icon(plug, filename); gaim_account_set_buddy_icon_path(account, filename); gaim_account_set_buddy_icon(account, icon); g_free(icon); @@ -1437,11 +1437,11 @@ } } } - gtk_gaim_status_box_set_buddy_icon(box, filename); + pidgin_status_box_set_buddy_icon(box, filename); } static void -remove_buddy_icon_cb(GtkWidget *w, GtkGaimStatusBox *box) +remove_buddy_icon_cb(GtkWidget *w, PidginStatusBox *box) { if (box->account == NULL) /* The pref-connect callback does the actual work */ @@ -1456,7 +1456,7 @@ static void icon_choose_cb(const char *filename, gpointer data) { - GtkGaimStatusBox *box = data; + PidginStatusBox *box = data; if (filename) { if (box->account == NULL) /* The pref-connect callback does the actual work */ @@ -1472,23 +1472,23 @@ update_buddyicon_cb(const char *name, GaimPrefType type, gconstpointer value, gpointer data) { - buddy_icon_set_cb(value, (GtkGaimStatusBox*) data); + buddy_icon_set_cb(value, (PidginStatusBox*) data); } static void -treeview_activate_current_selection(GtkGaimStatusBox *status_box, GtkTreePath *path) +treeview_activate_current_selection(PidginStatusBox *status_box, GtkTreePath *path) { if (status_box->active_row) gtk_tree_row_reference_free(status_box->active_row); status_box->active_row = gtk_tree_row_reference_new(GTK_TREE_MODEL(status_box->dropdown_store), path); - gaim_gtk_status_box_popdown (status_box); - gtk_gaim_status_box_changed(status_box); + pidgin_status_box_popdown (status_box); + pidgin_status_box_changed(status_box); } static gboolean -treeview_button_release_cb(GtkWidget *widget, GdkEventButton *event, GtkGaimStatusBox *status_box) +treeview_button_release_cb(GtkWidget *widget, GdkEventButton *event, PidginStatusBox *status_box) { GtkTreePath *path = NULL; int ret; @@ -1498,14 +1498,14 @@ if (ewidget == status_box->toggle_button && status_box->popup_in_progress && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (status_box->toggle_button))) { - gaim_gtk_status_box_popdown (status_box); + pidgin_status_box_popdown (status_box); return TRUE; } /* released outside treeview */ if (ewidget != status_box->toggle_button) { - gaim_gtk_status_box_popdown (status_box); + pidgin_status_box_popdown (status_box); return TRUE; } @@ -1528,11 +1528,11 @@ static gboolean treeview_key_press_event(GtkWidget *widget, - GdkEventKey *event, GtkGaimStatusBox *box) + GdkEventKey *event, PidginStatusBox *box) { if (box->popup_in_progress) { if (event->keyval == GDK_Escape) { - gaim_gtk_status_box_popdown(box); + pidgin_status_box_popdown(box); return TRUE; } else if (event->keyval == GDK_Return) { GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(box->tree_view)); @@ -1551,7 +1551,7 @@ } static void -gtk_gaim_status_box_init (GtkGaimStatusBox *status_box) +pidgin_status_box_init (PidginStatusBox *status_box) { GtkCellRenderer *text_rend; GtkCellRenderer *icon_rend; @@ -1644,7 +1644,7 @@ gtk_widget_show(status_box->tree_view); gtk_tree_view_set_search_column(GTK_TREE_VIEW(status_box->tree_view), TEXT_COLUMN); gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(status_box->tree_view), - gaim_gtk_tree_view_search_equal_func, NULL, NULL); + pidgin_tree_view_search_equal_func, NULL, NULL); #if GTK_CHECK_VERSION(2, 6, 0) g_object_set(text_rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL); @@ -1661,7 +1661,7 @@ #endif status_box->vbox = gtk_vbox_new(0, FALSE); - status_box->sw = gaim_gtk_create_imhtml(FALSE, &status_box->imhtml, NULL, NULL); + status_box->sw = pidgin_create_imhtml(FALSE, &status_box->imhtml, NULL, NULL); gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); @@ -1682,7 +1682,7 @@ gtk_imhtml_set_editable(GTK_IMHTML(status_box->imhtml), TRUE); #ifdef USE_GTKSPELL if (gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(status_box->imhtml)); + pidgin_setup_gtkspell(GTK_TEXT_VIEW(status_box->imhtml)); #endif gtk_widget_set_parent(status_box->vbox, GTK_WIDGET(status_box)); gtk_widget_show_all(status_box->vbox); @@ -1704,7 +1704,7 @@ status_box->token_status_account = check_active_accounts_for_identical_statuses(); cache_pixbufs(status_box); - gtk_gaim_status_box_regenerate(status_box); + pidgin_status_box_regenerate(status_box); gaim_signal_connect(gaim_savedstatuses_get_handle(), "savedstatus-changed", status_box, @@ -1727,20 +1727,20 @@ } static void -gtk_gaim_status_box_size_request(GtkWidget *widget, +pidgin_status_box_size_request(GtkWidget *widget, GtkRequisition *requisition) { GtkRequisition box_req; gint border_width = GTK_CONTAINER (widget)->border_width; - gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->toggle_button, requisition); + gtk_widget_size_request(PIDGIN_STATUS_BOX(widget)->toggle_button, requisition); /* Make this icon the same size as other buddy icons in the list; unless it already wants to be bigger */ requisition->height = MAX(requisition->height, 34); requisition->height += border_width * 2; /* If the gtkimhtml is visible, then add some additional padding */ - gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->vbox, &box_req); + gtk_widget_size_request(PIDGIN_STATUS_BOX(widget)->vbox, &box_req); if (box_req.height > 1) requisition->height += box_req.height + border_width * 2; @@ -1788,10 +1788,10 @@ } static void -gtk_gaim_status_box_size_allocate(GtkWidget *widget, +pidgin_status_box_size_allocate(GtkWidget *widget, GtkAllocation *allocation) { - GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX(widget); + PidginStatusBox *status_box = PIDGIN_STATUS_BOX(widget); GtkRequisition req = {0,0}; GtkAllocation parent_alc, box_alc, icon_alc; gint border_width = GTK_CONTAINER (widget)->border_width; @@ -1834,7 +1834,7 @@ if (status_box->icon_size != icon_alc.height) { status_box->icon_size = icon_alc.height; - gtk_gaim_status_box_redisplay_buddy_icon(status_box); + pidgin_status_box_redisplay_buddy_icon(status_box); } gtk_widget_size_allocate(status_box->icon_box, &icon_alc); } @@ -1843,10 +1843,10 @@ } static gboolean -gtk_gaim_status_box_expose_event(GtkWidget *widget, +pidgin_status_box_expose_event(GtkWidget *widget, GdkEventExpose *event) { - GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX(widget); + PidginStatusBox *status_box = PIDGIN_STATUS_BOX(widget); gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->vbox, event); gtk_container_propagate_expose(GTK_CONTAINER(widget), status_box->toggle_button, event); if (status_box->icon_box && status_box->icon_opaque) { @@ -1858,12 +1858,12 @@ } static void -gtk_gaim_status_box_forall(GtkContainer *container, +pidgin_status_box_forall(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) { - GtkGaimStatusBox *status_box = GTK_GAIM_STATUS_BOX (container); + PidginStatusBox *status_box = PIDGIN_STATUS_BOX (container); if (include_internals) { @@ -1876,16 +1876,16 @@ } GtkWidget * -gtk_gaim_status_box_new() +pidgin_status_box_new() { - return g_object_new(GTK_GAIM_TYPE_STATUS_BOX, "account", NULL, + return g_object_new(PIDGIN_TYPE_STATUS_BOX, "account", NULL, "iconsel", TRUE, NULL); } GtkWidget * -gtk_gaim_status_box_new_with_account(GaimAccount *account) +pidgin_status_box_new_with_account(GaimAccount *account) { - return g_object_new(GTK_GAIM_TYPE_STATUS_BOX, "account", account, + return g_object_new(PIDGIN_TYPE_STATUS_BOX, "account", account, "iconsel", TRUE, NULL); } @@ -1893,7 +1893,7 @@ * Add a row to the dropdown menu. * * @param status_box The status box itself. - * @param type A GtkGaimStatusBoxItemType. + * @param type A PidginStatusBoxItemType. * @param pixbuf The icon to associate with this row in the menu. * @param title The title of this item. For the primitive entries, * this is something like "Available" or "Away." For @@ -1910,7 +1910,7 @@ * creation timestamp. */ void -gtk_gaim_status_box_add(GtkGaimStatusBox *status_box, GtkGaimStatusBoxItemType type, GdkPixbuf *pixbuf, const char *title, const char *desc, gpointer data) +pidgin_status_box_add(PidginStatusBox *status_box, PidginStatusBoxItemType type, GdkPixbuf *pixbuf, const char *title, const char *desc, gpointer data) { GtkTreeIter iter; char *text; @@ -1953,7 +1953,7 @@ } void -gtk_gaim_status_box_add_separator(GtkGaimStatusBox *status_box) +pidgin_status_box_add_separator(PidginStatusBox *status_box) { /* Don't do anything unless GTK actually supports * gtk_combo_box_set_row_separator_func */ @@ -1962,31 +1962,31 @@ gtk_list_store_append(status_box->dropdown_store, &iter); gtk_list_store_set(status_box->dropdown_store, &iter, - TYPE_COLUMN, GTK_GAIM_STATUS_BOX_TYPE_SEPARATOR, + TYPE_COLUMN, PIDGIN_STATUS_BOX_TYPE_SEPARATOR, -1); #endif } void -gtk_gaim_status_box_set_network_available(GtkGaimStatusBox *status_box, gboolean available) +pidgin_status_box_set_network_available(PidginStatusBox *status_box, gboolean available) { if (!status_box) return; status_box->network_available = available; - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } void -gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting) +pidgin_status_box_set_connecting(PidginStatusBox *status_box, gboolean connecting) { if (!status_box) return; status_box->connecting = connecting; - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } static void -gtk_gaim_status_box_redisplay_buddy_icon(GtkGaimStatusBox *status_box) +pidgin_status_box_redisplay_buddy_icon(PidginStatusBox *status_box) { /* This is sometimes called before the box is shown, and we will not have a size */ @@ -2016,7 +2016,7 @@ } if (status_box->buddy_icon != NULL) { - status_box->icon_opaque = gaim_gdk_pixbuf_is_opaque(status_box->buddy_icon); + status_box->icon_opaque = pidgin_gdk_pixbuf_is_opaque(status_box->buddy_icon); gtk_image_set_from_pixbuf(GTK_IMAGE(status_box->icon), status_box->buddy_icon); status_box->buddy_icon_hover = gdk_pixbuf_copy(status_box->buddy_icon); do_colorshift(status_box->buddy_icon_hover, status_box->buddy_icon_hover, 32); @@ -2025,22 +2025,22 @@ } void -gtk_gaim_status_box_set_buddy_icon(GtkGaimStatusBox *status_box, const char *filename) +pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, const char *filename) { g_free(status_box->buddy_icon_path); status_box->buddy_icon_path = g_strdup(filename); - gtk_gaim_status_box_redisplay_buddy_icon(status_box); + pidgin_status_box_redisplay_buddy_icon(status_box); } const char* -gtk_gaim_status_box_get_buddy_icon(GtkGaimStatusBox *box) +pidgin_status_box_get_buddy_icon(PidginStatusBox *box) { return box->buddy_icon_path; } void -gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box) +pidgin_status_box_pulse_connecting(PidginStatusBox *status_box) { if (!status_box) return; @@ -2048,17 +2048,17 @@ status_box->connecting_index = 0; else status_box->connecting_index++; - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } static void -gtk_gaim_status_box_pulse_typing(GtkGaimStatusBox *status_box) +pidgin_status_box_pulse_typing(PidginStatusBox *status_box) { if (status_box->typing_index == 3) status_box->typing_index = 0; else status_box->typing_index++; - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } static gboolean @@ -2074,9 +2074,9 @@ } static void -activate_currently_selected_status(GtkGaimStatusBox *status_box) +activate_currently_selected_status(PidginStatusBox *status_box) { - GtkGaimStatusBoxItemType type; + PidginStatusBoxItemType type; gpointer data; gchar *title; GtkTreeIter iter; @@ -2103,13 +2103,13 @@ * accordingly by connecting to the savedstatus-changed * signal and then calling status_menu_refresh_iter() */ - if (type != GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE) + if (type != PIDGIN_STATUS_BOX_TYPE_PRIMITIVE) return; gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, TITLE_COLUMN, &title, -1); - message = gtk_gaim_status_box_get_message(status_box); + message = pidgin_status_box_get_message(status_box); if (!message || !*message) { gtk_widget_hide_all(status_box->vbox); @@ -2266,7 +2266,7 @@ g_free(message); } -static void update_size(GtkGaimStatusBox *status_box) +static void update_size(PidginStatusBox *status_box) { GtkTextBuffer *buffer; GtkTextIter iter; @@ -2307,7 +2307,7 @@ gtk_widget_set_size_request(status_box->vbox, -1, height + GAIM_HIG_BOX_SPACE); } -static void remove_typing_cb(GtkGaimStatusBox *status_box) +static void remove_typing_cb(PidginStatusBox *status_box) { if (status_box->typing == 0) { @@ -2320,14 +2320,14 @@ status_box->typing = 0; activate_currently_selected_status(status_box); - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } -static void gtk_gaim_status_box_changed(GtkGaimStatusBox *status_box) +static void pidgin_status_box_changed(PidginStatusBox *status_box) { GtkTreePath *path = gtk_tree_row_reference_get_path(status_box->active_row); GtkTreeIter iter; - GtkGaimStatusBoxItemType type; + PidginStatusBoxItemType type; gpointer data; GList *accounts = NULL, *node; int active; @@ -2349,7 +2349,7 @@ if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { - if (type == GTK_GAIM_STATUS_BOX_TYPE_POPULAR) + if (type == PIDGIN_STATUS_BOX_TYPE_POPULAR) { GaimSavedStatus *saved; saved = gaim_savedstatus_find_by_creation_time(GPOINTER_TO_INT(data)); @@ -2358,20 +2358,20 @@ return; } - if (type == GTK_GAIM_STATUS_BOX_TYPE_CUSTOM) + if (type == PIDGIN_STATUS_BOX_TYPE_CUSTOM) { GaimSavedStatus *saved_status; saved_status = gaim_savedstatus_get_current(); - gaim_gtk_status_editor_show(FALSE, + pidgin_status_editor_show(FALSE, gaim_savedstatus_is_transient(saved_status) ? saved_status : NULL); status_menu_refresh_iter(status_box); return; } - if (type == GTK_GAIM_STATUS_BOX_TYPE_SAVED) + if (type == PIDGIN_STATUS_BOX_TYPE_SAVED) { - gaim_gtk_status_window_show(); + pidgin_status_window_show(); status_menu_refresh_iter(status_box); return; } @@ -2419,11 +2419,11 @@ return; } } - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } static gint -get_statusbox_index(GtkGaimStatusBox *box, GaimSavedStatus *saved_status) +get_statusbox_index(PidginStatusBox *box, GaimSavedStatus *saved_status) { gint index; @@ -2451,16 +2451,16 @@ static void imhtml_changed_cb(GtkTextBuffer *buffer, void *data) { - GtkGaimStatusBox *status_box = (GtkGaimStatusBox*)data; + PidginStatusBox *status_box = (PidginStatusBox*)data; if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { if (status_box->typing != 0) { - gtk_gaim_status_box_pulse_typing(status_box); + pidgin_status_box_pulse_typing(status_box); g_source_remove(status_box->typing); } status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); } - gtk_gaim_status_box_refresh(status_box); + pidgin_status_box_refresh(status_box); } static void imhtml_format_changed_cb(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons, void *data) @@ -2468,7 +2468,7 @@ imhtml_changed_cb(NULL, data); } -char *gtk_gaim_status_box_get_message(GtkGaimStatusBox *status_box) +char *pidgin_status_box_get_message(PidginStatusBox *status_box) { if (status_box->imhtml_visible) return gtk_imhtml_get_markup(GTK_IMHTML(status_box->imhtml));
--- a/pidgin/gtkstatusbox.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkstatusbox.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -24,8 +24,8 @@ */ -#ifndef __GTK_GAIM_STATUS_BOX_H__ -#define __GTK_GAIM_STATUS_BOX_H__ +#ifndef __PIDGIN_STATUS_BOX_H__ +#define __PIDGIN_STATUS_BOX_H__ #include <gtk/gtk.h> #include "gtkimhtml.h" @@ -37,12 +37,12 @@ G_BEGIN_DECLS -#define GTK_GAIM_TYPE_STATUS_BOX (gtk_gaim_status_box_get_type ()) -#define GTK_GAIM_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBox)) -#define GTK_GAIM_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) -#define GTK_GAIM_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_GAIM_TYPE_STATUS_BOX)) -#define GTK_GAIM_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), GTK_GAIM_TYPE_STATUS_BOX)) -#define GTK_GAIM_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), GTK_GAIM_TYPE_STATUS_BOX, GtkGaimStatusBoxClass)) +#define PIDGIN_TYPE_STATUS_BOX (pidgin_status_box_get_type ()) +#define PIDGIN_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PIDGIN_TYPE_STATUS_BOX, PidginStatusBox)) +#define PIDGIN_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), PIDGIN_TYPE_STATUS_BOX, PidginStatusBoxClass)) +#define PIDGIN_IS_STATUS_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PIDGIN_TYPE_STATUS_BOX)) +#define PIDGIN_IS_STATUS_BOX_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), PIDGIN_TYPE_STATUS_BOX)) +#define PIDGIN_STATUS_BOX_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), PIDGIN_TYPE_STATUS_BOX, PidginStatusBoxClass)) /** * This is a hidden field in the GtkStatusBox that identifies the @@ -52,18 +52,18 @@ */ typedef enum { - GTK_GAIM_STATUS_BOX_TYPE_SEPARATOR, - GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE, - GTK_GAIM_STATUS_BOX_TYPE_POPULAR, - GTK_GAIM_STATUS_BOX_TYPE_CUSTOM, - GTK_GAIM_STATUS_BOX_TYPE_SAVED, - GTK_GAIM_STATUS_BOX_NUM_TYPES -} GtkGaimStatusBoxItemType; + PIDGIN_STATUS_BOX_TYPE_SEPARATOR, + PIDGIN_STATUS_BOX_TYPE_PRIMITIVE, + PIDGIN_STATUS_BOX_TYPE_POPULAR, + PIDGIN_STATUS_BOX_TYPE_CUSTOM, + PIDGIN_STATUS_BOX_TYPE_SAVED, + PIDGIN_STATUS_BOX_NUM_TYPES +} PidginStatusBoxItemType; -typedef struct _GtkGaimStatusBox GtkGaimStatusBox; -typedef struct _GtkGaimStatusBoxClass GtkGaimStatusBoxClass; +typedef struct _PidginStatusBox PidginStatusBox; +typedef struct _PidginStatusBoxClass PidginStatusBoxClass; -struct _GtkGaimStatusBox +struct _PidginStatusBox { GtkContainer parent_instance; @@ -140,7 +140,7 @@ GtkTreeRowReference *active_row; }; -struct _GtkGaimStatusBoxClass +struct _PidginStatusBoxClass { GtkContainerClass parent_class; @@ -155,33 +155,33 @@ }; -GType gtk_gaim_status_box_get_type (void) G_GNUC_CONST; -GtkWidget *gtk_gaim_status_box_new (void); -GtkWidget *gtk_gaim_status_box_new_with_account (GaimAccount *); +GType pidgin_status_box_get_type (void) G_GNUC_CONST; +GtkWidget *pidgin_status_box_new (void); +GtkWidget *pidgin_status_box_new_with_account (GaimAccount *); void -gtk_gaim_status_box_add(GtkGaimStatusBox *status_box, GtkGaimStatusBoxItemType type, GdkPixbuf *pixbuf, const char *text, const char *sec_text, gpointer data); +pidgin_status_box_add(PidginStatusBox *status_box, PidginStatusBoxItemType type, GdkPixbuf *pixbuf, const char *text, const char *sec_text, gpointer data); void -gtk_gaim_status_box_add_separator(GtkGaimStatusBox *status_box); +pidgin_status_box_add_separator(PidginStatusBox *status_box); void -gtk_gaim_status_box_set_network_available(GtkGaimStatusBox *status_box, gboolean available); +pidgin_status_box_set_network_available(PidginStatusBox *status_box, gboolean available); void -gtk_gaim_status_box_set_connecting(GtkGaimStatusBox *status_box, gboolean connecting); +pidgin_status_box_set_connecting(PidginStatusBox *status_box, gboolean connecting); void -gtk_gaim_status_box_pulse_connecting(GtkGaimStatusBox *status_box); +pidgin_status_box_pulse_connecting(PidginStatusBox *status_box); void -gtk_gaim_status_box_set_buddy_icon(GtkGaimStatusBox *status_box, const char *filename); +pidgin_status_box_set_buddy_icon(PidginStatusBox *status_box, const char *filename); const char * -gtk_gaim_status_box_get_buddy_icon(GtkGaimStatusBox *status_box); +pidgin_status_box_get_buddy_icon(PidginStatusBox *status_box); -char *gtk_gaim_status_box_get_message(GtkGaimStatusBox *status_box); +char *pidgin_status_box_get_message(PidginStatusBox *status_box); G_END_DECLS -#endif /* __GTK_GAIM_GTK_STATUS_COMBO_BOX_H__ */ +#endif /* __GTK_PIDGIN_STATUS_COMBO_BOX_H__ */
--- a/pidgin/gtkthemes.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkthemes.c Mon Feb 05 03:37:27 2007 +0000 @@ -21,7 +21,7 @@ * */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" #include "debug.h" @@ -36,7 +36,7 @@ GSList *smiley_themes = NULL; struct smiley_theme *current_smiley_theme; -gboolean gaim_gtkthemes_smileys_disabled() +gboolean pidginthemes_smileys_disabled() { if (!current_smiley_theme) return 1; @@ -44,7 +44,7 @@ return strcmp(current_smiley_theme->name, "none") == 0; } -void gaim_gtkthemes_smiley_themeize(GtkWidget *imhtml) +void pidginthemes_smiley_themeize(GtkWidget *imhtml) { struct smiley_list *list; if (!current_smiley_theme) @@ -63,7 +63,7 @@ } } -void gaim_gtkthemes_load_smiley_theme(const char *file, gboolean load) +void pidginthemes_load_smiley_theme(const char *file, gboolean load) { FILE *f = g_fopen(file, "r"); char buf[256]; @@ -249,14 +249,14 @@ GaimConversation *conv = cnv->data; if (GAIM_IS_GTK_CONVERSATION(conv)) { - gaim_gtkthemes_smiley_themeize(GAIM_GTK_CONVERSATION(conv)->imhtml); - gaim_gtkthemes_smiley_themeize(GAIM_GTK_CONVERSATION(conv)->entry); + pidginthemes_smiley_themeize(PIDGIN_CONVERSATION(conv)->imhtml); + pidginthemes_smiley_themeize(PIDGIN_CONVERSATION(conv)->entry); } } } } -void gaim_gtkthemes_smiley_theme_probe() +void pidginthemes_smiley_theme_probe() { GDir *dir; const gchar *file; @@ -277,7 +277,7 @@ * We set the second argument to FALSE so that it doesn't load * the theme yet. */ - gaim_gtkthemes_load_smiley_theme(path, FALSE); + pidginthemes_load_smiley_theme(path, FALSE); g_free(path); } g_dir_close(dir); @@ -288,7 +288,7 @@ } } -GSList *gaim_gtkthemes_get_proto_smileys(const char *id) { +GSList *pidginthemes_get_proto_smileys(const char *id) { GaimPlugin *proto; struct smiley_list *list, *def; @@ -314,18 +314,18 @@ return list ? list->smileys : def->smileys; } -void gaim_gtkthemes_init() +void pidginthemes_init() { GSList *l; const char *current_theme = gaim_prefs_get_string("/gaim/gtk/smileys/theme"); - gaim_gtkthemes_smiley_theme_probe(); + pidginthemes_smiley_theme_probe(); for (l = smiley_themes; l; l = l->next) { struct smiley_theme *smile = l->data; if (smile->name && strcmp(current_theme, smile->name) == 0) { - gaim_gtkthemes_load_smiley_theme(smile->path, TRUE); + pidginthemes_load_smiley_theme(smile->path, TRUE); break; } } @@ -333,7 +333,7 @@ /* If we still don't have a smiley theme, choose the first one */ if (!current_smiley_theme && smiley_themes) { struct smiley_theme *smile = smiley_themes->data; - gaim_gtkthemes_load_smiley_theme(smile->path, TRUE); + pidginthemes_load_smiley_theme(smile->path, TRUE); } }
--- a/pidgin/gtkthemes.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkthemes.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,8 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKTHEMES_H_ -#define _GAIM_GTKTHEMES_H_ +#ifndef _PIDGINTHEMES_H_ +#define _PIDGINTHEMES_H_ struct smiley_list { char *sml; @@ -44,10 +44,10 @@ extern struct smiley_theme *current_smiley_theme; extern GSList *smiley_themes; -void gaim_gtkthemes_init(void); -gboolean gaim_gtkthemes_smileys_disabled(void); -void gaim_gtkthemes_smiley_themeize(GtkWidget *); -void gaim_gtkthemes_smiley_theme_probe(void); -void gaim_gtkthemes_load_smiley_theme(const char *file, gboolean load); -GSList *gaim_gtkthemes_get_proto_smileys(const char *id); -#endif /* _GAIM_GTKDIALOGS_H_ */ +void pidginthemes_init(void); +gboolean pidginthemes_smileys_disabled(void); +void pidginthemes_smiley_themeize(GtkWidget *); +void pidginthemes_smiley_theme_probe(void); +void pidginthemes_load_smiley_theme(const char *file, gboolean load); +GSList *pidginthemes_get_proto_smileys(const char *id); +#endif /* _PIDGINDIALOGS_H_ */
--- a/pidgin/gtkutils.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkutils.c Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #ifndef _WIN32 # include <X11/Xlib.h> @@ -87,7 +87,7 @@ }; void -gaim_setup_imhtml(GtkWidget *imhtml) +pidgin_setup_imhtml(GtkWidget *imhtml) { g_return_if_fail(imhtml != NULL); g_return_if_fail(GTK_IS_IMHTML(imhtml)); @@ -95,7 +95,7 @@ g_signal_connect(G_OBJECT(imhtml), "url_clicked", G_CALLBACK(url_clicked_cb), NULL); - gaim_gtkthemes_smiley_themeize(imhtml); + pidginthemes_smiley_themeize(imhtml); gtk_imhtml_set_funcs(GTK_IMHTML(imhtml), >kimhtml_cbs); @@ -122,7 +122,7 @@ } GtkWidget * -gaim_gtk_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret) +pidgin_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret) { GtkWidget *frame; GtkWidget *imhtml; @@ -162,7 +162,7 @@ gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(imhtml), GTK_WRAP_WORD_CHAR); #ifdef USE_GTKSPELL if (editable && gaim_prefs_get_bool("/gaim/gtk/conversations/spellcheck")) - gaim_gtk_setup_gtkspell(GTK_TEXT_VIEW(imhtml)); + pidgin_setup_gtkspell(GTK_TEXT_VIEW(imhtml)); #endif gtk_widget_show(imhtml); @@ -170,7 +170,7 @@ gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(toolbar), imhtml); gtk_imhtmltoolbar_associate_smileys(GTK_IMHTMLTOOLBAR(toolbar), "default"); } - gaim_setup_imhtml(imhtml); + pidgin_setup_imhtml(imhtml); gtk_container_add(GTK_CONTAINER(sw), imhtml); @@ -187,7 +187,7 @@ } void -gaim_gtk_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog) +pidgin_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog) { const char *text = gtk_entry_get_text(GTK_ENTRY(entry)); gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog), GTK_RESPONSE_OK, @@ -195,7 +195,7 @@ } void -gaim_gtk_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle) +pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle) { gboolean sensitivity; @@ -208,7 +208,7 @@ } void -gaim_gtk_toggle_sensitive_array(GtkWidget *w, GPtrArray *data) +pidgin_toggle_sensitive_array(GtkWidget *w, GPtrArray *data) { gboolean sensitivity; gpointer element; @@ -226,7 +226,7 @@ } void -gaim_gtk_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle) +pidgin_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle) { if (to_toggle == NULL) return; @@ -237,7 +237,7 @@ gtk_widget_show(to_toggle); } -void gaim_separator(GtkWidget *menu) +void pidgin_separator(GtkWidget *menu) { GtkWidget *menuitem; @@ -246,7 +246,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); } -GtkWidget *gaim_new_item(GtkWidget *menu, const char *str) +GtkWidget *pidgin_new_item(GtkWidget *menu, const char *str) { GtkWidget *menuitem; GtkWidget *label; @@ -265,11 +265,11 @@ gtk_widget_add_accelerator(menuitem, "activate", accel, str[0], GDK_MOD1_MASK, GTK_ACCEL_LOCKED); */ - gaim_set_accessible_label (menuitem, label); + pidgin_set_accessible_label (menuitem, label); return menuitem; } -GtkWidget *gaim_new_check_item(GtkWidget *menu, const char *str, +GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, GtkSignalFunc sf, gpointer data, gboolean checked) { GtkWidget *menuitem; @@ -289,7 +289,7 @@ } GtkWidget * -gaim_pixbuf_toolbar_button_from_stock(const char *icon) +pidgin_pixbuf_toolbar_button_from_stock(const char *icon) { GtkWidget *button, *image, *bbox; @@ -309,14 +309,14 @@ } GtkWidget * -gaim_pixbuf_button_from_stock(const char *text, const char *icon, - GaimButtonOrientation style) +pidgin_pixbuf_button_from_stock(const char *text, const char *icon, + PidginButtonOrientation style) { GtkWidget *button, *image, *label, *bbox, *ibox, *lbox = NULL; button = gtk_button_new(); - if (style == GAIM_BUTTON_HORIZONTAL) { + if (style == PIDGIN_BUTTON_HORIZONTAL) { bbox = gtk_hbox_new(FALSE, 0); ibox = gtk_hbox_new(FALSE, 0); if (text) @@ -342,7 +342,7 @@ gtk_label_set_text_with_mnemonic(GTK_LABEL(label), text); gtk_label_set_mnemonic_widget(GTK_LABEL(label), button); gtk_box_pack_start(GTK_BOX(lbox), label, FALSE, TRUE, 0); - gaim_set_accessible_label (button, label); + pidgin_set_accessible_label (button, label); } gtk_widget_show_all(bbox); @@ -351,7 +351,7 @@ } -GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod) +GtkWidget *pidgin_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod) { GtkWidget *menuitem; /* @@ -395,7 +395,7 @@ } GtkWidget * -gaim_gtk_make_frame(GtkWidget *parent, const char *title) +pidgin_make_frame(GtkWidget *parent, const char *title) { GtkWidget *vbox, *label, *hbox; char *labeltitle; @@ -413,7 +413,7 @@ gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); - gaim_set_accessible_label (vbox, label); + pidgin_set_accessible_label (vbox, label); hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); @@ -450,7 +450,7 @@ } GtkWidget * -gaim_gtk_protocol_option_menu_new(const char *id, GCallback cb, +pidgin_protocol_option_menu_new(const char *id, GCallback cb, gpointer user_data) { GaimPluginProtocolInfo *prpl_info; @@ -527,7 +527,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); - gaim_set_accessible_label (item, label); + pidgin_set_accessible_label (item, label); if (id != NULL && !strcmp(plugin->info->id, id)) selected_index = i; @@ -547,7 +547,7 @@ } GaimAccount * -gaim_gtk_account_option_menu_get_selected(GtkWidget *optmenu) +pidgin_account_option_menu_get_selected(GtkWidget *optmenu) { GtkWidget *menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(optmenu)); GtkWidget *item = gtk_menu_get_active(GTK_MENU(menu)); @@ -684,7 +684,7 @@ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show(item); - gaim_set_accessible_label (item, label); + pidgin_set_accessible_label (item, label); if (default_account != NULL && account == default_account) selected_index = i; @@ -745,7 +745,7 @@ } void -gaim_gtk_account_option_menu_set_selected(GtkWidget *optmenu, GaimAccount *account) +pidgin_account_option_menu_set_selected(GtkWidget *optmenu, GaimAccount *account) { GtkWidget *menu; GtkWidget *item; @@ -772,7 +772,7 @@ } GtkWidget * -gaim_gtk_account_option_menu_new(GaimAccount *default_account, +pidgin_account_option_menu_new(GaimAccount *default_account, gboolean show_all, GCallback cb, GaimFilterAccountFunc filter_func, gpointer user_data) @@ -817,7 +817,7 @@ } gboolean -gaim_gtk_check_if_dir(const char *path, GtkFileSelection *filesel) +pidgin_check_if_dir(const char *path, GtkFileSelection *filesel) { char *dirname; @@ -837,7 +837,7 @@ } void -gaim_gtk_setup_gtkspell(GtkTextView *textview) +pidgin_setup_gtkspell(GtkTextView *textview) { #ifdef USE_GTKSPELL GError *error = NULL; @@ -856,7 +856,7 @@ } void -gaim_gtk_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, +pidgin_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, GdkModifierType arg2, GClosure *arg3, gpointer data) { @@ -864,12 +864,12 @@ "accel changed, scheduling save.\n"); if (!accels_save_timer) - accels_save_timer = g_timeout_add(5000, gaim_gtk_save_accels, + accels_save_timer = g_timeout_add(5000, pidgin_save_accels, NULL); } gboolean -gaim_gtk_save_accels(gpointer data) +pidgin_save_accels(gpointer data) { char *filename = NULL; @@ -884,7 +884,7 @@ } void -gaim_gtk_load_accels() +pidgin_load_accels() { char *filename = NULL; @@ -895,7 +895,7 @@ } gboolean -gaim_gtk_parse_x_im_contact(const char *msg, gboolean all_accounts, +pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts, GaimAccount **ret_account, char **ret_protocol, char **ret_username, char **ret_alias) { @@ -1078,7 +1078,7 @@ } void -gaim_set_accessible_label (GtkWidget *w, GtkWidget *l) +pidgin_set_accessible_label (GtkWidget *w, GtkWidget *l) { AtkObject *acc, *label; AtkObject *rel_obj[1]; @@ -1115,7 +1115,7 @@ #if GTK_CHECK_VERSION(2,2,0) static void -gaim_gtk_menu_position_func(GtkMenu *menu, +pidgin_menu_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, @@ -1266,7 +1266,7 @@ #endif void -gaim_gtk_treeview_popup_menu_position_func(GtkMenu *menu, +pidgin_treeview_popup_menu_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, @@ -1286,7 +1286,7 @@ *x += rect.x+rect.width; *y += rect.y+rect.height+ythickness; #if GTK_CHECK_VERSION(2,2,0) - gaim_gtk_menu_position_func (menu, x, y, push_in, data); + pidgin_menu_position_func (menu, x, y, push_in, data); #endif } @@ -1309,7 +1309,7 @@ struct stat st; GError *err = NULL; GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkTextIter iter; int id; switch (choice) { @@ -1327,14 +1327,14 @@ return; } - gaim_gtk_set_custom_buddy_icon(data->account, data->who, data->filename); + pidgin_set_custom_buddy_icon(data->account, data->who, data->filename); break; case DND_FILE_TRANSFER: serv_send_file(gaim_account_get_connection(data->account), data->who, data->filename); break; case DND_IM_IMAGE: conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, data->account, data->who); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); if (!g_file_get_contents(data->filename, &filedata, &size, &err)) { @@ -1385,7 +1385,7 @@ } void -gaim_dnd_file_manage(GtkSelectionData *sd, GaimAccount *account, const char *who) +pidgin_dnd_file_manage(GtkSelectionData *sd, GaimAccount *account, const char *who) { GList *tmp; GdkPixbuf *pb; @@ -1503,11 +1503,11 @@ dtype = gaim_desktop_item_get_entry_type(item); switch (dtype) { GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; case GAIM_DESKTOP_ITEM_TYPE_LINK: conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, who); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gtk_imhtml_insert_link(GTK_IMHTML(gtkconv->entry), gtk_text_buffer_get_insert(GTK_IMHTML(gtkconv->entry)->text_buffer), gaim_desktop_item_get_string(item, "URL"), itemname); @@ -1535,7 +1535,7 @@ g_list_free(files); } -void gaim_gtk_buddy_icon_get_scale_size(GdkPixbuf *buf, GaimBuddyIconSpec *spec, GaimIconScaleRules rules, int *width, int *height) +void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, GaimBuddyIconSpec *spec, GaimIconScaleRules rules, int *width, int *height) { *width = gdk_pixbuf_get_width(buf); *height = gdk_pixbuf_get_height(buf); @@ -1553,7 +1553,7 @@ } GdkPixbuf * -gaim_gtk_create_prpl_icon(GaimAccount *account, PidginPrplIconSize size) +pidgin_create_prpl_icon(GaimAccount *account, PidginPrplIconSize size) { GaimPlugin *prpl; GaimPluginProtocolInfo *prpl_info; @@ -1644,11 +1644,11 @@ } GdkPixbuf * -gaim_gtk_create_prpl_icon_with_status(GaimAccount *account, GaimStatusType *status_type, double scale_factor) +pidgin_create_prpl_icon_with_status(GaimAccount *account, GaimStatusType *status_type, double scale_factor) { GdkPixbuf *pixbuf; - pixbuf = gaim_gtk_create_prpl_icon(account, scale_factor); + pixbuf = pidgin_create_prpl_icon(account, scale_factor); if (pixbuf == NULL) return NULL; @@ -1662,7 +1662,7 @@ } GdkPixbuf * -gaim_gtk_create_gaim_icon_with_status(GaimStatusPrimitive primitive, double scale_factor) +pidgin_create_gaim_icon_with_status(GaimStatusPrimitive primitive, double scale_factor) { gchar *filename; GdkPixbuf *orig, *pixbuf; @@ -1694,11 +1694,11 @@ } void -gaim_gtk_append_menu_action(GtkWidget *menu, GaimMenuAction *act, +pidgin_append_menu_action(GtkWidget *menu, GaimMenuAction *act, gpointer object) { if (act == NULL) { - gaim_separator(menu); + pidgin_separator(menu); } else { GtkWidget *menuitem; @@ -1742,7 +1742,7 @@ for (l = act->children; l; l = l->next) { GaimMenuAction *act = (GaimMenuAction *)l->data; - gaim_gtk_append_menu_action(submenu, act, object); + pidgin_append_menu_action(submenu, act, object); } g_list_free(act->children); act->children = NULL; @@ -1763,13 +1763,13 @@ gboolean completion_started; gboolean all; -} GaimGtkCompletionData; +} PidginCompletionData; #endif #ifndef NEW_STYLE_COMPLETION static gboolean completion_entry_event(GtkEditable *entry, GdkEventKey *event, - GaimGtkCompletionData *data) + PidginCompletionData *data) { int pos, end_pos; @@ -1838,7 +1838,7 @@ } static void -destroy_completion_data(GtkWidget *w, GaimGtkCompletionData *data) +destroy_completion_data(GtkWidget *w, PidginCompletionData *data) { g_list_foreach(data->completion->items, (GFunc)g_free, NULL); g_completion_free(data->completion); @@ -1903,7 +1903,7 @@ if (optmenu != NULL) { GList *items; guint index = 0; - gaim_gtk_account_option_menu_set_selected(optmenu, account); + pidgin_account_option_menu_set_selected(optmenu, account); items = GTK_MENU_SHELL(gtk_option_menu_get_menu(GTK_OPTION_MENU(optmenu)))->children; do { @@ -2061,7 +2061,7 @@ } #else static void -add_completion_list(GaimGtkCompletionData *data) +add_completion_list(PidginCompletionData *data) { GaimBlistNode *gnode, *cnode, *bnode; GCompletion *completion; @@ -2122,7 +2122,7 @@ } void -gaim_gtk_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *accountopt, gboolean all) +pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *accountopt, gboolean all) { gpointer cb_data = NULL; @@ -2161,9 +2161,9 @@ gtk_entry_completion_set_text_column(completion, 0); #else /* !NEW_STYLE_COMPLETION */ - GaimGtkCompletionData *data; - - data = g_new0(GaimGtkCompletionData, 1); + PidginCompletionData *data; + + data = g_new0(PidginCompletionData, 1); data->completion = g_completion_new(NULL); data->all = all; @@ -2196,7 +2196,7 @@ g_signal_connect(G_OBJECT(entry), "destroy", G_CALLBACK(screenname_autocomplete_destroyed_cb), NULL); } -void gaim_gtk_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) +void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type) { GdkCursor *cursor; @@ -2215,7 +2215,7 @@ #endif } -void gaim_gtk_clear_cursor(GtkWidget *widget) +void pidgin_clear_cursor(GtkWidget *widget) { g_return_if_fail(widget != NULL); if (widget->window == NULL) @@ -2283,7 +2283,7 @@ GTK_FILE_SELECTION(dialog->icon_filesel))); /* If they typed in a directory, change there */ - if (gaim_gtk_check_if_dir(filename, + if (pidgin_check_if_dir(filename, GTK_FILE_SELECTION(dialog->icon_filesel))) { g_free(filename); @@ -2371,7 +2371,7 @@ } -GtkWidget *gaim_gtk_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char *, gpointer), gpointer data) { +GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char *, gpointer), gpointer data) { struct _icon_chooser *dialog = g_new0(struct _icon_chooser, 1); #if !GTK_CHECK_VERSION(2,4,0) /* FILECHOOSER */ @@ -2467,7 +2467,7 @@ #endif char * -gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path) +pidgin_convert_buddy_icon(GaimPlugin *plugin, const char *path) { GaimPluginProtocolInfo *prpl_info; #if GTK_CHECK_VERSION(2,2,0) @@ -2825,7 +2825,7 @@ } #endif /* ! Gtk 2.6.0 */ -void gaim_gtk_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename) +void pidgin_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename) { GaimConversation *conv; GaimBuddy *buddy; @@ -2850,7 +2850,7 @@ if (filename) { char *newfile; - newfile = gaim_gtk_convert_buddy_icon(gaim_find_prpl(gaim_account_get_protocol_id(account)), + newfile = pidgin_convert_buddy_icon(gaim_find_prpl(gaim_account_get_protocol_id(account)), filename); path = gaim_buddy_icons_get_full_path(newfile); g_free(newfile); @@ -2869,7 +2869,7 @@ gaim_blist_update_buddy_icon(buddy); } -char *gaim_gtk_make_pretty_arrows(const char *str) +char *pidgin_make_pretty_arrows(const char *str) { char *ret; char **split = g_strsplit(str, "->", -1); @@ -2884,12 +2884,12 @@ return ret; } -void gaim_gtk_set_urgent(GtkWindow *window, gboolean urgent) +void pidgin_set_urgent(GtkWindow *window, gboolean urgent) { #if GTK_CHECK_VERSION(2,8,0) gtk_window_set_urgency_hint(window, urgent); #elif defined _WIN32 - gtkwgaim_window_flash(window, urgent); + winpidgin_window_flash(window, urgent); #else GdkWindow *gdkwin; XWMHints *hints; @@ -2918,7 +2918,7 @@ GSList *minidialogs = NULL; static void * -gaim_gtk_utils_get_handle() +pidgin_utils_get_handle() { static int handle; @@ -2940,7 +2940,7 @@ minidialogs = g_slist_remove(minidialogs, widget); } -void *gaim_gtk_make_mini_dialog(GaimConnection *gc, const char *icon_name, +void *pidgin_make_mini_dialog(GaimConnection *gc, const char *icon_name, const char *primary, const char *secondary, void *user_data, ...) { @@ -2971,7 +2971,7 @@ if (first_call) { first_call = FALSE; gaim_signal_connect(gaim_connections_get_handle(), "signed-off", - gaim_gtk_utils_get_handle(), + pidgin_utils_get_handle(), GAIM_CALLBACK(connection_signed_off_cb), NULL); } @@ -3039,7 +3039,7 @@ * is to add an extra column to the GtkTreeModel. And this function is * used rarely, so it shouldn't matter TOO much. */ -gboolean gaim_gtk_tree_view_search_equal_func(GtkTreeModel *model, gint column, +gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer data) { gchar *enteredstring; @@ -3132,7 +3132,7 @@ } -gboolean gaim_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf) { +gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf) { int width, height, rowstride, i; unsigned char *pixels; unsigned char *row;
--- a/pidgin/gtkutils.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkutils.h Mon Feb 05 03:37:27 2007 +0000 @@ -4,7 +4,7 @@ * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,29 +22,29 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKUTILS_H_ -#define _GAIM_GTKUTILS_H_ +#ifndef _PIDGINUTILS_H_ +#define _PIDGINUTILS_H_ #include "gtkconv.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "prpl.h" #include "util.h" typedef enum { - GAIM_BUTTON_HORIZONTAL, - GAIM_BUTTON_VERTICAL + PIDGIN_BUTTON_HORIZONTAL, + PIDGIN_BUTTON_VERTICAL -} GaimButtonOrientation; +} PidginButtonOrientation; typedef enum { - GAIM_BUTTON_NONE = 0, - GAIM_BUTTON_TEXT, - GAIM_BUTTON_IMAGE, - GAIM_BUTTON_TEXT_IMAGE + PIDGIN_BUTTON_NONE = 0, + PIDGIN_BUTTON_TEXT, + PIDGIN_BUTTON_IMAGE, + PIDGIN_BUTTON_TEXT_IMAGE -} GaimButtonStyle; +} PidginButtonStyle; typedef enum { @@ -56,12 +56,12 @@ #ifndef _WIN32 typedef enum { - GAIM_BROWSER_DEFAULT = 0, - GAIM_BROWSER_CURRENT, - GAIM_BROWSER_NEW_WINDOW, - GAIM_BROWSER_NEW_TAB + PIDGIN_BROWSER_DEFAULT = 0, + PIDGIN_BROWSER_CURRENT, + PIDGIN_BROWSER_NEW_WINDOW, + PIDGIN_BROWSER_NEW_TAB -} GaimBrowserPlace; +} PidginBrowserPlace; #endif /* _WIN32 */ /** @@ -70,7 +70,7 @@ * * @param imhtml The gtkimhtml widget to setup. */ -void gaim_setup_imhtml(GtkWidget *imhtml); +void pidgin_setup_imhtml(GtkWidget *imhtml); /** * Create an GtkIMHtml widget and associated GtkIMHtmlToolbar widget. This @@ -90,7 +90,7 @@ * widget which contains the imhtml. * @return The GtkFrame containing the toolbar and imhtml. */ -GtkWidget *gaim_gtk_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); +GtkWidget *pidgin_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); /** * Toggles the sensitivity of a widget. @@ -98,7 +98,7 @@ * @param widget @c NULL. Used for signal handlers. * @param to_toggle The widget to toggle. */ -void gaim_gtk_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); +void pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); /** * Checks if text has been entered into a GtkTextEntry widget. If @@ -108,7 +108,7 @@ * @param entry The text entry widget. * @param dialog The dialog containing the text entry widget. */ -void gaim_gtk_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog); +void pidgin_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog); /** * Toggles the sensitivity of all widgets in a pointer array. @@ -116,7 +116,7 @@ * @param w @c NULL. Used for signal handlers. * @param data The array containing the widgets to toggle. */ -void gaim_gtk_toggle_sensitive_array(GtkWidget *w, GPtrArray *data); +void pidgin_toggle_sensitive_array(GtkWidget *w, GPtrArray *data); /** * Toggles the visibility of a widget. @@ -124,14 +124,14 @@ * @param widget @c NULL. Used for signal handlers. * @param to_toggle The widget to toggle. */ -void gaim_gtk_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle); +void pidgin_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle); /** * Adds a separator to a menu. * * @param menu The menu to add a separator to. */ -void gaim_separator(GtkWidget *menu); +void pidgin_separator(GtkWidget *menu); /** * Creates a menu item. @@ -141,7 +141,7 @@ * * @return The newly created menu item. */ -GtkWidget *gaim_new_item(GtkWidget *menu, const char *str); +GtkWidget *pidgin_new_item(GtkWidget *menu, const char *str); /** * Creates a check menu item. @@ -154,7 +154,7 @@ * * @return The newly created menu item. */ -GtkWidget *gaim_new_check_item(GtkWidget *menu, const char *str, +GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, GtkSignalFunc sf, gpointer data, gboolean checked); /** @@ -172,7 +172,7 @@ * * @return The newly created menu item. */ -GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, +GtkWidget *pidgin_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod); @@ -186,8 +186,8 @@ * * @return The button. */ -GtkWidget *gaim_pixbuf_button_from_stock(const char *text, const char *icon, - GaimButtonOrientation style); +GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon, + PidginButtonOrientation style); /** * Creates a toolbar button with the stock icon. @@ -196,7 +196,7 @@ * * @return The button. */ -GtkWidget *gaim_pixbuf_toolbar_button_from_stock(const char *stock); +GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock); /** * Creates a HIG preferences frame. @@ -206,7 +206,7 @@ * * @return The vbox to put things into. */ -GtkWidget *gaim_gtk_make_frame(GtkWidget *parent, const char *title); +GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title); /** * Creates a drop-down option menu filled with protocols. @@ -217,7 +217,7 @@ * * @return The drop-down option menu. */ -GtkWidget *gaim_gtk_protocol_option_menu_new(const char *id, +GtkWidget *pidgin_protocol_option_menu_new(const char *id, GCallback cb, gpointer user_data); @@ -234,7 +234,7 @@ * * @return The drop-down option menu. */ -GtkWidget *gaim_gtk_account_option_menu_new(GaimAccount *default_account, +GtkWidget *pidgin_account_option_menu_new(GaimAccount *default_account, gboolean show_all, GCallback cb, GaimFilterAccountFunc filter_func, gpointer user_data); @@ -242,30 +242,30 @@ * Gets the currently selected account from an account drop down box. * * @param optmenu The GtkOptionMenu created by - * gaim_gtk_account_option_menu_new. + * pidgin_account_option_menu_new. * @return Returns the GaimAccount that is currently selected. */ -GaimAccount *gaim_gtk_account_option_menu_get_selected(GtkWidget *optmenu); +GaimAccount *pidgin_account_option_menu_get_selected(GtkWidget *optmenu); /** * Sets the currently selected account for an account drop down box. * * @param optmenu The GtkOptionMenu created by - * gaim_gtk_account_option_menu_new. + * pidgin_account_option_menu_new. * @param account The GaimAccount to select. */ -void gaim_gtk_account_option_menu_set_selected(GtkWidget *optmenu, GaimAccount *account); +void pidgin_account_option_menu_set_selected(GtkWidget *optmenu, GaimAccount *account); /** * Add autocompletion of screenames to an entry. * * @param entry The GtkEntry on which to setup autocomplete. - * @param optmenu A menu for accounts, returned by gaim_gtk_account_option_menu_new(). + * @param optmenu A menu for accounts, returned by pidgin_account_option_menu_new(). * If @a optmenu is not @c NULL, it'll be updated when a screenname is chosen * from the autocomplete list. * @param all Whether to include screennames from disconnected accounts. */ -void gaim_gtk_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, gboolean all); +void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, gboolean all); /** * Check if the given path is a directory or not. If it is, then modify @@ -277,34 +277,34 @@ * * @return TRUE if given path is a directory, FALSE otherwise. */ -gboolean gaim_gtk_check_if_dir(const char *path, GtkFileSelection *filesel); +gboolean pidgin_check_if_dir(const char *path, GtkFileSelection *filesel); /** * Sets up GtkSpell for the given GtkTextView, reporting errors * if encountered. * - * This does nothing if Gaim is not compiled with GtkSpell support. + * This does nothing if Pidgin is not compiled with GtkSpell support. * * @param textview The textview widget to setup spellchecking for. */ -void gaim_gtk_setup_gtkspell(GtkTextView *textview); +void pidgin_setup_gtkspell(GtkTextView *textview); /** * Save menu accelerators callback */ -void gaim_gtk_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, +void pidgin_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, GdkModifierType arg2, GClosure *arg3, gpointer data); /** * Save menu accelerators */ -gboolean gaim_gtk_save_accels(gpointer data); +gboolean pidgin_save_accels(gpointer data); /** * Load menu accelerators */ -void gaim_gtk_load_accels(void); +void pidgin_load_accels(void); /** * Parses an application/x-im-contact MIME message and returns the @@ -322,7 +322,7 @@ * @return TRUE if the message was parsed for the minimum necessary data. * FALSE otherwise. */ -gboolean gaim_gtk_parse_x_im_contact(const char *msg, gboolean all_accounts, +gboolean pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts, GaimAccount **ret_account, char **ret_protocol, char **ret_username, char **ret_alias); @@ -334,7 +334,7 @@ * @param w The widget that we want to name. * @param l A GtkLabel that we want to use as the ATK name for the widget. */ -void gaim_set_accessible_label(GtkWidget *w, GtkWidget *l); +void pidgin_set_accessible_label(GtkWidget *w, GtkWidget *l); /** * A valid GtkMenuPositionFunc. This is used to determine where @@ -351,7 +351,7 @@ * @param push_in This is an output parameter? * @param user_data Not used by this particular position function. */ -void gaim_gtk_treeview_popup_menu_position_func(GtkMenu *menu, +void pidgin_treeview_popup_menu_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, @@ -364,12 +364,12 @@ * @param account Account to be used (may be NULL if conv is not NULL) * @param who Buddy name (may be NULL if conv is not NULL) */ -void gaim_dnd_file_manage(GtkSelectionData *sd, GaimAccount *account, const char *who); +void pidgin_dnd_file_manage(GtkSelectionData *sd, GaimAccount *account, const char *who); /** * Convenience wrapper for gaim_buddy_icon_get_scale_size */ -void gaim_gtk_buddy_icon_get_scale_size(GdkPixbuf *buf, GaimBuddyIconSpec *spec, GaimIconScaleRules rules, int *width, int *height); +void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, GaimBuddyIconSpec *spec, GaimIconScaleRules rules, int *width, int *height); /** * Returns the base image to represent the account, based on @@ -385,7 +385,7 @@ * to allocate the image buffer, or the image file * contained invalid data. */ -GdkPixbuf *gaim_gtk_create_prpl_icon(GaimAccount *account, PidginPrplIconSize size); +GdkPixbuf *pidgin_create_prpl_icon(GaimAccount *account, PidginPrplIconSize size); /** * Create a protocol icon with the status emblem overlayed in @@ -406,10 +406,10 @@ * to allocate the image buffer, or the image file * contained invalid data. */ -GdkPixbuf *gaim_gtk_create_prpl_icon_with_status(GaimAccount *account, GaimStatusType *status_type, double scale_factor); +GdkPixbuf *pidgin_create_prpl_icon_with_status(GaimAccount *account, GaimStatusType *status_type, double scale_factor); /** - * Create a Gaim running-man icon with the status emblem overlayed + * Create a Pidgin running-man icon with the status emblem overlayed * in the lower right corner. * * @param primitive The status type to set the emblem for. @@ -426,7 +426,7 @@ * allocate the image buffer, or the image file contained * invalid data. */ -GdkPixbuf *gaim_gtk_create_gaim_icon_with_status(GaimStatusPrimitive primitive, double scale_factor); +GdkPixbuf *pidgin_create_gaim_icon_with_status(GaimStatusPrimitive primitive, double scale_factor); /** @@ -436,7 +436,7 @@ * @param act The GaimMenuAction to append. * @param gobject The object to be passed to the action callback. */ -void gaim_gtk_append_menu_action(GtkWidget *menu, GaimMenuAction *act, +void pidgin_append_menu_action(GtkWidget *menu, GaimMenuAction *act, gpointer gobject); /** @@ -450,7 +450,7 @@ * @param widget The widget for which to set the mouse pointer * @param cursor_type The type of cursor to set */ -void gaim_gtk_set_cursor(GtkWidget *widget, GdkCursorType cursor_type); +void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type); /** * Sets the mouse point for a GtkWidget back to that of its parent window. @@ -461,7 +461,7 @@ * * @note The display is not flushed from this function. */ -void gaim_gtk_clear_cursor(GtkWidget *widget); +void pidgin_clear_cursor(GtkWidget *widget); /** * Creates a File Selection widget for choosing a buddy icon @@ -471,7 +471,7 @@ * @param data Data to pass to @callback * @return The file dialog */ -GtkWidget *gaim_gtk_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); +GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); /** * Converts a buddy icon to the required size and format @@ -480,7 +480,7 @@ * @param path The path of a buddy icon to convert * @return The name of a new buddy icon */ -char* gaim_gtk_convert_buddy_icon(GaimPlugin *plugin, const char *path); +char* pidgin_convert_buddy_icon(GaimPlugin *plugin, const char *path); #if !GTK_CHECK_VERSION(2,6,0) /** @@ -501,7 +501,7 @@ * @param filename The path of the custom icon. If this is @c NULL, then any * previously set custom buddy icon for the user is removed. */ -void gaim_gtk_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename); +void pidgin_set_custom_buddy_icon(GaimAccount *account, const char *who, const char *filename); /** * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing @@ -510,7 +510,7 @@ * @param str The text to convert * @return A newly allocated string with unicode arrow characters */ -char *gaim_gtk_make_pretty_arrows(const char *str); +char *pidgin_make_pretty_arrows(const char *str); /** * Creates a "mini-dialog" suitable for embedding in the buddy list scrollbook @@ -521,7 +521,7 @@ * @param user_data Data to pass to the callbacks * @param ... a NULL-terminated list of button labels and callbacks */ -void *gaim_gtk_make_mini_dialog(GaimConnection *handle, const char* stock_id, +void *pidgin_make_mini_dialog(GaimConnection *handle, const char* stock_id, const char *primary, const char *secondary, void *user_data, ...); @@ -529,11 +529,11 @@ * This is a callback function to be used for Ctrl+F searching in treeviews. * Sample Use: * gtk_tree_view_set_search_equal_func(treeview, - * gaim_gtk_tree_view_search_equal_func, + * pidgin_tree_view_search_equal_func, * search_data, search_data_destroy_cb); * */ -gboolean gaim_gtk_tree_view_search_equal_func(GtkTreeModel *model, gint column, +gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer data); /** @@ -543,7 +543,7 @@ * @param window The window to draw attention to * @param urgent Whether to set the urgent hint or not */ -void gaim_gtk_set_urgent(GtkWindow *window, gboolean urgent); +void pidgin_set_urgent(GtkWindow *window, gboolean urgent); /** * Returns TRUE if the GdkPixbuf is opaque, as determined by no @@ -552,7 +552,7 @@ * @param pixbuf The pixbug * @return TRUE if the pixbuf is opaque around the edges, FALSE otherwise */ -gboolean gaim_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); +gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); #if !GTK_CHECK_VERSION(2,2,0) /** @@ -569,5 +569,5 @@ GtkTreePath *gtk_tree_path_new_from_indices (gint first_index, ...); #endif -#endif /* _GAIM_GTKUTILS_H_ */ +#endif /* _PIDGINUTILS_H_ */
--- a/pidgin/gtkwhiteboard.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkwhiteboard.c Mon Feb 05 03:37:27 2007 +0000 @@ -32,37 +32,37 @@ /****************************************************************************** * Prototypes *****************************************************************************/ -static void gaim_gtk_whiteboard_create(GaimWhiteboard *wb); +static void pidgin_whiteboard_create(GaimWhiteboard *wb); -static void gaim_gtk_whiteboard_destroy(GaimWhiteboard *wb); -static gboolean whiteboard_close_cb(GtkWidget *widget, GdkEvent *event, GaimGtkWhiteboard *gtkwb); +static void pidgin_whiteboard_destroy(GaimWhiteboard *wb); +static gboolean whiteboard_close_cb(GtkWidget *widget, GdkEvent *event, PidginWhiteboard *gtkwb); -/*static void gaim_gtkwhiteboard_button_start_press(GtkButton *button, gpointer data); */ +/*static void pidginwhiteboard_button_start_press(GtkButton *button, gpointer data); */ -static gboolean gaim_gtk_whiteboard_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data); -static gboolean gaim_gtk_whiteboard_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data); +static gboolean pidgin_whiteboard_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data); +static gboolean pidgin_whiteboard_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data); -static gboolean gaim_gtk_whiteboard_brush_down(GtkWidget *widget, GdkEventButton *event, gpointer data); -static gboolean gaim_gtk_whiteboard_brush_motion(GtkWidget *widget, GdkEventMotion *event, gpointer data); -static gboolean gaim_gtk_whiteboard_brush_up(GtkWidget *widget, GdkEventButton *event, gpointer data); +static gboolean pidgin_whiteboard_brush_down(GtkWidget *widget, GdkEventButton *event, gpointer data); +static gboolean pidgin_whiteboard_brush_motion(GtkWidget *widget, GdkEventMotion *event, gpointer data); +static gboolean pidgin_whiteboard_brush_up(GtkWidget *widget, GdkEventButton *event, gpointer data); -static void gaim_gtk_whiteboard_draw_brush_point(GaimWhiteboard *wb, +static void pidgin_whiteboard_draw_brush_point(GaimWhiteboard *wb, int x, int y, int color, int size); -static void gaim_gtk_whiteboard_draw_brush_line(GaimWhiteboard *wb, int x0, int y0, +static void pidgin_whiteboard_draw_brush_line(GaimWhiteboard *wb, int x0, int y0, int x1, int y1, int color, int size); -static void gaim_gtk_whiteboard_set_dimensions(GaimWhiteboard *wb, int width, int height); -static void gaim_gtk_whiteboard_set_brush(GaimWhiteboard *wb, int size, int color); -static void gaim_gtk_whiteboard_clear(GaimWhiteboard *wb); +static void pidgin_whiteboard_set_dimensions(GaimWhiteboard *wb, int width, int height); +static void pidgin_whiteboard_set_brush(GaimWhiteboard *wb, int size, int color); +static void pidgin_whiteboard_clear(GaimWhiteboard *wb); -static void gaim_gtk_whiteboard_button_clear_press(GtkWidget *widget, gpointer data); -static void gaim_gtk_whiteboard_button_save_press(GtkWidget *widget, gpointer data); +static void pidgin_whiteboard_button_clear_press(GtkWidget *widget, gpointer data); +static void pidgin_whiteboard_button_save_press(GtkWidget *widget, gpointer data); -static void gaim_gtk_whiteboard_set_canvas_as_icon(GaimGtkWhiteboard *gtkwb); +static void pidgin_whiteboard_set_canvas_as_icon(PidginWhiteboard *gtkwb); -static void gaim_gtk_whiteboard_rgb24_to_rgb48(int color_rgb, GdkColor *color); +static void pidgin_whiteboard_rgb24_to_rgb48(int color_rgb, GdkColor *color); -static void color_select_dialog(GtkWidget *widget, GaimGtkWhiteboard *gtkwb); +static void color_select_dialog(GtkWidget *widget, PidginWhiteboard *gtkwb); /****************************************************************************** * Globals @@ -79,24 +79,24 @@ static GaimWhiteboardUiOps ui_ops = { - gaim_gtk_whiteboard_create, - gaim_gtk_whiteboard_destroy, - gaim_gtk_whiteboard_set_dimensions, - gaim_gtk_whiteboard_set_brush, - gaim_gtk_whiteboard_draw_brush_point, - gaim_gtk_whiteboard_draw_brush_line, - gaim_gtk_whiteboard_clear + pidgin_whiteboard_create, + pidgin_whiteboard_destroy, + pidgin_whiteboard_set_dimensions, + pidgin_whiteboard_set_brush, + pidgin_whiteboard_draw_brush_point, + pidgin_whiteboard_draw_brush_line, + pidgin_whiteboard_clear }; /****************************************************************************** * API *****************************************************************************/ -GaimWhiteboardUiOps *gaim_gtk_whiteboard_get_ui_ops(void) +GaimWhiteboardUiOps *pidgin_whiteboard_get_ui_ops(void) { return &ui_ops; } -static void gaim_gtk_whiteboard_create(GaimWhiteboard *wb) +static void pidgin_whiteboard_create(GaimWhiteboard *wb) { GaimBuddy *buddy; GtkWidget *window; @@ -119,7 +119,7 @@ GtkWidget *save_button; GtkWidget *color_button; - GaimGtkWhiteboard *gtkwb = g_new0(GaimGtkWhiteboard, 1); + PidginWhiteboard *gtkwb = g_new0(PidginWhiteboard, 1); gtkwb->wb = wb; wb->ui_data = gtkwb; @@ -208,20 +208,20 @@ /* Signals used to handle backing pixmap */ g_signal_connect(G_OBJECT(drawing_area), "expose_event", - G_CALLBACK(gaim_gtk_whiteboard_expose_event), gtkwb); + G_CALLBACK(pidgin_whiteboard_expose_event), gtkwb); g_signal_connect(G_OBJECT(drawing_area), "configure_event", - G_CALLBACK(gaim_gtk_whiteboard_configure_event), gtkwb); + G_CALLBACK(pidgin_whiteboard_configure_event), gtkwb); /* Event signals */ g_signal_connect(G_OBJECT(drawing_area), "button_press_event", - G_CALLBACK(gaim_gtk_whiteboard_brush_down), gtkwb); + G_CALLBACK(pidgin_whiteboard_brush_down), gtkwb); g_signal_connect(G_OBJECT(drawing_area), "motion_notify_event", - G_CALLBACK(gaim_gtk_whiteboard_brush_motion), gtkwb); + G_CALLBACK(pidgin_whiteboard_brush_motion), gtkwb); g_signal_connect(G_OBJECT(drawing_area), "button_release_event", - G_CALLBACK(gaim_gtk_whiteboard_brush_up), gtkwb); + G_CALLBACK(pidgin_whiteboard_brush_up), gtkwb); gtk_widget_set_events(drawing_area, GDK_EXPOSURE_MASK | @@ -242,7 +242,7 @@ gtk_box_pack_start(GTK_BOX(vbox_controls), clear_button, FALSE, FALSE, GAIM_HIG_BOX_SPACE); gtk_widget_show(clear_button); g_signal_connect(G_OBJECT(clear_button), "clicked", - G_CALLBACK(gaim_gtk_whiteboard_button_clear_press), gtkwb); + G_CALLBACK(pidgin_whiteboard_button_clear_press), gtkwb); /* Add a save button */ save_button = gtk_button_new_from_stock(GTK_STOCK_SAVE); @@ -250,7 +250,7 @@ gtk_widget_show(save_button); g_signal_connect(G_OBJECT(save_button), "clicked", - G_CALLBACK(gaim_gtk_whiteboard_button_save_press), gtkwb); + G_CALLBACK(pidgin_whiteboard_button_save_press), gtkwb); /* Add a color selector */ color_button = gtk_button_new_from_stock(GTK_STOCK_SELECT_COLOR); @@ -262,7 +262,7 @@ /* Make all this (window) visible */ gtk_widget_show(window); - gaim_gtk_whiteboard_set_canvas_as_icon(gtkwb); + pidgin_whiteboard_set_canvas_as_icon(gtkwb); /* TODO Specific protocol/whiteboard assignment here? Needs a UI Op? */ /* Set default brush size and color */ @@ -272,9 +272,9 @@ */ } -static void gaim_gtk_whiteboard_destroy(GaimWhiteboard *wb) +static void pidgin_whiteboard_destroy(GaimWhiteboard *wb) { - GaimGtkWhiteboard *gtkwb; + PidginWhiteboard *gtkwb; g_return_if_fail(wb != NULL); gtkwb = wb->ui_data; @@ -298,7 +298,7 @@ wb->ui_data = NULL; } -static gboolean whiteboard_close_cb(GtkWidget *widget, GdkEvent *event, GaimGtkWhiteboard *gtkwb) +static gboolean whiteboard_close_cb(GtkWidget *widget, GdkEvent *event, PidginWhiteboard *gtkwb) { GaimWhiteboard *wb; @@ -316,7 +316,7 @@ * and use new prpl_info member?) */ #if 0 -static void gaim_gtkwhiteboard_button_start_press(GtkButton *button, gpointer data) +static void pidginwhiteboard_button_start_press(GtkButton *button, gpointer data) { GaimConversation *conv = data; GaimAccount *account = gaim_conversation_get_account(conv); @@ -347,9 +347,9 @@ } #endif -static gboolean gaim_gtk_whiteboard_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data) +static gboolean pidgin_whiteboard_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer data) { - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)data; + PidginWhiteboard *gtkwb = (PidginWhiteboard*)data; GdkPixmap *pixmap = gtkwb->pixmap; @@ -373,9 +373,9 @@ return TRUE; } -static gboolean gaim_gtk_whiteboard_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) +static gboolean pidgin_whiteboard_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) { - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)(data); + PidginWhiteboard *gtkwb = (PidginWhiteboard*)(data); GdkPixmap *pixmap = gtkwb->pixmap; gdk_draw_drawable(widget->window, @@ -388,9 +388,9 @@ return FALSE; } -static gboolean gaim_gtk_whiteboard_brush_down(GtkWidget *widget, GdkEventButton *event, gpointer data) +static gboolean pidgin_whiteboard_brush_down(GtkWidget *widget, GdkEventButton *event, gpointer data) { - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)data; + PidginWhiteboard *gtkwb = (PidginWhiteboard*)data; GdkPixmap *pixmap = gtkwb->pixmap; GaimWhiteboard *wb = gtkwb->wb; @@ -424,7 +424,7 @@ draw_list = g_list_append(draw_list, GINT_TO_POINTER(LastX)); draw_list = g_list_append(draw_list, GINT_TO_POINTER(LastY)); - gaim_gtk_whiteboard_draw_brush_point(gtkwb->wb, + pidgin_whiteboard_draw_brush_point(gtkwb->wb, event->x, event->y, gtkwb->brush_color, gtkwb->brush_size); } @@ -434,7 +434,7 @@ return TRUE; } -static gboolean gaim_gtk_whiteboard_brush_motion(GtkWidget *widget, GdkEventMotion *event, gpointer data) +static gboolean pidgin_whiteboard_brush_motion(GtkWidget *widget, GdkEventMotion *event, gpointer data) { int x; int y; @@ -443,7 +443,7 @@ GdkModifierType state; - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)data; + PidginWhiteboard *gtkwb = (PidginWhiteboard*)data; GdkPixmap *pixmap = gtkwb->pixmap; GaimWhiteboard *wb = gtkwb->wb; @@ -506,7 +506,7 @@ draw_list = g_list_append(draw_list, GINT_TO_POINTER(dx)); draw_list = g_list_append(draw_list, GINT_TO_POINTER(dy)); - gaim_gtk_whiteboard_draw_brush_line(gtkwb->wb, + pidgin_whiteboard_draw_brush_line(gtkwb->wb, LastX, LastY, x, y, gtkwb->brush_color, gtkwb->brush_size); @@ -521,9 +521,9 @@ return TRUE; } -static gboolean gaim_gtk_whiteboard_brush_up(GtkWidget *widget, GdkEventButton *event, gpointer data) +static gboolean pidgin_whiteboard_brush_up(GtkWidget *widget, GdkEventButton *event, gpointer data) { - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)data; + PidginWhiteboard *gtkwb = (PidginWhiteboard*)data; GdkPixmap *pixmap = gtkwb->pixmap; GaimWhiteboard *wb = gtkwb->wb; @@ -565,7 +565,7 @@ /* Send draw list to prpl draw_list handler */ gaim_whiteboard_send_draw_list(gtkwb->wb, draw_list); - gaim_gtk_whiteboard_set_canvas_as_icon(gtkwb); + pidgin_whiteboard_set_canvas_as_icon(gtkwb); /* The brush stroke is finished, clear the list for another one */ if(draw_list) @@ -577,9 +577,9 @@ return TRUE; } -static void gaim_gtk_whiteboard_draw_brush_point(GaimWhiteboard *wb, int x, int y, int color, int size) +static void pidgin_whiteboard_draw_brush_point(GaimWhiteboard *wb, int x, int y, int color, int size) { - GaimGtkWhiteboard *gtkwb = wb->ui_data; + PidginWhiteboard *gtkwb = wb->ui_data; GtkWidget *widget = gtkwb->drawing_area; GdkPixmap *pixmap = gtkwb->pixmap; @@ -594,7 +594,7 @@ update_rect.height = size; /* Interpret and convert color */ - gaim_gtk_whiteboard_rgb24_to_rgb48(color, &col); + pidgin_whiteboard_rgb24_to_rgb48(color, &col); gdk_gc_set_rgb_fg_color(gfx_con, &col); /* gdk_gc_set_rgb_bg_color(gfx_con, &col); */ @@ -630,7 +630,7 @@ } /* Uses Bresenham's algorithm (as provided by Wikipedia) */ -static void gaim_gtk_whiteboard_draw_brush_line(GaimWhiteboard *wb, int x0, int y0, int x1, int y1, int color, int size) +static void pidgin_whiteboard_draw_brush_line(GaimWhiteboard *wb, int x0, int y0, int x1, int y1, int color, int size) { int temp; @@ -674,9 +674,9 @@ ystep = -1; if(steep) - gaim_gtk_whiteboard_draw_brush_point(wb, y, x, color, size); + pidgin_whiteboard_draw_brush_point(wb, y, x, color, size); else - gaim_gtk_whiteboard_draw_brush_point(wb, x, y, color, size); + pidgin_whiteboard_draw_brush_point(wb, x, y, color, size); while(x != x1) { @@ -690,31 +690,31 @@ } if(steep) - gaim_gtk_whiteboard_draw_brush_point(wb, y, x, color, size); + pidgin_whiteboard_draw_brush_point(wb, y, x, color, size); else - gaim_gtk_whiteboard_draw_brush_point(wb, x, y, color, size); + pidgin_whiteboard_draw_brush_point(wb, x, y, color, size); } } -static void gaim_gtk_whiteboard_set_dimensions(GaimWhiteboard *wb, int width, int height) +static void pidgin_whiteboard_set_dimensions(GaimWhiteboard *wb, int width, int height) { - GaimGtkWhiteboard *gtkwb = wb->ui_data; + PidginWhiteboard *gtkwb = wb->ui_data; gtkwb->width = width; gtkwb->height = height; } -static void gaim_gtk_whiteboard_set_brush(GaimWhiteboard *wb, int size, int color) +static void pidgin_whiteboard_set_brush(GaimWhiteboard *wb, int size, int color) { - GaimGtkWhiteboard *gtkwb = wb->ui_data; + PidginWhiteboard *gtkwb = wb->ui_data; gtkwb->brush_size = size; gtkwb->brush_color = color; } -static void gaim_gtk_whiteboard_clear(GaimWhiteboard *wb) +static void pidgin_whiteboard_clear(GaimWhiteboard *wb) { - GaimGtkWhiteboard *gtkwb = wb->ui_data; + PidginWhiteboard *gtkwb = wb->ui_data; GdkPixmap *pixmap = gtkwb->pixmap; GtkWidget *drawing_area = gtkwb->drawing_area; @@ -731,21 +731,21 @@ drawing_area->allocation.height); } -static void gaim_gtk_whiteboard_button_clear_press(GtkWidget *widget, gpointer data) +static void pidgin_whiteboard_button_clear_press(GtkWidget *widget, gpointer data) { - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)(data); + PidginWhiteboard *gtkwb = (PidginWhiteboard*)(data); - gaim_gtk_whiteboard_clear(gtkwb->wb); + pidgin_whiteboard_clear(gtkwb->wb); - gaim_gtk_whiteboard_set_canvas_as_icon(gtkwb); + pidgin_whiteboard_set_canvas_as_icon(gtkwb); /* Do protocol specific clearing procedures */ gaim_whiteboard_send_clear(gtkwb->wb); } -static void gaim_gtk_whiteboard_button_save_press(GtkWidget *widget, gpointer data) +static void pidgin_whiteboard_button_save_press(GtkWidget *widget, gpointer data) { - GaimGtkWhiteboard *gtkwb = (GaimGtkWhiteboard*)(data); + PidginWhiteboard *gtkwb = (PidginWhiteboard*)(data); GdkPixbuf *pixbuf; GtkWidget *dialog; @@ -810,7 +810,7 @@ } } -static void gaim_gtk_whiteboard_set_canvas_as_icon(GaimGtkWhiteboard *gtkwb) +static void pidgin_whiteboard_set_canvas_as_icon(PidginWhiteboard *gtkwb) { GdkPixbuf *pixbuf; @@ -825,7 +825,7 @@ gtk_window_set_icon((GtkWindow*)(gtkwb->window), pixbuf); } -static void gaim_gtk_whiteboard_rgb24_to_rgb48(int color_rgb, GdkColor *color) +static void pidgin_whiteboard_rgb24_to_rgb48(int color_rgb, GdkColor *color) { color->red = (color_rgb >> 8) | 0xFF; color->green = (color_rgb & 0xFF00) | 0xFF; @@ -833,7 +833,7 @@ } static void -change_color_cb(GtkColorSelection *selection, GaimGtkWhiteboard *gtkwb) +change_color_cb(GtkColorSelection *selection, PidginWhiteboard *gtkwb) { GdkColor color; int old_size = 5; @@ -855,7 +855,7 @@ gtk_widget_destroy(destroy); } -static void color_select_dialog(GtkWidget *widget, GaimGtkWhiteboard *gtkwb) +static void color_select_dialog(GtkWidget *widget, PidginWhiteboard *gtkwb) { GdkColor color; GtkColorSelectionDialog *dialog; @@ -873,7 +873,7 @@ gtk_color_selection_set_has_palette(GTK_COLOR_SELECTION(dialog->colorsel), TRUE); - gaim_gtk_whiteboard_rgb24_to_rgb48(gtkwb->brush_color, &color); + pidgin_whiteboard_rgb24_to_rgb48(gtkwb->brush_color, &color); gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(dialog->colorsel), &color); gtk_widget_show_all(GTK_WIDGET(dialog));
--- a/pidgin/gtkwhiteboard.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/gtkwhiteboard.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,9 +1,9 @@ /** - * @file gtkwhiteboard.h The GtkGaimWhiteboard frontend object + * @file gtkwhiteboard.h The PidginWhiteboard frontend object * * gaim * - * Gaim is the legal property of its developers, whose names are too numerous + * Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -22,10 +22,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _GAIM_GTKWHITEBOARD_H_ -#define _GAIM_GTKWHITEBOARD_H_ +#ifndef _PIDGINWHITEBOARD_H_ +#define _PIDGINWHITEBOARD_H_ -#include "gtkgaim.h" +#include "pidgin.h" #include "whiteboard.h" @@ -41,9 +41,9 @@ #define PALETTE_NUM_COLORS 7 /** - * A GaimGtkWhiteboard + * A PidginWhiteboard */ -typedef struct _GaimGtkWhiteboard +typedef struct _PidginWhiteboard { GaimWhiteboard *wb; /**< backend data for this whiteboard */ @@ -56,14 +56,14 @@ int height; /**< Canvas height */ int brush_color; /**< Foreground color */ int brush_size; /**< Brush size */ -} GaimGtkWhiteboard; +} PidginWhiteboard; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /*****************************************************************************/ -/** @name GaimGtkWhiteboard API */ +/** @name PidginWhiteboard API */ /*****************************************************************************/ /*@{*/ @@ -72,7 +72,7 @@ * * @return The GtkWhiteboard UI Operations. */ -GaimWhiteboardUiOps *gaim_gtk_whiteboard_get_ui_ops( void ); +GaimWhiteboardUiOps *pidgin_whiteboard_get_ui_ops( void ); /*@}*/ @@ -80,4 +80,4 @@ } #endif /* __cplusplus */ -#endif /* _GAIM_GTKWHITEBOARD_H_ */ +#endif /* _PIDGINWHITEBOARD_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pidgin.h Mon Feb 05 03:37:27 2007 +0000 @@ -0,0 +1,92 @@ +/** + * @file pidgin.h UI definitions and includes + * @ingroup gtkui + * + * gaim + * + * Pidgin is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +/* #warning ***pidgin*** */ +#ifndef _PIDGINGAIM_H_ +#define _PIDGINGAIM_H_ + +#ifndef _WIN32 +# include <gdk/gdkx.h> +#endif + +#include <gtk/gtk.h> + +#ifdef _WIN32 +# include "gtkwin32dep.h" +#endif + +/** + * Our UI's identifier. + */ +#define PIDGIN_UI "pidgin" + +#ifndef _WIN32 +# define GAIM_ALERT_TITLE "" +#else +# define GAIM_ALERT_TITLE PIDGIN_NAME +#endif + +/* + * This is backwards-compatibility code for older versions of GTK+ (< 2.4.x) + * It defines the new wrap behavior (unknown in earlier versions) + * as the old (slightly buggy) wrap behavior. + * It also includes our back-ported GtkExpander + */ +/** @cond */ +#if (!GTK_CHECK_VERSION(2,4,0)) +# define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD +# include "gtkexpander.h" +#endif +/** @endcond */ + +/* + * We include the sources for GtkComboBox and GtkCellView because + * they don't exist in older versions of GTK+, and we use them + * in a few places. + */ +#if !GTK_CHECK_VERSION(2,6,0) +# include "gtkcellview.h" +# include "gtkcellviewmenuitem.h" +# include "gaimcombobox.h" +# if !GTK_CHECK_VERSION(2,4,0) +# include "gtkcelllayout.h" +# endif /* Less than GTK+ 2.4 */ +#endif /* Less than GTK+ 2.6 */ + +/* + * Spacings between components, as defined by the + * GNOME Human Interface Guidelines. + */ +#define GAIM_HIG_CAT_SPACE 18 +#define GAIM_HIG_BORDER 12 +#define GAIM_HIG_BOX_SPACE 6 + +/* + * See GNOME bug #307304 for some discussion about the invisible + * character. 0x25cf is a good choice, too. + */ +#define GAIM_INVISIBLE_CHAR (gunichar)0x2022 + +#endif /* _PIDGINGAIM_H_ */ +
--- a/pidgin/pixmaps/emblems/16/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/emblems/16/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -8,7 +8,6 @@ free-for-chat.png \ game.png \ male.png \ - message-pending.png \ mobile.png \ not-authorized.png \ qq-member.png \
--- a/pidgin/pixmaps/emblems/16/scalable/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/emblems/16/scalable/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -6,7 +6,6 @@ free-for-chat.svg \ game.svg \ male.svg \ - message-pending.svg \ mobile.svg \ not-authorized.svg \ qq-member.svg \
--- a/pidgin/pixmaps/emblems/16/scalable/message-pending.svg Sun Feb 04 23:14:06 2007 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,365 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/s odipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="16" - height="16" - id="svg2" - sodipodi:version="0.32" - inkscape:version="0.43" - version="1.0" - sodipodi:docbase="/home/hbons/Desktop/Gaim Refresh/emblems" - sodipodi:docname="message-pending.svg" - inkscape:export-filename="/home/hbons/Desktop/Gaim Refresh/emblems/message-pending.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> - <defs - id="defs4"> - <linearGradient - id="linearGradient2804"> - <stop - style="stop-color:black;stop-opacity:0;" - offset="0" - id="stop2806" /> - <stop - id="stop2812" - offset="0.5" - style="stop-color:black;stop-opacity:1;" /> - <stop - style="stop-color:black;stop-opacity:0;" - offset="1" - id="stop2808" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2804" - id="linearGradient2831" - gradientUnits="userSpaceOnUse" - x1="21.875" - y1="48.000977" - x2="21.875" - y2="40" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient2781" - id="radialGradient2829" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(2,0,0,0.8,36,8.8)" - cx="1" - cy="44" - fx="1" - fy="44" - r="5" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2781"> - <stop - style="stop-color:black;stop-opacity:1;" - offset="0" - id="stop2783" /> - <stop - style="stop-color:black;stop-opacity:0;" - offset="1" - id="stop2785" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient2781" - id="radialGradient2827" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(2,0,0,0.8,-13,-79.2)" - cx="1" - cy="44" - fx="1" - fy="44" - r="5" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2422"> - <stop - style="stop-color:#dfe2dc;stop-opacity:1;" - offset="0" - id="stop2424" /> - <stop - style="stop-color:#dfe2dc;stop-opacity:0;" - offset="1" - id="stop2426" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient2260"> - <stop - style="stop-color:#555753;stop-opacity:1;" - offset="0" - id="stop2262" /> - <stop - style="stop-color:#555753;stop-opacity:0;" - offset="1" - id="stop2264" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient3816"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3818" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3820" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3816" - id="radialGradient3822" - cx="31.112698" - cy="19.008621" - fx="31.112698" - fy="19.008621" - r="8.6620579" - gradientUnits="userSpaceOnUse" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2200"> - <stop - style="stop-color:#d3d7cf;stop-opacity:1;" - offset="0" - id="stop2202" /> - <stop - style="stop-color:#d3d7cf;stop-opacity:0;" - offset="1" - id="stop2204" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient2200" - id="radialGradient2216" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-2.522332,-1.518129e-16,-1.517788e-16,2.521765,40.1904,-21.83521)" - cx="9.9988937" - cy="8.963316" - fx="9.9988937" - fy="8.963316" - r="7.003407" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient2260" - id="radialGradient2266" - cx="11.756953" - cy="17.588654" - fx="11.756953" - fy="17.588654" - r="6.3436799" - gradientTransform="matrix(1,0,0,0.626667,1.8722e-15,6.566431)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient3150" - inkscape:collect="always"> - <stop - id="stop3152" - offset="0" - style="stop-color:#2e3436;stop-opacity:1;" /> - <stop - id="stop3154" - offset="1" - style="stop-color:#2e3436;stop-opacity:0;" /> - </linearGradient> - <linearGradient - id="linearGradient4130" - inkscape:collect="always"> - <stop - id="stop4132" - offset="0" - style="stop-color:#babdb6;stop-opacity:1;" /> - <stop - id="stop4134" - offset="1" - style="stop-color:#babdb6;stop-opacity:0;" /> - </linearGradient> - <linearGradient - id="linearGradient4138" - inkscape:collect="always"> - <stop - id="stop4140" - offset="0" - style="stop-color:#babdb6;stop-opacity:1;" /> - <stop - id="stop4142" - offset="1" - style="stop-color:#babdb6;stop-opacity:0;" /> - </linearGradient> - <linearGradient - id="linearGradient4146" - inkscape:collect="always"> - <stop - id="stop4148" - offset="0" - style="stop-color:#ffffff;stop-opacity:1;" /> - <stop - id="stop4150" - offset="1" - style="stop-color:#ffffff;stop-opacity:0;" /> - </linearGradient> - <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.257382,-2.683712e-16,1.506476e-16,0.665505,-3.088585,4.013937)" - r="8.96875" - fy="12" - fx="12" - cy="12" - cx="12" - id="radialGradient1484" - xlink:href="#linearGradient4146" - inkscape:collect="always" /> - <linearGradient - gradientUnits="userSpaceOnUse" - y2="17.151861" - x2="12.015625" - y1="13.368965" - x1="12.015625" - id="linearGradient1482" - xlink:href="#linearGradient4138" - inkscape:collect="always" /> - <linearGradient - gradientUnits="userSpaceOnUse" - y2="20.157516" - x2="12.015625" - y1="12.904307" - x1="12.015625" - id="linearGradient1480" - xlink:href="#linearGradient4130" - inkscape:collect="always" /> - <radialGradient - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.842757,5.698892e-16,-4.565819e-9,-0.35721,19.80716,14.19321)" - r="6.6449099" - fy="10.457643" - fx="10.748654" - cy="10.457643" - cx="10.748654" - id="radialGradient1478" - xlink:href="#linearGradient3150" - inkscape:collect="always" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3150" - id="radialGradient1518" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.842757,5.698892e-16,-4.565819e-9,-0.35721,19.80716,14.19321)" - cx="10.748654" - cy="10.457643" - fx="10.748654" - fy="10.457643" - r="6.6449099" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient4146" - id="radialGradient1537" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.257382,-2.683712e-16,1.506476e-16,0.665505,-3.088585,4.013937)" - cx="12" - cy="12" - fx="12" - fy="12" - r="8.96875" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2422" - id="linearGradient2432" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.92783,0,0,1.001064,-0.823593,-7.013831)" - x1="9.5028229" - y1="12.832533" - x2="10.30435" - y2="12.031006" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="29.556977" - inkscape:cx="14.103447" - inkscape:cy="8.3465311" - inkscape:document-units="px" - inkscape:current-layer="layer1" - showgrid="true" - fill="#d3d7cf" - inkscape:window-width="1268" - inkscape:window-height="971" - inkscape:window-x="6" - inkscape:window-y="21" /> - <metadata - id="metadata7"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1"> - <rect - style="fill:#dfe2dc;fill-opacity:1;stroke:#888a85;stroke-width:1.00000072;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="rect3198" - width="13.000139" - height="10.992994" - x="1.4998647" - y="2.5055699" - rx="1.3258357" - ry="1.3258338" /> - <path - sodipodi:type="inkscape:offset" - inkscape:radius="-1.0251163" - inkscape:original="M 2.8125 2.5 C 2.077987 2.5 1.5 3.1092381 1.5 3.84375 L 1.5 12.1875 C 1.5 12.922012 2.0779871 13.5 2.8125 13.5 L 13.1875 13.5 C 13.922013 13.5 14.5 12.922012 14.5 12.1875 L 14.5 3.84375 C 14.5 3.1092381 13.922013 2.5 13.1875 2.5 L 2.8125 2.5 z " - xlink:href="#rect3198" - style="opacity:0.4;fill:none;fill-opacity:1;stroke:url(#radialGradient1537);stroke-width:1.00000036;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" - id="path4119" - inkscape:href="#rect3198" - d="M 2.8125,5.625 C 2.6448378,5.625 2.53125,5.7407625 2.53125,5.9375 L 2.53125,14.15625 C 2.53125,14.352987 2.6157624,14.4375 2.8125,14.4375 L 13.1875,14.4375 C 13.384238,14.4375 13.46875,14.352988 13.46875,14.15625 L 13.46875,5.9375 C 13.46875,5.7407629 13.355162,5.625 13.1875,5.625 L 2.8125,5.625 z " - transform="translate(-2.49527e-7,3.000449)" /> - <path - style="fill:#dfe2dc;fill-opacity:1;stroke:#888a85;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1" - d="M 13.592215,13.500304 L 2.4076597,13.500304 C 1.9049198,13.500304 1.5001876,12.987314 1.5001876,12.350102 L 7.9870143,6.4978147 L 14.499686,12.350102 C 14.499686,12.987314 14.094954,13.500304 13.592215,13.500304 z " - id="path4113" - sodipodi:nodetypes="cccccc" /> - <path - sodipodi:type="inkscape:offset" - inkscape:radius="-1.0369591" - inkscape:original="M 8 6.5 L 1.5 12.34375 C 1.5 12.980962 1.90351 13.5 2.40625 13.5 L 13.59375 13.5 C 14.096489 13.5 14.5 12.980962 14.5 12.34375 L 8 6.5 z " - xlink:href="#path4113" - style="opacity:0.4;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.9999997;stroke-miterlimit:4;stroke-opacity:1" - id="path2434" - inkscape:href="#path4113" - d="M 7.96875,9.875 L 2.90625,14.4375 L 13.09375,14.4375 L 7.96875,9.875 z " /> - <path - style="fill:url(#linearGradient2432);fill-opacity:1;stroke:#888a85;stroke-width:1.00000095;stroke-miterlimit:4;stroke-opacity:1" - d="M 13.583704,2.5043194 L 2.4031327,2.5043194 C 1.9005721,2.5043194 1.4959838,3.0164966 1.4959838,3.6526958 L 7.9805003,9.4956802 L 14.490853,3.6526958 C 14.490853,3.0164966 14.086265,2.5043194 13.583704,2.5043194 z " - id="path4122" - sodipodi:nodetypes="cccccc" /> - <path - sodipodi:type="inkscape:offset" - inkscape:radius="-1.0758224" - inkscape:original="M 2.40625 2.5 C 1.9036894 2.5 1.5 3.0200508 1.5 3.65625 L 7.96875 9.5 L 14.5 3.65625 C 14.5 3.0200507 14.096311 2.5 13.59375 2.5 L 2.40625 2.5 z " - xlink:href="#path4122" - style="opacity:0.4;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.0000006;stroke-miterlimit:4;stroke-opacity:1" - id="path2430" - inkscape:href="#path4122" - d="M 3.03125,5.625 L 7.96875,10.0625 L 12.96875,5.625 L 3.03125,5.625 z " /> - </g> -</svg>
--- a/pidgin/pixmaps/emotes/default/22/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -125,6 +125,7 @@ shame.png \ sheep.png \ shock.png \ + shout.png \ shut-mouth.png \ sick.png \ sigarette.png \
--- a/pidgin/pixmaps/emotes/default/22/scalable/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/scalable/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -118,6 +118,7 @@ shame.svg \ sheep.svg \ shock.svg \ + shout.svg \ shut-mouth.svg \ sick.svg \ sigarette.svg \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/emotes/default/22/scalable/shout.svg Mon Feb 05 03:37:27 2007 +0000 @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="24" + height="24" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.44.1" + version="1.0" + sodipodi:docbase="/home/hbons/Desktop" + sodipodi:docname="shout.svg" + inkscape:export-filename="/home/hbons/Desktop/shout.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + inkscape:collect="always" + id="linearGradient3150"> + <stop + style="stop-color:#2e3436;stop-opacity:1;" + offset="0" + id="stop3152" /> + <stop + style="stop-color:#2e3436;stop-opacity:0;" + offset="1" + id="stop3154" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient3104"> + <stop + style="stop-color:#eeeeec;stop-opacity:1;" + offset="0" + id="stop3106" /> + <stop + style="stop-color:#eeeeec;stop-opacity:0;" + offset="1" + id="stop3108" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3104" + id="radialGradient3114" + cx="8.3343515" + cy="14.186539" + fx="8.3343515" + fy="14.186539" + r="9.975256" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.9327,0.932656,-0.947494,-0.947449,33.02126,11.96667)" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3150" + id="radialGradient3156" + cx="10.748654" + cy="10.457643" + fx="10.748654" + fy="10.457643" + r="6.6449099" + gradientTransform="matrix(-0.842757,5.698892e-16,-4.565819e-9,-0.35721,19.80716,14.19321)" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="25.730843" + inkscape:cx="22.602397" + inkscape:cy="13.317176" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + fill="#babdb6" + inkscape:window-width="1268" + inkscape:window-height="971" + inkscape:window-x="6" + inkscape:window-y="23" + showguides="true" + inkscape:guide-bbox="true" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + sodipodi:type="arc" + style="opacity:0.6;fill:url(#radialGradient3156);fill-opacity:1.0;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path3140" + sodipodi:cx="10.748654" + sodipodi:cy="10.457643" + sodipodi:rx="6.6449099" + sodipodi:ry="2.3675451" + d="M 17.393564 10.457643 A 6.6449099 2.3675451 0 1 1 4.1037445,10.457643 A 6.6449099 2.3675451 0 1 1 17.393564 10.457643 z" + transform="matrix(1.504911,0,0,1.300982,-4.175772,6.474929)" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:#edd400;fill-opacity:1;stroke:#f57900;stroke-width:1.05276573;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path1307" + sodipodi:cx="11.806158" + sodipodi:cy="10.983024" + sodipodi:rx="9.975256" + sodipodi:ry="9.975256" + d="M 21.781414 10.983024 A 9.975256 9.975256 0 1 1 1.8309021,10.983024 A 9.975256 9.975256 0 1 1 21.781414 10.983024 z" + transform="matrix(0.952236,0,0,0.952236,0.757713,1.541608)" /> + <path + sodipodi:type="arc" + style="opacity:0.79545455;fill:url(#radialGradient3114);fill-opacity:1.0;stroke:none;stroke-width:1.05274069;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path3102" + sodipodi:cx="11.806158" + sodipodi:cy="10.983024" + sodipodi:rx="9.975256" + sodipodi:ry="9.975256" + d="M 21.781414 10.983024 A 9.975256 9.975256 0 1 1 1.8309021,10.983024 A 9.975256 9.975256 0 1 1 21.781414 10.983024 z" + transform="matrix(0.8019,0,0,0.801938,2.532654,3.191833)" /> + <path + sodipodi:type="arc" + style="opacity:0.5;fill:none;fill-opacity:1.0;stroke:#ffffff;stroke-width:1.17343897;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path2184" + sodipodi:cx="11.806158" + sodipodi:cy="10.983024" + sodipodi:rx="9.975256" + sodipodi:ry="9.975256" + d="M 21.781414 10.983024 A 9.975256 9.975256 0 1 1 1.8309021,10.983024 A 9.975256 9.975256 0 1 1 21.781414 10.983024 z" + transform="matrix(0.852176,0,0,0.852216,1.93909,2.639626)" /> + <path + style="fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1" + d="M 11.000001,9.9999999 C 11.000001,11.104 10.552001,12 10.000001,12 C 9.4480002,12 9,11.104 9,9.9999999 C 9,8.8959999 9.0000003,8.6363117 9.0000003,8 C 10.214913,8.726047 11.000001,8.8959999 11.000001,9.9999999 z " + id="path2224" + sodipodi:nodetypes="csscc" + transform="translate(0,-1)" /> + <path + style="fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1" + d="M 13,10 C 13,11.104 13.448001,12 14.000001,12 C 14.552001,12 15.000002,11.104 15.000002,10 C 15.000002,8.8959999 15.000001,8.6363117 15.000001,8 C 13.785089,8.726047 13,8.8959999 13,10 z " + id="path2228" + sodipodi:nodetypes="csscc" + transform="translate(0,-1)" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:#2e3436;fill-opacity:1;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path2251" + sodipodi:cx="9.3754778" + sodipodi:cy="13.4881" + sodipodi:rx="6.1556172" + sodipodi:ry="6.1556172" + d="M 15.531095 13.4881 A 6.1556172 6.1556172 0 1 1 3.2198606,13.4881 A 6.1556172 6.1556172 0 1 1 15.531095 13.4881 z" + transform="matrix(0.48736,0,0,0.568587,7.430769,7.830849)" /> + </g> +</svg>
--- a/pidgin/pixmaps/emotes/default/22/theme Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/emotes/default/22/theme Mon Feb 05 03:37:27 2007 +0000 @@ -19,6 +19,7 @@ shut-mouth.png :-X moneymouth.png :-$ foot-in-mouth.png :-! +shout.png >:o >:O [MSN] smile.png :)
--- a/pidgin/pixmaps/status/16/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/status/16/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -1,14 +1,18 @@ SUBDIRS = scalable EXTRA_DIST = available.png \ + available_i.png \ away.png \ + away_i.png \ busy.png \ + busy_i.png \ chat.png \ extended-away.png \ + extended-away_i.png \ half-operator.png \ - invisible.png \ log-in.png \ log-out.png \ + message-pending.png \ offline.png \ operator.png \ person.png
--- a/pidgin/pixmaps/status/16/scalable/Makefile.am Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/pixmaps/status/16/scalable/Makefile.am Mon Feb 05 03:37:27 2007 +0000 @@ -5,6 +5,7 @@ extended-away.svg \ log-in.svg \ log-out.svg \ + message-pending.svg \ offline.svg \ person.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pidgin/pixmaps/status/16/scalable/message-pending.svg Mon Feb 05 03:37:27 2007 +0000 @@ -0,0 +1,365 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/s odipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="16" + height="16" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.43" + version="1.0" + sodipodi:docbase="/home/hbons/Desktop/Gaim Refresh/emblems" + sodipodi:docname="message-pending.svg" + inkscape:export-filename="/home/hbons/Desktop/Gaim Refresh/emblems/message-pending.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4"> + <linearGradient + id="linearGradient2804"> + <stop + style="stop-color:black;stop-opacity:0;" + offset="0" + id="stop2806" /> + <stop + id="stop2812" + offset="0.5" + style="stop-color:black;stop-opacity:1;" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop2808" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2804" + id="linearGradient2831" + gradientUnits="userSpaceOnUse" + x1="21.875" + y1="48.000977" + x2="21.875" + y2="40" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2781" + id="radialGradient2829" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2,0,0,0.8,36,8.8)" + cx="1" + cy="44" + fx="1" + fy="44" + r="5" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2781"> + <stop + style="stop-color:black;stop-opacity:1;" + offset="0" + id="stop2783" /> + <stop + style="stop-color:black;stop-opacity:0;" + offset="1" + id="stop2785" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2781" + id="radialGradient2827" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2,0,0,0.8,-13,-79.2)" + cx="1" + cy="44" + fx="1" + fy="44" + r="5" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2422"> + <stop + style="stop-color:#dfe2dc;stop-opacity:1;" + offset="0" + id="stop2424" /> + <stop + style="stop-color:#dfe2dc;stop-opacity:0;" + offset="1" + id="stop2426" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient2260"> + <stop + style="stop-color:#555753;stop-opacity:1;" + offset="0" + id="stop2262" /> + <stop + style="stop-color:#555753;stop-opacity:0;" + offset="1" + id="stop2264" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient3816"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop3818" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop3820" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3816" + id="radialGradient3822" + cx="31.112698" + cy="19.008621" + fx="31.112698" + fy="19.008621" + r="8.6620579" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + id="linearGradient2200"> + <stop + style="stop-color:#d3d7cf;stop-opacity:1;" + offset="0" + id="stop2202" /> + <stop + style="stop-color:#d3d7cf;stop-opacity:0;" + offset="1" + id="stop2204" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2200" + id="radialGradient2216" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.522332,-1.518129e-16,-1.517788e-16,2.521765,40.1904,-21.83521)" + cx="9.9988937" + cy="8.963316" + fx="9.9988937" + fy="8.963316" + r="7.003407" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2260" + id="radialGradient2266" + cx="11.756953" + cy="17.588654" + fx="11.756953" + fy="17.588654" + r="6.3436799" + gradientTransform="matrix(1,0,0,0.626667,1.8722e-15,6.566431)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + id="linearGradient3150" + inkscape:collect="always"> + <stop + id="stop3152" + offset="0" + style="stop-color:#2e3436;stop-opacity:1;" /> + <stop + id="stop3154" + offset="1" + style="stop-color:#2e3436;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4130" + inkscape:collect="always"> + <stop + id="stop4132" + offset="0" + style="stop-color:#babdb6;stop-opacity:1;" /> + <stop + id="stop4134" + offset="1" + style="stop-color:#babdb6;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4138" + inkscape:collect="always"> + <stop + id="stop4140" + offset="0" + style="stop-color:#babdb6;stop-opacity:1;" /> + <stop + id="stop4142" + offset="1" + style="stop-color:#babdb6;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient4146" + inkscape:collect="always"> + <stop + id="stop4148" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4150" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <radialGradient + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.257382,-2.683712e-16,1.506476e-16,0.665505,-3.088585,4.013937)" + r="8.96875" + fy="12" + fx="12" + cy="12" + cx="12" + id="radialGradient1484" + xlink:href="#linearGradient4146" + inkscape:collect="always" /> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="17.151861" + x2="12.015625" + y1="13.368965" + x1="12.015625" + id="linearGradient1482" + xlink:href="#linearGradient4138" + inkscape:collect="always" /> + <linearGradient + gradientUnits="userSpaceOnUse" + y2="20.157516" + x2="12.015625" + y1="12.904307" + x1="12.015625" + id="linearGradient1480" + xlink:href="#linearGradient4130" + inkscape:collect="always" /> + <radialGradient + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.842757,5.698892e-16,-4.565819e-9,-0.35721,19.80716,14.19321)" + r="6.6449099" + fy="10.457643" + fx="10.748654" + cy="10.457643" + cx="10.748654" + id="radialGradient1478" + xlink:href="#linearGradient3150" + inkscape:collect="always" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3150" + id="radialGradient1518" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.842757,5.698892e-16,-4.565819e-9,-0.35721,19.80716,14.19321)" + cx="10.748654" + cy="10.457643" + fx="10.748654" + fy="10.457643" + r="6.6449099" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4146" + id="radialGradient1537" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.257382,-2.683712e-16,1.506476e-16,0.665505,-3.088585,4.013937)" + cx="12" + cy="12" + fx="12" + fy="12" + r="8.96875" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2422" + id="linearGradient2432" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92783,0,0,1.001064,-0.823593,-7.013831)" + x1="9.5028229" + y1="12.832533" + x2="10.30435" + y2="12.031006" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="29.556977" + inkscape:cx="14.103447" + inkscape:cy="8.3465311" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + fill="#d3d7cf" + inkscape:window-width="1268" + inkscape:window-height="971" + inkscape:window-x="6" + inkscape:window-y="21" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="fill:#dfe2dc;fill-opacity:1;stroke:#888a85;stroke-width:1.00000072;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="rect3198" + width="13.000139" + height="10.992994" + x="1.4998647" + y="2.5055699" + rx="1.3258357" + ry="1.3258338" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-1.0251163" + inkscape:original="M 2.8125 2.5 C 2.077987 2.5 1.5 3.1092381 1.5 3.84375 L 1.5 12.1875 C 1.5 12.922012 2.0779871 13.5 2.8125 13.5 L 13.1875 13.5 C 13.922013 13.5 14.5 12.922012 14.5 12.1875 L 14.5 3.84375 C 14.5 3.1092381 13.922013 2.5 13.1875 2.5 L 2.8125 2.5 z " + xlink:href="#rect3198" + style="opacity:0.4;fill:none;fill-opacity:1;stroke:url(#radialGradient1537);stroke-width:1.00000036;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4119" + inkscape:href="#rect3198" + d="M 2.8125,5.625 C 2.6448378,5.625 2.53125,5.7407625 2.53125,5.9375 L 2.53125,14.15625 C 2.53125,14.352987 2.6157624,14.4375 2.8125,14.4375 L 13.1875,14.4375 C 13.384238,14.4375 13.46875,14.352988 13.46875,14.15625 L 13.46875,5.9375 C 13.46875,5.7407629 13.355162,5.625 13.1875,5.625 L 2.8125,5.625 z " + transform="translate(-2.49527e-7,3.000449)" /> + <path + style="fill:#dfe2dc;fill-opacity:1;stroke:#888a85;stroke-width:0.99999994;stroke-miterlimit:4;stroke-opacity:1" + d="M 13.592215,13.500304 L 2.4076597,13.500304 C 1.9049198,13.500304 1.5001876,12.987314 1.5001876,12.350102 L 7.9870143,6.4978147 L 14.499686,12.350102 C 14.499686,12.987314 14.094954,13.500304 13.592215,13.500304 z " + id="path4113" + sodipodi:nodetypes="cccccc" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-1.0369591" + inkscape:original="M 8 6.5 L 1.5 12.34375 C 1.5 12.980962 1.90351 13.5 2.40625 13.5 L 13.59375 13.5 C 14.096489 13.5 14.5 12.980962 14.5 12.34375 L 8 6.5 z " + xlink:href="#path4113" + style="opacity:0.4;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.9999997;stroke-miterlimit:4;stroke-opacity:1" + id="path2434" + inkscape:href="#path4113" + d="M 7.96875,9.875 L 2.90625,14.4375 L 13.09375,14.4375 L 7.96875,9.875 z " /> + <path + style="fill:url(#linearGradient2432);fill-opacity:1;stroke:#888a85;stroke-width:1.00000095;stroke-miterlimit:4;stroke-opacity:1" + d="M 13.583704,2.5043194 L 2.4031327,2.5043194 C 1.9005721,2.5043194 1.4959838,3.0164966 1.4959838,3.6526958 L 7.9805003,9.4956802 L 14.490853,3.6526958 C 14.490853,3.0164966 14.086265,2.5043194 13.583704,2.5043194 z " + id="path4122" + sodipodi:nodetypes="cccccc" /> + <path + sodipodi:type="inkscape:offset" + inkscape:radius="-1.0758224" + inkscape:original="M 2.40625 2.5 C 1.9036894 2.5 1.5 3.0200508 1.5 3.65625 L 7.96875 9.5 L 14.5 3.65625 C 14.5 3.0200507 14.096311 2.5 13.59375 2.5 L 2.40625 2.5 z " + xlink:href="#path4122" + style="opacity:0.4;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.0000006;stroke-miterlimit:4;stroke-opacity:1" + id="path2430" + inkscape:href="#path4122" + d="M 3.03125,5.625 L 7.96875,10.0625 L 12.96875,5.625 L 3.03125,5.625 z " /> + </g> +</svg>
--- a/pidgin/plugins/cap/cap.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/cap/cap.c Mon Feb 05 03:37:27 2007 +0000 @@ -714,7 +714,7 @@ /*gaim_signal_connect(gaim_blist_get_handle(), "blist-node-extended-menu", plugin, GAIM_CALLBACK(blist_node_extended_menu), NULL);*/ - gaim_signal_connect(gaim_gtk_blist_get_handle(), "drawing-tooltip", plugin, + gaim_signal_connect(pidgin_blist_get_handle(), "drawing-tooltip", plugin, GAIM_CALLBACK(drawing_tooltip), NULL); gaim_signal_connect(gaim_connections_get_handle(), "signed-on", plugin, @@ -765,7 +765,7 @@ /*gaim_signal_disconnect(gaim_blist_get_handle(), "blist-node-extended-menu", plugin, GAIM_CALLBACK(blist_node_extended_menu));*/ - gaim_signal_disconnect(gaim_gtk_blist_get_handle(), "drawing-tooltip", plugin, + gaim_signal_disconnect(pidgin_blist_get_handle(), "drawing-tooltip", plugin, GAIM_CALLBACK(drawing_tooltip)); gaim_signal_disconnect(gaim_connections_get_handle(), "signed-on", plugin, @@ -807,7 +807,7 @@ ui->ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(ui->ret), 10); - ui->cap_vbox = gaim_gtk_make_frame(ui->ret, _("Statistics Configuration")); + ui->cap_vbox = pidgin_make_frame(ui->ret, _("Statistics Configuration")); /* msg_difference spinner */ ui->msg_difference_label = gtk_label_new(_("Maximum response timeout:")); @@ -916,7 +916,7 @@ gaim_prefs_set_int(user_data, gtk_spin_button_get_value_as_int(spinbutton)); } -static GaimGtkPluginUiInfo ui_info = { +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (reserved) */ }; @@ -926,7 +926,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/cap/cap.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/cap/cap.h Mon Feb 05 03:37:27 2007 +0000 @@ -23,7 +23,7 @@ #define _CAP_H_ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" @@ -87,7 +87,7 @@ static void insert_cap_success(CapStatistics *stats); static void insert_cap_failure(CapStatistics *stats); static gboolean max_message_difference_cb(gpointer data); -/* Gaim Signal Handlers */ +/* Pidgin Signal Handlers */ /* sent-im-msg */ static void sent_im_msg(GaimAccount *account, const char *receiver, const char *message); /* received-im-msg */
--- a/pidgin/plugins/contact_priority.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/contact_priority.c Mon Feb 05 03:37:27 2007 +0000 @@ -19,7 +19,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkplugin.h" #include "gtkutils.h" #include "prefs.h" @@ -87,7 +87,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width(GTK_CONTAINER(ret), 12); - frame = gaim_gtk_make_frame(ret, _("Point values to use when...")); + frame = pidgin_make_frame(ret, _("Point values to use when...")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); @@ -127,7 +127,7 @@ g_signal_connect(G_OBJECT(check), "toggled", G_CALLBACK(pref_update), "/core/contact/last_match"); gtk_box_pack_start(GTK_BOX(hbox), check, FALSE, FALSE, 0); - frame = gaim_gtk_make_frame(ret, _("Point values to use for account...")); + frame = pidgin_make_frame(ret, _("Point values to use for account...")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); @@ -141,7 +141,7 @@ adj = gtk_adjustment_new(0, -500, 500, 1, 1, 1); spin = gtk_spin_button_new((GtkAdjustment *)adj, 1, 0); - optmenu = gaim_gtk_account_option_menu_new(NULL, TRUE, + optmenu = pidgin_account_option_menu_new(NULL, TRUE, G_CALLBACK(select_account), NULL, spin); gtk_box_pack_start(GTK_BOX(hbox), optmenu, FALSE, FALSE, 0); @@ -161,7 +161,7 @@ return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (Reserved) */ @@ -173,7 +173,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/convcolors.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/convcolors.c Mon Feb 05 03:37:27 2007 +0000 @@ -160,10 +160,10 @@ static gboolean plugin_load(GaimPlugin *plugin) { - gaim_signal_connect(gaim_gtk_conversations_get_handle(), + gaim_signal_connect(pidgin_conversations_get_handle(), "displaying-im-msg", plugin, GAIM_CALLBACK(displaying_msg), NULL); - gaim_signal_connect(gaim_gtk_conversations_get_handle(), + gaim_signal_connect(pidgin_conversations_get_handle(), "displaying-chat-msg", plugin, GAIM_CALLBACK(displaying_msg), NULL); return TRUE; @@ -271,15 +271,15 @@ g_snprintf(tmp, sizeof(tmp), "%s/format", formats[i].prefix); f = gaim_prefs_get_int(tmp); - frame = gaim_gtk_make_frame(ret, _(formats[i].text)); + frame = pidgin_make_frame(ret, _(formats[i].text)); vbox = gtk_vbox_new(FALSE, GAIM_HIG_BOX_SPACE); gtk_box_pack_start(GTK_BOX(frame), vbox, FALSE, FALSE, 0); hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - button = gaim_pixbuf_button_from_stock(" Color", GTK_STOCK_SELECT_COLOR, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(" Color", GTK_STOCK_SELECT_COLOR, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(set_color), formats[i].prefix); @@ -306,16 +306,16 @@ G_CALLBACK(toggle_underline), formats[i].prefix); } - frame = gaim_gtk_make_frame(ret, _("General")); - gaim_gtk_prefs_checkbox(_("Ignore incoming format"), PREF_IGNORE, frame); - gaim_gtk_prefs_checkbox(_("Apply in Chats"), PREF_CHATS, frame); - gaim_gtk_prefs_checkbox(_("Apply in IMs"), PREF_IMS, frame); + frame = pidgin_make_frame(ret, _("General")); + pidgin_prefs_checkbox(_("Ignore incoming format"), PREF_IGNORE, frame); + pidgin_prefs_checkbox(_("Apply in Chats"), PREF_CHATS, frame); + pidgin_prefs_checkbox(_("Apply in IMs"), PREF_IMS, frame); gtk_widget_show_all(ret); return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0, @@ -327,7 +327,7 @@ GAIM_MAJOR_VERSION, /* Gaim Major Version */ GAIM_MINOR_VERSION, /* Gaim Minor Version */ GAIM_PLUGIN_STANDARD, /* plugin type */ - GAIM_GTK_PLUGIN_TYPE, /* ui requirement */ + PIDGIN_PLUGIN_TYPE, /* ui requirement */ 0, /* flags */ NULL, /* dependencies */ GAIM_PRIORITY_DEFAULT, /* priority */
--- a/pidgin/plugins/crazychat/cc_gaim_plugin.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/crazychat/cc_gaim_plugin.c Mon Feb 05 03:37:27 2007 +0000 @@ -130,14 +130,14 @@ #define CRAZYCHAT_PLUGIN_ID "gtk-crazychat" -static GaimGtkPluginUiInfo ui_info = { +static PidginPluginUiInfo ui_info = { get_config_frame /**< get_config_frame */ }; static GaimPluginInfo info = { 2, /**< api_version */ GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */ @@ -292,7 +292,7 @@ gtk_container_set_border_width(GTK_CONTAINER(ret), 12); /* make the network configuration frame */ - frame = gaim_gtk_make_frame(ret, _("Network Configuration")); + frame = pidgin_make_frame(ret, _("Network Configuration")); gtk_widget_show(frame); /* add boxes for packing purposes */ @@ -326,7 +326,7 @@ gtk_widget_show(spinner); /* make the feature configuration frame */ - frame = gaim_gtk_make_frame(ret, _("Feature Calibration")); + frame = pidgin_make_frame(ret, _("Feature Calibration")); gtk_widget_show(frame); /* add hbox for packing purposes */ @@ -412,7 +412,7 @@ gaim_signal_disconnect (gaim_connections_get_handle(), "signed-on", plugin, GAIM_CALLBACK(cc_signed_on)); - gaim_signal_connect(GAIM_GTK_BLIST + gaim_signal_connect(PIDGIN_BLIST (gaim_get_blist()), "drawing-menu", plugin, GAIM_CALLBACK(cc_buddy_menu), NULL); @@ -435,7 +435,7 @@ cc_init(&cc_info); buddy_list = gaim_get_blist(); if (buddy_list) { - gaim_signal_connect(GAIM_GTK_BLIST + gaim_signal_connect(PIDGIN_BLIST (buddy_list), "drawing-menu", plugin, GAIM_CALLBACK(cc_buddy_menu), NULL); @@ -463,7 +463,7 @@ extra = (struct crazychat*) plugin->info->extra_info; cc_destroy(extra); conv_handle = gaim_conversations_get_handle(); - gaim_signal_disconnect(GAIM_GTK_BLIST + gaim_signal_disconnect(PIDGIN_BLIST (gaim_get_blist()), "drawing-menu", plugin, GAIM_CALLBACK(cc_buddy_menu));
--- a/pidgin/plugins/extplacement.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/extplacement.c Mon Feb 05 03:37:27 2007 +0000 @@ -21,7 +21,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" #include "version.h" #include "gtkplugin.h" @@ -29,47 +29,47 @@ #include "gtkconvwin.h" static void -conv_placement_by_number(GaimGtkConversation *conv) +conv_placement_by_number(PidginConversation *conv) { - GaimGtkWindow *win = NULL; + PidginWindow *win = NULL; GList *wins = NULL; if (gaim_prefs_get_bool("/plugins/gtk/extplacement/placement_number_separate")) - win = gaim_gtk_conv_window_last_with_type(gaim_conversation_get_type(conv->active_conv)); - else if ((wins = gaim_gtk_conv_windows_get_list()) != NULL) + win = pidgin_conv_window_last_with_type(gaim_conversation_get_type(conv->active_conv)); + else if ((wins = pidgin_conv_windows_get_list()) != NULL) win = g_list_last(wins)->data; if (win == NULL) { - win = gaim_gtk_conv_window_new(); + win = pidgin_conv_window_new(); - gaim_gtk_conv_window_add_gtkconv(win, conv); - gaim_gtk_conv_window_show(win); + pidgin_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_show(win); } else { int max_count = gaim_prefs_get_int("/plugins/gtk/extplacement/placement_number"); - int count = gaim_gtk_conv_window_get_gtkconv_count(win); + int count = pidgin_conv_window_get_gtkconv_count(win); if (count < max_count) - gaim_gtk_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_add_gtkconv(win, conv); else { GList *l = NULL; - for (l = gaim_gtk_conv_windows_get_list(); l != NULL; l = l->next) { + for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) { win = l->data; if (gaim_prefs_get_bool("/plugins/gtk/extplacement/placement_number_separate") && - gaim_conversation_get_type(gaim_gtk_conv_window_get_active_conversation(win)) != gaim_conversation_get_type(conv->active_conv)) + gaim_conversation_get_type(pidgin_conv_window_get_active_conversation(win)) != gaim_conversation_get_type(conv->active_conv)) continue; - count = gaim_gtk_conv_window_get_gtkconv_count(win); + count = pidgin_conv_window_get_gtkconv_count(win); if (count < max_count) { - gaim_gtk_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_add_gtkconv(win, conv); return; } } - win = gaim_gtk_conv_window_new(); + win = pidgin_conv_window_new(); - gaim_gtk_conv_window_add_gtkconv(win, conv); - gaim_gtk_conv_window_show(win); + pidgin_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_show(win); } } } @@ -77,7 +77,7 @@ static gboolean plugin_load(GaimPlugin *plugin) { - gaim_gtkconv_placement_add_fnc("number", _("By conversation count"), + pidgin_conv_placement_add_fnc("number", _("By conversation count"), &conv_placement_by_number); gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement"); return TRUE; @@ -86,7 +86,7 @@ static gboolean plugin_unload(GaimPlugin *plugin) { - gaim_gtkconv_placement_remove_fnc("number"); + pidgin_conv_placement_remove_fnc("number"); gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement"); return TRUE; } @@ -127,7 +127,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/gaiminc.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gaiminc.c Mon Feb 05 03:37:27 2007 +0000 @@ -6,7 +6,7 @@ #include "conversation.h" #include "version.h" -/* include UI for gaim_gtkdialogs_about() */ +/* include UI for pidgindialogs_about() */ #include "gtkplugin.h" #include "gtkdialogs.h" @@ -16,7 +16,7 @@ echo_hi(GaimConnection *gc) { /* this doesn't do much, just lets you know who we are :) */ - gaim_gtkdialogs_about(); + pidgindialogs_about(); } static gboolean
--- a/pidgin/plugins/gaimrc.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gaimrc.c Mon Feb 05 03:37:27 2007 +0000 @@ -59,18 +59,18 @@ static GtkWidget *widget_size_widgets[G_N_ELEMENTS(widget_size_prefs)]; static const char *font_prefs[] = { - "/plugins/gtk/gaimrc/font/*gaim_gtkconv_entry", - "/plugins/gtk/gaimrc/font/*gaim_gtkconv_imhtml", - "/plugins/gtk/gaimrc/font/*gaim_gtklog_imhtml", - "/plugins/gtk/gaimrc/font/*gaim_gtkrequest_imhtml", - "/plugins/gtk/gaimrc/font/*gaim_gtknotify_imhtml", + "/plugins/gtk/gaimrc/font/*pidgin_conv_entry", + "/plugins/gtk/gaimrc/font/*pidgin_conv_imhtml", + "/plugins/gtk/gaimrc/font/*pidginlog_imhtml", + "/plugins/gtk/gaimrc/font/*pidginrequest_imhtml", + "/plugins/gtk/gaimrc/font/*pidginnotify_imhtml", }; static const char *font_prefs_set[] = { - "/plugins/gtk/gaimrc/set/font/*gaim_gtkconv_entry", - "/plugins/gtk/gaimrc/set/font/*gaim_gtkconv_imhtml", - "/plugins/gtk/gaimrc/set/font/*gaim_gtklog_imhtml", - "/plugins/gtk/gaimrc/set/font/*gaim_gtkrequest_imhtml", - "/plugins/gtk/gaimrc/set/font/*gaim_gtknotify_imhtml", + "/plugins/gtk/gaimrc/set/font/*pidgin_conv_entry", + "/plugins/gtk/gaimrc/set/font/*pidgin_conv_imhtml", + "/plugins/gtk/gaimrc/set/font/*pidginlog_imhtml", + "/plugins/gtk/gaimrc/set/font/*pidginrequest_imhtml", + "/plugins/gtk/gaimrc/set/font/*pidginnotify_imhtml", }; static const char *font_names[] = { N_("Conversation Entry"), @@ -431,7 +431,7 @@ gaimrc_get_config_frame(GaimPlugin *plugin) { /* Note: Intentionally not using the size group argument to the - * gaim_gtk_prefs_labeled_* functions they only add the text label to + * pidgin_prefs_labeled_* functions they only add the text label to * the size group not the whole thing, which isn't what I want. */ int i; char *tmp; @@ -445,24 +445,24 @@ labelsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); widgetsg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); - frame = gaim_gtk_make_frame(ret, _("General")); + frame = pidgin_make_frame(ret, _("General")); /* interface font */ hbox = gtk_hbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); - check = gaim_gtk_prefs_checkbox(_("GTK+ Interface Font"), + check = pidgin_prefs_checkbox(_("GTK+ Interface Font"), "/plugins/gtk/gaimrc/set/gtk-font-name", hbox); gtk_size_group_add_widget(labelsg, check); - widget = gaim_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, - GAIM_BUTTON_HORIZONTAL); + widget = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 0); gtk_size_group_add_widget(widgetsg, widget); gtk_widget_set_sensitive(widget, gaim_prefs_get_bool("/plugins/gtk/gaimrc/set/gtk-font-name")); g_signal_connect(G_OBJECT(check), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), widget); + G_CALLBACK(pidgin_toggle_sensitive), widget); g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(gaimrc_set_font_special), NULL); @@ -470,12 +470,12 @@ hbox = gtk_hbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); - check = gaim_gtk_prefs_checkbox(_("GTK+ Text Shortcut Theme"), + check = pidgin_prefs_checkbox(_("GTK+ Text Shortcut Theme"), "/plugins/gtk/gaimrc/set/gtk-key-theme-name", hbox); gtk_size_group_add_widget(labelsg, check); - widget = gaim_gtk_prefs_labeled_entry(hbox, "", + widget = pidgin_prefs_labeled_entry(hbox, "", "/plugins/gtk/gaimrc/gtk-key-theme-name", NULL); /* @@ -484,96 +484,96 @@ gtk_widget_set_sensitive(widget, gaim_prefs_get_bool("/plugins/gtk/gaimrc/set/gtk-key-theme-name")); g_signal_connect(G_OBJECT(check), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), widget); + G_CALLBACK(pidgin_toggle_sensitive), widget); for (i = 0; i < G_N_ELEMENTS(widget_bool_prefs); i++) { hbox = gtk_hbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); - check = gaim_gtk_prefs_checkbox(_(widget_bool_names[i]), + check = pidgin_prefs_checkbox(_(widget_bool_names[i]), widget_bool_prefs_set[i], hbox); gtk_size_group_add_widget(labelsg, check); - widget_bool_widgets[i] = gaim_gtk_prefs_checkbox("", widget_bool_prefs[i], hbox); + widget_bool_widgets[i] = pidgin_prefs_checkbox("", widget_bool_prefs[i], hbox); /* gtk_size_group_add_widget(widgetsb, widget_bool_widgets[i]); */ gtk_widget_set_sensitive(widget_bool_widgets[i], gaim_prefs_get_bool(widget_bool_prefs_set[i])); g_signal_connect(G_OBJECT(check), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), + G_CALLBACK(pidgin_toggle_sensitive), widget_bool_widgets[i]); } - frame = gaim_gtk_make_frame(ret, _("Interface colors")); + frame = pidgin_make_frame(ret, _("Interface colors")); /* imhtml stuff */ for (i = 0; i < G_N_ELEMENTS(color_prefs); i++) { hbox = gtk_hbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); - check = gaim_gtk_prefs_checkbox(_(color_names[i]), + check = pidgin_prefs_checkbox(_(color_names[i]), color_prefs_set[i], hbox); gtk_size_group_add_widget(labelsg, check); - color_widgets[i] = gaim_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR, GAIM_BUTTON_HORIZONTAL); + color_widgets[i] = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_COLOR, PIDGIN_BUTTON_HORIZONTAL); gtk_size_group_add_widget(widgetsg, color_widgets[i]); gtk_box_pack_start(GTK_BOX(hbox), color_widgets[i], FALSE, FALSE, 0); gtk_widget_set_sensitive(color_widgets[i], gaim_prefs_get_bool(color_prefs_set[i])); g_signal_connect(G_OBJECT(check), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), + G_CALLBACK(pidgin_toggle_sensitive), color_widgets[i]); g_signal_connect(G_OBJECT(color_widgets[i]), "clicked", G_CALLBACK(gaimrc_set_color), GINT_TO_POINTER(i)); } - frame = gaim_gtk_make_frame(ret, _("Widget Sizes")); + frame = pidgin_make_frame(ret, _("Widget Sizes")); /* widget size stuff */ for (i = 0; i < G_N_ELEMENTS(widget_size_prefs); i++) { hbox = gtk_hbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); - check = gaim_gtk_prefs_checkbox(_(widget_size_names[i]), + check = pidgin_prefs_checkbox(_(widget_size_names[i]), widget_size_prefs_set[i], hbox); gtk_size_group_add_widget(labelsg, check); - widget_size_widgets[i] = gaim_gtk_prefs_labeled_spin_button(hbox, "", widget_size_prefs[i], 0, 50, NULL); + widget_size_widgets[i] = pidgin_prefs_labeled_spin_button(hbox, "", widget_size_prefs[i], 0, 50, NULL); /* gtk_size_group_add_widget(widgetsg, widget_size_widgets[i]); */ gtk_widget_set_sensitive(widget_size_widgets[i], gaim_prefs_get_bool(widget_size_prefs_set[i])); g_signal_connect(G_OBJECT(check), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), + G_CALLBACK(pidgin_toggle_sensitive), widget_size_widgets[i]); } - frame = gaim_gtk_make_frame(ret, _("Fonts")); + frame = pidgin_make_frame(ret, _("Fonts")); /* imhtml font stuff */ for (i = 0; i < G_N_ELEMENTS(font_prefs); i++) { hbox = gtk_hbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), hbox, FALSE, FALSE, 0); - check = gaim_gtk_prefs_checkbox(_(font_names[i]), + check = pidgin_prefs_checkbox(_(font_names[i]), font_prefs_set[i], hbox); gtk_size_group_add_widget(labelsg, check); - font_widgets[i] = gaim_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, GAIM_BUTTON_HORIZONTAL); + font_widgets[i] = pidgin_pixbuf_button_from_stock("", GTK_STOCK_SELECT_FONT, PIDGIN_BUTTON_HORIZONTAL); gtk_size_group_add_widget(widgetsg, font_widgets[i]); gtk_box_pack_start(GTK_BOX(hbox), font_widgets[i], FALSE, FALSE, 0); gtk_widget_set_sensitive(font_widgets[i], gaim_prefs_get_bool(font_prefs_set[i])); g_signal_connect(G_OBJECT(check), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), + G_CALLBACK(pidgin_toggle_sensitive), font_widgets[i]); g_signal_connect(G_OBJECT(font_widgets[i]), "clicked", G_CALLBACK(gaimrc_set_font), GINT_TO_POINTER(i)); } - frame = gaim_gtk_make_frame(ret, _("Tools")); + frame = pidgin_make_frame(ret, _("Tools")); vbox = gtk_vbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_box_pack_start(GTK_BOX(frame), vbox, FALSE, FALSE, 0); @@ -596,7 +596,7 @@ return ret; } -static GaimGtkPluginUiInfo gaimrc_ui_info = +static PidginPluginUiInfo gaimrc_ui_info = { gaimrc_get_config_frame, 0 /* page_num (Reserved) */ @@ -608,7 +608,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, - GAIM_GTK_PLUGIN_TYPE, + PIDGIN_PLUGIN_TYPE, 0, NULL, GAIM_PRIORITY_DEFAULT,
--- a/pidgin/plugins/gestures/gestures.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gestures/gestures.c Mon Feb 05 03:37:27 2007 +0000 @@ -19,7 +19,7 @@ * 02111-1307, USA. */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "debug.h" #include "prefs.h" @@ -38,7 +38,7 @@ stroke_close(GtkWidget *widget, void *data) { GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; conv = (GaimConversation *)data; @@ -46,14 +46,14 @@ if (!GAIM_IS_GTK_CONVERSATION(conv)) return; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gstroke_cleanup(gtkconv->imhtml); gaim_conversation_destroy(conv); } static void -switch_page(GaimGtkWindow *win, GtkDirectionType dir) +switch_page(PidginWindow *win, GtkDirectionType dir) { int count, current; @@ -81,11 +81,11 @@ stroke_prev_tab(GtkWidget *widget, void *data) { GaimConversation *conv; - GaimGtkConversation *gtkconv; - GaimGtkWindow *win; + PidginConversation *gtkconv; + PidginWindow *win; conv = (GaimConversation *)data; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); win = gtkconv->win; switch_page(win, GTK_DIR_LEFT); @@ -95,10 +95,10 @@ stroke_next_tab(GtkWidget *widget, void *data) { GaimConversation *conv; - GaimGtkWindow *win; + PidginWindow *win; conv = (GaimConversation *)data; - win = GAIM_GTK_CONVERSATION(conv)->win; + win = PIDGIN_CONVERSATION(conv)->win; switch_page(win, GTK_DIR_RIGHT); } @@ -106,29 +106,29 @@ static void stroke_new_win(GtkWidget *widget, void *data) { - GaimGtkWindow *new_win, *old_win; + PidginWindow *new_win, *old_win; GaimConversation *conv; conv = (GaimConversation *)data; - old_win = GAIM_GTK_CONVERSATION(conv)->win; + old_win = PIDGIN_CONVERSATION(conv)->win; - if (gaim_gtk_conv_window_get_gtkconv_count(old_win) <= 1) + if (pidgin_conv_window_get_gtkconv_count(old_win) <= 1) return; - new_win = gaim_gtk_conv_window_new(); + new_win = pidgin_conv_window_new(); - gaim_gtk_conv_window_remove_gtkconv(old_win, GAIM_GTK_CONVERSATION(conv)); - gaim_gtk_conv_window_add_gtkconv(new_win, GAIM_GTK_CONVERSATION(conv)); + pidgin_conv_window_remove_gtkconv(old_win, PIDGIN_CONVERSATION(conv)); + pidgin_conv_window_add_gtkconv(new_win, PIDGIN_CONVERSATION(conv)); - gaim_gtk_conv_window_show(new_win); + pidgin_conv_window_show(new_win); } static void attach_signals(GaimConversation *conv) { - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gstroke_enable(gtkconv->imhtml); gstroke_signal_connect(gtkconv->imhtml, "14789", stroke_close, conv); @@ -198,7 +198,7 @@ plugin_unload(GaimPlugin *plugin) { GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GList *l; for (l = gaim_get_conversations(); l != NULL; l = l->next) { @@ -207,7 +207,7 @@ if (!GAIM_IS_GTK_CONVERSATION(conv)) continue; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); gstroke_cleanup(gtkconv->imhtml); gstroke_disable(gtkconv->imhtml); @@ -232,7 +232,7 @@ gtk_container_set_border_width(GTK_CONTAINER(ret), 12); /* Configuration frame */ - vbox = gaim_gtk_make_frame(ret, _("Mouse Gestures Configuration")); + vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration")); #if 0 /* Mouse button drop-down menu */ @@ -268,7 +268,7 @@ return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (Reserved) */ @@ -280,7 +280,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/gevolution/add_buddy_dialog.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gevolution/add_buddy_dialog.c Mon Feb 05 03:37:27 2007 +0000 @@ -20,7 +20,7 @@ */ #include "internal.h" #include "gtkblist.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkutils.h" #include "debug.h" @@ -184,7 +184,7 @@ if (account == NULL) return; - pixbuf = gaim_gtk_create_prpl_icon(account, 0.5); + pixbuf = pidgin_create_prpl_icon(account, 0.5); for (l = list; l != NULL; l = l->next) { @@ -577,8 +577,8 @@ gtk_widget_show(bbox); /* "New Person" button */ - button = gaim_pixbuf_button_from_stock(_("New Person"), GTK_STOCK_NEW, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(_("New Person"), GTK_STOCK_NEW, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_show(button); @@ -594,8 +594,8 @@ G_CALLBACK(cancel_cb), dialog); /* "Select Buddy" button */ - button = gaim_pixbuf_button_from_stock(_("Select Buddy"), GTK_STOCK_APPLY, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(_("Select Buddy"), GTK_STOCK_APPLY, + PIDGIN_BUTTON_HORIZONTAL); dialog->select_button = button; gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_set_sensitive(button, FALSE); @@ -616,7 +616,7 @@ GdkPixbuf *pixbuf; GtkTreeIter iter; - pixbuf = gaim_gtk_create_prpl_icon(account, 0.5); + pixbuf = pidgin_create_prpl_icon(account, 0.5); gtk_list_store_append(dialog->model, &iter);
--- a/pidgin/plugins/gevolution/assoc-buddy.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gevolution/assoc-buddy.c Mon Feb 05 03:37:27 2007 +0000 @@ -21,7 +21,7 @@ #include "internal.h" #include "gtkblist.h" #include "gtkexpander.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkutils.h" #include "gtkimhtml.h" @@ -466,8 +466,8 @@ gtk_widget_show(bbox); /* "New Person" button */ - button = gaim_pixbuf_button_from_stock(_("New Person"), GTK_STOCK_NEW, - GAIM_BUTTON_HORIZONTAL); + button = pidgin_pixbuf_button_from_stock(_("New Person"), GTK_STOCK_NEW, + PIDGIN_BUTTON_HORIZONTAL); gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_show(button); @@ -483,9 +483,9 @@ G_CALLBACK(cancel_cb), dialog); /* "Associate Buddy" button */ - button = gaim_pixbuf_button_from_stock(_("_Associate Buddy"), + button = pidgin_pixbuf_button_from_stock(_("_Associate Buddy"), GTK_STOCK_APPLY, - GAIM_BUTTON_HORIZONTAL); + PIDGIN_BUTTON_HORIZONTAL); dialog->assoc_button = button; gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0); gtk_widget_set_sensitive(button, FALSE);
--- a/pidgin/plugins/gevolution/eds-utils.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gevolution/eds-utils.c Mon Feb 05 03:37:27 2007 +0000 @@ -21,7 +21,7 @@ #include "internal.h" #include "gtkblist.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkutils.h" #include "gtkimhtml.h"
--- a/pidgin/plugins/gevolution/gevo-util.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gevolution/gevo-util.c Mon Feb 05 03:37:27 2007 +0000 @@ -20,7 +20,7 @@ */ #include "internal.h" #include "gtkblist.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkutils.h" #include "gevolution.h"
--- a/pidgin/plugins/gevolution/gevolution.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gevolution/gevolution.c Mon Feb 05 03:37:27 2007 +0000 @@ -19,7 +19,7 @@ * 02111-1307, USA. */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "connection.h" #include "debug.h" @@ -408,7 +408,7 @@ gtk_container_set_border_width(GTK_CONTAINER(ret), 12); /* Configuration frame */ - vbox = gaim_gtk_make_frame(ret, _("Evolution Integration Configuration")); + vbox = pidgin_make_frame(ret, _("Evolution Integration Configuration")); /* Label */ label = gtk_label_new(_("Select all accounts that buddies should be " @@ -477,7 +477,7 @@ gtk_list_store_append(model, &iter); - pixbuf = gaim_gtk_create_prpl_icon(account, 0.5); + pixbuf = pidgin_create_prpl_icon(account, 0.5); if ((pixbuf != NULL) && (!gaim_account_is_connected(account))) gdk_pixbuf_saturate_and_pixelate(pixbuf, pixbuf, 0.0, FALSE); @@ -500,7 +500,7 @@ return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, /**< get_config_frame */ 0 /**< page_num */ @@ -512,7 +512,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/gevolution/new_person_dialog.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gevolution/new_person_dialog.c Mon Feb 05 03:37:27 2007 +0000 @@ -19,7 +19,7 @@ * 02111-1307, USA. */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkutils.h" #include "debug.h" @@ -285,7 +285,7 @@ { /* Add the account type stuff. */ dialog->accounts_menu = - gaim_gtk_account_option_menu_new(account, FALSE, + pidgin_account_option_menu_new(account, FALSE, G_CALLBACK(select_account_cb), NULL, dialog); add_pref_box(sg, vbox, _("Account type:"), dialog->accounts_menu);
--- a/pidgin/plugins/gtk-signals-test.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/gtk-signals-test.c Mon Feb 05 03:37:27 2007 +0000 @@ -56,7 +56,7 @@ * Conversation subsystem signal callbacks **************************************************************************/ static void -conversation_dragging_cb(GaimGtkWindow *source, GaimGtkWindow *destination) { +conversation_dragging_cb(PidginWindow *source, PidginWindow *destination) { gaim_debug_info("gtk-signal-test", "conversation dragging cb\n"); } @@ -109,9 +109,9 @@ static gboolean plugin_load(GaimPlugin *plugin) { - void *accounts_handle = gaim_gtk_account_get_handle(); - void *blist_handle = gaim_gtk_blist_get_handle(); - void *conv_handle = gaim_gtk_conversations_get_handle(); + void *accounts_handle = pidgin_account_get_handle(); + void *blist_handle = pidgin_blist_get_handle(); + void *conv_handle = pidgin_conversations_get_handle(); /* Accounts subsystem signals */ gaim_signal_connect(accounts_handle, "account-modified", @@ -151,7 +151,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/history.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/history.c Mon Feb 05 03:37:27 2007 +0000 @@ -2,7 +2,7 @@ * stolen by Trillian "Pro") */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" #include "debug.h" @@ -38,13 +38,13 @@ const char *alias = name; guint flags; char *history; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkIMHtmlOptions options = GTK_IMHTML_NO_COLOURS; char *header; char *protocol; convtype = gaim_conversation_get_type(c); - gtkconv = GAIM_GTK_CONVERSATION(c); + gtkconv = PIDGIN_CONVERSATION(c); if (convtype == GAIM_CONV_TYPE_IM && g_list_length(gtkconv->convs) < 2) { GSList *buddies; @@ -106,7 +106,7 @@ return; history = gaim_log_read((GaimLog*)logs->data, &flags); - gtkconv = GAIM_GTK_CONVERSATION(c); + gtkconv = PIDGIN_CONVERSATION(c); if (flags & GAIM_LOG_READ_NO_NEWLINE) options |= GTK_IMHTML_NO_NEWLINE; @@ -180,7 +180,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, - GAIM_GTK_PLUGIN_TYPE, + PIDGIN_PLUGIN_TYPE, 0, NULL, GAIM_PRIORITY_DEFAULT,
--- a/pidgin/plugins/iconaway.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/iconaway.c Mon Feb 05 03:37:27 2007 +0000 @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" #include "signals.h" @@ -34,7 +34,7 @@ iconify_windows(GaimAccount *account, GaimStatus *old, GaimStatus *newstatus) { GaimPresence *presence; - GaimGtkWindow *win; + PidginWindow *win; GList *windows; presence = gaim_status_get_presence(newstatus); @@ -44,11 +44,11 @@ gaim_blist_set_visible(FALSE); - for (windows = gaim_gtk_conv_windows_get_list(); + for (windows = pidgin_conv_windows_get_list(); windows != NULL; windows = windows->next) { - win = (GaimGtkWindow *)windows->data; + win = (PidginWindow *)windows->data; gtk_window_iconify(GTK_WINDOW(win->window)); } @@ -73,7 +73,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/mailchk.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/mailchk.c Mon Feb 05 03:37:27 2007 +0000 @@ -60,12 +60,12 @@ if (count == -1) return FALSE; - if (!list || !GAIM_IS_GTK_BLIST(list) || !(GAIM_GTK_BLIST(list)->vbox)) + if (!list || !GAIM_IS_GTK_BLIST(list) || !(PIDGIN_BLIST(list)->vbox)) return TRUE; if (!mail) { /* guess we better build it then :P */ - GtkWidget *vbox = GAIM_GTK_BLIST(list)->vbox; + GtkWidget *vbox = PIDGIN_BLIST(list)->vbox; mail = gtk_label_new("No mail messages."); gtk_box_pack_start(GTK_BOX(vbox), mail, FALSE, FALSE, 0); @@ -101,7 +101,7 @@ signoff_cb(GaimConnection *gc) { GaimBuddyList *list = gaim_get_blist(); - if ((!list || !GAIM_IS_GTK_BLIST(list) || !GAIM_GTK_BLIST(list)->vbox) && timer) { + if ((!list || !GAIM_IS_GTK_BLIST(list) || !PIDGIN_BLIST(list)->vbox) && timer) { g_source_remove(timer); timer = 0; } @@ -122,7 +122,7 @@ return FALSE; } - if (list && GAIM_IS_GTK_BLIST(list) && GAIM_GTK_BLIST(list)->vbox) + if (list && GAIM_IS_GTK_BLIST(list) && PIDGIN_BLIST(list)->vbox) timer = g_timeout_add(2000, check_timeout, NULL); gaim_signal_connect(conn_handle, "signed-on", @@ -152,7 +152,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, - GAIM_GTK_PLUGIN_TYPE, + PIDGIN_PLUGIN_TYPE, 0, NULL, GAIM_PRIORITY_DEFAULT,
--- a/pidgin/plugins/markerline.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/markerline.c Mon Feb 05 03:37:27 2007 +0000 @@ -42,7 +42,7 @@ #define PREF_CHATS PREF_PREFIX "/chats" static int -imhtml_expose_cb(GtkWidget *widget, GdkEventExpose *event, GaimGtkConversation *gtkconv) +imhtml_expose_cb(GtkWidget *widget, GdkEventExpose *event, PidginConversation *gtkconv) { int y, last_y, offset; GdkRectangle visible_rect; @@ -90,7 +90,7 @@ } static void -update_marker_for_gtkconv(GaimGtkConversation *gtkconv) +update_marker_for_gtkconv(PidginConversation *gtkconv) { GtkTextIter iter; GtkTextBuffer *buffer; @@ -109,15 +109,15 @@ } static gboolean -focus_removed(GtkWidget *widget, GdkEventVisibility *event, GaimGtkWindow *win) +focus_removed(GtkWidget *widget, GdkEventVisibility *event, PidginWindow *win) { GaimConversation *conv; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; - conv = gaim_gtk_conv_window_get_active_conversation(win); + conv = pidgin_conv_window_get_active_conversation(win); g_return_val_if_fail(conv != NULL, FALSE); - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); update_marker_for_gtkconv(gtkconv); return FALSE; @@ -125,11 +125,11 @@ #if 0 static gboolean -window_resized(GtkWidget *w, GdkEventConfigure *event, GaimGtkWindow *win) +window_resized(GtkWidget *w, GdkEventConfigure *event, PidginWindow *win) { GList *list; - list = gaim_gtk_conv_window_get_gtkconvs(win); + list = pidgin_conv_window_get_gtkconvs(win); for (; list; list = list->next) update_marker_for_gtkconv(list->data); @@ -138,7 +138,7 @@ } static gboolean -imhtml_resize_cb(GtkWidget *w, GtkAllocation *allocation, GaimGtkConversation *gtkconv) +imhtml_resize_cb(GtkWidget *w, GtkAllocation *allocation, PidginConversation *gtkconv) { gtk_widget_queue_draw(w); return FALSE; @@ -146,21 +146,21 @@ #endif static void -page_switched(GtkWidget *widget, GtkWidget *page, gint num, GaimGtkWindow *win) +page_switched(GtkWidget *widget, GtkWidget *page, gint num, PidginWindow *win) { focus_removed(NULL, NULL, win); } static void -detach_from_gtkconv(GaimGtkConversation *gtkconv, gpointer null) +detach_from_gtkconv(PidginConversation *gtkconv, gpointer null) { g_signal_handlers_disconnect_by_func(G_OBJECT(gtkconv->imhtml), imhtml_expose_cb, gtkconv); } static void -detach_from_gaim_gtk_window(GaimGtkWindow *win, gpointer null) +detach_from_pidgin_window(PidginWindow *win, gpointer null) { - g_list_foreach(gaim_gtk_conv_window_get_gtkconvs(win), (GFunc)detach_from_gtkconv, NULL); + g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)detach_from_gtkconv, NULL); g_signal_handlers_disconnect_by_func(G_OBJECT(win->notebook), page_switched, win); g_signal_handlers_disconnect_by_func(G_OBJECT(win->window), focus_removed, win); @@ -168,7 +168,7 @@ } static void -attach_to_gtkconv(GaimGtkConversation *gtkconv, gpointer null) +attach_to_gtkconv(PidginConversation *gtkconv, gpointer null) { detach_from_gtkconv(gtkconv, NULL); g_signal_connect(G_OBJECT(gtkconv->imhtml), "expose_event", @@ -176,9 +176,9 @@ } static void -attach_to_gaim_gtk_window(GaimGtkWindow *win, gpointer null) +attach_to_pidgin_window(PidginWindow *win, gpointer null) { - g_list_foreach(gaim_gtk_conv_window_get_gtkconvs(win), (GFunc)attach_to_gtkconv, NULL); + g_list_foreach(pidgin_conv_window_get_gtkconvs(win), (GFunc)attach_to_gtkconv, NULL); g_signal_connect(G_OBJECT(win->window), "focus_out_event", G_CALLBACK(focus_removed), win); @@ -192,28 +192,28 @@ static void detach_from_all_windows() { - g_list_foreach(gaim_gtk_conv_windows_get_list(), (GFunc)detach_from_gaim_gtk_window, NULL); + g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)detach_from_pidgin_window, NULL); } static void attach_to_all_windows() { - g_list_foreach(gaim_gtk_conv_windows_get_list(), (GFunc)attach_to_gaim_gtk_window, NULL); + g_list_foreach(pidgin_conv_windows_get_list(), (GFunc)attach_to_pidgin_window, NULL); } static void conv_created(GaimConversation *conv, gpointer null) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); - GaimGtkWindow *win; + PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv); + PidginWindow *win; if (!gtkconv) return; - win = gaim_gtkconv_get_window(gtkconv); + win = pidgin_conv_get_window(gtkconv); - detach_from_gaim_gtk_window(win, NULL); - attach_to_gaim_gtk_window(win, NULL); + detach_from_pidgin_window(win, NULL); + attach_to_pidgin_window(win, NULL); } static gboolean @@ -268,7 +268,7 @@ GAIM_MAJOR_VERSION, /* Gaim Major Version */ GAIM_MINOR_VERSION, /* Gaim Minor Version */ GAIM_PLUGIN_STANDARD, /* plugin type */ - GAIM_GTK_PLUGIN_TYPE, /* ui requirement */ + PIDGIN_PLUGIN_TYPE, /* ui requirement */ 0, /* flags */ NULL, /* dependencies */ GAIM_PRIORITY_DEFAULT, /* priority */
--- a/pidgin/plugins/musicmessaging/musicmessaging.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/musicmessaging/musicmessaging.c Mon Feb 05 03:37:27 2007 +0000 @@ -20,7 +20,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" @@ -597,8 +597,8 @@ gtk_widget_show(image); gtk_widget_show(button); - gtk_box_pack_start(GTK_BOX(GAIM_GTK_CONVERSATION(conv)->toolbar), sep, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(GAIM_GTK_CONVERSATION(conv)->toolbar), button, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(PIDGIN_CONVERSATION(conv)->toolbar), sep, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(PIDGIN_CONVERSATION(conv)->toolbar), button, FALSE, FALSE, 0); } static void remove_widget (GtkWidget *button) @@ -622,7 +622,7 @@ gtk_container_set_border_width(GTK_CONTAINER(ret), 10); /* Configuration frame */ - vbox = gaim_gtk_make_frame(ret, _("Music Messaging Configuration")); + vbox = pidgin_make_frame(ret, _("Music Messaging Configuration")); /* Path to the score editor */ editor_path = gtk_entry_new(); @@ -643,7 +643,7 @@ return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (reserved) */ @@ -654,7 +654,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/notify.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/notify.c Mon Feb 05 03:37:27 2007 +0000 @@ -84,7 +84,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "gtkprefs.h" #include "conversation.h" @@ -112,7 +112,7 @@ /* notification set/unset */ static int notify(GaimConversation *conv, gboolean increment); -static void notify_win(GaimGtkWindow *gaimwin); +static void notify_win(PidginWindow *gaimwin); static void unnotify(GaimConversation *conv, gboolean reset); static int unnotify_cb(GtkWidget *widget, gpointer data, GaimConversation *conv); @@ -127,31 +127,31 @@ static void apply_notify(void); /* string function */ -static void handle_string(GaimGtkWindow *gaimwin); +static void handle_string(PidginWindow *gaimwin); /* count_title function */ -static void handle_count_title(GaimGtkWindow *gaimwin); +static void handle_count_title(PidginWindow *gaimwin); /* count_xprop function */ -static void handle_count_xprop(GaimGtkWindow *gaimwin); +static void handle_count_xprop(PidginWindow *gaimwin); /* urgent function */ -static void handle_urgent(GaimGtkWindow *gaimwin, gboolean set); +static void handle_urgent(PidginWindow *gaimwin, gboolean set); /* raise function */ -static void handle_raise(GaimGtkWindow *gaimwin); +static void handle_raise(PidginWindow *gaimwin); /****************************************/ /* Begin doing stuff below this line... */ /****************************************/ static guint -count_messages(GaimGtkWindow *gaimwin) +count_messages(PidginWindow *gaimwin) { guint count = 0; GList *convs = NULL, *l; for (convs = gaimwin->gtkconvs; convs != NULL; convs = convs->next) { - GaimGtkConversation *conv = convs->data; + PidginConversation *conv = convs->data; for (l = conv->convs; l != NULL; l = l->next) { count += GPOINTER_TO_INT(gaim_conversation_get_data(l->data, "notify-message-count")); } @@ -165,7 +165,7 @@ { gint count; gboolean has_focus; - GaimGtkWindow *gaimwin = NULL; + PidginWindow *gaimwin = NULL; if (conv == NULL) return 0; @@ -173,7 +173,7 @@ /* We want to remove the notifications, but not reset the counter */ unnotify(conv, FALSE); - gaimwin = GAIM_GTK_CONVERSATION(conv)->win; + gaimwin = PIDGIN_CONVERSATION(conv)->win; /* If we aren't doing notifications for this type of conversation, return */ if (((gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_IM) && @@ -200,7 +200,7 @@ } static void -notify_win(GaimGtkWindow *gaimwin) +notify_win(PidginWindow *gaimwin) { if (count_messages(gaimwin) <= 0) return; @@ -221,12 +221,12 @@ unnotify(GaimConversation *conv, gboolean reset) { GaimConversation *active_conv = NULL; - GaimGtkWindow *gaimwin = NULL; + PidginWindow *gaimwin = NULL; g_return_if_fail(conv != NULL); - gaimwin = GAIM_GTK_CONVERSATION(conv)->win; - active_conv = gaim_gtk_conv_window_get_active_conversation(gaimwin); + gaimwin = PIDGIN_CONVERSATION(conv)->win; + active_conv = pidgin_conv_window_get_active_conversation(gaimwin); /* reset the conversation window title */ gaim_conversation_autoset_title(active_conv); @@ -295,12 +295,12 @@ static int attach_signals(GaimConversation *conv) { - GaimGtkConversation *gtkconv = NULL; - GaimGtkWindow *gtkwin = NULL; + PidginConversation *gtkconv = NULL; + PidginWindow *gtkwin = NULL; GSList *imhtml_ids = NULL, *entry_ids = NULL; guint id; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); if (!gtkconv) { gaim_debug_misc("notify", "Failed to find gtkconv\n"); return 0; @@ -350,11 +350,11 @@ static void detach_signals(GaimConversation *conv) { - GaimGtkConversation *gtkconv = NULL; - GaimGtkWindow *gtkwin = NULL; + PidginConversation *gtkconv = NULL; + PidginWindow *gtkwin = NULL; GSList *ids = NULL, *l; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); if (!gtkconv) return; gtkwin = gtkconv->win; @@ -390,7 +390,7 @@ conv_switched(GaimConversation *conv) { #if 0 - GaimGtkWindow *gaimwin = gaim_conversation_get_window(new_conv); + PidginWindow *gaimwin = gaim_conversation_get_window(new_conv); #endif /* @@ -416,11 +416,11 @@ static void deleting_conv(GaimConversation *conv) { - GaimGtkWindow *gaimwin = NULL; + PidginWindow *gaimwin = NULL; detach_signals(conv); - gaimwin = GAIM_GTK_CONVERSATION(conv)->win; + gaimwin = PIDGIN_CONVERSATION(conv)->win; handle_urgent(gaimwin, FALSE); gaim_conversation_set_data(conv, "notify-message-count", GINT_TO_POINTER(0)); @@ -437,8 +437,8 @@ #if 0 static void conversation_dragging(GaimConversation *active_conv, - GaimGtkWindow *old_gaimwin, - GaimGtkWindow *new_gaimwin) + PidginWindow *old_gaimwin, + PidginWindow *new_gaimwin) { if (old_gaimwin != new_gaimwin) { if (old_gaimwin == NULL) { @@ -484,7 +484,7 @@ #endif static void -handle_string(GaimGtkWindow *gaimwin) +handle_string(PidginWindow *gaimwin) { GtkWindow *window = NULL; gchar newtitle[256]; @@ -501,7 +501,7 @@ } static void -handle_count_title(GaimGtkWindow *gaimwin) +handle_count_title(PidginWindow *gaimwin) { GtkWindow *window; char newtitle[256]; @@ -517,7 +517,7 @@ } static void -handle_count_xprop(GaimGtkWindow *gaimwin) +handle_count_xprop(PidginWindow *gaimwin) { #ifndef _WIN32 guint count; @@ -528,7 +528,7 @@ g_return_if_fail(window != NULL); if (_GaimUnseenCount == GDK_NONE) { - _GaimUnseenCount = gdk_atom_intern("_GAIM_UNSEEN_COUNT", FALSE); + _GaimUnseenCount = gdk_atom_intern("_PIDGIN_UNSEEN_COUNT", FALSE); } if (_Cardinal == GDK_NONE) { @@ -544,17 +544,17 @@ } static void -handle_urgent(GaimGtkWindow *win, gboolean set) +handle_urgent(PidginWindow *win, gboolean set) { #ifndef _WIN32 - gaim_gtk_set_urgent(GTK_WINDOW(win->window), set); + pidgin_set_urgent(GTK_WINDOW(win->window), set); #endif } static void -handle_raise(GaimGtkWindow *gaimwin) +handle_raise(PidginWindow *gaimwin) { - gaim_gtk_conv_window_raise(gaimwin); + pidgin_conv_window_raise(gaimwin); } static void @@ -625,7 +625,7 @@ apply_method() { GList *convs; - GaimGtkWindow *gaimwin = NULL; + PidginWindow *gaimwin = NULL; for (convs = gaim_get_conversations(); convs != NULL; convs = convs->next) { @@ -634,7 +634,7 @@ /* remove notifications */ unnotify(conv, FALSE); - gaimwin = GAIM_GTK_CONVERSATION(conv)->win; + gaimwin = PIDGIN_CONVERSATION(conv)->win; if (GPOINTER_TO_INT(gaim_conversation_get_data(conv, "notify-message-count")) != 0) /* reattach appropriate notifications */ notify(conv, FALSE); @@ -669,7 +669,7 @@ gtk_container_set_border_width(GTK_CONTAINER (ret), 12); /*---------- "Notify For" ----------*/ - frame = gaim_gtk_make_frame(ret, _("Notify For")); + frame = pidgin_make_frame(ret, _("Notify For")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); @@ -696,7 +696,7 @@ G_CALLBACK(type_toggle_cb), "type_chat_nick"); gtk_widget_set_sensitive(toggle, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ref))); g_signal_connect(G_OBJECT(ref), "toggled", - G_CALLBACK(gaim_gtk_toggle_sensitive), toggle); + G_CALLBACK(pidgin_toggle_sensitive), toggle); toggle = gtk_check_button_new_with_mnemonic(_("_Focused windows")); gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); @@ -706,7 +706,7 @@ G_CALLBACK(type_toggle_cb), "type_focused"); /*---------- "Notification Methods" ----------*/ - frame = gaim_gtk_make_frame(ret, _("Notification Methods")); + frame = pidgin_make_frame(ret, _("Notification Methods")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); @@ -766,7 +766,7 @@ G_CALLBACK(method_toggle_cb), "method_raise"); /*---------- "Notification Removals" ----------*/ - frame = gaim_gtk_make_frame(ret, _("Notification Removal")); + frame = pidgin_make_frame(ret, _("Notification Removal")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); @@ -820,7 +820,7 @@ { GList *convs = gaim_get_conversations(); void *conv_handle = gaim_conversations_get_handle(); - void *gtk_conv_handle = gaim_gtk_conversations_get_handle(); + void *gtk_conv_handle = pidgin_conversations_get_handle(); my_plugin = plugin; @@ -874,7 +874,7 @@ return TRUE; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (Reserved) */ @@ -886,7 +886,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/perl/common/GtkAccount.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkAccount.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,24 +1,24 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Account PACKAGE = Gaim::GtkUI::Account PREFIX = gaim_gtk_account_ +MODULE = Pidgin::Account PACKAGE = Pidgin::Account PREFIX = pidgin_account_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_account_get_handle() +pidgin_account_get_handle() -MODULE = Gaim::GtkUI::Account PACKAGE = Gaim::GtkUI::Account::Dialog PREFIX = gaim_gtk_account_dialog_ +MODULE = Pidgin::Account PACKAGE = Pidgin::Account::Dialog PREFIX = pidgin_account_dialog_ PROTOTYPES: ENABLE void -gaim_gtk_account_dialog_show(type, account) - Gaim::GtkUI::Account::Dialog::Type type +pidgin_account_dialog_show(type, account) + Pidgin::Account::Dialog::Type type Gaim::Account account -MODULE = Gaim::GtkUI::Account PACKAGE = Gaim::GtkUI::Account::Window PREFIX = gaim_gtk_accounts_window_ +MODULE = Pidgin::Account PACKAGE = Pidgin::Account::Window PREFIX = pidgin_accounts_window_ PROTOTYPES: ENABLE void -gaim_gtk_accounts_window_show() +pidgin_accounts_window_show() void -gaim_gtk_accounts_window_hide() +pidgin_accounts_window_hide()
--- a/pidgin/plugins/perl/common/GtkBlist.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkBlist.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,76 +1,76 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::BuddyList PACKAGE = Gaim::GtkUI::BuddyList PREFIX = gaim_gtk_blist_ +MODULE = Pidgin::BuddyList PACKAGE = Pidgin::BuddyList PREFIX = pidgin_blist_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_blist_get_handle() +pidgin_blist_get_handle() -Gaim::GtkUI::BuddyList -gaim_gtk_blist_get_default_gtk_blist() +Pidgin::BuddyList +pidgin_blist_get_default_gtk_blist() void -gaim_gtk_blist_refresh(list) +pidgin_blist_refresh(list) Gaim::BuddyList list void -gaim_gtk_blist_update_refresh_timeout() +pidgin_blist_update_refresh_timeout() gboolean -gaim_gtk_blist_node_is_contact_expanded(node) +pidgin_blist_node_is_contact_expanded(node) Gaim::BuddyList::Node node void -gaim_gtk_blist_toggle_visibility() +pidgin_blist_toggle_visibility() void -gaim_gtk_blist_visibility_manager_add() +pidgin_blist_visibility_manager_add() void -gaim_gtk_blist_visibility_manager_remove() +pidgin_blist_visibility_manager_remove() void -gaim_gtk_blist_get_sort_methods() +pidgin_blist_get_sort_methods() PREINIT: GList *l; PPCODE: - for (l = gaim_gtk_blist_get_sort_methods(); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::GtkUI::BuddyList::SortMethod"))); + for (l = pidgin_blist_get_sort_methods(); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Pidgin::BuddyList::SortMethod"))); } void -gaim_gtk_blist_sort_method_reg(id, name, func) +pidgin_blist_sort_method_reg(id, name, func) const char * id const char * name - Gaim::GtkUI::BuddyList::SortFunction func + Pidgin::BuddyList::SortFunction func void -gaim_gtk_blist_sort_method_unreg(id) +pidgin_blist_sort_method_unreg(id) const char * id void -gaim_gtk_blist_sort_method_set(id) +pidgin_blist_sort_method_set(id) const char * id void -gaim_gtk_blist_setup_sort_methods() +pidgin_blist_setup_sort_methods() void -gaim_gtk_blist_update_accounts_menu() +pidgin_blist_update_accounts_menu() void -gaim_gtk_blist_update_plugin_actions() +pidgin_blist_update_plugin_actions() void -gaim_gtk_blist_update_sort_methods() +pidgin_blist_update_sort_methods() gboolean -gaim_gtk_blist_joinchat_is_showable() +pidgin_blist_joinchat_is_showable() void -gaim_gtk_blist_joinchat_show() +pidgin_blist_joinchat_show() void -gaim_gtk_blist_update_account_error_state(account, message) +pidgin_blist_update_account_error_state(account, message) Gaim::Account account const char * message
--- a/pidgin/plugins/perl/common/GtkConn.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkConn.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,7 +1,7 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Connection PACKAGE = Gaim::GtkUI::Connection PREFIX = gaim_gtk_connection_ +MODULE = Pidgin::Connection PACKAGE = Pidgin::Connection PREFIX = pidgin_connection_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_connection_get_handle() +pidgin_connection_get_handle()
--- a/pidgin/plugins/perl/common/GtkConv.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkConv.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,56 +1,56 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Conversation PACKAGE = Gaim::GtkUI::Conversation PREFIX = gaim_gtkconv_ +MODULE = Pidgin::Conversation PACKAGE = Pidgin::Conversation PREFIX = pidgin_conv_ PROTOTYPES: ENABLE void -gaim_gtkconv_update_buddy_icon(conv) +pidgin_conv_update_buddy_icon(conv) Gaim::Conversation conv void -gaim_gtkconv_switch_active_conversation(conv) +pidgin_conv_switch_active_conversation(conv) Gaim::Conversation conv void -gaim_gtkconv_update_buttons_by_protocol(conv) +pidgin_conv_update_buttons_by_protocol(conv) Gaim::Conversation conv void -gaim_gtkconv_present_conversation(conv) +pidgin_conv_present_conversation(conv) Gaim::Conversation conv -Gaim::GtkUI::Conversation::Window -gaim_gtkconv_get_window(conv) - Gaim::GtkUI::Conversation conv +Pidgin::Conversation::Window +pidgin_conv_get_window(conv) + Pidgin::Conversation conv void -gaim_gtkconv_new(class, conv) +pidgin_conv_new(class, conv) Gaim::Conversation conv C_ARGS: conv gboolean -gaim_gtkconv_is_hidden(gtkconv) - Gaim::GtkUI::Conversation gtkconv +pidgin_conv_is_hidden(gtkconv) + Pidgin::Conversation gtkconv void -gaim_gtkconv_get_gtkconv(conv) +pidgin_conv_get_gtkconv(conv) Gaim::Conversation conv PPCODE: if (conv != NULL && GAIM_IS_GTK_CONVERSATION(conv)) XPUSHs(sv_2mortal(gaim_perl_bless_object( - GAIM_GTK_CONVERSATION(conv), - "Gaim::GtkUI::Conversation"))); + PIDGIN_CONVERSATION(conv), + "Pidgin::Conversation"))); -MODULE = Gaim::GtkUI::Conversation PACKAGE = Gaim::GtkUI::Conversations PREFIX = gaim_gtk_conversations_ +MODULE = Pidgin::Conversation PACKAGE = Pidgin::Conversations PREFIX = pidgin_conversations_ PROTOTYPES: ENABLE void -gaim_gtk_conversations_find_unseen_list(type, min_state, hidden_only, max_count) +pidgin_conversations_find_unseen_list(type, min_state, hidden_only, max_count) Gaim::ConversationType type Gaim::UnseenState min_state gboolean hidden_only guint max_count Gaim::Handle -gaim_gtk_conversations_get_handle() +pidgin_conversations_get_handle()
--- a/pidgin/plugins/perl/common/GtkConvWin.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkConvWin.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,140 +1,140 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Conversation::Window PACKAGE = Gaim::GtkUI::Conversation::Window PREFIX = gaim_gtk_conv_window_ +MODULE = Pidgin::Conversation::Window PACKAGE = Pidgin::Conversation::Window PREFIX = pidgin_conv_window_ PROTOTYPES: ENABLE -Gaim::GtkUI::Conversation::Window -gaim_gtk_conv_window_new(class) +Pidgin::Conversation::Window +pidgin_conv_window_new(class) C_ARGS: /* void */ void -gaim_gtk_conv_window_destroy(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_destroy(win) + Pidgin::Conversation::Window win void -gaim_gtk_conv_window_show(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_show(win) + Pidgin::Conversation::Window win void -gaim_gtk_conv_window_hide(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_hide(win) + Pidgin::Conversation::Window win void -gaim_gtk_conv_window_raise(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_raise(win) + Pidgin::Conversation::Window win void -gaim_gtk_conv_window_switch_gtkconv(win, gtkconv) - Gaim::GtkUI::Conversation::Window win - Gaim::GtkUI::Conversation gtkconv +pidgin_conv_window_switch_gtkconv(win, gtkconv) + Pidgin::Conversation::Window win + Pidgin::Conversation gtkconv void -gaim_gtk_conv_window_add_gtkconv(win, gtkconv) - Gaim::GtkUI::Conversation::Window win - Gaim::GtkUI::Conversation gtkconv +pidgin_conv_window_add_gtkconv(win, gtkconv) + Pidgin::Conversation::Window win + Pidgin::Conversation gtkconv void -gaim_gtk_conv_window_remove_gtkconv(win, gtkconv) - Gaim::GtkUI::Conversation::Window win - Gaim::GtkUI::Conversation gtkconv +pidgin_conv_window_remove_gtkconv(win, gtkconv) + Pidgin::Conversation::Window win + Pidgin::Conversation gtkconv -Gaim::GtkUI::Conversation -gaim_gtk_conv_window_get_gtkconv_at_index(win, index) - Gaim::GtkUI::Conversation::Window win +Pidgin::Conversation +pidgin_conv_window_get_gtkconv_at_index(win, index) + Pidgin::Conversation::Window win int index -Gaim::GtkUI::Conversation -gaim_gtk_conv_window_get_active_gtkconv(win) - Gaim::GtkUI::Conversation::Window win +Pidgin::Conversation +pidgin_conv_window_get_active_gtkconv(win) + Pidgin::Conversation::Window win Gaim::Conversation -gaim_gtk_conv_window_get_active_conversation(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_get_active_conversation(win) + Pidgin::Conversation::Window win gboolean -gaim_gtk_conv_window_is_active_conversation(conv) +pidgin_conv_window_is_active_conversation(conv) Gaim::Conversation conv gboolean -gaim_gtk_conv_window_has_focus(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_has_focus(win) + Pidgin::Conversation::Window win -Gaim::GtkUI::Conversation::Window -gaim_gtk_conv_window_get_at_xy(x, y) +Pidgin::Conversation::Window +pidgin_conv_window_get_at_xy(x, y) int x int y void -gaim_gtk_conv_window_get_gtkconvs(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_get_gtkconvs(win) + Pidgin::Conversation::Window win PREINIT: GList *l; PPCODE: - for (l = gaim_gtk_conv_window_get_gtkconvs(win); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::GtkUI::Conversation"))); + for (l = pidgin_conv_window_get_gtkconvs(win); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Pidgin::Conversation"))); } guint -gaim_gtk_conv_window_get_gtkconv_count(win) - Gaim::GtkUI::Conversation::Window win +pidgin_conv_window_get_gtkconv_count(win) + Pidgin::Conversation::Window win -Gaim::GtkUI::Conversation::Window -gaim_gtk_conv_window_first_with_type(type) +Pidgin::Conversation::Window +pidgin_conv_window_first_with_type(type) Gaim::ConversationType type -Gaim::GtkUI::Conversation::Window -gaim_gtk_conv_window_last_with_type(type) +Pidgin::Conversation::Window +pidgin_conv_window_last_with_type(type) Gaim::ConversationType type -MODULE = Gaim::GtkUI::Conversation::Window PACKAGE = Gaim::GtkUI::Conversation::Placement PREFIX = gaim_gtkconv_placement_ +MODULE = Pidgin::Conversation::Window PACKAGE = Pidgin::Conversation::Placement PREFIX = pidgin_conv_placement_ PROTOTYPES: ENABLE void -gaim_gtkconv_placement_get_options() +pidgin_conv_placement_get_options() PREINIT: GList *l; PPCODE: - for (l = gaim_gtkconv_placement_get_options(); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::GtkUI::Conversation::Window"))); + for (l = pidgin_conv_placement_get_options(); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Pidgin::Conversation::Window"))); } void -gaim_gtkconv_placement_add_fnc(id, name, fnc) +pidgin_conv_placement_add_fnc(id, name, fnc) const char * id const char * name Gaim::Conversation::PlacementFunc fnc void -gaim_gtkconv_placement_remove_fnc(id) +pidgin_conv_placement_remove_fnc(id) const char * id const char * -gaim_gtkconv_placement_get_name(id) +pidgin_conv_placement_get_name(id) const char * id Gaim::Conversation::PlacementFunc -gaim_gtkconv_placement_get_fnc(id) +pidgin_conv_placement_get_fnc(id) const char * id void -gaim_gtkconv_placement_set_current_func(func) +pidgin_conv_placement_set_current_func(func) Gaim::Conversation::PlacementFunc func Gaim::Conversation::PlacementFunc -gaim_gtkconv_placement_get_current_func() +pidgin_conv_placement_get_current_func() void -gaim_gtkconv_placement_place(gtkconv) - Gaim::GtkUI::Conversation gtkconv +pidgin_conv_placement_place(gtkconv) + Pidgin::Conversation gtkconv -MODULE = Gaim::GtkUI::Conversation::Window PACKAGE = Gaim::GtkUI::Conversation::Windows PREFIX = gaim_gtk_conv_windows_ +MODULE = Pidgin::Conversation::Window PACKAGE = Pidgin::Conversation::Windows PREFIX = pidgin_conv_windows_ PROTOTYPES: ENABLE void -gaim_gtk_conv_windows_get_list() +pidgin_conv_windows_get_list() PREINIT: GList *l; PPCODE: - for (l = gaim_gtk_conv_windows_get_list(); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::GtkUI::Conversation::Window"))); + for (l = pidgin_conv_windows_get_list(); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Pidgin::Conversation::Window"))); }
--- a/pidgin/plugins/perl/common/GtkDebug.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkDebug.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,16 +1,16 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Debug PACKAGE = Gaim::GtkUI::Debug PREFIX = gaim_gtk_debug_ +MODULE = Pidgin::Debug PACKAGE = Pidgin::Debug PREFIX = pidgin_debug_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_debug_get_handle() +pidgin_debug_get_handle() -MODULE = Gaim::GtkUI::Debug PACKAGE = Gaim::GtkUI::Debug::Window PREFIX = gaim_gtk_debug_window_ +MODULE = Pidgin::Debug PACKAGE = Pidgin::Debug::Window PREFIX = pidgin_debug_window_ PROTOTYPES: ENABLE void -gaim_gtk_debug_window_show() +pidgin_debug_window_show() void -gaim_gtk_debug_window_hide() +pidgin_debug_window_hide()
--- a/pidgin/plugins/perl/common/GtkDialogs.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkDialogs.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,52 +1,52 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Dialogs PACKAGE = Gaim::GtkUI::Dialogs PREFIX = gaim_gtkdialogs_ +MODULE = Pidgin::Dialogs PACKAGE = Pidgin::Dialogs PREFIX = pidgindialogs_ PROTOTYPES: ENABLE void -gaim_gtkdialogs_destroy_all() +pidgindialogs_destroy_all() void -gaim_gtkdialogs_about() +pidgindialogs_about() void -gaim_gtkdialogs_im() +pidgindialogs_im() void -gaim_gtkdialogs_im_with_user(account, username) +pidgindialogs_im_with_user(account, username) Gaim::Account account const char * username void -gaim_gtkdialogs_info() +pidgindialogs_info() void -gaim_gtkdialogs_log() +pidgindialogs_log() void -gaim_gtkdialogs_alias_contact(contact) +pidgindialogs_alias_contact(contact) Gaim::BuddyList::Contact contact void -gaim_gtkdialogs_alias_buddy(buddy) +pidgindialogs_alias_buddy(buddy) Gaim::BuddyList::Buddy buddy void -gaim_gtkdialogs_alias_chat(chat) +pidgindialogs_alias_chat(chat) Gaim::BuddyList::Chat chat void -gaim_gtkdialogs_remove_buddy(buddy) +pidgindialogs_remove_buddy(buddy) Gaim::BuddyList::Buddy buddy void -gaim_gtkdialogs_remove_group(group) +pidgindialogs_remove_group(group) Gaim::BuddyList::Group group void -gaim_gtkdialogs_remove_chat(chat) +pidgindialogs_remove_chat(chat) Gaim::BuddyList::Chat chat void -gaim_gtkdialogs_remove_contact(contact) +pidgindialogs_remove_contact(contact) Gaim::BuddyList::Contact contact
--- a/pidgin/plugins/perl/common/GtkFt.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkFt.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,50 +1,50 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Xfer PACKAGE = Gaim::GtkUI::Xfer PREFIX = gaim_gtk_xfer_ +MODULE = Pidgin::Xfer PACKAGE = Pidgin::Xfer PREFIX = pidgin_xfer_ PROTOTYPES: ENABLE void gaim_set_gtkxfer_dialog(dialog) - Gaim::GtkUI::Xfer::Dialog dialog + Pidgin::Xfer::Dialog dialog -Gaim::GtkUI::Xfer::Dialog +Pidgin::Xfer::Dialog gaim_get_gtkxfer_dialog() -MODULE = Gaim::GtkUI::Xfer PACKAGE = Gaim::GtkUI::Xfer::Dialog PREFIX = gaim_gtkxfer_dialog_ +MODULE = Pidgin::Xfer PACKAGE = Pidgin::Xfer::Dialog PREFIX = pidginxfer_dialog_ PROTOTYPES: ENABLE -Gaim::GtkUI::Xfer::Dialog -gaim_gtkxfer_dialog_new(class) +Pidgin::Xfer::Dialog +pidginxfer_dialog_new(class) C_ARGS: /* void */ void -gaim_gtkxfer_dialog_destroy(dialog) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_destroy(dialog) + Pidgin::Xfer::Dialog dialog void -gaim_gtkxfer_dialog_show(dialog = NULL) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_show(dialog = NULL) + Pidgin::Xfer::Dialog dialog void -gaim_gtkxfer_dialog_hide(dialog) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_hide(dialog) + Pidgin::Xfer::Dialog dialog void -gaim_gtkxfer_dialog_add_xfer(dialog, xfer) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_add_xfer(dialog, xfer) + Pidgin::Xfer::Dialog dialog Gaim::Xfer xfer void -gaim_gtkxfer_dialog_remove_xfer(dialog, xfer) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_remove_xfer(dialog, xfer) + Pidgin::Xfer::Dialog dialog Gaim::Xfer xfer void -gaim_gtkxfer_dialog_cancel_xfer(dialog, xfer) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_cancel_xfer(dialog, xfer) + Pidgin::Xfer::Dialog dialog Gaim::Xfer xfer void -gaim_gtkxfer_dialog_update_xfer(dialog, xfer) - Gaim::GtkUI::Xfer::Dialog dialog +pidginxfer_dialog_update_xfer(dialog, xfer) + Pidgin::Xfer::Dialog dialog Gaim::Xfer xfer
--- a/pidgin/plugins/perl/common/GtkIMHtml.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkIMHtml.xs Mon Feb 05 03:37:27 2007 +0000 @@ -13,9 +13,9 @@ * about doing that. void gtk_imhtml_insert_html_at_iter(imhtml, text, options, iter) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * text - Gaim::GtkUI::IMHtml::Options options + Pidgin::IMHtml::Options options Gtk::TextIter iter */ @@ -24,7 +24,7 @@ * about doing that. void gtk_imhtml_delete(imhtml, start, end) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml Gtk::TextIter start Gtk::TextIter end */ @@ -34,7 +34,7 @@ * about doing that. void gtk_imhtml_insert_link(imhtml, mark, url, text) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml Gtk::TextMark mark const char * url const char * text @@ -45,14 +45,14 @@ * about doing that. void gtk_imhtml_insert_smiley_at_iter(imhtml, sml, smiley, iter) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * sml char * smiley Gtk::TextIter iter void gtk_imhtml_insert_image_at_iter(imhtml, id, iter) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml int id Gtk::TextIter iter */ @@ -62,7 +62,7 @@ * about doing that. gchar_own * gtk_imhtml_get_markup_range(imhtml, start, end) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml Gtk::TextIter start Gtk::TextIter end */ @@ -72,7 +72,7 @@ * about doing that. gchar_own * gtk_imhtml_get_text(imhtml, start, end) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml Gtk::TextIter start Gtk::TextIter end */ @@ -80,7 +80,7 @@ /* This can't work at the moment since I don't have a typemap for Gdk::Pixbuf. * I thought about using the one from libgtk2-perl but wasn't sure how to go * about doing that. -Gaim::GtkUI::IMHtml::Scalable +Pidgin::IMHtml::Scalable gtk_imhtml_image_new(img, filename, id) Gdk::Pixbuf img const gchar * filename @@ -92,8 +92,8 @@ * about doing that. void gtk_imhtml_image_add_to(scale, imhtml, iter) - Gaim::GtkUI::IMHtml::Scalable scale - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml::Scalable scale + Pidgin::IMHtml imhtml Gtk::TextIter iter */ @@ -102,69 +102,69 @@ * about doing that. void gtk_imhtml_hr_add_to(scale, imhtml, iter) - Gaim::GtkUI::IMHtml::Scalable scale - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml::Scalable scale + Pidgin::IMHtml imhtml Gtk::TextIter iter */ /* This can't work at the moment since I don't have a typemap for gboolean *. void gtk_imhtml_get_current_format(imhtml, bold, italic, underline) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gboolean * bold gboolean * italic gboolean * underline */ -MODULE = Gaim::GtkUI::IMHtml PACKAGE = Gaim::GtkUI::IMHtml PREFIX = gtk_imhtml_ +MODULE = Pidgin::IMHtml PACKAGE = Pidgin::IMHtml PREFIX = gtk_imhtml_ PROTOTYPES: ENABLE -Gaim::GtkUI::IMHtml::Smiley +Pidgin::IMHtml::Smiley gtk_imhtml_smiley_get(imhtml, sml, text) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * sml const gchar * text void gtk_imhtml_associate_smiley(imhtml, sml, smiley) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * sml - Gaim::GtkUI::IMHtml::Smiley smiley + Pidgin::IMHtml::Smiley smiley void gtk_imhtml_remove_smileys(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_set_funcs(imhtml, f) - Gaim::GtkUI::IMHtml imhtml - Gaim::GtkUI::IMHtml::Funcs f + Pidgin::IMHtml imhtml + Pidgin::IMHtml::Funcs f void gtk_imhtml_show_comments(imhtml, show) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gboolean show const char * gtk_imhtml_get_protocol_name(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_set_protocol_name(imhtml, protocol_name) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * protocol_name void gtk_imhtml_append_text(imhtml, text, options) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * text - Gaim::GtkUI::IMHtml::Options options + Pidgin::IMHtml::Options options void gtk_imhtml_append_text_with_images(imhtml, text, options, unused = NULL) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * text - Gaim::GtkUI::IMHtml::Options options + Pidgin::IMHtml::Options options SV *unused PREINIT: GSList *t_GL; @@ -181,136 +181,136 @@ void gtk_imhtml_scroll_to_end(imhtml, smooth) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gboolean smooth void gtk_imhtml_clear(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_page_up(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_page_down(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_set_editable(imhtml, editable) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gboolean editable void gtk_imhtml_set_whole_buffer_formatting_only(imhtml, wbo) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gboolean wbo void gtk_imhtml_set_format_functions(imhtml, buttons) - Gaim::GtkUI::IMHtml imhtml - Gaim::GtkUI::IMHtml::Buttons buttons + Pidgin::IMHtml imhtml + Pidgin::IMHtml::Buttons buttons -Gaim::GtkUI::IMHtml::Buttons +Pidgin::IMHtml::Buttons gtk_imhtml_get_format_functions(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gchar_own * gtk_imhtml_get_current_fontface(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gchar_own * gtk_imhtml_get_current_forecolor(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gchar_own * gtk_imhtml_get_current_backcolor(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gchar_own * gtk_imhtml_get_current_background(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gint gtk_imhtml_get_current_fontsize(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gboolean gtk_imhtml_get_editable(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_clear_formatting(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_toggle_bold(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_toggle_italic(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_toggle_underline(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_toggle_strike(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_toggle_forecolor(imhtml, color) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * color void gtk_imhtml_toggle_backcolor(imhtml, color) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * color void gtk_imhtml_toggle_background(imhtml, color) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * color void gtk_imhtml_toggle_fontface(imhtml, face) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * face void gtk_imhtml_toggle_link(imhtml, url) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * url void gtk_imhtml_insert_smiley(imhtml, sml, smiley) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const char * sml char * smiley void gtk_imhtml_font_set_size(imhtml, size) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gint size void gtk_imhtml_font_shrink(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml void gtk_imhtml_font_grow(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml gchar_own * gtk_imhtml_get_markup(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml # /* ETAN Test this, and document well that it returns an arrayref */ void gtk_imhtml_get_markup_lines(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml PREINIT: gint i; AV *lines; @@ -323,43 +323,43 @@ } XPUSHs(sv_2mortal(newRV_noinc((SV *)lines))); -MODULE = Gaim::GtkUI::IMHtml PACKAGE = Gaim::GtkUI::IMHtml::Scalable PREFIX = gtk_imhtml_image_ +MODULE = Pidgin::IMHtml PACKAGE = Pidgin::IMHtml::Scalable PREFIX = gtk_imhtml_image_ PROTOTYPES: ENABLE void gtk_imhtml_image_free(scale) - Gaim::GtkUI::IMHtml::Scalable scale + Pidgin::IMHtml::Scalable scale void gtk_imhtml_image_scale(scale, width, height) - Gaim::GtkUI::IMHtml::Scalable scale + Pidgin::IMHtml::Scalable scale int width int height -MODULE = Gaim::GtkUI::IMHtml PACKAGE = Gaim::GtkUI::IMHtml::Hr PREFIX = gtk_imhtml_hr_ +MODULE = Pidgin::IMHtml PACKAGE = Pidgin::IMHtml::Hr PREFIX = gtk_imhtml_hr_ PROTOTYPES: ENABLE -Gaim::GtkUI::IMHtml::Scalable +Pidgin::IMHtml::Scalable gtk_imhtml_hr_new() void gtk_imhtml_hr_free(scale) - Gaim::GtkUI::IMHtml::Scalable scale + Pidgin::IMHtml::Scalable scale void gtk_imhtml_hr_scale(scale, width, height) - Gaim::GtkUI::IMHtml::Scalable scale + Pidgin::IMHtml::Scalable scale int width int height -MODULE = Gaim::GtkUI::IMHtml PACKAGE = Gaim::GtkUI::IMHtml::Search PREFIX = gtk_imhtml_search_ +MODULE = Pidgin::IMHtml PACKAGE = Pidgin::IMHtml::Search PREFIX = gtk_imhtml_search_ PROTOTYPES: ENABLE gboolean gtk_imhtml_search_find(imhtml, text) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml const gchar * text void gtk_imhtml_search_clear(imhtml) - Gaim::GtkUI::IMHtml imhtml + Pidgin::IMHtml imhtml
--- a/pidgin/plugins/perl/common/GtkIMHtmlToolbar.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkIMHtmlToolbar.xs Mon Feb 05 03:37:27 2007 +0000 @@ -9,14 +9,14 @@ void gtk_imhtmltoolbar_attach(toolbar, imhtml) - Gaim::GtkUI::IMHtmlToolbar toolbar + Pidgin::IMHtmlToolbar toolbar Gtk::Widget imhtml */ -MODULE = Gaim::GtkUI::IMHtmlToolbar PACKAGE = Gaim::GtkUI::IMHtmlToolbar PREFIX = gtk_imhtmltoolbar_ +MODULE = Pidgin::IMHtmlToolbar PACKAGE = Pidgin::IMHtmlToolbar PREFIX = gtk_imhtmltoolbar_ PROTOTYPES: ENABLE void gtk_imhtmltoolbar_associate_smileys(toolbar, proto_id) - Gaim::GtkUI::IMHtmlToolbar toolbar + Pidgin::IMHtmlToolbar toolbar const char * proto_id
--- a/pidgin/plugins/perl/common/GtkLog.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkLog.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,23 +1,23 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Log PACKAGE = Gaim::GtkUI::Log PREFIX = gaim_gtk_log_ +MODULE = Pidgin::Log PACKAGE = Pidgin::Log PREFIX = pidgin_log_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_log_get_handle() +pidgin_log_get_handle() void -gaim_gtk_log_show(type, screenname, account) +pidgin_log_show(type, screenname, account) Gaim::LogType type const char * screenname Gaim::Account account void -gaim_gtk_log_show_contact(contact) +pidgin_log_show_contact(contact) Gaim::BuddyList::Contact contact -MODULE = Gaim::GtkUI::Log PACKAGE = Gaim::GtkUI::SysLog PREFIX = gaim_gtk_syslog_ +MODULE = Pidgin::Log PACKAGE = Pidgin::SysLog PREFIX = pidgin_syslog_ PROTOTYPES: ENABLE void -gaim_gtk_syslog_show() +pidgin_syslog_show()
--- a/pidgin/plugins/perl/common/GtkMenuTray.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkMenuTray.xs Mon Feb 05 03:37:27 2007 +0000 @@ -4,30 +4,30 @@ * I thought about using the one from libgtk2-perl but wasn't sure how to go * about doing that. Gtk::Widget -gaim_gtk_menu_tray_new() +pidgin_menu_tray_new() Gtk::Widget -gaim_gtk_menu_tray_get_box(menu_tray) - Gaim::GtkUI::MenuTray menu_tray +pidgin_menu_tray_get_box(menu_tray) + Pidgin::MenuTray menu_tray void -gaim_gtk_menu_tray_append(menu_tray, widget, tooltip) - Gaim::GtkUI::MenuTray menu_tray +pidgin_menu_tray_append(menu_tray, widget, tooltip) + Pidgin::MenuTray menu_tray Gtk::Widget widget const char * tooltip void -gaim_gtk_menu_tray_prepend(menu_tray, widget, tooltip) - Gaim::GtkUI::MenuTray menu_tray +pidgin_menu_tray_prepend(menu_tray, widget, tooltip) + Pidgin::MenuTray menu_tray Gtk::Widget widget const char * tooltip void -gaim_gtk_menu_tray_set_tooltip(menu_tray, widget, tooltip) - Gaim::GtkUI::MenuTray menu_tray +pidgin_menu_tray_set_tooltip(menu_tray, widget, tooltip) + Pidgin::MenuTray menu_tray Gtk::Widget widget const char * tooltip */ -MODULE = Gaim::GtkUI::MenuTray PACKAGE = Gaim::GtkUI::MenuTray PREFIX = gaim_gtk_menu_tray +MODULE = Pidgin::MenuTray PACKAGE = Pidgin::MenuTray PREFIX = pidgin_menu_tray PROTOTYPES: ENABLE
--- a/pidgin/plugins/perl/common/GtkPlugin.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkPlugin.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,13 +1,13 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Plugin PACKAGE = Gaim::GtkUI::Plugins PREFIX = gaim_gtk_plugins_ +MODULE = Pidgin::Plugin PACKAGE = Pidgin::Plugins PREFIX = pidgin_plugins_ PROTOTYPES: ENABLE void -gaim_gtk_plugins_save() +pidgin_plugins_save() -MODULE = Gaim::GtkUI::Plugin PACKAGE = Gaim::GtkUI::Plugin::Dialog PREFIX = gaim_gtk_plugin_dialog_ +MODULE = Pidgin::Plugin PACKAGE = Pidgin::Plugin::Dialog PREFIX = pidgin_plugin_dialog_ PROTOTYPES: ENABLE void -gaim_gtk_plugin_dialog_show() +pidgin_plugin_dialog_show()
--- a/pidgin/plugins/perl/common/GtkPluginPref.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkPluginPref.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,4 +1,4 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::PluginPref PACKAGE = Gaim::GtkUI::PluginPref PREFIX = gaim_gtk_plugin_pref_ +MODULE = Pidgin::PluginPref PACKAGE = Pidgin::PluginPref PREFIX = pidgin_plugin_pref_ PROTOTYPES: ENABLE
--- a/pidgin/plugins/perl/common/GtkPounce.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkPounce.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,25 +1,25 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Pounce PACKAGE = Gaim::GtkUI::Pounce PREFIX = gaim_gtk_pounce_ +MODULE = Pidgin::Pounce PACKAGE = Pidgin::Pounce PREFIX = pidgin_pounce_ PROTOTYPES: ENABLE void -gaim_gtk_pounce_editor_show(account, name, cur_pounce) +pidgin_pounce_editor_show(account, name, cur_pounce) Gaim::Account account const char * name Gaim::Pounce cur_pounce -MODULE = Gaim::GtkUI::Pounce PACKAGE = Gaim::GtkUI::Pounces PREFIX = gaim_gtk_pounces_ +MODULE = Pidgin::Pounce PACKAGE = Pidgin::Pounces PREFIX = pidgin_pounces_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_pounces_get_handle() +pidgin_pounces_get_handle() -MODULE = Gaim::GtkUI::Pounce PACKAGE = Gaim::GtkUI::Pounces::Manager PREFIX = gaim_gtk_pounces_manager_ +MODULE = Pidgin::Pounce PACKAGE = Pidgin::Pounces::Manager PREFIX = pidgin_pounces_manager_ PROTOTYPES: ENABLE void -gaim_gtk_pounces_manager_show() +pidgin_pounces_manager_show() void -gaim_gtk_pounces_manager_hide() +pidgin_pounces_manager_hide()
--- a/pidgin/plugins/perl/common/GtkPrefs.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkPrefs.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,7 +1,7 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Prefs PACKAGE = Gaim::GtkUI::Prefs PREFIX = gaim_gtk_prefs_ +MODULE = Pidgin::Prefs PACKAGE = Pidgin::Prefs PREFIX = pidgin_prefs_ PROTOTYPES: ENABLE void -gaim_gtk_prefs_show() +pidgin_prefs_show()
--- a/pidgin/plugins/perl/common/GtkPrivacy.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkPrivacy.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,23 +1,23 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Privacy PACKAGE = Gaim::GtkUI::Privacy PREFIX = gaim_gtk_ +MODULE = Pidgin::Privacy PACKAGE = Pidgin::Privacy PREFIX = pidgin_ PROTOTYPES: ENABLE void -gaim_gtk_request_add_permit(account, name) +pidgin_request_add_permit(account, name) Gaim::Account account const char * name void -gaim_gtk_request_add_block(account, name) +pidgin_request_add_block(account, name) Gaim::Account account const char * name -MODULE = Gaim::GtkUI::Privacy PACKAGE = Gaim::GtkUI::Privacy::Dialog PREFIX = gaim_gtk_privacy_dialog_ +MODULE = Pidgin::Privacy PACKAGE = Pidgin::Privacy::Dialog PREFIX = pidgin_privacy_dialog_ PROTOTYPES: ENABLE void -gaim_gtk_privacy_dialog_show() +pidgin_privacy_dialog_show() void -gaim_gtk_privacy_dialog_hide() +pidgin_privacy_dialog_hide()
--- a/pidgin/plugins/perl/common/GtkRoomlist.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkRoomlist.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,17 +1,17 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Roomlist PACKAGE = Gaim::GtkUI::Roomlist PREFIX = gaim_gtk_roomlist_ +MODULE = Pidgin::Roomlist PACKAGE = Pidgin::Roomlist PREFIX = pidgin_roomlist_ PROTOTYPES: ENABLE gboolean -gaim_gtk_roomlist_is_showable() +pidgin_roomlist_is_showable() -MODULE = Gaim::GtkUI::Roomlist PACKAGE = Gaim::GtkUI::Roomlist::Dialog PREFIX = gaim_gtk_roomlist_dialog_ +MODULE = Pidgin::Roomlist PACKAGE = Pidgin::Roomlist::Dialog PREFIX = pidgin_roomlist_dialog_ PROTOTYPES: ENABLE void -gaim_gtk_roomlist_dialog_show() +pidgin_roomlist_dialog_show() void -gaim_gtk_roomlist_dialog_show_with_account(account) +pidgin_roomlist_dialog_show_with_account(account) Gaim::Account account
--- a/pidgin/plugins/perl/common/GtkSavedStatuses.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkSavedStatuses.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,24 +1,24 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Status PACKAGE = Gaim::GtkUI::Status PREFIX = gaim_gtk_status_ +MODULE = Pidgin::Status PACKAGE = Pidgin::Status PREFIX = pidgin_status_ PROTOTYPES: ENABLE Gaim::Handle -gaim_gtk_status_get_handle() +pidgin_status_get_handle() -MODULE = Gaim::GtkUI::Status PACKAGE = Gaim::GtkUI::Status::Editor PREFIX = gaim_gtk_status_editor_ +MODULE = Pidgin::Status PACKAGE = Pidgin::Status::Editor PREFIX = pidgin_status_editor_ PROTOTYPES: ENABLE void -gaim_gtk_status_editor_show(edit, status) +pidgin_status_editor_show(edit, status) gboolean edit Gaim::SavedStatus status -MODULE = Gaim::GtkUI::Status PACKAGE = Gaim::GtkUI::Status::Window PREFIX = gaim_gtk_status_window_ +MODULE = Pidgin::Status PACKAGE = Pidgin::Status::Window PREFIX = pidgin_status_window_ PROTOTYPES: ENABLE void -gaim_gtk_status_window_show() +pidgin_status_window_show() void -gaim_gtk_status_window_hide() +pidgin_status_window_hide()
--- a/pidgin/plugins/perl/common/GtkSession.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkSession.xs Mon Feb 05 03:37:27 2007 +0000 @@ -4,10 +4,10 @@ PROTOTYPES: ENABLE void -gaim_gtk_session_init(argv0, previous_id, config_dir) +pidgin_session_init(argv0, previous_id, config_dir) gchar * argv0 gchar * previous_id gchar * config_dir void -gaim_gtk_session_end() +pidgin_session_end()
--- a/pidgin/plugins/perl/common/GtkSound.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkSound.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,15 +1,15 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Sound PACKAGE = Gaim::GtkUI::Sound PREFIX = gaim_gtk_sound_ +MODULE = Pidgin::Sound PACKAGE = Pidgin::Sound PREFIX = pidgin_sound_ PROTOTYPES: ENABLE const char * -gaim_gtk_sound_get_event_option(event) +pidgin_sound_get_event_option(event) Gaim::SoundEventID event const char * -gaim_gtk_sound_get_event_label(event) +pidgin_sound_get_event_label(event) Gaim::SoundEventID event Gaim::Handle -gaim_gtk_sound_get_handle() +pidgin_sound_get_handle()
--- a/pidgin/plugins/perl/common/GtkStatusBox.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkStatusBox.xs Mon Feb 05 03:37:27 2007 +0000 @@ -4,47 +4,47 @@ * I thought about using the one from libgtk2-perl but wasn't sure how to go * about doing that. Gtk::Widget -gtk_gaim_status_box_new() +pidgin_status_box_new() Gtk::Widget -gtk_gaim_status_box_new_with_account(account) +pidgin_status_box_new_with_account(account) Gaim::Account account void -gtk_gaim_status_box_add(status_box, type, pixbuf, text, sec_text, data) - Gaim::GtkUI::StatusBox status_box - Gaim::GtkUI::StatusBox::ItemType type +pidgin_status_box_add(status_box, type, pixbuf, text, sec_text, data) + Pidgin::StatusBox status_box + Pidgin::StatusBox::ItemType type GdkPixbuf pixbuf const char * text const char * sec_text gpointer data */ -MODULE = Gaim::GtkUI::StatusBox PACKAGE = Gaim::GtkUI::StatusBox PREFIX = gtk_gaim_status_box_ +MODULE = Pidgin::StatusBox PACKAGE = Pidgin::StatusBox PREFIX = pidgin_status_box_ PROTOTYPES: ENABLE void -gtk_gaim_status_box_add_separator(status_box) - Gaim::GtkUI::StatusBox status_box +pidgin_status_box_add_separator(status_box) + Pidgin::StatusBox status_box void -gtk_gaim_status_box_set_connecting(status_box, connecting) - Gaim::GtkUI::StatusBox status_box +pidgin_status_box_set_connecting(status_box, connecting) + Pidgin::StatusBox status_box gboolean connecting void -gtk_gaim_status_box_pulse_connecting(status_box) - Gaim::GtkUI::StatusBox status_box +pidgin_status_box_pulse_connecting(status_box) + Pidgin::StatusBox status_box void -gtk_gaim_status_box_set_buddy_icon(status_box, filename) - Gaim::GtkUI::StatusBox status_box +pidgin_status_box_set_buddy_icon(status_box, filename) + Pidgin::StatusBox status_box const char * filename const char * -gtk_gaim_status_box_get_buddy_icon(status_box) - Gaim::GtkUI::StatusBox status_box +pidgin_status_box_get_buddy_icon(status_box) + Pidgin::StatusBox status_box gchar_own * -gtk_gaim_status_box_get_message(status_box) - Gaim::GtkUI::StatusBox status_box +pidgin_status_box_get_message(status_box) + Pidgin::StatusBox status_box
--- a/pidgin/plugins/perl/common/GtkThemes.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkThemes.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,28 +1,28 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Themes PACKAGE = Gaim::GtkUI::Themes PREFIX = gaim_gtkthemes_ +MODULE = Pidgin::Themes PACKAGE = Pidgin::Themes PREFIX = pidginthemes_ PROTOTYPES: ENABLE void -gaim_gtkthemes_init() +pidginthemes_init() gboolean -gaim_gtkthemes_smileys_disabled() +pidginthemes_smileys_disabled() void -gaim_gtkthemes_smiley_theme_probe() +pidginthemes_smiley_theme_probe() void -gaim_gtkthemes_load_smiley_theme(file, load) +pidginthemes_load_smiley_theme(file, load) const char * file gboolean load void -gaim_gtkthemes_get_proto_smileys(id) +pidginthemes_get_proto_smileys(id) const char * id PREINIT: GSList *l; PPCODE: - for (l = gaim_gtkthemes_get_proto_smileys(id); l != NULL; l = l->next) { - XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::GtkUI::IMHtml::Smiley"))); + for (l = pidginthemes_get_proto_smileys(id); l != NULL; l = l->next) { + XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Pidgin::IMHtml::Smiley"))); }
--- a/pidgin/plugins/perl/common/GtkUI.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkUI.xs Mon Feb 05 03:37:27 2007 +0000 @@ -28,7 +28,7 @@ GAIM_PERL_BOOT_PROTO(GtkUI__Utils); GAIM_PERL_BOOT_PROTO(GtkUI__Xfer); -MODULE = Gaim::GtkUI PACKAGE = Gaim::GtkUI PREFIX = gaim_gtk_ +MODULE = Gaim::GtkUI PACKAGE = Gaim::GtkUI PREFIX = pidgin_ PROTOTYPES: ENABLE BOOT:
--- a/pidgin/plugins/perl/common/GtkUtils.xs Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkUtils.xs Mon Feb 05 03:37:27 2007 +0000 @@ -1,16 +1,16 @@ #include "gtkmodule.h" -MODULE = Gaim::GtkUI::Utils PACKAGE = Gaim::GtkUI::Utils PREFIX = gaim_gtk_ +MODULE = Pidgin::Utils PACKAGE = Pidgin::Utils PREFIX = pidgin_ PROTOTYPES: ENABLE gboolean -gaim_gtk_save_accels(data) +pidgin_save_accels(data) gpointer data void -gaim_gtk_load_accels() +pidgin_load_accels() gchar_own * -gaim_gtk_convert_buddy_icon(plugin, path) +pidgin_convert_buddy_icon(plugin, path) Gaim::Plugin plugin const char * path
--- a/pidgin/plugins/perl/common/gtkmodule.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/gtkmodule.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,4 +1,4 @@ -typedef struct group *Gaim__GtkUI__Group; +typedef struct group *Pidgin__Group; #define group perl_group @@ -41,36 +41,36 @@ #include "gtkutils.h" /* gtkaccount.h */ -typedef GaimGtkAccountDialogType Gaim__GtkUI__Account__Dialog__Type; +typedef PidginAccountDialogType Pidgin__Account__Dialog__Type; /* gtkblist.h */ -typedef GaimGtkBuddyList * Gaim__GtkUI__BuddyList; -typedef gaim_gtk_blist_sort_function Gaim__GtkUI__BuddyList__SortFunction; +typedef PidginBuddyList * Pidgin__BuddyList; +typedef pidgin_blist_sort_function Pidgin__BuddyList__SortFunction; /* gtkconv.h */ -typedef GaimGtkConversation * Gaim__GtkUI__Conversation; -typedef GaimUnseenState Gaim__UnseenState; +typedef PidginConversation * Pidgin__Conversation; +typedef GaimUnseenState Gaim__UnseenState; /* gtkconvwin.h */ -typedef GaimGtkWindow * Gaim__GtkUI__Conversation__Window; -typedef GaimConvPlacementFunc Gaim__Conversation__PlacementFunc; +typedef PidginWindow * Pidgin__Conversation__Window; +typedef GaimConvPlacementFunc Gaim__Conversation__PlacementFunc; /* gtkft.h */ -typedef GaimGtkXferDialog * Gaim__GtkUI__Xfer__Dialog; +typedef PidginXferDialog * Pidgin__Xfer__Dialog; /* gtkimhtml.h */ -typedef GtkIMHtml * Gaim__GtkUI__IMHtml; -typedef GtkIMHtmlButtons Gaim__GtkUI__IMHtml__Buttons; -typedef GtkIMHtmlFuncs * Gaim__GtkUI__IMHtml__Funcs; -typedef GtkIMHtmlScalable * Gaim__GtkUI__IMHtml__Scalable; -typedef GtkIMHtmlSmiley * Gaim__GtkUI__IMHtml__Smiley; -typedef GtkIMHtmlOptions Gaim__GtkUI__IMHtml__Options; +typedef GtkIMHtml * Pidgin__IMHtml; +typedef GtkIMHtmlButtons Pidgin__IMHtml__Buttons; +typedef GtkIMHtmlFuncs * Pidgin__IMHtml__Funcs; +typedef GtkIMHtmlScalable * Pidgin__IMHtml__Scalable; +typedef GtkIMHtmlSmiley * Pidgin__IMHtml__Smiley; +typedef GtkIMHtmlOptions Pidgin__IMHtml__Options; /* gtkimhtmltoolbar.h */ -typedef GtkIMHtmlToolbar * Gaim__GtkUI__IMHtmlToolbar; +typedef GtkIMHtmlToolbar * Pidgin__IMHtmlToolbar; /* gtkmenutray.h */ -typedef GaimGtkMenuTray * Gaim__GtkUI__MenuTray; +typedef PidginMenuTray * Pidgin__MenuTray; /* gtkstatusbox.h */ -typedef GtkGaimStatusBox * Gaim__GtkUI__StatusBox; +typedef PidginStatusBox * Pidgin__StatusBox;
--- a/pidgin/plugins/perl/common/typemap Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/perl/common/typemap Mon Feb 05 03:37:27 2007 +0000 @@ -3,18 +3,18 @@ Gaim::UnseenState T_IV Gaim::ButtonOrientation T_IV -Gaim::GtkUI::Account::Dialog::Type T_IV -Gaim::GtkUI::BuddyList T_GaimObj -Gaim::GtkUI::BuddyList::SortFunction T_GaimObj -Gaim::GtkUI::Conversation T_GaimObj -Gaim::GtkUI::Conversation::Window T_GaimObj -Gaim::GtkUI::Xfer::Dialog T_GaimObj -Gaim::GtkUI::IMHtml T_GaimObj -Gaim::GtkUI::IMHtml::Buttons T_IV -Gaim::GtkUI::IMHtml::Funcs T_GaimObj -Gaim::GtkUI::IMHtml::Scalable T_GaimObj -Gaim::GtkUI::IMHtml::Smiley T_GaimObj -Gaim::GtkUI::IMHtml::Options T_IV -Gaim::GtkUI::IMHtmlToolbar T_GaimObj -Gaim::GtkUI::MenuTray T_GaimObj -Gaim::GtkUI::StatusBox T_GaimObj +Pidgin::Account::Dialog::Type T_IV +Pidgin::BuddyList T_GaimObj +Pidgin::BuddyList::SortFunction T_GaimObj +Pidgin::Conversation T_GaimObj +Pidgin::Conversation::Window T_GaimObj +Pidgin::Xfer::Dialog T_GaimObj +Pidgin::IMHtml T_GaimObj +Pidgin::IMHtml::Buttons T_IV +Pidgin::IMHtml::Funcs T_GaimObj +Pidgin::IMHtml::Scalable T_GaimObj +Pidgin::IMHtml::Smiley T_GaimObj +Pidgin::IMHtml::Options T_IV +Pidgin::IMHtmlToolbar T_GaimObj +Pidgin::MenuTray T_GaimObj +Pidgin::StatusBox T_GaimObj
--- a/pidgin/plugins/raw.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/raw.c Mon Feb 05 03:37:27 2007 +0000 @@ -22,7 +22,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "conversation.h" #include "debug.h" @@ -130,7 +130,7 @@ gtk_container_add(GTK_CONTAINER(window), hbox); /* Account drop-down menu. */ - dropdown = gaim_gtk_account_option_menu_new(NULL, FALSE, + dropdown = pidgin_account_option_menu_new(NULL, FALSE, G_CALLBACK(account_changed_cb), NULL, NULL); if (gaim_connections_get_all()) @@ -167,7 +167,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, - GAIM_GTK_PLUGIN_TYPE, + PIDGIN_PLUGIN_TYPE, 0, NULL, GAIM_PRIORITY_DEFAULT,
--- a/pidgin/plugins/relnot.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/relnot.c Mon Feb 05 03:37:27 2007 +0000 @@ -38,7 +38,7 @@ #include "util.h" #include "version.h" -#include "gtkgaim.h" +#include "pidgin.h" /* 1 day */ #define MIN_CHECK_INTERVAL 60 * 60 * 24
--- a/pidgin/plugins/spellchk.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/spellchk.c Mon Feb 05 03:37:27 2007 +0000 @@ -31,7 +31,7 @@ */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "debug.h" #include "notify.h" @@ -625,10 +625,10 @@ spellchk *spell; GtkTextBuffer *buffer; GtkTextIter start, end; - GaimGtkConversation *gtkconv; + PidginConversation *gtkconv; GtkTextView *view; - gtkconv = GAIM_GTK_CONVERSATION(conv); + gtkconv = PIDGIN_CONVERSATION(conv); view = GTK_TEXT_VIEW(gtkconv->entry); @@ -2142,7 +2142,7 @@ /* Detach from existing conversations */ for (convs = gaim_get_conversations(); convs != NULL; convs = convs->next) { - GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION((GaimConversation *)convs->data); + PidginConversation *gtkconv = PIDGIN_CONVERSATION((GaimConversation *)convs->data); spellchk *spell = g_object_get_data(G_OBJECT(gtkconv->entry), SPELLCHK_OBJECT_KEY); g_signal_handlers_disconnect_by_func(gtkconv->entry, message_send_cb, spell); @@ -2177,7 +2177,7 @@ ret = gtk_vbox_new(FALSE, GAIM_HIG_CAT_SPACE); gtk_container_set_border_width (GTK_CONTAINER(ret), GAIM_HIG_BORDER); - vbox = gaim_gtk_make_frame(ret, _("Text Replacements")); + vbox = pidgin_make_frame(ret, _("Text Replacements")); gtk_container_set_border_width(GTK_CONTAINER(vbox), 4); gtk_widget_show(vbox); @@ -2266,7 +2266,7 @@ gtk_widget_show(button); - vbox = gaim_gtk_make_frame(ret, _("Add a new text replacement")); + vbox = pidgin_make_frame(ret, _("Add a new text replacement")); hbox = gtk_hbox_new(FALSE, GAIM_HIG_BOX_SPACE); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0); @@ -2338,8 +2338,8 @@ gtk_widget_show(button); #if 0 - vbox = gaim_gtk_make_frame(ret, _("General Text Replacement Options")); - gaim_gtk_prefs_checkbox(_("Enable replacement of last word on send"), + vbox = pidgin_make_frame(ret, _("General Text Replacement Options")); + pidgin_prefs_checkbox(_("Enable replacement of last word on send"), "/plugins/gtk/spellchk/last_word_replace", vbox); #endif @@ -2347,7 +2347,7 @@ return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (Reserved) */ @@ -2359,7 +2359,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, - GAIM_GTK_PLUGIN_TYPE, + PIDGIN_PLUGIN_TYPE, 0, NULL, GAIM_PRIORITY_DEFAULT,
--- a/pidgin/plugins/ticker/ticker.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/ticker/ticker.c Mon Feb 05 03:37:27 2007 +0000 @@ -25,7 +25,7 @@ * pluginized- Sean Egan, Summer 2002 */ #include "internal.h" -#include "gtkgaim.h" +#include "pidgin.h" #include "blist.h" #include "conversation.h" @@ -116,8 +116,8 @@ if(!td->icon) td->icon = gtk_image_new(); - pixbuf = gaim_gtk_blist_get_status_icon((GaimBlistNode*)c, - GAIM_STATUS_ICON_SMALL); + pixbuf = pidgin_blist_get_status_icon((GaimBlistNode*)c, + PIDGIN_STATUS_ICON_SMALL); gtk_image_set_from_pixbuf(GTK_IMAGE(td->icon), pixbuf); g_object_unref(G_OBJECT(pixbuf)); } @@ -346,7 +346,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/timestamp.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/timestamp.c Mon Feb 05 03:37:27 2007 +0000 @@ -41,7 +41,7 @@ static void timestamp_display(GaimConversation *conv, time_t then, time_t now) { - GaimGtkConversation *gtk_conv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtk_conv = PIDGIN_CONVERSATION(conv); GtkWidget *imhtml = gtk_conv->imhtml; GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)); GtkTextIter iter; @@ -94,7 +94,7 @@ static void timestamp_new_convo(GaimConversation *conv) { - GaimGtkConversation *gtk_conv = GAIM_GTK_CONVERSATION(conv); + PidginConversation *gtk_conv = PIDGIN_CONVERSATION(conv); GtkTextBuffer *buffer; if (!g_list_find(gaim_get_conversations(), conv)) @@ -133,7 +133,7 @@ ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); - frame = gaim_gtk_make_frame(ret, _("Display Timestamps Every")); + frame = pidgin_make_frame(ret, _("Display Timestamps Every")); vbox = gtk_vbox_new(FALSE, 5); gtk_container_add(GTK_CONTAINER(frame), vbox); @@ -157,7 +157,7 @@ plugin_load(GaimPlugin *plugin) { void *conv_handle = gaim_conversations_get_handle(); - void *gtkconv_handle = gaim_gtk_conversations_get_handle(); + void *gtkconv_handle = pidgin_conversations_get_handle(); /* lower priority to display initial timestamp after logged messages */ gaim_signal_connect_priority(conv_handle, "conversation-created", @@ -174,7 +174,7 @@ return TRUE; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (Reserved) */ @@ -186,7 +186,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/timestamp_format.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/timestamp_format.c Mon Feb 05 03:37:27 2007 +0000 @@ -53,18 +53,18 @@ static char *timestamp_cb_common(GaimConversation *conv, time_t t, + gboolean show_date, gboolean force, const char *dates) { - struct tm *tm = localtime(&t); g_return_val_if_fail(conv != NULL, NULL); g_return_val_if_fail(dates != NULL, NULL); - if (!strcmp(dates, "always") || - (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && - !strcmp(dates, "chats")) || - (time(NULL) > (mktime(tm) + 20*60))) + if (show_date || + !strcmp(dates, "always") || + (gaim_conversation_get_type(conv) == GAIM_CONV_TYPE_CHAT && !strcmp(dates, "chats"))) { + struct tm *tm = localtime(&t); if (force) return g_strdup(gaim_utf8_strftime("%Y-%m-%d %H:%M:%S", tm)); else @@ -72,13 +72,16 @@ } if (force) + { + struct tm *tm = localtime(&t); return g_strdup(gaim_utf8_strftime("%H:%M:%S", tm)); + } return NULL; } static char *conversation_timestamp_cb(GaimConversation *conv, - time_t t, gpointer data) + time_t t, gboolean show_date, gpointer data) { gboolean force = gaim_prefs_get_bool( "/plugins/gtk/timestamp_format/force_24hr"); @@ -87,10 +90,10 @@ g_return_val_if_fail(conv != NULL, NULL); - return timestamp_cb_common(conv, t, force, dates); + return timestamp_cb_common(conv, t, show_date, force, dates); } -static char *log_timestamp_cb(GaimLog *log, time_t t, gpointer data) +static char *log_timestamp_cb(GaimLog *log, time_t t, gboolean show_date, gpointer data) { gboolean force = gaim_prefs_get_bool( "/plugins/gtk/timestamp_format/force_24hr"); @@ -99,23 +102,13 @@ g_return_val_if_fail(log != NULL, NULL); - if (log->type == GAIM_LOG_SYSTEM) - { - if (force) { - struct tm *tm = localtime(&t); - return g_strdup(gaim_utf8_strftime("%Y-%m-%d %H:%M:%S", tm)); - } else { - return NULL; - } - } - - return timestamp_cb_common(log->conv, t, force, dates); + return timestamp_cb_common(log->conv, t, show_date, force, dates); } static gboolean plugin_load(GaimPlugin *plugin) { - gaim_signal_connect(gaim_gtk_conversations_get_handle(), "conversation-timestamp", + gaim_signal_connect(pidgin_conversations_get_handle(), "conversation-timestamp", plugin, GAIM_CALLBACK(conversation_timestamp_cb), NULL); gaim_signal_connect(gaim_log_get_handle(), "log-timestamp", plugin, GAIM_CALLBACK(log_timestamp_cb), NULL); @@ -140,7 +133,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/win32/transparency/win2ktrans.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/win32/transparency/win2ktrans.c Mon Feb 05 03:37:27 2007 +0000 @@ -44,8 +44,8 @@ #define WINTRANS_PLUGIN_ID "gtk-win-trans" #define blist (gaim_get_blist() \ - ? (GAIM_GTK_BLIST(gaim_get_blist()) \ - ? ((GAIM_GTK_BLIST(gaim_get_blist()))->window) \ + ? (PIDGIN_BLIST(gaim_get_blist()) \ + ? ((PIDGIN_BLIST(gaim_get_blist()))->window) \ : NULL) \ : NULL) @@ -215,7 +215,7 @@ } /* Clean up transparency stuff for the conv window */ -static void cleanup_conv_window(GaimGtkWindow *win) { +static void cleanup_conv_window(PidginWindow *win) { GtkWidget *window = win->window; slider_win *slidwin = NULL; @@ -234,9 +234,9 @@ } static void gaim_conversation_delete(GaimConversation *conv) { - GaimGtkWindow *win = gaim_gtkconv_get_window(GAIM_GTK_CONVERSATION(conv)); + PidginWindow *win = pidgin_conv_get_window(PIDGIN_CONVERSATION(conv)); /* If it is the last conversation in the window, cleanup */ - if (gaim_gtk_conv_window_get_gtkconv_count(win) == 1) + if (pidgin_conv_window_get_gtkconv_count(win) == 1) cleanup_conv_window(win); } @@ -327,8 +327,8 @@ static void remove_convs_wintrans(gboolean remove_signal) { GList *wins; - for (wins = gaim_gtk_conv_windows_get_list(); wins; wins = wins->next) { - GaimGtkWindow *win = wins->data; + for (wins = pidgin_conv_windows_get_list(); wins; wins = wins->next) { + PidginWindow *win = wins->data; GtkWidget *window = win->window; if (gaim_prefs_get_bool(OPT_WINTRANS_IM_ENABLED)) @@ -343,7 +343,7 @@ remove_sliders(); } -static void set_conv_window_trans(GaimGtkWindow *oldwin, GaimGtkWindow *newwin) { +static void set_conv_window_trans(PidginWindow *oldwin, PidginWindow *newwin) { GtkWidget *win = newwin->window; /* check prefs to see if we want trans */ @@ -359,7 +359,7 @@ /* If we're moving from one window to another, * add the focus listeners to the new window if not already there */ if (oldwin != NULL && oldwin != newwin) { - if (gaim_gtk_conv_window_get_gtkconv_count(newwin) == 0) { + if (pidgin_conv_window_get_gtkconv_count(newwin) == 0) { g_signal_connect(G_OBJECT(win), "focus_in_event", G_CALLBACK(focus_conv_win_cb), win); g_signal_connect(G_OBJECT(win), "focus_out_event", @@ -367,7 +367,7 @@ } /* If we've moved the last conversation, cleanup the window */ - if (gaim_gtk_conv_window_get_gtkconv_count(oldwin) == 1) + if (pidgin_conv_window_get_gtkconv_count(oldwin) == 1) cleanup_conv_window(oldwin); } } @@ -379,8 +379,8 @@ if (gaim_prefs_get_bool(OPT_WINTRANS_IM_ENABLED)) { GList *wins; - for (wins = gaim_gtk_conv_windows_get_list(); wins; wins = wins->next) { - GaimGtkWindow *win = wins->data; + for (wins = pidgin_conv_windows_get_list(); wins; wins = wins->next) { + PidginWindow *win = wins->data; set_conv_window_trans(NULL, win); } @@ -392,11 +392,11 @@ } static void gaim_new_conversation(GaimConversation *conv) { - GaimGtkWindow *win = gaim_gtkconv_get_window(GAIM_GTK_CONVERSATION(conv)); + PidginWindow *win = pidgin_conv_get_window(PIDGIN_CONVERSATION(conv)); /* If it is the first conversation in the window, * add the sliders, and set transparency */ - if (gaim_gtk_conv_window_get_gtkconv_count(win) == 1) { + if (pidgin_conv_window_get_gtkconv_count(win) == 1) { GtkWidget *window = win->window; set_conv_window_trans(NULL, win); @@ -428,8 +428,8 @@ GList *wins; int imalpha = gtk_range_get_value(GTK_RANGE(w)); - for (wins = gaim_gtk_conv_windows_get_list(); wins; wins = wins->next) { - GaimGtkWindow *win = wins->data; + for (wins = pidgin_conv_windows_get_list(); wins; wins = wins->next) { + PidginWindow *win = wins->data; set_wintrans(win->window, imalpha, TRUE, gaim_prefs_get_bool(OPT_WINTRANS_IM_ONTOP)); } @@ -449,8 +449,8 @@ static void update_existing_convs() { GList *wins; - for (wins = gaim_gtk_conv_windows_get_list(); wins; wins = wins->next) { - GaimGtkWindow *win = wins->data; + for (wins = pidgin_conv_windows_get_list(); wins; wins = wins->next) { + PidginWindow *win = wins->data; GtkWidget *window = win->window; set_conv_window_trans(NULL, win); @@ -484,7 +484,7 @@ "deleting-conversation", plugin, GAIM_CALLBACK(gaim_conversation_delete), NULL); - gaim_signal_connect(gaim_gtk_conversations_get_handle(), + gaim_signal_connect(pidgin_conversations_get_handle(), "conversation-dragging", plugin, GAIM_CALLBACK(set_conv_window_trans), NULL); @@ -493,7 +493,7 @@ if (blist) blist_created_cb(NULL, NULL); else - gaim_signal_connect(gaim_gtk_blist_get_handle(), + gaim_signal_connect(pidgin_blist_get_handle(), "gtkblist-created", plugin, GAIM_CALLBACK(blist_created_cb), NULL); @@ -530,7 +530,7 @@ gtk_container_set_border_width(GTK_CONTAINER (ret), 12); /* IM Convo trans options */ - imtransbox = gaim_gtk_make_frame(ret, _("IM Conversation Windows")); + imtransbox = pidgin_make_frame(ret, _("IM Conversation Windows")); button = wgaim_button(_("_IM window transparency"), OPT_WINTRANS_IM_ENABLED, imtransbox); g_signal_connect(GTK_OBJECT(button), "clicked", @@ -543,7 +543,7 @@ gtk_widget_show(trans_box); g_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(gaim_gtk_toggle_sensitive), trans_box); + GTK_SIGNAL_FUNC(pidgin_toggle_sensitive), trans_box); button = wgaim_button(_("_Show slider bar in IM window"), OPT_WINTRANS_IM_SLIDER, trans_box); @@ -551,7 +551,7 @@ GTK_SIGNAL_FUNC(update_convs_wintrans), (gpointer) OPT_WINTRANS_IM_SLIDER); - button = gaim_gtk_prefs_checkbox( + button = pidgin_prefs_checkbox( _("Remove IM window transparency on focus"), OPT_WINTRANS_IM_ONFOCUS, trans_box); @@ -587,7 +587,7 @@ gtk_box_pack_start(GTK_BOX(trans_box), hbox, FALSE, FALSE, 5); /* Buddy List trans options */ - bltransbox = gaim_gtk_make_frame (ret, _("Buddy List Window")); + bltransbox = pidgin_make_frame (ret, _("Buddy List Window")); button = wgaim_button(_("_Buddy List window transparency"), OPT_WINTRANS_BL_ENABLED, bltransbox); g_signal_connect(GTK_OBJECT(button), "clicked", @@ -599,8 +599,8 @@ gtk_widget_set_sensitive(GTK_WIDGET(trans_box), FALSE); gtk_widget_show(trans_box); g_signal_connect(GTK_OBJECT(button), "clicked", - GTK_SIGNAL_FUNC(gaim_gtk_toggle_sensitive), trans_box); - button = gaim_gtk_prefs_checkbox( + GTK_SIGNAL_FUNC(pidgin_toggle_sensitive), trans_box); + button = pidgin_prefs_checkbox( _("Remove Buddy List window transparency on focus"), OPT_WINTRANS_BL_ONFOCUS, trans_box); button = wgaim_button(_("Always on top"), OPT_WINTRANS_BL_ONTOP, @@ -638,7 +638,7 @@ return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 /* page_num (Reserved) */ @@ -650,7 +650,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/plugins/win32/winprefs/winprefs.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/win32/winprefs/winprefs.c Mon Feb 05 03:37:27 2007 +0000 @@ -173,7 +173,7 @@ static void blist_create_cb(GaimBuddyList *gaim_blist, void *data) { gaim_debug_info(WINPREFS_PLUGIN_ID, "buddy list created\n"); - blist = GAIM_GTK_BLIST(gaim_blist)->window; + blist = PIDGIN_BLIST(gaim_blist)->window; if(gaim_prefs_get_bool(PREF_DBLIST_DOCKABLE)) { blist_set_dockable(TRUE); @@ -234,11 +234,11 @@ } static gboolean -gtkwgaim_conv_chat_blink(GaimAccount *account, const char *who, char **message, +winpidgin_conv_chat_blink(GaimAccount *account, const char *who, char **message, GaimConversation *conv, GaimMessageFlags flags, void *data) { if(gaim_prefs_get_bool(PREF_CHAT_BLINK)) - gtkwgaim_conv_blink(conv, flags); + winpidgin_conv_blink(conv, flags); return FALSE; } @@ -252,18 +252,18 @@ handle = plugin; /* blist docking init */ - if(gaim_get_blist() && GAIM_GTK_BLIST(gaim_get_blist()) - && GAIM_GTK_BLIST(gaim_get_blist())->window) { + if(gaim_get_blist() && PIDGIN_BLIST(gaim_get_blist()) + && PIDGIN_BLIST(gaim_get_blist())->window) { blist_create_cb(gaim_get_blist(), NULL); } /* This really shouldn't happen anymore generally, but if for some strange reason, the blist is recreated, we need to set it up again. */ - gaim_signal_connect(gaim_gtk_blist_get_handle(), "gtkblist-created", + gaim_signal_connect(pidgin_blist_get_handle(), "gtkblist-created", plugin, GAIM_CALLBACK(blist_create_cb), NULL); - gaim_signal_connect(gaim_gtk_conversations_get_handle(), - "displaying-chat-msg", plugin, GAIM_CALLBACK(gtkwgaim_conv_chat_blink), + gaim_signal_connect(pidgin_conversations_get_handle(), + "displaying-chat-msg", plugin, GAIM_CALLBACK(winpidgin_conv_chat_blink), NULL); gaim_signal_connect((void*)gaim_get_core(), "quitting", plugin, @@ -303,7 +303,7 @@ /* Display Installed GTK+ Runtime Version */ if(gtk_version) { GtkWidget *label; - vbox = gaim_gtk_make_frame(ret, _("GTK+ Runtime Version")); + vbox = pidgin_make_frame(ret, _("GTK+ Runtime Version")); label = gtk_label_new(gtk_version); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_widget_show(label); @@ -311,7 +311,7 @@ } /* Autostart */ - vbox = gaim_gtk_make_frame(ret, _("Startup")); + vbox = pidgin_make_frame(ret, _("Startup")); button = gtk_check_button_new_with_mnemonic(_("_Start " PIDGIN_NAME " on Windows startup")); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); @@ -324,12 +324,12 @@ gtk_widget_show(button); /* Buddy List */ - vbox = gaim_gtk_make_frame(ret, _("Buddy List")); - gaim_gtk_prefs_checkbox(_("_Dockable Buddy List"), + vbox = pidgin_make_frame(ret, _("Buddy List")); + pidgin_prefs_checkbox(_("_Dockable Buddy List"), PREF_DBLIST_DOCKABLE, vbox); /* Blist On Top */ - gaim_gtk_prefs_dropdown(vbox, _("_Keep Buddy List window on top:"), + pidgin_prefs_dropdown(vbox, _("_Keep Buddy List window on top:"), GAIM_PREF_INT, PREF_BLIST_ON_TOP, _("Never"), BLIST_TOP_NEVER, _("Always"), BLIST_TOP_ALWAYS, @@ -338,15 +338,15 @@ NULL); /* Conversations */ - vbox = gaim_gtk_make_frame(ret, _("Conversations")); - gaim_gtk_prefs_checkbox(_("_Flash window when chat messages are received"), + vbox = pidgin_make_frame(ret, _("Conversations")); + pidgin_prefs_checkbox(_("_Flash window when chat messages are received"), PREF_CHAT_BLINK, vbox); gtk_widget_show_all(ret); return ret; } -static GaimGtkPluginUiInfo ui_info = +static PidginPluginUiInfo ui_info = { get_config_frame, 0 @@ -358,7 +358,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, - GAIM_GTK_PLUGIN_TYPE, + PIDGIN_PLUGIN_TYPE, 0, NULL, GAIM_PRIORITY_DEFAULT,
--- a/pidgin/plugins/xmppconsole.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/plugins/xmppconsole.c Mon Feb 05 03:37:27 2007 +0000 @@ -851,7 +851,7 @@ GAIM_MAJOR_VERSION, GAIM_MINOR_VERSION, GAIM_PLUGIN_STANDARD, /**< type */ - GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ + PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */
--- a/pidgin/win32/IdleTracker/idletrack.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/IdleTracker/idletrack.c Mon Feb 05 03:37:27 2007 +0000 @@ -99,7 +99,7 @@ } -EXPORT DWORD wgaim_get_lastactive() { +EXPORT DWORD winpidgin_get_lastactive() { DWORD result = 0; /* If we have GetLastInputInfo then use it, otherwise use the hooks*/ @@ -122,7 +122,7 @@ } -EXPORT BOOL wgaim_set_idlehooks() { +EXPORT BOOL winpidgin_set_idlehooks() { /* Is GetLastInputInfo available?*/ g_user32 = LoadLibrary("user32.dll"); if(g_user32) { @@ -159,7 +159,7 @@ } -EXPORT void wgaim_remove_idlehooks() { +EXPORT void winpidgin_remove_idlehooks() { if(g_user32 != NULL) FreeLibrary(g_user32); if(keyHook)
--- a/pidgin/win32/IdleTracker/idletrack.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/IdleTracker/idletrack.h Mon Feb 05 03:37:27 2007 +0000 @@ -3,6 +3,6 @@ */ #include <windows.h> -DWORD wgaim_get_lastactive(void); -BOOL wgaim_set_idlehooks(void); -void wgaim_remove_idlehooks(void); +DWORD winpidgin_get_lastactive(void); +BOOL winpidgin_set_idlehooks(void); +void winpidgin_remove_idlehooks(void);
--- a/pidgin/win32/gtkdocklet-win32.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/gtkdocklet-win32.c Mon Feb 05 03:37:27 2007 +0000 @@ -1,11 +1,11 @@ /* - * System tray icon (aka docklet) plugin for Gaim + * System tray icon (aka docklet) plugin for Winpidgin * * Copyright (C) 2002-3 Robert McQueen <robot101@debian.org> * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com> * Inspired by a similar plugin by: * John (J5) Palmieri <johnp@martianrock.com> - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the @@ -15,7 +15,7 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -50,8 +50,7 @@ static HICON sysicon_pend = 0; static HICON sysicon_awypend = 0; static HICON sysicon_blank = 0; -static NOTIFYICONDATA wgaim_nid; - +static NOTIFYICONDATA _nicon_data; static LRESULT CALLBACK systray_mainmsg_handler(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { static UINT taskbarRestartMsg; /* static here means value is kept across multiple calls to this func */ @@ -84,14 +83,14 @@ else break; - gaim_gtk_docklet_clicked(type); + pidgin_docklet_clicked(type); break; } default: if (msg == taskbarRestartMsg) { /* explorer crashed and left us hanging... This will put the systray icon back in it's place, when it restarts */ - Shell_NotifyIcon(NIM_ADD, &wgaim_nid); + Shell_NotifyIcon(NIM_ADD, &_nicon_data); } break; }/* end switch */ @@ -104,7 +103,7 @@ WNDCLASSEX wcex; LPCTSTR wname; - wname = TEXT("WingaimSystrayWinCls"); + wname = TEXT("WinpidginSystrayWinCls"); wcex.cbSize = sizeof(wcex); @@ -112,7 +111,7 @@ wcex.lpfnWndProc = systray_mainmsg_handler; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; - wcex.hInstance = gtkwgaim_hinstance(); + wcex.hInstance = winpidgin_hinstance(); wcex.hIcon = NULL; wcex.hCursor = NULL, wcex.hbrBackground = NULL; @@ -123,32 +122,32 @@ RegisterClassEx(&wcex); /* Create the window */ - return (CreateWindow(wname, "", 0, 0, 0, 0, 0, GetDesktopWindow(), NULL, gtkwgaim_hinstance(), 0)); + return (CreateWindow(wname, "", 0, 0, 0, 0, 0, GetDesktopWindow(), NULL, winpidgin_hinstance(), 0)); } static void systray_init_icon(HWND hWnd, HICON icon) { - ZeroMemory(&wgaim_nid, sizeof(wgaim_nid)); - wgaim_nid.cbSize = sizeof(NOTIFYICONDATA); - wgaim_nid.hWnd = hWnd; - wgaim_nid.uID = 0; - wgaim_nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; - wgaim_nid.uCallbackMessage = WM_TRAYMESSAGE; - wgaim_nid.hIcon = icon; - lstrcpy(wgaim_nid.szTip, PIDGIN_NAME); - Shell_NotifyIcon(NIM_ADD, &wgaim_nid); - gaim_gtk_docklet_embedded(); + ZeroMemory(&_nicon_data, sizeof(_nicon_data)); + _nicon_data.cbSize = sizeof(NOTIFYICONDATA); + _nicon_data.hWnd = hWnd; + _nicon_data.uID = 0; + _nicon_data.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; + _nicon_data.uCallbackMessage = WM_TRAYMESSAGE; + _nicon_data.hIcon = icon; + lstrcpy(_nicon_data.szTip, PIDGIN_NAME); + Shell_NotifyIcon(NIM_ADD, &_nicon_data); + pidgin_docklet_embedded(); } static void systray_change_icon(HICON icon) { - wgaim_nid.hIcon = icon; - Shell_NotifyIcon(NIM_MODIFY, &wgaim_nid); + _nicon_data.hIcon = icon; + Shell_NotifyIcon(NIM_MODIFY, &_nicon_data); } static void systray_remove_nid(void) { - Shell_NotifyIcon(NIM_DELETE, &wgaim_nid); + Shell_NotifyIcon(NIM_DELETE, &_nicon_data); } -static void wgaim_tray_update_icon(DockletStatus icon) { +static void winpidgin_tray_update_icon(DockletStatus icon) { switch (icon) { case DOCKLET_STATUS_OFFLINE: systray_change_icon(sysicon_disconn); @@ -170,32 +169,32 @@ } } -static void wgaim_tray_blank_icon() { +static void winpidgin_tray_blank_icon() { systray_change_icon(sysicon_blank); } -static void wgaim_tray_set_tooltip(gchar *tooltip) { +static void winpidgin_tray_set_tooltip(gchar *tooltip) { if (tooltip) { char *locenc = NULL; locenc = g_locale_from_utf8(tooltip, -1, NULL, NULL, NULL); - lstrcpyn(wgaim_nid.szTip, locenc, sizeof(wgaim_nid.szTip) / sizeof(TCHAR)); + lstrcpyn(_nicon_data.szTip, locenc, sizeof(_nicon_data.szTip) / sizeof(TCHAR)); g_free(locenc); } else { - lstrcpy(wgaim_nid.szTip, PIDGIN_NAME); + lstrcpy(_nicon_data.szTip, PIDGIN_NAME); } - Shell_NotifyIcon(NIM_MODIFY, &wgaim_nid); + Shell_NotifyIcon(NIM_MODIFY, &_nicon_data); } -static void wgaim_tray_minimize(GaimGtkBuddyList *gtkblist) { +static void winpidgin_tray_minimize(PidginBuddyList *gtkblist) { MinimizeWndToTray(GDK_WINDOW_HWND(gtkblist->window->window)); } -static void wgaim_tray_maximize(GaimGtkBuddyList *gtkblist) { +static void winpidgin_tray_maximize(PidginBuddyList *gtkblist) { RestoreWndFromTray(GDK_WINDOW_HWND(gtkblist->window->window)); } -static void wgaim_tray_create() { +static void winpidgin_tray_create() { OSVERSIONINFO osinfo; /* dummy window to process systray messages */ systray_hwnd = systray_create_hiddenwin(); @@ -211,48 +210,48 @@ if ((osinfo.dwMajorVersion == 5 && osinfo.dwMinorVersion > 0) || (osinfo.dwMajorVersion >= 6)) { - sysicon_disconn = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_OFFLINE_TRAY_ICON), IMAGE_ICON, 16, 16, 0); - sysicon_conn = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_TRAY_ICON), IMAGE_ICON, 16, 16, 0); - sysicon_away = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_AWAY_TRAY_ICON), IMAGE_ICON, 16, 16, 0); - sysicon_pend = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_PEND_TRAY_ICON), IMAGE_ICON, 16, 16, 0); - sysicon_awypend = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_AWAYPEND_TRAY_ICON), IMAGE_ICON, 16, 16, 0); + sysicon_disconn = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_OFFLINE_TRAY_ICON), IMAGE_ICON, 16, 16, 0); + sysicon_conn = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_TRAY_ICON), IMAGE_ICON, 16, 16, 0); + sysicon_away = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_AWAY_TRAY_ICON), IMAGE_ICON, 16, 16, 0); + sysicon_pend = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_PEND_TRAY_ICON), IMAGE_ICON, 16, 16, 0); + sysicon_awypend = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_AWAYPEND_TRAY_ICON), IMAGE_ICON, 16, 16, 0); } else { - sysicon_disconn = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_OFFLINE_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); - sysicon_conn = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); - sysicon_away = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_AWAY_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); - sysicon_pend = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_PEND_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); - sysicon_awypend = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_AWAYPEND_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); + sysicon_disconn = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_OFFLINE_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); + sysicon_conn = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); + sysicon_away = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_AWAY_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); + sysicon_pend = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_PEND_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); + sysicon_awypend = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_AWAYPEND_TRAY_ICON_4BIT), IMAGE_ICON, 16, 16, 0); } - sysicon_blank = (HICON)LoadImage(gtkwgaim_hinstance(), MAKEINTRESOURCE(GAIM_BLANK_TRAY_ICON), IMAGE_ICON, 16, 16, 0); + sysicon_blank = (HICON)LoadImage(winpidgin_hinstance(), MAKEINTRESOURCE(GAIM_BLANK_TRAY_ICON), IMAGE_ICON, 16, 16, 0); /* Create icon in systray */ systray_init_icon(systray_hwnd, sysicon_disconn); - gaim_signal_connect(gaim_gtk_blist_get_handle(), "gtkblist-hiding", - gaim_gtk_docklet_get_handle(), GAIM_CALLBACK(wgaim_tray_minimize), NULL); - gaim_signal_connect(gaim_gtk_blist_get_handle(), "gtkblist-unhiding", - gaim_gtk_docklet_get_handle(), GAIM_CALLBACK(wgaim_tray_maximize), NULL); + gaim_signal_connect(pidgin_blist_get_handle(), "gtkblist-hiding", + pidgin_docklet_get_handle(), GAIM_CALLBACK(winpidgin_tray_minimize), NULL); + gaim_signal_connect(pidgin_blist_get_handle(), "gtkblist-unhiding", + pidgin_docklet_get_handle(), GAIM_CALLBACK(winpidgin_tray_maximize), NULL); gaim_debug(GAIM_DEBUG_INFO, "docklet", "created\n"); } -static void wgaim_tray_destroy() { +static void winpidgin_tray_destroy() { systray_remove_nid(); DestroyWindow(systray_hwnd); - gaim_gtk_docklet_remove(); + pidgin_docklet_remove(); } -static struct docklet_ui_ops wgaim_tray_ops = +static struct docklet_ui_ops winpidgin_tray_ops = { - wgaim_tray_create, - wgaim_tray_destroy, - wgaim_tray_update_icon, - wgaim_tray_blank_icon, - wgaim_tray_set_tooltip, + winpidgin_tray_create, + winpidgin_tray_destroy, + winpidgin_tray_update_icon, + winpidgin_tray_blank_icon, + winpidgin_tray_set_tooltip, NULL }; /* Used by docklet's plugin load func */ void docklet_ui_init() { - gaim_gtk_docklet_set_ui_ops(&wgaim_tray_ops); + pidgin_docklet_set_ui_ops(&winpidgin_tray_ops); }
--- a/pidgin/win32/gtkwin32dep.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/gtkwin32dep.c Mon Feb 05 03:37:27 2007 +0000 @@ -1,11 +1,10 @@ -/* - * gaim +/** + * @file gtkwin32dep.c UI Win32 Specific Functionality + * @ingroup win32 * - * File: gtkwin32dep.c - * Date: June, 2002 - * Description: Windows dependant code for Gaim - * - * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> + * Pidgin is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,8 +54,8 @@ /* * GLOBALS */ -HINSTANCE gaimexe_hInstance = 0; -HINSTANCE gtkgaimdll_hInstance = 0; +HINSTANCE exe_hInstance = 0; +HINSTANCE dll_hInstance = 0; HWND messagewin_hwnd; static int gtkwin32_handle; @@ -68,11 +67,11 @@ * PUBLIC CODE */ -HINSTANCE gtkwgaim_hinstance(void) { - return gaimexe_hInstance; +HINSTANCE winpidgin_hinstance(void) { + return exe_hInstance; } -int gtkwgaim_gz_decompress(const char* in, const char* out) { +int winpidgin_gz_decompress(const char* in, const char* out) { gzFile fin; FILE *fout; char buf[1024]; @@ -80,13 +79,13 @@ if((fin = gzopen(in, "rb"))) { if(!(fout = g_fopen(out, "wb"))) { - gaim_debug_error("gtkwgaim_gz_decompress", "Error opening file: %s\n", out); + gaim_debug_error("winpidgin_gz_decompress", "Error opening file: %s\n", out); gzclose(fin); return 0; } } else { - gaim_debug_error("gtkwgaim_gz_decompress", "gzopen failed to open: %s\n", in); + gaim_debug_error("winpidgin_gz_decompress", "gzopen failed to open: %s\n", in); return 0; } @@ -102,36 +101,36 @@ gzclose(fin); if(ret < 0) { - gaim_debug_error("gtkwgaim_gz_decompress", "gzread failed while reading: %s\n", in); + gaim_debug_error("winpidgin_gz_decompress", "gzread failed while reading: %s\n", in); return 0; } return 1; } -int gtkwgaim_gz_untar(const char* filename, const char* destdir) { +int winpidgin_gz_untar(const char* filename, const char* destdir) { char tmpfile[_MAX_PATH]; - char template[]="wgaimXXXXXX"; + char template[]="wpidginXXXXXX"; sprintf(tmpfile, "%s%s%s", g_get_tmp_dir(), G_DIR_SEPARATOR_S, _mktemp(template)); - if(gtkwgaim_gz_decompress(filename, tmpfile)) { + if(winpidgin_gz_decompress(filename, tmpfile)) { int ret; if(untar(tmpfile, destdir, UNTAR_FORCE | UNTAR_QUIET)) ret = 1; else { - gaim_debug_error("gtkwgaim_gz_untar", "Failure untarring %s\n", tmpfile); + gaim_debug_error("winpidgin_gz_untar", "Failure untarring %s\n", tmpfile); ret = 0; } g_unlink(tmpfile); return ret; } else { - gaim_debug_error("gtkwgaim_gz_untar", "Failed to gz decompress %s\n", filename); + gaim_debug_error("winpidgin_gz_untar", "Failed to gz decompress %s\n", filename); return 0; } } -void gtkwgaim_shell_execute(const char *target, const char *verb, const char *clazz) { +void winpidgin_shell_execute(const char *target, const char *verb, const char *clazz) { g_return_if_fail(target != NULL); g_return_if_fail(verb != NULL); @@ -155,7 +154,7 @@ } if(!ShellExecuteExW(&wsinfo)) - gaim_debug_error("gtkwgaim", "Error opening URI: %s error: %d\n", + gaim_debug_error("winpidgin", "Error opening URI: %s error: %d\n", target, (int) wsinfo.hInstApp); g_free(w_uri); @@ -178,7 +177,7 @@ } if(!ShellExecuteExA(&sinfo)) - gaim_debug_error("gtkwgaim", "Error opening URI: %s error: %d\n", + gaim_debug_error("winpidgin", "Error opening URI: %s error: %d\n", target, (int) sinfo.hInstApp); g_free(locale_uri); @@ -186,11 +185,11 @@ } -void gtkwgaim_notify_uri(const char *uri) { +void winpidgin_notify_uri(const char *uri) { /* We'll allow whatever URI schemes are supported by the * default http browser. */ - gtkwgaim_shell_execute(uri, "open", "http"); + winpidgin_shell_execute(uri, "open", "http"); } #define WM_FOCUS_REQUEST (WM_APP + 13) @@ -198,7 +197,7 @@ static LRESULT CALLBACK message_window_handler(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { if (msg == WM_FOCUS_REQUEST) { - gaim_debug_info("gtkwgaim", "Got external Buddy List focus request."); + gaim_debug_info("winpidgin", "Got external Buddy List focus request."); gaim_blist_set_visible(TRUE); return TRUE; } @@ -206,19 +205,19 @@ return DefWindowProc(hwnd, msg, wparam, lparam); } -static HWND wgaim_message_window_init(void) { +static HWND winpidgin_message_window_init(void) { HWND win_hwnd; WNDCLASSEX wcx; LPCTSTR wname; - wname = TEXT("WingaimMsgWinCls"); + wname = TEXT("WinpidginMsgWinCls"); wcx.cbSize = sizeof(wcx); wcx.style = 0; wcx.lpfnWndProc = message_window_handler; wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; - wcx.hInstance = gtkwgaim_hinstance(); + wcx.hInstance = winpidgin_hinstance(); wcx.hIcon = NULL; wcx.hCursor = NULL; wcx.hbrBackground = NULL; @@ -229,9 +228,9 @@ RegisterClassEx(&wcx); /* Create the window */ - if(!(win_hwnd = CreateWindow(wname, TEXT("WingaimMsgWin"), 0, 0, 0, 0, 0, - NULL, NULL, gtkwgaim_hinstance(), 0))) { - gaim_debug_error("gtkwgaim", + if(!(win_hwnd = CreateWindow(wname, TEXT("WinpidginMsgWin"), 0, 0, 0, 0, 0, + NULL, NULL, winpidgin_hinstance(), 0))) { + gaim_debug_error("winpidgin", "Unable to create message window.\n"); return NULL; } @@ -241,12 +240,12 @@ static gboolean stop_flashing(GtkWidget *widget, GdkEventFocus *event, gpointer data) { GtkWindow *window = data; - gtkwgaim_window_flash(window, FALSE); + winpidgin_window_flash(window, FALSE); return FALSE; } void -gtkwgaim_window_flash(GtkWindow *window, gboolean flash) { +winpidgin_window_flash(GtkWindow *window, gboolean flash) { GdkWindow * gdkwin; g_return_if_fail(window != NULL); @@ -278,8 +277,8 @@ } void -gtkwgaim_conv_blink(GaimConversation *conv, GaimMessageFlags flags) { - GaimGtkWindow *win; +winpidgin_conv_blink(GaimConversation *conv, GaimMessageFlags flags) { + PidginWindow *win; GtkWindow *window; /* Don't flash for our own messages or system messages */ @@ -287,99 +286,99 @@ return; if(conv == NULL) { - gaim_debug_info("gtkwgaim", "No conversation found to blink.\n"); + gaim_debug_info("winpidgin", "No conversation found to blink.\n"); return; } - win = gaim_gtkconv_get_window(GAIM_GTK_CONVERSATION(conv)); + win = pidgin_conv_get_window(PIDGIN_CONVERSATION(conv)); if(win == NULL) { - gaim_debug_info("gtkwgaim", "No conversation windows found to blink.\n"); + gaim_debug_info("winpidgin", "No conversation windows found to blink.\n"); return; } window = GTK_WINDOW(win->window); - gtkwgaim_window_flash(window, TRUE); + winpidgin_window_flash(window, TRUE); /* Stop flashing when window receives focus */ g_signal_connect(G_OBJECT(window), "focus-in-event", G_CALLBACK(stop_flashing), window); } static gboolean -gtkwgaim_conv_im_blink(GaimAccount *account, const char *who, char **message, +winpidgin_conv_im_blink(GaimAccount *account, const char *who, char **message, GaimConversation *conv, GaimMessageFlags flags, void *data) { if (gaim_prefs_get_bool("/gaim/gtk/win32/blink_im")) - gtkwgaim_conv_blink(conv, flags); + winpidgin_conv_blink(conv, flags); return FALSE; } -void gtkwgaim_init(HINSTANCE hint) { +void winpidgin_init(HINSTANCE hint) { - gaim_debug_info("gtkwgaim", "gtkwgaim_init start\n"); + gaim_debug_info("winpidgin", "winpidgin_init start\n"); - gaimexe_hInstance = hint; + exe_hInstance = hint; /* IdleTracker Initialization */ - if(!wgaim_set_idlehooks()) - gaim_debug_error("gtkwgaim", "Failed to initialize idle tracker\n"); + if(!winpidgin_set_idlehooks()) + gaim_debug_error("winpidgin", "Failed to initialize idle tracker\n"); - wgaim_gtkspell_init(); - gaim_debug_info("gtkwgaim", "GTK+ :%u.%u.%u\n", + wpidginspell_init(); + gaim_debug_info("winpidgin", "GTK+ :%u.%u.%u\n", gtk_major_version, gtk_minor_version, gtk_micro_version); - messagewin_hwnd = wgaim_message_window_init(); + messagewin_hwnd = winpidgin_message_window_init(); MyFlashWindowEx = (LPFNFLASHWINDOWEX) wgaim_find_and_loadproc("user32.dll", "FlashWindowEx"); - gaim_debug_info("gtkwgaim", "gtkwgaim_init end\n"); + gaim_debug_info("winpidgin", "winpidgin_init end\n"); } -void gtkwgaim_post_init(void) { +void winpidgin_post_init(void) { gaim_prefs_add_none("/gaim/gtk/win32"); gaim_prefs_add_bool("/gaim/gtk/win32/blink_im", TRUE); - gaim_signal_connect(gaim_gtk_conversations_get_handle(), - "displaying-im-msg", >kwin32_handle, GAIM_CALLBACK(gtkwgaim_conv_im_blink), + gaim_signal_connect(pidgin_conversations_get_handle(), + "displaying-im-msg", >kwin32_handle, GAIM_CALLBACK(winpidgin_conv_im_blink), NULL); } /* Windows Cleanup */ -void gtkwgaim_cleanup(void) { - gaim_debug_info("gtkwgaim", "gtkwgaim_cleanup\n"); +void winpidgin_cleanup(void) { + gaim_debug_info("winpidgin", "winpidgin_cleanup\n"); if(messagewin_hwnd) DestroyWindow(messagewin_hwnd); /* Idle tracker cleanup */ - wgaim_remove_idlehooks(); + winpidgin_remove_idlehooks(); } /* DLL initializer */ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - gtkgaimdll_hInstance = hinstDLL; + dll_hInstance = hinstDLL; return TRUE; } -typedef HMONITOR WINAPI gaim_MonitorFromWindow(HWND, DWORD); -typedef BOOL WINAPI gaim_GetMonitorInfo(HMONITOR, LPMONITORINFO); +typedef HMONITOR WINAPI _MonitorFromWindow(HWND, DWORD); +typedef BOOL WINAPI _GetMonitorInfo(HMONITOR, LPMONITORINFO); static gboolean get_WorkingAreaRectForWindow(HWND hwnd, RECT *workingAreaRc) { - static gaim_MonitorFromWindow *the_MonitorFromWindow; - static gaim_GetMonitorInfo *the_GetMonitorInfo; + static _MonitorFromWindow *the_MonitorFromWindow; + static _GetMonitorInfo *the_GetMonitorInfo; static gboolean initialized = FALSE; HMONITOR monitor; MONITORINFO info; if(!initialized) { - the_MonitorFromWindow = (gaim_MonitorFromWindow*) + the_MonitorFromWindow = (_MonitorFromWindow*) wgaim_find_and_loadproc("user32", "MonitorFromWindow"); - the_GetMonitorInfo = (gaim_GetMonitorInfo*) + the_GetMonitorInfo = (_GetMonitorInfo*) wgaim_find_and_loadproc("user32", "GetMonitorInfoA"); initialized = TRUE; } @@ -400,7 +399,7 @@ return TRUE; } -void gtkwgaim_ensure_onscreen(GtkWidget *win) { +void winpidgin_ensure_onscreen(GtkWidget *win) { RECT windowRect, workingAreaRect, intersectionRect; HWND hwnd = GDK_WINDOW_HWND(win->window);
--- a/pidgin/win32/gtkwin32dep.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/gtkwin32dep.h Mon Feb 05 03:37:27 2007 +0000 @@ -1,9 +1,10 @@ -/* - * gaim +/** + * @file gtkwin32dep.h UI Win32 Specific Functionality + * @ingroup win32 * - * File: win32dep.h - * - * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> + * Pidgin is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +19,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * */ #ifndef _GTKWIN32DEP_H_ #define _GTKWIN32DEP_H_ @@ -26,23 +26,23 @@ #include <gtk/gtk.h> #include "conversation.h" -HINSTANCE gtkwgaim_hinstance(void); +HINSTANCE winpidgin_hinstance(void); /* Utility */ -int gtkwgaim_gz_decompress(const char* in, const char* out); -int gtkwgaim_gz_untar(const char* filename, const char* destdir); +int winpidgin_gz_decompress(const char* in, const char* out); +int winpidgin_gz_untar(const char* filename, const char* destdir); /* Misc */ -void gtkwgaim_notify_uri(const char *uri); -void gtkwgaim_shell_execute(const char *target, const char *verb, const char *clazz); -void gtkwgaim_ensure_onscreen(GtkWidget *win); -void gtkwgaim_conv_blink(GaimConversation *conv, GaimMessageFlags flags); -void gtkwgaim_window_flash(GtkWindow *window, gboolean flash); +void winpidgin_notify_uri(const char *uri); +void winpidgin_shell_execute(const char *target, const char *verb, const char *clazz); +void winpidgin_ensure_onscreen(GtkWidget *win); +void winpidgin_conv_blink(GaimConversation *conv, GaimMessageFlags flags); +void winpidgin_window_flash(GtkWindow *window, gboolean flash); /* init / cleanup */ -void gtkwgaim_init(HINSTANCE); -void gtkwgaim_post_init(void); -void gtkwgaim_cleanup(void); +void winpidgin_init(HINSTANCE); +void winpidgin_post_init(void); +void winpidgin_cleanup(void); #endif /* _WIN32DEP_H_ */
--- a/pidgin/win32/winpidgin.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/winpidgin.c Mon Feb 05 03:37:27 2007 +0000 @@ -51,14 +51,14 @@ #endif -typedef int (CALLBACK* LPFNGAIMMAIN)(HINSTANCE, int, char**); +typedef int (CALLBACK* LPFNPIDGINMAIN)(HINSTANCE, int, char**); typedef void (CALLBACK* LPFNSETDLLDIRECTORY)(LPCTSTR); typedef BOOL (CALLBACK* LPFNATTACHCONSOLE)(DWORD); /* * PROTOTYPES */ -static LPFNGAIMMAIN gaim_main = NULL; +static LPFNPIDGINMAIN pidgin_main = NULL; static LPFNSETDLLDIRECTORY MySetDllDirectory = NULL; static const char *get_win32_error_message(DWORD err) { @@ -249,7 +249,7 @@ } } -static char* wgaim_lcid_to_posix(LCID lcid) { +static char* winpidgin_lcid_to_posix(LCID lcid) { char *posix = NULL; int lang_id = PRIMARYLANGID(lcid); int sub_id = SUBLANGID(lcid); @@ -395,7 +395,7 @@ - Check NSIS Installer Language reg value - Use default user locale */ -static const char *wgaim_get_locale() { +static const char *winpidgin_get_locale() { const char *locale = NULL; LCID lcid; #ifndef PORTABLE @@ -410,23 +410,23 @@ #ifndef PORTABLE if (read_reg_string(HKEY_CURRENT_USER, "SOFTWARE\\gaim", "Installer Language", (LPBYTE) &data, &datalen)) { - if ((locale = wgaim_lcid_to_posix(atoi(data)))) + if ((locale = winpidgin_lcid_to_posix(atoi(data)))) return locale; } #endif lcid = GetUserDefaultLCID(); - if ((locale = wgaim_lcid_to_posix(lcid))) + if ((locale = winpidgin_lcid_to_posix(lcid))) return locale; return "en"; } -static void wgaim_set_locale() { +static void winpidgin_set_locale() { const char *locale = NULL; char envstr[25]; - locale = wgaim_get_locale(); + locale = winpidgin_get_locale(); snprintf(envstr, 25, "LANG=%s", locale); printf("Setting locale: %s\n", envstr); @@ -435,21 +435,21 @@ #define WM_FOCUS_REQUEST (WM_APP + 13) -static BOOL wgaim_set_running() { +static BOOL winpidgin_set_running() { HANDLE h; - if ((h = CreateMutex(NULL, FALSE, "gaim_is_running"))) { + if ((h = CreateMutex(NULL, FALSE, "pidgin_is_running"))) { if (GetLastError() == ERROR_ALREADY_EXISTS) { HWND msg_win; - if((msg_win = FindWindow(TEXT("WingaimMsgWinCls"), NULL))) + if((msg_win = FindWindow(TEXT("WinpidginMsgWinCls"), NULL))) if(SendMessage(msg_win, WM_FOCUS_REQUEST, (WPARAM) NULL, (LPARAM) NULL)) return FALSE; /* If we get here, the focus request wasn't successful */ MessageBox(NULL, - "An instance of Gaim is already running", + "An instance of Pidgin is already running", NULL, MB_OK | MB_TOPMOST); return FALSE; @@ -469,7 +469,7 @@ WinMain (struct HINSTANCE__ *hInstance, struct HINSTANCE__ *hPrevInstance, char *lpszCmdLine, int nCmdShow) { char errbuf[512]; - char gaimdir[MAX_PATH]; + char pidgindir[MAX_PATH]; HMODULE hmod; /* If debug or help or version flag used, create console for output */ @@ -492,8 +492,8 @@ } /* Load exception handler if we have it */ - if (GetModuleFileName(NULL, gaimdir, MAX_PATH) != 0) { - char *tmp = gaimdir; + if (GetModuleFileName(NULL, pidgindir, MAX_PATH) != 0) { + char *tmp = pidgindir; char *prev = NULL; while ((tmp = strchr(tmp, '\\'))) { @@ -503,8 +503,8 @@ if (prev) { prev[0] = '\0'; - strcat(gaimdir, "\\exchndl.dll"); - if (LoadLibrary(gaimdir)) + strcat(pidgindir, "\\exchndl.dll"); + if (LoadLibrary(pidgindir)) printf("Loaded exchndl.dll\n"); } } else { @@ -522,18 +522,18 @@ #endif dll_prep(); - wgaim_set_locale(); + winpidgin_set_locale(); /* If help or version flag used, do not check Mutex */ if (!strstr(lpszCmdLine, "-h") && !strstr(lpszCmdLine, "-v")) - if (!getenv("GAIM_MULTI_INST") && !wgaim_set_running()) + if (!getenv("GAIM_MULTI_INST") && !winpidgin_set_running()) return 0; /* Now we are ready for Gaim .. */ if ((hmod = LoadLibrary("pidgin.dll"))) { - gaim_main = (LPFNGAIMMAIN) GetProcAddress(hmod, "gaim_main"); + pidgin_main = (LPFNPIDGINMAIN) GetProcAddress(hmod, "pidgin_main"); } - if (!gaim_main) { + if (!pidgin_main) { DWORD dw = GetLastError(); BOOL mod_not_found = (dw == ERROR_MOD_NOT_FOUND || dw == ERROR_DLL_NOT_FOUND); const char *err_msg = get_win32_error_message(dw); @@ -548,5 +548,5 @@ return 0; } - return gaim_main (hInstance, __argc, __argv); + return pidgin_main(hInstance, __argc, __argv); }
--- a/pidgin/win32/wspell.c Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/wspell.c Mon Feb 05 03:37:27 2007 +0000 @@ -43,26 +43,26 @@ void wgtkspell_recheck_all(GtkSpell *spell) {} /* GTKSPELL PROTOS */ -GtkSpell* (*wgaim_gtkspell_new_attach) (GtkTextView *, +GtkSpell* (*wpidginspell_new_attach) (GtkTextView *, const gchar *, GError **) = wgtkspell_new_attach; -GtkSpell* (*wgaim_gtkspell_get_from_text_view) (GtkTextView*) = wgtkspell_get_from_text_view; +GtkSpell* (*wpidginspell_get_from_text_view) (GtkTextView*) = wgtkspell_get_from_text_view; -void (*wgaim_gtkspell_detach) (GtkSpell*) = wgtkspell_detach; +void (*wpidginspell_detach) (GtkSpell*) = wgtkspell_detach; -gboolean (*wgaim_gtkspell_set_language) (GtkSpell*, +gboolean (*wpidginspell_set_language) (GtkSpell*, const gchar*, GError**) = wgtkspell_set_language; -void (*wgaim_gtkspell_recheck_all) (GtkSpell*) = wgtkspell_recheck_all; +void (*wpidginspell_recheck_all) (GtkSpell*) = wgtkspell_recheck_all; static void load_gtkspell() { - wgaim_gtkspell_new_attach = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_new_attach" ); - wgaim_gtkspell_get_from_text_view = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_get_from_text_view"); - wgaim_gtkspell_detach = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_detach"); - wgaim_gtkspell_set_language = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_set_language"); - wgaim_gtkspell_recheck_all = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_recheck_all"); + wpidginspell_new_attach = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_new_attach" ); + wpidginspell_get_from_text_view = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_get_from_text_view"); + wpidginspell_detach = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_detach"); + wpidginspell_set_language = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_set_language"); + wpidginspell_recheck_all = (void*)wgaim_find_and_loadproc("libgtkspell.dll", "gtkspell_recheck_all"); } static char* lookup_aspell_path() { @@ -74,7 +74,7 @@ return wgaim_read_reg_string(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Path"); } -void wgaim_gtkspell_init() { +void wpidginspell_init() { char *aspell_path = lookup_aspell_path(); if (aspell_path != NULL) {
--- a/pidgin/win32/wspell.h Sun Feb 04 23:14:06 2007 +0000 +++ b/pidgin/win32/wspell.h Mon Feb 05 03:37:27 2007 +0000 @@ -24,26 +24,26 @@ #define _WSPELL_H_ #include <gtkspell/gtkspell.h> -void wgaim_gtkspell_init(void); +void wpidginspell_init(void); -extern GtkSpell* (*wgaim_gtkspell_new_attach)(GtkTextView*, const gchar*, GError**); +extern GtkSpell* (*wpidginspell_new_attach)(GtkTextView*, const gchar*, GError**); #define gtkspell_new_attach( view, lang, error ) \ -wgaim_gtkspell_new_attach( view, lang, error ) +wpidginspell_new_attach( view, lang, error ) -extern GtkSpell* (*wgaim_gtkspell_get_from_text_view)(GtkTextView*); +extern GtkSpell* (*wpidginspell_get_from_text_view)(GtkTextView*); #define gtkspell_get_from_text_view( view ) \ -wgaim_gtkspell_get_from_text_view( view ) +wpidginspell_get_from_text_view( view ) -extern void (*wgaim_gtkspell_detach)(GtkSpell*); +extern void (*wpidginspell_detach)(GtkSpell*); #define gtkspell_detach( spell ) \ -wgaim_gtkspell_detach( spell ) +wpidginspell_detach( spell ) -extern gboolean (*wgaim_gtkspell_set_language)(GtkSpell*, const gchar*, GError**); +extern gboolean (*wpidginspell_set_language)(GtkSpell*, const gchar*, GError**); #define gtkspell_set_language( spell, lang, error ) \ -wgaim_gtkspell_set_language( spell, lang, error ) +wpidginspell_set_language( spell, lang, error ) -extern void (*wgaim_gtkspell_recheck_all)(GtkSpell*); +extern void (*wpidginspell_recheck_all)(GtkSpell*); #define gtkspell_recheck_all( spell ) \ -wgaim_gtkspell_recheck_all( spell ) +wpidginspell_recheck_all( spell ) #endif /* _WSPELL_H_ */
--- a/po/POTFILES.in Sun Feb 04 23:14:06 2007 +0000 +++ b/po/POTFILES.in Mon Feb 05 03:37:27 2007 +0000 @@ -83,6 +83,7 @@ pidgin/plugins/ticker/ticker.c pidgin/plugins/timestamp.c pidgin/plugins/timestamp_format.c +pidgin/plugins/xmppconsole.c pidgin/plugins/win32/transparency/win2ktrans.c pidgin/plugins/win32/winprefs/winprefs.c libpurple/account.c