Commit 32b2ee5c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kconfig-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kconfig updates from Masahiro Yamada:

 - remove '---help---' keyword support

 - fix mouse events for 'menuconfig' symbols in search view of qconf

 - code cleanups of qconf

* tag 'kconfig-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (24 commits)
  kconfig: qconf: move setOptionMode() to ConfigList from ConfigView
  kconfig: qconf: do not limit the pop-up menu to the first row
  kconfig: qconf: refactor icon setups
  kconfig: qconf: remove unused voidPix, menuInvPix
  kconfig: qconf: remove ConfigItem::text/setText
  kconfig: qconf: remove ConfigList::addColumn/removeColumn
  kconfig: qconf: remove ConfigItem::pixmap/setPixmap
  kconfig: qconf: drop more localization code
  kconfig: qconf: remove 'parent' from ConfigList::updateMenuList()
  kconfig: qconf: remove unused argument from ConfigView::updateList()
  kconfig: qconf: remove unused argument from ConfigList::updateList()
  kconfig: qconf: omit parent to QHBoxLayout()
  kconfig: qconf: remove name from ConfigSearchWindow constructor
  kconfig: qconf: remove unused ConfigList::listView()
  kconfig: qconf: overload addToolBar() to create and insert toolbar
  kconfig: qconf: remove toolBar from ConfigMainWindow members
  kconfig: qconf: use 'menu' variable for (QMenu *)
  kconfig: qconf: do not use 'menu' variable for (QMenuBar *)
  kconfig: qconf: remove ->addSeparator() to menuBar
  kconfig: add 'static' to some file-local data
  ...
parents a1d21081 d4bbe8a1
...@@ -34,7 +34,7 @@ REGEX_SOURCE_SYMBOL = re.compile(SOURCE_SYMBOL) ...@@ -34,7 +34,7 @@ REGEX_SOURCE_SYMBOL = re.compile(SOURCE_SYMBOL)
REGEX_KCONFIG_DEF = re.compile(DEF) REGEX_KCONFIG_DEF = re.compile(DEF)
REGEX_KCONFIG_EXPR = re.compile(EXPR) REGEX_KCONFIG_EXPR = re.compile(EXPR)
REGEX_KCONFIG_STMT = re.compile(STMT) REGEX_KCONFIG_STMT = re.compile(STMT)
REGEX_KCONFIG_HELP = re.compile(r"^\s+(help|---help---)\s*$") REGEX_KCONFIG_HELP = re.compile(r"^\s+help\s*$")
REGEX_FILTER_SYMBOLS = re.compile(r"[A-Za-z0-9]$") REGEX_FILTER_SYMBOLS = re.compile(r"[A-Za-z0-9]$")
REGEX_NUMERIC = re.compile(r"0[xX][0-9a-fA-F]+|[0-9]+") REGEX_NUMERIC = re.compile(r"0[xX][0-9a-fA-F]+|[0-9]+")
REGEX_QUOTES = re.compile("(\"(.*?)\")") REGEX_QUOTES = re.compile("(\"(.*?)\")")
......
...@@ -3045,11 +3045,7 @@ sub process { ...@@ -3045,11 +3045,7 @@ sub process {
if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) { if ($lines[$ln - 1] =~ /^\+\s*(?:bool|tristate|prompt)\s*["']/) {
$is_start = 1; $is_start = 1;
} elsif ($lines[$ln - 1] =~ /^\+\s*(?:help|---help---)\s*$/) { } elsif ($lines[$ln - 1] =~ /^\+\s*(?:---)?help(?:---)?$/) {
if ($lines[$ln - 1] =~ "---help---") {
WARN("CONFIG_DESCRIPTION",
"prefer 'help' over '---help---' for new help texts\n" . $herecurr);
}
$length = -1; $length = -1;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "images.h" #include "images.h"
const char *xpm_load[] = { const char * const xpm_load[] = {
"22 22 5 1", "22 22 5 1",
". c None", ". c None",
"# c #000000", "# c #000000",
...@@ -35,7 +35,7 @@ const char *xpm_load[] = { ...@@ -35,7 +35,7 @@ const char *xpm_load[] = {
"###############.......", "###############.......",
"......................"}; "......................"};
const char *xpm_save[] = { const char * const xpm_save[] = {
"22 22 5 1", "22 22 5 1",
". c None", ". c None",
"# c #000000", "# c #000000",
...@@ -65,7 +65,7 @@ const char *xpm_save[] = { ...@@ -65,7 +65,7 @@ const char *xpm_save[] = {
"..##################..", "..##################..",
"......................"}; "......................"};
const char *xpm_back[] = { const char * const xpm_back[] = {
"22 22 3 1", "22 22 3 1",
". c None", ". c None",
"# c #000083", "# c #000083",
...@@ -93,7 +93,7 @@ const char *xpm_back[] = { ...@@ -93,7 +93,7 @@ const char *xpm_back[] = {
"......................", "......................",
"......................"}; "......................"};
const char *xpm_tree_view[] = { const char * const xpm_tree_view[] = {
"22 22 2 1", "22 22 2 1",
". c None", ". c None",
"# c #000000", "# c #000000",
...@@ -120,7 +120,7 @@ const char *xpm_tree_view[] = { ...@@ -120,7 +120,7 @@ const char *xpm_tree_view[] = {
"......................", "......................",
"......................"}; "......................"};
const char *xpm_single_view[] = { const char * const xpm_single_view[] = {
"22 22 2 1", "22 22 2 1",
". c None", ". c None",
"# c #000000", "# c #000000",
...@@ -147,7 +147,7 @@ const char *xpm_single_view[] = { ...@@ -147,7 +147,7 @@ const char *xpm_single_view[] = {
"......................", "......................",
"......................"}; "......................"};
const char *xpm_split_view[] = { const char * const xpm_split_view[] = {
"22 22 2 1", "22 22 2 1",
". c None", ". c None",
"# c #000000", "# c #000000",
...@@ -174,7 +174,7 @@ const char *xpm_split_view[] = { ...@@ -174,7 +174,7 @@ const char *xpm_split_view[] = {
"......................", "......................",
"......................"}; "......................"};
const char *xpm_symbol_no[] = { const char * const xpm_symbol_no[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -191,7 +191,7 @@ const char *xpm_symbol_no[] = { ...@@ -191,7 +191,7 @@ const char *xpm_symbol_no[] = {
" .......... ", " .......... ",
" "}; " "};
const char *xpm_symbol_mod[] = { const char * const xpm_symbol_mod[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -208,7 +208,7 @@ const char *xpm_symbol_mod[] = { ...@@ -208,7 +208,7 @@ const char *xpm_symbol_mod[] = {
" .......... ", " .......... ",
" "}; " "};
const char *xpm_symbol_yes[] = { const char * const xpm_symbol_yes[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -225,7 +225,7 @@ const char *xpm_symbol_yes[] = { ...@@ -225,7 +225,7 @@ const char *xpm_symbol_yes[] = {
" .......... ", " .......... ",
" "}; " "};
const char *xpm_choice_no[] = { const char * const xpm_choice_no[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -242,7 +242,7 @@ const char *xpm_choice_no[] = { ...@@ -242,7 +242,7 @@ const char *xpm_choice_no[] = {
" .... ", " .... ",
" "}; " "};
const char *xpm_choice_yes[] = { const char * const xpm_choice_yes[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -259,7 +259,7 @@ const char *xpm_choice_yes[] = { ...@@ -259,7 +259,7 @@ const char *xpm_choice_yes[] = {
" .... ", " .... ",
" "}; " "};
const char *xpm_menu[] = { const char * const xpm_menu[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -276,7 +276,7 @@ const char *xpm_menu[] = { ...@@ -276,7 +276,7 @@ const char *xpm_menu[] = {
" .......... ", " .......... ",
" "}; " "};
const char *xpm_menu_inv[] = { const char * const xpm_menu_inv[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -293,7 +293,7 @@ const char *xpm_menu_inv[] = { ...@@ -293,7 +293,7 @@ const char *xpm_menu_inv[] = {
" .......... ", " .......... ",
" "}; " "};
const char *xpm_menuback[] = { const char * const xpm_menuback[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
...@@ -310,7 +310,7 @@ const char *xpm_menuback[] = { ...@@ -310,7 +310,7 @@ const char *xpm_menuback[] = {
" .......... ", " .......... ",
" "}; " "};
const char *xpm_void[] = { const char * const xpm_void[] = {
"12 12 2 1", "12 12 2 1",
" c white", " c white",
". c black", ". c black",
......
...@@ -10,21 +10,21 @@ ...@@ -10,21 +10,21 @@
extern "C" { extern "C" {
#endif #endif
extern const char *xpm_load[]; extern const char * const xpm_load[];
extern const char *xpm_save[]; extern const char * const xpm_save[];
extern const char *xpm_back[]; extern const char * const xpm_back[];
extern const char *xpm_tree_view[]; extern const char * const xpm_tree_view[];
extern const char *xpm_single_view[]; extern const char * const xpm_single_view[];
extern const char *xpm_split_view[]; extern const char * const xpm_split_view[];
extern const char *xpm_symbol_no[]; extern const char * const xpm_symbol_no[];
extern const char *xpm_symbol_mod[]; extern const char * const xpm_symbol_mod[];
extern const char *xpm_symbol_yes[]; extern const char * const xpm_symbol_yes[];
extern const char *xpm_choice_no[]; extern const char * const xpm_choice_no[];
extern const char *xpm_choice_yes[]; extern const char * const xpm_choice_yes[];
extern const char *xpm_menu[]; extern const char * const xpm_menu[];
extern const char *xpm_menu_inv[]; extern const char * const xpm_menu_inv[];
extern const char *xpm_menuback[]; extern const char * const xpm_menuback[];
extern const char *xpm_void[]; extern const char * const xpm_void[];
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -36,7 +36,7 @@ struct buffer { ...@@ -36,7 +36,7 @@ struct buffer {
YY_BUFFER_STATE state; YY_BUFFER_STATE state;
}; };
struct buffer *current_buf; static struct buffer *current_buf;
static int last_ts, first_ts; static int last_ts, first_ts;
...@@ -105,7 +105,7 @@ n [A-Za-z0-9_-] ...@@ -105,7 +105,7 @@ n [A-Za-z0-9_-]
"endchoice" return T_ENDCHOICE; "endchoice" return T_ENDCHOICE;
"endif" return T_ENDIF; "endif" return T_ENDIF;
"endmenu" return T_ENDMENU; "endmenu" return T_ENDMENU;
"help"|"---help---" return T_HELP; "help" return T_HELP;
"hex" return T_HEX; "hex" return T_HEX;
"if" return T_IF; "if" return T_IF;
"imply" return T_IMPLY; "imply" return T_IMPLY;
......
...@@ -31,11 +31,6 @@ static ConfigSettings *configSettings; ...@@ -31,11 +31,6 @@ static ConfigSettings *configSettings;
QAction *ConfigMainWindow::saveAction; QAction *ConfigMainWindow::saveAction;
static inline QString qgettext(const char* str)
{
return QString::fromLocal8Bit(str);
}
ConfigSettings::ConfigSettings() ConfigSettings::ConfigSettings()
: QSettings("kernel.org", "qconf") : QSettings("kernel.org", "qconf")
{ {
...@@ -79,6 +74,13 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value) ...@@ -79,6 +74,13 @@ bool ConfigSettings::writeSizes(const QString& key, const QList<int>& value)
return true; return true;
} }
QIcon ConfigItem::symbolYesIcon;
QIcon ConfigItem::symbolModIcon;
QIcon ConfigItem::symbolNoIcon;
QIcon ConfigItem::choiceYesIcon;
QIcon ConfigItem::choiceNoIcon;
QIcon ConfigItem::menuIcon;
QIcon ConfigItem::menubackIcon;
/* /*
* set the new data * set the new data
...@@ -102,14 +104,14 @@ void ConfigItem::updateMenu(void) ...@@ -102,14 +104,14 @@ void ConfigItem::updateMenu(void)
list = listView(); list = listView();
if (goParent) { if (goParent) {
setPixmap(promptColIdx, list->menuBackPix); setIcon(promptColIdx, menubackIcon);
prompt = ".."; prompt = "..";
goto set_prompt; goto set_prompt;
} }
sym = menu->sym; sym = menu->sym;
prop = menu->prompt; prop = menu->prompt;
prompt = qgettext(menu_get_prompt(menu)); prompt = menu_get_prompt(menu);
if (prop) switch (prop->type) { if (prop) switch (prop->type) {
case P_MENU: case P_MENU:
...@@ -119,15 +121,15 @@ void ConfigItem::updateMenu(void) ...@@ -119,15 +121,15 @@ void ConfigItem::updateMenu(void)
*/ */
if (sym && list->rootEntry == menu) if (sym && list->rootEntry == menu)
break; break;
setPixmap(promptColIdx, list->menuPix); setIcon(promptColIdx, menuIcon);
} else { } else {
if (sym) if (sym)
break; break;
setPixmap(promptColIdx, QIcon()); setIcon(promptColIdx, QIcon());
} }
goto set_prompt; goto set_prompt;
case P_COMMENT: case P_COMMENT:
setPixmap(promptColIdx, QIcon()); setIcon(promptColIdx, QIcon());
goto set_prompt; goto set_prompt;
default: default:
; ;
...@@ -135,7 +137,7 @@ void ConfigItem::updateMenu(void) ...@@ -135,7 +137,7 @@ void ConfigItem::updateMenu(void)
if (!sym) if (!sym)
goto set_prompt; goto set_prompt;
setText(nameColIdx, QString::fromLocal8Bit(sym->name)); setText(nameColIdx, sym->name);
type = sym_get_type(sym); type = sym_get_type(sym);
switch (type) { switch (type) {
...@@ -144,7 +146,7 @@ void ConfigItem::updateMenu(void) ...@@ -144,7 +146,7 @@ void ConfigItem::updateMenu(void)
char ch; char ch;
if (!sym_is_changeable(sym) && list->optMode == normalOpt) { if (!sym_is_changeable(sym) && list->optMode == normalOpt) {
setPixmap(promptColIdx, QIcon()); setIcon(promptColIdx, QIcon());
setText(noColIdx, QString()); setText(noColIdx, QString());
setText(modColIdx, QString()); setText(modColIdx, QString());
setText(yesColIdx, QString()); setText(yesColIdx, QString());
...@@ -154,22 +156,22 @@ void ConfigItem::updateMenu(void) ...@@ -154,22 +156,22 @@ void ConfigItem::updateMenu(void)
switch (expr) { switch (expr) {
case yes: case yes:
if (sym_is_choice_value(sym) && type == S_BOOLEAN) if (sym_is_choice_value(sym) && type == S_BOOLEAN)
setPixmap(promptColIdx, list->choiceYesPix); setIcon(promptColIdx, choiceYesIcon);
else else
setPixmap(promptColIdx, list->symbolYesPix); setIcon(promptColIdx, symbolYesIcon);
setText(yesColIdx, "Y"); setText(yesColIdx, "Y");
ch = 'Y'; ch = 'Y';
break; break;
case mod: case mod:
setPixmap(promptColIdx, list->symbolModPix); setIcon(promptColIdx, symbolModIcon);
setText(modColIdx, "M"); setText(modColIdx, "M");
ch = 'M'; ch = 'M';
break; break;
default: default:
if (sym_is_choice_value(sym) && type == S_BOOLEAN) if (sym_is_choice_value(sym) && type == S_BOOLEAN)
setPixmap(promptColIdx, list->choiceNoPix); setIcon(promptColIdx, choiceNoIcon);
else else
setPixmap(promptColIdx, list->symbolNoPix); setIcon(promptColIdx, symbolNoIcon);
setText(noColIdx, "N"); setText(noColIdx, "N");
ch = 'N'; ch = 'N';
break; break;
...@@ -265,7 +267,7 @@ void ConfigLineEdit::show(ConfigItem* i) ...@@ -265,7 +267,7 @@ void ConfigLineEdit::show(ConfigItem* i)
{ {
item = i; item = i;
if (sym_get_string_value(item->menu->sym)) if (sym_get_string_value(item->menu->sym))
setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); setText(sym_get_string_value(item->menu->sym));
else else
setText(QString()); setText(QString());
Parent::show(); Parent::show();
...@@ -280,7 +282,7 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e) ...@@ -280,7 +282,7 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
case Qt::Key_Return: case Qt::Key_Return:
case Qt::Key_Enter: case Qt::Key_Enter:
sym_set_string_value(item->menu->sym, text().toLatin1()); sym_set_string_value(item->menu->sym, text().toLatin1());
parent()->updateList(item); parent()->updateList();
break; break;
default: default:
Parent::keyPressEvent(e); Parent::keyPressEvent(e);
...@@ -294,9 +296,6 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e) ...@@ -294,9 +296,6 @@ void ConfigLineEdit::keyPressEvent(QKeyEvent* e)
ConfigList::ConfigList(ConfigView* p, const char *name) ConfigList::ConfigList(ConfigView* p, const char *name)
: Parent(p), : Parent(p),
updateAll(false), updateAll(false),
symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no),
menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void),
showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt), showName(false), showRange(false), showData(false), mode(singleMode), optMode(normalOpt),
rootEntry(0), headerPopup(0) rootEntry(0), headerPopup(0)
{ {
...@@ -322,7 +321,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name) ...@@ -322,7 +321,7 @@ ConfigList::ConfigList(ConfigView* p, const char *name)
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
} }
addColumn(promptColIdx); showColumn(promptColIdx);
reinit(); reinit();
} }
...@@ -340,21 +339,33 @@ bool ConfigList::menuSkip(struct menu *menu) ...@@ -340,21 +339,33 @@ bool ConfigList::menuSkip(struct menu *menu)
void ConfigList::reinit(void) void ConfigList::reinit(void)
{ {
removeColumn(dataColIdx); hideColumn(dataColIdx);
removeColumn(yesColIdx); hideColumn(yesColIdx);
removeColumn(modColIdx); hideColumn(modColIdx);
removeColumn(noColIdx); hideColumn(noColIdx);
removeColumn(nameColIdx); hideColumn(nameColIdx);
if (showName) if (showName)
addColumn(nameColIdx); showColumn(nameColIdx);
if (showRange) { if (showRange) {
addColumn(noColIdx); showColumn(noColIdx);
addColumn(modColIdx); showColumn(modColIdx);
addColumn(yesColIdx); showColumn(yesColIdx);
} }
if (showData) if (showData)
addColumn(dataColIdx); showColumn(dataColIdx);
updateListAll();
}
void ConfigList::setOptionMode(QAction *action)
{
if (action == showNormalAction)
optMode = normalOpt;
else if (action == showAllAction)
optMode = allOpt;
else
optMode = promptOpt;
updateListAll(); updateListAll();
} }
...@@ -404,15 +415,15 @@ void ConfigList::updateSelection(void) ...@@ -404,15 +415,15 @@ void ConfigList::updateSelection(void)
emit menuSelected(menu); emit menuSelected(menu);
} }
void ConfigList::updateList(ConfigItem* item) void ConfigList::updateList()
{ {
ConfigItem* last = 0; ConfigItem* last = 0;
ConfigItem *item;
if (!rootEntry) { if (!rootEntry) {
if (mode != listMode) if (mode != listMode)
goto update; goto update;
QTreeWidgetItemIterator it(this); QTreeWidgetItemIterator it(this);
ConfigItem* item;
while (*it) { while (*it) {
item = (ConfigItem*)(*it); item = (ConfigItem*)(*it);
...@@ -446,7 +457,7 @@ void ConfigList::updateList(ConfigItem* item) ...@@ -446,7 +457,7 @@ void ConfigList::updateList(ConfigItem* item)
return; return;
} }
update: update:
updateMenuList(this, rootEntry); updateMenuList(rootEntry);
update(); update();
resizeColumnToContents(0); resizeColumnToContents(0);
} }
...@@ -471,7 +482,7 @@ void ConfigList::setValue(ConfigItem* item, tristate val) ...@@ -471,7 +482,7 @@ void ConfigList::setValue(ConfigItem* item, tristate val)
return; return;
if (oldval == no && item->menu->list) if (oldval == no && item->menu->list)
item->setExpanded(true); item->setExpanded(true);
parent()->updateList(item); parent()->updateList();
break; break;
} }
} }
...@@ -505,7 +516,7 @@ void ConfigList::changeValue(ConfigItem* item) ...@@ -505,7 +516,7 @@ void ConfigList::changeValue(ConfigItem* item)
item->setExpanded(true); item->setExpanded(true);
} }
if (oldexpr != newexpr) if (oldexpr != newexpr)
parent()->updateList(item); parent()->updateList();
break; break;
case S_INT: case S_INT:
case S_HEX: case S_HEX:
...@@ -524,7 +535,7 @@ void ConfigList::setRootMenu(struct menu *menu) ...@@ -524,7 +535,7 @@ void ConfigList::setRootMenu(struct menu *menu)
type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
if (type != P_MENU) if (type != P_MENU)
return; return;
updateMenuList(this, 0); updateMenuList(0);
rootEntry = menu; rootEntry = menu;
updateListAll(); updateListAll();
if (currentItem()) { if (currentItem()) {
...@@ -628,7 +639,7 @@ hide: ...@@ -628,7 +639,7 @@ hide:
} }
} }
void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) void ConfigList::updateMenuList(struct menu *menu)
{ {
struct menu* child; struct menu* child;
ConfigItem* item; ConfigItem* item;
...@@ -637,19 +648,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) ...@@ -637,19 +648,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
enum prop_type type; enum prop_type type;
if (!menu) { if (!menu) {
while (parent->topLevelItemCount() > 0) while (topLevelItemCount() > 0)
{ {
delete parent->takeTopLevelItem(0); delete takeTopLevelItem(0);
} }
return; return;
} }
last = (ConfigItem*)parent->topLevelItem(0); last = (ConfigItem *)topLevelItem(0);
if (last && !last->goParent) if (last && !last->goParent)
last = 0; last = 0;
for (child = menu->list; child; child = child->next) { for (child = menu->list; child; child = child->next) {
item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); item = last ? last->nextSibling() : (ConfigItem *)topLevelItem(0);
type = child->prompt ? child->prompt->type : P_UNKNOWN; type = child->prompt ? child->prompt->type : P_UNKNOWN;
switch (mode) { switch (mode) {
...@@ -670,7 +681,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) ...@@ -670,7 +681,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
if (!child->sym && !child->list && !child->prompt) if (!child->sym && !child->list && !child->prompt)
continue; continue;
if (!item || item->menu != child) if (!item || item->menu != child)
item = new ConfigItem(parent, last, child, visible); item = new ConfigItem(this, last, child, visible);
else else
item->testUpdateMenu(visible); item->testUpdateMenu(visible);
...@@ -683,7 +694,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) ...@@ -683,7 +694,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
} }
hide: hide:
if (item && item->menu == child) { if (item && item->menu == child) {
last = (ConfigItem*)parent->topLevelItem(0); last = (ConfigItem *)topLevelItem(0);
if (last == item) if (last == item)
last = 0; last = 0;
else while (last->nextSibling() != item) else while (last->nextSibling() != item)
...@@ -774,7 +785,7 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e) ...@@ -774,7 +785,7 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e)
idx = header()->logicalIndexAt(x); idx = header()->logicalIndexAt(x);
switch (idx) { switch (idx) {
case promptColIdx: case promptColIdx:
icon = item->pixmap(promptColIdx); icon = item->icon(promptColIdx);
if (!icon.isNull()) { if (!icon.isNull()) {
int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly. int off = header()->sectionPosition(0) + visualRect(indexAt(p)).x() + 4; // 4 is Hardcoded image offset. There might be a way to do it properly.
if (x >= off && x < off + icon.availableSizes().first().width()) { if (x >= off && x < off + icon.availableSizes().first().width()) {
...@@ -785,7 +796,8 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e) ...@@ -785,7 +796,8 @@ void ConfigList::mouseReleaseEvent(QMouseEvent* e)
break; break;
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
if (ptype == P_MENU && rootEntry != menu && if (ptype == P_MENU && rootEntry != menu &&
mode != fullMode && mode != menuMode) mode != fullMode && mode != menuMode &&
mode != listMode)
emit menuSelected(menu); emit menuSelected(menu);
else else
changeValue(item); changeValue(item);
...@@ -835,7 +847,7 @@ void ConfigList::mouseDoubleClickEvent(QMouseEvent* e) ...@@ -835,7 +847,7 @@ void ConfigList::mouseDoubleClickEvent(QMouseEvent* e)
if (!menu) if (!menu)
goto skip; goto skip;
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
if (ptype == P_MENU) { if (ptype == P_MENU && mode != listMode) {
if (mode == singleMode) if (mode == singleMode)
emit itemSelected(menu); emit itemSelected(menu);
else if (mode == symbolMode) else if (mode == symbolMode)
...@@ -864,7 +876,6 @@ void ConfigList::focusInEvent(QFocusEvent *e) ...@@ -864,7 +876,6 @@ void ConfigList::focusInEvent(QFocusEvent *e)
void ConfigList::contextMenuEvent(QContextMenuEvent *e) void ConfigList::contextMenuEvent(QContextMenuEvent *e)
{ {
if (e->y() <= header()->geometry().bottom()) {
if (!headerPopup) { if (!headerPopup) {
QAction *action; QAction *action;
...@@ -877,6 +888,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -877,6 +888,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
action, SLOT(setOn(bool))); action, SLOT(setOn(bool)));
action->setChecked(showName); action->setChecked(showName);
headerPopup->addAction(action); headerPopup->addAction(action);
action = new QAction("Show Range", this); action = new QAction("Show Range", this);
action->setCheckable(true); action->setCheckable(true);
connect(action, SIGNAL(toggled(bool)), connect(action, SIGNAL(toggled(bool)),
...@@ -885,6 +897,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -885,6 +897,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
action, SLOT(setOn(bool))); action, SLOT(setOn(bool)));
action->setChecked(showRange); action->setChecked(showRange);
headerPopup->addAction(action); headerPopup->addAction(action);
action = new QAction("Show Data", this); action = new QAction("Show Data", this);
action->setCheckable(true); action->setCheckable(true);
connect(action, SIGNAL(toggled(bool)), connect(action, SIGNAL(toggled(bool)),
...@@ -894,16 +907,15 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e) ...@@ -894,16 +907,15 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
action->setChecked(showData); action->setChecked(showData);
headerPopup->addAction(action); headerPopup->addAction(action);
} }
headerPopup->exec(e->globalPos()); headerPopup->exec(e->globalPos());
e->accept(); e->accept();
} else
e->ignore();
} }
ConfigView*ConfigView::viewList; ConfigView*ConfigView::viewList;
QAction *ConfigView::showNormalAction; QAction *ConfigList::showNormalAction;
QAction *ConfigView::showAllAction; QAction *ConfigList::showAllAction;
QAction *ConfigView::showPromptAction; QAction *ConfigList::showPromptAction;
ConfigView::ConfigView(QWidget* parent, const char *name) ConfigView::ConfigView(QWidget* parent, const char *name)
: Parent(parent) : Parent(parent)
...@@ -934,18 +946,6 @@ ConfigView::~ConfigView(void) ...@@ -934,18 +946,6 @@ ConfigView::~ConfigView(void)
} }
} }
void ConfigView::setOptionMode(QAction *act)
{
if (act == showNormalAction)
list->optMode = normalOpt;
else if (act == showAllAction)
list->optMode = allOpt;
else
list->optMode = promptOpt;
list->updateListAll();
}
void ConfigView::setShowName(bool b) void ConfigView::setShowName(bool b)
{ {
if (list->showName != b) { if (list->showName != b) {
...@@ -984,12 +984,12 @@ void ConfigList::setAllOpen(bool open) ...@@ -984,12 +984,12 @@ void ConfigList::setAllOpen(bool open)
} }
} }
void ConfigView::updateList(ConfigItem* item) void ConfigView::updateList()
{ {
ConfigView* v; ConfigView* v;
for (v = viewList; v; v = v->nextView) for (v = viewList; v; v = v->nextView)
v->list->updateList(item); v->list->updateList();
} }
void ConfigView::updateListAll(void) void ConfigView::updateListAll(void)
...@@ -1287,16 +1287,17 @@ void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e) ...@@ -1287,16 +1287,17 @@ void ConfigInfoView::contextMenuEvent(QContextMenuEvent *e)
Parent::contextMenuEvent(e); Parent::contextMenuEvent(e);
} }
ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow *parent)
: Parent(parent), result(NULL) : Parent(parent), result(NULL)
{ {
setObjectName(name); setObjectName("search");
setWindowTitle("Search Config"); setWindowTitle("Search Config");
QVBoxLayout* layout1 = new QVBoxLayout(this); QVBoxLayout* layout1 = new QVBoxLayout(this);
layout1->setContentsMargins(11, 11, 11, 11); layout1->setContentsMargins(11, 11, 11, 11);
layout1->setSpacing(6); layout1->setSpacing(6);
QHBoxLayout* layout2 = new QHBoxLayout(0);
QHBoxLayout* layout2 = new QHBoxLayout();
layout2->setContentsMargins(0, 0, 0, 0); layout2->setContentsMargins(0, 0, 0, 0);
layout2->setSpacing(6); layout2->setSpacing(6);
layout2->addWidget(new QLabel("Find:", this)); layout2->addWidget(new QLabel("Find:", this));
...@@ -1311,9 +1312,9 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam ...@@ -1311,9 +1312,9 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
split = new QSplitter(this); split = new QSplitter(this);
split->setOrientation(Qt::Vertical); split->setOrientation(Qt::Vertical);
list = new ConfigView(split, name); list = new ConfigView(split, "search");
list->list->mode = listMode; list->list->mode = listMode;
info = new ConfigInfoView(split, name); info = new ConfigInfoView(split, "search");
connect(list->list, SIGNAL(menuChanged(struct menu *)), connect(list->list, SIGNAL(menuChanged(struct menu *)),
info, SLOT(setInfo(struct menu *))); info, SLOT(setInfo(struct menu *)));
connect(list->list, SIGNAL(menuChanged(struct menu *)), connect(list->list, SIGNAL(menuChanged(struct menu *)),
...@@ -1321,25 +1322,23 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam ...@@ -1321,25 +1322,23 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
layout1->addWidget(split); layout1->addWidget(split);
if (name) {
QVariant x, y; QVariant x, y;
int width, height; int width, height;
bool ok; bool ok;
configSettings->beginGroup(name); configSettings->beginGroup("search");
width = configSettings->value("/window width", parent->width() / 2).toInt(); width = configSettings->value("/window width", parent->width() / 2).toInt();
height = configSettings->value("/window height", parent->height() / 2).toInt(); height = configSettings->value("/window height", parent->height() / 2).toInt();
resize(width, height); resize(width, height);
x = configSettings->value("/window x"); x = configSettings->value("/window x");
y = configSettings->value("/window y"); y = configSettings->value("/window y");
if ((x.isValid())&&(y.isValid())) if (x.isValid() && y.isValid())
move(x.toInt(), y.toInt()); move(x.toInt(), y.toInt());
QList<int> sizes = configSettings->readSizes("/split", &ok); QList<int> sizes = configSettings->readSizes("/split", &ok);
if (ok) if (ok)
split->setSizes(sizes); split->setSizes(sizes);
configSettings->endGroup(); configSettings->endGroup();
connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings()));
}
} }
void ConfigSearchWindow::saveSettings(void) void ConfigSearchWindow::saveSettings(void)
...@@ -1381,7 +1380,6 @@ void ConfigSearchWindow::search(void) ...@@ -1381,7 +1380,6 @@ void ConfigSearchWindow::search(void)
ConfigMainWindow::ConfigMainWindow(void) ConfigMainWindow::ConfigMainWindow(void)
: searchWindow(0) : searchWindow(0)
{ {
QMenuBar* menu;
bool ok = true; bool ok = true;
QVariant x, y; QVariant x, y;
int width, height; int width, height;
...@@ -1402,6 +1400,15 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1402,6 +1400,15 @@ ConfigMainWindow::ConfigMainWindow(void)
if ((x.isValid())&&(y.isValid())) if ((x.isValid())&&(y.isValid()))
move(x.toInt(), y.toInt()); move(x.toInt(), y.toInt());
// set up icons
ConfigItem::symbolYesIcon = QIcon(QPixmap(xpm_symbol_yes));
ConfigItem::symbolModIcon = QIcon(QPixmap(xpm_symbol_mod));
ConfigItem::symbolNoIcon = QIcon(QPixmap(xpm_symbol_no));
ConfigItem::choiceYesIcon = QIcon(QPixmap(xpm_choice_yes));
ConfigItem::choiceNoIcon = QIcon(QPixmap(xpm_choice_no));
ConfigItem::menuIcon = QIcon(QPixmap(xpm_menu));
ConfigItem::menubackIcon = QIcon(QPixmap(xpm_menuback));
QWidget *widget = new QWidget(this); QWidget *widget = new QWidget(this);
QVBoxLayout *layout = new QVBoxLayout(widget); QVBoxLayout *layout = new QVBoxLayout(widget);
setCentralWidget(widget); setCentralWidget(widget);
...@@ -1432,10 +1439,6 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1432,10 +1439,6 @@ ConfigMainWindow::ConfigMainWindow(void)
setTabOrder(configList, helpText); setTabOrder(configList, helpText);
configList->setFocus(); configList->setFocus();
menu = menuBar();
toolBar = new QToolBar("Tools", this);
addToolBar(toolBar);
backAction = new QAction(QPixmap(xpm_back), "Back", this); backAction = new QAction(QPixmap(xpm_back), "Back", this);
connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack())); connect(backAction, SIGNAL(triggered(bool)), SLOT(goBack()));
...@@ -1485,17 +1488,17 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1485,17 +1488,17 @@ ConfigMainWindow::ConfigMainWindow(void)
QActionGroup *optGroup = new QActionGroup(this); QActionGroup *optGroup = new QActionGroup(this);
optGroup->setExclusive(true); optGroup->setExclusive(true);
connect(optGroup, SIGNAL(triggered(QAction*)), configView, connect(optGroup, SIGNAL(triggered(QAction*)), configList,
SLOT(setOptionMode(QAction *))); SLOT(setOptionMode(QAction *)));
connect(optGroup, SIGNAL(triggered(QAction *)), menuView, connect(optGroup, SIGNAL(triggered(QAction *)), menuList,
SLOT(setOptionMode(QAction *))); SLOT(setOptionMode(QAction *)));
configView->showNormalAction = new QAction("Show Normal Options", optGroup); ConfigList::showNormalAction = new QAction("Show Normal Options", optGroup);
configView->showAllAction = new QAction("Show All Options", optGroup); ConfigList::showNormalAction->setCheckable(true);
configView->showPromptAction = new QAction("Show Prompt Options", optGroup); ConfigList::showAllAction = new QAction("Show All Options", optGroup);
configView->showNormalAction->setCheckable(true); ConfigList::showAllAction->setCheckable(true);
configView->showAllAction->setCheckable(true); ConfigList::showPromptAction = new QAction("Show Prompt Options", optGroup);
configView->showPromptAction->setCheckable(true); ConfigList::showPromptAction->setCheckable(true);
QAction *showDebugAction = new QAction("Show Debug Info", this); QAction *showDebugAction = new QAction("Show Debug Info", this);
showDebugAction->setCheckable(true); showDebugAction->setCheckable(true);
...@@ -1508,6 +1511,7 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1508,6 +1511,7 @@ ConfigMainWindow::ConfigMainWindow(void)
connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout())); connect(showAboutAction, SIGNAL(triggered(bool)), SLOT(showAbout()));
// init tool bar // init tool bar
QToolBar *toolBar = addToolBar("Tools");
toolBar->addAction(backAction); toolBar->addAction(backAction);
toolBar->addSeparator(); toolBar->addSeparator();
toolBar->addAction(loadAction); toolBar->addAction(loadAction);
...@@ -1517,33 +1521,32 @@ ConfigMainWindow::ConfigMainWindow(void) ...@@ -1517,33 +1521,32 @@ ConfigMainWindow::ConfigMainWindow(void)
toolBar->addAction(splitViewAction); toolBar->addAction(splitViewAction);
toolBar->addAction(fullViewAction); toolBar->addAction(fullViewAction);
// create config menu // create file menu
QMenu* config = menu->addMenu("&File"); QMenu *menu = menuBar()->addMenu("&File");
config->addAction(loadAction); menu->addAction(loadAction);
config->addAction(saveAction); menu->addAction(saveAction);
config->addAction(saveAsAction); menu->addAction(saveAsAction);
config->addSeparator(); menu->addSeparator();
config->addAction(quitAction); menu->addAction(quitAction);
// create edit menu // create edit menu
QMenu* editMenu = menu->addMenu("&Edit"); menu = menuBar()->addMenu("&Edit");
editMenu->addAction(searchAction); menu->addAction(searchAction);
// create options menu // create options menu
QMenu* optionMenu = menu->addMenu("&Option"); menu = menuBar()->addMenu("&Option");
optionMenu->addAction(showNameAction); menu->addAction(showNameAction);
optionMenu->addAction(showRangeAction); menu->addAction(showRangeAction);
optionMenu->addAction(showDataAction); menu->addAction(showDataAction);
optionMenu->addSeparator(); menu->addSeparator();
optionMenu->addActions(optGroup->actions()); menu->addActions(optGroup->actions());
optionMenu->addSeparator(); menu->addSeparator();
optionMenu->addAction(showDebugAction); menu->addAction(showDebugAction);
// create help menu // create help menu
menu->addSeparator(); menu = menuBar()->addMenu("&Help");
QMenu* helpMenu = menu->addMenu("&Help"); menu->addAction(showIntroAction);
helpMenu->addAction(showIntroAction); menu->addAction(showAboutAction);
helpMenu->addAction(showAboutAction);
connect (helpText, SIGNAL (anchorClicked (const QUrl &)), connect (helpText, SIGNAL (anchorClicked (const QUrl &)),
helpText, SLOT (clicked (const QUrl &)) ); helpText, SLOT (clicked (const QUrl &)) );
...@@ -1646,7 +1649,7 @@ void ConfigMainWindow::saveConfigAs(void) ...@@ -1646,7 +1649,7 @@ void ConfigMainWindow::saveConfigAs(void)
void ConfigMainWindow::searchConfig(void) void ConfigMainWindow::searchConfig(void)
{ {
if (!searchWindow) if (!searchWindow)
searchWindow = new ConfigSearchWindow(this, "search"); searchWindow = new ConfigSearchWindow(this);
searchWindow->show(); searchWindow->show();
} }
......
...@@ -69,11 +69,13 @@ class ConfigList : public QTreeWidget { ...@@ -69,11 +69,13 @@ class ConfigList : public QTreeWidget {
public slots: public slots:
void setRootMenu(struct menu *menu); void setRootMenu(struct menu *menu);
void updateList(ConfigItem *item); void updateList();
void setValue(ConfigItem* item, tristate val); void setValue(ConfigItem* item, tristate val);
void changeValue(ConfigItem* item); void changeValue(ConfigItem* item);
void updateSelection(void); void updateSelection(void);
void saveSettings(void); void saveSettings(void);
void setOptionMode(QAction *action);
signals: signals:
void menuChanged(struct menu *menu); void menuChanged(struct menu *menu);
void menuSelected(struct menu *menu); void menuSelected(struct menu *menu);
...@@ -85,35 +87,19 @@ public slots: ...@@ -85,35 +87,19 @@ public slots:
void updateListAll(void) void updateListAll(void)
{ {
updateAll = true; updateAll = true;
updateList(NULL); updateList();
updateAll = false; updateAll = false;
} }
ConfigList* listView()
{
return this;
}
void addColumn(colIdx idx)
{
showColumn(idx);
}
void removeColumn(colIdx idx)
{
hideColumn(idx);
}
void setAllOpen(bool open); void setAllOpen(bool open);
void setParentMenu(void); void setParentMenu(void);
bool menuSkip(struct menu *); bool menuSkip(struct menu *);
void updateMenuList(ConfigItem *parent, struct menu*); void updateMenuList(ConfigItem *parent, struct menu*);
void updateMenuList(ConfigList *parent, struct menu*); void updateMenuList(struct menu *menu);
bool updateAll; bool updateAll;
QPixmap symbolYesPix, symbolModPix, symbolNoPix;
QPixmap choiceYesPix, choiceNoPix;
QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
bool showName, showRange, showData; bool showName, showRange, showData;
enum listMode mode; enum listMode mode;
enum optionMode optMode; enum optionMode optMode;
...@@ -121,6 +107,8 @@ public slots: ...@@ -121,6 +107,8 @@ public slots:
QPalette disabledColorGroup; QPalette disabledColorGroup;
QPalette inactivedColorGroup; QPalette inactivedColorGroup;
QMenu* headerPopup; QMenu* headerPopup;
static QAction *showNormalAction, *showAllAction, *showPromptAction;
}; };
class ConfigItem : public QTreeWidgetItem { class ConfigItem : public QTreeWidgetItem {
...@@ -168,28 +156,16 @@ class ConfigItem : public QTreeWidgetItem { ...@@ -168,28 +156,16 @@ class ConfigItem : public QTreeWidgetItem {
return ret; return ret;
} }
void setText(colIdx idx, const QString& text)
{
Parent::setText(idx, text);
}
QString text(colIdx idx) const
{
return Parent::text(idx);
}
void setPixmap(colIdx idx, const QIcon &icon)
{
Parent::setIcon(idx, icon);
}
const QIcon pixmap(colIdx idx) const
{
return icon(idx);
}
// TODO: Implement paintCell // TODO: Implement paintCell
ConfigItem* nextItem; ConfigItem* nextItem;
struct menu *menu; struct menu *menu;
bool visible; bool visible;
bool goParent; bool goParent;
static QIcon symbolYesIcon, symbolModIcon, symbolNoIcon;
static QIcon choiceYesIcon, choiceNoIcon;
static QIcon menuIcon, menubackIcon;
}; };
class ConfigLineEdit : public QLineEdit { class ConfigLineEdit : public QLineEdit {
...@@ -214,7 +190,7 @@ class ConfigView : public QWidget { ...@@ -214,7 +190,7 @@ class ConfigView : public QWidget {
public: public:
ConfigView(QWidget* parent, const char *name = 0); ConfigView(QWidget* parent, const char *name = 0);
~ConfigView(void); ~ConfigView(void);
static void updateList(ConfigItem* item); static void updateList();
static void updateListAll(void); static void updateListAll(void);
bool showName(void) const { return list->showName; } bool showName(void) const { return list->showName; }
...@@ -224,7 +200,6 @@ public slots: ...@@ -224,7 +200,6 @@ public slots:
void setShowName(bool); void setShowName(bool);
void setShowRange(bool); void setShowRange(bool);
void setShowData(bool); void setShowData(bool);
void setOptionMode(QAction *);
signals: signals:
void showNameChanged(bool); void showNameChanged(bool);
void showRangeChanged(bool); void showRangeChanged(bool);
...@@ -235,10 +210,6 @@ public slots: ...@@ -235,10 +210,6 @@ public slots:
static ConfigView* viewList; static ConfigView* viewList;
ConfigView* nextView; ConfigView* nextView;
static QAction *showNormalAction;
static QAction *showAllAction;
static QAction *showPromptAction;
}; };
class ConfigInfoView : public QTextBrowser { class ConfigInfoView : public QTextBrowser {
...@@ -276,7 +247,7 @@ class ConfigSearchWindow : public QDialog { ...@@ -276,7 +247,7 @@ class ConfigSearchWindow : public QDialog {
Q_OBJECT Q_OBJECT
typedef class QDialog Parent; typedef class QDialog Parent;
public: public:
ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); ConfigSearchWindow(ConfigMainWindow *parent);
public slots: public slots:
void saveSettings(void); void saveSettings(void);
...@@ -326,7 +297,6 @@ public slots: ...@@ -326,7 +297,6 @@ public slots:
ConfigView *configView; ConfigView *configView;
ConfigList *configList; ConfigList *configList;
ConfigInfoView *helpText; ConfigInfoView *helpText;
QToolBar *toolBar;
QAction *backAction; QAction *backAction;
QAction *singleViewAction; QAction *singleViewAction;
QAction *splitViewAction; QAction *splitViewAction;
......
...@@ -15,15 +15,21 @@ struct symbol symbol_yes = { ...@@ -15,15 +15,21 @@ struct symbol symbol_yes = {
.name = "y", .name = "y",
.curr = { "y", yes }, .curr = { "y", yes },
.flags = SYMBOL_CONST|SYMBOL_VALID, .flags = SYMBOL_CONST|SYMBOL_VALID,
}, symbol_mod = { };
struct symbol symbol_mod = {
.name = "m", .name = "m",
.curr = { "m", mod }, .curr = { "m", mod },
.flags = SYMBOL_CONST|SYMBOL_VALID, .flags = SYMBOL_CONST|SYMBOL_VALID,
}, symbol_no = { };
struct symbol symbol_no = {
.name = "n", .name = "n",
.curr = { "n", no }, .curr = { "n", no },
.flags = SYMBOL_CONST|SYMBOL_VALID, .flags = SYMBOL_CONST|SYMBOL_VALID,
}, symbol_empty = { };
static struct symbol symbol_empty = {
.name = "", .name = "",
.curr = { "", no }, .curr = { "", no },
.flags = SYMBOL_VALID, .flags = SYMBOL_VALID,
...@@ -31,7 +37,7 @@ struct symbol symbol_yes = { ...@@ -31,7 +37,7 @@ struct symbol symbol_yes = {
struct symbol *sym_defconfig_list; struct symbol *sym_defconfig_list;
struct symbol *modules_sym; struct symbol *modules_sym;
tristate modules_val; static tristate modules_val;
enum symbol_type sym_get_type(struct symbol *sym) enum symbol_type sym_get_type(struct symbol *sym)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment