Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-06-05 20:11:18 +0400
committerTon Roosendaal <ton@blender.org>2009-06-05 20:11:18 +0400
commit45ed196344a7534c9965015ca653c90f5f00d97f (patch)
treeb6401a2ea9ef1d0c4addfa9ef3dc52cf26bd27a1 /source/blender/editors/interface/interface_handlers.c
parentf7e5fd94386cada0e800e9dcd66492cc77e1c201 (diff)
2.5
Search menu: - Made nicer drawing for popup version of search. It now uses entire backdrop like pulldowns. Search boxes for text buttons will use different style still; if we use this option all over it shouldn't look too intrusive. - Search menu allows scroll, to view all items. It doesn't cycle anymore. - Click outside search menu now cancels - If a match is in search button, it highlights it. This also allows ALT+CTRL+F - Enter to redo last op. - Search popup draws higher when no no space below. No order flipping!
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 52b14d6823e..933d57c8983 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1169,7 +1169,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
/* optional searchbox */
if(but->type==SEARCH_MENU) {
data->searchbox= ui_searchbox_create(C, data->region, but);
- ui_searchbox_update(C, data->searchbox, but);
+ ui_searchbox_update(C, data->searchbox, but, 1); /* 1= reset */
}
ui_check_but(but);
@@ -1247,7 +1247,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
switch(event->type) {
case MOUSEMOVE:
if(data->searchbox)
- ui_searchbox_event(data->searchbox, event);
+ ui_searchbox_event(C, data->searchbox, but, event);
break;
case RIGHTMOUSE:
@@ -1277,6 +1277,9 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
retval= WM_UI_HANDLER_BREAK;
}
else if(inbox==0) {
+ /* if searchbox, click outside will cancel */
+ if(data->searchbox)
+ data->cancel= data->escapecancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
retval= WM_UI_HANDLER_BREAK;
}
@@ -1315,7 +1318,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
break;
case DOWNARROWKEY:
if(data->searchbox) {
- ui_searchbox_event(data->searchbox, event);
+ ui_searchbox_event(C, data->searchbox, but, event);
break;
}
/* pass on purposedly */
@@ -1325,7 +1328,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
break;
case UPARROWKEY:
if(data->searchbox) {
- ui_searchbox_event(data->searchbox, event);
+ ui_searchbox_event(C, data->searchbox, but, event);
break;
}
/* pass on purposedly */
@@ -1378,7 +1381,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
else ui_check_but(but);
if(data->searchbox)
- ui_searchbox_update(C, data->searchbox, but);
+ ui_searchbox_update(C, data->searchbox, but, 1); /* 1 = reset */
}
if(changed || (retval == WM_UI_HANDLER_BREAK))