[nemiver] Revert "672409 - activate correct views in static layouts"
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Revert "672409 - activate correct views in static layouts"
- Date: Tue, 27 Mar 2012 18:51:45 +0000 (UTC)
commit e952535a1d4497984984f727dab1e898ee3eea2b
Author: Dodji Seketeli <dodji seketeli org>
Date: Tue Mar 27 20:49:17 2012 +0200
Revert "672409 - activate correct views in static layouts"
This reverts commit e1683034407681032ed38b1649124c5915248858.
.../nmv-dbg-perspective-default-layout.cc | 9 ++++-----
.../nmv-dbg-perspective-two-pane-layout.cc | 4 ++--
.../nmv-dbg-perspective-wide-layout.cc | 9 ++++-----
3 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
index 44d956f..05f7619 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-default-layout.cc
@@ -154,10 +154,7 @@ DBGPerspectiveDefaultLayout::activate_view (int a_view)
THROW_IF_FAIL (m_priv);
THROW_IF_FAIL (m_priv->statuses_notebook);
- int page_num =
- m_priv->statuses_notebook->page_num (m_priv->views.at (a_view));
- THROW_IF_FAIL (page_num >= 0);
- m_priv->statuses_notebook->set_current_page (page_num);
+ m_priv->statuses_notebook->set_current_page (a_view);
}
void
@@ -191,7 +188,9 @@ 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->prepend_page (a_widget, a_title);
+ int page_num = m_priv->statuses_notebook->insert_page (a_widget,
+ a_title,
+ a_index);
m_priv->statuses_notebook->set_current_page (page_num);
}
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
index da39cca..deb0e27 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-two-pane-layout.cc
@@ -193,7 +193,7 @@ DBGPerspectiveTwoPaneLayout::activate_view (int a_view)
LOG_FUNCTION_SCOPE_NORMAL_DD;
THROW_IF_FAIL (m_priv);
- THROW_IF_FAIL (m_priv->views.count (a_view));
+ THROW_IF_FAIL (!m_priv->views.count (a_view));
Gtk::Notebook &status_notebook = m_priv->statuses_notebook (a_view);
int page_num = status_notebook.page_num (m_priv->views.at (a_view));
@@ -234,7 +234,7 @@ DBGPerspectiveTwoPaneLayout::add_view (Gtk::Widget &a_widget,
m_priv->views.insert (std::make_pair<int, Gtk::Widget&> (a_index, a_widget));
a_widget.show_all ();
Gtk::Notebook &statuses_notebook = m_priv->statuses_notebook (a_index);
- int page_num = statuses_notebook.prepend_page (a_widget, a_title);
+ int page_num = statuses_notebook.insert_page (a_widget, a_title, a_index);
statuses_notebook.set_current_page (page_num);
}
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc b/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
index 78ff297..72370ae 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective-wide-layout.cc
@@ -151,10 +151,7 @@ DBGPerspectiveWideLayout::activate_view (int a_view)
THROW_IF_FAIL (m_priv);
THROW_IF_FAIL (m_priv->statuses_notebook);
- int page_num =
- m_priv->statuses_notebook->page_num (m_priv->views.at (a_view));
- THROW_IF_FAIL (page_num >= 0);
- m_priv->statuses_notebook->set_current_page (page_num);
+ m_priv->statuses_notebook->set_current_page (a_view);
}
void
@@ -188,7 +185,9 @@ DBGPerspectiveWideLayout::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->prepend_page (a_widget, a_title);
+ int page_num = m_priv->statuses_notebook->insert_page (a_widget,
+ a_title,
+ a_index);
m_priv->statuses_notebook->set_current_page (page_num);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]