Closed rluzynski closed 5 years ago
Some explanations what happened here:
SingleTab::tab_label
- removed, we don't need it anymore. The comment was correct. It is owned by the notebook widget and destroyed when a page is destroyed.SingleTab::scrolledwindow
, SingleTab::webview
- made private. We don't need them to be public anymore.SingleTab::get_reference()
- made static. This is a minor optimization, it just does not need to access any member of this class.SingleTab
and WindowTabbed
for a better isolation of the classes. I am not absolutely against the friend access but whenever I see it I'm asking myself a question: how can we do it better so we don't need a friend access at all?SingleTab::title
directly, SingleTab::getTitle()
does the same job instead and does not give an opportunity to modify the title. That's better to avoid bugs in future.WindowTabbed::active_url
- removed, it does not serve any purpose now.WindowTabbed::myreference
- made private.WindowTabbed::gotoReference()
which does the part previously done inside SingleTab::html_link_clicked()
. It did not look good for me that SingleTab::html_link_clicked()
accessed members of WindowTabbed
directly.I hope these changes are helpful and not destructive.
Looks good. Merged with commit daf15b7. See also gtk3 branch, which has been rebased again.
This commit does not change anything from the user's point of view. The aim is to make the code more readable and less error prone. Some unnecessary class members have been removed, some made private.