![]() |
![]() |
![]() |
nautilus-actions Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations |
#define NA_ICONTEXT_TYPE #define NA_ICONTEXT_GET_INTERFACE (instance) typedef NAIContext; typedef NAIContextInterfacePrivate; NAIContextInterface; gboolean na_icontext_is_candidate (const NAIContext *context
,guint target
,GList *selection
); gboolean na_icontext_is_valid (const NAIContext *context
); gboolean na_icontext_is_all_mimetypes (const NAIContext *context
); void na_icontext_read_done (NAIContext *context
); void na_icontext_set_scheme (NAIContext *context
,const gchar *scheme
,gboolean selected
); void na_icontext_set_only_desktop (NAIContext *context
,const gchar *desktop
,gboolean selected
); void na_icontext_set_not_desktop (NAIContext *context
,const gchar *desktop
,gboolean selected
); void na_icontext_replace_folder (NAIContext *context
,const gchar *old
,const gchar *new
);
NAIContext is implemented by NAObjectAction, NAObjectMenu and NAObjectProfile.
#define NA_ICONTEXT_GET_INTERFACE( instance ) ( G_TYPE_INSTANCE_GET_INTERFACE(( instance ), NA_ICONTEXT_TYPE, NAIContextInterface ))
|
typedef struct { GTypeInterface parent; NAIContextInterfacePrivate *private; /** * is_candidate: * @object: this #NAIContext object. * @target: the initial target which triggered this function's stack. * This target is defined in na-object-item.h. * @selection: the current selection as a #GList of #NautilusFileInfo. * * Returns: %TRUE if the @object may be a potential candidate, %FALSE * else. * * The #NAIContext implementor may take advantage of this * virtual function to check for its own specific data. Only if the * implementor does return %TRUE (or just doesn't implement this * virtual), the conditions themselves will be checked. */ gboolean ( *is_candidate )( NAIContext *object, guint target, GList *selection ); } NAIContextInterface;
gboolean na_icontext_is_candidate (const NAIContext *context
,guint target
,GList *selection
);
Determines if the given object may be candidate to be displayed in the Nautilus context menu, depending of the list of currently selected items.
This function is called by nautilus-actions::build_nautilus_menus()
for each item found in NAPivot items list, and, when this an action,
for each profile of this action.
|
a NAIContext to be checked. |
|
the current target. |
|
the currently selected items, as a GList of NASelectedInfo items. |
Returns : |
TRUE if this context succeeds to all tests and is so a
valid candidate to be displayed in Nautilus context menu, FALSE
else.
|
gboolean na_icontext_is_valid (const NAIContext *context
);
|
the NAObjectProfile to be checked. |
Returns : |
TRUE if this context is valid, FALSE else.
This function is part of NAIDuplicable::check_status() and is called
by NAIDuplicable objects which also implement NAIContext
interface. It so doesn't make sense of asking the object for its
validity status as it has already been checked before calling the
function.
|
gboolean na_icontext_is_all_mimetypes (const NAIContext *context
);
|
the NAIContext object to be checked. |
Returns : |
TRUE if this context is valid for all mimetypes, FALSE else.
|
void na_icontext_read_done (NAIContext *context
);
Prepares the specified NAIContext just after it has been readen.
|
the NAIContext to be prepared. |
void na_icontext_set_scheme (NAIContext *context
,const gchar *scheme
,gboolean selected
);
Sets the status of a scheme
relative to this context
.
|
the NAIContext to be updated. |
|
name of the scheme. |
|
whether this scheme is candidate to this context .
|
void na_icontext_set_only_desktop (NAIContext *context
,const gchar *desktop
,gboolean selected
);
Sets the status of the desktop
relative to this context
for the NotShowIn list.
|
the NAIContext to be updated. |
|
name of the desktop environment. |
|
whether this desktop is candidate to this context .
|
void na_icontext_set_not_desktop (NAIContext *context
,const gchar *desktop
,gboolean selected
);
|
|
|
|
|
void na_icontext_replace_folder (NAIContext *context
,const gchar *old
,const gchar *new
);
Replaces the old
URI by the new
one.
|
the NAIContext to be updated. |
|
the old uri. |
|
the new uri. |