io_load_todo() updated to use todo_set_nb()

This commit is contained in:
Frederic Culot 2007-08-15 15:36:27 +00:00
parent 8c8f3a56ff
commit 4307247a07
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $calcurse: io.c,v 1.20 2007/08/04 14:34:03 culot Exp $ */ /* $calcurse: io.c,v 1.21 2007/08/15 15:36:27 culot Exp $ */
/* /*
* Calcurse - text-based organizer * Calcurse - text-based organizer
@ -451,7 +451,7 @@ io_save_cal(conf_t *conf)
fprintf(data_file, fprintf(data_file,
"\n# This is the layout of the calendar :\n"); "\n# This is the layout of the calendar :\n");
fprintf(data_file, "layout=\n"); fprintf(data_file, "layout=\n");
fprintf(data_file, "%d\n", conf->layout); fprintf(data_file, "%d\n", wins_layout());
pthread_mutex_lock(&nbar->mutex); pthread_mutex_lock(&nbar->mutex);
fprintf(data_file, fprintf(data_file,
@ -671,7 +671,7 @@ io_load_app(void)
} }
/* Load the todo data */ /* Load the todo data */
int void
io_load_todo(void) io_load_todo(void)
{ {
FILE *data_file; FILE *data_file;
@ -707,7 +707,7 @@ io_load_todo(void)
++nb_tod; ++nb_tod;
} }
fclose(data_file); fclose(data_file);
return nb_tod; todo_set_nb(nb_tod);
} }
/* Checks if data files exist. If not, create them */ /* Checks if data files exist. If not, create them */

View File

@ -1,4 +1,4 @@
/* $calcurse: io.h,v 1.7 2007/07/28 13:11:42 culot Exp $ */ /* $calcurse: io.h,v 1.8 2007/08/15 15:36:27 culot Exp $ */
/* /*
* Calcurse - text-based organizer * Calcurse - text-based organizer
@ -39,7 +39,7 @@ void io_init(char *);
void io_extract_data(char *, const char *, int); void io_extract_data(char *, const char *, int);
void io_save_cal(conf_t *); void io_save_cal(conf_t *);
void io_load_app(void); void io_load_app(void);
int io_load_todo(void); void io_load_todo(void);
int io_check_data_files(void); int io_check_data_files(void);
void io_startup_screen(bool, int); void io_startup_screen(bool, int);
void io_export_data(export_mode_t, conf_t *); void io_export_data(export_mode_t, conf_t *);