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

GTK: Add "Change Title" feature #5769

Closed
mitchellh opened this issue Feb 14, 2025 · 3 comments · Fixed by #5905
Closed

GTK: Add "Change Title" feature #5769

mitchellh opened this issue Feb 14, 2025 · 3 comments · Fixed by #5905
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Milestone

Comments

@mitchellh
Copy link
Contributor

Implement #4217, #2509 for GTK.

This can be implemented in whatever GUI method is most idiomatic for GTK.

The apprt action to listen for is prompt_title targeting a surface.

Similar to macOS, we should ensure that there is a mechanism to reset back to the pty-provided title. On macOS, we do this by leaving the prompt blank and pressing okay. Some accounting has to be done to keep track of the pty-provided title (via the set_title apprt action).

@mitchellh mitchellh added gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux labels Feb 14, 2025
@pluiedev
Copy link
Contributor

Most idiomatic way would probably be to open an action dialog with a textbox inside: see GNOME HIG.

@mitchellh
Copy link
Contributor Author

The original issue noted Gnome Console supports this so probably worth taking a look at what some others are doing too.

@jcollie
Copy link
Collaborator

jcollie commented Feb 20, 2025

Having looked a bit closer at this, I don't think that this really does what was intended. If we're changing the title of the surface, the title of the tab will change every time that you have multiple splits in a tab and change focus to a different split. I thought that the point of the original request was to fix the tab title and never have it change (even if you change focus to a different split).

jcollie added a commit that referenced this issue Feb 22, 2025
This PR implements the title change functionality for the GTK app and
closes #5769

Demo:


https://github.com/user-attachments/assets/cad611b3-b7bf-40ac-8d0f-11d2095fe525

For now I came up with a basic UI that i believe is sufficient, but I'm
open to feedback and happy to iterate on it further.

#5769 (comment)
- Regarding Mitchell's comment I checked Gnome Console and I could not
find a similar feature.
@github-actions github-actions bot added this to the 1.2.0 milestone Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gui GUI or app issue regardless of platform (i.e. Swift, GTK) os/linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants