summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-14 23:23:39 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-14 23:23:39 (EST)
commit3d570ce5ac40a1a05f41fe8a68581cc49ea81a60 (patch)
tree22fa09a9a93fe9f4d8b46380ef0c32aebf4a3547 /src
parent78fcaa62fb5880fd20ddff851b898658c0f4dfeb (diff)
downloadmarquee-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.c10
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;