Adding missing Name entry in efreet_menu.

Add fix from Massimiliano Calamelli.

SVN revision: 38153
This commit is contained in:
Sebastian Dransfeld 2008-12-15 20:23:24 +00:00
parent 582e0768fe
commit 1de2e74d74
2 changed files with 15 additions and 2 deletions

View File

@ -557,12 +557,25 @@ efreet_menu_shutdown(void)
eina_stringshare_shutdown();
}
/**
* @param name The internal name of the menu
* @return Returns the Efreet_Menu on success or
* NULL on failure
* @brief Creates a new menu
*/
EAPI Efreet_Menu *
efreet_menu_new(void)
efreet_menu_new(const char *name)
{
Efreet_Menu *menu;
if (!name)
{
printf("Error creating a new menu, name is missing\n");
return NULL;
}
menu = efreet_menu_entry_new();
menu->type = EFREET_MENU_ENTRY_MENU;
menu->name = eina_stringshare_add(name);
return menu;
}

View File

@ -51,7 +51,7 @@ struct Efreet_Menu
EAPI int efreet_menu_kde_legacy_init(void);
EAPI Efreet_Menu *efreet_menu_new(void);
EAPI Efreet_Menu *efreet_menu_new(const char *name);
EAPI void efreet_menu_file_set(const char *file);
EAPI Efreet_Menu *efreet_menu_get(void);
EAPI Efreet_Menu *efreet_menu_parse(const char *path);