From 6eb285d50742e4da06000a22754671b01d56558f Mon Sep 17 00:00:00 2001 From: John Levon Date: Sun, 21 Jul 2002 01:38:24 +0000 Subject: [PATCH] autosave cleanup, fix qt statusbar timeout, compile fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4731 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/ChangeLog | 4 ++++ src/frontends/LyXView.C | 1 + src/frontends/qt2/ChangeLog | 8 ++++++++ src/frontends/qt2/Menubar_pimpl.C | 14 ++++---------- src/frontends/qt2/QtView.C | 9 ++++----- src/frontends/xforms/ChangeLog | 4 ++++ src/frontends/xforms/XFormsView.C | 3 --- 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/frontends/ChangeLog b/src/frontends/ChangeLog index a1112c1d6c..4c0791d627 100644 --- a/src/frontends/ChangeLog +++ b/src/frontends/ChangeLog @@ -1,3 +1,7 @@ +2002-07-21 John Levon + + * LyXView.C: move autosave connect here + 2002-07-20 Jean-Marc Lasgouttes * LyXView.C (updateMenubar): remove code to set different menubars diff --git a/src/frontends/LyXView.C b/src/frontends/LyXView.C index bb966cf6a3..ae3ebe0896 100644 --- a/src/frontends/LyXView.C +++ b/src/frontends/LyXView.C @@ -72,6 +72,7 @@ void LyXView::init() // Start autosave timer if (lyxrc.autosave) { + autosave_timeout_->timeout.connect(boost::bind(&LyXView::autoSave, this)); autosave_timeout_->setTimeout(lyxrc.autosave * 1000); autosave_timeout_->start(); } diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index cb22d895aa..f2a306a0d7 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,11 @@ +2002-07-21 John Levon + + * Menubar_pimpl.C: change for removed menubar stuff + +2002-07-21 John Levon + + * QtView.C: reset idle timer on message() + 2002-07-20 John Levon * QLImage.C: various fixes diff --git a/src/frontends/qt2/Menubar_pimpl.C b/src/frontends/qt2/Menubar_pimpl.C index fb12ea6551..3bbf5915fe 100644 --- a/src/frontends/qt2/Menubar_pimpl.C +++ b/src/frontends/qt2/Menubar_pimpl.C @@ -47,16 +47,10 @@ extern LyXAction lyxaction; Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe) : owner_(static_cast(view)), menubackend_(mbe) { - MenuBackend::const_iterator mb = menubackend_.begin(); - MenuBackend::const_iterator mbend = menubackend_.end(); - for (; mb != mbend; ++mb) { - if (mb->menubar() && mb->name() == "main") { - Menu::const_iterator m = mb->begin(); - Menu::const_iterator end = mb->end(); - for (; m != end; ++m) { - makeMenu(owner_->menuBar(), *m); - } - } + Menu::const_iterator m = mbe.getMenubar().begin(); + Menu::const_iterator end = mbe.getMenubar().end(); + for (; m != end; ++m) { + makeMenu(owner_->menuBar(), *m); } } diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index 06786a16ed..c396d3457a 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -77,9 +77,6 @@ QtView::QtView(unsigned int width, unsigned int height) addToolBar(commandbuffer_, Bottom, true); - // FIXME: move - // FIXME autosave_timeout_->timeout.connect(SigC::slot(this, &QtView::autoSave)); - // assign an icon to main form string const iconname = LibFileSearch("images", "lyx", "xpm"); @@ -99,6 +96,8 @@ QtView::~QtView() void QtView::message(string const & str) { statusBar()->message(str.c_str()); + idle_timer_.stop(); + idle_timer_.start(3000); } @@ -110,13 +109,13 @@ void QtView::focus_command_widget() void QtView::update_view_state_qt() { - message(currentState(view())); + statusBar()->message(currentState(view()).c_str()); } void QtView::update_view_state() { - message(currentState(view())); + statusBar()->message(currentState(view()).c_str()); } diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index c1a26b231d..603295763d 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2002-07-21 John Levon + + * XFormsView.C: move autosave timer to LyXView.C + 2002-07-20 Jean-Marc Lasgouttes * Menubar_pimpl.[Ch]: remove support for multiple menubars diff --git a/src/frontends/xforms/XFormsView.C b/src/frontends/xforms/XFormsView.C index 88251fc5b2..46d6334988 100644 --- a/src/frontends/xforms/XFormsView.C +++ b/src/frontends/xforms/XFormsView.C @@ -160,9 +160,6 @@ void XFormsView::create_form_form_main(Dialogs & dia, int width, int height) minibuffer_.reset(new XMiniBuffer(this, *controlcommand_, air, height - (25 + air), width - (2 * air), 25)); - // FIXME: why do this in xforms/ ? - autosave_timeout_->timeout.connect(boost::bind(&XFormsView::autoSave, this)); - // assign an icon to main form string iconname = LibFileSearch("images", "lyx", "xpm"); if (!iconname.empty()) { -- 2.39.2