summaryrefslogtreecommitdiff
path: root/libcaja-private
AgeCommit message (Collapse)AuthorFilesLines
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
2018-10-03Caja-icon-info: Optimize icon lookups by GIcon.lukefromdc2-149/+74
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-08-01add the ability to switch tabs using [ctrl+tab] and [ctrl+shift+tab]Pablo Barciela1-0/+5
If true the gsettings key "ctrl-tab-switch-tabs" into "org.mate.caja.preferences" Closes https://github.com/mate-desktop/caja/issues/768
2018-07-15caja-desktop-directory: stop segfaults in directory_ready_callbacklukefromdc1-0/+4
Prevent segfault on g_list_find in directory_ready_callback by catching the NULL case
2018-07-12caja-directory.c: fix build warninglukefromdc1-31/+0
Remove two functions now unused after github.com/mate-desktop/caja/commit/191aa3992171c84134f0359a960e5bebc7bfeca4 "libcaja-private: remove redundant prefs application to hash table "
2018-07-11libcaja-private: remove redundant prefs application to hash tablelukefromdc1-47/+0
These preferences are all applied elsewhere and all work without this. Removing it stops the g_hash_table_foreach warnings with GTK 3.23.0
2018-07-11[desktop-bg] Fix memory leak during background change eventsLars R. Damerow1-2/+5
The string returned by eel_bg_get_desktop_color() needs to be freed by the caller, which wasn't happening before. Commit b9cf3667 fixed the case where this function was being called repeatedly, triggering this leak and causing it to rapidly fill system memory.
2018-06-07caja-progress-info.c: show notifications in begin/end of progressPablo Barciela1-4/+18
2018-06-07caja-progress-info.c: avoid deprecated 'gtk_status_icon_get_visible'Pablo Barciela1-2/+5
2018-06-04avoid deprecated 'gtk_window_set_wmclass'Pablo Barciela2-4/+2