summaryrefslogtreecommitdiffstats
path: root/kcontrol/input
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2024-06-08 14:55:58 +0300
committerTDE Gitea <[email protected]>2024-06-09 19:54:32 +0000
commit7cc4d46cf55b013a02b6c3b7df6b5d536e69f1f1 (patch)
treea7fa23a748d0b3abc7daa8f6bcfaaf5abfaccbcd /kcontrol/input
parent55c98d884901d4c50f60b769519b019e4f160052 (diff)
downloadtdebase-7cc4d46cf55b013a02b6c3b7df6b5d536e69f1f1.tar.gz
tdebase-7cc4d46cf55b013a02b6c3b7df6b5d536e69f1f1.zip
Mouse TDECM: do not hide checkboxes in case of option unavailability
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kcontrol/input')
-rw-r--r--kcontrol/input/mouse.cpp25
1 files changed, 4 insertions, 21 deletions
diff --git a/kcontrol/input/mouse.cpp b/kcontrol/input/mouse.cpp
index b0f9debf0..523696761 100644
--- a/kcontrol/input/mouse.cpp
+++ b/kcontrol/input/mouse.cpp
@@ -160,33 +160,16 @@ MouseConfig::MouseConfig (TQWidget * parent, const char *name)
connect( tab1->doubleClick, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotClick() ) );
connect( tab1->cbAutoSelect, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotClick() ) );
- // Only allow setting reversing scroll polarity if we have scroll buttons
unsigned char map[20];
int buttonCount = XGetPointerMapping(kapp->getDisplay(), map, 20);
- if ( buttonCount >= 5 )
- {
- tab1->cbScrollPolarity->setEnabled( true );
- tab1->cbScrollPolarity->show();
- }
- else
- {
- tab1->cbScrollPolarity->setEnabled( false );
- tab1->cbScrollPolarity->hide();
- }
+
+ // Only allow setting reversing scroll polarity if we have scroll buttons
+ tab1->cbScrollPolarity->setEnabled(buttonCount >= 5);
connect(tab1->cbScrollPolarity, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
connect(tab1->cbScrollPolarity, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotScrollPolarityChanged()));
// Only allow setting reversing history buttons (8, 9) if we have actually have them
- if ( buttonCount >= 9 )
- {
- tab1->cbRevHistButtons->setEnabled( true );
- tab1->cbRevHistButtons->show();
- }
- else
- {
- tab1->cbRevHistButtons->setEnabled( false );
- tab1->cbRevHistButtons->hide();
- }
+ tab1->cbRevHistButtons->setEnabled(buttonCount >= 9);
connect(tab1->cbRevHistButtons, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
connect(tab1->cbRevHistButtons, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotRevHistButtonsChanged()));