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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-kded-module.git;a=commitdiff;h=bcf4aa4

The following commit has been merged in the master branch:
commit bcf4aa49f1248c69f112e5751e1397fc1e2367cf
Author: Lucas Betschart <lucasbetschart at gmail.com>
Date:   Sat Jul 13 12:20:42 2013 +0000

    %time Variable to get the current UTC time in the away message
    
    To make this option visible I've changed the tool tip (I think the first thing a user would do if he wants no away message is to remove the message text [if there is one, which isn't by default], so this double information can be replaced).
    
    Adding an extra widget for drag n drop like in now playing would be too much for this I think. It would blow up the UI if I add this under every lineedit (as more stuff is visible on the first sight for the user as more complicated it looks) and it would be confusing if I add it only once in a central place, so I decided to just inform the user through a tool tip (it's also not a important feature, so it's ok if it's a little bit hidden).
    
    BUG: 300849
    FIXED-IN: 0.7.0
    REVIEW: 110334
---
 autoaway.cpp                     | 3 ++-
 config/telepathy-kded-config.cpp | 6 +++---
 screensaveraway.cpp              | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/autoaway.cpp b/autoaway.cpp
index 06cb8e0..dd6b48e 100644
--- a/autoaway.cpp
+++ b/autoaway.cpp
@@ -62,12 +62,13 @@ void AutoAway::timeoutReached(int id)
         if (m_globalPresence->currentPresence().type() != Tp::Presence::away().type() &&
             m_globalPresence->currentPresence().type() != Tp::Presence::xa().type() &&
             m_globalPresence->currentPresence().type() != Tp::Presence::hidden().type()) {
-
+            m_awayMessage.replace(QLatin1String("%time"), QDateTime::currentDateTimeUtc().toString(QLatin1String("hh:mm:ss (%t)")), Qt::CaseInsensitive);
             setRequestedPresence(Tp::Presence::away(m_awayMessage));
             setActive(true);
         }
     } else if (id == m_extAwayTimeoutId) {
         if (m_globalPresence->currentPresence().type() == Tp::Presence::away().type()) {
+            m_xaMessage.replace(QLatin1String("%time"), QDateTime::currentDateTimeUtc().toString(QLatin1String("hh:mm:ss (%t)")), Qt::CaseInsensitive);
             setRequestedPresence(Tp::Presence::xa(m_xaMessage));
             setActive(true);
         }
diff --git a/config/telepathy-kded-config.cpp b/config/telepathy-kded-config.cpp
index d237707..462dd38 100644
--- a/config/telepathy-kded-config.cpp
+++ b/config/telepathy-kded-config.cpp
@@ -82,13 +82,13 @@ TelepathyKDEDConfig::TelepathyKDEDConfig(QWidget *parent, const QVariantList& ar
                                     " minutes"));
 
     ui->m_awayMessage->setClickMessage(i18n("Leave empty for no message"));
-    ui->m_awayMessage->setToolTip(ui->m_awayMessage->clickMessage()); //use the same i18n string
+    ui->m_awayMessage->setToolTip(i18n("Use %time to insert UTC time of when you went idle"));
 
     ui->m_xaMessage->setClickMessage(i18n("Leave empty for no message"));
-    ui->m_xaMessage->setToolTip(ui->m_xaMessage->clickMessage()); //use the same i18n string
+    ui->m_xaMessage->setToolTip(i18n("Use %time to insert UTC time of when you went idle"));
 
     ui->m_screenSaverAwayMessage->setClickMessage(i18n("Leave empty for no message"));
-    ui->m_screenSaverAwayMessage->setToolTip(ui->m_screenSaverAwayMessage->clickMessage()); //use the same i18n stringToMode
+    ui->m_screenSaverAwayMessage->setToolTip(i18n("Use %time to insert UTC time of when you went idle"));
 
     connect(ui->m_downloadUrlRequester, SIGNAL(textChanged(QString)),
             this, SLOT(settingsHasChanged()));
diff --git a/screensaveraway.cpp b/screensaveraway.cpp
index c7fdd75..14f2092 100644
--- a/screensaveraway.cpp
+++ b/screensaveraway.cpp
@@ -59,6 +59,7 @@ void ScreenSaverAway::onActiveChanged(bool newState)
     }
 
     if (newState) {
+      m_screenSaverAwayMessage.replace(QLatin1String("%time"), QDateTime::currentDateTimeUtc().toString(QLatin1String("hh:mm:ss")), Qt::CaseInsensitive);
       setRequestedPresence(Tp::Presence::away(m_screenSaverAwayMessage));
       setActive(true);
     } else {

-- 
ktp-kded-integration-module packaging



More information about the pkg-kde-commits mailing list