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/f95a4cd2cd9b39b0afa6b41181e5a463f1ce838d below:

allow to configure export theme path (… · themix-project/themix-gui@f95a4cd · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+28

-1

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+28

-1

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

@@ -5,6 +5,7 @@

5 5

from oomox_gui.export_common import CommonGtkThemeExportDialog, OPTION_GTK2_HIDPI

6 6

from oomox_gui.color import convert_theme_color_to_gdk, mix_theme_colors

7 7 8 +

OPTION_DEFAULT_PATH = 'default_path'

8 9 9 10

PLUGIN_DIR = os.path.dirname(os.path.realpath(__file__))

10 11

THEME_DIR = os.path.join(PLUGIN_DIR, "materia-theme/")

@@ -16,14 +17,40 @@ class MateriaThemeExportDialog(CommonGtkThemeExportDialog):

16 17

timeout = 1000

17 18 18 19

def do_export(self):

20 +

export_path = self.option_widgets[OPTION_DEFAULT_PATH].get_text()

21 +

new_destination_dir, theme_name = export_path.rsplit('/', 1)

19 22

self.command = [

20 23

"bash",

21 24

os.path.join(THEME_DIR, "change_color.sh"),

22 25

"--hidpi", str(self.export_config[OPTION_GTK2_HIDPI]),

23 -

"--output", self.theme_name,

26 +

"--target", new_destination_dir,

27 +

"--output", theme_name,

24 28

self.temp_theme_path,

25 29

]

26 30

super().do_export()

31 +

self.export_config[OPTION_DEFAULT_PATH] = new_destination_dir

32 +

self.export_config.save()

33 + 34 +

def __init__(self, transient_for, colorscheme, theme_name, **kwargs):

35 +

default_themes_path = os.path.join(os.environ['HOME'], '.themes')

36 +

super().__init__(

37 +

transient_for=transient_for,

38 +

colorscheme=colorscheme,

39 +

theme_name=theme_name,

40 +

add_options={

41 +

OPTION_DEFAULT_PATH: {

42 +

'default': default_themes_path,

43 +

'display_name': _("Export _path: "),

44 +

},

45 +

},

46 +

**kwargs

47 +

)

48 +

self.option_widgets[OPTION_DEFAULT_PATH].set_text(

49 +

os.path.join(

50 +

self.export_config[OPTION_DEFAULT_PATH],

51 +

self.theme_name,

52 +

)

53 +

)

27 54 28 55 29 56

def _monkeypatch_update_preview_colors(preview_object):

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