Commit Graph

50745 Commits

Author SHA1 Message Date
Martin Blanchard
d6840ad3dd menu: Fix accel-group property reset
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.
2019-02-23 10:42:23 +00:00
Bastien Nocera
e5b83f1a87 window: Advise using gtk_window_present_with_time()
Rather than gtk_window_present()
2019-02-22 18:38:13 -05:00
Bastien Nocera
8ed0471785 window: Warn when gtk_window_present_with_time() is passed 0
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.
2019-02-22 18:38:13 -05:00
Bastien Nocera
5d7183ee0c all: Don't warn about deprecated gtk_window_present usage
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-22 18:38:11 -05:00
Bastien Nocera
2ca4a3cb41 window: Deprecate gtk_window_present()
And expect gtk_window_present_with_time() to be used instead.
2019-02-22 18:34:24 -05:00
Jakub Steiner
864e1ca526 Adwaita: circles for .circular buttons
- doesn't catch all cases, but most buttons need uniform paddings
  to remain circular, not elliptical.

fixes issue #1695
2019-02-22 12:35:32 +01:00
Sveinn í Felli
736dbfef42 Update Icelandic translation 2019-02-21 11:57:06 +00:00
Chun-wei Fan
1a4d396d6f Visual Studio projects: Add include path for FriBidi
The Fribidi headers tend to be under $(PREFIX)\include\fribidi\, so we
want to try to look for these headers in there as well.
2019-02-21 16:44:06 +08:00
Chun-wei Fan
638b136e34 Visual Studio projects: Link to FriBidi
We now need to link to fribidi.lib explicitly in both GDK and GTK.
Since the Pango we require in 3.24.x already requires a FriBidi
installation, the .lib and DLL should already be available for the
build.
2019-02-21 10:19:21 +08:00
John Ralls
512da66761 Silence incompatible type warning. 2019-02-19 11:08:02 -08:00
John Ralls
f3b1704a99 Remove unnecessary casts and silence may-not-return-value warning.
NSPoint and NSRect are typedefs of CGPoint and CGRect so the casts
were unnecessary and confused llvm when compiling 32-bit.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1640
2019-02-19 11:08:02 -08:00
Matthias Clasen
34d6c028b0 Merge branch 'issue-1681' into 'gtk-3-24'
treeview: Don't show empty tooltips

See merge request GNOME/gtk!586
2019-02-18 19:44:57 +00:00
Emmanuele Bassi
2934482aee treeview: Don't show empty tooltips
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
2019-02-18 17:44:17 +00:00
John Ralls
6afd174162 Merge branch 'suyuan/fix-macos-accented-char-input' into gtk-3-24. 2019-02-17 13:04:20 -08:00
Baurzhan Muftakhidinov
9d12953ccf Update Kazakh translation 2019-02-17 07:25:02 +00:00
Baurzhan Muftakhidinov
347d0de65b Update Kazakh translation 2019-02-17 07:16:07 +00:00
Matej Urbančič
d7a4143a68 Updated Slovenian translation 2019-02-14 18:34:18 +01:00
Matthias Clasen
65edea0406 Merge branch 'issue-1662' into 'gtk-3-24'
Use C locale when building gtktypefuncs.c

See merge request GNOME/gtk!577
2019-02-14 17:13:51 +00:00
Emmanuele Bassi
6058495f50 Use C locale when building gtktypefuncs.c
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
2019-02-14 17:06:49 +00:00
Jiri Grönroos
68a7da71e3 Update Finnish translation 2019-02-09 18:38:51 +00:00
Matthias Clasen
9f3141fc5c Merge branch 'wip/carlosg/toggle-osk-sparingly' into 'gtk-3-24'
imwayland: Toggle OSK more sparingly

See merge request GNOME/gtk!569
2019-02-08 23:40:00 +00:00
Carlos Garnacho
38a4c4dd37 imwayland: Toggle OSK more sparingly
Specifically it is avoided to be toggled if:
- Just received focus (in order to preserve OSK state across focus changes)
- Moving cursor around. Still allow some jitter as perfect accuracy is not
  possible.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1277
2019-02-09 00:29:56 +01:00
Jakub Steiner
03394c559d Adwaita: lost selectionmode resources
- somehow we lost the selection mode image resources
- FIXME: checkbox-active-selectionmode is not being used.
2019-02-08 15:53:00 +01:00
Matthias Clasen
1d4eac211c Merge branch 'wip/fix-submenu-size' into 'gtk-3-24'
Fix submenu size

See merge request GNOME/gtk!565
2019-02-07 21:29:22 +00:00
Jonas Ådahl
57300b4960 menu: Fixate size calculated by gdk_window_move_to_rect()
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
2019-02-07 10:01:05 +01:00
Jonas Ådahl
7298e73c44 menu: Force recalculation of size before positioning
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.
2019-02-07 10:01:05 +01:00
Jonas Ådahl
461f5fde03 window: Add private API to force-resize
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().
2019-02-07 10:01:05 +01:00
Jonas Ådahl
edb57a9202 window: Add private API to fixate size
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.
2019-02-06 19:34:20 +01:00
Emmanuele Bassi
5b360f2198 Merge branch '3-24-warn-fixes' into 'gtk-3-24'
Fix various compiler warnings

See merge request GNOME/gtk!561
2019-02-05 14:47:26 +00:00
Emmanuele Bassi
43980583e3 sw: Do not cast clear function in g_clear_pointer()
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.
2019-02-05 15:35:27 +01:00
Emmanuele Bassi
8f8b68f847 Terminate strncpy() buffers correctly
When using strncpy() with a buffer we need to account for the
terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
as the buffer length for strncpy() because the buffer we're copying into
has the same length — which means that the terminating NUL may be
skipped if the source string has a length of PPD_MAX_NAME.

The appropriate way to handle the case where we're copying a source with
a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
terminate the destination buffer. This has the additional benefit of
avoiding the compiler warning.
2019-02-05 15:34:08 +01:00
Matthias Clasen
df77965153 Update css node tests
The GtkSwitch now has two image nodes.
2019-02-05 09:33:37 -05:00
Emmanuele Bassi
eb732b3f68 container: Disable deprecation warnings
We know we're using deprecated GtkContainer API, because we're
implementing it.
2019-02-05 15:23:09 +01:00
Emmanuele Bassi
c2ddb932b2 popover: Disable deprecation warning
For gtk_render_frame_gap().
2019-02-05 15:22:06 +01:00
Emmanuele Bassi
d9d3ec7cad menu: Fix condition check
A logical "and" became a binary "and" in commit c35878ec.
2019-02-05 15:18:41 +01:00
Alexander Larsson
1bbff35383 Merge branch '1633-gtk-3-24' into 'gtk-3-24'
Issue #1633 - Ensure focus on click

See merge request GNOME/gtk!560
2019-02-05 13:22:01 +00:00
Mickael Istria
9b394d8753 Issue #1633 - Ensure focus on click
This is necessary to give back focus to the Broadway elements when
content is embedded in an IFrame.

Signed-off-by: Mickael Istria <mistria@redhat.com>
2019-02-05 14:13:22 +01:00
Matthias Clasen
47e4a111c2 Try again
We only want fribidi as a private dependency.
2019-02-05 08:04:14 -05:00
Matthias Clasen
f533ef8650 Link gdk against fribidi
It is required now.
2019-02-05 07:17:07 -05:00
Matthias Clasen
bf60bf15de 3.24.5 2019-02-04 11:48:56 -05:00
Jakub Steiner
224213dad6 Adwaita: selection mode buttons fix
- don't allow the headerbar :active darkening (bug #1588) to override
  selection-mode blue buttons.

Fixes issue #1642
2019-02-04 17:24:55 +01:00
Jakub Steiner
1661e2888a Merge branch 'wip/jimmac/adwaita-3-32' into 'gtk-3-24'
Wip/jimmac/adwaita 3 32

See merge request GNOME/gtk!551
2019-02-04 14:27:58 +00:00
Alex Monday
7c325ed852 HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-02-04 15:08:07 +01:00
Alex Monday
950480cea4 HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-02-04 15:07:56 +01:00
Jakub Steiner
57ba052522 Revert "HighContrast: Add style for overflow buttons"
This reverts commit ff4dcf5fa4.
2019-02-04 15:05:43 +01:00
Jakub Steiner
af3bcc6adc Revert "HighContrast: Add menu padding"
Revert conflicting patches to rebase adwaita-3-32 easily. will apply afterwards.

This reverts commit a7ea8248ce.
2019-02-04 15:05:43 +01:00
Balázs Úr
391469e365 Update Hungarian translation 2019-02-04 15:05:43 +01:00
Balázs Úr
cca1cf03df Update Hungarian translation 2019-02-04 15:05:43 +01:00
Matthias Clasen
ffa8fef2fa gtk: Stop using deprecated pango api 2019-02-04 15:05:43 +01:00
Matthias Clasen
13c126b277 gtk: Add a copy of some deprecated pango api
We use pango_find_base_dir() in a few places, and
this api has been deprecated.
2019-02-04 15:05:43 +01:00