[california/wip/736161-black] More generalized fix



commit 6269558bfd3bb94038940a3f58143221d92ca0e2
Author: Jim Nelson <jim yorba org>
Date:   Tue Sep 9 17:56:54 2014 -0700

    More generalized fix

 src/host/host-create-update-event.vala |   13 -------------
 src/host/host-show-event.vala          |   13 -------------
 src/toolkit/toolkit-deck-popover.vala  |   13 +++++++++++++
 src/toolkit/toolkit-deck-window.vala   |   13 +++++++++++++
 4 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/src/host/host-create-update-event.vala b/src/host/host-create-update-event.vala
index ee9c417..94c5cb1 100644
--- a/src/host/host-create-update-event.vala
+++ b/src/host/host-create-update-event.vala
@@ -115,19 +115,6 @@ public class CreateUpdateEvent : Gtk.Grid, Toolkit.Card {
         Calendar.System.instance.is_24hr_changed.disconnect(on_update_time_summary);
     }
     
-#if ENABLE_UNITY
-    // When description_text_window is visible, the entire GtkGrid's background color goes black
-    // in the GtkPopover; this overrides the color and uses GtkPopover's background color for the
-    // GtkGrid.  See:
-    // https://bugzilla.gnome.org/show_bug.cgi?id=735421
-    public override void realize() {
-        base.realize();
-        
-        Gdk.RGBA bg = get_toplevel().get_style_context().get_background_color(Gtk.StateFlags.NORMAL);
-        override_background_color(Gtk.StateFlags.NORMAL, bg);
-    }
-#endif
-    
     private bool transform_summary_to_accept(Binding binding, Value source_value, ref Value target_value) {
         target_value = summary_entry.text_length > 0 && (event != null ? event.is_valid(false) : false);
         
diff --git a/src/host/host-show-event.vala b/src/host/host-show-event.vala
index ee252ba..937606a 100644
--- a/src/host/host-show-event.vala
+++ b/src/host/host-show-event.vala
@@ -121,19 +121,6 @@ public class ShowEvent : Gtk.Grid, Toolkit.Card {
         Calendar.System.instance.today_changed.disconnect(build_display);
     }
     
-#if ENABLE_UNITY
-    // When description_text_window is visible, the entire GtkGrid's background color goes black
-    // in the GtkPopover; this overrides the color and uses GtkPopover's background color for the
-    // GtkGrid.  See:
-    // https://bugzilla.gnome.org/show_bug.cgi?id=735421
-    public override void realize() {
-        base.realize();
-        
-        Gdk.RGBA bg = get_toplevel().get_style_context().get_background_color(Gtk.StateFlags.NORMAL);
-        override_background_color(Gtk.StateFlags.NORMAL, bg);
-    }
-#endif
-    
     public void jumped_to(Toolkit.Card? from, Toolkit.Card.Jump reason, Value? message) {
         // no message, don't update display
         if (message == null)
diff --git a/src/toolkit/toolkit-deck-popover.vala b/src/toolkit/toolkit-deck-popover.vala
index 8775a86..a893be4 100644
--- a/src/toolkit/toolkit-deck-popover.vala
+++ b/src/toolkit/toolkit-deck-popover.vala
@@ -73,6 +73,19 @@ public class DeckPopover : Gtk.Popover {
         deck.dismiss.disconnect(on_deck_dismissed);
     }
     
+#if ENABLE_UNITY
+    // When description_text_window is visible, the entire GtkGrid's background color goes black
+    // in the GtkPopover; this overrides the color and uses GtkPopover's background color for the
+    // GtkGrid.  See:
+    // https://bugzilla.gnome.org/show_bug.cgi?id=735421
+    public override void realize() {
+        base.realize();
+        
+        Gdk.RGBA bg = get_toplevel().get_style_context().get_background_color(Gtk.StateFlags.NORMAL);
+        override_background_color(Gtk.StateFlags.NORMAL, bg);
+    }
+#endif
+    
     // if the modal value changes, preserve it (unless it's changing because we're forcing it to
     // go modal/modeless during transitions we're attempting to work around)
     private void on_modal_changed() {
diff --git a/src/toolkit/toolkit-deck-window.vala b/src/toolkit/toolkit-deck-window.vala
index fa81775..e330474 100644
--- a/src/toolkit/toolkit-deck-window.vala
+++ b/src/toolkit/toolkit-deck-window.vala
@@ -43,6 +43,19 @@ public class DeckWindow : Gtk.Dialog {
         deck.failure.disconnect(on_deck_failure);
     }
     
+#if ENABLE_UNITY
+    // When description_text_window is visible, the entire GtkGrid's background color goes black
+    // in the GtkPopover; this overrides the color and uses GtkPopover's background color for the
+    // GtkGrid.  See:
+    // https://bugzilla.gnome.org/show_bug.cgi?id=735421
+    public override void realize() {
+        base.realize();
+        
+        Gdk.RGBA bg = get_toplevel().get_style_context().get_background_color(Gtk.StateFlags.NORMAL);
+        override_background_color(Gtk.StateFlags.NORMAL, bg);
+    }
+#endif
+    
     private void on_deck_dismissed(bool user_request, bool final) {
         if (final)
             response(Gtk.ResponseType.CLOSE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]