Bug 252190 - Make highlight configurable by channel
Summary: Make highlight configurable by channel
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: notifications (show other bugs)
Version: 1.3.1
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-24 00:08 UTC by Stefan Radermacher
Modified: 2011-03-09 01:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Implement this feature (16.87 KB, patch)
2011-03-08 19:58 UTC, Stefan Radermacher
Details
Updated the patch (42.53 KB, patch)
2011-03-09 01:07 UTC, Stefan Radermacher
Details
Another Update (43.12 KB, patch)
2011-03-09 01:52 UTC, Stefan Radermacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Radermacher 2010-09-24 00:08:16 UTC
Version:           1.3.1 (using KDE 4.5.1) 
OS:                Linux

It would be nice if highlights could be restricted to individual channels. Hor example, besides my nick, I'd like my first name to be a highlight on one channel, but not on others, because that would trigger too often.

Reproducible: Didn't try

Steps to Reproduce:
./.

Actual Results:  
./.

Expected Results:  
./.

./.
Comment 1 Stefan Radermacher 2011-03-08 19:58:45 UTC
Created attachment 57777 [details]
Implement this feature

I have created a patch to implement this feature.

The patch was created against a repository cloned today. I used "git format-patch origin" as specified in this tutorial: http://techbase.kde.org/Development/Tutorials/Git/Create_a_patch. I hope this is the right way to proceed, I'm doing this for the first time.
Comment 2 Eike Hein 2011-03-08 21:15:58 UTC
Hi Stefan,

thanks, it's rare for someone to follow up a feature request with a patch of their own :).

I have to say that long-term we're shooting for a more ambitious GUI to handle a variety of per-channel settings, but until such a time that we actually tackle it this seems like a worthwhile addition.

I do wonder about labeling the input field "Channels:" though since the use of ChatWindow::getName() will technically also make it work with query and other kinds of chat tabs. At the same time labeling it "Views:" or similar might be too abstract for it to actually see usage, so unless you can think of a better term, I guess we can go with "Channels:" for now.

Two small requests for a refreshed version of the patch, though:
- Please add a What's This string to the input field that explains that multiple items can be separated by commas. It could also mention that other view names are fair game as well in addition to channels, unless that's already addressed by a better label (see above).
- Please change the commit message to put the reference to the bug report on its own line in the format "BUG:<number>" - that will make he repo hooks automatically forward the commit to Bugzilla and close the ticket when we push it.

(In case you're starting out with git: You can use "git rebase --interactive HEAD^" to put your checkout into a state where you can modify the last commit, then after changing the files run "git commit -a --amend" to pick up the changes and modify the commit message, and then "git rebase --continue" to finish the rebase operation, and then you can use format-patch again).
Comment 3 Oswald Buddenhagen 2011-03-08 21:22:01 UTC
there is no need to start a rebase to be able to amend the last commit ...
Comment 4 Eike Hein 2011-03-08 21:26:22 UTC
True, --amend is enough for just the last one - I'm in the habit of using rebase since there's often more than one commit to edit/reorder/squash :-).
Comment 5 Eike Hein 2011-03-08 23:19:36 UTC
For the record, I'm talking with Stefan on IRC right now and we're addressing a couple more issues with regard to coping with more free-form input (spaces after the separator, etc.), UI strings and taking the opportunity to clean up the coding style around those parts of the code.
Comment 6 Stefan Radermacher 2011-03-09 01:07:15 UTC
Created attachment 57787 [details]
Updated the patch

I have updated the patch with the changes proposed above, and some more modifications as discussed with Eike on IRC. On his suggestion, I have also reworked the various highlighting source files and the IRCView::filter procedure to conform to current coding standards and to be, in general, more clearly arranged.
Comment 7 Stefan Radermacher 2011-03-09 01:52:43 UTC
Created attachment 57788 [details]
Another Update

Some more small fixes as discussed with Eike on IRC.
Comment 8 Eike Hein 2011-03-09 01:59:54 UTC
Git commit 7a422edd5fed8044143e02f0ce0f22e74d51a9c6 by Eike Hein. on behalf of Stefan Radermacher
Committed on 08/03/2011 at 19:52.
Pushed by hein into branch 'master'.

Implement support for channel specific highlights

BUG:252190

M  +3    -2    src/application.cpp     
M  +234  -214  src/config/highlight_config.cpp     
M  +4    -3    src/config/highlight_config.h     
M  +42   -0    src/config/highlight_configui.ui     
M  +4    -6    src/config/preferences.cpp     
M  +2    -1    src/config/preferences.h     
M  +84   -21   src/viewer/highlight.cpp     
M  +21   -14   src/viewer/highlight.h     
M  +69   -21   src/viewer/highlightviewitem.cpp     
M  +24   -15   src/viewer/highlightviewitem.h     
M  +48   -37   src/viewer/ircview.cpp     

http://commits.kde.org/konversation/7a422edd5fed8044143e02f0ce0f22e74d51a9c6