Skip to content

Commit

Permalink
Fix: osd-styles not being installed
Browse files Browse the repository at this point in the history
  • Loading branch information
kozec committed Dec 24, 2017
1 parent f24035e commit ad0c784
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scc/gui/global_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def on_entTitle_changed(self, ent):
def on_cbOSDColorPreset_changed(self, cb):
theme = cb.get_model().get_value(cb.get_active_iter(), 0)
if theme in (None, "None"): return
filename = os.path.join(get_share_path(), "osd_styles", theme)
filename = os.path.join(get_share_path(), "osd-styles", theme)
data = json.loads(file(filename, "r").read())

# Transfer values from json to config
Expand All @@ -653,7 +653,7 @@ def on_cbOSDColorPreset_changed(self, cb):
def on_cbOSDStyle_changed(self, cb):
color_keys = self.app.config['osk_colors'].keys() + self.app.config['osd_colors'].keys()
osd_style = cb.get_model().get_value(cb.get_active_iter(), 0)
css_file = os.path.join(get_share_path(), "osd_styles", osd_style)
css_file = os.path.join(get_share_path(), "osd-styles", osd_style)
first_line = file(css_file, "r").read().split("\n")[0]
used_colors = None # None means "all"
if "Used colors:" in first_line:
Expand Down
4 changes: 2 additions & 2 deletions scc/osd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _apply_css(config):
for x in config['osd_colors'] : colors[x] = config['osd_colors'][x]
colors = OSDCssMagic(colors)
try:
css_file = os.path.join(get_share_path(), "osd_styles", config["osd_style"])
css_file = os.path.join(get_share_path(), "osd-styles", config["osd_style"])
css = file(css_file, "r").read()
if ((Gtk.get_major_version(), Gtk.get_minor_version()) > (3, 20)):
css += OSDWindow.CSS_3_20
Expand All @@ -85,7 +85,7 @@ def _apply_css(config):
log.error("Retrying with default values")

OSDWindow.css_provider = Gtk.CssProvider()
css_file = os.path.join(get_share_path(), "osd_styles", "Classic.gtkstyle.css")
css_file = os.path.join(get_share_path(), "osd-styles", "Classic.gtkstyle.css")
css = file(css_file, "r").read()
if ((Gtk.get_major_version(), Gtk.get_minor_version()) > (3, 20)):
css += OSDWindow.CSS_3_20
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
('share/scc/default_profiles', glob.glob("default_profiles/.*.sccprofile")),
('share/scc/default_menus', glob.glob("default_menus/*.menu")),
('share/scc/default_menus', glob.glob("default_menus/.*.menu")),
('share/scc/osd-styles', glob.glob("osd-styles/*.json")),
('share/scc/osd-styles', glob.glob("osd-styles/*.css")),
('share/pixmaps', [ "images/sc-controller.svg" ]),
('share/mime/packages', [ "scc-mime-types.xml" ]),
('share/applications', ['scripts/sc-controller.desktop' ]),
Expand Down

0 comments on commit ad0c784

Please sign in to comment.