ThunarShortcutsModel

ThunarShortcutsModel

Functions

Properties

gboolean file-size-binary Read / Write
GStrv hidden-bookmarks Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── ThunarShortcutsModel

Description

Functions

thunar_shortcuts_model_get_default ()

ThunarShortcutsModel *
thunar_shortcuts_model_get_default (void);

Returns the default ThunarShortcutsModel instance shared by all ThunarShortcutsView instances.

Call g_object_unref() on the returned object when you don't need it any longer.

Returns

the default ThunarShortcutsModel instance.


thunar_shortcuts_model_has_bookmark ()

gboolean
thunar_shortcuts_model_has_bookmark (ThunarShortcutsModel *model,
                                     GFile *file);

Returns TRUE if there is a bookmark (not a mount or volume) with file as destination.

Parameters

model

a ThunarShortcutsModel instance.

 

file

a ThuanrFile instance.

 

Returns

TRUE if file was found, else FALSE.


thunar_shortcuts_model_iter_for_file ()

gboolean
thunar_shortcuts_model_iter_for_file (ThunarShortcutsModel *model,
                                      ThunarFile *file,
                                      GtkTreeIter *iter);

Tries to lookup the GtkTreeIter, that belongs to a shortcut, which refers to file and stores it to iter . If no such GtkTreeIter was found, FALSE will be returned and iter won't be changed. Else TRUE will be returned and iter will be set appropriately.

Parameters

model

a ThunarShortcutsModel instance.

 

file

a ThuanrFile instance.

 

iter

pointer to a GtkTreeIter.

 

Returns

TRUE if file was found, else FALSE.


thunar_shortcuts_model_drop_possible ()

gboolean
thunar_shortcuts_model_drop_possible (ThunarShortcutsModel *model,
                                      GtkTreePath *path);

Determines whether a drop is possible before the given path , at the same depth as path . I.e., can we drop data at that location. path does not have to exist; the return value will almost certainly be FALSE if the parent of path doesn't exist, though.

Parameters

model

a ThunarShortcutstModel.

 

path

a GtkTreePath.

 

Returns

TRUE if it's possible to drop data before path , else FALSE.


thunar_shortcuts_model_add ()

void
thunar_shortcuts_model_add (ThunarShortcutsModel *model,
                            GtkTreePath *dst_path,
                            gpointer file);

Adds the shortcut file to the model at dst_path , unless file is already present in model in which case no action is performed.

Parameters

model

a ThunarShortcutsModel.

 

dst_path

the destination path.

 

file

the ThunarFile that should be added to the shortcuts list.

 

thunar_shortcuts_model_move ()

void
thunar_shortcuts_model_move (ThunarShortcutsModel *model,
                             GtkTreePath *src_path,
                             GtkTreePath *dst_path);

Moves the shortcut at src_path to dst_path , adjusting other shortcut's positions as required.

Parameters

model

a ThunarShortcutsModel.

 

src_path

the source path.

 

dst_path

the destination path.

 

thunar_shortcuts_model_remove ()

void
thunar_shortcuts_model_remove (ThunarShortcutsModel *model,
                               GtkTreePath *path);

Removes the shortcut at path from the model and syncs to on-disk storage. path must refer to a valid, user-defined shortcut, as you cannot remove system-defined entities (they are managed internally).

Parameters

model

a ThunarShortcutsModel.

 

path

the GtkTreePath of the shortcut to remove.

 

thunar_shortcuts_model_rename ()

void
thunar_shortcuts_model_rename (ThunarShortcutsModel *model,
                               GtkTreeIter *iter,
                               const gchar *name);

Renames the shortcut at iter to the new name in model .

name may be NULL or an empty to reset the shortcut to its default name.

Parameters

model

a ThunarShortcutsModel.

 

iter

the GtkTreeIter which refers to the shortcut that should be renamed to name .

 

name

the new name for the shortcut at path or NULL to return to the default name.

 

thunar_shortcuts_model_set_busy ()

void
thunar_shortcuts_model_set_busy (ThunarShortcutsModel *model,
                                 ThunarDevice *device,
                                 gboolean busy);

thunar_shortcuts_model_set_hidden ()

void
thunar_shortcuts_model_set_hidden (ThunarShortcutsModel *model,
                                   GtkTreePath *path,
                                   gboolean hidden);

Types and Values

enum ThunarShortcutsModelColumn

Members

THUNAR_SHORTCUTS_MODEL_COLUMN_IS_HEADER

   

THUNAR_SHORTCUTS_MODEL_COLUMN_IS_ITEM

   

THUNAR_SHORTCUTS_MODEL_COLUMN_VISIBLE

   

THUNAR_SHORTCUTS_MODEL_COLUMN_NAME

   

THUNAR_SHORTCUTS_MODEL_COLUMN_TOOLTIP

   

THUNAR_SHORTCUTS_MODEL_COLUMN_FILE

   

THUNAR_SHORTCUTS_MODEL_COLUMN_LOCATION

   

THUNAR_SHORTCUTS_MODEL_COLUMN_GICON

   

THUNAR_SHORTCUTS_MODEL_COLUMN_DEVICE

   

THUNAR_SHORTCUTS_MODEL_COLUMN_MUTABLE

   

THUNAR_SHORTCUTS_MODEL_COLUMN_CAN_EJECT

   

THUNAR_SHORTCUTS_MODEL_COLUMN_GROUP

   

THUNAR_SHORTCUTS_MODEL_COLUMN_BUSY

   

THUNAR_SHORTCUTS_MODEL_COLUMN_BUSY_PULSE

   

THUNAR_SHORTCUTS_MODEL_COLUMN_HIDDEN

   

THUNAR_SHORTCUTS_MODEL_N_COLUMNS

   

THUNAR_SHORTCUT_GROUP_DEVICES

#define             THUNAR_SHORTCUT_GROUP_DEVICES

THUNAR_SHORTCUT_GROUP_PLACES

#define             THUNAR_SHORTCUT_GROUP_PLACES

THUNAR_SHORTCUT_GROUP_NETWORK

#define             THUNAR_SHORTCUT_GROUP_NETWORK

THUNAR_SHORTCUT_GROUP_HEADER

#define             THUNAR_SHORTCUT_GROUP_HEADER

Property Details

The “file-size-binary” property

  “file-size-binary”         gboolean

Owner: ThunarShortcutsModel

Flags: Read / Write

Default value: TRUE


The “hidden-bookmarks” property

  “hidden-bookmarks”         GStrv

Owner: ThunarShortcutsModel

Flags: Read / Write