commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1814159 - in /commons/proper/daemon/trunk/src/native/windows: include/gui.h src/gui.c
Date Fri, 03 Nov 2017 10:24:25 GMT
Author: markt
Date: Fri Nov  3 10:24:25 2017
New Revision: 1814159

URL: http://svn.apache.org/viewvc?rev=1814159&view=rev
Log:
Unicode clean-up

Modified:
    commons/proper/daemon/trunk/src/native/windows/include/gui.h
    commons/proper/daemon/trunk/src/native/windows/src/gui.c

Modified: commons/proper/daemon/trunk/src/native/windows/include/gui.h
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/include/gui.h?rev=1814159&r1=1814158&r2=1814159&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/include/gui.h (original)
+++ commons/proper/daemon/trunk/src/native/windows/include/gui.h Fri Nov  3 10:24:25 2017
@@ -142,29 +142,12 @@ BOOL        apxYesNoMessage(LPCTSTR szTi
 BOOL        apxCalcStringEllipsis(HDC hDC, LPTSTR  szString, 
                                   int cchMax, UINT uColWidth);
 
-LPSTR       apxBrowseForFolderA(HWND hWnd, LPCSTR szTitle, LPCSTR szName);
 LPWSTR      apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szName);
 
-#ifdef _UNICODE
-#define apxBrowseForFolder  apxBrowseForFolderW
-#else
-#define apxBrowseForFolder  apxBrowseForFolderA
-#endif
-
-LPSTR       apxGetFileNameA(HWND hWnd, LPCSTR szTitle, LPCSTR szFilter,
-                            LPCSTR szDefExt, LPCSTR szDefPath, BOOL bOpenOrSave,
-                            LPDWORD lpdwFindex);
-
 LPWSTR      apxGetFileNameW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szFilter,
                             LPCWSTR szDefExt, LPCWSTR szDefPath, BOOL bOpenOrSave,
                             LPDWORD lpdwFindex);
 
-#ifdef _UNICODE
-#define apxGetFileName  apxGetFileNameW
-#else
-#define apxGetFileName  apxGetFileNameA
-#endif
-
 LPCWSTR     apxDlgSelectUser(HWND hWnd, LPWSTR szUser);
 
 __APXEND_DECLS

Modified: commons/proper/daemon/trunk/src/native/windows/src/gui.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/windows/src/gui.c?rev=1814159&r1=1814158&r2=1814159&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/windows/src/gui.c (original)
+++ commons/proper/daemon/trunk/src/native/windows/src/gui.c Fri Nov  3 10:24:25 2017
@@ -483,37 +483,6 @@ BOOL apxYesNoMessage(LPCTSTR szTitle, LP
 
 /* Browse for folder dialog.
  */
-LPSTR apxBrowseForFolderA(HWND hWnd, LPCSTR szTitle, LPCSTR szName)
-{
-    BROWSEINFOA  bi;
-    LPITEMIDLIST il, ir;
-    LPMALLOC     pMalloc;
-    CHAR         szPath[MAX_PATH+1];
-    LPSTR        rv = NULL;
-
-    AplZeroMemory(&bi, sizeof(BROWSEINFOW));
-    SHGetSpecialFolderLocation(hWnd, CSIDL_DRIVES, &il);
-    bi.lpszTitle      = szTitle;
-    bi.pszDisplayName = szPath;
-    bi.hwndOwner      = hWnd;
-    bi.ulFlags        = BIF_EDITBOX;
-    bi.lpfn           = NULL;
-    bi.lParam         = 0;
-    bi.iImage         = 0;
-    bi.pidlRoot       = il;
-    
-    if ((ir = SHBrowseForFolderA(&bi)) != NULL) {
-        if (SHGetPathFromIDListA(ir, szPath))
-            rv = apxStrdupA(szPath);
-    }
-    if (SHGetMalloc(&pMalloc)) {
-        pMalloc->lpVtbl->Free(pMalloc, il);
-        pMalloc->lpVtbl->Release(pMalloc);
-    }
-
-    return rv;    
-} 
-
 LPWSTR apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szName)
 {
     BROWSEINFOW  bi;
@@ -545,41 +514,6 @@ LPWSTR apxBrowseForFolderW(HWND hWnd, LP
     return rv;    
 } 
 
-LPSTR apxGetFileNameA(HWND hWnd, LPCSTR szTitle, LPCSTR szFilter,
-                      LPCSTR szDefExt, LPCSTR szDefPath, BOOL bOpenOrSave,
-                      LPDWORD lpdwFindex)
-{
-    OPENFILENAMEA lpOf;
-    CHAR    szFile[SIZ_BUFLEN];
-    BOOL    rv;
-
-    AplZeroMemory(&lpOf, sizeof(OPENFILENAMEA));
-    szFile[0] = '\0';
-    lpOf.lStructSize     = sizeof(OPENFILENAMEA); 
-    lpOf.hwndOwner       = hWnd;
-    lpOf.hInstance       = _st_sys_gui.hInstance;
-    lpOf.lpstrTitle      = szTitle;
-    lpOf.lpstrFilter     = szFilter;
-    lpOf.lpstrDefExt     = szDefExt;
-    lpOf.lpstrInitialDir = szDefPath;
-    lpOf.lpstrFile       = szFile;
-    lpOf.nMaxFile        = SIZ_BUFMAX;
-    lpOf.Flags = OFN_LONGNAMES | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
-
-    if (bOpenOrSave)
-        rv = GetOpenFileNameA(&lpOf);
-    else
-        rv = GetSaveFileNameA(&lpOf);
-    
-    if (rv) {
-        if (lpdwFindex)
-            *lpdwFindex = lpOf.nFilterIndex;
-        return apxStrdupA(szFile);
-    }
-    else
-        return NULL;
-}
-
 LPWSTR apxGetFileNameW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szFilter,
                        LPCWSTR szDefExt, LPCWSTR szDefPath, BOOL bOpenOrSave,
                        LPDWORD lpdwFindex)



Mime
View raw message