Hello, After my fix that was preventing nemiver from unexpectedly hiding some source editors that were meant to be added to the source editors notebook[1], I noticed that in some cases we adding too many source editors. I already fixed an instance of such a bug[2].
But then I noticed that there were cases where Nemiver would unexpectedly add the disassembly editor more that once. Even worse, there is no way to remove (at least some of) those added disassembly editors. It turned out there is a thinko in DBGPerspective::append_source_editor that is causing it to append a source editor with the wrong path name, effectively preventing it from ensuring the uniqueness of each appended source view in the source view notebook. Thus the patch below, applied to master and gtk2-branch. [1] http://mail.gnome.org/archives/nemiver-list/2011-September/msg00008.html [2] http://mail.gnome.org/archives/nemiver-list/2011-September/msg00010.html * src/persp/dbgperspective/nmv-dbg-perspective.cc (DBGPerspective::append_source_editor): Fix thinko: use path, not the a_path that can be empty for e.g, disassembly source editor. --- src/persp/dbgperspective/nmv-dbg-perspective.cc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc index f4dc2f9..83b472b 100644 --- a/src/persp/dbgperspective/nmv-dbg-perspective.cc +++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc @@ -3851,7 +3851,7 @@ DBGPerspective::append_source_editor (SourceEditor &a_sv, close_button->set_relief (Gtk::RELIEF_NONE); close_button->set_focus_on_click (false); close_button->add (*cicon); - close_button->file_path = a_path; + close_button->file_path = path; close_button->signal_clicked ().connect (sigc::mem_fun (*close_button, &SlotedButton::on_clicked)); UString message; @@ -3867,7 +3867,7 @@ DBGPerspective::append_source_editor (SourceEditor &a_sv, event_box->add (*label); hbox->pack_start (*event_box); hbox->pack_start (*close_button, Gtk::PACK_SHRINK); - event_box->set_tooltip_text (a_path); + event_box->set_tooltip_text (path); hbox->show_all (); a_sv.show_all (); int page_num = m_priv->sourceviews_notebook->insert_page (a_sv, @@ -3880,7 +3880,7 @@ DBGPerspective::append_source_editor (SourceEditor &a_sv, THROW_IF_FAIL (base_name != ""); m_priv->basename_2_pagenum_map[Glib::filename_to_utf8 (base_name)] = page_num; - m_priv->path_2_pagenum_map[a_path] = page_num; + m_priv->path_2_pagenum_map[path] = page_num; m_priv->pagenum_2_source_editor_map[page_num] = &a_sv; m_priv->pagenum_2_path_map[page_num] = path; -- 1.7.6 -- Dodji _______________________________________________ nemiver-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/nemiver-list
