Mon, 05 Dec 2022 05:31:22 -0600
Remove the privacy api
This API has been needing a rewrite for as long as I've been working on Gaim /
Pidgin and nothing has come of it. Therefore, I'm am removing it for a much
more simplified approach in the future.
Testing Done:
Sent some messages with the demo protocol plugin.
Reviewed at https://reviews.imfreedom.org/r/2065/
|
38553
36e30c91cd15
gtkwin32dep: Fix section documentation headings
Mike Ruprecht <cmaiku@gmail.com>
parents:
38433
diff
changeset
|
1 | /* |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
2 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
3 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
4 | * source distribution. |
| 14286 | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify | |
| 7 | * it under the terms of the GNU General Public License as published by | |
| 8 | * the Free Software Foundation; either version 2 of the License, or | |
| 9 | * (at your option) any later version. | |
| 10 | * | |
| 11 | * This program is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | * GNU General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU General Public License | |
| 17 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18633
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 14286 | 19 | * |
| 20 | */ | |
| 21 | #include <io.h> | |
| 22 | #include <stdlib.h> | |
| 23 | #include <stdio.h> | |
|
41198
b5b1bffc48fb
Random Windows tweaks
Gary Kramlich <grim@reaperworld.com>
parents:
41087
diff
changeset
|
24 | |
|
b5b1bffc48fb
Random Windows tweaks
Gary Kramlich <grim@reaperworld.com>
parents:
41087
diff
changeset
|
25 | /* winsock2.h needs to be include before windows.h or else it throws a warning |
|
b5b1bffc48fb
Random Windows tweaks
Gary Kramlich <grim@reaperworld.com>
parents:
41087
diff
changeset
|
26 | * saying it needs to be included first. We don't use it directly but it's |
|
b5b1bffc48fb
Random Windows tweaks
Gary Kramlich <grim@reaperworld.com>
parents:
41087
diff
changeset
|
27 | * included indirectly. |
|
b5b1bffc48fb
Random Windows tweaks
Gary Kramlich <grim@reaperworld.com>
parents:
41087
diff
changeset
|
28 | */ |
|
b5b1bffc48fb
Random Windows tweaks
Gary Kramlich <grim@reaperworld.com>
parents:
41087
diff
changeset
|
29 | #include <winsock2.h> |
|
40669
48dfed6f4f1f
Fix Windows builds and tests
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40555
diff
changeset
|
30 | #include <windows.h> |
| 14286 | 31 | #include <winuser.h> |
|
35892
02bf3200b9cb
cross-win32: make use of WIN32_LEAN_AND_MEAN define
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35891
diff
changeset
|
32 | #include <shellapi.h> |
| 14286 | 33 | |
| 34 | #include <glib.h> | |
| 35 | #include <glib/gstdio.h> | |
| 36 | #include <gtk/gtk.h> | |
| 37 | ||
|
40360
e21f3bbcc2a5
Update all of the pidgin code to include purple.h
Gary Kramlich <grim@reaperworld.com>
parents:
40001
diff
changeset
|
38 | #include <purple.h> |
| 14286 | 39 | |
| 40 | #include "resource.h" | |
| 41 | ||
| 42 | #include "gtkwin32dep.h" | |
|
39333
2da5959eb42c
pidgin: Use gtk_window_present() to present buddy list
Mike Ruprecht <cmaiku@gmail.com>
parents:
38628
diff
changeset
|
43 | #include "gtkblist.h" |
|
14762
f494a5f12981
[gaim-migrate @ 17452]
Daniel Atallah <datallah@pidgin.im>
parents:
14636
diff
changeset
|
44 | #include "gtkconv.h" |
| 14286 | 45 | |
| 46 | /* | |
| 47 | * GLOBALS | |
| 48 | */ | |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
49 | HINSTANCE exe_hInstance = 0; |
|
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
50 | HINSTANCE dll_hInstance = 0; |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
51 | HWND messagewin_hwnd; |
|
14762
f494a5f12981
[gaim-migrate @ 17452]
Daniel Atallah <datallah@pidgin.im>
parents:
14636
diff
changeset
|
52 | |
| 14286 | 53 | /* |
| 54 | * PUBLIC CODE | |
| 55 | */ | |
| 56 | ||
|
16058
dc1c7b09a058
4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
57 | HINSTANCE winpidgin_exe_hinstance(void) { |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
58 | return exe_hInstance; |
| 14286 | 59 | } |
| 60 | ||
| 35605 | 61 | void winpidgin_set_exe_hinstance(HINSTANCE hint) |
| 62 | { | |
| 63 | exe_hInstance = hint; | |
| 64 | } | |
| 65 | ||
|
16058
dc1c7b09a058
4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
66 | HINSTANCE winpidgin_dll_hinstance(void) { |
|
dc1c7b09a058
4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
67 | return dll_hInstance; |
|
dc1c7b09a058
4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
68 | } |
|
dc1c7b09a058
4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
69 | |
|
15678
7434ef155a3a
Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
70 | #define PIDGIN_WM_FOCUS_REQUEST (WM_APP + 13) |
|
7434ef155a3a
Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
71 | #define PIDGIN_WM_PROTOCOL_HANDLE (WM_APP + 14) |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
72 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
73 | static LRESULT CALLBACK message_window_handler(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
74 | |
|
15678
7434ef155a3a
Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
75 | if (msg == PIDGIN_WM_FOCUS_REQUEST) { |
|
39333
2da5959eb42c
pidgin: Use gtk_window_present() to present buddy list
Mike Ruprecht <cmaiku@gmail.com>
parents:
38628
diff
changeset
|
76 | PidginBuddyList *blist; |
| 15884 | 77 | purple_debug_info("winpidgin", "Got external Buddy List focus request."); |
|
39333
2da5959eb42c
pidgin: Use gtk_window_present() to present buddy list
Mike Ruprecht <cmaiku@gmail.com>
parents:
38628
diff
changeset
|
78 | blist = pidgin_blist_get_default_gtk_blist(); |
|
2da5959eb42c
pidgin: Use gtk_window_present() to present buddy list
Mike Ruprecht <cmaiku@gmail.com>
parents:
38628
diff
changeset
|
79 | if (blist != NULL && blist->window != NULL) { |
|
2da5959eb42c
pidgin: Use gtk_window_present() to present buddy list
Mike Ruprecht <cmaiku@gmail.com>
parents:
38628
diff
changeset
|
80 | gtk_window_present(GTK_WINDOW(blist->window)); |
|
2da5959eb42c
pidgin: Use gtk_window_present() to present buddy list
Mike Ruprecht <cmaiku@gmail.com>
parents:
38628
diff
changeset
|
81 | } |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
82 | return TRUE; |
|
15678
7434ef155a3a
Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
83 | } else if (msg == PIDGIN_WM_PROTOCOL_HANDLE) { |
|
7434ef155a3a
Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
84 | char *proto_msg = (char *) lparam; |
| 15884 | 85 | purple_debug_info("winpidgin", "Got protocol handler request: %s\n", proto_msg ? proto_msg : ""); |
| 86 | purple_got_protocol_handler_uri(proto_msg); | |
|
15678
7434ef155a3a
Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents:
15578
diff
changeset
|
87 | return TRUE; |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
88 | } |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
89 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
90 | return DefWindowProc(hwnd, msg, wparam, lparam); |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
91 | } |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
92 | |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
93 | static HWND winpidgin_message_window_init(void) { |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
94 | HWND win_hwnd; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
95 | WNDCLASSEX wcx; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
96 | LPCTSTR wname; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
97 | |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
98 | wname = TEXT("WinpidginMsgWinCls"); |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
99 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
100 | wcx.cbSize = sizeof(wcx); |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
101 | wcx.style = 0; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
102 | wcx.lpfnWndProc = message_window_handler; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
103 | wcx.cbClsExtra = 0; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
104 | wcx.cbWndExtra = 0; |
|
16058
dc1c7b09a058
4bit icons for windows < XP. These are certainly not as pretty as the originals, but look a lot better than scaled down versions.
Daniel Atallah <datallah@pidgin.im>
parents:
15884
diff
changeset
|
105 | wcx.hInstance = winpidgin_exe_hinstance(); |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
106 | wcx.hIcon = NULL; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
107 | wcx.hCursor = NULL; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
108 | wcx.hbrBackground = NULL; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
109 | wcx.lpszMenuName = NULL; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
110 | wcx.lpszClassName = wname; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
111 | wcx.hIconSm = NULL; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
112 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
113 | RegisterClassEx(&wcx); |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
114 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
115 | /* Create the window */ |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
116 | if(!(win_hwnd = CreateWindow(wname, TEXT("WinpidginMsgWin"), 0, 0, 0, 0, 0, |
|
21943
8a938e6ea033
This is a great patch from Lee Roach to make Pidgin on win32 deal with system suspend / resume. It seems to work really well, hopefully this'll make some folks happy. If something doesn't work right, it is probably my fault. Fixes #480.
Daniel Atallah <datallah@pidgin.im>
parents:
21613
diff
changeset
|
117 | NULL, NULL, winpidgin_exe_hinstance(), 0))) { |
| 15884 | 118 | purple_debug_error("winpidgin", |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
119 | "Unable to create message window.\n"); |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
120 | return NULL; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
121 | } |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
122 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
123 | return win_hwnd; |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
124 | } |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
125 | |
| 35605 | 126 | void winpidgin_init(void) { |
|
33371
6d93866a4a3f
Explictly set the calling conventions for some dynamic functions on win32.
Daniel Atallah <datallah@pidgin.im>
parents:
30793
diff
changeset
|
127 | typedef void (__cdecl* LPFNSETLOGFILE)(const LPCSTR); |
|
6d93866a4a3f
Explictly set the calling conventions for some dynamic functions on win32.
Daniel Atallah <datallah@pidgin.im>
parents:
30793
diff
changeset
|
128 | LPFNSETLOGFILE MySetLogFile; |
|
30739
72613eff8b0e
Use some fully qualified dll locations.
Daniel Atallah <datallah@pidgin.im>
parents:
30734
diff
changeset
|
129 | gchar *exchndl_dll_path; |
|
14762
f494a5f12981
[gaim-migrate @ 17452]
Daniel Atallah <datallah@pidgin.im>
parents:
14636
diff
changeset
|
130 | |
|
33960
ce450446c56a
Win32: strengthen DLL loading; VV: fix farstream plugins loading on win32
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33898
diff
changeset
|
131 | if (purple_debug_is_verbose()) |
|
ce450446c56a
Win32: strengthen DLL loading; VV: fix farstream plugins loading on win32
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33898
diff
changeset
|
132 | purple_debug_misc("winpidgin", "winpidgin_init start\n"); |
| 14286 | 133 | |
|
35901
5bcb306a4edf
cross-win32: FHS support for win32
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35892
diff
changeset
|
134 | exchndl_dll_path = g_build_filename(wpurple_bin_dir(), "exchndl.dll", NULL); |
|
41952
e128168d9ea5
Fix a compilation error on windows and many warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41904
diff
changeset
|
135 | MySetLogFile = (gpointer)wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile"); |
|
30739
72613eff8b0e
Use some fully qualified dll locations.
Daniel Atallah <datallah@pidgin.im>
parents:
30734
diff
changeset
|
136 | g_free(exchndl_dll_path); |
|
72613eff8b0e
Use some fully qualified dll locations.
Daniel Atallah <datallah@pidgin.im>
parents:
30734
diff
changeset
|
137 | exchndl_dll_path = NULL; |
|
33371
6d93866a4a3f
Explictly set the calling conventions for some dynamic functions on win32.
Daniel Atallah <datallah@pidgin.im>
parents:
30793
diff
changeset
|
138 | if (MySetLogFile) { |
|
29767
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
139 | gchar *debug_dir, *locale_debug_dir; |
|
30734
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
140 | |
|
39957
be2eb199e368
Move Windows crash reports to cache directory.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39333
diff
changeset
|
141 | debug_dir = g_build_filename(purple_cache_dir(), "pidgin.RPT", NULL); |
|
29767
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
142 | locale_debug_dir = g_locale_from_utf8(debug_dir, -1, NULL, NULL, NULL); |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
143 | |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
144 | purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", debug_dir); |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
145 | |
|
33371
6d93866a4a3f
Explictly set the calling conventions for some dynamic functions on win32.
Daniel Atallah <datallah@pidgin.im>
parents:
30793
diff
changeset
|
146 | MySetLogFile(locale_debug_dir); |
|
29767
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
147 | |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
148 | g_free(debug_dir); |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
149 | g_free(locale_debug_dir); |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
150 | } |
|
6b53ccad9d4a
Make Pidgin set the exchndl.dll log file to ~/.purple/pidgin.RPT
Daniel Atallah <datallah@pidgin.im>
parents:
29740
diff
changeset
|
151 | |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
152 | messagewin_hwnd = winpidgin_message_window_init(); |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
153 | |
|
33960
ce450446c56a
Win32: strengthen DLL loading; VV: fix farstream plugins loading on win32
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33898
diff
changeset
|
154 | if (purple_debug_is_verbose()) |
|
ce450446c56a
Win32: strengthen DLL loading; VV: fix farstream plugins loading on win32
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33898
diff
changeset
|
155 | purple_debug_misc("winpidgin", "winpidgin_init end\n"); |
| 14286 | 156 | } |
| 157 | ||
| 158 | /* Windows Cleanup */ | |
| 159 | ||
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
160 | void winpidgin_cleanup(void) { |
| 15884 | 161 | purple_debug_info("winpidgin", "winpidgin_cleanup\n"); |
|
14319
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
162 | |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
163 | if(messagewin_hwnd) |
|
b9a35c4948dc
[gaim-migrate @ 16939]
Daniel Atallah <datallah@pidgin.im>
parents:
14286
diff
changeset
|
164 | DestroyWindow(messagewin_hwnd); |
| 14286 | 165 | |
| 166 | } | |
| 167 | ||
| 168 | /* DLL initializer */ | |
|
15697
78ddac185d80
winpidgin warning fixes
Daniel Atallah <datallah@pidgin.im>
parents:
15678
diff
changeset
|
169 | /* suppress gcc "no previous prototype" warning */ |
|
78ddac185d80
winpidgin warning fixes
Daniel Atallah <datallah@pidgin.im>
parents:
15678
diff
changeset
|
170 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); |
|
41952
e128168d9ea5
Fix a compilation error on windows and many warnings
Gary Kramlich <grim@reaperworld.com>
parents:
41904
diff
changeset
|
171 | BOOL WINAPI DllMain(HINSTANCE hinstDLL, G_GNUC_UNUSED DWORD fdwReason, G_GNUC_UNUSED LPVOID lpvReserved) { |
|
15574
18d9d1c05994
Win32 de-gaimification of pidgin
Daniel Atallah <datallah@pidgin.im>
parents:
15563
diff
changeset
|
172 | dll_hInstance = hinstDLL; |
| 14286 | 173 | return TRUE; |
| 174 | } | |
|
14636
5306c329992c
[gaim-migrate @ 17298]
Daniel Atallah <datallah@pidgin.im>
parents:
14319
diff
changeset
|
175 | |
|
37565
fa3c41b69e47
win32: Fix window placement on Windows >= Vista. Fixes #16830
Eion Robb <eion@robbmob.com>
parents:
37507
diff
changeset
|
176 | typedef HRESULT (WINAPI* DwmIsCompositionEnabledFunction)(BOOL*); |
|
fa3c41b69e47
win32: Fix window placement on Windows >= Vista. Fixes #16830
Eion Robb <eion@robbmob.com>
parents:
37507
diff
changeset
|
177 | typedef HRESULT (WINAPI* DwmGetWindowAttributeFunction)(HWND, DWORD, PVOID, DWORD); |
|
fa3c41b69e47
win32: Fix window placement on Windows >= Vista. Fixes #16830
Eion Robb <eion@robbmob.com>
parents:
37507
diff
changeset
|
178 | #ifndef DWMWA_EXTENDED_FRAME_BOUNDS |
|
fa3c41b69e47
win32: Fix window placement on Windows >= Vista. Fixes #16830
Eion Robb <eion@robbmob.com>
parents:
37507
diff
changeset
|
179 | # define DWMWA_EXTENDED_FRAME_BOUNDS 9 |
|
fa3c41b69e47
win32: Fix window placement on Windows >= Vista. Fixes #16830
Eion Robb <eion@robbmob.com>
parents:
37507
diff
changeset
|
180 | #endif |
|
fa3c41b69e47
win32: Fix window placement on Windows >= Vista. Fixes #16830
Eion Robb <eion@robbmob.com>
parents:
37507
diff
changeset
|
181 | |
|
30734
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
182 | DWORD winpidgin_get_lastactive() { |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
183 | DWORD result = 0; |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
184 | |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
185 | LASTINPUTINFO lii; |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
186 | memset(&lii, 0, sizeof(lii)); |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
187 | lii.cbSize = sizeof(lii); |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
188 | if (GetLastInputInfo(&lii)) |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
189 | result = lii.dwTime; |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
190 | |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
191 | return result; |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
192 | } |
|
caafb5a4e95b
Kill the win32 idle tracking code that works on old windows versions and move
Daniel Atallah <datallah@pidgin.im>
parents:
30251
diff
changeset
|
193 |