[SCM] ktp-kded-integration-module packaging branch, master, updated. debian/15.12.1-2-382-gbd961c2
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:15:10 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=f642858
The following commit has been merged in the master branch:
commit f6428585ad4204b941c44ac848264823c7239501
Author: Sven Brauch <svenbrauch at googlemail.com>
Date: Sat May 4 14:05:03 2013 +0200
Second round of changes for the settings dialog
Polishing for the settings dialog.
* Fix a typo (wrong capitalization)
* Disable labels which belong to disabled controls
* Add a 3 pixel padding to the "Now Playing" list widget
* QHBoxLayout -> QGridLayout to avoid warnings
This also adjusts the style of the "Screen Saver" change to the new
style of the settings dialog (e.g. no seperate "Enabled" label)
REVIEW:110291
---
config/nowplaying-listwidget.cpp | 2 +-
config/telepathy-kded-config.cpp | 39 +++++++----
config/telepathy-kded-config.h | 2 +
config/telepathy-kded-config.ui | 144 +++++++++++++++------------------------
4 files changed, 83 insertions(+), 104 deletions(-)
diff --git a/config/nowplaying-listwidget.cpp b/config/nowplaying-listwidget.cpp
index 13aab1a..2fa0695 100644
--- a/config/nowplaying-listwidget.cpp
+++ b/config/nowplaying-listwidget.cpp
@@ -66,7 +66,7 @@ void NowPlayingListWidget::resizeEvent(QResizeEvent* event)
{
QListWidget::resizeEvent(event);
- int height = sizeHintForRow(0) + 2 * frameWidth();
+ int height = sizeHintForRow(0) + 2 * ( frameWidth() + 3 ); // add 2*3 for top/bottom padding
if (horizontalScrollBar() && horizontalScrollBar()->isVisible()) {
height += horizontalScrollBar()->size().height();
}
diff --git a/config/telepathy-kded-config.cpp b/config/telepathy-kded-config.cpp
index d8f68b4..780a882 100644
--- a/config/telepathy-kded-config.cpp
+++ b/config/telepathy-kded-config.cpp
@@ -165,9 +165,8 @@ void TelepathyKDEDConfig::load()
ui->m_awayCheckBox->setChecked(autoAwayEnabled);
ui->m_awayMins->setValue(awayTime);
- ui->m_awayMins->setEnabled(autoAwayEnabled);
ui->m_awayMessage->setText(awayMessage);
- ui->m_awayMessage->setEnabled(autoAwayEnabled);
+ enableAwayWidgets(autoAwayEnabled);
//check for x-away
bool autoXAEnabled = kdedConfig.readEntry(QLatin1String("autoXAEnabled"), true);
@@ -178,12 +177,11 @@ void TelepathyKDEDConfig::load()
QString xaMessage = kdedConfig.readEntry(QLatin1String("xaMessage"), QString());
//enable auto-x-away only if auto-away is enabled
- ui->m_xaCheckBox->setChecked(autoXAEnabled && autoAwayEnabled);
ui->m_xaCheckBox->setEnabled(autoAwayEnabled);
+ ui->m_xaCheckBox->setChecked(autoXAEnabled && autoAwayEnabled);
ui->m_xaMins->setValue(xaTime);
- ui->m_xaMins->setEnabled(autoXAEnabled && autoAwayEnabled);
ui->m_xaMessage->setText(xaMessage);
- ui->m_xaMessage->setEnabled(autoXAEnabled && autoAwayEnabled);
+ enableXAWidgets(autoXAEnabled && autoAwayEnabled);
//check if screen-server-away is enabled
bool screenSaverAwayEnabled = kdedConfig.readEntry(QLatin1String("screenSaverAwayEnabled"), true);
@@ -317,29 +315,42 @@ void TelepathyKDEDConfig::save()
QDBusConnection::sessionBus().send(message);
}
-void TelepathyKDEDConfig::autoAwayChecked(bool checked)
+void TelepathyKDEDConfig::enableAwayWidgets(bool enable)
{
- ui->m_xaCheckBox->setEnabled(checked);
- ui->m_xaMins->setEnabled(checked && ui->m_xaCheckBox->isChecked());
- ui->m_xaMessage->setEnabled(checked && ui->m_xaCheckBox->isChecked());
+ ui->m_awayMins->setEnabled(enable);
+ ui->m_awayMessage->setEnabled(enable);
+ ui->m_awayMessageLabel->setEnabled(enable);
+ ui->m_awayMinsLabel->setEnabled(enable);
+ ui->m_awayInactivityLabel->setEnabled(enable);
+}
- ui->m_awayMins->setEnabled(checked);
- ui->m_awayMessage->setEnabled(checked);
+void TelepathyKDEDConfig::enableXAWidgets(bool enable)
+{
+ ui->m_xaMins->setEnabled(enable);
+ ui->m_xaMessage->setEnabled(enable);
+ ui->m_xaMessageLabel->setEnabled(enable);
+ ui->m_xaMinsLabel->setEnabled(enable);
+ ui->m_xaInactivityLabel->setEnabled(enable);
+}
+void TelepathyKDEDConfig::autoAwayChecked(bool checked)
+{
+ ui->m_xaCheckBox->setEnabled(checked);
+ enableXAWidgets(checked && ui->m_xaCheckBox->isChecked());
+ enableAwayWidgets(checked);
Q_EMIT changed(true);
}
void TelepathyKDEDConfig::screenSaverAwayChecked(bool checked)
{
ui->m_screenSaverAwayMessage->setEnabled(checked);
+ ui->m_screenSaverAwayLabel->setEnabled(checked);
Q_EMIT changed(true);
}
void TelepathyKDEDConfig::autoXAChecked(bool checked)
{
- ui->m_xaMins->setEnabled(checked);
- ui->m_xaMessage->setEnabled(checked);
-
+ enableXAWidgets(checked);
Q_EMIT changed(true);
}
diff --git a/config/telepathy-kded-config.h b/config/telepathy-kded-config.h
index a73494e..b674ae7 100644
--- a/config/telepathy-kded-config.h
+++ b/config/telepathy-kded-config.h
@@ -49,6 +49,8 @@ private Q_SLOTS:
void screenSaverAwayChecked(bool checked);
private:
+ void enableAwayWidgets(bool enable);
+ void enableXAWidgets(bool enable);
QStringList m_tagNames;
QStringList m_localizedTagNames;
Ui::TelepathyKDEDUi *ui;
diff --git a/config/telepathy-kded-config.ui b/config/telepathy-kded-config.ui
index 37231ec..aff6a7e 100644
--- a/config/telepathy-kded-config.ui
+++ b/config/telepathy-kded-config.ui
@@ -19,8 +19,8 @@
<property name="flat">
<bool>false</bool>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
<widget class="QCheckBox" name="m_autoConnectCheckBox">
<property name="text">
<string>Restore last presence on login</string>
@@ -38,15 +38,15 @@
<property name="flat">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Set my status to:</string>
</property>
</widget>
</item>
- <item>
+ <item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="away_check_layout">
@@ -103,7 +103,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_2">
+ <widget class="QLabel" name="m_awayInactivityLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -202,7 +202,7 @@
</widget>
</item>
<item>
- <widget class="QLabel" name="label_3">
+ <widget class="QLabel" name="m_xaInactivityLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -238,94 +238,60 @@
</item>
</layout>
</item>
- <item>
- <spacer name="verticalSpacerScreenSaverAway">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>5</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
+ <item row="2" column="0">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item row="3" column="0">
+ <layout class="QVBoxLayout" name="verticalLayoutScreenSaverAway">
<item>
- <widget class="QLabel" name="labelScreenSaverAway">
- <property name="text">
- <string>Set my status to Away when screen saver is activated:</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayoutScreenSaverAway">
+ <layout class="QHBoxLayout" name="screensaver_layout">
<item>
- <layout class="QHBoxLayout" name="away_check_layout">
- <item>
- <widget class="QCheckBox" name="m_screenSaverAwayCheckBox">
- <property name="text">
- <string>Enabled</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="screenSaverAway_spaces">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="screenSaverAway_layout">
- <item>
- <widget class="QLabel" name="m_screenSaverAwayLabel">
- <property name="text">
- <string>With &message:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>m_screenSaverAwayMessage</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KLineEdit" name="m_screenSaverAwayMessage"/>
- </item>
- </layout>
+ <widget class="QCheckBox" name="m_screenSaverAwayCheckBox">
+ <property name="text">
+ <string>Set my status to Away when the screen saver is activated</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
</item>
<item>
- <widget class="Line" name="line">
+ <spacer name="screenSaverAway_spaces">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="screenSaverAway_layout">
+ <item>
+ <widget class="QLabel" name="m_screenSaverAwayLabel">
+ <property name="text">
+ <string>With &message:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>m_screenSaverAwayMessage</cstring>
+ </property>
</widget>
</item>
+ <item>
+ <widget class="KLineEdit" name="m_screenSaverAwayMessage"/>
+ </item>
</layout>
</item>
</layout>
@@ -341,8 +307,8 @@
<property name="flat">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
<widget class="QCheckBox" name="m_autoOfflineCheckBox">
<property name="text">
<string>Go offline when closing the contact list</string>
@@ -360,13 +326,13 @@
<property name="flat">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
<layout class="QHBoxLayout" name="download_folder_layout">
<item>
<widget class="QLabel" name="m_downloadUrlLabel">
<property name="text">
- <string>Download Folder:</string>
+ <string>Download folder:</string>
</property>
<property name="buddy">
<cstring>m_downloadUrlRequester</cstring>
@@ -388,7 +354,7 @@
</item>
</layout>
</item>
- <item>
+ <item row="1" column="0">
<widget class="QCheckBox" name="m_autoAcceptCheckBox">
<property name="text">
<string>Automatically accept file transfers</string>
@@ -406,8 +372,8 @@
<property name="flat">
<bool>false</bool>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
+ <layout class="QGridLayout" name="gridLayout_5">
+ <item row="0" column="0">
<widget class="QCheckBox" name="m_nowPlayingCheckBox">
<property name="text">
<string>Enable "Now playing..." presence</string>
@@ -417,7 +383,7 @@
</property>
</widget>
</item>
- <item>
+ <item row="1" column="0">
<layout class="QFormLayout" name="nowPlayingMessageFormatLayout">
<item row="0" column="0">
<widget class="QLabel" name="message_format_label">
--
ktp-kded-integration-module packaging
More information about the pkg-kde-commits
mailing list