[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:12:42 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=9cc64f0
The following commit has been merged in the master branch:
commit 9cc64f0a4fba266ab402595b7f0679eda05d2ee1
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Wed Sep 28 02:01:06 2011 +0100
Restyling of the ui + new settings
* Download directory for file transfers
* Auto accept file transfers
* Now playing text (disabled)
Reviewed-by: Martin Klapetek <martin.klapetek at gmail.com>
FEATURE: 282214
---
config/CMakeLists.txt | 6 +-
config/telepathy-kded-config.cpp | 63 +++++--
config/telepathy-kded-config.h | 3 +-
config/telepathy-kded-config.ui | 355 ++++++++++++++++++++++++++++-----------
4 files changed, 314 insertions(+), 113 deletions(-)
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index 401cd0a..607d191 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -11,7 +11,11 @@ kde4_add_ui_files(telepathy_kded_module_config_SRCS ${telepathy_kded_module_conf
kde4_add_plugin(kcm_telepathy_kded_module_config
${telepathy_kded_module_config_SRCS})
-target_link_libraries(kcm_telepathy_kded_module_config ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KCMUTILS_LIBS} )
+target_link_libraries(kcm_telepathy_kded_module_config ${KDE4_KDECORE_LIBS}
+ ${KDE4_KDEUI_LIBS}
+ ${KDE4_KCMUTILS_LIBS}
+ ${KDE4_KIO_LIBS}
+)
install(TARGETS kcm_telepathy_kded_module_config
diff --git a/config/telepathy-kded-config.cpp b/config/telepathy-kded-config.cpp
index 863008c..ce216d1 100644
--- a/config/telepathy-kded-config.cpp
+++ b/config/telepathy-kded-config.cpp
@@ -43,23 +43,27 @@ TelepathyKDEDConfig::TelepathyKDEDConfig(QWidget *parent, const QVariantList& ar
ui->m_xaMins->setSuffix(i18nc("Unit after number in spinbox, denotes time unit 'minutes', keep the leading whitespace!",
" minutes"));
- connect(ui->m_awayCheckBox, SIGNAL(clicked(bool)),
- this, SLOT(autoAwayChecked(bool)));
-
- connect(ui->m_xaCheckBox, SIGNAL(clicked(bool)),
- this, SLOT(autoXAChecked(bool)));
-
+ connect(ui->m_downloadUrlRequester, SIGNAL(textChanged(QString)),
+ this, SLOT(settingsHasChanged()));
+ connect(ui->m_autoAcceptCheckBox, SIGNAL(stateChanged(int)),
+ this, SLOT(settingsHasChanged()));
connect(ui->m_xaCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(settingsHasChanged()));
-
connect(ui->m_awayMins, SIGNAL(valueChanged(int)),
this, SLOT(settingsHasChanged()));
-
connect(ui->m_xaMins, SIGNAL(valueChanged(int)),
this, SLOT(settingsHasChanged()));
-
connect(ui->m_nowPlayingCheckBox, SIGNAL(stateChanged(int)),
this, SLOT(settingsHasChanged()));
+ connect(ui->m_nowPlayingText, SIGNAL(textChanged(QString)),
+ this, SLOT(settingsHasChanged()));
+
+ connect(ui->m_awayCheckBox, SIGNAL(clicked(bool)),
+ this, SLOT(autoAwayChecked(bool)));
+ connect(ui->m_xaCheckBox, SIGNAL(clicked(bool)),
+ this, SLOT(autoXAChecked(bool)));
+ connect(ui->m_nowPlayingCheckBox, SIGNAL(clicked(bool)),
+ this, SLOT(nowPlayingChecked(bool)));
}
TelepathyKDEDConfig::~TelepathyKDEDConfig()
@@ -70,6 +74,20 @@ TelepathyKDEDConfig::~TelepathyKDEDConfig()
void TelepathyKDEDConfig::load()
{
KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
+
+// File transfers config
+ KConfigGroup filetransferConfig = config->group(QLatin1String("File Transfers"));
+
+ // download directory
+ QString downloadDirectory = filetransferConfig.readPathEntry(QLatin1String("downloadDirectory"),
+ QDir::homePath() + QLatin1String("/") + i18nc("This is the download directory in user's home", "Downloads"));
+ ui->m_downloadUrlRequester->setUrl(KUrl(downloadDirectory));
+
+ // check if auto-accept file transfers is enabled
+ bool autoAcceptEnabled = filetransferConfig.readEntry(QLatin1String("autoAccept"), false);
+ ui->m_autoAcceptCheckBox->setChecked(autoAcceptEnabled);
+
+// KDED module config
KConfigGroup kdedConfig = config->group("KDED");
//check if auto-away is enabled
@@ -95,14 +113,29 @@ void TelepathyKDEDConfig::load()
ui->m_xaMins->setEnabled(autoXAEnabled && autoAwayEnabled);
//check if 'Now playing..' is enabled
- bool nowPlayingEnabled = kdedConfig.readEntry("nowPlayingEnabled", true);
-
+ bool nowPlayingEnabled = kdedConfig.readEntry(QLatin1String("nowPlayingEnabled"), true);
ui->m_nowPlayingCheckBox->setChecked(nowPlayingEnabled);
+
+ //now playing text
+ QString nowPlayingText = kdedConfig.readEntry(QLatin1String("nowPlayingText"),
+ i18nc("The text displayed by now playing plugin", "Now listening to %title by %author from album %album"));
+ ui->m_nowPlayingText->setText(nowPlayingText);
+ // TODO enable this
+ ui->m_nowPlayingText->setEnabled(nowPlayingEnabled && false);
}
void TelepathyKDEDConfig::save()
{
KSharedConfigPtr config = KSharedConfig::openConfig(QLatin1String("ktelepathyrc"));
+
+// File transfers config
+ KConfigGroup filetransferConfig = config->group(QLatin1String("File Transfers"));
+
+ filetransferConfig.writeEntry(QLatin1String("downloadDirectory"), ui->m_downloadUrlRequester->url().toLocalFile());
+ filetransferConfig.writeEntry(QLatin1String("autoAccept"), ui->m_autoAcceptCheckBox->isChecked());
+ filetransferConfig.sync();
+
+// KDED module config
KConfigGroup kdedConfig = config->group("KDED");
kdedConfig.writeEntry(QLatin1String("autoAwayEnabled"), ui->m_awayCheckBox->isChecked());
@@ -110,6 +143,7 @@ void TelepathyKDEDConfig::save()
kdedConfig.writeEntry(QLatin1String("autoXAEnabled"), ui->m_xaCheckBox->isChecked());
kdedConfig.writeEntry(QLatin1String("xaAfter"), ui->m_xaMins->value());
kdedConfig.writeEntry(QLatin1String("nowPlayingEnabled"), ui->m_nowPlayingCheckBox->isChecked());
+ kdedConfig.writeEntry(QLatin1String("nowPlayingText"), ui->m_nowPlayingText->text());
kdedConfig.sync();
QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/Telepathy"),
@@ -134,6 +168,13 @@ void TelepathyKDEDConfig::autoXAChecked(bool checked)
Q_EMIT changed(true);
}
+void TelepathyKDEDConfig::nowPlayingChecked(bool checked)
+{
+ // TODO Enable this
+ ui->m_nowPlayingText->setEnabled(checked && false);
+ Q_EMIT changed(true);
+}
+
void TelepathyKDEDConfig::settingsHasChanged()
{
Q_EMIT changed(true);
diff --git a/config/telepathy-kded-config.h b/config/telepathy-kded-config.h
index bd82cbd..670c513 100644
--- a/config/telepathy-kded-config.h
+++ b/config/telepathy-kded-config.h
@@ -40,9 +40,10 @@ public Q_SLOTS:
void save();
private Q_SLOTS:
+ void settingsHasChanged();
void autoAwayChecked(bool checked);
void autoXAChecked(bool checked);
- void settingsHasChanged();
+ void nowPlayingChecked(bool checked);
private:
Ui::TelepathyKDEDUi *ui;
diff --git a/config/telepathy-kded-config.ui b/config/telepathy-kded-config.ui
index d3b3802..eba4f64 100644
--- a/config/telepathy-kded-config.ui
+++ b/config/telepathy-kded-config.ui
@@ -6,119 +6,267 @@
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>800</width>
+ <height>600</height>
</rect>
</property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QCheckBox" name="m_awayCheckBox">
- <property name="text">
- <string>Set me as 'Away' after</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QSpinBox" name="m_awayMins">
- <property name="suffix">
- <string/>
- </property>
- <property name="value">
- <number>5</number>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QGroupBox" name="incomingFilesGroupBox">
+ <property name="title">
+ <string>Incoming files</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="m_downloadUrlLabel">
+ <property name="text">
+ <string>Download Folder:</string>
+ </property>
+ <property name="buddy">
+ <cstring>m_downloadUrlRequester</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="KUrlRequester" name="m_downloadUrlRequester">
+ <property name="toolTip">
+ <string>This is the folder where received files will be saved.</string>
+ </property>
+ <property name="whatsThis">
+ <string>This is the folder where received files will be saved.</string>
+ </property>
+ <property name="mode">
+ <set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="m_autoAcceptLabel">
+ <property name="text">
+ <string>Auto-accept file transfers:</string>
+ </property>
+ <property name="buddy">
+ <cstring>m_AutoAcceptCheckBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="m_autoAcceptCheckBox">
+ <property name="text">
+ <string>Enabled</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <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>20</height>
+ </size>
+ </property>
+ </spacer>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>16</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QCheckBox" name="m_xaCheckBox">
- <property name="text">
- <string>Set me as 'Not Available' after</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="autoExclusive">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QSpinBox" name="m_xaMins">
- <property name="suffix">
- <string/>
- </property>
- <property name="value">
- <number>15</number>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QGroupBox" name="autoAwayGroupBox">
+ <property name="title">
+ <string>Auto away</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Set my status to:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="m_awayCheckBox">
+ <property name="text">
+ <string>Away</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="m_awayMinsLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>After:</string>
+ </property>
+ <property name="buddy">
+ <cstring>m_awayMins</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="6">
+ <widget class="QSpinBox" name="m_awayMins">
+ <property name="suffix">
+ <string/>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="m_xaCheckBox">
+ <property name="text">
+ <string>Not available</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="autoExclusive">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QLabel" name="m_xaMinsLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>After:</string>
+ </property>
+ <property name="buddy">
+ <cstring>m_xaMins</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="6">
+ <widget class="QSpinBox" name="m_xaMins">
+ <property name="suffix">
+ <string/>
+ </property>
+ <property name="value">
+ <number>15</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="7">
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>of inactivity</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="7">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>of inactivity</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>456</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="2">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>456</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
</item>
<item>
- <widget class="QCheckBox" name="m_nowPlayingCheckBox">
- <property name="text">
- <string>Enable 'Now playing...' presence</string>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="checked">
- <bool>true</bool>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
</property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="nowPlayingGroupBox">
+ <property name="title">
+ <string>Now playing</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="m_nowPlayingLabel">
+ <property name="text">
+ <string>'Now playing...' presence:</string>
+ </property>
+ <property name="buddy">
+ <cstring>m_nowPlayingCheckBox</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="m_nowPlayingCheckBox">
+ <property name="text">
+ <string>Enabled</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="m_nowPlayingText">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <spacer name="verticalSpacer">
+ <spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@@ -132,6 +280,13 @@
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>KUrlRequester</class>
+ <extends>QFrame</extends>
+ <header>kurlrequester.h</header>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>
--
ktp-kded-integration-module packaging
More information about the pkg-kde-commits
mailing list