[gtkmm/gtkmm-2-22] Fix build errors when deprecated API is disabled.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-2-22] Fix build errors when deprecated API is disabled.
- Date: Fri, 16 Jul 2010 09:46:34 +0000 (UTC)
commit 640a0382ff0eaf87df84775974b12e905ae60f01
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Jul 16 11:46:23 2010 +0200
Fix build errors when deprecated API is disabled.
* gtk/src/notebook.[hg|ccg]:
* gtk/src/table.hg: Remove the ifdefs from the PagesList and TableList class
declarations because we must keep the un-ifdefed member variable to preserve
ABI.
ChangeLog | 9 +++++++++
gtk/src/notebook.ccg | 16 ++++++++--------
gtk/src/notebook.hg | 36 ++++++++++++++++++++----------------
gtk/src/table.hg | 6 +++---
4 files changed, 40 insertions(+), 27 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d7733f8..cdcd260 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-07-16 Murray Cumming <murrayc murrayc com>
+
+ Fix build errors when deprecated API is disabled.
+
+ * gtk/src/notebook.[hg|ccg]:
+ * gtk/src/table.hg: Remove the ifdefs from the PagesList and TableList class
+ declarations because we must keep the un-ifdefed member variable to preserve
+ ABI.
+
2010-07-14 Murray Cumming <murrayc murrayc com>
Deprecate Notebook::pages() and Table::children().
diff --git a/gtk/src/notebook.ccg b/gtk/src/notebook.ccg
index 435f8ad..93ec229 100644
--- a/gtk/src/notebook.ccg
+++ b/gtk/src/notebook.ccg
@@ -53,7 +53,6 @@ static void SignalProxy_WindowCreation_gtk_callback_destroy(void* data)
namespace Gtk
{
-_DEPRECATE_IFDEF_START
namespace Notebook_Helpers
{
@@ -101,7 +100,7 @@ const PageIterator PageIterator::operator--(int)
/*********************************************************************
***** Page Properties
*********************************************************************/
-
+_DEPRECATE_IFDEF_START
int Page::get_page_num() const
{
return g_list_position(parent_->gobj()->children, node_);
@@ -161,6 +160,7 @@ void Page::set_tab_label_packing(bool expand, bool fill, PackType pack_type)
{
parent_->set_tab_label_packing(*get_child(), expand, fill, pack_type);
}
+_DEPRECATE_IFDEF_END
/*********************************************************************
***** List properties
@@ -186,6 +186,7 @@ PageList& PageList::operator=(const PageList& src)
return *this;
}
+_DEPRECATE_IFDEF_START
PageList::size_type PageList::max_size() const
{
return G_MAXINT;
@@ -319,7 +320,9 @@ PageList::iterator PageList::end_() const
{
return iterator(Glib::wrap(gparent_), 0);
}
+_DEPRECATE_IFDEF_END
+_DEPRECATE_IFDEF_START
Element::Element(Widget* child, Widget* tab, Widget* menu)
:
child_ (child),
@@ -355,9 +358,10 @@ MenuElem::MenuElem(Widget& child, Widget& menu)
:
Element(&child, 0, &menu)
{}
+_DEPRECATE_IFDEF_END
} /* namespace Notebook_Helpers */
-_DEPRECATE_IFDEF_END
+
_DEPRECATE_IFDEF_START
Notebook::PageList::iterator Notebook::get_current()
@@ -378,11 +382,6 @@ const Notebook::PageList& Notebook::pages() const
}
_DEPRECATE_IFDEF_END
-/*Widget* Notebook::get_current_page()
-{
- return get_nth_page(get_current_page_num());
-}*/
-
int Notebook::prepend_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic)
{
Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
@@ -466,3 +465,4 @@ void Notebook::set_window_creation_hook(const SlotWindowCreation& slot)
}
} //namespace Gtk
+
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index f530613..12957f6 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -49,12 +49,8 @@ namespace Gtk
_CC_INCLUDE(gtk/gtk.h)
_WRAP_ENUM(NotebookTab, GtkNotebookTab)
-
-_DEPRECATE_IFDEF_START
-
class Notebook;
-
/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
*/
namespace Notebook_Helpers
@@ -124,6 +120,8 @@ inline bool operator!=(const PageIterator& lhs, const PageIterator& rhs)
{ return !lhs.equal(rhs); }
// Page is the output class
+/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
+ */
class Page : public PageIterator
{
protected:
@@ -132,6 +130,7 @@ private:
Page& operator=(const Page&);
public:
+ _DEPRECATE_IFDEF_START
int get_page_num() const;
Widget* get_child() const;
Widget* get_tab_label() const;
@@ -143,6 +142,7 @@ public:
void set_menu_label_text(const Glib::ustring& menu_text);
Glib::ustring get_menu_label_text() const;
+
/** @deprecated Query the "tab-expand" and "tab-fill" child properties instead.
*/
void query_tab_label_packing(bool& expand, bool& fill, PackType& pack_type);
@@ -150,13 +150,15 @@ public:
/** @deprecated Modify the "tab-expand" and "tab-fill" child properties instead.
*/
void set_tab_label_packing(bool expand, bool fill, PackType pack_type);
+ _DEPRECATE_IFDEF_END
};
+ _DEPRECATE_IFDEF_START
// Element is the input class
-class PageList;
-
/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
*/
+class PageList;
+
class Element
{
public:
@@ -188,14 +190,14 @@ struct MenuElem : public Element
{
MenuElem(Widget& child, Widget& menu);
};
+_DEPRECATE_IFDEF_END
/*********************************************************************
***** List properties
*********************************************************************/
-/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
- * An STL-style container for pages in a Gtk::Notebook.
- *
+/** An STL-style container for pages in a Gtk::Notebook.
+ * @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
*/
class PageList
{
@@ -211,6 +213,7 @@ public:
typedef const Page& const_reference;
typedef PageIterator iterator;
+_DEPRECATE_IFDEF_START
typedef Glib::List_ConstIterator<iterator> const_iterator;
typedef Glib::List_ReverseIterator<iterator> reverse_iterator;
typedef Glib::List_ConstIterator<reverse_iterator> const_reverse_iterator;
@@ -287,6 +290,7 @@ public:
{ erase(--end()); }
void clear();
+_DEPRECATE_IFDEF_END
protected:
iterator begin_() const;
@@ -296,7 +300,6 @@ protected:
};
} // Notebook_Helpers
-_DEPRECATE_IFDEF_END
/** Container which shows one of its children at a time, in tabbed windows.
*
@@ -315,6 +318,10 @@ class Notebook : public Container
_IGNORE(gtk_notebook_set_homogeneous_tabs, gtk_notebook_set_tab_border, gtk_notebook_set_tab_hborder, gtk_notebook_set_tab_vborder)
public:
+ /** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
+ */
+ typedef Notebook_Helpers::PageList PageList;
+
_CTOR_DEFAULT
_WRAP_METHOD(int prepend_page(Widget& child, Widget& tab_label), gtk_notebook_prepend_page)
@@ -423,20 +430,15 @@ public:
_WRAP_METHOD(Widget* get_action_widget(PackType pack_type = PACK_START), gtk_notebook_get_action_widget)
_WRAP_METHOD(void set_action_widget(Widget* widget, PackType pack_type = PACK_START), gtk_notebook_set_action_widget)
-
_DEPRECATE_IFDEF_START
/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
*/
- typedef Notebook_Helpers::PageList PageList;
-
- /** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
- */
PageList::iterator get_current();
/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
*/
PageList& pages();
-
+
/** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
*/
const PageList& pages() const;
@@ -470,6 +472,8 @@ _DEPRECATE_IFDEF_END
protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ /** @deprecated Use Notebook::get_current_page(), Notebook::get_nth_page(), etc. instead.
+ */
mutable PageList pages_proxy_;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
};
diff --git a/gtk/src/table.hg b/gtk/src/table.hg
index 002693a..59ad0fb 100644
--- a/gtk/src/table.hg
+++ b/gtk/src/table.hg
@@ -38,7 +38,6 @@ _PINCLUDE(gtkmm/private/container_p.h)
namespace Gtk
{
-_DEPRECATE_IFDEF_START
class Table;
/** @deprecated Use Container::get_children() instead.
@@ -58,6 +57,7 @@ public:
inline _GtkTableChild* gobj() {return (this);}
inline const _GtkTableChild* gobj() const {return (this);}
+_DEPRECATE_IFDEF_START
Widget* get_widget() const;
//TODO: Which of the GtkTableChild's fields are public API?
@@ -77,6 +77,7 @@ public:
bool get_yshrink() const;
bool get_xfill() const;
bool get_yfill() const;
+_DEPRECATE_IFDEF_END
protected:
inline GtkTable* parent()
@@ -99,7 +100,6 @@ protected:
GP_LIST_END()
} // namespace Table_Helpers
-_DEPRECATE_IFDEF_END
/** Pack widgets in regular patterns.
@@ -177,11 +177,11 @@ public:
_WRAP_METHOD(void set_homogeneous(bool homogeneous = true), gtk_table_set_homogeneous)
_WRAP_METHOD(bool get_homogeneous() const, gtk_table_get_homogeneous)
-_DEPRECATE_IFDEF_START
/** @deprecated Use Container::get_children() instead.
*/
typedef Table_Helpers::TableList TableList;
+_DEPRECATE_IFDEF_START
/** @deprecated Use Container::get_children() instead.
*/
TableList& children();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]