[Xfce4-commits] [apps/xfce4-notifyd] 15/29: The problem is that the new code relies on GtkStyleContext. Apparently gtk_style_context_get_property does not know anything about default values installed with gtk_widget_class_install_style_property.

noreply at xfce.org noreply at xfce.org
Wed Jun 29 23:20:05 CEST 2016


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/xfce4-notifyd.

commit 7115c60b47772020ced74b5718cfea5918984f12
Author: Ali Abdallah <aliovx at gmail.com>
Date:   Thu Oct 15 18:47:27 2015 +0200

    The problem is that the new code relies on GtkStyleContext. Apparently
    gtk_style_context_get_property does not know anything about default values
    installed with gtk_widget_class_install_style_property.
    
    For this, we use some default values in the css file of the default
    theme. Then the css provider is loaded with a fallback priority, this way
    they are only loaded when they are not present in the current theme.
---
 themes/Default/gtk.css             |  9 +++++++--
 themes/Smoke/gtk.css               | 26 +++++++++++++-------------
 themes/ZOMG-PONIES!/gtk.css        | 12 ++++++------
 xfce4-notifyd/xfce-notify-daemon.c |  3 +--
 4 files changed, 27 insertions(+), 23 deletions(-)

diff --git a/themes/Default/gtk.css b/themes/Default/gtk.css
index 8d5be3a..a85b56b 100644
--- a/themes/Default/gtk.css
+++ b/themes/Default/gtk.css
@@ -1,2 +1,7 @@
-# this is deliberately empty: this theme will use whatever default colors
-# are in your main gtk theme
+/* We set some default options here.  This is loaded with a low priority, 
+ * the rest will use whatever default colors are in your main gtk theme */
+#XfceNotifyWindow { 
+    border-radius: 6px;
+    border-width: 1px;
+    border-color : #ffffff;     
+}
diff --git a/themes/Smoke/gtk.css b/themes/Smoke/gtk.css
index 2a3eda2..ed0abd9 100644
--- a/themes/Smoke/gtk.css
+++ b/themes/Smoke/gtk.css
@@ -1,39 +1,39 @@
 #XfceNotifyWindow {
-	
+    
     background-color: #4d4d4d;
     border-radius: 20px;
     border-color : #ffffff;
-	border-style: outset;
- 	border-width: 2px;
-	padding: 20px;
+    border-style: outset;
+    border-width: 2px;
+    padding: 20px;
 }
 
 #XfceNotifyWindow:hover {
-	border-width: 3px;
- 	border-color : #ffffff;
+    border-width: 3px;
+    border-color : #ffffff;
 }
 
 #XfceNotifyWindow GtkLabel {
-	color: #ffffff;
- 	-GtkWidget-link-color:#a7a7a7;
+    color: #ffffff;
+    GtkWidget-link-color:#a7a7a7;
 }
 
 #XfceNotifyWindow GtkLabel#summay {
-	font : Bold;
+    font : Bold;
 }
 
 #XfceNotifyWindow GtkButton {
 
- 	border-image: none;
- 	background-image: none;
+    border-image: none;
+    background-image: none;
     background-color : #202020;
     color: #ffffff;
 }
 
 #XfceNotifyWindow GtkButton:hover {
  
- 	border-image: none;
- 	background-image: none;
+    border-image: none;
+    background-image: none;
     background-color : #404040;
     color: #ffffff;
 }
diff --git a/themes/ZOMG-PONIES!/gtk.css b/themes/ZOMG-PONIES!/gtk.css
index a4348d9..4a26bad 100644
--- a/themes/ZOMG-PONIES!/gtk.css
+++ b/themes/ZOMG-PONIES!/gtk.css
@@ -1,5 +1,5 @@
 #XfceNotifyWindow {
-	
+
     background-color: #ff69b4;
     border-radius: 10px;
     border-color : #ffff00;
@@ -9,22 +9,22 @@
 
 
 #XfceNotifyWindow GtkLabel {
-	font : Comic Sans MS 26;
+    font : Comic Sans MS 26;
     color: #ffff00;
     -GtkWidget-link-color:#c17800;
 }
 
 
 #XfceNotifyWindow GtkButton {
- 	border-image: none;
- 	background-image: none;
+    border-image: none;
+    background-image: none;
     background-color : #9400d3;
 }
 
 
 #XfceNotifyWindow GtkButton:hover {
- 	border-image: none;
- 	background-image: none;
+    border-image: none;
+    background-image: none;
     background-color : #5e0086;
 }
 
diff --git a/xfce4-notifyd/xfce-notify-daemon.c b/xfce4-notifyd/xfce-notify-daemon.c
index 1e4f83f..a190806 100644
--- a/xfce4-notifyd/xfce-notify-daemon.c
+++ b/xfce4-notifyd/xfce-notify-daemon.c
@@ -1089,9 +1089,8 @@ static gboolean notify_notify (XfceNotifyGBus *skeleton,
         }
         else
         {
-            /* FIXME: This sets the fallback theme, not the current theme */
             add_and_propagate_css_provider (GTK_WIDGET(window), 
-                                            GTK_STYLE_PROVIDER(gtk_css_provider_get_default()),
+                                            GTK_STYLE_PROVIDER(xndaemon->css_provider),
                                             GTK_STYLE_PROVIDER_PRIORITY_FALLBACK);
         }
             

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list