File 4_7_BRANCH.diff of Package kdebase4-workspace.openSUSE_12.1_Update
--- a/BRANCH_STATUS
+++ b/BRANCH_STATUS
@@ -0,0 +1,2 @@
+current HEAD: 313e0c7ed3f574dfc38bb6dfe8d94a0a20e6c934
+git diff v4.7.2..origin/KDE/4.7
diff --git a/doc/plasma-desktop/index.docbook b/doc/plasma-desktop/index.docbook
index 697ed9b..21b458a 100644
--- a/doc/plasma-desktop/index.docbook
+++ b/doc/plasma-desktop/index.docbook
@@ -200,7 +200,7 @@ It allows you to switch between your virtual desktops.
If you change the layout of the <application>Pager</application>
through the <guimenuitem>Number of rows</guimenuitem> option,
which will also affect the layout and animations that are shown in &kwin;’s
-<guimenuitem>Desktop Grid</guimenuitem> effect – <!--(Switch on desktop effect,
+<guimenuitem>Desktop Grid</guimenuitem> effect.<!-- – (Switch on desktop effect,
press <keycombo action="simul">&Ctrl;<keycap>F8</keycap></keycombo> to see it.)
don't see that in 4.7-->
For larger pagers, selecting <guimenuitem>Display windows icons</guimenuitem>
diff --git a/kcontrol/dateandtime/kcmclock_actions.actions b/kcontrol/dateandtime/kcmclock_actions.actions
index 6b58273..8c66b0b 100644
--- a/kcontrol/dateandtime/kcmclock_actions.actions
+++ b/kcontrol/dateandtime/kcmclock_actions.actions
@@ -16,7 +16,7 @@ Name[eo]=Kontrol-Modulo de Dato kaj Tempo
Name[es]=Módulo de control de fecha y hora
Name[et]=Kuupäeva ja kellaaja juhtimismoodul
Name[eu]=Data eta ordua kontrolatzeko modulua
-Name[fi]=Päivämäärä- ja aikaohjausmoduuli
+Name[fi]=Päivämäärän ja ajan asetukset
Name[fr]=Module de contrôle de la date et de l'heure
Name[fy]=Datum en tiid kontrôle module
Name[ga]=Modúl Rialaithe Dáta agus Am
diff --git a/kcontrol/desktoptheme/desktoptheme.desktop b/kcontrol/desktoptheme/desktoptheme.desktop
index a07b8e3..f7b9def 100644
--- a/kcontrol/desktoptheme/desktoptheme.desktop
+++ b/kcontrol/desktoptheme/desktoptheme.desktop
@@ -24,7 +24,7 @@ Name[en_GB]=Desktop Theme
Name[es]=Tema de escritorio
Name[et]=Töölauateema
Name[eu]=Mahaigaineko gaia
-Name[fi]=Työpöydän teema
+Name[fi]=Työpöytäteema
Name[fr]=Thème de bureau
Name[ga]=Téama Deisce
Name[gu]=ડેસ્કટોપ થીમ
diff --git a/kcontrol/input/cursortheme.desktop b/kcontrol/input/cursortheme.desktop
index ab0f0df..98d7c6c 100644
--- a/kcontrol/input/cursortheme.desktop
+++ b/kcontrol/input/cursortheme.desktop
@@ -110,7 +110,7 @@ Comment[sr@latin]=Prilagodite izgled pokazivača miša
Comment[sv]=Anpassa muspekarens utseende
Comment[th]=ปรับแต่งชุดเคอร์เซอร์ของเมาส์เอง
Comment[tr]=Fare işaretçisi görünümünü özelleştir
-Comment[ug]=چاشقىنەك نۇر بەلگە قىياپىتىنى ئۆزلەشتۈر
+Comment[ug]=چاشقىنەك نۇربەلگە قىياپىتىنى ئۆزلەشتۈر
Comment[uk]=Налаштування вигляду вказівника миші на екрані
Comment[wa]=Mete a vosse môde li rivnance do cursoe del sori
Comment[x-test]=xxCustomize the mouse cursor appearancexx
diff --git a/kcontrol/input/kcmcursortheme.cpp b/kcontrol/input/kcmcursortheme.cpp
index 3f40e48..19d22d6 100644
--- a/kcontrol/input/kcmcursortheme.cpp
+++ b/kcontrol/input/kcmcursortheme.cpp
@@ -24,7 +24,7 @@
K_PLUGIN_FACTORY(CursorThemeConfigFactory,
registerPlugin<CursorThemeConfig>();
)
-K_EXPORT_PLUGIN(CursorThemeConfigFactory("kcm_cursortheme"))
+K_EXPORT_PLUGIN(CursorThemeConfigFactory("kcm_cursortheme", "kcminput"))
CursorThemeConfig::CursorThemeConfig(QWidget *parent, const QVariantList &args)
diff --git a/kcontrol/xinerama/xinerama.desktop b/kcontrol/xinerama/xinerama.desktop
index b1ea223..b08abfd 100644
--- a/kcontrol/xinerama/xinerama.desktop
+++ b/kcontrol/xinerama/xinerama.desktop
@@ -39,7 +39,7 @@ Name[es]=Varios monitores
Name[et]=Mitu monitori
Name[eu]=Monitore anitz
Name[fa]=نمایشگرهای چندگانه
-Name[fi]=Useita näyttöjä
+Name[fi]=Useat näytöt
Name[fr]=Moniteurs multiples
Name[fy]=Meardere byldskermen
Name[ga]=Scáileáin Iomadúla
diff --git a/kdm/kcm/kcmkdm_actions.actions b/kdm/kcm/kcmkdm_actions.actions
index e47bf11..e20df37 100644
--- a/kdm/kcm/kcmkdm_actions.actions
+++ b/kdm/kcm/kcmkdm_actions.actions
@@ -14,7 +14,7 @@ Name[en_GB]=Login Manager Control Module
Name[es]=Módulo de control de la gestión de acceso
Name[et]=Sisselogimishalduri juhtimismoodul
Name[eu]=Saio hasiera kudeatzeko aginte modulo bat
-Name[fi]=Kirjautumisruudun ohjausmoduuli
+Name[fi]=Kirjautumisruudun asetukset
Name[fr]=Module de contrôle du gestionnaire de connexion
Name[ga]=Modúl Rialaithe an Bhainisteora Logála Isteach
Name[he]=מודות הגדרות מנהל הכניסה למערכת
diff --git a/kinfocenter/Modules/devinfo/devinfo.desktop b/kinfocenter/Modules/devinfo/devinfo.desktop
index dad387b..f36aefa 100644
--- a/kinfocenter/Modules/devinfo/devinfo.desktop
+++ b/kinfocenter/Modules/devinfo/devinfo.desktop
@@ -64,7 +64,7 @@ Name[sv]=Enhetsvisning
Name[tg]=Намоишгари тасвирҳо
Name[th]=ตัวแสดงอุปกรณ์
Name[tr]=Aygıt Gösterici
-Name[ug]=ئۈسكىنە كۆرگۈ
+Name[ug]=ئۈسكۈنە كۆرگۈ
Name[uk]=Переглядач пристроїв
Name[wa]=Håyneu des éndjins
Name[x-test]=xxDevice Viewerxx
@@ -125,7 +125,7 @@ Comment[sv]=Enhetsvisning
Comment[tg]=Намоиши дастгоҳҳо
Comment[th]=ตัวแสดงอุปกรณ์
Comment[tr]=Aygıt Gösterici
-Comment[ug]=ئۈسكىنە كۆرگۈ
+Comment[ug]=ئۈسكۈنە كۆرگۈ
Comment[uk]=Переглядач пристроїв
Comment[wa]=Håyneu des éndjins
Comment[x-test]=xxDevice Viewerxx
diff --git a/kinfocenter/Modules/infosummary/kcm_infosummary.desktop b/kinfocenter/Modules/infosummary/kcm_infosummary.desktop
index aa4b4f7..ca3e1d1 100644
--- a/kinfocenter/Modules/infosummary/kcm_infosummary.desktop
+++ b/kinfocenter/Modules/infosummary/kcm_infosummary.desktop
@@ -65,7 +65,7 @@ Name[sr@latin]=Sažetak
Name[sv]=Översikt
Name[th]=สรุป
Name[tr]=Özet
-Name[ug]=ئۈزۈندە
+Name[ug]=ئۈزۈندى
Name[uk]=Резюме
Name[wa]=Racourti
Name[x-test]=xxSummaryxx
diff --git a/kmenuedit/basictab.cpp b/kmenuedit/basictab.cpp
index 611a5f3..8a0bd88 100644
--- a/kmenuedit/basictab.cpp
+++ b/kmenuedit/basictab.cpp
@@ -406,7 +406,7 @@ void BasicTab::setEntryInfo(MenuEntryInfo *entryInfo)
else // backwards comp.
_launchCB->setChecked(df->desktopGroup().readEntry("X-KDE-StartupNotify", true));
- _onlyShowInKdeCB->setChecked( df->desktopGroup().readXdgListEntry("OnlyShowIn").contains( "KDE" ) );
+ _onlyShowInKdeCB->setChecked( df->desktopGroup().readXdgListEntry("OnlyShowIn").contains( "KDE" ) ); // or maybe enable only if it contains nothing but KDE?
if ( df->desktopGroup().hasKey( "NoDisplay" ) )
_hiddenEntryCB->setChecked( df->desktopGroup().readEntry( "NoDisplay", true ) );
@@ -455,11 +455,18 @@ void BasicTab::apply()
dg.writeEntry( "NoDisplay", _hiddenEntryCB->isChecked() );
QStringList onlyShowIn = df->desktopGroup().readXdgListEntry("OnlyShowIn");
+ /* the exact semantics of this checkbox are unclear if there is more than just KDE in the list...
+ * For example: - The list is "Gnome;", the user enables "Only show in KDE" - should we remove Gnome?
+ * - The list is "Gnome;KDE;", the user unchecks the box - should we keep Gnome?
+ */
if ( _onlyShowInKdeCB->isChecked() && !onlyShowIn.contains("KDE"))
onlyShowIn << "KDE";
else if ( !_onlyShowInKdeCB->isChecked() && onlyShowIn.contains("KDE"))
onlyShowIn.removeAll("KDE");
- dg.writeXdgListEntry("OnlyShowIn", onlyShowIn);
+ if (onlyShowIn.isEmpty())
+ dg.deleteEntry("OnlyShowIn");
+ else
+ dg.writeXdgListEntry("OnlyShowIn", onlyShowIn);
}
else
{
diff --git a/kstyles/oxygen/oxygenstyle.cpp b/kstyles/oxygen/oxygenstyle.cpp
index 82cea25..71f138f 100644
--- a/kstyles/oxygen/oxygenstyle.cpp
+++ b/kstyles/oxygen/oxygenstyle.cpp
@@ -2053,19 +2053,15 @@ namespace Oxygen
//___________________________________________________________________________________________________________________
QRect Style::scrollBarSubControlRect( const QStyleOptionComplex* option, SubControl subControl, const QWidget* widget ) const
{
- const QRect& r = option->rect;
const State& flags( option->state );
const bool horizontal( flags&State_Horizontal );
switch ( subControl )
{
- //For both arrows, we return -everything-,
- //to get stuff to repaint right. See scrollBarInternalSubControlRect
- //for the real thing
+
case SC_ScrollBarSubLine:
case SC_ScrollBarAddLine:
- if( horizontal ) return r.adjusted( 0, 1, 0, -1 );
- else return r.adjusted( 1, 0, -1, 0 );
+ return scrollBarInternalSubControlRect( option, subControl );
//The main groove area. This is used to compute the others...
case SC_ScrollBarGroove:
@@ -2083,41 +2079,40 @@ namespace Oxygen
botRightCorner = QPoint( bot.left() - 1, top.bottom() );
} else {
+
topLeftCorner = QPoint( top.left(), top.bottom() + 1 );
botRightCorner = QPoint( top.right(), bot.top() - 1 );
+
}
- // define rect, and reduce margins
- QRect r( topLeftCorner, botRightCorner );
- if( horizontal ) r.adjust( 0, 1, 0, -1 );
- else r.adjust( 1, 0, -1, 0 );
+ // define rect
+ return handleRTL( option, QRect( topLeftCorner, botRightCorner ) );
- return handleRTL( option, r );
}
case SC_ScrollBarSlider:
{
- const QStyleOptionSlider* slOpt = qstyleoption_cast<const QStyleOptionSlider*>( option );
- if( !slOpt ) return QRect();
+ const QStyleOptionSlider* sliderOption( qstyleoption_cast<const QStyleOptionSlider*>( option ) );
+ if( !sliderOption ) return QRect();
//We do handleRTL here to unreflect things if need be
QRect groove = handleRTL( option, scrollBarSubControlRect( option, SC_ScrollBarGroove, widget ) );
- if ( slOpt->minimum == slOpt->maximum ) return groove;
+ if ( sliderOption->minimum == sliderOption->maximum ) return groove;
//Figure out how much room we have..
int space( horizontal ? groove.width() : groove.height() );
//Calculate the portion of this space that the slider should take up.
- int sliderSize = space * qreal( slOpt->pageStep ) / ( slOpt->maximum - slOpt->minimum + slOpt->pageStep );
+ int sliderSize = space * qreal( sliderOption->pageStep ) / ( sliderOption->maximum - sliderOption->minimum + sliderOption->pageStep );
sliderSize = qMax( sliderSize, ( int )ScrollBar_MinimumSliderHeight );
sliderSize = qMin( sliderSize, space );
space -= sliderSize;
if( space <= 0 ) return groove;
- int pos = qRound( qreal( slOpt->sliderPosition - slOpt->minimum )/ ( slOpt->maximum - slOpt->minimum )*space );
- if( slOpt->upsideDown ) pos = space - pos;
+ int pos = qRound( qreal( sliderOption->sliderPosition - sliderOption->minimum )/ ( sliderOption->maximum - sliderOption->minimum )*space );
+ if( sliderOption->upsideDown ) pos = space - pos;
if( horizontal ) return handleRTL( option, QRect( groove.x() + pos, groove.y(), sliderSize, groove.height() ) );
else return handleRTL( option, QRect( groove.x(), groove.y() + pos, groove.width(), sliderSize ) );
}
@@ -5137,10 +5132,10 @@ namespace Oxygen
{
// cast option and check
- const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>( option );
- if( !slider ) return true;
+ const QStyleOptionSlider *sliderOption = qstyleoption_cast<const QStyleOptionSlider *>( option );
+ if( !sliderOption ) return true;
- const QRect& r( option->rect );
+ QRect r( option->rect );
const QPalette& palette( option->palette );
const State& flags( option->state );
@@ -5149,17 +5144,87 @@ namespace Oxygen
const bool mouseOver( enabled && ( flags&State_MouseOver ) );
// enable animation state
- animations().scrollBarEngine().updateState( widget, enabled && slider && ( slider->activeSubControls & SC_ScrollBarSlider ) );
-
+ animations().scrollBarEngine().updateState( widget, enabled && ( sliderOption->activeSubControls & SC_ScrollBarSlider ) );
const bool animated( enabled && animations().scrollBarEngine().isAnimated( widget, SC_ScrollBarSlider ) );
if( horizontal )
{
+
+ // adjust rect
+ r.adjust( 0, 1, 0, -1 );
+ const bool reverseLayout( option->direction == Qt::RightToLeft );
+ if( reverseLayout )
+ {
+ if( _addLineButtons == NoButton ) r.adjust( -2, 0, 0, 0 );
+ if( _subLineButtons == NoButton ) r.adjust( 0, 0, -1, 0 );
+ } else {
+ if( _addLineButtons == NoButton ) r.adjust( 0, 0, 2, 0 );
+ if( _subLineButtons == NoButton ) r.adjust( 1, 0, 0, 0 );
+ }
+
+ // prepare hole rendering
+ QRect holeRect( r.adjusted( -4, 0, 4, 0 ) );
+ if( reverseLayout )
+ {
+ if( _addLineButtons == NoButton ) holeRect.adjust( -1, 0, 0, 0 );
+ if( _subLineButtons == NoButton ) holeRect.adjust( 0, 0, 1, 0 );
+ } else if( _subLineButtons == NoButton ) holeRect.adjust( -1, 0, 0, 0 );
+
+ // check if scrollbar is at maximum or minimum
+ TileSet::Tiles tiles( TileSet::Vertical );
+ if( _addLineButtons == NoButton && sliderOption->sliderValue == sliderOption->maximum )
+ {
+ if( reverseLayout )
+ {
+ tiles |= TileSet::Left;
+ holeRect.adjust( 5, 0, 0, 0 );
+ } else {
+ tiles |= TileSet::Right;
+ holeRect.adjust( 0, 0, -4, 0 );
+ }
+ }
+
+ if( _subLineButtons == NoButton && sliderOption->sliderValue == sliderOption->minimum )
+ {
+ if( reverseLayout )
+ {
+ tiles |= TileSet::Right;
+ holeRect.adjust( 0, 0, -5, 0 );
+ } else {
+ tiles |= TileSet::Left;
+ holeRect.adjust( 5, 0, 0, 0 );
+ }
+ }
+
+ // render
+ renderScrollBarHole( painter, holeRect, palette.color( QPalette::Window ), Qt::Horizontal, tiles );
if( animated ) renderScrollBarHandle( painter, r, palette, Qt::Horizontal, mouseOver, animations().scrollBarEngine().opacity( widget, SC_ScrollBarSlider ) );
else renderScrollBarHandle( painter, r, palette, Qt::Horizontal, mouseOver );
} else {
+ // adjust rect
+ r.adjust( 1, 0, -1, 0 );
+
+ // prepare hole rendering
+ TileSet::Tiles tiles( TileSet::Horizontal );
+ QRect holeRect( r.adjusted( 0, -3, 0, 4 ) );
+
+ // check if scrollbar is at maximum or minimum
+ if( _addLineButtons == NoButton && sliderOption->sliderValue == sliderOption->maximum )
+ {
+ tiles |= TileSet::Bottom;
+ holeRect.adjust( 0, 0, 0, -4 );
+ }
+
+ if( _subLineButtons == NoButton && sliderOption->sliderValue == sliderOption->minimum )
+ {
+ tiles |= TileSet::Top;
+ holeRect.adjust( 0, 5, 0, 0 );
+ }
+
+ // render
+ renderScrollBarHole( painter, holeRect, palette.color( QPalette::Window ), Qt::Vertical, tiles );
if( animated ) renderScrollBarHandle( painter, r, palette, Qt::Vertical, mouseOver, animations().scrollBarEngine().opacity( widget, SC_ScrollBarSlider ) );
else renderScrollBarHandle( painter, r, palette, Qt::Vertical, mouseOver );
@@ -5172,9 +5237,12 @@ namespace Oxygen
bool Style::drawScrollBarAddLineControl( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const
{
+ // do nothing if no buttons are defined
+ if( _addLineButtons == NoButton ) return true;
+
// cast option and check
- const QStyleOptionSlider* slOpt = qstyleoption_cast<const QStyleOptionSlider*>( option );
- if ( !slOpt ) return true;
+ const QStyleOptionSlider* sliderOption( qstyleoption_cast<const QStyleOptionSlider*>( option ) );
+ if ( !sliderOption ) return true;
const State& flags( option->state );
const bool horizontal( flags & State_Horizontal );
@@ -5185,22 +5253,24 @@ namespace Oxygen
const QColor background( palette.color( QPalette::Window ) );
// adjust rect, based on number of buttons to be drawn
- const QRect r( scrollBarInternalSubControlRect( slOpt, SC_ScrollBarAddLine ) );
+ QRect r( scrollBarInternalSubControlRect( sliderOption, SC_ScrollBarAddLine ) );
// draw the end of the scrollbar groove
if( horizontal )
{
- if( reverseLayout ) renderScrollBarHole( painter, QRect( r.right()+1, r.top(), 5, r.height() ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Left );
- else renderScrollBarHole( painter, QRect( r.left()-5, r.top(), 5, r.height() ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Right );
+ if( reverseLayout ) renderScrollBarHole( painter, QRect( r.right(), r.top()+1, 6, r.height()-2 ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Left );
+ else renderScrollBarHole( painter, QRect( r.left()-5, r.top()+1, 6, r.height()-2 ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Right );
+
+ } else {
- } else renderScrollBarHole( painter, QRect( r.left(), r.top()-5, r.width(), 5 ), background, Qt::Vertical, TileSet::Bottom | TileSet::Horizontal );
+ QRect holeRect( r.left()+1, r.top()-5, r.width()-2, 6 );
+ renderScrollBarHole( painter, holeRect, background, Qt::Vertical, TileSet::Bottom | TileSet::Horizontal );
- // stop here if no buttons are defined
- if( _addLineButtons == NoButton ) return true;
+ }
QColor color;
- QStyleOption localOption( *option );
+ QStyleOptionSlider localOption( *sliderOption );
if( _addLineButtons == DoubleButton )
{
@@ -5253,22 +5323,56 @@ namespace Oxygen
{
// cast option and check
- const QStyleOptionSlider* slOpt = qstyleoption_cast<const QStyleOptionSlider*>( option );
- if ( !slOpt ) return true;
+ const QStyleOptionSlider* sliderOption( qstyleoption_cast<const QStyleOptionSlider*>( option ) );
+ if ( !sliderOption ) return true;
- const QRect& r( option->rect );
+ QRect r( option->rect );
const QPalette& palette( option->palette );
const QColor color( palette.color( QPalette::Window ) );
const State& flags( option->state );
const bool horizontal( flags & State_Horizontal );
- const bool reverseLayout( slOpt->direction == Qt::RightToLeft );
+ const bool reverseLayout( sliderOption->direction == Qt::RightToLeft );
+ // define tiles and adjust rect
if( horizontal )
{
- if( reverseLayout ) renderScrollBarHole( painter, r.adjusted( 0,0,10,0 ), color, Qt::Horizontal, TileSet::Vertical );
- else renderScrollBarHole( painter, r.adjusted( -10, 0,0,0 ), color, Qt::Horizontal, TileSet::Vertical );
- } else renderScrollBarHole( painter, r.adjusted( 0,-10,0,0 ), color, Qt::Vertical, TileSet::Horizontal );
+
+ TileSet::Tiles tiles( TileSet::Vertical );
+ if( reverseLayout )
+ {
+
+ if( _addLineButtons == NoButton )
+ {
+
+ tiles |= TileSet::Left;
+ r.adjust( -2, 1, 10, -1 );
+
+ } else r.adjust( 0, 1, 10, -1 );
+
+ } else if( _addLineButtons == NoButton ) {
+
+ tiles |= TileSet::Right;
+ r.adjust( -10, 1, 2, -1 );
+
+ } else r.adjust( -10, 1, 0, -1 );
+
+ renderScrollBarHole( painter, r, color, Qt::Horizontal, tiles );
+
+ } else {
+
+ TileSet::Tiles tiles( TileSet::Horizontal );
+ if( _addLineButtons == NoButton )
+ {
+
+ tiles |= TileSet::Bottom;
+ r.adjust( 1, -10, -1, 0 );
+
+ } else r.adjust( 1, -10, -1, 0 );
+
+ renderScrollBarHole( painter, r, color, Qt::Vertical, tiles );
+
+ }
return true;
@@ -5278,9 +5382,12 @@ namespace Oxygen
bool Style::drawScrollBarSubLineControl( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const
{
+ // do nothing if no buttons are set
+ if( _subLineButtons == NoButton ) return true;
+
// cast option and check
- const QStyleOptionSlider* slOpt = qstyleoption_cast<const QStyleOptionSlider*>( option );
- if ( !slOpt ) return true;
+ const QStyleOptionSlider* sliderOption( qstyleoption_cast<const QStyleOptionSlider*>( option ) );
+ if ( !sliderOption ) return true;
const State& flags( option->state );
const bool horizontal( flags & State_Horizontal );
@@ -5292,29 +5399,25 @@ namespace Oxygen
// adjust rect, based on number of buttons to be drawn
- QRect r( scrollBarInternalSubControlRect( slOpt, SC_ScrollBarSubLine ) );
+ QRect r( scrollBarInternalSubControlRect( sliderOption, SC_ScrollBarSubLine ) );
// draw the end of the scrollbar groove
if( horizontal )
{
- if( reverseLayout ) renderScrollBarHole( painter, QRect( r.left()-5, r.top(), 5, r.height() ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Right );
- else renderScrollBarHole( painter, QRect( r.right()+1, r.top(), 5, r.height() ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Left );
-
+ if( reverseLayout ) renderScrollBarHole( painter, QRect( r.left()-5, r.top()+1, 5, r.height()-2 ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Right );
+ else renderScrollBarHole( painter, QRect( r.right()+1, r.top()+1, 5, r.height()-2 ), background, Qt::Horizontal, TileSet::Vertical | TileSet::Left );
r.translate( 1, 0 );
} else {
- renderScrollBarHole( painter, QRect( r.left(), r.bottom()+3, r.width(), 5 ), background, Qt::Vertical, TileSet::Top | TileSet::Horizontal );
+ renderScrollBarHole( painter, QRect( r.left()+1, r.bottom()+3, r.width()-2, 5 ), background, Qt::Vertical, TileSet::Top | TileSet::Horizontal );
r.translate( 0, 2 );
}
- // stop here if no buttons are defined
- if( _subLineButtons == NoButton ) return true;
-
QColor color;
- QStyleOption localOption( *option );
+ QStyleOptionSlider localOption( *sliderOption );
if( _subLineButtons == DoubleButton )
{
@@ -5367,22 +5470,48 @@ namespace Oxygen
{
// cast option and check
- const QStyleOptionSlider* slOpt = qstyleoption_cast<const QStyleOptionSlider*>( option );
- if ( !slOpt ) return true;
+ const QStyleOptionSlider* sliderOption( qstyleoption_cast<const QStyleOptionSlider*>( option ) );
+ if ( !sliderOption ) return true;
- const QRect& r( option->rect );
+ QRect r( option->rect );
const QPalette& palette( option->palette );
const QColor color( palette.color( QPalette::Window ) );
const State& flags( option->state );
const bool horizontal( flags & State_Horizontal );
- const bool reverseLayout( slOpt->direction == Qt::RightToLeft );
+ const bool reverseLayout( sliderOption->direction == Qt::RightToLeft );
if( horizontal )
{
- if( reverseLayout ) renderScrollBarHole( painter, r.adjusted( -10, 0,0,0 ), color, Qt::Horizontal, TileSet::Vertical );
- else renderScrollBarHole( painter, r.adjusted( 0,0,10,0 ), color, Qt::Horizontal, TileSet::Vertical );
- } else renderScrollBarHole( painter, r.adjusted( 0,2,0,12 ), color, Qt::Vertical, TileSet::Horizontal );
+
+ TileSet::Tiles tiles( TileSet::Vertical );
+ if( reverseLayout )
+ {
+ if( _subLineButtons == NoButton )
+ {
+ tiles |= TileSet::Right;
+ r.adjust( -10, 1, -1, -1 );
+
+ } else r.adjust( -10, 1, 0, -1 );
+
+ } else if( _subLineButtons == NoButton ) {
+
+ tiles |= TileSet::Left;
+ r.adjust( 1, 1, 10, -1 );
+
+ } else r.adjust( 0, 1, 10, -1 );
+
+ renderScrollBarHole( painter, r, color, Qt::Horizontal, tiles );
+
+ } else {
+
+ TileSet::Tiles tiles( TileSet::Horizontal );
+ if( _subLineButtons == NoButton ) tiles |= TileSet::Top;
+
+ r.adjust( 1, 2, -1, 12 );
+ renderScrollBarHole( painter, r, color, Qt::Vertical, tiles );
+
+ }
return true;
@@ -9298,24 +9427,14 @@ namespace Oxygen
if( !r.isValid() ) return;
- painter->save();
- painter->setRenderHints( QPainter::Antialiasing );
-
- // draw the hole as background
+ // define rect and check
const bool horizontal( orientation == Qt::Horizontal );
- const QRect holeRect( horizontal ? r.adjusted( -4,0,4,0 ) : r.adjusted( 0,-3,0,4 ) );
- renderScrollBarHole( painter, holeRect, palette.color( QPalette::Window ), orientation, horizontal ? TileSet::Vertical : TileSet::Horizontal );
-
- // draw the slider itself
QRectF rect( horizontal ? r.adjusted( 3, 2, -3, -3 ):r.adjusted( 3, 4, -3, -3 ) );
+ if( !rect.isValid() ) return;
- if( !rect.isValid() )
- {
- // e.g. not enough height
- painter->restore();
- return;
- }
+ painter->save();
+ painter->setRenderHints( QPainter::Antialiasing );
const QColor color( palette.color( QPalette::Button ) );
// draw the slider
@@ -9362,6 +9481,7 @@ namespace Oxygen
}
painter->restore();
+ return;
}
@@ -9396,7 +9516,7 @@ namespace Oxygen
}
//______________________________________________________________________________
- QColor Style::scrollBarArrowColor( const QStyleOption* option, const SubControl& control, const QWidget* widget ) const
+ QColor Style::scrollBarArrowColor( const QStyleOptionSlider* option, const SubControl& control, const QWidget* widget ) const
{
const QRect& r( option->rect );
const QPalette& palette( option->palette );
diff --git a/kstyles/oxygen/oxygenstyle.h b/kstyles/oxygen/oxygenstyle.h
index f8bd4a3..2fcd8ce 100644
--- a/kstyles/oxygen/oxygenstyle.h
+++ b/kstyles/oxygen/oxygenstyle.h
@@ -57,6 +57,7 @@
#include <QtGui/QDockWidget>
#include <QtGui/QMdiSubWindow>
#include <QtGui/QStyleOption>
+#include <QtGui/QStyleOptionSlider>
#include <QtGui/QToolBar>
#include <QtGui/QToolBox>
#include <QtGui/QWidget>
@@ -750,7 +751,7 @@ namespace Oxygen
void renderScrollBarArrow( QPainter*, const QRect&, const QColor&, const QColor&, ArrowOrientation ) const;
//! returns true if given scrollbar arrow is animated
- QColor scrollBarArrowColor( const QStyleOption*, const SubControl&, const QWidget* ) const;
+ QColor scrollBarArrowColor( const QStyleOptionSlider*, const SubControl&, const QWidget* ) const;
//! slider tickmarks
void renderSliderTickmarks( QPainter*, const QStyleOptionSlider*, const QWidget* ) const;
diff --git a/kstyles/oxygen/oxygenstylehelper.cpp b/kstyles/oxygen/oxygenstylehelper.cpp
index e943302..85d62f5 100644
--- a/kstyles/oxygen/oxygenstylehelper.cpp
+++ b/kstyles/oxygen/oxygenstylehelper.cpp
@@ -28,6 +28,11 @@
#include <math.h>
+#ifdef Q_WS_X11
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#endif
+
namespace Oxygen
{
@@ -35,7 +40,20 @@ namespace Oxygen
StyleHelper::StyleHelper( const QByteArray &componentName ):
Helper( componentName ),
_debugArea( KDebug::registerArea( "Oxygen ( style )" ) )
- {}
+ {
+
+ #ifdef Q_WS_X11
+ // get display
+ Display *display = QX11Info::display();
+
+ // create compositing screen
+ QByteArray buffer;
+ QTextStream( &buffer ) << "_NET_WM_CM_S" << DefaultScreen( display );
+ _compositingManagerAtom = XInternAtom( display, buffer.constData(), False);
+
+ #endif
+
+ }
//______________________________________________________________________________
void StyleHelper::invalidateCaches( void )
@@ -626,6 +644,18 @@ namespace Oxygen
}
//________________________________________________________________________________________________________
+ bool StyleHelper::compositingActive( void ) const
+ {
+ #ifdef Q_WS_X11
+ // direct call to X
+ return XGetSelectionOwner( QX11Info::display(), _compositingManagerAtom ) != None;
+ #else
+ // use KWindowSystem
+ return KWindowSystem::compositingActive();
+ #endif
+ }
+
+ //________________________________________________________________________________________________________
bool StyleHelper::hasDecoration( const QWidget* widget ) const
{
if( !widget->isTopLevel() ) return false;
diff --git a/kstyles/oxygen/oxygenstylehelper.h b/kstyles/oxygen/oxygenstylehelper.h
index 7bb6239..8e8cf2c 100644
--- a/kstyles/oxygen/oxygenstylehelper.h
+++ b/kstyles/oxygen/oxygenstylehelper.h
@@ -30,6 +30,7 @@
#ifdef Q_WS_X11
#include <QtGui/QX11Info>
+#include <X11/Xdefs.h>
#endif
//! helper class
@@ -184,8 +185,7 @@ namespace Oxygen
//!@name utility functions
//! returns true if compositing is active
- bool compositingActive( void ) const
- { return KWindowSystem::compositingActive(); }
+ bool compositingActive( void ) const;
//! returns true if a given widget supports alpha channel
inline bool hasAlphaChannel( const QWidget* ) const;
@@ -242,6 +242,13 @@ namespace Oxygen
TileSetCache _scrollHoleCache;
TileSetCache _selectionCache;
+ #ifdef Q_WS_X11
+
+ //! background gradient hint atom
+ Atom _compositingManagerAtom;
+
+ #endif
+
};
//____________________________________________________________________
@@ -261,6 +268,7 @@ namespace Oxygen
//____________________________________________________________________
bool StyleHelper::hasAlphaChannel( const QWidget* widget ) const
{
+
#ifdef Q_WS_X11
if( compositingActive() )
{
diff --git a/kwin/clients/aurorae/src/lib/auroraebutton.cpp b/kwin/clients/aurorae/src/lib/auroraebutton.cpp
index 1c66305..1f54a90 100644
--- a/kwin/clients/aurorae/src/lib/auroraebutton.cpp
+++ b/kwin/clients/aurorae/src/lib/auroraebutton.cpp
@@ -185,8 +185,7 @@ void AuroraeButton::mousePressEvent(QGraphicsSceneMouseEvent* event)
void AuroraeButton::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
{
- Q_UNUSED(event)
- if (m_pressed) {
+ if (m_pressed && contains(event->pos())) {
emit clicked();
}
m_pressed = false;
@@ -391,7 +390,7 @@ void AuroraeMaximizeButton::mousePressEvent(QGraphicsSceneMouseEvent* event)
void AuroraeMaximizeButton::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
{
- if (isPressed() && m_pressedButton == event->button()) {
+ if (isPressed() && m_pressedButton == event->button() && contains(event->pos())) {
emit clicked(m_pressedButton);
}
setPressed(false);
diff --git a/kwin/clients/oxygen/oxygenclient.cpp b/kwin/clients/oxygen/oxygenclient.cpp
index f650af5..79285a6 100644
--- a/kwin/clients/oxygen/oxygenclient.cpp
+++ b/kwin/clients/oxygen/oxygenclient.cpp
@@ -652,6 +652,10 @@ namespace Oxygen
// base color
QColor color( palette.window().color() );
+ // add alpha channel
+ if( _itemData.count() == 1 && glowIsAnimated() )
+ { color = helper().alphaColor( color, glowIntensity() ); }
+
// title height
const int titleHeight( layoutMetric( LM_TitleEdgeTop ) + layoutMetric( LM_TitleEdgeBottom ) + layoutMetric( LM_TitleHeight ) );
@@ -681,16 +685,24 @@ namespace Oxygen
// adjustements to cope with shadow size and outline border.
rect.adjust( -shadowSize, 0, shadowSize-1, 0 );
- if( configuration().frameBorder() > Configuration::BorderTiny && configuration().drawTitleOutline() && isActive() && !isMaximized() )
- { rect.adjust( HFRAMESIZE-1, 0, -HFRAMESIZE+1, 0 ); }
+ if( configuration().drawTitleOutline() && ( isActive() || glowIsAnimated() ) && !isMaximized() )
+ {
+ if( configuration().frameBorder() == Configuration::BorderTiny ) rect.adjust( 1, 0, -1, 0 );
+ else if( configuration().frameBorder() > Configuration::BorderTiny ) rect.adjust( HFRAMESIZE-1, 0, -HFRAMESIZE+1, 0 );
+ }
- helper().slab( color, 0, shadowSize )->render( rect, painter, TileSet::Top );
+ if( rect.isValid() )
+ { helper().slab( color, 0, shadowSize )->render( rect, painter, TileSet::Top ); }
}
- if( configuration().drawTitleOutline() && isActive() )
+ if( configuration().drawTitleOutline() && ( isActive() || glowIsAnimated() ) )
{
+ // save old hints and turn off anti-aliasing
+ const QPainter::RenderHints hints( painter->renderHints() );
+ painter->setRenderHint( QPainter::Antialiasing, false );
+
// save mask and frame to where
// grey window background is to be rendered
QRegion mask;
@@ -710,7 +722,7 @@ namespace Oxygen
const QColor shadow( helper().calcDarkColor( color ) );
painter->setPen( shadow );
- painter->drawLine( rect.bottomLeft()+QPoint(0,1), rect.bottomRight()+QPoint(0,1) );
+ painter->drawLine( rect.bottomLeft()+QPoint(-1,1), rect.bottomRight()+QPoint(1,1) );
}
@@ -740,6 +752,9 @@ namespace Oxygen
painter->drawLine( rect.topRight()+QPoint(1,0), rect.bottomRight()+QPoint(1, 0) );
}
+ // restore old hints
+ painter->setRenderHints( hints );
+
// in preview mode also adds center square
if( isPreview() )
{
@@ -826,7 +841,14 @@ namespace Oxygen
const int offset( -3 );
const int voffset( 5-shadowSize );
const QRect adjustedRect( rect.adjusted(offset, voffset, -offset, shadowSize) );
- helper().slab( palette.color( widget()->backgroundRole() ), 0, shadowSize )->render( adjustedRect, painter, TileSet::Tiles(TileSet::Top|TileSet::Left|TileSet::Right) );
+ QColor color( palette.color( widget()->backgroundRole() ) );
+
+ // add alpha channel
+ if( _itemData.count() == 1 && glowIsAnimated() )
+ { color = helper().alphaColor( color, glowIntensity() ); }
+
+ // render slab
+ helper().slab( color, 0, shadowSize )->render( adjustedRect, painter, TileSet::Tiles(TileSet::Top|TileSet::Left|TileSet::Right) );
}
diff --git a/kwin/clients/oxygen/oxygenclient.h b/kwin/clients/oxygen/oxygenclient.h
index 088c40f..e1fb9eb 100644
--- a/kwin/clients/oxygen/oxygenclient.h
+++ b/kwin/clients/oxygen/oxygenclient.h
@@ -355,7 +355,7 @@ namespace Oxygen
return
clientGroupItems().count() >= 2 ||
_itemData.isAnimated() ||
- ( isActive() && configuration().drawTitleOutline() );
+ ( (isActive()||glowIsAnimated()) && configuration().drawTitleOutline() );
}
//! calculate mask
diff --git a/kwin/effects/highlightwindow/highlightwindow.desktop b/kwin/effects/highlightwindow/highlightwindow.desktop
index 1689023..c89a4d8 100644
--- a/kwin/effects/highlightwindow/highlightwindow.desktop
+++ b/kwin/effects/highlightwindow/highlightwindow.desktop
@@ -125,7 +125,7 @@ Comment[sr@latin]=Isticanje odgovarajućih prozora pri lebdenju nad stavkama u t
Comment[sv]=Markera motsvarande fönster när pekaren hålls över poster i aktivitetsfältet
Comment[th]=เน้นหน้าต่างที่สัมพันธ์กับการเคลื่อนเมาส์มาอยู่เหนือรายการที่อยู่ในถาดงานบนแถบพาเนลระบบ
Comment[tr]=Bir pencerenin görev çubuğundaki girdisi üzerine gelindiğinde o pencereyi vurgula
-Comment[ug]=چاشقىنەك نۇر بەلگە ۋەزىپە بالداقتا تۇرغاندا مۇناسىپ كۆزنەكنى يورۇت
+Comment[ug]=چاشقىنەك نۇربەلگە ۋەزىپە بالداقتا تۇرغاندا مۇناسىپ كۆزنەكنى يورۇت
Comment[uk]=Підсвічування відповідного вікна у відповідь на наведення вказівника миші на елементи панелі задач
Comment[wa]=Met en evidince li bon purnea cwand l' cursoe passe pa dzeu ls intrêyes del båre des bouyes
Comment[x-test]=xxHighlight the appropriate window when hovering over taskbar entriesxx
diff --git a/kwin/effects/magnifier/magnifier.desktop b/kwin/effects/magnifier/magnifier.desktop
index edaf495..8583b81 100644
--- a/kwin/effects/magnifier/magnifier.desktop
+++ b/kwin/effects/magnifier/magnifier.desktop
@@ -147,7 +147,7 @@ Comment[sv]=Förstorar den del av skärmen som är nära muspekaren
Comment[ta]=Magnify the section of the screen that is near the mouse cursor
Comment[th]=แว่นขยายบางส่วนของหน้าจอที่อยู่ใกล้กับตัวชี้ของเมาส์
Comment[tr]=Farenin altındaki ekran bölümünü büyüt
-Comment[ug]=چاشقىنەك نۇر بەلگىسى ئەتراپىنى چوڭايتىدۇ
+Comment[ug]=چاشقىنەك نۇربەلگىسى ئەتراپىنى چوڭايتىدۇ
Comment[uk]=Збільшення частини екрана поруч з вказівником миші
Comment[wa]=Met l' loupe sol seccion del waitroûle k' est dlé l' cursoe del sori
Comment[x-test]=xxMagnify the section of the screen that is near the mouse cursorxx
diff --git a/kwin/effects/taskbarthumbnail/taskbarthumbnail.desktop b/kwin/effects/taskbarthumbnail/taskbarthumbnail.desktop
index 9ef81ac..4580aed 100644
--- a/kwin/effects/taskbarthumbnail/taskbarthumbnail.desktop
+++ b/kwin/effects/taskbarthumbnail/taskbarthumbnail.desktop
@@ -138,7 +138,7 @@ Comment[sv]=Visa miniatyrbilder av fönster när pekaren hålls över deras post
Comment[ta]=Display window thumbnails when hovering over taskbar entries
Comment[th]=แสดงภาพย่อของหน้าต่างเมื่อเคลื่อนเมาส์มาอยู่เหนือรายการในแถบงาน
Comment[tr]=Bir pencerenin görev çubuğundaki girdisi üzerine gelindiğinde o pencerenin küçük resmini gösterir
-Comment[ug]=چاشقىنەك نۇر بەلگە ۋەزىپە بالداقتا تۇرغاندا كۆزنەكنىڭ كىچىك سۈرىتىنى كۆرسەت
+Comment[ug]=چاشقىنەك نۇربەلگە ۋەزىپە بالداقتا تۇرغاندا كۆزنەكنىڭ كىچىك سۈرىتىنى كۆرسەت
Comment[uk]=Показ мініатюр вікон, коли вказівник буде наведено на елемент панелі задач
Comment[wa]=Håyene les prévoeyaedjes des purneas cwand l' cursoe passe pa dzeu ls intrêyes sol båre des bouyes
Comment[x-test]=xxDisplay window thumbnails when hovering over taskbar entriesxx
diff --git a/kwin/effects/trackmouse/trackmouse.desktop b/kwin/effects/trackmouse/trackmouse.desktop
index 8decdf9..d0cf887 100644
--- a/kwin/effects/trackmouse/trackmouse.desktop
+++ b/kwin/effects/trackmouse/trackmouse.desktop
@@ -144,7 +144,7 @@ Comment[sv]=Visa en lokaliseringseffekt för muspekaren om aktiverad
Comment[ta]=Display a mouse cursor locating effect when activated
Comment[th]=เมื่อทำงานแล้ว จะมีลูกเล่นแสดงตำแหน่งตัวชี้ของเมาส์
Comment[tr]=Etkinleştirildiğinde fare imlecinin konumlandırma efektini gösterir
-Comment[ug]=ئاكتىپلىغاندا چاشقىنەك نۇر بەلگىسىنى ئورۇن بەلگىلەش ئۈنۈمىنى كۆرسىتىدۇ
+Comment[ug]=ئاكتىپلىغاندا چاشقىنەك نۇربەلگىسىنى ئورۇن بەلگىلەش ئۈنۈمىنى كۆرسىتىدۇ
Comment[uk]=Показ наближення вказівника миші
Comment[wa]=Håyene èn efet d' trovaedje do cursoe del sori cwand èn alaedje
Comment[x-test]=xxDisplay a mouse cursor locating effect when activatedxx
diff --git a/kwin/kwin.notifyrc b/kwin/kwin.notifyrc
index c38aec2..6d42695 100644
--- a/kwin/kwin.notifyrc
+++ b/kwin/kwin.notifyrc
@@ -7159,7 +7159,7 @@ Comment[bg]=Не всички ефекти са поддържани от соф
Comment[bs]=Pozadina ili hardver ne podržavaju neke efekte.
Comment[ca]=Alguns efectes no estan implementats pel dorsal o pel maquinari.
Comment[ca@valencia]=Alguns efectes no estan implementats pel dorsal o pel maquinari.
-Comment[cs]=Některé efekty nejsou podporovány backendem nebo hardwarem.
+Comment[cs]=Některé efekty nejsou podporovány podpůrnou vrstvou nebo hardwarem.
Comment[da]=Nogle effekter er ikke understøttet af underliggende programmer eller hardware.
Comment[de]=Einige Effekte werden vom Hintergrundprogramm oder von der Hardware nicht unterstützt.
Comment[el]=Μερικά εφέ δεν υποστηρίζονται από το σύστημα υποστήριξης ή το υλικό.
diff --git a/kwin/libkwineffects/kwinglutils.cpp b/kwin/libkwineffects/kwinglutils.cpp
index 87a4625..b151762 100644
--- a/kwin/libkwineffects/kwinglutils.cpp
+++ b/kwin/libkwineffects/kwinglutils.cpp
@@ -444,11 +444,18 @@ void GLTexture::render(QRegion region, const QRect& rect)
r.x() + rect.width(), r.y(),
r.x() + rect.width(), r.y() + rect.height()
};
+#ifdef KWIN_HAVE_OPENGLES
+ const float texWidth = 1.0f;
+ const float texHeight = 1.0f;
+#else
+ const float texWidth = (target() == GL_TEXTURE_RECTANGLE_ARB) ? width() : 1.0f;
+ const float texHeight = (target() == GL_TEXTURE_RECTANGLE_ARB) ? height() : 1.0f;
+#endif
const float texcoords[ 4 * 2 ] = {
- 0.0f, y_inverted ? 0.0f : 1.0f, // y needs to be swapped (normalized coords)
- 0.0f, y_inverted ? 1.0f : 0.0f,
- 1.0f, y_inverted ? 0.0f : 1.0f,
- 1.0f, y_inverted ? 1.0f : 0.0f
+ 0.0f, y_inverted ? 0.0f : texHeight, // y needs to be swapped (normalized coords)
+ 0.0f, y_inverted ? texHeight : 0.0f,
+ texWidth, y_inverted ? 0.0f : texHeight,
+ texWidth, y_inverted ? texHeight : 0.0f
};
m_vbo->setData(4, 2, verts, texcoords);
}
diff --git a/kwin/scene_opengl_glx.cpp b/kwin/scene_opengl_glx.cpp
index 8eb3282..ea66cff 100644
--- a/kwin/scene_opengl_glx.cpp
+++ b/kwin/scene_opengl_glx.cpp
@@ -95,6 +95,10 @@ SceneOpenGL::SceneOpenGL(Workspace* ws)
if (GLPlatform::instance()->supports(GLSL)) {
if (!ShaderManager::instance()->isValid()) {
kDebug(1212) << "No Scene Shaders available";
+ } else {
+ // push one shader on the stack so that one is always bound
+ // consistency with GLES
+ ShaderManager::instance()->pushShader(ShaderManager::SimpleShader);
}
}
diff --git a/kwin/scene_xrender.cpp b/kwin/scene_xrender.cpp
index 8ed6f07..0bf604d 100644
--- a/kwin/scene_xrender.cpp
+++ b/kwin/scene_xrender.cpp
@@ -645,10 +645,11 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
Client *client = dynamic_cast<Client*>(toplevel);
Deleted *deleted = dynamic_cast<Deleted*>(toplevel);
+ const QRect decorationRect = toplevel->decorationRect();
if (client && Workspace::self()->decorationHasAlpha())
- transformed_shape = QRegion(client->decorationRect());
+ transformed_shape = decorationRect;
else if (deleted && Workspace::self()->decorationHasAlpha())
- transformed_shape = QRegion(deleted->decorationRect());
+ transformed_shape = decorationRect;
else
transformed_shape = shape();
@@ -662,7 +663,7 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
}
};
- XTransform identity = {{
+ static XTransform identity = {{
{ XDoubleToFixed(1), XDoubleToFixed(0), XDoubleToFixed(0) },
{ XDoubleToFixed(0), XDoubleToFixed(1), XDoubleToFixed(0) },
{ XDoubleToFixed(0), XDoubleToFixed(0), XDoubleToFixed(1) }
@@ -737,12 +738,10 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
}
//END OF STUPID RADEON HACK
}
-
#define MAP_RECT_TO_TARGET(_RECT_) \
if (blitInTempPixmap) _RECT_.translate(-decorationRect.topLeft()); else _RECT_ = mapToScreen(mask, data, _RECT_)
//BEGIN deco preparations
- QRect decorationRect;
bool noBorder = true;
const QPixmap *left = NULL;
const QPixmap *top = NULL;
@@ -758,7 +757,6 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
right = client->rightDecoPixmap();
bottom = client->bottomDecoPixmap();
client->layoutDecorationRects(dlr, dtr, drr, dbr, Client::WindowRelative);
- decorationRect = client->decorationRect();
}
if (deleted && !deleted->noBorder()) {
noBorder = deleted->noBorder();
@@ -767,7 +765,6 @@ void SceneXrender::Window::performPaint(int mask, QRegion region, WindowPaintDat
right = deleted->rightDecoPixmap();
bottom = deleted->bottomDecoPixmap();
deleted->layoutDecorationRects(dlr, dtr, drr, dbr);
- decorationRect = deleted->decorationRect();
}
if (!noBorder) {
MAP_RECT_TO_TARGET(dtr);
diff --git a/libs/oxygen/oxygenhelper.cpp b/libs/oxygen/oxygenhelper.cpp
index 9a04f03..58b88d8 100644
--- a/libs/oxygen/oxygenhelper.cpp
+++ b/libs/oxygen/oxygenhelper.cpp
@@ -194,6 +194,9 @@ namespace Oxygen
void Helper::renderBackgroundPixmap( QPainter* p, const QRect& clipRect, const QWidget* widget, const QWidget* window, int yShift, int gradientHeight )
{
+ // background pixmap
+ if( _backgroundPixmap.isNull() ) return;
+
// get coordinates relative to the client area
// this is stupid. One could use mapTo if this was taking const QWidget* and not
// QWidget* as argument.
@@ -224,22 +227,16 @@ namespace Oxygen
// account for vertical shift
if( yShift > 0 ) height -= 2*yShift;
- // background pixmap
- if( !_backgroundPixmap.isNull() )
- {
-
- // calculate source rect
- QPoint offset( 40, 48 - 20 );
- QRect source( 0, 0, width + offset.x(), height + offset.y() );
+ // calculate source rect
+ QPoint offset( 40, 48 - 20 );
+ QRect source( 0, 0, width + offset.x(), height + offset.y() );
- offset -= _backgroundPixmapOffset;
- source.translate( offset.x(), offset.y() );
- source.translate( 0, 64 - gradientHeight );
+ offset -= _backgroundPixmapOffset;
+ source.translate( offset.x(), offset.y() );
+ source.translate( 0, 64 - gradientHeight );
- // draw
- p->drawPixmap( QPoint( -x, -y ), _backgroundPixmap, source );
-
- }
+ // draw
+ p->drawPixmap( QPoint( -x, -y ), _backgroundPixmap, source );
if ( clipRect.isValid() )
{ p->restore(); }
@@ -434,6 +431,11 @@ namespace Oxygen
KColorUtils::mix( Qt::black, color, color.alphaF() ),
KColorScheme::ShadowShade,
_contrast ) );
+
+ // make sure shadow color has the same alpha channel as the input
+ out->setAlpha( color.alpha() );
+
+ // insert in cache
_shadowColorCache.insert( key, out );
}
diff --git a/libs/solid/control/solidnetworkmanager.desktop b/libs/solid/control/solidnetworkmanager.desktop
index 9ae96a8..a715f7f 100644
--- a/libs/solid/control/solidnetworkmanager.desktop
+++ b/libs/solid/control/solidnetworkmanager.desktop
@@ -12,7 +12,7 @@ Comment[bg]=Ядро за управление на мрежа
Comment[bs]=Pozadina za upravljanje mrežom
Comment[ca]=Dorsal de gestió de xarxa
Comment[ca@valencia]=Dorsal de gestió de xarxa
-Comment[cs]=Backend pro správu sítě
+Comment[cs]=Podpůrná vrstva pro správu sítě
Comment[da]=Motor til håndtering af netværk
Comment[de]=Backend zur Netzwerkverwaltung
Comment[el]=Σύστημα διαχείρισης δικτύου
diff --git a/plasma/desktop/applets/tasks/taskgroupitem.cpp b/plasma/desktop/applets/tasks/taskgroupitem.cpp
index eec27c2..5ff5896 100644
--- a/plasma/desktop/applets/tasks/taskgroupitem.cpp
+++ b/plasma/desktop/applets/tasks/taskgroupitem.cpp
@@ -469,9 +469,14 @@ AbstractTaskItem *TaskGroupItem::createAbstractItem(TaskManager::AbstractGroupab
AppLauncherItem *launcherItem = new AppLauncherItem(this, m_applet, static_cast<TaskManager::LauncherItem*>(groupableItem));
item = launcherItem;
} else {
- //it's a window task
+ TaskManager::TaskItem * taskItem = static_cast<TaskManager::TaskItem*>(groupableItem);
+ //if the taskItem is not either a startup o a task, return 0;
+ if (!taskItem->startup() && !taskItem->task()) {
+ return item;
+ }
+
WindowTaskItem *windowItem = new WindowTaskItem(this, m_applet);
- windowItem->setTask(static_cast<TaskManager::TaskItem*>(groupableItem));
+ windowItem->setTask(taskItem);
item = windowItem;
}
diff --git a/plasma/desktop/shell/data/layouts/org.kde.plasma-desktop.desktopIcons/metadata.desktop b/plasma/desktop/shell/data/layouts/org.kde.plasma-desktop.desktopIcons/metadata.desktop
index 09f0a98..989108f 100644
--- a/plasma/desktop/shell/data/layouts/org.kde.plasma-desktop.desktopIcons/metadata.desktop
+++ b/plasma/desktop/shell/data/layouts/org.kde.plasma-desktop.desktopIcons/metadata.desktop
@@ -41,7 +41,7 @@ Name[sr@latin]=Ikone površi
Name[sv]=Skrivbordsikoner
Name[th]=พื้นที่ทำงานแบบแสดงไอคอนต่างๆ
Name[tr]=Masaüstü Simgeleri
-Name[ug]=ئۈستەل يۈزى سىنبەلگىسى
+Name[ug]=ئۈستەلئۈستى سىنبەلگىسى
Name[uk]=Піктограми стільниці
Name[wa]=Imådjetes do scribanne
Name[x-test]=xxDesktop Iconsxx
diff --git a/plasma/generic/applets/devicenotifier/plasma-applet-devicenotifier.desktop b/plasma/generic/applets/devicenotifier/plasma-applet-devicenotifier.desktop
index 1def6d5..388a2f9 100644
--- a/plasma/generic/applets/devicenotifier/plasma-applet-devicenotifier.desktop
+++ b/plasma/generic/applets/devicenotifier/plasma-applet-devicenotifier.desktop
@@ -68,7 +68,7 @@ Name[ta]=கருவி நோட்டம்
Name[tg]=Извещение о новых устройствах
Name[th]=แจ้งให้ทราบถึงอุปกรณ์
Name[tr]=Aygıt Bildirici
-Name[ug]=ئۈسكىنە ئۇقتۇرۇشى
+Name[ug]=ئۈسكۈنە ئۇقتۇرۇشى
Name[uk]=Сповіщення про пристрої
Name[wa]=Notifiaedje d' éndjin
Name[x-test]=xxDevice Notifierxx
diff --git a/plasma/generic/dataengines/mouse/plasma-dataengine-mouse.desktop b/plasma/generic/dataengines/mouse/plasma-dataengine-mouse.desktop
index 94b4026..de781ce 100644
--- a/plasma/generic/dataengines/mouse/plasma-dataengine-mouse.desktop
+++ b/plasma/generic/dataengines/mouse/plasma-dataengine-mouse.desktop
@@ -65,7 +65,7 @@ Name[te]=సూచకి స్థానము
Name[tg]=Положение указателя мыши
Name[th]=ตำแหน่งของตัวชี้
Name[tr]=İşaretçi Konumu
-Name[ug]=نۇر بەلگە ئورنى
+Name[ug]=نۇربەلگە ئورنى
Name[uk]=Позиція вказівника
Name[wa]=Eplaeçmint do pwinteu
Name[x-test]=xxPointer Positionxx
@@ -131,7 +131,7 @@ Comment[sv]=Musposition och pekare
Comment[tg]=Ҷойгиршавии муш ва курсор
Comment[th]=ตำแหน่งตัวชี้และเคอร์เซอร์ของเมาส์
Comment[tr]=Fare konumu ve işaretçisi
-Comment[ug]=چاشقىنەك ئورنى ۋە نۇر بەلگە
+Comment[ug]=چاشقىنەك ئورنى ۋە نۇربەلگە
Comment[uk]=Позиція вказівника миші і курсора
Comment[wa]=1Eplaeçmint del sori et do cursoe
Comment[x-test]=xxMouse position and cursorxx
diff --git a/plasma/generic/runners/webshortcuts/webshortcutrunner.cpp b/plasma/generic/runners/webshortcuts/webshortcutrunner.cpp
index 996db6b..2ca99f1 100644
--- a/plasma/generic/runners/webshortcuts/webshortcutrunner.cpp
+++ b/plasma/generic/runners/webshortcuts/webshortcutrunner.cpp
@@ -45,7 +45,7 @@ WebshortcutRunner::WebshortcutRunner(QObject *parent, const QVariantList& args)
// Listen for KUriFilter plugin config changes and update state...
QDBusConnection sessionDbus = QDBusConnection::sessionBus();
- sessionDbus.connect(QString(), QString(), "org.kde.KUriFilterPlugin",
+ sessionDbus.connect(QString(), "/", "org.kde.KUriFilterPlugin",
"configure", this, SLOT(readFiltersConfig()));
connect(this, SIGNAL(teardown()), this, SLOT(resetState()));
diff --git a/plasma/generic/wallpapers/image/backgrounddelegate.cpp b/plasma/generic/wallpapers/image/backgrounddelegate.cpp
index 8354d99..95c2719 100644
--- a/plasma/generic/wallpapers/image/backgrounddelegate.cpp
+++ b/plasma/generic/wallpapers/image/backgrounddelegate.cpp
@@ -91,12 +91,20 @@ void BackgroundDelegate::paint(QPainter *painter,
}
//Set the text color according to the item state
+ QPalette::ColorGroup cg = QPalette::Active;
+ if (!(option.state & QStyle::State_Enabled)) {
+ cg = QPalette::Disabled;
+ } else if (!(option.state & QStyle::State_Active)) {
+ cg = QPalette::Inactive;
+ }
+
QColor color;
if (option.state & QStyle::State_Selected) {
- color = QApplication::palette().brush(QPalette::HighlightedText).color();
- }else{
- color = QApplication::palette().brush(QPalette::Text).color();
+ color = QApplication::palette().brush(cg, QPalette::HighlightedText).color();
+ } else {
+ color = QApplication::palette().brush(cg, QPalette::Text).color();
}
+
html = QString("<div style=\"color: %1\" align=\"center\">%2</div>").arg(color.name()).arg(html);
document.setHtml(html);
diff --git a/powerdevil/daemon/actions/dpms/powerdevildpmsaction.cpp b/powerdevil/daemon/actions/dpms/powerdevildpmsaction.cpp
index 0a1f5b4..a2aeb4c 100644
--- a/powerdevil/daemon/actions/dpms/powerdevildpmsaction.cpp
+++ b/powerdevil/daemon/actions/dpms/powerdevildpmsaction.cpp
@@ -27,6 +27,7 @@
#include <QtGui/QX11Info>
#include <KConfigGroup>
+#include <KDebug>
#include <KPluginFactory>
#include <X11/Xmd.h>
@@ -86,6 +87,12 @@ PowerDevilDPMSAction::PowerDevilDPMSAction(QObject* parent, const QVariantList&
// Pretend we're unloading profiles here, as if the action is not enabled, DPMS should be switched off.
onProfileUnload();
+
+ // Listen to the policy agent
+ connect(PowerDevil::PolicyAgent::instance(),
+ SIGNAL(unavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies)),
+ this,
+ SLOT(onUnavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies)));
}
PowerDevilDPMSAction::~PowerDevilDPMSAction()
@@ -95,9 +102,13 @@ PowerDevilDPMSAction::~PowerDevilDPMSAction()
void PowerDevilDPMSAction::onProfileUnload()
{
+ using namespace PowerDevil;
Display *dpy = QX11Info::display();
- if (m_hasDPMS) {
+ if (m_hasDPMS &&
+ !(PolicyAgent::instance()->unavailablePolicies() & PolicyAgent::ChangeScreenSettings)) {
DPMSDisable(dpy);
+ } else {
+ kDebug() << "Not performing DPMS action due to inhibition";
}
}
@@ -113,10 +124,13 @@ void PowerDevilDPMSAction::onIdleTimeout(int msec)
void PowerDevilDPMSAction::onProfileLoad()
{
+ using namespace PowerDevil;
Display *dpy = QX11Info::display();
- if (m_hasDPMS) {
+ if (m_hasDPMS &&
+ !(PolicyAgent::instance()->unavailablePolicies() & PolicyAgent::ChangeScreenSettings)) {
DPMSEnable(dpy);
} else {
+ kDebug() << "Not performing DPMS action due to inhibition";
return;
}
@@ -170,4 +184,20 @@ bool PowerDevilDPMSAction::loadAction(const KConfigGroup& config)
return true;
}
+void PowerDevilDPMSAction::onUnavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies policies)
+{
+ if (policies & PowerDevil::PolicyAgent::ChangeScreenSettings) {
+ // Inhibition triggered: disable DPMS
+ kDebug() << "Disabling DPMS due to inhibition";
+ Display *dpy = QX11Info::display();
+ if (m_hasDPMS) {
+ DPMSDisable(dpy);
+ }
+ } else {
+ // Inhibition removed: let's start again
+ onProfileLoad();
+ kDebug() << "Restoring DPMS features after inhibition release";
+ }
+}
+
#include "powerdevildpmsaction.moc"
diff --git a/powerdevil/daemon/actions/dpms/powerdevildpmsaction.h b/powerdevil/daemon/actions/dpms/powerdevildpmsaction.h
index 6951db9..b2280a3 100644
--- a/powerdevil/daemon/actions/dpms/powerdevildpmsaction.h
+++ b/powerdevil/daemon/actions/dpms/powerdevildpmsaction.h
@@ -42,6 +42,9 @@ protected:
public:
virtual bool loadAction(const KConfigGroup& config);
+private Q_SLOTS:
+ void onUnavailablePoliciesChanged(PowerDevil::PolicyAgent::RequiredPolicies policies);
+
private:
bool m_hasDPMS;
int m_idleTime;
diff --git a/powerdevil/daemon/backends/upower/dbus/org.freedesktop.UPower.xml b/powerdevil/daemon/backends/upower/dbus/org.freedesktop.UPower.xml
index 7b73583..a3f0004 100644
--- a/powerdevil/daemon/backends/upower/dbus/org.freedesktop.UPower.xml
+++ b/powerdevil/daemon/backends/upower/dbus/org.freedesktop.UPower.xml
@@ -1,43 +1,395 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node>
- <interface name="org.freedesktop.UPower">
- <method name="HibernateAllowed">
- <arg name="allowed" type="b" direction="out"/>
- </method>
- <method name="Hibernate">
- </method>
- <method name="SuspendAllowed">
- <arg name="allowed" type="b" direction="out"/>
- </method>
- <method name="Suspend">
- </method>
- <method name="AboutToSleep">
- </method>
- <method name="EnumerateDevices">
- <arg name="devices" type="ao" direction="out"/>
- </method>
- <signal name="Resuming">
- </signal>
- <signal name="Sleeping">
- </signal>
- <signal name="Changed">
- </signal>
- <signal name="DeviceChanged">
- <arg type="s"/>
- </signal>
- <signal name="DeviceRemoved">
- <arg type="s"/>
- </signal>
- <signal name="DeviceAdded">
- <arg type="s"/>
- </signal>
- <property name="LidIsPresent" type="b" access="read"/>
- <property name="LidIsClosed" type="b" access="read"/>
- <property name="OnLowBattery" type="b" access="read"/>
- <property name="OnBattery" type="b" access="read"/>
- <property name="CanHibernate" type="b" access="read"/>
- <property name="CanSuspend" type="b" access="read"/>
- <property name="DaemonVersion" type="s" access="read"/>
- </interface>
-</node>
\ No newline at end of file
+<!DOCTYPE node PUBLIC
+"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+
+ <interface name="org.freedesktop.UPower">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ The UPower service is available via the system message
+ bus. To access the service, use
+ the <doc:tt>org.freedesktop.UPower</doc:tt> interface on
+ the <doc:tt>/org/freedesktop/UPower</doc:tt> object on
+ the D-Bus system bus service with the well-known
+ name <doc:tt>org.freedesktop.UPower</doc:tt>.
+ </doc:para>
+ <doc:para>
+ <doc:example language="shell" title="simple example">
+ <doc:code>
+$ dbus-send --print-reply \
+ --system \
+ --dest=org.freedesktop.UPower \
+ /org/freedesktop/UPower \
+ org.freedesktop.UPower.EnumerateDevices
+
+method return sender=:1.386 -> dest=:1.451 reply_serial=2
+ array [
+ object path "/org/freedesktop/UPower/devices/line_power_AC"
+ object path "/org/freedesktop/UPower/devices/battery_BAT0"
+ ]
+ </doc:code>
+ </doc:example>
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+
+ <!-- ************************************************************ -->
+
+ <method name="EnumerateDevices">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="devices" direction="out" type="ao">
+ <doc:doc><doc:summary>An array of object paths for devices.</doc:summary></doc:doc>
+ </arg>
+
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Enumerate all power objects on the system.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- ************************************************************ -->
+
+ <signal name="DeviceAdded">
+ <arg name="device" type="o">
+ <doc:doc><doc:summary>Object path of device that was added.</doc:summary></doc:doc>
+ </arg>
+
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Emitted when a device is added.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="DeviceRemoved">
+ <arg name="device" type="o">
+ <doc:doc><doc:summary>Object path of device that was removed.</doc:summary></doc:doc>
+ </arg>
+
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Emitted when a device is removed.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="DeviceChanged">
+ <arg name="device" type="o">
+ <doc:doc><doc:summary>Object path of device that was changed.</doc:summary></doc:doc>
+ </arg>
+
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Emitted when a device changed.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="Changed">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Emitted when one or more properties on the object changes.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="Sleeping">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ This signal is sent when the session is about to be suspended or
+ hibernated.
+ </doc:para>
+ <doc:para>
+ This signal is DEPRECATED. Use NotifySleep() instead.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="NotifySleep">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ This signal is sent when the session is about to be suspended or
+ hibernated.
+ Session and system programs have one second to do anything required
+ before the sleep action is taken (such as sending out Avahi or
+ Jabber messages).
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg name="action" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>
+ The sleep action type, e.g. <doc:tt>suspend</doc:tt>,
+ <doc:tt>hibernate</doc:tt> or <doc:tt>hybrid</doc:tt>.
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="Resuming">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ This signal is sent when the session has just returned from
+ Suspend() or Hibernate().
+ </doc:para>
+ <doc:para>
+ This signal is DEPRECATED. Use NotifyResume() instead.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <signal name="NotifyResume">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ This signal is sent when the session has just returned from
+ Suspend() or Hibernate().
+ Session and system programs can then do anything required (such as
+ sending out Avahi or Jabber messages).
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg name="action" direction="out" type="s">
+ <doc:doc>
+ <doc:summary>
+ The sleep action type, e.g. <doc:tt>suspend</doc:tt>,
+ <doc:tt>hibernate</doc:tt> or <doc:tt>hybrid</doc:tt>.
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </signal>
+
+ <!-- ************************************************************ -->
+
+ <method name="AboutToSleep">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ This method tells UPower that the Suspend() or Hibernate() method
+ is about to be called.
+ This allows UPower to emit the Suspending signal whilst
+ session activities are happening that have to be done before the
+ suspend process is started.
+ </doc:para>
+ <doc:para>
+ This method would typically be called by the session power
+ management daemon, before it locks the screen and waits for the
+ screen to fade to black.
+ The session power management component would then call Suspend() or
+ Hibernate() when these syncronous tasks have completed.
+ </doc:para>
+ <doc:para>
+ If this method is not called than nothing bad will happen and
+ Suspend() or Hibernate() will block for the required second.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ <arg name="action" direction="in" type="s">
+ <doc:doc>
+ <doc:summary>
+ The sleep action type, e.g. <doc:tt>suspend</doc:tt> or
+ <doc:tt>hibernate</doc:tt>.
+ </doc:summary>
+ </doc:doc>
+ </arg>
+ </method>
+
+ <!-- ************************************************************ -->
+
+ <method name="Suspend">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Suspends the computer into a low power state.
+ System state is not preserved if the power is lost.
+ </doc:para>
+ <doc:para>
+ If AboutToRequestSleep() has not been called then UPower will send
+ the Sleeping() signal and block for one second.
+ </doc:para>
+ <doc:para>
+ If AboutToRequestSleep() has been called less than one second
+ before this method is called then UPower will block for the
+ remaining time to complete one second of delay.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- ************************************************************ -->
+
+ <method name="SuspendAllowed">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="allowed" direction="out" type="b">
+ <doc:doc><doc:summary>TRUE if allowed, otherwise FALSE</doc:summary></doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Check if the caller has (or can get) the PolicyKit privilege to call
+ <doc:ref type="method" to="Power.Suspend">Suspend</doc:ref>.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- ************************************************************ -->
+
+ <method name="Hibernate">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Hibernates the computer into a low power state.
+ System state is preserved if the power is lost.
+ </doc:para>
+ <doc:para>
+ If AboutToRequestSleep() has not been called then UPower will send
+ the Sleeping() signal and block for one second.
+ </doc:para>
+ <doc:para>
+ If AboutToRequestSleep() has been called less than one second
+ before this method is called then UPower will block for the
+ remaining time to complete one second of delay.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- ************************************************************ -->
+
+ <method name="HibernateAllowed">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg name="allowed" direction="out" type="b">
+ <doc:doc><doc:summary>TRUE if allowed, otherwise FALSE</doc:summary></doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Check if the caller has (or can get) the PolicyKit privilege to call
+ <doc:ref type="method" to="Power.Hibernate">Hibernate</doc:ref>.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- ************************************************************ -->
+
+ <property name="DaemonVersion" type="s" access="read">
+ <doc:doc><doc:description><doc:para>
+ Version of the running daemon, e.g. <doc:tt>002</doc:tt>.
+ </doc:para></doc:description></doc:doc>
+ </property>
+
+ <property name="CanSuspend" type="b" access="read">
+ <doc:doc><doc:description><doc:para>
+ Whether the system is able to suspend.
+ </doc:para></doc:description></doc:doc>
+ </property>
+
+ <property name="CanHibernate" type="b" access="read">
+ <doc:doc><doc:description><doc:para>
+ Whether the system is able to hibernate.
+ </doc:para></doc:description></doc:doc>
+ </property>
+
+ <property name="OnBattery" type="b" access="read">
+ <doc:doc><doc:description><doc:para>
+ Indicates whether the system is running on battery power.
+ This property is provided for convenience.
+ </doc:para></doc:description></doc:doc>
+ </property>
+
+ <property name="OnLowBattery" type="b" access="read">
+ <doc:doc><doc:description><doc:para>
+ Indicates whether the system is running on battery power and if the battery is critically low.
+ This property is provided for convenience.
+ </doc:para></doc:description></doc:doc>
+ </property>
+
+ <property name="LidIsClosed" type="b" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ Indicates if the laptop lid is closed where the display cannot be seen.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ <property name="LidIsPresent" type="b" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ If the system has a lid device.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ <property name="LidForceSleep" type="b" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ If the system really has to sleep when the lid is closed.
+ Some laptops actually melt (!) if the lid is closed and the
+ computer keeps running. We blacklist those, and do something
+ sane for the other machines.
+ </doc:para>
+ <doc:para>
+ This allows us to set the default session policy to not
+ suspend on lid close if the laptop is docked, and be sure
+ the machine is not going to melt.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ <property name="IsDocked" type="b" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>
+ If the system is currently docked.
+ Note: the "is-docked" value is the result of a heuristic,
+ which may involve testing the display output.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ </interface>
+
+</node>
diff --git a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp b/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp
index 9c0f272..a3caaec 100644
--- a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp
+++ b/powerdevil/daemon/backends/upower/powerdevilupowerbackend.cpp
@@ -36,14 +36,14 @@
PowerDevilUPowerBackend::PowerDevilUPowerBackend(QObject* parent)
: BackendInterface(parent),
- m_brightNessControl(0),
+ m_brightnessControl(0),
m_lidIsPresent(false), m_lidIsClosed(false), m_onBattery(false)
{
}
PowerDevilUPowerBackend::~PowerDevilUPowerBackend()
{
- delete m_brightNessControl;
+ delete m_brightnessControl;
}
bool PowerDevilUPowerBackend::isAvailable()
@@ -87,7 +87,7 @@ void PowerDevilUPowerBackend::init()
m_upowerInterface = new OrgFreedesktopUPowerInterface(UPOWER_SERVICE, "/org/freedesktop/UPower", QDBusConnection::systemBus(), this);
m_kbdBacklight = new OrgFreedesktopUPowerKbdBacklightInterface(UPOWER_SERVICE, "/org/freedesktop/UPower/KbdBacklight", QDBusConnection::systemBus(), this);
- m_brightNessControl = new XRandrBrightness();
+ m_brightnessControl = new XRandrBrightness();
// Capabilities
setCapabilities(SignalResumeFromSuspend);
@@ -187,9 +187,9 @@ float PowerDevilUPowerBackend::brightness(PowerDevil::BackendInterface::Brightne
float result = 0.0;
if (type == Screen) {
- if (m_brightNessControl->isSupported()) {
+ if (m_brightnessControl->isSupported()) {
//kDebug() << "Calling xrandr brightness";
- result = m_brightNessControl->brightness();
+ result = m_brightnessControl->brightness();
} else {
//kDebug() << "Falling back to helper to get brightness";
KAuth::Action action("org.kde.powerdevil.backlighthelper.brightness");
@@ -216,8 +216,8 @@ bool PowerDevilUPowerBackend::setBrightness(float brightnessValue, PowerDevil::B
{
if (type == Screen) {
kDebug() << "set screen brightness: " << brightnessValue;
- if (m_brightNessControl->isSupported()) {
- m_brightNessControl->setBrightness(brightnessValue);
+ if (m_brightnessControl->isSupported()) {
+ m_brightnessControl->setBrightness(brightnessValue);
} else {
//kDebug() << "Falling back to helper to set brightness";
KAuth::Action action("org.kde.powerdevil.backlighthelper.setbrightness");
diff --git a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.h b/powerdevil/daemon/backends/upower/powerdevilupowerbackend.h
index c0ce527..ba942bd 100644
--- a/powerdevil/daemon/backends/upower/powerdevilupowerbackend.h
+++ b/powerdevil/daemon/backends/upower/powerdevilupowerbackend.h
@@ -70,7 +70,7 @@ private:
// brightness
float m_cachedBrightness;
- XRandrBrightness *m_brightNessControl;
+ XRandrBrightness *m_brightnessControl;
OrgFreedesktopUPowerInterface *m_upowerInterface;
OrgFreedesktopUPowerKbdBacklightInterface *m_kbdBacklight;
diff --git a/powerdevil/daemon/backends/upower/upowersuspendjob.cpp b/powerdevil/daemon/backends/upower/upowersuspendjob.cpp
index 86c582b..fa64ab0 100644
--- a/powerdevil/daemon/backends/upower/upowersuspendjob.cpp
+++ b/powerdevil/daemon/backends/upower/upowersuspendjob.cpp
@@ -63,11 +63,9 @@ void UPowerSuspendJob::doStart()
switch(m_method)
{
case PowerDevil::BackendInterface::ToRam:
- m_upowerInterface->AboutToSleep();
m_upowerInterface->Suspend();
break;
case PowerDevil::BackendInterface::ToDisk:
- m_upowerInterface->AboutToSleep();
m_upowerInterface->Hibernate();
break;
default:
diff --git a/powerdevil/daemon/powerdevilcore.cpp b/powerdevil/daemon/powerdevilcore.cpp
index 0aeea4f..202890e 100644
--- a/powerdevil/daemon/powerdevilcore.cpp
+++ b/powerdevil/daemon/powerdevilcore.cpp
@@ -88,7 +88,7 @@ void Core::onBackendReady()
{
kDebug() << "Backend is ready, KDE Power Management system initialized";
- m_profilesConfig = KSharedConfig::openConfig("powerdevil2profilesrc", KConfig::SimpleConfig);
+ m_profilesConfig = KSharedConfig::openConfig("powerdevil2profilesrc", KConfig::FullConfig);
// Is it brand new?
if (m_profilesConfig->groupList().isEmpty()) {
diff --git a/powerdevil/daemon/powerdevilpolicyagent.cpp b/powerdevil/daemon/powerdevilpolicyagent.cpp
index 91f6586..4923576 100644
--- a/powerdevil/daemon/powerdevilpolicyagent.cpp
+++ b/powerdevil/daemon/powerdevilpolicyagent.cpp
@@ -290,12 +290,14 @@ void PolicyAgent::addInhibitionTypeHelper(uint cookie, PolicyAgent::RequiredPoli
if (types & ChangeProfile) {
// Check if we have to notify
if (m_typesToCookie[ChangeProfile].isEmpty()) {
+ kDebug() << "Added change profile";
notify = true;
}
m_typesToCookie[ChangeProfile].append(cookie);
}
if (types & ChangeScreenSettings) {
// Check if we have to notify
+ kDebug() << "Added change screen settings";
if (m_typesToCookie[ChangeScreenSettings].isEmpty()) {
notify = true;
}
@@ -303,6 +305,7 @@ void PolicyAgent::addInhibitionTypeHelper(uint cookie, PolicyAgent::RequiredPoli
}
if (types & InterruptSession) {
// Check if we have to notify
+ kDebug() << "Added interrupt session";
if (m_typesToCookie[InterruptSession].isEmpty()) {
notify = true;
}
diff --git a/solid/solid-actions-kcm/device-actions/solid-device-DvbInterface.desktop b/solid/solid-actions-kcm/device-actions/solid-device-DvbInterface.desktop
index a113873..45fd887 100644
--- a/solid/solid-actions-kcm/device-actions/solid-device-DvbInterface.desktop
+++ b/solid/solid-actions-kcm/device-actions/solid-device-DvbInterface.desktop
@@ -132,7 +132,7 @@ Name[sv]=Enhetsadapter
Name[tg]=Извещение о новых устройствах
Name[th]=อะแดปเตอร์อุปกรณ์
Name[tr]=Aygıt Bağdaştırıcısı
-Name[ug]=ئۈسكىنە ماسلاشتۇرغۇچ
+Name[ug]=ئۈسكۈنە ماسلاشتۇرغۇچ
Name[uk]=Адаптер пристрою
Name[wa]=Adaptateu d' éndjin
Name[x-test]=xxDevice Adapterxx
@@ -202,7 +202,7 @@ Name[sv]=Enhetsindex
Name[tg]=Индекси роҳнамо
Name[th]=ดัชนีอุปกรณ์
Name[tr]=Aygıt İndeksi
-Name[ug]=ئۈسكىنە ئىندىكىسى
+Name[ug]=ئۈسكۈنە ئىندىكىسى
Name[uk]=Індекс пристрою
Name[wa]=Indecse di l' éndjin
Name[x-test]=xxDevice Indexxx
/space/work/OBS/kdf/kdebase4-workspace