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 () |
guint64 | thunar_util_get_file_time () |
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 () |
gchar * | thunar_util_next_new_file_name_raw () |
const char * | thunar_util_get_search_prefix () |
gboolean | thunar_util_is_a_search_query () |
gchar * | thunar_util_strjoin_list () |
void | thunar_util_clip_view_background () |
gchar ** | thunar_util_split_search_query () |
gboolean | thunar_util_search_terms_match () |
gboolean | thunar_util_save_geometry_timer () |
gchar * | thunar_util_get_statusbar_text_for_files () |
gchar * | thunar_util_get_statusbar_text_for_single_file () |
gchar * | thunar_util_accel_path_to_id () |
#define | ALPHA_BACKDROP |
#define | ALPHA_FOCUSED |
#define | STACK_ALLOC_LIMIT |
#define | MAX_EMBLEMS_PER_FILE |
enum | ThunarNextFileNameMode |
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.
guint64 thunar_util_get_file_time (GFileInfo *file_info
,ThunarFileDateType date_type
);
Queries the given date_type
from file_info
and returns the result.
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
,gboolean is_directory
);
gchar * thunar_util_next_new_file_name_raw (GList *file_list
,const gchar *file_name
,ThunarNextFileNameMode name_mode
,gboolean is_directory
);
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
void thunar_util_clip_view_background (GtkCellRenderer *cell
,cairo_t *cr
,const GdkRectangle *background_area
,GtkWidget *widget
,GtkCellRendererState flags
);
gchar ** thunar_util_split_search_query (const gchar *search_query_normalized
,GError **error
);
Search terms are split on whitespace. Search queries must be normalized before passing to this function.
See also: thunar_g_utf8_normalize_for_search()
.
gboolean thunar_util_search_terms_match (gchar **terms
,gchar *str
);
All search terms must match. Thunar uses simple substring matching
for the broadest multilingual support. str
must be normalized before
passing to this function.
See also: thunar_g_utf8_normalize_for_search()
.
terms |
The search terms to look for, prepared with |
|
str |
The string which the search terms might be found in. |
gchar * thunar_util_get_statusbar_text_for_files (GHashTable *files
,gboolean show_hidden
,gboolean show_file_size_binary_format
,ThunarDateStyle date_style
,const gchar *date_custom_style
,guint status_bar_actve_info
);
Generates the statusbar text for the given files
.
The caller is reponsible to free the returned text using
g_free()
when it's no longer needed.
files |
list of ThunarFiles for which a text is requested |
|
show_hidden |
whether hidden files are shown |
|
show_file_size_binary_format |
whether the file size should be displayed in binary format |
|
date_style |
the ThunarDateFormat used to humanize the |
|
date_custom_style |
custom style to apply, if |
gchar *
thunar_util_get_statusbar_text_for_single_file
(ThunarFile *file
);