Improved status bar text updating at window change

This commit is contained in:
Markus Gans 2016-06-18 19:10:41 +02:00
parent 203c50f4e6
commit 4e447a6096
3 changed files with 27 additions and 10 deletions

View File

@ -1,3 +1,6 @@
2016-06-18 Markus Gans <guru.mail@muenster.de>
* Improved status bar text updating at window change
2016-06-16 Markus Gans <guru.mail@muenster.de> 2016-06-16 Markus Gans <guru.mail@muenster.de>
* Bug fix in FTerm updateVTerm() for updates from vdesktop * Bug fix in FTerm updateVTerm() for updates from vdesktop
* Bug fix in FDialog onWindowActive() for combined setFocus() * Bug fix in FDialog onWindowActive() for combined setFocus()

View File

@ -527,6 +527,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
{ {
FWidget* old_focus = FWidget::getFocusWidget(); FWidget* old_focus = FWidget::getFocusWidget();
setActiveWindow(this); setActiveWindow(this);
if ( focus_widget ) if ( focus_widget )
{ {
focus_widget->setFocus(); focus_widget->setFocus();
@ -536,6 +537,9 @@ void FDialog::onMouseDown (FMouseEvent* ev)
} }
else if ( old_focus && focusFirstChild() ) else if ( old_focus && focusFirstChild() )
old_focus->redraw(); old_focus->redraw();
if ( statusBar() )
statusBar()->drawMessage();
updateTerminal(); updateTerminal();
} }
if ( has_raised ) if ( has_raised )
@ -580,9 +584,12 @@ void FDialog::onMouseDown (FMouseEvent* ev)
if ( old_focus ) if ( old_focus )
old_focus->redraw(); old_focus->redraw();
} }
else if ( focusFirstChild() ) else if ( old_focus && focusFirstChild() )
if ( old_focus )
old_focus->redraw(); old_focus->redraw();
if ( statusBar() )
statusBar()->drawMessage();
updateTerminal();
} }
} }
} }
@ -605,12 +612,14 @@ void FDialog::onMouseDown (FMouseEvent* ev)
if ( old_focus ) if ( old_focus )
old_focus->redraw(); old_focus->redraw();
} }
else if ( focusFirstChild() ) else if ( old_focus && focusFirstChild() )
if ( old_focus )
old_focus->redraw(); old_focus->redraw();
};
if ( has_lowered ) if ( statusBar() )
statusBar()->drawMessage();
updateTerminal();
}
else if ( has_lowered )
updateTerminal(); updateTerminal();
} }
} }
@ -730,12 +739,15 @@ void FDialog::onWindowActive (FEvent*)
{ {
focus_widget->setFocus(); focus_widget->setFocus();
focus_widget->redraw(); focus_widget->redraw();
if ( statusBar() )
statusBar()->drawMessage();
} }
else else
focusFirstChild(); focusFirstChild();
} }
if ( statusBar() )
statusBar()->drawMessage();
updateTerminal();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -52,12 +52,14 @@ ProgressDialog::ProgressDialog (FWidget* parent)
reset = new FButton(this); reset = new FButton(this);
reset->setText("&Reset"); reset->setText("&Reset");
reset->setStatusbarMessage ("Reset the progress bar");
reset->setGeometry(2, 6, 8, 1, false); reset->setGeometry(2, 6, 8, 1, false);
reset->setShadow(); reset->setShadow();
reset->setDisable(); reset->setDisable();
more = new FButton(this); more = new FButton(this);
more->setText("&More"); more->setText("&More");
more->setStatusbarMessage ("Increases the progress bar position");
more->setGeometry(15, 6, 8, 1, false); more->setGeometry(15, 6, 8, 1, false);
more->setShadow(); more->setShadow();
more->setDisable(); more->setDisable();