-
-
Notifications
You must be signed in to change notification settings - Fork 90
library: Adds file/uri launcher entry #403
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
Conversation
Kooha-2023-07-16-20-04-06.webm |
|
I had another idea for Uri Launcher to dynamically change uri using a file from FileChooser and getting its uri similar to file launcher; however when i use this : and it does'nt open the file |
This is probably because the |
Is the current demo fine? or should i try fixing the above error? An early review might help me with it |
I think just remove that part. I'm only guessing why that's happening, but we should encourage developers to use |
andyholmes
left a comment
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.
Looking good!
As usual, I've got some "opinions" about the UI, but I think you can get this one finished in the next run :)
andyholmes
left a comment
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.
Lots of cleanups here, to keep the demo focused on the launcher APIs.
The only thing left I'd really like to cleanup is the "Launch"/"Open Folder" buttons, which should be associated with each other.
src/Library/demos/Launcher/main.blp
Outdated
| Box { | ||
| styles ["linked"] | ||
|
|
||
| Button file_details { | ||
| label: _("Open File"); | ||
| } | ||
| Button file_location { | ||
| label: _("Open Folder"); | ||
| } | ||
| } |
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.
| Box { | |
| styles ["linked"] | |
| Button file_details { | |
| label: _("Open File"); | |
| } | |
| Button file_location { | |
| label: _("Open Folder"); | |
| } | |
| } | |
| Button file_location { | |
| label: _("Open Folder"); | |
| } |
Removing the "Open File", which conflicts with the meaning of the "Launch" button. The "Open Folder" folder button is a good idea, but I think it should be somehow connected or associate with the "Launch" button; any ideas?
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 thought a workaround for this; I changed the open file to file name instead so that it doesnt conflict with launch button; I had another idea how about renaming this to File details wherein i log the details of the file such as size, name etc
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'm just not sure what purpose it serves, and it seems a bit confusing that it is presented with the same importance as "Open Folder".
"Launch" and "Open Folder" both represent methods of the Gtk.FileLauncher class, while the other button simply prints the file name to the console. Maybe instead the file selection button could have a caption with the current file name?
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.
Here's what I would do:
- Move the constructors for both launchers to their respective sections in the code view.
- Connect to
notify::fileand query the file name to set a caption on the "Choose another file" button - Set the default file and URI after the signals are connected, so they populate at first run
- Make an equally prominent button for "View"
Here is what I'd imagine that looking like:
Screencast.from.2023-08-05.16-52-36.webm
andyholmes
left a comment
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.
Looks good, but the "Open Folder" still needs to be emphasized as part of the Gtk.FileLauncher class.
The "File Name" button could just be a label instead, and the "Open Folder" button placed beside the "Launch" button.
andyholmes
left a comment
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.
Nicely done!
* Adds launcher entry * Updated code * Clean Up * Applied changes * Updated demo * Suggested Changes * New property
Closes #390