Re: [PATCH] 672409 - activate correct views in static layouts
- From: Dodji Seketeli <dodji seketeli org>
- To: The mailing list of the Nemiver project <nemiver-list gnome org>
- Subject: Re: [PATCH] 672409 - activate correct views in static layouts
- Date: Tue, 20 Mar 2012 12:14:44 +0100
Thank you for taking the time to hack on this.
Please find below the few comments I have.
Fabien Parent <parent f gmail com> a écrit:
> +++ b/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
[...]
> void
> @@ -188,9 +191,7 @@ DBGPerspectiveDefaultLayout::add_view (Gtk::Widget &a_widget,
>
> m_priv->views.insert (std::make_pair<int, Gtk::Widget&> (a_index, a_widget));
> a_widget.show_all ();
> - int page_num = m_priv->statuses_notebook->insert_page (a_widget,
> - a_title,
> - a_index);
> + int page_num = m_priv->statuses_notebook->prepend_page (a_widget,
> a_title);
Prepending the page here seems surprising. Rather, I'd prefer that
DBGPerspective::add_views_to_layout add views in ascending order
(starting from TARGET_TERMINAL_VIEW_INDEX, and going upward to
MEMORY_VIEW_INDEX), and here we'd use
m_priv->statuses_notebook->append_page instead. I think it would be
good to add a comment to DBGPerspective::add_views_to_layout function
saying that, and to maybe change the name of Layout::add_view in to
Layout::append_view, to make it clearer that views are being appended.
What do you think?
Cheers.
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]