Skip to content

Commit

Permalink
'Attention' dialog boxes ought to show up differently from others. Th…
Browse files Browse the repository at this point in the history
…is is a start in that direction. (To do : Yes/No/Cancel, OK/Cancel, etc. boxes.)
  • Loading branch information
Bill-Gray committed Mar 4, 2024
1 parent bb8b100 commit cc2e819
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions findorb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ extern double maximum_jd, minimum_jd; /* orb_func.cpp */
#define COLOR_RESIDUAL_LEGEND 9
#define COLOR_MENU 10
#define COLOR_SCROLL_BAR 11
#define COLOR_DEFAULT_INQUIRY 12
#define COLOR_ATTENTION 13
/* #define COLOR_DEFAULT_INQUIRY 12 Defined in 'mpc_obs.h' */
/* #define COLOR_ATTENTION 13 Defined in 'mpc_obs.h' */
#define COLOR_MPC_CODES 14
#define COLOR_HINT_TEXT 18
/* colors 15, 16, 17, and 18 also used for MPC codes; see 'command.txt' */

#define SHOW_FILE_IS_EPHEM 1
#define SHOW_FILE_IS_CALENDAR 2
Expand Down Expand Up @@ -641,6 +641,16 @@ static int full_inquire( const char *prompt, char *buff, const int max_len,
int inquire( const char *prompt, char *buff, const int max_len,
const int color)
{
extern char *mpec_error_message;

assert( prompt);
if( !mpec_error_message && color == COLOR_ATTENTION)
{
const size_t len = strlen( prompt) + 1;

mpec_error_message = (char *)malloc( len);
strlcpy_err( mpec_error_message, prompt, len);
}
return( full_inquire( prompt, buff, max_len, color, -1, -1));
}

Expand Down

0 comments on commit cc2e819

Please sign in to comment.