Bug 292402 - Need a method to block contacts from within the text-ui
Summary: Need a method to block contacts from within the text-ui
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: text-ui (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: 0.4.0
Assignee: Ahmed Ibrahim
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2012-01-25 17:33 UTC by David Edmundson
Modified: 2012-07-06 12:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A patch that adds Block Contact button that bocks/unblock contact. (12.99 KB, patch)
2012-03-24 10:23 UTC, Ahmed Ibrahim
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Edmundson 2012-01-25 17:33:23 UTC
Now my MSN account is connecting I get a lot of messages from spam bots phishing for credit card details. It would be handy to have a way to block contacts straight from the text-ui.

propose adding it to the "file" menu. (unrelated rant: we should rename that, there's no files involved)
Comment 1 Daniele E. Domenichelli 2012-03-23 19:48:42 UTC
Assigning to R4md4c as he offered to implement this on IRC
Comment 2 Ahmed Ibrahim 2012-03-24 10:23:07 UTC
Created attachment 69845 [details]
A patch that adds Block Contact button that bocks/unblock contact.

I've added also signals/slots at the ChannelContactModel so that we can add ChatView logic and display the blocking/unblocking operation to the user.
Comment 3 George Kiagiadakis 2012-03-25 10:20:27 UTC
This is not the proper place for patch reviews, but I'll mention two things I noticed:

1) setBlockEnabled() is a bit unintuitive the way it works. I would expect it to behave in the opposite way (i.e. setBlockEnabled(true) enables the "block contact" action and setBlockEnabled(false) enables the "unblock contact" action)

2) Watch your indentation. We use 4 spaces to indent. No tab characters.
Comment 4 Ahmed Ibrahim 2012-03-25 12:00:55 UTC
(In reply to comment #3)
> This is not the proper place for patch reviews, but I'll mention two things
> I noticed:
> 
> 1) setBlockEnabled() is a bit unintuitive the way it works. I would expect
> it to behave in the opposite way (i.e. setBlockEnabled(true) enables the
> "block contact" action and setBlockEnabled(false) enables the "unblock
> contact" action)
> 
> 2) Watch your indentation. We use 4 spaces to indent. No tab characters.

About posting a review request. I don't have KDE developer account to post one(I guess what is what I need to post a review request, right ?) .
As for your notices. You are right I'll modify the code to meet your suggestions and to comply with the coding standard.
Comment 5 Daniele E. Domenichelli 2012-03-25 14:39:54 UTC
Just go to https://identity.kde.org/ and register a new account. That should be enough to post new reviews...
Comment 6 Martin Klapetek 2012-03-31 13:52:58 UTC
Git commit 70dca13386b104d877413f7f710119a0fd58aa20 by Martin Klapetek, on behalf of Ahmed Ibrahim.
Committed on 31/03/2012 at 15:52.
Pushed by mklapetek into branch 'master'.

Block/Unblock feature in ktp-text-ui module

REVIEW: 104407

M  +52   -0    app/chat-window.cpp
M  +3    -0    app/chat-window.h
M  +1    -0    app/chatwindow.rc
M  +1    -0    app/main.cpp
M  +12   -0    lib/channel-contact-model.cpp
M  +2    -1    lib/channel-contact-model.h
M  +20   -0    lib/chat-widget.cpp
M  +5    -0    lib/chat-widget.h

http://commits.kde.org/telepathy-text-ui/70dca13386b104d877413f7f710119a0fd58aa20