[OTR-dev] Core/UI Split of gaim-otr-1.0.3

Evan Schoenberg evan.s at dreskin.net
Sat Jan 22 23:46:41 EST 2005


Attached is the patch, against the CVS you attached previously, for the 
changes I have made thus far.  I can't compile the GTK portion yet 
(still haven't figured out how to resolve those make errors I was 
getting), but by sight it should be fine.. let me know if you run into 
any compile errors and I'll take care of them.

Most of what this patch does is move things around; it shifts code into 
ui.c and dialogs.c, simplifying corresponding functions in the gtk UI 
modules and therefore reducing redundant code when implementing a 
second UI.  Some things shifted into the gtk UI modules.. for example, 
the start/stop "Please wait" dialog functions no longer tell the UI 
what to do display but instead just inform it that private key 
generation has started (and stopped), leaving it up to the UI to 
present that information as it pleases.  The "Please Wait" and "Done" 
code therefore moved into the gtk modules.

I changed some
if (blah == nil) return;
lines to
g_return_if_fail(blah != nil);
to increase readability.

This patch also does some #include shifting, allowing less specificity 
in the order in which headers must be included by having them include 
the files upon which they depend.

It adds
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
to allow config.h files to be used as needed... This shouldn't be 
necessary with the makefile from the command line but makes other build 
environments easier to deal with.

Speaking of the makefile, the patch adds -DUSE_GTK and -DGAIM_PLUGINS 
to the CFLAGS and moves them out of otr-plugin.c

I think that's it.  I tried to maintain the same style, indenting, etc. 
as is used in the rest of the code; any violations are accidental.  Let 
me know if there are any problem areas or whatnot. :)

Adium can now print pretty log messages from OTR UI callbacks as 
conversations are opened and closed. Progress!

-Evan

  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gaim-otr-1.0.3.20050121526-core-ui-split.patch
Type: application/octet-stream
Size: 22918 bytes
Desc: not available
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20050122/bb0f483e/attachment.obj>
-------------- next part --------------



On Jan 21, 2005, at 4:21 PM, Ian Goldberg wrote:
>
> Feel free to do that along with whatever else you need to do to get it
> to work nicely for you, and post the patches when you're done.


More information about the OTR-dev mailing list