summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-08-07 22:35:25 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-08-09 21:42:34 +0900
commit5700a5b6769f91b66b8c23f04eea05de37e423cd (patch)
treeeec96048632c2279245da73165bf5e1807441f14
parent0439629d426b35e3527769e71f3527775aa85a98 (diff)
downloadtdebase-5700a5b6769f91b66b8c23f04eea05de37e423cd.tar.gz
tdebase-5700a5b6769f91b66b8c23f04eea05de37e423cd.zip
Improved code for tderandr rotation string to allow translation. This
relates to issue TDE/tdelibs#96. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 67d15130305a63abd741f457205db65e96531073)
-rw-r--r--kcontrol/displayconfig/displayconfig.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/kcontrol/displayconfig/displayconfig.cpp b/kcontrol/displayconfig/displayconfig.cpp
index dacb5cc88..ca8b867ac 100644
--- a/kcontrol/displayconfig/displayconfig.cpp
+++ b/kcontrol/displayconfig/displayconfig.cpp
@@ -449,8 +449,7 @@ void KDisplayConfig::updateDraggableMonitorInformationInternal (int monitor_id,
return;
}
- TQString rotationDesired = *screendata->rotations.at(screendata->current_rotation_index);
- bool isvisiblyrotated = ((rotationDesired == ROTATION_90_DEGREES_STRING) || (rotationDesired == ROTATION_270_DEGREES_STRING));
+ bool isvisiblyrotated = (screendata->current_rotation_index == ROTATION_90_DEGREES_INDEX) || (screendata->current_rotation_index == ROTATION_270_DEGREES_INDEX);
if (screendata->is_extended) {
moved_monitor->show();
@@ -1233,11 +1232,10 @@ void KDisplayConfig::updateDisplayedInformation () {
base->orientationVFlip->setChecked(screendata->has_y_flip);
}
else {
- base->rotationSelectDD->insertItem(ROTATION_0_DEGREES_STRING, 0);
+ base->rotationSelectDD->insertItem(screendata->rotations[ROTATION_0_DEGREES_INDEX], ROTATION_0_DEGREES_INDEX);
base->rotationSelectDD->setCurrentItem(0);
base->orientationHFlip->hide();
base->orientationVFlip->hide();
-
}
base->rotationSelectDD->blockSignals(false);
base->orientationHFlip->blockSignals(false);
@@ -1350,8 +1348,7 @@ void KDisplayConfig::updateDragDropDisplay() {
for (i=0;i<numberOfScreens;i++) {
screendata = m_screenInfoArray[activeProfileName].at(i);
if (((j==0) && (screendata->is_primary==true)) || ((j==1) && (screendata->is_primary==false))) { // This ensures that the primary monitor is always the first one created and placed on the configuration widget
- TQString rotationDesired = *screendata->rotations.at(screendata->current_rotation_index);
- bool isvisiblyrotated = ((rotationDesired == ROTATION_90_DEGREES_STRING) || (rotationDesired == ROTATION_270_DEGREES_STRING));
+ bool isvisiblyrotated = ((screendata->current_rotation_index == ROTATION_90_DEGREES_INDEX) || (screendata->current_rotation_index == ROTATION_270_DEGREES_INDEX));
DraggableMonitor *m = new DraggableMonitor( base->monitorPhyArrange, 0, WStyle_Customize | WDestructiveClose | WStyle_NoBorder | WX11BypassWM );
connect(m, TQT_SIGNAL(workspaceRelayoutNeeded()), this, TQT_SLOT(layoutDragDropDisplay()));
connect(m, TQT_SIGNAL(monitorSelected(int)), this, TQT_SLOT(selectScreen(int)));