Skip to content
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

Replace Granite.DynamicNotebook with Hdy TabView and TabBar #760

Merged
merged 34 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e316871
Temp commit
jeremypw Jun 18, 2024
1da6131
Fix some regressions, simplify
jeremypw Jun 19, 2024
5b8dadd
Silence unnecessary message; remove unnecessary styling code
jeremypw Jun 19, 2024
dfd0f80
Remove unnecessary DnD code
jeremypw Jun 19, 2024
51a2b93
Implement drop onto tab bar
jeremypw Jun 20, 2024
f12db05
Better way to clear terminal in action_tab_active_shell
jeremypw Jun 20, 2024
04cdd15
Reimplement reload action
jeremypw Jun 20, 2024
12a8384
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jun 20, 2024
f4d853d
Clean up
jeremypw Jun 20, 2024
0074e5a
Fix lint
jeremypw Jun 20, 2024
cebab87
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jun 20, 2024
38e10ce
Remove terminal-window style class; Use box
jeremypw Jun 21, 2024
165d9f4
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jun 24, 2024
5f4ddf6
Make current_terminal property of MainWindow bindable
jeremypw Jun 24, 2024
06b9549
TerminalView handles all close actions
jeremypw Jun 24, 2024
89907db
Fix test fail
jeremypw Jun 24, 2024
4f76d38
Allow terminal destruction
jeremypw Jun 24, 2024
92673ac
cleanup
jeremypw Jun 24, 2024
cfb1266
Fix transparent background (#761)
danirabbit Jun 24, 2024
a9f116c
Partially fix tests
jeremypw Jun 24, 2024
2153c87
Assign TerminalWidget.program_string
jeremypw Jun 25, 2024
1cc084b
Ignore `child-exited` when tab removed
jeremypw Jun 25, 2024
237abaa
No Idle; set tooltip in check_cwd_changed
jeremypw Jun 25, 2024
7a83c49
Window title tracks current terminal window-title property
jeremypw Jun 25, 2024
1f0aff2
Fix action quit test
jeremypw Jun 25, 2024
839d2c9
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jul 2, 2024
9b3342c
Merge branch 'master' into jeremypw/hdy-tabbar
zeebok Jul 3, 2024
f16d82d
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jul 5, 2024
408d88f
Fix indent
jeremypw Jul 5, 2024
f1099f7
Fix duplicated line
jeremypw Jul 5, 2024
e46fa0c
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jul 18, 2024
ea6f482
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jul 18, 2024
de8eea3
Merge branch 'master' into jeremypw/hdy-tabbar
jeremypw Jul 30, 2024
300dd73
Add TerminalView to POTFILES
jeremypw Jul 31, 2024
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
7 changes: 7 additions & 0 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Boston, MA 02110-1301 USA
*/

/* Make sure terminal background can use colors with alpha */
.terminal-window.background {
background-color: transparent;
}
Expand All @@ -36,3 +37,9 @@ vte-terminal {
.color-custom radio:checked {
-gtk-icon-source: -gtk-icontheme("check-active-symbolic");
}

/* Workaround Hdy.Tabbar transparent area. Remove during GTK 4 port */
tabbar .box {
margin: 0;
padding-top: 2px;
}
16 changes: 5 additions & 11 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,7 @@ public class Terminal.Application : Gtk.Application {
break;
}

foreach (var term in window.terminals) {
if (term.terminal_id == id) {
terminal = term;
break;
}
}
terminal = window.get_terminal (id);
}

if (terminal == null) {
Expand All @@ -168,11 +163,11 @@ public class Terminal.Application : Gtk.Application {
process_icon = new ThemedIcon ("process-error-symbolic");
}

if (terminal != terminal.window.current_terminal) {
if (terminal != terminal.main_window.current_terminal) {
terminal.tab.icon = process_icon;
}

if (!(Gdk.WindowState.FOCUSED in terminal.window.get_window ().get_state ())) {
if (!(Gdk.WindowState.FOCUSED in terminal.main_window.get_window ().get_state ())) {
var notification = new Notification (process_string);
notification.set_body (process);
notification.set_icon (process_icon);
Expand Down Expand Up @@ -259,7 +254,7 @@ public class Terminal.Application : Gtk.Application {
}
} else if (options.lookup ("commandline", "^&ay", out command) && command != "\0") {
window.add_tab_with_working_directory (working_directory, command, new_tab);
} else if (new_tab || window.terminals.is_empty ()) {
} else if (new_tab || window.notebook.n_pages == 0) {
window.add_tab_with_working_directory (working_directory, null, new_tab);
}

Expand All @@ -268,7 +263,6 @@ public class Terminal.Application : Gtk.Application {
} else {
window.present ();
}

return 0;
}

Expand All @@ -280,7 +274,7 @@ public class Terminal.Application : Gtk.Application {
base.dbus_unregister (connection, path);
}

private void close () {
public void close () {
foreach (var window in get_windows ()) {
window.close (); // if all windows is closed, the main loop will stop automatically.
}
Expand Down
Loading