summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ufed-curses-checklist.c6
-rw-r--r--ufed-curses.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/ufed-curses-checklist.c b/ufed-curses-checklist.c
index 4a12968..1586263 100644
--- a/ufed-curses-checklist.c
+++ b/ufed-curses-checklist.c
@@ -613,7 +613,9 @@ static int callback(sFlag** curr, int key)
int main(void)
{
- int result;
+ int result = EXIT_SUCCESS;
+ const char subtitle_ro[] = "USE flags can be browsed, but changes will NOT be saved!";
+ const char subtitle_rw[] = "Select desired USE flags from the list below:";
read_flags();
fayt = (char*) calloc(minwidth, sizeof(*fayt));
@@ -625,7 +627,7 @@ int main(void)
initcurses();
- result = maineventloop("Select desired USE flags from the list below:",
+ result = maineventloop(ro_mode ? subtitle_ro : subtitle_rw,
&callback, &drawflag, flags, keys, true);
cursesdone();
diff --git a/ufed-curses.c b/ufed-curses.c
index 6870e66..1c1970b 100644
--- a/ufed-curses.c
+++ b/ufed-curses.c
@@ -341,8 +341,8 @@ void drawTop(bool withSep)
if (ro_mode) {
wattrset(w, COLOR_PAIR(4) | A_BOLD | A_REVERSE);
- sprintf(buf, "%-*.*s", wWidth(Top), wWidth(Top),
- "(RO) Gentoo USE flags editor " PACKAGE_VERSION " (RO)");
+ sprintf(buf, " READ ONLY %-*.*s READ ONLY ", wWidth(Top) - 22, wWidth(Top) - 22,
+ "Gentoo USE flags editor " PACKAGE_VERSION);
} else {
wattrset(w, COLOR_PAIR(1) | A_BOLD);
sprintf(buf, "%-*.*s", wWidth(Top), wWidth(Top), "Gentoo USE flags editor " PACKAGE_VERSION);
@@ -360,7 +360,7 @@ void drawTop(bool withSep)
waddch(w, ACS_VLINE);
if (ro_mode) {
wattrset(w, COLOR_PAIR(4) | A_REVERSE);
- sprintf(buf, " READ-ONLY MODE! %-*.*s READ-ONLY MODE! ", wWidth(Top)-36, wWidth(Top)-36, subtitle);
+ sprintf(buf, " READ ONLY %-*.*s READ ONLY ", wWidth(Top)-24, wWidth(Top)-24, subtitle);
} else {
wattrset(w, COLOR_PAIR(3));
sprintf(buf, " %-*.*s ", wWidth(Top)-4, wWidth(Top)-4, subtitle);