From: Herman B. <her...@us...> - 2004-11-22 22:13:22
|
Update of /cvsroot/gaim/gaim/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7056/src/win32 Modified Files: win32dep.c win32dep.h Log Message: Removing trust parameter for gaim_notify_uri (see gaim-devel over past few days). Removed URI scheme filtering for win32. Instead we'll allow what ever the default http browser allows. Index: win32dep.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/win32/win32dep.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -p -r1.47 -r1.48 --- win32dep.c 20 Nov 2004 00:56:59 -0000 1.47 +++ win32dep.c 22 Nov 2004 22:13:12 -0000 1.48 @@ -507,6 +507,24 @@ void wgaim_systray_maximize( GtkWidget * RestoreWndFromTray(GDK_WINDOW_HWND(window->window)); } +void wgaim_notify_uri(const char *uri) { + SHELLEXECUTEINFO sinfo; + + memset(&sinfo, 0, sizeof(sinfo)); + sinfo.cbSize = sizeof(sinfo); + sinfo.fMask = SEE_MASK_CLASSNAME; + sinfo.lpVerb = "open"; + sinfo.lpFile = uri; + sinfo.nShow = SW_SHOWNORMAL; + sinfo.lpClass = "http"; + + /* We'll allow whatever URI schemes are supported by the + default http browser. + */ + if(!ShellExecuteEx(&sinfo)) + gaim_debug_error("wgaim", "Error opening URI: %s error: %d\n", uri, (int)sinfo.hInstApp); +} + void wgaim_init(HINSTANCE hint) { WORD wVersionRequested; WSADATA wsaData; Index: win32dep.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/win32/win32dep.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -p -r1.26 -r1.27 --- win32dep.h 12 Feb 2004 19:54:18 -0000 1.26 +++ win32dep.h 22 Nov 2004 22:13:12 -0000 1.27 @@ -56,6 +56,8 @@ extern int wgaim_gz_untar(const ch /* Docklet */ extern void wgaim_systray_minimize( GtkWidget* ); extern void wgaim_systray_maximize( GtkWidget* ); +/* Misc */ +extern void wgaim_notify_uri(const char *uri); /* init / cleanup */ extern void wgaim_init(HINSTANCE); extern void wgaim_cleanup(void); |