[PATCH] Ensure workbench body is shown
- From: Dodji Seketeli <dodji seketeli org>
- To: Nemiver Development <nemiver-list gnome org>
- Subject: [PATCH] Ensure workbench body is shown
- Date: Thu, 06 Dec 2012 06:37:20 +0100
Hello,
While using Nemiver on recent Fedora Rawhide with glade 3.14/gtk+ 3.7.2/
gnome 3.7.2, I noticed that the workbench body would stay 'blank', i.e,
I couldn't see the debugging perspective when I launch the application.
Shocker.
It appears that we don't ensure that the body of a perspective is shown
before adding it to the Notebook widget that contains all the
perspective body.
I am guess that something that was previously showing that widget
(possibly in glade) has changed.
Anyway, fixed thus, tested and applying to the master branch.
* src/workbench/nmv-workbench.cc (Workbench::add_perspective_body)
(Workbench::on_perspective_layout_changed_signal): Ensure that
widgets added to the perspective body Notebook are shown.
---
src/workbench/nmv-workbench.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/workbench/nmv-workbench.cc b/src/workbench/nmv-workbench.cc
index f3a0131..0f78956 100644
--- a/src/workbench/nmv-workbench.cc
+++ b/src/workbench/nmv-workbench.cc
@@ -804,6 +804,8 @@ Workbench::add_perspective_body (IPerspectiveSafePtr &a_perspective,
if (!a_body || !a_perspective) {return;}
+ a_body->show_all ();
+
m_priv->bodies_index_map[a_perspective.get ()] =
m_priv->bodies_container->insert_page (*a_body, -1);
}
@@ -814,6 +816,8 @@ Workbench::on_perspective_layout_changed_signal
{
LOG_FUNCTION_SCOPE_NORMAL_DD;
+ NEMIVER_TRY;
+
THROW_IF_FAIL (m_priv);
THROW_IF_FAIL (m_priv->bodies_container);
@@ -822,9 +826,15 @@ Workbench::on_perspective_layout_changed_signal
int page = m_priv->bodies_index_map[a_perspective.get ()];
m_priv->bodies_container->remove_page (page);
- m_priv->bodies_container->insert_page (*a_perspective->get_body (), page);
+
+ Gtk::Widget *b = a_perspective->get_body ();
+ THROW_IF_FAIL (b);
+ b->show_all ();
+ m_priv->bodies_container->insert_page (*b, page);
select_perspective (a_perspective);
+
+ NEMIVER_CATCH;
}
bool
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]