[ooo-build-commit] .: Branch 'ooo-build-3-2-1' - patches/dev300

Tor Lillqvist tml at kemper.freedesktop.org
Wed Aug 18 07:40:21 PDT 2010


 patches/dev300/apply                               |    3 
 patches/dev300/novell-win32-xp-fpicker-detail.diff |   66 +++++++++++++++++++++
 2 files changed, 69 insertions(+)

New commits:
commit 0a508609f3f5dd25c8e86d28cafdedc8de2653ba
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed Aug 18 17:37:56 2010 +0300

    Enable making the File Open dialog default view "details" on XP

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 4283ba1..1393421 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1327,6 +1327,9 @@ novell-win32-installer-branding.diff
 # drop stuff that is needed only on Win9x
 novell-win32-drop-win9x.diff
 
+# make it possible to set file open dialog default to "details" on XP
+novell-win32-xp-fpicker-detail.diff, bnc#620924
+
 [ NovellWin32WritingAids < ooo320-m17 ]
 
 win32-prebuilt-writingaids-zip-m16.diff
diff --git a/patches/dev300/novell-win32-xp-fpicker-detail.diff b/patches/dev300/novell-win32-xp-fpicker-detail.diff
new file mode 100644
index 0000000..54410e5
--- /dev/null
+++ b/patches/dev300/novell-win32-xp-fpicker-detail.diff
@@ -0,0 +1,66 @@
+--- fpicker.bak/source/win32/filepicker/FileOpenDlg.cxx	2010-07-12 17:43:50.212361900 +0300
++++ fpicker/source/win32/filepicker/FileOpenDlg.cxx	2010-07-14 16:37:41.031409900 +0300
+@@ -557,12 +557,23 @@
+ // 
+ //------------------------------------------------------------------------
+ 
++#ifndef ODM_VIEW_DETAIL
++
++// Reverse-engineered command codes for SHELLDLL_DefView
++// See http://msdn.microsoft.com/en-us/magazine/cc164009.aspx
++#define ODM_VIEW_DETAIL         0x702c
++
++#endif
++
+ unsigned int CALLBACK CFileOpenDialog::ofnHookProc( 
+     HWND hChildDlg, unsigned int uiMsg, WPARAM wParam, LPARAM lParam)
+ {
+     HWND hwndDlg = GetParent(hChildDlg);
+     CFileOpenDialog* pImpl = NULL;
+ 
++    static bool set_view_details = false;
++    static bool view_was_set = false;
++
+     switch( uiMsg )
+     {		
+     case WM_INITDIALOG: 
+@@ -581,11 +592,39 @@
+             // connect the instance handle to the window            
+             SetProp(hwndDlg, CURRENT_INSTANCE, pImpl);
+             pImpl->handleInitDialog(hwndDlg, hChildDlg);
++
++            static bool beenhere = false;
++
++            if (!beenhere)
++            {
++                HKEY hkey;
++                beenhere = true;
++                if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
++                                 L"Software\\Novell\\OpenOffice.org",
++                                 0, KEY_READ, &hkey) == ERROR_SUCCESS)
++                {
++                    if (RegQueryValueEx(hkey, L"FileOpenUseDetailsViewByDefault",
++                                        NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
++                        set_view_details = true;
++                    RegCloseKey(hkey);
++                }
++            }
++            view_was_set = false;
+         }
+         return 0;
+         
+     case WM_NOTIFY:
+         {
++            if (set_view_details && !view_was_set)
++            {
++                // See http://msdn.microsoft.com/en-us/magazine/cc164009.aspx
++                HWND shell = GetDlgItem(hwndDlg, lst2);
++                if (shell != NULL)
++                {
++                    SendMessage (shell, WM_COMMAND, ODM_VIEW_DETAIL, 0);
++                    view_was_set = true;
++                }
++            }
+             pImpl = getCurrentInstance(hwndDlg);
+             return pImpl->onWMNotify( 
+                 hChildDlg, reinterpret_cast<LPOFNOTIFY>(lParam));


More information about the ooo-build-commit mailing list