Make everything compile with GTK_DISABLE_DEPRECATED declared.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2006-02-20 21:28:53 +00:00
parent cc7e9e2083
commit 1efb5db896
11 changed files with 88 additions and 3 deletions

View File

@@ -30,6 +30,29 @@
#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)
{

View File

@@ -15,6 +15,12 @@
#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>

View File

@@ -14,6 +14,14 @@
#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"
//-----------------------------------------------------------------------------

View File

@@ -20,6 +20,12 @@
#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"
//-----------------------------------------------------------------------------

View File

@@ -21,14 +21,19 @@
#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>
//-----------------------------------------------------------------------------

View File

@@ -22,6 +22,12 @@
#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"

View File

@@ -17,6 +17,12 @@
#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>

View File

@@ -25,7 +25,13 @@
#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"
// ----------------------------------------------------------------------------

View File

@@ -18,6 +18,12 @@
#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();

View 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 );
}

View File

@@ -56,6 +56,12 @@
#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>