Comment 10 for bug 769344

Revision history for this message
Radu Cristescu (radu.c) wrote :

As I said earlier, I'm not a Python programmer at all. So far, all I did was hack the existing code so it works, with plenty of Googling and RTFM-ing - and that's because I always wanted to copy from one laptop to another (usually youtube links from a chat window on a low powered laptop to a more powerful laptop where I don't want to run the chat application).

If what you say is what I think you say, the idea is actually good. The network.py plugin can even stay the way it is now for the most part (and can be changed later), with the difference that it will push incoming clipboard messages to the synchronized Queue and let the main thread pick them up and update the menu. That change wouldn't even be a big deal if I knew Python well enough.

Unfortunately, at least one other plugin demonstrates code that needs the intrusive changes in glipper: newline.py. I don't know about the rest, but this plugin alters the history directly too. They'd all have to be changed, which can be quite a lot of work. The way I did it, all of them go through the idle queue of the main thread without changes. May not be the prettiest code, but it works, and it's a lot better than what was there originally.

On creating my own branch: I don't know Bazaar either. I'd have to learn it, which would take... about two hours after I wake up :) if necessary. I could probably use one anyway, since right now I'm not using any code versioning for these patches, which kind of defeats the purpose of Bazaar, and I found a slight glitch in the last patch which could cause trouble if the data came with the "\0" packed in (which was the thing I was trying to fix with the while True loop to begin with), so I'll post an updated patch just for that in a minute.