Summary: | Ampersand in title sets Accel | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Ernst de Haan <ernst.dehaan> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.6 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Screenshot |
Description
Ernst de Haan
2006-02-11 19:27:24 UTC
This is on KDE 3.5.1. Konsole reports its version is 1.6. Created attachment 14643 [details]
Screenshot
This screenshot shows the results of the listed steps, with the problem.
Yea, I'm not sure why this is... the KTabWidget has setNoAccel on it so the & should be ignored. You'll notice that you can switch to that tab using Alt+b. SVN commit 537524 by hindenburg: Fix issue when there are ampersands in tab title. BUG: 121782 M +9 -3 konsole.cpp --- branches/KDE/3.5/kdebase/konsole/konsole/konsole.cpp #537523:537524 @@ -1364,6 +1364,7 @@ else title = sessions.at(i)->Title(); + title=title.replace('&',"&&"); switch(mode) { case ShowIconAndText: tabwidget->changeTab(page, icon, title); @@ -2198,7 +2199,7 @@ ra->setIcon(icon); if (m_tabViewMode == ShowIconOnly) tabwidget->changeTab( se->widget(), QString::null ); else if (b_matchTabWinTitle) - tabwidget->changeTab( se->widget(), se->fullTitle() ); + tabwidget->changeTab( se->widget(), se->fullTitle().replace('&',"&&")); } void Konsole::initSessionFont(QFont font) { @@ -3127,7 +3128,9 @@ tabwidget->blockSignals(true); tabwidget->removePage(se->widget()); tabwidget->blockSignals(false); - createSessionTab(se->widget(), iconSetForSession(se), se->Title(), position-1); + QString title = se->Title(); + createSessionTab(se->widget(), iconSetForSession(se), + title.replace('&', "&&"), position-1); tabwidget->showPage(se->widget()); tabwidget->setTabColor(se->widget(),oldcolor); @@ -3158,7 +3161,9 @@ tabwidget->blockSignals(true); tabwidget->removePage(se->widget()); tabwidget->blockSignals(false); - createSessionTab(se->widget(), iconSetForSession(se), se->Title(), position+1); + QString title = se->Title(); + createSessionTab(se->widget(), iconSetForSession(se), + title.replace('&', "&&"), position+1); tabwidget->showPage(se->widget()); tabwidget->setTabColor(se->widget(),oldcolor); @@ -3671,6 +3676,7 @@ konsole->attachSession(_se); konsole->activateSession(_se); konsole->changeTabTextColor( _se, se_tabtextcolor.rgb() );//restore prev color + konsole->slotTabSetViewOptions(m_tabViewMode); if (_se==se) { if (se == se_previous) SVN commit 537528 by hindenburg: Fix issue when there are ampersands in tab title. CCBUG: 121782 M +9 -3 konsole.cpp --- trunk/KDE/kdebase/apps/konsole/konsole/konsole.cpp #537527:537528 @@ -1376,6 +1376,7 @@ else title = sessions.at(i)->Title(); + title=title.replace('&',"&&"); switch(mode) { case ShowIconAndText: tabwidget->setTabIcon( i, icon ); @@ -2148,7 +2149,7 @@ if (m_tabViewMode == ShowIconOnly) tabwidget->setTabText( se_index, QString() ); else if (b_matchTabWinTitle) - tabwidget->setTabText( se_index, se->fullTitle() ); + tabwidget->setTabText( se_index, se->fullTitle().replace('&', "&&") ); } void Konsole::initSessionFont(QFont font) { @@ -3092,7 +3093,9 @@ tabwidget->blockSignals(true); tabwidget->removePage(se->widget()); tabwidget->blockSignals(false); - createSessionTab(se->widget(), iconSetForSession(se), se->Title(), position-1); + QString title = se->Title(); + createSessionTab(se->widget(), iconSetForSession(se), + title.replace('&', "&&"), position-1); tabwidget->showPage(se->widget()); tabwidget->setTabTextColor(tabwidget->indexOf(se->widget()),oldcolor); @@ -3123,7 +3126,9 @@ tabwidget->blockSignals(true); tabwidget->removePage(se->widget()); tabwidget->blockSignals(false); - createSessionTab(se->widget(), iconSetForSession(se), se->Title(), position+1); + QString title = se->Title(); + createSessionTab(se->widget(), iconSetForSession(se), + title.replace('&', "&&"), position+1); tabwidget->showPage(se->widget()); tabwidget->setTabTextColor(tabwidget->indexOf(se->widget()),oldcolor); @@ -3639,6 +3644,7 @@ konsole->attachSession(_se); konsole->activateSession(_se); konsole->changeTabTextColor( _se, se_tabtextcolor.rgb() );//restore prev color + konsole->slotTabSetViewOptions(m_tabViewMode); if (_se==se) { if (se == se_previous) |