X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=scripts%2Fkconfig%2Fqconf.cc;h=f2a23a9c39386492773a9832603b13fb9ec7fb10;hb=38cb162b7585d837083b8365da1eb32687c5164c;hp=a8ffc329666a18abd5fa5095f3e2ae940de229c1;hpb=4497fe1e88cdee984925c2b477e5c73379e00620;p=powerpc.git diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index a8ffc32966..f2a23a9c39 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -89,6 +89,7 @@ void ConfigItem::okRename(int col) { Parent::okRename(col); sym_set_string_value(menu->sym, text(dataColIdx).latin1()); + listView()->updateList(this); } #endif @@ -605,6 +606,8 @@ void ConfigList::updateMenuList(P* parent, struct menu* menu) visible = menu_is_visible(child); if (showAll || visible) { + if (!child->sym && !child->list && !child->prompt) + continue; if (!item || item->menu != child) item = new ConfigItem(parent, last, child, visible); else @@ -917,7 +920,7 @@ void ConfigView::updateListAll(void) } ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) - : Parent(parent, name), menu(0) + : Parent(parent, name), menu(0), sym(0) { if (name) { configSettings->beginGroup(name); @@ -925,8 +928,6 @@ ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) configSettings->endGroup(); connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); } - - has_dbg_info = 0; } void ConfigInfoView::saveSettings(void) @@ -955,13 +956,11 @@ void ConfigInfoView::setInfo(struct menu *m) if (menu == m) return; menu = m; - if (!menu) { - has_dbg_info = 0; + sym = NULL; + if (!menu) clear(); - } else { - has_dbg_info = 1; + else menuInfo(); - } } void ConfigInfoView::setSource(const QString& name) @@ -996,9 +995,6 @@ void ConfigInfoView::symbolInfo(void) { QString str; - if (!has_dbg_info) - return; - str += "Symbol: "; str += print_filter(sym->name); str += "

value: "; @@ -1186,7 +1182,7 @@ void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e) Parent::contentsContextMenuEvent(e); } -ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name) +ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) : Parent(parent, name), result(NULL) { setCaption("Search Config"); @@ -1210,6 +1206,9 @@ ConfigSearchWindow::ConfigSearchWindow(QWidget* parent, const char *name) info = new ConfigInfoView(split, name); connect(list->list, SIGNAL(menuChanged(struct menu *)), info, SLOT(setInfo(struct menu *))); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + parent, SLOT(setMenuLink(struct menu *))); + layout1->addWidget(split); if (name) { @@ -1254,6 +1253,7 @@ void ConfigSearchWindow::search(void) free(result); list->list->clear(); + info->clear(); result = sym_re_search(editField->text().latin1()); if (!result) @@ -1323,7 +1323,7 @@ ConfigMainWindow::ConfigMainWindow(void) conf_changed(); QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, this); connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); - QAction *searchAction = new QAction("Search", "&Search", CTRL+Key_F, this); + QAction *searchAction = new QAction("Find", "&Find", CTRL+Key_F, this); connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); QAction *singleViewAction = new QAction("Single View", QPixmap(xpm_single_view), "Split View", 0, this); connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); @@ -1380,10 +1380,13 @@ ConfigMainWindow::ConfigMainWindow(void) saveAction->addTo(config); saveAsAction->addTo(config); config->insertSeparator(); - searchAction->addTo(config); - config->insertSeparator(); quitAction->addTo(config); + // create edit menu + QPopupMenu* editMenu = new QPopupMenu(this); + menu->insertItem("&Edit", editMenu); + searchAction->addTo(editMenu); + // create options menu QPopupMenu* optionMenu = new QPopupMenu(this); menu->insertItem("&Option", optionMenu); @@ -1474,7 +1477,10 @@ void ConfigMainWindow::searchConfig(void) void ConfigMainWindow::changeMenu(struct menu *menu) { configList->setRootMenu(menu); - backAction->setEnabled(TRUE); + if (configList->rootEntry->parent == &rootmenu) + backAction->setEnabled(FALSE); + else + backAction->setEnabled(TRUE); } void ConfigMainWindow::setMenuLink(struct menu *menu)