Don't use newly deprecated glib symbols

This commit is contained in:
Yevgen Muntyan 2011-12-05 22:20:22 -08:00
parent 7e1f25bf36
commit b940a1fadb
9 changed files with 23 additions and 20 deletions

View File

@ -32,6 +32,10 @@
#define GTK_TEXT_UNKNOWN_CHAR 0xFFFC
#if GLIB_CHECK_VERSION(2,30,0) && !defined(G_UNICODE_COMBINING_MARK)
#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK
#endif
/* this function acts like g_utf8_offset_to_pointer() except that if it finds a
* decomposable character it consumes the decomposition length from the given
* offset. So it's useful when the offset was calculated for the normalized

View File

@ -256,7 +256,7 @@ gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
* Returns: %NULL-terminated array containg a list of language files directories.
* The array is owned by @lm and must not be modified.
*/
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm)
{
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);
@ -374,7 +374,7 @@ ensure_languages (GtkSourceLanguageManager *lm)
* available languages or %NULL if no language is available. The array
* is owned by @lm and must not be modified.
*/
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm)
{
g_return_val_if_fail (GTK_IS_SOURCE_LANGUAGE_MANAGER (lm), NULL);

View File

@ -62,13 +62,13 @@ GtkSourceLanguageManager *gtk_source_language_manager_new (void);
GtkSourceLanguageManager *gtk_source_language_manager_get_default (void);
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_language_manager_get_search_path (GtkSourceLanguageManager *lm);
void gtk_source_language_manager_set_search_path (GtkSourceLanguageManager *lm,
gchar **dirs);
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_language_manager_get_language_ids (GtkSourceLanguageManager *lm);
GtkSourceLanguage *gtk_source_language_manager_get_language (GtkSourceLanguageManager *lm,

View File

@ -290,7 +290,7 @@ gtk_source_style_scheme_get_description (GtkSourceStyleScheme *scheme)
*
* Since: 2.0
*/
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme)
{
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME (scheme), NULL);
@ -298,7 +298,7 @@ gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme)
if (scheme->priv->authors == NULL)
return NULL;
return (G_CONST_RETURN gchar* G_CONST_RETURN *)scheme->priv->authors->pdata;
return (const gchar* const *)scheme->priv->authors->pdata;
}
/**

View File

@ -61,8 +61,7 @@ const gchar *gtk_source_style_scheme_get_id (GtkSourceStyleS
const gchar *gtk_source_style_scheme_get_name (GtkSourceStyleScheme *scheme);
const gchar *gtk_source_style_scheme_get_description(GtkSourceStyleScheme *scheme);
G_CONST_RETURN gchar* G_CONST_RETURN *
gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
const gchar* const * gtk_source_style_scheme_get_authors (GtkSourceStyleScheme *scheme);
const gchar *gtk_source_style_scheme_get_filename (GtkSourceStyleScheme *scheme);

View File

@ -507,7 +507,7 @@ gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager
* Returns: a NULL-terminated array of string containing the search path.
* The array is owned by the @manager and must not be modified.
*/
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager)
{
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);
@ -544,7 +544,7 @@ gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manag
* available style schemes or %NULL if no style scheme is available. The array
* is owned by the @manager and must not be modified.
*/
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager)
{
g_return_val_if_fail (GTK_IS_SOURCE_STYLE_SCHEME_MANAGER (manager), NULL);

View File

@ -73,12 +73,12 @@ void gtk_source_style_scheme_manager_append_search_path (GtkSourceStyleSc
void gtk_source_style_scheme_manager_prepend_search_path (GtkSourceStyleSchemeManager *manager,
const gchar *path);
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_style_scheme_manager_get_search_path (GtkSourceStyleSchemeManager *manager);
void gtk_source_style_scheme_manager_force_rescan (GtkSourceStyleSchemeManager *manager);
G_CONST_RETURN gchar* G_CONST_RETURN *
const gchar* const *
gtk_source_style_scheme_manager_get_scheme_ids (GtkSourceStyleSchemeManager *manager);
GtkSourceStyleScheme *gtk_source_style_scheme_manager_get_scheme (GtkSourceStyleSchemeManager *manager,

View File

@ -1239,7 +1239,7 @@ moo_font_selection_set_font_name (MooFontSelection *fontsel,
/* This returns the text in the preview entry. You should copy the returned
text if you need it. */
G_CONST_RETURN gchar*
const gchar*
moo_font_selection_get_preview_text (MooFontSelection *fontsel)
{
return gtk_entry_get_text (GTK_ENTRY (fontsel->preview_entry));
@ -1394,7 +1394,7 @@ moo_font_selection_dialog_set_font_name (MooFontSelectionDialog *fsd,
return moo_font_selection_set_font_name (MOO_FONT_SELECTION (fsd->fontsel), fontname);
}
G_CONST_RETURN gchar*
const gchar*
moo_font_selection_dialog_get_preview_text (MooFontSelectionDialog *fsd)
{
return moo_font_selection_get_preview_text (MOO_FONT_SELECTION (fsd->fontsel));
@ -1839,7 +1839,7 @@ moo_font_button_set_title (MooFontButton *font_button,
*
* Since: 2.4
*/
G_CONST_RETURN gchar*
const gchar*
moo_font_button_get_title (MooFontButton *font_button)
{
g_return_val_if_fail (MOO_IS_FONT_BUTTON (font_button), NULL);
@ -2097,7 +2097,7 @@ moo_font_button_set_filter_visible (MooFontButton *font_button,
*
* Since: 2.4
*/
G_CONST_RETURN gchar *
const gchar *
moo_font_button_get_font_name (MooFontButton *font_button)
{
g_return_val_if_fail (MOO_IS_FONT_BUTTON (font_button), NULL);

View File

@ -145,7 +145,7 @@ gchar* moo_font_selection_get_font_name (MooFontSelection *fontsel);
gboolean moo_font_selection_set_font_name (MooFontSelection *fontsel,
const gchar *fontname);
G_CONST_RETURN gchar* moo_font_selection_get_preview_text (MooFontSelection *fontsel);
const gchar* moo_font_selection_get_preview_text (MooFontSelection *fontsel);
void moo_font_selection_set_preview_text (MooFontSelection *fontsel,
const gchar *text);
@ -179,7 +179,7 @@ gboolean moo_font_selection_dialog_set_font_name (MooFontSelectionDialog *fsd
/* This returns the text in the preview entry. You should copy the returned
text if you need it. */
G_CONST_RETURN gchar* moo_font_selection_dialog_get_preview_text (MooFontSelectionDialog *fsd);
const gchar* moo_font_selection_dialog_get_preview_text (MooFontSelectionDialog *fsd);
/* This sets the text in the preview entry. It will be copied by the entry,
so there's no need to g_strdup() it first. */
@ -227,7 +227,7 @@ GType moo_font_button_get_type (void) G_GNUC_CONST;
GtkWidget *moo_font_button_new (void);
GtkWidget *moo_font_button_new_with_font (const gchar *fontname);
G_CONST_RETURN gchar *moo_font_button_get_title (MooFontButton *font_button);
const gchar *moo_font_button_get_title (MooFontButton *font_button);
void moo_font_button_set_title (MooFontButton *font_button,
const gchar *title);
gboolean moo_font_button_get_use_font (MooFontButton *font_button);
@ -236,7 +236,7 @@ void moo_font_button_set_use_font (MooFontButton *font_button
gboolean moo_font_button_get_use_size (MooFontButton *font_button);
void moo_font_button_set_use_size (MooFontButton *font_button,
gboolean use_size);
G_CONST_RETURN gchar* moo_font_button_get_font_name (MooFontButton *font_button);
const gchar* moo_font_button_get_font_name (MooFontButton *font_button);
gboolean moo_font_button_set_font_name (MooFontButton *font_button,
const gchar *fontname);
gboolean moo_font_button_get_show_style (MooFontButton *font_button);