Mercurial > pidgin
comparison src/server.c @ 11709:cae2fb7e8594
[gaim-migrate @ 14000]
This is a patch from Casey Harkins to significantly overhaul the docklet plugin. I'm pretty happy about this because it enables us to remove a win32 GTK+ dependency on the core and all the prpls.
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Sat, 22 Oct 2005 01:18:08 +0000 |
| parents | bcc49c25ef90 |
| children | 9d6e498fe402 |
comparison
equal
deleted
inserted
replaced
| 11708:69602de55fe9 | 11709:cae2fb7e8594 |
|---|---|
| 33 #include "server.h" | 33 #include "server.h" |
| 34 #include "status.h" | 34 #include "status.h" |
| 35 #include "util.h" | 35 #include "util.h" |
| 36 | 36 |
| 37 /* XXX UI Stuff */ | 37 /* XXX UI Stuff */ |
| 38 #include "gtkdialogs.h" | |
| 39 #include "gaim.h" | 38 #include "gaim.h" |
| 40 #include "gtkimhtml.h" | |
| 41 #include "gtkutils.h" | 39 #include "gtkutils.h" |
| 42 | 40 |
| 43 #define SECS_BEFORE_RESENDING_AUTORESPONSE 600 | 41 #define SECS_BEFORE_RESENDING_AUTORESPONSE 600 |
| 44 #define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married" | 42 #define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married" |
| 45 | 43 |
| 746 * exist, create and update it (if it does exist it was updated | 744 * exist, create and update it (if it does exist it was updated |
| 747 * earlier), then play a sound indicating we've received it and | 745 * earlier), then play a sound indicating we've received it and |
| 748 * then display it. Easy. | 746 * then display it. Easy. |
| 749 */ | 747 */ |
| 750 | 748 |
| 751 /* XXX UGLY HACK OF THE YEAR | 749 if (cnv == NULL) |
| 752 * Robot101 will fix this after his exams. honest. | 750 cnv = gaim_conversation_new(GAIM_CONV_TYPE_IM, gc->account, name); |
| 753 * I guess he didn't specify WHICH exams, exactly... | 751 |
| 754 */ | 752 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); |
| 755 /* XXX CORE/UI */ | |
| 756 #if 0 | |
| 757 if (docklet_count && | |
| 758 gaim_prefs_get_bool("/plugins/gtk/docklet/queue_messages") && | |
| 759 !gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account)) { | |
| 760 /* | |
| 761 * We're gonna queue it up and wait for the user to ask for | |
| 762 * it... probably by clicking the docklet or windows tray icon. | |
| 763 */ | |
| 764 struct queued_message *qm; | |
| 765 qm = g_new0(struct queued_message, 1); | |
| 766 g_snprintf(qm->name, sizeof(qm->name), "%s", name); | |
| 767 qm->message = g_strdup(message); | |
| 768 qm->account = gc->account; | |
| 769 qm->tm = mtime; | |
| 770 qm->flags = msgflags; | |
| 771 unread_message_queue = g_slist_append(unread_message_queue, qm); | |
| 772 } | |
| 773 else { | |
| 774 #endif | |
| 775 if (cnv == NULL) | |
| 776 cnv = gaim_conversation_new(GAIM_CONV_TYPE_IM, gc->account, name); | |
| 777 | |
| 778 gaim_conv_im_write(GAIM_CONV_IM(cnv), NULL, message, msgflags, mtime); | |
| 779 #if 0 | |
| 780 } | |
| 781 #endif | |
| 782 } | 753 } |
| 783 | 754 |
| 784 g_free(name); | 755 g_free(name); |
| 785 g_free(message); | 756 g_free(message); |
| 786 } | 757 } |
| 787 | 758 |
| 788 void serv_got_typing(GaimConnection *gc, const char *name, int timeout, | 759 void serv_got_typing(GaimConnection *gc, const char *name, int timeout, |
| 789 GaimTypingState state) { | 760 GaimTypingState state) { |
| 790 GaimConversation *conv; | 761 GaimConversation *conv; |
| 791 GaimConvIm *im; | 762 GaimConvIm *im = NULL; |
| 792 | 763 |
| 793 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account); | 764 conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, gc->account); |
| 794 if (conv != NULL) { | 765 if (conv != NULL) { |
| 795 im = GAIM_CONV_IM(conv); | 766 im = GAIM_CONV_IM(conv); |
| 796 | 767 |
