[meld] bin/meld: Fix uninstalled use for recent style scheme translation change
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] bin/meld: Fix uninstalled use for recent style scheme translation change
- Date: Fri, 27 Sep 2019 21:51:38 +0000 (UTC)
commit c931d532f3f548abc81c3e15e80189525585ea0f
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Sep 28 07:49:47 2019 +1000
bin/meld: Fix uninstalled use for recent style scheme translation change
We've recently moved to `.in` naming for these, which GtkSourceView
won't find. The easiest fix for uninstalled use is to simply copy them
sideways to their expected names.
bin/meld | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/bin/meld b/bin/meld
index 1279dc46..df6ab95d 100755
--- a/bin/meld
+++ b/bin/meld
@@ -281,6 +281,16 @@ def setup_resources():
style_path = os.path.join(meld.conf.DATADIR, "styles")
GtkSource.StyleSchemeManager.get_default().append_search_path(style_path)
+ # Just copy style schemes to the file ending expected by
+ # GtkSourceView if we're uninstalled and they're missing
+ if uninstalled:
+ for style in {'meld-base', 'meld-dark'}:
+ path = os.path.join(
+ style_path, '{}.style-scheme.xml'.format(style))
+ if not os.path.exists(path):
+ import shutil
+ shutil.copyfile(path + '.in', path)
+
def setup_settings():
import meld.conf
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]