diff --git a/apps/plugins/lib/printcell_helper.c b/apps/plugins/lib/printcell_helper.c index 51f806fd45..5c34a5d794 100644 --- a/apps/plugins/lib/printcell_helper.c +++ b/apps/plugins/lib/printcell_helper.c @@ -530,6 +530,12 @@ int printcell_set_columns(struct gui_synclist *gui_list, if (title == NULL) title = "$PRINTCELL NOT SETUP"; + uint16_t sidx[PRINTCELL_MAX_COLUMNS]; /* starting position of column in title string */ + int width, height, user_minwidth; + int i = 0; + size_t j = 0; + rb->memset(&printcell, 0, sizeof(struct printcell_info_t)); + if (pcs == NULL) /* DEFAULTS */ { #if LCD_DEPTH > 1 @@ -538,23 +544,20 @@ int printcell_set_columns(struct gui_synclist *gui_list, #else bool sep = (rb->global_settings->cursor_style == 0); #endif - pcs = &(struct printcell_settings){ .cell_separator = sep, - .title_delimeter = '$', - .text_delimeter = '$', - .hidecol_flags = 0}; + printcell.separator = sep; + printcell.titlesep = '$'; + printcell.colsep = '$'; + printcell.hidecol_flags = 0; + } + else + { + printcell.separator = pcs->cell_separator; + printcell.titlesep = pcs->title_delimeter; + printcell.colsep = pcs->text_delimeter; + printcell.hidecol_flags = pcs->hidecol_flags; } - - uint16_t sidx[PRINTCELL_MAX_COLUMNS]; /* starting position of column in title string */ - int width, height, user_minwidth; - int i = 0; - size_t j = 0; - rb->memset(&printcell, 0, sizeof(struct printcell_info_t)); - printcell.gui_list = gui_list; - printcell.separator = pcs->cell_separator; - printcell.titlesep = pcs->title_delimeter; - printcell.colsep = pcs->text_delimeter; - printcell.hidecol_flags = pcs->hidecol_flags; + int ch = printcell.titlesep; /* first column $ is optional */