]> git.lyx.org Git - features.git/commitdiff
autosave cleanup, fix qt statusbar timeout, compile fix
authorJohn Levon <levon@movementarian.org>
Sun, 21 Jul 2002 01:38:24 +0000 (01:38 +0000)
committerJohn Levon <levon@movementarian.org>
Sun, 21 Jul 2002 01:38:24 +0000 (01:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4731 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/ChangeLog
src/frontends/LyXView.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/Menubar_pimpl.C
src/frontends/qt2/QtView.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/XFormsView.C

index a1112c1d6ca5f9501b7dc1ec01e4dfea20121dd0..4c0791d627df4f375985409874611534c9feaa36 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-21  John Levon  <moz@compsoc.man.ac.uk>
+
+       * LyXView.C: move autosave connect here
 2002-07-20  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * LyXView.C (updateMenubar): remove code to set different menubars 
index bb966cf6a37682f9b0977e3acdf79215c6468abe..ae3ebe0896e1470a30f2ec5cca8a0204568f2cbf 100644 (file)
@@ -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();
        }
index cb22d895aafe1c0b81fd483a9fc148fd848dc526..f2a306a0d70b0692fbc9f01f0c41766110ca562a 100644 (file)
@@ -1,3 +1,11 @@
+2002-07-21  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Menubar_pimpl.C: change for removed menubar stuff
+2002-07-21  John Levon  <moz@compsoc.man.ac.uk>
+
+       * QtView.C: reset idle timer on message()
 2002-07-20  John Levon  <moz@compsoc.man.ac.uk>
 
        * QLImage.C: various fixes
index fb12ea65518a4984ee7d1b109b67c6ac40adb5c0..3bbf5915fe392dc8040e92d174dd291b2a0ad506 100644 (file)
@@ -47,16 +47,10 @@ extern LyXAction lyxaction;
 Menubar::Pimpl::Pimpl(LyXView * view, MenuBackend const & mbe) 
        : owner_(static_cast<QtView*>(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);
        }
 }
 
index 06786a16eda74ea215f66cc36e0cedf4728038cf..c396d3457ae9f1be270dc9891b70688791c84aec 100644 (file)
@@ -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());
 }
 
  
index c1a26b231df5aede7fd494829fc2c645dd9fd11d..603295763d6260f5a8b6a4688008462076f2b4b0 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-21  John Levon  <moz@compsoc.man.ac.uk>
+
+       * XFormsView.C: move autosave timer to LyXView.C
 2002-07-20  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
 
        * Menubar_pimpl.[Ch]: remove support for multiple menubars
index 88251fc5b21b7d14301e88d37199e4c26a6084f8..46d63349887b0164f5258604d01cbb72fcd78de5 100644 (file)
@@ -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()) {