summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-24fix gfile sort and symlink warnings w glib2.76 or laterlukefromdc1-2/+3
*Use code borrowed from Nemo
2023-05-13caja-file: fix future informal date bugStefan Pöschel1-4/+4
If informal date format is used, for future dates the today time format has been used by mistake, instead of the general time format.
2023-05-07caja-file: fix yesterday/today informal date bugStefan Pöschel1-2/+8
If informal date format is used, the yesterday/today ranges of 48/24 hours apply to the end of the current day, not to the current instant. Fixes a regression introduced by 476f56a25be636970b336d525a7766b6d1eb3fff. Fixes #1621.
2022-02-09Fix implicit conversion changes signedness: 'gboolean' to 'guint'rbuj1-23/+23
2022-02-09Fix some -Wsign-compare warningsrbuj1-2/+2
2021-11-20Use a blank line at mostrbuj1-37/+0
2021-11-11caja-file: Remove unreachable coderbuj1-1/+0
2021-04-20Add creation time supportrbuj1-2/+31
2021-03-11keep one .desktop suffix on desktop file renamingKonstantin Unruh1-1/+4
2020-11-11Remove unused macrosPablo Barciela1-6/+0
2020-05-24caja-file: remove warning GTimeVal is deprecatedrbuj1-1/+13
2020-04-13Fix -Wmissing-prototypes build warningsPablo Barciela1-1/+1
2019-12-15libcaja-private/caja-file: redundant conditionrbuj1-4/+3
'!A || (A && B)' is equivalent to '!A || B'
2019-07-10Replace gdkpixbuf with cairo_surfaces in a few more placesVictor Kareh1-21/+0
2019-07-05Render file-conflict icons as cairo_surface vectorsVictor Kareh1-0/+21
2019-06-18Remove trailing whitespacesrbuj1-10/+10
find . -regextype posix-extended -regex '.*\.(c|h|ac|txt|xml)' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
2019-06-11Change URL prefixes from http to httpsrbuj1-1/+1
2019-05-06libcaja-private: reduce the scope of some variablesPablo Barciela1-57/+89
2019-05-04eel: remove date & time functionsrbuj1-25/+23
Do not need to extend glib library, since it now incorporates these functions. Extended date format modifiers are available on glib v2.56. eel-glib-extensions.h/c: GDate * eel_g_date_new_tm (struct tm *time_pieces); char * eel_strdup_strftime (const char *format, struct tm *time_pieces); gint64 eel_get_system_time (void); Do not need to test the extensions in eel_self_check_glib_extensions (void). eel-glib-extensions.c: static void check_tm_to_g_date (time_t time) static char * test_strftime (...) Do not need to check if strftime implements extended date format modifiers on the system (available on glibc v2.27). configure.ac
2019-04-12local #include files who are libraries inside <> instead ""Pablo Barciela1-10/+10
2019-04-10local #include files inside "" instead <>Pablo Barciela1-26/+26
2019-04-10caja-file: avoid shifting signed 32-bit value by 31 bitsPablo Barciela1-1/+1
Fixes cppcheck warnings: [libcaja-private/caja-file.c:288]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour [libcaja-private/caja-file.c:334]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour [libcaja-private/caja-file.c:386]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour [libcaja-private/caja-file.c:3789]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
2019-03-29eel: replace eel_ref_str with GRefStringrbuj1-81/+79
GNOME/nautilus@b4d200f https://developer.gnome.org/glib/stable/glib-Reference-counted-strings.html
2019-03-24caja-file: Fix incomplete file replacement dialogPablo Barciela1-9/+5
Fixes https://github.com/mate-desktop/caja/issues/1183
2019-03-22caja-file: Fix: true and false branches are identicalPablo Barciela1-2/+0
Fixes Clang static analyzer warning: caja-file.c:4858:9: warning: true and false branches are identical } else if (file_date_age < 7) { ^
2019-03-07eel: remove g_str_list_copyrbuj1-2/+2
GNOME/nautilus@61e2aff Replace eel_g_str_list_copy(Glist *list) with g_list_copy_deep (list, (GCopyFunc) g_strdup, NULL)
2019-03-06caja-file: Fix use of memory after it is freedPablo Barciela1-7/+13
to avoid warning with Clang Analyzer
2019-01-31Avoid deprecated g_type_class_add_private under libcaja-privateWu Xiaotian1-3/+2
Changed CajaFileConflictDialog and CajaFile
2019-01-03[libcaja-private] Re-check file MIME type before picking an application.Max Eliaser1-0/+18
An example of when the MIME type might change: a file is initially created with 0 bytes of content, but more data is added later. Empty files are always detected as plain text, but the file might not be empty anymore when the user opens it. This commit affects the behavior when double-clicking a file and when right- clicking on it too.
2018-12-27Minor code-quality enhancementsSargastic1-6/+6
2018-12-27Forgot to initialize is_backup fieldSargastic1-0/+1
2018-12-27Add independent show/hide backup filesSargastic1-8/+22
2018-11-02CajaFile: fix crash in modify_link_hash_tableMichael Catanzaro1-1/+1
We crash in g_hash_table_lookup_extended if the file's symlink_name is set but the file is not a symlink, since the hash function (g_str_hash) does not allow NULL values but target_uri is NULL. https://bugzilla.gnome.org/show_bug.cgi?id=711583 Adapted from https://gitlab.gnome.org/GNOME/nautilus/commit/c2a5e052
2018-10-03Caja-icon-info: Optimize icon lookups by GIcon.lukefromdc1-9/+7
The caja_icon_info_lookup method was potentially doing multiple icon lookups for a single icon, as well as triggering an additional fallback lookup when returning an empty (no pixbuf) CajaIconInfo to CajaFile. This streamlines and simplifies the lookup process. The hash table lookup always occurs first, before any Gtk icon cache lookup is made (these are expensive, according to perf analysis,) and a returned icon info will *always* be added to a hash table, potentially already containing a fallback icon. GIcons stringify well enough to use the strings exclusively for hash keys. This eliminates the extra cost of looking up filenames from the Gtk icon cache. Ported from github.com/linuxmint/nemo/commit/98843e26b48cd3526cacfe90cfa4ba201d1f3aee where this benchmark resulted for Nemo: .# sync; echo 3 > /proc/sys/vm/drop_caches mtwebster:~/bin/nemo[master]> NEMO_BENCHMARK_LOADING=1 nemo /usr/bin with: Nemo startup time: 2.011817 seconds Folder load time: 1.158854 seconds Idle...Folder load time: 1.226699 seconds without: Nemo startup time: 2.464361 seconds Folder load time: 1.591494 seconds Idle...Folder load time: 1.692273 seconds
2018-04-08Add sort criterion by reversed extension segmentsMoritz Bruder1-0/+200
The basenames of files are split by dots and then starting from the end each segment is compared to find a sort order. Example: bar.tar.bz2 foo.tar.bz2 a.bar.gz x.tar.gz z.tar.gz test.tex A heuristic determines what extension segments are part of the extension. There is probably no perfect solution but there are much less false positives. As a result the sorting is more intuitive and the displayed column in the list view is better readable and displays extensions more accurately. In addition a bug related to the default sort criteria in the preferences has been fixed.
2018-04-04file: support HiDpi for thumbnails imagesCosimo Cecchi1-3/+3
This was missing from the last commit. origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/b3b4bea5
2018-04-04Support HiDpi iconsCosimo Cecchi1-15/+17
Port the rendering of icons to cairo surfaces, so that we can apply the GDK scale factor when rendering icons. origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/0d4555d7
2017-05-25added feature: present the size on disk of files as we present the size of ↵Felipe Barriga Richards1-38/+165
the file.
2017-04-20file: make caja_file_get_gicon return custom icons too (#765)monsta1-0/+5
fixes https://github.com/mate-desktop/caja/issues/410 taken from: https://git.gnome.org/browse/nautilus/commit/?id=f1c782c13dd675bafffb2a4d85900da52be88f3f
2017-04-18don't parse .hidden files manually - GIO does it since 2.36monsta1-10/+1
taken from: https://git.gnome.org/browse/nautilus/commit/?id=ace6d2c2170028148785f3fa87eedf883f20f1dd GIO commit for reference: https://git.gnome.org/browse/glib/commit/?id=510ba9b4efe1813e24c6dfa7405c3547bf9efdd7
2016-12-29file: don't consider all desktop files caja linkslukefromdc1-3/+6
Only those which match application/x-desktop directly. Apply Nautilus commit https://github.com/GNOME/nautilus/commit/b241fd28913e87fe01419e4922259949a11c973f
2016-10-10Fix hashtable warnings on closelukefromdc1-2/+1
As in Nautilus, use g_hash_table_new rather than eel_g_hash_table_new_free_at_exit
2016-08-22drop a large amount of completely unused codemonsta1-29/+0
2016-07-12libcaja-private: drop some more unused codemonsta1-17/+0
2016-02-07fix crash when restoring file with special characters from trashmonsta1-6/+2
for example, a file named simply "%s" taken from: https://git.gnome.org/browse/nautilus/commit/?id=d69885bd67edc1fae76c790f6162807817d63b2f
2015-12-22drop source files that aren't used for yearsmonsta1-1/+0
2015-09-17use standard defines for "trash::" attributesmonsta1-2/+2
2015-01-13drop support for GLib < 2.36Monsta1-39/+21
Closes https://github.com/mate-desktop/caja/pull/372
2014-12-10zero-init all signals arraysMonsta1-1/+1
2014-12-10added checks for NULL pointer where it's neededMonsta1-1/+1