00001 #ifndef __LIBMENU_H__
00002 #define __LIBMENU_H__
00003
00004 #include <libxml/xmlreader.h>
00005 #include <gtk/gtk.h>
00006 #include <libintl.h>
00007
00008 G_BEGIN_DECLS
00009
00010
00011 #define DESKTOP_ENTRY_TYPE_FIELD "Type"
00012 #define DESKTOP_ENTRY_ICON_FIELD "Icon"
00013 #define DESKTOP_ENTRY_NAME_FIELD "Name"
00014 #define DESKTOP_ENTRY_EXEC_FIELD "Exec"
00015 #define DESKTOP_ENTRY_SERVICE_FIELD "X-Osso-Service"
00016
00017 #define SEPARATOR_STRING "SEPARATOR"
00018 #define EXTRAS_MENU_STRING "tana_fi_extras"
00019
00020
00021 #define DEFAULT_APPS_DIR "/usr/share/applications/"
00022 #define ICON_FAVOURITES "qgn_list_gene_favor"
00023 #define ICON_FOLDER "qgn_list_gene_fldr_cls"
00024 #define ICON_DEFAULT_APP "qgn_list_gene_default_app"
00025 #define ICON_SIZE 26
00026
00027 #define EMBLEM_EXPANDER_OPEN "qgn_list_gene_fldr_exp"
00028 #define EMBLEM_EXPANDER_CLOSED "qgn_list_gene_fldr_clp"
00029
00030
00031 #define FAVOURITES_LOGICAL_STRING "tncpa_li_of_favourites"
00032 #define FAVOURITES_NAME dgettext("osso-applet-tasknavigator", FAVOURITES_LOGICAL_STRING)
00033
00034
00035 #define SYSTEMWIDE_MENU_FILE "/etc/xdg/menus/applications.menu"
00036
00037
00038 #define USER_MENU_FILE ".osso/menus/applications.menu"
00039
00040
00041
00042 enum {
00043 TREE_MODEL_NAME = 0,
00044 TREE_MODEL_ICON,
00045 TREE_MODEL_EMBLEM_EXPANDER_OPEN,
00046 TREE_MODEL_EMBLEM_EXPANDER_CLOSED,
00047 TREE_MODEL_EXEC,
00048 TREE_MODEL_SERVICE,
00049 TREE_MODEL_DESKTOP_ID,
00050 TREE_MODEL_COLUMNS
00051 };
00052
00053
00054 enum {
00055 USER_MENU = 0,
00056 SYSTEMWIDE_MENU,
00057 MENU_TYPES
00058 };
00059
00060
00061
00062
00063 GdkPixbuf *get_icon(const char *icon_name, int icon_size);
00064
00065
00066 GtkTreeModel *get_menu_contents(void);
00067
00068
00069
00070
00071
00072
00073
00074
00075 void find_first_and_last_root_level_folders( GtkTreeModel *model,
00076 GtkTreePath **first_folder, GtkTreePath **last_folder );
00077
00078
00079
00080
00081
00082
00083
00084 gboolean set_separators( GtkTreeModel *model );
00085
00086
00087 gboolean set_menu_contents( GtkTreeModel *model );
00088
00089 G_END_DECLS
00090
00091 #endif