Browse Source

Use G_CONST_RETURN instead of const in return values.

upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
8a9f744127
  1. 2
      libxfce4panel/libxfce4panel-config.c
  2. 6
      libxfce4panel/libxfce4panel-config.h.in
  3. 2
      libxfce4panel/xfce-panel-plugin-provider.c
  4. 40
      libxfce4panel/xfce-panel-plugin-provider.h
  5. 10
      libxfce4panel/xfce-panel-plugin.c
  6. 87
      libxfce4panel/xfce-panel-plugin.h

2
libxfce4panel/libxfce4panel-config.c

@ -113,7 +113,7 @@ const guint libxfce4panel_micro_version = LIBXFCE4PANEL_MICRO_VERSION;
* string is owned by the library and must not be freed or
* modified by the caller.
**/
const gchar *
G_CONST_RETURN gchar *
libxfce4panel_check_version (guint required_major,
guint required_minor,
guint required_micro)

6
libxfce4panel/libxfce4panel-config.h.in

@ -80,9 +80,9 @@ extern const guint libxfce4panel_major_version;
extern const guint libxfce4panel_minor_version;
extern const guint libxfce4panel_micro_version;
const gchar *libxfce4panel_check_version (guint required_major,
guint required_minor,
guint required_micro);
G_CONST_RETURN gchar *libxfce4panel_check_version (guint required_major,
guint required_minor,
guint required_micro);
G_END_DECLS

2
libxfce4panel/xfce-panel-plugin-provider.c

@ -80,7 +80,7 @@ xfce_panel_plugin_provider_class_init (gpointer klass,
const gchar *
G_CONST_RETURN gchar *
xfce_panel_plugin_provider_get_name (XfcePanelPluginProvider *provider)
{
panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (provider), NULL);

40
libxfce4panel/xfce-panel-plugin-provider.h

@ -114,39 +114,39 @@ enum
GType xfce_panel_plugin_provider_get_type (void) G_GNUC_CONST;
GType xfce_panel_plugin_provider_get_type (void) G_GNUC_CONST;
const gchar *xfce_panel_plugin_provider_get_name (XfcePanelPluginProvider *provider);
G_CONST_RETURN gchar *xfce_panel_plugin_provider_get_name (XfcePanelPluginProvider *provider);
gint xfce_panel_plugin_provider_get_unique_id (XfcePanelPluginProvider *provider);
gint xfce_panel_plugin_provider_get_unique_id (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_set_size (XfcePanelPluginProvider *provider,
gint size);
void xfce_panel_plugin_provider_set_size (XfcePanelPluginProvider *provider,
gint size);
void xfce_panel_plugin_provider_set_orientation (XfcePanelPluginProvider *provider,
GtkOrientation orientation);
void xfce_panel_plugin_provider_set_orientation (XfcePanelPluginProvider *provider,
GtkOrientation orientation);
void xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProvider *provider,
XfceScreenPosition screen_position);
void xfce_panel_plugin_provider_set_screen_position (XfcePanelPluginProvider *provider,
XfceScreenPosition screen_position);
void xfce_panel_plugin_provider_save (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_save (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_emit_signal (XfcePanelPluginProvider *provider,
XfcePanelPluginProviderSignal provider_signal);
void xfce_panel_plugin_provider_emit_signal (XfcePanelPluginProvider *provider,
XfcePanelPluginProviderSignal provider_signal);
gboolean xfce_panel_plugin_provider_get_show_configure (XfcePanelPluginProvider *provider);
gboolean xfce_panel_plugin_provider_get_show_configure (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_show_configure (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_show_configure (XfcePanelPluginProvider *provider);
gboolean xfce_panel_plugin_provider_get_show_about (XfcePanelPluginProvider *provider);
gboolean xfce_panel_plugin_provider_get_show_about (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_show_about (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_show_about (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_remove (XfcePanelPluginProvider *provider);
void xfce_panel_plugin_provider_remove (XfcePanelPluginProvider *provider);
gboolean xfce_panel_plugin_provider_remote_event (XfcePanelPluginProvider *provider,
const gchar *name,
const GValue *value);
gboolean xfce_panel_plugin_provider_remote_event (XfcePanelPluginProvider *provider,
const gchar *name,
const GValue *value);
G_END_DECLS

10
libxfce4panel/xfce-panel-plugin.c

@ -1299,7 +1299,7 @@ xfce_panel_plugin_take_window_notify (gpointer data,
*
* Returns: the name of the panel plugin.
**/
const gchar *
G_CONST_RETURN gchar *
xfce_panel_plugin_get_name (XfcePanelPlugin *plugin)
{
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@ -1319,7 +1319,7 @@ xfce_panel_plugin_get_name (XfcePanelPlugin *plugin)
*
* Returns: the (translated) display name of the plugin.
**/
const gchar *
G_CONST_RETURN gchar *
xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin)
{
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@ -1342,7 +1342,7 @@ xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin)
*
* Returns: the (translated) comment of the plugin.
**/
const gchar *
G_CONST_RETURN gchar *
xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin)
{
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@ -1388,7 +1388,7 @@ xfce_panel_plugin_get_unique_id (XfcePanelPlugin *plugin)
* See also: xfconf_channel_new_with_property_base() and
* XFCE_PANEL_PLUGIN_CHANNEL_NAME.
**/
const gchar *
G_CONST_RETURN gchar *
xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin)
{
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);
@ -1421,7 +1421,7 @@ xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin)
*
* Since: 4.8.0
**/
const gchar * const *
G_CONST_RETURN gchar * G_CONST_RETURN *
xfce_panel_plugin_get_arguments (XfcePanelPlugin *plugin)
{
g_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), NULL);

87
libxfce4panel/xfce-panel-plugin.h

@ -97,75 +97,76 @@ struct _XfcePanelPlugin
GType xfce_panel_plugin_get_type (void) G_GNUC_CONST;
GType xfce_panel_plugin_get_type (void) G_GNUC_CONST;
const gchar *xfce_panel_plugin_get_name (XfcePanelPlugin *plugin) G_GNUC_PURE;
G_CONST_RETURN gchar *xfce_panel_plugin_get_name (XfcePanelPlugin *plugin) G_GNUC_PURE;
const gchar *xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin) G_GNUC_PURE;
G_CONST_RETURN gchar *xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin) G_GNUC_PURE;
const gchar *xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin) G_GNUC_PURE;
G_CONST_RETURN gchar *xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin) G_GNUC_PURE;
gint xfce_panel_plugin_get_unique_id (XfcePanelPlugin *plugin) G_GNUC_PURE;
gint xfce_panel_plugin_get_unique_id (XfcePanelPlugin *plugin) G_GNUC_PURE;
const gchar *xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin) G_GNUC_PURE;
G_CONST_RETURN gchar *xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin) G_GNUC_PURE;
const gchar * const *xfce_panel_plugin_get_arguments (XfcePanelPlugin *plugin) G_GNUC_PURE;
G_CONST_RETURN gchar * G_CONST_RETURN *
xfce_panel_plugin_get_arguments (XfcePanelPlugin *plugin) G_GNUC_PURE;
gint xfce_panel_plugin_get_size (XfcePanelPlugin *plugin) G_GNUC_PURE;
gint xfce_panel_plugin_get_size (XfcePanelPlugin *plugin) G_GNUC_PURE;
gboolean xfce_panel_plugin_get_expand (XfcePanelPlugin *plugin) G_GNUC_PURE;
gboolean xfce_panel_plugin_get_expand (XfcePanelPlugin *plugin) G_GNUC_PURE;
void xfce_panel_plugin_set_expand (XfcePanelPlugin *plugin,
gboolean expand);
void xfce_panel_plugin_set_expand (XfcePanelPlugin *plugin,
gboolean expand);
GtkOrientation xfce_panel_plugin_get_orientation (XfcePanelPlugin *plugin) G_GNUC_PURE;
GtkOrientation xfce_panel_plugin_get_orientation (XfcePanelPlugin *plugin) G_GNUC_PURE;
XfceScreenPosition xfce_panel_plugin_get_screen_position (XfcePanelPlugin *plugin) G_GNUC_PURE;
XfceScreenPosition xfce_panel_plugin_get_screen_position (XfcePanelPlugin *plugin) G_GNUC_PURE;
void xfce_panel_plugin_take_window (XfcePanelPlugin *plugin,
GtkWindow *window);
void xfce_panel_plugin_take_window (XfcePanelPlugin *plugin,
GtkWindow *window);
void xfce_panel_plugin_add_action_widget (XfcePanelPlugin *plugin,
GtkWidget *widget);
void xfce_panel_plugin_add_action_widget (XfcePanelPlugin *plugin,
GtkWidget *widget);
void xfce_panel_plugin_menu_insert_item (XfcePanelPlugin *plugin,
GtkMenuItem *item);
void xfce_panel_plugin_menu_insert_item (XfcePanelPlugin *plugin,
GtkMenuItem *item);
void xfce_panel_plugin_menu_show_configure (XfcePanelPlugin *plugin);
void xfce_panel_plugin_menu_show_configure (XfcePanelPlugin *plugin);
void xfce_panel_plugin_menu_show_about (XfcePanelPlugin *plugin);
void xfce_panel_plugin_menu_show_about (XfcePanelPlugin *plugin);
void xfce_panel_plugin_block_menu (XfcePanelPlugin *plugin);
void xfce_panel_plugin_block_menu (XfcePanelPlugin *plugin);
void xfce_panel_plugin_unblock_menu (XfcePanelPlugin *plugin);
void xfce_panel_plugin_unblock_menu (XfcePanelPlugin *plugin);
void xfce_panel_plugin_register_menu (XfcePanelPlugin *plugin,
GtkMenu *menu);
void xfce_panel_plugin_register_menu (XfcePanelPlugin *plugin,
GtkMenu *menu);
GtkArrowType xfce_panel_plugin_arrow_type (XfcePanelPlugin *plugin);
GtkArrowType xfce_panel_plugin_arrow_type (XfcePanelPlugin *plugin);
void xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin,
GtkWidget *menu_widget,
GtkWidget *attach_widget,
gint *x,
gint *y);
void xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin,
GtkWidget *menu_widget,
GtkWidget *attach_widget,
gint *x,
gint *y);
void xfce_panel_plugin_position_menu (GtkMenu *menu,
gint *x,
gint *y,
gboolean *push_in,
gpointer panel_plugin);
void xfce_panel_plugin_position_menu (GtkMenu *menu,
gint *x,
gint *y,
gboolean *push_in,
gpointer panel_plugin);
void xfce_panel_plugin_focus_widget (XfcePanelPlugin *plugin,
GtkWidget *widget);
void xfce_panel_plugin_focus_widget (XfcePanelPlugin *plugin,
GtkWidget *widget);
void xfce_panel_plugin_block_autohide (XfcePanelPlugin *plugin,
gboolean blocked);
void xfce_panel_plugin_block_autohide (XfcePanelPlugin *plugin,
gboolean blocked);
gchar *xfce_panel_plugin_lookup_rc_file (XfcePanelPlugin *plugin) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
gchar *xfce_panel_plugin_lookup_rc_file (XfcePanelPlugin *plugin) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
gchar *xfce_panel_plugin_save_location (XfcePanelPlugin *plugin,
gboolean create) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
gchar *xfce_panel_plugin_save_location (XfcePanelPlugin *plugin,
gboolean create) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS

Loading…
Cancel
Save