Version: 2.7.5 (using KDE KDE 3.5.2) Compiler: gcc (GCC) 3.4.5 (Gentoo 3.4.5-r1, ssp-3.4.5-1.0, pie-8.7.9) OS: Linux Open Yakuake and open two tabs. They will default to "Shell" and "Shell No. 2". Then close "Shell No. 2" and open a new one. Instead of re-using "Shell No. 2", it gets called "Shell No. 3". For someone who does a lot of tab opening and closing, this gets very irritating very quickly.
Coming in the next release.
SVN commit 671379 by hein: Make initial session naming/numbering consistent with Konsole. BUG:131881 M +34 -1 tabbed_widget.cpp M +1 -0 tabbed_widget.h --- branches/extragear/kde3/utils/yakuake/src/tabbed_widget.cpp #671378:671379 @@ -94,7 +94,7 @@ { items.append(session_id); areas.append(0); - captions.append(defaultTabCaption(session_id)); + captions.append(lowestAvailableCaption()); refreshBuffer(); } @@ -104,6 +104,39 @@ return i18n("Shell", "Shell No. %n", id+1); } +QString TabbedWidget::lowestAvailableCaption() +{ + QString newTitle = defaultTabCaption(0); + + bool nameOk; + int count = 0; + + do + { + nameOk = true; + + QValueList<QString>::iterator it; + + for (it = captions.begin(); it != captions.end(); ++it) + { + if (newTitle == (*it)) + { + nameOk = false; + break; + } + } + + if (!nameOk) + { + count++; + newTitle = newTitle = defaultTabCaption(count); + } + } + while (!nameOk); + + return newTitle; +} + int TabbedWidget::removeItem(int session_id) { uint position = items.findIndex(session_id); --- branches/extragear/kde3/utils/yakuake/src/tabbed_widget.h #671378:671379 @@ -106,6 +106,7 @@ void createContextMenu(); const int drawButton(int position, QPainter& painter); QString defaultTabCaption(int session_id); + QString lowestAvailableCaption(); int current_position; bool pressed;