Mercurial > pidgin
comparison src/log.c @ 5548:80e4ba770f97
[gaim-migrate @ 5949]
incremental progress
committer: Tailor Script <tailor@pidgin.im>
| author | Nathan Walp <nwalp@pidgin.im> |
|---|---|
| date | Thu, 29 May 2003 19:50:19 +0000 |
| parents | c72213437829 |
| children | 7b36d02031a2 |
comparison
equal
deleted
inserted
replaced
| 5547:90a67ea697f7 | 5548:80e4ba770f97 |
|---|---|
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 #include "gaim.h" | 14 #include "gaim.h" |
| 15 #include "core.h" | 15 #include "core.h" |
| 16 #include "multi.h" | 16 #include "multi.h" |
| 17 #include "prefs.h" | |
| 17 #include "prpl.h" | 18 #include "prpl.h" |
| 18 #include "notify.h" | 19 #include "notify.h" |
| 19 #include <string.h> | 20 #include <string.h> |
| 20 #include <sys/stat.h> | 21 #include <sys/stat.h> |
| 21 #include <unistd.h> | 22 #include <unistd.h> |
| 42 } | 43 } |
| 43 | 44 |
| 44 log_conversations = g_list_remove(log_conversations, a); | 45 log_conversations = g_list_remove(log_conversations, a); |
| 45 | 46 |
| 46 save_prefs(); | 47 save_prefs(); |
| 47 | |
| 48 if (cnv && !(im_options & OPT_IM_ONE_WINDOW)) | |
| 49 gaim_conversation_autoset_title(cnv); | |
| 50 } | 48 } |
| 51 | 49 |
| 52 struct log_conversation *find_log_info(const char *name) | 50 struct log_conversation *find_log_info(const char *name) |
| 53 { | 51 { |
| 54 char *pname = g_malloc(BUF_LEN); | 52 char *pname = g_malloc(BUF_LEN); |
| 86 gtkconv = GAIM_GTK_CONVERSATION(c); | 84 gtkconv = GAIM_GTK_CONVERSATION(c); |
| 87 | 85 |
| 88 if (gtkconv->toolbar.log) { | 86 if (gtkconv->toolbar.log) { |
| 89 if (gaim_conversation_get_type(c) == GAIM_CONV_CHAT) | 87 if (gaim_conversation_get_type(c) == GAIM_CONV_CHAT) |
| 90 gtk_widget_set_sensitive(GTK_WIDGET(gtkconv->toolbar.log), | 88 gtk_widget_set_sensitive(GTK_WIDGET(gtkconv->toolbar.log), |
| 91 ((logging_options & OPT_LOG_CHATS)) ? FALSE : TRUE); | 89 !gaim_prefs_get_bool("/gaim/gtk/logging/log_chats")); |
| 92 else | 90 else |
| 93 gtk_widget_set_sensitive(GTK_WIDGET(gtkconv->toolbar.log), | 91 gtk_widget_set_sensitive(GTK_WIDGET(gtkconv->toolbar.log), |
| 94 ((logging_options & OPT_LOG_CONVOS)) ? FALSE : TRUE); | 92 !gaim_prefs_get_bool("/gaim/gtk/logging/log_ims")); |
| 95 } | 93 } |
| 96 } | 94 } |
| 97 } | 95 } |
| 98 | 96 |
| 99 static void do_save_convo(GObject *obj, GtkWidget *wid) | 97 static void do_save_convo(GObject *obj, GtkWidget *wid) |
| 242 struct log_conversation *l; | 240 struct log_conversation *l; |
| 243 FILE *fd; | 241 FILE *fd; |
| 244 int flag = 0; | 242 int flag = 0; |
| 245 | 243 |
| 246 if (((is_chat == 2) && !(logging_options & OPT_LOG_INDIVIDUAL)) | 244 if (((is_chat == 2) && !(logging_options & OPT_LOG_INDIVIDUAL)) |
| 247 || ((is_chat == 1) && !(logging_options & OPT_LOG_CHATS)) | 245 || ((is_chat == 1) && !gaim_prefs_get_bool("/gaim/gtk/logging/log_chats")) |
| 248 || ((is_chat == 0) && !(logging_options & OPT_LOG_CONVOS))) { | 246 || ((is_chat == 0) && !gaim_prefs_get_bool("/gaim/gtk/logging/log_ims"))) { |
| 249 | 247 |
| 250 l = find_log_info(name); | 248 l = find_log_info(name); |
| 251 if (!l) | 249 if (!l) |
| 252 return NULL; | 250 return NULL; |
| 253 | 251 |
| 418 return; | 416 return; |
| 419 break; | 417 break; |
| 420 } | 418 } |
| 421 } | 419 } |
| 422 | 420 |
| 423 if (logging_options & OPT_LOG_STRIP_HTML) { | 421 if (gaim_prefs_get_bool("/gaim/gtk/logging/strip_html")) { |
| 424 fprintf(fd, "---- %s ----\n", text); | 422 fprintf(fd, "---- %s ----\n", text); |
| 425 } else { | 423 } else { |
| 426 if (logging_options & OPT_LOG_INDIVIDUAL) | 424 if (logging_options & OPT_LOG_INDIVIDUAL) |
| 427 fprintf(fd, "<HR>%s<BR><HR><BR>\n", html); | 425 fprintf(fd, "<HR>%s<BR><HR><BR>\n", html); |
| 428 else | 426 else |
