X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXView.C;h=f11ddce9504487ad5a81c32ee7d631547fd2b62f;hb=31b56dac8042735f75229ad480b3e98531c181ff;hp=6cd4ae26ccb6a2960ef5a0428bac10529d799a5d;hpb=d4ee9c38b6aa45146f67658352623bcbc3e0ad9b;p=lyx.git diff --git a/src/LyXView.C b/src/LyXView.C index 6cd4ae26cc..f11ddce950 100644 --- a/src/LyXView.C +++ b/src/LyXView.C @@ -4,7 +4,7 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * ====================================================== */ @@ -23,7 +23,6 @@ #include "lyxlookup.h" #endif #include "minibuffer.h" -#include "lyxfunc.h" #include "debug.h" #include "intl.h" #include "lyxrc.h" @@ -38,6 +37,8 @@ #include "ToolbarDefaults.h" #include "lyx_gui_misc.h" // [update,Close,Redraw]AllBufferRelatedDialogs #include "bufferview_funcs.h" // CurrentState() +#include "gettext.h" +#include "lyxfunc.h" using std::endl; @@ -57,6 +58,13 @@ LyXView::LyXView(int width, int height) fl_set_form_atclose(form_, C_LyXView_atCloseMainFormCB, 0); lyxerr[Debug::INIT] << "Initializing LyXFunc" << endl; lyxfunc = new LyXFunc(this); + + // Connect the minibuffer signals + minibuffer->stringReady.connect(SigC::slot(lyxfunc, + &LyXFunc::miniDispatch)); + minibuffer->timeout.connect(SigC::slot(lyxfunc, + &LyXFunc::initMiniBuffer)); + intl = new Intl; // Make sure the buttons are disabled if needed. @@ -90,7 +98,7 @@ LyXView::~LyXView() void LyXView::redraw() { lyxerr[Debug::INFO] << "LyXView::redraw()" << endl; fl_redraw_form(form_); - minibuffer->Activate(); + minibuffer->redraw(); } @@ -144,6 +152,24 @@ MiniBuffer * LyXView::getMiniBuffer() const } +void LyXView::message(string const & str) +{ + minibuffer->message(str); +} + + +void LyXView::messagePush(string const & str) +{ + minibuffer->messagePush(str); +} + + +void LyXView::messagePop() +{ + minibuffer->messagePop(); +} + + Menubar * LyXView::getMenubar() const { return menubar; @@ -208,7 +234,7 @@ void LyXView::setPosition(int x, int y) void LyXView::show(int place, int border, string const & title) { fl_show_form(form_, place, border, title.c_str()); - minibuffer->Init(); + lyxfunc->initMiniBuffer(); #if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5) InitLyXLookup(fl_get_display(), form_->window); #endif @@ -358,7 +384,7 @@ void LyXView::updateWindowTitle() string title = "LyX"; if (view()->available()) { - string cur_title = buffer()->fileName(); + string const cur_title = buffer()->fileName(); if (!cur_title.empty()){ title += ": " + MakeDisplayPath(cur_title, 30); if (!buffer()->isLyxClean()) @@ -377,7 +403,7 @@ void LyXView::updateWindowTitle() void LyXView::showState() { - getMiniBuffer()->Set(CurrentState(view())); + message(CurrentState(view())); getToolbar()->update(); menubar->update(); }