summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-canvas-item.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-09Fix implicit conversion changes signedness: 'gboolean' to 'guint'rbuj1-13/+13
2021-11-20Remove whitespaces before #define, #if, and #endifrbuj1-10/+10
2021-11-20Use a blank line at mostrbuj1-12/+0
2019-11-22canvas-item: Don't hyphenate filenamesraveit651-0/+22
fixes https://github.com/mate-desktop/caja/issues/1284 Pango 1.44 got the ability to automatically hyphenate on line breaks, which is on by default, but can be set off by a new attribute. As a result, we now hyphenate filenames, which is confusing, because a filename may already include hyphens. To restore the previous behavior, let's not insert hyphens when breaking filenames in multiple lines. Inspired by https://gitlab.gnome.org/GNOME/nautilus/commit/9738d85
2019-06-30desktop: Always draw the items label frameColomban Wendling1-12/+16
Draw the frame under the items label even when not selected and not in prelight state, so that it is possible to theme it in the other states. However we still don't draw it when editing, because there is the editing widget frame already and drawing the label's one might slightly overflow the editing widget's borders and lead to slightly ugly results. Being able to draw a background is especially useful for accessibility purposes (e.g. a high contrast theme would typically make sure there is a background with enough contrast), but might be useful to all as desktop backgrounds are often not uniform at all. By default this is drawn transparent on the non-selected and non-prelight states (no change in default appearance then), but allows the user to customize it with a background if need be. Unfortunately for the moment this cannot be altered by theme, so the user will have to modify the GTK custom user CSS directly, but it still is better than nothing and can hopefully be solved better later.
2019-06-18Remove trailing whitespacesrbuj1-3/+3
find . -regextype posix-extended -regex '.*\.(c|h|ac|txt|xml)' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
2019-05-06libcaja-private: reduce the scope of some variablesPablo Barciela1-17/+28
2019-04-12local #include files who are libraries inside <> instead ""Pablo Barciela1-8/+8
2019-04-12eel: remove eel_g_object_list_refrbuj1-1/+1
2019-04-10local #include files inside "" instead <>Pablo Barciela1-14/+14
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-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-03-07avoid variables set but not usedPablo Barciela1-2/+0
2019-01-31Avoid deprecated g_type_class_add_private under libcaja-privateWu Xiaotian1-20/+18
Changed CajaIconCanvasItem, CajaTrashMonitor and CajaUndoStackManager
2018-05-05avoid deprecated 'gtk_style_context_get_background_color'Pablo Barciela1-2/+10
2018-04-24Emit accessible-name-change signal for icons only when icons are renamedJoanmarie Diggs1-1/+0
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-06Fix warnings from HiDPI commitslukefromdc1-1/+1
*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 Kareh1-3/+1
This allows icons in most places to scale up properly for HiDPI displays.
2018-04-04Support HiDpi iconsCosimo Cecchi1-67/+83
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-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
2017-04-18use atk_component_get_extents instead of atk_component_get_positionmonsta1-2/+2
fixes build warning about deprecation ported from: https://git.gnome.org/browse/nautilus/commit/?id=bd73a8ee91610310c3b0dfdaa69465fc48ecac8f
2017-04-13IconCanvasItem: fix overlapping filenames on hoverraveit651-1/+0
taken from: https://git.gnome.org/browse/nautilus/commit/?id=308f4ce
2017-01-27Use ATK_STATE_SELECTED and ATK_STATE_FOCUSED appropriately for highlight ↵Luke Yelavich1-9/+7
property changes
2017-01-07a11y: fix accessibility implementation for CajaIconCanvasItemAccessibleColomban Wendling1-3/+3
Fix CajaIconCanvasItemAccessible inheritance to properly inherit from EelCanvasItemAccessible. This fixes the ATK state machinery in CajaIconCanvasItemAccessible, and adds AtkComponent support which provides several useful features. Part of https://github.com/mate-desktop/caja/issues/245 Based off https://git.gnome.org/browse/nautilus/commit/?id=6c5baeb7626eda6629fc6642c9eb513ef8bc5c8e See https://bugzilla.gnome.org/show_bug.cgi?id=677509
2016-12-31Fix cursor on single-click navigation mode.Franco Tortoriello1-2/+15
On this mode, after opening a folder, the hand cursor was used until the user moved the cursor over a file or folder. Based on Nautilus commit https://git.gnome.org/browse/nautilus/commit/?id=2644c6ef4e7839e976d4861d6c86e16e34d46a13
2016-12-14Add a separator when concatenating strings in icon text accessibleColomban Wendling1-0/+2
This makes the string exposed to ATK more sensible, instead of having unrelated words coupled together.
2016-11-22move to GTK+3 (>= 3.14), drop libunique, GTK+2 code, and --with-gtk build ↵lukefromdc1-561/+7
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-08-22drop a large amount of completely unused codemonsta1-1/+0
2016-01-15GTK3 general: don't use gdk_cursor_unref()Wolfgang Ulbrich1-0/+4
taken from: https://git.gnome.org/browse/nautilus/commit/?id=74a8f78
2016-01-15GTK3 icon-canvas-item: add a missing gtk_style_context_restore()Wolfgang Ulbrich1-0/+2
taken from: https://git.gnome.org/browse/nautilus/commit/?id=8296f8c
2016-01-13GTK3 icon-canvas-item: don't override parent container style flagsWolfgang Ulbrich1-17/+10
When drawing the canvas item elements, don't override the parent container style flags, so we don't lose e.g. backdrop information. taken from: https://git.gnome.org/browse/nautilus/commit/?id=31dad6f
2016-01-13GTK3 icon-canvas-item: don't draw pango layouts when renamingWolfgang Ulbrich1-2/+4
Fixes a regression introduced in commit 3a858857fff5e1d7e0bffcec63fea6d2a933ce27 that causes unwanted text to be drawn while renaming a file in icon view. taken from: https://git.gnome.org/browse/nautilus/commit/?id=f07aa75
2016-01-13GTK3 icon-canvas-item: render the additional text with gtk_render_layout()Wolfgang Ulbrich1-4/+31
And add a style class for it. taken from: https://git.gnome.org/browse/nautilus/commit/?id=7732a6b https://git.gnome.org/browse/nautilus/commit/?id=2cb91c0
2016-01-13GTK3 icon-canvas-item: use gtk_render_* methods instead of direct cairoWolfgang Ulbrich1-142/+243
Instead of hardcoding colors and using direct cairo calls to draw the canvas items frame/background/labels, use gtk_render_* methods directly. This has the advantage of making them more friendly with GTK+ themes (by adding a caja-canvas-item style class to the canvas context when drawing) and removes a ton of convolut taken from: https://git.gnome.org/browse/nautilus/commit/?id=95910c9
2016-01-13GTK3 icon-canvas-item: make the icon frame transparent when not prelitWolfgang Ulbrich1-10/+5
This fixes icons on the desktop appearing weird taken from: https://git.gnome.org/browse/nautilus/commit/?id=6a11ecd
2016-01-13GTK3 icon-canvas-item: remove an useless snippet of drawing codeWolfgang Ulbrich1-11/+1
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=09f0b79
2016-01-13GTK3 icon-canvas-item: use eel_create_spotlight_pixbuf()Wolfgang Ulbrich1-6/+7
Instead of passing eel_pixbuf_render() always the same values taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=a1fa4ea
2016-01-13GTK3 icon-container: remove useless theming propertiesWolfgang Ulbrich1-4/+12
taken from: https://git.gnome.org/browse/nautilus/commit/?id=e2ca42cac78cb0287a1bbb73030e7bba8b171970
2016-01-13GTK3 icon-canvas-item: set the right style classWolfgang Ulbrich1-1/+15
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=0668960
2016-01-13GTK3 icon-container: fix rendering of text on the desktopWolfgang Ulbrich1-1/+1
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=2e5f7a23350016c67bb9e9cca86a9fb2360d79e2
2016-01-13GTK3 icon-canvas-item: port to GtkStyleContextWolfgang Ulbrich1-16/+74
taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=fc74332
2015-01-13drop support for GLib < 2.36Monsta1-2/+0
Closes https://github.com/mate-desktop/caja/pull/372
2014-03-09icon-canvas-item: attempt to fix up a11y for CajaIconCanvasItemStefano Karapetsas1-333/+273
https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-0&id=184096f912b119edde1f538e8cdd5ea593d753ca
2012-12-22[all] silence warnings from GCC 4.6Jasmine Hassan1-14/+1
GCC 4.6 introduced a new warning about variables declared and initialized, but not really used in the function body. Remove all of these occurrences to build cleanly. http://git.gnome.org/browse/nautilus/commit/?id=d4230de8667764e02dbb966b5d806ff78ced2fd5
2012-11-23[all] include src/glibcompat.h & use g_list_free_full() where neededJasmine Hassan1-4/+4
Also fixes a double-free regression in lc-p/caja-query from 7a42b9b0
2012-11-20[lc-p] revise rendering-cleanup commit 2a4433a562Jasmine Hassan1-7/+9
mainly, in icon-dnd, in drag_begin_callback, CajaIconContainer was only declared for GTK2. Also, replace some deprecated gdk_drawable_get(size|screen) calls, and remove some unnecessary GDK_DRAWABLE casts. Also, in icon-canvas-item, in draw_label_text, missed ommitting a NULL parameter to gtk_paint_focus, for GTK3.
2012-11-16[eel] remove eel_gdk_pixbuf_list_ref()Jasmine Hassan1-2/+1
But unlike upstream commit below, not removing include eel-art-extensions.h from eel-gdk-pixbuf-extensions.h, as we still have functions in the latter using eel_irect_* (from eel-art-extensions), which are still used by the eel-debug-drawing we kept around. http://git.gnome.org/browse/nautilus/commit/?id=7dee3226ad6b3aa1c782cc3d2969e32c5eeae3f3
2012-11-16[all] use g_list_free() and g_strcmp0 instead of eel functionsJasmine Hassan1-4/+6
Was: general: use g_list_free_full() instead of eel functions http://git.gnome.org/browse/nautilus/commit/?id=5e669515fd7f760382e6b7aa1449734a35a2d7f4 . Instead of g_list_free_full(), we use g_list_foreach and g_list_free() to avoid unnecessary glib dependency bump to 2.28
2012-11-16[icon-canvas-item] use cairo directly instead of gdk_pixbuf_composite()Jasmine Hassan1-18/+27
http://git.gnome.org/browse/nautilus/commit/?id=a136af0a01c160cdfb513c531b910b49a4a62973
2012-11-16[icon-canvas-item] set transparent background for highlightJasmine Hassan1-2/+1
http://git.gnome.org/browse/nautilus/commit/?id=c6860491c432e311d585a6d92443ef821afd46d2