[gtkmm] Deprecate Gtk::Table in favour of Gtk::Grid.



commit d7e25237dda2c084e3a95a2c5ebf322577511420
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Oct 13 17:47:09 2011 +0200

    Deprecate Gtk::Table in favour of Gtk::Grid.
    
    * gtk/src/table.hg: Deprecate the whole thing.

 ChangeLog        |    8 +++++++-
 gtk/src/grid.hg  |    4 +---
 gtk/src/table.hg |   14 ++++++++++++--
 3 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1a395d8..a806062 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,16 @@
+2011-10-13  Murray Cumming  <murrayc murrayc com>
+
+	Deprecate Gtk::Table in favour of Gtk::Grid.
+
+	* gtk/src/table.hg: Deprecate the whole thing.
+
 2011-10-18  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	Undo removal of 'constversion' in Gtk::Dialog::get_vbox().
 
 	* gtk/src/dialog.hg: Insert 'constversion' in get_vbox() const, because
 	a bug in gmmproc has been fixed in glibmm 2.29.13. Bug #657751, comment 8.
-	
+
 This is the master branch, for gtkmm 3.3/4. See also the gtkmm-3-2 branch.
 
 3.2.0:
diff --git a/gtk/src/grid.hg b/gtk/src/grid.hg
index 2019687..cc0eb78 100644
--- a/gtk/src/grid.hg
+++ b/gtk/src/grid.hg
@@ -27,8 +27,6 @@ _PINCLUDE(gtkmm/private/container_p.h)
 namespace Gtk
 {
 
-//TODO: Is this comparison with Table and Child still useful? Don't they support h-for-w properly now?
-
 /** A container which arranges its child widgets in rows and columns.
  * It is a very similar to Table and Box,
  * but it consistently uses Widget's margin and expand
@@ -57,7 +55,7 @@ class Grid
 public:
   _CTOR_DEFAULT
   
-  //TODO: Add a Grid(Orientation orientatoin = ORIENTATION_HORIZONTAL) constructor to match the Paned and Box ones?
+  //TODO: Add a Grid(Orientation orientation = ORIENTATION_HORIZONTAL) constructor to match the Paned and Box ones?
 
   _WRAP_METHOD(void attach(Widget& child, int left, int top, int width, int height), gtk_grid_attach)
   _WRAP_METHOD(void attach_next_to(Widget& child, Widget& sibling, PositionType side, int width, int height), gtk_grid_attach_next_to)
diff --git a/gtk/src/table.hg b/gtk/src/table.hg
index 8aa855e..dc727e4 100644
--- a/gtk/src/table.hg
+++ b/gtk/src/table.hg
@@ -17,11 +17,16 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/container_p.h)
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
 #include <gtkmm/container.h>
 #include <gtkmm/enums.h>
 
-_DEFS(gtkmm,gtk)
-_PINCLUDE(gtkmm/private/container_p.h)
 
 namespace Gtk
 {
@@ -62,11 +67,16 @@ namespace Gtk
  * A Table widget looks like this:
  * @image html table1.png
  *
+ * @deprecated Use Gtk::Grid instead. It provides the same
+ * capabilities as Gtk::Table for arranging widgets in a rectangular grid, but
+ * does support height-for-width geometry management.
+ *
  * @see Gtk::HBox, Gtk::VBox
  */
 class Table : public Container
 {
   _CLASS_GTKOBJECT(Table,GtkTable,GTK_TABLE,Gtk::Container,GtkContainer)
+  _IS_DEPRECATED
   _IGNORE(gtk_table_attach_defaults)
 public:
   _WRAP_CTOR(Table(guint n_rows = 1, guint n_columns = 1, bool homogeneous = false), gtk_table_new)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]