Mercurial > pidgin
comparison src/conversation.c @ 4481:b30b0a02ada0
[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 <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 30 Jan 2003 21:25:24 +0000 |
parents | fa2d74e20a89 |
children | 3196d9044a45 |
comparison
equal
deleted
inserted
replaced
4480:a4a87d79c67c | 4481:b30b0a02ada0 |
---|---|
43 | 43 |
44 }; | 44 }; |
45 | 45 |
46 #define SEND_TYPED_TIMEOUT 5000 | 46 #define SEND_TYPED_TIMEOUT 5000 |
47 | 47 |
48 static struct gaim_window_ui_ops *win_ui_ops = NULL; | |
49 | |
48 static GList *conversations = NULL; | 50 static GList *conversations = NULL; |
49 static GList *ims = NULL; | 51 static GList *ims = NULL; |
50 static GList *chats = NULL; | 52 static GList *chats = NULL; |
51 static GList *windows = NULL; | 53 static GList *windows = NULL; |
52 static GList *conv_placement_fncs = NULL; | 54 static GList *conv_placement_fncs = NULL; |
434 { | 436 { |
435 struct gaim_window *win; | 437 struct gaim_window *win; |
436 | 438 |
437 win = g_malloc0(sizeof(struct gaim_window)); | 439 win = g_malloc0(sizeof(struct gaim_window)); |
438 | 440 |
439 /* CONV XXX */ | 441 win->ui_ops = gaim_get_win_ui_ops(); |
440 win->ui_ops = gaim_get_gtk_window_ui_ops(); | |
441 | 442 |
442 if (win->ui_ops != NULL && win->ui_ops->new_window != NULL) | 443 if (win->ui_ops != NULL && win->ui_ops->new_window != NULL) |
443 win->ui_ops->new_window(win); | 444 win->ui_ops->new_window(win); |
444 | 445 |
445 windows = g_list_append(windows, win); | 446 windows = g_list_append(windows, win); |
1410 } | 1411 } |
1411 } | 1412 } |
1412 | 1413 |
1413 ops->write_conv(conv, who, message, length, flags, mtime); | 1414 ops->write_conv(conv, who, message, length, flags, mtime); |
1414 | 1415 |
1415 /* TODO: Do logging fun stuff. */ | |
1416 | |
1417 win = gaim_conversation_get_window(conv); | 1416 win = gaim_conversation_get_window(conv); |
1418 | 1417 |
1419 if (!(flags & WFLAG_NOLOG) && | 1418 if (!(flags & WFLAG_NOLOG) && |
1420 ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT && | 1419 ((gaim_conversation_get_type(conv) == GAIM_CONV_CHAT && |
1421 (chat_options & OPT_CHAT_POPUP)) || | 1420 (chat_options & OPT_CHAT_POPUP)) || |
2257 return; | 2256 return; |
2258 | 2257 |
2259 place_conv = fnc; | 2258 place_conv = fnc; |
2260 place_conv_index = index; | 2259 place_conv_index = index; |
2261 } | 2260 } |
2261 | |
2262 void | |
2263 gaim_set_win_ui_ops(struct gaim_window_ui_ops *ops) | |
2264 { | |
2265 win_ui_ops = ops; | |
2266 } | |
2267 | |
2268 struct gaim_window_ui_ops * | |
2269 gaim_get_win_ui_ops(void) | |
2270 { | |
2271 return win_ui_ops; | |
2272 } |