Commit 74121503 authored by Jekyll Wu's avatar Jekyll Wu

Use KMessageWidget in place of the home made Konsole::WarningBox

The WarningBox.cpp is not deleted at the moment, in case using
KMessageWidget turns out to be problematic .

Note: the miminal requirement for kdelibs is increased to 4.7.0
due to using KMessageWidget.

REVIEW: 104053
parent 363a2701
project(Konsole)
find_package(KDE4 4.6.4 REQUIRED)
find_package(KDE4 4.7.0 REQUIRED)
include(KDE4Defaults)
......
......@@ -108,7 +108,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/tests/CTestCustom.cmake)
ViewProperties.cpp
ViewSplitter.cpp
Vt102Emulation.cpp
WarningBox.cpp
XKB.cpp
ZModemDialog.cpp
konsole_wcwidth.cpp
......
......@@ -78,6 +78,10 @@ ColorSchemeEditor::ColorSchemeEditor(QWidget* parent)
connect(_ui->colorTable , SIGNAL(itemClicked(QTableWidgetItem*)) , this ,
SLOT(editColorItem(QTableWidgetItem*)));
_ui->transparencyWarningWidget->setWordWrap(true);
_ui->transparencyWarningWidget->setCloseButtonVisible(false);
_ui->transparencyWarningWidget->setMessageType(KMessageWidget::Warning);
// warning label when transparency is not available
if (KWindowSystem::compositingActive()) {
_ui->transparencyWarningWidget->setVisible(false);
......
......@@ -117,7 +117,7 @@
</spacer>
</item>
<item>
<widget class="Konsole::WarningBox" native="1" name="transparencyWarningWidget" >
<widget class="KMessageWidget" native="1" name="transparencyWarningWidget" >
</widget>
</item>
</layout>
......@@ -129,9 +129,9 @@
<header>klineedit.h</header>
</customwidget>
<customwidget>
<class>Konsole::WarningBox</class>
<extends>QWidget</extends>
<header>WarningBox.h</header>
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header>kmessagewidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
......
......@@ -238,6 +238,10 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
{
// basic profile options
{
_ui->emptyNameWarningWidget->setWordWrap(false);
_ui->emptyNameWarningWidget->setCloseButtonVisible(false);
_ui->emptyNameWarningWidget->setMessageType(KMessageWidget::Warning);
ProfileGroup::Ptr group = profile->asGroup();
if (!group || group->profiles().count() < 2) {
_ui->profileNameEdit->setText(profile->name());
......@@ -434,6 +438,9 @@ void EditProfileDialog::setupAppearancePage(const Profile::Ptr profile)
SLOT(colorSchemeAnimationUpdate()));
_ui->transparencyWarningWidget->setVisible(false);
_ui->transparencyWarningWidget->setWordWrap(true);
_ui->transparencyWarningWidget->setCloseButtonVisible(false);
_ui->transparencyWarningWidget->setMessageType(KMessageWidget::Warning);
_ui->editColorSchemeButton->setEnabled(false);
_ui->removeColorSchemeButton->setEnabled(false);
......
......@@ -60,7 +60,7 @@
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="Konsole::WarningBox" name="emptyNameWarningWidget" native="true"/>
<widget class="KMessageWidget" name="emptyNameWarningWidget" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
......@@ -457,7 +457,7 @@
</spacer>
</item>
<item row="5" column="0">
<widget class="Konsole::WarningBox" name="transparencyWarningWidget" native="true"/>
<widget class="KMessageWidget" name="transparencyWarningWidget" native="true"/>
</item>
</layout>
</widget>
......@@ -1207,9 +1207,9 @@
<header>knuminput.h</header>
</customwidget>
<customwidget>
<class>Konsole::WarningBox</class>
<extends>QWidget</extends>
<header>WarningBox.h</header>
<class>KMessageWidget</class>
<extends>QFrame</extends>
<header>kmessagewidget.h</header>
<container>1</container>
</customwidget>
</customwidgets>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment