/** * Create LDIF file selection dialog. * \param afs Address file selection data. */ static void exp_ldif_file_select_create( AddressFileSelection *afs ) { gchar *file = filesel_select_file_save(_("Select LDIF output file"), NULL); if (file == NULL) afs->cancelled = TRUE; else { afs->cancelled = FALSE; gtk_entry_set_text( GTK_ENTRY(expldif_dlg.entryLdif), file ); g_free(file); } }
/*! *\brief saves crash log to a file */ static void crash_save_crash_log(GtkButton *button, const gchar *text) { time_t timer; struct tm *lt; char buf[100]; struct tm buft; gchar *filename; timer = time(NULL); lt = localtime_r(&timer, &buft); strftime(buf, sizeof buf, "claws-crash-log-%Y-%m-%d-%H-%M-%S.txt", lt); if (NULL != (filename = filesel_select_file_save(_("Save crash information"), buf)) && *filename) str_write_to_file(text, filename); g_free(filename); }