# HG changeset patch # User Christian Hammond # Date 1043961924 0 # Node ID b30b0a02ada009d3bfdcccd1026d293198531786 # Parent a4a87d79c67c3fdbf89a6906956e9a6e977e8080 [gaim-migrate @ 4756] 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. committer: Tailor Script diff -r a4a87d79c67c -r b30b0a02ada0 src/aim.c --- a/src/aim.c Thu Jan 30 21:09:19 2003 +0000 +++ b/src/aim.c Thu Jan 30 21:25:24 2003 +0000 @@ -520,6 +520,8 @@ } } + gaim_set_win_ui_ops(gaim_get_gtk_window_ui_ops()); + setup_stock(); #ifndef _WIN32 diff -r a4a87d79c67c -r b30b0a02ada0 src/conversation.c --- a/src/conversation.c Thu Jan 30 21:09:19 2003 +0000 +++ b/src/conversation.c Thu Jan 30 21:25:24 2003 +0000 @@ -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) && @@ -2259,3 +2258,15 @@ 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; +} diff -r a4a87d79c67c -r b30b0a02ada0 src/conversation.h --- a/src/conversation.h Thu Jan 30 21:09:19 2003 +0000 +++ b/src/conversation.h Thu Jan 30 21:25:24 2003 +0000 @@ -1078,6 +1078,7 @@ /**************************************************************************/ /** @name Conversation Placement Functions */ /**************************************************************************/ +/*@{*/ /** * Adds a conversation placement function to the list of possible functions. @@ -1149,4 +1150,29 @@ */ 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_ */