From 44d61e68575518d7f57d6c89c93f5b0f29bec5dd Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Sun, 13 Mar 2011 14:29:13 +0100 Subject: [PATCH] Remove use of G_CONST_RETURN macro. This is going to be deprecated. https://bugzilla.gnome.org/show_bug.cgi?id=644632 --- src/st/st-entry.c | 5 ++--- src/st/st-entry.h | 4 ++-- src/st/st-label.c | 2 +- src/st/st-label.h | 10 +++++----- src/st/st-tooltip.c | 4 ++-- src/st/st-tooltip.h | 12 ++++++------ src/st/st-widget.h | 6 +++--- 7 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/st/st-entry.c b/src/st/st-entry.c index ef25ab3a4..d70475d9d 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -735,7 +735,7 @@ st_entry_new (const gchar *text) * * Returns: the text for the entry. This must not be freed by the application */ -G_CONST_RETURN gchar * +const gchar * st_entry_get_text (StEntry *entry) { g_return_val_if_fail (ST_IS_ENTRY (entry), NULL); @@ -843,8 +843,7 @@ st_entry_set_hint_text (StEntry *entry, * Returns: the current value of the hint property. This string is owned by the * #StEntry and should not be freed or modified. */ -G_CONST_RETURN -gchar * +const gchar * st_entry_get_hint_text (StEntry *entry) { g_return_val_if_fail (ST_IS_ENTRY (entry), NULL); diff --git a/src/st/st-entry.h b/src/st/st-entry.h index 947705437..7febbb5ec 100644 --- a/src/st/st-entry.h +++ b/src/st/st-entry.h @@ -65,14 +65,14 @@ struct _StEntryClass GType st_entry_get_type (void) G_GNUC_CONST; StWidget * st_entry_new (const gchar *text); -G_CONST_RETURN gchar *st_entry_get_text (StEntry *entry); +const gchar * st_entry_get_text (StEntry *entry); void st_entry_set_text (StEntry *entry, const gchar *text); ClutterActor* st_entry_get_clutter_text (StEntry *entry); void st_entry_set_hint_text (StEntry *entry, const gchar *text); -G_CONST_RETURN gchar *st_entry_get_hint_text (StEntry *entry); +const gchar * st_entry_get_hint_text (StEntry *entry); void st_entry_set_primary_icon (StEntry *entry, ClutterActor *icon); diff --git a/src/st/st-label.c b/src/st/st-label.c index 124928e80..53fd844b3 100644 --- a/src/st/st-label.c +++ b/src/st/st-label.c @@ -355,7 +355,7 @@ st_label_new (const gchar *text) * * Returns: the text for the label. This must not be freed by the application */ -G_CONST_RETURN gchar * +const gchar * st_label_get_text (StLabel *label) { g_return_val_if_fail (ST_IS_LABEL (label), NULL); diff --git a/src/st/st-label.h b/src/st/st-label.h index abe32d9d8..65164ce29 100644 --- a/src/st/st-label.h +++ b/src/st/st-label.h @@ -60,11 +60,11 @@ struct _StLabelClass GType st_label_get_type (void) G_GNUC_CONST; -StWidget * st_label_new (const gchar *text); -G_CONST_RETURN gchar *st_label_get_text (StLabel *label); -void st_label_set_text (StLabel *label, - const gchar *text); -ClutterActor * st_label_get_clutter_text (StLabel *label); +StWidget * st_label_new (const gchar *text); +const gchar * st_label_get_text (StLabel *label); +void st_label_set_text (StLabel *label, + const gchar *text); +ClutterActor * st_label_get_clutter_text (StLabel *label); G_END_DECLS diff --git a/src/st/st-tooltip.c b/src/st/st-tooltip.c index c452e18c7..09e7aa765 100644 --- a/src/st/st-tooltip.c +++ b/src/st/st-tooltip.c @@ -377,7 +377,7 @@ st_tooltip_update_position (StTooltip *tooltip) * * Returns: the text for the tooltip. This must not be freed by the application */ -G_CONST_RETURN gchar * +const gchar * st_tooltip_get_label (StTooltip *tooltip) { g_return_val_if_fail (ST_IS_TOOLTIP (tooltip), NULL); @@ -489,7 +489,7 @@ st_tooltip_set_tip_area (StTooltip *tooltip, * Returns: the #ClutterGeometry, owned by the tooltip which must not be freed * by the application. */ -G_CONST_RETURN ClutterGeometry* +const ClutterGeometry* st_tooltip_get_tip_area (StTooltip *tooltip) { g_return_val_if_fail (ST_IS_TOOLTIP (tooltip), NULL); diff --git a/src/st/st-tooltip.h b/src/st/st-tooltip.h index 123f6c16d..5f6f02a6e 100644 --- a/src/st/st-tooltip.h +++ b/src/st/st-tooltip.h @@ -60,13 +60,13 @@ struct _StTooltipClass GType st_tooltip_get_type (void) G_GNUC_CONST; -G_CONST_RETURN gchar *st_tooltip_get_label (StTooltip *tooltip); -void st_tooltip_set_label (StTooltip *tooltip, - const gchar *text); +const gchar * st_tooltip_get_label (StTooltip *tooltip); +void st_tooltip_set_label (StTooltip *tooltip, + const gchar *text); -void st_tooltip_set_tip_area (StTooltip *tooltip, - const ClutterGeometry *area); -G_CONST_RETURN ClutterGeometry* st_tooltip_get_tip_area (StTooltip *tooltip); +void st_tooltip_set_tip_area (StTooltip *tooltip, + const ClutterGeometry *area); +const ClutterGeometry* st_tooltip_get_tip_area (StTooltip *tooltip); G_END_DECLS diff --git a/src/st/st-widget.h b/src/st/st-widget.h index 81c9928e1..7f5efec7a 100644 --- a/src/st/st-widget.h +++ b/src/st/st-widget.h @@ -96,7 +96,7 @@ void st_widget_add_style_pseudo_class (StWidget *acto const gchar *pseudo_class); void st_widget_remove_style_pseudo_class (StWidget *actor, const gchar *pseudo_class); -G_CONST_RETURN gchar *st_widget_get_style_pseudo_class (StWidget *actor); +const gchar * st_widget_get_style_pseudo_class (StWidget *actor); gboolean st_widget_has_style_pseudo_class (StWidget *actor, const gchar *pseudo_class); @@ -106,13 +106,13 @@ void st_widget_add_style_class_name (StWidget *acto const gchar *style_class); void st_widget_remove_style_class_name (StWidget *actor, const gchar *style_class); -G_CONST_RETURN gchar *st_widget_get_style_class_name (StWidget *actor); +const gchar * st_widget_get_style_class_name (StWidget *actor); gboolean st_widget_has_style_class_name (StWidget *actor, const gchar *style_class); void st_widget_set_style (StWidget *actor, const gchar *style); -G_CONST_RETURN gchar *st_widget_get_style (StWidget *actor); +const gchar * st_widget_get_style (StWidget *actor); void st_widget_set_theme (StWidget *actor, StTheme *theme); StTheme * st_widget_get_theme (StWidget *actor);