Commit 5ccc289f authored by Murray Cumming's avatar Murray Cumming

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.
parent f70ff925
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.
......
......@@ -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();
......
......@@ -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);
......
......@@ -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),
......
......@@ -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")
......
......@@ -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();
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment