mirror of https://github.com/oupson/FooTerm.git
Change pane title when creating a server
This commit is contained in:
parent
533617d59f
commit
ec55437898
|
@ -35,15 +35,20 @@ namespace Footerm {
|
||||||
|
|
||||||
public signal void on_server_selected(Footerm.Model.Server server);
|
public signal void on_server_selected(Footerm.Model.Server server);
|
||||||
|
|
||||||
|
public signal void title_changed(string new_title);
|
||||||
|
|
||||||
private Footerm.Services.Config config;
|
private Footerm.Services.Config config;
|
||||||
|
|
||||||
construct {
|
construct {
|
||||||
this.new_server.on_new_server.connect((server) => {
|
this.new_server.on_new_server.connect((server) => {
|
||||||
this.newpane_stack.set_visible_child(server_list.get_parent());
|
this.newpane_stack.set_visible_child(server_list.get_parent());
|
||||||
server_list.add(this.build_action_row(server));
|
server_list.add(this.build_action_row(server));
|
||||||
|
this.title_changed("New Pane");
|
||||||
});
|
});
|
||||||
|
|
||||||
this.newpane_add_button.clicked.connect(() => {
|
this.newpane_add_button.clicked.connect(() => {
|
||||||
this.newpane_stack.set_visible_child(new_server.get_parent());
|
this.newpane_stack.set_visible_child(new_server.get_parent());
|
||||||
|
this.title_changed("Create a new server");
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -33,6 +33,7 @@ namespace Footerm {
|
||||||
public signal void title_changed (string new_title);
|
public signal void title_changed (string new_title);
|
||||||
|
|
||||||
construct {
|
construct {
|
||||||
|
this.new_pane.title_changed.connect ((s) => this.title_changed (s));
|
||||||
this.new_pane.on_server_selected.connect ((s) => {
|
this.new_pane.on_server_selected.connect ((s) => {
|
||||||
this.footerm_pane_stack.set_visible_child (this.terminal_pane);
|
this.footerm_pane_stack.set_visible_child (this.terminal_pane);
|
||||||
this.title_changed (s.name);
|
this.title_changed (s.name);
|
||||||
|
|
Loading…
Reference in New Issue