Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions data/terminal.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
</ul>
</description>
<issues>
<issue url="https://github.com/elementary/terminal/issues/317">Show symbol while terminal is working</issue>
<issue url="https://github.com/elementary/terminal/issues/653">Links open when clicking on Terminal app in Alt+Tab</issue>
<issue url="https://github.com/elementary/terminal/issues/643">Port Terminal to GTK4</issue>
<issue url="https://github.com/elementary/terminal/issues/510">Natural Copy/Paste. Ctrl+c clears the highlighted word. Ctrl+x doesn't.</issue>
Expand Down
2 changes: 2 additions & 0 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ public class Terminal.Application : Gtk.Application {

if (terminal != terminal.main_window.current_terminal) {
terminal.tab_state = tab_state;
} else if (terminal.tab_state == WORKING) {
terminal.tab_state = NONE;
}

if (!(get_active_window ().is_active)) {
Expand Down
4 changes: 3 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ namespace Terminal {
return;
}

term.tab_state = NONE;
if (term.tab_state != WORKING) {
term.tab_state = NONE;
}
});

notebook.tab_bar.bind_property ("tabs-revealed", new_tab_revealer, "reveal-child", SYNC_CREATE | INVERT_BOOLEAN);
Expand Down
1 change: 1 addition & 0 deletions src/Widgets/TerminalView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public class Terminal.TerminalView : Granite.Bin {

terminal_widget.notify["tab-state"].connect (() => {
tab.icon = terminal_widget.tab_state.to_icon ();
tab.loading = terminal_widget.tab_state == WORKING;
});

//Set correct label now to avoid race when spawning shell
Expand Down
10 changes: 10 additions & 0 deletions src/Widgets/TerminalWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Terminal {
public class TerminalWidget : Vte.Terminal {
public enum TabState {
NONE,
WORKING,
COMPLETED,
ERROR;

Expand Down Expand Up @@ -242,6 +243,7 @@ namespace Terminal {
notify["width-request"].connect (() => resized = true);
contents_changed.connect (on_contents_changed);
child_exited.connect (on_child_exited);
window_title_changed.connect (on_window_title_changed);
ulong once = 0;
once = realize.connect (() => {
clipboard = Gdk.Display.get_default ().get_clipboard ();
Expand Down Expand Up @@ -802,6 +804,14 @@ namespace Terminal {
fg_pid = -1;
}

private void on_window_title_changed () {
if (has_foreground_process ()) {
tab_state = WORKING;
}

// Application.dbus_register handles resetting the state
}

public void kill_fg () {
int fg_pid;
if (this.try_get_foreground_pid (out fg_pid)) {
Expand Down