Based on the locales that are at least 85% translated in Damned Lies:
https://l10n.gnome.org/releases/gnome-41/
Limited by the locales available in emojibase
Closes#4568
(cherry picked from commit d8c79e91a21b831580ea890b7cf146934877fbb7)
gtk_widget_translate_coordinates() uses int argument and thus cuts off
any decimal parts. This can leads to reduces accuracy when e.g.
measuring the distance of a drag.
GTK4 is not affected as the translations is done differently.
Our webdav server has a root which is davs://mynextcloud/remote.php/webdav
When once creates a GFile out of or out of a subdirectory, and one call
g_file_get_parent(), it recurses too far up and try to query
davs://mynextcloud/remote.php which fails, resulting in a broken pathbar.
To fix that, before querying the metadata of each element of the path,
I query the "enclosing mount", then use it's root to compare the GFile
against.
This is a backport of !5830 to 3.24
On X11, gdk_window_move_to_rect() uses the position of the window to
calculate how it should be moved. However, any pending resizes that will
be executed on show() are not taken into account, resulting in
incorrectly positioned tooltips in case a tooltip window is re-used
often. This is not solved by gtk_widget_realize(), as this will do
nothing if the window is already realized.
Let's add a call to the private gtk_window_move_resize() function, so
that the size is always recalculated before the window is sent to
gdk_window_move_to_rect().
This exact fix was also needed in GtkMenu (7298e73c), with similar
reasoning.
Fixes#2142Fixes#2227
This was basically done copying the gtk4 version and keeping the changes
that weren't gtk4 specific.
Fixes#6224 (the chooser doesn't close but we don't crash or such)
Table (cell) row and column indices both start at 0, so
an index of 0 is valid.
Adapt the check accordingly and check for non-negative
indices instead of positive ones.
(`gtk_cell_accessible_parent_get_cell_position` sets -1
in the fallback case, so that's still handled as it used
to be.)
This fixes reporting the position of the table cell at
index (0,0) via AT-SPI.
Fixes: #5161
There is no need to include gdkquartz.h there,
which was making it impossible to include this header file
without also adding gdk/ as an include directory when compiling.
This patch moves the include to the only location where it is actually needed.
Clarify that we zero out the widget coords and only keep its dimensions.
If we have no widget to fall-back to, memset to 0 the output @rect since
we return FALSE whether or not we have widget, so protect users from not
knowing if there was a widget and possibly accessing uninitialised ints.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/893#note_1766079
I observed the following nautilus crash below after trying to access an SMB
share and mistyping my password (it also happens if mounting the SMB share
fails for other reasons after entering a password). The crash happens when
the password entry window pops up the second time, in this code path, at
the 7th element of priv->user_widgets:
458 pw_dialog_anonymous_toggled (GtkWidget *widget,
459 GtkMountOperation *operation)
460 {
...
472 for (l = priv->user_widgets; l != NULL; l = l->next)
473 {
474 gtk_widget_set_sensitive (GTK_WIDGET (l->data), !priv->anonymous);
475 }
The broken element had l->data = 0xaaaaaaaaaaaa, which means the pointer had
been freed.
The broken list entries were at the of the list because when
gtk_mount_operation_ask_password_do_gtk() constucts the pop-up the 2nd time,
it prepends new widgets:
gtk_mount_operation_ask_password_do_gtk()
table_add_entry
operation->priv->user_widgets = g_list_prepend (operation->priv->user_widgets, entry);
The problem is that in pw_dialog_got_response(), the widget is destroyed,
which also destroys all child widgets, but the priv->user_widgets list is
neither freed nor set to NULL.
Fix it.
1. According to the UTF-8 spec, ASCII character's charcode is from
0 to 127 inclusively.
2. Any charcode which is greater than or equal to 128 will be
a multi-byte character.
1. The data with type of char is signed by default.
2. The byte value of UTF-8 is signless by default.
3. So, if a UTF-8 charcode is stored in a char array, we should cast the
type of its value from char to unsigned char.
check_dir_mtime() is called by ftw() and is given
the real stat struct, not its glib version (which may
or may not be the same as "struct stat").
This is irrelevant for MSVC (it has no ftw()) and
works correctly for MinGW-w64 (which declares stat
structures correctly). If mingw.org complains, add
a special ifdef for it later.
This adds a new row to the Global/Information section which displays the
GTK im-module that is likely to be in use unless changed by an application.
It responds to updates of GtkSettings:gtk-im-module unless the
GTK_IM_MODULE environment variable is set.
Fixes#4512
(cherry picked from commit 6be352f4468b4dbbb1d71f427948dda154b9a658)
Starting from GLib 2.76, the standard attribute getters in the GFileInfo
object will warn if the attribute is unset, instead of silently bailing
out and returning a default value.
Fixes Evince showing a dark caret when using
dark theme, which makes it almost invisible.
This is in css node "textview text" of Evince
annotation window (a GtkScrolledWindow).
We create a new $caret_color var based on
$text_color and use it accordingly.
Fixes evince#1842
The iter may be invalid, so we may not read from it.
testsuite/gtk/treemodel tests this and valgrind is shouting about it,
but it never crashed until I just ran it...
This bug is from 2004 and the test is from 2007. I guess invalid memory
accesses don't get caught by CI much.
When activating a window, avoid the "old" gdk_notify_startup_complete*()
API that does not fallback into xdg_activation on wayland (as this is still
deferred here until show vs present happens on the surface). This was
mistakenly changed wrt the original commit backported from GTK4.
Fixes: a067938589 ("gtkwindow: Minor refactor")
Failure is allowed by nature of GInitable, and this avoids unnecessary
crashing of programs running with G_DEBUG=fatal-criticals.
(cherry picked from commit 6215b38e645f5047d52e625562efccc1e4f85867)