ede/ede-panel/applets/start-menu/XdgMenuReader.h
Sanel Zukan 1dde9f92da Menu reload support and clean of some memory leaks.
Menu reload is using DirWatch to monitor application menu folders for changes. With this, any change on some content will trigger
menu update. Update is trying to be safe as possible: when menu is open, a backup menu will be constructed and replaced as soon as menu
was closed; when is closed, it will be directly replaced.

This still can include races, but I'm hoping they will not occur.

Related to memory leaks: on couple of places in cpu applet, delete was wronly called instead delete[]. Also, when ede-panel exits,
AppletManager would not clean loaded apples. Strange. So now explicit clear was added on exit.
2012-08-06 14:52:09 +00:00

46 lines
1.4 KiB
C

/*
* $Id$
*
* Copyright (C) 2012 Sanel Zukan
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __XDGMENUREADER_H__
#define __XDGMENUREADER_H__
#include <edelib/MenuItem.h>
#include <edelib/List.h>
#include <edelib/String.h>
EDELIB_NS_USING(MenuItem)
EDELIB_NS_USING(String)
EDELIB_NS_USING(list)
typedef list<String> StrList;
typedef list<String>::iterator StrListIt;
void xdg_menu_dump_for_test_suite(void);
/* all locations where menu files are stored */
void xdg_menu_applications_location(StrList &lst);
struct XdgMenuContent;
XdgMenuContent *xdg_menu_load(void);
void xdg_menu_delete(XdgMenuContent *c);
MenuItem *xdg_menu_to_fltk_menu(XdgMenuContent *c);
#endif