# HG changeset patch # User Daniel Atallah # Date 1171565956 0 # Node ID 37d9f44c7de1629b5fdc701f1d7d871cdbdbd646 # Parent 026f9c6cc9425654e27ef2499954ded9b3c2c256# Parent baec426702461c45c2a26786169c657ebb212c35 merge of '0118224968af798e258158653762d557de01c916' and '11536c727e00c07df8769130ad28e04ac5d60462' diff -r baec42670246 -r 37d9f44c7de1 libpurple/gaim-compat.h --- a/libpurple/gaim-compat.h Thu Feb 15 15:21:27 2007 +0000 +++ b/libpurple/gaim-compat.h Thu Feb 15 18:59:16 2007 +0000 @@ -1844,4 +1844,144 @@ #define gaim_sounds_get_handle purple_sounds_get_handle +/* from sslconn.h */ + +#define GAIM_SSL_DEFAULT_PORT PURPLE_SSL_DEFAULT_PORT + +#define GAIM_SSL_HANDSHAKE_FAILED PURPLE_SSL_HANDSHAKE_FAILED +#define GAIM_SSL_CONNECT_FAILED PURPLE_SSL_CONNECT_FAILED +#define GaimSslErrorType PurpleSslErrorType + +#define GaimSslConnection PurpleSslConnection + +#define GaimSslInputFunction PurpleSslInputFunction +#define GaimSslErrorFunction PurpleSslErrorFunction + +#define GaimSslOps PurpleSslOps + +#define gaim_ssl_is_supported purple_ssl_is_supported +#define gaim_ssl_connect purple_ssl_connect +#define gaim_ssl_connect_fd purple_ssl_connect_fd +#define gaim_ssl_input_add purple_ssl_input_add +#define gaim_ssl_close purple_ssl_close +#define gaim_ssl_read purple_ssl_read +#define gaim_ssl_write purple_ssl_write + +#define gaim_ssl_set_ops purple_ssl_set_ops +#define gaim_ssl_get_ops purple_ssl_get_ops +#define gaim_ssl_init purple_ssl_init +#define gaim_ssl_uninit purple_ssl_uninit + +/* from status.h */ + +#define GaimStatusType PurpleStatusType +#define GaimStatusAttr PurpleStatusAttr +#define GaimPresence PurplePresence +#define GaimStatus PurpleStatus + +#define GAIM_PRESENCE_CONTEXT_UNSET PURPLE_PRESENCE_CONTEXT_UNSET +#define GAIM_PRESENCE_CONTEXT_ACCOUNT PURPLE_PRESENCE_CONTEXT_ACCOUNT +#define GAIM_PRESENCE_CONTEXT_CONV PURPLE_PRESENCE_CONTEXT_CONV +#define GAIM_PRESENCE_CONTEXT_BUDDY PURPLE_PRESENCE_CONTEXT_BUDDY +#define GaimPresenceContext PurplePresenceContext + +#define GAIM_STATUS_UNSET PURPLE_STATUS_UNSET +#define GAIM_STATUS_OFFLINE PURPLE_STATUS_OFFLINE +#define GAIM_STATUS_AVAILABLE PURPLE_STATUS_AVAILABLE +#define GAIM_STATUS_UNAVAILABLE PURPLE_STATUS_UNAVAILABLE +#define GAIM_STATUS_INVISIBLE PURPLE_STATUS_INVISIBLE +#define GAIM_STATUS_AWAY PURPLE_STATUS_AWAY +#define GAIM_STATUS_EXTENDED_AWAY PURPLE_STATUS_EXTENDED_AWAY +#define GAIM_STATUS_MOBILE PURPLE_STATUS_MOBILE +#define GAIM_STATUS_NUM_PRIMITIVES PURPLE_STATUS_NUM_PRIMITIVES +#define GaimStatusPrimitive PurpleStatusPrimitive + +#define gaim_primitive_get_id_from_type purple_primitive_get_id_from_type +#define gaim_primitive_get_name_from_type purple_primitive_get_name_from_type +#define gaim_primitive_get_type_from_id purple_primitive_get_type_from_id + +#define gaim_status_type_new_full purple_status_type_new_full +#define gaim_status_type_new purple_status_type_new +#define gaim_status_type_new_with_attrs purple_status_type_new_with_attrs +#define gaim_status_type_destroy purple_status_type_destroy +#define gaim_status_type_set_primary_attr purple_status_type_set_primary_attr +#define gaim_status_type_add_attr purple_status_type_add_attr +#define gaim_status_type_add_attrs purple_status_type_add_attrs +#define gaim_status_type_add_attrs_vargs purple_status_type_add_attrs_vargs +#define gaim_status_type_get_primitive purple_status_type_get_primitive +#define gaim_status_type_get_id purple_status_type_get_id +#define gaim_status_type_get_name purple_status_type_get_name +#define gaim_status_type_is_saveable purple_status_type_is_saveable +#define gaim_status_type_is_user_settable purple_status_type_is_user_settable +#define gaim_status_type_is_independent purple_status_type_is_independent +#define gaim_status_type_is_exclusive purple_status_type_is_exclusive +#define gaim_status_type_is_available purple_status_type_is_available +#define gaim_status_type_get_primary_attr purple_status_type_get_primary_attr +#define gaim_status_type_get_attr purple_status_type_get_attr +#define gaim_status_type_get_attrs purple_status_type_get_attrs +#define gaim_status_type_find_with_id purple_status_type_find_with_id + +#define gaim_status_attr_new purple_status_attr_new +#define gaim_status_attr_destroy purple_status_attr_destroy +#define gaim_status_attr_get_id purple_status_attr_get_id +#define gaim_status_attr_get_name purple_status_attr_get_name +#define gaim_status_attr_get_value purple_status_attr_get_value + +#define gaim_status_new purple_status_new +#define gaim_status_destroy purple_status_destroy +#define gaim_status_set_active purple_status_set_active +#define gaim_status_set_active_with_attrs purple_status_set_active_with_attrs +#define gaim_status_set_active_with_attrs_list purple_status_set_active_with_attrs_list +#define gaim_status_set_attr_boolean purple_status_set_attr_boolean +#define gaim_status_set_attr_int purple_status_set_attr_int +#define gaim_status_set_attr_string purple_status_set_attr_string +#define gaim_status_get_type purple_status_get_type +#define gaim_status_get_presence purple_status_get_presence +#define gaim_status_get_id purple_status_get_id +#define gaim_status_get_name purple_status_get_name +#define gaim_status_is_independent purple_status_is_independent +#define gaim_status_is_exclusive purple_status_is_exclusive +#define gaim_status_is_available purple_status_is_available +#define gaim_status_is_active purple_status_is_active +#define gaim_status_is_online purple_status_is_online +#define gaim_status_get_attr_value purple_status_get_attr_value +#define gaim_status_get_attr_boolean purple_status_get_attr_boolean +#define gaim_status_get_attr_int purple_status_get_attr_int +#define gaim_status_get_attr_string purple_status_get_attr_string +#define gaim_status_compare purple_status_compare + +#define gaim_presence_new purple_presence_new +#define gaim_presence_new_for_account purple_presence_new_for_account +#define gaim_presence_new_for_conv purple_presence_new_for_conv +#define gaim_presence_new_for_buddy purple_presence_new_for_buddy +#define gaim_presence_destroy purple_presence_destroy +#define gaim_presence_remove_buddy purple_presence_remove_buddy +#define gaim_presence_add_status purple_presence_add_status +#define gaim_presence_add_list purple_presence_add_list +#define gaim_presence_set_status_active purple_presence_set_status_active +#define gaim_presence_switch_status purple_presence_switch_status +#define gaim_presence_set_idle purple_presence_set_idle +#define gaim_presence_set_login_time purple_presence_set_login_time +#define gaim_presence_get_context purple_presence_get_context +#define gaim_presence_get_account purple_presence_get_account +#define gaim_presence_get_conversation purple_presence_get_conversation +#define gaim_presence_get_chat_user purple_presence_get_chat_user +#define gaim_presence_get_buddies purple_presence_get_buddies +#define gaim_presence_get_statuses purple_presence_get_statuses +#define gaim_presence_get_status purple_presence_get_status +#define gaim_presence_get_active_status purple_presence_get_active_status +#define gaim_presence_is_available purple_presence_is_available +#define gaim_presence_is_online purple_presence_is_online +#define gaim_presence_is_status_active purple_presence_is_status_active +#define gaim_presence_is_status_primitive_active \ + purple_presence_is_status_primitive_active +#define gaim_presence_is_idle purple_presence_is_idle +#define gaim_presence_get_idle_time purple_presence_get_idle_time +#define gaim_presence_get_login_time purple_presence_get_login_time +#define gaim_presence_compare purple_presence_compare + +#define gaim_status_get_handle purple_status_get_handle +#define gaim_status_init purple_status_init +#define gaim_status_uninit purple_status_uninit + #endif /* _GAIM_COMPAT_H_ */ diff -r baec42670246 -r 37d9f44c7de1 pidgin/gtkeventloop.c --- a/pidgin/gtkeventloop.c Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/gtkeventloop.c Thu Feb 15 18:59:16 2007 +0000 @@ -63,7 +63,7 @@ #ifdef _WIN32 if(! gaim_cond) { -#if DEBUG +#ifdef DEBUG 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", diff -r baec42670246 -r 37d9f44c7de1 pidgin/gtkmain.c --- a/pidgin/gtkmain.c Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/gtkmain.c Thu Feb 15 18:59:16 2007 +0000 @@ -455,6 +455,8 @@ /* FUCKING GET ME A TOWEL! */ #ifdef _WIN32 +/* suppress gcc "no previous prototype" warning */ +int pidgin_main(HINSTANCE hint, int argc, char *argv[]); int pidgin_main(HINSTANCE hint, int argc, char *argv[]) #else int main(int argc, char *argv[]) @@ -726,7 +728,7 @@ /* TODO: Move pounces loading into gaim_pounces_init() */ gaim_pounces_load(); - + /* HACK BY SEANEGAN: * We've renamed prpl-oscar to prpl-aim and prpl-icq, accordingly. * Let's do that change right here... after everything's loaded, but @@ -741,7 +743,7 @@ gaim_account_set_protocol_id(account, "prpl-aim"); } } - + ui_main(); #ifdef USE_SM diff -r baec42670246 -r 37d9f44c7de1 pidgin/plugins/win32/winprefs/gtkappbar.c --- a/pidgin/plugins/win32/winprefs/gtkappbar.c Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/plugins/win32/winprefs/gtkappbar.c Thu Feb 15 18:59:16 2007 +0000 @@ -4,7 +4,7 @@ * File: gtkappbar.c * Date: August 2, 2003 * Description: Appbar functionality for Windows GTK+ applications - * + * * Copyright (C) 2003, Herman Bloggs * * This program is free software; you can redistribute it and/or modify @@ -128,21 +128,17 @@ } /* Retrieve the rectangle of the active work area at a point */ -static RECT get_rect_at_point(POINT pt) { - RECT rc; - if (!get_rect_at_point_multimonitor(pt, &rc)) { - get_default_workarea(&rc); +static void get_rect_at_point(POINT pt, RECT *rc) { + if (!get_rect_at_point_multimonitor(pt, rc)) { + get_default_workarea(rc); } - return rc; } /* Retrieve the rectangle of the active work area of a window*/ -static RECT get_rect_of_window(HWND window) { - RECT rc; - if (!get_rect_of_window_multimonitor(window, &rc)) { - get_default_workarea(&rc); +static void get_rect_of_window(HWND window, RECT *rc) { + if (!get_rect_of_window_multimonitor(window, rc)) { + get_default_workarea(rc); } - return rc; } static void get_window_normal_rc(HWND hwnd, RECT *rc) { @@ -173,7 +169,7 @@ /* This really should be the following, but SWP_FRAMECHANGED strangely causes initermittent problems "Show Desktop" done more than once. * Not having SWP_FRAMECHANGED *should* cause the Style not to be applied, but i haven't noticed any problems - * SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); + * SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); */ } /** Register the window as an appbar */ @@ -212,15 +208,15 @@ APPBARDATA abd; guint iWidth = 0; - if(!ab->registered) - gtk_appbar_register(ab, hwnd); + if(!ab->registered) + gtk_appbar_register(ab, hwnd); abd.hWnd = hwnd; abd.cbSize = sizeof(APPBARDATA); abd.uEdge = ab->side; iWidth = ab->docked_rect.right - ab->docked_rect.left; - + abd.rc.top = rcWorkspace.top; abd.rc.bottom = rcWorkspace.bottom; switch (abd.uEdge) @@ -288,7 +284,7 @@ gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "wnd_moving\n"); GetCursorPos(&cp); - monRect = get_rect_at_point(cp); + get_rect_at_point(cp, &monRect); dockAreaWidth = (monRect.right - monRect.left) / 10; /* Which part of the screen are we in ? */ @@ -318,7 +314,7 @@ rc->bottom = rc->top + ab->undocked_height; } - /* Switch to toolbar/regular caption*/ + /* Switch to toolbar/regular caption*/ if(ab->docking) set_toolbar(msg->hwnd, TRUE); else if(!ab->docked) @@ -453,7 +449,7 @@ static GdkFilterReturn wnd_nchittest(GtkAppBar *ab, GdkXEvent *xevent) { MSG *msg = (MSG*)xevent; - + if(ab->docked) { UINT ret = DefWindowProc(msg->hwnd, msg->message, msg->wParam, msg->lParam); @@ -463,7 +459,7 @@ case HTBOTTOMRIGHT: case HTTOP: case HTTOPLEFT: - case HTTOPRIGHT: + case HTTOPRIGHT: return GDK_FILTER_REMOVE; case HTLEFT: if(ab->side == ABE_LEFT) @@ -499,7 +495,7 @@ static GdkFilterReturn gtk_appbar_callback(GtkAppBar *ab, GdkXEvent *xevent) { MSG *msg = (MSG*)xevent; - RECT orig; + RECT orig, windowRect; switch (msg->wParam) { case ABN_STATECHANGE: @@ -519,18 +515,18 @@ } break; - - case ABN_POSCHANGED: - gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: ABN_POSCHANGED\n"); - CopyRect(&orig, &(ab->docked_rect)); - gtk_appbar_querypos(ab, msg->hwnd, get_rect_of_window(msg->hwnd)); + case ABN_POSCHANGED: + gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: ABN_POSCHANGED\n"); + CopyRect(&orig, &(ab->docked_rect)); + get_rect_of_window(msg->hwnd, &windowRect); + gtk_appbar_querypos(ab, msg->hwnd, windowRect); if (EqualRect(&orig, &(ab->docked_rect)) == 0) { - MoveWindow(msg->hwnd, ab->docked_rect.left, ab->docked_rect.top, + MoveWindow(msg->hwnd, ab->docked_rect.left, ab->docked_rect.top, ab->docked_rect.right - ab->docked_rect.left, ab->docked_rect.bottom - ab->docked_rect.top, TRUE); } gtk_appbar_setpos(ab, msg->hwnd); - break; + break; #if 0 default: gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_callback: %d\n", msg->wParam); @@ -577,7 +573,7 @@ } void gtk_appbar_dock(GtkAppBar *ab, UINT side) { - RECT orig; + RECT orig, windowRect; gaim_debug(GAIM_DEBUG_INFO, "gtkappbar", "gtk_appbar_dock\n"); @@ -587,12 +583,12 @@ ab->side = side; get_window_normal_rc(GDK_WINDOW_HWND(ab->win->window), &(ab->docked_rect)); CopyRect(&orig, &(ab->docked_rect)); - gtk_appbar_querypos(ab, GDK_WINDOW_HWND(ab->win->window), - get_rect_of_window(GDK_WINDOW_HWND(ab->win->window))); + get_rect_of_window(GDK_WINDOW_HWND(ab->win->window), &windowRect); + gtk_appbar_querypos(ab, GDK_WINDOW_HWND(ab->win->window), windowRect); if(EqualRect(&orig, &(ab->docked_rect)) == 0) MoveWindow(GDK_WINDOW_HWND(ab->win->window), ab->docked_rect.left, - ab->docked_rect.top, + ab->docked_rect.top, ab->docked_rect.right - ab->docked_rect.left, ab->docked_rect.bottom - ab->docked_rect.top, TRUE); gtk_appbar_setpos(ab, GDK_WINDOW_HWND(ab->win->window)); diff -r baec42670246 -r 37d9f44c7de1 pidgin/win32/IdleTracker/idletrack.c --- a/pidgin/win32/IdleTracker/idletrack.c Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/win32/IdleTracker/idletrack.c Thu Feb 15 18:59:16 2007 +0000 @@ -172,7 +172,9 @@ CloseHandle(hMapObject); } -int WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { +/* suppress gcc "no previous prototype" warning */ +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved); +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { switch(dwReason) { case DLL_PROCESS_ATTACH: g_hInstance = hInstance; diff -r baec42670246 -r 37d9f44c7de1 pidgin/win32/gtkwin32dep.c --- a/pidgin/win32/gtkwin32dep.c Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/win32/gtkwin32dep.c Thu Feb 15 18:59:16 2007 +0000 @@ -329,7 +329,7 @@ if(!winpidgin_set_idlehooks()) gaim_debug_error("winpidgin", "Failed to initialize idle tracker\n"); - wpidginspell_init(); + winpidgin_spell_init(); gaim_debug_info("winpidgin", "GTK+ :%u.%u.%u\n", gtk_major_version, gtk_minor_version, gtk_micro_version); @@ -365,6 +365,8 @@ } /* DLL initializer */ +/* suppress gcc "no previous prototype" warning */ +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { dll_hInstance = hinstDLL; return TRUE; diff -r baec42670246 -r 37d9f44c7de1 pidgin/win32/wspell.c --- a/pidgin/win32/wspell.c Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/win32/wspell.c Thu Feb 15 18:59:16 2007 +0000 @@ -30,17 +30,14 @@ #include #include "debug.h" #include "win32dep.h" +#include "wspell.h" /* GTKSPELL DUMMY FUNCS */ -GtkSpell* wgtkspell_new_attach(GtkTextView *view, - const gchar *lang, - GError **error) {return NULL;} -GtkSpell* wgtkspell_get_from_text_view(GtkTextView *view) {return NULL;} -void wgtkspell_detach(GtkSpell *spell) {} -gboolean wgtkspell_set_language(GtkSpell *spell, - const gchar *lang, - GError **error) {return 0;} -void wgtkspell_recheck_all(GtkSpell *spell) {} +static GtkSpell* wgtkspell_new_attach(GtkTextView *view, const gchar *lang, GError **error) {return NULL;} +static GtkSpell* wgtkspell_get_from_text_view(GtkTextView *view) {return NULL;} +static void wgtkspell_detach(GtkSpell *spell) {} +static gboolean wgtkspell_set_language(GtkSpell *spell, const gchar *lang, GError **error) {return FALSE;} +static void wgtkspell_recheck_all(GtkSpell *spell) {} /* GTKSPELL PROTOS */ GtkSpell* (*wpidginspell_new_attach) (GtkTextView *, @@ -58,11 +55,11 @@ void (*wpidginspell_recheck_all) (GtkSpell*) = wgtkspell_recheck_all; static void load_gtkspell() { - 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"); + 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 +71,7 @@ return wgaim_read_reg_string(HKEY_LOCAL_MACHINE, "Software\\Aspell", "Path"); } -void wpidginspell_init() { +void winpidgin_spell_init() { char *aspell_path = lookup_aspell_path(); if (aspell_path != NULL) { diff -r baec42670246 -r 37d9f44c7de1 pidgin/win32/wspell.h --- a/pidgin/win32/wspell.h Thu Feb 15 15:21:27 2007 +0000 +++ b/pidgin/win32/wspell.h Thu Feb 15 18:59:16 2007 +0000 @@ -24,7 +24,7 @@ #define _WSPELL_H_ #include -void wpidginspell_init(void); +void winpidgin_spell_init(void); extern GtkSpell* (*wpidginspell_new_attach)(GtkTextView*, const gchar*, GError**); #define gtkspell_new_attach( view, lang, error ) \ @@ -38,7 +38,7 @@ #define gtkspell_detach( spell ) \ wpidginspell_detach( spell ) -extern gboolean (*wpidginspell_set_language)(GtkSpell*, const gchar*, GError**); +extern gboolean (*wpidginspell_set_language)(GtkSpell*, const gchar*, GError**); #define gtkspell_set_language( spell, lang, error ) \ wpidginspell_set_language( spell, lang, error )