[gtkmm] Fix the build with new GTK+ deprecations, when using fatal warnings.



commit 8d50e8a87bcdd30652ef6326a5412888d5c2cf27
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jan 4 12:25:51 2010 +0100

    Fix the build with new GTK+ deprecations, when using fatal warnings.
    
    	* gtk/src/button.hg: Use undef to fix the build with deprecated
    	gtk_button_clicked() and friends. Deprecate the C++ methods.
    	* gtk/src/fixed.hg:  Use undef to fix the build with deprecated
    	gtk_fixed_set_has_window() and gtk_fixed_get_has_window().
    	Deprecate the C++ methods.
    	* gtk/src/filelist.am:
    	* gtk/src/curve.hg:
    	* gtk/src/inputdialog.hg: Use undef to fix the build now that these are
    	deprecated in GTK+. Deprecate it in gtkmm.

 ChangeLog              |   14 ++++++++++++++
 gtk/src/button.hg      |   12 +++++++++---
 gtk/src/curve.hg       |    9 ++++++++-
 gtk/src/filelist.am    |    4 +---
 gtk/src/fixed.hg       |    9 +++++++--
 gtk/src/inputdialog.hg |   10 ++++++++--
 6 files changed, 47 insertions(+), 11 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 78fb5e2..86730f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-04  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with new GTK+ deprecations, when using fatal warnings. 
+	
+	* gtk/src/button.hg: Use undef to fix the build with deprecated 
+	gtk_button_clicked() and friends. Deprecate the C++ methods.
+	* gtk/src/fixed.hg:  Use undef to fix the build with deprecated 
+	gtk_fixed_set_has_window() and gtk_fixed_get_has_window().
+	Deprecate the C++ methods.
+	* gtk/src/filelist.am:
+	* gtk/src/curve.hg:
+	* gtk/src/inputdialog.hg: Use undef to fix the build now that these are 
+	deprecated in GTK+. Deprecate it in gtkmm.
+
 2009-12-30  Murray Cumming  <murrayc murrayc com>
 
 	Gdk::Window::get_default_root_window(): Correct the reference counting.
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 77cefeb..30f73d4 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -19,6 +19,12 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+// So we can still wrap the (deprecated) gtk_button_pressed(), gtk_button_clicked(), 
+// and gtk_button_enter functions.
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
 #include <gtkmm/bin.h>
 #include <gtkmm/stockid.h>
 _DEFS(gtkmm,gtk)
@@ -73,9 +79,9 @@ public:
   explicit Button(const StockID& stock_id);
 
 
-  _WRAP_METHOD(void pressed(), gtk_button_pressed)
-  _WRAP_METHOD(void released(),gtk_button_released)
-  _WRAP_METHOD(void clicked(), gtk_button_clicked)
+  _WRAP_METHOD(void pressed(), gtk_button_pressed, deprecated)
+  _WRAP_METHOD(void released(),gtk_button_released, deprecated)
+  _WRAP_METHOD(void clicked(), gtk_button_clicked, deprecated)
   _WRAP_METHOD(void enter(), gtk_button_enter)
   _WRAP_METHOD(void leave(), gtk_button_leave)
 
diff --git a/gtk/src/curve.hg b/gtk/src/curve.hg
index a467538..706ef81 100644
--- a/gtk/src/curve.hg
+++ b/gtk/src/curve.hg
@@ -19,6 +19,12 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+// So we can still wrap the (deprecated) widget.
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
 #include <glibmm/arrayhandle.h>
 #include <gtkmm/box.h>
 #include <gtkmm/drawingarea.h>
@@ -33,11 +39,12 @@ namespace Gtk
 
 /** Allows direct editing of a curve.
  *
- * @ingroup Widgets
+ * @deprecated As of gtkmm 2.20, this widget has been deprecated since it is too specialized. 
  */
 class Curve : public DrawingArea
 {
   _CLASS_GTKOBJECT(Curve,GtkCurve,GTK_CURVE,Gtk::DrawingArea,GtkDrawingArea)
+  _IS_DEPRECATED
   _IGNORE(gtk_curve_set_vector)
 public:
 
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 6d7b8f6..078bcc3 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -50,7 +50,6 @@ gtkmm_files_any_hg =		\
 	combobox.hg		\
 	comboboxentry.hg	\
 	container.hg		\
-	curve.hg		\
 	dialog.hg		\
 	drawingarea.hg		\
 	editable.hg		\
@@ -79,7 +78,6 @@ gtkmm_files_any_hg =		\
 	image.hg		\
 	imagemenuitem.hg	\
 	infobar.hg		\
-	inputdialog.hg		\
 	invisible.hg		\
 	item.hg			\
 	label.hg		\
@@ -186,7 +184,7 @@ gtkmm_files_posix_hg =		\
 	printjob.hg		\
 	printunixdialog.hg
 
-gtkmm_files_deprecated_hg = combo.hg
+gtkmm_files_deprecated_hg = combo.hg curve.hg inputdialog.hg
 
 if HOST_WINDOWS_NATIVE
 gtkmm_files_arch_hg =
diff --git a/gtk/src/fixed.hg b/gtk/src/fixed.hg
index 1dc0e48..93feaa6 100644
--- a/gtk/src/fixed.hg
+++ b/gtk/src/fixed.hg
@@ -19,6 +19,11 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+// So we can still wrap the (deprecated) function.
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
 #include <gtkmm/container.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/container_p.h)
@@ -48,8 +53,8 @@ public:
 
   _WRAP_METHOD(void put(Widget& widget, int x, int y), gtk_fixed_put)
   _WRAP_METHOD(void move(Widget& widget, int x, int y), gtk_fixed_move)
-  _WRAP_METHOD(void set_has_window(bool has_window = true), gtk_fixed_set_has_window)
-  _WRAP_METHOD(bool get_has_window() const, gtk_fixed_get_has_window)
+  _WRAP_METHOD(void set_has_window(bool has_window = true), gtk_fixed_set_has_window, deprecated)
+  _WRAP_METHOD(bool get_has_window() const, gtk_fixed_get_has_window, deprecated)
 };
 
 } /* namespace Gtk */
diff --git a/gtk/src/inputdialog.hg b/gtk/src/inputdialog.hg
index f3f0096..498b4cb 100644
--- a/gtk/src/inputdialog.hg
+++ b/gtk/src/inputdialog.hg
@@ -23,6 +23,11 @@
 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gtkmmconfig.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+// So we can still wrap the (deprecated) widget.
+#undef GTK_DISABLE_DEPRECATED
+#m4 _POP()
+
 #include <gtkmm/dialog.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/dialog_p.h)
@@ -39,12 +44,13 @@ _DEPRECATE_IFDEF_END
 
 class ScrolledWindow;
 
-// Don't list this in the documentation's Dialogs group because it isn't really useful
-// - see the GTK+ docs.
+/** @deprecated As of gtkmm 2.20, InputDialog has been deprecated since it is too specialized. 
+ */
 class InputDialog : public Dialog
 {
   _CLASS_GTKOBJECT(InputDialog,GtkInputDialog,GTK_INPUT_DIALOG,Gtk::Dialog,GtkDialog)
   _UNMANAGEABLE
+  _IS_DEPRECATED
 public:
 
   _CTOR_DEFAULT



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