Skip to content

Commit

Permalink
style: Fix quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
equinusocio committed Aug 8, 2016
1 parent 0225dd2 commit cdcf2f1
Showing 1 changed file with 70 additions and 70 deletions.
140 changes: 70 additions & 70 deletions mt_config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-

"""
'''
Material Theme Config.
"""
'''
import sublime
import sublime_plugin
import os
Expand All @@ -12,51 +12,51 @@
OPTIONS = OrderedDict(
(
(
"Accent",
'Accent',
[
"material_theme_accent_lime",
"material_theme_accent_purple",
"material_theme_accent_red",
"material_theme_accent_orange",
"material_theme_accent_yellow",
"material_theme_accent_indigo",
"material_theme_accent_pink",
"material_theme_accent_blue",
"material_theme_accent_cyan",
"material_theme_accent_bright-teal",
"material_theme_accent_acid-lime",
"material_theme_accent_graphite",
"material_theme_accent_brba",
"material_theme_accent_sky",
"material_theme_accent_tomato"
'material_theme_accent_lime',
'material_theme_accent_purple',
'material_theme_accent_red',
'material_theme_accent_orange',
'material_theme_accent_yellow',
'material_theme_accent_indigo',
'material_theme_accent_pink',
'material_theme_accent_blue',
'material_theme_accent_cyan',
'material_theme_accent_bright-teal',
'material_theme_accent_acid-lime',
'material_theme_accent_graphite',
'material_theme_accent_brba',
'material_theme_accent_sky',
'material_theme_accent_tomato'
],
),
(
"Tabs",
'Tabs',
[
"material_theme_tabs_autowidth",
"material_theme_tabs_separator",
"material_theme_bold_tab",
"material_theme_small_tab"
'material_theme_tabs_autowidth',
'material_theme_tabs_separator',
'material_theme_bold_tab',
'material_theme_small_tab'
],
),
(
"Sidebar",
'Sidebar',
[
"material_theme_disable_fileicons",
"material_theme_disable_folder_animation",
"material_theme_compact_sidebar",
"material_theme_disable_tree_indicator",
"material_theme_tree_headings"
'material_theme_disable_fileicons',
'material_theme_disable_folder_animation',
'material_theme_compact_sidebar',
'material_theme_disable_tree_indicator',
'material_theme_tree_headings'
],
),
(
"Panels",
'Panels',
[
"material_theme_compact_panel",
"material_theme_small_statusbar",
"material_theme_panel_separator",
"material_theme_contrast_mode"
'material_theme_compact_panel',
'material_theme_small_statusbar',
'material_theme_panel_separator',
'material_theme_contrast_mode'
],
)
)
Expand All @@ -80,11 +80,11 @@
{: .mt-config .ui-control }\n'''
OTHER_THEME = '''[**%(status)s**{: .mt-config .ui-control %(class)s} Other: %(name)s](theme:%(set)s:%(section)s)\
{: .mt-config .ui-control }\n'''
MARKED = "☑︎"
UNMARKED = "☐"
RADIO_MARKED = "•"
RADIO_UNMARKED = "•"
STYLE = """\
MARKED = '☑︎'
UNMARKED = '☐'
RADIO_MARKED = '•'
RADIO_UNMARKED = '•'
STYLE = '''\
html,
body {
padding: 0;
Expand Down Expand Up @@ -164,19 +164,19 @@
}
{% endif %}
"""
'''


def is_mt_res(item):
"""Check if a Material Theme resource."""
'''Check if a Material Theme resource.'''

return item.startswith('Packages/Material Theme/')


"""Material Theme Configuration."""
'''Material Theme Configuration.'''
class MtConfigCommand(sublime_plugin.TextCommand):

"""Handle option selection."""
'''Handle option selection.'''
def on_navigate(self, href):
try:
import mdpopups
Expand All @@ -201,7 +201,7 @@ def on_navigate(self, href):

self.show_popup(section)

"""Show config popup."""
'''Show config popup.'''
def show_popup(self, menu):

settings = sublime.load_settings('Preferences.sublime-settings')
Expand All @@ -213,7 +213,7 @@ def show_popup(self, menu):
if menu == 'Main':
popup.append(SECTIONS_LABEL)
for k in ['Theme', 'Color Scheme'] + list(OPTIONS.keys()):
popup.append(SECTIONS % {"section": k})
popup.append(SECTIONS % {'section': k})

elif menu == 'Theme':
theme = settings.get('theme', '')
Expand All @@ -225,21 +225,21 @@ def show_popup(self, menu):
option_value = theme == option
popup.append(
THEME % {
"name": option,
"status": RADIO_MARKED if option_value else RADIO_UNMARKED,
"set": option,
"class": '.success' if option_value else '.error',
'section': "Theme"
'name': option,
'status': RADIO_MARKED if option_value else RADIO_UNMARKED,
'set': option,
'class': '.success' if option_value else '.error',
'section': 'Theme'
}
)
if theme is not None and theme not in mt_themes:
popup.append(
OTHER_THEME % {
"name": theme,
"status": RADIO_MARKED,
"set": option,
"class": '.success' if option_value else '.error',
'section': "Theme"
'name': theme,
'status': RADIO_MARKED,
'set': option,
'class': '.success' if option_value else '.error',
'section': 'Theme'
}
)

Expand All @@ -254,21 +254,21 @@ def show_popup(self, menu):
scheme_name = option[32:].replace('/', ' ⚠️ ')
popup.append(
SCHEME % {
"name": scheme_name,
"status": RADIO_MARKED if option_value else RADIO_UNMARKED,
"set": option,
"class": '.success' if option_value else '.error',
"section": 'Color Scheme'
'name': scheme_name,
'status': RADIO_MARKED if option_value else RADIO_UNMARKED,
'set': option,
'class': '.success' if option_value else '.error',
'section': 'Color Scheme'
}
)
if scheme is not None and scheme not in mt_schemes:
popup.append(
OTHER_SCHEME % {
"name": scheme,
"status": RADIO_MARKED,
"set": option,
"class": '.success',
"section": 'Color Scheme'
'name': scheme,
'status': RADIO_MARKED,
'set': option,
'class': '.success',
'section': 'Color Scheme'
}
)
else:
Expand All @@ -277,11 +277,11 @@ def show_popup(self, menu):
option_value = bool(settings.get(option, False))
popup.append(
GENERAL_SETTING % {
"name": option,
"status": MARKED if option_value else UNMARKED,
"set": str(not option_value),
"class": '.success' if option_value else '.error',
"section": menu
'name': option,
'status': MARKED if option_value else UNMARKED,
'set': str(not option_value),
'class': '.success' if option_value else '.error',
'section': menu
}
)

Expand Down

0 comments on commit cdcf2f1

Please sign in to comment.