[meld: 153/180] bin/meld: Remove CSS hacks



commit 65b136e64a30f8ec86d235d67527f0df81da6238
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sat Jan 10 09:54:55 2015 +1000

    bin/meld: Remove CSS hacks

 bin/meld |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 02a6d5d..c6bea2c 100755
--- a/bin/meld
+++ b/bin/meld
@@ -203,29 +203,6 @@ def setup_resources():
         Gdk.Screen.get_default(), provider,
         Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
 
-    if Gtk.get_minor_version() >= 13:
-        # Retrieve the selection colour from GtkTextView. Ideally, we'd do this
-        # on MeldSourceView, but we don't really want to import that here.
-        style = Gtk.StyleContext()
-        widget_path = Gtk.WidgetPath()
-        widget_path.append_type(Gtk.TextView)
-        style.set_path(widget_path)
-        # This is basically indefensible internal GTK+ ABI, but... whatever.
-        style.add_class(Gtk.STYLE_CLASS_VIEW)
-        old_bg_color = style.get_background_color(
-            Gtk.StateFlags.NORMAL).to_string()
-        color = style.get_background_color(Gtk.StateFlags.SELECTED).to_string()
-
-        fixes_provider = Gtk.CssProvider()
-        fixes_provider.load_from_data(
-            "@define-color override-background-color %s; "
-            "MeldSourceView { background-color: rgba(0.0, 0.0, 0.0, 0.0); } "
-            "MeldSourceView:selected { background-color: %s; } " %
-            (old_bg_color, color))
-        Gtk.StyleContext.add_provider_for_screen(
-            Gdk.Screen.get_default(), fixes_provider,
-            Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
-
 
 def setup_settings():
     import meld.conf


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