ThunarFolder

ThunarFolder

Functions

Properties

ThunarFile * corresponding-file Read / Write / Construct Only
gboolean loading Read

Signals

void destroy No Hooks
void error Run Last
void files-added Run Last
void files-changed Run Last
void files-removed Run Last
void thumbnails-updated Run Last

Object Hierarchy

    GObject
    ╰── ThunarFolder

Description

Functions

thunar_folder_get_for_file ()

ThunarFolder *
thunar_folder_get_for_file (ThunarFile *file);

Opens the specified file as ThunarFolder and returns a reference to the folder.

The caller is responsible to free the returned object using g_object_unref() when no longer needed.

Parameters

file

a ThunarFile.

 

Returns

the ThunarFolder which corresponds to file .


thunar_folder_get_corresponding_file ()

ThunarFile *
thunar_folder_get_corresponding_file (const ThunarFolder *folder);

Returns the ThunarFile corresponding to this folder .

No reference is taken on the returned ThunarFile for the caller, so if you need a persistent reference to the file, you'll have to call g_object_ref() yourself.

Parameters

folder

a ThunarFolder instance.

 

Returns

the ThunarFile corresponding to folder .


thunar_folder_get_files ()

GHashTable *
thunar_folder_get_files (const ThunarFolder *folder);

Returns the hashtable of files currently known for folder . The data is owned by the ThunarFile instance and should not be modified or freed.

Parameters

folder

a ThunarFolder instance.

 

Returns

A GHashTable containing all the ThunarFiles inside the folder.

[transfer none]


thunar_folder_get_loading ()

gboolean
thunar_folder_get_loading (const ThunarFolder *folder);

Tells whether the contents of the folder are currently being loaded.

Parameters

folder

a ThunarFolder instance.

 

Returns

TRUE if folder is loading, else FALSE.


thunar_folder_has_folder_monitor ()

gboolean
thunar_folder_has_folder_monitor (const ThunarFolder *folder);

Tells whether the folder has a folder monitor running

Parameters

folder

a ThunarFolder instance.

 

Returns

TRUE if folder has a folder monitor, else FALSE.


thunar_folder_reload ()

void
thunar_folder_reload (ThunarFolder *folder,
                      gboolean reload_info);

Tells the folder object to reread the directory contents from the underlying media.

Parameters

folder

a ThunarFolder instance.

 

reload_info

reload all information for the files too

 

Property Details

The “corresponding-file” property

  “corresponding-file”       ThunarFile *

corresponding-file.

Owner: ThunarFolder

Flags: Read / Write / Construct Only


The “loading” property

  “loading”                  gboolean

loading.

Owner: ThunarFolder

Flags: Read

Default value: FALSE

Signal Details

The “destroy” signal

void
user_function (ThunarFolder *folder,
               gpointer      user_data)

Emitted when the ThunarFolder is destroyed.

Parameters

folder

a ThunarFolder.

 

user_data

user data set when the signal handler was connected.

 

Flags: No Hooks


The “error” signal

void
user_function (ThunarFolder *folder,
               gpointer      error,
               gpointer      user_data)

Emitted when the ThunarFolder fails to completly load the directory content because of an error.

Parameters

folder

a ThunarFolder.

 

error

the GError describing the problem.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “files-added” signal

void
user_function (ThunarFolder *thunarfolder,
               gpointer      arg1,
               gpointer      user_data)

Emitted by the ThunarFolder whenever new files have been added to a particular folder.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “files-changed” signal

void
user_function (ThunarFolder *thunarfolder,
               gpointer      arg1,
               gpointer      user_data)

Flags: Run Last


The “files-removed” signal

void
user_function (ThunarFolder *thunarfolder,
               gpointer      arg1,
               gpointer      user_data)

Emitted by the ThunarFolder whenever a bunch of files is removed from the folder, which means they are not necessarily deleted from disk. This can be used to implement the reload of folders, which take longer to load.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “thumbnails-updated” signal

void
user_function (ThunarFolder *thunarfolder,
               gpointer      arg1,
               gpointer      user_data)

This signal is emitted on ThunarFolder whenever for the currently existing ThunarFile thumbnail status changes.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last