Commit graph

381 commits

Author SHA1 Message Date
salarua
456ed8cdf4 fix(preset_utils.py): Improve error/destructive contrasts
Fixes #425
2023-04-03 15:03:04 -07:00
tfuxu
af81166e2b
chore: update some paths to contain information about 0.4.1 release 2023-03-08 19:46:21 +01:00
tfuxu
4e5d2a03a1
frontend: move settings_schema to schemas/ subfolder
* rename settings_schema to preset_schema
    * update frontend/struct.md
2023-03-06 18:34:37 +01:00
tfuxu
a8edade954
monet-engine: backport a fix for theme variant menu not working in non-english locales
Fixes #726
2023-02-25 16:56:29 +01:00
tfuxu
edb84dca9a
Merge branch 'main' into jsdeliver 2023-02-25 13:45:49 +01:00
c5078fa115 fix: GTK4.9 build (#722) 2023-02-24 18:59:24 +03:00
ac4e68f970 fix: Destructive colors in Monet 2023-02-24 18:11:38 +03:00
4bc2cb408f feat: Improve Monet palette generation
Use less saturated colors more similar to original M3, make all objects
distinguishable and fix various issues such as black card and headerbar
outlines
2023-02-24 17:22:48 +03:00
tfuxu
9302552892
meson: move launcher var to local launcher configuration 2023-02-12 02:46:46 +01:00
tfuxu
75d2a89216
meson: configure local build launchers if buildtype is set to debug
* change CLI local launcher name to `local-gradience-cli`
2023-02-11 22:06:05 +01:00
tfuxu
bd0fb4a0bd
meson: remove install options from CLI configuration 2023-02-11 20:13:23 +01:00
tfuxu
0e6135a94d
frontend: change object names in preferences UI file
* tidy up preferences UI logic code
    * modify note comment in presets manager UI file
2023-02-09 18:22:59 +01:00
7beb0c8b78
misc: Update release notes for 0.4 release (#717) 2023-02-08 21:33:32 +00:00
tfuxu
1f6a521d0f
chore: fix typo 2023-02-07 19:06:16 +01:00
tfuxu
b02d37b946
presets_manager: disable Repositories tab 2023-02-06 18:23:48 +01:00
tfuxu
b2d22f9a52 preset_manager: fix All option in repo selector not working in non-english locales
Fixes #714
2023-02-06 16:31:52 +01:00
tfuxu
fca07518ec
frontend/cli: return preset object and assign it to variable 2023-02-04 23:48:50 +01:00
tfuxu
8ce1f1a517
views/main_window: disable get_default_wallpaper function
* add title for `monet_file_chooser_dialog`
    * set more spacing in monet's `child_button`
    * also, add new copyright date in cli.in
2023-02-03 17:22:55 +01:00
tfuxu
f8ab63af1b
frontend/cli: remove duplicate information message 2023-02-03 17:11:13 +01:00
tfuxu
6576a31972
frontend/cli: add a note to monet command after a failure 2023-02-03 17:09:59 +01:00
tfuxu
210ac398dd
frontend/main: for now disable tone option in Monet Engine 2023-02-03 03:47:46 +01:00
tfuxu
d3d330b87d
frontend/cli: add exception information to some error messages 2023-02-03 03:47:23 +01:00
tfuxu
10496c3fdb
frontend/widgets: fix a lack of buffer clearing function for a TextView 2023-02-02 02:11:32 +01:00
tfuxu
89084f8e46
frontend/cli: several improvements to CLI module
* add useful messages for commands
    * remove confusing message from `monet` command
    * slightly un-nest code (better readability)
2023-02-02 00:50:23 +01:00
tfuxu
484d2e6cca
misc: fix spelling mistakes detected by Typos workflow 2023-01-18 15:26:05 +01:00
tfuxu
787bb49d11 frontend/main: fix list index out of range errors 2023-01-06 23:47:36 +01:00
tfuxu
980b19f9de backend/css_parser: fix palette leaking bug
* slightly optimize CSS parser performance

Fixes #693
2023-01-06 23:47:13 +01:00
tfuxu
df96a51aa1
frontend/widgets: show 'preset unsaved' dialog in Preset Manager 2023-01-06 16:38:38 +01:00
tfuxu
def149a76f frontend/main: extract show_unsaved_dialog function into two smaller
* show 'preset unsaved' dialog when selecting a preset from quick switcher menu
    * make `on_save_preset_entry_change` function global
    * change `save_preset` function name to `on_save_dialog_response`
2023-01-06 16:36:40 +01:00
tfuxu
173f16264b
frontend/widgets: enforce hex format in variables row
* make `option_row` module more readable, remove over-engineered code
2023-01-05 21:15:01 +01:00
tfuxu
2c5f9925e1
backend/theming: enforce hex format in Monet generated variables
Unless alpha parameter is specified.
2023-01-05 21:07:30 +01:00
tfuxu
3f9fb69437
backend/colors: create new rgb_to_hash function
* make `argb_to_color_code` function usable
2023-01-05 21:04:30 +01:00
tfuxu
caacb24fae
UI: disable preset preview MenuButton
This also incudes removing some leftover code that was used for this MenuButton.

Fixes #670
2023-01-04 21:24:54 +01:00
tfuxu
3d2f16c4e2
frontend/main: rename show_exit_dialog to show_unsaved_dialog
* add new `discard` parameter to GradienceSaveDialog
    * clean some placeholder functions in main module
2023-01-04 21:00:48 +01:00
6490e0f922
feat: use jsdeliver instead of github url
Signed-off-by: 0xMRTT <0xMRTT@proton.me>
2023-01-03 23:37:06 +01:00
tfuxu
4107c60c2b
frontend: move dialogs to external modules
* move action helper functions to new `utils/actions` helper module
2023-01-03 19:35:21 +01:00
tfuxu
fa12fa5560
frontend/views: move no_plugin_window to views
* directly define some properties in views
    * general refactor in some frontend modules
2023-01-03 19:20:21 +01:00
tfuxu
bf341d7b82
frontend/main: use external globals where possible 2023-01-03 17:21:20 +01:00
tfuxu
6e612e7701
frontend/main: fix built-in presets selection in quick preset manager 2023-01-03 15:10:21 +01:00
tfuxu
9f9a547634
backend/globals: move plugin dir variables to globals module
* change parent variable naming in about_window to make it similar to dialogs
    * misc refactoring changes
2023-01-03 15:07:41 +01:00
tfuxu
a8f1bc8ab8
frontend: move About Window constructor to an external module
* frontend/main: add missing exception variable assignment
2023-01-01 21:15:36 +01:00
tfuxu
70eca65be9
frontend/main: fix favorites list 2022-12-27 21:31:03 +01:00
tfuxu
d5fa02b2a6
linting: fix a majority of coding errors pointed by pylint 2022-12-27 21:28:58 +01:00
tfuxu
7e9fde6efb
backend/logger: set default value for exc argument 2022-12-27 01:13:32 +01:00
tfuxu
38e790c595
codebase: update some logger messages to utilize new exc option 2022-12-26 22:26:14 +01:00
tfuxu
c06d90900a
backend/logger: add optional exc_info option to Logger 2022-12-26 22:14:37 +01:00
tfuxu
67fe7edddb
backend/theming: fix get_presets_list function misbehaving with full_list param
Fix get_presets_list function in preset_utils module returning preset list only from first directory when enabled using full_list parameter.
2022-12-25 18:40:03 +01:00
tfuxu
dfb6104e1e
app: improve exception handling, remove duplicate code
* modify `get_presets_list` function from theming/preset_utils module
2022-12-22 01:11:19 +01:00
tfuxu
cf23aa9862
docs: update structure description files 2022-12-22 00:31:44 +01:00
tfuxu
8f37888d03
backend/utils: add new utility function: argb_to_color_code
This function is supposed to deprecate current `rgba_from_argb` function.

Other changes:
* fix some debug messages using print instead of logging.debug
* add datadir as a constant
2022-12-21 15:44:44 +01:00
tfuxu
61eb5fb865
frontend/cli: reenable monet command on Flatpak builds
* move sandbox check from `frontend/cli` module to `backend/globals`
2022-12-19 20:28:53 +01:00
tfuxu
03a63e7a33
frontend/cli: add new access-file command
* add try..except statement to shutil.copy operation in `import` command
2022-12-19 20:17:35 +01:00
tfuxu
c9d101da0b
backend/flatpak_overrides: add new functions for file access overrides 2022-12-19 20:16:01 +01:00
tfuxu
354010ae22
frontend/cli: fix download command failing after indexing first preset 2022-12-18 18:59:43 +01:00
1e8de798db fix: text 2022-12-18 19:27:51 +03:00
tfuxu
db7347cf18
frontend/cli: add more messages in CLI to make it more user-friendly
* finish `apply` command
* remove `frontend/settings_schema` module from imports in backend modules
2022-12-18 16:36:25 +01:00
tfuxu
20994dfdf1
frontend/cli: add information for Flatpak users about monet command
This commit adds error message that shows up when `monet` command is executed on Flatpak builds.
2022-12-18 15:46:15 +01:00
tfuxu
50205619fa
frontend/cli: fix local builds support, add logic code for all remaining commands
* add logic code for `presets` and `favorites` command,
* disable `new` command for now (I need to think later how users should input required values in this command),
* add `No presets found` statement in `download` command,
* create new local_cli.sh script for easier CLI testing on local builds
2022-12-17 23:00:05 +01:00
tfuxu
d3df5c37da
backend: change the structure of log messages, and move preset listing function to backend
* add ability to name modules in logger object,
* slightly clean PresetDownloader class and return exceptions on error encounters
2022-12-17 18:42:29 +01:00
tfuxu
da0300e934
frontend/cli: use from now backend/logger module functions to print messages in CLI 2022-12-17 17:24:16 +01:00
tfuxu
3c850380be
frontend/cli: change some help messages 2022-12-13 19:27:20 +01:00
tfuxu
b36669b40e
frontend/cli: add logic to import command, and finish download command 2022-12-11 18:42:46 +01:00
tfuxu
7f8e3ccc80
backend: convert preset_downloader module to class
* add more exception handling to backend/preset_downloader and backend/models/preset modules
2022-12-11 17:53:30 +01:00
tfuxu
7c1a29561d
frontend/cli: add rudimentary logic code for apply, download and flatpak_theming commands 2022-12-11 13:23:12 +01:00
tfuxu
24d34296de
backend/globals: move official Gradience preset repositories list to globals module 2022-12-11 12:57:30 +01:00
tfuxu
c74bd9bfe2
backend: allow functions in flatpak_override module to be used without specifying an Adw.ToastOverlay object 2022-12-11 12:53:18 +01:00
tfuxu
f0afbd817d
frontend: introduce initial CLI interface
This commit adds a new CLI interface made using argparse library. Current status of CLI interface is very WIP, as it lacks logic for the majority of commands and doesn't work properly on Flatpak and local builds.
Currently working commands: monet, version
2022-12-10 17:03:38 +01:00
tfuxu
527a9dc90f
backend: seperate JSON encoding in Preset module to a new function
* add more checks in new_preset_from_monet function
* return full Preset object instead of dict data
* remove some unused code
2022-12-10 15:21:13 +01:00
tfuxu
674848edaa
backend: include backend/theming modules in meson compilation 2022-12-10 14:58:49 +01:00
tfuxu
e1e244db72
backend/theming: move apply, restore and reset preset functions to backend 2022-12-09 00:12:02 +01:00
tfuxu
22f476f766
backend: create new modules for preset generation utilities 2022-12-08 14:05:38 +01:00
tfuxu
e834e55b11
backend/models: refactor Preset model object
This commit is the first in a series of commits that will introduce new CLI interface for Gradience. Currently we need to move some parts of code that reside mostly in frontend modules to their new backend modules, and this commit is the beggining of this whole ordeal.

* Refactor Preset model object, in order to make it more readable and to allow `new` function that directly takes new values for properties
* Move presets_dir from models/preset to new backend/globals module
* Create new utils/colors module (will be used in later commits)
* Update all modules that are affected by above changes
2022-12-08 12:43:12 +01:00
tfuxu
771c0e58c1
feat: add error messages to preview demo functions
* allow demo functions to fail if shell returns an error
2022-12-06 19:37:20 +01:00
tfuxu
a8c83d1935
feat: introduce new backend/logger module
This commit introduces a new logger module and converts any log message that used buglog() to use one of five new functions from Logger class.
2022-12-04 00:00:18 +01:00
tfuxu
df73f3d006
misc: make code more readable 2022-12-02 23:37:41 +01:00
tfuxu
5e42501691
rename: change module name from utils.py to common.py 2022-12-02 23:21:55 +01:00
tfuxu
30a9fdb613
move modules to new backend/frontend directories 2022-12-02 22:52:47 +01:00
tfuxu
dcc7c315e5
feat: rename utils/css.py to utils/css_parser.py and utils/custom_presets.py to utils/preset_downloader.py 2022-12-01 19:29:15 +01:00
Jonathan Lestrelin
976270150d
Parse firefox profiles.ini files to get paths of profiles. (#664)
# Parse firefox profiles.ini files to get paths of profiles

This parses firefox profiles.ini files to get the paths of the profiles
instead of just treating any subdir of the firefox dir as a profile.

This allows supporting profiles without a dot in their name which the
existing glob didn't match which can happen if they are named manually,
as well as profiles configured to be outside of the firefox directory
that were ignored and profiles that are symlinked (by adding a resolve()
on the path before the is_dir()).

There is also an additional try condition to avoid failing for the
remaining profiles if encountering a profile without the
customChrome.css, as it might be installed on some profiles only.

## Changelog

- Fixed theming Firefox profiles that don't have a dot in their name
- Fixed theming Firefox profiles that are outside of the Firefox dir
- Fixed theming Firefox profiles that are symlinks
- Fixed failing to theme remaining profiles after encountering one on
which the firefox-gnome-theme is not present

Please note that I have only tested on non-flatpak Firefox.

Signed-off-by: 0xMRTT <0xMRTT@proton.me>
Co-authored-by: 0xMRTT <0xMRTT@proton.me>
2022-11-30 07:13:57 +01:00
e5dc62cabb feat: bump 0.3.3 and add release notes 2022-11-29 19:23:08 +03:00
Martins Zeltins
f21081a6f5 Grammar fix 2022-11-25 19:01:15 +02:00
dfa96acb7f feat: logout message without logout action 2022-11-24 22:44:23 +03:00
6e4c0c7b79 fix: typos 2022-11-24 20:20:38 +03:00
8612ed1fd0 feat: improve "Details" tab of "About" window 2022-11-21 00:36:04 +03:00
3ee0da09e3 Revert "feat: improve "Details" tab of "About" window"
This reverts commit 2bd0944ed5.
2022-11-21 00:33:32 +03:00
2bd0944ed5 feat: improve "Details" tab of "About" window 2022-11-21 00:32:38 +03:00
5e36436528 feat: 0.3.2 release notes 2022-11-20 22:59:46 +03:00
ed047c1d47 feat: 0.3.2 release notes 2022-11-20 22:46:31 +03:00
ff8b903697 Revert "Revert "feat: update release notes""
This reverts commit c77673b64a.
2022-11-20 22:38:00 +03:00
374de8b968 Revert "Revert "Revert "feat: update release notes"""
This reverts commit c415151eed.
2022-11-20 22:36:28 +03:00
c415151eed Revert "Revert "feat: update release notes""
This reverts commit 1ebd0cbd7b.
2022-11-20 22:34:11 +03:00
1ebd0cbd7b Revert "feat: update release notes"
This reverts commit 85603f0e63.
2022-11-20 22:34:00 +03:00
85603f0e63 feat: update release notes 2022-11-20 21:01:20 +03:00
tfuxu
0fad4da087
feat: more readible exceptions in 'preset' module
* add .close() to file objects
* remove __name__ == '__main__' statement
2022-11-20 17:21:23 +01:00
tfuxu
83ef5db581
fix: save imported presets directly to 'user' repository 2022-11-20 17:12:36 +01:00
u1f98e
fc9b75d543 Fix renaming presets not changing the in file name 2022-11-19 20:11:57 -08:00
u1f98e
09ddffe39e Fix saving and renaming presets 2022-11-19 19:46:55 -08:00
u1f98e
8cdaea82c0 Remove some debug print statements 2022-11-19 19:05:39 -08:00
u1f98e
39cf8a0185 Use preset path instead of names to determine the preset file location 2022-11-19 19:02:16 -08:00
tfuxu
cd0918bef4
ux: add mnemonics to the rest of dialogs 2022-11-11 22:10:00 +01:00