diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-11-14 23:23:39 (EST) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-11-14 23:23:39 (EST) |
commit | 3d570ce5ac40a1a05f41fe8a68581cc49ea81a60 (patch) | |
tree | 22fa09a9a93fe9f4d8b46380ef0c32aebf4a3547 /src | |
parent | 78fcaa62fb5880fd20ddff851b898658c0f4dfeb (diff) | |
download | marquee-3d570ce5ac40a1a05f41fe8a68581cc49ea81a60.zip marquee-3d570ce5ac40a1a05f41fe8a68581cc49ea81a60.tar.gz marquee-3d570ce5ac40a1a05f41fe8a68581cc49ea81a60.tar.bz2 |
mq_notebook_insert_*(): Focus URI entry of inserted tab page
Diffstat (limited to 'src')
-rw-r--r-- | src/notebook.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/notebook.c b/src/notebook.c index 4919b0c..0185bdf 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -367,6 +367,10 @@ mq_notebook_insert_top(MqNotebook *notebook, const gchar *uri, mq_tree_position(node) - 1); } + if (!uri || !uri[0]) { + mq_tab_page_focus_uri_entry(node->page); + } + return node->page; } @@ -390,6 +394,9 @@ mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri, notebook->current_page = node->page; gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), mq_tree_position(node) - 1); + if (!uri || !uri[0]) { + mq_tab_page_focus_uri_entry(node->page); + } } return node->page; @@ -415,6 +422,9 @@ mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri, notebook->current_page = node->page; gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), mq_tree_position(node) - 1); + if (!uri || !uri[0]) { + mq_tab_page_focus_uri_entry(node->page); + } } return node->page; |