Use the standard kwin button order configuration instead of an own one

svn path=/trunk/kdebase/kwin/; revision=96753
This commit is contained in:
Malte Starostik 2001-05-13 05:19:20 +00:00
parent d551bc8c15
commit dc874cdc2f

View file

@ -368,51 +368,39 @@ Web::_createButtons()
leftButtonList_ .clear();
rightButtonList_ .clear();
QValueList<ButtonType> buttonSetupLeft, buttonSetupRight;
KConfig c("kwinwebrc");
QStringList buttonList;
if (c.hasGroup("Buttons"))
QString buttons = options->titleButtonsLeft() + "|" + options->titleButtonsRight();
QList<WebButton> *buttonList = &leftButtonList_;
for (unsigned int i = 0; i < buttons.length(); ++i)
{
c.setGroup("Buttons");
WebButton * tb = 0;
switch (buttons[i].latin1())
{
case 'S': // Sticky
tb = _createButton("Sticky", this);
break;
buttonList = c.readListEntry("Layout");
case 'H': // Help
tb = _createButton("Help", this);
break;
case 'I': // Minimize
tb = _createButton("Iconify", this);
break;
case 'A': // Maximize
tb = _createButton("Maximize", this);
break;
case 'X': // Close
tb = _createButton("Close", this);
break;
case '|':
buttonList = &rightButtonList_;
break;
}
else
{
buttonList << "Iconify" << "Sticky";
if (providesContextHelp())
buttonList << "Help";
buttonList << "Title";
buttonList << "Maximize" << "Close";
}
QStringList::ConstIterator it(buttonList.begin());
for (; it != buttonList.end(); ++it)
{
QString s(*it);
if ("Title" == s)
break; // Move to right-side buttons.
WebButton * tb = _createButton(*it, this);
if (0 != tb)
leftButtonList_.append(tb);
}
for (; it != buttonList.end(); ++it)
{
WebButton * tb = _createButton(*it, this);
if (0 != tb)
rightButtonList_.append(tb);
buttonList->append(tb);
}
if (!leftButtonList_.isEmpty())