diff options
author | Pulse Build System <qt-info@nokia.com> | 2010-01-22 00:53:04 (GMT) |
---|---|---|
committer | Pulse Build System <qt-info@nokia.com> | 2010-01-22 00:53:04 (GMT) |
commit | 0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7 (patch) | |
tree | cdc404155a92000c1a0b6ebe1fbda74b22457ec0 /src/gui/dialogs | |
parent | 8e65adce9ced8f3b1d42b938e4d65e1af4768c33 (diff) | |
parent | 5c8c51284b1119f90520b6dbad0ac23fe0487bcf (diff) | |
download | Qt-0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7.zip Qt-0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7.tar.gz Qt-0e12da85f8f8ee8b5ddb32e518a25ef168cea9e7.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2:
build fix for mingw
Build fix for MSVC2005 and older SDK
QStyleSheetStyle: Fixed some text croped when having padding with native border.
Remove obsolete code for unsupported platforms
Character spacing when drawing a QPicture to a high DPI device.
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qfiledialog_win.cpp | 28 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_win_p.h | 57 |
2 files changed, 55 insertions, 30 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp index 4e333f2..f8c3b84 100644 --- a/src/gui/dialogs/qfiledialog_win.cpp +++ b/src/gui/dialogs/qfiledialog_win.cpp @@ -60,21 +60,6 @@ #ifdef Q_WS_WINCE #include <commdlg.h> -# ifndef BFFM_SETSELECTION -# define BFFM_SETSELECTION (WM_USER + 102) -# endif -// Windows Mobile has a broken definition for BROWSEINFO -// Only compile fix -typedef struct qt_priv_browseinfo { - HWND hwndOwner; - LPCITEMIDLIST pidlRoot; - LPWSTR pszDisplayName; - LPCWSTR lpszTitle; - UINT ulFlags; - BFFCALLBACK lpfn; - LPARAM lParam; - int iImage; -} qt_BROWSEINFO; bool qt_priv_ptr_valid = false; #else #include "qfiledialog_win_p.h" @@ -457,7 +442,7 @@ static bool qt_win_set_IFileDialogOptions(IFileDialog *pfd, // Add the filters to the file dialog. if (numFilters) { wchar_t *szData = (wchar_t*)winfilters.utf16(); - COMDLG_FILTERSPEC *filterSpec = new COMDLG_FILTERSPEC[numFilters]; + qt_COMDLG_FILTERSPEC *filterSpec = new qt_COMDLG_FILTERSPEC[numFilters]; for(int i = 0; i<numFilters; i++) { filterSpec[i].pszName = szData+offsets[i*2]; filterSpec[i].pszSpec = szData+offsets[(i*2)+1]; @@ -713,11 +698,6 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd, return 0; } -#ifndef BIF_NEWDIALOGSTYLE -#define BIF_NEWDIALOGSTYLE 0x0040 // Use the new dialog layout with the ability to resize -#endif - - QString qt_win_get_existing_directory(const QFileDialogArgs &args) { QString currentDir = QDir::currentPath(); @@ -742,11 +722,7 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args) path[0] = 0; tTitle = args.caption; -#if !defined(Q_WS_WINCE) BROWSEINFO bi; -#else - qt_BROWSEINFO bi; -#endif Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created)); bi.hwndOwner = (parent ? parent->winId() : 0); @@ -760,7 +736,7 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args) qt_win_resolve_libs(); if (ptrSHBrowseForFolder) { - LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder((BROWSEINFO*)&bi); + LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi); if (pItemIDList) { ptrSHGetPathFromIDList(pItemIDList, path); IMalloc *pMalloc; diff --git a/src/gui/dialogs/qfiledialog_win_p.h b/src/gui/dialogs/qfiledialog_win_p.h index 6d8c7c9..ad3bc14 100644 --- a/src/gui/dialogs/qfiledialog_win_p.h +++ b/src/gui/dialogs/qfiledialog_win_p.h @@ -39,9 +39,8 @@ ** ****************************************************************************/ -#include <shlobj.h> #include <objbase.h> -#if !defined(QFILEDIAG_WIN_P_H) && !defined(__shobjidl_h__) +#ifndef QFILEDIAG_WIN_P_H //these are the interface declarations needed for the file dialog on Vista and up @@ -50,6 +49,8 @@ //declarations typedef DWORD SICHINTF; +typedef ULONG SFGAOF; +typedef DWORD SHCONTF; #define FOS_OVERWRITEPROMPT 0x2 #define FOS_STRICTFILETYPES 0x4 #define FOS_NOCHANGEDIR 0x8 @@ -83,6 +84,31 @@ typedef int GETPROPERTYSTOREFLAGS; #define GPS_BESTEFFORT 0x00000040 #define GPS_MASK_VALID 0x0000007F +typedef int (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData); +// message from browser +#define BFFM_INITIALIZED 1 +#define BFFM_SELCHANGED 2 +#define BFFM_ENABLEOK (WM_USER + 101) +#define BFFM_SETSELECTION (WM_USER + 103) +#define BFFM_SETSTATUSTEXT (WM_USER + 104) + +// Browsing for directory. +#define BIF_RETURNONLYFSDIRS 0x0001 +#define BIF_DONTGOBELOWDOMAIN 0x0002 +#define BIF_STATUSTEXT 0x0004 +#define BIF_RETURNFSANCESTORS 0x0008 +#define BIF_EDITBOX 0x0010 +#define BIF_VALIDATE 0x0020 +#define BIF_NEWDIALOGSTYLE 0x0040 +#define BIF_BROWSEINCLUDEURLS 0x0080 +#define BIF_UAHINT 0x0100 +#define BIF_NONEWFOLDERBUTTON 0x0200 +#define BIF_NOTRANSLATETARGETS 0x0400 +#define BIF_BROWSEFORCOMPUTER 0x1000 +#define BIF_BROWSEFORPRINTER 0x2000 +#define BIF_BROWSEINCLUDEFILES 0x4000 +#define BIF_SHAREABLE 0x8000 + //the enums typedef enum { SIATTRIBFLAGS_AND = 0x1, @@ -115,11 +141,34 @@ typedef FDE_SHAREVIOLATION_RESPONSE FDE_OVERWRITE_RESPONSE; typedef struct { LPCWSTR pszName; LPCWSTR pszSpec; -} COMDLG_FILTERSPEC; +} qt_COMDLG_FILTERSPEC; +#ifndef PROPERTYKEY_DEFINED +#define PROPERTYKEY_DEFINED typedef struct { GUID fmtid; DWORD pid; } PROPERTYKEY; +#endif + +typedef struct { + USHORT cb; + BYTE abID[1]; +} SHITEMID, *LPSHITEMID; +typedef struct { + SHITEMID mkid; +} ITEMIDLIST, *LPITEMIDLIST; +typedef const ITEMIDLIST *LPCITEMIDLIST; +typedef struct { + HWND hwndOwner; + LPCITEMIDLIST pidlRoot; + LPWSTR pszDisplayName; + LPCWSTR lpszTitle; + UINT ulFlags; + BFFCALLBACK lpfn; + LPARAM lParam; + int iImage; +} BROWSEINFO; + DECLARE_INTERFACE(IFileDialogEvents); DECLARE_INTERFACE_(IShellItem, IUnknown) { @@ -157,7 +206,7 @@ DECLARE_INTERFACE_(IModalWindow, IUnknown) }; DECLARE_INTERFACE_(IFileDialog, IModalWindow) { - STDMETHOD(SetFileTypes)(THIS_ UINT cFileTypes, const COMDLG_FILTERSPEC *rgFilterSpec) PURE; + STDMETHOD(SetFileTypes)(THIS_ UINT cFileTypes, const qt_COMDLG_FILTERSPEC *rgFilterSpec) PURE; STDMETHOD(SetFileTypeIndex)(THIS_ UINT iFileType) PURE; STDMETHOD(GetFileTypeIndex)(THIS_ UINT *piFileType) PURE; STDMETHOD(Advise)(THIS_ IFileDialogEvents *pfde, DWORD *pdwCookie) PURE; |