src/gtkdebug.c

changeset 13033
c98a5209f3b2
parent 12816
5f93e09fa9a6
child 13105
8f9c66e4af87
equal deleted inserted replaced
13032:a9c60f7d1aae 13033:c98a5209f3b2
210 save_writefile_cb(void *user_data, const char *filename) 210 save_writefile_cb(void *user_data, const char *filename)
211 { 211 {
212 DebugWindow *win = (DebugWindow *)user_data; 212 DebugWindow *win = (DebugWindow *)user_data;
213 FILE *fp; 213 FILE *fp;
214 char *tmp; 214 char *tmp;
215 time_t now = time(NULL);
216 char date[64];
215 217
216 if ((fp = g_fopen(filename, "w+")) == NULL) { 218 if ((fp = g_fopen(filename, "w+")) == NULL) {
217 gaim_notify_error(win, NULL, _("Unable to open file."), NULL); 219 gaim_notify_error(win, NULL, _("Unable to open file."), NULL);
218 return; 220 return;
219 } 221 }
220 222
221 tmp = gtk_imhtml_get_text(GTK_IMHTML(win->text), NULL, NULL); 223 tmp = gtk_imhtml_get_text(GTK_IMHTML(win->text), NULL, NULL);
222 fprintf(fp, "Gaim Debug log : %s\n", gaim_date_full()); 224 strftime(date, sizeof(date), "%c", localtime(&now));
225 fprintf(fp, "Gaim Debug Log : %s\n", date);
223 fprintf(fp, "%s", tmp); 226 fprintf(fp, "%s", tmp);
224 g_free(tmp); 227 g_free(tmp);
225 228
226 fclose(fp); 229 fclose(fp);
227 } 230 }

mercurial