diff src/util.h @ 13102:5828d42e8684

[gaim-migrate @ 15464] g_strdup() and free the label for a menu action. This way, if a plugin builds the label dynamically, we won't leak. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 02 Feb 2006 19:35:32 +0000
parents b553326bc468
children e1e5462b7d81
line wrap: on
line diff
--- a/src/util.h	Thu Feb 02 19:17:49 2006 +0000
+++ b/src/util.h	Thu Feb 02 19:35:32 2006 +0000
@@ -60,6 +60,7 @@
 
 /**
  * Creates a new GaimMenuAction.
+ *
  * @param label    The text label to display for this action.
  * @param callback The function to be called when the action is used on
  *                 the selected item.
@@ -68,9 +69,16 @@
  *                 of the action.
  * @return The GaimMenuAction.
  */
-GaimMenuAction *gaim_menu_action_new(char *label, GaimCallback callback,
+GaimMenuAction *gaim_menu_action_new(const char *label, GaimCallback callback,
                                      gpointer data, GList *children);
 
+/**
+ * Frees a GaimMenuAction
+ *
+ * @param act The GaimMenuAction to free.
+ */
+void gaim_menu_action_free(GaimMenuAction *act);
+
 /**************************************************************************/
 /** @name Base16 Functions                                                */
 /**************************************************************************/