[gtkmm] Deprecate some API that is deprecated in the C API.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Deprecate some API that is deprecated in the C API.
- Date: Tue, 2 Jul 2013 17:48:57 +0000 (UTC)
commit 87091ec023887761430a1e6e2e406ef48a290e0b
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Tue Jul 2 19:25:47 2013 +0200
Deprecate some API that is deprecated in the C API.
* gtk/src/cellrenderer.hg: Deprecate property_cell_background_gdk().
* gtk/src/cellview.hg: Deprecate property_background_gdk().
* gtk/src/colorbutton.hg: Deprecate get_alpha(). Add some TODOs.
* gtk/src/scrolledwindow.hg: Deprecate property_window_placement_set().
* gtk/src/settings.hg: Deprecate ignored settings.
* gtk/src/widget.[hg|ccg]: Deprecate [un]set_composite_name(),
[push|pop]_composite_child(), get_requisition() and methods that take a
StockID parameter.
* gtk/src/window.hg: Deprecate reshow_with_initial_size().
ChangeLog | 14 ++++++++++++
gtk/src/cellrenderer.hg | 2 +-
gtk/src/cellview.hg | 2 +-
gtk/src/colorbutton.hg | 14 ++++++++++-
gtk/src/scrolledwindow.hg | 2 +-
gtk/src/settings.hg | 52 ++++++++++++++++++++++----------------------
gtk/src/widget.ccg | 5 +++-
gtk/src/widget.hg | 21 ++++++++++++------
gtk/src/window.hg | 3 +-
9 files changed, 74 insertions(+), 41 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ff822c4..5086dfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2013-07-02 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
+ Deprecate some API that is deprecated in the C API.
+
+ * gtk/src/cellrenderer.hg: Deprecate property_cell_background_gdk().
+ * gtk/src/cellview.hg: Deprecate property_background_gdk().
+ * gtk/src/colorbutton.hg: Deprecate get_alpha(). Add some TODOs.
+ * gtk/src/scrolledwindow.hg: Deprecate property_window_placement_set().
+ * gtk/src/settings.hg: Deprecate ignored settings.
+ * gtk/src/widget.[hg|ccg]: Deprecate [un]set_composite_name(),
+ [push|pop]_composite_child(), get_requisition() and methods that take a
+ StockID parameter.
+ * gtk/src/window.hg: Deprecate reshow_with_initial_size().
+
2013-06-10 José Alburquerque <jaalburquerque gmail com>
Gen Scripts: Minor clean up of the description of the scripts.
diff --git a/gtk/src/cellrenderer.hg b/gtk/src/cellrenderer.hg
index e004328..91e5ef3 100644
--- a/gtk/src/cellrenderer.hg
+++ b/gtk/src/cellrenderer.hg
@@ -140,7 +140,7 @@ public:
_WRAP_PROPERTY("is-expander", bool)
_WRAP_PROPERTY("is-expanded", bool)
_WRAP_PROPERTY("cell-background", Glib::ustring)
- _WRAP_PROPERTY("cell-background-gdk", Gdk::Color)
+ _WRAP_PROPERTY("cell-background-gdk", Gdk::Color, deprecated "Use property_cell_background_rgba()
instead.")
_WRAP_PROPERTY("cell-background-rgba", Gdk::RGBA)
_WRAP_PROPERTY("cell-background-set", bool)
_WRAP_PROPERTY("editing", bool)
diff --git a/gtk/src/cellview.hg b/gtk/src/cellview.hg
index d3d739a..a82b406 100644
--- a/gtk/src/cellview.hg
+++ b/gtk/src/cellview.hg
@@ -105,7 +105,7 @@ public:
_IGNORE(gtk_cell_view_get_cell_renderers) //deprecated
_WRAP_PROPERTY("background", Glib::ustring)
- _WRAP_PROPERTY("background-gdk", Gdk::Color) //TODO: Deprecate this.
+ _WRAP_PROPERTY("background-gdk", Gdk::Color, deprecated "Use property_background_rgba() instead.")
_WRAP_PROPERTY("background-rgba", Gdk::RGBA)
_WRAP_PROPERTY("background-set", bool)
_WRAP_PROPERTY("model", Glib::RefPtr<TreeModel>)
diff --git a/gtk/src/colorbutton.hg b/gtk/src/colorbutton.hg
index cc5f935..f2117da 100644
--- a/gtk/src/colorbutton.hg
+++ b/gtk/src/colorbutton.hg
@@ -44,8 +44,10 @@ namespace Gtk
* @ingroup Widgets
*/
class ColorButton : public Button
+ //TODO: When we can break ABI: public ColorChooser
{
_CLASS_GTKOBJECT(ColorButton, GtkColorButton, GTK_COLOR_BUTTON, Gtk::Button, GtkButton)
+ //TODO: When we can break ABI: _IMPLEMENTS_INTERFACE(ColorChooser)
public:
/** Creates a new color button.
@@ -87,12 +89,16 @@ public:
*/
_WRAP_CTOR(ColorButton(const Gdk::RGBA& rgba), gtk_color_button_new_with_rgba)
+ //TODO: When we can implement interface ColorChooser: deprecated "Use Gtk::ColorChooser::set_rgba()
instead."
_WRAP_METHOD(void set_color(const Gdk::Color& color), gtk_color_button_set_color, deprecated "Use
set_rgba() instead.")
+ //TODO: When we can implement interface ColorChooser: deprecated "Use Gtk::ColorChooser::set_rgba()
instead."
_WRAP_METHOD(void set_alpha(guint16 alpha), gtk_color_button_set_alpha, deprecated "Use set_rgba()
instead.")
+ //TODO: When we can implement interface ColorChooser: deprecated "Use Gtk::ColorChooser::set_rgba()
instead."
_WRAP_METHOD(void set_rgba(const Gdk::RGBA& rgba), gtk_color_button_set_rgba)
#ifndef GTKMM_DISABLE_DEPRECATED
+ //TODO: When we can implement interface ColorChooser: deprecated Use Gtk::ColorChooser::get_rgba() instead.
/** Returns a copy of the the current color.
*
* Changes to the return value will have no effect on the Gtk::ColorButton.
@@ -107,6 +113,7 @@ public:
#endif //GTKMM_DISABLE_DEPRECATED
+ //TODO: When we can implement interface ColorChooser: deprecated Use Gtk::ColorChooser::get_rgba() instead.
/** Returns a copy of the the current color.
*
* Changes to the return value will have no effect on the Gtk::ColorButton.
@@ -118,8 +125,11 @@ public:
Gdk::RGBA get_rgba() const;
_IGNORE(gtk_color_button_get_rgba)
- _WRAP_METHOD(guint16 get_alpha() const, gtk_color_button_get_alpha)
+ //TODO: When we can implement interface ColorChooser: deprecated "Use Gtk::ColorChooser::get_rgba()
instead."
+ _WRAP_METHOD(guint16 get_alpha() const, gtk_color_button_get_alpha, deprecated "Use get_rgba() instead.")
+ //TODO: When we can implement interface ColorChooser: deprecated "Use Gtk::ColorChooser::set_use_alpha()
instead."
_WRAP_METHOD(void set_use_alpha(bool use_alpha = true), gtk_color_button_set_use_alpha)
+ //TODO: When we can implement interface ColorChooser: deprecated "Use Gtk::ColorChooser::get_use_alpha()
instead."
_WRAP_METHOD(bool get_use_alpha() const, gtk_color_button_get_use_alpha)
_WRAP_METHOD(void set_title(const Glib::ustring& title), gtk_color_button_set_title)
_WRAP_METHOD(Glib::ustring get_title() const, gtk_color_button_get_title)
@@ -128,7 +138,7 @@ public:
_WRAP_PROPERTY("title", Glib::ustring)
_WRAP_PROPERTY("color", Gdk::Color, deprecated "Use property_rgba() instead.)
_WRAP_PROPERTY("rgba", Gdk::RGBA)
- _WRAP_PROPERTY("alpha", guint16) //Todo: Remove thsi when we remove the "color" property too.
+ _WRAP_PROPERTY("alpha", guint16) //Todo: Remove this when we remove the "color" property too.
_WRAP_SIGNAL(void color_set(), "color-set")
};
diff --git a/gtk/src/scrolledwindow.hg b/gtk/src/scrolledwindow.hg
index a998477..10fa2f1 100644
--- a/gtk/src/scrolledwindow.hg
+++ b/gtk/src/scrolledwindow.hg
@@ -127,7 +127,7 @@ public:
_WRAP_PROPERTY("hscrollbar-policy", PolicyType)
_WRAP_PROPERTY("vscrollbar-policy", PolicyType)
_WRAP_PROPERTY("window-placement", CornerType)
- _WRAP_PROPERTY("window-placement-set", bool)
+ _WRAP_PROPERTY("window-placement-set", bool, deprecated "This value is ignored and the
property_window_placement() value is always honored.")
_WRAP_PROPERTY("shadow-type", ShadowType)
_WRAP_PROPERTY("min-content-width", int)
_WRAP_PROPERTY("min-content-height", int)
diff --git a/gtk/src/settings.hg b/gtk/src/settings.hg
index 9db7ad1..336561a 100644
--- a/gtk/src/settings.hg
+++ b/gtk/src/settings.hg
@@ -48,13 +48,13 @@ public:
_WRAP_PROPERTY("gtk-double-click-time", int)
_WRAP_PROPERTY("gtk-double-click-distance", int)
- _WRAP_PROPERTY("gtk-cursor-blink", bool)
- _WRAP_PROPERTY("gtk-cursor-blink-time", int)
- _WRAP_PROPERTY("gtk-cursor-blink-timeout", int) //since 3.4
+ _WRAP_PROPERTY("gtk-cursor-blink", bool, deprecated "This setting is ignored.")
+ _WRAP_PROPERTY("gtk-cursor-blink-time", int, deprecated "This setting is ignored.")
+ _WRAP_PROPERTY("gtk-cursor-blink-timeout", int, deprecated "This setting is ignored.") //since 3.4
_WRAP_PROPERTY("gtk-split-cursor", bool)
_WRAP_PROPERTY("gtk-theme-name", Glib::ustring)
_WRAP_PROPERTY("gtk-key-theme-name", Glib::ustring)
- _WRAP_PROPERTY("gtk-menu-bar-accel", Glib::ustring)
+ _WRAP_PROPERTY("gtk-menu-bar-accel", Glib::ustring, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-dnd-drag-threshold", int)
_WRAP_PROPERTY("gtk-font-name", Glib::ustring)
_WRAP_PROPERTY("gtk-modules", Glib::ustring)
@@ -69,25 +69,25 @@ public:
//#endif
_WRAP_PROPERTY("gtk-alternative-button-order", bool)
_WRAP_PROPERTY("gtk-alternative-sort-arrows", bool)
- _WRAP_PROPERTY("gtk-show-input-method-menu", bool)
- _WRAP_PROPERTY("gtk-show-unicode-menu", bool)
+ _WRAP_PROPERTY("gtk-show-input-method-menu", bool, deprecated "This setting is ignored.")
+ _WRAP_PROPERTY("gtk-show-unicode-menu", bool, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-timeout-initial", int)
_WRAP_PROPERTY("gtk-timeout-repeat", int)
_WRAP_PROPERTY("gtk-timeout-expand", int)
- _WRAP_PROPERTY("gtk-color-scheme", Glib::ustring)
+ _WRAP_PROPERTY("gtk-color-scheme", Glib::ustring, deprecated "Color scheme support was dropped. This
setting is now ignored.")
_WRAP_PROPERTY("gtk-enable-animations", bool)
_WRAP_PROPERTY("gtk-touchscreen-mode", bool, deprecated "Generally the behavior for touchscreen input
should be performed dynamically based on gdk_event_get_source_device().")
_WRAP_PROPERTY("gtk-tooltip-timeout", int)
_WRAP_PROPERTY("gtk-tooltip-browse-timeout", int)
_WRAP_PROPERTY("gtk-tooltip-browse-mode-timeout", int)
- _WRAP_PROPERTY("gtk-keynav-cursor-only", bool)
- _WRAP_PROPERTY("gtk-keynav-wrap-around", bool)
+ _WRAP_PROPERTY("gtk-keynav-cursor-only", bool, deprecated "Generally the behavior for touchscreen input
should be performed dynamically based on gdk_event_get_source_device().")
+ _WRAP_PROPERTY("gtk-keynav-wrap-around", bool, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-error-bell", bool)
- _WRAP_PROPERTY("color-hash", Gdk::Color) //This is really a hash table.
- _WRAP_PROPERTY("gtk-file-chooser-backend", Glib::ustring)
+ _WRAP_PROPERTY("color-hash", Gdk::Color, deprecated "Will always return an empty hash table.") //This is
really a hash table.
+ _WRAP_PROPERTY("gtk-file-chooser-backend", Glib::ustring, deprecated "This setting is ignored.
Gtk::FileChooser uses GIO by default.")
_WRAP_PROPERTY("gtk-print-backends", Glib::ustring)
_WRAP_PROPERTY("gtk-print-preview-command", Glib::ustring)
- _WRAP_PROPERTY("gtk-enable-mnemonics", bool)
+ _WRAP_PROPERTY("gtk-enable-mnemonics", bool, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-enable-accels", bool)
_WRAP_PROPERTY("gtk-recent-files-limit", int)
_WRAP_PROPERTY("gtk-im-module", Glib::ustring)
@@ -96,39 +96,39 @@ public:
_WRAP_PROPERTY("gtk-sound-theme-name", Glib::ustring)
_WRAP_PROPERTY("gtk-enable-input-feedback-sounds", bool)
_WRAP_PROPERTY("gtk-enable-event-sounds", bool)
- _WRAP_PROPERTY("gtk-enable-tooltips", bool)
+ _WRAP_PROPERTY("gtk-enable-tooltips", bool, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-application-prefer-dark-theme", bool) // since 2.22
- _WRAP_PROPERTY("gtk-auto-mnemonics", bool) // since 2.20
+ _WRAP_PROPERTY("gtk-auto-mnemonics", bool, deprecated "This setting is ignored.") // since 2.20
_WRAP_PROPERTY("gtk-visible-focus", Gtk::PolicyType) // since 3.2
- _WRAP_PROPERTY("gtk-im-preedit-style", IMPreeditStyle) //since 3.4
- _WRAP_PROPERTY("gtk-im-status-style", IMStatusStyle) //since 3.4
+ _WRAP_PROPERTY("gtk-im-preedit-style", IMPreeditStyle, deprecated "This setting is ignored.") //since 3.4
+ _WRAP_PROPERTY("gtk-im-status-style", IMStatusStyle, deprecated "This setting is ignored.") //since 3.4
_WRAP_PROPERTY("gtk-shell-shows-app-menu", bool) //since 3.4
_WRAP_PROPERTY("gtk-shell-shows-menubar", bool) //since 3.4
_WRAP_PROPERTY("gtk-enable-primary-paste", bool) //since 3.6
- _WRAP_PROPERTY("gtk-menu-popup-delay", int) //since 3.4
- _WRAP_PROPERTY("gtk-menu-popdown-delay", int) //since 3.4
+ _WRAP_PROPERTY("gtk-menu-popup-delay", int, deprecated "This setting is ignored.") //since 3.4
+ _WRAP_PROPERTY("gtk-menu-popdown-delay", int, deprecated "This setting is ignored.") //since 3.4
_WRAP_PROPERTY("gtk-label-select-on-focus", bool) //since 3.4
_WRAP_PROPERTY("gtk-entry-password-hint-timeout", guint) //since 3.4
- _WRAP_PROPERTY("gtk-menu-images", bool) //since 3.4
- _WRAP_PROPERTY("gtk-menu-bar-popup-delay", int) //since 3.4
- _WRAP_PROPERTY("gtk-scrolled-window-placement", GtkCornerType) //since 3.4
+ _WRAP_PROPERTY("gtk-menu-images", bool, deprecated "This setting is ignored.") //since 3.4
+ _WRAP_PROPERTY("gtk-menu-bar-popup-delay", int, deprecated "This setting is ignored.") //since 3.4
+ _WRAP_PROPERTY("gtk-scrolled-window-placement", GtkCornerType, deprecated "This setting is ignored.")
//since 3.4
//TODO: Add others added since?
_WRAP_PROPERTY("gtk-toolbar-style", ToolbarStyle)
_WRAP_PROPERTY("gtk-toolbar-icon-size", IconSize)
- _WRAP_PROPERTY("gtk-can-change-accels", bool)
+ _WRAP_PROPERTY("gtk-can-change-accels", bool, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-entry-select-on-focus", bool)
- _WRAP_PROPERTY("gtk-color-palette", Glib::ustring)
+ _WRAP_PROPERTY("gtk-color-palette", Glib::ustring, deprecated "Only used by the deprecated color selector
widget.")
- _WRAP_PROPERTY("gtk-button-images", bool)
+ _WRAP_PROPERTY("gtk-button-images", bool, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-icon-theme-name", Glib::ustring)
- _WRAP_PROPERTY("gtk-fallback-icon-theme", Glib::ustring)
- _WRAP_PROPERTY("gtk-icon-sizes", Glib::ustring)
+ _WRAP_PROPERTY("gtk-fallback-icon-theme", Glib::ustring, deprecated "This setting is ignored.")
+ _WRAP_PROPERTY("gtk-icon-sizes", Glib::ustring, deprecated "This setting is ignored.")
_WRAP_PROPERTY("gtk-recent-files-enabled", bool)
_WRAP_PROPERTY("gtk-primary-button-warps-slider", bool)
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 6299779..0a39e9e 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -427,10 +427,12 @@ void Widget::unset_name()
gtk_widget_set_name(gobj(), 0);
}
+#ifndef GTKMM_DISABLE_DEPRECATED
void Widget::unset_composite_name()
{
gtk_widget_set_composite_name(gobj(), 0);
}
+#endif // GTKMM_DISABLE_DEPRECATED
void Widget::realize_if_needed()
{
@@ -674,13 +676,14 @@ void Widget::draw_insertion_cursor(const Cairo::RefPtr<Cairo::Context>& cr, cons
}
#endif // GTKMM_DISABLE_DEPRECATED
+#ifndef GTKMM_DISABLE_DEPRECATED
Requisition Widget::get_requisition() const
{
Requisition result = {0, 0};
gtk_widget_get_requisition(const_cast<GtkWidget*>(gobj()), &result);
return result;
}
-
+#endif // GTKMM_DISABLE_DEPRECATED
//Implemented manually so we can reorder the parameters, to have a default value:
void Widget::override_color(const Gdk::RGBA& color, StateFlags state)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 1fb2d16..db7cd0d 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -429,14 +429,18 @@ public:
_WRAP_METHOD(Glib::RefPtr<Pango::Layout> create_pango_layout(const Glib::ustring& text),
gtk_widget_create_pango_layout)
_IGNORE(gtk_widget_render_icon) //deprecated.
- _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> render_icon_pixbuf(const StockID& stock_id, IconSize size),
gtk_widget_render_icon_pixbuf)
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> render_icon_pixbuf(const StockID& stock_id, IconSize size),
gtk_widget_render_icon_pixbuf, deprecated "Use IconTheme::load_icon() instead.")
- _WRAP_METHOD(void set_composite_name(const Glib::ustring& name), gtk_widget_set_composite_name)
+ _WRAP_METHOD(void set_composite_name(const Glib::ustring& name), gtk_widget_set_composite_name, deprecated
"Use gtk_widget_class_set_template(), or don't use this API at all.")
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use gtk_widget_class_set_template(), or don't use this API at all.
+ */
void unset_composite_name();
- _WRAP_METHOD(Glib::ustring get_composite_name() const, gtk_widget_get_composite_name)
+#endif // GTKMM_DISABLE_DEPRECATED
+ _WRAP_METHOD(Glib::ustring get_composite_name() const, gtk_widget_get_composite_name, deprecated "Use
gtk_widget_class_set_template(), or don't use this API at all.")
- _WRAP_METHOD(static void push_composite_child(), gtk_widget_push_composite_child)
- _WRAP_METHOD(static void pop_composite_child(), gtk_widget_pop_composite_child)
+ _WRAP_METHOD(static void push_composite_child(), gtk_widget_push_composite_child, deprecated "This API
never really worked well and was mostly unused, now we have a more complete mechanism for composite children,
see gtk_widget_class_set_template().")
+ _WRAP_METHOD(static void pop_composite_child(), gtk_widget_pop_composite_child, deprecated "Use
gtk_widget_class_set_template(), or don't use this API at all.")
/* Directionality of Text */
@@ -489,7 +493,7 @@ public:
_WRAP_METHOD(void drag_source_unset(), gtk_drag_source_unset)
_WRAP_METHOD(void drag_source_set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf),
gtk_drag_source_set_icon_pixbuf)
- _WRAP_METHOD(void drag_source_set_icon(const StockID& stock_id), gtk_drag_source_set_icon_stock)
+ _WRAP_METHOD(void drag_source_set_icon(const StockID& stock_id), gtk_drag_source_set_icon_stock,
deprecated "Use the drag_source_set_icon() that takes a Glib::ustring instead.")
_WRAP_METHOD(void drag_source_set_icon(const Glib::ustring& icon_name), gtk_drag_source_set_icon_name)
_WRAP_METHOD(void drag_source_add_text_targets(), gtk_drag_source_add_text_targets)
@@ -824,6 +828,7 @@ protected:
void transform_cairo_context_to_window(const ::Cairo::RefPtr< ::Cairo::Context>& cr, const
Glib::RefPtr<const Gdk::Window>& window);
_IGNORE(gtk_cairo_transform_to_window)
+#ifndef GTKMM_DISABLE_DEPRECATED
/** Retrieves the widget's requisition.
*
* This method should only be used by widget implementations in
@@ -835,10 +840,12 @@ protected:
*
* @result The widget's requisition.
*
- * @@newin{2,20}
+ * @newin{2,20}
+ * @deprecated Use get_preferred_size() instead.
*/
Requisition get_requisition() const;
_IGNORE(gtk_widget_get_requisition)
+#endif // GTKMM_DISABLE_DEPRECATED
_IGNORE(gtk_widget_style_attach) //deprecated
_IGNORE(gtk_widget_get_child_requisition) //deprecated.
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index a2634af..e0873c5 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -395,8 +395,7 @@ dnl
_WRAP_METHOD(WindowType get_window_type() const, gtk_window_get_window_type)
- _WRAP_METHOD(void reshow_with_initial_size(),
- gtk_window_reshow_with_initial_size)
+ _WRAP_METHOD(void reshow_with_initial_size(), gtk_window_reshow_with_initial_size, deprecated "GUI
builders can call Widget::hide(), Widget::unrealize() and then Widget::show() themselves, if they still need
this functionality.")
_WRAP_METHOD(Glib::RefPtr<Application> get_application(), gtk_window_get_application, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Application> get_application() const, gtk_window_get_application,
refreturn)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]