Top | ![]() |
![]() |
![]() |
![]() |
#define | FM_ACTION() |
#define | FM_ACTION_CACHE() |
#define | FM_ACTION_MENU() |
FmActionCache * | fm_action_cache_new () |
FmActionMenu * | fm_action_get_for_context () |
FmActionMenu * | fm_action_get_for_location () |
FmActionMenu * | fm_action_get_for_toolbar () |
const char * | fm_action_get_startup_wm_class () |
const char * | fm_action_get_suggested_shortcut () |
const char * | fm_action_get_toolbar_label () |
const GList * | fm_action_menu_get_children () |
#define | FM_TYPE_ACTION |
#define | FM_TYPE_ACTION_CACHE |
#define | FM_TYPE_ACTION_MENU |
FmAction | |
FmActionCache | |
struct | FmActionCacheClass |
struct | FmActionClass |
FmActionMenu | |
struct | FmActionMenuClass |
include
: libfm/fm.h
The FmActionCache object represents a cache for user-defined menus and actions that can be used in the file manager.
FmActionCache *
fm_action_cache_new (void
);
Creates and initializes an FmActionCache object, or returns a reference for existing one if it was already created. Newly created cache will be collected on idle if not requested right away (what is highly unlikely).
Since: 1.3.0
FmActionMenu * fm_action_get_for_context (FmActionCache *cache
,FmFileInfo *location
,FmFileInfoList *files
);
Checks for files in cache
that mets conditions and returns the list.
Returned menu should be freed using g_object_unref()
. Note that every
g_app_info_launch*() call on any of items found in the menu will be
always done against files
and arguments of such call will be always
ignored, therefore you should never launch any items found in the menu
after you free it or otherwise your call will fail.
cache |
actions cache |
|
location |
path to current directory |
|
files |
list of files for context menu |
Since: 1.3.0
FmActionMenu * fm_action_get_for_location (FmActionCache *cache
,FmFileInfo *location
);
Checks for files in cache
that mets conditions and returns the list.
Only actions that targetted location
are returned. Returned menu should
be freed using g_object_unref()
. Note that every g_app_info_launch*()
call on any of items found in the menu will be always done against
location
and arguments of such call will be always ignored.
Since: 1.3.0
FmActionMenu * fm_action_get_for_toolbar (FmActionCache *cache
,FmFileInfo *location
);
Checks for files in cache
that mets conditions and returns the list.
Only actions that target toolbar are returned. Returned menu should
be freed using g_object_unref()
. Note that every g_app_info_launch*()
call on any of items found in the menu will be always done against
location
and arguments of such call will be always ignored.
Since: 1.3.0
const char *
fm_action_get_startup_wm_class (FmAction *action
);
Returns startup WM class for action
or NULL
if not defined.
Since: 1.3.0
const char *
fm_action_get_suggested_shortcut (FmAction *action
);
Returns suggested keyboard shortcut for action
if available. The format
may look like "<Control>a" or "<Shift><Alt>F1".
Since: 1.3.0
const char *
fm_action_get_toolbar_label (FmAction *action
);
Returns toolbar label for action
or NULL
if not defined.
Since: 1.3.0
const GList *
fm_action_menu_get_children (FmActionMenu *menu
);
Returns list of elements that belong to this menu. If an element is
NULL
then element is a separator. Otherwise element may be either
FmAction or FmActionMenu. Returned list owned by menu
and should
not be freed by caller.
Since: 1.3.0