[gtkmm] Don't disable more deprecation warnings than necessary
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Don't disable more deprecation warnings than necessary
- Date: Sun, 21 Jun 2015 15:24:45 +0000 (UTC)
commit 353888cb054042fdcaefa4dcee74169fb88d68af
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sun Jun 21 17:21:42 2015 +0200
Don't disable more deprecation warnings than necessary
* gdk/src/pixbuf.hg: Don't redefine G_DEPRECATED as an empty string.
This is unnecessary when deprecated code is surrounded by
G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS.
* gdk/src/<some>.hg:
* gtk/src/<many>.[ccg|hg]: Don't #undef [GDK|GTK]_DISABLE_DEPRECATED
or #define GDK_DISABLE_DEPRECATION_WARNINGS. This is unnecessary when
deprecated code is surrounded by G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS.
Requires glibmm commit c570362cfc1f46e85b66093567a3f925741cb1c2,
where _WRAP_METHOD() begins using G_GNUC_[BEGIN|END]_IGNORE_DEPRECATIONS.
Bug #750379.
gdk/src/cursor.hg | 5 -----
gdk/src/display.hg | 5 -----
gdk/src/dragcontext.hg | 5 -----
gdk/src/pixbuf.hg | 8 --------
gdk/src/window.hg | 5 -----
gtk/src/adjustment.hg | 5 -----
gtk/src/application.hg | 3 ---
gtk/src/assistant.hg | 5 -----
gtk/src/button.ccg | 2 ++
gtk/src/button.hg | 7 +------
gtk/src/cellview.hg | 5 -----
gtk/src/combobox.hg | 5 -----
gtk/src/container.hg | 5 -----
gtk/src/dialog.ccg | 2 ++
gtk/src/dialog.hg | 6 ------
gtk/src/entry.hg | 7 -------
gtk/src/enums.ccg | 10 ++++++++++
gtk/src/enums.hg | 5 -----
gtk/src/iconinfo.ccg | 2 ++
gtk/src/iconinfo.hg | 7 -------
gtk/src/icontheme.hg | 5 -----
gtk/src/image.ccg | 4 ++++
gtk/src/image.hg | 5 -----
gtk/src/menu.ccg | 2 ++
gtk/src/menu.hg | 6 ------
gtk/src/menuitem.hg | 5 -----
gtk/src/messagedialog.hg | 5 -----
gtk/src/notebook.hg | 5 -----
gtk/src/scrollbar.hg | 5 -----
gtk/src/stylecontext.ccg | 2 ++
gtk/src/stylecontext.hg | 5 -----
gtk/src/toolbutton.hg | 5 -----
gtk/src/tooltip.hg | 5 -----
gtk/src/treeview.hg | 5 -----
gtk/src/widget.ccg | 8 ++++++++
gtk/src/widget.hg | 5 -----
gtk/src/widgetpath.hg | 5 -----
gtk/src/window.hg | 6 ------
38 files changed, 33 insertions(+), 159 deletions(-)
---
diff --git a/gdk/src/cursor.hg b/gdk/src/cursor.hg
index a5edb6c..e29a0e3 100644
--- a/gdk/src/cursor.hg
+++ b/gdk/src/cursor.hg
@@ -23,11 +23,6 @@
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gdk
{
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 48e402b..eccb674 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -24,11 +24,6 @@
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gdk
{
diff --git a/gdk/src/dragcontext.hg b/gdk/src/dragcontext.hg
index 2576c3c..74abecd 100644
--- a/gdk/src/dragcontext.hg
+++ b/gdk/src/dragcontext.hg
@@ -27,11 +27,6 @@
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gdk
{
diff --git a/gdk/src/pixbuf.hg b/gdk/src/pixbuf.hg
index 798fb73..52834dc 100644
--- a/gdk/src/pixbuf.hg
+++ b/gdk/src/pixbuf.hg
@@ -35,14 +35,6 @@ _PINCLUDE(glibmm/private/object_p.h)
#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
// So we can use deprecated functions in our deprecated methods.
#undef GDK_PIXBUF_DISABLE_DEPRECATED
-// gdk-pixbuf uses G_DEPRECATED. There is no corresponding G_DISABLE_DEPRECATION_WARNINGS.
-// G_DEPRECATED must be cleared after it was defined in glib/glib/gmacros.h,
-// but before any gdk-pixbuf header is included in pixbuf.cc.
-// Because of a complication in glibmm/glib/threads.h, glibmm.h must be given
-// a chance to include glib.h before anyone else.
-#include <glibmm.h>
-#undef G_DEPRECATED
-#define G_DEPRECATED
#m4 _POP()
namespace Gdk
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index bb92735..6af6b66 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -31,11 +31,6 @@ _CONFIGINCLUDE(gdkmmconfig.h)
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GDK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gdk
{
diff --git a/gtk/src/adjustment.hg b/gtk/src/adjustment.hg
index 56d2336..1f1f64d 100644
--- a/gtk/src/adjustment.hg
+++ b/gtk/src/adjustment.hg
@@ -20,11 +20,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index 4a7ca62..16660e8 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -33,9 +33,6 @@ _PINCLUDE(giomm/private/application_p.h)
#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
// Needed before gtkmm/private/application_p.h is included.
typedef struct _GtkWindow GtkWindow;
-//So we can use deprecated GTK+ API in our deprecated C++ API:
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()
namespace Gtk
diff --git a/gtk/src/assistant.hg b/gtk/src/assistant.hg
index 60f0aed..a61919f 100644
--- a/gtk/src/assistant.hg
+++ b/gtk/src/assistant.hg
@@ -22,11 +22,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/window_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/button.ccg b/gtk/src/button.ccg
index e68300b..983d8b8 100644
--- a/gtk/src/button.ccg
+++ b/gtk/src/button.ccg
@@ -29,10 +29,12 @@ Button::Button(const Glib::ustring& label, bool mnemonic)
{}
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Button::Button(const StockID& stock_id)
:
_CONSTRUCT("use_stock", 1, "label", stock_id.get_c_str())
{}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
void Button::set_image_from_icon_name(const Glib::ustring& icon_name, IconSize size)
diff --git a/gtk/src/button.hg b/gtk/src/button.hg
index 6a1e4d8..caf4a40 100644
--- a/gtk/src/button.hg
+++ b/gtk/src/button.hg
@@ -18,15 +18,10 @@
#include <gtkmm/bin.h>
#include <gtkmm/activatable.h>
-//deprecated: #include <gtkmm/stockid.h>
+
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/cellview.hg b/gtk/src/cellview.hg
index 3f5d5d7..cc45dee 100644
--- a/gtk/src/cellview.hg
+++ b/gtk/src/cellview.hg
@@ -32,11 +32,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/combobox.hg b/gtk/src/combobox.hg
index 97bb175..c8fb947 100644
--- a/gtk/src/combobox.hg
+++ b/gtk/src/combobox.hg
@@ -28,11 +28,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/container.hg b/gtk/src/container.hg
index 495660d..e0e0bc8 100644
--- a/gtk/src/container.hg
+++ b/gtk/src/container.hg
@@ -23,11 +23,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
/** @defgroup Containers Container Widgets
* These widgets can be used to group other widgets together.
*/
diff --git a/gtk/src/dialog.ccg b/gtk/src/dialog.ccg
index 2e957ac..dc0af8f 100644
--- a/gtk/src/dialog.ccg
+++ b/gtk/src/dialog.ccg
@@ -53,10 +53,12 @@ Dialog::Dialog(const Glib::ustring& title, Gtk::Window& parent, DialogFlags flag
}
_DEPRECATE_IFDEF_START
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Dialog::set_alternative_button_order_from_array(const std::vector<int>& new_order)
{
gtk_dialog_set_alternative_button_order_from_array(gobj(), new_order.size(),
const_cast<int*>(Glib::ArrayHandler<int>::vector_to_array(new_order).data()));
}
+G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
} // namespace Gtk
diff --git a/gtk/src/dialog.hg b/gtk/src/dialog.hg
index 061f019..55cf17f 100644
--- a/gtk/src/dialog.hg
+++ b/gtk/src/dialog.hg
@@ -27,12 +27,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/window_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-//Let us use deprecated GTK+ API in or deprecated gtkmm API.
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index ae0d750..2477156 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -31,13 +31,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)
-#m4begin
-_PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-_POP()
-#m4end
-
namespace Gtk
{
diff --git a/gtk/src/enums.ccg b/gtk/src/enums.ccg
index af2a8a6..fd22b8a 100644
--- a/gtk/src/enums.ccg
+++ b/gtk/src/enums.ccg
@@ -35,45 +35,55 @@ bool IconSize::lookup(IconSize size, int& width, int& height)
}
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
// static
bool IconSize::lookup(IconSize size, int& width, int& height, const Glib::RefPtr<Gtk::Settings>& settings)
{
return gtk_icon_size_lookup_for_settings(Glib::unwrap(settings), (GtkIconSize) int(size), &width, &height);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
// static
IconSize IconSize::register_new(const Glib::ustring& name, int width, int height)
{
const int size = gtk_icon_size_register(name.c_str(), width, height);
return IconSize(size);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
// static
void IconSize::register_alias(const Glib::ustring& alias, IconSize target)
{
gtk_icon_size_register_alias(alias.c_str(), (GtkIconSize) int(target));
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
// static
IconSize IconSize::from_name(const Glib::ustring& name)
{
const int size = gtk_icon_size_from_name(name.c_str());
return IconSize(size);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
// static
Glib::ustring IconSize::get_name(IconSize size)
{
return gtk_icon_size_get_name((GtkIconSize) int(size));
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
float _gtkmm_align_float_from_enum(Align value)
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index 3468a12..0b0974b 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -21,11 +21,6 @@
_DEFS(gtkmm,gtk)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/iconinfo.ccg b/gtk/src/iconinfo.ccg
index a474db8..1ecda87 100644
--- a/gtk/src/iconinfo.ccg
+++ b/gtk/src/iconinfo.ccg
@@ -61,6 +61,7 @@ IconInfo::IconInfo(const Glib::RefPtr<IconTheme>& icon_theme, const Glib::RefPtr
}
_DEPRECATE_IFDEF_START
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
std::vector<Gdk::Point> IconInfo::get_attach_points() const
{
GdkPoint* c_attach_points = 0;
@@ -73,6 +74,7 @@ std::vector<Gdk::Point> IconInfo::get_attach_points() const
}
return std::vector<Gdk::Point> ();
}
+G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
IconInfo::operator const void*() const
diff --git a/gtk/src/iconinfo.hg b/gtk/src/iconinfo.hg
index 27c1db5..9403221 100644
--- a/gtk/src/iconinfo.hg
+++ b/gtk/src/iconinfo.hg
@@ -25,15 +25,8 @@
#include <giomm/asyncresult.h>
#include <giomm/cancellable.h>
-//#include <gtk/gtkicontheme.h>
-
_DEFS(gtkmm,gtk)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/icontheme.hg b/gtk/src/icontheme.hg
index e22cc2c..3c9505d 100644
--- a/gtk/src/icontheme.hg
+++ b/gtk/src/icontheme.hg
@@ -26,11 +26,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/image.ccg b/gtk/src/image.ccg
index 661d4f9..379e5a6 100644
--- a/gtk/src/image.ccg
+++ b/gtk/src/image.ccg
@@ -41,6 +41,7 @@ Image::Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation)
{}
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
{
char* pStockID = 0; // GTK+ iconsistency: although not const, it should not be freed.
@@ -51,9 +52,11 @@ void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
size = IconSize(static_cast<int>(icon_size));
stock_id = Gtk::StockID(pStockID); // the StockID ctor checks for 0
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Image::get_icon_set(Glib::RefPtr<IconSet>& icon_set, IconSize& size) const
{
GtkIconSet* pIconSet = 0;
@@ -64,6 +67,7 @@ void Image::get_icon_set(Glib::RefPtr<IconSet>& icon_set, IconSize& size) const
size = IconSize(static_cast<int>(icon_size));
icon_set = Glib::wrap(pIconSet, true); //true = take_copy.
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif //GTKMM_DISABLE_DEPRECATED
Glib::ustring Image::get_icon_name() const
diff --git a/gtk/src/image.hg b/gtk/src/image.hg
index 6062abe..388ff39 100644
--- a/gtk/src/image.hg
+++ b/gtk/src/image.hg
@@ -24,11 +24,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/misc_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/menu.ccg b/gtk/src/menu.ccg
index fb4c5f3..cee9fc5 100644
--- a/gtk/src/menu.ccg
+++ b/gtk/src/menu.ccg
@@ -111,10 +111,12 @@ void Menu::unset_accel_group()
}
_DEPRECATE_IFDEF_START
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Menu::unset_title()
{
gtk_menu_set_title(gobj(), 0);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
void Menu::attach_to_widget(Widget& attach_widget)
diff --git a/gtk/src/menu.hg b/gtk/src/menu.hg
index 4ff031c..9c7093d 100644
--- a/gtk/src/menu.hg
+++ b/gtk/src/menu.hg
@@ -18,15 +18,9 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/menushell_p.h)
-//#include <gtk/gtkmenu.h>
#include <gtkmm/menushell.h>
#include <gtkmm/menuitem.h>
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/menuitem.hg b/gtk/src/menuitem.hg
index ccf04d3..0699cfb 100644
--- a/gtk/src/menuitem.hg
+++ b/gtk/src/menuitem.hg
@@ -25,11 +25,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/messagedialog.hg b/gtk/src/messagedialog.hg
index 0a39de4..a748e97 100644
--- a/gtk/src/messagedialog.hg
+++ b/gtk/src/messagedialog.hg
@@ -22,11 +22,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/dialog_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index b535f31..1bd13f5 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -25,11 +25,6 @@ _DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
#m4 _CONVERSION(guint,PositionType,`$2($3)')
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/scrollbar.hg b/gtk/src/scrollbar.hg
index a2b11d9..1b6789b 100644
--- a/gtk/src/scrollbar.hg
+++ b/gtk/src/scrollbar.hg
@@ -22,11 +22,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/range_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/stylecontext.ccg b/gtk/src/stylecontext.ccg
index 8c60242..24043a6 100644
--- a/gtk/src/stylecontext.ccg
+++ b/gtk/src/stylecontext.ccg
@@ -31,6 +31,7 @@ Gdk::RGBA StyleContext::get_color(StateFlags state) const
}
_DEPRECATE_IFDEF_START
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Gdk::RGBA StyleContext::get_background_color(StateFlags state) const
{
GdkRGBA crgba;
@@ -44,6 +45,7 @@ Gdk::RGBA StyleContext::get_border_color(StateFlags state) const
gtk_style_context_get_border_color(const_cast<GtkStyleContext*>(gobj()), ((GtkStateFlags)(state)), &crgba);
return Gdk::RGBA(&crgba, true);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
Pango::FontDescription StyleContext::get_font(StateFlags state) const
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 94afeb0..7a33541 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -19,11 +19,6 @@ _DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
_PINCLUDE(gtk/gtk.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
#include <gtkmm/styleprovider.h>
#include <gtkmm/border.h>
#include <gtkmm/enums.h>
diff --git a/gtk/src/toolbutton.hg b/gtk/src/toolbutton.hg
index 581ff43..2e651a1 100644
--- a/gtk/src/toolbutton.hg
+++ b/gtk/src/toolbutton.hg
@@ -20,11 +20,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/toolitem_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/tooltip.hg b/gtk/src/tooltip.hg
index dc231df..ee14371 100644
--- a/gtk/src/tooltip.hg
+++ b/gtk/src/tooltip.hg
@@ -24,11 +24,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index c9a406d..3a562e9 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -34,11 +34,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
#include <cstdlib>
using std::strtod;
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 765e12f..e86f8b1 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -446,10 +446,12 @@ void Widget::unset_name()
}
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Widget::unset_composite_name()
{
gtk_widget_set_composite_name(gobj(), 0);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GTKMM_DISABLE_DEPRECATED
void Widget::realize_if_needed()
@@ -696,22 +698,27 @@ Glib::ustring Widget::drag_dest_find_target(const Glib::RefPtr<Gdk::DragContext>
}
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Widget::draw_insertion_cursor(const Cairo::RefPtr<Cairo::Context>& cr, const Gdk::Rectangle& location,
bool is_primary, TextDirection direction, bool draw_arrow)
{
gtk_draw_insertion_cursor(gobj(), cr->cobj(), const_cast<GdkRectangle*>(location.gobj()), is_primary,
(GtkTextDirection)direction, draw_arrow);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Requisition Widget::get_requisition() const
{
Requisition result = {0, 0};
gtk_widget_get_requisition(const_cast<GtkWidget*>(gobj()), &result);
return result;
}
+G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GTKMM_DISABLE_DEPRECATED
_DEPRECATE_IFDEF_START
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Widget::unset_color(StateFlags state)
{
gtk_widget_override_color(gobj(), ((GtkStateFlags)(state)), 0);
@@ -736,6 +743,7 @@ void Widget::unset_cursor()
{
gtk_widget_override_cursor(gobj(), 0, 0);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
_DEPRECATE_IFDEF_END
void Widget::transform_cairo_context_to_window(const Cairo::RefPtr<Cairo::Context>& cr, const
Glib::RefPtr<const Gdk::Window>& window)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 850937f..ee56ee3 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -47,11 +47,6 @@ _CONFIGINCLUDE(gtkmmconfig.h)
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/object_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C"
diff --git a/gtk/src/widgetpath.hg b/gtk/src/widgetpath.hg
index 063eae2..ac54d19 100644
--- a/gtk/src/widgetpath.hg
+++ b/gtk/src/widgetpath.hg
@@ -21,11 +21,6 @@
_DEFS(gtkmm,gtk)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-#undef GTK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 2539e39..519e331 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -26,12 +26,6 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
-#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
-//So we can use deprecated GTK+ API in our deprecated C++ API:
-#undef GDK_DISABLE_DEPRECATED
-#define GDK_DISABLE_DEPRECATION_WARNINGS 1
-#m4 _POP()
-
namespace Gtk
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]