summaryrefslogtreecommitdiff
path: root/libcaja-private
AgeCommit message (Collapse)AuthorFilesLines
2019-05-06libcaja-private: reduce the scope of some variablesPablo Barciela44-476/+794
2019-05-04eel: remove date & time functionsrbuj4-29/+27
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-14caja-file-utilities: Fix cast from non-struct type to struct typePablo Barciela1-1/+1
Fixes Clang static analyzer warning: caja-file-utilities.c:283:12: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption return (XdgDirEntry *)g_array_free (array, FALSE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-04-12local #include files who are libraries inside <> instead ""Pablo Barciela55-141/+143
2019-04-12eel: remove eel_g_object_list_refrbuj1-1/+1
2019-04-10drop functions defined but not usedPablo Barciela1-9/+0
2019-04-10local #include files inside "" instead <>Pablo Barciela87-381/+450
2019-04-10caja-icon-canvas-item: avoid 'cppcheck' warningPablo Barciela1-14/+13
Fixes 'cppcheck' warning: [libcaja-private/caja-icon-canvas-item.c:850]: (error) Uninitialized variable: real_text_height
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-04-08caja-icon-canvas-item: initialize variable 'scale'Pablo Barciela1-1/+1
Fixes cppcheck warning: [libcaja-private/caja-icon-canvas-item.c:517]: (error) Uninitialized variable: scale
2019-04-05caja-file-operations: make sure 'error' isn't NULLPablo Barciela1-2/+2
Fixes Clang static analyzer warnings: caja-file-operations.c:2165:7: warning: Access to field 'code' results in a dereference of a null pointer (loaded from variable 'error') if (error->code != G_IO_ERROR_FAILED_HANDLED) { ^~~~~~~~~~~ caja-file-operations.c:5448:14: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') details = error->message; ^~~~~~~~~~~~~~
2019-04-03caja-open-with-dialog: make sure there is error before showing itPablo Barciela1-2/+5
Fixes Clang static analyzer warning: caja-open-with-dialog.c:252:100: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') message = g_strdup_printf (_("Could not add application to the application database: %s"), error->message); ^~~~~~~~~~~~~~
2019-03-30caja-progress-info: make sure argument is initializedPablo Barciela1-3/+3
Fixes Clang static analyzer warning: caja-progress-info.c:626:17: warning: 1st function call argument is an uninitialized value g_notification_set_body (notification, _("Process completed")); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-03-29eel: replace eel_ref_str with GRefStringrbuj5-95/+93
GNOME/nautilus@b4d200f https://developer.gnome.org/glib/stable/glib-Reference-counted-strings.html
2019-03-29eel: remove g_object_list_copyrbuj2-6/+6
GNOME/nautilus@7af24a8 Replace GList * eel_g_object_list_copy (GList *list) with g_list_copy_deep (list, (GCopyFunc) g_object_ref, NULL)
2019-03-24caja-file: Fix incomplete file replacement dialogPablo Barciela1-9/+5
Fixes https://github.com/mate-desktop/caja/issues/1183
2019-03-24caja-autorun: avoid NULL in 'memcpy'Pablo Barciela1-1/+4
Fixes Clang static analyzer warning: caja-autorun.c:139:5: warning: Null pointer passed as an argument to a 'nonnull' parameter memcpy (r, v, len * sizeof (char *)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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-22caja-file-operations: add comment with false positive warning:Pablo Barciela1-0/+8
False positive warning with Clang static analyzer: caja-file-operations.c:958:11: warning: Cast a region whose size is not a multiple of the destination type size common = g_malloc0 (job_size); ^~~~~~~~~~~~~~~~~~~~
2019-03-07eel: remove g_str_list_copyrbuj3-7/+7
GNOME/nautilus@61e2aff Replace eel_g_str_list_copy(Glist *list) with g_list_copy_deep (list, (GCopyFunc) g_strdup, NULL)
2019-03-07avoid variables set but not usedPablo Barciela5-13/+2
2019-03-06caja-file: Fix use of memory after it is freedPablo Barciela1-7/+13
to avoid warning with Clang Analyzer
2019-03-05caja-icon-container: Fix use of memory after it is freedPablo Barciela1-2/+2
to avoid warning with Clang Analyzer
2019-03-04caja-tree-view-drag-dest: Fix memory leakPablo Barciela1-0/+1
to avoid warning with Clang Analyzer
2019-03-04[Security] Use 'g_strlcpy' instead of 'strcpy'Pablo Barciela1-3/+3
to avoid warnings with Clang Analyzer
2019-03-04drop unused variablesPablo Barciela3-4/+0
2019-02-06Add --disable-self-check for configureWu Xiaotian1-5/+1
Fixed make distcheck, see #1129
2019-02-02Fix incompatible pointer typesVictor Kareh1-2/+2
2019-01-31Avoid deprecated g_type_class_add_private under libcaja-privateWu Xiaotian5-45/+29
Changed CajaIconCanvasItem, CajaTrashMonitor and CajaUndoStackManager
2019-01-31Avoid deprecated g_type_class_add_private under libcaja-privateWu Xiaotian6-30/+27
Changed CajaFileConflictDialog and CajaFile
2019-01-31Avoid deprecated g_type_class_add_private under libcaja-privateWu Xiaotian5-63/+76
Changed CajaDesktopLink, CajaDirectoryAsync and CajaDirectory
2019-01-31Avoid deprecated g_type_class_add_private under libcaja-privateWu Xiaotian6-27/+15
Changed CajaClipboardMonitor, CajaColumnChooser and CajaDesktopIconFile
2019-01-29Fix compile warningWu Xiaotian2-3/+1
Remove unused variables, avoid uninitialized variable warnings, and indent code.
2019-01-28Fixed the value of 6 month and 1 year.Wu Xiaotian3-21/+18
2019-01-28Support querying files by modification time and sizeWu Xiaotian3-18/+91
Thanks for Leslie Zhai's patch.
2019-01-03[libcaja-private] Re-check file MIME type before picking an application.Max Eliaser3-0/+30
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-27Fix: weird item in bookmarks if the folder was removedPablo Barciela1-2/+7
Fixes https://github.com/mate-desktop/caja/issues/1099
2018-12-27Minor code-quality enhancementsSargastic2-6/+7
2018-12-27Forgot to initialize is_backup fieldSargastic1-0/+1
2018-12-27Remove useless comments, correct description stringSargastic1-1/+1
2018-12-27Skip hidden files only, not backupsSargastic1-3/+1
2018-12-27Add independent show/hide backup filesSargastic11-14/+83
2018-12-27caja-progress-info: new behavior with notifications:Pablo Barciela1-10/+3
- remove the "Working..." notification - show the "Process completed" notification only if the progress window is inactive
2018-12-27caja-progress-info: show notifications with the gsettings key:Pablo Barciela2-8/+22
org.mate.caja.preferences.show-notifications Closes https://github.com/mate-desktop/caja/issues/1093
2018-12-01caja-bookmark: Fix memory leakPablo Barciela1-1/+4
'g_strconcat' needs to be freed
2018-12-01caja-desktop-link-monitor: Fix memory leakPablo Barciela1-4/+5
'g_strconcat' needs to be freed
2018-11-17GSettings should init beforce use it.yetist1-0/+1
Fixed running caja_self_check_directory failed.
2018-11-02monitor: fix crash on unmounting remote filesystemslukefromdc1-2/+2
Don't treat remote filesystems differently when unmounting
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-20monitor: watch for removal of non-native mounts on GVolumeMonitorlukefromdc3-10/+96
Fix https://github.com/mate-desktop/caja/issues/1066 "Caja caches folders from usb drives/disk" Nowadays, we rely on G_FILE_MONITOR_EVENT_UNMOUNTED to be emitted when a mount disappears, since we already monitor the directory, in order to switch the view to a different location. Since non-native mounts very likely won't have file monitoring though, we're not going to receive such events in that case, and fail to redirect the view as a consequence. This patch fixes it by listening to the mount-removed signal on GVolumeMonitor when a monitor is requested for a non-native mount, and emulating a file removal in that case. Backport Nautilus commit gitlab.gnome.org/GNOME/nautilus/commit/3891241ba760c59d284b7579dbd340651c8d4d29 note that caja_get_mounted_mount_for_root had to be added, while the equivalent Nautilus function was from a prior commit