-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huge code improvements #248
Comments
Yeah, object oriented programming makes sense here to a certain degree. I'm a bit reluctant regarding stuff like the An Application class makes a lot of sense though 👍 |
I'm okey with not creating a FileManager class, but the idea was having the possibilty to do something like |
I think the most important thing for now, would be to make this application class, the rest we can always add afterwards if we want. Before we start this, I think it makes a lot of sense to figure out how to deal with nw.js applications, and check if sni-qt works as expected. (And I also want to fix **** teamviewer) |
@wa4557 I have worked recently with a guy from Gitter to fix a little issue on the application, i can try to contact him and see if we can get some information about how to fix nwjs issue. I will install xubuntu today and see if everything works as expected. |
@wa4557 @varlesh a demo version is on the branch wip/modules! can you guys test it and see if you have any bugs? |
Also Wire deleted on my system, but file /opt/Wire/resources/app.asar exist.... maybe it's bug DEB-package, i don't know. Also this bug reprodused with master-branch |
It must be that the deb package uses an other path.... i'm still looking for a way to fix the issues with not all the applications being fixed. |
No, wire fixed with master-branch, but after remove wire package /opt/Wire directory not deleted |
Ah :p i might look later for a better way to detect installed packages! but for now i will keep it that way.. |
Fixed the issue where not all the applications are not being fixed! |
Done on master now! |
I get this:
|
I should add a verification if the binary file exists too. Totally forgot that |
Fixed! |
Not fixed. Still get the same error |
Using the git version? |
Yeah, updated master branch |
How it's even possible ? :( see here https://github.com/bil-elmoussaoui/Hardcode-Tray/blob/master/modules/data.py#L126 |
Let mehr think. I habe to get my head around the new code |
Already found what was not working :p just update to master ;) |
Now I get this:
|
I cannot reproduce that here in order to fix it. It's due to an electron application that does not have an icon that we support (for older/newer version). I pushed a fix, i hope that this will work. Otherwise, we will have to rewrite the get_from_dict function |
Works 👍 |
Perfect! The code still need some more improvements ;) Especially the electron script :p https://www.codacy.com/app/bil-elmoussaoui/Hardcode-Tray/file/4849926842/issues/source?bid=3912774&fileBranchId=3912774#l49 |
I was taking a look on how we can make the code as perfect as possible, understandable and without too many conditions/loops;
The best way to do so, is to rewrite almost all the script and i have some ideas to share here
Let's start with the structure of the code
This main class that all the possible way to convert from SVG to PNG will inherit it. For example
so I imagined something more structured, easy to fix and debug and make the code more structured
And we can have something like this in order for all the kind of the applications that we will support
Whenever we want to add a new application support, instead of changing the whole code source in order to implement it. Just add a new class that will inherit the main Class(or Interface) and add/modify the all functions you need.
This structure might change if we really do want to implement it. Doing so, will just get ride of all the scripts files in the future. Imagine, spotify case? We use ZipApplication class for it and things are done. The dropbox issue can be fixed easily, by creating a specific class for Dropbox that will inherits all the functions from Application and will only apply the code we have in the dropbox.py file to the paths;
The structure of folders/files can be like this :
The text was updated successfully, but these errors were encountered: