unsigned long screen_width, screen_height, entry_width, entry_height;
unsigned long keyboard_indicator_width, keyboard_indicator_height;
bool show_keyboard_indicators = false;
+ int x, y, prompt_len;
long dialog_bottom;
- int x, y;
assert (view != NULL);
dialog_bottom = view->dialog_area.y + view->dialog_area.height;
- if (prompt != NULL) {
+ if (prompt != NULL && prompt[0]) {
+ char buf[128];
+
+ /* Strip ':' at end of prompt since we show it below the text-entry */
+ prompt_len = strlen (prompt);
+ if (prompt[prompt_len - 1] == ':' && prompt_len < sizeof(buf)) {
+ strcpy (buf, prompt);
+ buf[prompt_len - 1] = 0;
+ prompt = buf;
+ }
+
ply_label_set_text (view->label, prompt);
/* We center the prompt in the middle and use 80% of the horizontal space */