A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/themix-project/themix-gui/commit/f8aea07215dbd9374776493fb123591773d29a8a below:

allow showing 'Edit Generated Theme' label for impor… · themix-project/themix-gui@f8aea07 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+13

-11

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+13

-11

lines changed Original file line number Diff line number Diff line change

@@ -35,7 +35,9 @@ def merge_model_with_plugin(

35 35

value_filter_key=None

36 36

):

37 37

result = []

38 -

plugin_theme_model = getattr(theme_plugin, "theme_model_"+theme_model_name)

38 +

plugin_theme_model = getattr(theme_plugin, "theme_model_"+theme_model_name, None)

39 +

if not plugin_theme_model:

40 +

return result

39 41

plugin_theme_model_keys = []

40 42

for theme_value in plugin_theme_model:

41 43

if isinstance(theme_value, str):

@@ -75,11 +77,6 @@ def merge_model_with_plugins(

75 77

base_theme_model = []

76 78

whole_theme_model = base_theme_model[::]

77 79 78 -

if value_filter_key:

79 -

for theme_value in base_theme_model:

80 -

if 'key' in theme_value:

81 -

theme_value.setdefault('value_filter', {}).setdefault(value_filter_key, [])

82 - 83 80

for theme_plugin in plugins.values():

84 81

plugin_theme_model = merge_model_with_plugin(

85 82

theme_model_name=theme_model_name,

@@ -88,6 +85,7 @@ def merge_model_with_plugins(

88 85

value_filter_key=value_filter_key

89 86

)

90 87

whole_theme_model += plugin_theme_model

88 + 91 89

return whole_theme_model

92 90 93 91

@@ -228,7 +226,12 @@ def merge_theme_model_with_plugins(theme_model_name, base_theme_model=None):

228 226

'filter': lambda _v: False

229 227

},

230 228

]

231 -

THEME_MODEL['base'] = merge_theme_model_with_plugins('gtk', BASE_THEME_MODEL_GTK)

229 +

THEME_MODEL['base'] = merge_model_with_plugins(

230 +

theme_model_name='gtk',

231 +

base_theme_model=merge_theme_model_with_plugins('gtk', BASE_THEME_MODEL_GTK),

232 +

value_filter_key='FROM_PLUGIN',

233 +

plugins=IMPORT_PLUGINS,

234 +

)

232 235 233 236 234 237

BASE_THEME_MODEL_OPTIONS = [

Original file line number Diff line number Diff line change

@@ -259,12 +259,11 @@ class Plugin(OomoxImportPlugin):

259 259

'fallback_value': None,

260 260

'display_name': _('Image Thumbnail'),

261 261

},

262 +

]

263 +

theme_model_gtk = [

262 264

{

263 265

'display_name': _('Edit Generated Theme'),

264 266

'type': 'separator',

265 -

'value_filter': {

266 -

'FROM_PLUGIN': ['import_pil']

267 -

},

268 267

},

269 268

]

270 269

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4