[gtkmm] Dialog: Deprecate get_vbox(), replacing with get_content_area().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Dialog: Deprecate get_vbox(), replacing with get_content_area().
- Date: Mon, 13 Jun 2011 12:23:25 +0000 (UTC)
commit 5ccc289fa8e9b046c07f5ea234f5ced8c6356fc1
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Jun 13 14:23:19 2011 +0200
Dialog: Deprecate get_vbox(), replacing with get_content_area().
* gtk/src/dialog.hg: We forgot to rename get_vbox() to
get_content_area() for gtkmm 3.0, so we do it now via a
deprecation.
* demos/gtk-demo/example_change_display.cc:
* demos/gtk-demo/example_dialog.cc:
* demos/gtk-demo/example_sizegroup.cc:
* tests/dialog_deletethis/main.cc:
* tests/wrap_existing/main.cc: Adapted.
ChangeLog | 13 +++++++++++++
demos/gtk-demo/example_change_display.cc | 6 +++---
demos/gtk-demo/example_dialog.cc | 2 +-
demos/gtk-demo/example_sizegroup.cc | 2 +-
gtk/src/dialog.hg | 9 +++++----
tests/dialog_deletethis/main.cc | 2 +-
tests/wrap_existing/main.cc | 2 +-
7 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 076b0b6..8c52636 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2011-06-13 Murray Cumming <murrayc murrayc com>
+
+ Dialog: Deprecate get_vbox(), replacing with get_content_area().
+
+ * gtk/src/dialog.hg: We forgot to rename get_vbox() to
+ get_content_area() for gtkmm 3.0, so we do it now via a
+ deprecation.
+ * demos/gtk-demo/example_change_display.cc:
+ * demos/gtk-demo/example_dialog.cc:
+ * demos/gtk-demo/example_sizegroup.cc:
+ * tests/dialog_deletethis/main.cc:
+ * tests/wrap_existing/main.cc: Adapted.
+
2011-06-10 Murray Cumming <murrayc murrayc com>
box.h, etc: Include the deprecated H/V classes.
diff --git a/demos/gtk-demo/example_change_display.cc b/demos/gtk-demo/example_change_display.cc
index a37cd55..c33202f 100644
--- a/demos/gtk-demo/example_change_display.cc
+++ b/demos/gtk-demo/example_change_display.cc
@@ -128,7 +128,7 @@ Example_ChangeDisplay::Example_ChangeDisplay()
set_default_size(300, 400);
m_VBox.set_border_width(8);
- get_vbox()->pack_start(m_VBox);
+ get_content_area()->pack_start(m_VBox);
//Display:
@@ -257,8 +257,8 @@ void Example_ChangeDisplay::on_button_display_open()
Gtk::Label label("Please enter the name of\nthe new display\n");
- dialog.get_vbox()->add(label);
- dialog.get_vbox()->add(entry);
+ dialog.get_content_area()->add(label);
+ dialog.get_content_area()->add(entry);
entry.grab_focus();
diff --git a/demos/gtk-demo/example_dialog.cc b/demos/gtk-demo/example_dialog.cc
index f7a89ce..7d9db7e 100644
--- a/demos/gtk-demo/example_dialog.cc
+++ b/demos/gtk-demo/example_dialog.cc
@@ -143,7 +143,7 @@ Dialog_Interactive::Dialog_Interactive(Gtk::Window& parent, const Glib::ustring&
add_button("_Non-stock Button", Gtk::RESPONSE_CANCEL);
m_HBox.set_border_width(8);
- get_vbox()->pack_start(m_HBox, Gtk::PACK_SHRINK);
+ get_content_area()->pack_start(m_HBox, Gtk::PACK_SHRINK);
m_HBox.pack_start(m_Image, Gtk::PACK_SHRINK);
m_Table.set_row_spacings(4);
diff --git a/demos/gtk-demo/example_sizegroup.cc b/demos/gtk-demo/example_sizegroup.cc
index e2bad77..42e98f5 100644
--- a/demos/gtk-demo/example_sizegroup.cc
+++ b/demos/gtk-demo/example_sizegroup.cc
@@ -59,7 +59,7 @@ Example_SizeGroup::Example_SizeGroup()
set_resizable(false);
add_button(Gtk::Stock::CLOSE, Gtk::RESPONSE_CLOSE);
- get_vbox()->pack_start(m_VBox);
+ get_content_area()->pack_start(m_VBox);
m_VBox.set_border_width(5);
m_refSizeGroup = Gtk::SizeGroup::create(Gtk::SIZE_GROUP_HORIZONTAL),
diff --git a/gtk/src/dialog.hg b/gtk/src/dialog.hg
index 3105378..0ca8e7c 100644
--- a/gtk/src/dialog.hg
+++ b/gtk/src/dialog.hg
@@ -116,10 +116,11 @@ public:
_WRAP_METHOD(ButtonBox* get_action_area(), gtk_dialog_get_action_area)
_WRAP_METHOD(const ButtonBox* get_action_area() const, gtk_dialog_get_action_area, constversion)
- //TODO: Rename to get_content_area() when we do an ABI break.
- //We kept it as get_vbox() when reimplementing a MEMBER_GET with this new C function:
- _WRAP_METHOD(Box* get_vbox(), gtk_dialog_get_content_area)
- _WRAP_METHOD(const Box* get_vbox() const, gtk_dialog_get_content_area)
+ _WRAP_METHOD(Box* get_vbox(), gtk_dialog_get_content_area, deprecated "Use get_content_area() instead.")
+ _WRAP_METHOD(const Box* get_vbox() const, gtk_dialog_get_content_area, constversion, deprecated "Use get_content_area() instead.")
+
+ _WRAP_METHOD(Box* get_content_area(), gtk_dialog_get_content_area)
+ _WRAP_METHOD(const Box* get_content_area() const, gtk_dialog_get_content_area, constversion)
_WRAP_SIGNAL(void response(int response_id), "response")
diff --git a/tests/dialog_deletethis/main.cc b/tests/dialog_deletethis/main.cc
index 303cea6..95c7046 100644
--- a/tests/dialog_deletethis/main.cc
+++ b/tests/dialog_deletethis/main.cc
@@ -10,7 +10,7 @@ class Dlg : public sigc::trackable
dlg_ = new Gtk::Dialog("Test Dialog");
Gtk::Button *btn = manage(new Gtk::Button("ClickMe"));
btn->signal_clicked().connect(sigc::mem_fun(*this, &Dlg::on_button_clicked));
- dlg_->get_vbox()->pack_start(*btn);
+ dlg_->get_content_area()->pack_start(*btn);
dlg_->add_button(Gtk::Stock::OK, 0);
dlg_->signal_response().connect(sigc::mem_fun(*this, &Dlg::on_response));
dlg_->show_all();
diff --git a/tests/wrap_existing/main.cc b/tests/wrap_existing/main.cc
index ee07a29..e755ef6 100644
--- a/tests/wrap_existing/main.cc
+++ b/tests/wrap_existing/main.cc
@@ -23,7 +23,7 @@ int main(int argc, char**argv)
Gtk::Main app(&argc, &argv);
Gtk::Dialog* pDialog = new Gtk::Dialog();
- Gtk::Box* pBox = pDialog->get_vbox();
+ Gtk::Box* pBox = pDialog->get_content_area();
//Set a quark and a callback:
initialize_quark();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]