summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-06-08 14:55:58 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-06-09 22:55:48 +0300
commit0fc217ede6b6a2c783cd95d5ca692ec7753f8fd2 (patch)
tree021256508a5bfc6fdf24053d5e73a077d3f8bfd6
parent10732c77436258fedaa9fb5bd676bf437dae946a (diff)
downloadtdebase-0fc217ede6b6a2c783cd95d5ca692ec7753f8fd2.tar.gz
tdebase-0fc217ede6b6a2c783cd95d5ca692ec7753f8fd2.zip
Mouse TDECM: do not hide checkboxes in case of option unavailability
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com> (cherry picked from commit 7cc4d46cf55b013a02b6c3b7df6b5d536e69f1f1)
-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()));