Mercurial > pidgin
comparison plugins/timestamp.c @ 5676:dae79aefac8d
[gaim-migrate @ 6094]
I've been meaning to do this for a LONG time. The conversation API now
follows the naming convention of the rest of the new APIs. I'll get some
g_return_*_if_fail() checks in there soon.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Mon, 02 Jun 2003 21:51:06 +0000 |
| parents | 2c4c975620f0 |
| children | 059d95c67cda |
comparison
equal
deleted
inserted
replaced
| 5675:17e345ffeddb | 5676:dae79aefac8d |
|---|---|
| 17 | 17 |
| 18 static GSList *timestamp_timeouts; | 18 static GSList *timestamp_timeouts; |
| 19 | 19 |
| 20 gboolean do_timestamp (gpointer data) | 20 gboolean do_timestamp (gpointer data) |
| 21 { | 21 { |
| 22 struct gaim_conversation *c = (struct gaim_conversation *)data; | 22 GaimConversation *c = (GaimConversation *)data; |
| 23 char *buf; | 23 char *buf; |
| 24 char mdate[6]; | 24 char mdate[6]; |
| 25 time_t tim = time(NULL); | 25 time_t tim = time(NULL); |
| 26 | 26 |
| 27 if (!g_list_find(gaim_get_conversations(), c)) | 27 if (!g_list_find(gaim_get_conversations(), c)) |
| 34 return TRUE; | 34 return TRUE; |
| 35 } | 35 } |
| 36 | 36 |
| 37 void timestamp_new_convo(char *name) | 37 void timestamp_new_convo(char *name) |
| 38 { | 38 { |
| 39 struct gaim_conversation *c = gaim_find_conversation(name); | 39 GaimConversation *c = gaim_find_conversation(name); |
| 40 do_timestamp(c); | 40 do_timestamp(c); |
| 41 | 41 |
| 42 timestamp_timeouts = g_slist_append(timestamp_timeouts, | 42 timestamp_timeouts = g_slist_append(timestamp_timeouts, |
| 43 GINT_TO_POINTER(g_timeout_add(timestamp, do_timestamp, c))); | 43 GINT_TO_POINTER(g_timeout_add(timestamp, do_timestamp, c))); |
| 44 | 44 |
| 99 | 99 |
| 100 static gboolean | 100 static gboolean |
| 101 plugin_load(GaimPlugin *plugin) | 101 plugin_load(GaimPlugin *plugin) |
| 102 { | 102 { |
| 103 GList *cnvs; | 103 GList *cnvs; |
| 104 struct gaim_conversation *c; | 104 GaimConversation *c; |
| 105 | 105 |
| 106 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { | 106 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { |
| 107 c = cnvs->data; | 107 c = cnvs->data; |
| 108 timestamp_new_convo(c->name); | 108 timestamp_new_convo(c->name); |
| 109 } | 109 } |
