[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:18:06 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=54ebb00

The following commit has been merged in the master branch:
commit 54ebb00eb81ce1f08022dcf74c1927da51c21feb
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Mon Sep 27 22:17:11 2010 +0000

    Add a select text colour button to the format toolbar.
    
    svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1180414
---
 lib/chatwindow.cpp | 16 ++++++++++++++++
 lib/chatwindow.h   |  3 +++
 lib/chatwindow.ui  | 10 ++++++++++
 3 files changed, 29 insertions(+)

diff --git a/lib/chatwindow.cpp b/lib/chatwindow.cpp
index de174bb..e7ff964 100644
--- a/lib/chatwindow.cpp
+++ b/lib/chatwindow.cpp
@@ -31,6 +31,7 @@
 #include <QAction>
 #include <QWidget>
 
+#include <KColorDialog>
 //#include <Sonnet/Highlighter>
 
 #include <TelepathyQt4/Message>
@@ -49,6 +50,9 @@ ChatWindow::ChatWindow(ChatConnection* chat, QWidget *parent) :
     ui->setupUi(this);
     ui->statusLabel->setText("");
 
+    ui->formatColor->setText("");
+    ui->formatColor->setIcon(KIcon("format-text-color"));
+
     ui->formatBold->setText("");
     ui->formatBold->setIcon(KIcon("format-text-bold"));
 
@@ -63,6 +67,9 @@ ChatWindow::ChatWindow(ChatConnection* chat, QWidget *parent) :
 
     updateEnabledState(false);
 
+    qDebug() << "chat connection message support is:";
+    qDebug() << m_chatConnection->channel()->messagePartSupport();
+
     //format toolbar visibility
     m_showFormatToolbarAction->setCheckable(true);
     connect(m_showFormatToolbarAction, SIGNAL(toggled(bool)), ui->formatToolbar, SLOT(setVisible(bool)));
@@ -74,6 +81,7 @@ ChatWindow::ChatWindow(ChatConnection* chat, QWidget *parent) :
     m_showFormatToolbarAction->setChecked(formatToolbarIsVisible);
 
     //connect signals/slots from format toolbar
+    connect(ui->formatColor, SIGNAL(released()), SLOT(onFormatColorReleased()));
     connect(ui->formatBold, SIGNAL(toggled(bool)), ui->sendMessageBox, SLOT(setFontBold(bool)));
     connect(ui->formatItalic, SIGNAL(toggled(bool)), ui->sendMessageBox, SLOT(setFontItalic(bool)));
     connect(ui->formatUnderline, SIGNAL(toggled(bool)), ui->sendMessageBox, SLOT(setFontUnderline(bool)));
@@ -336,3 +344,11 @@ bool MessageBoxEventFilter::eventFilter(QObject *obj, QEvent *event)
     // standard event processing
     return QObject::eventFilter(obj, event);
 }
+
+
+void ChatWindow::onFormatColorReleased()
+{
+    QColor color;
+    KColorDialog::getColor(color,this);
+    ui->sendMessageBox->setTextColor(color);
+}
diff --git a/lib/chatwindow.h b/lib/chatwindow.h
index 7a33948..4e19aae 100644
--- a/lib/chatwindow.h
+++ b/lib/chatwindow.h
@@ -97,6 +97,9 @@ signals:
     void userTypingChanged(bool);
 
 
+private slots:
+    void onFormatColorReleased();
+
 private:
     Ui::ChatWindow *ui;
     ChatConnection* m_chatConnection;
diff --git a/lib/chatwindow.ui b/lib/chatwindow.ui
index 48263c9..35cd042 100644
--- a/lib/chatwindow.ui
+++ b/lib/chatwindow.ui
@@ -39,6 +39,16 @@
        <number>0</number>
       </property>
       <item>
+       <widget class="QPushButton" name="formatColor">
+        <property name="focusPolicy">
+         <enum>Qt::NoFocus</enum>
+        </property>
+        <property name="text">
+         <string notr="true">Colour</string>
+        </property>
+       </widget>
+      </item>
+      <item>
        <widget class="QPushButton" name="formatBold">
         <property name="focusPolicy">
          <enum>Qt::NoFocus</enum>

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list