From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-626948-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 124D71381F3
	for <garchives@archives.gentoo.org>; Tue, 10 Sep 2013 06:36:43 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id B0FD1E09C2;
	Tue, 10 Sep 2013 06:36:39 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 21C62E09F6
	for <gentoo-commits@lists.gentoo.org>; Tue, 10 Sep 2013 06:36:39 +0000 (UTC)
Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163])
	(using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 3036133EBF9
	for <gentoo-commits@lists.gentoo.org>; Tue, 10 Sep 2013 06:36:38 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by hornbill.gentoo.org (Postfix) with ESMTP id 0623BE5464
	for <gentoo-commits@lists.gentoo.org>; Tue, 10 Sep 2013 06:36:35 +0000 (UTC)
From: "Sven Eden" <sven.eden@gmx.de>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" <sven.eden@gmx.de>
Message-ID: <1378790168.456a9d34fff548856cc1876253ca66db9abd0898.yamakuzure@gentoo>
Subject: [gentoo-commits] proj/ufed:master commit in: /
X-VCS-Repository: proj/ufed
X-VCS-Files: ufed-curses-checklist.c ufed-curses.c
X-VCS-Directories: /
X-VCS-Committer: yamakuzure
X-VCS-Committer-Name: Sven Eden
X-VCS-Revision: 456a9d34fff548856cc1876253ca66db9abd0898
X-VCS-Branch: master
Date: Tue, 10 Sep 2013 06:36:35 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 30921c45-e993-404c-9d5c-ef6891627337
X-Archives-Hash: bbead695285ca4885458b8e9644892e3

commit:     456a9d34fff548856cc1876253ca66db9abd0898
Author:     Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Tue Sep 10 05:16:08 2013 +0000
Commit:     Sven Eden <sven.eden <AT> gmx <DOT> de>
CommitDate: Tue Sep 10 05:16:08 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=456a9d34

Made the subtitle more descriptive presenting a possible read-only mode

---
 ufed-curses-checklist.c | 6 ++++--
 ufed-curses.c           | 6 +++---
 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);