GNOME Bugzilla – Bug 589925
Need to generalize chat support
Last modified: 2010-09-20 10:51:59 UTC
Right now we have a full-featured pidgin script, a little bit of support for Ekiga, no support for Empathy, or Esmene, or Xchat, or web-based chat environments, or <insert chat app here>. If we generalize Orca's chat support, it will be far easier in the future to add in support for whatever chat apps users want to use -- and easier for community members to implement this support themselves in the form of a simplified script. Plus the user experience will be much more consistent.
Created attachment 140244 [details] [review] Initial (and hopefully the bulk of the) work This adds a new chat module into Orca. Before anyone gets worked up, please note the following: Nothing is using it yet. Pidgin will remain untouched this release because we are so late in the cycle. No scripts have been harmed by this patch. <grin> Now that that's out of the way.... What this module does is essentially move all of the functionality that's provided by the Pidgin script, including the app specific preferences, the keybindings, yadda, yadda, yadda and the rest of the chat enchilada into chat.py. (Plus cleans things up, removes a couple of bugs, I found, etc.) The way it was tested was by my completely ripping out the guts of the Pidgin script. And, ya know, it all seems to work. I've been talking to myself using multiple machines for two days now. :-) The one thing I didn't fully test, but which should work in theory, is the presentation of typing status. The reason that is not (yet) fully tested is that each script is going to have to define (override methods) about how to identify that an event is a typing status change. That's not something I can easily "genericize." And I couldn't be bothered to do it for a script which we're not going to change for a while anyway. It will, however, get tested when I create an empathy script, an xchat script, etc. Pylints to a 10; nothing to regression test. And it only introduces one new string: + _("All channels when an_y %s window is active") \ + % self._script.app.name) (All other strings were lifted as-is from the Pidgin script. The one above had "Pidgin" hard-coded into it.) Will please review. Thanks!!
Created attachment 140245 [details] [review] Second first same as the first (modulo doc typo) Sorry for the spam. Caught a typo in the docs.
Created attachment 140246 [details] [review] third time is (hopefully) charm: add chat.py to POTFILES.in Arrrrgh. I had forgotten again.
Chatted with Will about this. He said that without any scripts that actually use it it's harder to evaluate. Fair enough. I'll clean up my Pidgin script and also create/modify one or two other scripts and attach them to this bug as proof-of-concept. In the meantime, retargeting for 2.27.91.
Pushing this out to FUTURE. We've got more important (high impact, low risk) bugs to work on.
Review of attachment 140246 [details] [review]: I've marked this as something we should look at for 2.30. I'm also marking this as needs work for the sake of making sure we integrate this with pidgin, empathy, etc. So -- it seems like a great idea, but we need to make sure we move it over to the known IM clients.
Comment on attachment 140246 [details] [review] third time is (hopefully) charm: add chat.py to POTFILES.in I've committed this patch for the following reasons: 1. It was constructed (and tested) by replacing the pidgin script and ekiga script and using this functionality instead. I may have also started implementing support for other clients (which worked) but forget now as it was so long ago that I was working on it. 2. This patch/new implementation itself isn't actually being used -- yet -- by any scripts, so committing it doesn't hurt anything; and it is needed in order do the work for pidgin and the other chat clients. Debugging future problems is easier if we don't make an uber commit. 3. It's still early enough in the (2.31) cycle that it makes sense now to revisit and resume work on this issue.
Created attachment 158432 [details] [review] Starting to add in support for empathy This adds the beginnings of support in for empathy. I say beginnings largely because I'm still testing -- with a long, long way to go on that front. However, so far, so good.
With a couple of minor additional hacks to the empathy script (e.g. to "tickle" the hierarchy when a window is activated to ensure we get object:text-changed:insert events for messages), I declare generic chat support working for Empathy. Yay! There are a handful of bugs in Empathy (table child count seems off by one, certain "themes" are inaccessible, we don't get what we need to identify typing status). But all the critical features in Orca's chat support seem to be working quite nicely. Again I say Yay! I'll look at doing one or two other clients for which we currently have minimal or no support. Then once nothing has blown up, we can do the Pidgin conversion.
* Empathy is now using the generic chat * Instantbird is now using the generic chat * Gajim will soon be using the generic chat * Pidgin is slated to be converted There are bugs opened for all of the above. (search for 'chat' in the whiteboard) * Redoing the Ekiga script is also something I'm considering (and also a different bug) Therefore, I'm closing this bug as FIXED for the implementation of chat.py.