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 67d1513030)
pull/182/head
Michele Calgaro 4 years ago
parent 0439629d42
commit 5700a5b676
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -449,8 +449,7 @@ void KDisplayConfig::updateDraggableMonitorInformationInternal (int monitor_id,
return; return;
} }
TQString rotationDesired = *screendata->rotations.at(screendata->current_rotation_index); bool isvisiblyrotated = (screendata->current_rotation_index == ROTATION_90_DEGREES_INDEX) || (screendata->current_rotation_index == ROTATION_270_DEGREES_INDEX);
bool isvisiblyrotated = ((rotationDesired == ROTATION_90_DEGREES_STRING) || (rotationDesired == ROTATION_270_DEGREES_STRING));
if (screendata->is_extended) { if (screendata->is_extended) {
moved_monitor->show(); moved_monitor->show();
@ -1233,11 +1232,10 @@ void KDisplayConfig::updateDisplayedInformation () {
base->orientationVFlip->setChecked(screendata->has_y_flip); base->orientationVFlip->setChecked(screendata->has_y_flip);
} }
else { 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->rotationSelectDD->setCurrentItem(0);
base->orientationHFlip->hide(); base->orientationHFlip->hide();
base->orientationVFlip->hide(); base->orientationVFlip->hide();
} }
base->rotationSelectDD->blockSignals(false); base->rotationSelectDD->blockSignals(false);
base->orientationHFlip->blockSignals(false); base->orientationHFlip->blockSignals(false);
@ -1350,8 +1348,7 @@ void KDisplayConfig::updateDragDropDisplay() {
for (i=0;i<numberOfScreens;i++) { for (i=0;i<numberOfScreens;i++) {
screendata = m_screenInfoArray[activeProfileName].at(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 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 = ((screendata->current_rotation_index == ROTATION_90_DEGREES_INDEX) || (screendata->current_rotation_index == ROTATION_270_DEGREES_INDEX));
bool isvisiblyrotated = ((rotationDesired == ROTATION_90_DEGREES_STRING) || (rotationDesired == ROTATION_270_DEGREES_STRING));
DraggableMonitor *m = new DraggableMonitor( base->monitorPhyArrange, 0, WStyle_Customize | WDestructiveClose | WStyle_NoBorder | WX11BypassWM ); 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(workspaceRelayoutNeeded()), this, TQT_SLOT(layoutDragDropDisplay()));
connect(m, TQT_SIGNAL(monitorSelected(int)), this, TQT_SLOT(selectScreen(int))); connect(m, TQT_SIGNAL(monitorSelected(int)), this, TQT_SLOT(selectScreen(int)));

Loading…
Cancel
Save