diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-23 05:38:24 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-23 05:38:24 (EDT) |
commit | a7f145b45e648a362da0e7a325adc279fe9a8604 (patch) | |
tree | a8f25b724268c48d929d9bc3c08860b233f25076 | |
parent | e6aafb17239af0e6e7aabeeaa06d20cd6d7f4de7 (diff) | |
download | marquee-a7f145b45e648a362da0e7a325adc279fe9a8604.zip marquee-a7f145b45e648a362da0e7a325adc279fe9a8604.tar.gz marquee-a7f145b45e648a362da0e7a325adc279fe9a8604.tar.bz2 |
Revert "mq_notebook_insert_(): Allow NULL sibling/parent arguments"
This reverts commit eea1cf3441ef435bd632bcd271ed11d304033cf9.
-rw-r--r-- | src/notebook.c | 35 |
1 files changed, 10 insertions, 25 deletions
diff --git a/src/notebook.c b/src/notebook.c index ffbc7b0..566b95b 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -184,18 +184,11 @@ mq_notebook_insert_sibling(MqNotebook *notebook, const gchar *uri, { MqTabTree *node; - if (sibling) { - find_node(notebook, sibling); - node = MQ_TAB_TREE(mq_tree_insert_sibling_allocated( - MQ_TREE(g_new0(MqTabTree, 1)), - MQ_TREE(notebook->found_node), - NULL)); - } else { - node = MQ_TAB_TREE(mq_tree_insert_sibling_allocated( - MQ_TREE(g_new0(MqTabTree, 1)), - MQ_TREE(notebook->tree), - NULL)); - } + find_node(notebook, sibling); + node = MQ_TAB_TREE(mq_tree_insert_sibling_allocated( + MQ_TREE(g_new0(MqTabTree, 1)), + MQ_TREE(notebook->found_node), + NULL)); insert_page(notebook, node, uri); @@ -208,19 +201,11 @@ mq_notebook_insert_child(MqNotebook *notebook, const gchar *uri, { MqTabTree *node; - if (child) { - find_node(notebook, child); - node = MQ_TAB_TREE(mq_tree_insert_child_allocated( - MQ_TREE(g_new0(MqTabTree, 1)), - MQ_TREE(notebook->found_node), - NULL)); - } else { - find_node(notebook, child); - node = MQ_TAB_TREE(mq_tree_insert_child_allocated( - MQ_TREE(g_new0(MqTabTree, 1)), - MQ_TREE(notebook->tree), - NULL)); - } + find_node(notebook, child); + node = MQ_TAB_TREE(mq_tree_insert_child_allocated( + MQ_TREE(g_new0(MqTabTree, 1)), + MQ_TREE(notebook->found_node), + NULL)); insert_page(notebook, node, uri); |