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/64a285c213a3f5aaa0121c0478d5a2c300025478 below:

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

File tree Expand file treeCollapse file tree 1 file changed

+20

-2

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+20

-2

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

@@ -9,7 +9,7 @@

9 9 10 10

OPTION_GTK3_CURRENT_VERSION_ONLY = 'OPTION_GTK3_CURRENT_VERSION_ONLY'

11 11

OPTION_EXPORT_CINNAMON_THEME = 'OPTION_EXPORT_CINNAMON_THEME'

12 - 12 +

OPTION_DEFAULT_PATH = 'default_path'

13 13 14 14

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

15 15

GTK_THEME_DIR = os.path.join(PLUGIN_DIR, "gtk-theme/")

@@ -20,11 +20,15 @@ class OomoxThemeExportDialog(CommonGtkThemeExportDialog):

20 20

config_name = 'gtk_theme_oomox'

21 21 22 22

def do_export(self):

23 +

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

24 +

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

25 + 23 26

self.command = [

24 27

"bash",

25 28

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

26 29

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

27 -

"--output", self.theme_name,

30 +

"--target-dir", new_destination_dir,

31 +

"--output", theme_name,

28 32

self.temp_theme_path,

29 33

]

30 34

make_opts = []

@@ -43,7 +47,11 @@ def do_export(self):

43 47

]

44 48

super().do_export()

45 49 50 +

self.export_config[OPTION_DEFAULT_PATH] = new_destination_dir

51 +

self.export_config.save()

52 + 46 53

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

54 +

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

47 55

super().__init__(

48 56

transient_for=transient_for,

49 57

colorscheme=colorscheme,

@@ -58,9 +66,19 @@ def __init__(self, transient_for, colorscheme, theme_name, **kwargs):

58 66

'default': False,

59 67

'display_name': _("Generate theme for _Cinnamon"),

60 68

},

69 +

OPTION_DEFAULT_PATH: {

70 +

'default': default_themes_path,

71 +

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

72 +

},

61 73

},

62 74

**kwargs

63 75

)

76 +

self.option_widgets[OPTION_DEFAULT_PATH].set_text(

77 +

os.path.join(

78 +

self.export_config[OPTION_DEFAULT_PATH],

79 +

self.theme_name,

80 +

)

81 +

)

64 82 65 83 66 84

class Plugin(OomoxThemePlugin):

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