<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>310946</bug_id>
          
          <creation_ts>2012-11-30 20:18:03 +0000</creation_ts>
          <short_desc>No notification sound when a new message comes in in an active chat window</short_desc>
          <delta_ts>2012-11-30 22:55:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>telepathy</product>
          <component>general</component>
          <version>0.5.1</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="roman">fraese.roman</reporter>
          <assigned_to name="Telepathy Bugs">kde-telepathy-bugs-null</assigned_to>
          <cc>kde</cc>
    
    <cc>mklapetek</cc>
          
          <cf_commitlink>http://commits.kde.org/telepathy-text-ui/3b5f8196497f09bc333338e1713fe32ba2d47ac1</cf_commitlink>
          <cf_versionfixedin>0.5.2</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1319808</commentid>
    <comment_count>0</comment_count>
    <who name="roman">fraese.roman</who>
    <bug_when>2012-11-30 20:18:03 +0000</bug_when>
    <thetext>I would like to get a notification sound even while the chat window is active because I&apos;m not always watching my screen. 

In the setupdialog the sounds are working when I click the play button. All other notifications are working properly.

Reproducible: Always

Steps to Reproduce:
1. Set up a notification sound for incoming messages in active windows
2. activate the chat window an wait for an incoming message
3. nothing is going to happen
Actual Results:  
no notification sound was played

Expected Results:  
getting a notification sound :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319831</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Klapetek">mklapetek</who>
    <bug_when>2012-11-30 22:24:55 +0000</bug_when>
    <thetext>Thanks for the report!

That behavior is actually correct as it notifies only when the window does not have focus, otherwise you&apos;d get the notification sound with absolutely every single message and I can imagine that being annoying after a while. Even facebook plays no sound when the chat is focused (though they do play a sound when the pause in the chat is longer than N).

In fact, you can probably try it on yourself with very simple patch (if you are using self-compiled install, otherwise it won&apos;t work):

Open ktp-text-ui/lib/chat-widget.cpp and change line 676, in the codeblock looking like this:

    if(isOnTop()) {
        kDebug() &lt;&lt; &quot;Widget is on top, not doing anything&quot;;
        return;
    }

and change it into

    if(isOnTop()) {
        kDebug() &lt;&lt; &quot;Widget is on top, not doing anything&quot;;
        //return;
    }


Recompile and install. And then try using it for a while. I&apos;m pretty sure it will get annoying :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319832</commentid>
    <comment_count>2</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2012-11-30 22:29:14 +0000</bug_when>
    <thetext>Martin, that&apos;s not quite true. 

We have a separate notification for if it&apos;s the active chat (which by default does nothing). There&apos;s a FIXME in the code (just above the part you posted). I think that&apos;s the one the reporter is talking about.

It&apos;s not connected up in the code, there&apos;s a FIXME above the part you pasted. I see no reason why that&apos;s the case.
Will fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319833</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Klapetek">mklapetek</who>
    <bug_when>2012-11-30 22:38:16 +0000</bug_when>
    <thetext>Hah, indeed there is! I just did a grep through the code. Let&apos;s fix it then!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319837</commentid>
    <comment_count>4</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2012-11-30 22:54:57 +0000</bug_when>
    <thetext>Git commit 2aa32aa5db66c3a06d16001ce092c7906e68f844 by David Edmundson.
Committed on 30/11/2012 at 23:54.
Pushed by davidedmundson into branch &apos;kde-telepathy-0.5&apos;.

Correctly emit notifications for messages recieved in an active chat
Fixed-In: 0.5.2

M  +6    -8    lib/chat-widget.cpp

http://commits.kde.org/telepathy-text-ui/2aa32aa5db66c3a06d16001ce092c7906e68f844</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1319838</commentid>
    <comment_count>5</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2012-11-30 22:55:33 +0000</bug_when>
    <thetext>Git commit 3b5f8196497f09bc333338e1713fe32ba2d47ac1 by David Edmundson.
Committed on 30/11/2012 at 23:54.
Pushed by davidedmundson into branch &apos;master&apos;.

Correctly emit notifications for messages recieved in an active chat
Fixed-In: 0.5.2

M  +6    -8    lib/chat-widget.cpp

http://commits.kde.org/telepathy-text-ui/3b5f8196497f09bc333338e1713fe32ba2d47ac1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>