[gtkmm] Deprecate Gtk::Misc (almost) and Gtk::NumerableIcon



commit 5132f9f8f953223b572626102b559b512cf23825
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Wed May 21 16:43:33 2014 +0200

    Deprecate Gtk::Misc (almost) and Gtk::NumerableIcon
    
    * gtk/src/filelist.am: Move numerableicon.hg to gtkmm_files_deprecated_hg.
    * gtk/src/misc.hg: Deprecate, but only with comments. Can't be really
    deprecated yet, because Misc is a base class of Label and Image.
    * gtk/src/numerableicon.hg: Deprecate.

 gtk/src/filelist.am      |    2 +-
 gtk/src/misc.hg          |   12 ++++++++++++
 gtk/src/numerableicon.hg |   10 +++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index ce9e361..a66e38f 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -111,7 +111,6 @@ gtkmm_files_any_hg =                \
        messagedialog.hg        \
        misc.hg                 \
        notebook.hg             \
-       numerableicon.hg        \
        offscreenwindow.hg      \
        orientable.hg           \
        pagesetup.hg            \
@@ -224,6 +223,7 @@ gtkmm_files_deprecated_hg = \
        iconset.hg              \
        iconsource.hg           \
        imagemenuitem.hg        \
+       numerableicon.hg        \
        stockitem.hg            \
        table.hg                \
        tearoffmenuitem.hg
diff --git a/gtk/src/misc.hg b/gtk/src/misc.hg
index 8633589..777e0df 100644
--- a/gtk/src/misc.hg
+++ b/gtk/src/misc.hg
@@ -20,6 +20,14 @@
 _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()
+
+//TODO: Do this when we can stop using this as a base class elsewhere, when we break ABI:
+//_IS_DEPRECATED // This whole file is deprecated.
+
 namespace Gtk
 {
 
@@ -32,6 +40,10 @@ namespace Gtk
  * Without a window, widgets of this type cannot capture events.
  * To capture events place in Gtk::EventBox.
  *
+ * @deprecated The desired effect can in most cases be achieved by using the
+ * Gtk::Widget::property_halign(), Gtk::Widget::property_valign() and
+ * Gtk::Widget::property_margin() properties on the child widget.
+ * Gtk::Misc should not be used in new code.
  */
 class Misc : public Widget
 {
diff --git a/gtk/src/numerableicon.hg b/gtk/src/numerableicon.hg
index 327e327..5e6e083 100644
--- a/gtk/src/numerableicon.hg
+++ b/gtk/src/numerableicon.hg
@@ -23,17 +23,25 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 _DEFS(gtkmm,gtk)
 _PINCLUDE(giomm/private/emblemedicon_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GTK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
+_IS_DEPRECATED // This whole file is deprecated.
+
 namespace Gtk
 {
 
 /** A Gio::Icon that allows numbered emblems.
  *
- * GtkNumerableIcon is a subclass of EmblemedIcon that can show a number or short string as an emblem.
+ * Gtk::NumerableIcon is a subclass of Gio::EmblemedIcon that can show a number or short string as an emblem.
  * The number can be overlayed on top of another emblem, if desired.
  *
  * It supports theming by taking font and color information from a provided StyleContext. See 
set_style_context().
  *
  * @newin{3,0}
+ * @deprecated No replacement available.
  */
 class NumerableIcon : public Gio::EmblemedIcon
 {


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