-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
envvars-dialog: Allow to paste var=value and fix validation #3679
base: main
Are you sure you want to change the base?
Conversation
jntesteves
commented
Jan 7, 2025
•
edited
Loading
edited
- Rework the envvars dialog to allow copy/pasting complete variable assignments instead of having to input first the name and later the value.
- Fix the input validation which had some inverted logic and make it behave as expected.
- Make the panel leaner by removing unnecessary headers and periods at the end of labels.
- Port to AdwDialog
* Rework the envvars dialog to allow copy/pasting complete variable assignments instead of having to input first the name and later the value. * Fix the input validation which had some inverted logic and make it behave as expected. * Make the panel leaner by removing unnecessary headers and periods at the end of labels.
fae1add
to
35c77c5
Compare
Traverse AdwEntryRow's widget tree to remove visibility of the title labels and change alignment of the text entry to center. This implementation is tightly coupled with the internal representation of AdwEntryRow. Checks were added to prevent crashing if that representation changes, but in such case the layout may get askew.
8b17cfc
to
a711a4f
Compare
action: "action(window.close)"; | ||
} | ||
} | ||
template $EnvVarsDialog: Adw.Dialog { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be best to change the name of the dialog to BottlesEnvironmentVariablesDialog
. It's definitely long, but I think avoid abbreviations helps the readability. Prefixing with Bottles
is also important because libadwaita and GTK follow the same convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those libs use their namespaces because they are shared across many projects, but I don't think we need to do that in client code, it's all obviously Bottles, the prefix is unnecessary IMO. I used just EnvironmentVariablesDialog
like the rest of our classes, I think that's better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. I personally prefer the namespace for consistency reasons and increased readability in the inspector, but I guess I will have to change it back to how it was everywhere else
@@ -2,12 +2,12 @@ using Gtk 4.0; | |||
using Adw 1; | |||
|
|||
template $EnvVarEntry: Adw.EntryRow { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be renamed to BottlesEnvironmentVariableEntry
.
704fc2b
to
56f959d
Compare