Mercurial > pidgin.yaz
comparison src/dialogs.c @ 1897:97b1667e1255
[gaim-migrate @ 1907]
hola
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 25 May 2001 23:07:22 +0000 |
parents | 93f0629d4099 |
children | 7b3f1eb1ef7d |
comparison
equal
deleted
inserted
replaced
1896:e556ffa08cce | 1897:97b1667e1255 |
---|---|
3481 char *name; | 3481 char *name; |
3482 char *tmp; | 3482 char *tmp; |
3483 | 3483 |
3484 name = gtk_object_get_user_data(GTK_OBJECT(filesel)); | 3484 name = gtk_object_get_user_data(GTK_OBJECT(filesel)); |
3485 tmp = gaim_user_dir(); | 3485 tmp = gaim_user_dir(); |
3486 g_snprintf(filename, PATHSIZE, "%s/logs/%s.log", tmp, normalize(name)); | 3486 g_snprintf(filename, PATHSIZE, "%s/logs/%s%s", tmp, |
3487 name ? normalize(name) : "system", | |
3488 name ? ".log" : ""); | |
3487 g_free(tmp); | 3489 g_free(tmp); |
3488 | 3490 |
3489 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel)); | 3491 file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel)); |
3490 strncpy(path, file, PATHSIZE-1); | 3492 strncpy(path, file, PATHSIZE-1); |
3491 if (file_is_dir(path, filesel)) | 3493 if (file_is_dir(path, filesel)) |
3522 static void show_save_log(GtkWidget *w, gchar *name) | 3524 static void show_save_log(GtkWidget *w, gchar *name) |
3523 { | 3525 { |
3524 GtkWidget *filesel; | 3526 GtkWidget *filesel; |
3525 gchar buf[BUF_LEN]; | 3527 gchar buf[BUF_LEN]; |
3526 | 3528 |
3527 g_snprintf(buf, BUF_LEN - 1, "%s/%s.log", | 3529 g_snprintf(buf, BUF_LEN - 1, "%s/%s%s", getenv("HOME"), |
3528 getenv("HOME"), normalize(name)); | 3530 name ? normalize(name) : "system", |
3531 name ? ".log" : ""); | |
3529 | 3532 |
3530 filesel = gtk_file_selection_new(_("Gaim - Save Log File")); | 3533 filesel = gtk_file_selection_new(_("Gaim - Save Log File")); |
3531 dialogwindows = g_list_prepend(dialogwindows, filesel); | 3534 dialogwindows = g_list_prepend(dialogwindows, filesel); |
3532 gtk_signal_connect(GTK_OBJECT(filesel), "delete_event", | 3535 gtk_signal_connect(GTK_OBJECT(filesel), "delete_event", |
3533 GTK_SIGNAL_FUNC(destroy_dialog), filesel); | 3536 GTK_SIGNAL_FUNC(destroy_dialog), filesel); |
3554 gchar filename[256]; | 3557 gchar filename[256]; |
3555 GtkWidget *window; | 3558 GtkWidget *window; |
3556 char *tmp; | 3559 char *tmp; |
3557 | 3560 |
3558 tmp = gaim_user_dir(); | 3561 tmp = gaim_user_dir(); |
3559 g_snprintf(filename, 256, "%s/logs/%s.log", tmp, normalize(name)); | 3562 g_snprintf(filename, 256, "%s/logs/%s%s", tmp, |
3563 name ? normalize(name) : "system", | |
3564 name ? ".log" : ""); | |
3560 g_free(tmp); | 3565 g_free(tmp); |
3561 | 3566 |
3562 if ((remove(filename)) == -1) { | 3567 if ((remove(filename)) == -1) { |
3563 g_snprintf(buf, 256, _("Unable to remove file %s - %s"), | 3568 g_snprintf(buf, 256, _("Unable to remove file %s - %s"), |
3564 filename, strerror(errno)); | 3569 filename, strerror(errno)); |