summaryrefslogtreecommitdiff
path: root/src/terminal-options.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-03-09 13:14:22 +0100
committerStefano Karapetsas <[email protected]>2014-03-09 13:14:22 +0100
commit34fb5c3b8eea614c2b1dd52b61aa310ea9fd2c77 (patch)
treecd2abbdb1d0688bb7610b7c9e7c8936b8b4854c0 /src/terminal-options.c
parentf6d1706007760cf7c7ad509dc6f5321a0a9c0583 (diff)
parent71204c2db80348c92b42c5cca08fc8c1166ab40d (diff)
downloadmate-terminal-34fb5c3b8eea614c2b1dd52b61aa310ea9fd2c77.tar.bz2
mate-terminal-34fb5c3b8eea614c2b1dd52b61aa310ea9fd2c77.tar.xz
Merge pull request #59 from flexiondotorg/newtab
Make mate-terminal --tab open a tab when applicable
Diffstat (limited to 'src/terminal-options.c')
-rw-r--r--src/terminal-options.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/terminal-options.c b/src/terminal-options.c
index 6881b67..ce41055 100644
--- a/src/terminal-options.c
+++ b/src/terminal-options.c
@@ -51,6 +51,7 @@ initial_tab_new (const char *profile,
it->zoom = 1.0;
it->zoom_set = FALSE;
it->active = FALSE;
+ it->attach_window = FALSE;
return it;
}
@@ -305,18 +306,22 @@ option_tab_callback (const gchar *option_name,
{
TerminalOptions *options = data;
gboolean is_profile_id;
+ InitialWindow *iw;
+ InitialTab *it;
is_profile_id = g_str_has_suffix (option_name, "-with-profile-internal-id");
if (options->initial_windows)
{
- InitialWindow *iw;
-
iw = g_list_last (options->initial_windows)->data;
iw->tabs = g_list_append (iw->tabs, initial_tab_new (value, is_profile_id));
}
else
- add_new_window (options, value, is_profile_id);
+ {
+ iw = add_new_window (options, value, is_profile_id);
+ it = g_list_last(iw->tabs)->data;
+ it->attach_window = TRUE;
+ }
return TRUE;
}
@@ -707,6 +712,7 @@ terminal_options_parse (const char *working_directory,
options->default_maximize = FALSE;
options->execute = FALSE;
options->use_factory = TRUE;
+ options->initial_workspace = -1;
options->env = g_strdupv (env);
options->startup_id = g_strdup (startup_id && startup_id[0] ? startup_id : NULL);