-
Notifications
You must be signed in to change notification settings - Fork 682
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: change title prompt #5905
base: main
Are you sure you want to change the base?
Gtk: change title prompt #5905
Conversation
…hasn't set a title before
src/apprt/gtk/App.zig
Outdated
@@ -1809,6 +1819,13 @@ fn initContextMenu(self: *App) void { | |||
c.g_menu_append(section, "Split Down", "win.split_down"); | |||
} | |||
|
|||
{ |
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.
Any menu changes should be deferred until #5781 lands.
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 removed the menu entry definition from the code for now.
- use blueprint for the dialog content - use zig-gobject bindings - make the enum values lowercase
dialog.addResponse("cancel", "Cancel"); | ||
dialog.addResponse("ok", "OK"); |
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 could possibly be done from the .blp
since there is a responses
property on the AlertDialog
, however I could not get this to work. Also there are no examples to be found of how do define the responses from the blueprint, so I'm just leaving the definitions in the code right now.
- remove the menu entry defined in code
- set the current title in the input buffer - fix formatting
- remove unnecessary @ptrCast - set the default focus to the text entry field
This PR implements the title change functionality for the GTK app and closes #5769
Demo:
rename_terminal.mp4
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.