Hello, I noticed that in some circumstances the source view that is added to the source view notebook remains invisible because DBGPerspective::append_source_editor doesn't call Gtk::Widget::show_all on it. That duty is left to the callers of the function, which is error prone.
The patch below instructs DBGPerspective::append_source_editor to call Gtk::Widget::show_all on the source view to be added to the source view, and remove that call from the few spots where that are callers of DBGPerspective::append_source_editor. Tested and applied to master and gtk2-branch. From: Dodji Seketeli <[email protected]> Date: Sun, 4 Sep 2011 21:34:56 +0200 Subject: [PATCH 2/4] Don't forget to Gtk::Widget::show_all source views * src/persp/dbgperspective/nmv-dbg-perspective.cc (DBGPerspective::append_source_editor): Call Gtk::Widget::show_all on the source view to add append to the source view notebook here ... (DBGPerspective::get_or_append_asm_source_editor) (DBGPerspective::open_file_real): ... not here. --- src/persp/dbgperspective/nmv-dbg-perspective.cc | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc index 66a95cc..99ef2bf 100644 --- a/src/persp/dbgperspective/nmv-dbg-perspective.cc +++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc @@ -3869,6 +3869,7 @@ DBGPerspective::append_source_editor (SourceEditor &a_sv, hbox->pack_start (*close_button, Gtk::PACK_SHRINK); event_box->set_tooltip_text (a_path); hbox->show_all (); + a_sv.show_all (); int page_num = m_priv->sourceviews_notebook->insert_page (a_sv, *hbox, -1); @@ -4154,7 +4155,6 @@ DBGPerspective::get_or_append_asm_source_editor () /*curren_line=*/-1, /*a_current_address=*/""); THROW_IF_FAIL (source_editor); - source_editor->show_all (); append_source_editor (*source_editor, get_asm_title ()); } THROW_IF_FAIL (source_editor); @@ -5266,7 +5266,6 @@ DBGPerspective::open_file_real (const UString &a_path, /*a_current_address=*/""); THROW_IF_FAIL (source_editor); - source_editor->show_all (); append_source_editor (*source_editor, a_path); NEMIVER_CATCH_AND_RETURN (0) -- Dodji _______________________________________________ nemiver-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/nemiver-list
