CVS_SILENT fixuifiles and i18n style guide fixes

svn path=/trunk/kdebase/kcontrol/; revision=322764
icc-effect-5.14.5
Stephan Binner 2004-06-22 10:07:48 +00:00
parent e91efe0aa9
commit 3fb1686c98
3 changed files with 23 additions and 41 deletions

View File

@ -1,4 +1,4 @@
/*
/*
* This file contains the B2 configuration widget
*
* Copyright (c) 2001
@ -22,7 +22,7 @@ extern "C"
}
/* NOTE:
/* NOTE:
* 'conf' is a pointer to the kwindecoration modules open kwin config,
* and is by default set to the "Style" group.
*
@ -36,45 +36,45 @@ B2Config::B2Config( KConfig* conf, QWidget* parent )
KGlobal::locale()->insertCatalogue("kwin_b2_config");
b2Config = new KConfig("kwinb2rc");
gb = new QVBox(parent);
cbColorBorder = new QCheckBox(
cbColorBorder = new QCheckBox(
i18n("Draw window frames using &titlebar colors"), gb);
QWhatsThis::add(cbColorBorder,
i18n("When selected, the window borders "
"are drawn using the titlebar colors. Otherwise, they are "
QWhatsThis::add(cbColorBorder,
i18n("When selected, the window borders "
"are drawn using the titlebar colors. Otherwise, they are "
"drawn using normal border colors instead."));
// Grab Handle
showGrabHandleCb = new QCheckBox(
i18n("Draw &resize handle"), gb);
QWhatsThis::add(showGrabHandleCb,
i18n("When selected, decorations are drawn with a \"grab handle\" "
QWhatsThis::add(showGrabHandleCb,
i18n("When selected, decorations are drawn with a \"grab handle\" "
"in the bottom left corner of the windows; "
"otherwise, no grab handle is drawn."));
// Double click menu option support
actionsGB = new QHGroupBox(i18n("Actions Settings"), gb);
QLabel *menuDblClickLabel = new QLabel(actionsGB);
menuDblClickLabel->setText(i18n("Double Click on Menu Button:"));
menuDblClickLabel->setText(i18n("Double click on menu button:"));
menuDblClickOp = new QComboBox(actionsGB);
menuDblClickOp->insertItem(i18n("Do Nothing"));
menuDblClickOp->insertItem(i18n("Minimize Window"));
menuDblClickOp->insertItem(i18n("Shade Window"));
menuDblClickOp->insertItem(i18n("Close Window"));
QWhatsThis::add(menuDblClickOp,
i18n("An action can be associated to a double click "
QWhatsThis::add(menuDblClickOp,
i18n("An action can be associated to a double click "
"of the menu button. Leave it to none if in doubt."));
// Load configuration options
load(conf);
// Ensure we track user changes properly
connect(cbColorBorder, SIGNAL(clicked()),
connect(cbColorBorder, SIGNAL(clicked()),
this, SLOT(slotSelectionChanged()));
connect(showGrabHandleCb, SIGNAL(clicked()),
connect(showGrabHandleCb, SIGNAL(clicked()),
this, SLOT(slotSelectionChanged()));
connect(menuDblClickOp, SIGNAL(activated(int)),
connect(menuDblClickOp, SIGNAL(activated(int)),
this, SLOT(slotSelectionChanged()));
// Make the widgets visible in kwindecoration
gb->show();
@ -99,16 +99,16 @@ void B2Config::slotSelectionChanged()
void B2Config::load(KConfig * /*conf*/)
{
b2Config->setGroup("General");
bool override = b2Config->readBoolEntry("UseTitleBarBorderColors", false);
cbColorBorder->setChecked(override);
override = b2Config->readBoolEntry( "DrawGrabHandle", true );
showGrabHandleCb->setChecked(override);
QString returnString = b2Config->readEntry(
"MenuButtonDoubleClickOperation", "NoOp");
int op;
if (returnString == "Close") {
op = 3;
@ -124,7 +124,7 @@ void B2Config::load(KConfig * /*conf*/)
}
static QString opToString(int op)
static QString opToString(int op)
{
switch (op) {
case 1:
@ -146,7 +146,7 @@ void B2Config::save(KConfig * /*conf*/)
b2Config->setGroup("General");
b2Config->writeEntry("UseTitleBarBorderColors", cbColorBorder->isChecked());
b2Config->writeEntry("DrawGrabHandle", showGrabHandleCb->isChecked());
b2Config->writeEntry("MenuButtonDoubleClickOperation",
b2Config->writeEntry("MenuButtonDoubleClickOperation",
opToString(menuDblClickOp->currentItem()));
// Ensure others trying to read this config get updated
b2Config->sync();

View File

@ -12,9 +12,6 @@
<height>480</height>
</rect>
</property>
<property name="caption">
<string>Form1</string>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
@ -47,9 +44,6 @@
<property name="text">
<string>&amp;New...</string>
</property>
<property name="accel">
<string>Alt+N</string>
</property>
</widget>
<widget class="KPushButton">
<property name="name">
@ -58,9 +52,6 @@
<property name="text">
<string>&amp;Modify...</string>
</property>
<property name="accel">
<string>Alt+M</string>
</property>
</widget>
<widget class="KPushButton">
<property name="name">
@ -80,9 +71,6 @@
<property name="text">
<string>Move &amp;Up</string>
</property>
<property name="accel">
<string>Alt+U</string>
</property>
</widget>
<widget class="KPushButton">
<property name="name">
@ -91,9 +79,6 @@
<property name="text">
<string>Move &amp;Down</string>
</property>
<property name="accel">
<string>Alt+D</string>
</property>
</widget>
<spacer>
<property name="name">

View File

@ -12,9 +12,6 @@
<height>477</height>
</rect>
</property>
<property name="caption">
<string>Form1</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>