Skip to content
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

PoC of functionality for lazy focus loss (to avoid closing on short-term losses) #1892

Merged
merged 3 commits into from
Oct 11, 2021
Merged

PoC of functionality for lazy focus loss (to avoid closing on short-term losses) #1892

merged 3 commits into from
Oct 11, 2021

Conversation

katoquro
Copy link
Contributor

this PR is example of subj functionality
issue #1643

I had some issues during running lints (if some one could say what is the "black" command I'll be thankful)

Error: the command black could not be found within PATH or Pipfile's [scripts].
make: *** [Makefile:186: black] Error 1

@Davidy22
Copy link
Collaborator

Black is a program for code formatting. Running pip install black will install black. We have a nice shortcut for formatting all your code with black, if you run make style in the top level it'll auto format your code. Just a little thing to force consistent style.

@Davidy22
Copy link
Collaborator

Oh, I missed that there was an update to this since I last looked. Looks like the linter has some things to say about your code, I'll copy and paste it here for easier access. There's line numbers and filenames so you can see what lines it wants you to fix.

guake/guake_app.py:507:16: W0621: Redefining name 'GLib' from outer scope (line 41) (redefined-outer-name)
guake/guake_app.py:507:16: W0404: Reimport 'GLib' (imported line 41) (reimported)
guake/guake_app.py:507:16: C0415: Import outside toplevel (gi.repository.GLib) (import-outside-toplevel)
guake/guake_app.py:518:12: E1121: Too many positional arguments for function call (too-many-function-args)

@Davidy22
Copy link
Collaborator

Alright, I've gone in and done a quick rebase and cleared up the lint errors. Still not sure about making this the default behavior, but I could come around on making this an option. You're going to need to edit the prefs.glade file in glade, then add some code in prefs.py and make your changes conditional on the new preference.

@katoquro
Copy link
Contributor Author

There was no discussion about defaults or so. It's just proof of concept how I solve this issue and I just build suitable for me version from source because I'm not a UI developer at all. If some one find this solution viable and can create corresponding settings they could find comments like this describing where settings should be placed

@Davidy22
Copy link
Collaborator

Oh I see the line, can probably add the setting then some time.

Copy link
Collaborator

@Davidy22 Davidy22 left a comment

Choose a reason for hiding this comment

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

Added the preferences menu option. There was something weird going on with the commit log, and dealt with that too. Looks good for merging, I'll merge after 3.8 is released so this can go into testing for next release.

@Davidy22 Davidy22 merged commit 18a79ea into Guake:master Oct 11, 2021
@Davidy22
Copy link
Collaborator

3.8 out, merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants