From: Christian H. <ch...@us...> - 2003-01-30 21:25:34
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1:/tmp/cvs-serv730 Modified Files: aim.c conversation.c conversation.h Log Message: The last of gtk-related code is out of the conversation framework. There are now functions to set and retrieve the conversation window UI operations structures that will be used in all windows. Index: aim.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/aim.c,v retrieving revision 1.233 retrieving revision 1.234 diff -u -d -r1.233 -r1.234 --- aim.c 26 Jan 2003 20:43:24 -0000 1.233 +++ aim.c 30 Jan 2003 21:25:21 -0000 1.234 @@ -520,6 +520,8 @@ } } + gaim_set_win_ui_ops(gaim_get_gtk_window_ui_ops()); + setup_stock(); #ifndef _WIN32 Index: conversation.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.c,v retrieving revision 1.488 retrieving revision 1.489 diff -u -d -r1.488 -r1.489 --- conversation.c 30 Jan 2003 19:24:47 -0000 1.488 +++ conversation.c 30 Jan 2003 21:25:22 -0000 1.489 @@ -45,6 +45,8 @@ #define SEND_TYPED_TIMEOUT 5000 +static struct gaim_window_ui_ops *win_ui_ops = NULL; + static GList *conversations = NULL; static GList *ims = NULL; static GList *chats = NULL; @@ -436,8 +438,7 @@ win = g_malloc0(sizeof(struct gaim_window)); - /* CONV XXX */ - win->ui_ops = gaim_get_gtk_window_ui_ops(); + win->ui_ops = gaim_get_win_ui_ops(); if (win->ui_ops != NULL && win->ui_ops->new_window != NULL) win->ui_ops->new_window(win); @@ -1412,8 +1413,6 @@ ops->write_conv(conv, who, message, length, flags, mtime); - /* TODO: Do logging fun stuff. */ - win = gaim_conversation_get_window(conv); if (!(flags & WFLAG_NOLOG) && @@ -2258,4 +2257,16 @@ place_conv = fnc; place_conv_index = index; +} + +void +gaim_set_win_ui_ops(struct gaim_window_ui_ops *ops) +{ + win_ui_ops = ops; +} + +struct gaim_window_ui_ops * +gaim_get_win_ui_ops(void) +{ + return win_ui_ops; } Index: conversation.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/conversation.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- conversation.h 30 Jan 2003 18:45:49 -0000 1.5 +++ conversation.h 30 Jan 2003 21:25:24 -0000 1.6 @@ -1078,6 +1078,7 @@ /**************************************************************************/ /** @name Conversation Placement Functions */ /**************************************************************************/ +/*@{*/ /** * Adds a conversation placement function to the list of possible functions. @@ -1148,5 +1149,30 @@ * @param index The index of the function. */ void gaim_conv_placement_set_active(int index); + +/*@}*/ + +/**************************************************************************/ +/** @name UI Registration Functions */ +/**************************************************************************/ +/*@{*/ + +/** + * Sets the UI operations structure to be used in all gaim conversation + * windows. + * + * @param fnc The function. + */ +void gaim_set_win_ui_ops(struct gaim_window_ui_ops *ops); + +/** + * Returns the gaim window UI operations structure to be used in + * new windows. + * + * @return A filled-out gaim_window_ui_ops structure. + */ +struct gaim_window_ui_ops *gaim_get_win_ui_ops(void); + +/*@}*/ #endif /* _CONVERSATION_H_ */ |