Mercurial > pidgin.yaz
comparison console/gntconv.c @ 14715:04f03667702f
[gaim-migrate @ 17469]
Add a lastlog plugin for gaim-text.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Thu, 12 Oct 2006 05:29:08 +0000 |
parents | 37bb5e487347 |
children | ac0ce6064000 |
comparison
equal
deleted
inserted
replaced
14714:1d084d1ee6fa | 14715:04f03667702f |
---|---|
44 | 44 |
45 #define PREF_ROOT "/gaim/gnt/conversations" | 45 #define PREF_ROOT "/gaim/gnt/conversations" |
46 | 46 |
47 #include "config.h" | 47 #include "config.h" |
48 | 48 |
49 typedef struct _GGConv GGConv; | |
50 typedef struct _GGConvChat GGConvChat; | |
51 typedef struct _GGConvIm GGConvIm; | |
52 | |
53 struct _GGConv | |
54 { | |
55 GList *list; | |
56 GaimConversation *active_conv; | |
57 /*GaimConversation *conv;*/ | |
58 | |
59 GntWidget *window; /* the container */ | |
60 GntWidget *entry; /* entry */ | |
61 GntWidget *tv; /* text-view */ | |
62 | |
63 union | |
64 { | |
65 GGConvChat *chat; | |
66 GGConvIm *im; | |
67 } u; | |
68 }; | |
69 | |
70 struct _GGConvChat | |
71 { | |
72 GntWidget *userlist; /* the userlist */ | |
73 }; | |
74 | |
75 struct _GGConvIm | |
76 { | |
77 void *nothing_for_now; | |
78 }; | |
79 | |
80 static gboolean | 49 static gboolean |
81 entry_key_pressed(GntWidget *w, const char *key, GGConv *ggconv) | 50 entry_key_pressed(GntWidget *w, const char *key, GGConv *ggconv) |
82 { | 51 { |
83 if (key[0] == '\r' && key[1] == 0) | 52 if (key[0] == '\r' && key[1] == 0) |
84 { | 53 { |
360 return; | 329 return; |
361 } | 330 } |
362 | 331 |
363 pos = gnt_text_view_get_lines_below(GNT_TEXT_VIEW(ggconv->tv)); | 332 pos = gnt_text_view_get_lines_below(GNT_TEXT_VIEW(ggconv->tv)); |
364 | 333 |
365 gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); | 334 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), "\n", GNT_TEXT_FLAG_NORMAL); |
366 | 335 |
367 /* Unnecessary to print the timestamp for delayed message */ | 336 /* Unnecessary to print the timestamp for delayed message */ |
368 if (!(flags & GAIM_MESSAGE_DELAYED) && | 337 if (!(flags & GAIM_MESSAGE_DELAYED) && |
369 gaim_prefs_get_bool("/gaim/gnt/conversations/timestamps")) | 338 gaim_prefs_get_bool("/gaim/gnt/conversations/timestamps")) |
370 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), | 339 gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), |