mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
- remove the unused dialog context struct
- set the current title in the input buffer - fix formatting
This commit is contained in:

committed by
Jeffrey C. Ollie

parent
454a53b3f1
commit
cd287b4161
@ -1019,11 +1019,6 @@ fn resolveTitle(self: *Surface, title: [:0]const u8) [:0]const u8 {
|
||||
title[zoom_title_prefix.len..];
|
||||
}
|
||||
|
||||
const PromptTitleDialogContext = struct {
|
||||
entry: *c.GtkWidget,
|
||||
self: *Surface,
|
||||
};
|
||||
|
||||
pub fn promptTitle(self: *Surface) !void {
|
||||
const window = self.container.window() orelse return;
|
||||
|
||||
@ -1033,6 +1028,8 @@ pub fn promptTitle(self: *Surface) !void {
|
||||
const dialog: *adw.AlertDialog = @ptrCast(builder.getObject("prompt_title_dialog"));
|
||||
dialog.addResponse("cancel", "Cancel");
|
||||
dialog.addResponse("ok", "OK");
|
||||
const entry: *gtk.Entry = @ptrCast(builder.getObject("title_entry"));
|
||||
entry.getBuffer().setText(self.getTitle() orelse "", -1);
|
||||
|
||||
dialog.choose(@ptrCast(window.window), null, @ptrCast(>kPromptTitleResponse), self);
|
||||
}
|
||||
|
Reference in New Issue
Block a user