Bug 294478 - When offline, add contact SNI should be hidden
Summary: When offline, add contact SNI should be hidden
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: kded-module (show other bugs)
Version: git-latest
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords: junior-jobs
Depends on:
Blocks: extramile
  Show dependency treegraph
 
Reported: 2012-02-20 09:06 UTC by Martin Klapetek
Modified: 2013-03-05 20:43 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Klapetek 2012-02-20 09:06:33 UTC
It does not really make sense for it to stay in systray when you go offline as you cannot accept/reject it anyway. Once you reconnect, it should appear again (which already does).
Comment 1 moses 2012-03-28 18:12:23 UTC
"Add Contact SNI" ? Do you mean the "Add New Contacts" button on the main widget ?
Comment 2 Martin Klapetek 2012-03-28 18:15:32 UTC
No, it means that the "Add Contact StatusNotifierItem", the systray icon, should be hidden once you go offline (or the account that it belongs to goes offline).
Comment 3 moses 2012-04-04 19:25:22 UTC
I'm working on this but running into problems. I tried asking on irc but couldn't get help except from mck182. Can we discuss possible solutions here ? Like I can show what I'm trying and someone could possibly nudge me in the right direction, if thats ok with you.
Comment 4 Martin Klapetek 2012-04-05 18:24:00 UTC
The bug tracker is not really the best place to show your ongoing work. If you have something that's working, please post the diff at http://git.reviewboard.kde.org and we'll all comment there and make suggestions. If you just need help, feel free to mail the mailing list (kde-telepathy@kde.org), lots of very clever people are there or you can ping me on irc (mck182) and I'll do my best to help.
Comment 5 moses 2012-04-12 05:50:55 UTC
Hi

Please find a proposed patch at http://git.reviewboard.kde.org/r/104555/ though I think a lot more is required. Please provide your suggestions. I'll be digging deeper.
Comment 6 David Edmundson 2012-07-13 15:47:35 UTC
Review was closed for not really solving the issue.

If one account goes offline, the contacts for that account should be hidden.
Comment 7 David Edmundson 2012-09-12 08:14:05 UTC
We should monitor the ContactPtr->manager()->connection() for becoming invalidated, and remove the contact from the menu when this happens.
Comment 8 David Edmundson 2012-12-10 02:55:16 UTC
Update:

My KTp::Contact class (in review) has a handy signal for when the connection drops, if this merges it will make this fix a lot easier.
Comment 9 Stefan Eggers 2013-02-08 09:52:28 UTC
Created review request for a change that fixes this for me: https://git.reviewboard.kde.org/r/108846/
Comment 10 David Edmundson 2013-02-08 12:55:40 UTC
Git commit 6ed91fd966758a28260ae45ff909dd299cf5e1a9 by David Edmundson, on behalf of Stefan Eggers.
Committed on 08/02/2013 at 13:49.
Pushed by davidedmundson into branch 'master'.

When offline, hide the "add contact status notifier item"

REVIEW: 108846
FIXED-IN: 0.6

DIGEST: Fixes having a notification "a new contact has added you" even when you are offline.

M  +11   -0    contact-request-handler.cpp
M  +1    -0    contact-request-handler.h
M  +2    -1    telepathy-module.cpp

http://commits.kde.org/telepathy-kded-module/6ed91fd966758a28260ae45ff909dd299cf5e1a9