[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.0/kdegraphics/kgamma/kcmkgamma
From: Laurent Montel <montel () kde ! org>
Date: 2008-01-04 12:47:41
Message-ID: 1199450861.065417.26431.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 757197 by mlaurent:
Fix load it
Fix crash
(not forward change config.h to config-kgamma.h not necessary here)
M +22 -22 kgamma.cpp
M +0 -1 kgamma.desktop
--- branches/KDE/4.0/kdegraphics/kgamma/kcmkgamma/kgamma.cpp #757196:757197
@@ -61,7 +61,7 @@
}
K_PLUGIN_FACTORY(KGammaConfigFactory,
- registerPlugin<KGamma>("kgamma");
+ registerPlugin<KGamma>();
)
K_EXPORT_PLUGIN(KGammaConfigFactory("kcmkgamma"))
@@ -482,32 +482,32 @@
} // End while
f.close();
- for ( int i = 0; i < ScreenCount; i++ ) {
- for ( int j = 0; j < ScreenCount; j++ ) {
- if ( ScreenLayout[i] == Screen[j] ) {
- for ( int k = 0; k < ScreenCount; k++ ) {
- if ( Monitor[k] == ScreenMonitor[j] )
- assign[ScreenNr[i]] = k;
+ if(!Monitor.isEmpty() && !ScreenMonitor.isEmpty()) {
+ for ( int i = 0; i < ScreenCount; i++ ) {
+ for ( int j = 0; j < ScreenCount; j++ ) {
+ if ( ScreenLayout[i] == Screen[j] ) {
+ for ( int k = 0; k < ScreenCount; k++ ) {
+ if ( Monitor[k] == ScreenMonitor[j] )
+ assign[ScreenNr[i]] = k;
+ }
}
}
}
- }
+ // Extract gamma values
+ for ( int i = 0; i < ScreenCount; i++) {
+ rgamma[i] = ggamma[i] = bgamma[i] = "";
- // Extract gamma values
- for ( int i = 0; i < ScreenCount; i++) {
- rgamma[i] = ggamma[i] = bgamma[i] = "";
-
- QStringList words = Gamma[assign[i]].split(' ');
- QStringList::ConstIterator it = words.begin();
- if ( words.size() < 4 )
- rgamma[i] = ggamma[i] = bgamma[i] = *(++it); // single gamma value
- else {
- rgamma[i] = *(++it); // eventually rgb gamma values
- ggamma[i] = *(++it);
- bgamma[i] = *(++it);
+ QStringList words = Gamma[assign[i]].split(' ');
+ QStringList::ConstIterator it = words.begin();
+ if ( words.size() < 4 )
+ rgamma[i] = ggamma[i] = bgamma[i] = *(++it); // single gamma value
+ else {
+ rgamma[i] = *(++it); // eventually rgb gamma values
+ ggamma[i] = *(++it);
+ bgamma[i] = *(++it);
+ }
+ }
}
- }
-
}
return( validateGammaValues() );
}
--- branches/KDE/4.0/kdegraphics/kgamma/kcmkgamma/kgamma.desktop #757196:757197
@@ -130,5 +130,4 @@
X-KDE-ParentApp=kcontrol
-NoDisplay=true
Categories=Qt;KDE;Settings;X-KDE-settings-peripherals;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic