From b5fce80407e2b8cd18a238058dc1a1103f3f5b6d Mon Sep 17 00:00:00 2001 From: grassmunk Date: Fri, 3 Jul 2020 10:40:13 -0700 Subject: [PATCH] (hopefully) fixing pluslib for issue #135 Issue #135 was caused by the function `convert_icon` used a relative file location, it now uses an absolute location. Also removed loop that creates icons for gtk-3.24 since that it just a symlink to 3.0. --- Plus/pluslib.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Plus/pluslib.py b/Plus/pluslib.py index 1abbe0e..b69f953 100644 --- a/Plus/pluslib.py +++ b/Plus/pluslib.py @@ -38,6 +38,13 @@ from fontTools import ttLib from configparser import ConfigParser from PIL import BmpImagePlugin, PngImagePlugin, Image +running_folder = os.path.dirname(os.path.abspath(__file__)) +share_dir = running_folder +libexec_dir = running_folder +work_dir = running_folder +if not os.path.exists(work_dir): + os.makedirs(work_dir) + SCREEN_SAVER_SCRIPT = '''#!/bin/sh # *** DEPENDS ON xprintidle AND wmctrl AND wine *** @@ -1533,7 +1540,7 @@ class ChicagoPlus: self.logger.debug("{:<21} | Colors: ButtonDKShadow={}, ButtonLight={}, ButtonShadow={}, ButtonHilight={}, ButtonFace={}, ButtonText={} ".format("Colors",ButtonDKShadow, ButtonLight, ButtonShadow, ButtonHilight, ButtonFace, ButtonText)) - for i in ['gtk-3.0/','gtk-3.24/']: + for i in ['gtk-3.0/']: folder = path + i + "buttons/" @@ -2358,7 +2365,7 @@ class ChicagoPlus: return cursor - def convert_icon(self, target_folder, icon_file_path, tmp_file="./chicago95_tmp_file.svg"): + def convert_icon(self, target_folder, icon_file_path, tmp_file=work_dir + "/chicago95_tmp_file.svg"): ## Converts Icons to PNG # Input: # folder: svg file destination folder