ThunarVfsMimeHandler

ThunarVfsMimeHandler — Abstract base class for ThunarVfsMimeApplication and ThunarVfsMimeAction.

Functions

Properties

gchar * command Read / Write / Construct Only
ThunarVfsMimeHandlerFlags flags Read / Write / Construct Only
gchar * icon Read / Write / Construct Only
gchar * name Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── ThunarVfsMimeHandler
        ├── ThunarVfsMimeAction
        ╰── ThunarVfsMimeApplication

Includes

#include <thunar-vfs/thunar-vfs.h>

Description

Functions

thunar_vfs_mime_handler_get_command ()

const gchar *
thunar_vfs_mime_handler_get_command (const ThunarVfsMimeHandler *mime_handler);

Returns the command associated with mime_handler .

Parameters

mime_handler

a ThunarVfsMimeHandler.

 

Returns

the command associated with mime_handler .


thunar_vfs_mime_handler_get_flags ()

ThunarVfsMimeHandlerFlags
thunar_vfs_mime_handler_get_flags (const ThunarVfsMimeHandler *mime_handler);

Returns the ThunarVfsMimeHandlerFlags for mime_handler .

Parameters

mime_handler

a ThunarVfsMimeHandler.

 

Returns

the ThunarVfsMimeHandlerFlags for mime_handler .


thunar_vfs_mime_handler_get_name ()

const gchar *
thunar_vfs_mime_handler_get_name (const ThunarVfsMimeHandler *mime_handler);

Returns the name of mime_handler .

Parameters

mime_handler

a ThunarVfsMimeHandler.

 

Returns

the name of mime_handler .


thunar_vfs_mime_handler_exec ()

gboolean
thunar_vfs_mime_handler_exec (const ThunarVfsMimeHandler *mime_handler,
                              GdkScreen *screen,
                              GList *path_list,
                              GError **error);

Wrapper to thunar_vfs_mime_handler_exec_with_env(), which simply passes a NULL pointer for the environment variables.

Parameters

mime_handler

a ThunarVfsMimeHandler.

 

screen

a GdkScreen or NULL to use the default screen.

 

path_list

a list of ThunarVfsPaths to open.

 

error

return location for errors or NULL.

 

Returns

TRUE if the execution succeed, else FALSE.


thunar_vfs_mime_handler_exec_with_env ()

gboolean
thunar_vfs_mime_handler_exec_with_env (const ThunarVfsMimeHandler *mime_handler,
                                       GdkScreen *screen,
                                       GList *path_list,
                                       gchar **envp,
                                       GError **error);

Executes mime_handler on screen using the given path_list . If path_list contains more than one ThunarVfsPath and mime_handler doesn't support opening multiple documents at once, one instance of mime_handler will be spawned for every ThunarVfsPath given in path_list .

Parameters

mime_handler

a ThunarVfsMimeHandler.

 

screen

a GdkScreen or NULL to use the default screen.

 

path_list

a list of ThunarVfsPaths to open.

 

envp

child's environment or NULL to inherit parent's.

 

error

return location for errors or NULL.

 

Returns

TRUE if the execution succeed, else FALSE.


thunar_vfs_mime_handler_lookup_icon_name ()

const gchar *
thunar_vfs_mime_handler_lookup_icon_name
                               (const ThunarVfsMimeHandler *mime_handler,
                                GtkIconTheme *icon_theme);

Looks up the icon name for mime_handler in icon_theme . Returns NULL if no suitable icon is present in icon_theme .

The returned icon can be either a named icon in icon_theme or an absolute path to an icon file, or NULL.

Parameters

mime_handler

a ThunarVfsMimeHandler.

 

icon_theme

a GtkIconTheme.

 

Returns

the icon name for mime_handler or NULL.

Types and Values

enum ThunarVfsMimeHandlerFlags

Various flags associated with a ThunarVfsMimeHandler.

Members

THUNAR_VFS_MIME_HANDLER_HIDDEN

the handler should not be displayed in the menu system.

 

THUNAR_VFS_MIME_HANDLER_REQUIRES_TERMINAL

the handler must be run in a terminal.

 

THUNAR_VFS_MIME_HANDLER_SUPPORTS_STARTUP_NOTIFY

the handler supports startup notification.

 

THUNAR_VFS_MIME_HANDLER_SUPPORTS_MULTI

the handler supports opening multiple documents at once (F or U).

 

THUNAR_VFS_MIME_HANDLER_SUPPORTS_URIS

the handler supports opening URIs (u or U).

 

ThunarVfsMimeHandler

typedef struct _ThunarVfsMimeHandler ThunarVfsMimeHandler;

The ThunarVfsMimeHandler contains private data only, and should be accessed using the functions below.

Property Details

The “command” property

  “command”                  gchar *

The command line for this ThunarVfsMimeHandler.

Flags: Read / Write / Construct Only

Default value: NULL


The “flags” property

  “flags”                    ThunarVfsMimeHandlerFlags

The ThunarVfsMimeHandlerFlags for this ThunarVfsMimeHandler.

Flags: Read / Write / Construct Only


The “icon” property

  “icon”                     gchar *

The icon of this ThunarVfsMimeHandler, which can be either NULL in which case no icon is known, an absolute path to an icon file, or a named icon.

Flags: Read / Write / Construct Only

Default value: NULL


The “name” property

  “name”                     gchar *

The name of this ThunarVfsMimeHandler.

Flags: Read / Write / Construct Only

Default value: NULL

See Also

ThunarVfsMimeApplication and ThunarVfsMimeAction