static void make_backup(void){ RETURN_IF_DATA_IS_INACCESSIBLE_SAFE2(); if (Undo_num_undos() == 0) return; if (dc.filename==NULL) return; if (g_undo_generation_for_last_backup == g_curr_undo_generation) return; // Set this immediately so we don't start several BackupTimers. g_undo_generation_for_last_backup = g_curr_undo_generation; root->song->tracker_windows->message = "Please wait. Saving backup"; GL_create(root->song->tracker_windows); wchar_t *backup_filename = get_backup_filename(); Save_Backup(backup_filename, root); root->song->tracker_windows->message = NULL; GL_create(root->song->tracker_windows); //printf(" BACKUP finished\n"); }
static void make_backup(void){ if (Undo_num_undos() == 0) return; if (dc.filename==NULL) return; if (!editor_has_keyboard_focus()) // If showing popup menu, editing text widgets, etc. we don't want to disturb the user. return; if (g_undo_generation_for_last_backup == g_curr_undo_generation) return; // Set this immediately so we don't start several BackupTimers. g_undo_generation_for_last_backup = g_curr_undo_generation; root->song->tracker_windows->message = "Please wait. Saving backup"; GL_create(root->song->tracker_windows, root->song->tracker_windows->wblock); wchar_t *backup_filename = get_backup_filename(); Save_Backup(backup_filename, root); root->song->tracker_windows->message = NULL; GL_create(root->song->tracker_windows, root->song->tracker_windows->wblock); //printf(" BACKUP finished\n"); }