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

Implement backup functionality for gtk.css #301

Merged
merged 7 commits into from
Sep 1, 2022
Merged

Implement backup functionality for gtk.css #301

merged 7 commits into from
Sep 1, 2022

Conversation

needlesslygrim
Copy link
Contributor

Instead of just overwriting gtk.css with a new gtk.css when applying the theme, we write the current contents of gtk.css to gtk.css.bak then write apply our changes to gtk.css

@needlesslygrim needlesslygrim mentioned this pull request Aug 31, 2022
3 tasks
@daudix daudix requested a review from 0xMRTT August 31, 2022 02:49
@needlesslygrim
Copy link
Contributor Author

I'm trying to implement the restore functionality now, it's taking a bit longer than expected.

@needlesslygrim
Copy link
Contributor Author

If you check main.py, you will see how far I have gotten. It hasn't been fully done, because I am getting the following error when trying to click the restore button. I tried moving the method from where it originially was, above the reset_color_scheme method to above the show_restore_color_scheme_dialog method but still no luck.

Traceback (most recent call last): File "/app/lib/python3.9/site-packages/gradience/main.py", line 445, in show_restore_color_scheme_dialog dialog.connect("response", self.restore_color_scheme)

@needlesslygrim needlesslygrim changed the title Implement backup functional for gtk.css Implement backup functionality for gtk.css Aug 31, 2022
@0xMRTT
Copy link
Member

0xMRTT commented Aug 31, 2022

Could you show the full traceback?

Currently, the management of presets is very basic. Having the ability to restore, backup would be great 👍.

@0xMRTT
Copy link
Member

0xMRTT commented Aug 31, 2022

Also for the style, please use 4spaces or 1 tab (there is a lot of style change in your PR

@needlesslygrim
Copy link
Contributor Author

Application started at 15:22:18
DEBUG:root:disabled plugins: []
DEBUG:root:{}
DEBUG:root:file:///usr/share/backgrounds/gnome/adwaita-d.jpg
DEBUG:root:adwaita-d.jpg
DEBUG:root:/usr/share/backgrounds/gnome/adwaita-d.jpg
DEBUG:root:normal run

(gradience:2): Gtk-CRITICAL **: 15:22:18.810: Unable to connect to the accessibility bus at 'unix:path=/run/user/1002/at-spi/bus_1,guid=23a786a36d77540ceea05ff0630e9d19': Could not connect: No such file or directory
Traceback (most recent call last):
  File "/app/lib/python3.9/site-packages/gradience/main.py", line 445, in show_restore_color_scheme_dialog
    dialog.connect("response", self.restore_color_scheme)
AttributeError: 'GradienceApplication' object has no attribute 'restore_color_scheme'

@0xMRTT
Copy link
Member

0xMRTT commented Aug 31, 2022

See #302 and #303 for style

@0xMRTT
Copy link
Member

0xMRTT commented Aug 31, 2022

Also, I suggest to join the matrix room or the discord server (they are bridged)

https://discord.gg/rwNDGPJf

Link to the matrix room on the README

@0xMRTT 0xMRTT marked this pull request as draft August 31, 2022 09:47
@needlesslygrim needlesslygrim marked this pull request as ready for review August 31, 2022 10:11
@needlesslygrim
Copy link
Contributor Author

Oops

@needlesslygrim
Copy link
Contributor Author

I still haven't been able to get that code to work. Am I missing some weird thing in GTK?

@0xMRTT
Copy link
Member

0xMRTT commented Sep 1, 2022

Same error ?

@needlesslygrim
Copy link
Contributor Author

Same error ?

yea, and I can't get it to build again

@0xMRTT 0xMRTT marked this pull request as draft September 1, 2022 11:24
Copy link
Member

@tfuxu tfuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This formatting across whole main.py is very confusing, as it's hard to even see what changes you've added. You should start again with a clean file, put changes related to PR in it, and maybe add formatting in another commit.

@needlesslygrim
Copy link
Contributor Author

This formatting across whole main.py is very confusing, as it's hard to even see what changes you've added. You should start again with a clean file, put changes related to PR in it, and maybe add formatting in another commit.

Yup, I kept on getting inconsistent uses of spaces and tabs for indentation errors since I was stupidly trying to do actual development work with builder so I converted the whole file to tabs using Pycharm. I'll take the methods out and put them back in then push again.

@0xMRTT 0xMRTT marked this pull request as ready for review September 1, 2022 13:02
@0xMRTT 0xMRTT merged commit 7c0b2c5 into GradienceTeam:main Sep 1, 2022
@needlesslygrim needlesslygrim deleted the backupfeature branch September 1, 2022 13:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants