+2003-04-07 John Levon <levon@movementarian.org>
+
+ * QtView.h:
+ * QtView.C: rename idle_timer_. Make it single-shot.
+ Do not over-write an explicit message with the
+ default message.
+
2003-04-05 John Levon <levon@movementarian.org>
* QCommandBuffer.C:
namespace {
-int const idle_timer_value = 3000;
+int const statusbar_timer_value = 3000;
} // namespace anon
statusBar()->setSizeGripEnabled(false);
view_state_changed.connect(boost::bind(&QtView::update_view_state, this));
- connect(&idle_timer_, SIGNAL(timeout()), this, SLOT(update_view_state_qt()));
-
- idle_timer_.start(idle_timer_value);
+ connect(&statusbar_timer_, SIGNAL(timeout()), this, SLOT(update_view_state_qt()));
focus_command_buffer.connect(boost::bind(&QtView::focus_command_widget, this));
void QtView::message(string const & str)
{
statusBar()->message(toqstr(str));
- idle_timer_.stop();
- idle_timer_.start(idle_timer_value);
+ statusbar_timer_.stop();
+ statusbar_timer_.start(statusbar_timer_value);
}
void QtView::update_view_state_qt()
{
statusBar()->message(toqstr(currentState(view().get())));
+ statusbar_timer_.stop();
}
void QtView::update_view_state()
{
+ // let the user see the explicit message
+ if (statusbar_timer_.isActive())
+ return;
+
statusBar()->message(toqstr(currentState(view().get())));
}