Change pane title when creating a server

This commit is contained in:
oupson 2023-03-07 08:12:34 +01:00
parent 533617d59f
commit ec55437898
Signed by: oupson
GPG Key ID: 3BD88615552EFCB7
2 changed files with 6 additions and 0 deletions

View File

@ -35,15 +35,20 @@ namespace Footerm {
public signal void on_server_selected(Footerm.Model.Server server);
public signal void title_changed(string new_title);
private Footerm.Services.Config config;
construct {
this.new_server.on_new_server.connect((server) => {
this.newpane_stack.set_visible_child(server_list.get_parent());
server_list.add(this.build_action_row(server));
this.title_changed("New Pane");
});
this.newpane_add_button.clicked.connect(() => {
this.newpane_stack.set_visible_child(new_server.get_parent());
this.title_changed("Create a new server");
});
try {

View File

@ -33,6 +33,7 @@ namespace Footerm {
public signal void title_changed (string new_title);
construct {
this.new_pane.title_changed.connect ((s) => this.title_changed (s));
this.new_pane.on_server_selected.connect ((s) => {
this.footerm_pane_stack.set_visible_child (this.terminal_pane);
this.title_changed (s.name);