]> git.saurik.com Git - wxWidgets.git/commitdiff
Make everything compile with GTK_DISABLE_DEPRECATED declared.
authorMart Raudsepp <leio@gentoo.org>
Mon, 20 Feb 2006 21:28:53 +0000 (21:28 +0000)
committerMart Raudsepp <leio@gentoo.org>
Mon, 20 Feb 2006 21:28:53 +0000 (21:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/private.h
src/gtk/checklst.cpp
src/gtk/choice.cpp
src/gtk/combobox.cpp
src/gtk/listbox.cpp
src/gtk/notebook.cpp
src/gtk/settings.cpp
src/gtk/tbargtk.cpp
src/gtk/tglbtn.cpp
src/gtk/tooltip.cpp
src/gtk/window.cpp

index 7219dba13b6b6e95e33a899e705327ec29fdf846..b754ea5178caee6b753bfa9e7352c23532b49710 100644 (file)
     #define wxGTK_CONV_BACK(s)  wxConvLocal.cWC2WX( (wxConvUTF8.cMB2WC( s ) ) )
 #endif
 
+// Some deprecated GTK+ prototypes we still use often
+// FIXME: Don't use them if possible.
+G_BEGIN_DECLS
+
+// Should use gtk_image_new, but the mask seems to be handled different,
+// and we need to migrate
+GtkWidget* gtk_pixmap_new (GdkPixmap *pixmap,
+                           GdkBitmap *mask);
+
+// Deprecated since GTK+-1.3.7:
+// Trivial wrapper around gtk_window_move, with some side effects we seem to rely on
+void gtk_widget_set_uposition (GtkWidget *widget,
+                               gint      x,
+                               gint      y);
+
+// We rely on the allow_shrink parameter in one place
+void gtk_window_set_policy (GtkWindow *window,
+                            gint       allow_shrink,
+                            gint       allow_grow,
+                            gint       auto_shrink);
+
+G_END_DECLS
+
 // translate a GTK+ scroll type to a wxEventType
 inline wxEventType GtkScrollTypeToWx(guint scrollType)
 {
index e3eb5b9e7903dead959030490a2e3733bbc9fefd..95dbf3d2a84faadef73a90d2ef45369f6f13bf3f 100644 (file)
 #if wxUSE_CHECKLISTBOX
 
 #include "wx/checklst.h"
+
+// FIXME: We use GtkList to implement wxListBox
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 #include <gdk/gdk.h>
index 8765445a98351a98d897b61d215f5ea21708897e..7d0df1ca0d2c3305ab11bb8bac0431ddfe4af788 100644 (file)
 #include "wx/choice.h"
 #include "wx/arrstr.h"
 
+// FIXME: We use GtkOptionMenu which has been deprecated since GTK+ 2.3.0 in
+// favour of GtkComboBox.
+// Later use GtkComboBox if GTK+ runtime version is new enough.
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
index 9bb6c7857b2b578d37e4d2de48a70b866173eb2d..fdb640143f81fe267f5e9ad5dc5c2ee216e35394 100644 (file)
 
 #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
 
+// We use GtkCombo which has been deprecated since GTK+ 2.3.0
+// in favour of GtkComboBox for <GTK2.4 runtime
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
index cbff2c4f8f7023aa5d5fc843d94b06ae85c9af1d..efa0d1549152024a049290a97e2428446a6f7b40 100644 (file)
 #include "wx/intl.h"
 #include "wx/checklst.h"
 #include "wx/settings.h"
+
+// FIXME: Use GtkTreeView/GtkListModel instead?
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 #if wxUSE_TOOLTIPS
 #include "wx/tooltip.h"
 #endif
 
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
 //-----------------------------------------------------------------------------
index 50009797eb9926b736a8162bd203a44dd03b6903..329ecddec58827a5b6393c0006f630f88427c3cb 100644 (file)
 #include "wx/bitmap.h"
 #include "wx/fontutil.h"
 
+// FIXME: Use GtkImage instead of GtkPixmap. Don't use gtk_container_border_width
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 #include "wx/gtk/win_gtk.h"
 
index d5391ad1e4d039d224287fcab473d633ee3bd5c9..fc0926f43989fcfffd23f3cce2f4c038fd2adff0 100644 (file)
 #include "wx/fontutil.h"
 #include "wx/toplevel.h"
 
+// Using gtk_list_new, which is deprecated since GTK2
+// Using gtk_object_sink, which is deprecated since GTK+-2.9.0
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdkprivate.h>
index b46fe7af5fc468e567618c18c298ee33f5575258..70de9fd33d44914631d1ab7ea76caf955876cef7 100644 (file)
 
 #include "wx/frame.h"
 
-#include <glib.h>
+// FIXME: Use GtkImage instead of GtkPixmap. Use the new toolbar API for when gtk runtime is new enough?
+// Beware that the new and old toolbar API may not be mixed in usage.
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 // ----------------------------------------------------------------------------
index c18160f778257b48cbb326dff6d5a38e8100d217..722d7f965901ea3350caf6b586176c60ac03d258 100644 (file)
 
 #if wxUSE_TOGGLEBTN
 
+// FIXME: Use GtkImage instead of GtkPixmap.
+#include <gtk/gtkversion.h>
+#ifdef GTK_DISABLE_DEPRECATED
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 
 extern void wxapp_install_idle_handler();
index caf2a283bebeccdc53d0e58c8e26cc0e4c0754ba..e0d3bd03fa6db92227dd15a1e3875a710f09376b 100644 (file)
@@ -68,11 +68,18 @@ void wxToolTip::Enable( bool flag )
         gtk_tooltips_disable( ss_tooltips );
 }
 
+G_BEGIN_DECLS
+void gtk_tooltips_set_delay (GtkTooltips *tooltips,
+                             guint delay);
+G_END_DECLS
+
 void wxToolTip::SetDelay( long msecs )
 {
     if (!ss_tooltips)
         return;
 
+    // FIXME: This is a deprecated function and might not even have an effect.
+    // Try to not use it, after which remove the prototype above.
     gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
 }
 
index ae4e00120e2d01a54e442e64983a2ff9dd9f2f91..d98386fe20a204b536696ccea1d1e88a3985908e 100644 (file)
 #include "wx/math.h"
 #include <ctype.h>
 
+// FIXME: Due to a hack we use GtkCombo in here, which is deprecated since gtk2.3.0
+#include <gtk/gtkversion.h>
+#if defined(GTK_DISABLE_DEPRECATED) && GTK_CHECK_VERSION(2,3,0)
+#undef GTK_DISABLE_DEPRECATED
+#endif
+
 #include "wx/gtk/private.h"
 #include <gdk/gdkprivate.h>
 #include <gdk/gdkkeysyms.h>