=?UTF-8?Q?Gabriel=20Iv=C4=83ncescu=20?=: shell32/autocomplete: Implement ACO_USETAB option.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 16:15:26 CDT 2018


Module: wine
Branch: master
Commit: d3830fbd87dfbfbcb77ace605de3a2b6d2773376
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d3830fbd87dfbfbcb77ace605de3a2b6d2773376

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Fri Sep 28 14:44:10 2018 +0300

shell32/autocomplete: Implement ACO_USETAB option.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/autocomplete.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 5a8e03a..11e9317 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -19,17 +19,9 @@
  */
 
 /*
-  Implemented:
-  - ACO_AUTOAPPEND style
-  - ACO_AUTOSUGGEST style
-  - ACO_UPDOWNKEYDROPSLIST style
-
-  - Handle pwzsRegKeyPath and pwszQuickComplete in Init
-
   TODO:
   - implement ACO_SEARCH style
   - implement ACO_FILTERPREFIXES style
-  - implement ACO_USETAB style
   - implement ACO_RTLREADING style
   - implement ResetEnumerator
   - string compares should be case-insensitive, the content of the list should be sorted
@@ -205,7 +197,7 @@ static LRESULT change_selection(IAutoCompleteImpl *ac, HWND hwnd, UINT key)
             }
         }
     }
-    else if (key == VK_UP)
+    else if (key == VK_UP || (key == VK_TAB && (GetKeyState(VK_SHIFT) & 0x8000)))
         sel = ((sel - 1) < -1) ? count - 1 : sel - 1;
     else
         sel = ((sel + 1) >= count) ? -1 : sel + 1;
@@ -391,6 +383,14 @@ static LRESULT ACEditSubclassProc_KeyDown(IAutoCompleteImpl *ac, HWND hwnd, UINT
             if (select_item_with_return_key(ac, hwnd))
                 return 0;
             break;
+        case VK_TAB:
+            if ((ac->options & (ACO_AUTOSUGGEST | ACO_USETAB)) == (ACO_AUTOSUGGEST | ACO_USETAB)
+                && IsWindowVisible(ac->hwndListBox) && !(GetKeyState(VK_CONTROL) & 0x8000))
+            {
+                ac->no_fwd_char = '\t';
+                return change_selection(ac, hwnd, wParam);
+            }
+            break;
         case VK_UP:
         case VK_DOWN:
         case VK_PRIOR:
@@ -646,7 +646,6 @@ static HRESULT WINAPI IAutoComplete2_fnInit(
 
     if (This->options & ACO_SEARCH) FIXME(" ACO_SEARCH not supported\n");
     if (This->options & ACO_FILTERPREFIXES) FIXME(" ACO_FILTERPREFIXES not supported\n");
-    if (This->options & ACO_USETAB) FIXME(" ACO_USETAB not supported\n");
     if (This->options & ACO_RTLREADING) FIXME(" ACO_RTLREADING not supported\n");
 
     if (!hwndEdit || !punkACL)




More information about the wine-cvs mailing list