Top | ![]() |
![]() |
![]() |
![]() |
void | (*ThunarBookmarksFunc) () |
gchar * | thunar_util_str_get_extension () |
void | thunar_util_load_bookmarks () |
gboolean | thunar_util_looks_like_an_uri () |
gchar * | thunar_util_expand_filename () |
gchar * | thunar_util_humanize_file_time () |
GdkScreen * | thunar_util_parse_parent () |
time_t | thunar_util_time_from_rfc3339 () |
gchar * | thunar_util_change_working_directory () |
void | thunar_setup_display_cb () |
gchar * | thunar_util_next_new_file_name () |
gboolean | thunar_util_is_a_search_query () |
gchar * | thunar_util_strjoin_list () |
void | thunar_util_clip_view_background () |
#define | THUNAR_THREADS_ENTER |
#define | THUNAR_THREADS_LEAVE |
enum | ThunarNextFileNameMode |
extern const char * | SEARCH_PREFIX |
void (*ThunarBookmarksFunc) (GFile *file
,const gchar *name
,gint row_num
,gpointer user_data
);
gchar *
thunar_util_str_get_extension (const gchar *name
);
Returns a pointer to the extension in filename
.
This is an improved version of g_utf8_strrchr with improvements to recognize compound extensions like ".tar.gz" and ".desktop.in.in".
void thunar_util_load_bookmarks (GFile *bookmarks_file
,ThunarBookmarksFunc foreach_func
,gpointer user_data
);
gchar * thunar_util_expand_filename (const gchar *filename
,GFile *working_directory
,GError **error
);
Takes a user-typed filename
and expands a tilde at the
beginning of the filename
. It also resolves paths prefixed with
'.' using the current working directory.
The caller is responsible to free the returned string using
g_free()
when no longer needed.
gchar * thunar_util_humanize_file_time (guint64 file_time
,ThunarDateStyle date_style
,const gchar *date_custom_style
);
Returns a human readable date representation of the specified
file_time
. The caller is responsible to free the returned
string using g_free()
when no longer needed.
GdkScreen * thunar_util_parse_parent (gpointer parent
,GtkWindow **window_return
);
Determines the screen for the parent
and returns that GdkScreen.
If window_return
is not NULL
, the pointer to the GtkWindow is
placed into it, or NULL
if the window could not be determined.
time_t
thunar_util_time_from_rfc3339 (const gchar *date_string
);
Decodes the date_string
, which must be in the special RFC 3339
format YYYY-MM-DDThh:mm:ss
. This method is
used to decode deletion dates of files in the trash. See the
Trash Specification for details.
gchar *
thunar_util_change_working_directory (const gchar *new_directory
);
gchar * thunar_util_next_new_file_name (ThunarFile *dir
,const gchar *file_name
,ThunarNextFileNameMode name_mode
);
Returns a filename that is like file_name
with the possible addition of
a number to differentiate it from other similarly named files. In other words
it searches dir
for incrementally named files starting from file_name
and returns the first available increment.
e.g. in a folder with the following files:
file
empty
file_copy
Calling this functions with the above folder and file_name
equal to 'file' the returned
filename will be 'file 1' for the mode "new file".
The caller is responsible to free the returned string using g_free()
when no longer needed.
gchar * thunar_util_strjoin_list (GList *string_list
,const gchar *separator
);
Joins a number of strings together to form one long string, with the optional separator
inserted between each of them. It skips all the NULL values passed in the list. The returned
string should be freed with g_free()
.
Similar to g_strjoin()
.
The caller is responsible to free the returned text using g_free()
when it is no longer needed