[meld/flatpak-ci: 25/31] meldwindow: Add theoretical support for devel styling



commit a1b8a6248bcdba706aeb82628c3b33f8aefb6122
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Nov 17 06:16:10 2019 +1000

    meldwindow: Add theoretical support for devel styling
    
    ...that will work as soon as this flag gets set.

 meld/conf.py       | 2 ++
 meld/meldwindow.py | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/meld/conf.py b/meld/conf.py
index 36d9879d..5d0d9d8c 100644
--- a/meld/conf.py
+++ b/meld/conf.py
@@ -18,6 +18,8 @@ DATADIR = Path(sys.prefix) / "share" / "meld"
 LOCALEDIR = Path(sys.prefix) / "share" / "locale"
 # END
 
+PROFILE = ''
+
 # Flag enabling some workarounds if data dir isn't installed in standard prefix
 DATADIR_IS_UNINSTALLED = False
 PYTHON_REQUIREMENT_TUPLE = (3, 6)
diff --git a/meld/meldwindow.py b/meld/meldwindow.py
index e3b46974..1c408af2 100644
--- a/meld/meldwindow.py
+++ b/meld/meldwindow.py
@@ -22,7 +22,7 @@ from gi.repository import Gdk, Gio, GLib, Gtk
 # Import support module to get all builder-constructed widgets in the namespace
 import meld.ui.gladesupport  # noqa: F401
 import meld.ui.util
-from meld.conf import _
+from meld.conf import PROFILE, _
 from meld.const import (
     FILE_FILTER_ACTION_FORMAT,
     TEXT_FILTER_ACTION_FORMAT,
@@ -106,6 +106,10 @@ class MeldWindow(Gtk.ApplicationWindow):
         self.scheduler = LifoScheduler()
         self.scheduler.connect("runnable", self.on_scheduler_runnable)
 
+        if PROFILE != '':
+            style_context = self.get_style_context()
+            style_context.add_class("devel")
+
     def do_realize(self):
         Gtk.ApplicationWindow.do_realize(self)
 


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