Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

Commit 8e31953

Browse files
authored
Add preset manager (#270)
2 parents 46233e8 + d441c10 commit 8e31953

33 files changed

+1016
-354
lines changed

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ global:
77
sudo ninja -C builddir install
88

99
user:
10-
meson builddiruser
11-
meson configure builddiruser -Dprefix="$(pwd)/builddiruser/testdir"
12-
ninja -C builddiruser install
13-
ninja -C builddiruser run
10+
meson builddir --prefix="$(shell pwd)/builddir/testdir" --wipe
11+
ninja -C builddir install
12+
ninja -C builddir run

com.github.GradienceTeam.Gradience.Devel.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@
7171
"config-opts": ["-Dbuildtype=debug"],
7272
"sources" : [
7373
{
74-
"type" : "dir",
75-
"path" : "."
74+
"type" : "git",
75+
"path" : ".",
76+
"branch": "next"
7677
}
7778
]
7879
}

local.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ read -p "Do you want to install Python requirements? (yes, no): " answer
2121

2222
if [[ "$answer" == "yes" ]]; then
2323
pip3 install --user -r requirements.txt
24-
pip3 install $(pwd)/monet/material_color_utilities_python-0.1.0-py3-none-any.whl
2524
elif [[ "$answer" == "no" ]]; then
2625
echo "Skipping requirements installation"
2726
fi
@@ -31,7 +30,7 @@ rm -r builddir
3130

3231
echo "Rebuilding"
3332
meson builddir
34-
meson configure builddir -Dprefix="$(pwd)/builddir/testdir"
33+
meson configure builddir -Dprefix="$(pwd)/builddir/testdir" -Dbuildtype=debug
3534
ninja -C builddir install
3635

3736
echo "Running"

meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ python = import('python')
1313

1414
# Project information
1515
PROJECT_URL = 'https://github.com/GradienceTeam/Gradience'
16-
BUGTRACKER_URL = 'https://github.com/tfuxu/themeteor/issues'
16+
BUGTRACKER_URL = 'https://github.com/GradienceTeam/Gradience/issues'
1717
HELP_URL = 'https://github.com/orgs/GradienceTeam/discussions'
18-
TRANSLATE_URL = 'https://www.transifex.com/Gradienceteam/Gradience'
18+
TRANSLATE_URL = 'https://hosted.weblate.org/projects/GradienceTeam/gradience/'
1919

2020
# Constants
2121
PROJECT_RDNN_NAME = 'com.github.GradienceTeam.Gradience'

po/Gradience.pot

Lines changed: 45 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ msgstr ""
1919

2020
#: data/com.github.GradienceTeam.Gradience.desktop.in.in:3
2121
#: data/com.github.GradienceTeam.Gradience.appdata.xml.in.in:8
22-
#: src/ui/window.blp:5 src/main.py:684
22+
#: src/ui/window.blp:5 src/main.py:616
2323
msgid "Gradience"
2424
msgstr ""
2525

2626
#: data/com.github.GradienceTeam.Gradience.appdata.xml.in.in:9
2727
msgid "Change the look of Adwaita, with ease."
2828
msgstr ""
2929

30-
#: data/com.github.GradienceTeam.Gradience.appdata.xml.in.in:11 src/main.py:686
30+
#: data/com.github.GradienceTeam.Gradience.appdata.xml.in.in:11 src/main.py:618
3131
msgid "Gradience Team"
3232
msgstr ""
3333

@@ -133,11 +133,11 @@ msgstr ""
133133
msgid "Toggle Text Value"
134134
msgstr ""
135135

136-
#: src/ui/window.blp:23 src/main.py:474 src/window.py:147
136+
#: src/ui/window.blp:23 src/main.py:406 src/window.py:146
137137
msgid "Apply"
138138
msgstr ""
139139

140-
#: src/ui/window.blp:47
140+
#: src/ui/window.blp:46
141141
msgid "Presets"
142142
msgstr ""
143143

@@ -157,120 +157,88 @@ msgstr ""
157157
msgid "Advanced"
158158
msgstr ""
159159

160-
#: src/ui/window.blp:119
161-
msgid "Built-in Presets"
162-
msgstr ""
163-
164160
#: src/ui/window.blp:121
165-
msgid "Adwaita"
166-
msgstr ""
167-
168-
#: src/ui/window.blp:126
169-
msgid "Adwaita Dark"
170-
msgstr ""
171-
172-
#: src/ui/window.blp:131
173-
msgid "Pretty purple"
174-
msgstr ""
175-
176-
#: src/ui/window.blp:136
177-
msgid "Manage Presets"
178-
msgstr ""
179-
180-
#: src/ui/window.blp:146
181161
msgid "Reset Applied Color Scheme"
182162
msgstr ""
183163

184-
#: src/ui/window.blp:150
164+
#: src/ui/window.blp:125
185165
msgid "About Gradience"
186166
msgstr ""
187167

188-
#: src/ui/window.blp:159
189-
msgid "Try Adwaita Demo"
168+
#: src/ui/window.blp:134
169+
msgid "Adwaita Demo"
190170
msgstr ""
191171

192-
#: src/ui/window.blp:163
172+
#: src/ui/window.blp:138
193173
msgid "GTK4 Demo"
194174
msgstr ""
195175

196-
#: src/ui/window.blp:167
176+
#: src/ui/window.blp:142
197177
msgid "GTK4 Widget Factory"
198178
msgstr ""
199179

200-
#: src/app_type_dialog.py:46 src/main.py:511
180+
#: src/app_type_dialog.py:46 src/main.py:443
201181
msgid "Cancel"
202182
msgstr ""
203183

204-
#: src/main.py:173 src/main.py:179
205-
msgid "Failed to load preset"
206-
msgstr ""
207-
208-
#: src/main.py:196
209-
msgid "Open in File Manager"
210-
msgstr ""
211-
212-
#: src/main.py:202
213-
msgid "User Defined Presets"
214-
msgstr ""
215-
216-
#: src/main.py:397
184+
#: src/main.py:329
217185
msgid "Unsaved changes"
218186
msgstr ""
219187

220-
#: src/main.py:407
188+
#: src/main.py:339
221189
msgid "Save changes"
222190
msgstr ""
223191

224-
#: src/main.py:471
192+
#: src/main.py:403
225193
msgid "Apply this color scheme?"
226194
msgstr ""
227195

228-
#: src/main.py:472
196+
#: src/main.py:404
229197
msgid ""
230198
"Warning: any custom CSS files for those app types will be irreversibly "
231199
"overwritten!"
232200
msgstr ""
233201

234-
#: src/main.py:484
202+
#: src/main.py:416
235203
msgid "Reset applied color scheme?"
236204
msgstr ""
237205

238-
#: src/main.py:485
206+
#: src/main.py:417
239207
msgid "Make sure you have the current settings saved as a preset."
240208
msgstr ""
241209

242-
#: src/main.py:487
210+
#: src/main.py:419
243211
msgid "Reset"
244212
msgstr ""
245213

246-
#: src/main.py:497
214+
#: src/main.py:429
247215
msgid "Save preset as..."
248216
msgstr ""
249217

250-
#: src/main.py:499 src/main.py:525 src/main.py:540
218+
#: src/main.py:431 src/main.py:457 src/main.py:472
251219
#, python-brace-format
252220
msgid ""
253221
"Saving preset to <tt>{0}</tt>. If that preset already exists, it will be "
254222
"overwritten!"
255223
msgstr ""
256224

257-
#: src/main.py:512
225+
#: src/main.py:444
258226
msgid "Save"
259227
msgstr ""
260228

261-
#: src/main.py:582
262-
msgid "Scheme successfully saved!"
229+
#: src/main.py:514
230+
msgid "Preset saved"
263231
msgstr ""
264232

265-
#: src/main.py:646
266-
msgid "Scheme set successfully!"
233+
#: src/main.py:578
234+
msgid "Preset set sucessfully"
267235
msgstr ""
268236

269-
#: src/main.py:679
270-
msgid "Reset successfully!"
237+
#: src/main.py:611
238+
msgid "Preset reseted"
271239
msgstr ""
272240

273-
#: src/main.py:714
241+
#: src/main.py:650
274242
msgid ""
275243
"\n"
276244
" <ul>\n"
@@ -296,18 +264,18 @@ msgid ""
296264
" "
297265
msgstr ""
298266

299-
#: src/main.py:732
267+
#: src/main.py:668
300268
msgid ""
301269
"\n"
302270
"Gradience, originally Adwaita Manager (AdwCustomizer) is a tool for "
303271
"customizing Libadwaita applications and the adw-gtk3 theme.\n"
304272
"With Gradience you can:\n"
305273
"\n"
306-
" - Change any color of Adwaita theme\n"
307-
" - Apply Material 3 colors from wallaper\n"
308-
" - Use other users presets\n"
309-
" - Change advanced options with CSS\n"
310-
" - Extend functionality using plugins\n"
274+
"- Change any color of Adwaita theme\n"
275+
"- Apply Material 3 colors from wallaper\n"
276+
"- Use other users presets\n"
277+
"- Change advanced options with CSS\n"
278+
"- Extend functionality using plugins\n"
311279
"\n"
312280
"This app is written in Python and uses GTK 4 and libadwaita.\n"
313281
" "
@@ -564,11 +532,11 @@ msgstr ""
564532
msgid "Dark"
565533
msgstr ""
566534

567-
#: src/window.py:142
535+
#: src/window.py:141
568536
msgid "Monet Engine"
569537
msgstr ""
570538

571-
#: src/window.py:144
539+
#: src/window.py:143
572540
msgid ""
573541
"Monet is an engine that generates Material Design 3 palette from backgrounds "
574542
"color."
@@ -578,39 +546,39 @@ msgstr ""
578546
msgid "Background Image"
579547
msgstr ""
580548

581-
#: src/window.py:163
549+
#: src/window.py:164
582550
msgid "Choose a file"
583551
msgstr ""
584552

585-
#: src/window.py:186
553+
#: src/window.py:187
586554
msgid "Monet Palette"
587555
msgstr ""
588556

589-
#: src/window.py:193
557+
#: src/window.py:194
590558
msgid "Tone"
591559
msgstr ""
592560

593-
#: src/window.py:205
561+
#: src/window.py:206
594562
msgid "Theme"
595563
msgstr ""
596564

597-
#: src/window.py:231
565+
#: src/window.py:232
598566
msgid "Unsupported background type"
599567
msgstr ""
600568

601-
#: src/window.py:247
602-
msgid "Palette generated with success!"
569+
#: src/window.py:248
570+
msgid "Palette generated"
603571
msgstr ""
604572

605-
#: src/window.py:251
573+
#: src/window.py:252
606574
msgid "Select a background first"
607575
msgstr ""
608576

609-
#: src/window.py:290
577+
#: src/window.py:291
610578
msgid "Palette Colors"
611579
msgstr ""
612580

613-
#: src/window.py:292
581+
#: src/window.py:293
614582
msgid ""
615583
"Named palette colors used by some applications. Default colors follow the <a "
616584
"href=\"https://developer.gnome.org/hig/reference/palette.html\">GNOME Human "

pypi-dependencies.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@
5555
}
5656
]
5757
},
58+
{
59+
"name": "python3-urllib3",
60+
"buildsystem": "simple",
61+
"build-commands": [
62+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"urllib3\" --no-build-isolation"
63+
],
64+
"sources": [
65+
{
66+
"type": "file",
67+
"url": "https://files.pythonhosted.org/packages/6f/de/5be2e3eed8426f871b170663333a0f627fc2924cc386cd41be065e7ea870/urllib3-1.26.12-py2.py3-none-any.whl",
68+
"sha256": "b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"
69+
}
70+
]
71+
},
5872
{
5973
"name": "python3-svglib",
6074
"buildsystem": "simple",
@@ -98,6 +112,40 @@
98112
"sha256": "48c24706c23bb4262173b6fa49eabb10afa15b8412f14283120549517ccfa314"
99113
}
100114
]
115+
},
116+
{
117+
"name": "python3-requests",
118+
"buildsystem": "simple",
119+
"build-commands": [
120+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"requests\" --no-build-isolation"
121+
],
122+
"sources": [
123+
{
124+
"type": "file",
125+
"url": "https://files.pythonhosted.org/packages/6f/de/5be2e3eed8426f871b170663333a0f627fc2924cc386cd41be065e7ea870/urllib3-1.26.12-py2.py3-none-any.whl",
126+
"sha256": "b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"
127+
},
128+
{
129+
"type": "file",
130+
"url": "https://files.pythonhosted.org/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl",
131+
"sha256": "84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"
132+
},
133+
{
134+
"type": "file",
135+
"url": "https://files.pythonhosted.org/packages/db/51/a507c856293ab05cdc1db77ff4bc1268ddd39f29e7dc4919aa497f0adbec/charset_normalizer-2.1.1-py3-none-any.whl",
136+
"sha256": "83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
137+
},
138+
{
139+
"type": "file",
140+
"url": "https://files.pythonhosted.org/packages/e9/06/d3d367b7af6305b16f0d28ae2aaeb86154fa91f144f036c2d5002a5a202b/certifi-2022.6.15-py3-none-any.whl",
141+
"sha256": "fe86415d55e84719d75f8b69414f6438ac3547d2078ab91b67e779ef69378412"
142+
},
143+
{
144+
"type": "file",
145+
"url": "https://files.pythonhosted.org/packages/ca/91/6d9b8ccacd0412c08820f72cebaa4f0c0441b5cda699c90f618b6f8a1b42/requests-2.28.1-py3-none-any.whl",
146+
"sha256": "8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349"
147+
}
148+
]
101149
}
102150
]
103151
}

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
anyascii~=0.3
2626
regex
2727
material-color-utilities-python
28-
29-
svglib
28+
urllib3
29+
svglib

src/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# __init__.py
2+
#
13
# Change the look of Adwaita, with ease
24
# Copyright (C) 2022 Gradience Team
35
#

0 commit comments

Comments
 (0)