[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [oxygen-gtk/gtk3-1.3] src: Added ref-to-pointer cast, to allow calling via gtk_theming_engine_get.
From:       Hugo Pereira Da Costa <hugo () oxygen-icons ! org>
Date:       2014-02-24 13:43:13
Message-ID: E1WHvoP-0002Zj-Sj () scm ! kde ! org
[Download RAW message or body]

Git commit 6b9bdc1b8a5c038335e8a12a01ec4f219c58441e by Hugo Pereira Da Costa.
Committed on 24/02/2014 at 13:41.
Pushed by hpereiradacosta into branch 'gtk3-1.3'.

Added ref-to-pointer cast, to allow calling via gtk_theming_engine_get.
Fixed test on background window image pattern.
CCMAIL: dev@ml.mageia.org

M  +7    -0    src/oxygencairopattern.h
M  +1    -1    src/oxygenthemingengine.cpp

http://commits.kde.org/oxygen-gtk/6b9bdc1b8a5c038335e8a12a01ec4f219c58441e

diff --git a/src/oxygencairopattern.h b/src/oxygencairopattern.h
index 50ad191..10945ea 100644
--- a/src/oxygencairopattern.h
+++ b/src/oxygencairopattern.h
@@ -89,11 +89,18 @@ namespace Oxygen
             { return (bool) _pattern; }
 
             //! cast to cairo_pattern_t
+            operator cairo_pattern_t*& (void)
+            { return _pattern; }
+
+            //! cast to cairo_pattern_t
             operator cairo_pattern_t* (void) const
             { return _pattern; }
 
             private:
 
+            //! equal to operator is private
+            Pattern& operator = (cairo_pattern_t* );
+
             //! pattern
             cairo_pattern_t* _pattern;
 
diff --git a/src/oxygenthemingengine.cpp b/src/oxygenthemingengine.cpp
index 8cc59a9..495a043 100644
--- a/src/oxygenthemingengine.cpp
+++ b/src/oxygenthemingengine.cpp
@@ -252,7 +252,7 @@ namespace Oxygen
             // check if background image is present
             Cairo::Pattern pattern;
             GtkStateFlags state( gtk_theming_engine_get_state( engine ) );
-            gtk_theming_engine_get( engine, state, \
GTK_STYLE_PROPERTY_BACKGROUND_IMAGE, &pattern, NULL ); +            \
gtk_theming_engine_get( engine, state, GTK_STYLE_PROPERTY_BACKGROUND_IMAGE, \
&((cairo_pattern_t*&)pattern), NULL );  if( pattern.isValid() )
             {
                 // if valid background image is found, fallback to parent style


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic