Facebook contacts can't be preselected in logviewer, because their UID (or at least of some of them) starts with "-", so the command to invoke ktp-log-viewer with such contact preselected looks like ktp-log-viewer gabble/jabber/some.user_40chat_2efacebook_2ecom0/ -0123456789@chat.facebook.com This obviously does not work because KCmdLineArgs interprets the contact UID as a switch and fails with "Unknown option '0123456789@chat.facebook.com'." Reproducible: Always Steps to Reproduce: 1. chat with some Facebook contact 2. click "Previous Converstions" in textui Actual Results: Nothing happens Expected Results: Logviewer is opened and the contact is correctly preselected I suggest changing the ktp-log-viewer command line syntax to ktp-logviewer accountID,contactID e.g. passing accountID and contactID as a single argument and separate them just by comma for easier parsing. This assumes comma is not an allowed character within accountID and contactID, which I believe is a safe assumption.
Would simply using quotes when loading log viewer fix it? could you run this from a console and see if it works? ktp-log-viewer "gabble/jabber/some.user_40chat_2efacebook_2ecom0/" "-0123456789@chat.facebook.com" The reason I ask is that we shouldn't really be changing the args to a program in a minor release, and this looks like something that would be good to fix in the 0.5.x series.
Hmm, maybe I was too harsh with the review request then :) Anyway nope, it does not work.
It should work with double dashes before the arguments. i.e.: ktp-log-viewer -- gabble/jabber/some.user_40chat_2efacebook_2ecom0/ -0123456789@chat.facebook.com
That does not work either, because the values are not available in KCmdLineArgs::parserArgs()
Ignore my previous comment, it actually works! I made a typo in the UID before. I'll fix all the components that invoke logviewer to pass "--" as the first argument.
Git commit 278f9f82550cf763e96585ec5aed6418f9cc760e by Dan Vrátil. Committed on 30/09/2012 at 19:46. Pushed by dvratil into branch 'kde-telepathy-0.5'. Fix invoking logviewer with preselected Facebook contact REVIEW: 106635 M +4 -2 app/chat-window.cpp http://commits.kde.org/telepathy-text-ui/278f9f82550cf763e96585ec5aed6418f9cc760e