The problem here was that NSPasteboard would release the clipboard
owner if all data items were transferred. When trying to re-use this
owner at a later point, GTK+ would attempt a retain call on a released
object and crash.
Fix this by not immediately releasing the owner after declaring types,
so by keeping our own reference around.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/529
It might be too late to do it at GtkApplication::add_platform_data time,
since the envvar may be consumed earlier on if gdk_display_open() happened
to be called before (eg. through gtk_get_option_group(TRUE)).
Stash the envvar in a constructor function, so its ensured to happen before
it can get consumed.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1754
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
CREATEPROCESS_MANIFEST_RESOURCE_ID is a macro defined in winbase.h,
so we need an include to resolve that macro to its value, 1.
Without that it stays as a literal CREATEPROCESS_MANIFEST_RESOURCE_ID,
and ends up in the .exe file as-is, and Windows can't find it by that name,
resulting in UAC manifest not working and gtk-update-icon-cache bringing
up UAC prompt.
Every time a new <INCLUDE> directive is used inside a gtk-doc
sections.txt file it overrides the current include header until the next
<INCLUDE> directive. This has the unfortunate effect of making every
single section following the print-related ones to generate
documentation that says to include gtkunixprint.h.
In order to avoid re-arranging the gtk3-sections.txt file, we can tell
gtk-doc what's the default header to include for GTK, and override it
using `@Include` directives directly into the gtk-doc stanzas of the
sections that require a different header.
Fixes: #1746
including when the control modifier is present, i.e. when one is typing
control-I for instance.
Orca would convert them back to the corresponding ASCII letter anyway, and
when pressing control-tab, we do want to pass "tab", not pass "\t" that Orca
would erroneously convert to "control-I".
Fixes#1743
If the query has a non-null location, set the scope to that directory,
otherwise set it to the local computer.
There is unfortunately no way to get Spotlight to search
non-recursively, nor does NSFileManager offer a convenient search of
the contents of a directory's regular files.
Copy documentation for gtk_clipboard_wait_for_targets from gtk/gtkclipboard.c
to quartz implementation. Primarily to add transfer container annotation as
otherwise pygobject tries to deallocate individual GdkAtoms.
Issue #1584.
In case the theme doesn't set a height/min-height for the treeview
separator the treeview drawing gets confused and draws rows on top of each
other depending on the redraw area.
This is due to gtk_tree_view_get_row_height() assuming that a node with a
height <= 0 is not set and not a separator and it will default to the
expander size.
Ideally gtk_tree_view_get_row_height() would know if it operates on a separator,
but there are too many calls/levels, so just make sure the separator height
is at least 1 (Adwaita already sets "min-height: 2px", so no change there)
GtkMenu's "accel-group" property setter, gtk_menu_set_accel_group(),
currently returns in failure if the caller passes it a NULL `accel_group`
argument. This argument is annotated with `(allow-none)`. This patch
add support for the NULL case.
When 0 or GDK_CURRENT_TIME is passed to gtk_window_present_with_time(),
print a warning so that the application developer knows that this isn't
a supported use of the function, but carry on working for now.
If the column used for the GtkTreeView:tooltip-column contains NULL
we're already skipping a tooltip; let's ignore empty strings as well,
as an empty tooltip is pretty much pointless.
Close#1681
We're using [a-z] ranges with sed and grep, and POSIX does not specify
their behaviour in non-ASCII locales:
In the POSIX locale, a range expression represents the set of
collating elements that fall between two elements in the collation
sequence, inclusive. In other locales, a range expression has
unspecified behavior
-- IEEE Std 1003.1-2017, § 9.3.5 (7)
This can lead to no results, or invalid replacements, which in turn can
lead to broken builds or broken build artifacts.
Fixes: #1662
When we receive a size from the move-to-rect implementation, force GTK
to continue using that size until reconfigured by move-to-rect, or
when remapped.
Fixes: #1651
On X11, the position of the menu is calculated synchronously by
gdk_window_move_to_rect(). This means that calculating the window size
when showing is too late, as that'd mean the size used when calculating
the position is out-of-date. The first time a menu is mapped, however,
the size is calculated during realization; but a window is only realized
once, so it doesn't work for subsequent maps.
Currently, this is harmless, as a GtkMenu can change its size however it
wants after it has been mapped. This, however, is problematic, as it
means the position calculated by gdk_window_move_to_rect() might no
longer be valid, or constraints made by the same function might no
longer be respected.
Thus, this is a preparation for making GtkMenu popups stay the same size
until they are remapped again at a later point.
Sometimes (read for GtkMenu on X11) it's not enough to resize on show,
and relying on the size to be calculated on realization only works the
first time a menu is popped up, so add an API that GtkMenu can use to
ensure the size of a menu is "refreshed" before passing anything along
to gdk_window_move_to_rect().
This causes window size guessing to always use the remembered size (the
size of the GdkWindow). This will be useful for menus which size is
managed by gdk_window_move_to_rect(), to avoid overriding the size
calculated by the move-to-rect implementation.
We don't need to do it, since g_clear_pointer() will do it for us, and
will also check if the function conforms to a GDestroyNotify. Using an
explicit cast will generate a compiler warning.
Now that we've switched the on and off states to gadgets, we need to
ensure that the widget's clip take into account the clip of every
gadget.
Fixes#1631
Improve overflow arrow buttons drawing on a scrollable dropdown menu:
reduce top button's margin-top to match size of a bottom button, add
margin-top for bottom button to compensate bottom margin (otherwise
button overlaps with menu content).
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1539
- it's less busy and still clearer without the label
- It may be right that color alone is a poor differentiator,
but labels do still exist for the accessible theme.
- create more contrast against the headerbar background without lowering
contrast with the label and border.
- top border shaded for extra aid of the state being pressed (in the two button scenatio)
Addesses issue #1588
- colorsheme based on the new icon HIG color palette
- new switches
- darker headerbar to contrast with unfocused windows
- raised buttons derived from the icon style