Move deprecated declarations inside GEANY_DISABLE_DEPRECATED guards

Not all deprecated declarations were guarded this way, making it harder
to catch them.
This commit is contained in:
Colomban Wendling 2016-02-21 01:57:35 +01:00
parent 2f55540f75
commit b4c3d6a737
3 changed files with 60 additions and 57 deletions

View File

@ -146,35 +146,6 @@ PluginInfo;
}
/** @deprecated - use plugin_set_key_group() instead.
* @see PLUGIN_KEY_GROUP() macro. */
typedef struct GeanyKeyGroupInfo
{
const gchar *name; /**< Group name used in the configuration file, such as @c "html_chars" */
gsize count; /**< The number of keybindings the group will hold */
}
GeanyKeyGroupInfo;
/** @deprecated - use plugin_set_key_group() instead.
* Declare and initialise a keybinding group.
* @code GeanyKeyGroup *plugin_key_group; @endcode
* You must then set the @c plugin_key_group::keys[] entries for the group in plugin_init(),
* normally using keybindings_set_item().
* The @c plugin_key_group::label field is set by Geany after @c plugin_init()
* is called, to the name of the plugin.
* @param group_name A unique group name (without quotes) to be used in the
* configuration file, such as @c html_chars.
* @param key_count The number of keybindings the group will hold. */
#define PLUGIN_KEY_GROUP(group_name, key_count) \
/* We have to declare this as a single element array.
* Declaring as a pointer to a struct doesn't work with g_module_symbol(). */ \
GeanyKeyGroupInfo plugin_key_group_info[1] = \
{ \
{G_STRINGIFY(group_name), key_count} \
};\
GeanyKeyGroup *plugin_key_group = NULL;
/** Callback array entry type used with the @ref plugin_callbacks symbol. */
typedef struct PluginCallback
{
@ -193,29 +164,6 @@ typedef struct PluginCallback
PluginCallback;
/** @deprecated Use @ref ui_add_document_sensitive() instead.
* Flags to be set by plugins in PluginFields struct. */
typedef enum
{
/** Whether a plugin's menu item should be disabled when there are no open documents */
PLUGIN_IS_DOCUMENT_SENSITIVE = 1 << 0
}
PluginFlags;
/** @deprecated Use @ref ui_add_document_sensitive() instead.
* Fields set and owned by the plugin. */
typedef struct PluginFields
{
/** Bitmask of @c PluginFlags. */
PluginFlags flags;
/** Pointer to a plugin's menu item which will be automatically enabled/disabled when there
* are no open documents and @c PLUGIN_IS_DOCUMENT_SENSITIVE is set.
* This is required if using @c PLUGIN_IS_DOCUMENT_SENSITIVE, ignored otherwise */
GtkWidget *menu_item;
}
PluginFields;
/** This contains pointers to global variables owned by Geany for plugins to use.
* Core variable pointers can be appended when needed by plugin authors, if appropriate. */
typedef struct GeanyData
@ -408,6 +356,56 @@ gint geany_plugin_register_proxy(GeanyPlugin *plugin, const gchar **extensions);
* without changes. */
typedef struct GeanyFunctionsUndefined GeanyFunctions;
/** @deprecated - use plugin_set_key_group() instead.
* @see PLUGIN_KEY_GROUP() macro. */
typedef struct GeanyKeyGroupInfo
{
const gchar *name; /**< Group name used in the configuration file, such as @c "html_chars" */
gsize count; /**< The number of keybindings the group will hold */
}
GeanyKeyGroupInfo;
/** @deprecated - use plugin_set_key_group() instead.
* Declare and initialise a keybinding group.
* @code GeanyKeyGroup *plugin_key_group; @endcode
* You must then set the @c plugin_key_group::keys[] entries for the group in plugin_init(),
* normally using keybindings_set_item().
* The @c plugin_key_group::label field is set by Geany after @c plugin_init()
* is called, to the name of the plugin.
* @param group_name A unique group name (without quotes) to be used in the
* configuration file, such as @c html_chars.
* @param key_count The number of keybindings the group will hold. */
#define PLUGIN_KEY_GROUP(group_name, key_count) \
/* We have to declare this as a single element array.
* Declaring as a pointer to a struct doesn't work with g_module_symbol(). */ \
GeanyKeyGroupInfo plugin_key_group_info[1] = \
{ \
{G_STRINGIFY(group_name), key_count} \
};\
GeanyKeyGroup *plugin_key_group = NULL;
/** @deprecated Use @ref ui_add_document_sensitive() instead.
* Flags to be set by plugins in PluginFields struct. */
typedef enum
{
/** Whether a plugin's menu item should be disabled when there are no open documents */
PLUGIN_IS_DOCUMENT_SENSITIVE = 1 << 0
}
PluginFlags;
/** @deprecated Use @ref ui_add_document_sensitive() instead.
* Fields set and owned by the plugin. */
typedef struct PluginFields
{
/** Bitmask of @c PluginFlags. */
PluginFlags flags;
/** Pointer to a plugin's menu item which will be automatically enabled/disabled when there
* are no open documents and @c PLUGIN_IS_DOCUMENT_SENSITIVE is set.
* This is required if using @c PLUGIN_IS_DOCUMENT_SENSITIVE, ignored otherwise */
GtkWidget *menu_item;
}
PluginFields;
#define document_reload_file document_reload_force
/** @deprecated - copy into your plugin code if needed.

View File

@ -53,9 +53,7 @@ void sci_set_selection_start (ScintillaObject *sci, gint position);
void sci_set_selection_end (ScintillaObject *sci, gint position);
gint sci_get_length (ScintillaObject *sci);
void sci_get_text (ScintillaObject *sci, gint len, gchar *text);
gchar* sci_get_contents (ScintillaObject *sci, gint buffer_len);
void sci_get_selected_text (ScintillaObject *sci, gchar *text);
gint sci_get_selected_text_length(ScintillaObject *sci);
gchar* sci_get_selection_contents (ScintillaObject *sci);
gchar* sci_get_line (ScintillaObject *sci, gint line_num);
@ -75,7 +73,6 @@ gint sci_find_text (ScintillaObject *sci, gint flags, struct Sci_TextToFin
void sci_set_font (ScintillaObject *sci, gint style, const gchar *font, gint size);
void sci_goto_line (ScintillaObject *sci, gint line, gboolean unfold);
gint sci_get_style_at (ScintillaObject *sci, gint position);
void sci_get_text_range (ScintillaObject *sci, gint start, gint end, gchar *text);
gchar* sci_get_contents_range (ScintillaObject *sci, gint start, gint end);
void sci_insert_text (ScintillaObject *sci, gint pos, const gchar *text);
@ -95,6 +92,11 @@ void sci_set_line_indentation (ScintillaObject *sci, gint line, gint indent);
gint sci_get_line_indentation (ScintillaObject *sci, gint line);
gint sci_find_matching_brace (ScintillaObject *sci, gint pos);
#ifndef GEANY_DISABLE_DEPRECATED
void sci_get_text (ScintillaObject *sci, gint len, gchar *text);
void sci_get_selected_text (ScintillaObject *sci, gchar *text);
void sci_get_text_range (ScintillaObject *sci, gint start, gint end, gchar *text);
#endif /* GEANY_DISABLE_DEPRECATED */
#ifdef GEANY_PRIVATE

View File

@ -112,8 +112,6 @@ GtkWidget *ui_button_new_with_image(const gchar *stock_id, const gchar *text);
void ui_add_document_sensitive(GtkWidget *widget);
void ui_widget_set_tooltip_text(GtkWidget *widget, const gchar *text);
GtkWidget *ui_image_menu_item_new(const gchar *stock_id, const gchar *label);
GtkWidget *ui_lookup_widget(GtkWidget *widget, const gchar *widget_name);
@ -143,6 +141,11 @@ const gchar *ui_lookup_stock_label(const gchar *stock_id);
void ui_tree_view_set_tooltip_text_column(GtkTreeView *tree_view, gint column);
#ifndef GEANY_DISABLE_DEPRECATED
void ui_widget_set_tooltip_text(GtkWidget *widget, const gchar *text);
#endif /* GEANY_DISABLE_DEPRECATED */
#ifdef GEANY_PRIVATE
extern GeanyInterfacePrefs interface_prefs;