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

svn path=/trunk/kdebase/kwin/; revision=96753
icc-effect-5.14.5
Malte Starostik 2001-05-13 05:19:20 +00:00
parent d551bc8c15
commit dc874cdc2f
1 changed files with 26 additions and 38 deletions

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");
}
else
{
buttonList << "Iconify" << "Sticky";
case 'H': // Help
tb = _createButton("Help", this);
break;
if (providesContextHelp())
buttonList << "Help";
case 'I': // Minimize
tb = _createButton("Iconify", this);
break;
buttonList << "Title";
case 'A': // Maximize
tb = _createButton("Maximize", this);
break;
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);
case 'X': // Close
tb = _createButton("Close", this);
break;
case '|':
buttonList = &rightButtonList_;
break;
}
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())