## ThunarListModel ThunarListModel |

## Functions

ThunarListModel * | thunar_list_model_new ()
ThunarFolder * | thunar_list_model_get_folder ()
void | thunar_list_model_set_folder ()
void | thunar_list_model_set_folders_first ()
gboolean | thunar_list_model_get_show_hidden ()
void | thunar_list_model_set_show_hidden ()
gboolean | thunar_list_model_get_file_size_binary ()
void | thunar_list_model_set_file_size_binary ()
ThunarFile * | thunar_list_model_get_file ()
GList * | thunar_list_model_get_paths_for_files ()
GList * | thunar_list_model_get_paths_for_pattern ()
gchar * | thunar_list_model_get_statusbar_text ()
ThunarJob * | thunar_list_model_get_job ()
void | thunar_list_model_set_job ()

## Properties

gboolean | case-sensitive | Read / Write
char * | date-custom-style | Read / Write
ThunarDateStyle | date-style | Read / Write
gboolean | file-size-binary | Read / Write
ThunarFolder * | folder | Read / Write
ThunarFolderItemCount | folder-item-count | Read / Write
gboolean | folders-first | Read / Write
guint | num-files | Read
gboolean | show-hidden | Read / Write

## Signals

void | error | Run Last
void | search-done | Run Last

## Types and Values

enum | ThunarListModelSearch

## Object Hierarchy

        GObject
        ╰── ThunarListModel

## Description

## Functions

### thunar_list_model_new ()

    ThunarListModel *
    thunar_list_model_new (void);

Allocates a new ThunarListModel not associated with any ThunarFolder.

#### Returns

the newly allocated ThunarListModel.

### thunar_list_model_get_folder ()

    ThunarFolder *
    thunar_list_model_get_folder (ThunarListModel *store);

#### Parameters

store | a valid ThunarListModel object. |

#### Returns

the ThunarFolder `store` is associated with or `NULL` if `store` has no folder.

### thunar_list_model_set_folder ()

    void
    thunar_list_model_set_folder (ThunarListModel *store,
                                  ThunarFolder *folder,
                                  gchar *search_query);

#### Parameters

store | a valid ThunarListModel. |
folder | a ThunarFolder or `NULL`. |
search_query | a string or `NULL`. |

### thunar_list_model_set_folders_first ()

    void
    thunar_list_model_set_folders_first (ThunarListModel *store,
                                         gboolean folders_first);

#### Parameters

store | a ThunarListModel. |
folders_first | `TRUE` to let `store` list folders first. |

### thunar_list_model_get_show_hidden ()

    gboolean
    thunar_list_model_get_show_hidden (ThunarListModel *store);

#### Parameters

store | a ThunarListModel. |

#### Returns

`TRUE` if hidden files will be shown, else `FALSE`.

### thunar_list_model_set_show_hidden ()

    void
    thunar_list_model_set_show_hidden (ThunarListModel *store,
                                       gboolean show_hidden);

#### Parameters

store | a ThunarListModel. |
show_hidden | `TRUE` if hidden files should be shown, else `FALSE`. |

### thunar_list_model_get_file_size_binary ()

    gboolean
    thunar_list_model_get_file_size_binary
                                   (ThunarListModel *store);

Returns `TRUE` if the file size should be formatted as binary.

#### Parameters

store | a valid ThunarListModel object. |

#### Returns

`TRUE` if file size format is binary.

### thunar_list_model_set_file_size_binary ()

    void
    thunar_list_model_set_file_size_binary
                                   (ThunarListModel *store,
                                    gboolean file_size_binary);

If `file_size_binary` is `TRUE` the file size should be formatted as binary.

#### Parameters

store | a valid ThunarListModel object. |
file_size_binary | `TRUE` to format file size as binary. |

### thunar_list_model_get_file ()

    ThunarFile *
    thunar_list_model_get_file (ThunarListModel *store,
                                GtkTreeIter *iter);

Returns the ThunarFile referred to by `iter` . Free the returned object using ``g_object_unref()`` when you are done with it.

#### Parameters

store | a ThunarListModel. |
iter | a valid GtkTreeIter for `store` . |

#### Returns

the ThunarFile.

### thunar_list_model_get_paths_for_files ()

    GList *
    thunar_list_model_get_paths_for_files (ThunarListModel *store,
                                           GList *files);

Determines the list of GtkTreePaths for the ThunarFiles found in the `files` list. If a ThunarFile from the `files` list is not available in `store` , no GtkTreePath will be returned for it. So, in effect, only GtkTreePaths for the subset of `files` available in `store` will be returned.

The caller is responsible to free the returned list using:

    1
    g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);

#### Parameters

store | a ThunarListModel instance. |
files | a list of ThunarFiles. |

#### Returns

the list of GtkTreePaths for `files` .

### thunar_list_model_get_paths_for_pattern ()

    GList *
    thunar_list_model_get_paths_for_pattern
                                   (ThunarListModel *store,
                                    const gchar *pattern,
                                    gboolean case_sensitive,
                                    gboolean match_diacritics);

Looks up all rows in the `store` that match `pattern` and returns a list of GtkTreePaths corresponding to the rows.

The caller is responsible to free the returned list using:

    1
    g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);

#### Parameters

store | a ThunarListModel instance. |
pattern | the pattern to match. |
case_sensitive | `TRUE` to use case sensitive search. |
match_diacritics | `TRUE` to use case sensitive search. |

#### Returns

the list of GtkTreePaths that match `pattern` .

### thunar_list_model_get_statusbar_text ()

    gchar *
    thunar_list_model_get_statusbar_text (ThunarListModel *store,
                                          GList *selected_items);

Generates the statusbar text for `store` with the given `selected_items` .

This function is used by the ThunarStandardView (and thereby implicitly by ThunarIconView and ThunarDetailsView) to calculate the text to display in the statusbar for a given file selection.

The caller is reponsible to free the returned text using `g_free()` when it's no longer needed.

#### Parameters

store | a ThunarListModel instance. |
selected_items | the list of selected items (as GtkTreePath's). |

#### Returns

the statusbar text for `store` with the given `selected_items` .

### thunar_list_model_get_job ()

    ThunarJob *
    thunar_list_model_get_job (ThunarListModel *store);

### thunar_list_model_set_job ()

    void
    thunar_list_model_set_job (ThunarListModel *store,
                               ThunarJob *job);

## Types and Values

### enum ThunarListModelSearch

#### Members

THUNAR_LIST_MODEL_SEARCH_RECURSIVE |  |
THUNAR_LIST_MODEL_SEARCH_NON_RECURSIVE |  |

## Property Details

### The `“case-sensitive”` property

      “case-sensitive”           gboolean

Tells whether the sorting should be case sensitive.

Owner: ThunarListModel

Flags: Read / Write

Default value: TRUE

### The `“date-custom-style”` property

      “date-custom-style”        char *

The style used for custom format of dates.

Owner: ThunarListModel

Flags: Read / Write

Default value: "%Y-%m-%d %H:%M:%S"

### The `“date-style”` property

      “date-style”               ThunarDateStyle

The style used to format dates.

Owner: ThunarListModel

Flags: Read / Write

Default value: THUNAR_DATE_STYLE_SIMPLE

### The `“file-size-binary”` property

      “file-size-binary”         gboolean

file-size-binary.

Owner: ThunarListModel

Flags: Read / Write

Default value: TRUE

### The `“folder”` property

      “folder”                   ThunarFolder *

The folder presented by this ThunarListModel.

Owner: ThunarListModel

Flags: Read / Write

### The `“folder-item-count”` property

      “folder-item-count”        ThunarFolderItemCount

Tells when the size column of folders should show the number of containing files

Owner: ThunarListModel

Flags: Read / Write

Default value: THUNAR_FOLDER_ITEM_COUNT_ONLY_LOCAL

### The `“folders-first”` property

      “folders-first”            gboolean

folders-first.

Owner: ThunarListModel

Flags: Read / Write

Default value: TRUE

### The `“num-files”` property

      “num-files”                guint

num-files.

Owner: ThunarListModel

Flags: Read

Default value: 0

### The `“show-hidden”` property

      “show-hidden”              gboolean

show-hidden.

Owner: ThunarListModel

Flags: Read / Write

Default value: FALSE

## Signal Details

### The `“error”` signal

    void
    user_function (ThunarListModel *store,
                   gpointer         error,
                   gpointer         user_data)

Emitted when an error occurs while loading the `store` content.

#### Parameters

store | a ThunarListModel. |
error | a GError that describes the problem. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“search-done”` signal

    void
    user_function (ThunarListModel *store,
                   gpointer         user_data)

Emitted when a recursive search finishes.

#### Parameters

store | a ThunarListModel. |
error | a GError that describes the problem. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last