CVS_SILENT fixuifiles and i18n style guide fixes
svn path=/trunk/kdebase/kcontrol/; revision=322764
This commit is contained in:
parent
e91efe0aa9
commit
3fb1686c98
3 changed files with 23 additions and 41 deletions
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* This file contains the B2 configuration widget
|
* This file contains the B2 configuration widget
|
||||||
*
|
*
|
||||||
* Copyright (c) 2001
|
* Copyright (c) 2001
|
||||||
|
@ -22,7 +22,7 @@ extern "C"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* NOTE:
|
/* NOTE:
|
||||||
* 'conf' is a pointer to the kwindecoration modules open kwin config,
|
* 'conf' is a pointer to the kwindecoration modules open kwin config,
|
||||||
* and is by default set to the "Style" group.
|
* 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");
|
KGlobal::locale()->insertCatalogue("kwin_b2_config");
|
||||||
b2Config = new KConfig("kwinb2rc");
|
b2Config = new KConfig("kwinb2rc");
|
||||||
gb = new QVBox(parent);
|
gb = new QVBox(parent);
|
||||||
|
|
||||||
cbColorBorder = new QCheckBox(
|
cbColorBorder = new QCheckBox(
|
||||||
i18n("Draw window frames using &titlebar colors"), gb);
|
i18n("Draw window frames using &titlebar colors"), gb);
|
||||||
QWhatsThis::add(cbColorBorder,
|
QWhatsThis::add(cbColorBorder,
|
||||||
i18n("When selected, the window borders "
|
i18n("When selected, the window borders "
|
||||||
"are drawn using the titlebar colors. Otherwise, they are "
|
"are drawn using the titlebar colors. Otherwise, they are "
|
||||||
"drawn using normal border colors instead."));
|
"drawn using normal border colors instead."));
|
||||||
|
|
||||||
// Grab Handle
|
// Grab Handle
|
||||||
showGrabHandleCb = new QCheckBox(
|
showGrabHandleCb = new QCheckBox(
|
||||||
i18n("Draw &resize handle"), gb);
|
i18n("Draw &resize handle"), gb);
|
||||||
QWhatsThis::add(showGrabHandleCb,
|
QWhatsThis::add(showGrabHandleCb,
|
||||||
i18n("When selected, decorations are drawn with a \"grab handle\" "
|
i18n("When selected, decorations are drawn with a \"grab handle\" "
|
||||||
"in the bottom left corner of the windows; "
|
"in the bottom left corner of the windows; "
|
||||||
"otherwise, no grab handle is drawn."));
|
"otherwise, no grab handle is drawn."));
|
||||||
|
|
||||||
// Double click menu option support
|
// Double click menu option support
|
||||||
actionsGB = new QHGroupBox(i18n("Actions Settings"), gb);
|
actionsGB = new QHGroupBox(i18n("Actions Settings"), gb);
|
||||||
QLabel *menuDblClickLabel = new QLabel(actionsGB);
|
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 = new QComboBox(actionsGB);
|
||||||
menuDblClickOp->insertItem(i18n("Do Nothing"));
|
menuDblClickOp->insertItem(i18n("Do Nothing"));
|
||||||
menuDblClickOp->insertItem(i18n("Minimize Window"));
|
menuDblClickOp->insertItem(i18n("Minimize Window"));
|
||||||
menuDblClickOp->insertItem(i18n("Shade Window"));
|
menuDblClickOp->insertItem(i18n("Shade Window"));
|
||||||
menuDblClickOp->insertItem(i18n("Close Window"));
|
menuDblClickOp->insertItem(i18n("Close Window"));
|
||||||
|
|
||||||
QWhatsThis::add(menuDblClickOp,
|
QWhatsThis::add(menuDblClickOp,
|
||||||
i18n("An action can be associated to a double click "
|
i18n("An action can be associated to a double click "
|
||||||
"of the menu button. Leave it to none if in doubt."));
|
"of the menu button. Leave it to none if in doubt."));
|
||||||
|
|
||||||
// Load configuration options
|
// Load configuration options
|
||||||
load(conf);
|
load(conf);
|
||||||
|
|
||||||
// Ensure we track user changes properly
|
// Ensure we track user changes properly
|
||||||
connect(cbColorBorder, SIGNAL(clicked()),
|
connect(cbColorBorder, SIGNAL(clicked()),
|
||||||
this, SLOT(slotSelectionChanged()));
|
this, SLOT(slotSelectionChanged()));
|
||||||
connect(showGrabHandleCb, SIGNAL(clicked()),
|
connect(showGrabHandleCb, SIGNAL(clicked()),
|
||||||
this, SLOT(slotSelectionChanged()));
|
this, SLOT(slotSelectionChanged()));
|
||||||
connect(menuDblClickOp, SIGNAL(activated(int)),
|
connect(menuDblClickOp, SIGNAL(activated(int)),
|
||||||
this, SLOT(slotSelectionChanged()));
|
this, SLOT(slotSelectionChanged()));
|
||||||
// Make the widgets visible in kwindecoration
|
// Make the widgets visible in kwindecoration
|
||||||
gb->show();
|
gb->show();
|
||||||
|
@ -99,16 +99,16 @@ void B2Config::slotSelectionChanged()
|
||||||
void B2Config::load(KConfig * /*conf*/)
|
void B2Config::load(KConfig * /*conf*/)
|
||||||
{
|
{
|
||||||
b2Config->setGroup("General");
|
b2Config->setGroup("General");
|
||||||
|
|
||||||
bool override = b2Config->readBoolEntry("UseTitleBarBorderColors", false);
|
bool override = b2Config->readBoolEntry("UseTitleBarBorderColors", false);
|
||||||
cbColorBorder->setChecked(override);
|
cbColorBorder->setChecked(override);
|
||||||
|
|
||||||
override = b2Config->readBoolEntry( "DrawGrabHandle", true );
|
override = b2Config->readBoolEntry( "DrawGrabHandle", true );
|
||||||
showGrabHandleCb->setChecked(override);
|
showGrabHandleCb->setChecked(override);
|
||||||
|
|
||||||
QString returnString = b2Config->readEntry(
|
QString returnString = b2Config->readEntry(
|
||||||
"MenuButtonDoubleClickOperation", "NoOp");
|
"MenuButtonDoubleClickOperation", "NoOp");
|
||||||
|
|
||||||
int op;
|
int op;
|
||||||
if (returnString == "Close") {
|
if (returnString == "Close") {
|
||||||
op = 3;
|
op = 3;
|
||||||
|
@ -124,7 +124,7 @@ void B2Config::load(KConfig * /*conf*/)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString opToString(int op)
|
static QString opToString(int op)
|
||||||
{
|
{
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -146,7 +146,7 @@ void B2Config::save(KConfig * /*conf*/)
|
||||||
b2Config->setGroup("General");
|
b2Config->setGroup("General");
|
||||||
b2Config->writeEntry("UseTitleBarBorderColors", cbColorBorder->isChecked());
|
b2Config->writeEntry("UseTitleBarBorderColors", cbColorBorder->isChecked());
|
||||||
b2Config->writeEntry("DrawGrabHandle", showGrabHandleCb->isChecked());
|
b2Config->writeEntry("DrawGrabHandle", showGrabHandleCb->isChecked());
|
||||||
b2Config->writeEntry("MenuButtonDoubleClickOperation",
|
b2Config->writeEntry("MenuButtonDoubleClickOperation",
|
||||||
opToString(menuDblClickOp->currentItem()));
|
opToString(menuDblClickOp->currentItem()));
|
||||||
// Ensure others trying to read this config get updated
|
// Ensure others trying to read this config get updated
|
||||||
b2Config->sync();
|
b2Config->sync();
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
<height>480</height>
|
<height>480</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
|
||||||
<string>Form1</string>
|
|
||||||
</property>
|
|
||||||
<hbox>
|
<hbox>
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>unnamed</cstring>
|
<cstring>unnamed</cstring>
|
||||||
|
@ -47,9 +44,6 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&New...</string>
|
<string>&New...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="accel">
|
|
||||||
<string>Alt+N</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="KPushButton">
|
<widget class="KPushButton">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
|
@ -58,9 +52,6 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Modify...</string>
|
<string>&Modify...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="accel">
|
|
||||||
<string>Alt+M</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="KPushButton">
|
<widget class="KPushButton">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
|
@ -80,9 +71,6 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move &Up</string>
|
<string>Move &Up</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="accel">
|
|
||||||
<string>Alt+U</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="KPushButton">
|
<widget class="KPushButton">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
|
@ -91,9 +79,6 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move &Down</string>
|
<string>Move &Down</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="accel">
|
|
||||||
<string>Alt+D</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="name">
|
<property name="name">
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
<height>477</height>
|
<height>477</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="caption">
|
|
||||||
<string>Form1</string>
|
|
||||||
</property>
|
|
||||||
<vbox>
|
<vbox>
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>unnamed</cstring>
|
<cstring>unnamed</cstring>
|
||||||
|
|
Loading…
Reference in a new issue