From 80f6938b34b03d1ff832cc013d24db3e1cd18116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 8 May 2008 23:07:52 +0000 Subject: [PATCH] - MakeMenu() now adds a separator for empty strings. - add pref names for ANSI colors, for later... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25387 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/AppearPrefView.cpp | 15 +++++++++++++++ src/apps/terminal/MenuUtil.cpp | 5 ++++- src/apps/terminal/TermConst.h | 9 +++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/apps/terminal/AppearPrefView.cpp b/src/apps/terminal/AppearPrefView.cpp index ea6c661ef0..be1dfa8919 100644 --- a/src/apps/terminal/AppearPrefView.cpp +++ b/src/apps/terminal/AppearPrefView.cpp @@ -33,6 +33,21 @@ AppearancePrefView::AppearancePrefView(BRect frame, const char *name, PREF_CURSOR_BACK_COLOR, PREF_SELECT_FORE_COLOR, PREF_SELECT_BACK_COLOR, +#if 0 + "", + PREF_IM_FORE_COLOR, + PREF_IM_BACK_COLOR, + PREF_IM_SELECT_COLOR, + "", + PREF_ANSI_BLACK_COLOR, + PREF_ANSI_RED_COLOR, + PREF_ANSI_GREEN_COLOR, + PREF_ANSI_YELLOW_COLOR, + PREF_ANSI_BLUE_COLOR, + PREF_ANSI_MAGENTA_COLOR, + PREF_ANSI_CYAN_COLOR, + PREF_ANSI_WHITE_COLOR, +#endif NULL }; diff --git a/src/apps/terminal/MenuUtil.cpp b/src/apps/terminal/MenuUtil.cpp index 713ddc831d..6288a5531d 100644 --- a/src/apps/terminal/MenuUtil.cpp +++ b/src/apps/terminal/MenuUtil.cpp @@ -28,7 +28,10 @@ MakeMenu(ulong msg, const char **items, const char *defaultItemName) int32 i = 0; while (*items) { - menu->AddItem(new BMenuItem(*items, new BMessage(msg))); + if (!strcmp(*items, "")) + menu->AddSeparatorItem(); + else + menu->AddItem(new BMenuItem(*items, new BMessage(msg))); if (!strcmp(*items, defaultItemName)) menu->ItemAt(i)->SetMarked(true); diff --git a/src/apps/terminal/TermConst.h b/src/apps/terminal/TermConst.h index c45d92f1c0..a6e97d91f4 100644 --- a/src/apps/terminal/TermConst.h +++ b/src/apps/terminal/TermConst.h @@ -99,6 +99,15 @@ const char* const PREF_IM_FORE_COLOR = "IM Foreground Color"; const char* const PREF_IM_BACK_COLOR = "IM Background Color"; const char* const PREF_IM_SELECT_COLOR = "IM Selection Color"; +const char* const PREF_ANSI_BLACK_COLOR = "ANSI Black Color"; +const char* const PREF_ANSI_RED_COLOR = "ANSI Red Color"; +const char* const PREF_ANSI_GREEN_COLOR = "ANSI Green Color"; +const char* const PREF_ANSI_YELLOW_COLOR = "ANSI Yellow Color"; +const char* const PREF_ANSI_BLUE_COLOR = "ANSI Blue Color"; +const char* const PREF_ANSI_MAGENTA_COLOR = "ANSI Magenta Color"; +const char* const PREF_ANSI_CYAN_COLOR = "ANSI Cyan Color"; +const char* const PREF_ANSI_WHITE_COLOR = "ANSI White Color"; + const char* const PREF_HISTORY_SIZE = "History Size"; const char* const PREF_CURSOR_BLINKING = "Cursor Blinking rate";