summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kcontrol/displayconfig/displayconfig.cpp23
-rw-r--r--kcontrol/displayconfig/displayconfig.h3
-rw-r--r--kcontrol/displayconfig/displayconfigbase.ui2
-rw-r--r--kcontrol/displayconfig/monitorworkspace.cpp3
-rw-r--r--kcontrol/displayconfig/monitorworkspace.h1
5 files changed, 25 insertions, 7 deletions
diff --git a/kcontrol/displayconfig/displayconfig.cpp b/kcontrol/displayconfig/displayconfig.cpp
index f42d43923..2b7e7dde2 100644
--- a/kcontrol/displayconfig/displayconfig.cpp
+++ b/kcontrol/displayconfig/displayconfig.cpp
@@ -471,8 +471,12 @@ void KDisplayConfig::updateDraggableMonitorInformationInternal (int monitor_id,
if (::tqqt_cast<DraggableMonitor*>(TQT_TQWIDGET(monitors.at( i )))) {
DraggableMonitor *monitor = static_cast<DraggableMonitor*>(TQT_TQWIDGET(monitors.at( i )));
if (monitor->screen_id == j) {
+ monitor->is_primary = true; // Prevent dragging of the primary monitor
primary_monitor = monitor;
}
+ else {
+ monitor->is_primary = false;
+ }
}
}
}
@@ -634,8 +638,13 @@ void KDisplayConfig::moveMonitor(DraggableMonitor* monitor, int realx, int realy
for ( i = 0; i < int(monitors.count()); ++i ) {
if (::tqqt_cast<DraggableMonitor*>(TQT_TQWIDGET(monitors.at( i )))) {
DraggableMonitor *monitor = static_cast<DraggableMonitor*>(TQT_TQWIDGET(monitors.at( i )));
- if (monitor->screen_id == j)
+ if (monitor->screen_id == j) {
+ monitor->is_primary = true; // Prevent dragging of the primary monitor
primary_monitor = monitor;
+ }
+ else {
+ monitor->is_primary = false;
+ }
}
}
}
@@ -728,7 +737,7 @@ void KDisplayConfig::setRealResolutionSliderValue(int index) {
/**** KDisplayConfig ****/
KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &)
- : KCModule(KDisplayCFactory::instance(), parent, name), m_randrsimple(0), m_gammaApplyTimer(0)
+ : KCModule(KDisplayCFactory::instance(), parent, name), iccTab(0), m_randrsimple(0), m_gammaApplyTimer(0)
{
m_randrsimple = new KRandrSimpleAPI();
@@ -793,7 +802,7 @@ KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStrin
load();
- addTab( "iccconfig", i18n( "Color Profiles" ) ); // [FIXME[ No way to save settings here yet
+ iccTab = addTab( "iccconfig", i18n( "Color Profiles" ) ); // [FIXME] No way to save settings here yet
processLockoutControls();
}
@@ -1415,7 +1424,7 @@ void KDisplayConfig::processLockoutControls() {
base->loadExistingProfile->hide(); // Same as above
}
-void KDisplayConfig::addTab( const TQString name, const TQString label )
+KCModule* KDisplayConfig::addTab( const TQString name, const TQString label )
{
// [FIXME] This is incomplete...Apply may not work...
TQWidget *page = new TQWidget( base->mainTabContainerWidget, name.latin1() );
@@ -1430,9 +1439,11 @@ void KDisplayConfig::addTab( const TQString name, const TQString label )
connect( kcm, TQT_SIGNAL( changed(bool) ), this, TQT_SLOT( changed() ) );
//m_modules.insert(kcm, false);
+ return kcm;
}
else {
delete page;
+ return NULL;
}
}
@@ -1473,6 +1484,10 @@ void KDisplayConfig::save()
systemconfig->writeEntry("EnableDisplayControl", base->systemEnableSupport->isChecked());
systemconfig->sync();
+
+ if (iccTab) {
+ iccTab->save();
+ }
emit changed(false);
}
diff --git a/kcontrol/displayconfig/displayconfig.h b/kcontrol/displayconfig/displayconfig.h
index 35cf7fa6c..6c283e308 100644
--- a/kcontrol/displayconfig/displayconfig.h
+++ b/kcontrol/displayconfig/displayconfig.h
@@ -69,6 +69,7 @@ k_dcop:
private:
KConfig *config;
+ KCModule *iccTab;
bool _ok;
Display *randr_display;
ScreenInfo *randr_screen_info;
@@ -87,7 +88,7 @@ private:
TQPtrList<SingleScreenData> m_screenInfoArray;
int realResolutionSliderValue();
void setRealResolutionSliderValue(int index);
- void addTab( const TQString name, const TQString label );
+ KCModule* addTab( const TQString name, const TQString label );
void moveMonitor(DraggableMonitor* monitor, int realx, int realy);
bool applyMonitorLayoutRules(void);
bool applyMonitorLayoutRules(DraggableMonitor* primary_monitor);
diff --git a/kcontrol/displayconfig/displayconfigbase.ui b/kcontrol/displayconfig/displayconfigbase.ui
index a71dca758..161fb81ff 100644
--- a/kcontrol/displayconfig/displayconfigbase.ui
+++ b/kcontrol/displayconfig/displayconfigbase.ui
@@ -584,7 +584,7 @@
<cstring>gammaTipText2</cstring>
</property>
<property name="text">
- <string>Tip: Most computer software expects a gamma of 2.2.</string>
+ <string>Tip: Most computer software expects a gamma of 2.2.\nAdditionally, any ICC settings for the selected screen will override the gamma controls available on this tab.</string>
</property>
</widget>
<spacer row="4" column="0">
diff --git a/kcontrol/displayconfig/monitorworkspace.cpp b/kcontrol/displayconfig/monitorworkspace.cpp
index b8907b71d..2b1c4a6f7 100644
--- a/kcontrol/displayconfig/monitorworkspace.cpp
+++ b/kcontrol/displayconfig/monitorworkspace.cpp
@@ -122,7 +122,8 @@ void DraggableMonitor::mouseMoveEvent(TQMouseEvent *event)
if (moveToX > maxX) moveToX = maxX;
if (moveToY > maxY) moveToY = maxY;
- move(moveToX, moveToY);
+ if (!is_primary)
+ move(moveToX, moveToY);
}
void DraggableMonitor::mouseReleaseEvent(TQMouseEvent *event)
diff --git a/kcontrol/displayconfig/monitorworkspace.h b/kcontrol/displayconfig/monitorworkspace.h
index 3bbac4968..3dc5da637 100644
--- a/kcontrol/displayconfig/monitorworkspace.h
+++ b/kcontrol/displayconfig/monitorworkspace.h
@@ -69,6 +69,7 @@ signals:
public:
int screen_id;
+ bool is_primary;
private:
TQPoint lastMousePosition;