[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:08:04 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=0ddb996

The following commit has been merged in the master branch:
commit 0ddb996ccf77e750f23ab6cf18cd6ffd7eaa2cc7
Author: Ahmed Ibrahim <ahmedibrahimkhali at gmail.com>
Date:   Sun Mar 9 13:26:46 2014 +0100

    KTP-Debugger: Make the "Save log" button either a toolbar button or a menu action
    
    As the bug states, I removed the "Save Log" button, and readded it as a KAction inside the MainWindow KToolBar.
    
    REVIEW: 116663
    BUG: 331713
---
 tools/debugger/main-window.cpp | 11 ++++++++++-
 tools/debugger/main-window.ui  | 10 ----------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tools/debugger/main-window.cpp b/tools/debugger/main-window.cpp
index cffd410..eb607cc 100644
--- a/tools/debugger/main-window.cpp
+++ b/tools/debugger/main-window.cpp
@@ -17,7 +17,11 @@
 */
 #include "main-window.h"
 #include "debug-message-view.h"
+#include <KAction>
+#include <KIcon>
 #include <KStatusBar>
+#include <KToolBar>
+
 
 MainWindow::MainWindow(QWidget *parent)
     : KXmlGuiWindow(parent)
@@ -31,12 +35,17 @@ MainWindow::MainWindow(QWidget *parent)
     m_ui.hazeLogsView->setService(QLatin1String("org.freedesktop.Telepathy.ConnectionManager.haze"));
     m_ui.salutLogsView->setService(QLatin1String("org.freedesktop.Telepathy.ConnectionManager.salut"));
     m_ui.rakiaLogsView->setService(QLatin1String("org.freedesktop.Telepathy.ConnectionManager.rakia"));
+
+    KAction *saveLogAction = new KAction(KIcon(QLatin1String("document-save-as"), KIconLoader::global()), i18n("Save Log"), this);
+    saveLogAction->setToolTip(i18nc("Toolbar icon tooltip", "Save log of the current tab"));
+    toolBar()->addAction(saveLogAction);
+
     connect(m_ui.mcLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
     connect(m_ui.gabbleLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
     connect(m_ui.hazeLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
     connect(m_ui.salutLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
     connect(m_ui.rakiaLogsView, SIGNAL(statusMessage(QString)), statusBar(), SLOT(showMessage(QString)));
-    connect(m_ui.saveButton, SIGNAL(clicked()), this, SLOT(saveLogFile()));
+    connect(saveLogAction, SIGNAL(triggered(bool)), this, SLOT(saveLogFile()));
 }
 
 MainWindow::~MainWindow()
diff --git a/tools/debugger/main-window.ui b/tools/debugger/main-window.ui
index b400a6b..dd7dcc4 100644
--- a/tools/debugger/main-window.ui
+++ b/tools/debugger/main-window.ui
@@ -12,16 +12,6 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <widget class="QToolButton" name="saveButton">
-     <property name="toolTip">
-      <string>Saves the log into a file.</string>
-     </property>
-     <property name="text">
-      <string>Save log</string>
-     </property>
-    </widget>
-   </item>
-   <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
       <number>0</number>

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list