Mercurial > pidgin
comparison plugins/timestamp.c @ 10390:de92a8da82c3
[gaim-migrate @ 11617]
I forgot the newline.
committer: Tailor Script <tailor@pidgin.im>
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Thu, 16 Dec 2004 07:22:54 +0000 |
| parents | c432b927b0b1 |
| children | 6a043ae92db6 |
comparison
equal
deleted
inserted
replaced
| 10389:c432b927b0b1 | 10390:de92a8da82c3 |
|---|---|
| 44 static gboolean do_timestamp (gpointer data) | 44 static gboolean do_timestamp (gpointer data) |
| 45 { | 45 { |
| 46 GaimConversation *c = (GaimConversation *)data; | 46 GaimConversation *c = (GaimConversation *)data; |
| 47 GaimGtkConversation *conv = GAIM_GTK_CONVERSATION(c); | 47 GaimGtkConversation *conv = GAIM_GTK_CONVERSATION(c); |
| 48 GtkTextIter iter; | 48 GtkTextIter iter; |
| 49 char mdate[6]; | 49 char mdate[7]; |
| 50 int is_conversation_active; | 50 int is_conversation_active; |
| 51 time_t tim = time(NULL); | 51 time_t tim = time(NULL); |
| 52 | 52 |
| 53 if (!g_list_find(gaim_get_conversations(), c)) | 53 if (!g_list_find(gaim_get_conversations(), c)) |
| 54 return FALSE; | 54 return FALSE; |
| 58 | 58 |
| 59 if (is_conversation_active){ | 59 if (is_conversation_active){ |
| 60 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(conv->imhtml)); | 60 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(conv->imhtml)); |
| 61 gtk_text_buffer_get_end_iter(buffer, &iter); | 61 gtk_text_buffer_get_end_iter(buffer, &iter); |
| 62 gaim_conversation_set_data(c, "timestamp-conv-active", GINT_TO_POINTER(FALSE)); | 62 gaim_conversation_set_data(c, "timestamp-conv-active", GINT_TO_POINTER(FALSE)); |
| 63 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim)); | 63 strftime(mdate, sizeof(mdate), "\n%H:%M", localtime(&tim)); |
| 64 gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, mdate, strlen(mdate), "TIMESTAMP", NULL); | 64 gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, mdate, strlen(mdate), "TIMESTAMP", NULL); |
| 65 } | 65 } |
| 66 else | 66 else |
| 67 gaim_conversation_set_data(c, "timestamp-enabled", GINT_TO_POINTER(FALSE)); | 67 gaim_conversation_set_data(c, "timestamp-enabled", GINT_TO_POINTER(FALSE)); |
| 68 | 68 |
