forked from qt-creator/qt-creator
ApplicationOutput: Tweak popup/flash behavior on output
- Change the option to switch between Flash and Popup on output - Never popup on starting a application Task-number: QTCREATORBUG-9120 Change-Id: If688822dad336e0f98a11bf2796483e79c0ae653 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -101,7 +101,7 @@ void TabWidget::slotContextMenuRequested(const QPoint &pos)
|
||||
}
|
||||
|
||||
AppOutputPane::RunControlTab::RunControlTab(RunControl *rc, Core::OutputWindow *w) :
|
||||
runControl(rc), window(w), asyncClosing(false)
|
||||
runControl(rc), window(w), asyncClosing(false), behavivorOnOutput(Flash)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -360,8 +360,16 @@ void AppOutputPane::updateFromSettings()
|
||||
void AppOutputPane::appendMessage(RunControl *rc, const QString &out, Utils::OutputFormat format)
|
||||
{
|
||||
const int index = indexOf(rc);
|
||||
if (index != -1)
|
||||
m_runControlTabs.at(index).window->appendMessage(out, format);
|
||||
if (index != -1) {
|
||||
Core::OutputWindow *window = m_runControlTabs.at(index).window;
|
||||
window->appendMessage(out, format);
|
||||
if (format != Utils::NormalMessageFormat) {
|
||||
if (m_runControlTabs.at(index).behavivorOnOutput == Flash)
|
||||
flash();
|
||||
else
|
||||
popup(NoModeSwitch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AppOutputPane::showTabFor(RunControl *rc)
|
||||
@@ -369,6 +377,13 @@ void AppOutputPane::showTabFor(RunControl *rc)
|
||||
m_tabWidget->setCurrentIndex(tabWidgetIndexOf(indexOf(rc)));
|
||||
}
|
||||
|
||||
void AppOutputPane::setBehaviorOnOutput(RunControl *rc, AppOutputPane::BehavivorOnOutput mode)
|
||||
{
|
||||
const int index = indexOf(rc);
|
||||
if (index != -1)
|
||||
m_runControlTabs[index].behavivorOnOutput = mode;
|
||||
}
|
||||
|
||||
void AppOutputPane::reRunRunControl()
|
||||
{
|
||||
const int index = currentIndex();
|
||||
|
||||
Reference in New Issue
Block a user