]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiView.cpp
* LFUNs complete and complete-cancel. No key interception anymore. For now you have...
[features.git] / src / frontends / qt4 / GuiView.cpp
index aed3581a85e9f779b877d64350edbb6aef894ed1..7d17028c211a554ac9270d2bd7d105b3495bb319 100644 (file)
@@ -1212,6 +1212,13 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
                    enable = false;
                break;
 
+       case LFUN_COMPLETION_CANCEL:
+               if (!d.current_work_area_
+                   || (!d.current_work_area_->completer().popupVisible()
+                       && !d.current_work_area_->completer().inlineVisible()))
+                       enable = false;
+               break;
+
        default:
                return false;
        }
@@ -2006,6 +2013,15 @@ bool GuiView::dispatch(FuncRequest const & cmd)
                                d.current_work_area_->completer().tab();
                        break;
 
+               case LFUN_COMPLETION_CANCEL:
+                       if (d.current_work_area_) {
+                               if (d.current_work_area_->completer().popupVisible())
+                                       d.current_work_area_->completer().hidePopup();
+                               else
+                                       d.current_work_area_->completer().hideInline();
+                       }
+                       break;
+
                default:
                        dispatched = false;
                        break;