summaryrefslogtreecommitdiff
path: root/src/terminal-app.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2024-04-17 14:46:32 -0400
committerVictor Kareh <[email protected]>2024-04-17 14:46:32 -0400
commitecdbd1b8a06a824b9314d58e174902679e6a1922 (patch)
tree228fa6ea4734ba37603f65eccad9e241af4cf860 /src/terminal-app.c
parent8634b87ff36933acf072393486a422670330f7e7 (diff)
downloadmate-terminal-ecdbd1b8a06a824b9314d58e174902679e6a1922.tar.bz2
mate-terminal-ecdbd1b8a06a824b9314d58e174902679e6a1922.tar.xz
options: Re-introduce the icon optionwindow-icon-option
Since profiles do not provide a way of setting the window icon, we re-introduce the --icon option to allow the window instance to report an icon programmatically. Fixes https://github.com/mate-desktop/mate-terminal/issues/246 Closes https://github.com/mate-desktop/mate-terminal/issues/62
Diffstat (limited to 'src/terminal-app.c')
-rw-r--r--src/terminal-app.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/terminal-app.c b/src/terminal-app.c
index d54da49..48f8b0b 100644
--- a/src/terminal-app.c
+++ b/src/terminal-app.c
@@ -1797,6 +1797,14 @@ terminal_app_handle_options (TerminalApp *app,
if (iw->role)
gtk_window_set_role (GTK_WINDOW (window), iw->role);
+ if (iw->icon)
+ {
+ if (g_path_is_absolute (iw->icon))
+ gtk_window_set_icon_from_file (GTK_WINDOW (window), iw->icon, NULL);
+ else
+ gtk_window_set_icon_name (GTK_WINDOW (window), iw->icon);
+ }
+
if (iw->force_menubar_state)
terminal_window_set_menubar_visible (window, iw->menubar_state);