summaryrefslogtreecommitdiff
path: root/libcaja-private
AgeCommit message (Collapse)AuthorFilesLines
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
2018-06-02caja-bookmark.c: drop unused variablePablo Barciela1-1/+0
Fixes https://github.com/mate-desktop/caja/pull/1001#issuecomment-394072477
2018-05-23caja-bookmark.c: Fix icons in bookmarksPablo Barciela1-16/+10
Fixes https://github.com/mate-desktop/caja/pull/962#issuecomment-389114129
2018-05-20icon-container: avoid deprecated 'gtk_style_context_get_border_color'Pablo Barciela1-2/+7
2018-05-18avoid deprecated 'gtk_dialog_get_action_area'Pablo Barciela1-5/+6
2018-05-16use NULL instead of uninitialized variablemonsta1-4/+2
follow-up to ddf6f38db4e842abecd4f2ee77012050822b3775
2018-05-07Replace deprecated gtk_menu_popupraveit651-4/+4
Replace deprecated gtk_menu_popup in eel-editable-label,caja-dnd, emblem-sidebar,caja-side-pane, fm-tree-view, caja-navigation-window-pane, and caja-zoom-control
2018-05-07libcaja-private: replace deprecated gdk_error_trap functionsraveit651-4/+6
replace gdk_error_trap_push gdk_error_trap_pop_ignored
2018-05-07libcaja-private: fix -Wlogical-not-parentheses build warningraveit651-1/+1
fixes this warning: caja-undostack-manager.c: In function 'retrieve_files_to_restore': caja-undostack-manager.c:1967:38: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!(g_hash_table_size (trashed)) > 0) { ^ caja-undostack-manager.c:1967:7: note: add parentheses around left hand side expression to silence this warning if (!(g_hash_table_size (trashed)) > 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ( )
2018-05-05avoid deprecated 'gtk_style_context_get_background_color'Pablo Barciela2-3/+17
2018-05-03Eliminate accessible children-changed event flood on container repopulationJoanmarie Diggs2-2/+5
When the icon container is repopulated (e.g. when using back/forward) finish_adding_new_icons is called leading to an accessible children- changed event flood. We can distinguish these unwanted notifications from desired notifications by comparing the number of new icons to add with the size of the container's icon set.
2018-04-24Eliminate accessible children-changed event flood during update allJoanmarie Diggs1-0/+6
Accessible children-changed events should only be emitted when a user- triggered action (creation of file, copying an item) causes an item to be added. Set container->details->is_loading (which does not seem to be used anywhere) in caja_icon_container_request_update_all because if the entire container is being updated, children-changed events should not be emitted for each updated icon.
2018-04-24Emit accessible-name-change signal for icons only when icons are renamedJoanmarie Diggs2-1/+4
caja_icon_canvas_item_set_property was emitting accessible-name-change signals whenever the PROP_EDITABLE_TEXT was being set for an icon. This method is called by caja_icon_container_request_update_all when the icon view is first loaded. Thus irrelevant events are being emitted (the name of each icon didn't change, as far as the user is concerned). Furthermore, this floods assistive technologies any time the user opens a folder with a large number of files. Moving the notification out of caja_icon_canvas_item_set_property and into end_renaming_mode (where ICON_TEXT_CHANGED is also emitted) solves the problem of floods of irrelevant notifications while still emitting the signal when the name actually changes.
2018-04-23libcaja-private/caja-recent.c: gvfs-open is a deprecated tool, switch to ↵Mike Gabriel1-1/+1
"gio open" from libglib2.0-bin.
2018-04-08Add sort criterion by reversed extension segmentsMoritz Bruder4-1/+210
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-08set icon names instead stock ids in some placesPablo Barciela1-2/+2
2018-04-06Fix warnings from HiDPI commitslukefromdc2-1/+4
*caja-pathbar: fix warning,and in the process maybe fix occasional segfaults on opening mounted volumes from the desktop *caja-icon-info: Stop gdk_cairo_surface_create_from_pixbuf: assertion 'GDK_IS_PIXBUF (pixbuf)' failed warning by handling NULL return from function finding the pixbuf caja-icon-canvas-item-c: do not use g_object_unref where it does not work Stop the g_object_unref: assertion 'G_IS_OBJECT (object)' failed warnings on closing icon views
2018-04-04HiDPI: Convert Pixbufs to Cairo SurfacesVictor Kareh8-106/+195
This allows icons in most places to scale up properly for HiDPI displays.
2018-04-04Scale screen dimensionsVictor Kareh1-6/+12
2018-04-04icon-info: hash/store icons using scale factor as well as sizeLionel Landwerlin1-6/+18
Otherwise we might pick up an icon at an invalid size for a given scale. https://bugzilla.gnome.org/show_bug.cgi?id=776896 origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/53cee1de
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 Cecchi11-122/+177
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
2018-04-04canvas-container: listen to scale factor to invalidate iconsLionel Landwerlin1-0/+12
This is one of the condition that needs to trigger an invalidation to recompute layout at the correct size. https://bugzilla.gnome.org/show_bug.cgi?id=776896 origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/b257699e
2018-04-04canvas-item: use gtk_render_icon_surface for the DnD surfaceCosimo Cecchi1-3/+8
So to get HiDpi support. origin commit: https://gitlab.gnome.org/GNOME/nautilus/commit/31059f33
2018-03-31caja-bookmark: avoid deprecated GtkImageMenuItemPablo Barciela1-13/+37
avoid deprecated: gtk_image_menu_item_new_with_label gtk_image_menu_item_set_image