summaryrefslogtreecommitdiff
path: root/gdk/win32/gdkdnd-win32.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-08-29 23:01:53 +0000
committerTor Lillqvist <tml@src.gnome.org>2006-08-29 23:01:53 +0000
commit1ff434a681f7d39c9129324fa11a5af55e5fa857 (patch)
treeb9a1104a04e1ffdf97404acaa8ac0559c4ba3125 /gdk/win32/gdkdnd-win32.c
parent019fece724f955071fdd1fa12df0409678aabe79 (diff)
downloadgtk+-1ff434a681f7d39c9129324fa11a5af55e5fa857.tar.gz
Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or
2006-08-29 Tor Lillqvist <tml@novell.com> Remove support for Windows 9x/ME. GTK+ hasn't worked on Win9x since 2.6 or 2.8. It's pointless to keep the Win9x code in here as it isn't being maintained anyway. If somebody is interested, it can always be found in older GTK+ versions, and in CVS. * gdk/win32/gdkcursor-win32.c * gdk/win32/gdkdnd-win32.c * gdk/win32/gdkdrawable-win32.c * gdk/win32/gdkgc-win32.c * gdk/win32/gdkglobals-win32.c * gdk/win32/gdkkeys-win32.c * gdk/win32/gdkmain-win32.c * gdk/win32/gdkproperty-win32.c * gdk/win32/gdkselection-win32.c: Remove the G_WIN32_IS_NT_BASED() and G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x) branches, and any variables or static functions used only by the Win9x branches. * gdk/win32/gdkprivate-win32.h: Remove backup definitions for constants that aren't missing from current mingw and MSVC6 headers. * gdk/win32/gdkmain-win32.c * gdk/win32/gdkprivate-win32.h: Remove the _gdk_win32_gdi_failed() function. On NT-based Windows GetLastError() returns error codes also for failed GDI calls, so we can use _gdk_win32_api_failed() always.
Diffstat (limited to 'gdk/win32/gdkdnd-win32.c')
-rw-r--r--gdk/win32/gdkdnd-win32.c73
1 files changed, 17 insertions, 56 deletions
diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c
index 346a894538..b8d940a046 100644
--- a/gdk/win32/gdkdnd-win32.c
+++ b/gdk/win32/gdkdnd-win32.c
@@ -857,7 +857,6 @@ resolve_link (HWND hWnd,
guchar **lpszPath)
{
HRESULT hres;
- IShellLinkA *pslA = NULL;
IShellLinkW *pslW = NULL;
IPersistFile *ppf = NULL;
@@ -869,18 +868,11 @@ resolve_link (HWND hWnd,
* assumed that CoInitialize has been called.
*/
- if (G_WIN32_HAVE_WIDECHAR_API ())
- hres = CoCreateInstance (&CLSID_ShellLink,
- NULL,
- CLSCTX_INPROC_SERVER,
- &IID_IShellLinkW,
- (LPVOID *)&pslW);
- else
- hres = CoCreateInstance (&CLSID_ShellLink,
- NULL,
- CLSCTX_INPROC_SERVER,
- &IID_IShellLinkA,
- (LPVOID *)&pslA);
+ hres = CoCreateInstance (&CLSID_ShellLink,
+ NULL,
+ CLSCTX_INPROC_SERVER,
+ &IID_IShellLinkW,
+ (LPVOID *)&pslW);
if (SUCCEEDED (hres))
{
@@ -888,14 +880,9 @@ resolve_link (HWND hWnd,
/* The IShellLink interface supports the IPersistFile
* interface. Get an interface pointer to it.
*/
- if (G_WIN32_HAVE_WIDECHAR_API ())
- hres = pslW->lpVtbl->QueryInterface (pslW,
- &IID_IPersistFile,
- (LPVOID *) &ppf);
- else
- hres = pslA->lpVtbl->QueryInterface (pslA,
- &IID_IPersistFile,
- (LPVOID *) &ppf);
+ hres = pslW->lpVtbl->QueryInterface (pslW,
+ &IID_IPersistFile,
+ (LPVOID *) &ppf);
}
if (SUCCEEDED (hres))
@@ -913,38 +900,23 @@ resolve_link (HWND hWnd,
/* Resolve the link by calling the Resolve()
* interface function.
*/
- if (G_WIN32_HAVE_WIDECHAR_API ())
- hres = pslW->lpVtbl->Resolve (pslW, hWnd, SLR_ANY_MATCH | SLR_NO_UI);
- else
- hres = pslA->lpVtbl->Resolve (pslA, hWnd, SLR_ANY_MATCH | SLR_NO_UI);
+ hres = pslW->lpVtbl->Resolve (pslW, hWnd, SLR_ANY_MATCH | SLR_NO_UI);
}
if (SUCCEEDED (hres))
{
- if (G_WIN32_HAVE_WIDECHAR_API ())
- {
- wchar_t wtarget[MAX_PATH];
-
- hres = pslW->lpVtbl->GetPath (pslW, wtarget, MAX_PATH, NULL, 0);
- if (SUCCEEDED (hres))
- *lpszPath = g_utf16_to_utf8 (wtarget, -1, NULL, NULL, NULL);
- }
- else
- {
- guchar cptarget[MAX_PATH];
+ wchar_t wtarget[MAX_PATH];
- hres = pslA->lpVtbl->GetPath (pslA, cptarget, MAX_PATH, NULL, 0);
- if (SUCCEEDED (hres))
- *lpszPath = g_locale_to_utf8 (cptarget, -1, NULL, NULL, NULL);
- }
+ hres = pslW->lpVtbl->GetPath (pslW, wtarget, MAX_PATH, NULL, 0);
+ if (SUCCEEDED (hres))
+ *lpszPath = g_utf16_to_utf8 (wtarget, -1, NULL, NULL, NULL);
}
if (ppf)
ppf->lpVtbl->Release (ppf);
+
if (pslW)
pslW->lpVtbl->Release (pslW);
- if (pslA)
- pslA->lpVtbl->Release (pslA);
return SUCCEEDED (hres);
}
@@ -999,21 +971,10 @@ gdk_dropfiles_filter (GdkXEvent *xev,
for (i = 0; i < nfiles; i++)
{
gchar *uri;
+ wchar_t wfn[MAX_PATH];
- if (G_WIN32_HAVE_WIDECHAR_API ())
- {
- wchar_t wfn[MAX_PATH];
-
- DragQueryFileW (hdrop, i, wfn, MAX_PATH);
- fileName = g_utf16_to_utf8 (wfn, -1, NULL, NULL, NULL);
- }
- else
- {
- char cpfn[MAX_PATH];
-
- DragQueryFileA (hdrop, i, cpfn, MAX_PATH);
- fileName = g_locale_to_utf8 (cpfn, -1, NULL, NULL, NULL);
- }
+ DragQueryFileW (hdrop, i, wfn, MAX_PATH);
+ fileName = g_utf16_to_utf8 (wfn, -1, NULL, NULL, NULL);
/* Resolve shortcuts */
if (resolve_link (msg->hwnd, fileName, &linkedFile))