[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:19:03 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=bbb5c04
The following commit has been merged in the master branch:
commit bbb5c04251f5aab4803f386a685255471bd8f0c4
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Mon Mar 14 02:34:36 2011 +0000
Make the config compile as KCModule. Load this module from the app.
---
app/chat-window.cpp | 2 +-
config/CMakeLists.txt | 11 +++++--
config/chatwindowconfig.ui | 82 ++++++++--------------------------------------
config/main-window.cpp | 14 ++++----
config/main-window.h | 12 ++++---
5 files changed, 38 insertions(+), 83 deletions(-)
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index c0e825c..b3407db 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -186,7 +186,7 @@ void ChatWindow::showSettingsDialog()
KSettings::Dialog *dialog = new KSettings::Dialog(this);
- dialog->addModule("kcm_telepathy_chat");
+ dialog->addModule("kcm_telepathy_chat_config");
dialog->addModule("kcm_telepathy_accounts");
dialog->setAttribute(Qt::WA_DeleteOnClose);
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index 2b94469..f35ae38 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -11,9 +11,14 @@ set(telepathy_chat_config_UI
kde4_add_ui_files(telepathy_chat_config_SRCS ${telepathy_chat_config_UI})
-kde4_add_executable(telepathy-chat-config ${telepathy_chat_config_SRCS})
+kde4_add_plugin(kcm_telepathy_chat_config
+ ${telepathy_chat_config_SRCS})
-target_link_libraries(telepathy-chat-config ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTWEBKIT_LIBRARY} ${KDE4_KUTILS_LIBS} ktelepathy_chat_lib)
+target_link_libraries(kcm_telepathy_chat_config ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTWEBKIT_LIBRARY} ${KDE4_KUTILS_LIBS} ktelepathy_chat_lib)
+install(TARGETS kcm_telepathy_chat_config
+ DESTINATION ${PLUGIN_INSTALL_DIR})
-install(TARGETS telepathy-chat-config ${INSTALL_TARGETS_DEFAULT_ARGS})
+install (FILES kcm_telepathy_chat_config.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
diff --git a/config/chatwindowconfig.ui b/config/chatwindowconfig.ui
index c057222..7c80882 100644
--- a/config/chatwindowconfig.ui
+++ b/config/chatwindowconfig.ui
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ChatWindowConfig</class>
- <widget class="QDialog" name="ChatWindowConfig">
+ <widget class="QWidget" name="ChatWindowConfig">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>353</width>
- <height>337</height>
+ <width>400</width>
+ <height>303</height>
</rect>
</property>
<property name="windowTitle">
- <string>Telepathy Chat Window Config</string>
+ <string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
@@ -28,10 +28,10 @@
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="1">
+ <item row="1" column="1">
<widget class="KComboBox" name="styleComboBox"/>
</item>
- <item row="0" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Message Style:</string>
@@ -44,10 +44,10 @@
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="2" column="1">
<widget class="KComboBox" name="variantComboBox"/>
</item>
- <item row="1" column="0">
+ <item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Variant:</string>
@@ -60,21 +60,21 @@
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="3" column="1">
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Show User Icons</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="5" column="1">
<widget class="QCheckBox" name="showHeader">
<property name="text">
<string>Show Header</string>
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Select Font: </string>
@@ -84,7 +84,7 @@
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="6" column="1">
<widget class="KFontComboBox" name="kfontcombobox"/>
</item>
</layout>
@@ -104,29 +104,6 @@
</item>
</layout>
</item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>13</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
</layout>
</widget>
<customwidgets>
@@ -148,38 +125,5 @@
</customwidget>
</customwidgets>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>ChatWindowConfig</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>ChatWindowConfig</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
diff --git a/config/main-window.cpp b/config/main-window.cpp
index 7e28346..024fbf5 100644
--- a/config/main-window.cpp
+++ b/config/main-window.cpp
@@ -28,8 +28,11 @@
#include <KDebug>
#include <KLocalizedString>
-MainWindow::MainWindow(QWidget *parent)
- : QDialog(parent),
+K_PLUGIN_FACTORY(KCMTelepathyChatConfigFactory, registerPlugin<MainWindow>();)
+K_EXPORT_PLUGIN(KCMTelepathyChatConfigFactory("telepathy_chat_config", "kcm_telepathy_chat_config"))
+
+MainWindow::MainWindow(QWidget *parent, const QVariantList& args)
+ : KCModule(KCMTelepathyChatConfigFactory::componentData(), parent, args),
ui(new Ui::ChatWindowConfig)
{
ui->setupUi(this);
@@ -63,7 +66,7 @@ MainWindow::~MainWindow()
void MainWindow::changeEvent(QEvent *e)
{
- QDialog::changeEvent(e);
+ QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
@@ -168,12 +171,11 @@ void MainWindow::sendDemoMessages()
ui->chatView->addStatusMessage(statusMessage);
}
-void MainWindow::accept()
+void MainWindow::save()
{
kDebug();
KSharedConfigPtr config = KSharedConfig::openConfig("ktelepathyrc");
- //KConfig config(KGlobal::dirs()->findResource("config","ktelepathyrc"));
KConfigGroup appearanceConfig = config->group("Appearance");
appearanceConfig.writeEntry("styleName", ui->styleComboBox->itemData(ui->styleComboBox->currentIndex()).toString());
@@ -183,5 +185,5 @@ void MainWindow::accept()
appearanceConfig.sync();
config->sync();
- QDialog::accept();
+ KCModule::save();
}
diff --git a/config/main-window.h b/config/main-window.h
index 4bb9147..8c25218 100644
--- a/config/main-window.h
+++ b/config/main-window.h
@@ -22,22 +22,26 @@
#include "adium-theme-header-info.h"
-#include <QtGui/QDialog>
+#include <KCModule>
namespace Ui
{
-class ChatWindowConfig;
+ class ChatWindowConfig;
}
-class MainWindow : public QDialog
+class MainWindow : public KCModule
{
Q_OBJECT
public:
- explicit MainWindow(QWidget *parent = 0);
+ explicit MainWindow(QWidget *parent = 0,
+ const QVariantList& args = QVariantList());
~MainWindow();
+public slots:
+ void save();
+
protected:
void changeEvent(QEvent *e);
void accept();
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list