summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-container.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-17Manage desktop backgrounds when running in waylandlukefromdc1-0/+13
*Draw the background on the desktop window, using the same code as on navigation windows to bypass the no-root-window issue. *Works from caja's "Change Desktop Background" menu item, from caja-extensions "set as wallpaper" and with changing the background in dconf-editor. *All background options available in x11 supported in wayland, UI is new for wayland *Apply changes immediately, keep the dialog open until closed by user *Let users see changes in realtime while keeping the dialog open *Preview both colors and pictures *Add ability to apply changes from either combobox including using any image saved from when dialog was opened *Add tooltips to the buttons, filepicker, and comboboxes
2023-07-04ensure all of the desktop is usable in x11lukefromdc1-32/+50
*revert x11 icon position handling to the older and well tested code *use the newer code only in wayland where all the screen can already be used
2023-05-25caja-icon-container.c: Set a transient parent on the interactivelukefromdc1-9/+7
search popup This gets mis-handled in wayland as a standalone window and is treated as such (like getting tiled next to the main caja window). Ported over from Nemo
2023-05-25Initial wayland supportlukefromdc1-17/+24
2022-12-23icon view: Fix positioning overflowing icons on the desktopColomban Wendling1-14/+7
Properly update the icon data before placing the icon, because positioning might depend on full icon contents on the desktop, whereas updating contents don't care about position. When an icon position overflows the desktop area, it is clamped to stay in the visible area, but this computation depends on accurate icon and label sizes, which is only available when the icon is fully loaded. Fix the code to first load the contents and then position instead of the other way around, which was actually trivial. Note that visible positions were most often correct anyway for two reasons: 1. Most of the time icons do not overflow, as they are positioned on the final desktop size anyway. It however can easily happen reducing monitor resolution or increasing desktop view zoom. 2. A second layout pass happens most of the time (I'm not yet sure why and when though), but not when an update is triggered before the previous one terminated (e.g. quickly hitting F5 twice).
2022-11-23icon view: Refresh icon positions for manual layout on zoom change (#1676)Colomban Wendling1-10/+34
When zoom changes on a manual layout icon view, the available area changes and can lead to some icons to either overflow or be able to go back to their actually saved position. This is done correctly when the view is reloaded entirely, but not in response to zoom change, leading to disappearing icons (when zoom increases) or unexpected empty space (when zoom decreases). Fix this by re-computing actual positions based on saved positions when zoom changes, to match what would actually happen when the view gets loaded.
2022-07-22Fix build warning -Wbad-function-castrbuj1-2/+3
2022-02-09Fix implicit conversion changes signedness: 'gboolean' to 'guint'rbuj1-3/+3
2021-11-20Use a blank line at mostrbuj1-23/+0
2021-04-13icon view: Add a directory setting to block moving iconsColomban Wendling1-1/+16
This is mostly useful on the desktop (which is the main user of the free-placement icon view) to be able to lock the layout and avoid unintentionally moving icons around. Especially useful for less computer-literate users.
2020-11-29caja-icon-container: warning -Wold-style-declarationrbuj1-1/+1
2020-11-11Remove unused macrosPablo Barciela1-18/+0
2020-08-28eel-editable-label: Consecutive break/return statements are unnecessaryrbuj1-2/+2
2019-11-30avoid redundant redeclarationsPablo Barciela1-8/+8
2019-05-06libcaja-private: reduce the scope of some variablesPablo Barciela1-57/+76
2019-05-04eel: remove date & time functionsrbuj1-2/+2
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-11/+11
2019-04-10local #include files inside "" instead <>Pablo Barciela1-18/+19
2019-03-05caja-icon-container: Fix use of memory after it is freedPablo Barciela1-2/+2
to avoid warning with Clang Analyzer
2019-02-06Add --disable-self-check for configureWu Xiaotian1-5/+1
Fixed make distcheck, see #1129
2018-05-20icon-container: avoid deprecated 'gtk_style_context_get_border_color'Pablo Barciela1-2/+7
2018-05-05avoid deprecated 'gtk_style_context_get_background_color'Pablo Barciela1-1/+7
2018-05-03Eliminate accessible children-changed event flood on container repopulationJoanmarie Diggs1-2/+4
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 Diggs1-0/+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-04Scale screen dimensionsVictor Kareh1-6/+12
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-01-31require GTK+ 3.22 and GLib 2.50monsta1-67/+2
2017-12-16WidthOfScreen and HeightOfScreen implementationPablo Barciela1-22/+8
This commit reverts: https://github.com/mate-desktop/caja/commit/4c130e22b98bbc1a85747adac3b582e45d34514e https://github.com/mate-desktop/caja/commit/ac12e6d16f4a51b3327d013781e72cfec17f3624 https://github.com/mate-desktop/caja/commit/17b3c0ca924ffcd4bd06fded98227eba626d4f0b https://github.com/mate-desktop/caja/commit/42c8d2c3373c25d6e321be6950997c0d7ce44279 And it applies an alternative to fix the deprecated functions: gdk_screen_get_width gdk_screen_get_height gdk_screen_width gdk_screen_height
2017-08-25gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions:ZenWalker1-0/+10
avoid deprecated: gdk_screen_get_monitor_geometry gdk_screen_get_monitor_at_window
2017-08-12avoid deprecated gdk_screen_width/heightZenWalker1-2/+7
2017-08-12avoid deprecated gdk_screen_get_width/heightZenWalker1-6/+15
2017-04-19Expand grid width to canvasraveit651-1/+6
Minimum of one column taken from: https://github.com/linuxmint/nemo/commit/78d4a4f https://github.com/linuxmint/nemo/commit/21ea094 fix
2017-04-13Add size_request to IconContainer to work around unncecessaryraveit651-0/+64
relayouting The GtkScrolledWindow uses the widget prefered size as a guess as to whether scrollbars are needed or not in the automatic scrollbars case. If we don't report anything for them we typically get it wrong and cause two size allocate calls on the child each time, with different sizes. This (the two sizes speicifically) will cause unnecessary relayouts of the window. So, we just report the current size of the layed out icons as the prefered size. This is somewhat wrong as its depending on previous size_allocation calls rather than the "ideal" size of the widget, but since the ideal size is ignored anyway and just used for this it works well. taken from: https://git.gnome.org/browse/nautilus/commit/?id=fa6e447
2017-03-13eel: Avoid deprecated gdk_window_set_background functionsAlexei Sorokin1-2/+15
Fixes partially #506, fixes compiz-reloaded/compiz#40.
2017-03-13Revert "GTK3.21:fix desktop redraw"Alexei Sorokin1-7/+0
2017-01-27Rename method to reflect its altered functionalityLuke Yelavich1-4/+4
2017-01-27Replace other instances of atk_focus_tracker_notify with appropriate ↵Luke Yelavich1-5/+5
atk_set_state calls
2017-01-06remove some unused code that's also gone upstreammonsta1-14/+0
2017-01-02Fix keyboard-down wraparound on compact viewlukefromdc1-26/+22
Fix https://github.com/mate-desktop/caja/issues/671 Apply https://git.gnome.org/browse/nautilus/commit/?id=40be4b85f51fc7b192ef7421b2ede27954997cc8
2016-12-29fix indent and spacing a bitmonsta1-11/+11
2016-12-29check for stable version of GTK+3, not for development onemonsta1-3/+3
2016-11-22move to GTK+3 (>= 3.14), drop libunique, GTK+2 code, and --with-gtk build ↵lukefromdc1-757/+5
option *Remove GTK_VERSION_CHECK (3, 0, 0) and libunique selectors *Remove GTK2 and libunique specific code. *Leaves selector for specific GTK3 versions. *Remove #DEFINES for vbox/hbox previously required for GTK2 compatability *Keep vbox in caja-spatial-window.c, it is necessary for the desktop to work *spatial-window vbox issue at https://github.com/mate-desktop/caja/issues/591
2016-10-16GTK+2: use eel helper again to set adjustment valuesraveit651-0/+36
This reverts https://github.com/mate-desktop/caja/commit/1f7ab5d for gtk2 Fixes https://github.com/mate-desktop/caja/issues/659
2016-10-16support back and forward mouse buttons to navigateMartin Matuska1-0/+10
Fixes https://github.com/mate-desktop/caja/issues/78 Co-Authored-By: Oliver Joos <[email protected]> Co-Authored-By: Nelson Benitez Leon <[email protected]>
2016-10-11Fix accessible object inherritance when used with GTK 3Luke Yelavich1-0/+57
Also disable eel accessibility code that is not needed. Fixes https://github.com/mate-desktop/caja/issues/590
2016-08-04GTK3.21:fix desktop redraw (caja-icon-container.c)lukefromdc1-3/+7
2016-07-06icon-container: don't use eel helper to set adjustment valuesraveit651-15/+10
taken from: https://git.gnome.org/browse/nautilus/commit/?id=3a9c6cd
2016-07-04Gtk+-3.20 eel-canvas: use GdkSeat operationsraveit651-0/+39
Some GdkDisplay operations have been deprecated in GDK 3.20. This commit replaces the deprecated code in eel_canvas_item_grab() and eel_canvas_item_ungrab() functions with new GdkSeat operations. https://bugzilla.gnome.org/show_bug.cgi?id=762235 taken from: https://git.gnome.org/browse/nautilus/commit/?id=225f2cf
2016-07-04GTK+-3.20 caja-icon-container: use GdkSeat operationsraveit651-1/+11
Some GdkDisplay operations have been deprecated in GDK 3.20. This commit replaces the deprecated code with new GdkSeat operations. https://bugzilla.gnome.org/show_bug.cgi?id=762235 taken from: https://git.gnome.org/browse/nautilus/commit/?id=202a66f