Compare commits

...

3357 Commits

Author SHA1 Message Date
Matthias Clasen
4480c0ffc6 3.24.17 2020-04-03 13:07:53 -04:00
Matthias Clasen
da1686eb47 Fix build issues with HighContrast theme 2020-04-03 12:54:32 -04:00
Matthias Clasen
eecd33146e Merge branch 'wip/dont-postpone-subsurface-resize' into 'gtk-3-24'
wayland: Don't postpone resizes for subsurfaces

See merge request GNOME/gtk!1620
2020-04-03 16:43:19 +00:00
Jonas Ådahl
749d940887 wayland: Don't postpone resizes for subsurfaces
Subsurfaces won't ever receive a configure event.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2570
2020-04-03 18:04:44 +02:00
Matthias Clasen
c67d0f0d1d Merge branch 'wip/carlosg/fix-surrounding-text-again' into 'gtk-3-24'
imwayland: Clamp the surrounding string end correctly

See merge request GNOME/gtk!1619
2020-04-03 15:39:30 +00:00
Matthias Clasen
0fbc3581bc Merge branch '3.24-meson-bump' into 'gtk-3-24'
meson: Bump to latest version of the 3.24 branch

See merge request GNOME/gtk!1613
2020-04-03 12:25:32 +00:00
Carlos Garnacho
d7fb15c822 imwayland: Clamp the surrounding string end correctly
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.

This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565
2020-04-03 12:57:44 +02:00
Philippe Normand
c010a95d8c meson: Bump to latest version of the 3.24 branch
3.24.16 was tagged without bumping the version in the Meson build definitions.
2020-04-03 10:52:29 +01:00
Matthias Clasen
d5264673cb wayland: Load .Compose in imwayland too
GtkIMContextSimple loads custom compose sequences
in its set_client_window implmentation, so we need
to chain up in order to not lose those.
2020-04-02 17:30:54 -04:00
Matthias Clasen
94a2827ed9 Merge branch 'keyboard-focus' into 'gtk-3-24'
gdk/wayland: Clear modifiers when we lose keyboard focus

See merge request GNOME/gtk!1609
2020-04-02 19:23:36 +00:00
Jan Alexander Steffens (heftig)
c27cb675b7 gdk/wayland: Clear modifiers when we lose keyboard focus
When we `Alt+Tab` away from a GTK application, it loses keyboard focus.
If we don't clear the modifiers, events from other devices that we
receive while unfocused will assume `Alt` is still pressed. This results
in e.g. Firefox navigating through the history instead of scrolling the
page when using the mouse wheel on it.

We don't get any information about modifiers while we are missing
keyboard focus, so assuming no modifiers are active is the best we can
do.

The shell sends us a modifier update immediately before we regain
keyboard focus, so the state shouldn't get out of sync.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2112
2020-04-02 20:45:55 +02:00
Matthias Clasen
263467ca3d Merge branch 'wip/window-state-change-fixes' into 'gtk-3-24'
Some Wayland window state change resize fixes

See merge request GNOME/gtk!1606
2020-04-02 17:25:31 +00:00
Jonas Ådahl
3b91c20eac wayland: Add margin to saved size when restoring size
We're normally going from a fixed size to a floating state when we're
using the saved size, meaning we're practically always going towards a
state where the shadow margin will non-empty. However, if we don't
include any margin when creating a new configure request, we'll end up
resizing to a slightly smaller size as gtk will cut off the margin from
the configure request when changing the window widget size.

This wasn't visible when e.g. going from maximized to floating, as we'd
add the shadow margin at a later point, which would effectively "grow"
the widnow size, but when we're going from tiled to floating, we both
start and end with a non-empty shadow margin, meaning we'd shrink ever
so slightly every time going between tiled and floating.
2020-04-02 18:10:03 +02:00
Jonas Ådahl
50aa947e51 wayland: Treat being tiled as maximized when saving size
We should never save a size when we're tiled, just as we shouldn't when
we're maximized. This fixes returning to the correct floating size after
having been tiled or maximized.
2020-04-02 18:10:03 +02:00
Jonas Ådahl
04b7853a38 wayland: Respect fixed size when resizing
If a window is configured with a fixed size (it's tiled, maximized, or
fullscreen), ignore any resize call that doesn't respect this. The set
size will instead be saved, when appropriate, so that the new size is
used when e.g. unmaximizing.

This makes it possible to call 'gtk_window_resize()' while the window is
maximized, without the window actually changing size until it's
unmaximized. Changing size to a non-maximized size is a violation of the
xdg-shell protocol.
2020-04-02 18:10:03 +02:00
Jonas Ådahl
7f12dc2b66 wayland: Postpone window resize requests until configured
An application may want to set a fallback size of a window while still
mapping maximized. This is done by calling gtk_window_resize() before
gtk_window_maximize() and before gtk_window_show(). When the window is
mapped, it should have a maximized size, and if it eventually is
unmaximized, it should fall back to the size from the earlier
gtk_window_resize() call.

What happens before this commit is that the initial window size ends up
respecting the first gtk_window_resize() dimensions, and not the window
dimension configured by the Wayland display server (i.e. maximized
dimensions).

Fix this by postponing any configure events until we received our
configuration from the display server. If we got one with a fixed size
(e.g. we're maximized, tiled etc), we use that, otherwise we look at the
one that was previously configured by gtk which corresponds to the
"preferred" size when not being maximized.

This fixes Firefox being started in a maximized state when using the
Wayland backend.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2538
2020-04-02 18:09:56 +02:00
Matthias Clasen
f5b393fef0 Merge branch 'wip/smcv/libdir-independent-valgrind-suppressions-gtk3' into 'gtk-3-24'
[3.x] supp: Use a single suppressions file for lib, lib64 and multiarch

See merge request GNOME/gtk!1604
2020-04-02 14:47:16 +00:00
Simon McVittie
8afd623989 supp: Use a single suppressions file for lib, lib64 and multiarch
In addition to the traditional library directory lib and the 64-bit
multilib directory lib64, this will cover Debian-style multiarch
(lib/x86_64-linux-gnu etc.), Arch Linux 32-bit (lib32), x32 and
various others.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-02 09:30:44 +01:00
Jiri Grönroos
b62860b1b8 Update Finnish translation 2020-04-01 14:51:22 +00:00
Matthias Clasen
58cfd44307 Merge branch 'BUG_filechooser_new_folder_focus_GTK3' into 'gtk-3-24'
gtkfilechooserwidget: set 'New folder' button focus-on-click

See merge request GNOME/gtk!1595
2020-04-01 04:28:22 +00:00
Matthias Clasen
d8ab9c4259 Merge branch 'BUG_buttons_with_menu_onclick_GTK3' into 'gtk-3-24'
GtkMenuButton: disable focus-on-click

See merge request GNOME/gtk!1596
2020-04-01 02:56:51 +00:00
Nelson Benítez León
527a99e598 GtkMenuButton: disable focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

GtkScaleButton and GtkVolumeButton set focus-on-click
to FALSE for this same reason.

Fixes #2557
2020-03-31 21:00:32 -04:00
Nelson Benítez León
3997cdf2f4 gtkfilechooserwidget: set 'New folder' button focus-on-click
As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.

So this is also the case for the 'New Folder' button on
the filechooser.

Fixes #2557
2020-03-31 20:15:34 -04:00
John Ralls
56eeda6c7c Merge branch MR1570 into gtk-3-24. 2020-03-31 15:46:26 -07:00
Matthias Clasen
21e0e3f863 Merge branch 'wip/jimmac/HC-redesign-gtk3' into 'gtk-3-24'
HC: derive from Adwaita

See merge request GNOME/gtk!1587
2020-03-30 17:48:22 +00:00
Emmanuele Bassi
9fdc64f7fc Merge branch 'wip/hadess/no-gauto-portal' into 'gtk-3-24'
Remove g_auto usage

See merge request GNOME/gtk!1588
2020-03-30 16:22:58 +00:00
Bastien Nocera
8dfb1d197a gtkprivate: Remove g_auto usage
Fixes: 93ab478af1
2020-03-30 17:50:50 +02:00
Bastien Nocera
fa16b682ef colorpickerportal: Remove g_auto usage
Fixes: 7b1b3fa0cb
2020-03-30 17:50:09 +02:00
Jakub Steiner
98148d9d60 HC: derive from Adwaita
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1450
2020-03-30 16:49:44 +02:00
Yosef Or Boczko
afe4f283ed Update Hebrew translation 2020-03-29 15:28:00 +00:00
Yosef Or Boczko
2b0155dbc4 Update Hebrew translation 2020-03-29 15:22:36 +00:00
Matthias Clasen
7624f07764 3.24.16 2020-03-27 16:51:18 -04:00
Matthias Clasen
a923ee9b87 Don't forget to dist gtktexttagprivate.h 2020-03-27 16:50:15 -04:00
Matthias Clasen
dca7dc8c9c 3.24.15 2020-03-27 15:01:23 -04:00
Mantas Kriaučiūnas
c62da2bdaa Update Lithuanian translation 2020-03-27 18:53:21 +00:00
Matthias Clasen
5e7650729b Merge branch 'wip/hadess/portal-select-folders' into 'gtk-3-24'
filechoosernativeportal: Allowing selecting folder(s)

See merge request GNOME/gtk!1523
2020-03-27 18:34:02 +00:00
Matthias Clasen
c716776b8f Merge branch 'wip/jimmac/plug-holes-gtk3' into 'gtk-3-24'
Adwaita: work around holes in unfocused windows

See merge request GNOME/gtk!1574
2020-03-26 18:59:12 +00:00
Jakub Steiner
f4c705b404 Adwaita: work around holes in unfocused windows
- works around holes in rounded corners of backdrop windows

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2537
2020-03-26 19:09:57 +01:00
LecrisUT
788fef5e80 Monitor_added signal after configure
Fixed order of monitor_added signal for Quartz display.
2020-03-26 13:06:45 +09:00
Matthias Clasen
6f372a811b Merge branch 'translate-geometry' into 'gtk-3-24'
Translate geometry with offscreen windows

See merge request GNOME/gtk!1566
2020-03-26 01:44:37 +00:00
Alberto Fanjul
842599e0f9 gdk/wayland: Control translate from parent geometry
offscreen windows return NULL for its parent
2020-03-25 23:23:23 +01:00
Matthias Clasen
58eb628571 wayland: Support scales up to 400% for cursors
Suggested in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1503
2020-03-25 11:21:50 -04:00
Bastien Nocera
35fec1c6b2 filechoosernativeportal: Allowing selecting folder(s)
Use the "directory" portal option when asked to select folders.
2020-03-23 15:41:10 +01:00
Bastien Nocera
93ab478af1 Add portal version checking helper
Add gtk_get_portal_interface_version() to check the version of a portal.
2020-03-23 15:05:40 +01:00
Bastien Nocera
f70f2d7cae colorpickerportal: Don't throw warnings on missing version
If the version can't be fetched, don't throw a warning.
2020-03-23 14:59:51 +01:00
Bastien Nocera
4c71bf74f1 colorpickerportal: Simplify portal version fetching 2020-03-23 14:59:51 +01:00
Bastien Nocera
7b1b3fa0cb colorpickerportal: Use convenience function to fetch uint
Rather than open coding it.
2020-03-23 14:59:51 +01:00
Benjamin Otte
7f5fd67d3a Merge branch 'wip/albfan/protect-begin_move_drag' into 'gtk-3-24'
Define begin_move_drag for GdkOffScreenWindow

See merge request GNOME/gtk!1548
2020-03-21 10:06:35 +00:00
Alberto Fanjul
46b92412a7 Define begin_move_drag
Avoid crashes calling it on drag and drop gestures

fixes #2532
2020-03-21 10:44:08 +01:00
Matthias Clasen
72689c52a5 Merge branch 'adwaita-tnum' into 'gtk-3-24'
theme: use tabular figures where appropriate

See merge request GNOME/gtk!1493
2020-03-20 20:35:57 +00:00
Carlos Garnacho
2647dc1d98 Merge branch 'imm-context-use-after-free' into 'gtk-3-24'
Fix crash with certain IME

See merge request GNOME/gtk!1290
2020-03-20 15:05:43 +00:00
Mantas Kriaučiūnas
837febc3c3 Update Lithuanian translation 2020-03-20 09:45:38 +00:00
Matthias Clasen
9944d66165 Merge branch 'wip/chergert/gtk3-speedup-char_is_invisible' into 'gtk-3-24'
GTK3: short-circuit char visibility check when possible

See merge request GNOME/gtk!1536
2020-03-18 22:15:24 +00:00
Christian Hergert
9fc7c3b1b3 textbtree: short-circuit visibility check when possible
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.

Not using invisible tags is overwhelmingly the common case.
2020-03-18 12:56:19 -07:00
Christian Hergert
2aba6f0ba4 texttag: avoid use of g_signal_emit_by_name()
This avoids looking up the signal by name and instead uses the saved
signal identifier from gtktexttagtable.c
2020-03-18 12:50:32 -07:00
Christian Hergert
4f0842c713 texttagtable: move private functions to gtktexttagtableprivate.h
This makes backporting changes from 4.x a bit easier.
2020-03-18 12:42:40 -07:00
Emmanuele Bassi
e77139c6bb Merge branch 'wip/carlosg/fix-surrounding-text' into 'gtk-3-24'
imwayland: Fix typo in code

See merge request GNOME/gtk!1533
2020-03-18 16:30:16 +00:00
Carlos Garnacho
965a85a0d3 imwayland: Fix typo in code
To find the middle of the string, we should check both cursor/anchor.
This is actually a backport of commit 8fc360dac5 in master.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2522
2020-03-18 16:59:58 +01:00
Jakub Steiner
5be08a4d09 Adwaita: dark switches/check/radios
- unescape variables (gtk3 didn't raise warnings like gtk4, but it was broken)
2020-03-18 13:07:05 +01:00
Jakub Steiner
71bdf20cff Adwaita: dark switches/check/radios
- lighten up radios, switches and checkboxes

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:19:50 +01:00
Emmanuele Bassi
d2931309a5 Merge branch 'respect-text-len' into 'gtk-3-24'
imwayland: Honour len argument in gtk_im_context_wayland_set_surrounding

See merge request GNOME/gtk!1528
2020-03-16 16:10:00 +00:00
Robert Mader
3c28751dee imwayland: Honour len argument in gtk_im_context_wayland_set_surrounding
Clients may pass not `NULL`-terminated strings as the function takes a
`len` argument. Use that argument.
2020-03-16 16:36:30 +01:00
Matthias Clasen
88e71646de Merge branch 'tnum-gtk-3-doc' into 'gtk-3-24'
document font-feature-settings CSS property

See merge request GNOME/gtk!1483
2020-03-14 00:28:19 +00:00
Matthias Clasen
8b5c8a2d06 Merge branch 'ci-gtk3-update' into 'gtk-3-24'
Update the CI pipeline for GTK3

See merge request GNOME/gtk!1508
2020-03-13 18:44:18 +00:00
Matthias Clasen
41330b6c03 testsuite: Handle icontheme test better
Skip just the failing tests in release builds.
2020-03-13 16:31:33 +00:00
Emmanuele Bassi
aac214f1b0 testsuite/gtk: Add xfail tests
Some tests are expected to fail.

Some tests are expected to fail in non-debugging builds.

The icontheme test is the latter.
2020-03-13 16:30:06 +00:00
Emmanuele Bassi
b4808c187f Silence a compiler warning
GCC complains with boxed out arguments that may be unset.
2020-03-13 16:05:13 +00:00
Emmanuele Bassi
db1be15699 Silence compiler warnings in release builds
Declare debug-only variables inside a G_ENABLE_DEBUG conditional block.
2020-03-13 16:03:08 +00:00
Emmanuele Bassi
1b255dd812 Handle a missing enumeration value 2020-03-13 15:59:46 +00:00
Emmanuele Bassi
c08908b488 Fix build when G_ENABLE_DEBUG is undefined 2020-03-13 15:51:57 +00:00
Emmanuele Bassi
7c23119e8f Use ifdef when checking G_ENABLE_DEBUG
Don't use `if`, as we don't unconditionally define the symbol.
2020-03-13 15:51:57 +00:00
Emmanuele Bassi
7687f9a06f docs: Remove redundant gtk-doc stanza 2020-03-13 15:51:57 +00:00
Emmanuele Bassi
f699a299ad ci: Build API reference separately
We don't want to spend a lot of time on it just to check the build.
2020-03-13 15:51:57 +00:00
Emmanuele Bassi
b68dde91b8 ci: Add a Debian build
We want to test the build on multiple Linux distributions.
2020-03-13 15:51:57 +00:00
Emmanuele Bassi
e5be27f756 ci: Add a Debian-based image
We want to test GTK3 on Debian as well.
2020-03-13 15:51:57 +00:00
Emmanuele Bassi
8685538419 ci: Backport the changes to the Docker script
Use the copy from master, which has been fixed to work with Podman.
2020-03-13 15:51:57 +00:00
Emmanuele Bassi
14dba9545e ci: Build both static and shared libraries at once
There's no need to have two separate CI jobs: Meson can build both
libraries at the same time.
2020-03-13 15:51:57 +00:00
Matthias Clasen
603c3ba533 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fix for issue #2497, see https://gitlab.gnome.org/GNOME/gtk/issues/2497

See merge request GNOME/gtk!1509
2020-03-13 13:54:28 +00:00
Mantas Kriaučiūnas
5c2ab46184 Update Lithuanian translation 2020-03-13 13:19:53 +00:00
Matthias Clasen
bf315637e4 Merge branch 'fix-issue-2503' into 'gtk-3-24'
Fix spelling of AppKit framework in `gdkquartz-gtk-only.h`

See merge request GNOME/gtk!1513
2020-03-11 15:34:57 +00:00
Daniel Korostil
1d5b4a80b3 Update Ukrainian translation 2020-03-10 22:05:00 +00:00
Daniel Korostil
6cf91b5bc0 Update Ukrainian translation 2020-03-10 22:02:19 +00:00
Torsten Maehne
245ea77da6 Fix spelling of AppKit framework in gdkquartz-gtk-only.h
gtk+-3.24.14 with quartz backend fails to compile on macOS when using
a case-sensitive file system. The cause for the compilation error is a
simple typo in line 26 of `gdk/quartz/gdkquartz-gtk-only.h`. The
AppKit framework is included there with `<Appkit/Appkit.h>` instead of
`<AppKit/AppKit.h>`, which is fixed with this commit.

References: https://trac.macports.org/ticket/60168
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2503
2020-03-10 19:21:23 +01:00
Kjartan Maraas
6de41e9383 Update Norwegian Bokmål translation 2020-03-09 14:26:55 +00:00
sicklylife
d413bbc5f5 Update Japanese translation 2020-03-09 12:47:59 +00:00
Eivind Naess
2c85be990d Fix for issue #2497, see https://gitlab.gnome.org/GNOME/gtk/issues/2497
The 'selection-changed' signal is emitted unconditionally, even in the case
when there is no selection to be cleared. As a result, the subscriber receives
the initial signal and if he calls gtk_file_chooser_get_uri(), no value is
currently selected.
2020-03-08 18:54:10 -07:00
Tim Sabsch
d1c6766ae1 Update German translation 2020-03-07 17:35:44 +00:00
Tim Sabsch
c7b91bc7ae Update German translation 2020-03-07 17:31:52 +00:00
sicklylife
494bc00687 Update Japanese translation 2020-03-03 12:10:47 +00:00
sicklylife
58c36527d0 Update Japanese translation 2020-03-03 12:04:55 +00:00
Lukas K
82b9be3297 theme: use tabular figures where appropriate
Set font-feature-settings: "tnum" on spinbuttons, progress bars and
scales

fixes #1478
2020-02-29 14:33:49 +01:00
Matthias Clasen
4c027d458b Merge branch 'wip/hadess/fix-remote-filechooser' into 'gtk-3-24'
Fix crasher/warnings when browsing remote filesystems

See merge request GNOME/gtk!1489
2020-02-28 16:17:41 +00:00
Bastien Nocera
53b0c5fd88 filechooser: Fallback if content-type unavailable
Fallback to fast-content-type if the content-type attribute isn't
available, as is the case for most remote filesystems.

Closes: #2482
2020-02-28 16:59:19 +01:00
Bastien Nocera
22b0400f5e filechooser: Fix crash when file has no content-type
This might happen for slow filesystems where a fast-content-type might
be provided instead. Don't try to manipulate that content_type if it's
NULL, otherwise we'll either throw warnings (at best) or crash (at
worse).
2020-02-28 16:56:29 +01:00
Nathan Follens
3165c3c257 Update Dutch translation 2020-02-27 11:08:52 +00:00
Danial Behzadi
78dca145f8 Update Persian translation 2020-02-26 22:59:11 +00:00
Danial Behzadi
cca54a0d93 Update Persian translation 2020-02-26 22:20:17 +00:00
Lukas K
e618a49d71 document font-feature-settings CSS property
introduced in 2e2b6478
2020-02-26 21:51:31 +01:00
Matthias Clasen
0c51c66bea Merge branch 'tnum-gtk-3' into 'gtk-3-24'
css: add support for font-feature-settings

See merge request GNOME/gtk!1478
2020-02-26 02:03:31 +00:00
Lukas K
2e2b647833 css: add support for font-feature-settings 2020-02-25 22:54:00 +01:00
Matthias Clasen
f2d369732b Merge branch '138-gtk3-install-valgrind-suppressions' into 'gtk-3-24'
Add Valgrind suppressions files

See merge request GNOME/gtk!1468
2020-02-24 00:07:29 +00:00
Philip Chimento
b47ddb09ad Add Valgrind suppressions files
This copies the suppressions files from the master branch.

See: #138
2020-02-23 15:39:12 -08:00
Changwoo Ryu
4601e0e7ec Update Korean translation 2020-02-22 10:47:35 +00:00
Matthias Clasen
429a6287e0 Merge branch 'wip/carlosg/selection-null-checks' into 'gtk-3-24'
Protect against NULL selection data from clients

See merge request GNOME/gtk!1452
2020-02-20 13:58:12 +00:00
Carlos Garnacho
a097ca0906 gdk/wayland: Harden against NULL selection content
If NULL is returned, probably the client shouldn't advertise the
mimetype. Make it sure we forget entirely about the attempt to
cache this mimetype, as it'll be mistaken as pending otherwise.

Dropping this cached selection will in consequence close the fd
of all pending readers, which seems appropriate for NULL content.

https://gitlab.gnome.org/GNOME/gtk/issues/2456
2020-02-20 14:09:00 +01:00
Carlos Garnacho
6893118510 gdk/wayland: Avoid invalid memory access on cancellation
The only way to have G_IO_ERROR_CANCELLED in the write callback
goes through having the array of pending writers already cleared.
It should not access the invalid AsyncWriteData and StoredSelection
in that case.
2020-02-20 14:09:00 +01:00
Christoph Reiter
81ef7eb30b Revert "CI: Disable building man pages in MSYS2 to work around docbook.xsl breakage"
This reverts commit 09ec272d47.

This got fixed in MSYS2
2020-02-19 07:40:48 +01:00
Jakub Steiner
0ae09a2d44 Merge branch 'wip/fmuellner/circular-osd-buttons' into 'gtk-3-24'
Adwaita: Leave .circular .osd buttons alone!

See merge request GNOME/gtk!1448
2020-02-18 21:34:17 +00:00
Florian Müllner
dc6ba8d688 Adwaita: Leave .circular .osd buttons alone!
.osd suggests a particular color/background/hover style, while .circular
only suggests roundness. So for buttons that use both classes, make sure
the former takes precedence with regard to background/hover.
2020-02-18 20:37:53 +01:00
Emmanuele Bassi
369fd7734b Merge branch 'infobar-content-area-type' into 'gtk-3-24'
[3.24] GtkInfoBar/GtkDialog: Add `type Gtk.XXX` annotations for headerbar/action_area/content_area getters

See merge request GNOME/gtk!1446
2020-02-18 10:57:48 +00:00
Sebastian Dröge
d9fc2bffdd GtkDialog: Add type Gtk.XXX annotations for return values of action_area/headerbar getters 2020-02-18 10:51:20 +02:00
Sebastian Dröge
1f96d57a0f GtkInfoBar: Add type Gtk.Box annotation for action_area/content_area getters 2020-02-18 10:45:34 +02:00
Matthias Clasen
fab213a5f9 3.24.14 2020-02-17 12:30:04 -05:00
Ignacio Casal Quinteiro
63b061684d Merge branch 'gtk-3-24-fix-runtime-assertions' into 'gtk-3-24'
Prevent Quartz/CoreGraphics runtime assertion failures. (GTK 3)

See merge request GNOME/gtk!1442
2020-02-17 15:49:42 +00:00
David Hogan
a1720b97a4 Prevent Quartz/CoreGraphics runtime assertion failures.
gdk_window_impl_quartz_release_context () can be called with a NULL CGContextRef. This causes CoreGraphics assertion failures when debugging a Gtk application in Xcode, as the code was blindly passing that NULL to CGContextRestoreGState () and CGContextSetAllowsAntialiasing (). Given that the matching pair of CGContextSaveGState () and CGContextSetAllowsAntialiasing () calls are already checking for a NULL CGContextRef, it seems reasonable to wrap these calls in a NULL check.
2020-02-17 10:02:50 +11:00
Asier Sarasua Garmendia
1c4d5fbe20 Update Basque translation 2020-02-16 20:03:14 +00:00
Claude Paroz
878be85d0c Update French translation 2020-02-16 19:59:25 +00:00
Carlos Garnacho
0e5d7c6323 Merge branch 'enable' into 'gtk-3-24'
imwayland: Fix enabling and disabling of text inputs

See merge request GNOME/gtk!1354
2020-02-15 12:47:55 +00:00
Dorota Czaplejewicz
a7c17ca0c5 imwayland: Do not send events while text input is inactive. 2020-02-15 13:10:34 +01:00
Dorota Czaplejewicz
601b7c8edf imwayland: Use common function to enable text input
Enabling text input needs to send the supported capabilities.
It's easiest to ensure that by using a single enable function.
2020-02-15 13:10:34 +01:00
Dorota Czaplejewicz
fc437410ce imwayland: Move release handling after enable
In preparation for the commit which calls enable in the release handler.
2020-02-15 13:10:34 +01:00
Matthias Clasen
56ee5f03c7 Merge branch 'wip/carlosg/simultaneous-clipboard-access-3.24' into 'gtk-3-24'
gdk/wayland: Handle simultaneous selection requests

See merge request GNOME/gtk!1438
2020-02-14 23:32:07 +00:00
Carlos Garnacho
2ba067e3bc gdk/wayland: Handle simultaneous selection requests
Cache separately the selection contents for each given window/selection/atom
combination, and keep the requestors separate for each of those.

This allows us to incrementally request multiple mimetypes, and dispatch
the requestors as soon as the data is up. This stored selection content is
cached until the selection owner changes, at which point all pending readers
could get their transfers cancelled, and the stored content for the selection
forgotten.
2020-02-14 21:06:59 +01:00
Matthias Clasen
86ac6d447c Merge branch 'recursive-search' into 'gtk-3-24'
GtkSearchEngineSimple: Disable recursive search

See merge request GNOME/gtk!1356
2020-02-14 13:15:07 +00:00
Matthias Clasen
343e9cfad4 Merge branch '1464-tree-view-expander-arrows-no-longer-positioned-vertically-centered-correctly' into 'gtk-3-24'
Resolve "Tree view expander arrows no longer positioned (vertically centered) correctly"

See merge request GNOME/gtk!1434
2020-02-14 12:30:59 +00:00
Emmanuele Bassi
326df4840f Merge branch 'gtk-3-24' into 'gtk-3-24'
Fixed OpenGL extension detection for extensions promoted to OpenGL core. (Gtk 3.24)

See merge request GNOME/gtk!1422
2020-02-14 11:32:11 +00:00
António Fernandes
90a006b362 treeview: Prevent fuzzy centered expander arrows
We want expander arrows to be vertically centered in their row, so we
pass the cell area's height to the renderer.

However, if the cell area's height is an odd number while the
"expander-size" style property is an even number, or vice versa, the
arrow will be centered in a half pixel, and fuzzily rendered.

So, round the render height to the same parity as the expander-size.

(This is not necessary for the arrow width because it's assumed equal
to the "expander-size" style-property.)
2020-02-14 08:38:29 +00:00
António Fernandes
5d46f3c2e7 treeview: Respect expander-size style property.
An expander arrows's render width is supposed to be derived from the
"expander-size" style property.

However, we are actually rendering it for a width equal to
expander-size + 1. This results in ugly blurry rendering.

There is a comment justifying this "+ 1", which has been there for
almost 2 decades. But the justification doesn't seem to apply to
the current code, so the original motivation is likely obsolete.

Let's remove this "+ 1" to render the arrow to a width exactly equal
to the "expander-size" style property.
2020-02-14 08:38:29 +00:00
António Fernandes
0494090afa Revert "treeview: respect expander-size style property"
This reverts commit d6a29e1b8c.

It fixed blurry rendering of expander arrows.

However, it also introduced a regression in that the arrows are no
longer vertically centered if rows are taller than twice the
expander-size style property.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1464
2020-02-14 08:38:29 +00:00
David Hogan
66e2e9c02a Fixed OpenGL extension detection for extensions promoted to OpenGL core.
For a given OpenGL context, macOS in particular does not support enumeration / detection of OpenGL features that have been promoted to core OpenGL functionality. It is possible other drivers are the same. This change assumes support for GL_ARB_texture_non_power_of_two with OpenGL 2.0+, GL_ARB_texture_rectangle with OpenGL 3.1+ and GL_EXT_framebuffer_blit with OpenGL 3.0+. I failed to find definitive information on whether GL_GREMEDY_frame_terminator has been promoted to OpenGL core, or whether GL_ANGLE_framebuffer_blit or GL_EXT_unpack_subimage have been promoted to core in OpenGL ES. This change results in a significant GtkGLArea performance boost on macOS.

Closes #2428
2020-02-14 17:51:22 +11:00
Matthias Clasen
011dcf828b Merge branch 'wip/muktupavels/info-bar-reftest' into 'gtk-3-24'
fix info-bar-message-types.ui reftest

See merge request GNOME/gtk!1428
2020-02-14 00:19:43 +00:00
Alberts Muktupāvels
840ef37bfd infobar: fix initial window position
Call gtk_widget_set_allocation after chaining up to parent class
to ensure that GtkInfoBar has correct allocation. Otherwise x and y
is set to zero causing wrong window position in gtk_info_bar_realize.

This fixes info-bar-message-types.ui reftest.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1428
2020-02-14 00:50:27 +02:00
Matthias Clasen
88249f7077 Merge branch 'ci-msys2-disable-man-pages' into 'gtk-3-24'
CI: Disable building man pages in MSYS2 to work around docbook.xsl breakage

See merge request GNOME/gtk!1432
2020-02-13 20:37:11 +00:00
Christoph Reiter
09ec272d47 CI: Disable building man pages in MSYS2 to work around docbook.xsl breakage
MSYS2 issue: https://github.com/msys2/MINGW-packages/issues/6194
2020-02-13 20:35:57 +01:00
Daniel Mustieles
30367521a8 Updated Spanish translation 2020-02-13 16:34:31 +01:00
Matthias Clasen
277c943d63 Merge branch 'mcatanzaro/#2424' into 'gtk-3-24'
window: prepare for window destruction after gtk_window_close()

See merge request GNOME/gtk!1407
2020-02-11 16:59:48 +00:00
Emmanuele Bassi
418b80e6c8 Merge branch 'private-code' into 'gtk-3-24'
Use `wayland-scanner private-code` in autotools build

See merge request GNOME/gtk!1295
2020-02-11 16:35:30 +00:00
Emmanuele Bassi
a70ecff82d Merge branch 'meson_warn' into 'gtk-3-24'
Revert "Force the loadable module suffix on the print backend modules."

See merge request GNOME/gtk!1345
2020-02-11 16:33:44 +00:00
Michael Catanzaro
fe2370a5ba window: prepare for window destruction after gtk_window_close()
Epiphany is doing something weird after calling gtk_window_close(),
because by the time the callback executes, the window has no GdkWindow.
Frankly, I don't know what's happening there, but we should probably not
crash.

Fixes #2424
2020-02-10 22:09:10 -06:00
Emmanuele Bassi
3a17e80061 Revert "Force the loadable module suffix on the print backend modules."
This reverts commit ee448db031.

The `name_suffix` argument is already set, and by setting it twice we're
just getting a warning at configuration time from Meson.
2020-02-09 21:04:23 +00:00
Jiri Grönroos
4d7d811252 Update Finnish translation 2020-02-09 18:52:13 +00:00
Sabri Ünal
05f409fbdc Update Turkish translation 2020-02-09 13:58:41 +00:00
Sabri Ünal
8ba1a29ee4 Update Turkish translation 2020-02-09 13:57:38 +00:00
Bruce Cowan
5ac59dc3b9 Update British English translation 2020-02-08 13:56:28 +00:00
Matthias Clasen
9c8babacae Merge branch 'vista_clipboard' into 'gtk-3-24'
GDK W32: Use Vista+ clipboard API

See merge request GNOME/gtk!1143
2020-02-06 12:52:11 +00:00
Jakub Steiner
70ebd7e237 Merge branch 'Gtk_3_24_focus_rings' into 'gtk-3-24'
Outline/focus ring border-radii fixes

See merge request GNOME/gtk!1384
2020-02-05 12:18:55 +00:00
Carlo Lobrano
b50ccaea12 Adwaita: always use link specific colors for link selector
link target uses `$selected_bg_color` and `$selected_fg_color` for the
definition of some selectors (e.g. selected).

While `$link_color` and `$link_visited_color` are based on
`$selected_bg_color`, this does not seem coherent.

Replacing `$selected_*g_color` in link target style with link colors
defined in `_colors.scss file`.
2020-02-05 13:14:26 +01:00
Feichtmeier
cfd530db0d Outline/focus ring border-radii fixes
- change %linked_XXX class outline-radii to match the border-radii
- adapt the .dialog-action-area buttons to this
2020-02-04 12:34:20 +00:00
Jakub Steiner
b0f24fd8d5 Adwaita: generate up to date CSS
- the typography SASS changes weren't generated in the CSS
2020-02-04 11:09:38 +01:00
Thomas Holder
5e8d97ef0b gdk quartz: add missing include (-Werror=implicit)
Regression of GNOME/gtk!641 (ef72fe750a)
2020-02-02 11:16:40 +01:00
John Ralls
8670b7980d Merge Thomas Holder's 'gtk-3-24-fix-gdkcursor-quartz' into gtk-3-24. 2020-02-01 15:29:41 -08:00
Thomas Holder
528f780871 gdk quartz: add missing include
Fixes startup crash with Inkscape.

Regression of GNOME/gtk!641 (ef72fe750a)
2020-02-01 23:56:56 +01:00
Matthias Clasen
2f9431965b Merge branch 'model-button-a11y-state' into 'gtk-3-24'
modelbutton: Update a11y states

See merge request GNOME/gtk!1374
2020-01-31 18:31:23 +00:00
Matthias Clasen
09b14437a8 modelbutton: Update a11y states
We took care to set the proper role on our accessible object,
but we forgot to update the state for check and radio button
roles.
2020-01-31 19:08:09 +01:00
John Ralls
e2c34b9db7 Merge branch 'issue2225' into gtk-3-24 2020-01-30 10:31:57 -08:00
Matthias Clasen
9c832b388b Merge branch 'gdk-device-leak-fix-gtk3' into 'gtk-3-24'
GdkDevice leak fix

See merge request GNOME/gtk!1359
2020-01-30 09:10:50 +00:00
Stas Solovey
9ba0671b32 Update Russian translation 2020-01-29 20:48:21 +00:00
Emmanuele Bassi
a574404a2e Merge branch 'wip/muktupavels/work-areas-v3-3-24' into 'gtk-3-24'
per-monitor work areas

See merge request GNOME/gtk!478
2020-01-29 11:25:19 +00:00
Alberts Muktupāvels
6609a9f061 x11: add support for _GTK_WORKAREAS_Dn
If window manager supports _GTK_WORKAREAS use per-monitor work areas.

https://mail.gnome.org/archives/wm-spec-list/2018-December/msg00000.html
https://gitlab.freedesktop.org/xdg/xdg-specs/merge_requests/22

https://gitlab.gnome.org/GNOME/gtk/merge_requests/478
2020-01-28 14:51:22 +02:00
Sebastian Keller
9ce66b9d05 gdk/x11: Properly unref removed device in XI2 device manager
When a device is added, there are two references to it by the device
manager, the initial one and the one used for the id_table. Removing a
device only removed the reference added by the id_table resulting in the
GdkDevice being leaked.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1359
2020-01-27 22:06:49 +01:00
Dušan Kazik
cb1c16021e Update Slovak translation 2020-01-27 08:00:50 +00:00
Sebastian Keller
4cef9f3471 gdkseatdefault: Unref removed slave devices
Adding a slave device adds a ref, but removing it does not unref it.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1359
2020-01-27 01:48:37 +01:00
Dušan Kazik
9a65e05748 Update Slovak translation 2020-01-26 20:31:02 +00:00
Xavier Claessens
68bd429edd GtkSearchEngineSimple: Disable recursive search
It is too slow to be useful, rely on the Tracker engine to perform recursive search.

Fixes: #2392.
2020-01-26 07:47:26 -05:00
Piotr Drąg
d877325a1e Add empty Kurdish Sorani translation of properties
Follow-up to 3822ac74fc

Build will break without this, see the note in LINGUAS.
2020-01-25 12:35:12 +01:00
Matthias Clasen
e4509d723e Merge branch 'display-woes' into 'gtk-3-24'
Couple of fixes for GtkDisplay open/close

See merge request GNOME/gtk!1343
2020-01-24 16:35:13 +00:00
Matthias Clasen
ed9825e8ca Merge branch 'fix-avahi_service_resolver_cb-crash' into 'gtk-3-24'
printing: Fix crash in avahi_service_resolver_cb

See merge request GNOME/gtk!1346
2020-01-23 16:42:35 +00:00
Olivier Fourdan
b1d55f2c85 gtksettings: Remove display from cache on closing
GTK caches the settings per display in a static `GArray`, keeping a
reference to the `GdkDisplay` as the key.

However, when closing the display, the corresponding entry is not
removed from the cache in `GtkSettings`.

So when reopening again a `GdkDisplay`, if the new address matches one
of the previously closed display, the cache will return the existing
`GtkSettings` from the cache, which still holds a reference to the old
`GdkScreen` which was freed along the `GdkDisplay`.

To avoid the issue, make sure to remove the `GdkDisplay` and
corresponding `GdkSettings` when closing the `GdkDisplay`.

Also, care must be taken not to recreate the `GdkSettings` and re-add
the `GdkDisplay` to the cache once the display is closed, and make sure
callers of `gtk_settings_get_for_display()` can deal with a returned
value being `NULL` if the display is closed.

Fixes: commit 360a3c1690 - "Use a cheaper way to store settings per
display"
2020-01-23 17:34:47 +01:00
Olivier Fourdan
c9601f1567 gdk/wayland: Fix gdk_window_impl_wayland_finalize() warnings
On Wayland, opening and closing a `GdkDisplay` generates a coupe of
warnings at runtime:

```
  GLib-GObject-WARNING **:
    invalid cast from 'GdkWindowImplWayland' to 'GdkWindow'
  GLib-GObject-WARNING **:
    invalid cast from 'GdkWaylandWindow' to 'GdkWindowImplWayland'
```

This is from `gdk_window_impl_wayland_finalize()` which tries to cast
the given GObject to a `GdkWindow` while it's a `GdkWindowImplWayland`.

Use the correct type casting of objects to avoid the warnings.
2020-01-23 17:34:47 +01:00
WGH
3d5f083b75 printing: Fix crash in avahi_service_resolver_cb
printer_name_compressed_strv is NULL-terminated array
of gchar*, which means N+1 memory should be allocated.

Otherwise, if the printer name has no empty components
(which is usually the case), printer_name_compressed_strv[N],
which should contain the NULL sentinel, will actually lie
just outside of allocated memory, which is UB.

In my case, it led to crashes inside g_strjoinv
when Print... dialog is opened in evince.

    #0  0x00007fad2ce1bad7 in __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96
    #1  0x00007fad2d04d88d in g_strjoinv (separator=separator@entry=0x7fad0c9bc508 "-", str_array=str_array@entry=0x556b017f0200) at ../glib-2.60.7/glib/gstrfuncs.c:2585
    #2  0x00007fad0c9b8a89 in avahi_service_resolver_cb (source_object=<optimized out>, res=<optimized out>, user_data=0x7fad08020ee0) at /var/tmp/portage/x11-libs/gtk+-3.24.13/work/gtk+-3.24.13/modules/printbackends/cups/gtkprintbackendcups.c:3223
    #3  0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8b00 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
    #4  0x00007fad2d1f987d in g_task_return (task=0x556b017a8b00 [GTask], type=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1278
    #5  0x00007fad2d1f9dec in g_task_return (type=G_TASK_RETURN_SUCCESS, task=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1678
    #6  0x00007fad2d1f9dec in g_task_return_pointer (task=<optimized out>, result=<optimized out>, result_destroy=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1683
    #7  0x00007fad2d24b6af in g_dbus_connection_call_done (source=<optimized out>, result=0x556b017a8bc0, user_data=0x556b017a8b00) at ../glib-2.60.7/gio/gdbusconnection.c:5747
    #8  0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8bc0 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
    #9  0x00007fad2d1f8f09 in complete_in_idle_cb (task=0x556b017a8bc0) at ../glib-2.60.7/gio/gtask.c:1223
    #10 0x00007fad2d02d2c0 in g_main_dispatch (context=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3189
    #11 0x00007fad2d02d2c0 in g_main_context_dispatch (context=context@entry=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3854
    #12 0x00007fad2d02d658 in g_main_context_iterate (context=context@entry=0x556b00eee090, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.7/glib/gmain.c:3927
    #13 0x00007fad2d02d6df in g_main_context_iteration (context=context@entry=0x556b00eee090, may_block=may_block@entry=1) at ../glib-2.60.7/glib/gmain.c:3988
    #14 0x00007fad2d22248d in g_application_run (application=0x556b0116f130 [EvApplication], argc=<optimized out>, argv=<optimized out>) at ../glib-2.60.7/gio/gapplication.c:2519
    #15 0x0000556b002e55a1 in  ()
    #16 0x00007fad2ccd6f1b in __libc_start_main (main=0x556b002e50d0, argc=2, argv=0x7ffe1057fa88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe1057fa78) at ../csu/libc-start.c:308
    #17 0x0000556b002e567a in  ()

    (gdb) p printer_name_compressed_strv[0]
    $4 = (gchar *) 0x556d4a4be430 "Brother"
    (gdb) p printer_name_compressed_strv[1]
    $5 = (gchar *) 0x7f9dbc011090 "MFC"
    (gdb) p printer_name_compressed_strv[2]
    $6 = (gchar *) 0x556d4a51ba50 "7860DW"
    (gdb) p printer_name_compressed_strv[3]
    $7 = (gchar *) 0x401 <error: Cannot access memory at address 0x401>
2020-01-23 18:27:41 +03:00
John Ralls
eabaf90076 Match returns annotation on quartz version of gtk_drag_dest_get_target_List. 2020-01-22 20:53:38 -08:00
John Ralls
c3deff17a6 Check target list not null to prevent segfault. 2020-01-22 20:53:38 -08:00
John Ralls
44c033ccb8 Ensure that GtkDragDestSite is inited to 0. 2020-01-22 20:53:38 -08:00
John Ralls
81c42faa5a Handle NSException from removeItemAtIndex. 2020-01-22 20:53:38 -08:00
sicklylife
43d7747df6 Update Japanese translation 2020-01-22 17:36:38 +00:00
sicklylife
650a3996ba Update Japanese translation 2020-01-22 17:27:16 +00:00
Emmanuele Bassi
e8cd4d4d33 Merge branch 'wip/muktupavels/issue-1084' into 'gtk-3-24'
Complete startup notification sequence for remote invocations

See merge request GNOME/gtk!1296
2020-01-22 15:07:27 +00:00
Matthias Clasen
159ad1161f Merge branch 'wip/jimmac/typography-classes-gtk3' into 'gtk-3-24'
Adwaita: general typography classes

See merge request GNOME/gtk!1341
2020-01-22 13:51:02 +00:00
Jakub Steiner
9b11707a52 Adwaita: general typography classes
- many moons and some iterations later, these are the suggested
      general typographic styles. Already being referenced in apps like
      Banner Viewer (for now shipping custom definitions)

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1808
2020-01-22 12:06:31 +01:00
Jwtiyar Nariman
3822ac74fc Add Kurdish Sorani translation 2020-01-19 07:52:05 +00:00
Matthias Clasen
11568b158f inspector: Avoid an array overrun
Commit 3f56af3738 added a new value to the
GdkInputSource enum, forgetting that the inspector
has an array of names to match this enum.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2385
2020-01-18 10:53:30 -05:00
Matthias Clasen
cbf5768e91 Merge branch 'gtk3-fix-gesture-get-center' into 'gtk-3-24'
[GTK3] gtkgesture: Fix gtk_gesture_get_bounding_box_center() for touchpads

See merge request GNOME/gtk!1269
2020-01-17 22:24:32 +00:00
Yariv Barkan
1c050bdcf4 demo: Use pinch translation in the gestures demo
Add the pinch translation offset to the pinch gesture demo. That allows
moving the square around in addition to the already-supported rotate and
zoom.
2020-01-17 22:37:55 +02:00
Yariv Barkan
e229c6fe81 gtkgesture: Fix get-center for touchpad gestures
Touchpad gestures have only a single event sequence. The current
'center' of the gesture is the starting point + accumulated deltas.
Update gtk_gesture_get_bounding_box_center() accordingly.
2020-01-17 22:37:55 +02:00
Matthias Clasen
c6ce7fedd5 Merge branch 'wip/muktupavels/fix-critical-warning' into 'gtk-3-24'
menu: fix critical warning

See merge request GNOME/gtk!1182
2020-01-17 18:16:42 +00:00
Matthias Clasen
9f9fdd6caa Merge branch 'wip/muktupavels/root-surface-scale' into 'gtk-3-24'
gdkscreen-x11: update device scale also for root window

See merge request GNOME/gtk!1208
2020-01-17 18:13:50 +00:00
Timm Bäder
5986e100eb Merge branch '3-24-fix-imwayland-cursor' into 'gtk-3-24'
imwayland: Fix get_preedit_string cursor position

See merge request GNOME/gtk!1251
2020-01-17 06:46:56 +00:00
Jakub Steiner
5d38dd5618 Adwaita: update checkbox & radio
- minor update to checkboxes and radios,
  approved for gtk3 as well.

See https://gitlab.gnome.org/GNOME/gtk/issues/2291
2020-01-15 22:18:38 +01:00
Matthias Clasen
6d3138fe6b Merge branch 'fix-2378' into 'gtk-3-24'
fontchooser: Fix size label not being hidden

See merge request GNOME/gtk!1317
2020-01-14 22:42:33 +00:00
Alex Samorukov
e02148491f Use bundle id instead of package name for the macOS preview as filename is now changed 2020-01-14 22:12:53 +00:00
James Westman
b5ea2c78d6 fontchooser: Fix size label not being hidden
Even when the level property of a font chooser did not include
GTK_FONT_CHOOSER_LEVEL_SIZE, the "Size" label was still displayed.

Fixes #2378.
2020-01-14 16:01:16 -06:00
Ricardo Silva Veloso
db7c2afe6b Update Brazilian Portuguese translation 2020-01-14 20:31:35 +00:00
Matthias Clasen
0bffcd8882 Merge branch 'adwaita-cross-fade-fix-gtk3' into 'gtk-3-24'
Adwaita: Fix syntax error in cross-fade() (GTK3)

See merge request GNOME/gtk!1307
2020-01-14 05:32:45 +00:00
Matthias Clasen
8ed65a96b9 Merge branch 'image-surfce-cache-leak' into 'gtk-3-24'
GtkCssImageSurface: Plug cache surface leak

See merge request GNOME/gtk!1309
2020-01-14 05:32:08 +00:00
Matthias Clasen
cf31119bf4 gtk-demo: Use a default action in the infobars demo
This makes the question infobar activatable by clicking
anywhere in it.
2020-01-14 00:29:53 -05:00
Matthias Clasen
0c6ea4c7b2 Adwaita: Add hover for clickable infobars 2020-01-14 00:29:53 -05:00
Matthias Clasen
b55ef8d89a infobar: Activate default action on clicks
When we have a default action set on the infobar, activate it
for clicks anywhere in the infobar.  Also add an .action style
class in this case, so we can add a hover highlight to the infobar
just for this case.
2020-01-14 00:29:53 -05:00
Sebastian Keller
7e2bebb4d5 GtkCssImageSurface: Plug cache surface leak
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2373
2020-01-13 23:24:47 +01:00
nana-4
404f4c6627 Adwaita: Fix syntax error in cross-fade()
cross-fade() requires two images.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2371
2020-01-14 06:21:17 +09:00
Alex Samorukov
4a1dc1abfa Merge branch 'gtk-3-24-issue-2102' into 'gtk-3-24'
gdk_quartz_keymap_translate_keyboard_state fills consumed_modifiers incorrectly (closes #2102)

See merge request GNOME/gtk!1225
2020-01-10 21:07:46 +00:00
Mario Sanchez Prada
c17c18e440 application: Complete startup notification sequence for remote invocations
When a remote instance of a GTK application implementing the Startup
Notification protocol gets spawned it will pass the startup sequence
ID as "platform data" to the main instance. Thus, we need to make sure
that the startup sequence gets completed in that case, since the remote
instance won't do it by itself, since it won't map any top level window.

Checking for this "platform data" in the implementation of the after_emit()
virtual method in the primary instance should be a good place to do so, since
the existence of such data proves that a remote instance has been spawned.

https://gitlab.gnome.org/GNOME/gtk/issues/1084
2020-01-10 13:32:37 +02:00
Michael Forney
fb98242e18 Use wayland-scanner private-code in autotools build
The sed -i flag is non-standard, and may not be available in all
implementations.

The meson build already requires wayland >= 1.14.91 and uses
private-code, so just do that in the autotools build as well.
2020-01-09 19:15:46 -08:00
Michael Forney
156d6fffbe Update wayland requirement to 1.14.91 for use of private-code
In a4fe15d9f0, the wayland-scanner command was changed to use
`private-code`, which was first introduced in wayland-1.14.91. This
was synced from master commit a2a99d27c9, which *did* include a
corresponding wayland version requirement bump, but it appears that
this was lost in the sync.
2020-01-09 19:04:44 -08:00
Umarzuki Bin Mochlis Moktar
d0c351468b Update Malay translation 2020-01-08 14:53:41 +00:00
Alex Samorukov
55346fbeb9 Merge branch 'gtk-3-24-fix-set_functions' into 'gtk-3-24'
quartz: impl_class->set_functions listed twice in the object

See merge request GNOME/gtk!1282
2020-01-08 14:17:36 +00:00
Alex Samorukov
76e95a702f impl_class->set_functions listed twice in the object 2020-01-08 14:17:36 +00:00
Alex Samorukov
a4bb6cea63 Merge branch 'gtk-3-24-fixeventloop' into 'gtk-3-24'
Move `[NSApplication sharedApplication]` after event loop init to avoid window focus issues (closes #2342).

See merge request GNOME/gtk!1285
2020-01-08 14:13:36 +00:00
Alex Samorukov
6fdef1055b move [NSApplication sharedApplication] after _gdk_quartz_events_init() to avoid initialization issues 2020-01-08 14:13:36 +00:00
Alex Samorukov
a83066bdc5 Merge branch 'samm/fix-fs/gtk-3-24' into 'gtk-3-24'
Fix was_fullscreen flag (again!)

See merge request GNOME/gtk!1287
2020-01-08 13:56:10 +00:00
Alex Samorukov
2406badb92 Fix was_fullscreen flag (again!) 2020-01-08 13:56:10 +00:00
Alexandr Miloslavskiy
822705fe3e gkimmulticontext: Fix crash due to leaked signal handler
The problem is caused by gtk_im_multicontext_set_slave(), which forgets
to disconnect these signal handlers:
* gtk_im_multicontext_retrieve_surrounding_cb
* gtk_im_multicontext_delete_surrounding_cb

If slave GtkImContext emits signal after GtkIMMulticontext context is
destroyed, this leads to reading freed memory, sometimes causing a crash.

Fixes: #2365
2020-01-06 20:39:34 +01:00
Jordi Mas
fcc72575a2 Update Catalan translation 2020-01-04 07:23:34 +01:00
Matthias Clasen
6f374e787b Merge branch 'gtk-3-24-fix-fullscreen-state' into 'gtk-3-24'
Fix typo which preventing fullscreen state from being updated correctly

See merge request GNOME/gtk!1277
2020-01-03 17:54:12 +00:00
Alex Samorukov
5cdca80c0c Fix typo which preventing fullscreen state from being updated correctly 2020-01-03 17:54:12 +00:00
Alberts Muktupāvels
489fb1783b gdkscreen-x11: update device scale also for root window
Window scale can change at runtime. If cairo_surface is already
created for root window gdk_pixbuf_get_from_window will return
wrong image.

_gdk_x11_screen_set_window_scale already updates window_scale for
root window, update also cairo_surface device scale.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/1208
2020-01-03 18:50:14 +02:00
Umarzuki Bin Mochlis Moktar
a1a99bef83 Update Malay translation 2020-01-03 13:41:04 +00:00
Matthias Clasen
6116c0a0b4 Merge branch 'cherry-pick-6769db16' into 'gtk-3-24'
icontheme: Don't try to scale pixbufs to 0px

See merge request GNOME/gtk!1275
2020-01-01 19:24:21 +00:00
Benjamin Otte
edcddf6561 icontheme: Don't try to scale pixbufs to 0px
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.

(cherry picked from commit 6769db160d)
2020-01-01 18:17:14 +01:00
Matthias Clasen
d9a9ede7a2 Merge branch 'carlosgc/no-emoji-hint' into 'gtk-3-24'
emojichooser: never show emoji chooser when input hint no-emoji is present

See merge request GNOME/gtk!1272
2019-12-30 15:18:12 +00:00
Carlos Garcia Campos
c6e5030c61 emojichooser: never show emoji chooser when input hint no-emoji is present
It's currently used only to not include the insert emoji option in the
context menu, but it's still possible to show the emoji chooser in both
GtkEntry and GtkTextView using the key bindings.
See also https://bugs.webkit.org/show_bug.cgi?id=205609.
2019-12-30 10:56:06 +01:00
Jordi Mas
1bc188b1f4 Fixes to Catalan translation 2019-12-27 13:54:02 +01:00
Fran Dieguez
402445920b Update Galician translation 2019-12-25 03:24:27 +00:00
Fran Dieguez
3eec04802c Update Galician translation 2019-12-25 01:56:10 +00:00
Fran Dieguez
276aa563ba Update Galician translation 2019-12-25 01:31:55 +00:00
Matthias Clasen
0d6cff45c3 accelgroup: Fix a buffer overrun
gtk_accelerator_parse_with_keycode can
overrun its buffer for certain inputs.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325
2019-12-23 23:19:57 -05:00
Emmanuele Bassi
eeb896d648 Merge branch 'doc-scale-button-css' into 'gtk-3-24'
Document the CSS class used for the ScaleButton popover

See merge request GNOME/gtk!1246
2019-12-22 19:31:40 +00:00
Emmanuele Bassi
e7bd9adf3e Document the CSS class used for the ScaleButton popover
Otherwise it's not easy to divine the selector for the scale widget
inside the popover.
2019-12-22 19:12:20 +00:00
Matthias Clasen
f37673927c Merge branch 'gtk3-fix-gtkgesturerotate-leak' into 'gtk-3-24'
[gtk3] gtkgesturerotate: Fix a memory leak

See merge request GNOME/gtk!1262
2019-12-19 22:54:46 +00:00
Yariv Barkan
dc896f0910 gtkgesturerotate: Fix a memory leak
On touchpads gtk_gesture_get_sequences() was called without a
corresponding g_list_free(). The same was true for touchscreens
if due to some reason only a single sequence was found.
2019-12-19 20:53:45 +02:00
Efstathios Iosifidis
e5b05d2478 Update Greek translation 2019-12-17 22:40:37 +00:00
Emmanuele Bassi
37dd37178f Merge branch 'ci-update-gtk3' into 'gtk-3-24'
Update CI image

See merge request GNOME/gtk!1255
2019-12-17 18:00:58 +00:00
Emmanuele Bassi
a4e4b136c9 Update the list of tests that may fail
The update of the Docker image we use on our CI introduced changes in
the underlying platform, and that caused some reftests to fail.
2019-12-17 17:39:43 +00:00
Emmanuele Bassi
44b2f6792b ci: Update the Docker image 2019-12-16 20:07:39 +00:00
Emmanuele Bassi
40264c7ab3 ci: Add libXtst-devel
Needed for at-spi2-core.
2019-12-16 20:07:39 +00:00
Emmanuele Bassi
62d68ce88c ci: Update to Fedora 31
Fedora 29 is EOL.
2019-12-16 20:07:39 +00:00
xdavidwu
5ad1316b1e imwayland: Fix get_preedit_string cursor position
GtkIMContext get_preedit_string should return cursor position counted
in characters, but cursor_begin here is counted in bytes. This add the
missing conversion.
2019-12-15 19:19:54 +08:00
Marek Kasik
725892b653 printing: Fix getting info for standalone IPP printers
Create printer name from name of the advertised service
for standalone IPP printers as opposed to CUPS printers
advertised via Avahi which get name from their
resource path.
This is similar to what cups-filters does.

Pass GtkPrinter class to request for printer info
so that it does not need to be searched for
(such search could fail for standalone IPP printers).

https://gitlab.gnome.org/GNOME/gtk/issues/1509
2019-12-13 18:24:55 +01:00
Marek Kasik
fb2fa8348d printing: Don't show Rejecting Jobs when we don't know
Set reasonable default values for printers discovered
by Avahi which do not have 'printer-type' attribute.
This is the case for network printers which were not
published by CUPS.

Related to the issue #1509.
2019-12-13 18:24:55 +01:00
Matthias Clasen
5df5716871 Merge branch 'wip/sadiq/fix-switch-on-touch' into 'gtk-3-24'
switch: Fix toggling switch on touch devices

See merge request GNOME/gtk!1233
2019-12-12 19:33:57 +00:00
Matthias Clasen
77f465bf19 Merge branch 'terminal-3-24' into 'gtk-3-24'
imwayland: Suppport terminal purpose

See merge request GNOME/gtk!1245
2019-12-12 19:12:34 +00:00
Dorota Czaplejewicz
c7c8ab6624 imwayland: Suppport terminal purpose 2019-12-12 18:20:06 +00:00
Christoph Reiter
3fe6c5caf8 Merge branch 'honor-hotspot' into 'gtk-3-24'
x11: Honor hotspot during drag cancel animation

See merge request GNOME/gtk!1235
2019-12-11 12:59:36 +00:00
John Ralls
235d28f02d Fix visibiity of gdkselection-quartz.c exported gtk-only functions.
Also ensure that gdkquartz-gtk-only.h is included in distribution
tarballs.

Failing to include gdkquartz-gtk-only.h in gdkselection-quartz.c
caused the compiler to not set the extern storage class on the
functions, in turn causing them to be not exported by libgdk-3.0.dylib.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/32 again.
2019-12-10 21:46:59 -08:00
John Ralls
ee448db031 Force the loadable module suffix on the print backend modules.
On MacOS the shared library and loadable module suffix is different.
While dlopen will load a shared module just fine, Gtk's loader and
query tools don't know to look for them so it's important to give
loadable modules the .so suffix.
2019-12-10 21:46:59 -08:00
Robert Mader
a3cff0add1 x11: Honor hotspot during drag cancel animation
Otherwise the icon "jumps" to the cursor position with its top left when
the animation starts.
This is especially visible if the dragged item is big, like when dragging
mails in Thunderbird.
2019-12-09 01:22:11 +01:00
Mohammed Sadiq
2fc60a1e3f switch: Fix toggling switch on touch devices
priv->is_switch is used to get hint if the gesture happened
on the switch. On touch devices, ::enter-notify-event may
not be emitted, and so priv->is_switch may not be set.

Let it be set when ::pressed gesture is emitted so that
the switch is toggled when the gesture occurs regardless
of whether a pointing device is present or not.
2019-12-06 20:16:51 +05:30
Emmanuele Bassi
c1146db2fe Merge branch 'issue-1077-backport' into 'gtk-3-24'
Annotate GtkTreeModelSort.new_with_model() appropriately

See merge request GNOME/gtk!1229
2019-12-03 16:22:41 +00:00
LutzLue
e3247ed0d9 Annotate GtkTreeModelSort.new_with_model() appropriately
The new_with_model() method is a constructor, and it returns a GtkTreeModelSort
instance, even if the C API returns a GtkTreeModel for the convenience of C
developers.

Fixes: #1077
2019-12-03 16:02:45 +00:00
Matthias Clasen
d5397dfb31 Merge branch 'wip/exalm/popover' into 'gtk-3-24'
Adwaita: use transparent borders for popovers

See merge request GNOME/gtk!1227
2019-12-02 20:41:03 +00:00
Alexander Mikhaylenko
379669b153 Adwaita: use transparent borders for popovers
Do the same thing as menus and windows do already.
2019-12-02 21:54:37 +05:00
Matthias Clasen
06d1cf5e52 Merge branch 'wip/muktupavels/opaque-region' into 'gtk-3-24'
window: fix opaque region

See merge request GNOME/gtk!1221
2019-12-01 15:11:52 +00:00
Matthias Clasen
8b789993c3 Merge branch 'fix-backdrop-flat-button-styling' into 'gtk-3-24'
Adwaita: Fix some backdrop flat buttons

See merge request GNOME/gtk!1224
2019-12-01 15:08:44 +00:00
Thomas Holder
af6487d70c gdk: quartz: fix #2102 consumed_modifiers 2019-12-01 15:14:20 +01:00
nana-4
f26b9c9f9f Adwaita: Fix some backdrop flat buttons
The commit 6f6070b5 broke the styling.

This fixes it by adding a missing placeholder selector.
2019-12-01 13:06:32 +09:00
Alberts Muktupāvels
44c994e469 window: fix opaque region
Decoration node for drawing is used only for client side decorated
windows, but corners from opaque region is subtracted also for
normal windows.

Rename function to better reflect what it does and do not subtract
corners if decoration node was not used for drawing.
2019-11-30 19:53:40 +02:00
Timm Bäder
77e3ee88bd Merge branch 'dont-color-labels-directly-gtk3' into 'gtk-3-24'
Adwaita: Avoid directly coloring labels wherever possible (GTK3)

See merge request GNOME/gtk!1210
2019-11-29 11:55:06 +00:00
Timm Bäder
25174154b9 reftests: Fix css-multi-state test
Properly unset theme CSS and use the right selector for the toggle
buttons.
2019-11-29 20:35:06 +09:00
nana-4
ebde8349cb Adwaita: Avoid directly coloring labels wherever possible
Directly coloring labels can create a lot of unintended behaviors.
Unfortunately we can't avoid directly coloring `label:disabled` because
it can be used individually. This, however, tries to inherit color from
the parent element of labels wherever possible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1643
2019-11-29 00:46:20 +09:00
Jakub Steiner
b1bf354ade Merge branch 'sass-no-extend-compound-complete' into 'gtk-3-24'
themes: Remove remaining @extend with compound selectors

See merge request GNOME/gtk!1218
2019-11-28 15:05:49 +00:00
nana-4
f7d57cc1eb themes: Remove remaining @extend with compound selectors
This removes the remaining cases in 6f6070b5 by replacing them with a
simple placeholder selector.

`%button.flat.suggested-action` has been replaced by
`%selection_mode_button_flat`, because it's difficult to replace the
compound selector with a simple placeholder selector, and it doesn't
seem like a proper selector for `.selection-mode button.titlebutton` to
inherit.

The CSSs were generated with libsass 3.5.5 to minimize the git diff, but
I've confirmed that no warning happned with libsass 3.6.3 anymore.

See https://gitlab.gnome.org/GNOME/gtk/issues/2237
2019-11-28 22:21:23 +09:00
Matthias Clasen
f737908d2f Fix a11y test output 2019-11-27 13:16:22 -05:00
Matthias Clasen
e4b4305cf1 3.24.13 2019-11-27 10:12:24 -05:00
Matthias Clasen
f0002ad372 Merge branch 'no-objc' into 'gtk-3-24'
Hide Objective-C from outside GdkQuartz.

See merge request GNOME/gtk!641
2019-11-27 13:39:40 +00:00
Matthias Clasen
61d7700c17 Merge branch 'gtkq-events' into 'gtk-3-24'
gdk: quartz: prevent titlebar events from falling to the window below

See merge request GNOME/gtk!1140
2019-11-27 13:31:39 +00:00
Matthias Clasen
540d849a52 Merge branch 'pg_up_down' into 'gtk-3-24'
gdk: quartz: Avoid page up/down getting filtered by gtk_im_context_filter_keypress()

See merge request GNOME/gtk!1148
2019-11-27 13:25:36 +00:00
Matthias Clasen
56875730d1 Merge branch 'win32-gl-fullscreen-workaround-gtk3' into 'gtk-3-24'
gdkwindow-win32.c: Set WS_BORDER for fullscreen GL windows if requested

See merge request GNOME/gtk!648
2019-11-27 13:16:21 +00:00
Matthias Clasen
9d3e3eea7a Merge branch 'sass-no-extend-compound' into 'gtk-3-24'
themes: remove various @extend with compound selectors

See merge request GNOME/gtk!1171
2019-11-27 13:03:45 +00:00
Matthias Clasen
a8ce096bf8 Merge branch '1630-on3-24branch' into 'gtk-3-24'
Avoid Broadwayd - GtkEntry popup takes 35s after application startup

See merge request GNOME/gtk!1205
2019-11-27 13:00:33 +00:00
Matthias Clasen
19f59cac3d Merge branch 'clipboard-image-miss' into 'gtk-3-24'
GDK W32: no "GDK_SELECTION" event for clipboard

See merge request GNOME/gtk!1198
2019-11-27 12:57:25 +00:00
Matthias Clasen
31f5e8fe32 Merge branch 'fix-issue-1646' into 'gtk-3-24'
HighContrast: Add missing color to entry

See merge request GNOME/gtk!1214
2019-11-27 12:45:56 +00:00
nana-4
7564e43a6a HighContrast: Add missing color to entry
So entries don't inherit color from the parent element anymore.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1646
2019-11-27 20:58:15 +09:00
Matthias Clasen
5e8d4757d4 Merge branch 'jjardon/wayland' into 'gtk-3-24'
deprecated/gtkstatusicon.c: Fix compilation in wayland

See merge request GNOME/gtk!1207
2019-11-24 18:24:16 +00:00
Javier Jardón
c6792a41ab deprecated/gtkstatusicon.c: Fix compilation in wayland
Without this compilation in a wayland-only system fails
2019-11-24 14:33:26 +09:00
Alexandr Miloslavskiy
1efb72210d Fix crash in parse_border()
The bug was introduced in commit:
	9b7640b8 by Benjamin Otte, 2012-03-26 17:24:02
	styleproperty: Make _gtk_style_property_parse_value() return a CssValue

In that commit, `values` changed from `GValue*` to `GtkCssValue**`,
but one `!G_IS_VALUE (&values[8])` was left untouched. As a result,
if `border` shorthand contains anything after color, it might crash,
depending on memory layout.

New test included.

Fixes: #751
2019-11-23 18:06:31 +01:00
Christoph Reiter
3804d7a0ca Merge branch 'cherry-pick-f431e28c' into 'gtk-3-24'
gtkimcontextsimple.c: Use X11_DATA_PREFIX only on X11

See merge request GNOME/gtk!1206
2019-11-23 08:14:36 +00:00
Quentin Glidic
45bcc89a01 gtkimcontextsimple.c: Use X11_DATA_PREFIX only on X11
Unlike what commit d01ea18dc3 says, X11 is
not a requirement for Wayland, so a Wayland-only build is possible. We
just use the same logic as other non-X11 platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=784615

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>


(cherry picked from commit f431e28ce3)
2019-11-23 06:33:39 +00:00
Christoph Reiter
4d34e1cfec CI/msys2: Don't install sassc to skip CSS generation and make job errors fatal again
Once #2237 is fixed we can install sassc again, until then use the in-tree CSS.
2019-11-22 18:22:30 +01:00
Christoph Reiter
6f6070b510 themes: remove various @extend with compound selectors
They are no longer supported by sass and broken with libsass 3.6.3
(https://github.com/sass/libsass/issues/3033)

This removes some of them by replacing them with a placeholder selector.
This at least brings the resulting CSS size down a bit so gtk can be build
again.

The remaining cases I don't know how to convert because I haven't found a way to
reproduce the old output.

The CSS was generated with libsass 3.5.5.

See #2237
2019-11-22 17:54:30 +01:00
Christoph Reiter
39ef5e40d0 HighContrast: rebuild included CSS
afd61c3570 changed the scss but didn't sync the css
2019-11-22 17:49:23 +01:00
Fredy Paquet
edd490cf4d Avoid Broadwayd - GtkEntry popup takes 35s after application startup
preventing conversion attempt and timer being started on broadway
backend.

first iteration for #1630

Author:    Fredy Paquet <fredy@opag.ch>
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
2019-11-22 14:37:53 +01:00
Christoph Reiter
f76208808b Merge branch 'reftest.msvc.fix' into 'gtk-3-24'
reftests: Fix building on Visual Studio

See merge request GNOME/gtk!1203
2019-11-22 12:20:52 +00:00
Chun-wei Fan
11e5f2c473 gdkwindow-win32.c: Set WS_BORDER for fullscreen GL windows if requested
With some GL drivers, it may be the case that menus are not shown
correctly in fullscreen GL windows because DWM is deactivated in the
process.

Force WS_BORDER to be applied to the fullscreen GL window so that we have
a small 1px border when needed (by setting an envvar), so that DWM does
not get deactivated, hence enabling the menus to show.  Also, when we
force WS_BORDER to be applied in this situation, we also deliberately
place the window just outside the top lefthand corner of the screen by
1px and make the window 1px larger than the screen size, so that we
effectively hide the 1px border from view.

Fixes issue #1702.
2019-11-22 12:04:21 +08:00
Chun-wei Fan
36edb5fbf6 reftests: Fix building on Visual Studio
We need to mark the prototypes in the headers so that they get exported
properly from the reftest DLLs that we build, so that the reftest DLLs
and program will link properly.  Include gtk-reftest.h in
reftest-snapshot.c so that the compiler picks up the export directives
as needed.
2019-11-22 11:43:35 +08:00
Christoph Reiter
1a87249d1a Merge branch 'dont-hardcode-shared-library-3.24' into 'gtk-3-24'
Dont hardcode shared library (gtk3)

See merge request GNOME/gtk!1196
2019-11-19 19:58:02 +00:00
Руслан Ижбулатов
6452d34cd7 GDK W32: no "GDK_SELECTION" event for clipboard
_gdk_win32_display_convert_selection() does not return anything,
it generates a selection notify event instead. Depending on how
successful it was, the event will have property=GDK_NONE or
property="GDK_SELECTION".

property="GDK_SELECTION" is the default return value for successful
cases, and it tells GTK to grab the data that GDK previously deposited
using selection_property_store().

The problem is that the clipboard branch of this function calls
open_clipboard_timeout(), which can't return anything meaningful (it's
normally a timeout function), and thus doesn't know whether the function
succeeded or failed. Due to my oversight, this resulted in GDK
generating two selection notification events - one from inside of
open_clipboard_timeout() (with the right property, if successful),
and one from the catch-all last line (always defaulting to "GDK_SELECTION").

This caused issue #2223, where GTK only expected exactly one
notification per request, and got confused because it was getting two.

I've looked at the code in open_clipboard_timeout(), and it seems to me
that it always generates a notification (a successful one or an
unsuccessful one). Thus the branch of the function that calls it
directly does not need to follow up with a catch-all notification and
can just return.

This seems to be fixing issue #2223, at least for me, but i'm not
entirely sure that this will not have any adverse side-effects.
Clipboard handling in GTK3 is a complicated mess.
2019-11-18 13:43:42 +00:00
Niklas Hambüchen
656adece00 Try building static libs on CI
See #2248.

Cherry-Picked-From: 3936412332
2019-11-18 03:36:03 +01:00
Niklas Hambüchen
d5457d1b14 build: Don't hardcode shared_library() in meson.
Instead, use the standard library().
This is a meson best practice.

Fixes #2248.

Fixes -Ddefault_library=static not having any effect.

Cherry-Picked-From: bb9c07d8fe
2019-11-18 03:31:20 +01:00
Matthias Clasen
75475effb1 Merge branch 'issue-61' into 'gtk-3-24'
Ensure we have a client window before using it

See merge request GNOME/gtk!1194
2019-11-18 01:15:10 +00:00
Matthias Clasen
e11bdfabc0 Merge branch 'issue-2226' into 'gtk-3-24'
Ensure that cached surface sizes are 1x1

See merge request GNOME/gtk!1189
2019-11-18 00:53:37 +00:00
Emmanuele Bassi
0ade87ef92 Ensure we have a client window before using it
The XIM input method can some times go into weird states, especially
when extended devices or in mixed environments with multiple input
methods installed.

Ideally, people should simply stop using XIM, which is utterly broken,
and use IBus instead; nevertheless, crashing is not nice.

Fixes: #61
Fixes: #518
2019-11-16 20:57:43 +00:00
Emmanuele Bassi
0b4f5ba817 Merge branch 'issue-183' into 'gtk-3-24'
Do not use VIQR input method for vi locale by default

See merge request GNOME/gtk!1192
2019-11-16 20:33:46 +00:00
Ming Hua
307a045e52 Do not use VIQR input method for vi locale by default
In the Vietnamese Quoted-Readable input method, punctuation following a
base letter is converted into diacritical marks, for example a( → ă.
(See <https://en.wikipedia.org/wiki/Vietnamese_Quoted-Readable>.)
A 2008 bug report in Ubuntu argued that this is a problematic default,
particularly when typing passwords, where the effect of the punctuation
is non-obvious.

According to the bug reporter, VIQR is popular with Vietnamese users
living elsewhere in the world, where Vietnamese keyboards are unlikely
to be readily available, but is not a popular choice within Vietnam,
where the Telex or VNI input modes are preferred.

Closes: #183

Bug-Debian: https://bugs.debian.org/895043
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/191451

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2019-11-16 20:16:55 +00:00
Emmanuele Bassi
8d0138bd6b Ensure that cached surface sizes are 1x1
We cannot create similar surfaces that are smaller than 1x1 on X11, so
we should always ensure that we clamp the surface size to 1x1 when
calling gdk_window_create_similar_surface().

Fixes: #2226
2019-11-16 18:54:26 +00:00
Christoph Reiter
53a05daa31 Merge branch 'ci-distcheck' into 'gtk-3-24'
(3.24) gitlab-ci: Run distcheck, but without actually running the tests

See merge request GNOME/gtk!999
2019-11-16 08:24:47 +00:00
Emmanuele Bassi
089bf46d9a Merge branch 'fix-menu-check-radio-styling-gtk3' into 'gtk-3-24'
Adwaita: Fix check/radio styling in menu (GTK3)

See merge request GNOME/gtk!1186
2019-11-15 23:25:28 +00:00
Simon McVittie
98b4428543 CI: Enable X11 and Wayland backends for Autotools
Enabling one backend (Broadway, in commit 1882ff9b) implicitly disabled
all the others, which was probably not intentional. Bring the Autotools
build into line with Meson.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-11-15 19:04:02 +01:00
Christoph Reiter
c3c8ea3e88 Merge branch 'gtk3-installed-tests' into 'gtk-3-24'
gtk3/meson: port installed tests and reftests

See merge request GNOME/gtk!1110
2019-11-15 16:32:30 +00:00
nana-4
ef32ba3d6a Adwaita: Fix check/radio styling in menu
The new check/radio style increased their specificity, but it was not
synchronized in the menu styling.

This commit increases the specificity to match the updated check/radio
styling.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2096
2019-11-15 23:59:36 +09:00
Emmanuele Bassi
cc8a634c3e Merge branch 'Gtk-3-24_Check_radio_refresh' into 'gtk-3-24'
Refresh check/radio styling

See merge request GNOME/gtk!1184
2019-11-15 13:42:34 +00:00
frederik.feichtmeier
5f5303f8fc Refresh check/radio styling
- use a dedicated mixin
- flatten check/radios
2019-11-15 14:26:47 +01:00
Christoph Reiter
3c2b5cda74 meson: port installed tests and reftests
I couldn't get all reftests to work reliably, so the tests failing
on either CI or on my machine are skipped for now.

Installed tests are disabled by default and can be enabled with "-Dinstalled_tests=true"
2019-11-15 12:52:03 +01:00
Alberts Muktupāvels
e34037b015 menu: fix critical warning
Unset gdk-attached-grab-window from correct window.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1899
2019-11-14 19:00:50 +02:00
Stas Solovey
e5550439e2 Update Russian translation 2019-11-13 18:48:45 +00:00
Benjamin Otte
b6528c9f91 Merge branch 'status-icons-hidpi' into 'gtk-3-24'
statusicon: Render as cairo surface

See merge request GNOME/gtk!1135
2019-11-13 17:39:32 +00:00
Emmanuele Bassi
f20bca5ec0 Merge branch 'issue-2048' into 'gtk-3-24'
Document handling both discrete and smooth scrolling

See merge request GNOME/gtk!1180
2019-11-13 15:36:32 +00:00
Emmanuele Bassi
b736018843 Document handling both discrete and smooth scrolling
It can be tricky to deal with both, so let's give an example of using
both gdk_event_get_scroll_direction() and gdk_event_get_scroll_deltas().

Closes: #2048
2019-11-13 15:24:35 +00:00
Emmanuele Bassi
741e9a6278 Merge branch 'issue-2111' into 'gtk-3-24'
Do not crash when icon themes do not have a context

See merge request GNOME/gtk!1179
2019-11-13 15:23:30 +00:00
Emmanuele Bassi
21cd322df9 Do not crash when icon themes do not have a context
The Context key is not mandatory, so we need to handle its absence.

Fixes: #2111
2019-11-13 15:04:42 +00:00
Victor Kareh
4fc32b2751 statusicons: Improve code readability and remove dead code 2019-11-13 07:54:58 -05:00
Victor Kareh
1c09104dc6 statusicon: Render as cairo surface
On HiDPI displays, rendering Status Icons as pixbufs results in blurry
icons. By loading them at scale and rendering as a surface, we preserve
both their size and sharpness.
2019-11-13 07:47:50 -05:00
Emmanuele Bassi
9e72ec1c8a Merge branch 'update-libepoxy-wrap' into 'gtk-3-24'
Update libepoxy wrap

See merge request GNOME/gtk!1169
2019-11-11 13:54:00 +00:00
Luca Bacci
98711f8050 Update libepoxy wrap 2019-11-11 14:38:20 +01:00
Timm Bäder
b25f193da3 Merge branch 'docs-old-boxes' into 'gtk-3-24'
docs: Clarify when to replace old boxes with Grid

See merge request GNOME/gtk!1170
2019-11-11 07:39:05 +00:00
Emmanuele Bassi
d1936c1ae3 docs: Clarify when to replace old boxes with Grid
Mention that GtkGrid should only replace grid-like layouts achieved with
nested boxes.

Additionally, remove any mention of "future proofing": boxes are not
going away.
2019-11-08 18:02:13 +00:00
Emmanuele Bassi
759ee31b0c ci: Allow msys2 jobs to fail
The msys2 runner has started failing for internal reasons:

 - gtk-3-24 times out
 - master fails with a ld.exe assertion:
   BFD (GNU Binutils) 2.33.1 assertion fail
   ../../binutils-2.33.1/bfd/cofflink.c:2348

Both seem related to some MSYS2 issue. Until the runner is updated, we
should not block on it.
2019-11-05 10:53:24 +00:00
Emmanuele Bassi
1b18482d9f Merge branch 'revert-theme-change' into 'gtk-3-24'
Revert "Refresh checks and radios"

See merge request GNOME/gtk!1163
2019-11-04 23:39:25 +00:00
Emmanuele Bassi
b7dfb7836f Revert "Refresh checks and radios"
This reverts commit f261b41d47.

The commit broke the theme:

  Theme parsing error: gtk-contained.css:1176:74: Not a valid image
2019-11-04 22:47:00 +00:00
Jakub Steiner
4e346076f2 Merge branch 'adwaita-emoji-picker-adjustments' into 'gtk-3-24'
Adwaita: Emoji picker adjustments

See merge request GNOME/gtk!1159
2019-11-04 19:33:39 +00:00
frederik.feichtmeier
f261b41d47 Refresh checks and radios
- use a dedicated mixin to style checks and radios in _drawing.scss
- keep all special cases for checks and radios in _common.scss
- remove treeview disabled checks/radio styling because it seems no longer needed after testing with the new mixin
- add a fix for checked and indeterminate checks/radios in menus and slightly darken their borders similar to $selected_borders_color
- add a blank in front of a bracket

Fix backdrop

- remove backdrop-hover
- adapt the bg and fg look of checks/radios to other "blue" elements for example suggested action buttons
- fix selected treeview checks in backdrop being gray
2019-11-04 18:09:11 +01:00
Alex Monday
1051c1fcad Adwaita: Emoji picker adjustments
- Add margins for search entry;
- Increase side margins for emoji-section buttons box;
- Apply border-radius on hovered emoji;
- Adjust indication of hovered emoji-section button.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/2026
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1704
2019-11-03 13:03:58 +05:00
Christian Kirbach
a45a2c1de9 Update German translation 2019-10-27 15:33:54 +00:00
Jiří Techet
817e99640d gdk: quartz: Avoid page up/down getting filtered by gtk_im_context_filter_keypress()
For page up/down events (Fn+up_arrow and Fn+down_arrow on macOS)
gtk_im_context_filter_keypress() currently returns TRUE when im-quartz is
used. This means these events get removed when this function is used
(happens e.g. with the Scintilla text editing library).

Adding scrollPageDown: and scrollPageUp: into GdkQuartzView seems to
resolve the issue as these seem to get called instead of the already
present pageUp: and pageDown:.
2019-10-24 21:48:30 +02:00
Anders Jonsson
afb6603d09 Update Swedish translation 2019-10-23 21:01:56 +00:00
Jordi Mas
05b0e9a2f5 Update Catalan translation 2019-10-23 21:08:23 +02:00
Matthias Clasen
39e28ab933 Merge branch 'wip/carlosg/unbreak-paste-after-copy' into 'gtk-3-24'
Unbreak paste after copy

See merge request GNOME/gtk!1146
2019-10-22 17:40:43 +00:00
Carlos Garnacho
ff41436b59 gdk: Do not change the windowing selection when cancelling source
We are interested in changing the owner window, so the upper bits know
that it is not this client who owns the selection. We are still not
interested in unsetting the selection desktop-wide though, so only avoid
emitting the relevant events then.

The same reasonings than in commit 7a891eeb6d apply otherwise.
2019-10-22 18:43:04 +02:00
Carlos Garnacho
ba0a0ce0a0 Revert "gdk: Do not call gdk_selection_owner_set() internally to the backend"
This reverts commit 7a891eeb6d.
2019-10-22 18:36:44 +02:00
Matthias Clasen
e4049d42a5 Merge branch 'wip/carlosg/avoid-selection-clear' into 'gtk-3-24'
Avoid clearing selection on wl_data_source.cancelled

See merge request GNOME/gtk!1142
2019-10-22 05:29:10 +00:00
Emmanuele Bassi
ce5e97f720 Merge branch 'wip/carlosg/scroll-controller-fixes' into 'gtk-3-24'
Wip/carlosg/scroll controller fixes

See merge request GNOME/gtk!1141
2019-10-21 22:35:17 +00:00
Emmanuele Bassi
4201a57a83 Merge branch 'wip/carlosg/key-controller-fixes' into 'gtk-3-24'
key controller fixes

See merge request GNOME/gtk!1144
2019-10-21 22:33:55 +00:00
Carlos Garnacho
65bb9c505a gtkwidget: Ensure to run key controllers in the bubble phase
We fall back on controllers in event handlers' default handler,
but we weren't doing so for GDK_KEY_PRESS/RELEASE.
2019-10-21 23:42:19 +02:00
Carlos Garnacho
85f86d1533 keycontroller: Fix ::key-released signal argument
It uses the same signature than ::key-pressed, but this signal
doesn't expose a boolean return value. Use a distinct marshaller
and fix this signal emission.
2019-10-21 23:40:52 +02:00
Matthias Clasen
ffaf56d1c6 key controller: Don't eat modifier events
The key controller was consuming key events
for modifier keys, for no entirely convincing
reason, which leads to problems when somebody
actually listens for those, such as the simple
input method does for C-S-u processing.

(cherry-picked from 91d6893f02)

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1884
2019-10-21 23:19:58 +02:00
Руслан Ижбулатов
e860ac5cf6 GDK W32: Use Vista+ clipboard API
Use RemoveClipboardFormatListener() and AddClipboardFormatListener().
These APIs remove the need for us to maintain the integrity of the
clipboard chain, which turned out to be problematic for some reason
that is yet to be identified.

Fixes #2215
Fixes #442
2019-10-21 19:10:48 +00:00
Carlos Garnacho
7a891eeb6d gdk: Do not call gdk_selection_owner_set() internally to the backend
This should just be called by the upper layers (and result in
wl_data_device.set_selection, etc). We should not trigger this within
the backend otherwise.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/878
2019-10-21 20:41:14 +02:00
Carlos Garnacho
299902b008 gdk: Shuffle the situations where a selection is unset
This should only be explicitly unset (face to the windowing) on
gdk_selection_owner_set() with a NULL window. Other circumstances
(eg. selection being taken over by another client) should just
trigger the SelectionClear event in GDK internally.

Related: https://gitlab.gnome.org/GNOME/mutter/issues/878
2019-10-21 20:41:09 +02:00
Carlos Garnacho
c9a1adf2cc gtkwidget: Forward unhandled scroll events through controllers
Do just like button/motion/touch do, let the scroll events go first
through the event handler, and fallback on the current event controllers
afterwards.

Fixes handling of bubbled scroll events in the scroll controller.
2019-10-21 17:10:30 +02:00
Carlos Garnacho
ebd1840802 scrollcontroller: Set scroll event mask on scroll controller
This ensures adding the controller to a widget will end up with
the expected event masks in the widget default window.
2019-10-21 17:09:17 +02:00
Jeremy Tan
f91b429839 gdk: quartz: prevent titlebar events from falling to the window below 2019-10-19 20:27:50 +08:00
Christoph Reiter
da90d37b42 Merge branch 'fix-module-suffic' into 'gtk-3-24'
meson: ensure plugins have so extension on macOS

See merge request GNOME/gtk!1130
2019-10-17 21:18:56 +00:00
Benjamin Otte
0ecebd89bc Merge branch 'can_focus' into 'gtk-3-24'
GtkEntry: Make GtkEntry: gtk_entry_grab_focus_without_selecting ()  behave like gtk_widget_grab_focus ()

See merge request GNOME/gtk!1137
2019-10-17 13:05:38 +00:00
Julian Sparber
ac39847187 GtkEntry: Make GtkEntry: gtk_entry_grab_focus_without_selecting () behave like gtk_widget_grab_focus ()
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2204
2019-10-17 14:32:24 +02:00
Goran Vidović
3aa9dfe16d Update Croatian translation 2019-10-17 11:42:35 +00:00
Charles Monzat
4beed12317 Update French translation 2019-10-13 07:51:33 +00:00
Tom Schoonjans
fa07007389 meson: ensure plugins have so extension on macOS 2019-10-11 08:55:12 +01:00
Balázs Úr
043ec471bd Update Hungarian translation 2019-10-10 12:15:12 +00:00
Kukuh Syafaat
1e41c723b8 Update Indonesian translation 2019-10-10 08:37:37 +00:00
Matthias Clasen
e997ef60da Merge branch 'wip/carlosg/tablet-invalid-reads' into 'gtk-3-24'
Fix invalid reads on tablet input

See merge request GNOME/gtk!1121
2019-10-09 12:18:02 +00:00
Jakub Steiner
3c161b136e Merge branch 'fix-menubar-menu-rounding' into 'gtk-3-24'
Adwaita: Fix rounding on menubar menus really

See merge request GNOME/gtk!1123
2019-10-08 17:17:37 +00:00
nana-4
d250e51018 Adwaita: Fix rounding on menubar menus really
Prioritize the style by increasing specificity.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1976
2019-10-09 01:21:00 +09:00
Carlos Garnacho
bcd384711a gdk: Avoid poking possibly freed memory
The event may end up freed after delivery, ensure to keep the data we need
in order to emit the matching emulated crossed event matching a proximity
event.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2157
2019-10-08 17:59:43 +02:00
Carlos Garnacho
d70f85d6b9 gdk: Fix wl_output accounting on tablet devices
The code managing this accounting mixed seat and tablet output lists,
can't bode well. Fixes invalid reads on list elements, as there are
dangling pointers.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2157
2019-10-08 17:59:37 +02:00
Yi-Jyun Pan
d7c95ad542 Update Chinese (Taiwan) translation 2019-10-08 11:44:43 +00:00
Christoph Reiter
3a22e0c595 Merge branch 'lb90-gtk-3-24-patch-56691' into 'gtk-3-24'
[win32 CSS theme] Fix a small syntax error

See merge request GNOME/gtk!1118
2019-10-07 16:30:09 +00:00
Luca Bacci
5c6ca889de Small syntax fix for win32 CSS theme 2019-10-07 16:27:32 +02:00
Alan Mortensen
e1f0a34781 Updated Danish translation of gtk 2019-10-06 23:36:20 +02:00
Daniel Boles
914558f971 Builder: Fix typos and unended sentence in docs 2019-10-06 20:49:47 +01:00
Philip Withnall
8ce68a5194 gtklistbox: Only unparent header rows if they haven’t been reused
It’s possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesn’t want to continually recreate them and reattach signals to
them whenever the row headers change.

Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.

Fix that by only unparenting the header if it hasn’t already been
assigned as the parent of a different row.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 14:30:33 -04:00
Matthias Clasen
075dcc142a 3.24.12 2019-10-03 23:19:35 -04:00
Matthias Clasen
def95d9ebf Update for 3.24.12 2019-10-03 23:19:02 -04:00
Ask Hjorth Larsen
50ffb3a4ac Updated Danish translation of gtk-properties 2019-10-02 05:54:13 +02:00
Ask Hjorth Larsen
a3ea33baad Updated Danish translation of gtk 2019-10-02 05:54:10 +02:00
Marek Černocký
4f2bfea6b1 Updated Czech translation 2019-10-02 02:08:45 +02:00
Marek Černocký
a5c19887b0 Updated Czech translation 2019-10-01 17:31:41 +02:00
Daniel Șerbănescu
fd11103cff Update Romanian translation 2019-10-01 15:32:16 +00:00
Matthias Clasen
14922f1784 Merge branch 'gtk-debug-warn-when-built-without-debug' into 'gtk-3-24'
Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG

See merge request GNOME/gtk!1109
2019-10-01 14:54:19 +00:00
Daniel Mustieles
57b8f759c5 Updated Spanish translation 2019-10-01 15:53:40 +02:00
Milo Casagrande
d243efc127 Update Italian translation 2019-09-30 07:40:13 +00:00
Christoph Reiter
e27f2a5c92 meson: match autotools interface age
Noticed while diffing autotools/meson build results
2019-09-29 18:06:08 +02:00
Matej Urbančič
4b65e0ce0c Updated Slovenian translation 2019-09-28 21:14:30 +02:00
Christoph Reiter
e65c703741 Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG
G_ENABLE_DEBUG is tied to the meson builttype property, so building with "plain"
results in G_ENABLE_DEBUG not being defined and the GTK_DEBUG env var just gets ignored
for that build.

Since it can be confusing that GTK_DEBUG has no effect print a warning message instead.

Fixes #2020
2019-09-28 20:54:38 +02:00
Rafael Fontenelle
300cef8249 Update Brazilian Portuguese translation 2019-09-28 18:06:37 +00:00
Piotr Drąg
ecf3fcdc90 Update Polish translation 2019-09-28 13:44:34 +02:00
Aurimas Černius
ddd975cdb2 Updated Lithuanian translation 2019-09-28 12:51:43 +03:00
Matthias Clasen
ca9fc93925 Merge branch 'BUG_popover_focus_from_another_window_GTK3' into 'gtk-3-24'
popover: fix focus when inside an unfocused window

See merge request GNOME/gtk!1073
2019-09-27 20:29:27 +00:00
Matthias Clasen
e58bb02acd Merge branch 'BUG_popover_focus_new_folder_issue_GTK3' into 'gtk-3-24'
Fix popovers not restablishing default widget

See merge request GNOME/gtk!1075
2019-09-27 20:17:57 +00:00
Matthias Clasen
7ff79452c1 Merge branch '362-gtk-fileopen-dialog-need-filetype-mime-sort-option' into 'gtk-3-24'
GtkFileChooser: add a sortable "Type" column

See merge request GNOME/gtk!858
2019-09-27 19:59:17 +00:00
Matthias Clasen
6188a2e8c8 Merge branch 'printing-get-ppd-from-original-host-if-needed-gtk-3' into 'gtk-3-24'
printing: Get PPD from original host if needed

See merge request GNOME/gtk!1103
2019-09-27 19:23:37 +00:00
Matthias Clasen
f9273a86bd Merge branch 'wip/carlosg/atk-util-checks' into 'gtk-3-24'
a11y: Avoid clobbering AtkUtilClass vmethods

See merge request GNOME/gtk!1108
2019-09-27 19:05:34 +00:00
Carlos Garnacho
054165d406 a11y: Avoid clobbering AtkUtilClass vmethods
In the unlikely case that GTK is "embedded" with other toolkits
(hi, Mutter), GTK will clobber the embedder's AtkUtil implementation,
leaving its own a11y in a broken state.

AtkUtil is not meant to be overridden by multiple toolkits within a
single client, so the most sensible thing to do is stay away from it
if that is the case. This helps the embedder's a11y to win.

Fixes Clutter a11y in Mutter after xwayland-on-demand, process
startup used to be in a fixed order so that Clutter's a11y would
eventually win, but x11/gtk startup is now asynchronous and able to
happen at a later point.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1687
2019-09-27 18:15:44 +02:00
Jonas Ådahl
c05f25d968 Merge branch 'dnd-coordinates2' into 'gtk-3-24'
gtk: Properly calculate device offset for DnD

See merge request GNOME/gtk!1104
2019-09-27 15:56:01 +00:00
Nathan Follens
f803b11626 Update Dutch translation 2019-09-25 11:23:08 +00:00
Benjamin Otte
91c5562b04 Merge branch 'wip/otte/for-gtk-3-24' into 'gtk-3-24'
CSS: Handle unknown resolution

See merge request GNOME/gtk!1107
2019-09-24 21:11:00 +00:00
Benjamin Otte
bdb96507bd CSS: Handle unknown resolution
gdk_screen_get_resolution() can return -1 when the resolution is
unknown. Catch that case and use the default resolution of 96, like in
every other case.

Fixes #2119
2019-09-24 22:39:38 +02:00
Robert Mader
77e0d83000 gtk: Properly calculate device offset for DnD
We need to take the device scale into account, like it is done in
gdkwindow.c.

This fixes wrongly placed DnD surfaces in scaled contexts on X11
as well as Wayland.
2019-09-23 11:50:05 +02:00
Matthias Clasen
5d23819c69 Merge branch 'fix-gtk3-build' into 'gtk-3-24'
build: Avoid redefining EXTRA_DIST

See merge request GNOME/gtk!1101
2019-09-20 00:54:03 +00:00
Philip Chimento
62412cbcf4 build: Avoid redefining EXTRA_DIST
EXTRA_DIST is defined here and in Makefile.decl. The build system will
complain about that.
2019-09-19 16:26:44 -07:00
Marek Kasik
bf7851f57c printing: Get PPD from original host if needed
Try to get PPD from original host if there is no PPD for remote printer
on current CUPS server.
2019-09-19 19:33:36 +02:00
Kjartan Maraas
3203c59108 Update Norwegian Bokmål translation 2019-09-18 13:42:06 +00:00
Matthias Clasen
ac53fed1f2 Merge branch 'BUG_tooltip_blocks_combo_GTK3' into 'gtk-3-24'
tooltips: hide tooltips before showing popups

See merge request GNOME/gtk!1084
2019-09-15 21:20:37 +00:00
Matthias Clasen
16d8ca8ad9 Merge branch 'builder-notify' into 'gtk-3-24'
Freeze notify queue when building objects

See merge request GNOME/gtk!1086
2019-09-15 15:55:43 +00:00
Matthias Clasen
a265ae2c96 Merge branch 'revert-9711c2ad' into 'gtk-3-24'
Revert "Merge branch 'remove-mingw-SetupDiGetDevicePropertyW-check-3-24' into 'gtk-3-24'"

See merge request GNOME/gtk!1096
2019-09-15 15:53:52 +00:00
Christoph Reiter
8a9ffef52b Revert "Merge branch 'remove-mingw-SetupDiGetDevicePropertyW-check-3-24' into 'gtk-3-24'"
This reverts merge request !862
2019-09-15 15:19:29 +00:00
Matthias Clasen
f4cd637056 Merge branch 'drop-mir' into 'gtk-3-24'
Drop the mir backend

See merge request GNOME/gtk!1062
2019-09-09 20:02:02 +00:00
Chun-wei Fan
6e1e1991d5 Merge branch 'win32-ime-fixes' into 'gtk-3-24'
Win32 IME fixes

See merge request GNOME/gtk!1063
2019-09-09 04:42:39 +00:00
Emmanuele Bassi
70c4b66d99 Bump up the version in the Meson build file
We already released 3.24.11.
2019-09-07 17:44:18 +01:00
Marek Černocký
6119c09535 Updated Czech translation 2019-09-07 12:09:18 +02:00
Emin Tufan Çetin
77c41261d6 Update Turkish translation 2019-09-07 08:07:42 +00:00
Efstathios Iosifidis
30a4d273fb Update Greek translation 2019-09-06 20:50:03 +00:00
Philip Zander
d33c24b31e Win32 IME fixes
See merge request !1063
2019-09-06 20:45:45 +02:00
Emin Tufan Çetin
195a550bf4 Update Turkish translation 2019-09-06 18:30:51 +00:00
Milo Casagrande
5ca7bbfd0e Update Italian translation 2019-09-05 11:59:33 +00:00
Christoph Reiter
10daf4c3b6 Merge branch 'autotools-also-dist-subprojects-directory' into 'gtk-3-24'
autotools: dist the subprojects directory

See merge request GNOME/gtk!1069
2019-09-04 17:11:52 +00:00
Emmanuele Bassi
001c0a35ce Freeze notify queue when building objects
We're potentially applying multiple properties during object
construction; we should avoid constantly notifying after setting each
one, and instead coalesce the notifications at the end. In most cases,
the calling code doesn't have access to the instance, so it won't be
able to connect to the "notify" signal anyway, but it avoids a lot of
busy work.
2019-09-04 11:14:01 +01:00
Matthias Clasen
622111f1ca 3.24.11 2019-09-03 22:34:36 -04:00
Matthias Clasen
90dfff5901 Fix gtk-builder-tool tests 2019-09-03 22:34:36 -04:00
Matthias Clasen
17064928d2 Fix gtk-query-settings test 2019-09-03 22:34:36 -04:00
Matthias Clasen
e082414f0c Update a11y test results 2019-09-03 22:34:36 -04:00
Nelson Benítez León
ce7e99ca5e tooltips: hide tooltips before showing popups
because if there's a tooltip visible then popups fail to show
with the following warning:
"Gdk-WARNING **: Tried to map a popup with a non-top most parent"

This bug affect popups of the form:
 1) popups from gtk_menu_popup_{at_widget|at_rect|for_device}()

    This can be reproduce with a normal GtkComboBox that has a
    tooltip attached (eg. via GtkBuilder 'tooltip_text' attribute).
    Also see GtkLabel reproducer from gtk3-demo mentioned in #1785

 2) custom popups created with gtk_window_new (GTK_WINDOW_POPUP)

    A reproducer that shows this case is a GtkComboBox with
    the property 'appears-as-list'[1] set to TRUE (default is FALSE).

Fixes issue #1785

[1] https://developer.gnome.org/gtk3/stable/GtkComboBox.html#GtkComboBox--s-appears-as-list
2019-09-03 20:01:20 -04:00
Matthias Clasen
3f63656630 css: Support PANGO_WEIGHT_ULTRAHEAVY
The CSS fonts spec allows values between 1 and 1000,
so we can support Pangos ultraheavy weight (= 1000).
2019-09-03 17:12:03 -04:00
Matthias Clasen
d2bd63e455 Merge branch 'mingw-iconcache-use-correct-fstat' into 'gtk-3-24'
gtkiconcache: use _fstat64 under 64bit mingw to match GStatBuf

See merge request GNOME/gtk!1067
2019-09-03 20:17:24 +00:00
Matthias Clasen
8f44ec3c09 Merge branch 'remove-gdk-spawn-macros' into 'gtk-3-24'
build: remove unused HAVE__NSGETENVIRON and HAVE_CRT_EXTERNS_H

See merge request GNOME/gtk!1066
2019-09-03 20:05:38 +00:00
Matthias Clasen
340c62ecd6 Merge branch 'issue1044' into 'gtk-3-24'
Fix resize requests being forgotten when maximizing a hidden window

See merge request GNOME/gtk!367
2019-09-03 15:43:07 +00:00
Jonas Ådahl
e9fdb35687 Revert "gdk/wayland: go through monitor to compute scale factor"
This reverts commit 6d545b6d03.

Reverting as this broke multi DPI systems, where a client is expected to
render at scale = 1 if it is only visible on a scale = 1 monitor.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2129
2019-09-03 17:13:17 +02:00
Matthias Clasen
eaf0e54074 Merge branch 'gtk-3-24-issue2128' into 'gtk-3-24'
[gtk3] wayland: Fix xdg-output v3 support

See merge request GNOME/gtk!1081
2019-09-03 14:32:07 +00:00
Olivier Fourdan
a1becccd3f wayland: Fix xdg-output v3 support
The xdg_output.done event is deprecated in xdg-output v3, so clients
need to rely on the wl_output.done event instead.

However, applying the changes on the fist wl_output.event when using
xdg-output v3 may lead to an incomplete change, as following xdg-output
updates may follow.

Make sure we apply xdg-output events on wl_output.done events with
xdg-output v3.

https://gitlab.gnome.org/GNOME/gtk/issues/2128
2019-09-03 16:10:33 +02:00
Goran Vidović
14eebd97b0 Update Croatian translation 2019-09-03 13:47:58 +00:00
A S Alam
d3584b22df Update Punjabi translation 2019-09-02 16:19:18 +00:00
A S Alam
480c5d5bf3 Update Punjabi translation 2019-09-02 15:43:44 +00:00
Nelson Benítez León
de99b2f0b8 Fix popovers not restablishing default widget
Popovers have special handling to restablish
the previous 'default' and 'focused' widget,
that code it's in the map() unmap() handlers
in gtk/popover.c .

But, at the same time, GtkWindow also does
automatic restablishing of previous 'default' and
'focused' widgets, that's in _gtk_window_unset_focus_and_default()
function in gtk/gtkwindow.c which is called from
gtk_widget_hide() in gtk/gtkwidget.c .

So, when a popover is closed, both code-paths are
executed, conflicting with each other and resulting
in the popover failing to properly restablish the
default widget.

The commit that introduced _gtk_window_unset_focus_and_default()
to gtkwindow.c is from 2002 (commit ff9c2c5669) so
it predates by far the popover.c implementation,
therefore the rationale thing to do here is to exempt
popovers from being handled in _gtk_window_unset_focus_and_default()
(as that function is oblivion to the fact that
popovers have their own handling).

So, this commit exempts popovers from being handled
in the aforementioned function, but only for
the 'default' widget part atm, because although
by the previous rationale we should exempt it
from the 'focused' widget part too, I could not
find a bug in the issue tracker about that, so
instead we just exempt the 'default' widget part
that we know for sure it fixes issue #2125

Fixes issue #2125
2019-09-01 13:50:39 -04:00
Robert Antoni Buj Gelonch
177231516e Update Catalan translation 2019-09-01 06:24:20 +00:00
Ryuta Fujii
ec91152a02 Update Japanese translation 2019-08-31 11:37:53 +00:00
Ryuta Fujii
71c100869f Update Japanese translation 2019-08-31 11:35:26 +00:00
Zander Brown
4af8e3ef02 Update British English translation 2019-08-31 08:56:02 +00:00
Nelson Benítez León
58f57aeb3b popover: fix focus when inside an unfocused window
Fix popovers to properly gain focus when clicked
inside an unfocused window.

We use the GTK_PHASE_CAPTURE of the 'pressed' event
to early detect that the popover is being clicked
inside an inactive window, this allow us to present
the window (and be focused) before the normal signal
handlers for the popover click/pressed events are run
which would ultimately give focus to popover widget.

This fix works for both modal and 'non modal' popovers
when being clicked inside unfocused windows.

Fixes issue #1871
2019-08-30 21:26:08 -04:00
Changwoo Ryu
c2bfcca0e9 Update Korean translation 2019-08-30 14:07:53 +00:00
John Ralls
d34d99a917 Don't set G_ENABLE_CONSISTENCY_CHECKS on all debug builds. 2019-08-28 19:54:58 -07:00
John Ralls
a12931b9f8 Silence compiler type warnings about converting enums to gboolean. 2019-08-28 19:54:58 -07:00
Jordi Mas
54bdac6331 Update Catalan translation 2019-08-28 19:35:23 +02:00
Luca Bacci
72baf988ee autotools: dist the subprojects directory
See Merge Request !1069
2019-08-28 18:35:10 +02:00
Christoph Reiter
52be6acb89 build: remove unused HAVE__NSGETENVIRON and HAVE_CRT_EXTERNS_H
Looks like this is a leftover from gdkspawn/gtk2
2019-08-26 20:42:42 +02:00
Christoph Reiter
8809fab111 gtkiconcache: use _fstat64 under 64bit mingw to match GStatBuf
With the switch to meson we no longer built with _FILE_OFFSET_BITS which
results in fstat being the 32 bit variant, not matching GStatBuf, which is
_stat64 on 64bit mingw builds.

This makes things use _fstat64 in this case, to match GStatBuf.
2019-08-26 20:13:48 +02:00
Changwoo Ryu
352948fcdf Update Korean translation 2019-08-26 11:17:02 +00:00
Christoph Reiter
31a57fe389 Drop the mir backend
It depends on libcontent-hub-glib which was dropped from Ubuntu in mid 2017:
https://bugs.launchpad.net/ubuntu/+source/content-hub/+bug/1712874

It was patched downstream to still build until it was disabled at the beginning
of 2018: https://launchpad.net/ubuntu/+source/gtk+3.0/3.22.28-1ubuntu3

This likely means no one has built gtk with mir in 2 years, and there is no plan
to change that, so just remove it.
2019-08-25 22:46:28 +02:00
Fran Dieguez
5493efdb41 Update Galician translation 2019-08-25 16:53:23 +00:00
Fran Dieguez
98b1c94027 Update Galician translation 2019-08-25 16:07:19 +00:00
Charles Monzat
6e0d1fc23c Update French translation 2019-08-25 15:49:34 +00:00
Matthias Clasen
8f955baf93 Merge branch 'gtk-3-24' into 'gtk-3-24'
gtkprintbackend:backend_create: avoid strdup+free (3.24)

See merge request GNOME/gtk!996
2019-08-25 12:03:03 +00:00
Matthias Clasen
64fe119643 Merge branch 'wip/carlosg/ensure-selection-notify' into 'gtk-3-24'
Ensure to emit GDK_SELECTION_NOTIFY on all circumstances

See merge request GNOME/gtk!1057
2019-08-25 11:54:46 +00:00
Matthias Clasen
3857077701 Merge branch 'build-remove-xiproto-xreply-check' into 'gtk-3-24'
autotools: remove NEED_XIPROTO_H_FOR_XREPLY check

See merge request GNOME/gtk!1058
2019-08-25 11:46:40 +00:00
Balázs Úr
91b862a527 Update Hungarian translation 2019-08-24 20:22:03 +00:00
Matej Urbančič
67d4369b6c Updated Slovenian translation 2019-08-24 20:07:30 +02:00
Rūdolfs Mazurs
a5cb933e30 Update Latvian translation 2019-08-24 11:18:18 +00:00
Rūdolfs Mazurs
9ef0e03a20 Update Latvian translation 2019-08-24 11:14:16 +00:00
Matthias Clasen
a579083b17 Merge branch 'fix-opengl-profiling' into 'gtk-3-24'
Fix profiling output when rendering with OpenGL

See merge request GNOME/gtk!1060
2019-08-24 09:52:00 +00:00
Alexander Larsson
e417fa1b7a Fix profiling output when rendering with OpenGL
I was not getting any gtk+ profile markers output from the frame clock
when I was profiling an OpenGL app (gnome-hexgl). I debugged this and
it turns out that the profiling depends on getting the _NET_WM_FRAME_TIMINGS
event from the compositor, and once we switched to OpenGL rendering
this never appeared.

It turns out the reason it didn't is that the compositor only does
so if the client increases the counter tied to the window, and the
x11 gdk code has this optimization where if we do a draw pass
but nothing is actually drawn we don't update the counter.

Unfortunately the detection of whether something was draw or not
is based on some cairo surface hack that breaks when we render with
OpenGL instead. The fix is to just always update the counter if
we're drawing with OpenGL.
2019-08-23 23:18:32 +03:00
Carlos Garnacho
022d0044cc Merge branch 'fix-2070' into 'gtk-3-24'
Fixes incorrect crossing emulation of proximity events in Wayland

See merge request GNOME/gtk!1044
2019-08-21 22:23:10 +00:00
Марко Костић
a4cfe61106 Update Serbian translation 2019-08-21 19:48:44 +00:00
Christoph Reiter
a1c1c788c9 autotools: remove NEED_XIPROTO_H_FOR_XREPLY check
This was added with https://bugzilla.gnome.org/show_bug.cgi?id=148032
to make gtk compile against X11R5, see commit 3b9a31df0

That release is >20 years old now, so we can safely remove it.

The motivation for this is to remove any checks that we don't have in the
meson build.
2019-08-21 20:39:15 +02:00
Julius Lehmann
94960b828f Add slave device option for emulated crossing events under Wayland
This fixes an issue where stylus proximity in/out events emulate enter/leave events.
The emulated events didn't contain the correct slave device and therefore the
resulting device class was set incorrectly. Crossing event emulation now also
works with slave devices.

Closes #2070
Fixes #2070
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2070
2019-08-21 16:23:45 +02:00
Carlos Garnacho
6841c73808 gdk/wayland: Unset clipboard/primary if giving up selection ownership
If gdk_selection_owner_set() is called with a NULL window, we should unset
the related data source for the current selection.
2019-08-20 23:51:04 +02:00
Carlos Garnacho
f43f6900c9 gdk/wayland: Emit GDK_SELECTION_NOTIFY on all failure/unset paths
Either on failure, or when replacing a selection buffer due to a new
wl_offer. We should emit one event for each pending requestor then.
2019-08-20 23:51:04 +02:00
Jordi Mas
7101cfe468 Update Catalan translation 2019-08-16 13:37:27 +02:00
Asier Sarasua Garmendia
775e4a2da0 Update Basque translation 2019-08-16 08:03:31 +00:00
Asier Sarasua Garmendia
4862fa2e0f Update Basque translation 2019-08-16 07:56:27 +00:00
Benjamin Otte
c654573ba2 Merge branch 'headerbar-buttons-a11y' into 'gtk-3-24'
a11y: Include window management buttons in headerbar

See merge request GNOME/gtk!1054
2019-08-15 11:36:05 +00:00
Benjamin Otte
bc1c0584b7 a11y: Include window management buttons in headerbar 2019-08-15 13:09:07 +02:00
Daniel Șerbănescu
1e8d46352e Update Romanian translation 2019-08-14 09:07:20 +00:00
Daniel Șerbănescu
10603f9598 Update Romanian translation 2019-08-14 06:30:03 +00:00
Matthias Clasen
7913a6f0b6 Merge branch '948-patch-renaming-a-file-can-make-it-to-loose-selection_GTK3' into 'gtk-3-24'
filechooser: keep file selected after being renamed

See merge request GNOME/gtk!1052
2019-08-13 21:20:13 +00:00
Matthias Clasen
f04d654ae7 Merge branch 'wip/clamp-x11-on-resize-too' into 'gtk-3-24'
gdk/x11: Clamp window size both when creating and resizing

See merge request GNOME/gtk!1046
2019-08-13 21:08:32 +00:00
Jordi Mas
7e8c4f9c68 Update Catalan translation 2019-08-13 08:35:04 +02:00
Daniel Șerbănescu
f9acfa1bd8 Update Romanian translation 2019-08-13 04:37:04 +00:00
Nelson Benítez León
aff5c7ede6 filechooser: keep file selected after being renamed
Because otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.

Fixed by keeping track of the renamed file and revealing
it in the "row-changed" signal handler, which gets emitted
after a file is renamed.

Fixes issue #948
2019-08-12 16:24:35 -04:00
Daniel Șerbănescu
9737c40982 Update Romanian translation 2019-08-12 06:52:57 +00:00
Daniel Șerbănescu
7415ef8749 Update Romanian translation 2019-08-11 21:29:35 +00:00
Daniel Șerbănescu
75938ceda8 Update Romanian translation 2019-08-10 07:23:28 +00:00
Carles Ferrando Garcia
b5f033306f Update Catalan translation 2019-08-09 16:01:36 +00:00
Aurimas Černius
46e3550823 Updated Lithuanian translation 2019-08-09 14:19:31 +03:00
Benjamin Otte
1f4fd2b532 Merge branch 'wip/gtk-icon-theme-no-svg-loader-gtk-3' into 'gtk-3-24'
gtk/icon-theme: Handle lack of SVG loader gracefully

See merge request GNOME/gtk!1050
2019-08-08 07:25:21 +00:00
Jonas Ådahl
77bc2dc87c gtk/icon-theme: Handle lack of SVG loader gracefully
When loading a SVG icon from a gresource file only containing SVG icons,
but without having a SVG loader available in gdk-pixbuf, we would crash
when trying to eventually load the resource. Fix this by gracefully
handling this by simply failing to load the icon, while the first time
it happens, log a warning.

https://gitlab.gnome.org/GNOME/gtk/issues/2084
2019-08-08 09:05:17 +02:00
Emmanuele Bassi
01d2ef6c66 Merge branch 'fix-deprecation-warning-in-menu' into 'gtk-3-24'
menu: Modernize code

See merge request GNOME/gtk!1048
2019-08-07 11:01:41 +00:00
Benjamin Otte
1d1059550c menu: Modernize code
No functional changes, just don't call valist functions anymore.
2019-08-07 13:32:49 +03:00
Simon McVittie
fbb3c146ea CI: Optionally run distcheck, but without actually running the tests
This can be used to verify that we can build a release tarball using
Autotools, without being subject to known-failing tests (which are less
straightforward to fix). Since commit 44a2d5d6 the Meson build skips
the failing a11y tests, but we don't have an equally easy mechanism
to skip those on Autotools.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-08-06 14:30:43 +01:00
Simon McVittie
e18e9a7064 CI: Enable X11 and Wayland backends for Autotools
Enabling one backend (Broadway, in commit 1882ff9b) implicitly disabled
all the others, which was probably not intentional. Bring the Autotools
build into line with Meson.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-08-06 14:29:13 +01:00
Tim Sabsch
0fe1432a6c Update German translation 2019-08-06 11:16:14 +00:00
Jonas Ådahl
9dd198e53f gdk/x11: Clamp window size both when creating and resizing
We clamp to 32767 when creating a new X11 GdkWindow due to larger sizes
not being supported, but still try to resize to larger when
gdk_window_resize() is called. Fix this by clamping in both places.

This fixes an issue in mutter where ridiculously sized Java windows
would not show up.
2019-08-06 11:13:55 +02:00
Matthias Clasen
f592342870 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fix incorrect scale factor propagation on Wayland

See merge request GNOME/gtk!1042
2019-08-05 12:21:02 +00:00
Tim Sabsch
d76d095b6d Update German translation 2019-08-04 10:19:40 +00:00
Lionel Landwerlin
6d545b6d03 gdk/wayland: go through monitor to compute scale factor
The current code only goes through the output associated to the
window's wayland surface enter/leave events. That means that to update
the scale factor the window only looks at the outputs on which it
received enter/leave events. That doesn't include a new monitor
connected to the system on which the window might be display next.

The spirit of the existing logic seems to be to go through all the
scale factor available on the current monitors of the system and pick
the highest. So fix the current behavior by looking at the monitor on
the display.

Fixes #1144.

Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2019-08-03 22:36:48 +03:00
Lionel Landwerlin
27b4032680 gdk/wayland: remove unused variable
Signed-off-by: Lionel Landwerlin <llandwerlin@gmail.com>
2019-08-03 22:30:59 +03:00
Daniel Șerbănescu
d9649bfa2f Update Romanian translation 2019-08-03 12:35:07 +00:00
Matthias Clasen
a70fef5d30 Merge branch 'fix-issue-2030' into 'gtk-3-24'
GtkStatusIcon/w32: Misc fixes for the handling of taskbar_created_msg

See merge request GNOME/gtk!1003
2019-08-02 16:58:25 +00:00
Luca Bacci
6dc2f6f026 GtkStatusIcon/w32: Also set the tooltip on taskbar_created_msg
When explorer.exe creates a taskbar it broadcasts a "TaskbarCreated"
message to all toplevels. Applications, By handling that message,
are able to re-create the icons to be displayed in the taskbar.

Explorer creates a new taskbar in two circumstances:
A) when explorer starts up
B) when the DPI of the monitor changes

A) happens either when explorer.exe is started for the first time at
   logon, or when it is restarted after being terminated.
B) happens when the user changes the DPI preference of the active
   monitor where the desktop is displayed, or if the desktop is moved
   to a monitor with different DPI.

Currently, this message is handled in Gtk and icons are re-created.
However the current implementation has a small issue in that it
doesn't set the tooltip on the new icons, so tooltips get lost
after re-creation.

The tooltip is important because Windows uses it for identification
of taskbar icons and for storing and applying user preferences. For
an explanation of that see:
https://bugzilla.gnome.org/show_bug.cgi?id=609622

With this commit the tooltip is correctly applied to new taskbar
icons when handling taskbar_created_msg.

See Merge Request !1003
2019-08-02 16:58:25 +00:00
Matthias Clasen
25dd5d9eb0 Merge branch 'gdkmonitor-x11-manufacturer-stable' into 'gtk-3-24'
gdk: x11: Fill GdkMonitor manufacturer with PNP id from EDID

See merge request GNOME/gtk!848
2019-08-02 12:38:04 +00:00
Matthias Clasen
f26b5c8d80 Merge branch 'wip/jimmac/osd-color' into 'gtk-3-24'
Adwaita: increase opacity for OSD bg

See merge request GNOME/gtk!1040
2019-08-02 12:30:10 +00:00
Matthias Clasen
8429cf80c0 Merge branch 'reubengreen73-issue2066' into 'gtk-3-24'
Prevent Gtk-CRITICAL when unrealize-ing a GtkPaned.

See merge request GNOME/gtk!1033
2019-08-02 12:26:25 +00:00
Jakub Steiner
766662f0de Adwaita: increase opacity for OSD bg
- make text more legible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2072
2019-08-02 14:17:14 +02:00
Jakub Steiner
7f6c3ea997 Merge branch 'Round_TitleButtons' into 'gtk-3-24'
Round title buttons

See merge request GNOME/gtk!1037
2019-08-02 12:04:47 +00:00
Matthias Clasen
f077398063 Merge branch 'wip/carlosg/fix-synth-crossing-idle' into 'gtk-3-24'
gdk/x11: Store idle ID, and ensure it is eventually unset

See merge request GNOME/gtk!1039
2019-08-02 11:45:46 +00:00
Carlos Garnacho
a2b9ceaf99 gdk/x11: Store idle ID, and ensure it is eventually unset
This idle happens on mutter around the x11 display being closed, which
has it running after it did actually happen. Ensure the window removes
this idle on dispose.
2019-08-02 12:54:10 +02:00
Jordi Mas
52b125c928 Update Catalan translation 2019-08-01 20:17:52 +02:00
frederik.feichtmeier
147e1ad6b0 Exclude appmenu titlebuttons 2019-08-01 10:20:28 -04:00
frederik.feichtmeier
c73f2d8f22 Make titlebuttons round
- use even sides for the titlebuttons so the result is a circle and not an ellipse
- add maximum border radius
- set min width/height to 0
- adjust margin and padding to match the previous look
2019-08-01 10:09:52 -04:00
Chun-wei Fan
8200b08d82 build/win32/generate-msvc.mak: Generate GResource sources for demos
...for the demos we build in the MSVC projects, so those that are not
built by the projects are not covered by this change.  This is so that
we can reduce the files that we are actually dist'ing in a release
tarball (see MR !1001).
2019-07-31 18:54:28 +08:00
Chun-wei Fan
6775e63d99 build/win32/config-msvc.mak.in: Add more configurations
This adds a configurable path for pkg-config, in case it is not in the
PATH, which will replace the entry in introspection-msvc.mak eventually.
Also add a set of preprocessor flags for GDK that we can use later for
introspection.

Fix the previous commit as the default PREFIX is missing a layer of
parentdir.
2019-07-31 18:54:16 +08:00
Chun-wei Fan
80c14d7cf9 build/win32/config-msvc.mak.in: Define a default PREFIX
If PREFIX was not passed when invoking generate-msvc.mak, define a
default PREFIX that is consistent with the MSVC project files, for
convenience.
2019-07-31 16:02:53 +08:00
Reuben Green
0081a96cbc Prevent Gtk-CRITICAL when unrealize-ing a GtkPaned.
This commit fixes a bug (issue #2066) caused by gdk_window_set_cursor being called with a NULL pointer as its first argument during the
unrealize-ing of a GtkPaned, resulting in a Gtk-CRITICAL. The change ensures that, even if the function gtk_paned_state_flags_changed
is called on a GtkPaned while it is part way through being unrealized (as can happen, for example, if a descendant of the GtkPaned calls
gtk_clipboard_store when it is unrealize-d, see the issue report for a test case), the function gdk_window_set_cursor is not called on
the GtkPaned's priv->handle member if this pointer is NULL.

Closes #2066
Fixes #2066
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2066
2019-07-30 18:50:59 +01:00
Chun-wei Fan
78dcdbc246 build/win32: Track resouce listings in gdk/gtk
This is so that we can re-generate the GResource sources if any of the
items are updated.
2019-07-30 12:08:08 +08:00
Chun-wei Fan
f068dcc3be MSVC projects: Drop gtk3-prebuild.vcxproj.filters
We don't need that file anymore.  Also remove some leftover unused items
in gtk3-gen-srcs.props.
2019-07-30 11:00:49 +08:00
Chun-wei Fan
c397fe420b generate-msvc.mak: Allow custom tools for glib-compile-resources
As some external tools are used by glib-compile-resources, such as
xmllint, gdk-pixbuf-pixdata and (perhaps in the future)
json-glib-format, allow people to pass in the full paths for them when
invoking the NMake Makefiles to generate the various sources if they are
not in the PATH or in where glib-compile-resources.exe is.
2019-07-30 08:40:59 +08:00
Matthias Clasen
eca39f35a3 Merge branch 'issue2057-gtk3' into 'gtk-3-24'
Bump wayland-protocols requirements

See merge request GNOME/gtk!1031
2019-07-29 14:52:54 +00:00
Olivier Fourdan
732be129d5 Bump wayland-protocols requirements
The `name` and `description` events were added to `xdg-output` protocol
in version 2 which is part of wayland-protocols 1.14.

In xdg-output-v1 version 3, the `xdg-output.done` event was deprecated
and the `xdg-output.description` event was made mutable, but that
doesn't change the actual events so we do not actually need to require
that version of xdg-output from wayland-protocols 1.18.

Update the wayland-protocols requirement to the bare minimum version,
which is 1.14.

https://gitlab.gnome.org/GNOME/gtk/issues/2057
2019-07-29 12:05:06 +02:00
Chun-wei Fan
5b3ea0f24c generate-msvc.mak: Generate gtk/gtkmarshalers.[c|h]
Generate the marshaller sources in gtk/.  This will indicate that all
the sources that need to be generated in gtk/ are now generated for the
MSVC projects, except for the ones that are generated by glib-mkenums.
2019-07-29 18:01:40 +08:00
Chun-wei Fan
a86b3c453a generate-msvc.mak: Generate gtk/gtkresources.[c|h]
This makes the MSVC project files generate gtk/gtkresources.[c|h], along
with gtk/gtk.gresource.xml.
2019-07-29 17:48:50 +08:00
Chun-wei Fan
b9d9c59afa MSVC projects: Use NMake to generate the sources in gtk/
...instead of in the gtk-3 project.  This will also make the project
files a bit cleaner.  Note that this commit only moves all the source
code generating steps in the gtk-3 into the NMake Makefile, and so
generate those sources in the gtk3-prebuild project.
2019-07-29 16:30:31 +08:00
Jakub Steiner
e7db2a2f8b Adwaita: make links in infobars legible
- No longer tinted blue, make legible

Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/751
2019-07-29 10:03:19 +02:00
Chun-wei Fan
2b9493429b MSVC projects: Fix demos build
I forgot to include the copying of demos.h.win32 to demos.h step, so the
demos could not be properly built from the projects.  Fix that.

Also fix the command line where we generate gtkdbusgenerated.[c|h] which
was accidentally changed.
2019-07-29 12:34:49 +08:00
Chun-wei Fan
ba54e7b823 build/Makefile-newvs.am: Fix rebuilds
The various MSVC project files may not be re-copied from the 2010 ones
when things are being updated.  Fix that by monitoring changes from
build/win32/vs10/Makefile.
2019-07-29 12:07:15 +08:00
Matthias Clasen
e74268431f Merge branch 'implement-choices-file-chooser-native-win32' into 'gtk-3-24'
Implement choices for GtkFileChooserNativeWin32

See merge request GNOME/gtk!990
2019-07-29 03:58:15 +00:00
Luca Bacci
f4edfbe56f Implement choices for GtkFileChooserNativeWin32
See Merge Request !990
2019-07-29 03:58:14 +00:00
Fabio Tomat
7dc987fca6 Update Friulian translation 2019-07-28 07:53:50 +00:00
Jordi Mas
0d8749ca63 Update Catalan translation 2019-07-28 01:24:38 +02:00
Jordi Mas
ffc68b3768 Update Catalan translation 2019-07-28 00:56:40 +02:00
Piotr Drąg
609201fd44 Update Polish translation 2019-07-27 15:17:13 +02:00
Matthias Clasen
92ffcbadc4 Merge branch 'xdg-output-v3-gtk3' into 'gtk-3-24'
wayland: Add xdg-output v3 support

See merge request GNOME/gtk!1021
2019-07-26 17:20:43 +00:00
Olivier Fourdan
ab1e86a3b1 wayland: Add xdg-output v3 support
xdg-output v3 marks xdg-output.done as deprecated and compositors are
not required to send that event anymore.

So if the xdg-output version is 3 or higher, simply set the initial
value `xdg_output_done` to TRUE so we don't wait/expect that event
from the compositor.

https://gitlab.gnome.org/GNOME/gtk/issues/2053
2019-07-26 17:26:05 +02:00
Benjamin Otte
eb71ec911c window: handle configure request when maximized/fullscreen
Commit 42b02d9d ("ignore resize increments for maximized/fullscreen")
introduced a regression which prevents window from being resized while
maximized or fullscreen.

Move the check for maximized/fullscreen where the geometry is handled
rather than ignoring the geometry info when maximized/fullscreen so that
a client issuing a "move_resize()" while maximized or fullscreen can get
the requested size when restoring the original window state.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1044
2019-07-26 15:51:47 +02:00
Olivier Fourdan
a393e2ef33 wayland: Update saved size when maximized/fullscreen
If a client issues a `move_resize()` request while the window is
maximized or fullscreen, update the saved size for when it will be
unmaximized/unfullscreened

Related: https://gitlab.gnome.org/GNOME/gtk/issues/1044
2019-07-26 15:51:47 +02:00
Jakub Steiner
10250befe0 Merge branch 'Bllue_Checks_and_Radios' into 'gtk-3-24'
Blue checks and radios

See merge request GNOME/gtk!1020
2019-07-26 12:33:21 +00:00
frederik.feichtmeier
410684b298 Change check and radio bg and fg color
- make use of already existing checkradio_bg/fg_color
- use the primary color blue ($selected_bg_color) for the check and radio background and white ($selected_fg_color) for the fg color
- no change to backdrop
2019-07-26 08:10:15 -04:00
Feichtmeier
ff61d74280 Tiny refactoring
- use checkradio_fg_color for check/radio in treeview, which points to fg_color, so no change of the hex color, thus no change to the parsed CSS
2019-07-26 13:49:01 +02:00
Jakub Steiner
f95f3c707a Adwaita: subtle app icon dropshadow
- make application icon dropshadow a legibility aid,
  not a strong styling choice.
2019-07-26 13:48:05 +02:00
Kukuh Syafaat
df3c4f9363 Update Indonesian translation 2019-07-26 10:47:16 +00:00
Daniel Mustieles
3db01a9673 Updated Spanish translation 2019-07-26 09:17:55 +02:00
Rafael Fontenelle
c4a4983a68 Update Brazilian Portuguese translation 2019-07-25 23:18:05 +00:00
Chun-wei Fan
44e8dcdf28 build/win32: Dist forgotten file
We need to dist gen-gdkversionmacros-h.py...
2019-07-25 23:40:05 +08:00
Anders Jonsson
a7022fe3b9 Update Swedish translation 2019-07-25 10:57:16 +00:00
Chun-wei Fan
fdcdfcf476 Fix previous commit
Fix copy-and-paste error.  Sorry about this.
2019-07-25 18:28:47 +08:00
Emmanuele Bassi
ac83787d18 Merge branch 'gtk-3-24-add-TCRYPT-options-to-ask-password-dialog' into 'gtk-3-24'
gtkmountoperation: Add TCRYPT options to the ask-password dialog

See merge request GNOME/gtk!262
2019-07-25 10:17:00 +00:00
Chun-wei Fan
58ee7adc29 MSVC builds: Generate most of the built sources in gdk/
With the exception of the enumeration sources (gdkenumtypes.h and
gdkenumtypes.c), the generared sources in gdk/ (gdkversionmacros.h,
gdkresources.[c|h], gdkmarshalers.[c|h] are now generated in the
gtk3-prebuild projects with the NMake Makefiles.

Make build/win32/config-msvc.mak filled with the version info from
autotools, too.
2019-07-25 18:04:58 +08:00
Chun-wei Fan
7fb9cddf1a MSVC Projects: Re-work gtk3-prebuild project
Make it into a NMake Makefile project type, which will form the basis
for having less of the generated sources being dist'ed, which is the
goal of merge request !1001.

Another nice side effect of this is that it makes the gtk3-prebuild
projects cleaner.
2019-07-25 16:16:16 +08:00
Jordi Mas
a595758650 Update Catalan translation 2019-07-22 11:01:29 +02:00
Emmanuele Bassi
fdcd0ec07d Merge branch 'fix-gdkconfig' into 'gtk-3-24'
Fix gdkconfig.h generation for GDK_WINDOWING_QUARTZ

See merge request GNOME/gtk!1004
2019-07-20 11:13:38 +00:00
Jeremy Tan
ff21730d8e Fix gdkconfig.h generation for GDK_WINDOWING_QUARTZ 2019-07-20 15:10:34 +08:00
Christoph Reiter
79939fe183 Merge branch 'distcheck-repeatedly' into 'gtk-3-24'
(3.24) Makefile.msvc_introspection: Delete lists before appending

See merge request GNOME/gtk!1000
2019-07-18 19:19:04 +00:00
segfault
6c52f76088 gtkmountoperation: Add TCRYPT options to the ask-password dialog 2019-07-18 18:27:12 +02:00
Emmanuele Bassi
bae49dfeae Merge branch 'gtk-3-24-support-tcrypt-with-proxy-handler' into 'gtk-3-24'
gtkmountoperation: Support TCRYPT options when using proxy handler

See merge request GNOME/gtk!244
2019-07-18 10:46:43 +00:00
Simon McVittie
6624f5f5a9 Makefile.msvc_introspection: Delete lists before appending
Otherwise, we'll repeatedly append the same files to the list.

Detected by running `make distcheck` twice in the same tree, with build
system changes in between.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-07-18 11:21:10 +01:00
segfault
d073d5924b Bump glib required version to 2.57.2 2019-07-18 11:58:50 +02:00
segfault
d1e07e2952 gtkmountoperation: Support TCRYPT options when using proxy handler
GMountOperation now supports options to unlock TCRYPT volumes. This
patch sets these options if they are returned by AskPassword() of a
GtkMountOperationHandlerProxy.
2019-07-18 11:52:22 +02:00
Дилян Палаузов
4bc34c3bcf gtkprintbackend:backend_create: avoid strdup+free 2019-07-17 10:42:05 +00:00
Chun-wei Fan
201327a49a MSVC projects: Define a default PythonDir for VS2019 builds
We still use Python 3.6.x for VS2019 builds as VS2015/2017 builds are
binary compatible with 2019 builds.
2019-07-16 16:58:30 +08:00
John Ralls
97f9a2d4ec Merge branch 'fix-2004' into 'gtk-3-24'
macOS: Fix GdkScreen::monitors-changed

See merge request GNOME/gtk!995
2019-07-15 21:03:16 +00:00
James Westman
abaf682870 macOS: Fix GdkScreen::monitors-changed
This signal was not being emitted on macOS, a bug introduced in 941f3c38.
`emit_monitors_changed` was never set to TRUE, so the signal was never
emitted. `emit_monitors_changed` has now been removed, because its
functionality was moved to GdkDisplay.

In addition, kCGDisplayDesktopShapeChangedFlag was removed from the list of
flags that indicate a new/reconfigured monitor, because monitor removals also
include this flag, which caused removed monitors to not be removed from
GdkDisplay.

Fixes #2004.
2019-07-15 15:40:48 -05:00
Jordi Mas
fbebb09449 Update Catalan translation 2019-07-14 11:23:21 +02:00
Timm Bäder
5fe79b71f0 Merge branch 'fix-issue-2014' into 'gtk-3-24'
Fix a string leak in gtkemojicompletion.c [gtk3]

See merge request GNOME/gtk!992
2019-07-12 09:42:34 +00:00
Luca Bacci
8211e083f2 Fix a string leak
Fixes #2014
2019-07-12 08:33:48 +00:00
Matthias Clasen
7331a7649b Merge branch 'fix-darwin-version' into 'gtk-3-24'
meson: fix darwin_versions

See merge request GNOME/gtk!983
2019-07-09 19:39:41 +00:00
Tom Schoonjans
e65699e9c1 meson: fix darwin_versions
This commit fixes the values passed to darwin_versions. When
transitioning from an autotools build, one should always use:

	[lt_current + 1, '@0@.@1@.0'.format(lt_current + 1, lt_revision)]
2019-07-09 19:39:41 +00:00
Efstathios Iosifidis
a50c186e93 Update Greek translation 2019-07-09 04:22:55 +00:00
Emmanuele Bassi
c23c12acc9 Merge branch 'add-some-functions-to-gtk3-sections-txt' into 'gtk-3-24'
GtkFileChooser: generate documentation for gtk_file_chooser_add_choice and related functions (gtk3)

See merge request GNOME/gtk!989
2019-07-08 14:48:15 +00:00
Luca Bacci
318da99fbf docs: Add gtk_file_chooser_add_choice and related functions to gtk3-sections.txt
See Merge Request !989
2019-07-08 16:02:56 +02:00
Aurimas Černius
ad4297e718 Updated Lithuanian translation 2019-07-07 22:42:10 +03:00
Fabio Tomat
146d1a4450 Update Friulian translation 2019-07-06 06:05:21 +00:00
Matthias Clasen
3642629767 3.24.10 2019-07-03 20:25:10 +00:00
Timm Bäder
0f216525af treeview: Remove in_scroll flag
Keep using the pixel cache for backwards-compat, but remove the
in_scroll flag to fix the missing invalidation during scrolling.

Fixes #1977
2019-07-03 16:15:52 -04:00
Matthias Clasen
ed0df60d6e Revert "treeview: Remove the pixel cache"
This reverts commit 184424ae40.

It caused regressions in eclipse.
2019-07-03 16:14:08 -04:00
Matej Urbančič
e55ca39329 Updated Slovenian translation 2019-07-02 18:52:47 +02:00
Matej Urbančič
383209ff8c Updated Slovenian translation 2019-07-02 18:46:23 +02:00
Matthias Clasen
ff4bfb93aa Merge branch 'dboles/widget-factory-style-priority' into 'gtk-3-24'
widget-factory: Use correct StyleProvider priority

See merge request GNOME/gtk!974
2019-07-02 02:39:44 +00:00
Daniel Boles
a51b5d7f7e widget-factory: Use correct StyleProvider priority
We are an application, not a user.
2019-07-01 19:20:04 +01:00
Matthias Clasen
977def8f00 Merge branch 'recent-handle-null-content-type' into 'gtk-3-24'
gtkrecentfilter: handle g_content_type_from_mime_type() returning NULL

See merge request GNOME/gtk!969
2019-06-30 22:57:15 +00:00
Christoph Reiter
8a53ed9e55 gtkrecentfilter: handle g_content_type_from_mime_type() returning NULL
Otherwise we get errors on g_content_type_is_a(). This happens mostly on Windows
because it only knows a limited set of mime types and tries to convert
them to file extensions without any fallback.
2019-06-30 13:59:13 +02:00
Emmanuele Bassi
041b64b9e2 Merge branch 'gtk3-meson-use-cups-dep-type' into 'gtk-3-24'
meson: use cups-config for looking up cups

See merge request GNOME/gtk!963
2019-06-28 10:05:46 +00:00
Christoph Reiter
afc31c477f Merge branch 'correct-install-script' into 'gtk-3-24'
post-install: get absolute path to gtk-update-icon-cache

See merge request GNOME/gtk!965
2019-06-27 15:15:09 +00:00
Jakub Steiner
ed691dcba5 Adwaita: allow flat list row buttons to be flat
- Be more specific about the list row image buttons

Addresses corner case of https://gitlab.gnome.org/GNOME/gtk/issues/1748
2019-06-27 12:10:42 +02:00
Jakub Steiner
4a6ff4598e Adwaita: no intention to make circular buttons universal
- No intention to make any button circular with a magic class
  Maybe if Lapo returns, he'll make all your dreams come true.

"Fixes" https://gitlab.gnome.org/GNOME/gtk/issues/861
2019-06-27 11:32:38 +02:00
Jakub Steiner
1f69f5196b Adwaita: lighten dark switch sliders
- addresses legibility concerns

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1819
2019-06-27 10:55:18 +02:00
Jakub Steiner
c5330a2588 Adwaita: darken osd background for A:dark
- OSD background color was too close to $bg_color to make out outline

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1964
2019-06-27 10:28:39 +02:00
Jakub Steiner
2d29cff140 Merge branch 'adwaita-menubar-submenu-rounding' into 'gtk-3-24'
Adwaita: Fix padding/rounding on submenus

See merge request GNOME/gtk!967
2019-06-27 08:25:14 +00:00
Jakub Steiner
45abadaf70 Merge branch 'adwaita-popover-radius' into 'gtk-3-24'
Adwaita: Apply border-radius to .csd popovers

See merge request GNOME/gtk!966
2019-06-27 08:11:31 +00:00
Alex Monday
4fa83d55dc Adwaita: Fix padding/rounding on submenus
- Apply menubar submenu style for .csd submenus;
- Remove child subemenu style (looks like it is inherited
  from a parent).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1976
2019-06-27 13:04:02 +05:00
Alex Monday
d3cf55a26d Adwaita: Apply border-radius to .csd popovers
Fix popover_radius variable doesn't apply to .csd popover.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1984
2019-06-27 11:07:51 +05:00
worldofpeace
70123468b5 post-install: get absolute path to gtk-update-icon-cache
Identical to how gtk-query-immodules is being handled here.
2019-06-26 17:21:59 -04:00
Priit Laes
50a32b4b99 gdk: x11: Fill GdkMonitor manufacturer with PNP id from EDID
Previously, the manufacturer property of the GdkMonitor was NULL,
and having at least PNP id at GdkMonitor.manufacturer makes it
possible to distinguish between different monitors programmatically.
2019-06-26 12:07:52 +03:00
Christoph Reiter
dab769a08c meson: cups: use cups-config for looking up cups
We were looking for the cups headers and the cups lib in the default locations
which for example breaks with OpenBSD where the cups headers are under /usr/local/include/

Instead just use the "cups" dependency type from meson which internally uses cups-config.

Fixes #1967
2019-06-25 20:46:09 +02:00
Christoph Reiter
d36fb51c11 meson: cups: fix building without colord support
The colord dependency object was always passed to the cups backend even
if it wasn't declared.
2019-06-25 20:27:15 +02:00
Matthias Clasen
017a440296 Merge branch 'wip/jimmac/infobar-revealer-borders' into 'gtk-3-24'
Adwaita: infobar borders

See merge request GNOME/gtk!962
2019-06-25 15:34:23 +00:00
Matthias Clasen
47bd2482a9 Merge branch 'wip/chergert/fix-autotools-enable-profiler' into 'gtk-3-24'
build: fix --enable-profiler=no

See merge request GNOME/gtk!961
2019-06-25 15:27:25 +00:00
Christian Hergert
e0d511b33f build: fix --enable-profiler=no
This fixes the --enable-profiler=no or --disable-profiler option.

Fixes #1965
2019-06-25 07:57:12 -07:00
Jakub Steiner
df6e0da623 Adwaita: infobar borders
- defined a bottom border for infobars, move styling into descendant box
  to hide border when unrevealed

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1165
2019-06-25 15:17:39 +02:00
Christoph Reiter
ecf2c68d97 Merge branch 'gtk3-build-explicit-encoding' into 'gtk-3-24'
build: always use utf-8 when reading/writing text files

See merge request GNOME/gtk!953
2019-06-25 07:27:58 +00:00
Christoph Reiter
5107735c9f build: always use utf-8 when reading/writing text files
open() in text mode should never be used without an encoding because it defaults
to the locale encoding which is rarely what is wanted.

This fixes the Windows build in some cases (depending on the locale/paths used)
2019-06-25 08:53:26 +02:00
Chun-wei Fan
30f2af0aef Merge branch 'quartz-no-harfbuzz' into 'gtk-3-24'
Require Harfbuzz only for Wayland and X11 backends.

See merge request GNOME/gtk!955
2019-06-25 05:43:28 +00:00
Daniel Boles
a25aa2082d ShortcutsSection: Fix tiny grammar-o "in for"→"in" 2019-06-24 18:01:53 +01:00
Matthias Clasen
a5cf2c4b19 Merge branch 'issue-1973' into 'gtk-3-24'
Do not add empty strings to GtkFileFilter

See merge request GNOME/gtk!957
2019-06-24 11:21:52 +00:00
Emmanuele Bassi
6cdb165fa4 Do not add empty strings to GtkFileFilter
When parsing a UI description for GtkFileFilter we should avoid passing
empty strings, to avoid issues when serialising the filter before
sending it over DBus.

Fixes: #1973
2019-06-24 10:53:31 +01:00
Matthias Clasen
e873c98e25 action muxer: Be safe against reinsertion
Be prepared for the eventuality that somebody
might reinsert the same action group without
holding any extra references on it.

This was observed as causing crashes in
gnome-builder.
2019-06-23 20:50:20 -04:00
Matthias Clasen
f8251a4da9 Add a test for reinserting action groups
This is reproducing a crash that was seen
in gnome-builder.
2019-06-23 20:49:57 -04:00
John Ralls
21694949fc Disable Quartz Native Filechooser when running earlier than MacOS X 10.6
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1685
2019-06-22 14:43:50 -07:00
John Ralls
3994e75550 Redo the fullscreen MacOS version control to allow building on 10.6
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1686
2019-06-22 14:43:50 -07:00
John Ralls
a26f6d9768 Prevent compile error for pressedMouseButtons when using SDK < 10.6.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1687
2019-06-22 14:30:59 -07:00
John Ralls
13e64aa103 "]Quartz] Set the popup menu type hint before realizing the popup."
Otherwise the native window gets created with GDK_TYPE_HINT_NORMAL
and in fullscreen appears on its own screen or tab instead of over
the combo like it's supposed to.
2019-06-22 13:46:18 -07:00
John Ralls
ef72fe750a Hide Objective-C from outside GdkQuartz.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1737

Don't export any functions taking or returning MacOS types in
gdkquartz.h, gdkprivate-quartz.h, or any header that either includes.

The GdkQuartz internal functions are moved to a new header
gdkinternal-quartz.h, the functions used by quartz-specific
Gtk files are moved to another new header gdkquartz-gtk-only.h, and
the key and event enums to a new header gdkkeys-quartz.h.
2019-06-22 13:37:46 -07:00
John Ralls
e169e2bdd5 Require Harfbuzz only for Wayland and X11 backends.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1968
2019-06-22 10:52:34 -07:00
Goran Vidović
3ffd71cf35 Update Croatian translation 2019-06-21 22:35:17 +00:00
Goran Vidović
417b91e3f9 Update Croatian translation 2019-06-21 22:29:33 +00:00
Goran Vidović
e526b8f473 Update Croatian translation 2019-06-21 22:13:50 +00:00
Goran Vidović
336357780b Update Croatian translation 2019-06-21 22:11:21 +00:00
Matthias Clasen
7b42bade95 Merge branch 'wip/dboles/overlay-docs-3' into 'gtk-3-24'
Overlay: small improvements to documentation

See merge request GNOME/gtk!932
2019-06-21 00:45:12 +00:00
Matthias Clasen
3090fe77d9 Merge branch 'issue-1961' into 'gtk-3-24'
Report the monitor's connector name under Wayland

See merge request GNOME/gtk!951
2019-06-21 00:40:16 +00:00
Emmanuele Bassi
5b54f86aee Set the monitor's connector under X11
Like we do on Wayland.

In this case, we copy it from the same source as the output name,
because it's going to match.
2019-06-20 22:51:47 +01:00
Emmanuele Bassi
8e08721278 Relay the xdg_output.name to GdkMonitor
The xdg_output interface has a `name` property that reflects the output
name coming from the compositor.

This is the closest thing we can get to a connector name.

Fixes: #1961
2019-06-20 22:51:47 +01:00
Emmanuele Bassi
cdd6fb32c5 Fix regression in GdkScreen.get_monitor_plug_name()
The documentation for get_monitor_plug_name() says that we're returning
the name of the connector for the monitor, but we switched it to using
the model name.
2019-06-20 22:51:47 +01:00
Emmanuele Bassi
af778ec7d0 Add private getter for a monitor connector
The migration from GdkScreen's monitor API to GdkMonitor left out a way
to get the connector's name of a monitor. While there's no real
guarantee that the connector's name is stable, some system components
used it to uniquely identify a monitor until the next plug in/out event.

Since GTK 3 is API stable, we can only add a private setter and getter
functions pair, without a property.
2019-06-20 22:51:47 +01:00
Daniel Boles
321a21959e Overlay: Use @index_, not @position, in reorder()
We named the argument `position` in the code and doc arguments, but the
rest of the documentation referred to `index` instead. That was maybe
meant to hint at the child property named :index, but we can simply be
fully clear here. We can call the argument `index_`, replacing the local
variable with that name, thus avoiding any possible confusion with the
unrelated ::get-child-position, and refer users to :index for completion

`index_` is used instead of plain `index` in case anyone is #including
<strings.h> and getting the old index() function superseded by strchr();
see https://gitlab.gnome.org/GNOME/gtk/merge_requests/932#note_531149
2019-06-20 21:40:57 +01:00
Daniel Boles
8393c6d9be Overlay: Improve overly brief blurbs @ child props
Be a bit clearer about what :pass-through does, and point :index at the
corresponding reorder_overlay() method that explains what an index means
2019-06-20 21:40:57 +01:00
Daniel Boles
4119578562 Overlay: Document overlay children aren't measured
Some users expect that the Overlay will automatically request enough
size for its overlay children as well as its main child. It doesn't,
because it's just a GtkBin. Add a short paragraph pointing that out.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1939
2019-06-20 21:40:37 +01:00
Daniel Boles
c6b16fbbfa FileChooserButton: Document the CSS nodes & class
The only glancing mention of this we had was that GtkButton mentioned it
in passing when discussing how `button` could get contextual classes.
2019-06-20 20:51:13 +01:00
Matthias Clasen
17ec9ee4af Merge branch 'fix-action-muxer-parent-chain' into 'gtk-3-24'
Fix action muxer parent chain

See merge request GNOME/gtk!950
2019-06-20 14:28:56 +00:00
Matthias Clasen
44a2d5d65f Skip a11y tests
Its the same we do on master. Until those tests
are reliable, it is better to not include them
and have a passing testsuite for ci.
2019-06-20 09:09:58 -04:00
Matthias Clasen
cc282c00d2 Fix build with older GLib
Turns out g_strv_equal is recent.
2019-06-20 08:22:56 -04:00
Matthias Clasen
b38c885eca Merge branch 'wip/jimmac/variable-colors-and-metrics' into 'gtk-3-24'
Adwaita: few vars to adjust color & metrics

See merge request GNOME/gtk!947
2019-06-19 21:55:19 +00:00
Matthias Clasen
08f216e11f action muxer: Fix gtk_widget_get_action_group
The documentation for gtk_widget_get_action_group
and gtk_widget_list_prefixes states that both of
these operate on all the action groups that are
'available' to the widget.

Which means: they are meant to walk up the parent
muxer chain. So do that.

Add tests to verify the expected behavior.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1396
2019-06-19 21:38:27 +00:00
Daniel Mustieles
b05466d368 Updated Spanish translation 2019-06-19 10:09:31 +02:00
Daniel Boles
ddd5fcb8ce ListBox: Document buildable child type placeholder
andyholmes on IRC asked about this and it wasn't documented, so fix that
2019-06-18 21:43:07 +01:00
Daniel Boles
c34760010f Window: Hyperlink to GtkBuildable from its section 2019-06-18 21:42:40 +01:00
Frederik Feichtmeier
a83e1bcc03 Adwaita: few vars to adjust color & metrics 2019-06-18 15:05:52 +02:00
Matthias Clasen
fee3a3066c 3.24.9 2019-06-18 10:59:03 +00:00
Matthias Clasen
cb7c994e82 Update test output 2019-06-18 10:59:03 +00:00
Nathan Follens
d854706bf9 Update Dutch translation 2019-06-18 09:00:08 +00:00
Nathan Follens
9cb188b512 Update Dutch translation 2019-06-18 08:42:25 +00:00
Jakub Steiner
4bf343a0ec Merge branch 'wip/jimmac/tone-down-infobars' into 'gtk-3-24'
Adwaita: tone down infobars

See merge request GNOME/gtk!946
2019-06-18 08:39:53 +00:00
Chun-wei Fan
2d3c0e9e7d build/win32/detectenv-msvc.mak: Update error message
We now support up to Visual Studio 2019, not just 2015, so don't
confuse people here...
2019-06-18 16:30:58 +08:00
Chun-wei Fan
6918fd70c8 Visual Studio 2019 builds: Enable /HIGHENTROPYVA for x64 builds
This improves the security of the built binaries.
2019-06-18 16:20:28 +08:00
Jakub Steiner
fa3d410848 Adwaita: tone down infobars
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1957
2019-06-18 10:19:11 +02:00
Chun-wei Fan
a8f10f6865 Visual Studio: "Add" Visual Studio 2019 project files
Use the scripts that we have to copy the 2010 projects and updating
the various items in the project files to make them Visual Studio
2019-compatible upon 'make dist'.

Also ensure that the introspection NMake Makefiles can properly detect
that we are building with Visual Studio 2019.
2019-06-18 16:07:23 +08:00
Chun-wei Fan
0b50915878 Visual Studio projects: Fix generating gtktypefuncs.inc
From the Meson port, gtk/gtktesteutils.c now includes
gtk/gtktypefuncs.in instead of gtk/gtktypefuncs.c, so we should do the
same thing in the Visual Studio projects, to fix the build.

Also, since build/win32/gentypefuncs.py is an adaptation of the script
from GTK master (in gtk/), and that we now have gtk/gentypefuncs.py, we
should use the version of the script in gtk/ and drop the one in
build/win32.
2019-06-18 14:37:58 +08:00
Christoph Reiter
bd80b34ca8 meson: a11y tests: don't build testfocus.c, autotools doesn't dist it
And the resulting binary isn't used anyway
2019-06-17 22:16:44 +02:00
Christoph Reiter
f0038fad63 meson: a11y tests: don't test "menus.ui", autotools doesn't dist it 2019-06-17 22:15:25 +02:00
Matthias Clasen
093f806f59 Merge branch 'gtk3-meson-finish' into 'gtk-3-24'
gtk3 meson port not-so-final touches

See merge request GNOME/gtk!940
2019-06-17 17:50:42 +00:00
Christoph Reiter
94555371f5 meson: print disabled backends in the final build summary
It's easy to miss what's not getting build otherwise
2019-06-17 17:50:42 +00:00
Matthias Clasen
47da5607e1 NEWS: Updates 2019-06-17 13:44:37 -04:00
Matthias Clasen
8e4dc3cf29 Merge branch 'wip/mjog/gtk-completion-show-on-complete' into 'gtk-3-24'
entry completion: Update popup visibility on manual complete

See merge request GNOME/gtk!939
2019-06-17 17:13:04 +00:00
Matthias Clasen
0872338cf2 wayland: Explicitly require RGBA8888
Its the format we expect to have. If we want to
support 10-bit visuals at some point, that should
be an explicit decision.
2019-06-17 13:04:35 -04:00
Efstathios Iosifidis
fbd6e8b6e3 Update Greek translation 2019-06-16 22:22:45 +00:00
Emmanuele Bassi
0e866fd261 Merge branch 'cups-check-cleanup' into 'gtk-3-24'
build: only require cups >=1.7

See merge request GNOME/gtk!938
2019-06-15 19:17:23 +00:00
Michael Gratton
59c05aeb48 entry completion: Update popup visibility on manual complete
Currently, calling `gtk_entry_completion_complete()` does not adjust
the visbility of the popup used to show completion entries. This makes
it difficlt to dynamically populate the model based on what is being
entered into the completion's entry.

For example, if the model is being populated from a database, and no
matches have (yet) been added between typing a character and the 100ms
delay before completion is automatically triggered, the popup will not
be shown even after matches have been added.

This patch simply moves the related code from the private timeout method
to the public function and shuffles the position of some functions so as
to keep the compiler happy.
2019-06-15 23:25:20 +10:00
Christoph Reiter
d402cd4e2e build: only require cups >=1.7
In 9236ee0564 the cups code was updated to use newer API with cups >= 2
and a later commit (a7e207abe) dropped the old code paths and added version
checks in meson/autotools.

The newly used functions were httpConnect2 and httpReconnect2 which are
available since 1.7 and don't require cups 2.0.

Change the versions checks to 1.7 instead so gtk can still be build with
older cups (macOS 10.9 for example, see #1950)
2019-06-15 10:08:46 +02:00
Christoph Reiter
175c400678 build/cups: remove checks for httpGetAuthString and http_t.authstring
httpGetAuthString() was added with cups 1.3 and we depend on a newer version
now. The direct field access was a fallback in case httpGetAuthString()
was missing, so this can also be dropped.
2019-06-15 10:08:31 +02:00
Christoph Reiter
18177388d1 Merge branch 'cups-config-version-check' into 'gtk-3-24'
build: use --version instead of --api-version for cups-config

See merge request GNOME/gtk!936
2019-06-15 07:25:54 +00:00
Christoph Reiter
22bb5d1968 build: use --version instead of --api-version for cups-config
--api-version returns 1.6 with cups 2.1.0 which breaks the build on
older macOS.

Looking at the upstream git history the value is hardcoded and only randomly
updated as part of cleanup commits, so it looks like it shouldn't be used.

Just use --version instead which gives us the real cups version.
2019-06-15 08:59:55 +02:00
Daniel Boles
8d86ddea7f Merge branch 'dboles/issue1949' into 'gtk-3-24'
testsuite/a11y/about: Fix exp. output per e56a9e6c

See merge request GNOME/gtk!937
2019-06-14 17:02:23 +00:00
Daniel Boles
3e3e89a3c1 testsuite/a11y/about: Fix exp. output per e56a9e6c
Commit e56a9e6ce5 fixing Issue
https://gitlab.gnome.org/GNOME/gtk/issues/686 changed what happens here,
for whatever reason, and there's apparently no notion of 'correctness'
to worry about, so just update the expected output to match and pass CI.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1949#note_531709
2019-06-14 17:48:34 +01:00
Balázs Úr
5239427c52 Update Hungarian translation 2019-06-13 20:17:42 +00:00
Christoph Reiter
dc17e6ff17 Merge branch 'cherry-pick-28c40a4c' into 'gtk-3-24'
ScrolledWindow: Replace deprecated annotations; add (nullable) to set_[hvadjustment]()

See merge request GNOME/gtk!933
2019-06-13 07:16:26 +00:00
Matthias Clasen
e47375cc64 Merge branch 'wip/dboles/scrolledwindow-annotations' into 'master'
ScrolledWindow: Replace deprecated annotations; add (nullable) to set_[hvadjustment]()

See merge request GNOME/gtk!868

(cherry picked from commit 28c40a4c3d)

45a98d6a ScrolledWindow: Replace deprecated (allow-none)
7575d521 ScrolledWindow: Annotate h|vadjustment as nullable
2019-06-12 17:10:12 +00:00
Matthias Clasen
e56a9e6ce5 window: Fix focus wraparound
If tab focus falls off the end, and we have an empty headerbar,
we end up with window->focus == NULL. Don't let that happen

Close https://gitlab.gnome.org/GNOME/gtk/issues/686#note_529577
2019-06-12 07:37:27 +01:00
Matthias Clasen
b6c9d23b9a Merge branch 'popover-state-sync' into 'gtk-3-24'
popover: Sync parent state when needed

See merge request GNOME/gtk!931
2019-06-11 18:33:01 +00:00
Matthias Clasen
e3f67d56db Merge branch 'high-contrast-tabs-3-24' into 'gtk-3-24'
HighContrast: Improve contrast of notebook tabs (GTK 3.24)

See merge request GNOME/gtk!928
2019-06-11 17:12:28 +00:00
Colomban Wendling
afd61c3570 HighContrast: Improve contrast of notebook tabs 2019-06-11 17:41:23 +02:00
Matthias Clasen
d6a81377b1 popover: Sync parent state when needed
When the relative-to widget changes, we need
to re-sync our parent state.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1943
2019-06-11 11:36:53 -04:00
Rafael Fontenelle
27d19e19a1 Update Brazilian Portuguese translation 2019-06-11 14:41:40 +00:00
Matthias Clasen
c96b50a73b Merge branch 'wip/jimmac/treeview-progressbar' into 'gtk-3-24'
Adwaita: update treeview progressbars

See merge request GNOME/gtk!921
2019-06-07 23:40:59 +00:00
Kukuh Syafaat
1e1da035fd Update Indonesian translation 2019-06-07 14:41:18 +00:00
Jakub Steiner
2959b2075b Adwaita: update treeview progressbars
- The style resembles Clearlooks and is way outdated.

https://gitlab.gnome.org/GNOME/gtk/issues/1938
2019-06-07 13:43:29 +02:00
Matthias Clasen
dcdab5b85c Merge branch 'wip/chergert/gdkprofiler-gtk3' into 'gtk-3-24'
gdk: backport GdkProfiler

See merge request GNOME/gtk!918
2019-06-07 03:49:40 +00:00
Christian Hergert
ef67eb0b3c gdk: backport GdkProfiler
This is a backport of the GdkProfiler from master. It does not include
the pixel bandwidth numbers that come from gdkdrawcontext.c since there
does not seem to be an analog in 3.x.

Additionally, this implements the recent changes for SYsprof's D-Bus
profiler API which adds a Capabilities property and an options hash-table
to the D-Bus interface for forward portability.
2019-06-06 17:17:20 -07:00
Milo Casagrande
3db1681c76 Update Italian translation 2019-06-06 11:09:39 +00:00
Michael Natterer
ae2ef1472c gtk: fix weed_out_neg_zero() in spinbutton and scale
It was not copying the terminating \0 in the string, breaking output
in spinbutton (didn't try scale). Fixes #3452.
2019-06-03 02:25:12 +02:00
Anders Jonsson
0be9b233dc Update Swedish translation 2019-06-02 19:16:28 +00:00
Balázs Úr
c0f380c422 Update Hungarian translation 2019-06-01 12:14:42 +00:00
Piotr Drąg
e3f87466f9 Update Polish translation 2019-06-01 13:36:06 +02:00
Piotr Drąg
b1b82dba2f Update POTFILES.skip 2019-06-01 13:33:48 +02:00
Matthias Clasen
765a201965 Merge branch 'wip/chergert/marshalling' into 'gtk-3-24'
various marshalling fixes [gtk3]

See merge request GNOME/gtk!900
2019-06-01 11:04:10 +00:00
Matthias Clasen
39d78e6371 Merge branch 'gail-symbols' into 'gtk-3-24'
libgail-util: Fix symbol visibility with meson

See merge request GNOME/gtk!901
2019-06-01 11:03:57 +00:00
Christian Hergert
6033b6457b va_marshaller: add various va_marshallers
We don't need to cover every case with a va_marshaller, but there are a
number of them that are useful because they will often only be connected
to by a single signal handler.

Generally speaking, if I opened into a file to add a va_marshaller, I just
set all of them.
2019-06-01 00:33:32 -07:00
Christian Hergert
44cdb20c10 gtk: fix all uses of g_cclosure_marshal_generic
This adds specific marshallers for all of the locations where a generic
marshaller is being used. It also provides va_marshallers to reduce the
chances that we get stack traces from perf going through ffi_call_unix64.
2019-06-01 00:02:39 -07:00
Jan Alexander Steffens (heftig)
0836c28202 libgail-util: Fix symbol visibility with meson
Autotools didn't add -fvisibility=hidden to the build of libgail-util-3.
Meson does and produces a library that exports no symbols.

Fix this by adding GDK_AVAILABLE_IN_ALL to all functions in the headers.
2019-06-01 05:57:35 +02:00
Matthias Clasen
dd25499f1e Merge branch 'overlay-scrolling-for-3' into 'gtk-3-24'
Overlay scrolling for 3

See merge request GNOME/gtk!895
2019-05-31 19:47:00 +00:00
Matthias Clasen
3386924dbb Merge branch 'wip/chergert/marshalling' into 'gtk-3-24'
gtk: rely on default marshallers

See merge request GNOME/gtk!897
2019-05-31 19:46:44 +00:00
Christian Hergert
0f2b019d89 gtk: rely on default marshallers
Similar to previous removals of g_cclosure_marshal_VOID__VOID we can remove
other marshallers for which are a simple G_TYPE_NONE with single parameter.
In those cases, GLib will setup both a c_marshaller and va_marshaller for
us. Before this commit, we would not get a va_marshaller because the
c_marshaller is set.

Related to GNOME/Initiatives#10
2019-05-31 11:12:29 -07:00
Matthias Clasen
26b24916c8 scrolled window: respect overlay-scrolling setting
If the gtk-overlay-scrolling setting is FALSE,
don't use overlay scrollbars.
2019-05-31 11:54:06 -04:00
Matthias Clasen
044383fe45 Add a gtk-overlay-scrolling setting
This is in preparation for letting user opt out of
overlay scrolling in the control-center.
2019-05-31 11:54:06 -04:00
Matthias Clasen
689bc42aaf Merge branch 'wip/chergert/marshallers' into 'gtk-3-24'
marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used [gtk-3-24]

See merge request GNOME/gtk!884
2019-05-29 21:17:29 +00:00
Christian Hergert
a8a56e8a0e marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
If we set c_marshaller manually, then g_signal_newv() will not setup a
va_marshaller for us. However, if we provide c_marshaller as NULL, it will
setup both the c_marshaller (to g_cclosure_marshal_VOID__VOID) and
va_marshaller (to g_cclosure_marshal_VOID__VOIDv) for us.
2019-05-29 13:30:15 -07:00
Timm Bäder
47d24c34cd Merge branch 'gtk3-remove-pixel-cache-from-treeview' into 'gtk-3-24'
treeview: Remove the pixel cache

See merge request GNOME/gtk!867
2019-05-29 07:41:21 +00:00
Nelson Benítez León
c925221aa8 GtkFileChooser: add a sortable "Type" column
along with a new 'type-format' setting that allows
to choose the output format for the "Type" column.

The options implemented for this setting are:

'mime' : Output from g_content_type_get_mime_type().

'description' : Output from g_content_type_get_description().

'category' : It uses the corresponding generic icon
  of the mime type to group by categories (aka basic types).

  This produces a more compact output than previous options,
  and allows for type families to be grouped together, so eg.
  after sorting by "Type" column, jpeg and png images will
  be placed together, or the various types of archiver files
  will also be grouped together.

  This format was copied from and currently used by Nautilus
  list view, so we also improve consistency with Nautilus.
  Bugzilla entry for Nautilus implementation is:
  https://bugzilla.gnome.org/show_bug.cgi?id=683722

  The list of type families or categories can be checked on:
  https://developer.gnome.org/icon-naming-spec/#mimetypes

  This 'category' format is set as default.

Issue #362
2019-05-27 22:05:51 -04:00
Matthias Clasen
c0321d6948 Merge branch 'mkenums-once-3-24' into 'gtk-3-24'
Use g_once for all the mkenums template files

See merge request GNOME/gtk!866
2019-05-27 09:30:46 +00:00
Matthias Clasen
9b3ac9c946 Merge branch 'mkenums-once-3-24' into 'gtk-3-24'
Use g_once for all the mkenums template files

See merge request GNOME/gtk!866
2019-05-27 09:30:32 +00:00
Matthias Clasen
2881d6d978 Merge branch 'issue1901-gtk3' into 'gtk-3-24'
wayland: Use scale from core wl_output protocol

See merge request GNOME/gtk!871
2019-05-22 12:09:48 +00:00
Olivier Fourdan
034ed1756c wayland: Use scale from core wl_output protocol
The “xdg-output” protocol provides clients with the outputs size and
position in compositor coordinates, and does not provide the output
scale which is already provided by the core “wl_output” protocol.

So when receiving the wl_output scale event, we should update the scale
regardless of “xdg-output” support, otherwise the scale will remain to
its default value of 1 and the surface will be scaled up by the
compositor to match the actual output scale, which causes blurry fonts
and widgets.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1901
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2019-05-22 12:34:11 +02:00
Olivier Fourdan
4ba8971404 Revert "Revert "wayland: Add support for xdg-output""
This reverts commit 8e20c1fac2.
2019-05-22 12:34:11 +02:00
Kukuh Syafaat
03be8c5617 Update Indonesian translation 2019-05-22 05:43:24 +00:00
Matthias Clasen
8e20c1fac2 Revert "wayland: Add support for xdg-output"
This reverts commit 1f64689c31.

This was leading to blurry output, and needs more work.

See https://gitlab.gnome.org/GNOME/gtk/issues/1901
2019-05-21 13:25:38 -04:00
Timm Bäder
184424ae40 treeview: Remove the pixel cache
This has caused numerous issues for users, especially in the
filechooser, which have not been fixed in all the years since the pixel
cache has been introduced.

If anyone seriously has complaints about the treeview performance (and
those did not exist with the pixel cache), feel free to revert this
commit *and* fix the pixel cache issues.

Closes #503
Closes #1691
Closes #466
2019-05-21 19:09:18 +02:00
Federico Mena Quintero
b565f5d5c2 Use g_once for all the mkenums template files
Without this, initialization of enum/flags values from multithreaded
programs may not work correctly.

Fixes #1617.
2019-05-21 10:46:04 -05:00
Christoph Reiter
9711c2ad45 Merge branch 'remove-mingw-SetupDiGetDevicePropertyW-check-3-24' into 'gtk-3-24'
build: Remove mingw check for SetupDiGetDevicePropertyW

See merge request GNOME/gtk!862
2019-05-21 15:11:04 +00:00
Emmanuele Bassi
d449a9e657 Merge branch 'issue-302' into 'gtk-3-24'
docs: Fix the override for GdkAtom

See merge request GNOME/gtk!863
2019-05-21 13:46:46 +00:00
Emmanuele Bassi
ac490ee8a4 docs: Fix the override for GdkAtom
GdkAtom is a typedef to a pointer to an opaque structure. We need to
tell GTK-Doc how to override it, so that the documentation is accurate.

Fixes: #302
2019-05-21 14:27:33 +01:00
Christoph Reiter
6536646720 build: Remove mingw check for SetupDiGetDevicePropertyW
It was mssing when the check was added in 2016, but was fixed upstream
in https://github.com/mirror/mingw-w64/commit/9ef49367378c50553943bd
shortly after.

Assume everyone has updated by now.

See !861 for a related change on the master branch.
2019-05-21 09:18:55 +02:00
John Ralls
4d7d44c717 Replace obsolete GdkScreen-based method of finding the toplevel at point.
With the more current GdkDisplay function.
Also separate the if statements with blank lines.
2019-05-20 14:35:32 -07:00
John Ralls
9c33adf118 Don't call g_object_ref on NULL, it whines.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1822
2019-05-20 14:35:32 -07:00
Timm Bäder
1a29a2f03f Merge branch 'fix-non-csd-menu-corners-gtk3' into 'gtk-3-24'
Adwaita: Don't round the non-csd menu corners (GTK3)

See merge request GNOME/gtk!834
2019-05-17 13:45:50 +00:00
Matthias Clasen
9cde2186bf emoji chooser: populate incrementally
It takes half a second on my system to initially
populate the Emoji chooser. That is too long. Do
the work in 8 millisecond chunks to give GTK a
chance to get some frames done.
2019-05-16 17:14:04 +00:00
nana-4
d942a31750 Adwaita: Don't round the non-csd menu corners
Otherwise, the menu will have ugly black corners.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1661
2019-05-12 17:41:41 +09:00
Marek Kašík
be271db028 Merge branch 'cups-deprecation-warnings-3-24' into 'gtk-3-24'
Cups deprecation warnings for gtk-3-24

See merge request GNOME/gtk!833
2019-05-10 15:46:45 +00:00
Marek Kasik
4e804ff4a7 Require CUPS >= 2.0 in configure.ac
Require CUPS 2.0 and newer to simplify code.
This removes all ifdefs dependent on CUPS version.
2019-05-10 16:40:58 +02:00
Emmanuele Bassi
a7e207abe2 Require CUPS >= 2.0
Drop support for versions of CUPS < 2.0, to simplify the backend code
and drop a lot of conditional blocks.
2019-05-10 16:40:58 +02:00
Emmanuele Bassi
9236ee0564 cups: Use non-deprecated API
The http* family of functions was deprecated after CUPS 1.7. We can
conditionally use it when built against a newer version of CUPS. The
additional parameters are taken directly from the fallback values
inside CUPS itself.
2019-05-10 16:40:58 +02:00
Emmanuele Bassi
91cc9b58f3 Detect CUPS ≥ 1.7
We support CUPS ≥ 1.2, but we use API that was introduced and deprecated
at a later point.
2019-05-10 16:40:58 +02:00
Matthias Clasen
7bd9cdc8fb Merge branch 'gdk-win32-unimplement-vfuncs-3.24' into 'gtk-3-24'
GdkSurface - Don't call unimplemented NULL set_startup_id() vfunc on Win32

See merge request GNOME/gtk!826
2019-05-07 15:01:45 +00:00
Sebastian Dröge
02d4fbe29e GdkWindow - Don't call unimplemented NULL set_startup_id() vfunc on Win32
GdkWindow::set_startup_id() is NULL on Win32 and would cause a segfault
if called.

While the documentation of the main caller of set_startup_id(),
gtk_window_set_startup_id(), mentions that it's not implemented on
Windows it can still be automatically called via Glade and simply doing
nothing on Win32 is going to be less disruptive than a segfault.
2019-05-07 10:04:01 +03:00
Fabio Tomat
8af587c189 Update Friulian translation 2019-05-06 16:55:44 +00:00
Matthias Clasen
60f9dbf676 Merge branch 'header-bar-leak3' into 'gtk-3-24'
GtkHeaderBar: Don't leak decoration layout

See merge request GNOME/gtk!823
2019-05-06 14:17:05 +00:00
Guido Günther
b1b9de6836 GtkHeaderBar: Don't leak decoration layout
Currently we leak priv->decoration_layout if the layout is set
multiple times.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2019-05-06 13:14:02 +02:00
Matthias Clasen
2957b86f72 Add a reftest for multiple font families
This tests that listing multiple font
families in the css font-family property
works as expected.
2019-05-03 16:38:22 -04:00
Matthias Clasen
4f9ea5e54b css: Use multiple font-family values
Pango API to support this, so we can implement
this very easily.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1854
2019-05-03 16:38:13 -04:00
Matthias Clasen
4273b6ad92 Merge branch 'wip/ernestask/tree-view-rubberband-null-node' into 'gtk-3-24'
treeview: Draw rubber band rectangle more often

See merge request GNOME/gtk!803
2019-05-01 21:20:33 +00:00
Ernestas Kulik
b558f7c9ee treeview: Draw rubber band rectangle more often
If the cursor coordinates are outside of the content (the GtkRBTree),
gtk_tree_view_bin_draw() will return and not draw the rubber band
rectangle.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1859
2019-05-01 22:18:50 +02:00
Rico Tzschichholz
c860a2db85 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:06:15 +02:00
Matthias Clasen
fbf88d285e Merge branch 'xdg-output-3-24' into 'gtk-3-24'
[3.24] wayland: Add support for xdg-output

See merge request GNOME/gtk!750
2019-05-01 03:35:19 +00:00
Chun-wei Fan
56cfc65909 Merge branch 'ime-preedit-hidpi-3' into 'gtk-3-24'
gtkimcontextime.c: Fix preedit window placement on HiDPI

See merge request GNOME/gtk!775
2019-04-30 03:37:59 +00:00
Jakub Steiner
c734c7e918 Adwaita: tone down lowres icon aid
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1818
2019-04-29 15:07:10 +02:00
Matthias Clasen
09bdd4531a Merge branch 'textbuf-serialize-fix-format-string' into 'gtk-3-24'
GtkTextBufferSerialize: Check and fix format string arguments

See merge request GNOME/gtk!779
2019-04-27 13:17:20 +00:00
Felix Riemann
370d8242e7 GtkTextBufferSerialize: Add missing format string argument
The format string has two string parameters however only one was supplied.
2019-04-27 14:41:48 +02:00
Felix Riemann
0dcbbc3344 GtkTextBufferSerialize: Add G_GNUC_PRINTF() to set_error()
This allows the compiler to warn if format string and arguments do not match.
2019-04-27 14:36:35 +02:00
Chun-wei Fan
c073a062b6 gtkimcontextime.c: Fix preedit window placement on HiDPI
We must also take the scaling factor into account for placing the IME
preedit window that is often used for Chinese and Japanese input on
Windows.
2019-04-25 12:15:43 +08:00
Matthias Clasen
abb43f3364 Merge branch 'fix-dnd-macos' into 'gtk-3-24'
quartz: Add missing g_object_ref

See merge request GNOME/gtk!768
2019-04-23 01:24:50 +00:00
James Westman
b7ec3b163f quartz: Add missing g_object_ref
A g_object_ref() call was missing, sometimes causing crashes during
drag-and-drop operations. The matching g_object_unref() is at
gdk/gdkdnd.c:261.

The logic in this function is still wrong--it finds the wrong GdkWindow under
some circumstances--but this commit fixes the crash.

Part of #1840.
2019-04-22 19:59:14 -05:00
Matthias Clasen
a7c5f26d24 Merge branch 'wip/carlosg/tablet-cursors-hidpi' into 'gtk-3-24'
gdk/wayland: Listen to wl_surface events on tablet cursors

See merge request GNOME/gtk!759
2019-04-18 16:55:54 +00:00
Carlos Garnacho
e9757b9afc gdk/wayland: Listen to wl_surface events on tablet cursors
And update the surface accordingly (eg. scale on hidpi). The mechanism
that did that for wl_pointer has been made generic so it can be shared
with tablets too.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1675
2019-04-18 18:05:19 +02:00
Jonas Ådahl
ceeb55eac2 Merge branch 'wayland-hotspot-3' into 'gtk-3-24'
wayland: Avoid using uninitialized memory

See merge request GNOME/gtk!758
2019-04-18 14:54:02 +00:00
Matthias Clasen
ac739b2a72 wayland: Avoid using uninitialized memory
_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
2019-04-18 10:40:09 -04:00
Chun-wei Fan
983e82b750 state-record.c: Include header for write()/close()
Avoid an "implicit declaration of ..." warning/error for using
close()/write().
2019-04-18 15:06:54 +08:00
Rico Tzschichholz
0fcfa1f266 meson: Add missing files to gtk3-demo to fix build 2019-04-17 17:47:12 +02:00
Matthias Clasen
ec1e8fb20f widget-factory: Update copyright line
Update the years to 2019, and use some better typography.
2019-04-16 19:57:46 -04:00
Matthias Clasen
849b7faac8 widget-factory: Add an Inspector menu item
Just because we can.
2019-04-16 19:56:37 -04:00
Olivier Fourdan
1f64689c31 wayland: Add support for xdg-output
Previously, the GDK backend for Wayland would deduce the logical size
of the monitors from the wl_output size and scale.

With the addition of fractional scaling which advertises a larger scale
value and then scale down the client surface, the computed logical size
of the monitors in GDK would be wrong and confuse applications which
insist on using the monitor size and position (like Firefox).

The xdg-output protocol aims at describing outputs in a way which is more
in line with the concept of an output on desktop oriented systems by
presenting the outputs using their logical size and position appropriately
transformed.

Add support for the optional xdg-output protocol so that the size and
position of the monitors as reported by GDK is correct even when using
fractional scaling.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1828
2019-04-16 16:14:24 +02:00
Timm Bäder
81c8efc863 imcontextwayland: (Hopefully) fix if expression
Backport from master: f9a5a474f0
2019-04-16 00:12:24 +02:00
Carlos Garnacho
b819fcac74 Merge branch 'event_window' into 'gtk-3-24'
gdk/wayland: Use event window to calculate coordinatess for show_window_menu()

See merge request GNOME/gtk!749
2019-04-15 17:11:05 +00:00
Robert Mader
df6ea75a04 gdk/wayland: Use event window to calculate coordinatess for show_window_menu()
The previously used window always was the xdg_toplevel window.
2019-04-14 12:26:45 +02:00
Christoph Reiter
77c1424582 meson: add tools tests 2019-04-13 13:11:23 +02:00
Christoph Reiter
014320bfb0 meson: add a11y test 2019-04-13 12:49:27 +02:00
Christoph Reiter
0f957ca4f7 meson: underscorify immodule name when using it as a macro name
This resulted in -DINCLUDE_IM_ti-et getting passed to gcc resulting in
lots of warnings. Use underscorify() so we get the correct -DINCLUDE_IM_ti_et instead.
2019-04-12 20:59:14 +02:00
Nirbheek Chauhan
6bdc1137f2 Merge branch 'fix-meson-on-macos' into 'gtk-3-24'
meson: Fix build on macOS

See merge request GNOME/gtk!735
2019-04-12 06:12:29 +00:00
Chun-wei Fan
a4410e9c01 meson.build: Clean up previous commit
Don't hardcode things, and move only deduce `current` for non-Visual
Studio builds, as it is only used there.
2019-04-12 14:01:31 +08:00
James Westman
9d9b023166 meson: Fix build on macOS
Previously, Meson failed to run on macOS. This was because a value that should
have been an array of strings was instead a single string.
2019-04-12 00:30:23 -05:00
Chun-wei Fan
f5408e5061 meson.build: Fix Visual Studio builds
Commits a04fef4 and cc7f9c4 inadvertedly broke Visual Studio builds as
it caused the following to show up when configuring:

gdk\meson.build:281:0: ERROR: Invalid Shared library version "vs9.2404.4". Must be of the form X.Y.Z where all three are numbers. Y and Z are optional.

Since we do not set a library version that mingles with the minor and
micro versions, along with libtool current for any Visual Studio builds,
just set those versions as 3 on Visual Studio builds, and things should
work the way they did before.
2019-04-12 11:29:52 +08:00
Aurimas Černius
1373bf1d76 Updated Lithuanian translation 2019-04-11 22:49:59 +03:00
Christoph Reiter
cc7f9c44e4 meson: Also add a library version for libgailutil
See a04fef4b9e
2019-04-11 21:21:50 +02:00
Emmanuele Bassi
ce86b411f8 meson: Update versions
GTK 3.24.8 was just released.
2019-04-11 19:34:06 +01:00
Emmanuele Bassi
a04fef4b9e meson: Preserve compatibility with Autotools build
The Meson build is missing the libtool versioning of the shared
libraries.
2019-04-11 19:33:25 +01:00
Chris Williams
3246d6a738 gdkframeclockidle: Don't permanently skew frame time
Since commit 3b2f9395, the frame time may be set into the future, so
only ensure monotonicity, and don't store the offset. This prevents the
frame time from becoming out of sync with g_get_monotonic_time().

Fixes #1612
2019-04-11 13:25:18 -04:00
Matthias Clasen
bcb9babc5f Merge branch 'gtk-3-24-meson' into 'gtk-3-24'
GTK 3 meson port

See merge request GNOME/gtk!716
2019-04-11 16:34:47 +00:00
Chun-wei Fan
e96c6c40f8 testsuite/gtk/builder.c: Export the needed symbols
Those symbols need to be properly exported for Visual Studio builds for
things to work properly.  Fixes the test on Visual Studio builds.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
9f1b954fff README.win32: Add instructions on Meson builds
This adds a set of instructions, notes and known issues for the
Meson builds on Windows, especially Visual Studio.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
651715b8e8 meson: Fix building with builtin immodules
We also need to ensure that we pass in -DINCLUDE_IM_xxxx when building
the GTK DLL/.so, in addition to building the respective (static)
immodules, so that we did really link in the immodules into the final
GTK DLL/.so.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
b6b15508d5 meson/MSVC: Copy xxx-3.lib to xxx-3.0.lib upon post-install
This ensures that current Visual Studio project files and NMake
Makefiles (which do not use pkg-config files) do not break with the
Meson-built GTK-3.x libraries.
2019-04-11 16:46:22 +02:00
Christoph Reiter
5aba13f62d autotools: dist gen-c-array.py and gen-rc.py 2019-04-11 16:46:22 +02:00
Christoph Reiter
749a58ab26 meson: simplify builtin_immodules build option
Make it a yes/no/auto combo. "yes" means all modules are built into libgtk,
"no" that none are and "auto" uses the platform defaults, yes on win32,
no otherwise.

If we need more we can always extend it later.
2019-04-11 16:46:22 +02:00
Christoph Reiter
3462fcf9a0 meson: Follow gnome conventions for build option names 2019-04-11 16:46:22 +02:00
Chun-wei Fan
0432b22e02 meson.build: Output DLL names similar to the MSVC projects
This makes the DLL names match those that are produced by the Visual
Studio projects by default.

This, currently, however, names the .lib files same as the ones that
are produced for other platforms (i.e. <libname>-3.lib).  This is
actually not that bad as one can just copy those .lib's into
<libname>-3.0.lib when needed and the binaries that link to those .lib's
ultimately link to the same DLLs, so this should not harm binary
compatibility.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
33589f154e meson.build: Fix generating .pc files
It may be so that Cairo is not found using pkg-config files, so we
cannot just use .name() on the Cairo deps directly.

Since we already have a similar mechanism for generating the GDK .pc
files, re-use and share that mechanism.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
d2ef356f1d meson.build: MSVC-Add fallback dep search for HarfBuzz
It seems that Meson 0.50.0 broke dependency search using CMake for
HarfBuzz at least, so we add a workaround for it to look for the
HarfBuzz headers and libraries manually when we couldn't find HarfBuzz
using the pkg-config and CMake method.
2019-04-11 16:46:22 +02:00
Christoph Reiter
c5789127a7 meson: set soversion to 'vs<VSVer>' for MSVC
This should result in <libname>-vs<VSVer>.dll filenames.
2019-04-11 16:46:22 +02:00
Christoph Reiter
28833783cc meson: Various config.h related fixes
Various adjustments to make the config.h output between autotools
and meson more similar by testing on Linux and Windows/MSYS2.

Setting things to 1 instead of true and shifting things around is motivated
by reducing the diff between the generated files.
2019-04-11 16:46:22 +02:00
Christoph Reiter
2d31112a7f CI: disable building with cloudproviders; breaks tests
See #33
2019-04-11 16:46:22 +02:00
Christoph Reiter
52edd6b192 CI: install dbus-x11 for dbus-launch and iso-codes (optional build dep) 2019-04-11 16:46:22 +02:00
Christoph Reiter
940126c427 meson: fix code examples in the gtk docs build
getting_started.xml uses relative paths for including code examples
and for some reason the base path is different with meson than with autotools.

Switch both autotools and meson to generate the file and insert the absolute
source path instead.

This also cleans up the content file list: the expand content files have to
be in the content file list as well, so just append them there.
2019-04-11 16:45:37 +02:00
Christoph Reiter
8cfbf63c5a meson: static immodules: depend on generated headers 2019-04-11 16:45:37 +02:00
Christoph Reiter
068f7f7423 meson: set the soversion to just '0' everywhere
This is what glib did for the meson port, so can't be that wrong.
This also makes the DLL names match the autotools Windows DLLs.
2019-04-11 16:45:37 +02:00
Christoph Reiter
65f2fe828c meson: statically link immodules under mingw by default
To match what the autotools build does right now.
2019-04-11 16:45:37 +02:00
Christoph Reiter
b5a8bd5fe3 meson: Don't depend on meson 0.50
The install arg doesn't add anything here anyway.
2019-04-11 16:45:37 +02:00
Christoph Reiter
2445f46e01 meson: gtk docs: set ENABLE_ON_X11 2019-04-11 16:45:36 +02:00
Christoph Reiter
1d40ba250f meson: only install broadway man pages if it's enabled 2019-04-11 16:45:36 +02:00
Christoph Reiter
e47440def5 meson: Don't make the man pages build depend on the documentation option
Include all meson build files under docs/ and check with get_option() there.
2019-04-11 16:45:36 +02:00
Christoph Reiter
6a37e2d19e CI: Install sassc
In case sassc is installed the build systems will try to regenerate the css
files. This makes sure we test that code path.
2019-04-11 16:45:36 +02:00
Christoph Reiter
7391a078b3 meson: build print backends
This changes the configure option into two states:
auto: build all that can be build (default)
A list of backend names: build them and fail if we can't

"papi" is missing because it's not in Debian and I can't test it.
2019-04-11 16:45:36 +02:00
Christoph Reiter
d52dad2042 autotools: dist all meson related build files 2019-04-11 16:45:36 +02:00
Christoph Reiter
26d32f3bd0 meson: build all input modules; fix static build on Linux 2019-04-11 16:45:36 +02:00
Christoph Reiter
e41ec3c62e meson: install public broadway headers 2019-04-11 16:45:36 +02:00
Christoph Reiter
cb89ad18a2 meson: immodules: unset the name_prefix to match autotools 2019-04-11 16:45:36 +02:00
Christoph Reiter
fd758bb2e9 meson: install unix-print headers 2019-04-11 16:45:36 +02:00
Christoph Reiter
1882ff9be3 CI: enable broadway and xinerama 2019-04-11 16:45:36 +02:00
Christoph Reiter
fb9e3e1830 CI: autotools: test with srcdir!=buildir 2019-04-11 16:45:36 +02:00
Christoph Reiter
310dc4b6c4 meson: cloudproviders fixes
Set min cloudproviders version.
Add libcloudproviders to gdk Requires.private.
CI: build/test with cloudproviders
2019-04-11 16:45:36 +02:00
Christoph Reiter
b1bc86e905 meson: mkenums: only write basenames in the comments
The autotools build uses relative filenames here while with meson
we get absolute paths. Switch to basename so we get the same result
for both and don't break reproducible builds with absolute paths
in public headers.
2019-04-11 16:45:36 +02:00
Christoph Reiter
59055fd9f7 meson: set interface age; pass soversion to libgdk as well 2019-04-11 16:45:36 +02:00
Christoph Reiter
a33bf3da56 meson: Install gail-3.0.pc and gtk-3.0.m4 2019-04-11 16:45:36 +02:00
Christoph Reiter
490cf8dff6 meson: make the gtk/gdk .pc files match autotools on Linux
Try to include the same things and in a similar order so differences
are easier to catch.

This also adds the backend specific .pc files for gdk like gdk-x11-3.0.pc
2019-04-11 16:45:36 +02:00
Christoph Reiter
331a92d559 meson: gtk gir: depend on xlib and include gtkx.h if X11 is enabled
To match what the autotools build does.
2019-04-11 16:45:36 +02:00
Christoph Reiter
1bbd244517 meson: install desktop/gschema files for demos 2019-04-11 16:45:36 +02:00
Christoph Reiter
c9d4f53cfc meson: install gtkbuilder.rng/its/loc files 2019-04-11 16:45:36 +02:00
Christoph Reiter
dbf7e1d23b meson: widget-factory: install icons 2019-04-11 16:45:36 +02:00
Christoph Reiter
212efbdd81 meson: build docs and man pages
Lots of warnings, so something is probably still missing.
2019-04-11 16:45:36 +02:00
Christoph Reiter
5a84730b4a meson: build and install translations 2019-04-11 16:45:36 +02:00
Christoph Reiter
1ee995fd0f meson: Install im-multipress.conf 2019-04-11 16:45:36 +02:00
Christoph Reiter
9709d7eb61 meson: Install key themes 2019-04-11 16:45:36 +02:00
Christoph Reiter
7bc1aeef8e CI: run the tests with meson
Not all are ported I think, but this is a start.
2019-04-11 16:45:36 +02:00
Christoph Reiter
73fcf0d3d4 CI: save meson build logs 2019-04-11 16:45:36 +02:00
Christoph Reiter
fb083b6de2 tests: don't overwrite GSETTINGS_SCHEMA_DIR when running under meson
Under autotools the compiled schemas are in the build directory and with
meson they are in the root build dir. Avoid changing the autotools build for
now and add a special GTK_TEST_MESON env var which we can use to differentiate
the two.

See 1253e7bfcb for a similar fix on master.
2019-04-11 16:45:36 +02:00
Christoph Reiter
09fe0b0edc meson: disable some broken immodules for now
To fix the build.
We need to port the source generation logic from gtk4 for this.
2019-04-11 16:45:36 +02:00
Christoph Reiter
857b9a55a4 meson: fix build of immultipress.c with mingw
There is no need to escape the quotes since we are not in a shell here
and things get passed to the compiler as is.
2019-04-11 16:45:36 +02:00
Christoph Reiter
dc5698ad55 CI: add meson build jobs for Fedora and MSYS2 2019-04-11 16:45:36 +02:00
Christoph Reiter
b185f69334 meson: check for and set HAVE_IPRINTDIALOGCALLBACK
It's needed under mingw in the print backend
2019-04-11 16:45:36 +02:00
Christoph Reiter
ca33855793 meson: gdk: add missing pangowin32 dep 2019-04-11 16:45:36 +02:00
Christoph Reiter
74f6832001 meson: add fribidi dep 2019-04-11 16:45:36 +02:00
Chun-wei Fan
6db8e62ae7 meson: Install the icons for the demo programs
Those should be installed as well, and will also eliminate the error
that gtk-update-icon-cache failed during the post install.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
c1e40a5fbd meson: Really fix Broadway builds
We must also feed rawinflate.min.js into gen-c-array.py, so that the
windows really show up in the browser when running GTK programs using
broadway.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
7586e88204 meson: Build libgail-util
This adds libgail-util to the build process.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
5e8edec254 meson: Build the input modules
Build the input modules for GTK+, either as modules or built directly
into GTK.  Also provide a configure option to build the specified
immodules, or all, or the backend immodule(s) or none of the immodules
into GTK.  Note that for Visual Studio all immodules are built into
the GTK DLL by default, like what is done in the Visual Studio projects.

Note that building the backend immodules for Quartz, X11 and Wayland are
currently untested.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
6b079afa0a meson: Fix GDK-Win32 build
We have a new source file that we must build,
gdkwin32langnotification.c.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
e24e0dd8a5 meson: Make post-install script a Python script
This is so that the post install script will work on environments where
*NIX shell scripts are not supported, such as on Windows cmd.exe for
Visual Studio builds.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
1cd99d63d1 meson: Build the .rc files on Windows
This will ensure that the version info is easily visible from the
GDK/GTK+ DLLs, and ensure that the print dialogs will have a more modern
look and feel.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
0e24d35e3b tests/: Declare variables at the top-of-block
This will ensure that the code will build for pre-C99 compilers.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
92206fe23b tests/animated-resizing.c: Include gtk/fallback-c89.c
This is to ensure that compilers that do not have round() in math.h can
still build the code.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
7d0364a127 testsuite/gtk/stylecontext.c: Declare variables at top-of-block
This will ensure the code builds on pre-C99 compilers.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
988d2dd077 examples/bp/bloatpad.c: Declare variables at top-of-block
This is to ensure that the code will build on pre-C99 compilers.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
397471d604 demos/gtk-demo/meson.build: Build gtk3-demo-application
This should also get built as well.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
b0a31fefd7 meson: Fix Broadway builds
Make sure the source files are in line with GTK+-3.x Broadway backend
sources.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
4da82356bc meson: Enable GLES Windows builds via libANGLE
Check whether the libepoxy library is built on Windows with support for
GLES.  If so, enable GLES/EGL support on Windows as well.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
ac1f66a35b gdk/meson.build: Force-export gdk_win32_display_manager_get_type()
...on Visual Studio builds, as it seems that the linker is optimizing
that symbol out (hence it is not exported in the DLL).  This is to
ensure that the introspection files for GdkWin32 build.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
2912363104 gdk/meson.build: Fix typo for GdkWin32 Introspection
It is gdk_win32_gir, not gdk_x11_gir...
2019-04-11 16:45:36 +02:00
Chun-wei Fan
1e7988531a meson: Only use fallbacks for PangoFT2 and FreeType when needed
PangoFT2 is optional on Windows, so we only really need the fallback if
when it is required.

Along with that, since FreeType does not typically ship with pkg-config
files in its CMake builds, check for the needed headers, .lib and
function and then use the fallback when they could not be found and
PangoFT2 is used.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
2d2ad0a997 meson: Only use cairo fallbacks when needed
On Visual Studio builds, since Cairo builds tend not to generate
pkg-config files for us, look for the headers and .lib's, before
attempting to download the Cairo repo (which is quite large) and
building it.

We can simplify this process when Meson gains the ability to check
for the dependencies in a declarative fashion, but before that, this
is what must be done.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
8dc95560e2 meson.build: Bump version 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
dbce9ee870 meson: Add wrap files for building with subprojects 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
ead77a4628 meson: Cleanup tests and gdk testsuite 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
20c29fd8c0 meson: Fix introspection generation on Linux 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
a8ffb42739 meson: Don't target gnu89 as the c_std
Meson propagates c_std to all subprojects, including those that
require gnu99 or c11, etc.

https://github.com/mesonbuild/meson/issues/1889
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
d9000a0740 meson: Disable discarded-qualifiers warning
This branch is not going to receive the reworks required fix warnings
about discarding of const qualifiers, so disable that warning instead.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
3b246fbc56 gtk: Fix compiler warning about deprecated declaration 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
ca63c98447 meson: Add fallback subprojects for more dependencies 2019-04-11 16:45:36 +02:00
Philippe Normand
215c2be76f meson: Set the compatibility version correctly on macOS
And bump to Meson 0.48 as this feature requires it.
2019-04-11 16:45:36 +02:00
Philippe Normand
4eb2f297f1 meson: Disable --export-dynamic for clang
It doesn't seem to be supported, at least when compiling on macOS.
2019-04-11 16:45:36 +02:00
Philippe Normand
89d5c543ac meson: Build fixes for macOS 2019-04-11 16:45:36 +02:00
Philippe Normand
cde5a3f4b4 gtk: Fix paste/clipboard usage on macOS
In Mojave the build fails because declareTypes is nil. Instead use the
clearContents method, although I'm not really sure this is the same.
2019-04-11 16:45:36 +02:00
Philippe Normand
9109efb19e meson: Disable X11 support on Darwin
The Quartz backend should fulfill most requirements anyway.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
ea6e3b3ddf meson_options.txt: Disable introspection by default
It's broken. Fix later.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
00842f4d4e gtk-launch: Fix compilation with MSVC 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
a4fe15d9f0 meson: Sync build files with master and update to 3.24 2019-04-11 16:45:27 +02:00
Chun-wei Fan
8caa937739 tests: Include system headers appropriately
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2019-04-11 16:40:33 +02:00
Nirbheek Chauhan
8ec004cc08 Import meson build files from an 3.22
Specifically, from 6dd6660c68
2019-04-11 16:40:33 +02:00
Matthias Clasen
c19ae9635e Merge branch 'uajain/clean-gtktypefuncs' into 'gtk-3-24'
gtk/Makefile: Add generated gtktypefuncs.c to DISTCLEANFILES

See merge request GNOME/gtk!732
2019-04-11 13:55:55 +00:00
Jakub Steiner
152e65f07a Adwaita: less purple OSD style
- one of the bits that escaped the purple cast is the osd background color
2019-04-11 15:31:31 +02:00
Umang Jain
adbd9b22d6 gtk/Makefile: Add generated gtktypefuncs.c to DISTCLEANFILES
Otherwise, it errors out on make distcleancheck in debian packaging

```
ERROR: files left in build directory after distclean:
./gtk/gtktypefuncs.c
make[1]: *** [Makefile:1005: distcleancheck] Error 1
```
2019-04-11 11:27:21 +05:30
Matthias Clasen
5428379fad 3.24.8 2019-04-10 17:12:29 -04:00
Matthias Clasen
08e20ce597 Silence a compiler warning 2019-04-10 15:46:31 -04:00
Marek Černocký
bc0b9840de Updated Czech translation 2019-04-10 16:36:02 +02:00
Matthias Clasen
af58e05531 Merge branch 'wip/cellrendererpixbuf-fallbacks-3-24' into 'gtk-3-24'
cellrendererpixbuf: Use fallback icons with icon-name

See merge request GNOME/gtk!729
2019-04-08 15:41:04 +00:00
Iain Lane
d151223b1b cellrendererpixbuf: Use fallback icons with icon-name
This gives us a better chance of finding an icon to show.

Closes: #1809
(cherry picked from commit fbe0e32813)
2019-04-08 16:30:03 +01:00
Ask Hjorth Larsen
6cb72d7f8c Updated Danish translation of gtk 2019-04-08 00:03:54 +02:00
Matthias Clasen
d1a9ba2c93 Merge branch 'gtk-3-24-gtkplacessidebar-add-loop-devices' into 'gtk-3-24'
gtkplacessidebar: Add loop devices

See merge request GNOME/gtk!722
2019-04-06 15:33:54 +00:00
Jordi Mas
7af43fb98c Update Catalan translation 2019-04-06 06:40:52 +02:00
Jordi Mas
d875ef88ff Update Catalan translation 2019-04-05 21:01:47 +02:00
segfault
3f77da62bd gtkplacessidebar: Add loop devices 2019-04-05 18:59:50 +02:00
Marek Kašík
8b85f38093 Merge branch 'gtk-3-24' into 'gtk-3-24'
Print dialog, CUPS: Check unknown option values whether they are actually custom settings - Backport to GTK 3.24

See merge request GNOME/gtk!717
2019-04-05 16:29:03 +00:00
Till Kamppeter
b9e91b9419 print: Check unknown option values whether they are actually custom settings
Set always correct custom page size.
2019-04-05 16:29:03 +00:00
Daniel Mustieles
7c10ed9193 Update Spanish translation 2019-04-05 10:39:18 +00:00
Emmanuele Bassi
505a177398 Merge branch 'autotools-remove-gail-checks' into 'gtk-3-24'
build: remove unused checks for sockaddr_un.sun_len

See merge request GNOME/gtk!708
2019-04-03 10:29:07 +00:00
Christian Kirbach
e47865dba6 Update German translation 2019-04-03 09:33:21 +00:00
Daniel Șerbănescu
3f250959b6 Update Romanian translation 2019-04-02 18:21:32 +00:00
Christoph Reiter
9fe71ccdc1 build: remove unused checks for sockaddr_un.sun_len
It sets HAVE_SOCKADDR_UN_SUN_LEN which is unused since d3ab2fe19c
2019-04-02 18:46:38 +02:00
Emin Tufan Çetin
47c797f63d Update Turkish translation 2019-04-02 16:22:36 +00:00
Matthias Clasen
3a770b1b80 Merge branch 'adwaita-selected-row-switch-fix' into 'gtk-3-24'
Adwaita: Fix switch slider border on selected row

See merge request GNOME/gtk!703
2019-04-02 15:49:29 +00:00
Alex Monday
3770defce7 Adwaita: Fix switch slider border on selected row
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1802
2019-04-02 20:12:56 +05:00
Matthias Clasen
741a32ff7c Merge branch 'autotools-remove-gnu-ftw-check' into 'gtk-3-24'
build: remove unused check for GNU ftw

See merge request GNOME/gtk!700
2019-04-02 14:27:24 +00:00
Carlos Garnacho
a6eb593370 Merge branch 'startup-id-private' into 'gtk-3-24'
Centralize DESKTOP_STARTUP/AUTOSTART_ID handling

See merge request GNOME/gtk!659
2019-04-02 12:38:18 +00:00
Matthias Clasen
89e38ba343 Merge branch 'issue-137' into 'gtk-3-24'
Set the a11y name of the "create folder" button

See merge request GNOME/gtk!697
2019-04-02 10:46:09 +00:00
Jan Alexander Steffens (heftig)
2d3936cbe6 Centralize DESKTOP_STARTUP/AUTOSTART_ID handling
Add private API to GDK to move these variables from the environment into
static scope. Also move the DESKTOP_STARTUP_ID validation here to reduce
code duplication.

Use constructors to read them as early as possible; however, do not
unset them until first requested. This avoids breaking gnome-shell and
gnome-settings-daemon, which want to use the DESKTOP_AUTOSTART_ID in
their own gnome-session clients.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1761
2019-04-02 09:14:35 +02:00
Christoph Reiter
1b52b48814 build: remove unused check for GNU ftw
It sets HAVE_GNU_FTW which is unused since 4acbcf9e97
2019-04-02 08:52:31 +02:00
Emmanuele Bassi
6ed7d60a20 Set the a11y name of the "create folder" button
Otherwise it'll get a generic "Menu" name.

https://gitlab.gnome.org/GNOME/gtk/issues/137
2019-04-01 14:44:25 +01:00
Carlos Garnacho
892abdd41b Merge branch 'wayland_window_menu' into 'gtk-3-24'
gdk/wayland: Properly calculate coordinates for show_window_menu()

See merge request GNOME/gtk!684
2019-04-01 11:10:54 +00:00
Robert Mader
35c4627fac gdk/wayland: Properly calculate coordinates for show_window_menu()
The event received in `gdk_wayland_window_show_window_menu()` can
come from widgets with a GdkWindow. In those cases the coordinates
are relative to the widget, not the root window.
This results in a misplaced window menu.

Properly calculate the coordinates by iterating to the toplevel
window as suggested by Carlos Garnacho.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/684
2019-04-01 11:11:12 +02:00
Matthias Clasen
59a272fdef Close a documentation gap 2019-03-31 18:36:38 -04:00
LRN
7b3f1fd233 Merge branch 'WindowsPrintDriverPreferences' into 'gtk-3-24'
Fixed bug that prevented GTK from storing printer driver preferences in the…

See merge request GNOME/gtk!396
2019-03-31 21:07:25 +00:00
Rick Yorgason
446659e80f Fixed bug that prevented GTK from storing printer driver preferences in the print dialogue on Windows. Also saving devmode->dmDeviceName so the dialogue remembers which printer your selected last, and doesn't try to feed to saved preferences to the wrong printer. 2019-03-31 13:57:12 -07:00
Daniel Șerbănescu
426a0be531 Update Romanian translation 2019-03-30 20:08:45 +00:00
Christoph Reiter
09e0881a51 gdk/Makefile.am: dist gdkconstructor.h
The file was added in 05bc2f4dc1
2019-03-30 20:03:44 +01:00
Piotr Drąg
3d7fd8c897 Update Polish translation 2019-03-30 14:46:12 +01:00
Matthias Clasen
e20b7a3a8d Merge branch 'gir-gdkx11-missing-sources' into 'gtk-3-24'
build: Add missing sources for the GdkX11 gir build

See merge request GNOME/gtk!689
2019-03-30 12:28:59 +00:00
Matthias Clasen
ae69bc53f2 Merge branch 'gdk-gir-include-built-sources' into 'gtk-3-24'
build: Include all generated sources for the gdk gir build

See merge request GNOME/gtk!688
2019-03-30 12:28:05 +00:00
Matthias Clasen
8a15a7bd5f Merge branch 'fix-1788' into 'gtk-3-24'
flowbox: children per line may not be 0

See merge request GNOME/gtk!687
2019-03-30 12:27:10 +00:00
Christoph Reiter
15a7a93d10 build: Add missing sources for the GdkX11 gir build
Noticed while diffing .gir files with the meson port.
2019-03-30 11:57:50 +01:00
Christoph Reiter
8034ba4803 build: Include all generated sources for the gdk gir build
The main one is gdkversionmacros.h which resulted in
GDK_MAJOR_VERSION, GDK_MINOR_VERSION and GDK_MICRO_VERSION not being included
in the Gdk-3.0.gir.

Noticed while diffing girs with the meson port.
2019-03-30 11:14:33 +01:00
Kukuh Syafaat
352c8180d0 Update Indonesian translation 2019-03-30 07:35:20 +00:00
Benjamin Otte
cd4b6a77a4 flowbox: children per line may not be 0 2019-03-29 23:59:52 -05:00
Matthias Clasen
6b8c08525d Merge branch 'wip/chergert/fix-flowboxchild-crash-on-selection' into 'gtk-3-24'
flowbox: check for flowbox when updating selection

See merge request GNOME/gtk!686
2019-03-29 23:54:28 +00:00
Christian Hergert
8dfb33fb5f flowbox: check for flowbox when updating selection 2019-03-29 16:26:20 -07:00
Matthias Clasen
f9e19dca49 Merge branch 'portal-session-state' into 'gtk-3-24'
Portal session state

See merge request GNOME/gtk!519
2019-03-29 23:22:47 +00:00
Matthias Clasen
08da4a2377 application: Add a query-end signal
This lets us take just-in-time inhibitors, and makes
the session support a little more real.
2019-03-29 19:12:40 -04:00
Matthias Clasen
a3e070f59c Application: Support sandboxed session state changes
React to the session-state in StateChanged signals from
the inhibit portal and call QueryEndResponse as appropriate.
2019-03-29 19:12:20 -04:00
Matthias Clasen
a6f35772e7 Merge branch 'separate-marks-margins-on-scales' into 'gtk-3-24'
themes: Optimize code for marks margins on scales

See merge request GNOME/gtk!612
2019-03-29 22:58:49 +00:00
Matthias Clasen
5058f4ef7d Merge branch 'gtk3-fix-gettext-domain' into 'gtk-3-24'
Fix some translation domains in .ui files copied from gtk4

See merge request GNOME/gtk!683
2019-03-29 22:44:14 +00:00
Matthias Clasen
d8b558ead2 Merge branch 'gtk3-pc-fix-fribidi-private-version' into 'gtk-3-24'
build: Fix fribidi version reqs in Requires.private

See merge request GNOME/gtk!685
2019-03-29 22:05:54 +00:00
Christoph Reiter
30f34ba224 build: Fix fribidi version reqs in Requires.private
This resulted in "fribidi_required_dep" being written to the .pc file
instead of the version number.
2019-03-29 22:01:23 +01:00
Balázs Úr
2c4c47fe42 Update Hungarian translation 2019-03-29 20:58:09 +00:00
Christoph Reiter
567cc15132 Fix some translation domains in .ui files copied from gtk4
gtk40->gtk30
2019-03-29 17:35:35 +01:00
Matthias Clasen
1e2bd15b22 Merge branch 'wip/jimmac/list-image-buttons' into 'gtk-3-24'
list image buttons

See merge request GNOME/gtk!656
2019-03-29 14:26:13 +00:00
Rafael Fontenelle
0c948802cd Update Brazilian Portuguese translation 2019-03-29 13:52:30 +00:00
Milo Casagrande
339e20f598 Update Italian translation 2019-03-29 13:31:48 +00:00
Anders Jonsson
2b768edd43 Update Swedish translation 2019-03-29 10:50:54 +00:00
Ignacio Casal Quinteiro
c605a23346 Merge branch 'wip/nobody/517-quartz-gl-context' into 'gtk-3-24'
Quartz GLArea

See merge request GNOME/gtk!146
2019-03-29 10:45:05 +00:00
Philip Chimento
f264e0dbf9 quartz: Update GL context on window resize
The previous version of this patch sent an update message to the
NSOpenGLContext in a GdkGLContext::update vfunc, but that vfunc does not
exist any more.

See: #517
2019-03-29 11:25:29 +01:00
Brion Vibber
f34709807f quartz: implement GdkGLContext for Quartz backend
Current problems:
* other widgets in a GL-painted window are low-resolution on Retina
  display
* something wrong with paint updates; gdkgears demo only updates every
  couple of seconds but reports ~30fps

See: #517
2019-03-29 11:25:29 +01:00
Emmanuele Bassi
ecf3431d3f Merge branch 'gl3-shaders' into 'gtk-3-24'
Use GLSL 3.30 shaders

See merge request GNOME/gtk!671
2019-03-29 09:57:21 +00:00
Emmanuele Bassi
bfcd062e8e Use GLSL 3.30 shaders
We currently ask for anything above 3.2 GL contexts, but we're still
using GLSL 1.50 shaders all over the place. If a GL driver supports GL
3.2+ and GLSL 1.50 only then we'd be in trouble, but the chances of that
happening are really small.
2019-03-27 16:03:43 +00:00
Matthias Clasen
1bb106012a Merge branch 'fix-gi-build-with-lto' into 'gtk-3-24'
Fix the introspection build with "-Wl,--as-needed -flto -O2". Fixes #1692

See merge request GNOME/gtk!665
2019-03-27 05:56:15 +00:00
Benjamin Otte
bbb70857be gtk: Remove all gtk_widget_set_redraw_on_allocate() calls
They're either wrong (when using FALSE because the widgets don't account
for changes to the CSS) or unnecessary (when using TRUE because it's the
default).

Fixes !1777
2019-03-27 00:02:34 +01:00
Matthias Clasen
f35ce26336 color editor: Don't warn if editing is cancelled
Thats a valid way to end color picking.
2019-03-25 16:52:40 -04:00
Jakub Steiner
fc3317138e Adwaita: tone down app icon shadows
- based on Tobias' and Allan's feedback, the app icon dropshadow
  were too prominent.
2019-03-25 17:59:24 +01:00
Christoph Reiter
55e73682cc Fix the introspection build with "-Wl,--as-needed -flto -O2". Fixes #1692
The above flags in combination with "-fvisibility=hidden" break the
g-i build because it results in the g-i generated dumper executable not
linking against the libraries because they are detected as unused and
thrown out.

Fix by only using -fvisibility=hidden for the library and not g-i.
2019-03-25 09:54:54 +01:00
Benjamin Otte
df5d18a5b1 Merge branch 'inspector-theme-find' into 'gtk-3-24'
Inspector: Find themes the same way GtkCSSProvider does

See merge request GNOME/gtk!663
2019-03-22 23:44:14 +00:00
Руслан Ижбулатов
c33f9a2769 Inspector: Find themes the same way GtkCSSProvider does
Look for subdirectories named "gtk-3.x", where 'x' starts as current
minor version and counts down to 14, then drops to 0.
Only look for gtk.css in these directories though. If a theme only
provides gtk-dark.css, it won't be found.
2019-03-22 23:31:18 +00:00
LRN
cddd88064c Merge branch 'ime-load-fix' into 'gtk-3-24'
GDK W32: Test for IME correctly

See merge request GNOME/gtk!658
2019-03-22 15:00:56 +00:00
Руслан Ижбулатов
2e1a55118a GDK W32: Fix property setting to correctly use static strings
The strings that are set are static, so g_value_set_static_string() should
be used to set them instead of g_value_set_string().
2019-03-22 14:52:23 +00:00
Руслан Ижбулатов
3b244c9f11 GDK W32: Test for IME correctly
ImmIsIME() doesn't work (always returns TRUE) since Vista.
Use ITfActiveLanguageProfileNotifySink to detect TSF changes,
which are equal to IME changes for us.

Also make sure that IMMultiContext re-loads the IM when keyboard layout
changes, otherwise there's a subtle bug that could happen:
* Run GTK application with non-IME layout (US, for example)
* Focus on an editable widget (GtkEntry, for example)
* IM Context is initialized to use the simple IM
* Switch to an IME layout (such as Korean)
* Start typing
* Since IME module is not loaded yet, keypresses are handled
  by a default MS IME handler
* Once IME commits a character, GDK will get a WM_KEYDOWN,
  which will trigger a GdkKeyEvent, which will be handled by
  an event filter in IM Context, which will finally re-evaluate
  its status and load IME, and only after that GTK will get
  to handle IME by itself - but by that point input would
  already be broken.
To avoid this we can emit a dummy event (with Void keyval),
which will cause IM Context to load the appropriate module
immediately.
2019-03-22 14:52:18 +00:00
John Ralls
024cb267dd [GdkQuartz] Fix two build issues
1. NSRect and CGRect aren't toll-free bridged in 32 bit builds.
2. NSWindowCollectionBehavior(Dis)AllowTiling is defined beginning in 10.11.
2019-03-21 16:01:51 -07:00
Matthias Clasen
17665f06e3 Merge branch 'wip/jimmac/adwaita-selection-checked-buttons' into 'gtk-3-24'
Adwaita: checked buttons workaround

See merge request GNOME/gtk!657
2019-03-20 14:05:23 +00:00
Matthias Clasen
17dc55474b Merge branch 'adwaita-headerbar-switch-margins' into 'gtk-3-24'
Adwaita: Adjust switch margins on headerbars

See merge request GNOME/gtk!650
2019-03-20 14:04:32 +00:00
Jakub Steiner
e60b55626e Adwaita: focus ring radius
- backport from master

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
2019-03-20 13:40:21 +01:00
Nathan Follens
5d224a1827 Update Dutch translation 2019-03-20 11:14:09 +00:00
Jakub Steiner
e7e31a4835 Adwaita: only tone down image buttons
- Rather than making labeled buttons inside lists toned down,
  only tone down image buttons, so that we don't have to include
  icon-only actions. Places like Software can continue using label
  buttons with no change without having those less visible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1748
2019-03-20 11:31:50 +01:00
Jakub Steiner
c9cfdf7a91 Adwaita: checked buttons workaround
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1642 once and for all

(until it resurfaces)
2019-03-19 17:22:42 +01:00
Alex Monday
430caaa167 Adwaita: Adjust switch margins on headerbars
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
2019-03-19 19:46:00 +05:00
Kristian Rietveld
91f2ad4a2f Bug 743717 - Crashes on clipboard operation, influence by clipboard ...
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
2019-03-18 14:00:51 -07:00
John Ralls
93bf85e92f [Quartz] Fix some compile warnings in gtkclipboard-quartz.c. 2019-03-18 13:33:40 -07:00
John Ralls
5c039a1aa0 [GdkQuartz] Set the toplevel for the pointer if it's NULL.
Gdk sometimes misses crossing events on popups, so the cached toplevel
may be NULL. If it is, find the toplevel under the pointer and set it.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/623
2019-03-18 13:01:11 -07:00
Matthias Clasen
aac83b20c1 Merge branch 'wip/carlosg/startup-notification-fixes' into 'gtk-3-24'
Startup notification fixes

See merge request GNOME/gtk!647
2019-03-18 12:23:52 +00:00
Carlos Garnacho
ed9a6f755d gdk/wayland: Preserve stored startup id for gtk_surface1.request_focus
The use of the startup ID is now twofold, we reply back with it to end any
corresponding startup notification, but we also use it on
gtk_surface1.request_focus to acknowledge that the activation might raise
the corresponding window.

We should preserve the startup ID for the second to work properly, so avoid
clearing it here. It is inconsequential if the underlying
gtk_shell1.set_startup_id request happens multiple times on no longer existing
startup IDs, so don't bother preventing that from happening.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1754
2019-03-18 12:28:57 +01:00
Carlos Garnacho
224a53d97b gtkapplication: Stash DESKTOP_STARTUP_ID on a constructor
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
2019-03-18 12:28:48 +01:00
Matthias Clasen
967c5f7f7f Merge branch 'wip/carlosg/include-constructors-header-3-24' into 'gtk-3-24'
gdk: Include copy of glib/gconstructor.h

See merge request GNOME/gtk!643
2019-03-18 01:09:40 +00:00
Carlos Garnacho
05bc2f4dc1 gdk: Include copy of glib/gconstructor.h
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.
2019-03-17 21:50:35 +01:00
John Ralls
3a959e984f Force a window resize if the content view frame changes.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1029

Should fix most if not all other cases where system-caused changes to
the NSWindow result in the Gdk coordinates not mapping correctly to the
AppKit coordinates.
2019-03-17 10:15:30 -07:00
Jordi Mas
0b4e511d05 Fix to Catalan translation 2019-03-16 22:03:09 +01:00
Jordi Mas
a533d106af Fix to Catalan translation 2019-03-16 22:01:51 +01:00
Matthias Clasen
7b2c731fae entry: Use a better icon for Caps Lock warning
Use the same icon we use in master now.
2019-03-15 18:57:46 -04:00
Matthias Clasen
9e658cb51d Merge branch 'wip/kalev/gtk_window_present-runtime-warnings' into 'gtk-3-24'
window: Undo runtime gtk_window_present deprecation warnings

See merge request GNOME/gtk!632
2019-03-15 00:46:51 +00:00
Руслан Ижбулатов
3fe8b66b3b Fix UAC manifest RC file
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.
2019-03-14 09:24:17 +00:00
Matthias Clasen
67f1113370 Merge branch 'adwaita-remove-selectionmode-assets' into 'gtk-3-24'
Adwaita: Drop checkbox-selectionmode assets

See merge request GNOME/gtk!633
2019-03-14 03:07:19 +00:00
Emmanuele Bassi
094d85f293 Merge branch 'issue-1746' into 'gtk-3-24'
Move the gtkunixprint.h include in the gtk-doc stanza

See merge request GNOME/gtk!636
2019-03-13 19:39:26 +00:00
Emmanuele Bassi
7771869ab3 Move the gtkunixprint.h include in the gtk-doc stanza
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
2019-03-13 17:44:32 +00:00
Alex Monday
1edf11774c Adwaita: Drop checkbox-selectionmode assets 2019-03-13 14:13:42 +05:00
Kalev Lember
a8bbcf33ec window: Undo runtime gtk_window_present deprecation warnings
Now that gtk_window_present is no longer deprecated, remove the runtime
warnings as well.
2019-03-12 21:50:04 +01:00
Matthias Clasen
d9a382d689 3.24.7 2019-03-12 16:25:10 -04:00
Matthias Clasen
f88e8ea6fe Undo the gtk_window_present deprecation
It doesn't make sense to have it in 3.x if we don't
have it in master.
2019-03-12 16:25:10 -04:00
Matej Urbančič
c3e065374f Updated Slovenian translation 2019-03-12 20:25:07 +01:00
Matthias Clasen
34e64ce5c2 3.24.6 2019-03-12 14:54:36 -04:00
Matthias Clasen
2ceff6df9c Fix a11y tests 2019-03-12 14:31:49 -04:00
Matthias Clasen
e910ee2c19 Merge branch 'control-enter' into 'gtk-3-24'
atk key: Always convert control character events into key names

See merge request GNOME/gtk!630
2019-03-12 18:13:10 +00:00
Samuel Thibault
728f6869cb atk key: Always convert control character events into key names
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
2019-03-12 18:22:36 +01:00
Jakub Steiner
ff6b519286 Merge branch 'monday15/gtk-adwaita-selectionmode-checkboxes2' into gtk-3-24 2019-03-12 17:24:41 +01:00
Alex Monday
a58d7573f6 Adwaita: Fix selection-mode checkboxes
Use object-select-symbolic as a check icon, adjust styles.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/28
2019-03-12 17:24:19 +01:00
Matthias Clasen
9d7c7e8a67 Updates 2019-03-12 02:44:31 -04:00
John Ralls
942a2dede5 [GtkSearchEngineQuartz]Don't create file paths from NULL. 2019-03-11 17:58:38 -07:00
John Ralls
75b8abbf24 [GtkSearchEngineQuartz] Limit the scope of the Spotlight search.
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.
2019-03-11 17:58:38 -07:00
John Ralls
0f5603e74f Use n_displays for all monitor counts. 2019-03-11 16:52:07 -07:00
John Ralls
0524362721 Reverse signs on gdk <-> ns x coordinate transforms.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1711
2019-03-11 16:28:23 -07:00
John Ralls
261f1dc395 Switch quartz monitors collection from hash table to ptr array.
It's easier to find in a ptr array than to iterate over a hash table.
2019-03-11 16:28:19 -07:00
John Ralls
3bd9a3453f Change computation of coordinates.
Transform GdkQuartzMonitor geometry to Gdk coordinate system.
Move computation of Display geometry from GdkQuartzScreen to
GdkQuartzDisplay and use AppKit coordinates.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1593
2019-03-11 16:26:50 -07:00
John Ralls
28848176e5 Don't scan the seat's slave list for keyboards.
There aren't any, just the master_keyboard which one accesses with
gdk_seat_get_keyboard().
2019-03-11 16:16:47 -07:00
John Ralls
9a0e40b6da Restore switching keyWindow when changing windows.
Inadvertently removed when converting from gdkdevicemanager to gdkseat.
2019-03-11 16:16:46 -07:00
John Ralls
db84dc8e58 Fix crash when closing a fullscreen window. 2019-03-11 16:16:46 -07:00
Matthias Clasen
e74622b0b8 Merge branch 'clipboard-quartz' into 'gtk-3-24'
gtkclipboard-quartz: Update annotations for gtk_clipboard_wait_for_targets

See merge request GNOME/gtk!624
2019-03-11 15:13:37 +00:00
Jakub Steiner
e8e2f5163c Merge branch 'adwaita-radii-fixes' into 'gtk-3-24'
Adwaita radii fixes

See merge request GNOME/gtk!619
2019-03-11 10:59:55 +00:00
Tomasz Miąsko
593025a917 gtkclipboard-quartz: Update annotations for gtk_clipboard_wait_for_targets
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.
2019-03-10 20:54:46 +01:00
Daniel Șerbănescu
ba216dea1c Update Romanian translation 2019-03-10 18:40:35 +00:00
Nathan Follens
5b75be73d5 Update Dutch translation 2019-03-10 13:01:27 +00:00
Matthias Clasen
31a33593cd Merge branch 'adwaita-fix-backdrop-label' into 'gtk-3-24'
Adwaita: Fix label color on backdrop devel window

See merge request GNOME/gtk!623
2019-03-10 01:04:44 +00:00
Alex Monday
22d9241ab4 Adwaita: Fix label color on backdrop devel window
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1734
2019-03-10 00:52:48 +05:00
Matej Urbančič
29ab9926a2 Updated Slovenian translation 2019-03-08 18:09:26 +01:00
Matthias Clasen
54899a369e Merge branch 'adwaita-typo-fix' into 'gtk-3-24'
Adwaita: Fix typo (missing comma)

See merge request GNOME/gtk!617
2019-03-04 17:35:55 +00:00
Alex Monday
1d960d7028 Adwaita: Adjust entry border-radius
Replace entry border-radius value with $button_radius variable.
2019-03-04 22:25:37 +05:00
Alex Monday
44fcc0435c Adwaita: Replace spinbutton border-radii with variables
Replace hardcoded border-radius values with $button_radius
variable on spinbuttons.
2019-03-04 22:25:11 +05:00
Alex Monday
625a0e3d6c Adwaita: Replace all %linked radii with variables
Some of hardcoded border-radius values on linked elements were left
unchanged during Adwaita refresh.
2019-03-04 22:24:20 +05:00
Alex Monday
0b61d6f6ae Adwaita: Fix typo (missing comma)
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1713
2019-03-04 20:30:43 +05:00
Benjamin Otte
28ea04efca Merge branch 'treeview-separator-fix-drawing-zero-height' into 'gtk-3-24'
treeview: make sure separator nodes have a height > 0

See merge request GNOME/gtk!614
2019-03-04 12:22:42 +00:00
John Ralls
c91ca69c2c Merge branch 'aux-window' into gtk-3-24 2019-03-03 20:27:41 -08:00
John Ralls
03c5b92da2 [quartz] Full-screen only "normal" windows and splashscreens.
So dialogs, pop-ups, etc. behave as expected when parent is in
full-screen.

Tiling is allowed for normal windows and splash screens and disallowed
for others.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1627
2019-03-03 20:05:13 -08:00
Matthias Clasen
23eca11c3f Merge branch 'cherry-pick-95c0f072' into 'gtk-3-24'
Merge branch 'master' into 'master'

See merge request GNOME/gtk!615
2019-03-03 20:30:43 +00:00
Emmanuele Bassi
c830ab2d55 Merge branch 'master' into 'master'
A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells

See merge request GNOME/gtk!505

(cherry picked from commit 95c0f07295)

a52431d2 A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells
2019-03-03 20:22:09 +00:00
Christoph Reiter
af6dd6bf35 treeview: make sure separator nodes have a height > 0
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)
2019-03-03 10:44:52 +01:00
Matej Urbančič
93e7c60bd2 Updated Slovenian translation 2019-03-02 20:57:30 +01:00
Daniel Șerbănescu
3abb57a9e7 Update Romanian translation 2019-03-02 16:47:36 +00:00
Asier Sarasua Garmendia
5e89e1d0a9 Update Basque translation 2019-03-02 12:17:46 +00:00
Alex Monday
deba92f729 themes: Optimize code for marks margins on scales
Separate marks margins for horizontal/vertical scales. Prevents
generation of unused margins.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1703
2019-03-02 14:20:02 +05:00
Марко Костић
95e2e48582 Update Serbian translation 2019-03-01 13:07:55 +00:00
Марко Костић
dc927ee698 Update Serbian translation 2019-02-28 18:26:06 +00:00
Jakub Steiner
2cd62574ac Adwaita: define insensitive links
- tone down the disabled/insensitive links.

Fixes issue #1645
2019-02-27 12:10:56 +01:00
Jakub Steiner
1a91c953eb Adwaita: scrolled context menus
- fix margins as per merg request #547
2019-02-27 11:45:27 +01:00
Changwoo Ryu
344baa18e9 Update Korean translation 2019-02-26 16:55:55 +00:00
Changwoo Ryu
6e641932ac Update Korean translation 2019-02-26 16:54:18 +00:00
Jiri Grönroos
288a9341fd Update Finnish translation 2019-02-25 18:31:04 +00:00
Justin van Steijn
12770e505e Update Dutch translation 2019-02-25 18:02:05 +00:00
Emmanuele Bassi
0c81e7a2e6 Merge branch 'tchaik/gtk-menu-accel-group-prop' into 'gtk-3-24'
menu: Fix accel-group property reset

See merge request GNOME/gtk!576
2019-02-23 12:10:42 +00:00
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
Matthias Clasen
148650c23a gdk: Stop using deprecated pango api 2019-02-04 15:05:43 +01:00
Matthias Clasen
8c973bd837 gdk: Add a copy of pango_unichar_direction
This api has been deprecated in pango.
2019-02-04 15:05:43 +01:00
Matthias Clasen
3e5a7bb898 Add an explicit fribidi dependency
We already depend on it indirectly, via pango.
And we will use it to replace deprecated pango apis.
2019-02-04 15:05:43 +01:00
Christian Hergert
53767ce1d3 quartz: release linked list as we process it
Rather than performing the list iteration and the list free as separate
steps, free the list link while iterating.
2019-02-04 15:05:43 +01:00
Alex Monday
806e98d67e HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-02-04 15:05:43 +01:00
Alex Monday
377b2872be HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-02-04 15:05:43 +01:00
Emmanuele Bassi
e28c7a41ee switch: Take gadget clip into account
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
2019-02-04 15:05:43 +01:00
Tomasz Miąsko
7644c0866b g-i: Add transfer none annotations for frame clock timings getters 2019-02-04 15:05:43 +01:00
Alex Monday
933765204f Adwaita: Horizontal OSD spinbutton entry fix
Add placeholder to hande horizontal spinbutton entries,
add instructions for horizontal OSD spinbutton entry to use this
placeholder.
2019-02-04 15:05:43 +01:00
Balázs Úr
43b6541eae Update Hungarian translation 2019-02-03 13:57:00 +00:00
Balázs Úr
3937fb4ebe Update Hungarian translation 2019-02-02 14:55:21 +00:00
Benjamin Otte
df890474ed Merge branch 'pango-deprecations' into 'gtk-3-24'
Pango deprecations

See merge request GNOME/gtk!544
2019-01-31 20:08:30 +00:00
Matthias Clasen
a3f1e02b9b gtk: Stop using deprecated pango api 2019-01-31 14:07:28 -05:00
Matthias Clasen
c23e07f60f 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-01-31 14:07:28 -05:00
Matthias Clasen
3da6497d9f gdk: Stop using deprecated pango api 2019-01-31 14:07:28 -05:00
Matthias Clasen
998314b8ba gdk: Add a copy of pango_unichar_direction
This api has been deprecated in pango.
2019-01-31 14:07:28 -05:00
Matthias Clasen
417c57e5b7 Add an explicit fribidi dependency
We already depend on it indirectly, via pango.
And we will use it to replace deprecated pango apis.
2019-01-31 14:07:28 -05:00
Christian Hergert
99d013994b quartz: release linked list as we process it
Rather than performing the list iteration and the list free as separate
steps, free the list link while iterating.
2019-01-31 17:55:19 +01:00
Alex Monday
ff4dcf5fa4 HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-01-31 16:43:39 +01:00
Alex Monday
a7ea8248ce HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-01-31 16:43:30 +01:00
Alex Monday
7395160e5b Adwaita: Improve dropdown menu buttons
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
2019-01-31 16:42:32 +01:00
Suyuan Chang
cfad43b80d macOS: Fix bug that entry cannot press and hold a key to input accented character.
There're two issues in GdkQuartzView's NSTextInputClient implementation
causes this bug.

1. The -(NSRange)selectedRange should not return [NSNotFound, 0] if
   there's no selection. The accented character window will not show
   if returned NSRange's location is NSNotFound. Instead of that, the
   NSRange's location should be the caret position in the text input
   buffer.

2. The accented character window will invoke
   -(void)insertText:replacementRange: with non-empty replacement
   range, to replace non-accented character with accented character
   after user select it from accented character window. This case is
   not implemented in original code. Here I use another gobject data
   to pass the information to input module and convert it into
   'delete-surrounding' event.

Besides these, there's another bug cause gtk_im_context_filter_keypress()
return wrong value while user press and hold a key. When user press
and hold a key, the accented character window will consume the
repeating key down event. Is this case, gtk_im_context_filter_keypress()
should return TRUE, indicate the key press is filtered by input
method module. But it will return FALSE because
gtk_im_context_filter_keypress() assume that every key press event
will generate some text from input method module.

Fixes #1618
2019-01-30 22:07:23 -08:00
Benjamin Otte
2c15e59c16 Merge branch 'issue-1631' into 'gtk-3-24'
switch: Take gadget clip into account

See merge request GNOME/gtk!543
2019-01-30 19:20:46 +00:00
Emmanuele Bassi
0a9aa768d8 switch: Take gadget clip into account
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
2019-01-30 18:41:24 +00:00
Christoph Reiter
a0129f556b Merge branch 'get-timings-transfer-3' into 'gtk-3-24'
g-i: Add transfer none annotations for frame clock timings getters

See merge request GNOME/gtk!512
2019-01-29 10:36:19 +00:00
Jakub Steiner
64c28f40a0 Merge branch 'adwaita-osd-spinbutton-entry-fix-3-24' into 'gtk-3-24'
Horizontal OSD spinbutton entry fix

See merge request GNOME/gtk!331
2019-01-29 09:40:51 +00:00
Jakub Steiner
b522c59880 Adwaita: switches with no labels
- 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.
2019-01-28 12:34:48 +01:00
Jakub Steiner
519ff2ac6a Merge branch 'fix-button-icon-position' into 'wip/jimmac/adwaita-3-32'
Adwaita: Fix wrong icon position in some buttons

See merge request GNOME/gtk!533
2019-01-28 11:57:42 +01:00
Jakub Steiner
6f1e611c3b Merge branch 'wip/jimmac/adwaita-3-32' into 'fix-button-icon-position'
# Conflicts:
#   gtk/theme/Adwaita/_common.scss
#   gtk/theme/Adwaita/gtk-contained-dark.css
#   gtk/theme/Adwaita/gtk-contained.css
2019-01-28 10:46:48 +00:00
Sam Hewitt
17ab084f28 Adwaita: fix padding and rounding on menubar submenus 2019-01-28 11:43:54 +01:00
Jakub Steiner
4d08be5d03 Adwaita: selection mode labels
- when not in focus, make sure labels are legible
  but flat.

Fixes issue #1562
2019-01-28 11:43:54 +01:00
Jakub Steiner
b6082efdc0 Adwaita: use neutral greys for dark
- the hint of warm color is too subtle to even notice for most people

Fixes issue #1589
2019-01-28 11:43:54 +01:00
Jakub Steiner
aa1e565fb5 Adwaita: darken dark mode
- match lightness of the old theme.

Fixes issue #1605
2019-01-28 11:43:54 +01:00
feichtmeier
fec7874d0e Reduce vertical menu padding from 8px to 4px 2019-01-28 11:43:54 +01:00
Jakub Steiner
72010d7894 Adwaita: do show labels on switches
- now that we have I/O and not ON/OFF
2019-01-28 11:43:54 +01:00
Jakub Steiner
25bf546eee Adwaita: headerbar buttons separators
- make the border more aparent for when two :active buttons
  are neighboring (Builder panel toggles).
2019-01-28 11:43:54 +01:00
Jakub Steiner
24e6995d92 Adwaita: headerbar togglebuttons backdrop
- redefine overriden backdrop state
2019-01-28 11:43:54 +01:00
Jakub Steiner
079aef0b8d Adwaita: expand the headerbar button styling
- it's not just stackswitcher buttons, apparently. Builder uses
  togglebuttons.
2019-01-28 11:43:54 +01:00
Jakub Steiner
7da52e5255 Adwaita: don't do undershoot
- No need to indicate overflown content. No other OS does this.

fixes #1591
2019-01-28 11:43:54 +01:00
Jakub Steiner
568ea3b7f9 Adwaita: update image assets
- mainly sliders

fixes #1590
2019-01-28 11:43:54 +01:00
Jakub Steiner
0f764eb16e Adwaita: make switcher buttons' active darker
- 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
2019-01-28 11:43:54 +01:00
Jakub Steiner
de1f87b1f4 Adwaita: tone down the window roundounding 2019-01-28 11:43:54 +01:00
Jakub Steiner
86acf52032 Adwaita: button-alt toning down
- checkboxes and radios were too 3d
2019-01-28 11:43:54 +01:00
Jakub Steiner
c514cf75e4 Adwaita: darker active state for buttons 2019-01-28 11:43:54 +01:00
Jakub Steiner
5c67d7d7b1 Adwaita: selection dropdown vcentering
- somewhat odd off-center vertical centering on the selection
  filter popover
2019-01-28 11:43:54 +01:00
Jakub Steiner
5a7fc7e352 Adwaita: remove chin from circular buttons
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:54 +01:00
Jakub Steiner
3b81932981 Adwaita: colored/darker button tweaks
- less contrasty border on colored buttons
- tone down edge highlight on darker buttons

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:54 +01:00
Jakub Steiner
71cfb8e077 Adwaita: rounding of popovers
- you give Tobias a finger and he grbs the whole arm

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
37c47d70f6 Adwaita: no hardsh bottom shading
- felt like an inset shadow in some situations

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
0e95206697 Adwaita: non-square buttons rejiggle
- rather than squishing vertically, stretch horizontally.
  The previous method made some non-button widgets odd looking.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
99a48fe7e7 Adwaita: headerbar radius
- last occurence of window border radius, I swear :)

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
60230b4653 Adwaita: window radius
- found the lapo magic to fix the non-csd corner anti-aliasing
- csd headerbars to do

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
9b820cde49 Adwaita: a *hair* lighter shadows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
15bd30d222 Adwaita: move button shadows down a pixel
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
8d205fd518 Adwaita: slightly larger radius for windows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
b06712d3c9 Adwaita: modals also need the rame rounding
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
83a45d3bb0 Adwaita: increase window radius
- to match the button radius, increase the windwo border radius

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
aa1593505d Adwaita: no 'chin' for buttons
- box-shadow doesn't mix with the chin

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
501bce47ea Adwaita: buttons cast a shadow
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
585569f66e Adwaita: squash buttons as per reqs
- not a big fan of this one

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
5541152724 Adwaita: hide close separator
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
1c5071c346 Adwaita: round buttons
- Grumpy old man commits the first thing he dislikes on
  Allan's proposal.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
7e623b4f12 Adwaita: GNOME 3.32 changes
- 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
2019-01-28 11:43:53 +01:00
Balázs Úr
3215c0a3a9 Update Hungarian translation 2019-01-27 20:01:56 +00:00
Matthias Clasen
80b5024239 switch: Update the .symbolic.png icon too
Regenerate switch-off-symbolic.symbolic.png from switch-off-symbolic.svg.
2019-01-25 15:27:45 -05:00
Jakub Steiner
f900087f30 switch: fix off icon shape
- the recoloring would only work on rects and paths
2019-01-25 20:21:57 +01:00
Matthias Clasen
a1b29fbb2f Merge branch 'wip/carlosg/present-window-on-wayland' into 'gtk-3-24'
Implement gtk_window_present() on wayland

See merge request GNOME/gtk!525
2019-01-25 13:58:50 +00:00
nana-4
d82edf0c91 Adwaita: Fix wrong icon position in some buttons
This commit reverts min-width sizes and changes horizontal padding instead in
order to avoid off-centered button icons.

Fixes #1621
2019-01-25 21:02:47 +09:00
Matthias Clasen
4af1fa872a Merge branch 'switch-icons-for-3' into 'gtk-3-24'
Switch icons for 3

See merge request GNOME/gtk!530
2019-01-25 01:28:24 +00:00
Matthias Clasen
75a4ae2aba switch: use icons
Use the newly added icons.
2019-01-24 20:15:47 -05:00
Matthias Clasen
9fe0ef42a1 Add switch icons
These will be used in GtkSwitch in the future.
2019-01-24 17:47:28 -05:00
Sam Hewitt
cde6ae938e Adwaita: fix padding and rounding on menubar submenus 2019-01-24 11:32:25 -05:00
John Ralls
3e3a15de83 [imquartz] Fix incorrect GdkEvent window member name. 2019-01-23 20:02:16 -08:00
Matthias Clasen
3edb8a9305 Merge branch 'switch-glyph' into 'gtk-3-24'
switch: Avoid problems with glyph availability

See merge request GNOME/gtk!524
2019-01-23 20:45:36 +00:00
Carlos Garnacho
bff46d8696 gdk/wayland: Set a startup notification
And notify the shell about it. This is done through the
gtk_shell1.notify_launch request added in gtk-shell v3. All the plumbing
on the way to the activated application is already in place to transfer
the startup ID, so the other side just has to reply with
gtk_surface1.request_focus.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/624
2019-01-23 19:13:37 +01:00
Carlos Garnacho
ed9db5a173 gdk/wayland: Implement gdk_window_present()
This uses the gtk_surface1.request_focus request added in gtk-shell v3,
the given startup ID may be used by the compositor in order to determine
when was the request started, and whether user input happened in between.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/624
2019-01-23 19:13:37 +01:00
Carlos Garnacho
45d6c0091a wayland/protocol: Update gtk-shell protocol to v3
This version has 2 new requests:
- gtk_shell1.notify_launch notifies the compositor that the requesting
  client shall launch another application. The given ID is expected to
  be unique.
- gtk_surface1.request_focus notifies the compositor that a surface
  requests focus due to it being activated. The given ID is passed to
  this process through undetermined means, if it corresponds with a
  current startup ID and there was no user interaction in between the
  surface will be focused, otherwise it will demand attention.
2019-01-23 19:13:37 +01:00
Matthias Clasen
6a4ce55a69 switch: Avoid problems with glyph availability
If none of the glyphs we want are available, fall
back to using empty strings here, rather than causing
critical warnings.
2019-01-23 12:04:08 -05:00
Emmanuele Bassi
2db6dbd192 Merge branch 'wip/iainl/pointer-type-casts-3-24' into 'gtk-3-24'
Fix -Wincompatible-pointer-types warnings

See merge request GNOME/gtk!523
2019-01-23 12:18:18 +00:00
Iain Lane
882c81dab2 Fix -Wincompatible-pointer-types warnings 2019-01-23 12:18:18 +00:00
Jakub Steiner
e7d7cb580e Adwaita: selection mode labels
- when not in focus, make sure labels are legible
  but flat.

Fixes issue #1562
2019-01-22 12:15:47 +01:00
Jakub Steiner
f2c3481b5c Adwaita: use neutral greys for dark
- the hint of warm color is too subtle to even notice for most people

Fixes issue #1589
2019-01-22 11:59:40 +01:00
Jakub Steiner
393a016c5a Adwaita: darken dark mode
- match lightness of the old theme.

Fixes issue #1605
2019-01-22 11:55:10 +01:00
Jakub Steiner
1f9ee936e8 Merge branch 'Menus_based_on_wip/jimmac/adwaita-3-32' into 'wip/jimmac/adwaita-3-32'
Reduce vertical menu padding from 8px to 4px

See merge request GNOME/gtk!520
2019-01-21 21:24:44 +01:00
feichtmeier
254719ee50 Reduce vertical menu padding from 8px to 4px 2019-01-21 20:31:19 +01:00
Jakub Steiner
dc144d1266 Adwaita: do show labels on switches
- now that we have I/O and not ON/OFF
2019-01-21 19:34:33 +01:00
Jakub Steiner
c82d6f9872 Adwaita: headerbar buttons separators
- make the border more aparent for when two :active buttons
  are neighboring (Builder panel toggles).
2019-01-21 13:16:42 -05:00
Jakub Steiner
6ff9e5ab7d Adwaita: headerbar togglebuttons backdrop
- redefine overriden backdrop state
2019-01-21 13:16:42 -05:00
Jakub Steiner
b8d142f8b8 Adwaita: expand the headerbar button styling
- it's not just stackswitcher buttons, apparently. Builder uses
  togglebuttons.
2019-01-21 13:16:42 -05:00
Jakub Steiner
e66c0a45d4 Adwaita: don't do undershoot
- No need to indicate overflown content. No other OS does this.

fixes #1591
2019-01-21 13:16:42 -05:00
Jakub Steiner
83dcdaa402 Adwaita: update image assets
- mainly sliders

fixes #1590
2019-01-21 13:16:42 -05:00
Jakub Steiner
091b189ce3 Adwaita: make switcher buttons' active darker
- 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
2019-01-21 13:16:42 -05:00
Jakub Steiner
0fc284bf61 Adwaita: tone down the window roundounding 2019-01-21 13:16:42 -05:00
Jakub Steiner
e51f08bda0 Adwaita: button-alt toning down
- checkboxes and radios were too 3d
2019-01-21 13:16:42 -05:00
Jakub Steiner
1efa376b83 Adwaita: darker active state for buttons 2019-01-21 13:16:42 -05:00
Jakub Steiner
6d391b89b8 Adwaita: selection dropdown vcentering
- somewhat odd off-center vertical centering on the selection
  filter popover
2019-01-21 13:16:42 -05:00
Jakub Steiner
4300a5c609 Adwaita: remove chin from circular buttons
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
914813c44a Adwaita: colored/darker button tweaks
- less contrasty border on colored buttons
- tone down edge highlight on darker buttons

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
c529de1765 Adwaita: rounding of popovers
- you give Tobias a finger and he grbs the whole arm

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
71a97accf2 Adwaita: no hardsh bottom shading
- felt like an inset shadow in some situations

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
7a51da1e69 Adwaita: non-square buttons rejiggle
- rather than squishing vertically, stretch horizontally.
  The previous method made some non-button widgets odd looking.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
2badd5f45a Adwaita: headerbar radius
- last occurence of window border radius, I swear :)

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
92ebd74101 Adwaita: window radius
- found the lapo magic to fix the non-csd corner anti-aliasing
- csd headerbars to do

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
df40f2cc2b Adwaita: a *hair* lighter shadows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
2dd73b7f76 Adwaita: move button shadows down a pixel
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
034103b078 Adwaita: slightly larger radius for windows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
9f885ba16c Adwaita: modals also need the rame rounding
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
d5fcc8d522 Adwaita: increase window radius
- to match the button radius, increase the windwo border radius

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
213aeffd62 Adwaita: no 'chin' for buttons
- box-shadow doesn't mix with the chin

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
25148ac344 Adwaita: buttons cast a shadow
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
8fc57f144c Adwaita: squash buttons as per reqs
- not a big fan of this one

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
8a7023fe33 Adwaita: hide close separator
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
6ef7c2ef29 Adwaita: round buttons
- Grumpy old man commits the first thing he dislikes on
  Allan's proposal.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
3fa0e4b0be Adwaita: GNOME 3.32 changes
- 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
2019-01-21 13:16:41 -05:00
John Ralls
a93daa0373 [imquartz] Return event window for mouse events in keypress filter.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1600
2019-01-21 07:31:52 -08:00
Matthias Clasen
a02de1c9d9 More updates 2019-01-21 09:09:59 -05:00
Jakub Steiner
f7df4853e8 Merge branch 'wip/dboles/spinbutton-button-backdrop-disabled-3' into 'gtk-3-24'
SpinButton: Fix wrong background/icon colours in button:backdrop:disabled

See merge request GNOME/gtk!489
2019-01-21 13:57:43 +00:00
Matthias Clasen
d3e5cc3b9d 3.24.4 2019-01-21 08:28:07 -05:00
Pieter Schalk Schoeman
4e95ef90c2 Update Afrikaans translation 2019-01-20 23:25:43 +00:00
Pieter Schalk Schoeman
8d52eb3d86 Update Afrikaans translation 2019-01-20 23:23:53 +00:00
Matthias Clasen
b984074e29 Merge branch 'mcatanzaro/#1492' into 'gtk-3-24'
filechoosernative: Implement gtk_file_chooser_set_filter()

See merge request GNOME/gtk!435
2019-01-19 00:54:15 +00:00
Matthias Clasen
e2d9563a55 Merge branch 'wip/long-combo-boxes' into 'gtk-3-24'
Fix long combo box positioning

See merge request GNOME/gtk!514
2019-01-18 22:42:04 +00:00
Chun-wei Fan
c3ece1b24c Update README.win32 on features and Visual Studio support
Let people know that up to Visual Studio 2017 is supported, and on
enabling additional features which are not enabled by default.
2019-01-18 17:01:47 +08:00
Chun-wei Fan
c89328766a Visual Studio builds: Use UNIX line endings for projects
Make things consistent across the board.  Only the .sln files and the
various README files under build/win32 should have Windows CR/LF line
endings.
2019-01-18 16:43:47 +08:00
Chun-wei Fan
466c87dec5 build/win32/vs10/gtk3-install.props: Remove from tree
This file is generated during 'make dist', so we should not need to
track it in GIT.
2019-01-18 16:41:26 +08:00
Chun-wei Fan
78fef66866 Visual Studio builds: Improve Introspection build process
Adapt the Visual Studio project files to output the introspection files
in the same directories where the built binaries are located from the
previous patch.

Also, make the gtk3-introspect project dependent on the gdk-3 and gtk-3
projects only, so that we can build the introspection files without
needing to finish the whole build process.  In order to "install" the
built introspection files, the gtk3-install project is now where this is
being done.  Note that the introspection builds is still not built by
default at this point.
2019-01-18 16:35:28 +08:00
Chun-wei Fan
5ffbeeff91 MSVC builds: Improve introspection build process
To avoid confusion, have the NMake Makefiles output the built introspection
files in the same location where the binaries are built for the project
files, according to the Visual Studio version, platform and configuration
where the build is carried out.

Also make generating the introspection NMake snippet portion more robust to
source additions and removals by checking on Makefile changes too.
2019-01-18 16:25:49 +08:00
Jonas Ådahl
c35878ecf1 menu: Adapt scroll offset if arrow is shown
When a popup is placed using move_to_rect(), it'll get feedback about
the position and size it got assigned. We use this feedback to update
the scroll offset, but while doing so, if the visibility of the arrow
changed, we didn't adapt the offset accordingly.

Fix this by offsetting the provided offset by the height of the arrow,
if it was made visible as a side effect of the scroll offset change
triggered by the feedback.

Related: mutter#105
Closes: #1463
2019-01-17 19:30:31 +01:00
Jonas Ådahl
3e586a82e6 menu: Force resize when remapping
A menu will be clamped to the work area as a side effect of the
move_to_rect() logic if the resize anchor flags was set. For it to work
a second time, the initial size needs to be the actual menu size before
being clamped again. Achieve this by forcing a size recalculation before
showing the menu.
2019-01-17 19:23:21 +01:00
Jonas Ådahl
00486efd51 menu: Don't constrain initial menu size
Don't constrain the initial menu size by the work area of some monitor;
instead let the move_to_rect() logic in the backend do the constraining.
This fixes two things:

1) The anchor delta provided to the backend will not be invalid. The
delta is calculated by looking at the active menu item, calculating the
offset given that, but since we clamped the window size before showing
the window, the delta became invalid. This caused visible issues when
the delta was large enough to make the initially calculated popup window
geometry to be placed outside the geometry of the parent window, which
is a violation of the Wayland protocol.

2) The scroll offset to be correct when receiving the positioning
feedback. While the scroll offset was based on the pre-clamped window
size, the feedback, which was used to calculate the new offset, was not,
causing the scroll offset to be clamped as well.
2019-01-17 19:14:37 +01:00
Jonas Ådahl
66ee4dea40 wayland/window: Don't remap when handling xdg_popu.configure
If the size was constrained by the xdg_positioner mechanisms, we handle
the resize by resizing the popup window. What we shouldn't do is
hide/show the popup window so avoid that.
2019-01-17 16:17:32 +01:00
Tomasz Miąsko
ea286fe8f9 g-i: Add transfer none annotations for frame clock timings getters 2019-01-17 10:13:29 +01:00
Michael Catanzaro
c0a0bfd388 filechoosernativeportal: stuff the current filter into options
We need to tell the portal what filter is supposed to be selected by
default, or it will just pick the first one, which could be wrong and
annoying.

This will require updated xdg-desktop-portal and xdg-desktop-portal-gtk
to work properly.

Fixes #1492
2019-01-16 17:45:44 -06:00
Matthias Clasen
9c8f1478f9 Merge branch 'about-license-linke' into 'gtk-3-24'
about dialog: Use ::activate-link for license

See merge request GNOME/gtk!510
2019-01-16 14:40:31 +00:00
Daniel Mustieles
dd8b28540f Updated Spanish translation 2019-01-16 09:54:30 +01:00
Matthias Clasen
ab748d05f0 about dialog: Use ::activate-link for license
This should behave the same as all the other links
in this dialog.

Closes: #1561
2019-01-15 23:16:16 -05:00
Matthias Clasen
f6b20fb815 Merge branch 'switch-label-fallback' into 'gtk-3-24'
Add fallbacks for GtkSwitch state labels

See merge request GNOME/gtk!508
2019-01-15 21:30:44 +00:00
Emmanuele Bassi
ed39721aa7 Add fallbacks for GtkSwitch state labels
While the IEC power symbols have been part of Unicode since version 9.0,
released in 2016, not every font supports them.

We can use the old symbols as a fallback, as they seem to have the
better coverage, if not the best appearance.
2019-01-15 15:22:09 +00:00
Michael Catanzaro
3307944746 filechoosernativeportal: remove redundant casts
We are casting from GtkFileChooserNative to... GtkFileChooserNative.
Boo.
2019-01-14 20:53:19 -06:00
Michael Catanzaro
a136cbae8f filechoosernative: forward current_filter to delegate dialog
gtk_file_chooser_set_filter() doesn't work for GtkFileChooserNative. The
code forwards added and removed filters to the delegate dialog, but
doesn't do anything to set the selected one, so the wrong one gets
chosen. So fix that.

This only fixes the fallback dialog. The portal will be fixed in a
subsequent commit.

Partial fix for #1492
2019-01-14 20:07:01 -06:00
Matthias Clasen
c9d09695f8 3.24.3 2019-01-13 23:11:14 -05:00
Matthias Clasen
97bac67546 Updates for 3.24.3 2019-01-13 22:30:26 -05:00
Matthias Clasen
da3100e99c Revert a non-working addition
Cell rendererers don't support <style> in ui files.
2019-01-13 22:06:51 -05:00
Matthias Clasen
c5d824d6c9 Update a11y test output 2019-01-13 22:06:51 -05:00
John Ralls
ee0e59e6cf [IMQuartz] Get the GdkWindow from the NSKeyEvent.
Instead of from the IMContextQuartz's client window because the former
is the event window where the text will be inserted. In some cases
they're different and the text may be discarded (because the client
window isn't editable) or misplaced.

Fixes Bug 707945.
2019-01-13 16:00:53 -08:00
John Ralls
3c49c593f5 [GtkSearchEngineQuartz] Don't run off the end of the results array and crash. 2019-01-11 16:18:45 -08:00
Matthias Clasen
5ecc3080fe Merge branch 'power-on-switch' into 'gtk-3-24'
Use power symbols for GtkSwitch labels

See merge request GNOME/gtk!503
2019-01-11 15:18:14 +00:00
Emmanuele Bassi
796e884c3f Use power symbols for GtkSwitch labels
Both the "on" and "off" IEC states have a corresponding Unicode glyph,
starting from Unicode 9.0.
2019-01-11 15:08:58 +00:00
Timm Bäder
ca583836d9 Merge branch 'wip/muktupavels/listbox' into 'gtk-3-24'
listbox: set selected_row before emitting signal

See merge request GNOME/gtk!479
2019-01-11 11:38:19 +00:00
Matthias Clasen
325b968567 Merge branch 'io-switch' into 'gtk-3-24'
switch: Always use I/O

See merge request GNOME/gtk!501
2019-01-10 22:23:03 +00:00
Matthias Clasen
45ee476e36 switch: Always use I/O
This allows for smaller switches, and goes better with
modern themes that have round switches.
2019-01-10 16:58:16 -05:00
Emmanuele Bassi
32b21ee905 Merge branch 'gtk-3-24' into 'gtk-3-24'
Revert "gdk: deactivate/activate surface on keyboard grabs"

See merge request GNOME/gtk!484
2019-01-09 16:31:32 +00:00
Timm Bäder
99fadf1619 Merge branch 'wip/sadiq/750-gtk3' into 'gtk-3-24'
gtkpopover: Fix popover when parent widget is partially visible

See merge request GNOME/gtk!497
2019-01-09 11:53:52 +00:00
Mohammed Sadiq
e7eec51772 gtkpopover: Fix popover when parent widget is partially visible
fixes https://gitlab.gnome.org/GNOME/gtk/issues/750
2019-01-09 17:08:40 +05:30
Matthias Clasen
8292264ff3 Merge branch 'wip/cache-hidpi-cursor-gtk-3-24' into 'gtk-3-24'
Don't get incorrectly scaled cursors from cache

See merge request GNOME/gtk!494
2019-01-08 18:11:21 +00:00
Jonas Ådahl
a907552df9 wayland/cursor: Make sure the cached cursor has the right size
The cache key is just the name of the cursor, so if a previously added
cursor had e.g. scale == 1, if we ask for a new cursor with scale == 2,
we might still fetch the scale == 1 cursor from the cache. Avoid this by
making sure the scale of the cached one is correct.

If it isn't, load the cursor as normal, and update the cache entry with
the new properly scaled cursor.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1183
2019-01-08 18:48:16 +01:00
Jonas Ådahl
d31107c4fe wayland/cursor: Rename GdkWaylandCursor variable
It was called "private" for some reason. Call it "wayland_cursor"
instead, as it's a GdkWaylandCursor, and also not private.
2019-01-08 18:48:16 +01:00
Matthias Clasen
d79de8657b Merge branch 'wip/jimmac/app-icon-helpers' into 'gtk-3-24'
Theme: add helper class names for Adwaita

See merge request GNOME/gtk!449
2019-01-08 01:26:58 +00:00
Matthias Clasen
c8f91c3f2d Document icon helper style classes 2019-01-07 20:20:23 -05:00
Michael Catanzaro
65311c8439 Revert "Revealer: Don’t (under)allocate child if not shown"
This reverts commit d179b0667d.

This broke the downloads popover in Epiphany. See #1057.
2019-01-07 18:20:01 -06:00
Daniel Boles
105dd5eda0 searchenginequartz: Fix naming of Beagle @ comment
As funny as that is, it's not very instructive. :P

https://gitlab.gnome.org/GNOME/gtk/merge_requests/490#note_400993
2019-01-07 20:35:40 +00:00
Matthias Clasen
9d1f751ead Merge branch 'issue1507-bis' into 'gtk-3-24'
a11y: Check display in `*grab_cell_focus()`

See merge request GNOME/gtk!457
2019-01-07 20:30:08 +00:00
Matthias Clasen
db4bd97732 Merge branch 'wip/carlosg/flowbox-late-claim' into 'gtk-3-24'
flowbox: Accept multipress gesture late

See merge request GNOME/gtk!480
2019-01-07 20:26:23 +00:00
Matthias Clasen
4fe28ba02a Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkSearchEngineQuartz Fixes

See merge request GNOME/gtk!490
2019-01-07 20:24:48 +00:00
Carlos Garnacho
7f2cb91761 Merge branch 'wip/chergert/controller-motion-coordinates' into 'gtk-3-24'
translate GtkEventControllerMotion x,y into widget coordinates

See merge request GNOME/gtk!370
2019-01-07 20:18:19 +00:00
Christian Hergert
ebcb0ea2a8 eventcontrollermotion: translate event to widget coordinates
When creating the motion controller, we know the widget that is of interest
based on gtk_event_controller_motion_new(). However, not all incoming
events are guaranteed to be of the GdkWindow associated to that widget.
They may also be for a descendant. Therefore, it is useful to translate
those coordinates into the target widget coordinate space as that is
likely what they care about.
2019-01-07 11:49:19 -08:00
John Ralls
ad9fd969de [GtkSearchEngineQuartz] Limit the returned hits.
When the result set is larger than the limit.
2019-01-06 16:19:49 -08:00
Daniel Boles
ae8be92437 [GtkSearchEngineQuartz] Resolve the path to a GtkFile* for the hit list.
Instead of a char* path, which the search_hit parser doesn't expect,
causing a crash.

Closes: $https://gitlab.gnome.org/GNOME/gtk/issues/815
2019-01-06 15:56:57 -08:00
Daniel Boles
d1b14a7deb HC: Fix fgcolor of backdrop:disabled spinbutton +-
We shouldn't give the icons here the same fg colour as the bg... which
makes them disappear and the buttons look like meaningless flat squares.

Fix by just using the same colour the same as foreground disabled. Note:
insensitive_fg_color is more prominent than !disabled, so clearly wrong.
2019-01-06 20:03:44 +00:00
Daniel Boles
6eb1be27f7 Adwaita: Fix bg of backdrop:disabled spinbutton +-
The +/- buttons are meant to be transparent, showing the base_color,
but when backdropped they were picking up background-image from the base
button, meaning they suddenly became more like theme_bg_color instead,
and jumped out of the spinbutton when in backdrop unlike the rest of it.
This looks strange and achieves nothing (especially not indicating that
they are disabled, which is already served fine by their dim fg colour).

Fix this by explicitly saying we don't want any background-image there.
2019-01-06 20:03:35 +00:00
John Ralls
70b7b89411 [Quartz]Check mode before setting the monitor scale factor.
CGDisplayModeGetWidth returns 0 if mode is NULL; that happens if the
CGDisplay is offline or mirroring another monitor and it leads to a
divide-by-zero crash.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1565
2019-01-05 20:06:50 -08:00
Ryuta Fujii
a8e07254d3 Update Japanese translation 2019-01-05 00:20:54 +00:00
Ryuta Fujii
da54692ab7 Update Japanese translation 2019-01-04 23:52:50 +00:00
Emmanuele Bassi
69508b014d Merge branch 'wayland-key-theme-for-3-24' into 'gtk-3-24'
Wayland: Support key theme setting

See merge request GNOME/gtk!487
2019-01-04 16:19:09 +00:00
Samuel Thibault
e84016cd17 Revert "gdk: deactivate/activate surface on keyboard grabs"
This reverts commits f23bfc6b69. and
c926b28d96.

This reintroduces #85, but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
2019-01-04 17:07:18 +01:00
Matthias Clasen
3a1c5f7232 Wayland: Support key theme setting
GTK+ 3 has supported this all along, so we should support
it for Wayland as well, for feature parity.

Closes: #1553
2019-01-04 10:18:51 -05:00
Matthias Clasen
4eee51b0e5 Check for the session bus before using it
Patch by Chris Allen, #475
2019-01-02 20:38:18 -05:00
Matthias Clasen
06ffbb2a22 Merge branch 'wip/nbenitezl/move-bookmark-placeholder-index-3' into 'gtk-3-24'
gtkplacessidebar.c: move bookmark at the placeholder index

See merge request GNOME/gtk!458
2019-01-03 01:28:34 +00:00
Orivej Desh
f6bc2415ab Zero-fill new GtkTextIter
iter_init_common() is used on uninitialized GtkTextIter, and since neither it
nor its callers initiliaze its padding fields, they contain garbage.

This is a problem for Go - which checks that structs passed to C functions do
not contain pointers to Go-allocated memory - when the garbage happens to be
such a pointer.  Although Go zero-fills all GtkTextIter that it allocates, this
does not help when GTK functions such as insert_pixbuf_or_widget_segment called
for gtk_text_buffer_create_child_anchor copy garbage from their stack-allocated
GtkTextIter into a clean iter.  To work around this a GtkTextIter has to be
discraded after use in text buffer anchor inserting functions:
https://github.com/gotk3/gotk3/pull/307
2019-01-02 20:05:10 -05:00
Matthias Clasen
5662f2e34f Fix XChangeProperty calls
They must be long...

Closes: #1556
2019-01-02 19:32:00 -05:00
Carlos Garnacho
c4949aef09 flowbox: Accept multipress gesture late
So it's able to operate properly with the DnD gesture set by
gtk_drag_source_set(). We usually just react on button release,
that's the right time to claim the gesture.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1557
2019-01-02 21:09:53 +01:00
Timm Bäder
dea38f0222 Merge branch 'wip/carlosg/revealer-fix-interrupted-animations' into 'gtk-3-24'
revealer: Fully set the target state if unmapped during animation

See merge request GNOME/gtk!465
2019-01-02 08:50:36 +00:00
Alberts Muktupāvels
4ff4809ede listbox: set selected_row before emitting signal
Signal emittion was added in 6f857f87dc commit and it seems that
this is only place where selected_row is set after emitting signal.

Because of this gtk_list_box_get_selected_row currently returns NULL
as selected row if selection mode is set to GTK_SELECTION_BROWSE.
2019-01-02 01:14:17 +02:00
Daniel Boles
63e0eb5de5 Fix 'Fix "A11y: Add support for AtkTableCell"'...
...since one of the "fixes" there was wrong, at least cosmetically:
.get_position() is declared as returning a gboolean, which is in fact an
int in practice, but we should say what we mean, like we already did.
2018-12-30 18:11:50 +00:00
Chun-wei Fan
c876c74eb7 Fix "A11y: Add support for AtkTableCell"
Make sure that the return types of the vfuncs match the ones that are
specified for post-atk-2.11.x AtkTableCellIface, since we already
require atk-2.15.1 and later.
2018-12-26 12:17:20 +08:00
Christoph Reiter
cc329d36e0 Merge branch 'priority' into 'gtk-3-24'
Annotate values of PRIORITY constants

See merge request GNOME/gtk!472
2018-12-22 16:37:07 +00:00
Tomasz Miąsko
d3b6d16d85 Annotate values of PRIORITY constants
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```
2018-12-22 13:17:58 +01:00
Timm Bäder
b69aae4ab3 Merge branch 'cherry-pick-5b049364' into 'gtk-3-24'
Merge branch 'fix-polygon-svg-recolor' into 'master'

See merge request GNOME/gtk!468
2018-12-22 09:10:49 +00:00
Christoph Reiter
ea518ec2f5 Merge branch 'fix-typo-win32-compilation-speedup-macro' into 'gtk-3-24'
Win32: Fix typo on compilation speedup macro define

See merge request GNOME/gtk!470
2018-12-22 07:13:31 +00:00
Luca Bacci
a9d7d41b59 Win32: Fix typo on compilation speedup macro define
There is a typo, the correct macro to define is WIN32_LEAN_AND_MEAN.
After this change <shellapi.h> must be included in order to use
ExtractIconExW().
2018-12-22 00:48:10 +01:00
Matthias Clasen
b283b0b910 Merge branch 'fix-polygon-svg-recolor' into 'master'
icontheme: Recolor <polygon> elements in SVGs too

See merge request GNOME/gtk!443

(cherry picked from commit 5b049364dc)

284d9093 icontheme: Recolor <polygon> elements in SVGs too
2018-12-20 03:01:36 +00:00
Mike Gorse
e9f527b328 A11y: Add support for AtkTableCell 2018-12-19 21:09:59 -05:00
Carlos Garnacho
32ad0ffa0f revealer: Fully set the target state if unmapped during animation
If the revealer is told do animate and then unrealize itself, we do
(correctly) stop the animation, but used to do a shortcut where we
just set the target state as current.

Other things are dependent on the animation properly finishing though,
like the contained widget child visibility. This may lead to inconsistent
state where gtk_revealer_get_child_revealed() returns TRUE but the child
widget is unmapped, or vice-versa.

Fully finish the animation here, so the child state is coherent the next
time the revealer is mapped. We can also skip notifying on the property
since it will be handled by gtk_revealer_set_position().

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/316
2018-12-19 19:37:42 +01:00
Benjamin Otte
55894c48a5 Merge branch 'wip/dboles/revealer-underallocates-gadgets-3' into 'gtk-3-24'
Revealer: Don't (under)allocate child if not shown (+bonus: actually put enough filler text in testrevealer)

See merge request GNOME/gtk!463
2018-12-18 22:21:37 +00:00
Daniel Boles
d179b0667d Revealer: Don’t (under)allocate child if not shown
If the child is not (partly) revealed, don’t allocate it, or we spam the
console with warnings about giving negative width to children’s gadgets.
We can check :child-visible, which is FALSE if (current&target)_pos == 0

Close https://gitlab.gnome.org/GNOME/gtk/issues/1057
2018-12-18 21:00:08 +00:00
Daniel Boles
ee5873be19 testrevealer: Make filler text actually big enough
…to do what it says it does, i.e. avoid the window expanding/shifting as
e.g. the leftmost entry is revealed.

noticed during https://gitlab.gnome.org/GNOME/gtk/issues/1057
2018-12-18 21:00:08 +00:00
Carlos Garnacho
33faf46516 Merge branch 'wip/wacom-tool-type-from-property-3.24' into 'gtk-3-24'
Wacom tool type fixes

See merge request GNOME/gtk!453
2018-12-18 20:09:40 +00:00
John Ralls
1c1a86d0fc Merge Ignacio Casal Quintero's quartz-scale-factor' into gtk-3-24. 2018-12-18 10:55:35 -08:00
Ignacio Casal Quinteiro
1a9377bab9 quartz/display: add back scaling factor
With the last patches one thing that got lost if the scaling
factor. This is very visible when i.e loading a svg image
in a Retina display.
2018-12-18 18:08:47 +01:00
John Ralls
e105fefc49 Fix copy-paste error. 2018-12-18 09:07:15 -08:00
Peter Hutterer
7b33369bfb x11: make the tool lookup dependent on the hw id as well
Tools on the same physical item have the same serial number, so the eraser
and the pen part of a single pen share that serial number. With the current
lookup code, we'll always return whichever tool comes first into proximity.

Change the code to use the hw id in addition to the serial number, this way we
can differ between two tools.
2018-12-18 10:48:03 +10:00
Peter Hutterer
c6dd92294d x11: don't add unknown tools to our list
Generic tools (Bamboo, built-in tablets) always have the same serial number
assigned by the wacom driver. This includes the touch tool when the wacom
driver handles the touch evdev node (common where users require the wacom
gestures to work).

When the first device is the touch device, a tool is created with that serial.
All future tools now return the touch tool on lookup since they all share the
same serial number. Worse, this happens *across* devices, so the pen
event node gets assigned the touch tool because they all have the same serial.

Since we don't actually care about the touch as a tool, let's skip any unknown
tool. This captures pads as well.
2018-12-18 10:48:02 +10:00
Peter Hutterer
f173d1bc5c x11: get the tool type from the wacom driver properties
Any wacom device currently sets the tool type to UNKNOWN. The wacom driver has
a property that exports the tool type as one of stylus, eraser, cursor, pad or
touch. Only three of those are useful here but that's better than having all
of them as unknown.
2018-12-18 10:47:26 +10:00
Daniel Boles
3986326bbf RGBA: tiny grammar improvements in to_string doc 2018-12-17 20:16:42 +00:00
Daniel Boles
be60ddbec9 RGBA: Consistently use “” around inline arg names
instead of being inconsistent and not using them later, which leaves a
bunch of single letters floating among real words, not the prettiest.
2018-12-17 20:16:42 +00:00
Daniel Boles
33a966952a RGBA: Fix example to_string output for reality/CSS
* We don't output spaces anywhere in the code, unlike the doc suggested.
* CSS explicitly forbids whitespace between function names and lparens:
  https://stackoverflow.com/questions/13877198
2018-12-17 20:16:42 +00:00
Nelson Benítez León
f7eb7efeb5 gtkplacessidebar.c: move bookmark at the placeholder index
As that index is set in drag_motion_callback() and visually shown
on the widget as a drop target hint.

https://bugzilla.gnome.org/show_bug.cgi?id=787356
https://gitlab.gnome.org/GNOME/gtk/issues/904
2018-12-17 19:17:17 +00:00
Olivier Fourdan
e91197a37f a11y: Check display in *grab_cell_focus()
Calling the accessibility function `grab_focus()` on a `GtkCell` under
Wayland will cause the client to crash.

This is another case of `gdk_x11_get_server_time()` being called
regardless of the actual windowing backend used.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-17 14:17:54 +01:00
LRN
eb821cb89b Merge branch 'gtk-3-24.ime-event.fixes' into 'gtk-3-24'
gdkevents-win32.c: Use g_strdup() in gdk_settings_notify()

See merge request GNOME/gtk!447
2018-12-17 05:00:06 +00:00
Chun-wei Fan
013b9cbc1f gdkevents-win32.c: Fix GDK_SETTING event notification on IME change
We need to call g_strdup() on the name that we pass in for notifying the
GDK_SETTING event so that when we do gdk_event_free() later we will not
get a crash (stack corruption) that results from attempting to g_free()
something that is not dynamically allocated.
2018-12-17 12:43:24 +08:00
John Ralls
aeec73f53f Refine GdkQuartzNSWindow convertPointToScreen:
and convertPointFromScreen:, making them handle all MacOS versions
so that all of the if-deffing happens in the function definitions.
This happens to fix issue 1518 because it turns out that contrary
to the annotation in the 10.14 nNSWindow.h, convertPointToScreen and
convertPointFromScreen originate in 10.14, not 10.12.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1518
2018-12-15 16:28:44 -08:00
John Ralls
baa283b73b Don't make initializing return_val conditional.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1517
2018-12-15 16:28:44 -08:00
Daniel Boles
112645edf2 EventControllerKey: Add missing docs from master
These never got backported, meaning a pretty useless documentation page.

We still need to add other missing bits, but let's sync these up first.
2018-12-14 22:59:56 +00:00
Matthias Clasen
3e6fd50d96 Merge branch 'wip/carlosg/im-wayland-surrounding-limits' into 'gtk-3-24'
imwayland: Respect maximum length of 4000 Bytes on strings being sent.

See merge request GNOME/gtk!438
2018-12-14 20:09:18 +00:00
Matthias Clasen
f879741e89 Merge branch 'imwayland_enable' into 'gtk-3-24'
imwayland: Handle enter and leave events

See merge request GNOME/gtk!369
2018-12-14 20:07:18 +00:00
Matthias Clasen
8b0fd8e148 Merge branch '1476-nautilus-does-not-enable-to-connect-to-an-nfs-share' into 'gtk-3-24'
Resolve "Nautilus does not enable to connect to an NFS share"

See merge request GNOME/gtk!427
2018-12-14 17:26:35 +00:00
Benjamin Otte
43aeb52b73 Merge branch 'wip/muktupavels/gtk-status-icon' into 'gtk-3-24'
statusicon: Create pixbuf at correct size

See merge request GNOME/gtk!451
2018-12-13 16:40:43 +00:00
Daniel Boles
e3a1593a09 x11: Fix deprecation macro use
G_GNUC_END_IGNORE_DEPRECATIONS terminates the if statement and does not
consider the following block to be part of the if. So that block was
always taken irregardless of the pattern.

Fixes #1280
2018-12-13 17:22:22 +01:00
Timm Bäder
2a3c0ab841 Merge branch 'demo-combobox-typo-gtk3' into 'gtk-3-24'
demos/gtk-demo/combobox: fix typo

See merge request GNOME/gtk!446
2018-12-13 12:07:24 +00:00
Benjamin Otte
6a47e9a8b9 x11: Be a lot more careful about setting ParentRelative
We don't want to set ParentRelative when:

- the parent window is NULL
  In that case we are unsure about the depth, so better err on the side
  of caution and avoid a BadMatch by accepting ugly output.
- the cairo pattern is in an error status
  This should never happen - unless you start up in OOM - but better
  be safe than sorry.

Might help with the spurious crashes in #1280.
2018-12-13 05:28:54 +01:00
Daniel Boles
2905fc861a Revert "Fix deprecation warnings"
This reverts commit 5aedfe048b.

It had a typo that broke the build, only replaced half of the uses, and
replaced them with other functions that are also deprecated anyway.
2018-12-12 19:03:57 +00:00
Matthias Clasen
363df54e54 3.24.2 2018-12-12 13:35:04 -05:00
Matthias Clasen
38edc38f21 Skip GdkPixbuf in default-value tests 2018-12-12 13:35:04 -05:00
Matthias Clasen
b26cdd6d27 Update some a11y test results 2018-12-12 13:35:04 -05:00
Alberts Muktupāvels
31d896c5cf statusicon: Create pixbuf at correct size
Surface returned from gtk_icon_helper_load_surface can be smaller
then requested pixel size. This happens when icon is embedded in
panel that has bigger size then loaded pixbuf.
2018-12-12 19:55:20 +02:00
Matthias Clasen
5aedfe048b Fix deprecation warnings 2018-12-12 12:46:09 -05:00
Szunti
4c8fcd6a6f Add gdk_x11_display_get_parent_relative_pattern().
Fixes #1280, tray icons not drawing background. This is a magic pattern only
usable for gdk_window_set_background_pattern() that sets the underlying
X window's background to ParentRelative.
2018-12-12 02:56:35 +01:00
Jakub Steiner
4247fb606a Adwaita: revert all gnome 3.32 changes
- all changes now in wip/jimmac/gnome-3-32 branch
2018-12-10 20:23:22 +01:00
Emmanuele Bassi
403f4c9dae Merge branch 'issue1507' into 'gtk-3-24'
a11y: Check X11 display at runtime

See merge request GNOME/gtk!450
2018-12-10 16:39:12 +00:00
Olivier Fourdan
ffeacd5ae3 a11y: Check X11 display at runtime
`gtk_widget_accessible_grab_focus()` code checks that X11 isenabled at
build time and uses X11 specific functions such as
`gdk_x11_get_server_time()` regardless of the actual backend being used.

Check that we are using an X11 display when X11 is backend enabled, so
we do not crash when running on Wayland

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-10 17:09:42 +01:00
Jakub Steiner
f518adde90 Theme: add helper class names for Adwaita
- helps legibility of app icons

Addresses https://gitlab.gnome.org/GNOME/gtk/issues/1434
2018-12-10 14:16:52 +01:00
Jakub Steiner
fcecc761cb Adwaita: selected borders darker for :dark
- switches in particular looked undefined
2018-12-10 12:36:39 +01:00
Jakub Steiner
ecfdd186fe Adwaita: tone down $base_color saturation 2018-12-10 12:29:08 +01:00
Jakub Steiner
720bc7083c Adwaita: special case round buttons
- defining gradients outside of _drawing while Lapo isn't
  looking. Surely this will bite us in the future.
2018-12-10 12:19:09 +01:00
Jakub Steiner
ad7eeb7a23 Adwaita: gradient undershoots
- based on a patch by frederik.feichtmeier <frederik.feichtmeier@gmail.com>
  I'm certain this is something we had initially, but can't recall
  why we got rid of it for the more visually distracting dashed line.
  We can always revert when Lapo shows up and slams us with that broken
  use case. I'm guessing non-white bgs.

- So far it looks way less distracting than the dashed line
2018-12-10 11:57:13 +01:00
Chun-wei Fan
15935bb248 Merge branch 'win10-use-system-font' into 'gtk-3-24'
GDK W32: Always set gtk-font-name to the active UI font. Fixes #1484

See merge request GNOME/gtk!436
2018-12-10 06:20:34 +00:00
Jeremy Bicha
f535443da6 demos/gtk-demo/combobox: fix typo
Fix typo that prevented the P-S submenu from displaying correctly

(cherry picked from commit 462193ae26)
2018-12-09 23:31:59 -05:00
Matej Urbančič
f9a1453b94 Updated Slovenian translation 2018-12-09 21:26:10 +01:00
Charles Monzat
fcb1da0969 Updated French translation 2018-12-09 15:25:59 +01:00
John Ralls
46bee8b9fe Merge branch 'quartz-monitor' into gtk-3-24 2018-12-08 11:28:32 -08:00
Christoph Reiter
8797deb4b2 Visual Studio builds: update for gdk now using pangowin32. See !436 2018-12-08 14:17:34 +01:00
John Ralls
833ddc6e8d Silence enum type warning in 10.9. 2018-12-07 16:59:46 -08:00
John Ralls
9e212cd981 Prevent crash if display->touch_implicit_grabs is NULL. 2018-12-07 16:59:45 -08:00
John Ralls
5294c4f6f3 Fix crash if there are no grabs in place. 2018-12-07 16:59:45 -08:00
John Ralls
e786da9ca9 Complete GdkQuartzDisplay Implementation.
Changing FIXME on unneeded functions to X11-only where appropriate.
2018-12-07 16:59:45 -08:00
John Ralls
89c8c55fda Remove 2 unused functions. 2018-12-07 16:59:45 -08:00
John Ralls
eb2799cd7a Make _gdk_quartz_window_flush a no-op for MacOS 10.14 and later.
According to Apple's docs it's no longer necessary as Cocoa will notice
any changes and call drawRect as needed.
2018-12-07 16:59:45 -08:00
John Ralls
1165ab9d27 Replace deprecated gestalt for 10.10 and later.
It was deprecated in 10.8 but no replacement until 10.10.
2018-12-07 16:59:44 -08:00
John Ralls
ca6db9a79d Add compile-time check for NSGraphicsContext graphicsPort/CGContext.
Runtime check alone doesn't silence warning.
2018-12-07 16:59:44 -08:00
John Ralls
f30ed5ddc7 Fix Cocoa style and event constants for MacOS X 10.12 and later. 2018-12-07 16:59:44 -08:00
John Ralls
941f3c3887 Move the CGDisplayReconfigurationCallback to gdkdisplay-quartz.c.
Handling more flags, handling them correctly, and emitting the requisite
signals.

Change screen layout to use CGGetActiveDisplayList instead of NSScreens,
eliminating the latency between updating screens and recomputing the
root window.
2018-12-07 16:39:13 -08:00
John Ralls
9773b1951c Clean up some unused variables. 2018-12-07 16:39:13 -08:00
John Ralls
85f52dceaa Replace NSInputManager for MacOS 10.6 and later. 2018-12-07 16:39:13 -08:00
John Ralls
08b871fa51 Replace the deprecated GdkDisplayManager with GdkSeat. 2018-12-07 16:39:13 -08:00
John Ralls
28b8bbda45 Implement the GdkMonitor/GdkDisplay API.
Moving the initialization of the GdkQuartzMonitors to GdkQuartzDisplay from
the now-obsolete GdkQuartzScreen. Use QuartzDisplayServices for
monitor enumeration and to populate the GdkMonitor properties. This is
better aligned with acting on the Quartz Services callbacks for monitor
changes and with Cairo which also uses CoreGraphics for drawing.
2018-12-07 16:39:13 -08:00
John Ralls
cf279a14fa Don't attempt to dereference icon_theme until after checking it. 2018-12-07 16:39:12 -08:00
John Ralls
6ac81545ef Prevent crash from passing NULL style provider.
gtk_internal_return_val_if_fail operates only in debug mode,
quartz can call this with a NULL that crashes in
GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE.
2018-12-07 16:39:12 -08:00
John Ralls
4d0cae4468 Replace convertBaseToScreen & convertScreenToBase.
With convertPointToScreen & convertPointFromScreen when
MacOS version is > =10.7, when the earlier functions were
deprecated and replaced.
2018-12-07 16:39:12 -08:00
John Ralls
74aecac6fe Remove commented-out code copied from X11 implementation. 2018-12-07 16:24:58 -08:00
John Ralls
2b1c3fba96 Reorder virtual method assignments and fill in missing ones.
Makes auditing easier.
2018-12-07 16:24:58 -08:00
Jakub Steiner
239c95af47 Adwaita: buttons
- less dramatic gradient on the buttons
2018-12-07 18:20:57 +01:00
Iñaki Larrañaga Murgoitio
9c6c1641f1 Update Basque translation 2018-12-07 12:45:50 +00:00
Iñaki Larrañaga Murgoitio
0fbb32a6fa Update Basque translation 2018-12-07 12:44:34 +00:00
Jakub Steiner
a4f3021693 Adwaita: regenerate CSS
- for the previous patch
2018-12-07 12:04:17 +01:00
Jakub Steiner
f4d2cb0b08 Merge branch 'context_menus_gtk-3-24' into 'gtk-3-24'
GtkTheme: Menu border-radius and box-shadow changes

See merge request GNOME/gtk!439
2018-12-07 10:27:00 +00:00
Christoph Reiter
9e7cc89f4a GDK W32: Always set gtk-font-name to the active UI font. Fixes #1484
This makes apps use "Segoe UI 9" by default instead of whatever matches "Sans 10".
It also cleans up the code and uses some new pango API while at it.

This was previously disabled in 9e686d1fb5 because it led to a poor glyph coverage
on certain versions of Windows which don't default to "Segoe UI 9" (Chinese, Korean, ..)
because the font fallback list was missing in pango.

This is about to get fixed in https://gitlab.gnome.org/GNOME/pango/merge_requests/34
so enable it again when we detect a new enough pango version.
2018-12-07 09:32:14 +01:00
Jakub Steiner
152b89e812 Adwaita: lower selection border contrast
- to mimic what happened to regular borders
2018-12-07 00:58:58 +01:00
frederik.feichtmeier
1d90c72f44 Menu border-radius and bos-shadow changes
- introduce $menu_radius
- use it for menus and context-menus
- use the popover box-shadow also for menus
- use padding for menus to avoid edge overlapping
- remove the background for menus to avoid bleeding out of the round edges
2018-12-06 22:49:38 +01:00
Carlos Garnacho
e416aebe5f imwayland: Respect maximum length of 4000 Bytes on strings being sent.
Hitting the limit will raise protocol errors.
2018-12-06 20:10:47 +01:00
Jakub Steiner
5e127cff12 Adwaita: buttons & headerbar tweaks
- tone down the button z-depth
- flatter headerbars
2018-12-05 16:19:46 +01:00
Daniel Boles
b0fdaf3bf0 Box, Grid: Improve various bits of documentation
Issue #1495 showed that the docs of GtkGrid retain outdated implications
that (as was once, but is no longer, the case) it is intended to replace
GtkBox, by discussing HfW and widget properties in a way that suggests
GtkBox can't handle them. But of course it does, and it's preferable for
simple single-row/column cases. Worse, we said GtkGrid “provides exactly
the same functionality” for the latter case, but the original point of
that Issues was that it doesn’t, at least for CSS positional selectors!

Box:
• Use an actually meaningful @Short_description.
• Remove unhelpful @See_also references to unrelated containers.
• Remove references to “rectangular area”: it might be another shape
  via CSS, or “rectangular” might falsely imply 2 dimensions of children.
• Mention Orientable:orientation.
• Emphasise usefulness of :[hv]align for allocating in the other axis.
• Don’t say that Grid “provides exactly the same functionality” for a
  single row or column, since (A) it is overkill for that case and (B)
  said Issue proved that it *doesn’t* for CSS child order, for example.
• Note in the child properties that are remove in master that we have
  better, preferred alternatives available now in GtkWidget/CSS props.
  There’s no nice way to deprecate these, though they’re gone in GTK+ 4.
• Correct a copy-paste-o from the blurb of :expand to :fill.

Grid:
• Remove references to deprecated widgets: GtkTable and Gtk[HV]Box.
• Don’t dwell on widget properties and height-for-width in a way that
  wrongly implies that Box can’t handle those (or Grid can better). In
  fact, just get rid of that bit altogether: Box handles them fine, and
  Table is so old as to be not worth mentioning (in anything except the
  2 => 3 migration guide) and points to Grid in its deprecation notice.
• Point to GtkBox as being preferred for the simple row/column use case.
2018-12-04 20:45:07 +00:00
Matthias Clasen
b74e3209a5 emoji chooser: Actually force Emoji presentation
The previous commit was using the text presentation selector
instead of the Emoji one. Oops.
2018-12-03 21:47:09 -05:00
Christoph Reiter
2de5572076 Merge branch 'win32-fontconfig-defaults' into 'gtk-3-24'
GDK W32: set default settings for fontconfig

See merge request GNOME/gtk!437
2018-12-01 16:02:51 +00:00
Christoph Reiter
5a23c0f038 GDK W32: set default settings for fontconfig
Enables hinting, antialiasing and set the subpixel orientation according to the
active clear type setting. This ensures that font rendering with the fontconfig backend
looks similar to the win32 backend, at least with the default system font.
2018-12-01 10:43:53 +01:00
Matthias Clasen
aac38198a3 Force emoji presentation
Append a variation selector to the Emoji sequences,
to force Emoji presentation. Without this, some
Emoji come out with text presentation by default.

Closes: Pango #334
2018-11-30 16:39:07 -05:00
Jakub Steiner
be75460913 Adwaita: updated switch control
- might be nasty to hide labels with CSS. We can fix properly later.
- the blue border seesm aliased when :checked
2018-11-30 20:53:13 +01:00
Jakub Steiner
ea7a7e0425 Adwaita: shade buttons
- it was a bit too flat
2018-11-29 21:54:56 +01:00
Jakub Steiner
e68e75c34c Adwaita: unbreak icon-shadow again
- Somehow I keep messing this one up

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1456
2018-11-29 20:49:43 +01:00
Jakub Steiner
8e3541b28f Adwaita: active state for dark buttons
- was a bit too light. Tricky to tell which is pushed when
  you have two stackswitcher buttons.
2018-11-29 20:21:58 +01:00
Jakub Steiner
9a8f92f068 Adwaita: button tweaks
- step back on toning down the borders. Flatness !> legibility.
- darker active state for light
- draw gradinets from bottom up, to keep px sized shading regardless
  of button size.
2018-11-29 20:18:08 +01:00
Jakub Steiner
4cceccd129 Adwaita: headerbar backdrop state 2018-11-29 14:35:57 +01:00
Jakub Steiner
96f0b541bb Adwaita: sync headerbar styling for devel mode 2018-11-29 13:14:09 +01:00
Jakub Steiner
a386bc98d7 Adwaita: flatten the headerbar again 2018-11-28 20:27:44 +01:00
Jakub Steiner
9b9b15c1a0 Adwaita: tune button & hederbar colors 2018-11-28 14:17:37 +01:00
Jakub Steiner
00556bd6cb Adwaita: buttons & headerbars
- tone down the bottom border contrast (increase bottom lightness,
  decrease overall lightness)
- darken headerbars slightly (might require darkening wm colors when
  dust settles)
2018-11-28 00:19:25 +01:00
Matthias Clasen
1dd0b8e6aa Merge branch 'escape-included-svg' into 'gtk-3-24'
(#1471): base64-encode included SVGs to avoid mis-escaped characters

See merge request GNOME/gtk!429
2018-11-27 18:59:13 +00:00
Federico Mena Quintero
3312d78863 (#1471): base64-encode included SVGs to avoid mis-escaped characters
We wrap SVG data from icons within another SVG with extra styling
information.  The wrapped SVG may contain characters that cannot be
part of a data: URL (https://fetch.spec.whatwg.org/#data-urls).

Librsvg 2.45 got more strict in its parsing of data: URLs; whereas
previously it ignored '#' characters in them, now it considers them to
be the start of a fragment identifier, which is not allowed in data:
URLs anyway.

To avoid unallowed characters, we now create a data: URL with a
base-64 encoded SVG.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1471
2018-11-27 12:13:31 -06:00
Jakub Steiner
0271471b81 Adwaita: app icon shadow fix
- of course I'd miss the _ to - change
2018-11-26 17:31:19 +01:00
Jakub Steiner
ffde7d780d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-26 17:29:17 +01:00
António Fernandes
bb3653ad7d placesview: List only available protocols as available
We display a list of supported protocols in the server_addresses_popover.

However, this curated list contains protocols which may or may not be
available, depending on the respective gvfs backend being installed.

So, populate the list only with protocols which are available.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-11-26 12:43:39 +00:00
António Fernandes
4bdf968702 placesview: Set .error style if unsupported protocol
When the user types an address with a schema that is not supported,
the Connect button doesn't become sensitive, but there is no visible
feedback at all.

This feels unresponsive and leaves the user clueless.

While it doesn't help explain why the address doesn't work, this will
provide a hint that the input was acknowledged but doesn't work.

https://gitlab.gnome.org/GNOME/gtk/issues/1476
2018-11-26 12:41:55 +00:00
Christoph Reiter
d48c95a562 Merge branch 'win32-remove-scroll-multiplier' into 'gtk-3-24'
win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408

See merge request GNOME/gtk!426
2018-11-24 09:33:35 +00:00
Christoph Reiter
83204dd882 win32: Don't multiply the scroll event deltas by the Windows scroll lines setting. See #1408
GTK widgets expect the scroll deltas to be 1 or -1 and calculate a scroll value from that.
Multiplying the delta by the Windows scroll line setting (which defaults to 3) results
in a much larger delta and vastly different behaviour for running a GTK app on Windows
vs on Linux. For example text view and tree view scroll by 9 lines per scroll wheel tick
per default this way while on Linux it is around 3.

Remove the multiplication for now.
2018-11-24 10:24:27 +01:00
Jakub Steiner
a139b63304 Adwaita: tone down borders, buttons
- very contrasty lines feel dated in today's flat world
- tone down the contrast a little
2018-11-23 17:37:00 +01:00
Jakub Steiner
f968fdf3a1 Adwaita: list buttons
- tone down buttons when inside lists

Fixes issue #1473
2018-11-22 13:20:10 +01:00
Timm Bäder
91129be95c Merge branch 'emit-transient-for' into 'gtk-3-24'
window: Actually emit notify::transient-for

See merge request GNOME/gtk!425
2018-11-21 06:31:23 +00:00
Zander Brown
b150699510 window: Actually emit notify::transient-for
Because it seems we weren't doing that
2018-11-20 15:32:40 +01:00
Benjamin Berg
356f1f59ae container: Document that removal from foreach is permissible
It is permissable to remove a widget using gtk_container_remove from the
gtk_container_foreach callback handler. Document this fact to make it
more discoverable.

Fixes #1461
2018-11-19 18:39:58 +00:00
Timm Bäder
0040b256fe Merge branch 'gdk-cursor-new-deprecated-for' into 'gtk-3-24'
gdk: Add deprecated for macro for gdk_cursor_new

See merge request GNOME/gtk!416
2018-11-19 08:04:48 +00:00
Timm Bäder
5e78646256 Merge branch 'more-nullable-gtk3' into 'gtk-3-24'
g-i: Add some nullable annotations

See merge request GNOME/gtk!420
2018-11-19 07:40:41 +00:00
Christoph Reiter
31b810abca g-i: Add some nullable annotations
Based on grepping arg docs for NULL.
See https://gitlab.gnome.org/GNOME/pygobject/issues/261
2018-11-18 13:40:24 +01:00
Robert Ancell
dea9525f68 gdk: Add deprecated for macro for gdk_cursor_new 2018-11-17 21:23:40 +13:00
Timm Bäder
446cb9a217 Merge branch 'fix-issue-1366' into 'gtk-3-24'
entry: Handle no-window events in gtk_entry_event

See merge request GNOME/gtk!363
2018-11-15 10:03:19 +00:00
Timm Bäder
e8a8a534ac Merge branch 'bye-app-menu-gtk3' into 'gtk-3-24'
widget-factory: move app menu contents to primary menu

See merge request GNOME/gtk!364
2018-11-15 10:01:13 +00:00
Jakub Steiner
06162a08b6 Adwaita: tone down purple cast
- sync with gtk4 changes
2018-11-14 17:52:37 +01:00
Jakub Steiner
b57a1a0b92 Revert "Adwaita: help fullcolor app icons"
- the app icon dropshadow patch was not meant to be part of the color changes

This reverts commit a8a545510d.
2018-11-14 17:32:41 +01:00
John Ralls
bb376222c1 Reset the Quartz resolution to 72.0 dpi.
Further feedback on https://bugzilla.gnome.org/show_bug.cgi?id=787867
indicates that 96.0 dpi scales fonts 4/3 larger than native applications.
2018-11-14 09:02:45 +09:00
Ignacio Casal Quinteiro
a3744d4761 gtkclipboard-quartz: remove unused variable 2018-11-13 15:39:17 +01:00
Matthias Clasen
d21832719b wayland: Adapt to settings portal api change
ReadAll now accepts an array of patterns.
2018-11-12 14:10:13 -05:00
Timm Bäder
0d8dcccad2 Merge branch 'wl-framework' into 'gtk-3-24'
Use -Wl for the framework linker argument

See merge request GNOME/gtk!405
2018-11-12 08:56:49 +00:00
Jakub Steiner
6f2b0cfcf3 Adwaita: use HIG grey for bg_color
- refresh with a light bg color, use the new color palette
2018-11-09 15:57:06 +01:00
Jakub Steiner
5a12934e90 Adwaita: fix osd bg color
- don't try deriving from bg_color, osd should be consistent
  for light & dark.

FIxes issue #1449
2018-11-09 11:30:21 +01:00
Cheng-Chia Tseng
4902070cad Update Chinese (Taiwan) translation 2018-11-09 09:03:56 +00:00
Adrien Plazas
f0e5b5bf88 Adwaita: Propagate bg color to titlebar separator descendants
Gives the same background color to all separators descending from a
title bar than to its direct childrens.

This prevents separators which are in a titlebar but not direct children
from the widget with the titlebar style class from being almost
transparent and hence it prevent them from revealing the clear color of
the window's titlebar (black).

https://gitlab.gnome.org/GNOME/gtk/issues/1231
2018-11-09 08:51:43 +01:00
Matej Urbančič
f74154d5a1 Updated Slovenian translation 2018-11-09 08:47:33 +01:00
Matej Urbančič
333f496ad5 Updated Slovenian translation 2018-11-09 08:47:33 +01:00
Pieter Schalk Schoeman
4c348e5486 Update Afrikaans translation 2018-11-09 08:47:33 +01:00
Jakub Steiner
7034ab269f Merge branch 'wip/jimmac/hig-colors' into 'gtk-3-24'
Adwaita: use new HIG colors (gtk3)

See merge request GNOME/gtk!408
2018-11-09 07:23:46 +00:00
Timm Bäder
f972ab8818 Merge branch 'plug_race' into 'gtk-3-24'
Fix race in GtkPlug window creation

See merge request GNOME/gtk!387
2018-11-08 04:49:25 +00:00
Daniel Boles
ec1786fdbc Popover: Minimally document the ::closed signal
This is better than nothing at all. The wording is taken from Carlos's
commit message when he added this shortly before 3.12, so add Since too.
Skip the bit from his commit message explaining what this replaced; we
don't need to say all the less good things our convenience API replaces.
2018-11-07 20:32:34 +00:00
Daniel Boles
08bafb4a52 TreeMenu: Don't manually reinvent g_list_index()
g_list_index() "Gets the position of the element containing the given
data (starting from 0)." That is exactly what we were manually doing.
2018-11-07 20:31:45 +00:00
Timm Bäder
009c256991 Merge branch 'cherry-pick-9946dd2a' into 'gtk-3-24'
gtk-autocleanups: add cleanup function for GtkRecentInfo

See merge request GNOME/gtk!410
2018-11-06 09:52:23 +00:00
Matthias Clasen
8ef21cb32f wayland: Fix a thinko in settings portal support
When we decide to fall back because the settings portal
is not present, adhere to that decision elsewhere.
2018-11-05 18:34:57 -05:00
Marco Trevisan
4048a1965a gtk-autocleanups: add cleanup function for GtkRecentInfo
(cherry picked from commit 9946dd2ab7)
2018-11-05 21:39:35 +00:00
Jakub Steiner
39645ab6f0 Adwaita: use new HIG colors
- blue selection color, success & destructive colors updates
- blueish tint for dark

Addresses issue #1443
2018-11-05 16:10:50 +01:00
Jakub Steiner
a8a545510d Adwaita: help fullcolor app icons
- draw a large dropshadow for aboutboxes
- draw an outline for low res

See issues #1434 and #1445.
2018-11-05 15:03:11 +01:00
Simon Wells
382ba0ca83 Use -Wl for the framework linker argument 2018-11-05 20:11:30 +13:00
Matthias Clasen
64427e9878 Merge branch 'settings-portal-for-3' into 'gtk-3-24'
Settings portal for 3

See merge request GNOME/gtk!404
2018-11-04 21:13:33 +00:00
Matthias Clasen
41562ab2c6 wayland: Support the settings portal
Under Wayland, we are currently directly using GSettings
for desktop settings. But in a sandbox, we may not have
access to dconf, so this may fail. Use the new settings
portal instead.
2018-11-04 15:50:16 -05:00
Matthias Clasen
4073d0217b Add a gdk_should_use_portal helper
We are going to use this in the following commits.
2018-11-04 08:20:52 -05:00
Matthias Clasen
fb709e96f1 Use a simpler sandbox check
No need to use the runtime dir and allocate a string.
We can just check in /.
2018-11-04 08:20:11 -05:00
Dušan Kazik
d6dedf5270 Update Slovak translation 2018-11-02 08:54:03 +00:00
Dušan Kazik
40400373e1 Update Slovak translation 2018-11-02 08:51:12 +00:00
Dušan Kazik
1837ae88f7 Update Slovak translation 2018-11-01 17:51:10 +00:00
Daniel Mustieles
8c5158a54e Updated Spanish translation 2018-10-31 13:50:01 +01:00
LRN
d45537a743 Merge branch 'win32-honest-clipboard' into 'gtk-3-24'
GDK W32: be more honest about clipboard format support

See merge request GNOME/gtk!382
2018-10-31 05:13:18 +00:00
Carlos Garnacho
336f382728 imwayland: Plug leaks
The various strings (pending/current preedit, surrounding, and commit
buffer) are being leaked in the case of GtkIMContext destruction.
2018-10-30 22:00:07 +01:00
John Ralls
9c6cf4acab Fix indentation. 2018-10-29 14:25:31 -07:00
John Ralls
60dafa38c7 Merge branch '1411-handle-null-from-nsgraphicscontex' into gtk-3-24. 2018-10-29 11:32:10 -07:00
Matej Urbančič
d483c0a05b Updated Slovenian translation 2018-10-25 22:07:50 +02:00
Carmen Bianca BAKKER
041ac5b45a Update Esperanto translation 2018-10-24 08:12:34 +00:00
Jakub Steiner
c1dbf96413 Adwaita: prevent devel styling break selection mode
- Selection mode does not get the special devel styling.

    - removed teh last-child() selector for it doesn't work anymore.
      Better style all section of the headerbar than none. Proper fix pending.
2018-10-22 10:41:41 +02:00
John Ralls
7e4cda6c1c GdkQuartz: Handle NULL from [NSGraphicsContext currentContext].
By returning a default surface. The situation where there's no
currentContext arises when GtkCSS is trying to determine the
layout sizes so no actual display is necessary.

Closes: #1411
2018-10-20 12:31:25 -07:00
John Ralls
7600c4e3f7 Modify Quartz gtk_drag_begin_internal to match 4172138. 2018-10-20 12:26:13 -07:00
John Ralls
35d798dd31 Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite. 2018-10-19 16:49:00 -07:00
John Ralls
0e831b774c Update GDK_OSX versions to current MacOS release. 2018-10-19 16:48:59 -07:00
Ignacio Casal Quinteiro
615fa7cfb6 Merge branch '379-fix-quartz-offscreen-window-crash' into 'gtk-3-24'
Resolve "gtkdnd-quartz crash when realizing a GtkOffscreenWindow"

See merge request GNOME/gtk!145
2018-10-19 06:11:51 +00:00
Philip Chimento
df0e5cc8e6 quartz: Fix crash when realizing GtkOffscreenWindow
GtkOffscreenWindow doesn't have a NSView or NSWindow, so return NULL if
passed one of those.

Closes: #379
2018-10-19 05:38:28 +01:00
Dorota Czaplejewicz
28ac1a2cba imwayland.c: fix formatting 2018-10-17 12:51:07 +00:00
Matthias Clasen
00034c00be Merge branch '1371-flickering-tooltips-if-no-mouse-cursor-theme-loaded-gtk3' into 'gtk-3-24'
Tooltip: Fix the used cursor size if 0 in Settings

See merge request GNOME/gtk!374
2018-10-16 23:20:25 +00:00
Matthias Clasen
c0b5d66069 Merge branch '1397-gtknotebook-built-in-popup-menu-listing-tabs-doesn-t-use-tab-label-text-for-the-last-tab' into 'gtk-3-24'
Notebook: Ensure menu label updates with tab_label

See merge request GNOME/gtk!385
2018-10-16 20:52:04 +00:00
Benjamin Otte
2453e71fd3 Merge branch 'win32-fix-dnd-info-disposal' into 'gtk-3-24'
Fix DND info disposal

See merge request GNOME/gtk!390
2018-10-16 19:41:03 +00:00
Руслан Ижбулатов
4172138154 DnD: fix setting icon in drag-begin
Commit 1c96b703 changed the way icon
information is given to DnD. Previously an icon helper was kept at
the drag source site. Now an image definition is stored there.
The difference is that icon helper is an object that changes its
state in response to an icon being set, thus the object survived
multiple icon changes. Whereas image definition is destroyed and
re-created from scratch every time a drag icon is changed.
This created a problem where gtk_drag_begin_internal() would receive
the value of site->image_def when a drag just began, then it emits
"drag-begin" signal, in response to which an application can
set drag icon, changing the value of site->image_def. However,
gtk_drag_begin_internal() is unable to know about that change and
continues to use the old value it received from up the stack.

Not only does it prevent drag icon from being set from "drag-begin",
it also can induce a crash, since the old image_def value used
by gtk_drag_begin_internal() points to a freed memory region.

Fix this by only setting a default icon (which is created in-place)
in gtk_drag_begin_internal() if the caller does not care about icons.
Otherwise gtk_drag_begin_internal() will return a boolean that indicates
whether an icon needs to be set. Then the caller can invoke
gtk_drag_set_icon_definition() to set the icon, if needed.

Fixes #1407.
2018-10-16 19:04:54 +00:00
Dorota Czaplejewicz
3d6510329f imwayland: rearrange functions to remove prototypes 2018-10-16 16:38:24 +00:00
Dorota Czaplejewicz
c477201afc imwayland: Handle enter and leave events
Before this patch, imwayland would assume that text-input enter and leave events follow the general (wl_keyboard) focus, and was unable to handle the situation where they would not be provided at the same time.
2018-10-16 16:29:08 +00:00
Руслан Ижбулатов
5e00fd25da Fix GtkDragSourceInfo disposal
gtk_drag_clear_source_info() immediately unrefs the info attached
to the context (the very same info we're in the process of destroying
in gtk_drag_source_info_free()). If that reference was the last one,
then accessing the info object after that is a use-after-free error.
Also, change the order a bit to first free the event, and only then
unref the context.

Fix this by copying all the fields of the info that we need, and
then working with these copies.
2018-10-16 03:07:13 +00:00
LRN
05b11e9a5b Merge branch 'lrn/zorder-324' into 'gtk-3-24'
Don't let the OS maintain relative Z-order for windows

See merge request GNOME/gtk!196
2018-10-15 22:36:30 +00:00
Uli Schlachter
9ca38c4647 Fix race in GtkPlug window creation
According to the XEmbed specification, a window should be created
"elsewhere" and then reparented into the target parent window. Instead,
GTK+ creates the window directly in desired target parent window. This
allows some races to occur.

Another program that does not follow XEmbed is tabbed. XEmbed requires
an _XEMBED_INFO property on the to-be-embedded window, but tabbed does
not check for this property. Thus, as soon as GTK+ creates its window,
tabbed starts managing this window and now GTK+ setting up the window
races with tabbed starting to manage the window.

If tabbed is fast enough to map the window, GTK+ never sees a MapNotify
event, because it did not yet select StructureNotifyMask on its window.
This results in a black window inside of tabbed.

Note that this cannot really be fixed in tabbed, since XEmbed says that
the _XEMBED_INFO property must be already present when the window
appears. Thus, patching tabbed to wait for _XEMBED_INFO to appear is not
something that the spec requires/allows.

Instead, this commit changes GTK+ so that it directly sets the right
event mask when the window is created. This means that there is no more
race between tabbed mapping the window and GTK+ selecting
StructureNotifyMask.

Note that the proper fix would be to do as XEmbed requires: Create the
window elsewhere and then reparent it into the target window. However,
that would require a more invasive patch, so this commit only takes the
"easy approach" of fixing this one race. Hopefully, all the other races
that can occur during window setup are harmless, because the
embedder/socket will hopefully watch for PropertyNotify events as
needed.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/757
See-also: https://github.com/awesomeWM/awesome/issues/2385
Signed-off-by: Uli Schlachter <psychon@znc.in>
2018-10-14 14:01:25 +02:00
Timm Bäder
dbbc7b3859 emojichooser: Pass chooser to add_emoji
https://gitlab.gnome.org/GNOME/gtk/issues/1398
2018-10-13 14:01:08 +01:00
Daniel Boles
2856fb86a9 Adwaita: Regenerate CSS for new window.devel style
Commit 955aa8d54b forgot this, again.
2018-10-12 23:55:02 +01:00
Daniel Boles
80a3d7090a Notebook: Ensure menu_label updates with tab_label
This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
buildable_add_child() calls set_tab_label(), but the latter did nothing
to update the menu_label corresponding to that tab with the new text.
Using Builder to populate the tab child, only tabs other than last got
the right non-default labels, and even that was mostly coincidental, as
adding the main child called update_labels() via real_insert_page(), so
it took effect when the 2nd last main child is added, updating the rest
but leaving the last with the default label, not that given in Builder.

Fix by factoring out the code from child_reordered() to a new helper
menu_item_recreate() and calling that in set_tab_label(), so that
whenever the tab_label is updated, so is its corresponding menu_label.

This fixes the reported case and presumably others that we could write.

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1397
2018-10-12 23:49:29 +01:00
Daniel Boles
82c5308947 Notebook: Don't notify 2x from set_tab_label_text
It calls set_tab_label(), which already does that.
2018-10-12 23:38:52 +01:00
Daniel Boles
d9f08c85f4 gtk-demo/main: Suppress implicit fallthru warning
Comments matched to reassure the compiler that fallthrough is
intentional are supposed to precede the case or default keywords, at
least in GCC, so the one here did not suppress the warning with GCC. We
can just the if condition and put the comment at the end to solve that.

https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
2018-10-12 22:09:42 +01:00
Ignacio Casal Quinteiro
247b38eb42 Merge branch 'fix-crash-osx' into 'gtk-3-24'
quartz: do not cache the screen in the gdkmonitor

See merge request GNOME/gtk!375
2018-10-11 20:45:49 +00:00
Ignacio Casal Quinteiro
2a392c220d quartz: do not cache the screen in the gdkmonitor
Instead we just cache the monitor number and get
out of it the nsscreen when it is needed. This is
a requirement since it nsscreen it is not supposed
to be cached.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1312
2018-10-10 12:44:29 +02:00
Jakub Steiner
955aa8d54b Adwaita: backport nightly styling
- nightly apps get a headerbar styling
2018-10-10 09:38:50 +02:00
LRN
caa5ba46ad Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
gtkimcontextime.c: Fix Korean input

See merge request GNOME/gtk!356
2018-10-08 20:04:08 +00:00
Chun-wei Fan
1ece556200 gtkimcontextime.c: Fix Korean input
Commit c255ba68 inadvertently introduced a regression that broke Korean
text input because the changes there resulted that only the last input
string that we have from ImmGetCompositionStringW() for each time the
commit signal is emitted is kept, and also as a result the final Korean
character that is input by hitting space is also lost as a result, as we
didn't check for whether we are done with preediting.

Fix these issues by doing the following when we receive the
WM_IME_COMPOSITION message with GCS_RESULTSTR from Windows:
-Do not emit the commit signal during WM_IME_ENDCOMPOSITION, and...
-Emit the commit signal anyways, as we did before, c255ba68, however...
-We still save up the string to commit, because we need to re-compute
 the cursor position when we do ->get_preedit_string(), which needs to
 take the GCS_RESULTSTR string we get from WM_IME_COMPOSITION into
 account as well, so that we avoid getting the Pango criticals that
 occur during Chinese (and most likely Japanese) input as the cursor
 position is out-of-range.

Fixes issue #1350.
2018-10-08 15:55:44 +08:00
Hugo Lefeuvre
adbaee796d gtkstack: fix null pointer dereference
The gtk_stack_snapshot_slide() function dereferences the
last_visible_child pointer without proper != NULL ckeck. This might
result in NULL pointer dereference and crash if last_visible_child is
invalid.

Add a != NULL check before dereferencing the pointer.

cherry-picked from https://gitlab.gnome.org/GNOME/gtk/merge_requests/361
2018-10-07 18:31:03 +01:00
Daniel Boles
9b7d886b72 Tooltip: Fix the used cursor size if 0 in Settings
Before the recent rework of positioning in GtkTooltip, the widget always
used the cursor_size of the GdkDisplay. That work redid this to instead
take GtkSettings::gtk-cursor-theme-size. But that property's doc says:

> Size to use for cursors, or 0 to use the default size.

and has 0 as its default. This is quite a likely scenario for anyone
whose desktop or settings.ini does not explicitly provide a cursor size,
which is the case for XFCE and win32, to name just two common platforms.

Then, it seems getting a cursor_size of 0 causes GtkTooltip to freak out
and hide/show itself at a very rapid speed, thus making it unusable.

So, we should check whether the Settings return 0 and, if so, still use
gdk_display_get_default_cursor_size (display) to ensure we get a size.

https://gitlab.gnome.org/GNOME/gtk/issues/1371
2018-10-07 18:26:30 +01:00
Aurimas Černius
b10cde7bdc Updated Lithuanian translation 2018-10-07 16:56:11 +03:00
Руслан Ижбулатов
885672520a gtkselection: add a W32 tip about image/bmp support 2018-10-07 12:23:16 +00:00
Руслан Ижбулатов
f0959c9c8d GDK W32: Be honest about supported clipboard formats
Do not lie to W32 about the formats that we provide or accept.

Originally the logic behind such lies was that GdkPixbuf allows
us to convert any supported image to BMP or PNG, and therefore
we should announce that we always provide/accept BMP and PNG along
with other formats.

But that's not how it works. The conversion between formats happens
at GTK level in GtkClipboard or, if GtkClipboard is not used, with
gtk_target_list_add_image_targets() to announce all supported image
formats, and with gtk_selection_data_set_pixbuf() to convert from
any GdkPixbuf formats to the format requested by the selection, and
with gtk_selection_data_get_pixbuf() to convert from the selection
format to GdkPixbuf, if supported.

GDK simply does not play any role in this. Therefore W32 GDK backend
should only offer formats that it can actually do conversion for
by itself (such as image/bmp <-> CF_DIB,
or text/uri-list <-> CFSTR_SHELLIDLIST).
2018-10-07 12:15:41 +00:00
LRN
259c8e6373 Merge branch 'win32-runtime-immodule-swap' into 'gtk-3-24'
GDK W32: Support switching input modules at runtime

See merge request GNOME/gtk!366
2018-10-06 15:52:52 +00:00
Руслан Ижбулатов
d26c11f099 GDK W32: Support switching input modules at runtime
This leverages the normal input module switching mechanism in GTK
by making it think that the gtk-im-module setting changed.
The backend returns gtk-im-module value as "ime" if W32
IME API says that an IME is in use. Otherwise it returns
and empty string - this still triggers an input module
loading code, which, not being able to load the desired module
(which is and empty string), falls back to looking at current
keyboard layout.

Paired with the code that signals gtk-im-module change on keyboard layout
switches, this is sufficient to make GTK capable of loading appropriate
input modules at runtime. At least, the kinds of modules that specify
languages for which they are loaded automatically by default, and the
IME module.

Loading other kinds of input modules might still work via specifying
the gtk-im-module setting in gtk ini file, but doing so will likely
make GTK incapable of loading the IME input module that is used
for Korean, Chinese and Japanese (and some other languages).

Until someone figures out a way to actually change gtk-im-module
setting on Windows at runtime with meaningful values, the behaviour
introduced by this commit seems like a sufficient workaround.
2018-10-06 12:44:24 +00:00
Yi-Jyun Pan
220f77d8c1 Update Chinese (Taiwan) translation 2018-10-03 14:24:30 +00:00
Jeremy Bicha
4f424d0ead widget-factory: Add Keyboard Shortcuts menu item
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/916
2018-09-30 20:50:51 -04:00
Jeremy Bicha
5a78039ab3 widget-factory: Rename About menu item to About Widget Factory
This follows the recommendation in
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
2018-09-30 20:50:49 -04:00
Jeremy Bicha
9882bc9638 widget-factory: Move app menu contents to primary menu
GNOME Shell 3.32 will remove support for the app menu
so we need to move its contents to the primary (hamburger)
menu.

widget-factory already had a primary menu.

The only item in the app menu was About.

https://gitlab.gnome.org/GNOME/Initiatives/issues/4
2018-09-30 20:50:48 -04:00
Alex Monday
bbcc832393 Adwaita: Horizontal OSD spinbutton entry fix
Add placeholder to hande horizontal spinbutton entries,
add instructions for horizontal OSD spinbutton entry to use this
placeholder.
2018-09-30 23:26:20 +05:00
Carlos Garnacho
c8d47b0c84 imwayland: Collect return value from ::delete-surrounding signal
There's not much we can do about the signal not being handled, but
we should fetch the return value anyway.
2018-09-28 18:05:53 +02:00
Andrea Azzarone
2e24349fc6 entry: Handle no-window events in gtk_entry_event
gtk_entry_event's goal is to detect if a specific event concerns one of the two
entry icons. It can happen that this function is called during initialization
and/or before the entry is realized. In this case the entry icons (and the
event) will not yet have an associated window. The code should consider the
aforementioned situation and avoid matching a icon and an event with no
associated windows.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1366
2018-09-27 14:19:34 +02:00
Michael Catanzaro
b4464e1274 wayland: Avoid crashes inside wl_proxy_marshal()
Suggested by Garnacho. Hopefully fixes #1349.

Note: I'm riskily committing this via web UI not because I'm lazy
(though I am :) but because I'm seeing a weird host key when I try to
push or pull from GitLab.
2018-09-24 20:19:26 +00:00
Rafael Fontenelle
41f2815e20 Update Brazilian Portuguese translation 2018-09-24 19:48:20 +00:00
Benjamin Otte
4ef082d2ed Merge branch 'wip/arnaudb/fix-dashed-border' into 'gtk-3-24'
Make dashed border-style work correctly

See merge request GNOME/gtk!349
2018-09-24 18:21:02 +00:00
Daniel Boles
ed57e564a9 SidebarRow: Set ::no-show-all on end_icon_widget
All the other conditionally visible child widgets have this. Without it,
it seems some cases can wrongly reveal it, with a nonsensical home icon.

https://gitlab.gnome.org/GNOME/gtk/issues/1345
2018-09-22 19:57:59 +01:00
Arnaud B
0feebcf145 Make dashed border-style work correctly
There’s a short-path done for focus rectangles, but it can be taken in other conditions, and then fail occasionally to render a dashed line if the border-width is too big.
2018-09-21 12:25:23 +00:00
Emin Tufan Çetin
36656ea13a Update Turkish translation 2018-09-19 11:09:51 +00:00
Matthias Clasen
f5ad1786e8 3.24.1 2018-09-18 21:42:55 -04:00
Stas Solovey
ac41c3895f Update Russian translation 2018-09-18 20:09:23 +00:00
LRN
d7cf221d8a Merge branch 'win32-scroll-both' into 'gtk-3-24'
GDK W32: send both smooth and discrete scrolling events

See merge request GNOME/gtk!335
2018-09-18 13:50:29 +00:00
Carlos Garnacho
6183f48ab3 Merge branch 'imwayland_serial' into 'gtk-3-24'
imwayland: Don't reset serial while text-input is alive

See merge request GNOME/gtk!339
2018-09-17 13:19:58 +00:00
Dorota Czaplejewicz
af46ba27cc imwayland: Don't reset serial while text-input is alive
The serial number is a persistent property of the text-input object.
2018-09-14 20:33:38 +00:00
Matthias Clasen
8fd2d461fc gtk_application_inihit: allow no reason
We document this argument as nullable, so treat it as such.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1327
2018-09-13 23:32:45 -04:00
Eduard Braun
46dfd139ef GDK W32: fix direction of horizontal smooth scrolling events
Commit 359df028be changed the
code to send GDK_SCROLL_SMOOTH with deltas instead of
GDK_SCROLL_(UP|DOWN|LEFT|RIGHT).

Windows defines deltas inversed for vertical direction
(positive values mean the wheel was turned forward)
but not for horizontal direction
(positive values mean the wheel was turned towards the right).

This commit fixes behavior as both axes were inverted previously.
2018-09-13 19:30:41 +00:00
Rūdolfs Mazurs
86751c4a25 Update Latvian translation 2018-09-13 15:30:28 +00:00
Matthias Clasen
b1d3beedc3 Add a missing include
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1325
2018-09-12 23:02:26 -04:00
Matthias Clasen
f393d371e5 Merge branch 'wip/carlosg/issue-1317' into 'gtk-3-24'
modules: Check current context before retrieving surrounding

See merge request GNOME/gtk!326
2018-09-13 01:40:58 +00:00
Matthias Clasen
7d1d5119de Merge branch 'clear_preedit_fix' into 'gtk-3-24'
imwayland: Fix clearing of preedit text

See merge request GNOME/gtk!329
2018-09-13 01:32:11 +00:00
Matthias Clasen
7a404c32b5 Merge branch 'gtk-3-24-fix-glib-dep' into 'gtk-3-24'
gtk-3-24: build: Raise glib dependency for unicode 10.0 script names

See merge request GNOME/gtk!336
2018-09-13 01:26:35 +00:00
Руслан Ижбулатов
db2c9a6ec8 GDK W32: send both smooth and discrete scrolling events
Commit 359df028be changed the
code to send GDK_SCROLL_SMOOTH with deltas instead of
GDK_SCROLL_(UP|DOWN|LEFT|RIGHT). Change it again, to send
both the GDK_SCROLL_SMOOTH and the GDK_SCROLL_(UP|DOWN|LEFT|RIGHT)
event separately (with the discrete event marked as emulated),
as this is what other backends (such as wayland) do.
2018-09-12 15:20:37 +00:00
Mart Raudsepp
9b563b9daa build: Raise glib dependency for unicode 10.0 script names
Unicode 10.0 script name enums are used in gtk/script-names.c, which
aren't defined before glib-2.53.4.
2018-09-12 13:30:18 +03:00
Dorota Czaplejewicz
99669503fb imwayland: Fix clearing of preedit text in webkitgtk
Fixes webkitgtk misbehaviour as outlined in https://gitlab.gnome.org/GNOME/gtk/issues/1316#note_312942 , which was introduced in 49b17e6c.
The preedit will be cleared on exit only if it is already present.
2018-09-11 12:12:28 +00:00
Dorota Czaplejewicz
c22d5ab9f6 imwayland: Fix clearing of preedit text
Fixes terminal emulator misbehaviour as outlined in https://gitlab.gnome.org/GNOME/gtk/issues/1316, which was introduced in 49b17e6c. The original commit cleared preedit text by setting it to an empty string, which still counted as existing preedit. The fix sets preedit string to null, which is correctly understood as not present.
2018-09-11 12:11:10 +00:00
Chun-wei Fan
5d903cb094 builds: Fix introspection with MSVC builds
For building the introspection dumper program on Visual Studio, leave out
the G_LOG_DOMAIN as g-ir-scanner does not like it when it constructs the
compiler command line for Visual Studio.

Also ensure that we are looking for the freshly-built libraries by looking
for the .lib's from the output directories of the Visual Studio project files.
2018-09-11 18:13:10 +08:00
Jakub Steiner
416feacfe3 Merge branch 'adwaita-fixes-3' into 'gtk-3-24'
Adwaita: Fix errors in two recent MRs

See merge request GNOME/gtk!330
2018-09-10 19:07:26 +00:00
Adrien Plazas
f893e668c8 Adwaita: Fix sidebar separator styling
Simplify the styling of sidebar separators by not setting their borders
and margins rather than trying to drop it afterward, which was actually
not working anyway.
2018-09-10 15:05:22 +02:00
Adrien Plazas
a0acdcd08c Adwaita: Fix dropping the backgroud on nested headerbars
Make the selector less greedy to not remove the background on
non-titlebar headerbars contained in non-headerbar titlebars and only to
the ones contained in headerbar titlebars. This avoid issues in some
applications.

Also make dropping the background more agressive to actually remove it.
2018-09-10 14:54:19 +02:00
Jakub Steiner
6ab9a85ac9 Merge branch 'wip/adwaita/linked-entry-error-state-fix-3-24' into 'gtk-3-24'
Adwaita: Fix linked elements in error state

See merge request GNOME/gtk!316
2018-09-10 10:46:03 +00:00
Jakub Steiner
7e0aba77ff Merge branch 'selection-mode-ancestor-3' into 'gtk-3-24'
Adwaita: Set selection mode to headerbars if it's on ancestors

See merge request GNOME/gtk!325
2018-09-10 08:59:37 +00:00
Jakub Steiner
cbf76d4693 Merge branch 'separator-sidebar-3' into 'gtk-3-24'
Adwaita: Style separator.sidebar

See merge request GNOME/gtk!323
2018-09-10 08:59:04 +00:00
Jakub Steiner
85a98d5d7c Merge branch 'nested-headerbar-3' into 'gtk-3-24'
Adwaita: Drop the background of nested headerbars

See merge request GNOME/gtk!322
2018-09-10 08:57:54 +00:00
Stas Solovey
87fa847b64 Update Russian translation 2018-09-09 20:44:39 +00:00
Stas Solovey
44fd2702da Update Russian translation 2018-09-09 20:06:36 +00:00
Fabio Tomat
4858f4b46e Update Friulian translation 2018-09-08 10:47:42 +00:00
Carlos Garnacho
88dc784256 modules: Check current context before retrieving surrounding
There may be situations where this might get called while the
currently focused context just went away (eg. after setting the
text widget unsensitive).

Closes: #1317
2018-09-07 17:01:12 +02:00
Adrien Plazas
43c458f45f Adwaita: Set selection mode to headerbars if it's on ancestors
This allows to set the container of the headerbars in selection mode
rather than having to set the mode to each element of the title bar.
2018-09-07 15:27:22 +02:00
Adrien Plazas
f0696dfae0 Adwaita: Drop the background of nested headerbars
This is needed to work around headerbar sliding animation issues without
refactoring Adwaita's support of titlebars and headerbars as it may
break applications.

https://gitlab.gnome.org/GNOME/gtk/issues/1264
2018-09-07 13:07:46 +02:00
Adrien Plazas
f9ba306116 Adwaita: Style separator.sidebar
Let separators be declared as sidebars to have the same style as those
drawn by GtkStackSidebar. This also let them handle the selection-mode
class, whether they are assigned it or they descend from something in
selection mode.

This is convenient when building a custom sidebar using a GtkSeparator
and to extend a sidebar to the title bar.
2018-09-07 12:42:26 +02:00
Matthias Clasen
47122288b8 Fix portal path handling
This was broken when I recently introduced this helper
function.
2018-09-05 19:58:03 -04:00
Matthias Clasen
6d5279f3c8 Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE

See merge request GNOME/gtk!320
2018-09-05 23:24:35 +00:00
Jan Alexander Steffens (heftig)
3c7d5e749c GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE 2018-09-05 21:46:28 +02:00
Christoph Reiter
207e93f09c Merge branch 'ci-msys2-gtk-3-24' into 'gtk-3-24'
ci: Add an optional Windows build job using autotools and MSYS2

See merge request GNOME/gtk!319
2018-09-05 18:10:07 +00:00
Daniel Mustieles
edf0e746ad Updated Spanish translation 2018-09-05 11:28:49 +02:00
Daniel Mustieles
d1c119bc9f Updated Spanish translation 2018-09-05 11:26:10 +02:00
Marek Cernocky
ef57e59af6 Updated Czech translation 2018-09-04 11:09:06 +02:00
Matthias Clasen
ef1a1b5cb1 3.24.0 2018-09-03 12:41:53 -04:00
Christoph Reiter
003dc26a57 ci: Add an optional Windows build job using autotools and MSYS2
Set to "manual" because it takes 40-60 minutes depending on the ccache hit rate.
2018-09-03 17:10:40 +02:00
Efstathios Iosifidis
51a64c52b7 Update Greek translation 2018-09-03 10:46:15 +00:00
Anders Jonsson
e357fc8ebb Update Swedish translation 2018-09-02 23:14:29 +00:00
Ask Hjorth Larsen
f761fcc8ea Updated Danish translation of gtk-properties 2018-09-02 23:46:11 +02:00
Ask Hjorth Larsen
d673bbce42 Updated Danish translation of gtk 2018-09-02 23:45:24 +02:00
Ask Hjorth Larsen
88bbc09bcc Updated Danish translation of gtk 2018-09-02 23:19:34 +02:00
gogo
eaa8b0c76c Update Croatian translation 2018-09-02 21:16:16 +00:00
Ask Hjorth Larsen
01c81360ed Updated Danish translation of gtk-properties 2018-09-02 21:42:45 +02:00
gogo
351d9a75fe Update Croatian translation 2018-09-02 18:38:45 +00:00
Balázs Meskó
c7e89d07eb Update Hungarian translation 2018-09-02 17:17:54 +00:00
Balázs Meskó
f8d185d8df Update Hungarian translation 2018-09-02 17:12:37 +00:00
Alex Monday
e33b93a97e themes: Fix linked elements in error state
Add instructions for color of linked elements border which ajoints
entry, when parent linked entry is in error state.
2018-09-02 14:43:13 +05:00
Fran Dieguez
2ea70c0318 Update Galician translation 2018-09-01 13:00:28 +00:00
Piotr Drąg
db40563ab0 Update Polish translation 2018-08-31 19:46:22 +02:00
Rūdolfs Mazurs
c57e98123f Update Latvian translation 2018-08-31 16:58:13 +00:00
Milo Casagrande
c1ebaf6d81 Update Italian translation 2018-08-31 14:51:30 +00:00
Mario Blättermann
abe3ccf572 Update German translation 2018-08-31 13:03:16 +00:00
Rafael Fontenelle
cc1832ddde Update Brazilian Portuguese translation 2018-08-31 12:52:14 +00:00
Emin Tufan Çetin
d54f330905 Update Turkish translation 2018-08-31 10:58:24 +00:00
Kukuh Syafaat
ae2b356e86 Update Indonesian translation 2018-08-31 03:23:08 +00:00
Matthias Clasen
813c7b19ea GtkApplication: track screensaver state
A number of applications want to track the state of the screensaver.
Make this information available as a boolean property. We only listen
for state changes when ::register-session is set to TRUE.

This is implemented for unsandboxed D-Bus access by talking
directly to org.gnome.ScreenSaver or org.freedesktop.ScreenSaver,
and for sandboxed D-Bus by using a (new) portal API.
A Quartz implementation is missing.
2018-08-30 23:17:37 -04:00
Matthias Clasen
3fc319ff1b GtkApplication: Respect GTK_USE_PORTAL
When the environment variable is set, don't connect
to the session manager, but instead rely on the
inhibit portal.
2018-08-30 23:17:37 -04:00
Matthias Clasen
f734c3d3b0 file chooser portal: use request path utilities
Less code duplication, more sticky toffee!
2018-08-30 23:10:13 -04:00
Matthias Clasen
c3077467d0 print portal: use request path utilities
Less code duplication, more cookies!
2018-08-30 23:10:13 -04:00
Matthias Clasen
e2d066a2ec color picker portal: Add request path utility
Less code duplication, more cake!
2018-08-30 23:10:13 -04:00
Matthias Clasen
6829719d6d Add utility functions for portal paths
The paths that we create for requests and sessions
need some icky code to create. Keep it in one place.
2018-08-30 23:10:13 -04:00
Fran Dieguez
3471349013 Update Galician translation 2018-08-30 17:42:44 +00:00
Marek Cernocky
33f77d86ff Updated Czech translation 2018-08-30 16:49:53 +02:00
Marek Cernocky
f56a934a3a Updated Czech translation 2018-08-30 14:44:50 +02:00
Milo Casagrande
2dfed03b73 Update Italian translation 2018-08-30 12:24:38 +00:00
Tim Sabsch
8aa98cda45 Update German translation 2018-08-30 08:31:13 +00:00
Fran Dieguez
409a6b81e2 Update Galician translation 2018-08-29 21:49:56 +00:00
Claude Paroz
887b6f61a3 Updated French translation 2018-08-29 23:01:15 +02:00
Aurimas Černius
983739341d Updated Lithuanian translation 2018-08-29 22:22:58 +03:00
Emin Tufan Çetin
26f16c821b Update Turkish translation 2018-08-29 16:35:23 +00:00
Fran Dieguez
8234b065f6 Update Galician translation 2018-08-29 11:11:45 +00:00
Kukuh Syafaat
31354e1c68 Update Indonesian translation 2018-08-29 05:28:52 +00:00
Matthias Clasen
34c7eba642 3.23.3 2018-08-28 20:27:03 -04:00
Rafael Fontenelle
79c6c944ec Update Brazilian Portuguese translation 2018-08-28 22:32:57 +00:00
Anders Jonsson
3c265e8c1a Update Swedish translation 2018-08-28 21:10:24 +00:00
Matthias Clasen
ceb69490a9 Merge branch 'app-private-recent-list' into 'gtk-3-24'
FileChooserWidget: Don't show recent items with private hint set

See merge request GNOME/gtk!172
2018-08-28 20:14:16 +00:00
Kai Willadsen
5111f7af99 FileChooserWidget: Don't show recent items with private hint set 2018-08-28 20:14:16 +00:00
Matthias Clasen
aa69b3af5a Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
Fix pre-C99 builds of the gtk-3-24 branch

See merge request GNOME/gtk!310
2018-08-28 20:10:04 +00:00
Matthias Clasen
2307f8ec67 Merge branch 'fix-warning-combobox-destroy' into 'gtk-3-24'
Fix warning on GtkComboBox destroy

See merge request GNOME/gtk!311
2018-08-28 19:27:24 +00:00
Piotr Drąg
ea2bef06ec Update Polish translation 2018-08-28 18:48:15 +02:00
Luca Bacci
aa5d926c84 Check for NULL priv->popup_window in gtk_combo_box_popdown()
Fixes issue #125
2018-08-28 18:39:05 +02:00
Matthias Clasen
61921eba57 Fix a typo
Its Hieroglyphs!

Closes: #1292
2018-08-28 12:26:49 -04:00
Changwoo Ryu
7ca98179fc Update Korean translation 2018-08-28 15:53:18 +00:00
Chun-wei Fan
608b44a9fa demos/gtk-demo/paint.c: Fix build on pre-C99
Use a const GdkRGBA to replace the compound literal use.
2018-08-28 17:43:11 +08:00
Chun-wei Fan
6cf7297653 gtk/gtkeventcontrollerscroll.c: Include fallback-c89.c
... instead of just math.h, as it uses the C99 function trunc().  This
is so that the code builds on pre-C99 compilers.
2018-08-28 17:43:11 +08:00
Chun-wei Fan
723e50990f gtk/fallback-c89.c: Add C89 fallback for trunc()
Check for trunc() during configure and provide a fallback implementation
for it if it is not found.
2018-08-28 17:43:04 +08:00
Rafael Fontenelle
ab3527672e Update Brazilian Portuguese translation 2018-08-28 03:39:09 +00:00
Rafael Fontenelle
5dd2df75c9 Update Brazilian Portuguese translation 2018-08-28 02:56:52 +00:00
Changwoo Ryu
7f930b5ded Update Korean translation 2018-08-27 14:12:09 +00:00
Milo Casagrande
a9df4a8f1b Update Italian translation 2018-08-27 08:02:19 +00:00
Matthias Clasen
0dc84df59b Merge branch 'clear_preedit' into 'gtk-3-24'
Clear preedit when a text input loses focus

See merge request GNOME/gtk!302
2018-08-26 23:48:26 +00:00
Matthias Clasen
ac654740f3 Deprecate GtkRange::upper/lower-stepper-sensitivity
These properties have been removed in GTK+ 4.
Deprecate them here.
2018-08-26 18:58:59 -04:00
Kukuh Syafaat
f459bd6c19 Update Indonesian translation 2018-08-26 13:43:56 +00:00
Kukuh Syafaat
4e690a3091 Update Indonesian translation 2018-08-26 13:43:26 +00:00
Baurzhan Muftakhidinov
4dfd44a84f Update Kazakh translation 2018-08-25 17:27:26 +00:00
Baurzhan Muftakhidinov
a9ab1b1b39 Update Kazakh translation 2018-08-25 17:26:55 +00:00
Baurzhan Muftakhidinov
5dd8befca4 Update Kazakh translation 2018-08-25 17:26:07 +00:00
Christian Kirbach
49242af74c Update German translation 2018-08-25 10:48:51 +00:00
Dorota Czaplejewicz
49b17e6c1e imwayland: clear preedit on focus out 2018-08-23 22:03:01 +02:00
Benjamin Otte
da8994f941 Don't deprecate gtk_widget_show_all()
After discussions on IRC, the conclusion was reached that deprecations
only make sense if an action can be taken to not use the deprecated code
that makes the code more current and simplifies a later port to a newer
GTK version.

In this particular case, the suitable action would be adding
gtk_widget_show() calls whenever a widget is created, so that a call to
show_all() is not necessary.
However, in GTK4 these calls would not be necessary and end up just
bloating the codebase unnecessarily.

So it was decided the better solution would be to not deprecate the API
and instead leave this work to be done during potential GTK4 ports of
applications.

This reverts commit 4d71d2303d.

Fixes !1282
2018-08-22 19:48:20 +02:00
Cheng-Chia Tseng
2b9f5e9e32 Update Chinese (Taiwan) translation 2018-08-21 16:23:16 +00:00
Cheng-Chia Tseng
6fa28bdaac Update Chinese (Taiwan) translation 2018-08-21 16:15:54 +00:00
Rico Tzschichholz
2306c82df7 gesturestylus: Add missing array g-i annotation for *_get_axes params 2018-08-20 17:01:59 +02:00
Bruce Cowan
009b7dcf1e Update British English translation 2018-08-19 16:50:48 +00:00
Matthias Clasen
45b434c28c Merge branch 'win32-scroll-deltas' into 'gtk-3-24'
GDK W32: Support smooth scrolling

See merge request GNOME/gtk!292
2018-08-18 20:44:24 +00:00
Tim Sabsch
a6a2745a2a Update German translation 2018-08-18 15:41:45 +00:00
Jordi Mas
645ad9fb62 Update Catalan translation 2018-08-18 08:29:58 +02:00
Jordi Mas
3a8056f2d1 Update Catalan translation 2018-08-18 08:23:10 +02:00
Iain Lane
dce33fa830 colorpickershell: Unpack the tuple returned from PickColor()
When calling PickColor on org.gnome.Shell, we get back an "a{sv}", which
GDBus provides to us as "(a{sv})".

At the minute we're not unpacking this tuple, and so picking fails with
messages like:

  GLib-CRITICAL **: 13:38:19.439: g_variant_lookup_value: assertion 'g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s*}")) || g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{o*}"))' failed

  Gtk-WARNING **: 13:38:19.439: Picking color failed: No color received

Let's unpack it.
2018-08-17 09:10:59 -04:00
Ricardo Silva Veloso
25d512c186 Update Brazilian Portuguese translation 2018-08-17 08:32:13 +00:00
Matthias Clasen
c9f875bd77 Merge branch 'fix-shifted-scrolling-gtk3' into 'gtk-3-24'
gtkscrolledwindow: Consider shift key presses when decelerating [gtk3]

See merge request GNOME/gtk!287
2018-08-15 22:02:45 +00:00
Matthias Clasen
677627346d Merge branch 'wip/tooltip-move-to-rect' into 'gtk-3-24'
Make tooltips use gdk_window_move_to_rect()

See merge request GNOME/gtk!293
2018-08-15 22:01:20 +00:00
Jonas Ådahl
436c8802a2 Merge branch 'wip/carlosg/issue-844' into 'gtk-3-24'
gdk/wayland: Avoid idempotent wl_subsurface.set_position calls

See merge request GNOME/gtk!294
2018-08-14 17:52:59 +00:00
Carlos Garnacho
935bb5db32 gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
https://gitlab.gnome.org/GNOME/gtk/issues/844

Closes: #844
2018-08-14 18:52:07 +02:00
Claude Paroz
c4f2420e9a Updated French translation 2018-08-14 13:41:09 +02:00
Emin Tufan Çetin
96ea85a991 Update Turkish translation 2018-08-12 11:07:37 +00:00
Emin Tufan Çetin
b5333aec99 Update Turkish translation 2018-08-12 10:27:10 +00:00
Emin Tufan Çetin
f2f11a7f4d Update Turkish translation 2018-08-12 10:21:06 +00:00
Yi-Jyun Pan
9c4f684e1c Update Chinese (Taiwan) translation 2018-08-12 10:08:50 +00:00
Piotr Drąg
fbdf100712 Update Polish translation 2018-08-11 23:57:28 +02:00
Aurimas Černius
de9b22a137 Updated Lithuanian translation 2018-08-11 18:09:03 +03:00
Jonas Ådahl
14d22cb323 tooltip: Implement positioning using gdk_window_move_to_rect()
In order to make tooltip positioning portable, make use of the
move_to_rect API. Some semantical changes are made, as identical
semantics cannot be implemented using the move-to-rect API.

Primarily the implemented semantics are:

Position the tooltip in the center pixels slightly below (defaults to 4
units below) the tooltipped widget. This is always the case for keyboard
driven tooltips; the case where it tries to avoid the pointer cursor is
not implemented.

For pointer position triggered tooltips, implement the following
additional semantics:

Use the current cursor size to determine the padding used to enlarge the
anchor rectangle. This is to try to avoid the cursor overlapping the
tooltip.

If the anchor rectangle is too tall (meaning if we'd be constrained
and flip on the Y axis, it'd flip too far away from the originally
intended position), rely only on the pointer position to position the
tooltip. The approximate pointer cursor rectangle is used as a anchor
rectangle. Ideally we should use the actual pointer cursor rectangle
(image used as well as hotspot coordinate), but we don't have API to
get that information.

If the anchor rectangle isn't to tall, just make sure the tooltip isn't
too far away from the pointer position on the X axis.

Closes: #134
Closes: #432
Closes: #574
Closes: #579
Closes: #878
2018-08-10 18:32:54 +02:00
Jonas Ådahl
595f3902c8 gdk/wayland: Always map windows 'moved-to-rect' as popups
Only popups can make use of the move-to-rect semantics so it makes no
sense to try anything other surface type.
2018-08-10 18:32:54 +02:00
Jonas Ådahl
1ed53199c5 gdk/wayland: Don't remap non-subsurface as subsurface
Let's just use the fact that a window was mapped as a subsurface to
remap it above another transient parent instead of relying on the more
complicated 'should-map-as-subsurface' helper function.
2018-08-10 18:32:54 +02:00
Claude Paroz
2e9439b017 Update French translation 2018-08-09 10:37:29 +00:00
Matthias Clasen
2dde4e2ff8 Merge branch 'gtk-3-24-improve-error-message' into 'gtk-3-24'
gtkplacessidebar: Improve error message when unlocking volume fails

See merge request GNOME/gtk!266
2018-08-08 09:18:32 +00:00
Руслан Ижбулатов
359df028be GDK W32: Support smooth scrolling
Set delta_x or delta_y for GdkScrollEvent.
HIWORD (wParam) in WM_MOUSE(H)WHEEL is the scroll delta.
A delta value of WHEEL_DELTA (which is 120) means scrolling
one full unit of something (for example, a line).

The delta should also be multiplied by the value that the
SystemParametersInfo (SPI_GETWHEELSCROLL(LINES|CHARS), 0, &value, 0)
call gives back, unless it gives back 0xffffffff, in which case
it indicates that scrolling is page- or screen-based, not line-based
(GDK doesn't support that at the moment).

Also, all deltas should be inverted, since MS sends negative deltas
when scrolling down (rotating the wheel back, in the direction of
the user).

With deltas set the mode should be set to GDK_SCROLL_SMOOTH.

Fixes issue 1263.
2018-08-07 22:15:07 +00:00
Baurzhan Muftakhidinov
08f53740a5 Update Kazakh translation 2018-08-06 17:16:43 +00:00
Piotr Drąg
a1f1144ff3 Update Polish translation 2018-08-06 18:55:14 +02:00
Matthias Clasen
290c5b6b85 Merge branch 'gtk-3-24-fix-link-error' into 'gtk-3-24'
font chooser widget: Add missing build flags

See merge request GNOME/gtk!290
2018-08-06 12:14:29 +00:00
Kouhei Sutou
4c94a76237 font chooser widget: Add missing build flags
If we detect HarfBuzz and PangoFT2, GtkFontChooserWidget uses them. So
we need to add CFLAGS and LIBS of them to GTK_DEP_CFLAGS/LIBS. If we
don't add them, MinGW build fails to link.
2018-08-06 16:19:35 +09:00
Aurimas Černius
ac030fd5e1 Updated Lithuanian translation 2018-08-05 16:02:30 +03:00
Matthias Clasen
6b6e53fd23 Make color picker circular
The need for center alignment was pointed out by Timm Baeder.
2018-08-05 01:50:01 +00:00
Matthias Clasen
926f25aaec color picker: Also try kwin
use a kwin color picker when we run under kwin.
2018-08-05 01:48:29 +00:00
Matthias Clasen
7e74beec5b Only use the portal color picker when appropriate
This is just moving this check around.
2018-08-05 01:47:35 +00:00
Matthias Clasen
fc44f9755a Add a kwin color picker
This uses the org.kde.kwin.ColorPicker interface.
2018-08-05 01:47:04 +00:00
Piotr Drąg
e4a31bc9bc Update Polish translation 2018-08-04 19:39:31 +02:00
Sebastian Keller
5c6596ad99 gtkscrolledwindow: Consider shift key presses when decelerating
Otherwise horizontal scrolling using the shift key would decelerate
vertically.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/770
2018-08-04 16:36:47 +02:00
Benjamin Otte
6e4da8fbdb container: Deprecate focus chains 2018-07-31 22:46:15 +02:00
Matthias Clasen
4d71d2303d Deprecate show_all apis
These functions are gone in GTK+ 4, so deprecate them here.
2018-07-31 13:32:55 -04:00
Andrea Azzarone
06800b22ff window: Fallback to CSD titlebar in focus-chain
CSD titlebar are included in the focus-chain. The logic used makes sure that the
initial focus avoids the titlebar, but tabbing around will eventually get there.
This logic fails in case the window has no other focusable widgets apart from
the ones in the header-bar. If this happens keynav focus will be lost. To handle
the above scenario, we need to fallback to focus the header-bar (if any).

Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/404
2018-07-31 02:37:12 +00:00
Matthias Clasen
9417389659 Update a11y test results
The color picker shows up here.
2018-07-31 02:06:46 +00:00
Matthias Clasen
69c85be8b2 3.23.2 2018-07-30 18:33:32 -04:00
Matthias Clasen
9bae0758eb color picker: Better debug spew
This will help in debugging issues.
2018-07-30 18:10:27 -04:00
Matthias Clasen
7f290426dc Add a color picker implementation for gnome-shell
This adds a GtkColorPicker implementation that talks
to gnome-shell to get a color.
2018-07-30 18:10:17 -04:00
Matthias Clasen
740fc3eeff Add a color picker implementation for portals
This adds a GtkColorPicker implementation that talks
to the screnshot portal to get a color.
2018-07-30 18:10:17 -04:00
Matthias Clasen
6b3272e4b0 color editor: Add a color picker button
The button is shown if we have a GtkColorPicker implementation.
Currently, there are none, so the button is never shown.
2018-07-30 18:10:17 -04:00
Matthias Clasen
543fb6d7b6 Add a color picker interface
This will be used in the color chooser, in subsequent commits.
2018-07-30 17:33:52 -04:00
Piotr Drąg
ed1617334f Update POTFILES.in 2018-07-30 22:44:10 +02:00
Matthias Clasen
77b4c4432e Merge branch 'wl_text_input_clean' into 'gtk-3-24'
Replace gtk_text_input with text_input_unstable_v3 support

See merge request GNOME/gtk!272
2018-07-30 19:31:37 +00:00
Dorota Czaplejewicz
8d77256d53 imwayland: Add text-input-unstable-v3 support
The wayland input module now represents text-input-unstable-v3 support, while the old module supporting gtk-text-input was renamed to gtkwayland.
2018-07-30 20:27:22 +02:00
Matthias Clasen
5f0a14fa2a Merge branch 'issue1214-tooltips-win32' into 'gtk-3-24'
Gdk-Win32: Correct handling of transient state changes

See merge request GNOME/gtk!248
2018-07-30 14:53:48 +00:00
Piotr Drąg
4693fb9461 Update Polish translation 2018-07-29 20:24:41 +02:00
Matthias Clasen
8be955571d Updates 2018-07-29 13:08:05 +00:00
Matthias Clasen
7fa5c361be Include Emoji category icons as resources too
These icons are very new in the Adwaita icon theme, so we can't
rely on them being widely available, and will just include them
for now.
2018-07-29 09:02:23 -04:00
Matthias Clasen
ff24c82dd4 Emoji chooser: Use icons for sections
This is more reliable than using text-style Emoji
which may not be present.

Based on work by Julian Sparber.
2018-07-29 09:02:07 -04:00
Aurimas Černius
7becabebe1 Updated Lithuanian translation 2018-07-28 20:31:14 +03:00
Carlos Garnacho
ffa4e2308a Merge branch 'wip/chergert/imwayland-leak' into 'gtk-3-24'
imwayland: fix potential leak of attr list

See merge request GNOME/gtk!277
2018-07-28 10:14:56 +00:00
Christian Hergert
508e0648b5 imwayland: fix potential leak of attr list
This fixes a potential leak of a PangoAttrList that is set when chaining
up to the parent get_preedit_string(). We check to see if the attr list
was created and reuse it instead of leaking the previous value.
2018-07-27 23:46:31 -07:00
Luca Bacci
6348a7d48f Gdk-Win32: Correct handling of transient state changes
gdk_win32_window_set_transient_for() behaves incorrectly when
called in sequence with the same arguments. This fix ensures it
always operates correctly.
In some cases this function gets called multiple times with the
same arguments, e.g. when tooltips are shown.

See issue #1214
2018-07-27 12:11:18 +02:00
Benjamin Otte
e0807fcf54 gtk; Deprecate gtk_render_frame_gap()
Use gtk_render_frame() instead.
2018-07-24 20:32:26 +02:00
Benjamin Otte
8fd5b567dc gdk: Add GDK_DEPRECATED_IN_3_24() macros 2018-07-24 20:32:26 +02:00
Daniel Mustieles
a6de3ed7b4 Updated Spanish translation 2018-07-24 10:13:50 +02:00
segfault
138c196e53 gtkplacessidebar: Improve error message when unlocking volume fails 2018-07-23 23:38:06 +02:00
Daniel Mustieles
3658b8f709 Update Spanish translation 2018-07-23 10:07:23 +00:00
Daniel Mustieles
c0b03564f5 Update Spanish translation 2018-07-23 10:02:39 +00:00
Matthias Clasen
8535610b19 Merge branch 'gtk-3-24-add-spinner-to-sidebar-row' into 'gtk-3-24'
gtkplacessidebar: Show busy spinner in sidebar row during mount ops

See merge request GNOME/gtk!260
2018-07-22 17:14:27 +00:00
segfault
0e7228b267 gtkplacessidebar: Show busy spinner in sidebar row during mount ops 2018-07-22 17:04:05 +02:00
Bastien Nocera
5b527d6910 test: Fix compile-time warnings
testsuite/gtk/notify.c: In function ‘test_type’:
testsuite/gtk/notify.c:434:14: warning: assignment to ‘GObject *’ {aka ‘struct _GObject *’} from incompatible pointer type ‘GtkSettings *’ {aka ‘struct _GtkSettings *’} [-Wincompatible-pointer-types]
     instance = g_object_ref (gtk_settings_get_default ());
              ^
testsuite/gtk/notify.c:443:16: warning: assignment to ‘GObject *’ {aka ‘struct _GObject *’} from incompatible pointer type ‘GdkWindow *’ {aka ‘struct _GdkWindow *’} [-Wincompatible-pointer-types]
       instance = g_object_ref (gdk_window_new (NULL, &attributes, 0));
                ^
2018-07-21 14:55:30 +02:00
Carlos Garnacho
eb3fd5e941 gtksettings: Remove leftover code
The immodule variable is unused
2018-07-21 14:55:01 +02:00
Tim Sabsch
ca192a87c2 Update German translation 2018-07-20 20:31:47 +00:00
Matthias Clasen
fa77925da2 Merge branch 'gtk-3-24' into 'gtk-3-24'
Remove deprecated functions

See merge request GNOME/gtk!255
2018-07-20 14:07:44 +00:00
Benjamin Otte
172dc3e79a Merge branch 'wip/muktupavels/deprecate-gtk-css-provider-get-default' into 'gtk-3-24'
gtkcssprovider: deprecate gtk_css_provider_get_default

See merge request GNOME/gtk!257
2018-07-20 14:05:12 +00:00
Alberts Muktupāvels
cb39169ba7 gtkcssprovider: deprecate gtk_css_provider_get_default
This function is unused since cdc6e82720 commit and does not
contain fallback style.

https://gitlab.gnome.org/GNOME/gtk/issues/1226
2018-07-20 14:55:27 +03:00
Emin Tufan Çetin
577dfb9e2f Update Turkish translation 2018-07-20 11:21:46 +00:00
Yi-Soo An
db7f085315 tests/animated-resizing: Remove deprecated functions
The functions as below are deprecated
- gdk_screen_get_monitor_geometry
- gdk_screen_get_primary_monitor

Instead of them, use functions below
- gdk_monitor_get_geometry
- gdk_display_get_primary_monitor
2018-07-20 15:42:26 +09:00
Yi-Soo An
de18859249 demos/gtk-demo/changedisplay: Remove deprecated gdk_flush
Use gdk_display_flush instead of it.
2018-07-20 15:40:37 +09:00
Yi-Soo An
5fb999010c modules/input/gtkimcontextthai: Remove deprecated gdk_beep
Use gdk_display_beep instead of it.
2018-07-20 15:39:49 +09:00
Timm Bäder
2c3a7c63ef Merge branch '628-text-view-width' into 'gtk-3-24'
Resolve #628: "TextView: spaces acting as non-breaking whitespace if :left- or :right-margin is set"

See merge request GNOME/gtk!236
2018-07-20 06:24:14 +00:00
Matthias Clasen
078870f604 Emoji chooser: Also check for hex boxes
We don't want to see those either.
2018-07-19 20:51:22 -04:00
Matthias Clasen
c52d9cfc14 moji chooser: Try harder to avoid fallback
We don't want to see any fallback rendering.
The current check was still letting some fallback
combinations through.

Based on work by Julian Sparber.
2018-07-19 20:51:07 -04:00
Matthias Clasen
e37e1dfcb0 Merge branch 'gtk-3-24-defaultvalues-ignore-more' into 'gtk-3-24'
defaultvalue: Ignore more style properties that Adwaita overrides

See merge request GNOME/gtk!253
2018-07-19 20:23:29 +00:00
Iain Lane
2e5307daea defaultvalue: Ignore more style properties that Adwaita overrides
These broke once we switched away from Raleigh
2018-07-19 16:29:14 +01:00
Daniel Boles
cb4ea3fc65 NEWS: Remove an accidental tab 2018-07-18 23:09:12 +01:00
Timm Bäder
56033a8d27 gesturestylus: Clarify a documentation comment
Use the proper gtkdoc syntax for signals.
2018-07-18 23:05:06 +01:00
Matthias Clasen
f7f3939b04 3.23.1 2018-07-18 16:58:17 -04:00
Piotr Drąg
13a36e81dc Update POTFILES.in 2018-07-18 17:00:11 +02:00
Matthias Clasen
affb4ff5f4 Fix up version annotations
The new api here was introduced in 3.24.
2018-07-18 07:18:21 -04:00
Matthias Clasen
ee22277f18 Add new API to the docs 2018-07-18 07:12:41 -04:00
Matthias Clasen
cc73241c7b Merge branch 'wip/carlosg/controllers-backport' into 'gtk-3-24'
Wip/carlosg/controllers backport

See merge request GNOME/gtk!246
2018-07-18 00:23:37 +00:00
Balázs Meskó
ac358d2507 Update Hungarian translation 2018-07-17 23:11:18 +00:00
Carlos Garnacho
9ee60777e7 sm scroll 2018-07-16 15:44:35 +02:00
Carlos Garnacho
effdf3af74 demos: Add "Paint" demo 2018-07-16 15:43:43 +02:00
Carlos Garnacho
a8463953a4 gtk: Add GtkGestureStylus
This is a GtkGesture done to deal with stylus events from drawing tablets.
Those have a special number of characteristics that extend a regular
pointer, so it makes sense to wrap that.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
7793aab5f0 gtkeventcontrollerkey: Add ::focus-in/out signals
And handle GDK_FOCUS_CHANGE events in order to emit those.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
ecf9fa65b8 gtkeventcontrollerkey: Add get_group() call
Callers can use this function on a key-pressed/released signal
to find out the key event group, useful in a few places.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
a32933b056 eventcontrollerkey: Add function to forward stuff elsewhere 2018-07-16 15:43:43 +02:00
Carlos Garnacho
e0f3e8a7e5 gtk: Add GtkEventControllerKey
This event controller is meant to replace usage from key-press/release-event
handlers all through. Optionally it can be set a GtkIMContext, so interaction
is carried by the controller.
2018-07-16 15:43:43 +02:00
Matthias Clasen
1f9de707f7 Add x/y to GtkEventControllerMotion::enter
We have this information available in enter events,
and having it in the controller signal as well makes
porting easier.

Update existing users.
2018-07-16 15:43:43 +02:00
Matthias Clasen
8b2c3a8c1a Add a simple motion eventcontroller
This can serve as a replacement for the legacy
event signals for enter/leave/motion notify.
2018-07-16 15:43:43 +02:00
Matthias Clasen
e7af3410cf Avoid excess notification for GdkEventControllerScroll::flags
We have a test that checks this, and it is the right thing to do.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
84d3bfb6fd gtk: Remove CONSTRUCT_ONLY flag from GtkEventControllerScroll::flags
There is a gtk_event_controller_scroll_set_flags() call that's meant
to be called after construction (eg. due to scrolledwindow relayouts
hiding/showing scrollbars). The property shouldn't be construct-only
for consistence.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
448551f31c gtkeventcontrollerscroll: Add some docs 2018-07-16 15:43:43 +02:00
Timm Bäder
7b8c036f8f eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
The > 1 meant it only emits the signal for -2/+2 steps.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
747be0f499 gtk: Add GtkEventControllerScroll
This is a GtkEventController implementation to handle mouse
scrolling. It handles both smooth and discrete events and
offers a way for callers to tell their preference too, so
smooth events shall be accumulated and coalesced on request.

On capable devices, it can also emit ::scroll-begin and
::scroll-end enclosing all ::scroll events for a scroll
operation.

It also has builtin kinetic scrolling capabilities, reporting
the initial velocity for both axes after ::scroll-end if
requested.
2018-07-16 15:43:43 +02:00
Benjamin Otte
9008f7702d window: Update opaque region if background-color changes
The opaque region is only set when the background color is opaque. So
we need to do something about it when the background color changes.

However, in the case where a size allocation is going to happen, we
already do this update in size_allocate(), so in that case avoid doing
it twice.
2018-07-13 15:02:47 +02:00
Bruno Lopes da Silva
df0454236c Update Brazilian Portuguese translation 2018-07-10 13:02:08 +00:00
Jakub Steiner
8373b906d4 Merge branch 'expander-size-3' into 'gtk-3-24'
HighContrast: Restore expander size

See merge request GNOME/gtk!210
2018-07-09 15:27:51 +00:00
Peter Bloomfield
4b4ae4464c text-view: Do not double-allocate borders
Reverts part of Commit 25b67af3

The 'width' part of the commit is the cause of #628: requisition->width
is first set to priv->layout->width, which already includes
priv->left_border + priv->right_border. It's a bit labyrinthine, but
essentially:

*  layout->width is set in update_layout_size() (gtktextlayout.c line 992)
   as the maximum line width, and
*  the line width is set to display->width in gtk_text_layout_real_wrap()
   (gtktextlayout.c line 1183), and
*  display->width is set to text_pixel_width + h_margin + h_padding in
   gtk_text_layout_get_line_display() (gtktextlayout.c line 2584), and
*  h_margin + h_padding is the same as priv->left_border +
   priv->right_border.

Adding it again leads to an increase in the size-request, which
results in wider lines; rinse and repeat.
2018-07-08 17:24:07 -04:00
Mario Blättermann
0bca6969d4 Update German translation 2018-07-07 19:48:26 +00:00
Samuel Thibault
660087db42 HighContrast: Restore expander size
Expanders used to be 16px high. With the move from the gtk2 rendering
to gtk3 rendering they shrunk to 12px, making them hard to see, because
it's now the icon which is 16px high and the icon contains transparent
borders.

This makes the HighContrast theme use 24px icons instead, to restore
16px expanders. This may expander some containers a bit.

Closes #1046
2018-07-03 19:27:15 +02:00
Jonas Ådahl
927004178f Merge branch 'fix_wayland_csd_announce' into 'gtk-3-24'
Fix gdk_wayland_window_announce_csd

See merge request GNOME/gtk!221
2018-07-03 10:14:57 +00:00
Daniel Boles
1b8de2d5fa Adwaita: Drop some unneeded overrides
The pseudoclasses work fine on the subnodes without having to also apply
`parent:class subnode`.
2018-07-02 21:45:06 +01:00
Daniel Boles
483d25f418 ModelButton: Add Since annotation on new prop 2018-07-02 20:31:45 +01:00
Daniel Boles
1d30ada735 ScrolledWindow: a couple of spelling/grammar fixes
(A) Put a space in "scrolled window" like the other doc comments
(B) Say "i.e." rather than "ie."
(C) Fix grammar from "makes [...] exactly reaches" to "exactly reach"
2018-07-02 20:11:12 +01:00
Daniel Boles
8a00551871 ScrolledWindow: Fix/improve doc of key bindings
Saying 'key + modifiers' is really weird, so reverse that, and explain
why there are 2 cited and what the difference between them is.
2018-07-02 20:09:37 +01:00
Daniel Boles
0ed3a77d29 ScrolledWindow: Add missing apostrophes 2018-07-02 20:07:23 +01:00
Matthias Clasen
29b61176bb Merge branch 'wip/gtk324.win.egl' into 'gtk-3-24'
Add an EGL renderer for GDK-Win32 for GTK+-3.24 (was: merge request !126)

See merge request GNOME/gtk!191
2018-07-02 17:18:26 +00:00
Matthias Clasen
174c4fa7ee Merge branch 'wip/aplazas/modelbutton-markup' into 'gtk-3-24'
ModelButton: Add 'use-markup' property

See merge request GNOME/gtk!219
2018-07-02 17:16:59 +00:00
Daniel Boles
08adcb6318 PlacesSidebar: Fix warning about signal parameters
@open_flags was not documented, and so:

jhbuild/checkout/gnome/gtk+-3/gtk/gtkplacessidebar.c:4743: Warning: Gtk:
incorrect number of parameters in comment block, parameter annotations
will be ignored.
2018-07-01 16:08:06 +01:00
Adrien Plazas
504eb89155 ModelButton: Add 'use-markup' property
Binds this property to the button's label, allowing a model button to
have text with markup.

This will be convenient for buttons like 'Online Accounts <sup>↗</sup>'.
2018-06-29 23:02:21 +02:00
Daniel Boles
b75b5e900a themes: Remove Raleigh
It has been extremely broken since the move to CSS gadgets/nodes, so
clearly no one is depending on it; nor does anyone seem to want to
resurrect it, and writing a Raleigh-inspired theme from scratch would be
faster if they did. So let's drop the dead weight from the build and lib

Now that we don't have Raleigh, the defaultvalue test has to be changed
to set Adwaita before checking the default values of style properties -
some of which Adwaita overrides in its CSS, meaning those would fail.
Not that it passed before anyway! But it does now after my other commit.

Note that I leave the last reference in gtk-zip.sh.in alone since that
hasn't been touched in 8 years and probably has plenty other problems...

Close https://gitlab.gnome.org/GNOME/gtk/issues/1187
2018-06-29 20:12:19 +01:00
Daniel Boles
ca4ec52c54 defaultvalue: Fix some very broken indentation
and while here, use the more typical : to separate the type and property
2018-06-29 19:57:06 +01:00
Daniel Boles
908d4f1d1f defaultvalue: Ignore property to actually pass
GtkFontChooserWidget:tweak-action gets set in init(), so we have to skip
testing that it is the default NULL for a GObject, or the test fails.
2018-06-29 18:57:43 +01:00
Daniel Boles
62573f299c defaultvalue: Stop warnings via new g_object_ref()
Now that it can propagate the type, we must explicitly cast to GObject*
to assign it, otherwise gcc shouts.
2018-06-29 18:46:09 +01:00
Daniel Boles
c0bf48c8ab defaultvalue test: Remove obsolete properties 2018-06-29 18:46:09 +01:00
Matthias Clasen
26f35fb941 Merge branch 'wip/cursor-output-scale-changes-3-24' into 'gtk-3-24'
wayland: Update cursor surface scale when output scale changes

See merge request GNOME/gtk!223
2018-06-29 14:30:51 +00:00
David Edmundson
d49335c59a wayland: Use correct enums in server_decoration_request_mode
The enum is duplicated in the spec for the manager and the decoration
object. We should be using the right ones. In practice they have the
same value, so this bug didn't cause any issues.
2018-06-28 18:51:12 +01:00
David Edmundson
f62c92783a wayland: Respond to server_decoration.mode events 2018-06-28 18:51:12 +01:00
David Edmundson
f3f4d40b89 wayland: Fix memory leak in server decoration object
The server decoration object becomes invaid when the wl_surface is
deleted. We should tidy it up then.
2018-06-28 18:51:12 +01:00
David Edmundson
b0bfe606aa wayland: Reset server decoration interface on window mapping
The wl_surface is destroyed and recreated when the window is
mapped/unmapped. As we have a new wl_surface we need to create a new
server_decoration object for that surface.
2018-06-28 18:50:50 +01:00
David Edmundson
32ae97f13a wayland: Explicitly request mode for both CSD and SSD modes
According to the spec compositors were to assume surfaces are CSD until
told otherwise. This means we need to send
org_kde_kwin_server_decoration_request_mode in both cases.

This fixes libreoffice under kwin, which would remove it's own headers
as per the manager's request but not inform kwin leaving it in the even
more broken state of having none.
2018-06-28 18:50:50 +01:00
Jonas Ådahl
3354d91090 wayland: Update cursor surface scale when output scale changes
Cursor surfaces didn't listen for output scale changes, meaning they
didn't adapt their scale when an output changed scale, which could
happen for example when changing the monitor scale via Settings.
2018-06-28 12:01:48 +02:00
Chun-wei Fan
b6db96cd1a GDK/Win32: Cleanup and further fix OpenGL/ES glitches
We also need to invalidate the OpenGL/ES window when we resize the
window via a mouse drag operation, so that we don't get glitches in such
situations, because they are not covered in GdkWindow's
impl_class->move_resize().

Make sure that we only force the invalidation when necessary (as it is
expensive), and clean up the gdkevents-win32.c code so that we include
gdkglcontext-win32.h in the right place instead of using an extern, as
we need to invalidate the window accordingly.
2018-06-28 15:33:42 +08:00
Chun-wei Fan
b2ea707614 GDK-Win32: Fix glitches when using EGL/ANGLE
We need to force redraws of the whole window when we are using EGL/ANGLE
during maximize, restore and Aerosnap ops so that we do not get glitches
in the resulting window.
2018-06-28 15:33:42 +08:00
Chun-wei Fan
af66faf604 Add a EGL renderer (via ANGLE) for Windows
This is for adding a EGL-based renderer which is done via the ANGLE
project, which translate EGL calls to Direct3D 9/11.  This is done as a
possible solution to issue #105, especially for cases where the needed
full GL extensions to map OpenGL to Direc3D is unavailable or
unreliable, or when the OpenGL implementation from the graphics drivers
are problematic.

To enable this, do the following:
-Build ANGLE and ensure the ANGLE libEGL.dll and libGLESv2.dll are
 available.  A sufficiently-recent ANGLE is needed for things to
 work correctly--note that the copy of ANGLE that is included in
 qtbase-5.10.1 is sufficient.  ANGLE is licensed under a BSD 3-clause
 license.  Note also that Visual Studio 2013 or later is required to
 build ANGLE from QT-5.10.1, but the 2013-built ANGLE DLLs can work
 without without problems for GTK+ that is built with Visual Studio
 2008 or later.
-Build libepoxy on Windows with EGL support enabled.
-Define GDK_WIN32_ENABLE_EGL when building gdk-win32.lib when building
 with Visual Studio, or pass in --enable-win32-gles during configure
 when building with MinGW/mingw-w64.
-Prior to running GTK+ programs, the GDK_GL envvar needs to contain
 gles.

Known issues:
-Only OpenGL ES 3 is supported, ANGLE's ES 2 does not support the needed
 extensions, notably GL_OES_vertex_array_object, but its ES 3 support is
 sufficient.
-There is no autodetection or fallback mechanism to enable using
 EGL/Angle automatically yet.  There is no plans to do this in this
 commit.

Thanks to LRN for pointing out that we should #include
"win32/gdkwin32.h" instead of #include "gdkwin32.h" for gdkgl.c.  LRN
also did the autotools portion of this patch.

Further notes about the autotools --enable-win32-gles option, fom LRN:

This adds --enable-win32-gles option, which enables the
code for GLES renderer.  This commit also adds tests for WGL and
EGL in epoxy.  The absence of WGL is highly unlikely (it's enabled
by default), but checking for EGL when GLES is enabled is necessary,
as EGL is disabled in Windows builds of epoxy by default.
2018-06-28 15:33:42 +08:00
Emmanuele Bassi
5afc01d995 Merge branch '324.win32.build' into 'gtk-3-24'
GTK+: Fix dist and build on Windows

See merge request GNOME/gtk!207
2018-06-27 18:26:02 +00:00
Chun-wei Fan
f353ba3acb demos/gtk-demo/gtkfishbowl.c: Include gtk/fallback-c89.c
...in place of math.h, as we are using round(), which is possibly not
provided by the compiler since we don't require a C99 compiler in
GTK+-3.x and gtk/fallback-c89.c does include math.h anyways.
2018-06-26 16:40:18 +08:00
Chun-wei Fan
eebf151f2a gtk/: Fix build without PangoFT2 and HarfBuzz
On Windows HarfBuzz and PangoFT2 are optional, so we need to ensure that
we only build the bits that require HarfBuzz and PangoFT2 when needed.
We may need to see later whether we can get the needed functionality in
gtkfontchooserwidget.c with the Windows APIs without the need of
HarfBuzz nor PangoFT2 (and starting programs on Windows using FontConfig
is very slow).
2018-06-26 16:40:18 +08:00
Chun-wei Fan
e8d3899461 gtk/Makefile.am: Dist the newly-added private headers
We need to dist language-names.h and script-names.h so that we won't
be missing headers in a dist tarball.
2018-06-26 16:40:11 +08:00
Benjamin Otte
e7bb83988f progressbar: Never stop never stopping
Reinstate code that was accidentally deleted during the port to
GtkProgressTracker in commit d57ebe2de7.

Without that code, pulsing the progressbar will stop doing anything
after 3 iterations.
2018-06-26 04:14:25 +02:00
Matthias Clasen
b9b62fca0c Don't forget to dist open-type-layout.h
This is a private header, but it still needs to end up in the tarball.
2018-06-25 18:51:45 -04:00
Matthias Clasen
03c1c604dd Merge branch 'issue1170' into 'gtk-3-24'
modules: fix gtk-2.0 paths to gtk-3.0

See merge request GNOME/gtk!211
2018-06-25 21:13:24 +00:00
Matthias Clasen
504574b6be Merge branch 'mcatanzaro/#1174' into 'gtk-3-24'
imwayland: Fix a small leak

See merge request GNOME/gtk!218
2018-06-25 18:57:52 +00:00
Michael Catanzaro
efb934c07f imwayland: Fix a small leak
If the parent get_preedit_string implementation returns a nonnull
zero-length string, then we ignore it, which is almost fine. We have to
free it, though.

Fixes #1174
2018-06-24 15:49:46 -05:00
Timm Bäder
69adcc46c9 Merge branch 'wip/chergert/no-compressed-ui' into 'gtk-3-24'
build: use xml-stripblanks with .ui resources

See merge request GNOME/gtk!216
2018-06-24 06:26:13 +00:00
Jehan
593edacb48 gtk: also recolor circle and ellipse in symbolic SVG icons. 2018-06-23 16:14:01 -04:00
Christian Hergert
f05865ad3a build: use xml-stripblanks with .ui resources
This adds a preprocess step to the .ui files to strip them of blank
characters. It also removes the compressed='true' from the .ui files since
that involves creating lots of decompressor objects when creating widgets.
Doing so has runtime overhead and slows down the creation of initial
application windows.

The .ui files are left compressed for the Inspector, since that is not in
the core performance path of application startup.
2018-06-23 12:42:25 -07:00
Roddy Shuler
e2efc165d1 modules: fix gtk-2.0 paths to gtk-3.0
Both print backends and configuration files for multipress are being
installed in the wrong directory, so let's fix that.
2018-06-22 13:53:43 +01:00
Matthias Clasen
0997ffbc5b Update NEWS 2018-06-21 18:56:00 -04:00
Daniel Boles
9156908a3a EmojiCompletion: Avoid un/signed compare warnings
(A) Use gsize to match the result of g_variant_n_children
(B) Use guint for n_matches, like the struct (and all other n_matches)
2018-06-20 20:36:19 +01:00
Daniel Boles
934b40f4f3 EmojiCompletion: Use Box:spacing instead of CSS
master uses CSS border-spacing, but that is not available in GTK+ 3.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1166
2018-06-20 20:33:45 +01:00
Daniel Boles
7dbd3da2dd Adwaita: Don't use a property that GTK+ 3 lacks
border-spacing was not backported (yet?). If it won't be, then a
suitable replacement is needed. Until then, avoid the runtime error that
can result from using a nonexistent property in our theme.

https://gitlab.gnome.org/GNOME/gtk/issues/1166
2018-06-20 20:24:19 +01:00
Daniel Boles
848a524d95 Adwaita: Regenerate CSS for emoji completion popup
Commit 65bb238a3f forgot this bit.
2018-06-20 19:37:45 +01:00
Daniel Boles
7f91af2516 HC: Avoid excessive selectors from prev commit
The new rule does not need to affect all those other pseudoclasses. I
just put it in the wrong scope.
2018-06-20 19:26:29 +01:00
Daniel Boles
3f48bba79b gtk3-sections: Add GtkInfoBar.[gs]et-revealed()
https://gitlab.gnome.org/GNOME/gtk/issues/1165
2018-06-20 19:15:21 +01:00
Daniel Boles
b1997c96ea InfoBar: Fix wrong type in copy-pasted param doc
https://gitlab.gnome.org/GNOME/gtk/issues/1165
2018-06-20 19:15:21 +01:00
Daniel Boles
4c61ff2a3a HC: Avoid same BG/FG colors in flat treeview entry
Selected rows in tree views in HighContrast have a background colour the
same or nearly as the normal text colour, so we cannot let entries in
such rows have transparent backgrounds, or the text inside the entry
becomes nearly or totally impossible to see.

Dodge this by giving entry.flat inside treeview and with :focus the
$base_color, which is different from the text & so lets that be seen.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/125
2018-06-20 19:15:21 +01:00
Benjamin Otte
0a37b564d4 x11: Add necessary NULL check
(Backported from master 3438dcdd4e)
2018-06-20 20:02:01 +02:00
Matthias Clasen
5265514c66 Merge branch 'wip/dboles/searchenginetracker-plug-3' into 'gtk-3-24'
searchenginetracker: Don't leak the hits' GFiles

See merge request GNOME/gtk!206
2018-06-20 16:13:04 +00:00
Daniel Boles
3ebcc5a7d5 searchenginetracker: Don't leak the hits' GFiles 2018-06-20 10:04:13 +01:00
Matthias Clasen
380ec086eb Merge branch '1160-crash-clearing-gtkentry-icon-tooltip' into 'gtk-3-24'
Resolve "Crash clearing GtkEntry icon tooltip"

See merge request GNOME/gtk!204
2018-06-19 19:40:42 +00:00
Daniel Boles
004b24a818 a11y/entry: Fix copy-pasteo re 2ndary icon tooltip
The else case was wrongly resetting the accessible description on the
primary icon, which might not exist and can therefore cause a crash.

https://gitlab.gnome.org/GNOME/gtk/issues/1160
2018-06-19 18:38:49 +01:00
Matthias Clasen
70d035ae95 Merge branch 'patch-1' into 'gtk-3-24'
wayland: Use shm_open(SHM_ANON) on FreeBSD

See merge request GNOME/gtk!203
2018-06-19 15:43:40 +00:00
myfreeweb
055c1b2faa wayland: Use shm_open(SHM_ANON) on FreeBSD
This functionality is similar to Linux's memfd. It creates anonymous shared memory without touching the filesystem, which allows it to work in Capsicum capability mode (sandbox).
2018-06-19 14:49:18 +00:00
Benjamin Otte
01d1bc3c75 x11: Always set None pixmap for no background
None means no background, so it's always the correct thing to use and
ParentRelative is always wrong.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1134
2018-06-19 16:43:56 +02:00
Chun-wei Fan
defbbb95e9 gtk/gtkemojicompletion.c: Fix build on C89 and non-GCC
Declare variables at the top of the clock, and ensure that we don't try
to use g_autoptr(), which is a GCCism.
2018-06-19 18:30:22 +08:00
Chun-wei Fan
aa76abbbeb gtk/language-names.c: Fix build on non-GCC/CLang
Remove g_auto*() usage from these sources and use the traditional
g_free(), as g_auto*() are GCCisms (or CLangisms).

Also, don't include unistd.h unconditionally and stop including
langinfo.h and dirent.h, since they seem to be unused.

Partially cherry-picked from a4c0395343

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2018-06-19 18:23:22 +08:00
Matthias Clasen
a0b0cbe98d Merge branch 'window-activate-grab-3-again-24' into 'gtk-3-24'
gdk: activate surface on keyboard grabs

See merge request GNOME/gtk!176
2018-06-18 11:24:36 +00:00
Samuel Thibault
f23bfc6b69 gdk: activate surface on keyboard grabs
In 01455399e8 ("gdk: do not deactivate surface on keyboard grabs"), we
made gdk avoid deactivating surfaces when another application takes a
keyboard grab, by using has_focus_window instead of has_focus. That however
broke activating surfaces when the gdk application acquired a grab itself,
in which case has_focus_window is false but has_focus is true.

We thus actually need to use both: surfaces should be activated either
because we have normal keyboard focus, or because we grabbed the keyboard.

This also renames HAS_FOCUS to APPEARS_FOCUSED to better reflect its
role.

Fixes #85

(cherry picked from commit 3287ac96e02ff236d74db10164c5b0c1e7b2b0bf)
2018-06-18 10:32:02 +02:00
Руслан Ижбулатов
fc2008f240 GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied
There is no reason why we shouldn't pass this flag every time
Z-order changes. We have separate routines that are used to
maintain relative Z-order, so it should be completely OK to
pass SWP_NOOWNERZORDER to let the OS know that it shouldn't try
to maintain relative Z-order of the windows when raising them.
2018-06-17 10:48:48 +00:00
Руслан Ижбулатов
96be612c48 GDK W32: Don't let TEMP surfaces cause zorder side-effects
Pass SWP_NOOWNERZORDER when rising TEMP surfaces to the top. This ensures that
they don't drag anything else to the top with them. The use-case for this is
a tooltip (which must be on top) appearing for a non-foreground surface,
causing said surface to rise above other surfaces, some of which may
be foreground at the moment.

https://bugzilla.gnome.org/show_bug.cgi?id=784766

Fixes issue #852
2018-06-17 10:44:04 +00:00
Mohammed Sadiq
61f37b2b0d search-bar: Fix link to search-bar example
The master branch is now Gtk4. We should be linking to
stable branch here.
2018-06-16 10:35:55 +05:30
Michael Natterer
c0ba041c73 gtk: fix wheel scrolling for very small adjustment page_size
For very small page sizes of < 1.0, the effect of pow() is the
opposite of what's intended and the scroll steps become unusably
large, make sure we never get a scroll_unit larger than page_size /
2.0, which used to be the default before the pow() magic was
introduced.
2018-06-12 18:53:12 +02:00
Victor Toso
2c8b95a518 gdkseatdefault: Don't hide GdkWindow on grab failure
Application is not expecting that.

Bug found due gdk_seat_grab() failure on Lock Screen. When user
Unlock the screen, the application is visible but does not receive
enter-event any more on X11/GNOME.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1485968
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1571422

Signed-off-by: Victor Toso <victortoso@redhat.com>
Signed-off-by: Carlos Garnacho <mrgarnacho@gmail.com>
2018-06-11 08:16:26 -04:00
Piotr Drąg
f62ee9f74a Update Polish translation 2018-06-10 15:31:47 +02:00
Matthias Clasen
a7eb696314 Merge branch 'lrn/gks_vk_menu' into 'gtk-3-24'
GDK W32: Don't forget to check VK_MENU and set MK_ALT

See merge request GNOME/gtk!181
2018-06-08 10:54:42 +00:00
Matthias Clasen
f7cee65268 Merge branch 'wip/tchaik/fontconfig-timestamp' into 'gtk-3-24'
wayland: Implement 'gtk-fontconfig-timestamp' & 'gtk-modules'

See merge request GNOME/gtk!157
2018-06-07 19:52:02 +00:00
Matthias Clasen
81878617c7 Merge branch 'gtk-3-24' into 'gtk-3-24'
Fix reference to user styles in gtkstyleprovider.h

See merge request GNOME/gtk!183
2018-06-07 18:30:48 +00:00
Mohammed Sadiq
5591076361 font-button: Suggest non deprecated function in docs
gtk_font_button_get_font_name() has been deprecated in 3.22 and
its public API is removed from GTK4.
2018-06-07 15:49:28 +05:30
Matijs van Zuijlen
37ec227dc1 Fix reference to user styles in gtkstyleprovider.h 2018-06-07 08:49:59 +00:00
Jordi Mas
c3737ca316 Update Catalan translation 2018-06-06 18:58:34 +01:00
Jordi Mas
a1ef678ee7 Update Catalan translation 2018-06-06 08:25:49 +01:00
Руслан Ижбулатов
3200c0390d GDK W32: Don't forget to check VK_MENU and set MK_ALT 2018-06-06 01:06:38 +00:00
Matthias Clasen
7e0b9704ed Merge branch '1088-getting-css-properties-defined-in-em-etc-in-px-rounds-toward-0-delivering-1-too-few-pixels' into 'gtk-3-24'
Resolve "Getting CSS properties defined in em (etc.) in px rounds toward 0, delivering 1 too few pixels"

See merge request GNOME/gtk!158
2018-06-05 22:12:45 +00:00
Daniel Boles
daecee75b4 CssGadget: Round px values up for min-width|height
Otherwise, requesting a min size in em where the equivalent in px had a
fractional part would lead to the gadget getting allocated 1 too few px.
You could see this in the CSS property vs. allocation in the Inspector.

Note that margin/border/padding are left alone: the rationale is that we
do as browsers do, and Benjamin said we already do that for those,
whereas his tests on min-(width|height) showed otherwise.  My subsequent
analysis indicated it to be far less clear-cut than that, but he remains
unconvinced that we should ceil() all the things! So just do these ones.

https://gitlab.gnome.org/GNOME/gtk/issues/1088
2018-06-05 18:42:45 +01:00
Matthias Clasen
700d167b9e docs: Add indices for 3.24 api
We have some now.
2018-06-05 13:07:05 -04:00
Matthias Clasen
f6a0dfeb4d Add new fontchooser api to the docs
We have docs.
2018-06-05 13:06:08 -04:00
Matthias Clasen
8500b1209a Add gdk_window_move_to_rect to the docs
We have docs.
2018-06-05 13:00:11 -04:00
Matthias Clasen
018be97e30 Merge branch 'wip/move-to-rect-public-gtk-3-24' into 'gtk-3-24'
gdk: Make gdk_window_move_to_rect public (gtk-3-24)

See merge request GNOME/gtk!180
2018-06-05 16:57:46 +00:00
Jonas Ådahl
9b3c745fc4 gdk: Make gdk_window_move_to_rect public
This is the API used by GtkMenu to properly position menus on the screen
without requiring GTK to query the menu window's position or the work
area of where the window is positioned. It makes it possible to position
popup windows properly when using Wayland.

Make this API available to external users so custom popup windows can be
positioned properly as well.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/997
2018-06-05 15:01:52 +02:00
Matthias Clasen
91748d1aa3 Update NEWS 2018-06-04 18:58:08 -04:00
Matthias Clasen
c7168f48d5 Bump version to 3.23.0
Yes, we are adding some api here.
2018-06-04 18:58:08 -04:00
Matthias Clasen
51aa16346e Miscellaneous font chooser fixes
Fix various oversights in the backports of the
font chooser features.
2018-06-04 18:58:08 -04:00
Matthias Clasen
dfe04d0c9a font chooser: Make the language property writable
This is meant as an input to the font chooser.
We don't want the user to select a language, but
rather have fonts presented as they would work for
the current language. Therefore, do away with the
lang/script combo on the tweak page.
2018-06-04 18:58:08 -04:00
Matthias Clasen
71acf23697 font chooser: Add examples for font features
For some font features, we can figure out affected
glyphs, and show before/after. For some others, we
hardcode typical sequences.

Still to do: figure out how to find ligatures and
show them.
2018-06-04 18:58:08 -04:00
Matthias Clasen
19b9659cce Add a 3.24 version 2018-06-04 18:58:08 -04:00
Matthias Clasen
83159ffabf Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkWindow: Handle non-square icons with height > width correctly

See merge request GNOME/gtk!173
2018-06-03 23:21:33 +00:00
Christian Stadelmann
d4feb8929e GtkWindow: Handle non-square icons with height > width correctly 2018-06-03 21:05:46 +02:00
Matthias Clasen
7951f0e9a9 menu: Remove unstable annotations
These apis are not going to change in GTK+ 3.x.
2018-06-03 09:48:40 -04:00
Matthias Clasen
1f37cbfbfd Drop Ctrl-Shift-e support
Now that we have Emoji completion, drop the rather limited
Ctrl-Shift-e support in GtkIMContextSimple, and leave this
sequence to input methods.
2018-06-03 09:43:28 -04:00
Matthias Clasen
f595791492 widget-factory: add emoji completion to an entry 2018-06-03 09:43:28 -04:00
Matthias Clasen
09e3529d0e entry: Add emoji completion
Pop up completions when the text in the entry matches :word:
This functionality has to be enabled using the enable-emoji-completion
property.
2018-06-03 09:43:28 -04:00
Matthias Clasen
65bb238a3f Add an emoji completion popup
This widget provides entry completion-like functionality
for Emoji codes like 😁 or 💋.
2018-06-03 09:43:28 -04:00
Matthias Clasen
7e9ae85dd4 Export some entry functions privately
This will be used in the following commits.
2018-06-03 09:43:28 -04:00
Matthias Clasen
d0f7364260 emoji: Hide recent section when empty
This is part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-06-03 09:43:28 -04:00
Matthias Clasen
a628e03042 emoji: Improve section scrolling
Leave some space above the section heading when scrolling.

This is a part of https://gitlab.gnome.org/GNOME/gtk/merge_requests/143
by Julian Sperber.
2018-06-03 09:43:28 -04:00
Jordi Mas
f1d9ccd6c7 Update Catalan translation 2018-06-03 12:13:19 +02:00
Christian Hergert
d6a29e1b8c treeview: respect expander-size style property
Without enforcement to the expander-size, we can end up rendering icons
rather fuzzy. This uses the expander-size style property to determine
the square for the icon, centered on what was the calculated space for
the expander.
2018-06-01 11:04:45 -04:00
Mohammed Sadiq
1918fefbd4 widget: Fix example code in doc 2018-05-31 18:23:10 +05:30
Martin Blanchard
cbc8d39887 wayland: Implement'gtk-fontconfig-timestamp' & 'gtk-modules'
The 'gtk-fontconfig-timestamp' and 'gtk-modules' settings are
currently not available at all on Wayland. On X11, they are
implemented through xsettings maintained up-to-date by
gnome-settings-daemon.

This patch implements both GtkSettings for Wayland using a
new dbus interface also provided by gnome-settings-daemon.

Closes #886
2018-05-30 19:26:24 +01:00
Jason Zaman
866050d015 gtksocket: Adjust X sizes by scale-factor
X uses unscaled sizes, so they must be scaled properly. Otherwise
GtkSockets end up twice as big as they should be.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=765327
Signed-off-by: Jason Zaman <jason@perfinion.com>

Close !165
2018-05-30 11:37:12 +01:00
Emmanuele Bassi
9ac7f906aa Merge branch 'gtksocket-scale-3-22' into 'gtk-3-22'
gtksocket: Adjust X sizes by scale-factor

See merge request GNOME/gtk!164
2018-05-30 10:18:56 +00:00
Matthias Clasen
e0206cafcd Merge branch 'gesture-docs' into 'master'
Gesture stuff

See merge request GNOME/gtk!169

(cherry picked from commit 8b24d59cde)

334c7911 gesture: Fix get_last_event() docs
e9765c04 gesture: Fix code snippet
4d2b39d9 gesturemultipress: Don’t fire ::released after ::cancel
2018-05-30 06:01:40 +00:00
Matthias Clasen
7e0db63601 Merge branch 'gesture-docs' into 'master'
Gesture stuff

See merge request GNOME/gtk!169

(cherry picked from commit 8b24d59cde)

334c7911 gesture: Fix get_last_event() docs
e9765c04 gesture: Fix code snippet
4d2b39d9 gesturemultipress: Don’t fire ::released after ::cancel
2018-05-30 05:59:02 +00:00
Matthias Clasen
a73fa04e92 x11: Don't set NET_WM_PID when sandboxed
It is not useful, and some window managers misinterpret it and
add some "runs as root" indication to the window decoration.

See https://github.com/mate-desktop/marco/issues/301
2018-05-29 20:31:32 -04:00
Matthias Clasen
929a19ca89 gdk: Add a private api to find sandboxes
This will be used in more places in the future.
2018-05-29 20:27:05 -04:00
Daniel Mustieles
83c53369a1 Update Spanish translation 2018-05-28 15:53:58 +00:00
Daniel Boles
f040918ffa gdkdnd: Fix 2 typos in docs 2018-05-27 18:10:16 +01:00
Christoph Reiter
f888b4958e ci: update the docker image to fedora 28
So we get a newer pango
2018-05-27 18:38:28 +02:00
Matthias Clasen
38b796d2c3 Merge branch 'gtk-3-24' into 'gtk-3-24'
icontheme: Keep dir_mtimes in order

See merge request GNOME/gtk!162
2018-05-27 15:50:45 +00:00
Piotr Drąg
8a9d78ccc5 Update Polish translation 2018-05-27 08:16:50 +02:00
Piotr Drąg
eac2f9b622 Update POTFILES.in and POTFILES.skip 2018-05-27 08:03:18 +02:00
Daniel Boles
bd82962e21 SpinButton: Fix an obviously wrong arg description
:climb-rate is not about what you get when you single-click on a button,
as this implied: it's what happens if you hold down a button or a key.
Fix the description of @climb_rate to new(), and while here, mention the
key in the blurb of :climb-rate itself.
2018-05-26 01:07:19 +01:00
Daniel Boles
6ff7fdfdc4 GdkWin: Avoid leak if bailing from process_updates
There is no point creating the list if we don't need to because we are
failing out, and even less point in leaking it in that case.
2018-05-25 21:10:58 +01:00
Daniel Boles
2d12660916 StyleContext: Add a missing apostrophe
(or rather, the right single quote dictated by the HIG, which is
semantically not an apostrophe at all! I will die on this hill.)
2018-05-25 21:10:58 +01:00
Olivier Fourdan
cc4dd0d343 wayland: check native window for crossing events
gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab window,
so if the grab is issued on a child gdk window, those won't match and we
would emit more focus_out events than focus_in events.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the window and releases the grab when it
leaves the window would get uneven numbers of focus_in/focus_out events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native windows to emit crossing events when needed that get
called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk_Wayland
_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/792
2018-05-25 21:10:58 +01:00
Jason Zaman
c8b0a0dea5 gtksocket: Adjust X sizes by scale-factor
X uses unscaled sizes, so they must be scaled properly. Otherwise
GtkSockets end up twice as big as they should be.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=765327
Signed-off-by: Jason Zaman <jason@perfinion.com>
2018-05-25 23:48:01 +08:00
Jan Alexander Steffens (heftig)
3bb6670f9c icontheme: Keep dir_mtimes in order
Don't reverse the order each time we insert a theme. Reverse it only
once, after all themes have been loaded.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1115
2018-05-23 20:09:42 +02:00
Carlos Garnacho
d354000680 Merge branch 'bz780422' into 'gtk-3-22'
wayland: check native window for crossing events

See merge request GNOME/gtk!147
2018-05-22 11:06:35 +00:00
Daniel Boles
a7cd20823d StyleContext: Don't advise using invalidate()
It's deprecated. Also, set_screen() is not used/needed in the demo cited
2018-05-21 23:40:11 +01:00
Matthias Clasen
abcc477317 Remove the "without parent" warning
We've had it for a long time, and it hasn't really made
a difference. And I don't think we are prepared to turn
this into a hard error. So just drop it.
2018-05-21 17:17:21 -04:00
Daniel Boles
6b30de9487 Range: Up should only mean ++ if we are a GtkScale
The last round of patches to get the desired direction of value move in
response to scrolls/keypresses on scales had the inadvertent side effect
of giving the opposite direction on scrollbars. Seeing as gtkrange.c is
already a collection of hacks, add another so that fix only holds if the
instance is a GtkScale, since that is what those patches were aimed at.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1065
2018-05-21 20:08:05 +01:00
Daniel Boles
f3fa34e850 ProgressBar: Fix typo in doc comment 2018-05-21 20:08:05 +01:00
Daniel Boles
4c39e06f45 Range: Up should only mean ++ if we are a GtkScale
The last round of patches to get the desired direction of value move in
response to scrolls/keypresses on scales had the inadvertent side effect
of giving the opposite direction on scrollbars. Seeing as gtkrange.c is
already a collection of hacks, add another so that fix only holds if the
instance is a GtkScale, since that is what those patches were aimed at.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1065
2018-05-21 20:07:42 +01:00
Daniel Boles
87f454ebd3 ProgressBar: Fix typo in doc comment 2018-05-20 19:28:28 +01:00
Matthias Clasen
f30ecaa22f font chooser: Support font variations
Add sliders for the axes on the tweak page.
2018-05-18 09:31:15 +01:00
Matthias Clasen
6271326718 font chooser: Add properties for font features and language
These can't be returned as part of the font description,
so we need new api for them. For now, this is just readonly
properties. Maybe these should be writable too, eventually.
2018-05-18 09:31:15 +01:00
Matthias Clasen
d60cd1f49f font chooser: Add font features
Populate the tweak page with OpenType font features.
2018-05-18 09:31:15 +01:00
Matthias Clasen
b57e10ad60 font chooser: Add a tweak page 2018-05-18 09:31:15 +01:00
Matthias Clasen
cc35a35752 font chooser: introduce font chooser levels
This is a more systematic approach to reducing the
level of detail in the font chooser.
2018-05-18 09:31:15 +01:00
Matthias Clasen
90c9a4ba05 Bump the pango requirement
We want to use the new font variation api in pango 1.41.
2018-05-18 09:31:15 +01:00
Matthias Clasen
2f58c7c060 Add a flatpak manifest for widget-factory
This makes it easier to build GTK+.
2018-05-17 19:28:28 +01:00
Matthias Clasen
08f31f8f4a Merge branch '1053-scroll-cursor-gets-left-behind-if-a-child-widget-steals-the-scroll' into 'gtk-3-22'
Resolve "Scroll cursor gets left behind if a child widget steals the scroll"

See merge request GNOME/gtk!134
2018-05-17 15:19:49 +00:00
Matthias Clasen
f2868f5cf3 textview: Don't scroll for pastes in another view
GtkTextView scrolls to the insertion point when the text
buffer signals a paste is done. This is wrong when there
are multiple views on the same buffer, and the paste
happened in another view.

To fix this, flip the handling of the scroll_after_paste
boolean to only be TRUE if we know that we want to scroll.
2018-05-17 11:06:46 +01:00
Benjamin Otte
0caa3dbccf Merge branch '1069-thread-1-glade-received-signal-sigfpe-arithmetic-exception' into 'gtk-3-22'
Resolve "Thread 1 "glade" received signal SIGFPE, Arithmetic exception."

See merge request GNOME/gtk!151
2018-05-16 12:48:46 +00:00
Mohammed Sadiq
d219596212 appchooserdialog: Fix memory leak 2018-05-13 14:51:00 +01:00
Mohammed Sadiq
26b6071db8 appchooserdialog: Don't fire notify::heading twice
The gtk_app_chooser_dialog_set_heading() function do emit
notify::heading. Since the setter simply calls the function,
the setter itself shouldn't emit a notify signal by itself.
2018-05-13 14:51:00 +01:00
Mohammed Sadiq
7886c645c4 textview: Always show select-all button in touch popup
"Select all" action is possible regardless of the text selection state
or if the text is editable or not.
2018-05-13 14:51:00 +01:00
Mohammed Sadiq
a8363a9887 textview: Simplify creating bubble action buttons
Buttons can be created simply with gtk_button_new_from_icon_name().
2018-05-13 14:51:00 +01:00
Juan Pablo Ugarte
87aed887be GtkBox: do not divide by zero on gtk_box_size_allocate_with_center()
https://gitlab.gnome.org/GNOME/gtk/issues/1069
2018-05-12 11:06:37 -03:00
Chun-wei Fan
0dde06124e Visual Studio 2008 builds: Generate gtk/gtktypefuncs.c
This is the updates to the Visual Studio 2008 projects to generate
gtk/gtktypefuncs.c using the preprocessor and the gentypefuncs.py that
was adapted from master.

Unfortunately we could not clean up the projects as we did for the 201x
ones due to the differences in project file format.
2018-05-12 11:03:55 +08:00
Chun-wei Fan
1d02739992 Visual Studio 201x builds: Clean up project files
Combine repetitive parts, and unify using $(PythonDir) for all builds,
which the paths set in the property sheets are now based on the Visual
Studio version and platform combination.
2018-05-12 10:52:47 +08:00
Chun-wei Fan
a8262c7581 Visual Studio 201x builds: Fix previous commit
Not that it will make a difference, but to be consistent with the
autotools builds.  Include gtkx.h instead of gtk.h when we generate the
source to feed to the preprocessor.
2018-05-12 10:24:59 +08:00
Chun-wei Fan
1517acee55 Visual Studio 201x builds: Generate gtk/gtktypefuncs.c
We now need to generate gtktypefuncs.c by ourselves, so modify the
gentypefuncs.py script from master, and add a custom build step in the
projects to generate gtktypefuncs.c.  The custom build step for the 2008
projects will be added later.
2018-05-12 01:15:33 +08:00
Matthias Clasen
7b3129ad4f Merge branch 'wip/restart-cursor-animation-gtk-3' into 'gtk-3-22'
wayland: Fix restarting cursor animation

See merge request GNOME/gtk!150
2018-05-11 15:24:55 +00:00
Chun-wei Fan
95e6a0650b gtk/Makefile.am: Fix Visual Studio project generation
We now need the generated sources to be included explicitly in the list
so that they get listed in the project files to be built.
2018-05-11 18:05:46 +08:00
Jonas Ådahl
7edd465f6d wayland: Fix restarting cursor animation
When an animated cursor was set and the previous cursor animation delay
happened to be the same, we wouldn't restart the animation timeout and
just return G_SOURCE_CONTINUE assuming the timer would continue. This
assumption is however only valid if the function was called from the
timeout, which is not the case.

Instead also arm the timer also if there is no previous timer active.
2018-05-09 22:13:10 +02:00
Olivier Fourdan
cd5502ddf4 wayland: check native window for crossing events
gdk_wayland_*_grab()/ungrab() would emit crossing events which translate
as focus_in/focus_out events for keyboard.

However, the ungrab() functions compare the native toplevel as this is
what gets the Wayland pointer enter/leave events with the grab window,
so if the grab is issued on a child gdk window, those won't match and we
would emit more focus_out events than focus_in events.

This means that a widget such as spice-gtk which issues a keyboard grab
whenever the pointer enters the window and releases the grab when it
leaves the window would get uneven numbers of focus_in/focus_out events.

Also, gdk_wayland_seat_ungrab() would not emit crossing events for
keyboard devices, whereas gdk_wayland_device_ungrab() does, which adds
even more potential discrepancies between focus_in/focus_out events.

To solve this problem, introduce two new helper functions which check
the relevant native windows to emit crossing events when needed that get
called evenly from both gdk_wayland_seat_grab()/ungrab() and gdk_Wayland
_device_grab()/ungrab() APIs.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=780422
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/792
2018-05-09 15:49:35 +02:00
John Ralls
828f634d5c [Quartz] Hardcode screen resolution for text at 96.0.
It seems that CoreText is internally calibrated for this, see
https://bugzilla.gnome.org/show_bug.cgi?id=787867 for a detailed
discussion.
2018-05-08 17:58:00 -07:00
Benjamin Otte
85fa6ba631 gtk: Fix reserved pointers
So gcc stops complaining about unnecessary parenthesis.

Closes #1059
2018-05-07 22:02:56 +02:00
Björn Lindqvist
893fc1dec4 Range: Bin pointless check before emitting signal
In scroll_event(), there is no need to check whether we are realized
before emitting ::change-value, as we must be when receiving an event.

Git-formatted/rebased/cleaned up by Daniel Boles <dboles.src@gmail.com>

Close https://gitlab.gnome.org/GNOME/gtk/issues/292
2018-05-06 19:58:15 +01:00
Daniel Boles
96774e8b5c Menu: cleanups for previous commit and nearby
• #include <math.h> for the new uses of floor()
• Move the new ints and popdown_data into the scopes where they are used
• Don’t pointlessly init other ints to 0 as they always get reassigned
• Burninate gint
2018-05-06 11:49:11 +01:00
Sam Douglas
f443dbe8c1 Menu: Fix broken navigation triangle/hysteresis
This issue was caused when mouse coordinates were changed to floating
point values in commit e8b38fedbd.

This patch floors the event->x_root and event->y_root values when
setting the navigation region, so the previous behaviour is restored.

https://gitlab.gnome.org/GNOME/gtk/issues/450
2018-05-06 11:49:01 +01:00
Daniel Boles
133e8fc03f ScrolledWindow: Unset cursor if child takes scroll
https://gitlab.gnome.org/GNOME/gtk/issues/1053
2018-05-05 11:45:43 +01:00
Benjamin Otte
2ce63a86ba x11: Set a transparent background on windows by default
This avoids black flicker on compositing WMs when a window is first shown.
2018-05-04 13:46:46 +02:00
Matthias Clasen
609cb85f3a emoji chooser: Match search terms better
Use g_str_match_string for better results.

cherry-pick of be2853e5de

https://gitlab.gnome.org/GNOME/gtk/issues/898
2018-05-04 09:45:44 +01:00
Matthias Clasen
cb56bbe430 Merge branch 'wip/lantw/gtk3-use-dev-evdev-input-h-on-freebsd' into 'gtk-3-22'
wayland: Use dev/evdev/input.h on FreeBSD (GTK3)

See merge request GNOME/gtk!132
2018-05-02 10:56:25 +00:00
Jiri Grönroos
8fc72c902d Update Finnish translation 2018-05-01 19:47:02 +00:00
Ting-Wei Lan
a9f0704ae1 wayland: Use dev/evdev/input.h on FreeBSD
The header linux/input.h used by GDK is specific to Linux. It is
possible to get a few Linux headers on FreeBSD by installing v4l_compat,
but it is usually better to use the one shipped with FreeBSD.

We prefer dev/evdev/input.h to linux/input.h here, so it will always use
dev/evdev/input.h on FreeBSD regardless of v4l_compat.

https://svnweb.freebsd.org/changeset/ports/465644
2018-05-01 22:00:31 +08:00
Benjamin Otte
33bec5a4fb Merge branch '169-gtktextview-accesses-already-disposed-object-3-22' into 'gtk-3-22'
Resolve "GtkTextView accesses already disposed object" in 3.22

See merge request GNOME/gtk!110
2018-04-30 11:57:14 +00:00
Benjamin Otte
279d7bb2f5 Merge branch 'window-activate-grab-3-3' into 'gtk-3-22'
gdk: do not deactivate window on keyboard grabs

See merge request GNOME/gtk!127
2018-04-30 09:55:45 +00:00
Samuel Thibault
c926b28d96 gdk: do not deactivate surface on keyboard grabs
When pressing e.g. a window manager shortcut, which acquires keyboard grab,
Xorg would send FocusOut NotifyGrab then FocusIn NotifyUngrab.  Currently
gdk would then deactivate the current surface, which makes accessibility
screen readers think that we have switched to a non-accessible application
and came back again, and thus reannounce the application frame etc. which we
don't want when e.g. just raising volume.

And actually, receiving FocusOut NotifyGrab does not mean losing the
X focus, it only means an application aqcuired a grab, i.e. it is
temporarily stealing keyboard events. On Wayland, this isn't even
notified actually.

This commit makes gdk only deactivate surfaces when there was an actual
focus switch to another window, as determined by has_focus_window (instead
of just has_focus), which happens either normally through FocusOut with
NotifyNormal, or during grabs through FocusOut with NotifyWhileGrabbed.

Fixes #85

(cherry picked from commit 01455399e8)
2018-04-30 11:17:34 +02:00
Руслан Ижбулатов
ff47cb0c51 gtkselection: ensure W32 functions used only for W32 displays (v2)
Another instance of a check needed for gdk_win32_selection_add_targets().
2018-04-26 19:46:24 +00:00
Руслан Ижбулатов
b9bb63b1ab gtkselection: ensure W32 functions used only for W32 displays
gdk_win32_selection_add_targets() is for W32 displays only.
2018-04-26 19:36:27 +00:00
Руслан Ижбулатов
9ca3bacddf imcontextsimple: ensure W32 code only runs on W32 displays
gdk_win32_keymap_check_compose() shouldn't be called for
non-W32 displays (i.e. when using broadway or other backends
that could be made to run on Windows).
2018-04-26 17:42:49 +00:00
Benjamin Otte
f5482e6954 fishbowl: Port version from GTK 4
This version also merges widgetbowl into fishbowl.
2018-04-26 00:32:44 +02:00
Adrian Johnson
fff08fa319 Add _gtk_printer_get_hard_margins_for_paper_size()
to retreive paper size specific hard margins and use this
to set the hard margins in the print context.
(modified by Marek Kasik <mkasik@redhat.com>)

https://bugzilla.gnome.org/show_bug.cgi?id=686109
2018-04-25 16:28:07 +02:00
Daniel Mustieles
d20101e878 Update Spanish translation 2018-04-25 11:29:02 +00:00
Daniel Boles
af350b20b1 testentrycompletion: Avoid a compiler cast warning
Instead of getting the model again but then forgetting to cast it to a
ListStore, just use the other variable store where we already did both.
2018-04-24 13:43:18 +01:00
Stas Solovey
8535e2e417 Update Russian translation 2018-04-24 10:00:32 +00:00
Emmanuele Bassi
88b08c05c0 wayland: Allow a NULL inhibitors hash table
The shortcuts inhibitors hash table is created when we create a
GdkWaylandWindow implementation for a GdkWindow, and it's destroyed once
we finalize the instance. The fake "root" window we create for the
Wayland display does not have a backing native window, so the shortcuts
inhibitors hash table is set to NULL; this causes a critical error
message when calling g_hash_table_destroy() on it. The finalization of
the root window happens when we close a display connection.

We should use g_clear_pointer(), instead, as it's NULL safe.

Without this change, the displayclose test fails, as all warnings are
considered fatal.
2018-04-23 10:02:43 +01:00
Emmanuele Bassi
dad773b129 build: Do not dist generated files
We expect these files to be regenerated even when building GTK+ from a
release tarball, so there's no point in distributing them if they are
going to be ignored.
2018-04-23 09:13:41 +01:00
Emmanuele Bassi
07124b5e99 x11: Query whether we have GLX support
Epoxy 1.4 has new ad hoc API that we can use to check whether GLX is
available on the current system.

If we didn't use this API, we'd have to manually dlopen libGL (or its
equivalent on different OSes) and check if it had GLX symbols; since
Epoxy already does all of this internally, we can simply ask it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
(cherry picked from commit 02eb344950)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2018-04-23 09:13:41 +01:00
Emmanuele Bassi
ba883b55ee Bump up the dependency of libepoxy
We're going to use API introduced in libepoxy 1.4 to check for GLX
availability.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
2018-04-23 09:13:41 +01:00
Daniel Boles
d35ecbb5a4 themes: Fix a new comment
bah.
2018-04-22 22:21:22 +01:00
Daniel Boles
a3cb26cad7 themes: Fix swapped borders on RTL PathBar buttons
.linked assumes the container is a GtkBox, which is documented as never
flipping children in RTL, so :first-child is always the left child, etc.
GtkBox does that by reordering its CSS nodes when the direction changes.

But most widgets don’t do that, so :first|last-child are 1st/last ADDED
and swap sides in RTL. GtkPathBar is so, and ignoring that in our themes
meant that in RTL, its left/right buttons got each other’s borders. Yuk!

This patch adds the groundwork for supporting widgets like that, via the
%linked_flippable placeholder, and applies that to override buttons in
  filechooser .path-bar.linked > button
so that the correct borders get applied to those buttons when using RTL.

Note that I select only PathBars within a FileChooser because we also
have NautilusPathBar, which also uses widget.path-bar – but *does* flip
its nodes for RTL already, so letting that get affected broke it again!

https://bugzilla.gnome.org/show_bug.cgi?id=772817
2018-04-22 22:05:09 +01:00
Daniel Boles
1ee80fa4c6 MenuButton: popover connects to menu_deactivate_cb
This was missed (even before my recent patches).

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:29:22 +01:00
Daniel Boles
db85e888c7 MenuButton: Disconnect newly added signal handler
Otherwise, we do stuff we shouldn't, as the failing pipeline showed:
https://gitlab.gnome.org/GNOME/gtk/pipelines/9431

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:29:20 +01:00
Daniel Boles
2ba118c961 MenuButton: Clarify NULL popup/over/menu/model doc 2018-04-22 16:11:01 +01:00
Daniel Boles
476d3ea170 MenuButton: Drop ref to Popover on its ::destroy
Otherwise, if the Popover is destroyed before the MenuButton, the latter
still had a non-NULL but invalid instance and tried to use it in dispose

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:11:01 +01:00
Daniel Boles
8cdee69a82 docs/running: Document the GTK_OVERLAY_SCROLLING env var
https://bugzilla.gnome.org/show_bug.cgi?id=786524
2018-04-22 16:11:01 +01:00
Daniel Boles
2c2ea83333 Stock: Emphasise deprecation; explain alternatives
A user in #gtk+ was confused what to do instead of creating a Button via
gtk_button_new_from_stock(). Our docs could stand to be clearer on this
point; it only costs a few lines. So, link from that constructor* to the
GtkStock doc, and add a banner there telling folk they shouldn’t use it.

* not that most [of these][links] even work right now…
2018-04-22 16:11:01 +01:00
Daniel Boles
c2672b4f05 Entry: Show optional style classes in node diagram 2018-04-22 16:11:01 +01:00
Daniel Boles
2d02854685 gdkselection: Clarify that X is only a design base
rather than being a requirement for using our selection APIs.

https://bugzilla.gnome.org/show_bug.cgi?id=791542
2018-04-22 16:11:01 +01:00
Juan Pablo Ugarte
9ae6d09234 a11y/ScrolledWin|IconView: Connect signals safely
Use g_signal_connect_data() instead of g_signal_connect_object()
to make sure the callback gets disconnected when the data object
is destroyed. This avoids problems in garbage-collected bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=789215
2018-04-22 16:11:01 +01:00
Matthias Clasen
21fddc3994 printing: Be more careful when deserializing
The GVariant we are getting here might not be coming
from GTK+, but rather from some other source. Best to
be forgiving and deal with missing data without crashing.

This was causing the GTK+ portal backends to crash on
print requests from Qt.
2018-04-20 17:57:08 -04:00
Emmanuele Bassi
ecc612b1a2 Merge branch 'stack-set-name-guard' into 'gtk-3-22'
stack: protect set_visible_child_name from NULL stack

See merge request GNOME/gtk!117
2018-04-19 08:38:09 +00:00
Emmanuele Bassi
1945c7a1a8 Merge branch 'gtkplacesview-finalization-fixes-master' into 'master'
Gtkplacesview finalization fixes

See merge request GNOME/gtk!119

(cherry picked from commit e30176a522)

f9452957 gtkplacesview: unset entry_pulse_timeout_id before removing it
4900c3eb gtkplacesview: disconnect from server list monitor changes on destroy
2018-04-19 08:27:27 +00:00
Marco Trevisan (Treviño)
2ee5aee4a9 stack: protect set_visible_child_name from NULL stack
Return with error if gtk_stack_set_visible_child_name is called
with NULL parameter
2018-04-18 21:02:42 -05:00
Daniel Boles
cfbbcf5fc4 UIManager: Document deprecation; link replacements
Close https://gitlab.gnome.org/GNOME/gtk/issues/193
2018-04-18 23:31:47 +01:00
Daniel Boles
7ff9222600 Range: Use should_invert_move() to scroll value
This fixes RTL and/or :inverted Ranges responding to a horizontal scroll
by moving the value/slider button in the opposite direction... See prev.

https://bugzilla.gnome.org/show_bug.cgi?id=791802
2018-04-18 18:33:56 +01:00
Daniel Boles
9b011081c5 Range: Add should_invert_move() for scrolls & keys
This will be used in subsequent commits to fix the sign by which the
value is changed in response to directional scroll or keypress events.

The idea is: you have a movement to make – in the form of a delta that
follows widget directions, i.e. −1 means left or up, +1 means right or
down – and you want to know whether that delta needs to be inverted in
order to produce the intuitively expected directional change of :value.

The existing should_invert() is not sufficient: it just determines
whether to invert visually, but we need more nuance than that for input.

To answer that – while not doubling up the work for scrolls and keys – I
add a helper should_invert_move(), which considers other relevant state:

 • A parallel movement on priv->orientation should just use the existing
   should_invert(), which already worked OK for this case (not others).

 • Movements on the other orientation now depend on priv->orientation:

    ◦ For a horizontal Range, always invert, so up (i.e. −ve in terms of
      widget coords) always means increase value & vice-versa. This was
      done in get_wheel_delta(), but move it here for use with keys too.

    ◦ For a vertical Range, ignore :invert as it’s only relevant to the
      parallel orientation. Do not care about text direction here either
      as RTL locales do not invert number lines, Cartesian plots, etc.

This returns TRUE if the delta should be inverted before applying to the
value, and we can now use this function in both scroll and key handlers.

https://bugzilla.gnome.org/show_bug.cgi?id=407242
https://bugzilla.gnome.org/show_bug.cgi?id=791802
2018-04-17 21:44:16 +01:00
Daniel Boles
0c46d94ec3 Menu|Item: Fix FIXME re non-const interned strings
These are members of the private struct, so it hurts no one to fix this.
2018-04-17 21:07:18 +01:00
Daniel Boles
a7a4a459ea Menu: Sanitise @torn_off gboolean in public API 2018-04-17 21:07:18 +01:00
Daniel Boles
30405ee68c Menu: Remove redundant typecheck in private func
Everything that calls this already ensured we are a valid GtkMenu.
2018-04-17 21:07:18 +01:00
Daniel Boles
b5cc0d8fcd Menu: Document/annotate nullability of 2 API args
.set_accel_path(): Use (nullable) instead of (allow-none), and explain
                   what a NULL means (albeit very briefly)

.set_title(): Annotate @title as (nullable), and explain NULL’s meaning
2018-04-17 21:07:18 +01:00
Daniel Boles
a53bdcd222 Menu: Typecheck AccelGroup passed via public API 2018-04-17 21:07:18 +01:00
Daniel Boles
1d1405edd8 Menu: Typecheck before dereferencing to get ->priv 2018-04-17 21:07:18 +01:00
Daniel Boles
8e24626c49 MenuShell: Sanitise take_focus bool via public API
We store in priv then compare it later, so better make sure it’s 0 or 1.
2018-04-17 21:07:18 +01:00
Daniel Boles
bcc539ca07 MenuShell: Typecheck the instance @ select_first()
since this is public API and therefore might get junk passed to it.
2018-04-17 21:07:18 +01:00
Daniel Boles
60b4a3869a Merge branch '154-documentation-lifecycle-of-editables-inside-gtkcellrenderers-is-not-clear' into 'gtk-3-22'
Resolve "Documentation: Lifecycle of Editables inside GtkCellRenderers is not clear"

See merge request GNOME/gtk!97
2018-04-17 18:06:33 +00:00
Daniel Boles
7f846ce7d8 CellRenderer: Link to CellEditable.start_editing()
...from CellRenderer::start-editing, to point people in the direction of
info about the lifecycle of the Editable and how to do generic setup.

https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 18:28:43 +01:00
Daniel Boles
2e21a2256e CellRenderer: Clarify doc of .start_editing()
Drop the line copied from .activate(), replace it with a description of
what this method actually does, and explain what a NULL result means.

https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 18:28:43 +01:00
Daniel Boles
bbcfc261e0 CellRenderer: Entry is not the only CellEditable
so link to GtkCellEditable and note that GtkEntry is just one example.
2018-04-17 18:28:43 +01:00
Daniel Boles
4ccbe10571 CellRenderer|Editable: Don't @See_also subclasses
The documentation knows that from the inheritance hierarchy, without us
having to manually duplicate that info here. Link to each other instead.
2018-04-17 18:28:43 +01:00
Daniel Boles
b48fbcbb7c CellEditable: Clarify doc on lifecycle of editable
* Note in the intro that we're really thinking about temporary widgets
* Mention a gotcha regarding GtkEntry and how ::focus-out stops editing
* Give some examples of what you'd want to do in ::editing-done
* Be a bit more precise about what ::remove-widget represents
* Summarise the lifecycle between Renderer/Editable in .start_editing()
* Emphasise again there that this should be viewed as a temporary widget

https://gitlab.gnome.org/GNOME/gtk/issues/154
2018-04-17 18:28:43 +01:00
Daniel Boles
c2da6fc299 CellEditable: Move arg description to right place
Move it from the body to the argument line, and while there, update
the deprecated (allow-none) to (nullable).
2018-04-17 18:28:43 +01:00
Daniel Boles
2ba6dcbce5 CellEditable: Fix grammar error in doc synopsis 2018-04-17 18:28:43 +01:00
Christoph Reiter
b19c524a83 ci: move docker images to gitlab.gnome.org 2018-04-17 18:26:40 +02:00
Emmanuele Bassi
16a6c39a9b Merge branch 'm4macros-gtk3' into 'gtk-3-22'
[gtk3] m4macros: Set a serial number

See merge request GNOME/gtk!103
2018-04-17 15:21:17 +00:00
Marek Kasik
8da5111edd TextView: Don't access already disposed text mark
Instead of asking of TextMark for its buffer,
let's reference also the buffer in the SelectionData.

Closes #169
2018-04-17 16:07:05 +02:00
Matthias Clasen
2e7ac262be 3.22.30 2018-04-16 14:06:02 -04:00
Aron Xu
cb71d083ab po: fix zh_CN translation 2018-04-14 13:10:27 +08:00
Benjamin Otte
b47bdda271 widget: Add a frameclock_connected boolean
... and use it to not connect anything to the frameclock if it isn't
set.

This gets around the problem that the frame clock is disconnected before
GtkWidgetClass.unrealize() is called but the widget is still marked as
realized and the frame clock is available during the vfunc, which makes
calls like gtk_widget_queue_resize() reconnect to the frame clock.

Closes #168
2018-04-11 18:11:39 +02:00
Benjamin Otte
9e926f9a28 examples: Check for error when loading file
People playing with those examples tend to mess up things, so it's
really really unhelpful if we don't do error checking.
2018-04-11 03:11:22 +02:00
Benjamin Otte
5a0759bc1b colorutils: Remove unused macro 2018-04-11 03:11:22 +02:00
Benjamin Otte
d92df4ff2c Merge branch 'gtk-3-22' into 'gtk-3-22'
wayland: Fix setting geometry hints

See merge request GNOME/gtk!98
2018-04-09 20:17:00 +00:00
Emmanuele Bassi
22fd5b5766 docs: Link to GResource
Since we're referring to GLib's functionality, might as well save some
time to the reader, and link to the GResource API reference page.
2018-04-09 20:10:47 +01:00
Emmanuele Bassi
b685eb1779 docs: Fix the Git links for the example apps
The links to the repository's web UI still refer to the old
git.gnome.org cgit UI, and to the master branch; we should be using
GitLab and the gtk-3-22 branch instead.
2018-04-09 20:05:57 +01:00
Daniel Boles
5ee381a596 AccelGroup: Remove @See_also of deleted function
gtk_item_factory_new() is not a thing that exists.

Also, maybe the lack of space after the colon was what stopped the link
from rendering.
2018-04-09 19:43:45 +01:00
Sébastien Villemot
59136773b8 gdk_x11_display_get_monitor: fix monitor number test logic
When asked for a nonexistent (positive) monitor number,
gdk_x11_display_get_monitor would (at best) return an uninitialized pointer,
instead of returning NULL.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/107
2018-04-09 18:27:44 +01:00
Daniel Boles
7a75b89efe testmodelbutton: Test :centered, :icon, :inverted
Test more stuff.
2018-04-08 18:49:26 +01:00
Daniel Boles
b2caaaa3f9 Revert "ModelButton: Properly update indicator on set_role"
This reverts commit ba307aa35e.

This is not needed; see the previous commit for the explanation.

https://gitlab.gnome.org/GNOME/gtk/issues/163#note_94842
2018-04-08 18:49:22 +01:00
Daniel Boles
b7e5a2dd10 testmodelbutton: Fix wrongly overridding MB child
I was setting a GtkButton:label, which resulted in the ModelButton's own
custom children getting lost. That doesn't make for a useful test...

https://gitlab.gnome.org/GNOME/gtk/issues/163#note_94842
2018-04-08 18:49:19 +01:00
Daniel Boles
e52aa73b36 ModelButton: Use WARN_INVALID_PROPERTY, not assert
Do the same thing we do everywhere else for invalid properties.
2018-04-08 18:39:53 +01:00
Daniel Boles
2d415d9354 ModelButton: Fix type Wether => Whether 2018-04-08 17:13:33 +01:00
Daniel Boles
e6e306ae8e testmodelbutton: Add explanatory comments to CSS
and load at an earlier, more sensible place, before creating any widgets
2018-04-08 16:07:35 +01:00
Mohammed Sadiq
79d8c9dff0 listbox: Fix signal name in documentation 2018-04-08 13:46:33 +01:00
Daniel Boles
ba307aa35e ModelButton: Properly update indicator on set_role
Redrawing is insufficient: when :role changes to/from NORMAL, the
indicator gadget reallocates, but we didn't reflect that in the widget.

https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:16:30 +01:00
Daniel Boles
fa520c5769 ModelButton: Protect against nonsensical gbooleans
the same way we do normally.
2018-04-08 13:16:30 +01:00
Daniel Boles
e193cd1cf1 tests/testmodelbutton: Add this
and test whether :action-name, :role, and CSS nodes work as expected

https://gitlab.gnome.org/GNOME/gtk/issues/163
2018-04-08 13:16:30 +01:00
Rūdolfs Mazurs
1bf354aec8 Update Latvian translation 2018-04-07 16:02:54 +00:00
Simon McVittie
31cb0fee9c m4macros: Set a serial number
When a project has a bundled copy of our macro included in tarball
source releases, typically in a m4/ or aclocal/ directory, aclocal
uses the serial number to determine whether the system copy in
/usr/share/aclocal is newer or older than the bundled copy. Without
a serial number, the bundled copy will always be used and will not
be overwritten, even if it is outdated.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-04-06 11:31:49 +01:00
Benjamin Otte
b0b2992165 Merge branch 'textview-delete' into 'gtk-3-22'
gtktextviewaccessible: update cursor position after text suppression

See merge request GNOME/gtk!101
2018-04-04 18:19:05 +00:00
Benjamin Otte
48e40762c7 Merge branch 'text-changed-delete' into 'gtk-3-22'
gtkentryaccessible: Fix text-changed::delete length

See merge request GNOME/gtk!99
2018-04-04 18:17:26 +00:00
Samuel Thibault
fa6994d033 gtktextviewaccessible: update cursor position after text suppression
delete_range_cb is set to be called before the text suppression done by
the gtktextlayout (otherwise it does not work properly). But at that
point the cursor position is not yet up to date.  We thus need to move
the accessibility cursor notification to after the actual text
suppression, by using another callback.

This fixes cursor position in brltty screen reading.
2018-04-04 18:22:16 +02:00
Samuel Thibault
209f908a03 gtkentryaccessible: Fix text-changed::delete length
The second parameter of the text-changed::delete event is to be the length,
not the end position.  This fixes spurious text removals in brltty
screen reading.
2018-04-04 17:56:38 +02:00
Jan Alexander Steffens (heftig)
8e74e515c7 wayland: Fix setting geometry hints
The stable xdg_shell port (5c8bb51a) introduced an error in
gdk_wayland_window_set_geometry_hints which would set the minimum size
to the maximum size, if provided.

This resulted in various wxWidgets apps (FileZilla, Audacity, Veracrypt)
crashing because they attempted to allocate a ginormous surface.

Fixes #157.
2018-04-04 14:38:45 +02:00
Daniel Boles
46dac1aba4 GLArea: Remove wrong transfer annotation on new()
Like other widgets, this returns a floating reference, so
(transfer full) is wrong. Just omit the annotation as others do,
thus implying (transfer none).

Close https://gitlab.gnome.org/GNOME/gtk/issues/156
2018-04-04 12:04:35 +01:00
Matthias Clasen
4b95d74068 wayland: Don't emit signals if nothing changed
We were emitting a preedit-changed even if the preedit text did
not actually change, causing text views to scroll.

https://gitlab.gnome.org/GNOME/gtk/issues/132
https://gitlab.gnome.org/GNOME/gtk/merge_requests/83#note_93411
2018-04-04 09:39:31 +01:00
Robert Antoni Buj Gelonch
34bcc71f4e Update Catalan translation 2018-04-03 17:56:01 +00:00
Carlos Garnacho
7751001ff1 Merge branch 'gtk-3-22' into 'gtk-3-22'
Fix imwayland crashes

See merge request GNOME/gtk!89
2018-04-03 16:42:41 +00:00
Daniel Boles
e42d8598ca ProgressBar: Drop leftover "superimposed" mention
This was missed from the commit that dropped other mentions to the
previous ability to superimpose text.

https://bugzilla.gnome.org/show_bug.cgi?id=748784
2018-03-31 12:27:21 +01:00
Nelson Benítez León
7a11fcf054 appchooserwidget: search text using g_str_match_string()
so we match on diacritics (eg. accented letters) and also
search on text tokens. As a plus we also reduce code size.

https://bugzilla.gnome.org/show_bug.cgi?id=745128
2018-03-31 13:32:42 +05:00
Daniel Boles
154fa9817d themes: Make disabled Expander arrow look disabled
If GtkExpander:sensitive was FALSE, the arrow still got the normal fg
colour, which made it look clickable, in contrast to the adjacent label.
Fix this by adding selectors to catch the applicable :disabled states.

Note: Needing these may indicate an oops in generic styles elsewhere,
but I couldn’t see any, so let’s just get it looking right for now.

https://gitlab.gnome.org/GNOME/gtk/issues/146
2018-03-29 21:00:00 +01:00
Daniel Boles
6e8cc589f2 emojichooser.ui: Reuse headings as button tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=792632
2018-03-29 18:42:39 +01:00
Tomasz Miąsko
56d44fd10c Widget: Fix doc of default ::keynav-failed handler
https://bugzilla.gnome.org/show_bug.cgi?id=793089
2018-03-29 18:29:51 +01:00
Daniel Boles
0102e0f914 HighContrast: Honour .monospace set by GtkTextView
Copy the line that sets a monospace family from Adwaita (same place too)

noticed at https://gitlab.gnome.org/GNOME/gtk/issues/141#note_91610
2018-03-29 18:16:57 +01:00
Nathan Follens
f12b44d697 Update Dutch translation 2018-03-29 13:02:08 +00:00
Марко Костић
b5e959b6ff Update Serbian translation 2018-03-28 20:50:42 +00:00
Lionel Landwerlin
314531640f imwayland: destroy objects only if it matches our manager object
Should fix one of the crash from #129.
2018-03-28 12:11:10 +01:00
Emmanuele Bassi
a0f273465e Merge branch 'wip/smcv/ac-path-tool-2' into 'gtk-3-22'
m4macros: Use PKG_PROG_PKG_CONFIG

See merge request GNOME/gtk!81
2018-03-26 10:45:36 +00:00
Milo Casagrande
3dbeab2b4a Update Italian translation 2018-03-26 10:34:48 +00:00
Cheng-Chia Tseng
f38d8f8c1b Update Chinese (Taiwan) translation 2018-03-26 09:20:17 +00:00
Simon McVittie
a36c564b54 m4macros: Use PKG_PROG_PKG_CONFIG
Signed-off-by: Simon McVittie <smcv@debian.org>
2018-03-26 09:31:31 +01:00
Simon McVittie
323d86b6e4 m4macros: Fix underquoting in AC_PATH_TOOL
While these lines are being changed anyway, they might as well be
more correct.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-03-26 08:58:57 +01:00
Helmut Grohne
3a7fbb3b30 AM_PATH_GTK_3_0: Use AC_PATH_TOOL to find pkg-config
AM_PATH_GTK_3_0 uses AC_PATH_PROG for finding pkg-config. Unfortunately,
that will find the build architecture pkg-config which in turn will miss
the host architecture gtk+3.0. What must be used here is the host
architecture pkg-config and that is found with AC_PATH_TOOL.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894069
Reviewed-by: Simon McVittie <smcv@debian.org>
Fixes: #133
2018-03-26 08:58:40 +01:00
Matthias Clasen
a09df57a5f Merge branch 'gtk-3-22-bz773274' into 'gtk-3-22'
wayland: Don't paint if the window is unmapped

See merge request GNOME/gtk!31
2018-03-25 20:47:02 +00:00
Dz Chen
b0f8426c29 Update zh_CN po and po-properties translations 2018-03-24 00:03:55 +08:00
Daniel Boles
dbaaa701ad HighContrast: Regenerate CSS missing from !50
https://gitlab.gnome.org/GNOME/gtk/merge_requests/50 forgot this.
2018-03-22 21:01:08 +00:00
Nikita Churaev
ef3fe9ead3 theme: Be more selective when adding margins to toolbar items
Only add margins to direct children of toolbar items, this fixes the
gaps between linked buttons inside custom toolbar items.

https://gitlab.gnome.org/GNOME/gtk/merge_requests/66
2018-03-22 20:59:15 +00:00
Matej Urbančič
6551ddd8e0 Updated Slovenian translation ... 2018-03-21 16:01:46 +01:00
Matej Urbančič
332d41792d Updated Slovenian translation ... 2018-03-21 15:58:15 +01:00
Charles Monzat
240cb0bb5a Update French translation 2018-03-21 08:45:43 +00:00
Matthias Clasen
5c8bb51a58 Merge branch 'wip/xdg-shell-gtk-3-22' into 'gtk-3-22'
xdg shell (stable; gtk 3 22)

See merge request GNOME/gtk!36
2018-03-20 16:28:00 +00:00
Cheng-Chia Tseng
68fce76faf Update Chinese (Taiwan) translation 2018-03-20 15:53:58 +00:00
Matthias Clasen
b88bffac23 Merge branch 'wip/carlosg/fix-issue-114' into 'gtk-3-22'
Fix issue #114

See merge request GNOME/gtk!73
2018-03-20 15:31:49 +00:00
Carlos Garnacho
4f78abddfc imwayland: Avoid TOGGLE_INPUT_PANEL requests if there's no focus
Fixes two things: 1) As GTK+ can be coerced into using the wayland IM
module despite the compositor not implementing the interface, all paths
not checking for global state before sending requests are prone to
crashes, this one fell hit this pitfall.

And 2) ensures the tap gesture only triggers TOGGLE_INPUT_PANEL if the
widget IM is focused. This is a possibility on eg. WebKit pages, where
its IM is only focused as long as a form element in the page is focused.
Tapping elsewhere shouldn't toggle the OSK.

https://gitlab.gnome.org/GNOME/gtk/issues/114

Closes: #114
2018-03-20 15:56:53 +01:00
Peter Bloomfield
6e2d14037c gtkimmodule: make match_backend() query
…the wayland registry.

Wnen _gtk_im_module_get_default_context_id calls
match_backend (context_id) and the default GdkDisplay
is wayland, match_backend() should return TRUE only if
gdk_wayland_display_query_registry (display, "gtk_text_input_manager")
returns TRUE.
2018-03-20 15:56:53 +01:00
Benjamin Otte
9781ffae51 Merge branch 'style-context-null-widget-guard' into 'gtk-3-22'
gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places

See merge request GNOME/gtk!70
2018-03-20 14:55:57 +00:00
Christoph Reiter
d65a4c2e0a gtkstylecontext: guard against gtk_css_widget_node_get_widget() returning NULL in more places
When the widget gets finalized it clears the widgetnode and gtk_css_widget_node_get_widget
returns NULL. Guard against gtk_css_widget_node_get_widget() returning NULL like in other
places.

See https://gitlab.gnome.org/GNOME/pygobject/issues/28#note_82862
2018-03-19 18:21:25 +01:00
Daniel Boles
92bef46b4c gdkrgba: Add a missing apostrophe in a doc comment 2018-03-19 15:13:04 +00:00
Daniel Boles
f4bb394d60 _common.scss: Use : for properties in new comments
This is cosmetic and unlikely to have confused anyone, but still
2018-03-19 14:27:28 +00:00
Daniel Boles
e0befe02fa Merge branch 'searchbar-double-border-fix' into 'gtk-3-22'
Fix the double border in windows with a search bar.

See merge request GNOME/gtk!50
2018-03-19 14:26:11 +00:00
Руслан Ижбулатов
3e68abddbc Merge branch 'lrn/issue-82_3-22' into gtk-3-22 2018-03-19 09:40:58 +00:00
Chun-wei Fan
84ff404a17 Visual Studio builds: Fix .pc generation
Since the Cairo build files for Visual Studio does not really generate
the pkg-config files for us, and we stopped making makeshift ones in
gobject-introspection, stop making the .pc files we generate here refer
to the Cairo .pc's, and instead make them link directly to
cairo-gobject.lib and cairo.lib.
2018-03-19 16:53:57 +08:00
Milo Casagrande
9604eb5c53 Update Italian translation 2018-03-17 14:51:14 +00:00
Dušan Kazik
9c8e53b968 Update Slovak translation 2018-03-17 14:36:47 +00:00
Timm Bäder
eb01ba8573 widget: Only print allocation warnings with --enable-debug
i.e. if G_ENABLE_CONSISTENCY_CHECKS is defined. This makes sense,
considering that this warning is about consistency of internal widget
state.
2018-03-17 13:15:33 +01:00
Daniel Boles
7fd9f2d31e Notebook: Don’t show raw underline/markup in popup
If @menu_label == NULL, we create a default page->menu_label. This took
@tab_label.get_label() and passed that to page->menu_label.set_text().
This is wrong because we set the plain text of the menu_label from the
rich text of @tab_label. So, if @tab_label used mnemonics or markup, our
menu_label got the raw underline or markup tags shown in it as raw text.

As we call set_text() on the menu Label, the fix is to be symmetric: use
@tab_label’s get_text() as source, as that strips underlines and markup.

It’s not worth making the default Label ‘inherit’ :use-underline/markup;
that’s a slippery slope, and users wanting such things can just create a
fully fledged GtkLabel to pass as @menu_label to suppress the default.

https://bugzilla.gnome.org/show_bug.cgi?id=705509
2018-03-16 22:32:50 +00:00
Olivier Fourdan
3bd7b379c8 wayland: Drop cairo surfaces when withdrawing
If a window is unmapped by the client while gdk is processing updates,
(for example Firefox un-mapping its window on Expose events), the
windowing backend resources might be lost (for example with Wayland)
which can cause a crash in end_paint().

Make sure we drop the cairo surfaces as well when hiding the surface,
that will avoid the crash in gdk_window_impl_wayland_end_paint() when
trying to attach the staging cairo surface to a released wl_surface,
these will be recreated when needed when the surface becomes visible
again and there is no need to keep such buffers around for a surface
which is not visible anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=793062
2018-03-16 16:01:21 +01:00
Jonas Ådahl
0454a1cace wayland: Minor whitespace cleanups
Broke up a long line, added an empty one, and indented another one.

https://bugzilla.gnome.org/show_bug.cgi?id=791939
2018-03-16 17:44:48 +08:00
Jonas Ådahl
a46bc8b5a3 wayland: Add support for xdg-shell stable
This commit adds support the stable version of the xdg-shell protocol.
Support for the last version of the unstable series is left intact, but
will not receive new features.

The stable version is prioritized above the older version.

https://bugzilla.gnome.org/show_bug.cgi?id=791939
2018-03-16 17:44:48 +08:00
Timm Bäder
5d27915aa4 demo: Add widgetbowl demo
Backported from gtk4.
2018-03-15 21:04:45 +01:00
Matthias Clasen
cac2845bd6 Merge branch 'wip/filechooser-non-default-display-gtk3' into 'gtk-3-22'
Fix filechooser dialog using non default display (gtk3)

See merge request GNOME/gtk!59
2018-03-15 17:47:15 +00:00
Kukuh Syafaat
3ee7604d6e Update Indonesian translation 2018-03-15 14:08:17 +00:00
Balázs Úr
0fa391cc24 Update Hungarian translation 2018-03-15 13:39:01 +00:00
Daniel Boles
0a0323813e SpinButton: Redraw +/- buttons after :wrap changes
Otherwise, the + or - button might change sensitivity based on whether
it can be used to wrap, but without ensuring we update its state, the
ability to :wrap isn't reflected until something else triggers a draw.

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:48 +00:00
Daniel Boles
fcfabb2fd3 testspinbutton: Add button to toggle wrap on Spins
I found myself wanting to test this for something else, so let's test
it. It revealed a bug immediately!

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:08 +00:00
Daniel Boles
bb16f1a0ff testspinbutton: Orient box orthogonally to Spins
This makes better use of space.
2018-03-14 23:00:59 +00:00
Emin Tufan Çetin
c179d5eb6e Update Turkish translation 2018-03-14 19:57:40 +00:00
Jonas Ådahl
ba83a2c46b entrycompletion: Realize popup after setting screen
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.

To avoid this issue, realize the popup after the screen has been
properly set up.

Fixes #83 in gtk3
2018-03-14 11:57:00 +08:00
Christoph Reiter
fc9a71abae Merge branch 'gtk-3-22' into 'gtk-3-22'
Add proper annotation for gdk_frame_clock_get_refresh_info

See merge request GNOME/gtk!54
2018-03-13 20:31:30 +00:00
Christoph Reiter
600003e83f run-docker.sh: Disable SELinux for the container
On Fedora and similar SELinux by default prevents containers accessing
mounted host directories. This script is just used for testing,
so disable it.
2018-03-13 21:19:30 +01:00
Nathan Follens
b485cf91b5 Update Dutch translation 2018-03-13 19:29:02 +00:00
Руслан Ижбулатов
577f1a992e GDK W32: send a DELETE selection when using LOCAL selection protocol
This was not needed before, but now it seems to be necessary for
some reason. The code is just an adjusted copy of the appropriate
piece of the OLE2 protocol code, sending GDK_SELECTION_REQUEST.

The rest is just fixing the fallout, allowing LOCAL protocol to pass
the functions it wasn't supposed to pass before.

Closes #82
2018-03-13 18:21:50 +00:00
Emin Tufan Çetin
a2efd3f3dc Update Turkish translation 2018-03-13 17:17:01 +00:00
Tim Sabsch
98afaed718 Update German translation 2018-03-13 15:03:39 +00:00
Rafael Fontenelle
491e696226 Update Brazilian Portuguese translation 2018-03-13 10:37:16 +00:00
Matthias Clasen
9f6deab88c 3.22.29 2018-03-12 22:22:05 -04:00
Daniel Boles
0f3396d742 FileChooserWidget: Fix leaks in .get_subtitle()
Now that subtitle's default value "Searching" for OPERATION_MODE_SEARCH
is duplicated as it should be, we cannot reassign other strings to it
anymore, as that resulted in the original dupe of "Searching" leaking.

Fix this by only assigning the dup'd "Searching" after trying to get
more specific values, not before. We therefore need to set it to NULL
during its declaration, and that means we needn't in the final else.
2018-03-13 00:19:51 +00:00
Daniel Boles
9d8fadee97 FileChooserWidget: Avoid crash freeing static str
Having a FileChooserDialog in location-entry mode then pressing
<primary>f to move to search mode would crash with an invalid free().

In that case, FileChooserWidget.get_subtitle() returned a static string
straight from gettext. This crashed when the GBinding from :subtitle to
FileChooserDialog’s HeaderBar:subtitle shortly tried to free the string.

Fix by duplicating the string before returning it, like all other paths.

https://bugzilla.gnome.org/show_bug.cgi?id=791004
2018-03-12 23:06:21 +00:00
Stas Solovey
0e01668683 Update Russian translation 2018-03-12 21:08:05 +00:00
Aurimas Černius
bcd920c288 Updated Lithuanian translation 2018-03-12 23:01:22 +02:00
gogo
6c4261338a Update Croatian translation 2018-03-12 20:57:04 +00:00
Anders Jonsson
a2f81d83bb Update Swedish translation 2018-03-12 20:43:21 +00:00
Daniel Boles
cbb22b2916 testinfobar: Test more properties, response signal
Also test :message-type, :show-close-button, and ::response.
2018-03-12 19:00:20 +00:00
Marek Černocký
41f6c469e3 Updated Czech translation 2018-03-12 19:51:52 +01:00
Mart Raudsepp
e4e2b7687d Update Estonian translation 2018-03-12 16:27:50 +00:00
Daniel Boles
f08eeecae6 ListBox: Avoid ::row-activated/Row::activate ambig
…uity, by adding a doc comment to Row::activate explaining what it does
and why it is probably not what the user reading that is looking for.

https://bugzilla.gnome.org/show_bug.cgi?id=794008
2018-03-12 16:12:13 +00:00
Daniel Boles
f7a47a632c InfoBar: Be most specific in new Since annotations 2018-03-12 16:12:13 +00:00
Piotr Drąg
1122508e1c Update Polish translation 2018-03-12 16:42:03 +01:00
Daniel Boles
6b4d95e86d testinfobar: Add simple test of :visible/:revealed
This exists merely to prove that, having added :revealed, show() and
hide() now work reliably, as does set_revealed() for the animated case.

https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:30:49 +00:00
Timm Bäder
e9d84e2653 infobar: Add :revealed property
https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:17:24 +00:00
Timm Bäder
45aa018839 infobar: Keep GParamSpecs around
So we can use them in notify_by_pspec

https://bugzilla.gnome.org/show_bug.cgi?id=710888
2018-03-12 15:17:18 +00:00
Sander Sweers
f0bea1ab1d Add proper annotation for gdk_frame_clock_get_refresh_info
See https://gitlab.gnome.org/GNOME/gtk/issues/77
2018-03-12 16:06:46 +01:00
Timm Bäder
04ff9b58f1 emojichooser: Only measure reference emoji once
Doing that once for every emoji is pretty slow and unnecessary as the
width does not change.
2018-03-12 14:40:02 +00:00
Alexandre Franke
72ed0c9539 Update French translation 2018-03-10 22:06:23 +00:00
Nikita Churaev
4e2f59ad23 Tidy up the search bar double border fix
Match "box" instead of "*", as already done for the search bar GTK4 and
for the action box in GTK3. Also clarify which widget property is
causing the margin which needs to be undone.
2018-03-09 22:13:01 +03:00
Pavel Roskin
cc967849f7 x11: Avoid a division by zero
This is similar to f44baf51d9 but for RandR 1.3 servers like
x11rdp and Windows Exceed which don't return a refresh rate. Avoid a
crash when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=775546
2018-03-08 16:00:40 +01:00
Ask Hjorth Larsen
add3592809 Updated Danish translation 2018-03-08 12:23:42 +01:00
Nikita Churaev
b202c44fd8 Fix double borders in windows with a search bar in HighContrast 2018-03-08 00:57:59 +03:00
Ask Hjorth Larsen
8c09b3994a Updated Danish translation of gtk-properties 2018-03-07 22:37:47 +01:00
Ask Hjorth Larsen
b9b2f7711b Updated Danish translation of gtk 2018-03-07 22:37:45 +01:00
Nikita Churaev
d465d790f0 Fix the double border in windows with a search bar.
Includes applications like GNOME Software and GNOME Documents. The
search bar is a composite widget with a revealer inside it, and when the
content of the revealer is hidden, the border lingers. Changed the CSS
to add style to the content of the revealer instead of the search bar
widget itself.
2018-03-07 08:54:11 +03:00
Timm Bäder
46828f8e0a expander: fix sizes in resize_toplevel
We can't use gtk_widget_get_allocation for either non-anchored widgets
(which happens with the child widget when the expander is unexpanded)
nor toplevel windows since that will include the window decorations.

Fixes #70 in gtk3
2018-03-06 18:11:34 +01:00
Christoph Reiter
23b91856e1 Merge branch '63-regression-3-22-26-3-22-27-hidpi-checkboxes-and-radiobuttons-pixmaps-are-not-scaled' into 'gtk-3-22'
Resolve "[ Regression 3.22.26 -> 3.22.27 ] [HIDPI] Checkboxes and radiobuttons pixmaps are not scaled"

See merge request GNOME/gtk!47
2018-03-05 19:58:04 +00:00
Juan Pablo Ugarte
e36b629c36 GtkCssImageSurface: set device scale for cache surface
Closes #63
2018-03-05 14:47:00 -03:00
Stas Solovey
fa47667df9 Update Russian translation 2018-03-05 16:25:05 +00:00
Rūdolfs Mazurs
bb498ba554 Update Latvian translation 2018-03-04 19:22:05 +00:00
Christoph Reiter
5fc27126f5 Merge branch 'phase-field' into 'gtk-3-22'
Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.

See merge request GNOME/gtk!45
2018-03-04 19:21:26 +00:00
Rūdolfs Mazurs
cccb66afb4 Update Latvian translation 2018-03-04 19:19:38 +00:00
Tomasz Miąsko
5d258bf314 Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe.
When using type annotations, the ABI of type being annotated and a new
type introduced from annotation should match.

In case of enumerations, the most common ABI, and probably the only one
currently used in practice with gtk, corresponds to -fno-short-enums
compiler option. It uses int as the underlying type of enum, bumping it
up to unsigned int, long int or unsigned long int, in that order, when
necessary.

Thus, when annotating a field of integer type with an enum type, it is
never correct to annotate field smaller than int, because it changes the
ABI from perspective on introspection.

The gint8 phase field in GdkEventTouchpadSwipe and GdkEventTouchpadPinch
structures have been previously annotated in such a way, and this change
removes this annotation to restore ABI compatibility.

Size of structures before (which does not match C):

```
>>> Gdk.EventTouchpadPinch.__info__.get_size()
104
>>> Gdk.EventTouchpadSwipe.__info__.get_size()
88
```

Size of structures after (which does match C):

```
>>> Gdk.EventTouchpadPinch.__info__.get_size()
96
>>> Gdk.EventTouchpadSwipe.__info__.get_size()
80
```

Fixes issue #57.
2018-03-04 17:55:44 +01:00
Christoph Reiter
464888a2da Merge branch 'c-includes' into 'gtk-3-22'
Include C headers in introspection file.

See merge request GNOME/gtk!44
2018-03-04 15:03:24 +00:00
Tomasz Miąsko
91498c7db3 Include C headers in introspection file.
Include gtk/gtk.h and gtk/gtk-a11y.h unconditionally,
and gtk/gtkx.h when building with X11. Ensures that
introspection data contains complete set required
headers, which is useful when generating C code based
on introspection data.

Diff for generated gir (when using X11):

```diff
   <include name="xlib" version="2.0"/>
   <package name="gtk+-3.0"/>
+  <c:include name="gtk/gtk-a11y.h"/>
+  <c:include name="gtk/gtk.h"/>
+  <c:include name="gtk/gtkx.h"/>
   <namespace name="Gtk"
              version="3.0"
```

Fixes issue #56.
2018-03-04 15:36:24 +01:00
Christoph Reiter
119d8f996f Merge branch 'gitlab-ci-gtk-3-22' into 'gtk-3-22'
Add gitlab-ci support using a prebuilt docker image

See merge request GNOME/gtk!18
2018-03-04 11:54:24 +00:00
Christoph Reiter
81c4fa5d50 Add gitlab-ci support using a prebuilt docker image
This uses autotools and just calls make
2018-03-04 10:52:49 +01:00
Christoph Reiter
5ca21f6dbb Merge branch 'include-gtkstackaccessible-gtk-3-22' into 'gtk-3-22'
a11y: Include gtkstackaccessible.h in gtk-a11y.h

See merge request GNOME/gtk!42
2018-03-04 09:40:57 +00:00
Kristjan SCHMIDT
7a15bf56a0 Update Esperanto translation 2018-03-03 20:07:27 +00:00
Tomasz Miąsko
3000384b90 a11y: Include gtkstackaccessible.h in gtk-a11y.h 2018-03-03 20:11:14 +01:00
Jordi Mas
fd71badf16 Fix to Catalan translation 2018-03-03 18:12:43 +01:00
Marek Černocký
ead2c3f38f Updated Czech translation 2018-03-03 06:53:53 +01:00
Bruce Cowan
3059df0d4d Update British English translation 2018-03-02 22:09:11 +00:00
Timm Bäder
f0d5b9561b Revert "file chooser: Allow activating without double-click"
This reverts commit fb0a13b7f0.

It's already reverted in master via
c8a6a1138b, so let's not leave subtle
behavior changes that would make a gtk3->gtk4 migration. And just like
the commit message of the revert already mentions: it didn't really make
anybody happy anyway.
2018-03-01 19:47:11 +01:00
Timm Bäder
b13362b369 separatormenuitem: Don't create label widget in get_label
Calling gtk_menu_item_get_label on a GtkSeparatorMenuItem would
otherwise create a GtkLabel child, increasing the vertical size request
to that of the child label.
2018-03-01 19:33:25 +01:00
Christoph Reiter
b68256f7a1 Merge branch 'quartz-missing-config-include' into 'gtk-3-22'
macos: Fix missing gdk symbol exports for gtk dnd

See merge request GNOME/gtk!38
2018-03-01 13:46:36 +00:00
Christoph Reiter
342aee304a macos: export gdk_quartz_drag_source_context()
It's used in the gtk dnd code but not exported in gdk.
Append a "_libgtk_only" suffix as with other internal exports and
export the symbol.

See #32
2018-03-01 14:35:05 +01:00
Kukuh Syafaat
abc171c93a Update Indonesian translation 2018-03-01 09:46:57 +00:00
Christoph Reiter
5c0d242ea3 macos: Fix gdk_quartz_drag_context_get_dragging_info_libgtk_only symbol export
The header got included without config.h being included first which resulted in the
wrong _GDK_EXTERN macro being used. As a result some symbols weren't exported
and starting a DnD action would crash in the linker.

This patch adds config.h includes in all places where clang complained about
_GDK_EXTERN redefinitions.

See #32 for more info.
2018-02-27 19:53:43 +01:00
Dušan Kazik
d76c7c82fc Update Slovak translation 2018-02-26 11:17:48 +00:00
Milo Casagrande
5d3ccfe21e Update Italian translation 2018-02-26 08:02:38 +00:00
Sveinn í Felli
44e7df2a14 Update Icelandic translation 2018-02-26 07:51:26 +00:00
Christoph Reiter
9f84e9a2c5 Merge branch 'quartz-symbol-not-found-gtk3' into 'gtk-3-22'
gdkquartz.h: export pasteboard functions

See merge request GNOME/gtk!20
2018-02-25 21:29:03 +00:00
Kristjan SCHMIDT
9112ca7f88 Update Esperanto translation 2018-02-25 18:15:28 +00:00
Furkan Ahmet Kara
4c43e8468a Update Turkish translation 2018-02-25 15:51:20 +00:00
Changwoo Ryu
d41dfcab35 Update Korean translation 2018-02-25 14:49:53 +00:00
Changwoo Ryu
80458ff586 Update Korean translation 2018-02-25 14:48:59 +00:00
Baurzhan Muftakhidinov
4fe6cba27a Update Kazakh translation 2018-02-24 15:14:20 +00:00
Balázs Úr
5b328804ec Update Hungarian translation 2018-02-23 22:17:48 +00:00
GNOME Translation Robot
f3f75f62e8 Update Scottish Gaelic translation 2018-02-23 17:34:56 +00:00
GNOME Translation Robot
68eb897900 Update Scottish Gaelic translation 2018-02-23 17:25:08 +00:00
Fabio Tomat
5cd21e5579 Update Friulian translation 2018-02-23 08:56:19 +00:00
Fran Dieguez
bc3a939f90 Update Galician translation 2018-02-23 00:26:32 +00:00
GNOME Translation Robot
2246a1e3c9 Update Dutch translation 2018-02-22 19:56:58 +00:00
Daniel Mustieles
af9f458bc9 Updated Spanish translation 2018-02-22 11:23:24 +01:00
Милош Поповић
e3fb265b90 Update Serbian Latin translation 2018-02-22 10:16:15 +00:00
Марко Костић
57f6f8307d Update Serbian translation 2018-02-22 10:09:01 +00:00
Милош Поповић
ab628e365d Update Serbian Latin translation 2018-02-21 14:35:57 +00:00
Марко Костић
4107e670d0 Update Serbian translation 2018-02-21 14:33:06 +00:00
Fabio Tomat
57a4558691 Update Friulian translation 2018-02-21 09:28:45 +00:00
Charles Monzat
796245ca30 Update French translation 2018-02-19 21:28:35 +00:00
Matthias Clasen
146b1e0d42 Merge branch 'test-fix-a11y-schema' into 'gtk-3-22'
testsuite/a11y: Fix missing glib schemas

See merge request GNOME/gtk!16
2018-02-19 18:23:11 +00:00
Matthias Clasen
c96be5a00b Merge branch 'gtk-3-22' into 'gtk-3-22'
gtkprintbackendcups.c: fix \n at end of a debugging note

See merge request GNOME/gtk!24
2018-02-19 17:57:04 +00:00
Matthias Clasen
92711d7f79 Merge branch 'gtk-debug-flags-with-open-display' into 'gtk-3-22'
gtk_init: Fix debug flags handling when a display is already open

See merge request GNOME/gtk!26
2018-02-19 17:55:12 +00:00
Aurimas Černius
8f82b06676 Updated Lithuanian translation 2018-02-18 21:43:14 +02:00
Mario Blättermann
2946ca859c Update German translation 2018-02-18 12:48:31 +00:00
Christoph Reiter
49e3c10575 Merge branch 'gtk-3-22' into 'gtk-3-22'
Fix annotation for gtk_tree_view_is_blank_at_pos()

See merge request GNOME/gtk!12
2018-02-18 10:45:52 +00:00
Christoph Reiter
8e540f2f62 gtk_init: Fix debug flags handling when a display is already open
In PyGObject gdk_init() is called before gtk_init() and thus there is
already a default display open when gtk_init() is called.
The code assigning the display to the debug_flags struct gets only
called when the default display changes, which never happens
when there already is one. As a result GTK_DEBUG=interactive
doesn't do anyting with Python apps.

This makes it call the change callback in case a display is already
there.

See https://gitlab.gnome.org/GNOME/pygobject/issues/166
2018-02-18 10:34:52 +01:00
John Lindgren
5aa939dc93 Fix incorrect optimization in find_builtin_icon().
When we found an icon with exactly the requested size, we'd stop
searching immediately (good), but we'd neglect to set the returned
min_difference to 0 (bad).  This caused theme_lookup_icon() to
prefer other, potentially much worse, matches over the exact one.
2018-02-17 22:03:27 -05:00
Emmanuele Bassi
bd13a5a5ce docs: Add proper deprecation text for GtkStatusIcon
We link to the HowDoI for GNotification in the class description, but we
should be more verbose in the deprecation notices for each function of
the GtkStatusIcon class.

https://bugzilla.gnome.org/show_bug.cgi?id=743975
2018-02-17 17:30:54 -05:00
Ivan Zakharyaschev
d2a4febfa7 gtkprintbackendcups.c: fix \n at end of a debugging note
(cherry picked from commit 7461ceebe3)
2018-02-17 21:25:41 +03:00
Piotr Drąg
688426f57f Update Polish translation 2018-02-17 17:18:59 +01:00
gogo
9bf8449a2e Update Croatian translation 2018-02-16 23:01:50 +00:00
gogo
b6343a1f4d Update Croatian translation 2018-02-16 22:57:44 +00:00
Rafael Fontenelle
c830834170 Update Brazilian Portuguese translation 2018-02-16 16:20:06 +00:00
Tom Schoonjans
2760b020a8 gdkquartz.h: export pasteboard functions 2018-02-16 12:44:18 +00:00
Piotr Drąg
ff40208857 Update Polish translation 2018-02-15 17:12:30 +01:00
Christoph Reiter
c60ea284c5 testsuite/a11y: Fix missing glib schemas
The a11y tests complain that org.gtk.Settings schemas are missing
and fail. This copies the code to build and include the schemas from
the reftests testsuite.
2018-02-15 12:30:57 +01:00
Anders Jonsson
238239c00d Update Swedish translation 2018-02-15 09:47:55 +00:00
Carlos Soriano
fb79115314 gtkplacessidebar: Rename favorites to starred
To have more consistency in the name. The same was done in Nautilus in
commit 27b039b37c.
2018-02-15 10:16:10 +01:00
Piotr Drąg
8cc04e8337 Update POTFILES.in 2018-02-15 04:31:13 +01:00
Matthias Clasen
9f142161e4 Merge branch 'wip/carlosg/imwayland-3-22' into 'gtk-3-22'
modules: Add wayland IM implementation

See merge request GNOME/gtk!5
2018-02-15 03:03:02 +00:00
Matthias Clasen
463ee95136 3.22.28 2018-02-14 12:48:01 -05:00
Carlos Garnacho
e8bffe0c56 modules: Add wayland IM implementation
This IM context implementation goes through the gtk-text-input protocol,
leaving up to the compositor the actual interaction with IM engines. If
the protocol is not offered by the compositor, GTK+ will fallback to the
IMs as specified through GtkSettings.
2018-02-14 14:58:06 +01:00
Carlos Garnacho
3146f29d3a gdk/wayland: Add GdkDisplay call to query available globals
The internal known_globals hashtable is used to carry accounting for
interfaces that depend on others (as ordering is not guaranteed), extend
its usage so it also keeps track of unimplemented interfaces (here at
least).

The API call will then use this to allow querying the globals offered by
the compositor, it will be useful to determine whether we can use
text-input protocols or should fallback to other IMs.
2018-02-14 14:58:06 +01:00
Daniel van Vugt
c6901a8b95 Fix irregular gdk_frame_clock_get_frame_time
This fixes stuttering in animations that rely on the regularity of
gdk_frame_clock_get_frame_time.

https://bugzilla.gnome.org/show_bug.cgi?id=787665

BEFORE
gdkgears:
58 FPS and visibly stuttering
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
"paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
"paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs

AFTER
gdkgears:
60 FPS and smoother
gnome-maps on a 59.95Hz monitor:
"paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
"paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs
2018-02-14 08:02:52 -05:00
Gniourf
3274f3a6cc Fix annotation for gtk_tree_view_is_blank_at_pos()
The annotation (allow-none) is wrong. Since
gtk_tree_view_is_blank_at_pos() also calls
gtk_tree_view_get_path_at_pos(), the same fields should have the same
annotations.
2018-02-14 13:51:22 +01:00
Emmanuele Bassi
f82a6421f4 Add missing private header to the build
Closes: #26

        https://bugzilla.gnome.org/show_bug.cgi?id=793442
2018-02-14 10:36:24 +00:00
Mart Raudsepp
97f3a4397a Update Estonian translation 2018-02-13 22:20:41 +00:00
Matthias Clasen
7ea53087ca 3.22.27 2018-02-13 16:30:44 -05:00
Mart Raudsepp
af2d039717 Update Estonian translation 2018-02-13 20:14:22 +00:00
Matthias Clasen
af8b247b45 Merge branch 'gtk-3-22' into 'gtk-3-22'
calendar: Use the new "%OB" format if supported

See merge request GNOME/gtk!2
2018-02-13 13:27:05 +00:00
Rafal Luzynski
cbf118c285 calendar: Use the new "%OB" format if supported
Due to the recent changes introduced in glibc 2.27 "%OB" is the
correct format to obtain a month name as used in the calendar
header.  The same rule has been working in BSD family (including
OS X) since 1990s.  This simple hack checks whether "%OB" is supported
at runtime and uses it if it is, falls back to the old "%B" otherwise.

Closes: #9
2018-02-12 22:09:28 +01:00
Benjamin Otte
4b1c02560f x11: Don't call XInput API for core events
Fixes emacs crashing with XMing.

https://bugzilla.redhat.com/show_bug.cgi?id=1483942
2018-02-12 21:11:58 +01:00
Mart Raudsepp
8dc234717e Update Estonian translation 2018-02-12 00:38:59 +00:00
Efstathios Iosifidis
79995748e0 Update Greek translation 2018-02-11 23:38:57 +00:00
Emmanuele Bassi
12913d1a35 docs: Use the appropriate deprecation for properties
The GtkFontButton:font-name property has been deprecated, but it's using
a non-standard annotation in its documentation.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi
ade22d00f2 gtk: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:32:42 +00:00
Emmanuele Bassi
c03ce68c38 Do not use deprecated error trap API
Use the X11-specific API instead.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
4e5ef1a377 toolbar: Use gdk_display_flush()
Instead of the deprecated gdk_flush().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
81c0e7af0e selection: Disable deprecation warnings
We are using a lot of deprecated API, and we know it.

Since the selection code is going to be replaced in GTK 4.0, there's no
real point in keeping the warnings enabled in 3.22.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
3067fb8c24 placessidebar: Move declaration inside conditional block
The `sidebar` variable is only used by the conditional block for
libcloudprovider.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
382d6c1bcb Ignore deprecations for gdk_flush()
When terminating the main loop, we're really trying to flush all
GdkDisplay connections, so it's actually a legitimate internal use
case.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
299a91bd46 docs: Properly deprecate gdk_keymap_get_default()
We're using a compiler annotation, but there's no deprecation notice in
the gtk-doc stanza.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
9c6ae95ece accelgroup: Do not use deprecated API
Use gdk_keymap_get_for_display() with the default display, instead of
the deprecated gdk_keymap_get_default().
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
855e4cb88e deprecated: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
c229716796 a11y: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
80e5f28ca0 Remove stray format character
We are not using any string in the debug message.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
2de14479b2 broadway: Cast g_object_ref() to the right type
In GLib 2.56, g_object_ref() will check that you're assigning the return
value to a variable of the same type you're passing in.
2018-02-11 23:28:50 +00:00
Emmanuele Bassi
d219bd4d5a x11: Balance an error trap
We are pushing an error trap, and never popping it from the stack.
2018-02-11 23:28:50 +00:00
Alban Browaeys
255e2dd704 Fix overzalous method annotations for drag and drop
Functional revert of commit 9c4892f291.

Fixes introspection scanner warnings like:

  Warning: Gtk: gtk_drag_finish: Methods must belong to the same
  namespace as the class they belong to

That is, the gtk_drag_* functions cannot be methods as they have a
"GdkDragContext" as the instance parameter, and that is not a valid
type for the Gtk namespace.

This is not an introspected ABI change, as the generated introspection
data ignores the annotation.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692152
2018-02-11 23:28:50 +00:00
Anders Jonsson
10d2e44ae2 Update Swedish translation 2018-02-11 19:17:29 +00:00
Piotr Drąg
25afe278e3 Update Polish translation 2018-02-11 16:25:35 +01:00
Emmanuele Bassi
4f962c6dbf Add AGPL3-only licence to GtkAboutDialog
https://bugzilla.gnome.org/show_bug.cgi?id=792793
2018-02-11 14:22:09 +00:00
Fabio Tomat
6e4c6ce6c3 Update Friulian translation 2018-02-11 09:43:48 +00:00
Fabio Tomat
7130656d37 Update Friulian translation 2018-02-11 08:29:56 +00:00
Fran Dieguez
5c85f2cccc Update Galician translation 2018-02-10 18:43:45 +00:00
Fran Dieguez
0e5964ce27 Update Galician translation 2018-02-10 18:41:38 +00:00
Cheng-Chia Tseng
ff43627167 Update Chinese (Taiwan) translation 2018-02-10 07:08:45 +00:00
Cheng-Chia Tseng
6c36eaea98 Update Chinese (Taiwan) translation 2018-02-10 06:54:24 +00:00
Carlos Garnacho
cacd8e6254 Merge branch 'wip/carlosg/fix-issue-1' into 'gtk-3-22'
wayland: Improve EOF detection when reading selections

See merge request GNOME/gtk!1
2018-02-09 10:23:31 +00:00
Carlos Garnacho
08f60dbcf6 wayland: Improve EOF detection when reading selections
g_input_stream_read_bytes() roughly provides the same guarantees
than g_input_stream_read() wrt the number of bytes being possibly
read (i.e. it being a best effort, but no real guarantees).

Instead, rely on the 0-len read that we'd get at the end of the
transfer.

Fixes clipboard/DnD transfers possibly being cut short, resulting
on "Broken pipe" errors on the other side.

https://gitlab.gnome.org/GNOME/gtk/issues/1

Closes: #1
2018-02-08 16:29:18 +01:00
Benjamin Otte
63f534f4b3 cssprovider: Only free bytes when they exist 2018-02-05 18:58:54 +01:00
Benjamin Otte
6ff326a82f css: Add a workaround for gtk_widget_override_font()
The problem here is that the CSS machinery expects font sizes to be in
pixels, but gtk_widget_override_font() provides a value in point and the
CSS machinery has no ability to query the DPI and convert.

This patch changes the dconversion DPI we use from a hardcoded 96 to the
default screen's DPI, which should work better than before.
This will of course not listen to changes in the default screen's DPI,
but that shouldn't be a problem.

People who want to workaround this should use gtk_widget_override_font()
with a font that has an absolute size set via
pango_font_description_set_absolute_size (size * PANGO_SCALE *
                                          gdk_screen_get_resolution (screen));

https://bugzilla.gnome.org/show_bug.cgi?id=774248
2018-02-05 18:49:10 +01:00
Jiri Grönroos
8af082f3c7 Update Finnish translation 2018-02-04 09:14:54 +00:00
Jordi Mas
07324131b3 Update Catalan translation 2018-02-03 21:31:58 +01:00
Jordi Mas
67274f7d9d Update Catalan translation 2018-02-03 21:31:08 +01:00
Matthias Clasen
9b69fe7a7e iconview: Fix a problem with the previous change
After commit ffef28a7e8,
gtk-icon-browser was spewing critical warnings when
changing sections. Avoid that by respecting the return
value of gtk_tree_model_get_iter.
2018-01-31 18:37:19 +01:00
Jason Gerecke
c94993e29b wayland: Add support for BTN_STYLUS3
BTN_STYLUS3 is defined by the Linux 4.15 kernel and is sent when the
third button on a stylus is pressed. At the moment, only Wacom's "Pro
Pen 3D" has three stylus buttons. Pressing this button triggers a button
8 event to be sent under X11, so we use the same mapping here.

https://bugzilla.gnome.org/show_bug.cgi?id=790033
2018-01-30 21:32:24 +01:00
Kalev Lember
60750b3ffd tests: Don't add testswitch twice in Makefile.am 2018-01-27 14:49:34 +01:00
Timm Bäder
136b88534c menu: Guard against NULL toplevel
This can happen, as indicated by GtkMenu explicitly connecting to
::destroy of its toplevel window. Do the same thing in GtkComboBox.
2018-01-26 11:37:31 +01:00
Pieter Schalk Schoeman
4c8f7c4aca Update Afrikaans translation 2018-01-24 11:40:40 +00:00
Pieter Schalk Schoeman
0cbf45a663 Update Afrikaans translation 2018-01-24 11:36:50 +00:00
Daniel Boles
b8e2430486 Widget: Don’t call reset() on NULL EventController
GtkGesture is a GtkEventController. gtk_event_controller_dispose() calls
_gtk_widget_remove_controller(). That NULLs the pointer-to-Controller in
our EventControllerData but does not delete said ECData from our GList.

Subsequently, if that same Widget gets unparent()ed, that method calls
unset_state_flags(), which leads to doing reset_controllers() if we are
insensitive. Now, unlike most most other loops over the GList of ECData,
reset_controllers() does not skip nodes whose pointer-to-Controller is
NULL. So, we call gtk_event_controller_reset(NULL) and get a CRITICAL.

This surfaced in a gtkmm program. The Gesture is destroyed before the
Widget. The Widget then gets dispose()d, which calls unparent()… boom.
I didn’t find an MCVE yet but would hope this logic is correct anyway:

The simplest fix is to make the loop in gtk_widget_reset_controllers()
skip GList nodes with a NULL Controller pointer, like most other such
loops, so we avoid passing the NULL to gtk_event_controller_reset().

In other, live cases, _gtk_widget_run_controllers() loops over the GList
and removes/frees nodes having NULL Controllers, so that should suffice.
But this clearly was not getting a chance to happen in the failing case.

https://bugzilla.gnome.org/show_bug.cgi?id=792624
2018-01-22 19:09:50 +00:00
GNOME Translation Robot
814c55d473 Update Esperanto translation 2018-01-22 18:34:48 +00:00
Juan Pablo Ugarte
beed1f660e GtkGestureMultiPress: check event state before emiting released signal
Fix bug 771986 "Inconsistent 'row-activated' signal emission before \
drag'n'drop, 'activate-on-single-click'=TRUE, 'reorderable'=TRUE"
2018-01-22 15:42:54 +01:00
Balázs Úr
e6be9a2a4d Update Hungarian translation 2018-01-21 22:53:01 +00:00
Balázs Úr
51220e3a31 Update Hungarian translation 2018-01-21 22:49:00 +00:00
Matthias Clasen
5ab5a5166e iconview: Fix updates with filter models
Filter models rely on views taking a ref on every node
they care about. GtkIconView was not doing that. Amazingly,
this has never shown up in a bug so far, until I spotted
the fallout in gnome-font-viewer.
2018-01-19 16:06:01 +01:00
Matthias Clasen
5b19d6b1b8 Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 16:05:51 +01:00
Matthias Clasen
ef72f3cbce font chooser: Fix property notification
We must notify the font and font-desc properties when the
list selection changes, and return NULL values for them
when there is no selection in the list.
2018-01-18 19:58:27 -05:00
Matthias Clasen
5f675181ce font chooser dialog: Improve sensitivity handling
Enable the select button when a font is selected, as it should be.
2018-01-18 19:48:12 -05:00
Matthias Clasen
e10f616065 font chooser: Small revision of the UI
Show only the font names in the list, in their own
font, in order to make the list less noisy.
2018-01-18 19:36:56 -05:00
Chris Lamb
6b85162f43 gtk/queryimmodules.c: Make the output deterministic.
Whilst working on the Reproducible Builds effort [0], we noticed that
queryimmodules generates non-reproducible output as it iterates over the
filesystem without sorting.

Patch attached.

 [0] https://reproducible-builds.org/

Signed-off-by: Chris Lamb <lamby@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786528
2018-01-16 22:39:03 -05:00
Matthias Clasen
53bc2566b3 tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=792459

Add a testcase for the previous fix
2018-01-16 18:19:10 -05:00
Matthias Clasen
e1aeb73a62 tree model sort: Fix initial default sort func
gtk_tree_sortable_has_default_sort_func should return
FALSE initially.
2018-01-16 18:19:01 -05:00
Piotr Drąg
bb844e44b6 Update Polish translation 2018-01-15 22:16:51 +01:00
Matthias Clasen
9e3b814580 emoji: Skip overly wide fallback rendering
Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.
2018-01-15 08:21:52 -05:00
Daniel Boles
bcd3c42b92 GdkMonitor: Fix link to nonexistent Display method
There is no gdk_display_get_monitors(). Instead, we have to use
gdk_display_get_n_monitors() and gdk_display_get_monitor(int).
2018-01-13 20:03:37 +00:00
Daniel Boles
b5e4a9d716 HeaderBar: Explain use in conjunction w/ GtkWindow
After hinting how good GtkHeaderBar is for GtkWindow, let’s link to
the latter and indicate how users can make the two work together.
2018-01-12 23:12:19 +00:00
Daniel Boles
fe220402cb Window: Mention GtkHeaderBar in set_titlebar() doc
This is the typical thing passed here and what most users want, so we
should mention it here, rather than requiring users to figure it out.
2018-01-12 23:12:19 +00:00
Daniel Boles
e75d91e7b1 Window: Clarify resize() doc about titlebar widget
Clarify the reference to HeaderBar, as it applies to any custom title
widget; HeaderBar is only the most common one used. Also, fix a typo.
2018-01-12 23:03:44 +00:00
Ting-Wei Lan
b68e55ecce wayland: Use portable sed syntax in gdk/wayland/Makefile.am
Replace non-portable \<, \>, \+ with \(, \), \{, \} to avoid build
failure on systems not using GNU sed.

https://bugzilla.gnome.org/show_bug.cgi?id=792279
2018-01-10 00:45:07 +08:00
Juan Pablo Ugarte
2a8e1745cf GtkCssImageSurface: add cache for the last drawn size.
Keep a copy of the scaled image to speed up rendering multiple times
the image at the same size.
2018-01-09 11:29:10 -03:00
Daniel Boles
8ed4b48b4c Adwaita: Fix typo lenght => length in SASS 2018-01-09 09:49:24 +00:00
Sveinn í Felli
d96a7c9e87 Update Icelandic translation 2018-01-08 17:47:11 +00:00
Sveinn í Felli
856486fea8 Update Icelandic translation 2018-01-08 17:39:46 +00:00
Daniel Boles
a9499dbe48 ScrolledWindow: add() before remove() in snippet
We can't remove() a child widget that wasn't already add()ed, of course.
2018-01-07 16:47:41 +00:00
Matthias Clasen
081488f8f2 file button: Don't leak rows
The file chooser button manually manages the memory of
data in its model, so it needs to explicitly free the
rows.
2018-01-07 16:38:42 +00:00
Matthias Clasen
7de01b31ef Remove a dead macro
GCs have been dead for a long time.
2018-01-07 16:38:42 +00:00
Timm Bäder
d15fbee353 Make a few more code samples compile 2018-01-07 16:38:42 +00:00
Timm Bäder
fda98ba562 entry: Remove some questionable code examples 2018-01-07 16:38:41 +00:00
Timm Bäder
c006c2fdbc widget: Make all code snippets compile 2018-01-07 16:38:41 +00:00
Timm Bäder
6e197ffac9 liststore: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
e00de3814e searchbar: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
a443b525c3 menuitem: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
456ca1062b expander: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
e5240de5bc treeviewcolumn: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
a65ae5fb40 notebook: Make a code snippet compile 2018-01-07 16:38:41 +00:00
Timm Bäder
af1d5362ab scrolledwindow: Fix code sample compilation 2018-01-07 16:38:41 +00:00
Matthias Clasen
9cf48ec3f8 Drop an unused enum value
We haven't had a GtkWindow::frame-event since the
linux-fb backends demise.
2018-01-07 16:38:41 +00:00
Rico Tzschichholz
6f26d0dc0c filechooser: Add missing array annotations to add_choice() 2018-01-06 09:40:39 +01:00
Rico Tzschichholz
43433f3ccd iconview: Prevent ownership transfer of cell out-param in get_item_at_pos() 2018-01-06 09:40:26 +01:00
Arnaud Bonatti
01c349995c Add test for GtkActionable GtkListBoxRow.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Arnaud Bonatti
cb935d947c Make GtkListBoxRow GtkActionable.
https://bugzilla.gnome.org/show_bug.cgi?id=741633
2018-01-02 17:53:20 -08:00
Ting-Wei Lan
31f7b55306 configure: Don't declare functions in AC_TRY_COMPILE and AC_LANG_PROGRAM
Both AC_TRY_COMPILE and AC_LANG_PROGRAM put code passed to their second
arguments to the body of the main function. This means that we cannot
and should not declare functions there, or we end up checking whether
the compiler support nested functions instead of whether a compiler or
linker flag is supported.

GCC supports nested functions and tests succeed. Clang doesn't support
nested functions, so tests fail and -fvisibility=hidden won't be used.
This means that functions which are not intended to be used by other
programs, such as gtk_menu_tracker*, gtk_action_observ*,
gtk_menu_muxer_*, become global symbols with default visibility.

GNOME Shell has a private library libgnome-shell-menu.so, which also has
symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* that are
intended to be used by GNOME Shell itself. When GNOME Shell still used
Autotools build system, the executable gnome-shell explicitly linked to
libgnome-shell-menu.so, so the linker loaded libgnome-shell-menu.so
before libgtk-3.so.0 and GNOME Shell used correct symbols from its
private library.

However, after GNOME Shell switched to Meson build system, gnome-shell
executable no longer lists libgnome-shell-menu.so as its dependency.
Even if we adds it to the build file, it won't be listed in DT_NEEDED of
gnome-shell because Meson uses -Wl,--as-needed by default. This causes
the runtime linker to load libgtk-3.so.0 before libgnome-shell-menu.so
and symbols gtk_menu_tracker*, gtk_action_observ*, gtk_menu_muxer_* are
bound to libgtk-3.so.0 instead of libgnome-shell-menu.so. GNOME Shell
hangs when opening more than one window because it uses functions from
the wrong library.

This problem is already fixed in OpenBSD ports. The article describing
it can be found on OpenBSD Journal with this link:
https://undeadly.org/cgi?action=article;sid=20170930133438

https://bugzilla.gnome.org/show_bug.cgi?id=791943
2018-01-03 02:19:18 +08:00
Arnaud Rebillout
1e7982212f gtk: remove non-breaking space, probably there by mistake
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:42:18 +00:00
Arnaud Rebillout
9b2e487a7f css docs: fix some formatting inconsistencies along the way
Mostly spaces.

Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:42:09 +00:00
Arnaud Rebillout
4a371de393 css docs: remove useless <para>
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:28 +00:00
Arnaud Rebillout
084db132e9 css docs: swap border-width and border-left shorthands, to keep going clockwise
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:18 +00:00
Arnaud Rebillout
489d0db6d1 css docs: Fix refentry and refname
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:09 +00:00
Arnaud Rebillout
352f678ac1 css docs: Ensure the first column does not break for every table
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:36:01 +00:00
Arnaud Rebillout
ce79fac68d css docs: Get rid of non-breaking hyphens
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:32:50 +00:00
Arnaud Rebillout
ceec7e9cb8 css docs: Get rid of non-breaking spaces
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:28:37 +00:00
Arnaud Rebillout
46b38c00ad css docs: Fix some angle brackets for percentage
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-02 15:28:31 +00:00
Timm Bäder
ad536f333b window: Avoid redundantly getting the GDK window
meta-pick of commit c1573a1fda: the
variable gdk_window is used in a check, but we may as well use it again
to avoid calling _gtk_widget_get_window() again unnecessarily.
2018-01-02 15:26:46 +00:00
Daniel Boles
bdb3a4d505 themes: Regenerate CSS to reflect recent commits 2018-01-01 19:52:47 +00:00
Daniel Boles
7dfb99c2ca HighContrast: Avoid expander↔combobox interference
as per commit b4b9aa1e5f
2018-01-01 19:46:58 +00:00
Arnaud Rebillout
53eb42338a css docs: Fix duplicate border‑right‑width
Signed-off-by: Arnaud Rebillout <elboulangero@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=791710
2018-01-01 18:55:13 +00:00
Matthias Clasen
b4b9aa1e5f Adwaita: Avoid expander<>combobox interference
Putting a combobox in an expander was causing the combo arrow
to go sideways. Increase the specificity with which we address
the expander arrow to avoid that.
2018-01-01 18:48:08 +00:00
Matej Urbančič
5fef3ff971 Slovenian update ... 2017-12-31 12:28:54 +01:00
Matej Urbančič
308796628a Slovenian update ... 2017-12-31 12:28:23 +01:00
Matthias Clasen
bd9ed01839 fontchooser: Add global keynav
Starting to type should focus the search entry and start
a search.
2017-12-27 17:32:16 -05:00
Matthias Clasen
176c1046cb Add some deprecation annotations
These functions have been removed in master, and their
replacements are already available here.
2017-12-25 23:00:30 -05:00
Matthias Clasen
6fa63bd92c font button: Some followup cleanups
Don't refer to the font-name property in docs either, and
don't use deprecated API internally.
2017-12-21 11:42:23 -05:00
Matthias Clasen
87e1615610 font button: Deprecate the font-name property
It has long been redundant with the GtkFontChooser::font
property.
2017-12-21 11:13:08 -05:00
Matthias Clasen
ed0600e8c0 tests: Stop using gtk_font_button_get_font_name
We can instead use the GtkFontChooser::font property.
2017-12-21 11:13:08 -05:00
Daniel Boles
0e338d31a4 Range: Fix inverted vert scrolling on vert Ranges…
The change in the previous patch should only be applied when the Range
is oriented horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=737175
2017-12-19 21:18:41 +00:00
Daniel Boles
4d18a346c1 Range: Fix inverted vert scrolling on horiz Ranges
Users expect, & previous patches have tried to assure, that scrolling up
over a horizontal Range will cause the value to increase & vice-versa.
But the path using directions was still negating the delta & decreasing
the value on scrolling up. This could be seen on Win32 or X without XI2.

So, only negate the delta when scrolling down (or left), not up, so that
scrolling up (or right) will make the value increase for any event type.

https://bugzilla.gnome.org/show_bug.cgi?id=737175#c5
2017-12-19 18:40:51 +00:00
Matthias Clasen
09c94c27e1 font chooser: Stop listening to style-updated
The only time a style-updated indicates we need
to reload fonts is when it is synthesized by GtkSettings
in response to a fontconfig timestamp change, but
we are listening to those already, anyway.
2017-12-19 12:13:32 -05:00
Matthias Clasen
5f022cbc12 Avoid calling unsetenv too late
Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.

https://bugzilla.gnome.org/show_bug.cgi?id=790963
2017-12-17 17:33:02 -05:00
Matthias Clasen
a41e0ce4a4 wayland: Handle scale 3 for cursors
This is just a bandaid solution to make scale 3 work.
If people seriously want to go for scales larger than
that, we need a better solution.
2017-12-17 17:17:12 -05:00
Matthias Clasen
b49502c167 inspector: Allow to bump scale to 3
Might as well allow this, for 'large scale testing'.
2017-12-17 17:17:02 -05:00
Matthias Clasen
0eaa76a032 cups: Warn only once if colord is not available
No need to keep complaining about this.

https://bugzilla.gnome.org/show_bug.cgi?id=791650
2017-12-17 17:11:27 -05:00
Matthias Clasen
32332b3a03 Revert "css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP"
This reverts commit 492469a94a.

People have been reporting missing invalidations with this change.
2017-12-17 11:20:50 -05:00
Matthias Clasen
f44af2e6ae Revert "css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()"
This reverts commit 7e253f4bd3.
2017-12-17 11:20:15 -05:00
Matthias Clasen
7d23b33ac5 Don't place dnd cursor in placeholder text
That is just misleading - the entire placeholder text is going
to be replaced by the drop.
2017-12-17 10:54:21 -05:00
Matthias Clasen
11bfce3f36 listbox: Fix a crash during keynav
The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=791549
2017-12-15 18:46:21 -05:00
Matthias Clasen
e834a2b089 x11: Avoid crash in fallback move emulation
Quietly do nothing when there is already an ongoing operation.
This matches the behavior of the ewmh code, and is much nicer
than a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=789054
2017-12-15 16:17:27 -05:00
Juan Pablo Ugarte
7e253f4bd3 css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-14 16:40:40 -05:00
Chun-wei Fan
c9a54ba1c2 gdk/win32/gdkselection-win32.c: Fix build without G_ENABLE_DEBUG
_gdk_win32_data_to_string() is only available when G_ENABLE_DEBUG is
defined, so as in gdkproperty-win32.c, use GDK_NOTE on the parts where
we assemble and output the debug messages.
2017-12-15 01:11:17 +08:00
Stas Solovey
4e0adbc8dc Update Russian translation 2017-12-14 10:05:27 +00:00
Stas Solovey
d69f998c26 Update Russian translation 2017-12-14 09:58:07 +00:00
Matthias Clasen
05e4e7fe87 placesview: Make middle click work
This does not cost us much, and improves consistency.
2017-12-12 13:57:06 -05:00
Matthias Clasen
c4ff07025b link button: Set a drag icon
It is a bit odd to drag nothing around, so set an icon.
2017-12-10 13:58:27 -05:00
Colomban Wendling
75768a4d00 Fix updating the widget accessible description when using its tooltip
We need to notify ATK the description changed when the tooltip text associated
with the widget changes and gtk_widget_accessible_get_description() would use
it as the description.

https://bugzilla.gnome.org/show_bug.cgi?id=779009
2017-12-09 21:28:47 -05:00
Timm Bäder
492469a94a css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP
It was used to mark css properties that affect widgets with text, but it
caused unnecessary invalidations. E.g. 'color' was marked as
AFFECTS_TEXT but changing just the color of a label should not
automatically queue a resize, which is what the code in
gtk_widget_real_style_updated does.

Replace this flag with GTK_CSS_AFFECTS_TEXT_SIZE and
GTK_CSS_AFFECTS_TEXT_CLIP, which GtkWidget can use only if the widget
actually has text.

https://bugzilla.gnome.org/show_bug.cgi?id=791281
2017-12-09 20:16:02 -05:00
Marco Trevisan (Treviño)
ecc9946566 cssshadowvalue: don't apply the y_scale offset twice to the shadow
As per commit 942e904 this changed causing a regression that
seems to be visible only when scale > 2.

https://bugzilla.gnome.org/show_bug.cgi?id=791363
2017-12-09 20:13:20 -05:00
Jonas Ådahl
25dc32c1a1 wayland: Destroy the xdg_imported after the wl_surface
This way the window manager can handle destruction while having the
transient-for relationship still valid.

https://bugzilla.gnome.org/show_bug.cgi?id=791062
2017-12-07 22:13:40 -05:00
Jonas Ådahl
dee5142c91 wayland: Maybe postpone xdg-foreign state setup until mapping
In order to map a window with the correct initial parent-child
relationship when a modal dialog is set up to be a child of an imported
foreign window, the relationship must be set up before the window is
mapped.

In order to do this, if a window is not yet mapped, postpone the
relationship setup until when the window is eventually mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=791062
2017-12-07 22:13:39 -05:00
Colin Leroy
279b81d202 placesview: Present FUSE-reachable network shares in Other Locations
The documentation about gtk_file_chooser_set_local_only() states
that "non-native files may still be available using the native
filesystem via a userspace filesystem (FUSE)."
The code that made this possible in GTK+2 was missing from GTK+3 and
that represented a regression for Linux users in numerous applications
(Firefox, Thunderbird, Chromium, ...)

https://bugzilla.gnome.org/show_bug.cgi?id=787128
2017-12-07 21:41:44 -05:00
Christian Hergert
86dd1e37a7 autocleanups: allow g_autoptr() usage with GtkTreePath
As the summary says, this allows using g_autoptr(GtkTreePath). This is
useful for API that uses out parameters for GtkTreePath that need to be
freed.

https://bugzilla.gnome.org/show_bug.cgi?id=791234
2017-12-04 19:34:05 -08:00
Руслан Ижбулатов
6d0b0cb99b GDK W32: Plug a resource leak
Ensure that surfaces allocated in the impl are destroyed in finalize()

https://bugzilla.gnome.org/show_bug.cgi?id=787089
2017-12-03 03:14:28 +00:00
Piotr Drąg
4c2f3e3105 Update Polish translation 2017-12-02 18:40:28 +01:00
Carlos Garnacho
3c40b217b9 gdk: Always emit motion after enter
After a pointer emulating GDK_TOUCH_END event triggering a fake leave
notify with GDK_CROSSING_TOUCH_END mode, pointer_under_window will be
unset, which will make the next motion/touch_update event to trigger
an enter notify event again.

Up till there, that's fine, however the motion event is just consumed
in favor of the just synthesized enter notify event. This is unexpected
to clients like spice-gtk that will only update coordinates from motion
events, sending both enter and motion is more consistent with X11 and
will make them happy.

https://bugzilla.gnome.org/show_bug.cgi?id=791039
2017-11-30 19:26:48 +01:00
Carlos Garnacho
e7e047fc3f gdk/wayland: Restrict shortcut inhibition to keyboard grabs on toplevels
It is unlikely that popup windows will contain anything that requires this
(popup menus being more interested in redirecting keyboard focus to
themselves). OTOH popup implementations that just grab the keyboard are
commonplace enough, it makes sense not to trigger inhibition for these.

https://bugzilla.gnome.org/show_bug.cgi?id=789268
2017-11-30 18:54:47 +01:00
Руслан Ижбулатов
8df7f88b66 GDK W32: Remove an unnecessary type check
No idea why it's here, the hash table can store any kind of data,
there's no reason why it wouldn't be able to store an old X string type.
Might be a holdout from the old days, when strings were handled in
a special way (stored directly in the clipboard?).

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:28 +00:00
Руслан Ижбулатов
c329940cf1 GDK W32: Make sure drag source window is not NULL
This prevents GTK from throwing a bunch of warnings when it tries
to get drag source window -> screen of that window -> ipc widget for that screen,
and then tries to attach a signal handler to that widget.

Specifically, this happens when we get a DnD move from another
application.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:28 +00:00
Руслан Ижбулатов
3fd23fcfd1 GDK W32: Special handling for DELETE requests
1) Ensure that any DELETE requests from the target are sent to GDK, even if
   both the source and the target are in the same process and it
   is therefore possible to use a shortcut and call the handler directly
   in GTK layer
2) Ensure that target GDK doesn't do anything when GTK asks it to send
   a DELETE request, just report back immediately (the code up the stack
   does not check for successfullness when request is DELETE, so not giving
   it any data is OK).

The source code already synthesizes a DELETE request, so that side is
also taken care of.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:27 +00:00
Руслан Ижбулатов
56074fbf3c GDK W32: Preserve the target value for change_property()
We need to know the target atom value to know when we need to
do something with side-effects (since side-effects are expressed via
special target values). Previously, the code side-stepped that by looking
at the data type (which was rather unique for the one side-effect
target that we supported, signalled by the TARGETS target),
but for the DELETE target that seems to be no longer an option, hence the new
field to carry this information past the convert_selection() routine.

This prevents GDK from throwing a warning when trying to convert
a DELETE target, which has no format or data objects set.

The side-effects for the DELETE target happen earlier, in GTK layer.
By the point it gets to change_property(), it's a no-op.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-30 04:17:26 +00:00
Kukuh Syafaat
6ab1ab9f46 Update Indonesian translation 2017-11-29 12:05:29 +00:00
Kukuh Syafaat
706c80be51 Update Indonesian translation 2017-11-29 12:04:08 +00:00
Christophe Fergeau
7d18f2fd3c wayland: Fix indentation of previous commit 2017-11-29 12:15:48 +01:00
Christophe Fergeau
8af29e3756 wayland: emit GDK_SELECTION_CLEAR on owner changes
The wayland backend currently never emits GDK_SELECTION_CLEAR events.
GtkClipboard uses this signal in order to clear the clipboard owner when
the selection is set to something outside the application.
This commit ensures the wayland backend emits GDK_SELECTION_CLEAR before
setting the clipboard owner to NULL, as this means we lost the
selection.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:21:32 +01:00
Christophe Fergeau
beb2caacb9 wayland: Remove unused data structure
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790031
2017-11-29 11:21:32 +01:00
Matthias Clasen
91ef88f77f Improve the docs
Document that gtk_application_is_inhibited can't
be guaranteed to work.
2017-11-28 22:56:11 -05:00
Милош Поповић
9ce824d360 Update Serbian translation 2017-11-27 10:29:15 +00:00
Милош Поповић
8397f22762 Update Serbian translation 2017-11-27 10:02:46 +00:00
Alex Ivanov
2b6f3f7867 wayland: Don't provide gsetting if dconf is not available
This makes gtk+ fall back to reading ~/.config/gtk-3.0/settings.ini
on systems with Wayland, but without dconf (do those exist?).

https://bugzilla.gnome.org/show_bug.cgi?id=790201
2017-11-26 19:32:52 -05:00
Jan Alexander Steffens (heftig)
b0fb67eabc entry: Undo ABI breakage from addition of insert_emoji
https://bugzilla.gnome.org/show_bug.cgi?id=790862
2017-11-26 18:24:51 -05:00
Muhammet Kara
03f2eaf23a Update Turkish translation 2017-11-26 18:59:26 +00:00
Yosef Or Boczko
f95cecba2d Updated Hebrew translation 2017-11-26 18:31:59 +02:00
Yosef Or Boczko
f3328330b6 Updated Hebrew translation 2017-11-26 18:28:07 +02:00
Aurimas Černius
3a1a7135a2 Updated Lithuanian translation 2017-11-25 21:33:28 +02:00
Руслан Ижбулатов
c6c13bd66b Fix a nefarious typo 2017-11-25 17:04:48 +00:00
Руслан Ижбулатов
934ac3f6ef GDK W32: Ensure that selection request is processed
To do that, run the message loop for one second or until the side-effect
of running the selection request handler is achieved (as opposed to
running it until the event is no longer queued).

The disavantage of this method is that if the event handling is
somehow missed (due to a variety of reasons - after all, it's not
a straight path from an event being queued to property_change()
being called), this will loop for one second. Since we do process
events during that time, this will not hang the application, but
might still restrict some of the functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:43 +00:00
Руслан Ижбулатов
7b6efc29cc GDK W32: Refuse to release mouse grab while in DnD mode
Handle WM_CANCELMODE and do nothing in response to it when DnD is
active. Otherwise pass it to DefWindowProc, which will call ReleaseCapture()
on our behalf.
This prevents us from losing mouse capture when alt-tabbing during DnD
(this includes the feature of Windows Explorer where dragging stuff over
a window button in the taskbar causes that window to receive focus, i.e.
keyboardless alt-tabbing).

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:42 +00:00
Руслан Ижбулатов
0ee453a45b GDK W32: Update layered windows on opacity changes
Without this patch layered windows are only updated when they are moved
by the user or then their contents changes. This patch adds opacity
changes to the list of things that make GDK update a window. Without this
windows that don't redraw and are not moved by the used (DnD drag indicator
windows, for example) don't change their opacity.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:41 +00:00
Руслан Ижбулатов
8caba9536c W32: Massive W32 DnD fix
Massive changes to OLE2 DnD protocol, which was completely broken before:
* Keep GdkDragContext and OLE2 objects separate (don't ref/unref them
  together, don't necessarily create them together).
* Keep IDataObject formats in the object itself, not in a global variable.
* Fix getdata() to look up the request target in its format list, not in the
  global hash table
* Create target GdkDragContext on each drag_enter, destroy it on drag_leave,
  whereas IDropTarget is created when a window becomes a drag destination
  and is re-used indefinitely.
* Query the source IDataObject for its supported types, cache them in the
  target (!) context. This is how GTK+ works, honestly.
* Remember current_src_object when we initiate a drag, to be able
  to detect later on that the data object is ours and use a
  shortcut when querying targets
* Make sure GDK_DRAG_MOTION is only sent when something changes
* Support GTK drag cursors
* Ensure that exotic GTK clipboard formats are registered
  (but try to avoid registering formats that can't be used between applications).
* Don't enumerate internal formats
* Ensure that DnD indicator window can't accept drags or receive any kind of input
  (use WS_EX_TRANSPARENT).
* Remove unneeded indentation in _gdk_win32_dnd_do_dragdrop()
* Fix indentation in gdk_win32_drag_context_drop_finish()
* Remove obsolete comments in _gdk_win32_window_register_dnd()
* Check for DnD in progress when processing WM_KILLFOCUS, don't emit a grab
  break event in such cases (this allows alt-tabbing while DnD is in progress,
  though there may be lingering issues with focus after dropping...)
* Support Shell ID List -> text/uri-list conversion, now it's possible
  to drop files (dragged from Explorer) on GTK+ applications
* Explicitly use RegisterClipboardFormatA() when we know that the string
  is not in unicode. Otherwise explicitly use RegisterClipboardFormatW()
  with a UTF8->UTF16 converted string
* Fix _gdk_win32_display_get_selection_owner() to correctly bail
  when selection owner HWND is NULL (looking up GdkWindow for NULL
  HWND always succeeds and returns the root window - not the intended
  effect)
* More logging
* Send DROP_FINISHED event after DnD loop ends
* Send STATUS event on feedback
* Move GetKeyboardState() and related code into _gdk_win32_window_drag_begin(),
  so that it's closer to the point where last_pt and start_pt are set
* Use & 0x80 to check for the key being pressed. Windows will set low-order bit
  to 1 for all mouse buttons to indicate that they are toggled, so simply
  checking for the value not being 0 is not enough anymore.
  This is probably a new thing in modern W32 that didn't exist before
  (OLE2 DnD code is old).
* Fixed (hopefully) and simplified HiDPI parts of the code.

Also adds managed DnD implementation for W32 GDK backend (for both
OLE2 and LOCAL protocols). Mostly a copy of the X11 backend code, but
there are some minor differences:
* doesn't use drag_window field in GdkDragContext,
  uses the one in GdkWin32DragContext exclusively
* subtracts hotspot offset from the window coordinates when showing
  the dragback animation
* tries to consistently support scaling and caches the scale
  in the context
* Some keynav code is removed (places where grabbing/ungrabbing should
  happen is marked with TODOs), and the rest is probably inert.

Also significantly changes the way selection (and clipboard) is handled
(as MSDN rightly notes, the handling for DnD and Clipboard
 formats is virtually the same, so it makes sense to handle
 both with the same code):
* Don't spam GDK_OWNER_CHANGE, send them only when owner
  actually changes
* Open clipboard when our process becomes the clipboard owner
  (we are doing it anyway, to empty the clipboard and *become* the owner),
  and then don't close it until a scheduled selection request event
  (with TARGETS target) is received. Process that event by announcing
  all of our supported formats (by that time add_targets() should have
  been called up the stack, thus the formats are known; just in case,
  add_targets() will also schedule a selection request, if one isn't
  scheduled already, so that late-coming formats can still be announced).
* Allow clipboard opening for selection_convert() to be delayed if it
  fails initially.
* The last two points above should fix all the bugs about GTK+ rising
  too much ruckus over OpenClipboard() failures, as owner change
  *is allowed* to fail (though not all callers currently handle
  that case), and selection_convert() is asynchronous to begin with.
  Still, this is somewhat risky, as there's a possibility that the
  code will work in unexpected ways and the clipboard will remain open.
  There's now logging to track the clipboard being opened and closed,
  and a number of failsafes that try to ensure that it isn't kept open
  for no reason.
* Added copious notes on the way clipboard works on X11, Windows and GDK-W32,
  also removed old comments in DnD implementation, replaced some of them
  with the new ones
* A lot of crufty module-global variables are stuffed into a singleton
  object, GdkWin32Selection. It's technically possible to make it a
  sub-object of the Display object (the way Wayland backend does),
  but since Display object on W32 is a singleton anyway... why bother?
* Fixed the send_change_events() a bit (was slightly broken in one of the
  previous iterations)
* Ensure that there's no confusion between selection conversion (an artifact
  term from X11) and selection transmutation (changing the data to be W32-compatible)
* Put all the transmutation code and format-target-matching code into gdkselection-win32.c,
  now this code isn't spread across multiple files.
* Consequently, moved some code away from gdkproperty-win32.c and gdkdnd-win32.c
* Extensive format transmutation checks for OLE2 DnD and clipboard.
  We now keep track of which format mappings are for transmutations,
  and which aren't (for example, when formats are passed as-is, or when
  a registered name is just an alias)
* Put transmutation code into separate functions

* Ensure that drop target keeps a format->target map for supported formats,
  this is useful when selection_convert() is called, as it only receives a
  single target and no hints on the format from which the data should
  be transmuted into this target.
* Add clear_targets() on W32, to de called by GTK
* Use g_set_object() instead of g_ref_object() where it is allowed.
* Fix indentation (and convert tabs to spaces), remove unused variables

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:40 +00:00
Руслан Ижбулатов
41026987be GDK W32: Don't leak the atom name string
https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:39 +00:00
Руслан Ижбулатов
022cf4252f GDK W32: Fix a typo in OLE2 DnD code
https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:38 +00:00
Руслан Ижбулатов
2cc7a9c034 Only register application/x-rootwindow-drop on X11
application/x-rootwindow-drop is not useful anywhere else,
so put it under #ifdef GDK_WINDOWING_X11

On W32 this prevents toplevels from automatically becoming valid
drop targets with a useless drop type.

https://bugzilla.gnome.org/show_bug.cgi?id=786509
2017-11-25 15:44:37 +00:00
Руслан Ижбулатов
87103b9a14 GDK W32: More flexible modal operation mode
Instead of using a boolean to indicate a modal operation being in progress,
use a set of flags, and allow these to be set and unset independently.

Specifically, this allows WM_CAPTURECHANGED handler to only act when a drag-move or
drag-resize modal operation is in progress, and ignore DND (which can also cause
WM_CAPTURECHANGED to be posted). This avoids a crash due to assertion failure when
OLE2 DND code tries to end a modal operation that was already ended by the WM_CAPTURECHANGED
handler.

https://bugzilla.gnome.org/show_bug.cgi?id=786121
2017-11-25 15:44:36 +00:00
Daniel Boles
87673af98c Be more specific in ::insert-emoji Since tag
I had been unsure whether to include the minor version, but
:show-emoji-icon already did, so do the same here to match.
2017-11-23 17:17:47 +00:00
Руслан Ижбулатов
30ddb3e1a4 GDK W32: fix monitor pruning code
Decrement the counter for each removed element, otherwise we skip
one element every time we remove one. Also, no need for continue here.
2017-11-23 07:15:28 +00:00
Daniel Boles
2c9072314a Add Since to ::insert-emoji, and some trivialities
Document when these keybinding signals were added.
2017-11-22 22:35:25 +00:00
Matthias Clasen
f922aee5e2 text view: Support the Emoji chooser
Similar to GtkEntry, add an "Insert Emoji" context
menu item, and add the same keybindings. We don't
add the icon here, since it is not clear where it
would go.

https://bugzilla.gnome.org/show_bug.cgi?id=790029
2017-11-22 22:20:34 +00:00
Matthias Clasen
bd56e0d918 Fix indentation mishap 2017-11-22 22:20:28 +00:00
Daniel Boles
42c3b91fa7 SpinButton: Explain meaning of nullable Adjustment
configure() marked the @adj argument as (allow-none) but did not explain
what passing NULL would do. Fix that, and move it to (nullable) as well.
2017-11-22 20:58:00 +00:00
Daniel Boles
c490ac4ed8 doc: Replace uses of #NULL with %NULL 2017-11-22 20:58:00 +00:00
Daniel Boles
f1b812731d CellRendererPixbuf: Improve property docs
Add Since annotations for the stock-* properties.
Add a doc comment for :stock-size in order to link to GtkIconSize.
Document :stock-detail as deprecated. It does nothing & is gone in GTK+4
2017-11-22 20:48:02 +00:00
Daniel Boles
260a6aaa71 doc: TextLayout: Add missing (out) annotations
and move from (allow-none) to (optional)
2017-11-22 20:48:02 +00:00
Matthias Clasen
55e8736613 emoji chooser: break out a helper function
This is just a small cleanup.
2017-11-22 19:11:31 +00:00
Matthias Clasen
d3eacaf840 entry: Add a key binding for the emoji chooser
Make Ctrl-. and Ctrl-; bring up the emoji chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=789160
2017-11-22 19:11:31 +00:00
Matthias Clasen
6b126a70e2 emoji chooser: Make menu key work as expected
Whenever we have a right-click action, we should make
the menu key work as a keyboard-accessible alternative.
2017-11-22 19:11:31 +00:00
Matthias Clasen
f301b7874e emoji chooser: handle right-click
Whereever we handle long-press for touch, it makes sense to handle
right-click as a faster alternative for mouse-based interaction.

This commit makes right-click work to bring up the variation
selector for Emojis.
2017-11-22 19:11:31 +00:00
Matthias Clasen
19670f9fe6 Trivial cleanup
Better to use G_SOURCE_REMOVE than FALSE, for clarity.
2017-11-22 19:11:31 +00:00
Matthias Clasen
65457e6d12 emoji chooser: Don't leak gestures
We were not freeing these gestures as we should.
2017-11-22 19:11:31 +00:00
Benjamin Otte
f8cb3fc3a8 emojichooser: animate the adjustment
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-22 19:11:31 +00:00
Bastien Nocera
38e68815c6 frame-clock: Fix typo in API documentation 2017-11-22 15:25:55 +01:00
Daniel Mustieles
4de0e4b1ed Update Spanish translation 2017-11-20 08:39:00 +00:00
Daniel Mustieles
29d2a45641 Update Spanish translation 2017-11-20 08:38:35 +00:00
Muhammet Kara
29a590014d Update Turkish translation 2017-11-19 20:13:03 +00:00
Milo Casagrande
6675451cea Update Italian translation 2017-11-17 13:33:01 +00:00
Milo Casagrande
47435d0e6b Update Italian translation 2017-11-17 10:51:13 +00:00
Milo Casagrande
2157b69f1f Update Italian translation 2017-11-17 10:49:34 +00:00
Matthias Clasen
4ffdf917bb icontheme: Add a trailing / when enumerating resources
This avoids extra string copies in GResource.
2017-11-16 08:44:36 -05:00
Matthias Clasen
e3f84e9bf4 application: Append a / to the icon resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-16 08:24:55 -05:00
Matthias Clasen
20c2d6c992 icontheme: Append a / to the resource path
g_resources_enumerate_children expects the path to end
in a '/' (even though thats not stated in the docs), and
will copy it if that isn't the case. Avoid the copy
by putting  a '/' there to begin with.
2017-11-16 08:24:41 -05:00
Benjamin Otte
4c44ffda17 gdk: Fix GDK_ALL_EVENTS_MASK
This mask was forgotten to update when the last 2 event masks were
added, probably because it looks like it's already maxed.
2017-11-13 23:42:51 +01:00
Carlos Soriano
7e49a02acf gtkplacessidebar: Fix new tab/window handling for cloud accounts
It wasn't taking into account whether the sidebar had support for them
or not, resulting in a file chooser with open in new tab/window menu
items when it's not supported.

To fix it, do as with the other menus and check for the availability of
new tab/window flags.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 15:38:26 +01:00
Carlos Soriano
e672c02441 gtkplacessidebar: Adapt to libcloudproviders 0.2.0
And a few improvements on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-11-13 15:38:26 +01:00
Christian Hergert
b654130bd7 css: avoid copying resource data
To avoid copying data from gresources to the heap, we can use
the newly added gtk_file_load_bytes(). That function will check
for resource:// URIs and access their internal data directly.

Other URI schemes will read the contents into memory and return
a GBytes as normal.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2017-11-12 20:04:06 -08:00
Christian Hergert
d46c072c4d utils: add gtk_file_load_bytes() helper
This helper will load GBytes for a GFile, but try to reuse the
embedded data for a gresource to reduce the chances of copying
data to the heap.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2017-11-12 20:04:06 -08:00
Benjamin Otte
15acb4c340 a11y: Handle a treeview with no columns
Code was spewing criticals to stderr because of nonexisting columns. So
check that there's actually an existing column first.
2017-11-13 03:55:03 +01:00
Benjamin Otte
efaa6524ac progresstracker: Don't hand out NaN
When the duration is set to 0, clamp it to 1us. This way we're almost
correct: We should really instantly finish, but we don't. But we do
respect the delay.

Doing this properly would require some refactoring of how the progress
tracker actually maintains progress, and this is just a quick fix.
2017-11-12 06:30:57 +01:00
Fabio Tomat
b2877605cf Update Friulian translation 2017-11-10 15:48:06 +00:00
Kjartan Maraas
a4e1d01649 Updated Norwegian bokmål translation. 2017-11-09 20:09:40 +01:00
Daniel Boles
e09c103187 Window: Document get_icon() return as nullable 2017-11-09 09:44:49 +00:00
Daniel Boles
5835cb2bc2 CssProvider: Use consistent theme name placeholder
commit 475d916eb9 added various paths that
use theme-name for this, but the existing path already used THEME, with
a subsequent description referring to the latter. So use that everywhere
2017-11-08 09:23:11 +00:00
Matthias Clasen
77a4e2ec37 3.22.26 2017-11-07 14:52:24 -05:00
Dušan Kazik
4ac7db34f7 Update Slovak translation 2017-11-07 18:24:11 +00:00
Dušan Kazik
8e84eff355 Update Slovak translation 2017-11-07 18:21:41 +00:00
Marek Cernocky
d42559bf2f Updated Czech translation 2017-11-06 21:03:47 +01:00
Rafael Fontenelle
4bc58f03b6 Update Brazilian Portuguese translation 2017-11-06 18:19:31 +00:00
Rafael Fontenelle
0ba60b7703 Update Brazilian Portuguese translation 2017-11-06 17:53:03 +00:00
Hannie Dumoleyn
5a86b78493 Update Dutch translation 2017-11-06 16:20:55 +00:00
Hannie Dumoleyn
01b29a16ff Update Dutch translation 2017-11-06 16:17:20 +00:00
Mario Blättermann
ab4cc2540b Update German translation 2017-11-06 08:35:14 +00:00
Mario Blättermann
4c5279c956 Update German translation 2017-11-06 08:32:35 +00:00
Kjartan Maraas
a12ae1411a Updated Norwegian bokmål translation. 2017-11-06 09:09:53 +01:00
Anders Jonsson
e57891fd6b Update Swedish translation 2017-11-05 21:23:19 +00:00
Anders Jonsson
bb1e8e47f5 Update Swedish translation 2017-11-05 21:19:06 +00:00
Piotr Drąg
14cda4839a Update Polish translation 2017-11-05 21:47:10 +01:00
Piotr Drąg
f7f4ecf006 placessidebar: correct quotation marks in a new string 2017-11-05 21:16:59 +01:00
Alexandru Pandelea
7f6365cf9f placessidebar: add starred location item
Add an item for showing all files marked as favorite. This item will
open all files that have the nao:predefined-tag-favorite tag

https://bugzilla.gnome.org/show_bug.cgi?id=785176
2017-11-05 20:17:22 +01:00
Chun-wei Fan
d38a148f0e gdk/win32: Fix Win32 GL Context switching
Since on Windows we need to use a good amount of temporary GL contexts,
we need to switch back to the original GL contexts we were using when
we are done with the temporary GL contexts, otherwise multi-GL windows
will cause confusions causing display artifacts and crashes.

Also, use the GdkWin32GLContext::gl_hdc consistently throughout
the code and remove the GdkWin32Display::gl_hdc as Lukas K pointed out
that GdkWin32Display::gl_hdc becomes out-of-date and so the HDC that the
GL context is bound to becomes incorrect in sceanarios using multiple
windows with GtkGLArea/GdkGLArea items (which would cause the artifacts in
programs that use multiple windows with GtkGLArea/GdkGLArea items, and it
turns out that GdkWin32Display::gl_hdc is actually not necessary to help
keep track of the HDCs we use for our GL contexts.

Partly based on patch from Lukas K <lu@0x83.eu>

https://bugzilla.gnome.org/show_bug.cgi?id=789213
2017-11-04 10:39:58 +08:00
Khaled Hosny
46459f66f9 Update Arabic translation 2017-11-03 11:46:43 +02:00
Daniel Boles
40302a5268 Adwaita: Fix Entry:has-frame if backdrop/disabled
by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:35 +00:00
Daniel Boles
a03a3c3af9 HighContrast: Fix GtkEntry:has-frame not working
• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop

https://bugzilla.gnome.org/show_bug.cgi?id=789733
2017-11-01 19:57:34 +00:00
Daniel Boles
55210ae464 Inspector: better default split of CSS nodes/props
Move the default pos of the Paned handle to 400px from the left, i.e.
50% of the default width of the window. The previous position at 300px
from left meant the node treeview was too narrow & could easily result
in the (useful) State column not being visible in the case of many
apps. The properties pane doesn't need to be as big as it was anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=788898
2017-11-01 19:57:34 +00:00
Julian Sparber
f3408d89d5 AboutDialog: Fix accepting GTK_LICENSE_AGPL_3_0
Add the new GTK_LICENSE_AGPL_3_0 to the allowed enum range checked in
gtk_about_dialog_set_license_type(), so this value is not rejected.

https://bugzilla.gnome.org/show_bug.cgi?id=789678
2017-10-31 18:57:02 +00:00
Julian Sparber
a0327e521e icon-browser: Centre Copy button in dialog again
This patch moves the "Copy to Clipboard" button into the same container
as the description label, to centre the button regardless of the number
of icons shown in the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=789134
2017-10-31 18:33:18 +00:00
Daniel Boles
58c0418418 gdkmonitor: Fix typo 2017-10-31 18:27:34 +00:00
Daniel Boles
2b509a34d4 SpinButton: Fix typo 2017-10-31 18:26:50 +00:00
Lukas K
5b8a3bac70 make GDK_DEBUG=opengl work on win32 2017-10-30 14:40:23 +08:00
Chun-wei Fan
c255ba68fc input/IME: Defer the emit of the "commit" signal
On Windows, when IME is used, each keystroke results in the
WM_IME_COMPOSITION event being sent first.  This means that in our case
when one decides on to accept the input that is in the preedit buffer,
we first get from Windows the WM_IME_COMPOSITION event
(where we emit the commit signal), followed by the WM_IME_ENDCOMPOSITION
event (where we emit the pair of preedit-changed and preedit-end
signals).

Since commit f11f989 (GtkEntry: Remove recompute idle), we do the input
recomputation directly, this will cause a pair of "Pango-WARNING:
Assertion failed: (index >= 0 && index <= layout->length)" being shown,
as gtkentry.c's priv->preedit_length and priv->preedit_cursor was unable
to be reset to 0 in time as a result of the recomputation triggered by
the commit being done before the reset of priv->preedit_length and
priv->preedit_cursor (which are no longer valid as we essentially say
that we are done with the preedit buffer).

As we could only acquire the final string that was entered in this
preedit session when we handle the WM_IME_COMPOSITION event, fix this by
saving up the final string we acquire from Windows IME in UTF-8 when we
handle the WM_IME_COMPOSITION event from Windows, and emit the commit
signal with that string after we emit the preedit-changed and
preedit-end signals when we handle the WM_IME_ENDCOMPOSITION event from
Windows, which comes afterwards.

Also fix the formatting of the code around the parts of the files that
was changed.

https://bugzilla.gnome.org/show_bug.cgi?id=787142
2017-10-30 14:33:23 +08:00
Simon McVittie
72a45366e2 wayland: Distribute protocol/server-decoration.xml in tarballs
Otherwise, builds that include the Wayland backend fail.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=789630
Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
2017-10-30 02:16:21 +00:00
Matthias Clasen
6c39e2f2f1 3.22.25 2017-10-29 08:48:00 -04:00
Matthias Clasen
74720117c9 Revert "gdkscreen-x11: Enable RandR on VirtualBox"
This reverts commit f2ba6ca473.

This change was causing problems with several X servers,
see https://bugzilla.gnome.org/show_bug.cgi?id=780101
2017-10-28 10:29:12 -04:00
Andrea Azzarone
81d1aaa062 widget: Typecheck before deref in translate_coords
https://bugzilla.gnome.org/show_bug.cgi?id=771279
2017-10-27 21:01:52 -05:00
Federico Mena Quintero
3509918e39 GtkPathBar: Centralize handling of outstanding cancellables
The path bar would crash if we disposed it before all pending I/O
operations had finished.  Now we remember all the outstanding
operations directly in the GtkPathBarPrivate, and deal with them
consistently.
2017-10-27 17:07:30 -05:00
Matthias Clasen
268d150d0f GdkMonitor: Use 1 as scale fallback value
The same value we use in gtk_widget_get_scale_factor.
2017-10-27 16:12:28 -04:00
Olivier Fourdan
8ef20c0e2f wayland: scale down reported monitor geometry
According to the documentation, gdk_monitor_get_geometry() reports the
monitor geometry in ”application pixels”, not in ”device pixels”,
meaning that the actual device resolution needs to be scaled down by the
scale factor of the output.

x11 backend does that downscaling, whereas Wayland backend did not,
causing a discrepancy depending on the backend used.

https://bugzilla.gnome.org/show_bug.cgi?id=783995
2017-10-27 16:11:03 -04:00
Simon McVittie
72045a1a2d GtkWindow: Set tiled class on windows that have any tiled edge
This has no practical effect on Adwaita, but might fix some
third-party themes that were broken by GTK+ 3.22.23.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2017-10-27 10:58:35 -02:00
Simon McVittie
8ad40a49ee GtkHeaderBar: Reconsider buttons if any tiling state changes
Looking at the 1-bit "tiled or not?" state is not necessarily
enough.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2017-10-27 10:58:35 -02:00
Simon McVittie
465ef50554 Set GDK_WINDOW_STATE_TILED if any edge is tiled
This state flag is used in several places in GTK+, for example to
ignore RESIZE_INC hints if tiled. Setting it is also necessary for
backwards compatibility with applications that changed their behaviour
when tiled, such as GNOME Terminal and its MATE fork.

Signed-off-by: Simon McVittie <smcv@debian.org>

https://bugzilla.gnome.org/show_bug.cgi?id=789357
2017-10-27 10:58:35 -02:00
Drew DeVault
f2adaba237 Wayland: Implement KDE's SSD protocol
If the compositor prefers server-side decorations and the client doesn't
customize the title bar, we disable client-side decorations and let the
compositor know. Otherwise, we continue to use client-side decorations.

Signed-off-by: Drew DeVault <sir@cmpwn.com>

https://bugzilla.gnome.org/show_bug.cgi?id=781909
2017-10-26 16:34:42 -04:00
Olivier Fourdan
30e7215406 wayland: Do not constrain saved window size
Under Wayland, an xdg_surface.configure with size 0x0 means it's up to
the client to set its size.

When transitioning from maximized state to un-maximized, the Wayland
compositor will send such an 0x0 configure so that the client can
restore its original size.

However, the original size was already constrained, so re-applying
size constrains can lead to a smaller size when using size increments.

Avoid this caveat by not applying size constrains when we are restoring
the original size.

https://bugzilla.gnome.org/show_bug.cgi?id=777072
2017-10-26 15:51:01 -04:00
Florian Müllner
5ad9ecaff0 appchooserwidget: Don't limit application list unconditionally
As documented, GtkAppChooser is "typically [used] for the purpose of
opening a file". However given that applications that support neither
opening files nor URLs are filtered out, the chooser is not actual
useful for any other (atypical) usage. Change that by only applying
the filtering if a content-type was set, and use the full unfiltered
list otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=789327
2017-10-26 06:18:32 -04:00
Christian Persch
5ee34ec72a actionable: Allow all detailed action name formats
Use g_action_parse_detailed_name() to enable use of this API
for actions with non-string parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=788841
2017-10-26 06:17:28 -04:00
Matthias Clasen
fc741adbbb wayland: Don't spew warnings for blank cursors
We were unnecessarily spewing warnings when blank cursors
were getting a new scale set. Standardize on "none" as the
name for blank cursors, and avoid the warning.

https://bugzilla.gnome.org/show_bug.cgi?id=775217
2017-10-26 00:32:07 -04:00
Andrea Azzarone
1c3aff5101 gdk: Clear GL context when window is withdrawn
Some clients (e.g. gnome-online-accounts) quickly unmap and map
a window. With some backends the backend surface will be replaced
causing the application to crash because the GL context is still
using the old surface. Clearing the GL context when a window is
withdrawn fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=789141
2017-10-25 09:34:47 -04:00
Chun-wei Fan
9c1a0b80ae Visual Studio builds: Improve binary security
Ensure that the /DYNAMICBASE linker option (which is actually the
default) is enabled for all of our Visual Studio project builds, as the
gtk3-demo projects inadvertly disabled it.

Also, for x64 builds on MSVC 2012 or later, enable /HIGHENTROPYVA to
enhance the security of our binaries as well.

Pointed out by Ignacio Casal Quinteiro.
2017-10-20 17:01:30 +08:00
Kukuh Syafaat
d6e011afa6 Update Indonesian translation 2017-10-20 05:53:07 +00:00
Michael Catanzaro
26ff667901 Revert "gdk/wayland: Avoid idempotent wl_subsurface.set_position calls"
This reverts commit 8aa6d59b7a.

This caused a regression in totem that still needs to be investigated.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
2017-10-19 19:51:43 -05:00
Carlos Garnacho
9b874a40ac gtkwidget: Emulate motion before button press on fallback touch handler
The code has been shuffled so GDK_TOUCH_BEGIN results in a
GDK_MOTION_NOTIFY to the new position and a GDK_BUTTON_PRESS on that same
place. This makes pointer emulation consistent with what X11 does. Even
though button presses have x/y arguments, there's code out there relying
on getting prior motion events.
2017-10-19 14:25:55 +02:00
Debarshi Ray
29c4d0a3ee GtkGestureZoom: Don't leak the list of sequences
https://bugzilla.gnome.org/show_bug.cgi?id=789149
2017-10-19 09:29:37 +02:00
Timm Bäder
45198d2312 emojichooser: Plug memory leak 2017-10-18 10:04:48 +01:00
Julian Sparber
6a4be7f56b icon-browser: Add scalable icons to icon detail modal window
When making mockups for GNOME apps in Inkscape, looking for symbolic
icons is a common task. Searching for icons in the file system is clumsy,
and icon-browser provides a much better interface for finding them.
However, currently there is no way to insert the symbolic icons as SVG
directly from icon-browser, so right now it is only useful for finding
the name.

This patch adds a sixth column to the modal window that appears when
clicking a symbolic icon. The icon in this column is labeled "scalable",
and dragging it onto another window results in the vector icon URI being
inserted.

This enables a much simpler workflow when designing with symbolic icons.

https://bugzilla.gnome.org/show_bug.cgi?id=778930
2017-10-16 14:09:55 +02:00
Carlos Garnacho
8aa6d59b7a gdk/wayland: Avoid idempotent wl_subsurface.set_position calls
These may not result on wl_surface.frame callbacks, yet we do trigger
a frame clock tick that would get stuck on the lack of such callback.

https://bugzilla.gnome.org/show_bug.cgi?id=784314
2017-10-16 11:27:47 +02:00
Aurimas Černius
ebb67175e2 Updated Lithuanian translation 2017-10-15 21:24:22 +03:00
Daniel Boles
6018f9098e a11y/entry: Fixups for previous commit
We still declare all variables at the start of the block.

Also, we can use the fast private _gtk_widget_get_allocation().

https://bugzilla.gnome.org/show_bug.cgi?id=784509
2017-10-15 12:57:41 +01:00
Samuel Thibault
a2d78a2de7 a11y/entry: Fix text coords not adjusted for alloc
What is missing is the "allocation" part of x/y coordinates. Since
gtk_entry_realize doesn't call gtk_widget_set_window(priv->text_area),
the coordinates returned by gdk_window_get_origin don't include it.

This patch fixes this.

https://bugzilla.gnome.org/show_bug.cgi?id=784509
2017-10-15 12:33:38 +01:00
Timm Bäder
8db9776875 scalebutton: Fix comparison for empty icon list
https://bugzilla.gnome.org/show_bug.cgi?id=786220
2017-10-15 12:31:54 +01:00
Daniel Boles
9106436003 Range: Fix inverted horizontal scroll wheel events
Bug 737175 aimed to ensure that scrolling up on a horizontal range would
result in its value increasing, as that’s what users intuitively expect.
However, its commit 416c370da1 meant that,
if the event gives scroll deltas, we inverted our delta unconditionally.

So it broke horizontal scrolling: scrolling left moved the slider right…

We must only invert if using dy as delta. dx already has the right sign,
so inverting it was wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=788905
2017-10-14 18:48:45 +01:00
gogo
2575a500be Update Croatian translation 2017-10-14 16:37:05 +00:00
Christian Kirbach
841b879aed Update German translation 2017-10-14 12:44:32 +00:00
Emmanuele Bassi
7fe07ea906 Fix previous commit
The _gtk_widget_get_parent() private accessor is defined inside
gtkwidgetprivate.h.
2017-10-13 10:55:00 +01:00
Daniel Boles
81b7f76cb8 Fixed: If can’t add child, don’t add to child info
If the call to set_parent() failed, we were still adding the child to
the internal list of children, despite that it was not really added.
That meant we could later try to do invalid stuff with that non-child.

Fix that by asserting and giving up if the child that the user is
attempting to add is already parented.

https://bugzilla.gnome.org/show_bug.cgi?id=701296
2017-10-13 09:49:48 +01:00
Daniel Boles
567ef528e5 Fixed: Don’t dereference before typechecking 2017-10-13 09:49:34 +01:00
Daniel Boles
c4b75b0fff icon-browser: Stop repeating folder-documents too 2017-10-13 00:25:15 +01:00
Dušan Kazik
1c38646122 Update Slovak translation 2017-10-12 20:40:00 +00:00
Balázs Meskó
8281c57d28 Update Hungarian translation 2017-10-12 19:35:05 +00:00
Daniel Boles
491eea5680 StyleContext: Fix CSS snippet language, node names
The language is useful for parsing tools, such as that of gtkmm, which
otherwise assumes these are C snippets and elides them from its
generated documentation.

The old GtkBlah node names are just plain obsolete.
2017-10-12 19:40:19 +01:00
Daniel Boles
b1cb34cbbb Settings: Mention Shift+primary click on Range too
This already existed, and since this doc blurb is already inflating
dramatically, what’s another half a line?
2017-10-11 22:36:54 +01:00
Daniel Boles
694686d2ed Settings: Reflect resurrected middleclick in Range
and while here, make the explanation more explicit as to which values do
what, & use general Range terminology instead of focussing on scrollbars

https://bugzilla.gnome.org/show_bug.cgi?id=787669
2017-10-11 22:11:27 +01:00
Matthias Clasen
5b2cae6703 range: Bring back middle clicks
It does not hurt us to keep middle clicks doing the same
as shift-primary clicks. This makes the transition from gtk2
less painful in terms of muscle memory.

https://bugzilla.gnome.org/show_bug.cgi?id=787669
2017-10-11 22:11:27 +01:00
Timm Bäder
ca4efb0080 bindings: Fix code snippet
Just use a more realistic example, adapted from gtklistbox.c
2017-10-11 22:11:27 +01:00
Timm Bäder
7525a11a30 accellabel: Fix code snippet 2017-10-11 22:11:27 +01:00
Timm Bäder
8169d6703a aboutdialog: Fix code snippets
Define all variables and fix a missing comma in the first
gtk_show_about_dialog call.
2017-10-11 22:11:27 +01:00
Timm Bäder
413d548edd applicationwindow: Fix code sample
Declare all variables, use proper GtkApplication constructor and the
right GTK_APPLICATION() cast for gtk_application* API.
2017-10-11 22:11:27 +01:00
Daniel Boles
a54550db7b ToggleButton: Actually show buttons in new snippet
Also, create a Window, instead of a Dialog without a transient parent,
which is (noisily) discouraged. Then s/content_area/box/g to match.
2017-10-11 22:11:27 +01:00
Timm Bäder
b0fe89d85f togglebutton: Fix code snippet
Remove gtk_box_pack_start usage, gtk_dialog_get_content_area, fix wrong
gtk_dialog_new parameters and actually add a output_state callback.
2017-10-11 22:11:27 +01:00
Timm Bäder
3973da4c65 label: Make all code snippets properly compile 2017-10-11 22:11:27 +01:00
Robert Ancell
7961e61c3b gdk: Fix gdk_screen_get_monitor_workarea not returning work area
This was introcuced in the commit 0611cb4823 (GTK+ 3.22).
2017-10-12 09:03:13 +13:00
Robert Ancell
112a61a782 icon-theme: Show filename attempted when icon fails to load 2017-10-12 09:03:13 +13:00
Robert Ancell
b21bb316bd iconhelper: Show error if fail to load placeholder icon 2017-10-12 09:03:13 +13:00
Milo Casagrande
ff6b31da23 Update Italian translation 2017-10-11 14:06:40 +00:00
Benjamin Otte
8439f06500 cssnode: Don't put wrong styles in the style cache
~Company ╡ so TL;DR: we put the static style in the cache, but then
       ⤷ ╡ compute a child style from the animated style in the cache
       ⤷ ╡ and we put the child style also in the cache (because
       ⤷ ╡ it's not animated)
       ⤷ ╡ then we run the animation, but reuse the cache every time
       ⤷ ╡ for both child and parent
       ⤷ ╡ so after the animation is done, we end up with a cache that
       ⤷ ╡ has the correct static style for the parent but an
       ⤷ ╡ incorrect static style for the child
       ⤷ ╡ because that static style was computed from the
       ⤷ ╡ initial animated style

This fixes https://bugzilla.gnome.org/show_bug.cgi?id=763517
2017-10-10 21:48:09 +02:00
Emmanuele Bassi
f50f3e2a90 docs: Clarify the visibility of buttons in GtkStackSwitcher
If a page in the GtkStack is not visible, then the GtkStackSwitcher
won't show a button for it.
2017-10-10 10:20:53 +01:00
Emmanuele Bassi
e06bce7631 docs: Update the deprecation annotation for gtk_paint_spinner()
Bring it in line with the deprecation warning in the header.

https://bugzilla.gnome.org/show_bug.cgi?id=782396
2017-10-10 10:20:53 +01:00
Rafael Fontenelle
de03dc969e Update Brazilian Portuguese translation 2017-10-10 01:37:57 +00:00
Anders Jonsson
c832ee7092 Update Swedish translation 2017-10-09 23:16:07 +00:00
Marek Cernocky
e0e57191f2 Updated Czech translation 2017-10-09 21:31:30 +02:00
Matej Urbančič
030eb106df Updated Slovenian translation 2017-10-09 20:56:15 +02:00
Matej Urbančič
7f120279de Updated Slovenian translation 2017-10-09 20:54:12 +02:00
Piotr Drąg
38892b6341 Update Polish translation 2017-10-09 20:39:31 +02:00
Piotr Drąg
b6829dea0f gdk: Translate some more key names
These are used in the Keyboard panel of GNOME Settings.

https://bugzilla.gnome.org/show_bug.cgi?id=787866
2017-10-09 20:31:58 +02:00
Marek Kasik
52e3c095bf printing: Don't show duplicate printers
Check UUID for printers obtained via DNSSD whether
they are already installed on local CUPS server.
Don't show such printers.

Not all printers published via DNSSD have UUID entry though.

https://bugzilla.gnome.org/show_bug.cgi?id=786794
2017-10-09 18:02:28 +02:00
Daniel Boles
f29007c177 Popover: Complete depr docs of transitions-enabled
Its getter and setter are deprecated, so copy in the blurb from there.
2017-10-08 23:34:31 +01:00
Daniel Boles
cbe009fe90 Dialog: Clarify that response ID 0 is not reserved
I only got so far in math, but it looks to me like zero isn’t positive.
We don’t reserve it, so be clear about that.
2017-10-08 22:19:13 +01:00
Daniel Boles
0f805d1bd9 MenuButton: Document the correct no-direction icon
Document open-menu-symbolic, which we use, not view-context-menu, which
does not exist.
2017-10-08 21:10:24 +01:00
Руслан Ижбулатов
8dfce0eacb GDK W32: Correctly report window position in HiDPI mode
Window position returned by get_frame_extents() should be scaled.

Also take this opportunity to apply the same rounding that X11 backend
applies.

https://bugzilla.gnome.org/show_bug.cgi?id=788053
2017-10-08 19:49:00 +00:00
Daniel Boles
233f49ddcb Adwaita/README: Don’t bother mentioning parse-sass
Assume no one wants to make a change without testing it in GTK+…
If anyone has a reason to do this, they’ll be able to figure it out.
2017-10-08 14:08:34 +01:00
Daniel Boles
4515c72706 Adwaita/README: Update to reflect we use sassc now
We moved from the Ruby compiler to sassc in
commit 67953e9cfb, so this copies across
the updated info about building from GTK+ 4.

Also, explain the purpose of parse-sass.sh, since while that is not
mentioned in GTK+ 4 – and perhaps does not need to be, thanks to Meson –
we are still on Autotools here, and rebuilding the entirety of GTK+ 3 if
you only edited the CSS is a lot of waiting for no good reason.
2017-10-08 14:01:38 +01:00
Daniel Boles
30effaf7fc testmenubutton: Fix inverted keynav in the GtkMenu
GtkMenu’s own keynav code, which actually bothers to account for the
layout of items, only happens if columns > 1. So, adding items to 1
column using a reverse loop meant they were placed in the Menu’s list of
children in that order, and because we only have 1 column, Menu passes
keynav up to MenuShell, which doesn’t adjust for the items’ positions.

‘Fix’ that here by adding items in the same order they’ll have when laid
out in the Menu, so keynav does what you’d expect, not the opposite. For
that, it’s simpler just to use gtk_container_add().

Let’s presume users are using add(), attach() with a non-inverted loop,
or attach() with arguments that create 2+ columns and so GtkMenu keynav.
2017-10-08 13:15:33 +01:00
Daniel Boles
26046c2afd HC: Avoid inflated titlebar separator in GEdit etc
It was selecting paned separator, which means any separator at any level
of descent within a paned, including the toplevel container in GEdit.

We need to be more specific and only select the relevant separator that
is the direct child of the paned. This is what Adwaita does.

https://bugzilla.gnome.org/show_bug.cgi?id=788573
2017-10-07 01:29:51 +01:00
Daniel Boles
c0c23f7d44 TreeViewCol: Fix SEGV on remove/add, + memory leak
Nulling priv->button in _unset_tree_view() is asymmetrical: we create
it via init(), not _set_tree_view(), so we shouldn’t null in the latter.

Worse, doing so manifests in criticals + a SEGV easily with basic use of
testtreecolumns, removing the TVC from a TV then trying to add it to one

Finally, the wrong null-out meant dispose() failed to unref the button,
so it leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=728452
https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-07 00:41:10 +01:00
Daniel Boles
08187aeec5 TreeViewCol: Don’t try to disconnect null treeview
https://bugzilla.gnome.org/show_bug.cgi?id=788614
2017-10-06 21:34:52 +01:00
Daniel Boles
7997a722a1 iconbrowser: Don’t repeat folder-download-symbolic
It was in both [general] with a description and [other] with none.
Leave it in [other] with the other folder- icons, + the description.

bonus: this makes all of [general] fit in our default window size!
2017-10-06 21:34:52 +01:00
Timm Bäder
13c6310688 modelbutton: set_relative_to(NULL) the popover in dispose
We do set_relative_to(menu_button) when creating it so we should do this
here (or nothing).
2017-10-06 21:34:52 +01:00
Daniel Boles
b45aa63b75 FileChooserButton: Avoid unref()ing a null model
Otherwise simply closing the widget-factory would give a critical from
g_object_unref().
2017-10-06 21:34:52 +01:00
Timm Bäder
b94bfb1678 filechooserbutton: Don't leak priv->model 2017-10-06 18:18:04 +01:00
Timm Bäder
b3f4da0439 applicationwindw: Don't leak show-help-overlay action 2017-10-06 18:15:31 +01:00
Timm Bäder
183c23d710 widget-factory: Don't leak GPropertyAction instances 2017-10-06 18:15:25 +01:00
Daniel Boles
fa04eb26d7 HC: Add border/hilight when hovering flat buttons
The border and icon highlight are useful feedback that was defeated by
CSS precedence. It worked for .titlebuttons due to their implementation,
but the same was not true for custom .flat buttons. This makes it so.

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:37:07 +01:00
Daniel Boles
61137ae163 HC: Flat titlebuttons became non-flat in backdrop
When the window was backdropped, they suddenly regained their border.
This was clearly not intentional or of any practical use to anyone.

Shuffle around some selectors so that the backdrop ones do not override
the flat ones and make the borders magically reappear when backdropped.

Note that, whereas standard titlebuttons get the border on :hover, other
.flat buttons in the headerbar do not. That should probably be fixed too

https://bugzilla.gnome.org/show_bug.cgi?id=788580
2017-10-06 02:36:52 +01:00
Daniel Boles
7fc09f18a3 ComboBox: Don’t let modes disconnect each other
…from priv->button. My refactor to g_signal_disconnect_by_data()
included this widget, when I shouldn’t have as both modes use it.
This e.g. broke opening a CB by keyboard that was currently in menu
mode, if it had been in list mode initially (e.g. due to the theme).

Fix by moving to disconnect_by_func() and only removing in each mode’s
destroy() method the signals that it set on the button in its setup().

https://bugzilla.gnome.org/show_bug.cgi?id=788577
2017-10-06 01:40:42 +01:00
Daniel Boles
6c3d17b867 HighContrastInverse: Make window borders visible
They were hard-coded to a transparent black, but that is our bg colour
in HC Inverse, so windows stacked on top of each other or a dark
background blended together into a mush.

Fix this by making the $_wm_border* colours relative to the fg colour,
so that HighContrastInverse gets borders that are transparentised white.

https://bugzilla.gnome.org/show_bug.cgi?id=788575
2017-10-06 00:38:13 +01:00
Daniel Boles
3a0ea4e0d2 HC: Fix MessageDialog’s rounded bottom borders
A missing decoration selector meant that we got a solid black background
behind the rounded corners of the dialog.

Copy the equivalent code from Adwaita, including nicely rounding the
focus outline too (& sorry, but this needs more newlines to be readable)

https://bugzilla.gnome.org/show_bug.cgi?id=788574
2017-10-06 00:25:58 +01:00
Daniel Boles
d9df5dfa74 HighContrast: Fix titlebar containing >1 headerbar
by migrating the relevant code from Adwaita, to dodge unwanted doubling
up of the bottom border and such.

It also hopefully still encompasses whatever commit
b4371728de was trying to do; certainly, it
retains the resolution of the main bug/patch that one was attached with.

https://bugzilla.gnome.org/show_bug.cgi?id=769877
2017-10-05 21:49:11 +01:00
Daniel Boles
8abdbfee16 HC: Copy working tooltip code from Adwaita & tweak
There were various problems, like only selecting on .tooltip and not the
widget node tooltip, not being specific enough for tooltip.csd, etc. So,
specific theming was absent, and default popup window styles got applied

This commit copies in the better working tooltip CSS from Adwaita, but
applies a couple of changes to make it work better in the HC themes:
 • Reduce the transparency of the tooltip, so we achieve higher contrast
 • Drop the black text-shadow, as it is not useful on this more black bg

Note: we may then need to re-add some of this to the .tooltip class. But
it is unclear what needs done there. While Adwaita is not doing it, we
are better not to confuse by keeping it in HC only; we should try to be
as close as possible, to make it easier for HC to keep up with Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=769879
2017-10-05 19:41:00 +01:00
Timm Bäder
acab79040a switch: Fix int/double comparison
We get a double coordinate.
2017-10-05 18:50:12 +01:00
Timm Bäder
070af44fc7 appchooserdialog: Remove unused macro 2017-10-05 18:50:12 +01:00
Timm Bäder
18b8b2b8e8 combobox: Remove unneeded queue_resize call
The remove/add/set_parent/unparent calls in there already do the
necessary work.
2017-10-05 18:50:12 +01:00
Xavi Ivars
ee5b762246 [l10n] Updated Catalan (Valencian) translation 2017-10-05 18:06:25 +02:00
Daniel Boles
34cd1e3e5e ComboBox: list: Don’t leak path on expand/collapse
Determining that we clicked on the expander means that we had a valid
path, so we still need to free that, even though we’re not selecting it.

https://bugzilla.gnome.org/show_bug.cgi?id=788505
2017-10-05 01:33:22 +01:00
Daniel Boles
b0e18d676e HighContrast: Correctly select window decoration
We need

    .window-classes decoration

but within the decoration parent selector, we were doing
&.window-classes, which gave us

    decoration.window classes

We need to fix this by selecting on .window-classes &

https://bugzilla.gnome.org/show_bug.cgi?id=788496
2017-10-05 00:27:39 +01:00
Daniel Boles
512a33fee1 updateiconcache: Avoid confusing loop construct
n_attach_points is the result of g_strv_length(): the index at which the
string vector ends in NULL. So by definition, when i == n_attach_points,
string[i] == NULL, and there is no need to check for the latter. The
fact that we did appears to confuse static analysers, as the dereference
and index check were inverted from what would normally be safe. We could
reverse them, but we may as well just remove the unnecessary NULL check.

https://bugzilla.gnome.org/show_bug.cgi?id=788458
2017-10-04 22:55:54 +01:00
Colomban Wendling
367ff368f2 Enter submenus when activating their parent item
This gives consistent behavior with e.g. Qt, Mozilla's suites and
LibreOffice (with non-truly native backends like "gen" and "gtk",
but unlike "gtk2" and "gtk3" ones that probably use true GTK menus).

This behavior is expected by at least some accessibility users, and
it seems good to behave like other common applications and toolkits
in this area.  There should be no issue in doing so either for current
users, as it only enters the submenu instead of not doing anything.

https://bugzilla.gnome.org/show_bug.cgi?id=778811
2017-10-04 22:48:21 +01:00
Daniel Boles
a8df958c07 ComboBox: Don’t pile up ::grab-broken handlers
It was connecting a new handler to do the same thing every time it
popped up, never disconnecting between. Just connect once in init().
2017-10-04 22:48:21 +01:00
Daniel Boles
6c5b284615 ComboBox: list: Make the popup_window modal
This seems to fix 2 bugs in list-mode ComboBoxes: failure to close the
popup upon clicking out of it, and failing to receive mouse input in the
popup of a CB contained within a modal parent window.

https://bugzilla.gnome.org/show_bug.cgi?id=738387
https://bugzilla.gnome.org/show_bug.cgi?id=776793
2017-10-04 21:53:53 +01:00
Daniel Boles
b92234be08 Revert "Revert "combobox: remove superfluous GTK+ grabs""
This reverts commit 1301723905.

This only appeared to fix the two bugs it linked because, rather than
being superfluous, the GTK+ grabs resulted in effectively having *none*,
or something, and could cause a critical when closing during a scroll.

This also reverts commit b9989e554b, which
depended on the above.

See next commit, which *should* properly fix what this one claimed to…

https://bugzilla.gnome.org/show_bug.cgi?id=787274
2017-10-04 21:53:53 +01:00
Daniel Boles
a20ff44b09 ComboBox: list: Fix expanding/collapsing tree rows
On clicking release, we call TreeView.get_path_at_pos() &, if we hit a
row, select it (if sensitive) & close the popup. But this alone does
not account for clicks on the expanders within the TreeView, so in
addition to expanding/collapsing, clicking them would close the list.

Check if the click is in the cell_area() & thus “excluding surrounding
borders and the tree expander area” but still including the background
(which TreeView.is_blank_at_pos() doesn’t); if TRUE, don’t select/close.

The popup doesn’t always resize enough… so there’s still breakage here.
The XXX comment on TreeView requests in list_position() may be relevant
to this. But at least this drags such CBs one step closer to adequacy:
expanding by mouse now works ~no worse~ than by keyboard already did.

https://bugzilla.gnome.org/show_bug.cgi?id=788505
2017-10-04 21:53:53 +01:00
Daniel Boles
628ff776d1 ComboBox: rm pointless ScrolledWindow.set_policy()
This just set hpolicy to what it already was and then called
set_policy() with the same two arguments again, which did nothing.
2017-10-04 21:53:53 +01:00
Georges Basile Stavracas Neto
73155e3988 display-x11: Unset tiled state if _GTK_EDGE_CONSTRAINTS is supported
Commit c415bef5de introduced support for the new _GTK_EDGE_CONSTRAINTS
atom. If the compositor supports that atom, however, we were always
setting the tiled state, even if no actual tiling information is
available, where the correct action is to completely remove any traces
of the tiled state.

Fix that by correctly removing the tiled state when compositor supports
_GTK_EDGE_CONSTRAINTS Xatom.

https://bugzilla.gnome.org/show_bug.cgi?id=788516
2017-10-04 15:33:15 -03:00
Georges Basile Stavracas Neto
7ab6dd64de theme: Fix Adwaita headerbars
We were not detecting correctly the cases where we should have
a rounded or a squared headerbar.
2017-10-04 14:46:02 -03:00
Daniel Boles
77401118c2 Adwaita: Fix typo .backgrounf => .background 2017-10-04 15:43:21 +01:00
Matthias Clasen
e72d54c8a7 3.22.24 2017-10-04 08:09:26 -04:00
Matthias Clasen
899cfb3c50 Fix several issues with resizing
Some of the border windows were not placed correctly.

Patch by Jan Steffens.
2017-10-04 07:35:45 -04:00
Matthias Clasen
223a709403 wayland: Fix a typo
We were not setting the right tiling hint in some cases.

Patch by Jan Steffens.
2017-10-04 07:35:45 -04:00
Daniel Boles
b9989e554b ComboBox: Don’t try to remove grab on NULL device
gtk_device_grab_remove() quite rightly expects a non-NULL GdkDevice, and
we already have a branch ensuring that, into which we can move this call
2017-10-04 12:23:49 +01:00
Daniel Boles
fa4d814462 TreeMenu: Remove accidentally duplicated doc lines
Not that it actually matters, as this is not public anymore, but this
was done accidentally. Also, sync a property description to ComboBox.
2017-10-04 12:03:55 +01:00
Daniel Boles
3783934436 testcombo: Test grid :row- and :column-span-column
Ditch two items that were white and so weren’t visible on our standard
theme anyway, and use the new space to test extra grid-mode properties.

Note that if we do this then, as before, we set the ListStore on the
ComboBox before appending to it, that produced runtime warnings like:

Gtk-CRITICAL **: gtk_menu_attach: assertion 'left_attach < right_attach' failed

I didn’t look into that yet, but it may indicate that attaching items
vs. recognising their spans don’t occur in the correct order. For the
purposes of testing this, I just create the CB after filling its model.
2017-10-04 11:04:52 +01:00
Daniel Boles
4163a53630 ComboBox|TreeMenu: Slightly clarify wrap-width doc 2017-10-04 10:21:18 +01:00
Daniel Boles
7559eaf5f9 ComboBox|TreeMenu: Clarify :row|column-span-column
ComboBox and TreeMenu warned in the doc for :row-span-column that the
value must not exceed :wrap-width, but :wrap-width does not interact
with the number of rows; it’s the :column-span-column that’s relevant.

Also: Warn that spans must be > 0 for rows too, and that column spans <=
:wrap-width are also not useful for items at menu column positions > 0.

Finally, refer to items having spans, not values, as we were already
talking about values in the model (and rows in the menu).
2017-10-04 10:21:01 +01:00
Matthias Clasen
a5c2472941 3.22.23 2017-10-03 22:40:44 -04:00
Marco Trevisan (Treviño)
c91a4f31f0 HighContrast: set min-height for headerbars
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-03 22:26:36 -04:00
Marco Trevisan (Treviño)
b4371728de HighContrast: don't select .titlebar when is an headerbar
https://bugzilla.gnome.org/show_bug.cgi?id=784562
2017-10-03 22:26:36 -04:00
Georges Basile Stavracas Neto
79bf5b8592 window: Add individual CSS classes based on edge constraints
The last touch on this patch series is making GtkWindow able to
selectively adjust various UI details based on the different
tiled edges. The main driver here is that we don't want to show
shadows on edges that are constrained.

This patch adds the necessary code to do that, while still
maintaining compatibility with the old ways.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
c415bef5de x11: Add support for _GTK_EDGE_CONSTRAINTS atom
Following the previous patch, where edge constraints support
was added to the Wayland backend, this patch introduces the
necessary code to handle the _GTK_EDGE_CONSTRAINTS atom from
X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
3bae80dfc1 wayland: consider edge constraints in surface configuration
Now that GTK windows have the ability to properly handle
per-edge tiling constraints, this patch extends GTK's
internal Wayland protocol to have a proper enum with the
relevant edge data.

Once this approach is validated, we can think of upstreaming
this work as an official Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
d73c49ecef window: handle tiled edges separately
GTK windows don't have their tiling states really
hooked into the client-side decoration code, and
the only effect it has is disabling the resizing
edges.

With the introduction of per-edge tiling information,
we are backed by much more precise data on how the
window manager wants the app to behave.

This patch, then, fixes GtkWindow to take into account
per-edge tiling information. For compatibility purposes,
the previous tiled field was kept, and thing will just
continue working if no edge information is supplied.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:46 -03:00
Georges Basile Stavracas Neto
f1a3bc2f2c gdk: introduce edge constraint states
These states will be consumed by GtkWindow in order to
have better edge management on tiling situations. Their
values are supplied by the compositor, and will be send
through and X11 Atom or a Wayland protocol extension.

https://bugzilla.gnome.org/show_bug.cgi?id=783669
2017-10-03 20:06:43 -03:00
Daniel Boles
66767adc63 widget-factory: Demo different Frame border-styles
This shows not all, but the interesting/less predictable styles, and
the ones that correspond to the :shadow-types that were here before.
2017-10-02 20:22:33 +01:00
Daniel Boles
93fc2a8edd Revert "widget-factory: Usefully demo Frame shadow types"
This reverts commit 15a3747406.

There is a way to get different kinds of borders: it's CSS. It's better
to keep the 4 Frames and demo the different styles we can do using CSS.
2017-10-02 19:50:06 +01:00
Daniel Boles
1d80453e47 Frame: Enhance CSS docs
Note optional .flat class and that the old shadow types are replaced by
CSS border-style et al.; quote names of nodes & classes for readability.
2017-10-02 19:50:06 +01:00
Matthias Clasen
364559b789 3.22.22 2017-10-02 12:45:24 -04:00
Daniel Boles
142ef42d22 Widget: Fix obvious copypasto in set_mapped() doc 2017-10-01 20:23:59 +01:00
Daniel Boles
82a9331144 docs: css-properties: Fix wrongly repeated colour 2017-09-29 18:13:44 +01:00
Sam Thursfield
d6547060e9 flowbox: Fix annotation for GListModel binding callback
The GtkFlowBoxCreateWidgetFunc type lacked GObject Introspection
annotations for its arguments. This made gtk_flow_box_bind_model()
unusable from Python as the callback function would be passed useless
values.

The annotations that I've added match those of the similar callback
type GtkListBoxCreateWidgetFunc.

https://bugzilla.gnome.org/show_bug.cgi?id=780758
2017-09-27 13:45:08 +02:00
Daniel Elstner
a57630b30c gdk-wayland: Do not leak dummy 1x1 surface on every draw
When using EGL, neither leak nor re-create the dummy 1x1 Cairo
surface every time gdk_wayland_window_ensure_cairo_surface()
is called.

https://bugzilla.gnome.org/show_bug.cgi?id=775126
2017-09-26 21:15:21 +02:00
Daniel Boles
701f82d1c3 Button: Annotate set_image() argument as nullable
Passing NULL is valid and results in the image child being unset/removed
2017-09-24 22:20:34 +01:00
Daniel Boles
ca4730cc95 Label: Replace allow-none with nullable/optional 2017-09-24 19:19:20 +01:00
Timm Bäder
3501a7ea41 emojichooser: Plug a memory leak 2017-09-24 19:19:20 +01:00
Andre Klapper
6b899bb782 Fix broken translations of 'calendar:' settings (ignored translator comments) 2017-09-24 19:19:20 +01:00
Arash Mousavi
1b9d1105c3 Update Persian translations 2017-09-22 22:54:57 +03:30
Daniel Boles
e9570e6084 ToolItem: Fix nullable annotation put on wrong arg
D’oh
2017-09-20 23:53:54 +01:00
Daniel Boles
5c700cf575 gdkseatdefault: Grab touch events where applicable
gdk_seat_default_grab() grabs POINTER_EVENTS if the capability is
GDK_SEAT_CAPABILITY_ALL_POINTING. But that enumerator is a union that
includes GDK_SEAT_CAPABILITY_TOUCH, but we never grabbed TOUCH_EVENTS,
an unused macro that was presumably created with this purpose in mind.

So, check which of the ALL_POINTING capabilities we have, and set the
right mask of POINTER_EVENTS and/or TOUCH_EVENTS as required.

As part of this, explicitly let TABLET_STYLUS take over pointer events,
as this is the intended behaviour and was the effective result before.

This should fix touch events being lost in migrating from Device.grab()
to Seat.grab(GDK_SEAT_CAPABILITY_ALL_POINTING), as found by Inkscape.

https://bugzilla.gnome.org/show_bug.cgi?id=781757
2017-09-20 19:19:31 +01:00
Daniel Boles
f6eb767c83 Overlay: Document style classes added per position 2017-09-20 19:19:23 +01:00
Piotr Drąg
a33e8053a8 Update Polish translation 2017-09-19 02:05:52 +02:00
Daniel Boles
47879de090 Window: Clarify documentation of set_application()
Clarify that ::destroy, not ::hide*, removes a window from its app, by
replacing the mention of open windows with the blurb on destruction from
:application, completing commit 7db4bee4b6

Also link to the equivalent gtk_application_(add|remove)_window() calls,
since Application.add_window() already links back to Window:application.

* unless you use gtkmm…

https://bugzilla.gnome.org/show_bug.cgi?id=639931
2017-09-19 00:20:06 +01:00
Daniel Boles
6e42d3a34a PlacesSidebar: Avoid unused mem if !CLOUDPROVIDERS
The member GList *cloud_rows is only ever used if HAVE_CLOUDPROVIDERS is
defined, so don’t declare it if not.
2017-09-19 00:20:06 +01:00
Daniel Boles
c18ac0c4e3 PlacesSidebar: Unref cloud_manager in dispose()
We ref the CloudProviders singleton in init() but did not unref it in
dispose(). Do so, using g_clear_object().

https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 18:20:02 +01:00
Daniel Boles
bfe54d1185 SidebarRow: Unref CloudProvider on change/finalize
It was never unref()d, either when replacing the existing GObject in
set_property(), cleaning up in finalize(), or becoming a placeholder.

Fix by using g_set_object() and g_clear_object() to unref as needed.

This also drops the check that the newly set object is a valid cloud
provider account, as we don’t do the equivalent for any of the other
object-typed properties, and Carlos didn’t think this was important.

https://bugzilla.gnome.org/show_bug.cgi?id=787600
2017-09-18 18:20:02 +01:00
Anders Jonsson
c477dad41d Update Swedish translation 2017-09-18 11:14:19 +00:00
Daniel Boles
30cb5b0754 Adwaita: Fix color of focus outline on colorswatch
The focus outline disappeared as the colour of the swatch got close to
the normal focus outline colour, which is alpha(currentColor, 0.3).

Fix by making the outline an alpha’d version of the tick colour, but
more opaque than normal outlines. 0.6 seems good enough; feel free to
improve it, but at least this ensures the outline can’t vanish anymore.

HighContrast achieves this already because it applies the color property
to the main node, not the overlay. Doing that means the outline is fully
opaque, which is fine for HC obviously but was excessive for Adwaita.

https://bugzilla.gnome.org/show_bug.cgi?id=787757
2017-09-16 17:02:24 +01:00
Daniel Boles
437ce0197b Adwaita: dark: Make colorswatch.light tick visible
It used $text_color unconditionally, but in :dark, text is white, so we
overlaid a white tick on any light colours, all the way to white itself.

Using these named colours doesn’t make practical or semantic sense.
Instead, use white/black over dark/light swatches, as in HC, so all
variant–swatch combos work. Light looks the same, & :dark works now.

For backdrop, use alpha 0.5, unlike 0.7 in HC, as that seemed excessive
& different from the current effect. 0.5 is almost identical to how
$backdrop_fg_colour is a 50% mix of $fg_color, & matches backdrop text.

https://bugzilla.gnome.org/show_bug.cgi?id=787531
2017-09-16 16:11:47 +01:00
Daniel Boles
009e388bb7 Expander: get_label() return is nullable
Also, use gchar to match the header.
2017-09-15 18:25:19 +01:00
Daniel Boles
b68892b5be Expander: Annotate new()’s label arg as nullable
to match new_with_mnemonic()
2017-09-14 21:19:33 +01:00
Daniel Boles
7b08d11891 Expander: Replace (allow-none) with (nullable)
The former is deprecated in favour of the latter.
2017-09-14 21:19:14 +01:00
Daniel Boles
4e1e0cf138 Expander: Explain how to conditionally style arrow 2017-09-14 21:16:16 +01:00
Daniel Boles
f2a4b2f14c Spinner: Document how to select on animated in CSS
This is not particularly obvious, so it seems worth including.
2017-09-14 19:25:26 +01:00
Daniel Boles
1b08e34c11 gtk-demo/theming: Don’t mislead about raised class
This class is not added by any widgets nor themed by Adwaita/HC.
However, it is presented here as if it does something. It doesn’t.

But we changed the 2 buttons with the .raised class to use symbolic
icons, unlike their ‘unraised’ counterparts, which is unnecessarily
confusing and might make people think .raised affects icons somehow.

So, make them use the same icons in all cases; that way, if .raised is
ever made to do anything, 6 years later, what it does will be clear.

https://bugzilla.gnome.org/show_bug.cgi?id=644248
2017-09-14 18:34:07 +01:00
Daniel Boles
1421855234 gtk-demo/Makefile: Really get deps of C GResource
The XML resides in $(srcdir), not $(builddir); it is not a built source.
Using the latter, changes to the referenced files did not cause rebuild.
2017-09-14 18:34:07 +01:00
Daniel Boles
15a3747406 widget-factory: Usefully demo Frame shadow types
Instead of showing the 4 types except for GTK_SHADOW_NONE, which are all
treated identically and provide no way for themes to differentiate, just
keep 2 Frames, and make one of them GTK_SHADOW_NONE to demo a flat Frame
2017-09-14 18:34:07 +01:00
Daniel Boles
441a144e29 Frame: Add missing fixed-width format to enums 2017-09-13 19:51:23 +01:00
Daniel Boles
26104a30a5 FlowBox: Explain how to avoid inflated min size
along the orthogonal orientation. It seems a FlowBox on its own can only
handle being shrunk along its main orientation. The orthogonal requests
a huge min size – reserving what it would need if the main orientation
got its min size, which would flow all children in 1 line orthogonally.

Adding it to a ScrolledWindow (any policy) enables free shrinking, so
size_allocate() can reflow how users in this situation probably expect.

https://bugzilla.gnome.org/show_bug.cgi?id=787021
2017-09-12 22:48:58 +01:00
Hiroyuki Ito
e7fbfdd067 ColorButton: Don’t destroy dialog @ ::delete-event
Without specifically connecting ::delete-event to something, the dialog
will be destroyed when it is closed, for example by pressing Esc. This
meant that when dismissing it this way, unlike by pressing Cancel, any
custom palette would be lost when the dialog was next opened, and so on.

Resolve this by making ::delete-event just do GTK_RESPONSE_CANCEL, so
closing the dialog has the same effect as clicking its Cancel button.

https://bugzilla.gnome.org/show_bug.cgi?id=787444
2017-09-12 21:15:53 +01:00
Philip Withnall
4b88560feb gtknotebook: Simplify some if-conditions
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=787303
2017-09-12 21:15:53 +01:00
Philip Withnall
abef21776d gtkmountoperation-x11: Do array length check before dereference
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=787302
2017-09-12 21:15:53 +01:00
Efstathios Iosifidis
92e309c84c Update Greek translation 2017-09-12 19:42:33 +00:00
Efstathios Iosifidis
3a88aac5e6 Update Greek translation 2017-09-12 19:40:44 +00:00
Stas Solovey
e9bbcf7b15 Update Russian translation 2017-09-12 19:30:36 +00:00
Stas Solovey
eeeb8f21e2 Update Russian translation 2017-09-12 19:15:22 +00:00
Cheng-Chia Tseng
d80969ae8e Update Chinese (Taiwan) translation 2017-09-12 17:24:00 +00:00
Cheng-Chia Tseng
9b52ac66fd Update Chinese (Taiwan) translation 2017-09-12 17:07:41 +00:00
hanniedu
88152adedd Updated Dutch translation 3.22 2017-09-12 12:38:19 +02:00
Matthias Clasen
fad199b406 3.22.21 2017-09-11 11:19:47 -04:00
Matthias Clasen
cf288a1b09 Fix a corner-case for emoji input
As reported in https://github.com/ibus/ibus/issues/1944,
typing u201e while holding Ctrl+Shift used to give a „
when letting go of Ctrl+Shift. This broke when we introduced
Ctrl+Shift+e to start Emoji sequences. Fix this by only
looking for Ctrl+Shift+e if we are not already in a hex
sequence.
2017-09-11 11:19:47 -04:00
Daniel Mustieles
2102f78582 Update Spanish translation 2017-09-11 13:57:21 +00:00
Ask Hjorth Larsen
d251daffeb Updated Danish translation 2017-09-10 18:16:33 +02:00
Ask Hjorth Larsen
58801a0b03 Updated Danish translation 2017-09-10 18:15:01 +02:00
Muhammet Kara
60dea67275 Update Turkish translation 2017-09-10 15:09:31 +00:00
Jordi Mas
b939932cad Fixes to Catalan translation 2017-09-10 08:22:12 +02:00
Inaki Larranaga Murgoitio
4d5e12c075 Update Basque language 2017-09-09 17:54:59 +02:00
Inaki Larranaga Murgoitio
34b4fe49ff Update Basque language 2017-09-09 17:54:30 +02:00
Matej Urbančič
6d7103b462 Updated Slovenian translation 2017-09-08 11:02:10 +02:00
gogo
9fe68b8c12 Update Croatian translation 2017-09-07 18:35:09 +00:00
Daniel Boles
660cc709fc Entry: Fix leak of text in ensure_has_tooltip()
Thanks to Mohammed Sadiq for noticing this. I guess I got
Widget.get_tooltip_text() confused with Label.get_label().

https://bugzilla.gnome.org/show_bug.cgi?id=787410
2017-09-07 14:54:14 +01:00
Jiri Grönroos
70648318a3 Update Finnish translation 2017-09-07 08:41:41 +00:00
Piotr Drąg
323ce68e98 Update Polish translation 2017-09-06 20:14:41 +02:00
Çağatay Yiğit Şahin
8e434d20ae Update Turkish translation 2017-09-06 06:48:16 +00:00
Mario Blättermann
f272a2facc Update German translation 2017-09-05 17:48:13 +00:00
Marek Cernocky
4dfee01af6 Updated Czech translation 2017-09-05 16:37:09 +02:00
Jakub Steiner
417d345019 adwaita: use generic sidebar icon style
https://bugzilla.gnome.org/show_bug.cgi?id=786613
2017-09-05 13:55:44 +02:00
Daniel Mustieles
bb445a9a75 Update Spanish translation 2017-09-05 10:36:15 +00:00
Daniel Boles
a6393e1a47 Adwaita: Leave fg color of hovered emoji alone
Only HighContrast has a clear problem, and this avoids some probably
unwanted changes of certain colours in the weird greyscale emoji I have
available to test here.
2017-09-05 01:38:35 +01:00
Daniel Boles
464df4007b themes: Use $selected_fg_color for :hovered emoji
This is much needed for HighContrast as otherwise emoji are invisible
(or nearly in Inverse). It also syncs up with hovered menu items, etc.

https://bugzilla.gnome.org/show_bug.cgi?id=787279
2017-09-05 01:03:54 +01:00
Daniel Boles
21c7ea2bd4 HighContrast: Kill abominable headerbar vseparator
Commit 70b61973fc fixed a syntax error and
unwittingly released this bizarre mutant.

https://bugzilla.gnome.org/show_bug.cgi?id=787280
2017-09-05 01:01:50 +01:00
Daniel Boles
99e27ab145 ComboBox: Don’t popdown if releasing on scrollbar
On button release, we were popping down if the event widget was anything
but priv->button. This broke scrolling by clicking a mouse button, i.e.
when releasing a click in the trough or finishing a drag of either bar.
That’s unexpected, inconvenient, and pointless. So, let’s stop doing it.

https://bugzilla.gnome.org/show_bug.cgi?id=738893
2017-09-04 23:59:56 +01:00
Anders Jonsson
2e866ca293 Update Swedish translation 2017-09-04 22:16:39 +00:00
Daniel Boles
7210945292 EmojiChooser: Ensure always have a selected button
We were only selecting a section’s button if the adjustment y coord was
within its heading, so scrolling slightly into it unchecked all buttons.
This also fixes how we could end up with the first 2 selected, somehow.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:33:24 +01:00
Daniel Boles
02e310a1d5 EmojiChooser: Check the 1st button before 1st show
We scroll to the top in show() but only ever selected a button when the
adjustment changed, which doesn’t happen in init(). Check it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=787172
2017-09-04 22:33:24 +01:00
Timm Bäder
14d376a2a6 sidebarrow: Remove useless size group
Nice try, but size groups don't work with invisible widgets anyway.
Invisible widgets request 0×0.

[reapplying after accidental reintroduction in the cloudproviders patch;
see https://bugzilla.gnome.org/show_bug.cgi?id=786123#c39]
2017-09-04 22:33:24 +01:00
Matthias Clasen
51e636be0f 3.22.20 2017-09-04 13:02:58 -04:00
Baurzhan Muftakhidinov
dd99aeb4bb Update Kazakh translation 2017-09-04 15:48:15 +00:00
Matthias Clasen
9913c4cbaa 3.22.20 2017-09-04 11:29:19 -04:00
Julius Härtl
8a940474d7 gtkplacessidebar: adapt libcloudproviders api rename
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-09-04 11:27:31 -04:00
Daniel Boles
dc7952d2c6 HighContrast: basic port of emoji CSS from Adwaita
This is better than nothing: without specific CSS, the Chooser was too
large, the emoji were too small, and the buttons were generally ugly.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 10:58:50 -04:00
Daniel Boles
517b5360f4 Adwaita: proper colours for inactive emoji buttons
Use opacity to differentiate unselected/hovered/selected buttons. It had
assumed bg < border < fg colours, which may be false, as in Adwaita:dark

This also means we do not need to special-case for the backdrop state.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 10:58:42 -04:00
Daniel Boles
419ecc9e80 Adwaita: Make use of SASS syntax for emoji stuff
This makes the theme easier to maintain.

https://bugzilla.gnome.org/show_bug.cgi?id=786956
2017-09-04 10:58:28 -04:00
Matthias Clasen
429a9e6b60 Updates 2017-09-04 09:56:24 -04:00
Milo Casagrande
192ca899fc Update Italian translation 2017-09-04 11:43:05 +00:00
Aurimas Černius
1e1012696a Updated Lithuanian translation 2017-09-03 23:37:27 +03:00
Balázs Úr
911ac2e3c6 Update Hungarian translation 2017-09-03 16:51:46 +00:00
Rūdolfs Mazurs
a53c533293 Update Latvian translation 2017-09-03 19:27:50 +03:00
Daniel Boles
56027e079d Adwaita: Fix ineffective theming of switch slider
in a specific case, which was applying .slider as a class on the parent
switch, instead of correctly selecting on its child node named slider.

This makes the border on the outside of a switch in a selected listbox
row look better in the light variant. Since the code was never removed,
it was clearly meant to work, and making it work is a clear improvement.
2017-09-03 14:01:17 +01:00
Daniel Boles
70b61973fc HighContrast: Fix outdated name for headerbar box 2017-09-03 13:37:39 +01:00
Daniel Boles
80bd795969 Adwaita: Fix outdated name of selection-menu arrow 2017-09-03 13:37:24 +01:00
Daniel Boles
bc7a4e5abd docs: css-overview: Don’t recommend broken syntax
Using this produced warnings about the Pango syntax of <Family> <size>
being deprecated, and the size being invalid due to no unit specified.
Also, that multi-word font family presumably wouldn’t work as expected.
2017-09-03 12:25:22 +01:00
Timm Bäder
87e76c12a9 testgtk: fix css 2017-09-03 12:20:13 +01:00
Daniel Boles
8dbb17e1f3 Toolbar: Clarify set_show_arrow() a bit more 2017-09-03 11:04:48 +01:00
Daniel Boles
66d63e4a47 Toolbar: Clarify how the arrow overflow menu works
The fact it affects the preferred size, and only works with ToolItems
that return a menu proxy item, was unclear unless deduced from other
sources, and this led to users thinking it was broken, for example:

https://stackoverflow.com/q/44644642/2757035

https://bugzilla.gnome.org/show_bug.cgi?id=787158
https://bugzilla.gnome.org/show_bug.cgi?id=787195
2017-09-03 10:58:58 +01:00
Daniel Boles
111ce61517 ToolItem: Add see-also from proxy setter to signal 2017-09-03 10:58:58 +01:00
Daniel Boles
ea73e0e0bd ToolItem: Annotate menu proxy item as nullable
It can be NULL. ::create-menu-proxy gave an example of when a NULL proxy
menu item could be useful, but the accessors did not annotate it as such.
2017-09-03 10:58:58 +01:00
Rafael Fontenelle
8216a7aa0f Update Brazilian Portuguese translation 2017-09-02 20:51:14 +00:00
Daniel Boles
baf725a795 Revert "sk.po: Consistently translate “Insert”"
This reverts commit d09bc2b108.

As an English-speaker, I know nothing about complex grammar, and it’s
been brought to my attention that some languages might differ in the
translation of the same command depending on where it appears.

So, I’d better assume everyone else knows better than me. Apologies!
2017-09-02 16:11:06 +01:00
Daniel Boles
ed782577e8 Adwaita: Fix colour mixing of emoji section button
when hovered, by using %, since SASS does not handle decimal mixes.
2017-09-02 16:01:39 +01:00
Daniel Boles
d09bc2b108 sk.po: Consistently translate “Insert”
The two occurrences disagreed on the translation, and my amateur
investigation indicates this one is correct.
2017-09-02 16:01:39 +01:00
Daniel Boles
64976f1f0d gl.po: Consistently translate/capitalise “Emoji”
GTK+ 3 and 4 disagreed on capitalisation and the translation of “Emoji”.
Use sentence case as elsewhere & the most common translation: emoticono.
2017-09-02 16:01:39 +01:00
Jordi Mas
84331b394c Update Catalan translation 2017-09-02 16:21:10 +02:00
Jordi Mas
554e1487a5 Update Catalan translation 2017-09-02 16:20:07 +02:00
Jordi Mas
9278310b3a Update Catalan translation 2017-09-02 16:16:12 +02:00
Matthias Clasen
434ece4a1c emoji chooser: No emoji in the search entry
Recursion is fun, but better avoided in the ui.

https://bugzilla.gnome.org/show_bug.cgi?id=786960
2017-09-02 08:48:47 -04:00
Matthias Clasen
172c6c1949 entry: Consider input hints for Emoji support
Don't show "insert emoji" in the context menu if input
hints indicate that Emoji input is not useful.
2017-09-02 08:48:07 -04:00
Matthias Clasen
f3df85e528 Add input hints for Emoji input
Allow hinting input methods about whether Emoji support is
useful or not.
2017-09-02 08:48:00 -04:00
Fran Dieguez
f120334700 Update Galician translation 2017-09-02 10:07:51 +00:00
Dušan Kazik
85ca7fa612 Update Slovak translation 2017-09-02 08:06:18 +00:00
Dušan Kazik
cfafd1d69f Update Slovak translation 2017-09-02 08:02:39 +00:00
Andika Triwidada
152e9c0b3a Update Indonesian translation 2017-09-02 00:58:14 +00:00
Matthias Clasen
f0b4b45b76 emoji chooser: Avoid a crash
The emoji chooser gets disposed already, because it is attached
to the toplevel as a popover. Doing it again when the object data
is cleared is leading to a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=787103
2017-09-01 19:53:11 -04:00
Piotr Drąg
1694a67083 Update Polish translation 2017-09-02 01:50:34 +02:00
Mohammed Sadiq
8d0dc64e61 emoji-chooser: fix subsequent scroll
Event handlers on scroll window should only be run once the widget
is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=786964
2017-09-01 18:31:40 -04:00
Daniel Boles
38b8b3ce1d Entry: Set tooltip text on icon for emoji chooser
https://bugzilla.gnome.org/show_bug.cgi?id=786885
2017-09-01 18:18:45 -04:00
gogo
0388f16fb4 Update Croatian translation 2017-09-01 21:55:48 +00:00
Daniel Boles
d9b5fd357f ComboBox: Dodge possible surplus disconnects
in case anyone connected any other signal on the model to this ComboBox.
2017-09-01 20:17:11 +01:00
Daniel Boles
423cd8e73e ScrolledWindow: Dodge possible surplus disconnects
In case the outgoing Adjustment for whatever reason has other handlers
referring to this SW, be sure to avoid disconnecting any but our own.
2017-09-01 16:28:44 +01:00
Daniel Boles
3ff04099a7 ComboBox: Remove pointless signal ID member fields
We don’t need to store these for disconnection, as we can just use
g_signal_handlers_disconnect_by_data(). Also, merge redundant ifs.
2017-09-01 16:28:44 +01:00
Daniel Boles
85ca68b1c2 ComboBox: Clean up handler disconnection some more 2017-09-01 16:28:44 +01:00
Dušan Kazik
d6ae627069 Update Slovak translation 2017-09-01 14:19:10 +00:00
Daniel Boles
5dc5576e14 ScrolledWindow: Fix non-disconnection of handlers
• Use disconnect_by_data() to catch both _adjustment_changed() and now
  _adjustment_value_changed(), as the latter had been missed until now.

• Also disconnect from indicator_value_changed(), which was not done in
  destroy() due to indicator_reset() and remove_indicator() disagreeing.

https://bugzilla.gnome.org/show_bug.cgi?id=775074
2017-08-31 23:17:03 +01:00
Timm Bäder
64d05b5dc6 scrolledwindow: Properly remove scrollbars
Instead of keeping an extra ref, then unparent+destroy+unref, don't keep
an extra ref and just unparent the scrollbar when appropriate.
2017-08-31 22:59:40 +01:00
Daniel Boles
f0522e9944 Window: Connect screen signals properly in init()
Do not connect to get_settings_for_screen() if we have no screen…

Use g_signal_connect(), not connect_object(), to match how set_screen()
makes these same connections, and how finalize() already disconnects.

https://bugzilla.gnome.org/show_bug.cgi?id=705640
2017-08-31 20:23:00 +01:00
Daniel Boles
169e5502d1 FileChooserWidget: Remove an unused #include 2017-08-31 20:05:32 +01:00
Daniel Boles
794c0946a5 Entry: Rename int helper to gtk_entry_clear_icon()
It was called gtk_entry_clear(), which was unnecessarily vague.
2017-08-30 21:12:56 +01:00
Daniel Boles
12d96f27d3 Entry: Fix Shift-click → extend/truncate selection
Since the move from button-press to gesture events, Shift-clicking did
not work to start a selection (from none) or truncate an existing one.

This was due to the code being copy-pasted around and some logic being
broken in the process. This makes both of those work as they should, by
shuffling it again so the end result is the same as before. Highlights:

(1) ::button-press if extending due to a single press would call
set_positions(tmp_pos, tmp_pos), which is what made the Shift+click to
create a selection work. That was lost. Add it back to make that work.

(2) ::button-press in the “Truncate current selection” branch would not
execute all the stuff around “extend_to_left”, as that was the else
case. So, set extend_selection = FALSE so we skip over that later on.

(3) BUT! This Truncate case never fired because it was in the else
branch of if (in_selection())! Of course, it must be in the true branch.

(4) The IM context was not reset if the Shift-click occurred within an
existing selection, only if it did not. In ::button-press this was the
first thing done if extending a selection, regardless. Make it so again.

https://bugzilla.gnome.org/show_bug.cgi?id=780750
2017-08-30 18:25:00 +01:00
Daniel Boles
81d6f8d81c gl.po: Remove mnemonic underlines from tooltips
It looks like these were copy-paste errors from the corresponding labels
for buttons, which should have mnemonics. Of course, tooltips cannot.
2017-08-30 14:25:14 +01:00
Matthias Clasen
beb7bba3ce Avoid empty space in the emoji chooser
We need to hide the empty flow boxes as well, to avoid
spacing between them.

https://bugzilla.gnome.org/show_bug.cgi?id=786966
2017-08-30 14:25:14 +01:00
Fran Dieguez
305ac38b6a Update Galician translation 2017-08-30 13:10:56 +00:00
Fabio Tomat
b956cba4fb Update Friulian translation 2017-08-30 09:22:45 +00:00
Daniel Boles
9f1d57e032 PlacesSidebar: Reuse strings, mark for translation
The new menu items were not marked for translation, had no mnemonics,
and were not title-cased. Reuse the strings that we already had for the
buttons shortly down the file, and mark these for translation.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-29 20:09:11 +01:00
Nelson Benítez León
07320200d1 textview: fix bug on DnD displaced limits of selection
The fix of commit f2fd655754
should be confined to DnD coords only, because otherwise
it causes the start and end of the selection to be displaced.

https://bugzilla.gnome.org/show_bug.cgi?id=785736
2017-08-29 19:12:14 +01:00
Daniel Boles
afd624bf4b TextView: :border-width broke window→widget coords
Do the converse of commit bd7c87c762 so
that a TextView with Container:border-width > 0 does not get its handles
and magnified region shifted up/left from where they should be.

https://bugzilla.gnome.org/show_bug.cgi?id=786986
2017-08-29 19:04:26 +01:00
Daniel Boles
18a6c5c4c6 Expander: Don’t set event_window over whole widget
realize() gave the event_window the allocation of the whole widget. This
was wrong; it should be that of the title_gadget, as in size_allocate().

This broke expanders in which :expanded is TRUE before showing: Input
over the entire widget was sent to the title, making the child unable to
receive it. Clicking the child unexpectedly collapsed it. Once expanded
again, things fixed themselves as size_allocate() fixed the event_window
alloc. So, queuing a reallocate or resize after show() was a workaround.

Fix by giving event_window the allocation of the title_gadget, to match
what size_allocate() does. That is symmetrical and just plain correct.

https://bugzilla.gnome.org/show_bug.cgi?id=774134
2017-08-29 18:47:33 +01:00
Debarshi Ray
a827e92226 GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:42:56 +02:00
Aurimas Černius
bbb233464c Updated Lithuanian translation 2017-08-29 15:49:02 +03:00
Rūdolfs Mazurs
07936ac71f Update Latvian translation 2017-08-29 12:17:44 +03:00
Chun-wei Fan
935e48ce09 build: Install Emoji chooser GSettings files in MSVC projects
This is needed for the Emoji chooser to work on Visual Studio builds.
2017-08-29 13:05:52 +08:00
Daniel Boles
c85f34b6fc LevelBar: Really fix underallocation of blocks
Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.

The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8

Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-29 00:03:47 +01:00
Daniel Boles
bd7c87c762 TextView: Fix gesture coords with :border-width >0
Container:border-width caused the x/y coords converted to iters to be
offset inwards by that width, breaking positioning/selecting by gesture.

So, subtract :border-width in widget_to_text_window_coords(). This fixes
gesture positions, & plays fine with :margin & CSS margin/border/padding

N.B.: This is not to endorse :border-width. It’s gone in GTK+ 4 & weird
on a TextView: it’d be more intuitive to – if you must! – set it on the
TV parent. Really, please just use CSS instead. Still, it’s easy to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=759725
2017-08-28 22:28:49 +01:00
gogo
25abbfdcf6 Update Croatian translation 2017-08-28 21:12:23 +00:00
Daniel Boles
669e8c4de5 Entry: Handle :show-emoji-icon becoming false
Disconnect the now-unwanted signal handler, and hide the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:29 +01:00
Daniel Boles
6094caf984 Entry: Drop redundant typecasts
https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:26 +01:00
Daniel Boles
fccf19b905 Entry: Only open emoji picker on 2ndary icon click
We hijack the secondary icon for the emoji picker, but the handler for
::icon-press did not check the pressed icon and opened it for either.

https://bugzilla.gnome.org/show_bug.cgi?id=786938
2017-08-28 20:31:02 +01:00
Daniel Boles
1fd834c54d ComboBox: Don’t redundantly show() scrolled_window
It and its child were already show()n in list_setup().
2017-08-28 20:01:57 +01:00
Daniel Boles
1f1fdfe757 ComboBox: Fix wrongly matched signal disconnect()s
Various disconnections had the wrong flags and/or data, so we failed to
disconnect a pile of signals, shown by 0 returned by the disconnect_*()
functions. Fix this, and use the nicer disconnect_by_*() while here.
2017-08-28 20:01:57 +01:00
Daniel Boles
1301723905 Revert "combobox: remove superfluous GTK+ grabs"
This reverts commit 46b4e5d388.

Apparently these weren’t so redundant, because their removal introduced
at least 2 bugs in list-mode ComboBoxes: failure to close the popup upon
clicking out of it, and failing to receive mouse input in the popup of a
CB in a modal window. It may also have caused (even more!) stuck grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=738387
https://bugzilla.gnome.org/show_bug.cgi?id=776793
2017-08-28 20:00:59 +01:00
Daniel Boles
c789bf7718 ComboBox: Really set list-mode popup transient-for
set_transient_for(toplevel) was only called in list_setup(). It was easy
to make a test showing a NULL :transient-for instead of the correct one.

So, move the call from list_setup() to popup_for_device(). Also do that
for window_group_add_window(), which means not calling it redundantly.

(I tried using a ComboBox:parent-set handler, but the Inspector’s CB
didn’t like that: it calls popup_for_device() twice and closes on button
release. Anyway, using popup() is much more concise than a new handler.)
2017-08-28 20:00:17 +01:00
Daniel Boles
70534de382 ComboBox: List-mode popup must open on CB’s screen
The screen for the list-mode popup_window was only being set in
set_popup_widget(), i.e. when changing modes, so if the ComboBox was
moved to a different screen later, the popup would appear on the
original one, which is wrong.

Worse, this (somehow) broke opening some combos in the Inspector.

Fix this by moving the call to set_screen() to popup_for_device(), so
the popup_window is put on the correct screen each time around.

https://bugzilla.gnome.org/show_bug.cgi?id=468868
https://bugzilla.gnome.org/show_bug.cgi?id=786771
2017-08-28 19:33:54 +01:00
Ask Hjorth Larsen
3b1e4031df Updated Danish translation 2017-08-28 19:27:02 +02:00
Matej Urbančič
7d7284ddbb Updated Slovenian translation 2017-08-28 19:23:15 +02:00
Matej Urbančič
0a1fba2172 Updated Slovenian translation 2017-08-28 19:19:40 +02:00
Gábor Kelemen
64eae69ff7 Update Hungarian translation 2017-08-28 16:09:38 +00:00
Balázs Meskó
ff625f69ea Update Hungarian translation 2017-08-28 16:05:37 +00:00
Fabio Tomat
13efeb0ad3 Update Friulian translation 2017-08-28 14:38:07 +00:00
Fabio Tomat
429b46d6aa Update Friulian translation 2017-08-28 14:12:06 +00:00
Marek Cernocky
639e2e992f Updated Czech translation 2017-08-28 15:54:20 +02:00
Милош Поповић
1169751955 Update Serbian Latin translation 2017-08-28 11:03:13 +00:00
Марко Костић
1ae2c662ff Update Serbian translation 2017-08-28 11:00:46 +00:00
Chun-wei Fan
3d4b721e28 build: Fix last commit
Another pango-1.0.lib was added accidently to the list of .lib files for
the GTK+ to link to.  Remove that, although it shouldn't really matter.
2017-08-28 16:28:18 +08:00
Chun-wei Fan
09b7dc81a6 build: Integrate introspection builds into MSVC projects
This is so that it is easier for one building GTK+ with Visual Studio to
build the introspection files as well in one shot.  Note that this is
not built by default, so one needs to select the gtk3-introspect
explicitly to build (and clean up) the introspection files.

For this to work, one needs to ensure the following:
-A complete build of GObject-Introspection in $(GlibEtcInstallRoot),
 that is built with the same installation of the Python interpretor that
 is used here (see PythonDir and PythonDirX64 in
 gtk3-version-paths.[vsprops|props]).
-Introspection files for ATK, GDK-Pixbuf and Pango, also in their proper
 locations under $(GlibEtcInstallRoot), which should be built with the
 same G-I installation.
2017-08-28 16:18:24 +08:00
Chun-wei Fan
e579245b1d build: Prepare NMake Makefiles for MSVC project integration
The build/win32/detectenv-msvc.mak needs to be updated for Visual Studio
2017, and we ought to add quotes to surround the copy destination path
for the introspection files, so that we do not bail out in the copy
process (cmd.exe's copy command does not like '+' in them that are not
quoted).
2017-08-28 16:15:11 +08:00
Chun-wei Fan
24fd61512b build: Set PythonDir according to MSVC version in projects
This is to make this more in-line with what is in the G-I projects, so
that we could use this to build the introspection files for GTK+-3.22.x
directly from the project files.  This is intended to follow the MSVC
versions used to build the official CPython Windows binaries, i.e.:
-3.3.x, 3.4.x: for MSVC 2010, 2012, 2013, which is built with 2010
-3.5.x, 3.6.x: for 2015 and 2017, which is built with 2015.
2017-08-28 15:56:18 +08:00
Chun-wei Fan
74ffc85b80 build: Use PythonDir in Visual Studio projects
This is to avoid any confusion with the PYTHONPATH envvar that is used
by Python for additional locations for looking for modules.
2017-08-28 15:55:59 +08:00
Julius Härtl
f68421376b gtkplacessidebar: remove oversight of old code
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-28 08:13:12 +02:00
Changwoo Ryu
35cf9fefd6 Update Korean translation 2017-08-27 21:24:01 +00:00
Changwoo Ryu
cd33f3abc4 Update Korean translation 2017-08-27 21:22:39 +00:00
Carlos Garnacho
26d8a6dfba menu: Avoid cancelling the menu on GTK+ grabs inside the GtkMenu
Allows again sliders as menuitems, broken by commit 9b032073.

https://bugzilla.gnome.org/show_bug.cgi?id=786029
2017-08-27 20:43:11 +01:00
Daniel Boles
d1d8658898 PlacesSidebar: Avoid warning about unused variable
end_icon is only used if HAVE_CLOUDPROVIDERS is defined, so only declare
it under the same condition.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-27 15:37:34 +01:00
Daniel Boles
53e0bd91e6 SidebarRow: need config.h for HAVE_CLOUDPROVIDERS
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-27 15:37:34 +01:00
Daniel Boles
b1705523bb testgtk: Remove an unused variable 2017-08-27 15:36:13 +01:00
Mario Blättermann
532f665135 Update German translation 2017-08-27 08:28:45 +00:00
Andika Triwidada
4c982d7e7f Update Indonesian translation 2017-08-27 01:43:41 +00:00
Matthias Clasen
7b7a4bf1d0 Remove an unused field
Drag contexts are objects, so there is no need to carry a
manual refcount around.
2017-08-26 19:58:52 -04:00
Matthias Clasen
888559235f x11: Fix initial drag cursors
Under X, we were not setting the right drag cursor initially,
because at current_action == action == 0, initially. Fix this
by explicitly using the right cursor when grabbing.
2017-08-26 19:58:52 -04:00
Anders Jonsson
c2df454621 Update Swedish translation 2017-08-26 22:20:51 +00:00
Milo Casagrande
2029ad0484 Update Italian translation 2017-08-26 15:40:24 +00:00
Matthias Clasen
45b54041ed emoji: Use the right gettext domain
Otherwise, strings are not translated.

https://bugzilla.gnome.org/show_bug.cgi?id=786841
2017-08-26 10:26:47 -04:00
Piotr Drąg
91e684b667 Update Polish translation 2017-08-26 16:11:51 +02:00
Fabio Tomat
3fbcab528f Update Friulian translation 2017-08-26 11:23:42 +00:00
Baurzhan Muftakhidinov
0911cac1fe Update Kazakh translation 2017-08-26 06:26:39 +00:00
Rafael Fontenelle
7a9ad88270 Update Brazilian Portuguese translation 2017-08-26 02:17:43 +00:00
Julius Härtl
a446da7eb6 gtkplacessidebar: implement libcloudproviders support
Add integration of the libcloudproviders DBus API to the
GtkPlacesSidebar by showing name and sync status of the cloud providers.
The exported menu is rendered as a GtkPopover.

The sidebar will be updated if the list of cloudproviders changes e.g.
by adding or removing an account. If any cloud provider changes detailed
information like sync status only the individual sidebar row gets
updated.

Co-authored-by: Carlos Soriano <csoriano@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-25 16:58:21 -04:00
Daniel Boles
696b9a5df7 ComboBox: Use iter before popdown() may invalidate
Bad actors, such as our very own FileChooserButton, may connect to the
:popped-up property and alter the model as the menu becomes in/visible.

We were getting an iter to the model while popped-up, then doing
popdown(), then using the iter, which may have just been invalidated by
the errant notify::popped-up handler. If so, we quickly crash fatally.

This is clearly bonkers, but until such patterns are removed, we have to
work around them. So, set_active() from the clicked item while it is
known to be valid, by moving the call to set_active() before popdown().

While here, change set_active_iter(iter) to set_active_internal(path) to
avoid pointlessly going through the iter to get the path we already have

https://bugzilla.gnome.org/show_bug.cgi?id=729651
2017-08-25 21:00:51 +01:00
Daniel Boles
32553ad3a2 Expander: Also hide child GdkWindow when collapsed
Just adding/removing to/from the BoxGadget is not sufficient; that
leaves the GdkWindow hanging around, taking input, changing the cursor,
and all sorts of other nefarious shenanigans.

Resolve by ensuring the child’s GdkWindow is unmapped if collapsed.

Note: the reflexive solution is just to set_visible(child, expanded),
but it is best to avoid messing with the child’s :visible property.

https://bugzilla.gnome.org/show_bug.cgi?id=776937
2017-08-24 21:18:55 +01:00
Daniel Boles
4ac58badf6 ComboBox: Clarify documentation of get_active_iter
https://bugzilla.gnome.org/show_bug.cgi?id=618160
2017-08-24 20:57:01 +01:00
Daniel Boles
947bca195c Popover: Include window shadows in overshoot calcs
.update_position() enforces that non-Wayland platforms must position a
Popover within its parent Window. We use the allocation of the Window
to translate the position and check for overshoot on each of its sides.
Calling Widget.get_allocation() of a CSD Window includes its shadows.

But shadows were not excluded from the area in which we can position.
Thus, Popovers could get positioned in the shadow of CSD windows, where,
at least on X11, no input is received. Therefore, positioning a Popover
over a shadow meant its child widgets within that area became unusable.

Fix by calling Window.get_shadow() and including it in the overshoot on
each side. This adjusts for how the allocation includes shadows, making
overshoots with and without shadows the same. Thus, we avoid considering
shadows as viable for positioning, favouring a side where input works.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-24 20:57:01 +01:00
Daniel Boles
3a2c379f3c testpopover: Use HeaderBar to get CSD decorations
This helps test whether the Popover positioning gets messed up by the
presence of CSD shadow or other accessories around the content area.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-24 20:57:00 +01:00
Cheng-Chia Tseng
53be5d2fc9 Update Chinese (Taiwan) translation 2017-08-24 16:39:23 +00:00
Anders Jonsson
64f3b38cd7 Update Swedish translation 2017-08-24 09:44:28 +00:00
Anders Jonsson
29d733b457 Update Swedish translation 2017-08-24 09:37:42 +00:00
Piotr Drąg
beca77441d Update POTFILES.in and POTFILES.skip 2017-08-24 02:45:44 +02:00
Daniel Boles
0969419610 SidebarRow: Add Unmount tooltip to eject_button
It was reported that the lack of a tooltip made its purpose unclear.
This can be solved by just copying PlacesViewRow’s eject_button tooltip.

https://bugzilla.gnome.org/show_bug.cgi?id=766909
2017-08-23 21:41:47 +01:00
Tom Schoonjans
b9b4684740 GtkFileChooserNativeQuartz: restore parent focus after closing dialog
Tested for both modal and non-modal dialogs

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:30 -04:00
Tom Schoonjans
bed1bd1a0c GtkFileChooserNativeQuartz: improve support for file filters
Instead of using conditional compilation, use respondsToSelector to
check at runtime for setAccessoryViewDisclosed.

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:30 -04:00
Tom Schoonjans
fb59b090d6 GtkFileChooserNativeQuartz: add support for Mountain Lion and Mavericks
https://bugzilla.gnome.org/show_bug.cgi?id=784723 introduced support for
native file chooser dialogs on macOS, but due to the use of generics in
the patch, there will be compilation errors on pre-Xcode 7 platforms,
such as Mountain Lion and Mavericks.

I strongly recommend to revert this patch when the oldest supported
macOS release is bumped to Yosemite (10.10).

https://bugzilla.gnome.org/show_bug.cgi?id=785306
2017-08-23 10:45:30 -04:00
Lionel Landwerlin
12d10f239b gdk: wayland: always set buffer scale on size update
We're only updating this when we have an EGL window. This means we
have the wrong scaling factor when using Vulkan.

https://bugzilla.gnome.org/show_bug.cgi?id=786492
2017-08-23 10:44:20 -04:00
Fabio Tomat
f955c3eabc Update Friulian translation 2017-08-23 12:55:53 +00:00
Milo Casagrande
0ba84208ab Update Italian translation 2017-08-23 07:12:14 +00:00
Milo Casagrande
012dc8f12a Update Italian translation 2017-08-22 16:41:00 +00:00
Daniel Boles
6537f7dad8 getting_started: Sync filenames & section headings
The order of Examples 3 and 4 was swapped, so the headings updated
themselves, but the filenames were left reflecting the old order.

https://bugzilla.gnome.org/show_bug.cgi?id=786553
2017-08-22 14:19:40 +01:00
Matthias Clasen
efbf6f183e 3.22.19 2017-08-22 08:33:11 -04:00
Matthias Clasen
cfdb9f95dc Handle emoji data change in emoji chooser
Update the settings schema to follow the change in Emoji data,
and make the emoji chooser code handle the new format.
2017-08-22 08:20:03 -04:00
Matthias Clasen
bdff792462 Add shortnames to emoji data
The json file is from

https://github.com/emojione/emojione/tree/master/extras/alpha-codes

It is under the MIT license.
2017-08-22 08:19:56 -04:00
Matthias Clasen
7a3126f4bb Don't consume too many key releases
The Emoji input support in GtkIMContextSimple was
unintentionally consuming too many key release
events. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=786594
2017-08-22 06:41:31 -04:00
Daniel Mustieles
45322136ed Update Spanish translation 2017-08-21 11:33:27 +00:00
Pawan Chitrakar
02273ffd05 Update Nepali translation 2017-08-20 22:44:56 +00:00
Mario Blättermann
70cfeb5dcd Update German translation 2017-08-20 14:40:07 +00:00
Christian Kirbach
30b264d0b7 Update German translation 2017-08-20 14:33:49 +00:00
Pawan Chitrakar
866a795683 Update Nepali translation 2017-08-20 09:42:28 +00:00
Baurzhan Muftakhidinov
1660665f53 Update Kazakh translation 2017-08-19 17:33:57 +00:00
Alexandre Franke
b43cad266d Update French translation 2017-08-19 14:44:33 +00:00
Alexandre Franke
d752ce4800 Update French translation 2017-08-19 14:41:23 +00:00
Mario Blättermann
6a3a0cdb48 Update German translation 2017-08-19 11:46:22 +00:00
gogo
e5e182285b Update Croatian translation 2017-08-18 20:38:20 +00:00
gogo
f0031fc356 Update Croatian translation 2017-08-18 20:36:41 +00:00
Carlos Garnacho
2218b5a116 gtkbutton: Avoid keyboard grabs
Seems to be there for the sole purpose of ensuring the button
shall receive the key release on keyboard-triggered activation.

For the cases where this makes sense (eg. comboboxes, menubuttons,
...) gtk+ already does ensure the menu is popup after key release.
This makes the grab pretty useless, and there's many other cases
where it doesn't make sense (eg. button being activated
programmatically from an event handler in another widget).

Fixes button activation unintendedly triggering shortcut inhibition
on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=786480
2017-08-18 20:45:07 +02:00
Rui Matos
d17aeec08c gdkwindow: Avoid re-setting the opaque region if it doesn't change
This avoids, at least, needless chatter with the compositor and the X
server in X11's case.

https://bugzilla.gnome.org/show_bug.cgi?id=786469
2017-08-18 18:58:19 +02:00
Dušan Kazik
690bfacb16 Update Slovak translation 2017-08-18 16:07:04 +00:00
Marek Cernocky
170d73e549 Updated Czech translation 2017-08-18 10:56:19 +02:00
Chun-wei Fan
ebadaaa3e0 GDK-Win32: Fix AeroSnap on HiDPI
Commit 1d0fad3 revealed that there were some assumptions made that were
actually to compensate for the bug fixed by that commit, so we need to
remove those assumptions as they would result in AerSnap to not work
properly on HiDPI screens.

Also re-do how we set the x and y positions of our GdkWindow, so that we
are more consistent across the board when we go between a GDK window
coordinate and a Windows API window cooredinate.

This would also simplify the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=785999
2017-08-18 13:26:58 +08:00
Carlos Garnacho
136f43e329 gdk/x11: Extract GdkDeviceTool tool ID from "Wacom Serial IDs" property
This property contains 5 integers, of which the last 2 respectively
contain the tool serial number and tool ID. We were only extracting the
first so far, but GdkDeviceTool also has API getters for the latter,
which remained 0.

https://bugzilla.gnome.org/show_bug.cgi?id=786400
2017-08-17 16:26:12 +02:00
Fran Dieguez
c3622b2454 Update Galician translation 2017-08-16 22:46:55 +00:00
Daniel Boles
0721dad970 GdkDisplay: Call the correct push|pop_error_trap()
It is wrong to assume all Displays are of the same class as the default.

https://bugzilla.gnome.org/show_bug.cgi?id=784016
2017-08-15 20:34:12 +01:00
Daniel Boles
99c8e30c02 ScrolledWindow: Bin unreachable ternary branches
We already checked that the child is not NULL above.

Coverity CID 1454191
2017-08-15 20:32:56 +01:00
Daniel Boles
3249b351af Widget: Fix outdated comments about tooltips
They are not usually yellow anymore, the previous advice about how to
style them was for pre-3.20 versions, and the immediate replacement (CSS
class .tooltip) does not seem ready for primetime.

https://bugzilla.gnome.org/show_bug.cgi?id=784421
2017-08-15 19:17:33 +01:00
Chun-wei Fan
7b240ae298 gtk/gtkemojichooser.c: Don't use g_autoptr()
We can't use g_autoptr() on non-GCC-style compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-08-15 23:40:18 +08:00
Aurimas Černius
727be58e6f Updated Lithuanian translation 2017-08-15 16:48:49 +03:00
Matthias Clasen
4cb9ba57b4 Remove an erroneous unref
This was leftover by accident.
2017-08-15 06:41:19 -04:00
Matthias Clasen
c56545f721 Redo emoji data slightly
No longer store variation sequences explicitly. Instead, put a 0
in the sequence where the modifiers will be inserted. This is more
compact, and it allows us to put variations directly into the
recent section. Update the type of the recent-emoji setting to
match these changes.
2017-08-15 06:41:19 -04:00
Matthias Clasen
f27d928e33 Don't update headings in an idle
It is not necessary since flow box invalidation is
all synchronous currently. If that ever changes,
this code will need adjustment.
2017-08-15 06:41:18 -04:00
Daniel Boles
1efbcb0f82 testpopover: Sync initial vals of controls & props
The ComboBoxes were initially empty, rather than reflecting the initial
values of the properties. The CheckButtons were only correct by chance.
Fix this by setting the initial values on the widgets and binding them
to the properties using SYNC_CREATE, so the two are always synced up.

https://bugzilla.gnome.org/show_bug.cgi?id=786209
2017-08-14 23:17:14 +01:00
Hannes Müller
7b68c234b1 configure: Add missing quotes to unbreak an AS_IF
Without quoting, the comma in AC_MSG_ERROR was wrongly interpreted as
separating the if and else paths.

https://bugzilla.gnome.org/show_bug.cgi?id=786287
2017-08-14 23:15:41 +01:00
Daniel Mustieles
9faf1348c9 Update Spanish translation 2017-08-14 16:04:33 +00:00
Fran Dieguez
bf780d7ee3 Update Galician translation 2017-08-13 22:20:29 +00:00
Muhammet Kara
a6de59845a Update Turkish translation 2017-08-13 16:34:57 +00:00
Matthias Clasen
c7061d88a2 emoji: Fix a leak
We were leaking the list of recently used Emoji here.
Pointed out by Timm Bädert.
2017-08-13 07:52:31 -04:00
Matthias Clasen
66d9f4fe95 emoji: Start search on the first character
There is no need to wait for a longer prefix here.
We already display all the content anyway, it will
only get less.
2017-08-13 07:52:19 -04:00
Matthias Clasen
3b493d2937 Drop a redundant helper
We already had a function that does exactly what
is needed here.
2017-08-13 07:52:04 -04:00
Matthias Clasen
e6fd4837a2 Remove an unused field
Nothing uses bubble_window, so it can go.
2017-08-13 07:52:04 -04:00
Rafael Fontenelle
01c1c7f45d Update Brazilian Portuguese translation 2017-08-12 22:55:14 +00:00
Rafael Fontenelle
373a02feee Update Brazilian Portuguese translation 2017-08-12 22:41:32 +00:00
Daniel Boles
127cc11e30 InfoBar: Fix wrong/uninit var use in code example
https://bugzilla.gnome.org/show_bug.cgi?id=786144
2017-08-12 21:08:05 +01:00
Мирослав Николић
6c235d5a5a Updated Serbian translation 2017-08-12 20:03:28 +02:00
Мирослав Николић
4326f565b2 Updated Serbian translation 2017-08-12 20:02:20 +02:00
Daniel Boles
e85cea7b3d Adwaita: Sync CSS files with current SASS
A recent commit for emoji also updated seemingly unrelated parts of the
generated CSS files, presumably due to other things that changed in
master. The CSS files should be kept in sync with their SASS sources.
2017-08-12 15:49:07 +01:00
Daniel Boles
53ce02344c LevelBar: Avoid unnecessarily copying allocation
Just use the original allocation, instead of copying it and passing that
2017-08-12 14:25:56 +01:00
Andika Triwidada
6bdb4b12cb Update Indonesian translation 2017-08-12 13:15:04 +00:00
Andika Triwidada
517d568f40 Update Indonesian translation 2017-08-12 13:13:04 +00:00
Daniel Boles
bfafe9aaee convert-emoji: Add missing braces 2017-08-12 14:06:09 +01:00
Daniel Boles
929108d31a convert-emoji: Don’t pointlessly do rest of loop
skip can never become FALSE again, so break as soon as it becomes TRUE.
2017-08-12 14:04:35 +01:00
Piotr Drąg
130b6d836d Update Polish translation 2017-08-11 22:27:40 +02:00
Piotr Drąg
9b49baa992 emojichooser: Add context to the Objects category string
To disambiguate it from Objects in the Inspector.
2017-08-11 22:18:50 +02:00
Piotr Drąg
a2f142edb2 Update POTFILES.skip 2017-08-11 21:55:24 +02:00
Matthias Clasen
d428739770 widget-factory: Add a use of show-emoji-icon
This also adds a testcase for nested popovers that was
missing in widget-factory so far.
2017-08-11 15:44:11 -04:00
Matthias Clasen
d56505f74d entry: Add support for an Emoji chooser
Add an "Insert Emoji" item to the context menu in entries.
We also add a show-emoji-icon property, which when set to
TRUE, will add an icon that can be clicked to bring up
the Emoji chooser.
2017-08-11 15:43:49 -04:00
Matthias Clasen
340c520bd0 Fix a problem with focus handling in modal popovers
When the popover is dismissed, we return the focus to
where it came from. However, by using gtk_widget_grab_focus,
we were messing up the selection if that widget happens to
be an entry. Special-case GtkEntry and use
gtk_entry_grab_focus_without_selecting to avoid this issue.
2017-08-11 15:42:54 -04:00
Matthias Clasen
45b2e162ae Add an Emoji chooser widget
Add a popover that shows color Emoji, with a search entry.
The recently-used Emoji are stored in a GSetting.
2017-08-11 15:42:54 -04:00
Matthias Clasen
a584bcb88e Add Emoji data
The json file is imported from the (MIT-licensed) emoji.json[0] node
module, which generates it from the emoji list published by the
Unicode Consortium.

This commit also adds a little tool to convert the data into
a compact GVariant, and the result of that conversion, which is
added to libgtk as a resource. The following commits will make use
of it.

[0] https://github.com/amio/emoji.json
2017-08-11 15:04:07 -04:00
Piotr Drąg
edca930e75 Update Polish translation 2017-08-11 00:09:45 +02:00
Fran Dieguez
56ce335612 Update Galician translation 2017-08-10 13:55:33 +00:00
Fran Dieguez
cf4ddf07e7 Update Galician translation 2017-08-10 09:52:33 +00:00
Fabio Tomat
ba99e23861 Update Friulian translation 2017-08-09 12:52:10 +00:00
John Ralls
d09bd2e2d3 Duplicate the TIC strings before NULLing the GObject data.
NULLing the data strings in GObject frees and invalidates the pointers
returned by g_object_get_data so we need our own copy of the values.
2017-08-08 23:19:26 +03:00
Daniel Boles
8a22e3598d Revert "levelbar: Don't underallocate block widgets"
This reverts commit 78b4885fe8.

That commit causes a block always to be shown at the min side, even when
the value is 0, in which case, no fill should be shown.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-08 18:59:03 +01:00
Chun-wei Fan
7f065b379c gtk/gtkfilechoosernativewin32.c: Declare variables at top-of-block
Since GTK+-3.22.x is not advertised to use C99, make sure that the build
works on pre-C99 compilers such as pre-2013 Visual Studio.
2017-08-08 17:13:34 +08:00
Matthias Clasen
f534c971df Avoid the use of g_autofree
We can't use this in code that may be built on win32,
so lets just not use it at all.
2017-08-08 17:10:00 +08:00
Matthias Clasen
e1cf6281fe 3.22.18 2017-08-07 19:36:19 -04:00
Daniel Boles
a6a547c2e0 Layout: Fix documentation on getting the GdkWindow
Members are not public like they used to be, so accessors must be used.
2017-08-08 00:00:55 +01:00
Daniel Boles
4ce5bed724 Revert "Widget: Remove obsolete hack-arounds for HandleBox"
This reverts commit 12805a4fbf.

I must have been looking at the wrong tree because HandleBox is only
deprecated in GTK+ 3, not removed.
2017-08-07 19:38:12 +01:00
Daniel Boles
cf955a5459 Container: Don’t scroll to unset focus child coord
In gtk_container_real_set_focus_child(), we try to scroll to the
position of the new :focus-child if we have h or v adjustments.

gtk_widget_translate_coordinates() returns FALSE if neither widget is
realized or in other situations that cause output parameters x and y not
to be set. Thus, if the caller did not initialise x/y and uses them even
if the function returns FALSE, they are using uninitialised variables.

In gtk_container_real_set_focus_child(), we did not check the return
value but merrily went ahead and used x and y regardless. This is UB, as
caught by Valgrind, as well as being pointless.

The trivial fix is to exit early if (!gtk_widget_translate_coordinates).

https://bugzilla.gnome.org/show_bug.cgi?id=776909
2017-08-07 19:21:03 +01:00
Daniel Boles
12805a4fbf Widget: Remove obsolete hack-arounds for HandleBox
It is long gone. The commit c9d9db0fcc
identified these as ugly-but-functional workarounds for it, only.

https://bugzilla.gnome.org/show_bug.cgi?id=776909
2017-08-07 18:48:18 +01:00
Debarshi Ray
65b18a4fc1 main: Set the error if gtk_init_with_args fails
This fixes a fallout from 8a7d0ab481 where the error wasn't being
set when a display couldn't be opened right after parsing the
commandline.

It also fixes an older bug where the error would be left unset if the
commandline had already been parsed before (ie. when gtk_initialized
is TRUE).

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2017-08-07 19:34:55 +02:00
Debarshi Ray
66b24f29e1 docs: gtk_init_with_args will also fail if the commandline was invalid
Be more explicit to match the gtk_init_check documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2017-08-07 19:34:55 +02:00
Debarshi Ray
1031fa914a docs: gtk_init_check will also fail if the commandline was invalid
The existing documentation seems to suggest that gtk_init_check will
ignore any failure to parse the commandline arguments, and that its
return value only depends on its ability to initialize the windowing
system. That's not true.

Be more explicit to avoid misunderstandings.

https://bugzilla.gnome.org/show_bug.cgi?id=771959
2017-08-07 19:34:55 +02:00
Daniel Boles
2b049d5d66 AccelLabel: set_accel_closure() arg is nullable 2017-08-07 10:33:05 +01:00
Daniel Boles
777caab077 AccelLabel: set_accel_widget() arg is nullable 2017-08-07 10:29:00 +01:00
Matej Urbančič
b5b0c57a95 Updated Slovenian translation 2017-08-07 09:13:06 +02:00
Daniel Boles
69576cd510 HeaderBar: Use less clashing appmenu fallback icon
process-stop-symbolic is unintuitive if represented as a stop sign as in
Adwaita, and completely ambiguous if represented as a cross like the
window close button in other icon themes.

Instead, use application-x-executable, which is already used elsewhere
as a fallback if no specific icon can be found for the application.

https://bugzilla.gnome.org/show_bug.cgi?id=784624
2017-08-06 18:07:30 +01:00
Daniel Boles
f70796dea3 docs: gtk/running: Document the GTK_CSD env var
It was not documented before.

https://bugzilla.gnome.org/show_bug.cgi?id=778791#c1
2017-08-06 17:42:17 +01:00
Daniel Boles
b03f787a99 AccelLabel: Fix typos of Ctl to Ctrl 2017-08-06 17:38:08 +01:00
Daniel Boles
fd5e929905 icon-browser: Add missing document-edit icon
https://bugzilla.gnome.org/show_bug.cgi?id=777515
2017-08-06 03:24:06 +01:00
Daniel Boles
9d532da2dd gdkdisplay: Remove a pointless assignment 2017-08-06 01:12:08 +01:00
Matthias Clasen
43195fd997 Enough with the beeping!
Don't beep when modifiers are released in entries.
This was an inadvertent change that snuck in with
the emoji support.

Also, don't beep while entering an emoji name.
There is entirely too much beeping here.
2017-08-05 19:33:28 -04:00
Daniel Boles
c48297ed12 AccelLabel: Fix displaying accel unichars >= 0x80
In GTK+ 2, the ch < 0x80 was ORd with klass->latin1_to_char, and that
was unconditionally set to TRUE in the class init function, so
effectively the ch < 0x80 never mattered before or served any purpose.

When klass->latin1_to_char was deleted from the class in commit
f760538f17, this check’s sense changed.

The resuls was that accel keyvals with gunichar value >= 0x80 stopped
being rendered as symbols, instead falling back to their keysym name.
Instead of recognisable symbols for these, we get raw, often obscure,
and untranslatable keysym names. This breaks accessibility as well as
client users who may be parsing such accels and migrating from GTK+ 2.

So, remove the < 0x80 to restore the behaviour from before said commit.

https://bugzilla.gnome.org/show_bug.cgi?id=783906
2017-08-05 20:28:08 +01:00
Matthias Clasen
a86de5905c Add support for entering emoji by name
This commit adds some basic support for entering emoji by name
to GtkIMContextSimple. To begin an emoji sequence, use Ctrl-Shift-e
instead of Ctrl-Shift-u that is used for hex input. Otherwise, the
behavior is the same: you can can let go of the modifier keys and
end the sequence with space or enter, or hold on to the modifier
keys and end the sequence by releasing them.

Only a limited, fixed set of names is supported at this time, see
the GtkIMContextSimple docs for a full list.
2017-08-04 14:57:05 -04:00
Timm Bäder
78b4885fe8 levelbar: Don't underallocate block widgets
https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-04 01:50:58 +01:00
Daniel Boles
46a8559cd4 Window: Also quote Window address in Popover error
This is symmetrical with how we already do that for the Popover, and it
could be useful for debugging.
2017-08-03 21:18:49 +01:00
Daniel Boles
fe5f650088 widget-factory: Add tooltip to Entry icon
just to show we can.
2017-08-03 20:42:54 +01:00
Daniel Boles
9af612d314 Fix some nullable Returns annotations
based on reports and patches by Iñaki García Etxebarria:

https://bugzilla.gnome.org/show_bug.cgi?id=781246
https://bugzilla.gnome.org/show_bug.cgi?id=785423
2017-08-03 20:26:20 +01:00
Daniel Boles
4ba86706be GtkFixed: Update documentation intro
• Add GtkLayout as a @See_also since it includes fixed-pos functionality
• Drop mention of the long-gone Linux framebuffer port
• Explain how to work around the problems with RTL text
2017-08-03 13:02:20 +01:00
Jiri Grönroos
ef7ee16368 Update Finnish translation 2017-08-03 09:51:38 +00:00
Timm Bäder
8a17848f02 entry: get_icon_area returns in entry coordinates
Document what the returned coordinates are relative to.
2017-08-03 10:23:27 +01:00
Daniel Boles
5acee3a3e0 Layout: Tweak documentation blurb
Being addable to a ScrolledWindow is not interesting; now that SW
auto-adds a Viewport if needed, so can DrawingArea and any other widget.

Mention GtkFixed in case the reader just wants that bit of functionality
2017-08-03 10:18:14 +01:00
Olivier Fourdan
1c23bce350 wayland: add shortcut inhibitor support
This adds support for the shortcut inhibitor protocol in gdk/wayland
backend.

A shortcut inhibitor request is issued from the gdk wayland backend for
both the older, deprecated API gdk_device_grab() and the new gdk seat
API gdk_seat_grab(), but only if the requested capability is for the
keyboard only.

https://bugzilla.gnome.org/show_bug.cgi?id=783343
2017-08-02 12:38:52 +02:00
Daniel Boles
7dd3349751 bindings: Avoid iterating array if it is never set
If query.return_type is not one we want, binding_compose_params() is
not called, and so params remains a NULL pointer. However, the code was
then unconditionally iterating it regardless. Don't if it is still NULL.

CID 1452218 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
15. var_deref_op: Dereferencing null pointer params.
2017-08-01 20:41:23 +01:00
Daniel Boles
6063a89235 cssselector: Ensure we do not index out of bounds
This would only happen if the last element was deprecated, but it should
be avoided anyway.

CID 1388852 (#1 of 1): Out-of-bounds read (OVERRUN)
12. overrun-local: Overrunning array pseudo_classes of 16 32-byte
elements at element index 16 (byte offset 512) using index i + 1U (which
evaluates to 16).
2017-08-01 20:16:40 +01:00
Daniel Boles
a381a06b12 Notebook: Remove null check after dereference
This function clearly assumes the parameter children cannot be NULL, and
the call sites seem to perform enough checks to confirm this.

CID 1388869 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking children suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
2017-08-01 20:15:15 +01:00
Daniel Boles
cd7e5fae22 Calendar: Add default case to appease Coverity
CID 1432024 (#1 of 1): Uninitialized scalar variable (UNINIT)
2. uninit_use_in_call: Using uninitialized value rect.x when calling
calendar_arrow_rectangle.

Add a default case to the switch which will bail out with
g_assert_not_reached(), which should reassure Coverity that the method
is always called with a valid value that is handled in the switch.
2017-08-01 20:15:15 +01:00
Daniel Boles
5e6293e54f cssbordervalue: Fix possible use of uninitialised
If value->values[i] is NULL, then values[i] was left uninitialised.
The code then reads each element of values[].

CID 1432029 (#1 of 1): Uninitialized pointer read (UNINIT)
11. uninit_use: Using uninitialized value values[i].
2017-08-01 20:12:44 +01:00
Timm Bäder
0b230d34c4 scrolledwindow: Remove useless function call
We never use the result.
2017-08-01 19:10:10 +01:00
Daniel Boles
1088056a5d Widget: Do not dereference before type check 2017-08-01 18:54:12 +01:00
Timm Bäder
505d5e41c2 gtkapplication: g_dbus_proxy_new_sync can return NULL
Specifically, in the case where @error is set.
2017-08-01 18:54:12 +01:00
Daniel Boles
df10ec7b9b Entry: Fix unset icon tooltip hiding Entry tooltip
Our ::query-tooltip handler first checks whether the pointer is over any
of the icons, returning their tooltip if so, and if not chains up to
Widget::query-tooltip in order to show the text for the widget overall.

But ensure_has_tooltip(), which exists to update :has-tooltip based on
whether ::query-tooltip is needed, only set :has-tooltip to TRUE if any
icon had a tooltip, without caring whether the widget as a whole does.

That is asymmetrical and meant that if the Entry had a tooltip, but
subsequently all icons had their tooltips unset, :has-tooltip would be
set to FALSE, and hence the tooltip for the widget would become lost.

The fix is to set :has-tooltip to TRUE if the widget has a tooltip of
its own, and we only need to check the icons if that is not the case.

https://bugzilla.gnome.org/show_bug.cgi?id=785672
2017-08-01 18:10:38 +01:00
Daniel Boles
ce792384c5 Entry: Warn about corner case hiding icon tooltips
https://bugzilla.gnome.org/show_bug.cgi?id=785672#c4
2017-08-01 18:10:38 +01:00
Daniel Boles
3680e3d40b Entry: Fix get_icon_at_pos()
This was comparing the input position, which is documented as being
relative to the top-left of the Entry allocation, to icon allocations
that were not adjusted accordingly. This could result in tooltips for
icons not being shown in various conditions, since the ::query-tooltip
handler uses get_icon_at_pos() to check whether to show an icon tooltip.

The fix is to compare to the icon border box, not border allocation, as
CssGadget::get_border_box() adjusts relative to the widget. Better yet:
we can just make CssGadget::border_box_contains_point() compare for us.

Delegating to Entry::get_icon_area(), which manually reimplements
CssGadget::get_border_box(), would also work, but this is simpler.

https://bugzilla.gnome.org/show_bug.cgi?id=780938
2017-07-31 20:05:11 +01:00
Daniel Boles
ad06a08b99 testentryicons: Set tooltips on all icons
Just to test tooltips in all cases; what was already here
should have been sufficient, but this doesn't hurt.

While here, also add some instructive placeholder text.

https://bugzilla.gnome.org/show_bug.cgi?id=780938
2017-07-31 20:05:11 +01:00
Timm Bäder
d9170e1978 entry: make sure priv->current_pos is valid
We can e.g. get the entry dispose()d and a focus_out event after that
(because the toplevel unsets the focus which previously was the entry).
We then later use priv->current_pos in a call to pango API which makes
sure the given index is valid for the given layout. Since we lazily
create a GtkEntryBuffer in get_buffer() and a PangoLayout lazily in
gtk_entry_create_layout, these 2 are always valid but don't match
priv->current_pos in this situation.

Fix this by resetting priv->current-pos in dispose().

https://bugzilla.gnome.org/show_bug.cgi?id=785255
2017-07-31 20:05:04 +01:00
Matej Urbančič
a30220d4e3 Updated Slovenian translation 2017-07-27 15:53:08 +02:00
Matej Urbančič
c0d88a5b7b Updated Slovenian translation 2017-07-27 15:51:09 +02:00
Carlos Garnacho
9b032073cb gtkrange: Instaurate GTK+ grabs while manipulating ranges
It should not be necessary for most situations, except while there's
GDK grabs coercing events in a different way.

https://bugzilla.gnome.org/show_bug.cgi?id=782870
2017-07-26 12:53:33 +02:00
Carlos Garnacho
54c26e0983 gtkgesture: Do not ignore events from other GdkWindows than the widget's
There's GDK grab situations (eg. pointer motion outside the grab window
in combination with a GTK+ grab) where a gesture may receive events from
windows that are not the widget's.

The _update_widget_coordinates() still does work for those situations, so
just let these events go through instead of ignoring them.

https://bugzilla.gnome.org/show_bug.cgi?id=782870
2017-07-26 12:48:44 +02:00
Carlos Garnacho
d6d4217f3d gtklabel: Fix touch link handling under wayland
Refactor the code updating the active link under the current coordinates
into a separate function, and call it on GtkGestureMultiPress::pressed
so the link is updated on GDK_TOUCH_BEGIN. Based on a patch by
Jan-Michael Brummer <jan.brummer@tabos.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=776903
2017-07-25 18:36:12 +02:00
Carlos Garnacho
0daf796763 gtklinkbutton: Set cursor on button's event window
Setting the cursor on the widget window (i.e. the parent widget's) is
finicky because the cursor needs to be updated on crossing events, and
will yield the wrong result for other master devices that happen to be
in other areas of the same parent widget's window.

Just set it always on the event window created by the GtkButton parent
class. That window was causing the crossing events, so the rectangle
that gets the hand cursor set will be the same size, and we don't need
to track pointer crossing state that way.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-25 18:36:12 +02:00
Carlos Garnacho
b53a6fb092 wayland: Clear tablet tool cursor on proximity out
This ensures that the tablet tool will get the cursor updated even if it
happens to fall within the same window again on the next proximity in.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-25 18:36:12 +02:00
Carlos Garnacho
18eeaf704e gdkwindow: Update cursor for tablet tools in the window
This check must be done explicitly on Wayland as the master device for
tablet tools differ from the Core Pointer. This ensures that whenever a
tablet tool is inside a window and the cursor is programmatically changed,
it will be visually updated too.

https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-25 18:36:12 +02:00
Carlos Garnacho
3f09833253 wayland: Observe GDK_SEAT_CAPABILITY_TABLET_STYLUS on gdk_seat_get_slaves()
This flag wasn't being honored so far...
2017-07-25 15:35:41 +02:00
Jason Gerecke
32919a4a02 wayland: Implement support for tablet wheel scrolling
Adds support for creating scroll events from Wayland tablet wheel events.
Even though no Wacom tablet puck has a smooth-scrolling wheel, both event
types need to be generated to make the upper layers happy.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-20 14:11:26 +02:00
Carlos Garnacho
e6863da8fc wayland: Make function to create scroll event more generic
Add GdkWaylandPointerData and GdkDevice arguments so it can be
used across master devices.

https://bugzilla.gnome.org/show_bug.cgi?id=783716
2017-07-20 14:11:26 +02:00
Jason Gerecke
3a83de295d wayland: Get implicit grab serial information from tablet devices
If a tablet device is used to perform actions like window moving or resizing,
GTK must provide the correct implicit grab serial number over Wayland to Mutter
in order for the action to succeed. This commit adds tablet support to the
implicit serial getters.

https://bugzilla.gnome.org/show_bug.cgi?id=777333
2017-07-20 12:23:15 +02:00
Jonas Ådahl
376ff1ae60 wayland: Throttle system bell requests
If a bad behaving application tries to make the window/display beep too
often, throttle the beep requests so that we don't end up filling the
Wayland socket queue.

The throttle is set to 50 beeps per second, which far more beeps than
will ever make any sense from a user experience point of view, but will
avoid terminating due to an excessive amount of requests.

https://bugzilla.gnome.org/show_bug.cgi?id=778188
2017-07-20 10:03:51 +08:00
Jonas Ådahl
f78585b7c3 wayland: Make beep requests go through the GdkDisplay
This way we can add things like throttling.

https://bugzilla.gnome.org/show_bug.cgi?id=778188
2017-07-20 10:03:43 +08:00
Matthias Clasen
59857e8f20 3.22.17 2017-07-18 22:55:39 -04:00
Matthias Clasen
448d76b8e8 update expected test results 2017-07-18 22:55:39 -04:00
Timm Bäder
65b6aafb45 filechooserwidget: Let the rename entry hexpand
This makes a difference with other locals where error messages are
longer than the standard width of entry+spacing+button.
2017-07-18 15:11:36 -04:00
Iñaki García Etxebarria
5edeba5965 Add nullable return annotation to gtk_text_mark_get_name
https://bugzilla.gnome.org/show_bug.cgi?id=781936
2017-07-18 15:10:24 -04:00
Iñaki García Etxebarria
743eaeecf2 Add nullable return annotation to gtk_notebook_get_tab_label
https://bugzilla.gnome.org/show_bug.cgi?id=781935
2017-07-18 15:08:02 -04:00
Cody Russell
68b92cc6ef Update API for El Capitan+
Use NSAnimationContext where possible.
2017-07-18 14:54:11 -04:00
Cody Russell
fc1f0b171c os x: Add new versions 2017-07-18 14:46:45 -04:00
Daniel Aleksandersen
ff982658ee Update the URLs of known licenses to HTTPS
Use HTTPS by default for security/privacy. Avoids slow redirects.

https://bugzilla.gnome.org/show_bug.cgi?id=766517
2017-07-18 14:36:02 -04:00
Arun Raghavan
f05e6b2936 gtkapplication: Mark gtk_application_get_active_window() as nullable
https://bugzilla.gnome.org/show_bug.cgi?id=784888
2017-07-18 14:35:39 -04:00
John Ralls
7e362638ac Copy gtk_clipboard_get_default implementation to gtkclipboard-quartz.c
Fixes bug 784323.
2017-07-18 11:16:58 -07:00
Piotr Drąg
4b6c68b51e Update POTFILES.in 2017-07-18 19:53:57 +02:00
Tom Schoonjans
8c691b8232 GtkFileChooserNativeWin32: add support for get_filter and set_filter
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
626ac112f0 testgtk.c: native file chooser filter changes
Set the filter before showing the dialog
Afterwards, fetch the last active filter and display its name.

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
291eda6675 GtkFileChooserNativeQuartz: add support for get_filter and set_filter
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
2f6c90636d GtkFileChooserNative: documentation updated
https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
db87140cf3 GtkFileChooserNativeQuartz: add support for filters
Includes:
* Simple glob patterns (*.ext, *.*,...)
* MIME types
* pixbuf formats

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
6d104813cc GtkFileChooserNativeQuartz: add partial support for extra widget
When the extra widget is a GtkLabel, then its text will be displayed as
a message in the NSSavePanel or NSOpenPanel

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
af7022988c GtkFileChooserNativeQuartz: add support for GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
Which is via NSOpenPanel, not NSSavePanel...

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Tom Schoonjans
ce4c9a9ad6 GtkFilechooserNative: add macOS support
Based on the Win32 implementation, as well as the macOS file chooser
from
https://github.com/GNOME/gedit/blob/master/gedit/gedit-file-chooser-dialog-osx.[ch]
Not fully tested yet, but working properly so far.
TODO: filter support, extra widget (label), documentation...

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:48:13 -04:00
Fabio Tomat
1dd559134c Add Friulian translation 2017-07-15 20:28:20 +02:00
Bastien Nocera
a6dcb80fb4 image: Fix loading of pixdata GResources
Pixdata is deprecated but some software already use GtkImage widgets
with image data loaded from GResource-backed pixdata. As the
security-problem ridden pixdata loader was removed, we need to manually
check whether the GResource data is pixdata, and load it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=781583
2017-07-12 14:05:49 +02:00
Matthias Clasen
91614e38e3 Avoid a race in the print portal
Same as the previous commit; use the new predictable request
object path to connect to the Response signal early.
2017-07-07 12:21:42 -04:00
Matthias Clasen
15e361e793 Avoid a race in the file chooser portal
Use the new predictable request object path and connect
to the Response signal before issuing the portal call.
This avoids a race that is pretty unlikely to hit in
the filechooser case.
2017-07-07 12:21:34 -04:00
Daniel Boles
c23205dc82 label: Remove extra quote in code example 2017-07-07 08:14:27 +01:00
Daniel Boles
ac21aff55b GdkRGBA: Fix typo precentage => percentage 2017-07-06 13:59:53 +01:00
Jason Gerecke
3d9a945803 x11: Assign GDK_SOURCE_TABLET_PAD when necessary
Wacom tablets often have a "pad" device which houses multiple buttons. At
present, these devices are incorrectly marked as GDK_SOURCE_PEN which can
cause problems for some software.

https://bugzilla.gnome.org/show_bug.cgi?id=782040
2017-06-30 20:41:36 +02:00
Daniel Boles
6ecf0ff055 migrating-StyleContext: CSS does support bindings
so remove the bit in the migration guide that says it doesn’t.
2017-06-22 20:51:41 +01:00
Daniel Boles
d33540c607 css-overview: Fix typo “{with=>which} is disabled” 2017-06-22 20:41:41 +01:00
Baurzhan Muftakhidinov
fcb00d7493 Update Kazakh translation 2017-06-22 14:28:19 +00:00
Mart Raudsepp
bb13421fd3 GdkWaylandWindow: Fix version numbers in export_handle() docs
This change appeared first in 3.22.16 release, not 3.22.13.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-06-22 05:39:25 +03:00
Matthias Clasen
4bb0d25c5b 3.22.16 2017-06-20 15:16:19 -04:00
Matthias Clasen
1a6ccd1b0a Update a11y tests
Expected output of a11y tests has changed.
2017-06-20 15:16:19 -04:00
Marek Cernocky
33fbad4580 Updated Czech translation 2017-06-20 14:32:46 +02:00
Daniel Mustieles
4bbf444a1a Updated Spanish translation 2017-06-19 17:35:54 +02:00
Carlos Garnacho
9e740bd435 gdk: Set vid/pid on wayland tablets
This was missed so far... Use %.4x format, in order to behave just
the same than X11.
2017-06-16 19:30:10 +02:00
Will Thompson
fdb3cc94f6 headerbar: fix "widow" typo in docs 2017-06-15 16:28:16 +01:00
Kjartan Maraas
9b1c175961 Updated Norwegian bokmål translation 2017-06-14 07:45:40 +02:00
Debarshi Ray
d1f53b1e07 GtkActionHelper: Remove unnecessary NULL check
This NULL check has existed since commit 652f16dd98, when
GtkActionHelper was first introduced, but so has the assertion at the
top to ensure the validity of 'widget'.

https://bugzilla.gnome.org/show_bug.cgi?id=783587
2017-06-13 21:58:18 +02:00
Debarshi Ray
aed628f100 GtkActionHelper: Allow a NULL action-name to unset the previous GAction
https://bugzilla.gnome.org/show_bug.cgi?id=783587
2017-06-13 21:58:18 +02:00
Matthias Clasen
6f4e4952a3 file chooser: Don't pass NULL as title to the portal
This causes critical warnings.
2017-06-13 13:09:56 -04:00
Felipe Borges
d940388561 printunixdialog: Update collate icon as entry changes
By relying on GtkSpinButton default activation behavior, the
collate icon doesn't get updated when a new number is typed
in the copies spin button.

https://bugzilla.gnome.org/show_bug.cgi?id=759308
2017-06-07 14:29:34 +02:00
Nelson Benítez León
9d5c6aaabc gtktextdisplay: remove unused code
In render_para() function, which is called for every text line that
needs to be drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=783397
2017-06-05 14:27:46 +01:00
Matthias Clasen
3b5195c44f dist icon.list
Otherwise things will not work in a release tarball.
2017-06-02 22:28:27 -04:00
Matthias Clasen
2eb389c951 icon-browser: Add a few icons
These have appeared recently.
2017-06-02 22:05:58 -04:00
Matthias Clasen
23b7e81ed4 icon browser: Make icons a bit larger
Use 48x48 in the list, instead of 32x32. We have the space.
2017-06-02 22:05:58 -04:00
Matthias Clasen
51b1445cd1 icon browser: Add a 'copy to clipboard' button
This makes it more obvious how to use the icon.
2017-06-02 22:05:58 -04:00
Matthias Clasen
ebb00ad680 icon browser: put icons as data
Instead of hardcoding all the add_icon calls,
read the icon list from a keyfile, for easier
extensibility.
2017-06-02 22:05:58 -04:00
Daniel Boles
2aa4248e8f testsuite/scrolledwindow: Try non-overlay/non-auto
It was only testing the default configuration, where overlay scrolling
is on and both scrollbars use POLICY_AUTOMATIC. We should also test the
other 3 configurations that are available by including non-overlay
scrollbars and/or those that use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-06-02 19:36:06 +01:00
Daniel Boles
fcfad2dd7e ScrolledWindow: Don’t req size for autohidden bars
POLICY_AUTOMATIC means scrollbars are only shown when needed, i.e. when
the size of the window is not large enough to show the entire child. So
when measuring the preferred size, such scrollbars should be ignored.

But measure() added size for *any* non-overlay scrollbar of the opposite
orientation, e.g. for horizontal size, it added the width of vscrollbar.
So we requested for child + bar, & having enough for child meant that the
policy hid the bar, leaving extra space empty below/right of the child.

Fix this by only adding size for such bars if they use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-06-02 19:36:04 +01:00
Timm Bäder
7214f4d4c9 scrolledwindow: Avoid critical when removing source
Make sure indicator->conceil_timer is actually set before trying to
remove it.
2017-06-02 19:02:01 +01:00
Dan Torop
d9a9530f28 wayland: selectively cancel key repeat on key release
Under Wayland, when multiple keys are pressed and the user releases a
key, key repeat should continue unless the key released is the one
currently repeating.

In the case of:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key2 repeat
- key2 release

The behavior should be to cancel keyboard repeat, though key1 is still
held down. This is consistent with prior X11/XWayland behavior.

The following also must work:

- key1 press
- key2 press
- key2 release
- key2 press
- key1 release
- key2 should continue to repeat

The fix for bug #778019 should continue to work:

- key1 press
- key1 repeat
- key2 press -> key1 repeat stopped
- key1 release
- key2 should repeat

The choice to change the counter nkeys to the flag repeat_active
helps to solve the second test case.

https://bugzilla.gnome.org/show_bug.cgi?id=781285
2017-06-02 19:18:05 +02:00
Olivier Fourdan
2d41d772d7 wayland: fix xdg_surface test in move/resize drag
begin_resize_drag() and begin_move_drag() check for xdg_surface being
not null, but those apply on xdg_toplevel so they should check for
xdg_toplevel being non-null instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781945
2017-06-02 15:54:50 +02:00
Olivier Fourdan
c94f40b893 wayland: check parent surface for subsurface
When an event is received while a tooltip is showing, the GtkTooltip's
event handling code can end up calling gdk_window_set_transient_for()
from gtk_tooltip_set_last_window().

The Wayland GDK backend will try to automatically create a subsurface
in gdk_wayland_window_set_transient_for() but if the parent surface is
gone meanwhile, this will will cause a crash when trying to create a
subsurface from a parent with a null surface.

Checking for the parent is not sufficient, we ought to check for the
parent surface as well to avoid the crash.

https://bugzilla.gnome.org/show_bug.cgi?id=782283
2017-06-02 15:43:34 +02:00
Olivier Fourdan
63e05158ea wayland: Do not map toplevel utility as popup
Applications can specify the type hint as utility even on toplevel
windows.

When that toplevel is also marked as a transient for another window,
GDK Wayland backend would translate that as an xdg_popup which is not
appropriate.

While utility temp windows should remain mapped as subsurfaces (such as
the ones used by treeviews), regular windows should not translate as
neither a subsurface nor an xdg_popup.

https://bugzilla.gnome.org/show_bug.cgi?id=781945
2017-06-02 15:16:13 +02:00
Christoph Reiter
a2e2f38642 gtkfilechoosernativewin32: Fix support for non-ASCII paths
The code used SIGDN_URL to get an URL for the selected item, but Windows URLs
are a mix of unicode and percent encoded characters in the locale encoding
and not something GFile can understand. The result is a garbage file
path.

Instead use SIGDN_FILESYSPATH to get a real file path if available.

Also checks the return value of g_utf16_to_utf8 because file paths on
Windows can contain lone surrogates which would make the conversion fail.

https://bugzilla.gnome.org/show_bug.cgi?id=783347
2017-06-02 13:20:25 +02:00
Matthias Clasen
6b3f2131c5 Redo the listbox dnd example
Rewrite this example to have better drag highlighting.
2017-05-31 21:15:34 -04:00
Daniel Boles
3850574146 Adwaita: Add missing rule for fullscreen headerbar
Another selector forces round corners for headerbars in a stack, and it
has higher priority than the selector covering the non-stack case from
commit 712a8adbd9. Totem’s MainToolbar
happens to be in a stack, and we should maintain symmetry here anyway.

So, as window classes .maximized and .tiled are excluded from this other
selector, the newly handled .fullscreen case must be excluded here also.

https://bugzilla.gnome.org/show_bug.cgi?id=770513
2017-05-31 19:08:28 +01:00
Daniel Boles
c7fd37bd5b HighContrast: Regenerate CSS files with sassc 2017-05-31 18:45:59 +01:00
Daniel Boles
ae4bd65acd HighContrast: Update parse-sass.sh; remove Gemfile
Make parse-sass.sh use sassc instead of the old Ruby method.
2017-05-31 18:45:24 +01:00
Daniel Boles
1cb3fc75b3 Adwaita: Remove unused Gemfile 2017-05-31 18:45:04 +01:00
Daniel Boles
712a8adbd9 themes: Square corners on fullscreen win headerbar
Totem uses a fullscreen window with a headerbar at the top, and without
this change, that headerbar has rounded corners, which look different
from a maximised window and let video content show through beneath.

https://bugzilla.gnome.org/show_bug.cgi?id=770513
2017-05-31 08:16:46 +01:00
Aurimas Černius
cfaaf8300d Updated Lithuanian translation 2017-05-30 22:32:23 +03:00
Debarshi Ray
bebd5020ec wayland: Don't warn if the display is lost, skip exit handlers
There is no need to have every application log a warning when the
Wayland display server goes away, and we are using _exit instead of
exit elsewhere.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=745289
2017-05-30 09:16:45 +02:00
Марко Костић
1d52356855 Update Serbian translation 2017-05-27 22:41:26 +00:00
Debarshi Ray
425e4df100 wayland: Don't abort when preparing the source if connection is lost
Aborting the application makes it look like an application bug, when
it is the expected thing to do when the Wayland display server goes
way. eg., when the user logs out. The log level is also demoted to
avoid a storm of warnings in the log from all applications whenever
this happens.

This is also what the X11 backend does (see gdk_x_io_error).

https://bugzilla.gnome.org/show_bug.cgi?id=783047
2017-05-25 11:53:15 +02:00
Emmanuele Bassi
b492db25a1 textview: Make GTK_TEXT_WINDOW_PRIVATE public
The GTK_TEXT_WINDOW_PRIVATE enumeration value is really *not* private.
Internally, it's used as a simple "invalid value" marker, and
application and library developers are supposed to use it as such in
their own code.

Let's just document it, and since the GtkTextView documentation and
internals go a long way to state the fact that it should not be used as
an argument value, let's add some pre-condition checks as well.

This commit fixes GtkSourceView's use of GTK_TEXT_WINDOW_PRIVATE as
default value for a GObject property that was broken by the change in
glib-mkenums to honor the `/*< public >*/` and `/*< private >*/`
trigraphs.
2017-05-23 06:41:18 +01:00
Jonas Ådahl
e5ed52b6c9 tests: Add testforeign
Add a test for exporting a handle. There are no GTK+ API for this, but
only per backend GDK API, and so far only Wayland is supported. There
is a private GdkWindow API but it's not exposed externally.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-05-23 09:39:29 +08:00
Jonas Ådahl
dba57db1f3 GdkWaylandWindow: Allow calling export() multiple time
Allow getting the same export handle multiple times by calling
gdk_wayland_window_export_handle() multiple times. For each time
export() is called, a unexport() must be called to unexport.

When the window is already exported, the exported callback is called
via a idle handler. If there are multiple export() calls, they are
invoked in order either when the handle is received by the display
server, or when the idle callback is invoked.

Calling unexport() will not affect future invokations of the exported
callback, unless all export() calls have their unexport() call count
matched.

https://bugzilla.gnome.org/show_bug.cgi?id=782325
2017-05-23 09:39:29 +08:00
Olof-Joachim Frahm
8cf774d668 Move style change for popover creation.
Creating with `gtk_popover_new_from_model` should be exactly the same as
if via `gtk_popover_new` plus `gtk_popover_bind_model`.

Also remove the style if the model is unbound at any point.
2017-05-22 14:26:32 +01:00
Timm Bäder
91f83011da widget: Remove useless assignment
We don't use adjusted_allocation after this line.
2017-05-22 14:26:32 +01:00
Timm Bäder
7d5ac88232 examples/drawing: Don't call gtk_main_quit
This is a GtkApplication so it will do the right thing when closing the
window.
2017-05-22 14:26:32 +01:00
Timm Bäder
eb8870c912 fallback-c89: Include config.h
It holds all the HAVE_<func> definitions.
2017-05-22 14:26:32 +01:00
Timm Bäder
a2c8af7f32 widget: remove double assignment
We never read the value we assign here.
2017-05-22 14:26:32 +01:00
Timm Bäder
94dd289fd0 placesview: Remove duplicate GtkMountOperation assignment
we assign a new mount operation a few lines later again.
2017-05-22 14:26:32 +01:00
Timm Bäder
3380cd63c1 levelbar: Don't allocate 0 blocks
Could result in a division by zero later on and doesn't make a lot of
sense anyway.
2017-05-22 14:26:31 +01:00
Timm Bäder
46decc6182 grid: Remove unnecessary NULL checks
The minimum and natural pointers passed to measure are never NULL and
that's the only place where we call gtk_grid_get_size_for_size.
2017-05-22 14:23:14 +01:00
Timm Bäder
7adc38a64c GtkGestureMultiPress: Remove superfluous NULL check
The rect parameter in gtk_gesture_multi_press_set_area is annotated as
nullable and the code handles the rect==NULL case, but the
g_return_if_fail kept that case from ever happening.
2017-05-22 14:23:14 +01:00
Timm Bäder
b831e97af4 label: Remove dead ternary operator 2017-05-22 14:23:14 +01:00
Timm Bäder
48ee8016c8 filechooserwidget: Remove always-false error case
_gtk_search_engine_new never returns NULL, it always returns a valid
GObject with at least the simple search engine initialized.
2017-05-22 14:23:14 +01:00
Timm Bäder
6c9b11d367 sidebarrow: Remove useless size group
Nice try, but size groups don't work with invisible widgets anyway.
Invisible widgets request 0×0.
2017-05-22 14:23:14 +01:00
Timm Bäder
c08f2cb7b5 label: Remove useless if statements
We never pass nullable pointers into get_size_for_allocation.
2017-05-22 14:23:14 +01:00
Olivier Fourdan
5209995171 gtkwindow: Hide CSD title bar when undecorated
When switching from decorated to undecorated, the title bar should be
hidden as well.

https://bugzilla.gnome.org/show_bug.cgi?id=782117
2017-05-22 09:54:11 +02:00
Robert Ancell
de4818f088 docs: Fix copy-paste error in gtk_file_chooser_get_extra_widget() doc comment 2017-05-20 13:07:33 +12:00
Lapo Calamandrei
622a0f8611 Adwaita: Avoid accindental border on last treeview header
The :last-child selector supposed to reset the border was
overridden by the :hover selector. This is fixed by moving the
:last-child selector after the overriding one.
Thanks to Sebastian Keller for spotting.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=779078.
2017-05-17 18:16:28 +02:00
Lapo Calamandrei
15f3a527ef Adwaita: regenerate the css with sassc 2017-05-17 18:06:39 +02:00
Lapo Calamandrei
67953e9cfb Adwaita: modify parse-sass.sh script to use sassc 2017-05-17 18:05:13 +02:00
Robert Ancell
4d1c0317cc EntryBuffer: Don't generate changed events when input is truncated 2017-05-17 09:05:38 +12:00
Daniel Boles
16e23bebe3 widget-factory: Use :relief=none, not class .flat
The rest of the ui file follows that convention.
2017-05-13 21:55:28 +01:00
Matthias Clasen
2dfcb47190 3.22.15 2017-05-11 15:09:33 -04:00
Timm Bäder
73179d3771 listbox: Manually unparent placeholder in dispose
We can't make the placeholder a non-internal child as that breaks
applications that previously relied on foreach() to only return
GtkListBoxRow instances. Instead, unparent the placeholder manually in
dispose.

https://bugzilla.gnome.org/show_bug.cgi?id=782494
2017-05-11 15:01:42 -04:00
Matthias Clasen
866bd834e4 Revert "listbox: Properly remove placeholders"
This reverts commit b7fdc5b447.

This was found to break the expectations of existing listbox
users.
2017-05-11 15:01:05 -04:00
Lapo Calamandrei
31a0eead4c Adwaita: regenerate the css 2017-05-11 15:19:49 +02:00
Lapo Calamandrei
5c98b2b8ed Adwaita: restyle entry-tag
Fix the sizing and spacing, blue tags for the bright variant,
similar to what gnome-documents was shipping, and inverted gray
tags for the dark variant, not vanishing on hover.
2017-05-11 15:19:49 +02:00
Matthias Clasen
e0ad573c82 3.22.14 2017-05-10 14:57:00 -04:00
Carlos Garnacho
a3178fd665 gtkclipboard: Fix typo
The standard atom is UTF8_STRING.
2017-05-10 20:25:40 +02:00
Emmanuele Bassi
1a489831b3 build: Fix the check on sassc's presence
If sassc is not available we do not want to include the rules to
regenerate the CSS out of the SCSS files.
2017-05-10 14:31:09 +01:00
Chun-wei Fan
801e9cf74b build/win32/replace.py: Fix replacing items in files with UTF-8 content
Some files that this script will process might have UTF-8 items in
there, which can cause problems on Python 3.x as it is more strict and
careful on unicode issues.

Fix this by:
-Doing what we did before on Python 2.x
-Opening the file with encoding='utf-8' on Python 3.x
2017-05-09 18:37:20 -07:00
Matthias Clasen
a3b852e9ac 3.22.13 2017-05-09 14:01:57 -04:00
Matthias Clasen
2b0eafb8dc Fix the build
It seems that new gtk-doc doesn't like this variable,
so drop it.
2017-05-09 14:01:57 -04:00
Jonas Ådahl
d8bb38588a GtkWindow: Don't double free export user data
The user data passed when exporting a Wayland window was supposed to be
freed using the destroy_func, as is commonly done. This was previously
broken, as the user data was just NULL:ed when exported, and only
actually destroyed when unexporting before having exported.

While e016d9a5db fixed this, it introduced
a regression, as GtkWindow was nice enough to free the memory anyway
after having received the exported handle, causing it now to double
free.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-09 23:19:20 +08:00
Emmanuele Bassi
eba10161c1 build: Disable deprecation warnings in broadway
Avoid compiler warnings while building code that uses deprecated API.
2017-05-09 14:30:40 +01:00
Emmanuele Bassi
a7db887c0b Specify more options to sassc
We should use the compact style, to minimize the whitespace; and we
should omit the source map URL comment as well.
2017-05-09 14:23:14 +01:00
Emmanuele Bassi
5376fa36a8 build: De-duplicate options to sassc
If we want to change the list of options we use with sassc, not having
to copy-paste them in multiple rules would be a good start.
2017-05-09 14:23:09 +01:00
Emmanuele Bassi
dc471fa258 build: Enable subdir-objects
Like we did in the master branch.

Using subdir-objects removes the forward compatibility warnings coming
from autotools.
2017-05-09 14:19:51 +01:00
Emmanuele Bassi
d237b255f9 build: Remove unused rules
The foreign drawing example was moved to the GTK demos.
2017-05-09 14:19:51 +01:00
Emmanuele Bassi
d9e0ea2905 build: Don't include the marshallers header file
We used to inject the inclusion of the generated header file into the
generated body of the marshallers source code in order to avoid compiler
warnings about missing prototypes. The glib-genmarshal utility has been
fixed in GLib to include the prototype in the generated source, so now
we're going to trip -Werror=redundant-decls.
2017-05-09 14:19:51 +01:00
Lapo Calamandrei
01a94a06e7 Adwaita: regenerate css 2017-05-09 13:32:56 +02:00
Lapo Calamandrei
9f402d15bc Adwaita: add a comment
Add a comment pointing to the related bug for the dropdown menu
margin.
2017-05-09 13:31:31 +02:00
Lapo Calamandrei
3e48a80d85 Revert "Adwaita: remove unneeded margin on dropdown menu"
This reverts commit bb1679b247.
The margin was actually related to:
https://bugzilla.gnome.org/show_bug.cgi?id=591258
2017-05-09 13:30:23 +02:00
Lapo Calamandrei
5336998bee Revert "Adwaita: regenerate the css"
This reverts commit f2f09b9574.
2017-05-09 13:30:23 +02:00
Olof-Joachim Frahm
c05c78f9c9 Make sure to remove tooltip timeout.
Otherwise in GC-ed environments the `g_source_remove` call during
disposal might be called on an already removed source, which results in
unnecessary console output.

https://bugzilla.gnome.org/show_bug.cgi?id=778301
2017-05-09 06:55:21 -04:00
Lapo Calamandrei
f2f09b9574 Adwaita: regenerate the css 2017-05-09 12:50:49 +02:00
Lapo Calamandrei
bb1679b247 Adwaita: remove unneeded margin on dropdown menu
That margin was probably a left over to workaround some placement
issue on dropdowns which doesn't exist anymore.
2017-05-09 12:49:10 +02:00
Gianvito Cavasoli
853ce80137 Update Italian translation 2017-05-09 08:48:31 +00:00
Jonas Ådahl
31c72bd7df GdkWaylandWindow: Unexport when finalizing
The application might not have exported, and it'll be too late for it
at this point anyway, so lets be helpful and not leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-09 10:16:32 +08:00
Timm Bäder
f3f71ef0ac box: Initialize size arrays to 0
Thats the right thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=773814
2017-05-08 18:03:26 -04:00
Jakub Steiner
dfe993ff1d style entry-tags
https://bugzilla.gnome.org/show_bug.cgi?id=781214
2017-05-08 17:55:29 -04:00
Jonas Ådahl
64312d79f7 wayland: Remove self assignment
Don't assign the value of a variable to itself. It was added just for
clarity, but it makes coverity complain, so remove it.

https://bugzilla.gnome.org/show_bug.cgi?id=780301
2017-05-08 17:51:41 -04:00
Jonas Ådahl
6f326a71d4 wayland: Use correct enum type and values
Use the gravity enum values when converting to gravity. It doesn't fix
anything, since the enum values were identical, but it makes a coverity
warning go away.

https://bugzilla.gnome.org/show_bug.cgi?id=780301
2017-05-08 17:51:30 -04:00
Matthias Clasen
0f929fb6e3 file filter: Be save against NULL
g_content_type_from_mime_type may return NULL, deal with that.

https://bugzilla.gnome.org/show_bug.cgi?id=782180
2017-05-08 16:39:20 -04:00
Matthias Clasen
7c66c68f48 Revert "GdkWaylandWindow: Unexport when finalizing"
This reverts commit ab4e4bd3ae.
2017-05-08 16:00:49 -04:00
Jonas Ådahl
ab4e4bd3ae GdkWaylandWindow: Unexport when finalizing
The application might not have exported, and it'll be too late for it
at this point anyway, so lets be helpful and not leak it.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-08 15:47:12 -04:00
Jonas Ådahl
e016d9a5db GdkWaylandWindow: Clear export user data when used
It was only cleared when unexported, but we could just as well clear it
when its used too.

https://bugzilla.gnome.org/show_bug.cgi?id=782109
2017-05-08 15:47:12 -04:00
Mohammed Sadiq
088cf99763 linkbutton: Fix memory leak
strings returned by gtk_widget_get_tooltip_text() and
gtk_widget_get_tooltip_markup() has to be freed when no longer
required.

https://bugzilla.gnome.org/show_bug.cgi?id=782202
2017-05-08 15:57:53 +02:00
Michael Catanzaro
001fa0a810 menubutton: Remove prelight state when button is deactivated
If the button is deactivated, it should not appear to be hovered
anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=781992
2017-05-08 15:57:04 +02:00
Balázs Úr
656130a032 Update Hungarian translation 2017-05-05 18:52:59 +00:00
Christoph Reiter
4496c5388b gtkdnd: restore drag window movement for the unmanaged case
5bb12474d9 removed the dnd window movement code to let
the gdk backends handle the window movement instead. While this
works for X11/wayland the win32 backend still uses the unmanaged
interface and expects the window movement to be handled on the gtk
side. This restores the functionality in case the dnd is unmanaged.

This fixes the drag window on Windows being stuck in the top left
corner instead of following the drag position.

https://bugzilla.gnome.org/show_bug.cgi?id=781737
2017-05-05 17:29:37 +02:00
Paolo Borelli
7e9077c794 shortcutssection: plug a tiny mem leak 2017-05-05 10:53:46 +02:00
Matthias Clasen
7d9450fb60 clipboard: Try the mimetype first
Try text/plain;charset=utf-8 first, before falling back to
X11-isms like UTF8_TEXT. This makes things work on Wayland
compositors that don't carry a heavy X11 legacy around.

https://bugzilla.gnome.org/show_bug.cgi?id=781814
2017-05-03 18:49:45 -04:00
Lapo Calamandrei
1fb9db547d Adwaita: regenerate css 2017-05-03 17:47:14 +02:00
Lapo Calamandrei
57031135a0 Adwaita: add more space between check/radio and label in popovers
See https://bugzilla.gnome.org/show_bug.cgi?id=779570 for details.
2017-05-03 17:45:44 +02:00
Daniel Boles
5269d134b0 Scale: Improve documentation of set_has_origin()
Properly format the property name, and avoid saying scale so many times.
2017-05-02 12:28:21 +01:00
Daniel Boles
aded963251 Scale: Explain how to round value when !draw-value
Scale:digits is (now, again) ineffective if Scale:draw-value is FALSE.
To get rounding in that case, the base Range:round-digits must be used.
2017-05-02 12:28:20 +01:00
Anders Jonsson
4452414635 Update Swedish translation 2017-05-01 22:25:39 +00:00
Dušan Kazik
6a9d6d5986 Update Slovak translation 2017-04-30 08:01:40 +00:00
Мирослав Николић
7299f3942e Updated Serbian translation 2017-04-30 08:47:39 +02:00
Мирослав Николић
182d984a1f Updated Serbian translation 2017-04-30 08:30:24 +02:00
Мирослав Николић
c8d8956a6d Updated Serbian translation 2017-04-30 08:25:14 +02:00
Мирослав Николић
1302c8046e Updated Serbian translation 2017-04-30 08:15:13 +02:00
Kukuh Syafaat
a647eb04e2 Update Indonesian translation 2017-04-29 02:09:31 +00:00
Olivier Fourdan
c770b5cbbc wayland: make key event log more explicit
With Wayland, GDK_DEBUG=events would log key events but not explicitly
state whether the event is a key press or release, or if it's
originating from a key repeat.

Add some more verbosity to make sure these informations are logged on
key delivery when GDK_DEBUG is set.

https://bugzilla.gnome.org/show_bug.cgi?id=781767
2017-04-28 13:08:37 +02:00
Mario Blättermann
6071006206 Update German translation 2017-04-28 09:50:43 +00:00
Florian Müllner
a866937d08 gdk: Relicense translate_wm_button_layout_to_gtk()
It is generally a good idea to license individual files under the
same terms as the project license (in particular when the mismatch
boils down to having copied the wrong license header), so relicense
the code under the LGPL.

https://bugzilla.gnome.org/show_bug.cgi?id=781422
2017-04-27 21:06:15 +02:00
Rafael Fontenelle
1a16991254 Update Brazilian Portuguese translation 2017-04-27 00:58:43 +00:00
Piotr Drąg
11f746e204 Update Polish translation 2017-04-26 19:42:55 +02:00
Stas Solovey
edf00914e5 Update Russian translation 2017-04-26 14:44:34 +00:00
Daniel Boles
1cd0a8de0b Scale: Fix documentation of digits per last revert
Revert doc changes that were for the behavioural change just reverted.

Add a clarifying note that, under the original behaviour, :digits only
rounds the Adjustment if :draw-value is TRUE at the time of the change.

https://bugzilla.gnome.org/show_bug.cgi?id=781605
https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-04-26 12:26:56 +01:00
Matthias Clasen
9f8b1a8aa8 Revert "Scale: Always sync ::digits to Range::round-digits"
This reverts commit 4a6bd134bd.

This change in behavior broke various things.

https://bugzilla.gnome.org/show_bug.cgi?id=781605
2017-04-26 06:33:27 -04:00
Timm Bäder
b7fdc5b447 listbox: Properly remove placeholders
https://bugzilla.gnome.org/show_bug.cgi?id=778617
2017-04-25 21:51:59 +02:00
Timm Bäder
9b05176eb2 spinbutton: Add undershoot nodes to CSS docs 2017-04-25 11:15:13 +01:00
Timm Bäder
34c135be7c spinbutton: Remove an unused define 2017-04-25 11:15:12 +01:00
Timm Bäder
0a7151b22e window: Expand CSS node docs 2017-04-25 11:15:11 +01:00
Timm Bäder
7798764377 paned: Fix typo 2017-04-25 11:15:09 +01:00
Daniel Boles
687b38f87e ProgressBar: Update node summary per b5eb37eba4
The node named "progress" is a child of the node named "trough".
2017-04-25 11:15:08 +01:00
Matthias Clasen
d94f16562e Add a cleaned-up example for listbox DND
I want to refer to this as an example, so make it look nice.
2017-04-23 10:39:44 -04:00
Matthias Clasen
ae6f95878e testlist3: Handle dropping a row onto itself
Instead of spewing criticals, we should handle this
gracefully by doing nothing.
2017-04-22 21:39:10 -04:00
Carlos Soriano
918445bf40 gtkplacesview.ui: Update helper label to include IPv6 addresses
This is a backport from 16bce17168. Thing is Nautilus pulled the
code from master until now, so right now gtk-3-22 and Nautilus 3.24
differ.

Would be great to have them share the same code, and at the same time
have this small string helper issue fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=781622
2017-04-22 21:41:29 +02:00
Carlos Soriano
60a1e1d0e9 gtkplacesview.ui: Remove translatable from server label helper
Translating it seems pointless if we can use a non-translatable example
such as gnome.org instead of foo.example.com.

This will help to make changes in here without breaking string freeze.

https://bugzilla.gnome.org/show_bug.cgi?id=781622
2017-04-22 21:41:29 +02:00
Matthias Clasen
7ab48458a0 Refine the listbox dnd example
Add a drag handle, and demonstrate broken offsets.
2017-04-22 08:07:42 -04:00
Carlos Soriano
fba4e8fb47 gtkplacesview: Fix unmounted open in tab/window
We were send the "open-location" signal without mounting first the
location if necessary, making the open in tab/window context menu not
work for those.

This patch makes sure we mount the location before emitting the signal.

https://bugzilla.gnome.org/show_bug.cgi?id=771269
2017-04-22 11:51:21 +02:00
Timm Bäder
b5eb37eba4 progressbar: Fix position of text node in CSS docs
The text node has always been a child node of the progressbar node, not
the trough node, but the docs claimed otherwise.
2017-04-22 06:35:54 +02:00
Matthias Clasen
991e84fe3a Fix a typo 2017-04-21 18:27:43 -04:00
Matthias Clasen
930acacf94 Implement dnd for list box rows in an example
This shows very basic DND of list box rows.
2017-04-21 17:02:05 -04:00
Georges Basile Stavracas Neto
42aa4c138c placesview: fix testsuite
Because the network monitor can perfectly be NULL,
the tests were failing on that for GtkPlacesView
always tries to disconnect this handler.

Fix that by only disconnecting the handler when
the network monitor exists.

https://bugzilla.gnome.org/show_bug.cgi?id=781195
2017-04-11 16:55:23 -03:00
John Ralls
9b5a92f5cc Save Changes Bug 781118 - gtk 3.22.12 quartz backend segfault
Calling 'width' on an NSValue won't work, must call sizeValue on it.
2017-04-10 16:40:05 -07:00
Georges Basile Stavracas Neto
dfb5d11a53 places-view: monitor network
GtkPlacesView exposes local access points and network
shares transparently by using the 'network:///' URI,
which is handled by GIO.

Currently, however, it doesn't monitor the network
for new available points, such as computers that just
join the network. It may happen too that the backend
won't find all the networks before the network enumeration
finishes.

Fix that by keeping a file monitor inspecting the network
uri, and update the places list when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=781162
2017-04-10 19:36:52 -03:00
gogo
6e87915b05 Update Croatian translation 2017-04-10 20:43:09 +00:00
gogo
4f3ff05943 Update Croatian translation 2017-04-10 20:39:13 +00:00
Rūdolfs Mazurs
8ec4a65f52 Update Latvian translation 2017-04-09 13:04:50 +03:00
Matthias Clasen
28d2edcb22 3.22.12 2017-04-08 15:15:58 -04:00
Tom Tryfonidis
0c8ad72410 Update Greek translation 2017-04-08 16:36:15 +00:00
Matthias Clasen
02d537834a flowbox: don’t try to focus or draw NULL widgets
Rubberbanding over an empty area results in warnings, due to the code
trying to focus and queue a null pointer for drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=780734
2017-04-06 15:12:33 +01:00
Alberts Muktupāvels
124b62881a gtkheaderbar: add style classes to all title buttons
Commit b187773053 added CSS style
classes for minimize, maximize and close buttons. Add similar classes
also to icon and menu buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=780944
2017-04-06 15:35:55 +03:00
Jeremy Bicha
85f25f4a3e docs: Use https for more links
https://bugzilla.gnome.org/show_bug.cgi?id=780878
2017-04-03 16:14:13 -04:00
William Hua
6e711beb0b mir: clean up an ugly function 2017-04-03 13:29:59 -04:00
Olivier Fourdan
efbe40214b gdkwindow: different displays, different classes
GdkWindow's before_process_all_updates() and after_process_all_updates()
wrongly assume that all displays are from the same class, which is not
the case if for example a client open different displays with different
backends such as X11 and Wayland.

Use the actual class for each display in the display list to avoid a
crash when mixing displays from different classes.

Fix suggested by Christian Persch <chpe@gnome.org> in bug #776472.

https://bugzilla.gnome.org/show_bug.cgi?id=776472
2017-04-03 19:16:10 +02:00
Emmanuele Bassi
81bfc91c7a Ignore deprecation warnings for g_object_newv()
GLib has deprecated GParameter and g_object_newv(); until we switch to
the new g_object_new_with_properties() API, and bump GLib required
version, we should simply ignore the compiler warnings.
2017-04-03 12:10:17 +01:00
Emmanuele Bassi
f82329de35 Optionally depend on sassc to generate the theme CSS
Instead of using Ruby/Sass to generate the CSS from SCSS files, we can
use the faster and more lightweight libsass/sassc binary.

We can keep the CSS files in Git to make it easier to dist GTK+, but we
can add rules to ensure they get rebuilt if the source SCSS changes.

https://bugzilla.gnome.org/show_bug.cgi?id=780041
2017-04-03 12:02:11 +01:00
John Ralls
b6aaae7dea Replace NSScreen:userSpaceScaleFactor, deprecated since MacOS X 10.7.
userSpaceScaleFactor is not compatible with high-resolution (aka HiDPI)
displays.
2017-04-02 18:16:59 -07:00
John Ralls
8074626fc6 Add missing file and correct some warnings from quartz: Add monitor support. 2017-04-02 17:55:55 -07:00
Matthias Clasen
dbfa8e86c5 quartz: Add a forgotten file 2017-04-01 17:41:00 -04:00
Matthias Clasen
2ad14d393b quartz: Add monitor support
This is a backport of a patch by Tom Schoonjans,

https://bugzilla.gnome.org/show_bug.cgi?id=779184
2017-04-01 16:50:12 -04:00
William Hua
2f851530f4 mir: set application name when creating connection 2017-04-01 10:56:54 -04:00
William Hua
ecf9c06ada mir: remove keymap and input device state warnings 2017-03-31 23:18:06 -04:00
William Hua
01b7307296 mir: re-write settings implementation 2017-03-31 15:55:29 -04:00
Ernestas Kulik
69234066a4 flowbox: don’t select when rubberbanding over nothing
When rubberbanding over an empty area, everything is selected on gesture
end, which is a bit counter-intuitive.

https://bugzilla.gnome.org/show_bug.cgi?id=780735
2017-03-31 07:27:05 +03:00
Yosef Or Boczko
1082b77702 Updated Hebrew translation 2017-03-30 19:28:41 +03:00
Yosef Or Boczko
7cb6ab37f3 Updted Hebrew translation 2017-03-30 19:28:31 +03:00
Yosef Or Boczko
6eeb546c4a Updated Hebrew translation 2017-03-30 18:13:13 +03:00
Christoph Reiter
30b961c84b osx: fix build
https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-30 09:55:45 -04:00
Christoph Reiter
cc53017b3e gtk_widget_intersect: fix annotations
https://bugzilla.gnome.org/show_bug.cgi?id=773228
2017-03-30 11:16:14 +02:00
Daniel Boles
cff35b36a3 TextView: Drop an unnecessary #include 2017-03-27 19:30:17 +01:00
Daniel Boles
08887f0577 TextView: Be const-correct when passing a pointer
The TextIter is passed by pointer for efficiency. We neither need to
modify it, nor should we leave it possible to accidentally do so. So,
it should be passed as a pointer-to-const.
2017-03-27 19:23:40 +01:00
Daniel Boles
87b579cf2b TextView: Get line direction in more efficient way
We do not need to go through the heavyweight process of constructing a
TextLineDisplay just to get the direction out of it, when we can simply
use TextIter API to get the text and then get its direction using Pango.

Adapted from a patch by Mehdi Sadeghi for GtkSourceView:

https://bugzilla.gnome.org/show_bug.cgi?id=779081#c20
2017-03-26 16:13:40 +01:00
Daniel Boles
536f713a1c TextBuffer: Add missing transfer full annotations 2017-03-26 15:50:57 +01:00
Kjell Ahlstedt
c3d759c3b6 printjob: Clarify array ownership in gtk_print_job_set_page_ranges()
Add a documentation annotation saying that set_page_ranges transfers
ownership of the GtkPageRange array.
Add a g_free() call to fix a memory leak when set_page_ranges is
used repeatedly.

https://bugzilla.gnome.org/show_bug.cgi?id=780234
2017-03-26 15:07:09 +01:00
Matthias Clasen
a7ca5335e4 Avoid more compiler warnings 2017-03-26 15:07:01 +01:00
Matthias Clasen
80a177db8b Avoid unused variable warnings 2017-03-26 15:05:37 +01:00
Matthias Clasen
12155b4ee3 Avoid redefining GNU_SOURCE
Gives a compiler warning with the wrong flags.
2017-03-26 15:05:27 +01:00
Matthias Clasen
0155009d57 Avoid some compiler warnings 2017-03-26 15:05:18 +01:00
Piotr Drąg
a331741117 Update Polish translation 2017-03-25 22:55:00 +01:00
Kjartan Maraas
2224fb58dd Updated Norwegian bokmål translation. 2017-03-25 11:58:36 +01:00
Jordi Mas
d190263272 Update Catalan translation 2017-03-24 19:42:57 +01:00
Marek Kasik
931f7863ec printing: Don't hang in gtk_enumerate_printers()
Stop enumerating printers when all backends were removed.

https://bugzilla.gnome.org/show_bug.cgi?id=686838
2017-03-23 13:19:54 +01:00
Stas Solovey
a7f3fd12d5 Update Russian translation 2017-03-22 21:46:35 +00:00
Timm Bäder
6f30e97c3d gdkdragsource: Ensure button >= 1
So the left shift later doesn't overflow.
2017-03-22 08:11:40 +00:00
Timm Bäder
92fd8cb81b widget: Prepend style classes to list when parsing
Since the later gtk_style_context_add_class doesn't care about the order
of the style classes, we can as well just prepend style classes to the
list and avoid the squared behavior when appending to a linked list.
2017-03-22 08:10:54 +00:00
William Hua
ff1a78788f mir: always emit a resize when creating windows 2017-03-22 02:44:38 -04:00
Andika Triwidada
6adc00ef1d Update Indonesian translation 2017-03-21 14:16:11 +00:00
Daniel Boles
54ffec9bb0 Scrollbar: grammar fix for previous commit 2017-03-21 00:05:32 +00:00
Daniel Boles
369377369f Scrollbar: Tweak intro docs a bit
Explain where the adjustment comes from, clarify some of the wording
about how its fields influence the scrollbar, and also note that the
steppers may not be present, since they aren’t in our default themes.
2017-03-21 00:00:37 +00:00
Daniel Boles
93d68270c4 ScrolledWindow: Don’t check if child is Scrollable
If the child added is not a Scrollable, it gets wrapped in a ViewPort –
which is. So it is impossible to end up with a non-Scrollable child.

Just check we have /any/ child where needed, which is semantically nicer

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-03-20 23:20:29 +00:00
Daniel Boles
16b9e8261d ScrolledWindow: Streamline/clarify the intro docs
• intro: Clarify that external policy and/or adjustments can be used.
 • add(): Don’t waffle on about having to add a ViewPort since we handle
          that transparently for the user, so they can add() any widget.
 • Adjustment stuff: most of this was repeating the docs for Scrollbar,
                     so just refer the user to that. Also, mention how
                     policies NEVER and EXTERNAL interact with all this.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-03-20 23:20:26 +00:00
Daniel Boles
3178a7a301 Tooltip: Avoid redundant variable initialisations
has_tooltip_widget was assigned twice in immediate succession.

return_value is not used anywhere else in this function since commit
14a864c8b5 and does not need a default
value anymore, so move it to the inner scope and don't init to NULL.
2017-03-20 21:14:41 +00:00
Timm Bäder
57ea1796e3 tooltip: Remove unused assignment
hide_tooltip  gets overriden in any case 2 lines down, and return_value
isn't used later in that function. The second assignment was introduced
in ef1da5f6c2, directly below the first
assignment.
2017-03-20 20:59:21 +00:00
Timm Bäder
d2c79b966b css-editor: Remove unused if statement
The static local is set to NULL and never set to anything else, so we
never use it anyway.
2017-03-20 20:58:56 +00:00
Timm Bäder
1daa41bf96 box: Make sure center_req is initialized
In case we have an invisible center widget, we never initialize it, but
later still use it.
2017-03-20 20:57:07 +00:00
Timm Bäder
d689ee7d7e progressbar: Remove useless if statement
Both the if and the else block contained exactly the same code.
2017-03-20 20:45:11 +00:00
Timm Bäder
a92ca3518b notebook: Remove dead assignment 2017-03-20 20:45:11 +00:00
Timm Bäder
7074607635 GtkRecentManager: Remove superfluous local variable 2017-03-20 20:45:11 +00:00
Timm Bäder
e63748f231 GdkX11DeviceManager: Fix debugging output
The 2 values added in 3.22 were missing from the source_names array.
2017-03-20 20:45:11 +00:00
Matthias Clasen
a7ebe62e67 3.22.11 2017-03-19 12:11:14 +00:00
Matthias Clasen
b04a863328 Avoid a critical warning in the filechooser portal
This was showing up when cancelling a portal file chooser
in recipes.
2017-03-19 07:34:21 -04:00
Daniel Boles
122cbcf17f css-overview: Fix inconsistent British English use 2017-03-18 12:33:05 +00:00
Timm Bäder
9c52d8e8f0 entrycompletion: Remove unnecessary NULL check
completion really shouldn't be NULL at this point, especially since it
gets dereferenced higher up in the function.
2017-03-18 12:33:05 +00:00
Timm Bäder
61c85ba89d calendar: Fix else branch indentations 2017-03-18 12:33:04 +00:00
Daniel Boles
b73e6ffbd8 css-overview: Fix+Explain color expr number ranges
Last try, promise. They don’t all use 0 to 1. We should probably explain
the effects too. Hopefully this manages that while not being too verbose
2017-03-18 01:17:28 +00:00
Daniel Boles
76eb8e3e98 css-overview: Elaborate how color expressions work 2017-03-17 23:55:15 +00:00
Daniel Boles
98fe7f5b5c docs/css-overview: Fix color functions’ arg orders
shade/alpha/mix() take colour(s) and a number that is the ratio by which
to transform them. It was written here that these shall be passed in the
order (number, colour). That was wrong: they must be passed in the order
(colour[s], number) to work, and for the Inspector not to flag an error.
2017-03-17 23:32:19 +00:00
Christoph Reiter
64ec7c2640 quartz: fix build for <10.12
The style mask type was changed from NSUInteger to NSWindowStyleMask.
Use NSUInteger so it also works on older macOS.

https://bugzilla.gnome.org/show_bug.cgi?id=780019
2017-03-15 07:26:07 -04:00
Matthias Clasen
c3190edd93 3.22.10 2017-03-13 20:52:49 -04:00
William Hua
ad5d95e062 mir: start handling resize events again 2017-03-13 10:54:35 -04:00
William Hua
3be1bffc77 mir: remove unused generate_configure_event () 2017-03-13 04:09:48 -04:00
William Hua
16e36e5399 mir: set placement for menu-type windows 2017-03-13 03:52:14 -04:00
William Hua
f0e3781566 mir: synthesize resize events 2017-03-13 03:52:11 -04:00
William Hua
91f4b0c31f mir: ignore resize events 2017-03-13 03:52:09 -04:00
William Hua
05a060c6a6 mir: try mir before x11 2017-03-13 03:52:06 -04:00
Dušan Kazik
b8d88eb960 Update Slovak translation 2017-03-12 10:15:33 +00:00
Dušan Kazik
52a4f73bc6 Update Slovak translation 2017-03-12 10:02:48 +00:00
Andika Triwidada
8bf40ebb88 Update Indonesian translation 2017-03-11 08:59:12 +00:00
Andika Triwidada
ad50af4011 Update Indonesian translation 2017-03-11 07:49:44 +00:00
Marek Černocký
dc05a8e7fb Updated Czech translation 2017-03-11 02:12:00 +01:00
Matthias Clasen
6a02bd4fa9 quartz: Fix another typo 2017-03-10 07:27:12 -05:00
Matthias Clasen
9caa50ca0d quartz: Fix the build
A ; was left out inadvertently.
2017-03-10 07:10:26 -05:00
William Hua
b4df881542 mir: log additional event types 2017-03-10 00:30:38 -05:00
TingPing
e387f807e4 Improve GContentType usage
Convert to content type where needed.
Should fix various issues on Windows and OS X.

https://bugzilla.gnome.org/show_bug.cgi?id=734946
2017-03-08 23:08:56 -05:00
Andika Triwidada
504321019e Update Indonesian translation 2017-03-09 03:57:10 +00:00
Andika Triwidada
4a8ad03e10 Update Indonesian translation 2017-03-09 03:56:48 +00:00
GNOME Translation Robot
112437f5ad Update Scottish Gaelic translation 2017-03-07 12:17:26 +00:00
GNOME Translation Robot
2fdcdfa403 Update Scottish Gaelic translation 2017-03-07 12:11:43 +00:00
Philip Withnall
c00448f7c6 tests: Fix use of C99 inline declaration
We don’t claim to use them yet, even if we perhaps should.
2017-03-07 09:48:44 +00:00
Daniel Boles
5bdc85d34e testheightforwidth: cleanups 2017-03-07 09:17:29 +00:00
Daniel Boles
5f24d87a5b testframe: Don’t unnecessarily query the padding
The [hv]padding variables control and hence track this.
Also, simplify the CSS using shorthand 2-value notation (again).
2017-03-07 01:32:24 +00:00
Daniel Boles
ec30a03153 testframe: Actually set the padding
The CSS was targeting node GtkFrame, which is wrong: it is called frame.

This commit also assumes the interesting padding is that between the
border and the child widget, not the padding around the entire Frame.
Some additional hoops must be jumped through to preserve padding values
not being changed in either callback. However, the way this is done
means I must set the initial paddings to 0, which simplifies main().
2017-03-07 01:04:34 +00:00
Daniel Boles
685493075f testframe: Add CheckButton to toggle border off/on
We should test this.
2017-03-07 01:04:34 +00:00
Daniel Boles
39d5f22774 testframe: Order controls better & improve labels
The :label-widget is drawn before the child, so put the controls that
set the alignment of the :label-widget before those that pad the child.

We set (horizontal|vertical) padding, not "[xy]thickness". Also change
to "label [xy]align" & use grid spacing, not spaces at end of Labels.
2017-03-07 01:04:34 +00:00
Daniel Boles
9f1916f29e testframe: Minimise typecasts 2017-03-07 01:02:08 +00:00
Daniel Boles
5059348d9f testframe: Set value before connecting callbacks
The value comes from the widget, and we were setting this after
connecting the callback, which applies the value to the widget…
2017-03-07 01:02:08 +00:00
Daniel Boles
4bec5432ce testframe: Use a generic widget pointer 2017-03-07 01:02:08 +00:00
Daniel Boles
0349574b47 testheightforwidth: Add missing unref 2017-03-06 20:57:17 +00:00
Daniel Boles
77f01c374b testheightforwidth: Remove deprecations & clean up
cherry-pick of master commit bf0ea7b7bc
2017-03-06 20:50:33 +00:00
William Hua
e63d4111a4 mir: don't create GDK_INPUT_ONLY windows 2017-03-06 13:12:22 -05:00
Jakub Steiner
41d3f99e44 Adwaita: border for selmode checkboxes
- there was an extra border for selection mode
2017-03-06 15:35:14 +01:00
Daniel Boles
629c931f1f Frame: Fix another piece of .flat documentation 2017-03-06 07:19:30 +00:00
Matthias Clasen
7160e3a12f Quartz: Implement gdk_window_set_functions
This is useful, and easy to implement.
2017-03-05 22:53:03 -05:00
Daniel Boles
31832f8648 Revert move of .flat from frame > border to frame
Changing code to agree with docs, which said frame.flat, was backwards.
Mea culpa. Theme authors ran with the actual behaviour, not the docs. As
stability is more important, let’s go back to frame > border.flat, and
fix the docs to reflect what the code does and how to set .flat in code.

N.B. This retains the change in HighContrast of "frame border" to "frame
> border". Not using the direct child selector contradicted Adwaita &
could conceivably have unwanted results on nested nodes named border.

https://bugzilla.gnome.org/show_bug.cgi?id=778905
2017-03-05 18:23:43 +00:00
Inaki Larranaga Murgoitio
06cf2c84a4 Update Basque language 2017-03-04 17:43:00 +01:00
Changwoo Ryu
e4bbb5bb0b Update Korean translation 2017-03-03 17:01:12 +00:00
Changwoo Ryu
d65851f7db Update Korean translation 2017-03-03 17:00:52 +00:00
Inaki Larranaga Murgoitio
7dcb94579a Update Basque language 2017-03-03 12:58:52 +01:00
Inaki Larranaga Murgoitio
de9a399eaa Update Basque language 2017-03-03 12:57:34 +01:00
Inaki Larranaga Murgoitio
a6432cc6d0 Update Basque language 2017-03-03 12:50:41 +01:00
Inaki Larranaga Murgoitio
ff779af97f Update Basque language 2017-03-03 12:47:55 +01:00
Chun-wei Fan
76d7c0bbed build/Makefile.msvcproj: Remove MSVC 2017 projects before re-generation
This ensures a fresh version from the 2010 projects are copied and
processed.
2017-03-03 17:35:28 +08:00
Daniel Boles
02b5886975 themes: Actually fix the frame.flat style class
by changing the source scss, not just the generated css files.

Thanks to Christoph Reiter for pointing this out!
2017-03-03 08:44:30 +00:00
Daniel Boles
0bada2506e HighContrast/parse-sass.sh: Use a reliable shebang
/usr/bin/sh does not exist on e.g. Debian sid.
Use the same shebang as Adwaita/parse-sass.sh
2017-03-03 08:42:34 +00:00
Daniel Boles
17da1e9f35 Adwaita: :insensitive is deprecated; use :disabled 2017-03-02 18:59:25 +00:00
Daniel Boles
d6166921a8 Adwaita: Restore documented behaviour of .flat
This was changed in commit 0c20604932
but got clobbered by commit 8817c1ad6d
2017-03-02 18:45:37 +00:00
Timm Bäder
f7479bf369 placesview: Simplify button construction 2017-03-02 18:16:58 +00:00
Timm Bäder
1880cf48ad placessidebar: Fix css node name typo 2017-03-02 18:16:58 +00:00
Timm Bäder
e44e7ba0df widgetnode: Remove unused define 2017-03-02 18:16:58 +00:00
Timm Bäder
ec8192420e cssnodestylecache: Use const pointer in lookup 2017-03-02 18:16:58 +00:00
Carlos Garnacho
4b38a39c9d gtk-demo: Add 3fg touchpad swipe handling to gestures demo
We can handle those on wayland, so we should show it's possible.
2017-03-02 18:21:36 +01:00
Carlos Garnacho
76af1904db gtkgesturesingle: Fallback to GtkGesture handling on GDK_TOUCHPAD_SWIPE
There are GtkGestureSingle subclasses that can be made to handle multiple
fingers (GtkGestureSingle is a subclass of GtkGesture, and not the
opposite, after all). And GtkGestureSwipe already tries to handle
GDK_TOUCHPAD_SWIPE events, except this event handler silently ignores
those.

Falling back to the GtkGesture generic handler which already
handles touchpad gesture events fixes this.
2017-03-02 18:21:36 +01:00
Matthias Clasen
cf1e2b9042 Convince OS X to fully fullscreen windows
We typically want to have the full screen given to
the content, not the aspect-ratio preserving behavior
that newer OS X has.

https://bugzilla.gnome.org/show_bug.cgi?id=779383
2017-03-02 08:12:37 -05:00
Sveinn í Felli
36e1761c84 Update Icelandic translation 2017-03-02 12:59:38 +00:00
Ask Hjorth Larsen
313ae3ad01 Updated Danish translation 2017-03-02 13:23:27 +01:00
Ask Hjorth Larsen
ecdd353266 Updated Danish translation 2017-03-02 13:21:24 +01:00
Sveinn í Felli
fb53855fc8 Update Icelandic translation 2017-03-02 11:54:46 +00:00
Jakub Steiner
fc81dc17d4 Adwaita: style selectionmode checks for flowbox tiles
- continue being asset based rather than drawn by CSS
- using node 'check' rather than style '.check'

https://bugzilla.gnome.org/show_bug.cgi?id=779074
2017-03-02 12:39:02 +01:00
Jakub Steiner
8817c1ad6d Adwaita: style flowbox tiles
https://bugzilla.gnome.org/show_bug.cgi?id=779073
2017-03-02 12:29:20 +01:00
William Hua
6f3d1e1046 mir: deprecate gdk_mir_window_get_mir_surface () 2017-03-01 15:31:54 -05:00
William Hua
45d33b063f mir: delete commented debug output 2017-03-01 15:31:52 -05:00
William Hua
7949069b9d mir: migrate away from deprecated mir api 2017-03-01 15:31:41 -05:00
William Hua
a497938358 mir: move #include to correct file 2017-03-01 15:31:32 -05:00
Matthias Clasen
953abc19da Implement backdrop for Quartz
We need to send window state change events to make GTK+
pick up on focus changed for backdrop.

https://bugzilla.gnome.org/show_bug.cgi?id=779392
2017-03-01 11:49:42 -05:00
Matthias Clasen
60e7e15f54 quartz: Let CSD windows be fullscreen
I've found that I need this patch to make it possible for
windows with headerbar to be made fullscreen on OS X.

https://bugzilla.gnome.org/show_bug.cgi?id=779383
2017-03-01 11:49:31 -05:00
Olivier Fourdan
aebe3a74ec wayland: make sure to clear up the number of keys
Make sure to clear up the number of keys being pressed on enter/leave so
that we don't end up with leftovers if a new window is mapped by a
keyboard shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=779374
2017-03-01 16:09:40 +01:00
cedlemo
75e98fd252 Fix bad check of GtkActionPadType in gtk_pad_controller_set_action
https://bugzilla.gnome.org/show_bug.cgi?id=779317
2017-03-01 12:56:45 +01:00
Matthias Clasen
c391417838 3.22.9 2017-02-27 17:57:11 -05:00
Daniel Boles
ce1b2bef2b Range: Remove leftover comment about update policy
Update policies were removed way back in 2011… in
commit c43a31ea33
2017-02-27 20:04:51 +00:00
Daniel Mustieles
20ee36f9e0 Updated Spanish translation 2017-02-27 18:51:24 +01:00
Daniel Mustieles
bd4f861727 Updated Spanish translation 2017-02-27 18:50:54 +01:00
Balázs Meskó
a9c70c4fe6 Update Hungarian translation 2017-02-27 14:19:41 +00:00
Olivier Fourdan
4146d7f3cc wayland: do not cancel key repeat on key press
The key repeat is stopped as soon as a key is pressed, so if the user
quickly presses a key while another is already pressed and being
repeated, key repeat gets cancelled:

 - key1 press
 - key1 repeat
 - key2 press -> key1 repeat stopped
 - key1 release
 - key 2 is not repeated even though it's kept depressed

This is a different behavior from X11, which confuses migrating users.

To mimic the X11 behavior, keep track of the number of keys pressed
simultaneously and cancel key repeat only when none is pressed.

This way, if a user pressed a key while another one is being repeated,
the new key press can possibly be repeated as well.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=778019
2017-02-27 10:14:49 +01:00
Chao-Hsiung Liao
7c09153d20 Update Chinese (Taiwan) translation 2017-02-27 00:02:49 +00:00
Chao-Hsiung Liao
e2666ba96d Update Chinese (Taiwan) translation 2017-02-26 23:59:54 +00:00
Fran Dieguez
c676d4268e Update Galician translation 2017-02-26 21:45:21 +00:00
Fran Dieguez
6259794709 Update Galician translation 2017-02-26 21:42:22 +00:00
Мирослав Николић
a6c925e836 Updated Serbian translation 2017-02-26 15:33:37 +01:00
Christian Kirbach
8d3102e1a9 Update German translation 2017-02-25 19:51:35 +00:00
Aurimas Černius
375a68fc6b Updated Lithuanian translation 2017-02-25 18:21:42 +02:00
Milo Casagrande
29f2da5587 Update Italian translation 2017-02-24 13:16:16 +00:00
Olivier Fourdan
68188fc948 wayland: Fix a race condition with xdg_popup resize
When resizing an xdg_popup immediately after the initial mapping, there
is a race condition between the client and the compositor which is
processing the initial size given by the xdg_positioner, leading to the
xdg_popup to be eventually of the wrong size.

Only way to make sure the size is correct in that case is to hide and
show the window again. Considering this occurs before the initial
configure is processed, it should not be noticeable.

https://bugzilla.gnome.org/show_bug.cgi?id=772505
2017-02-24 10:03:50 +01:00
Daniel Boles
c3a2e0035c Revert "Inspector: Use Title Case for labels & menu items"
This reverts commit 85f2c5f830.

I absent-mindedly forgot the string freeze; sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=779147
2017-02-23 19:22:39 +00:00
Daniel Boles
85f2c5f830 Inspector: Use Title Case for labels & menu items
https://developer.gnome.org/hig/stable/writing-style.html.en

https://bugzilla.gnome.org/show_bug.cgi?id=779147
2017-02-23 19:15:03 +00:00
Daniel Boles
06f7728631 ComboBox: rm pointless var in get_popup_accessible 2017-02-23 18:47:19 +00:00
Olivier Fourdan
e5b6375914 gdkwindow: subsurface in gdk_window_get_effective_parent()
When the GtkWidget hierarchy does not match the GdkWindow hierarchy, the
GtkWidget code may find a common ancestor that cannot be found while
traversing the GdkWindow tree using gdk_window_get_effective_parent().

This happens with for example on Wayland, a GtkPopover has another
GtkPopover as parent, in this case, the GdkWindow parent is the root
window, whereas the GtkWidget parent is the other GtkPopover.

That confuses the gtk_widget_translate_coordinates() logic which will
bail out in this case and won't return the translated coordinates.

Make gdk_window_get_effective_parent() aware of subsurfaces and use the
transient_for which represents the actual parent (whereas the parent
might be pointing to the root window).

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=774148
2017-02-23 14:10:56 +01:00
Daniel Boles
03429df872 TextView—Avoid pointless Pango in iter_line_is_rtl
Get the direction that was already worked out and stored in the
TextLineDisplay, rather than making Pango figure it out again.

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-22 21:29:16 +00:00
Daniel Boles
00b8b18795 TextView—Plug a memory leak
Thanks to Nelson Benitez for pointing this out.

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-22 21:29:16 +00:00
Daniel Boles
188929e2ea Revert "testsuite/scrolledwindow—Test non-overlay/non-auto"
This reverts commit fbd876fe93.

Reverting until I can be sure gtkscrolledwindow.c does the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-22 19:32:32 +00:00
Daniel Boles
555847d44f Revert "ScrolledWindow—Don’t req size for auto-hidden bars"
This reverts commit 367e021652.

This causes criticals in e.g. the Text View: Multiple Buffers demo.
More work is required to get a fix for Bug 778853 that does not cause
anything else to regress.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-22 19:16:33 +00:00
Daniel Boles
4e61aaa0a4 Scale: Fix erroneously removed : in a signal doc 2017-02-22 08:53:05 +00:00
Daniel Boles
13f781d99d Frame—Note set_label always destroys :label-widget
The fact that it doesn’t reuse the existing GtkLabel if present is not
immediately obvious to users (or is it just me?), so clarify that the
pre-existing :label-widget, if any, is always removed and replaced.
2017-02-21 21:21:25 +00:00
Daniel Boles
42108a82c7 Frame—Clarify relationship of :shadow-type & .flat 2017-02-21 21:13:43 +00:00
Florian Müllner
2e4fb45435 GtkFrame: Fix shadow after theme changes
Commit 0c20604932 changed the theme to expect the .flat class on
the frame node rather than the border one, but didn't update the
code that applies the style according to the :shadow-type property.

https://bugzilla.gnome.org/show_bug.cgi?id=779005
2017-02-21 13:03:39 +00:00
Rafael Fontenelle
f3b3acfe53 Update Brazilian Portuguese translation 2017-02-21 10:21:52 +00:00
Anders Jonsson
4f7e9bf25f Update Swedish translation 2017-02-19 18:11:34 +00:00
Piotr Drąg
22ca110a60 Update Polish translation 2017-02-19 18:26:19 +01:00
Daniel Boles
cc0e6eb374 Frame: Explain the .flat style class 2017-02-19 17:17:41 +00:00
Daniel Boles
fbd876fe93 testsuite/scrolledwindow—Test non-overlay/non-auto
It was only testing the default configuration where overlay-scrolling is
TRUE and the policy is POLICY_AUTOMATIC. We should also test FALSE and
POLICY_ALWAYS. This commit adds those tests and makes the !overlay &&
POLICY_ALWAYS case pass by excluding the size of the relevant scrollbar,
as we are only interested in whether the content size is as requested.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-19 12:48:22 +00:00
Daniel Boles
367e021652 ScrolledWindow—Don’t req size for auto-hidden bars
POLICY_AUTOMATIC means scrollbars are only shown when needed, i.e. when
the size of the window is not large enough to show the entire child. So
when measuring the preferred size, such scrollbars should be ignored.

But measure() was adding size for bars for which policy_may_be_visible()
was TRUE, which it returns for POLICY_ALWAYS (good) & _AUTOMATIC (bad).
So we reserved space for child plus scrollbars, & because we have enough
space for the child, POLICY_AUTOMATIC hides the scrollbar, leaving the
extra reserved space empty at the right/bottom sides of the child. This
is very noticeable/inconvenient for non-overlay, automatic scrollbars.

Fix this by only requesting size for scrollbars that use POLICY_ALWAYS,
rather than basing the decision on policy_may_be_visible().

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-19 12:48:22 +00:00
Daniel Boles
3e5d5f8899 TextView—Fix inverted movements by arrows in RTL
Using Ctrl + left/right to skip between words, or left/right to cancel a
selection, were causing movement on the screen in the opposite direction
of the glyph on the key. This was surprising and awful UX for RTL users.

This is based on a patch covering the former case by:
Author:    Mehdi Sadeghi <mehdi@mehdix.org>
Date:      Sat Feb 18 02:16:00 2017 +0000

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:38:54 +00:00
Daniel Boles
393e7aacc6 Entry: Add newlines to ease reading huge switches
These are monstrosities!
2017-02-19 12:38:54 +00:00
Daniel Boles
a3d70b4ab2 Entry—Fix inverted movements by arrow keys in RTL
Using Ctrl + left/right to skip between words, or left/right to cancel a
selection, were causing movement on the screen in the opposite direction
of the glyph on the key. This was surprising and awful UX for RTL users.

This is based on a patch covering the former case by:
Author:    Ori Avtalion <ori@avtalion.name>
Date:      Tue Apr 20 08:06:23 2010 +0000

https://bugzilla.gnome.org/show_bug.cgi?id=136059
2017-02-19 12:38:53 +00:00
Daniel Boles
0c20604932 themes: Actually apply the frame.flat style class
The docs say that this class should be put on the frame node, and that’s
all we can do from C code, but the CSS was selecting on the border node.
The result was that adding .flat did not disable the border as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=778905
2017-02-19 12:22:48 +00:00
Daniel Boles
563063d66b Scale: Fix signal documentation syntax
Oops, sorry. Thanks to Cristoph Reiter for correcting me on this.
2017-02-19 10:13:34 +00:00
Daniel Boles
0478bfd37b Scale: Improve docs of format-value property 2017-02-19 09:12:17 +00:00
Daniel Boles
b3b2f6b5d4 Scale: Improve docs of prop digits in other places
There were places still implying that it was only used for display.
2017-02-19 09:04:17 +00:00
Daniel Boles
ee6c514406 Scale: consistent #Class:signal-or-property syntax
Use : everywhere, not a mixture of : and ::
2017-02-19 09:04:17 +00:00
Руслан Ижбулатов
f9df0fc94c GDK W32: Handle drivers that do not send WT_CSRCHANGE after WT_PROXIMITY
Some drivers don't do that (not sure whether that is the correct behaviour
or not). Remember each WT_PROXIMITY with LOWORD(lParam) != 0 that we get,
then look for a WT_CSRCHANGE. If WT_CSRCHANGE doesn't come, but a WT_PACKET
does, assume that this device is the one that sent WT_PROXIMITY.

Also include fallback code to ensure that WT_PACKETs for an enabled device
disable the system pointer, because WT_PROXIMITY handler might have
enabled it by mistake, since it's not possible to know which device left
the proximity (it might have been a disabled device).

https://bugzilla.gnome.org/show_bug.cgi?id=778328
2017-02-19 07:12:13 +00:00
Руслан Ижбулатов
1d0fad3d70 GDK W32: Apply HiDPI scale properly to monitors
Previously HiDPI scale was retrieved and applied too late in the initialization
process to affect monitor size and monitor workarea size, but the code that
initializes these sizes *did* try to use the scale, even though it was always
getting scale=1.

To fix this, move the too-late code into monitor enumeration routine.
This also fixes a probable semantic bug where width and height were divided
by scale, again.

Now monitor and workarea should be in application pixels (i.e. divided by scale),
as intended.

https://bugzilla.gnome.org/show_bug.cgi?id=778835
2017-02-19 07:00:17 +00:00
Daniel Boles
11f81e77f9 CssSelector: Fix warning for bad pseudo-class name
It was "Missing name of pseudo-class", but the real problem is exactly
the opposite: we /have/ been given a name, but it is not a valid one.
Change it to "Invalid name of pseudo-class" to minimise confusion.
2017-02-18 21:03:47 +00:00
Daniel Boles
a6ba8df4b7 testsuite/gtk/textiter: Add missing assertion
gboolean ret for whether gtk_text_iter_backward_line() moved the iter
was declared but not used anywhere. I presume it was meant to be
checked, and it passes now, so let’s do it.
2017-02-18 20:18:05 +00:00
Nelson Benítez León
c4874aeaa5 textiter: fix bug in gtk_text_iter_backward_line()
gtk_text_iter_backward_line() checks the value of
real->line_char_offset without previously calling
ensure_char_offsets (real) to make sure the former
is up-to-date.

As a consequence of this, when gtk_text_iter_backward_line()
is called after a gtk_text_buffer_insert_range() in the
first line of buffer, the iter is not moved to the start of
the line, and the return value is wrong.

Fixed by adding the ensure_char_offsets() call.

A test case for this bug is added to the textiter gtk testsuite.
2017-02-18 20:00:32 +00:00
Daniel Boles
6cdeac1c6a Image—Add some more missing (nullable) annotations 2017-02-17 22:13:48 +00:00
Timm Bäder
a729eeab0a filechooserentry: Avoid an uninitialized value
|= with a garbage value on the left side results in a still-garbage
value.
2017-02-17 21:46:51 +00:00
Timm Bäder
42d8b70b0e filechooserwidget: Fix profiling code compilation 2017-02-17 21:46:51 +00:00
Timm Bäder
8aa9fb38a3 Add a few missing (nullable) annotations 2017-02-17 21:46:51 +00:00
Timm Bäder
98c04230c3 builder: avoid an uninitialized value
When g_module_supported() returns FALSE, args.module is garbage
otherwise.
2017-02-17 21:46:51 +00:00
Timm Bäder
26cab782cd filechooserwidget: Fix rename popover position calculation
Since the browse_file_popover is positioned correctly, just convert the
coordinates in the same way we do there.

https://bugzilla.gnome.org/show_bug.cgi?id=778746
2017-02-17 21:46:51 +00:00
Carlos Garnacho
d825c34ca3 gdk: Ensure GdkDragContext instantly updates drag window position
Otherwise we wait for the next gdk_drag_motion() call, which will
happen on the next motion event, making the drag window briefly visible
on the 0,0 root coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=778203
2017-02-17 19:30:46 +01:00
Daniel Boles
fdc79c804a docs/css-properties: Fix info on 3value properties
https://developer.mozilla.org/en/docs/Web/CSS/margin#Values
2017-02-17 15:18:16 +00:00
Chun-wei Fan
c6f0df26f6 Visual Studio builds: Support Visual Studio 2017
Update the autotools scripts so that we can support Visual Studio 2017
by copying the 2010 projects and updating items as needed to obtain
the 2017 projects.

Note that since the toolset version string changed for Visual Studio
2017, so allow the use of a custom toolset version string, otherwise
just generate the toolset version string as we did before.

Also, note that Visual Studio 2017 aims to be compatible with 2015
on the CRT level, so there should not be any problems using 2017-compiled
binaries with 2015-compiled ones.
2017-02-17 15:09:16 +08:00
Bastien Nocera
eca35180f9 docs: Advise to use gtk_show_uri_on_window()
Instead of gtk_show_uri() which is now deprecated, and mention an
additional benefit of doing so.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:35:29 +01:00
Emmanuele Bassi
d93dd81e65 Use gtk_show_uri_on_window() in GtkLabel
Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
72ac208052 GtkMountOperation: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
e4fbfde07b gtk: Ignore gtk_show_uri() deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
da0291950d GtkLinkButton: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
f2febf7c71 GtkAboutDialog: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Bastien Nocera
c495ffb1ba docs: Fix reference to non-existent gtk_show_uri_on_parent()
It's called gtk_show_uri_on_window().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:33:44 +01:00
Lionel Landwerlin
977b26dcf5 widget: propagate scale factor upon reparenting a widget
When a widget is created, its default scale is the scale of the
primary screen (for instance 2). But once parented to another widget
its scale factor should be the one of its parent (if parented to a
widget on a screen at scale factor 1, it should be 1).

The problem is that we don't emit the notify::scale-factor signal when
reparenting happens.

https://bugzilla.gnome.org/show_bug.cgi?id=776821
2017-02-16 12:31:57 +00:00
Daniel Boles
f8af23553b widget: Document signal mnemonic-activate
Name the extra bool argument, and move the explanatory paragraph from
the emitting method to the signal, with some minor tweaks to wording.

https://bugzilla.gnome.org/show_bug.cgi?id=778534
2017-02-15 21:45:01 +00:00
Bastien Nocera
104c9ac845 gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
gtk_show_uri_on_window() will pass enough information for Portal helpers
to allow dialogue parenting in Flatpak, gtk_show_uri() won't, so
deprecate it.

https://bugzilla.gnome.org/show_bug.cgi?id=778678
2017-02-15 16:23:48 +01:00
Tong Hui
9589505e19 Update zh_CN translation 2017-02-15 20:11:27 +08:00
Matthias Clasen
dad4aecfc0 3.22.8 2017-02-13 13:28:00 -05:00
Руслан Ижбулатов
dca4f1e715 GDK W32: Different maximized window position for non-CSD windows
It seems that WM interprets the same MINMAXINFO contents differently
depending on which styles the window has. Play along.

https://bugzilla.gnome.org/show_bug.cgi?id=765161
2017-02-10 18:21:13 +00:00
Lapo Calamandrei
8f01d6c5f4 HC: insensitive styling for views. 2017-02-08 16:53:10 +01:00
Lapo Calamandrei
efde7d15aa adwaita: insensitive styling for views
Add an insensitive style to views, somehow we didn't ship one, so
for example, disabled textviews looked the same as sensitive ones.
2017-02-08 16:45:51 +01:00
Olivier Fourdan
7ec16c5c53 wayland: do not clamp anchor values
Clamping the anchor values as introduced in commit 9a5ffcd to fix bug
777176 breaks menu positioning.

By keeping the anchors rectangle size greater than zero, we end up
deducting some positive value from the original position, so there is no
need to clamp() actually, keeping the values positive is enough and
avoids the issue with menu positioning on the menubar.

An additional benefit is to make the code a lot simpler.

https://bugzilla.gnome.org/show_bug.cgi?id=778009
2017-02-06 09:19:26 +01:00
Philip Chimento
e338b4589d quartz: Implement gtk_clipboard_get_selection
This function is trivial and can be copied from the X11 implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=772281
2017-02-05 14:54:37 -08:00
Chris Martin
eaf9fc60bf getting-started: typo tie->the
https://bugzilla.gnome.org/show_bug.cgi?id=775864
2017-02-05 20:01:41 +00:00
Michael Catanzaro
644c2d9617 notebook: redraw arrows after closing a tab
Thanks to Daniel Boles for helping with a crash in an earlier version of
this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-02-04 12:54:12 -06:00
Sveinn í Felli
494d8f36aa Update Icelandic translation 2017-02-04 15:32:13 +00:00
Matthias Clasen
09b2c54d41 range: Add a queue_resize call
This is a workaround for a regression in updating scrollbars in
some applications; notably eog. We haven't fully tracked down yet
why a queue_allocation is not sufficient here, it should.

https://bugzilla.gnome.org/show_bug.cgi?id=765410
2017-02-01 21:16:29 +01:00
Daniel Boles
43de771574 searchentry: Fix typo in documentation 2017-01-31 09:47:42 +00:00
William Hua
d9947b671a mir: handle surface placement events
This allows the Mir backend to properly emit "moved-to-rect."
2017-01-30 03:40:18 -05:00
William Hua
14c8e25cb2 mir: use mir_surface_spec_set_placement for menus
This API was added to Mir for GTK menus, combo boxes, etc.
2017-01-30 03:23:50 -05:00
Michael Catanzaro
3708e5cc7c Revert "notebook: redraw arrows after closing a tab"
This reverts commit 8caaba82cc.
2017-01-27 08:53:54 -06:00
Carlos Garnacho
baa83e9753 wayland: Ensure to set gtk_surface dbus properties after hide()
Currently hiding destroys the wl_surface and all related interfaces,
(including the gtk_surface1) so the next time the GdkWindow is mapped,
we don't bother to set the DBus properties. Toggle the check off so
it's actually issued again after the GdkWindow gets a gtk_surface1.

https://bugzilla.gnome.org/show_bug.cgi?id=773686
2017-01-25 18:01:26 +01:00
Michael Catanzaro
8caaba82cc notebook: redraw arrows after closing a tab
https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-01-24 08:32:53 -06:00
William Hua
5d7db3246e mir: use modal window hint 2017-01-23 10:58:09 -05:00
William Hua
a95feb4984 mir: fix compile-time warnings 2017-01-22 11:14:34 -05:00
Daniel Boles
aff42686ce combobox: Fix documentation typo bx => box 2017-01-21 16:11:54 +00:00
Daniel Boles
167ef42c5c menushell: Don’t dereference before typechecking 2017-01-20 22:18:40 +00:00
Daniel Boles
f705d0a5fa combobox: If typechecking, don’t reference before 2017-01-20 21:07:26 +00:00
Daniel Boles
7401794de6 combobox: popdown() the menu during unmap()
combo_box_popdown() of course doesn’t popdown our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.
2017-01-20 13:47:33 +00:00
Руслан Ижбулатов
4a5cd127ff GDK W32: Ensure that we use made-up monitors when there are none
Previously GDK only made up monitors when it initially found none. Now it
also makes up monitors when it initially finds some, but later fails to get
their informatin in a normal way and finally prunes them out, being left with
zero monitors.

Having zero-length monitor array is unexpected and causes a number
of critical warnings and some critical functionality (such as displaying
drop-down menus) fails in such cases.

Ideally, there might be such a way to interrogate W32 API that produces the
information about non-real (but active) monitors out of it so that it isn't
necessary for us to make stuff up. However, this code is already complicated,
and i am not prepared to dig W32 API to find a way to do this.

This fixes the issues people had when they accessed a Windows desktop via RDP.

https://bugzilla.gnome.org/show_bug.cgi?id=777527
2017-01-20 12:45:57 +00:00
Mandy Wang
e831bb6ce7 update zh_CN translation 2017-01-20 20:37:01 +08:00
Chun-wei Fan
1063460db2 demos: Fix build
Include gtk/fallback-c89.c so that we can ensure that we have round(), and
that file already includes math.h
2017-01-20 18:17:33 +08:00
Руслан Ижбулатов
a7ff95ce73 GDK W32: Fix idiotic gdk_win32_display_get_monitor() implementation
Replace the code borrowed from the X11 backend with the code borrowed from Wayland backend. Now GTK doesn't crash when the number of monitors is zero.
2017-01-20 09:08:41 +00:00
Carlos Garnacho
bbcc3ee456 Revert "wayland: Push NULL buffer when hiding a GdkWindow"
This reverts commit 0f2e19c010.
2017-01-19 21:21:57 +01:00
David King
bd3d7b8a9a docs: Add gtk_print_job_set_source_fd() 2017-01-19 18:06:38 +00:00
Carlos Garnacho
0f2e19c010 wayland: Push NULL buffer when hiding a GdkWindow
This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.

Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.

https://bugzilla.gnome.org/show_bug.cgi?id=773686
2017-01-19 16:18:22 +01:00
Daniel Boles
eb26b57cba combobox: Avoid a pointless assignment
Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.
2017-01-19 03:26:09 +00:00
Daniel Boles
b7cfe3c778 combobox: Also preselect active item in grid popup
i.e. when wrap-width > 0. This was only being done for non-grid cases.
So, ComboBoxes in grid mode did not indicate their selection when popped
up and required users to keynav from ‘nothing’ (at the top-left) to the
item they wanted to select. By selecting the active item in advance, now
it’s highlighted & acts as the starting point for keynav around the grid
2017-01-19 03:12:32 +00:00
Daniel Boles
a58dd993b2 scale: Really fix documentation of set_digits()
This previously only mentioned its effect on the displayed value, and
even after the previous commit, its rounding of the actual value upon
change still reads like too much of an afterthought. Worse, it wasn’t
mentioned at all in the doc for the @digits parameter. Change this to
emphasise rounding always occurs and the displayed value is secondary.
2017-01-19 00:44:35 +00:00
Daniel Boles
8377850127 scale: doc: set_digits doesn’t round retroactively
Whether it should is an open question, but for now, the documentation
should clearly indicate that currently rounding is only applied upon
changes to the value, not to the existing value when ::digits changes.
This is already clear in the doc for the underlying Range::round-digits.

https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-01-19 00:17:40 +00:00
Daniel Boles
4a6bd134bd Scale: Always sync ::digits to Range::round-digits
The documents state that gtk_scale_set_digits() “causes the value of the
adjustment to be rounded off to this number of digits, so the retrieved
value matches the value the user saw.” Note the lack of any condition.

But in fact, if draw-value was false, rounding was disabled on the base
Range, so values that weren’t displayed weren’t rounded. This made the
docs wrong and made an apparently cosmetic detail alter functionality.

Fix by ensuring the number of digits set on Scale is always propagated
along to gtk_range_set_round_digits(), thus rounding to it in all cases
when the value changes, regardless of whether the value is displayed.

This doesn’t address the other idea from Bugzilla: that changing the
number of digits should clamp the _existing_ value if it’s more precise.
This contradicts digits docs in the base Range, but the above from Scale
can be read as implying it’ll happen. For now, that’s an open question.

https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-01-19 00:17:40 +00:00
Daniel Boles
ccba2eaace Remove executable bit from C source files in tests 2017-01-19 00:17:40 +00:00
Daniel Boles
e98e6f73be combobox: Work around popup handler altering model
GtkFileChooserButton installs a handler for the popped-up signal, which
refilters the menu, in order to hide the “(None)” item from the popup
if it was previously selected in the ComboBox. This oddity means that:

 • Until recently, this item would be selected in the menu shell, which
   would then be popped up and change the selection away from that item.
   This was therefore redundant (more on which below!) but benign.

 • After the patch for https://bugzilla.gnome.org/show_bug.cgi?id=771242
   however, this causes a critical assertion fail, as now we stash the
   originally selected item in a pointer so that it can be selected only
   after realisation/popup – but by that stage, the model has just been
   refiltered and the previous pointer no longer refers to a valid item.

This commit works around this problem by, after popping up the menu,
getting the active item again, in case a popped-up handler has gone and
invalidated the pointer to the active item that we saved before popup.

If a handler does this, everything done to find/use the original item is
pointless. But this avoids the ugly critical in FileChooserButton, while
not harming every other ComboBox that doesn’t mess with its model while
popping up (hopefully the vast majority), and it’s very difficult to
imagine a way to check if the active item is /going to/ be hidden later)
2017-01-18 22:22:52 +00:00
Daniel Boles
dfe89a381f combobox: Don’t select active item if it’s hidden
I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.
2017-01-18 22:17:37 +00:00
Daniel Boles
ac4e1625f5 combobox: Move variables into narrowest scopes 2017-01-18 21:43:42 +00:00
Matthias Clasen
31fee675e4 Revert "filechooser portal: Make sure we can save"
This reverts commit 4875c689a0.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.
2017-01-17 14:15:39 -05:00
Matthias Clasen
f4a0f2e5ca filechooser portal: Make sure we can save
Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.
2017-01-17 14:10:50 -05:00
Rui Matos
4f80d234bf gdk/wayland: Always get the seat's key modifiers from the GdkKeymap
Elsewhere we already go through the keymap to get modifiers so we
should do the same here. In fact, this was relying on xkb modifier
mask values being bitwise compatible with GdkModifierType which isn't
necessarily true.

https://bugzilla.gnome.org/show_bug.cgi?id=770112
2017-01-17 18:12:54 +01:00
Rui Matos
33c10204e4 gdk/wayland: Don't add GDK_META_MASK to gdk mod masks if MOD1 is set
Gtk+ treats MOD1 as a synonym for Alt, and does not expect it to be
mapped around, so we should avoid adding GDK_META_MASK if MOD1 is
already included to avoid confusing gtk+ and applications that rely on
that behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=770112
2017-01-17 18:12:54 +01:00
William Hua
248ef2d6a0 mir: properly handle empty clipboard
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
41732391d8 mir: paste clipboard data from content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
5c4c3f1afd mir: copy clipboard data to content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
210d1279e5 mir: connect to content-hub
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
0acb58b40f mir: track focused window
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
William Hua
b6baa088dc mir: implement window properties
https://bugzilla.gnome.org/show_bug.cgi?id=775732
2017-01-16 17:11:16 -05:00
Matthias Clasen
a22e80122e 3.22.7 2017-01-16 14:10:47 -05:00
Olivier Fourdan
9a5ffcd1b5 wayland: avoid 0 width/height anchor rectangle
Passing a rectangle with zero width or height to xdg_shell-v6
set_anchor_rect() will cause a protocol error and terminate the client,
as with gedit when pressing the Win key.

Reason for this is because the rectangle used to set the anchor comes
from gtk_text_layout_get_iter_location() which uses the pango layout
width/height, which can be empty if there is not character at the given
location.

Make sure we don't use 0 as width or height as an anchor rectangle to
avoid the protocol error, and compensate the logical position of the
given rectangle if the size is changed, so that the actual position
remains as expected by the client.

https://bugzilla.gnome.org/show_bug.cgi?id=777176
2017-01-16 13:55:36 +01:00
Daniel Boles
afd19e9433 grid: Fix plural error in docs' @Short_description 2017-01-15 20:39:43 +00:00
Benjamin Otte
21a71e94c6 cssimage: Fallback images have no aspect ratio
The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.
2017-01-13 03:39:50 +01:00
Benjamin Otte
2e7d5c08cb cssimage: Scale images to contain, not cover
Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
2017-01-13 03:39:49 +01:00
Matthias Clasen
6da8cbc87e Deprecate gdk_window_process[_all]_updates
These functions should not be used anymore now that we have a
frame clock, and are gone in GTK+ 4
2017-01-10 20:25:15 -05:00
Rui Matos
99abc6363a gdk/wayland: Handle non-existant gsettings keys
Since we're a library, crashing on gsettings keys, whose presence is out
of our control, isn't appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:18:09 +01:00
Rui Matos
22b1e0b678 gdk/wayland: Add support for the gtk-enable-primary-paste gsetting
The gsetting was recently added so that we can have this configurable
on the wayland backend too.

https://bugzilla.gnome.org/show_bug.cgi?id=775846
2017-01-10 15:18:09 +01:00
Руслан Ижбулатов
eece8a7dd2 GDK W32: Use keyboard hook to detect AeroSnap combinations better
Windows WM handles AeroSnap for normal windows on keydown. We did this
on keyup only because we do not get a keydown message, even if Windows WM
does nothing with a combination. However, in some specific cases it DOES
do something - and we have no way to detect that. Specifically, winkey+downarrow
causes maximized window to be restored by WM, and GDK fails to detect that. Then
GDK gets a keyup message, figures that winkey+downarrow was pressed and released,
and handles the combination - by minimizing the window.

To overcome this, install a low-level keyboard hook (high-level ones have
the same problem as normal message loop - they don't get messages when
Windows WM handles combinations) and use it to detect interesting key combinations
before Windows WM has a chance to block them from being processed.

Once an interesting combination is detected, post a message to the window, which
will be handled in due order.

It should be noted that this code handles key repetitions in a very crude manner.

The downside is that AeroSnap will not work if hook installation function call fails.
Also, this is a global hook, and if the hook procedure does something wrong, bad things
can happen.

https://bugzilla.gnome.org/show_bug.cgi?id=776031
2017-01-10 12:54:43 +00:00
Руслан Ижбулатов
ca79296061 GDK W32: Handle CapsLock as part of the key shift level
Instead of using some kind of flawed logic about modifying a keypress result
when CapsLock is toggled, just add a CapsLock shift level (and all derived
shift levels, i.e. Shift+CapsLock and CapsLock+AltGr and Shift+CapsLock+AltGr)
and query Windows keyboard layout API about the result of keypresses involving
CapsLock.

Keysym table is going to be (roughly) twice as large now, but CapsLock'ed
keypresses will give correct results for some keyboard layouts (such as
Czech keyboard layout, which without this change produces lowercase letters
for CapsLock->[0,2,3,4...] instead of uppercase ones).

Keymap update time also increases accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=165385
2017-01-10 07:59:53 +00:00
Daniel Boles
cc4ea94d8b revealer: Fix a typo in a function doc
Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.
2017-01-09 22:46:21 +00:00
Carlos Garnacho
ab66c3d7bf wayland: Disable EGL swap interval
We have a frame clock that ensures rendering is done as per the
output vsync. There is no need to have Mesa do the same for us.

This, most notably, ensures Mesa doesn't schedule frame callbacks
that will be left unattended if the compositor stops throttling
frames for its surface, this is eg. the case if the toplevel is
moved to another workspace.

Also, given a SwapInterval!=0 will always bring these unexpected
side effects, check that it's possible to disable it, and spew
a debug message if that isn't the case.

https://bugzilla.gnome.org/show_bug.cgi?id=769835
2017-01-09 19:04:23 +01:00
Carlos Garnacho
eb57651ff7 gtkdnd: Remove unnecessary call
drag-data-delete is emitted based on the interchange of the
DELETE atom, which may well be set or bypassed locally by
the app. As such emitting it here is not right, the other
paths handling the DELETE atom interchange are still valid
and there.

https://bugzilla.gnome.org/show_bug.cgi?id=774726
2017-01-09 19:04:23 +01:00
Carlos Garnacho
c4f1545c5e wayland: Add fake mimetype for local DnD cases
If there are no targets, DnD is probably intended to be local,
add a mimetype for matching then. The wayland protocol requires
at least one wl_data_offer.target call with the mimetype selected
for transfer.
2017-01-09 19:04:23 +01:00
Руслан Ижбулатов
125ef3539c GDK W32: Special handling for VK_PAUSE
Similar to VK_DIVIDE, this key can't be mapped to a scancode by
MapVirtualKeyEx(). Googling suggests that this is a known bug.

https://bugzilla.gnome.org/show_bug.cgi?id=769214
2017-01-09 15:15:52 +00:00
Руслан Ижбулатов
3326fba524 GDK W32: Change WM_SYSMENU style switch logic
Instead of checking for window state and giving it extra styles that
fit, just give it all styles that it is missing. It turned out that
otherwise it is impossible to, for example, restore a maximized window
via sysmenu. Also, be more flexible towards GDK/WM window state mismatches
and consider the window minimized/maximized if *either* GDK or WM thinks so.

https://bugzilla.gnome.org/show_bug.cgi?id=776485
2017-01-09 14:17:32 +00:00
Руслан Ижбулатов
51645b5851 GDK W32: Remove unneeded assertion
Just set check_for_dpi_awareness = TRUE and eventually it will be handled
correctly, even if setDpiAwareFunc() returns E_ACCESSDENIED or shcore functions
are NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=777031
2017-01-09 10:00:22 +00:00
Matthias Clasen
074f391f10 Make GTK_DEBUG=interactive work better
We currently have various ways to initialize GTK+, and not
all of them were supporting this way of bringing up the
inspector. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=776807
2017-01-07 19:18:09 -05:00
Aurimas Černius
ea4af401d7 Updated Lithuanian translation 2017-01-07 14:53:31 +02:00
Benjamin Otte
8b118eb8b5 gtk-demo: Make icon counter work from ui file
Gets rid of update always being 1 frame late.
2017-01-07 03:44:25 +01:00
Benjamin Otte
dd406c8062 gtk-demo: Add GtkFishbowl
Avoids usage of GtkFixed where child properties eat up all the CPU time.
And that's kinda not what I want to benchmark.
2017-01-07 03:41:33 +01:00
Benjamin Otte
a7b0af5d8d gtk-demo: Allow locking of icon count in fishbowl demo
I'm not sure I'm proud of the hack to get the changing icon into the UI
file without having to write code. But it works.
2017-01-07 03:41:33 +01:00
Jonas Ådahl
5bae71f896 wayland: Handle subsurface as popup parent
When a subsurface is used as a parent of a popup, GDK needs to traverse
up to the transient-for as the next parent, to properly find the parent
used by the popup positioner. This is because the parent of a popup
must always either be an xdg_popup or an xdg_surface, but traversing
the "parent" (in GDK terms) upwards from a subsurface will end up on
the fake root window before we hit the actual parent (in Wayland terms).

https://bugzilla.gnome.org/show_bug.cgi?id=776225
2017-01-06 10:44:54 +08:00
Matthias Clasen
bea4c0898d Revert "Make it possible to set style classes for label links"
This reverts commit 9a2527b361.

This needs more work to have a chance of working properly.
2017-01-05 19:40:40 -05:00
Matthias Clasen
41b14fd148 Revert "Use CSS for styling links in labels"
This reverts commit 34264667ed.
2017-01-05 19:40:12 -05:00
Matthias Clasen
34264667ed Use CSS for styling links in labels
This was implemented only halfway, and was hardcoding the
underline. We don't need to do that anymore.
2017-01-05 18:12:20 -05:00
Matthias Clasen
790d5960c4 Bump version to 3.22.7 2017-01-05 17:33:51 -05:00
Matthias Clasen
9a2527b361 Make it possible to set style classes for label links
This makes it possible to style links in labels differently
in certain situations.
2017-01-05 17:33:04 -05:00
Matthias Clasen
92f6bcdca6 3.22.6 2017-01-04 15:48:17 -05:00
Matthias Clasen
c7096c4586 Update expected output for a11y tests
This is a followup to the GtkAboutDialog template change.
2017-01-04 15:48:17 -05:00
Daniel Boles
eceb9add1f demos/icon-browser: increase default window size
...to get more than 1 row of icons to browse!

https://bugzilla.gnome.org/show_bug.cgi?id=776560

I've bumped the size a bit further, to 1024x768
2017-01-04 15:48:17 -05:00
Sébastien Wilmet
e75601c058 docs: improve the documentation of GtkEntry:attributes
See the implementation of gtk_entry_create_layout():
pango_attr_list_splice() is used to add the PangoAttrList of the preedit
string. And that is done *after* applying the PangoAttrList of the
"attributes" property.

https://bugzilla.gnome.org/show_bug.cgi?id=776868
2017-01-04 20:01:28 +01:00
Daniel Boles
7960e94112 scrolledwindow: Fix func summary being cut off in bindings using doxygen
...which treats the first '.' in doc comments as the end of the summary.
So, e.g., in gtkmm, get_kinetic_scrolling() is currently summarised as
"Changes the behaviour of @scrolled_window wrt." Not very informative!

No need for a period there & anyway, the phrase "wrt to" is superfluous,
and we have space to actually say "with regard to", so just do that now.
2016-12-31 13:28:51 +00:00
Chris Mayo
d9748563c8 GtkAboutDialog: Fix formatting of example email address in html
Signed-off-by: Chris Mayo <aklhfex@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=776524
2016-12-30 10:37:38 -05:00
Matthias Clasen
1fc3fe4a0a about dialog: Simplify the template a bit
Remove some unnecessary complications, like an extraneous
box, and some child property settings that are not needed.
2016-12-30 10:20:16 -05:00
Stas Solovey
c7dce1018b Update Russian translation 2016-12-29 16:23:12 +00:00
Matthias Clasen
f19ecbb850 Avoid a possible crash in ::activate-url handlers
If the signal handler ends up changing the label text,
the link is no longer around to update the css node.
Check for this possibility to avoid a crash here.
2016-12-29 11:08:29 -05:00
Руслан Ижбулатов
a1aee4602c GDK W32: Handle maximizing correctly for small primary monitors
When primary monitor is smaller than the actual monitor on which the
window is being maximized, the WM will do widnow size adjustments
that will completely screw the window size if we try to make it
smaller than 100% fullscreen (to account for taskbar size, for example).

Fix this by overriding maximized window size during WM_WINDOWPOSCHANGING.

https://bugzilla.gnome.org/show_bug.cgi?id=775808
2016-12-24 17:29:50 +00:00
Christian Kirbach
e0856226c5 Update German translation 2016-12-20 19:11:29 +00:00
Debarshi Ray
8155c33d80 flowbox: Don't emit child-activated while dragging the pointer
https://bugzilla.gnome.org/show_bug.cgi?id=776306
2016-12-20 12:55:41 +01:00
Debarshi Ray
9679ef6b00 flowbox: Export gtk_flow_box_get_child_at_pos as public API
Bump the gtk+ version so that others can depend on this new API.

https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-20 00:35:48 +01:00
Philip Chimento
30b5187e60 GtkApplication: Lack of optional components shouldn't warn
When running uninstalled tests with GtkApplication on an autobuilder with
a fake session bus, warnings will cause the tests to abort. The GNOME
session manager, the Xfce session manager, and the Inhibit portal are all
not needed for normal operation of GTK, so we should not log warnings if
they are not found.

As well as not being present on a fake session bus, it's also not
expected that they'll be present on all platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=774784
2016-12-19 15:25:58 -08:00
Debarshi Ray
3073419ff1 flowbox: Don't emit selected-children-changed during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
2016-12-19 18:06:41 +01:00
Debarshi Ray
e779ec4b1f listbox: Don't emit selected-rows-changed, etc. during destruction
https://bugzilla.gnome.org/show_bug.cgi?id=776012
2016-12-19 18:06:41 +01:00
Debarshi Ray
bebcb5e094 flowbox: Rename gtk_flow_box_find_child_at_pos for consistency
... with gtk_list_box_get_row_at_y. It would be nice to avoid the
'find' versus 'get' discrepancy since we are planning to expose it as
public API.

https://bugzilla.gnome.org/show_bug.cgi?id=776187
2016-12-19 15:10:07 +01:00
Debarshi Ray
2b32008eeb Mention that gdk_window_create_similar_image_surface inherits the scale
https://bugzilla.gnome.org/show_bug.cgi?id=776132
2016-12-17 22:50:48 +01:00
Olivier Fourdan
78f8f236e9 wayland: apply empty input shape on parent commit
For subsurfaces, the new state which includes the input shape is not
applied by the compositor if the subsurface is in effective synchronous
mode.

So we need to apply the input shape once parent surface is in effective
desynchronized mode, which is when it's committed, otherwise the input
shape may never be applied if the widget is not using being_paint() /
end_paint() to draw on its subsurface, like clutter does.

We do that only for empty input shape as those won't need update when
the subsurface is resized, for all other non-empty input shape, the
client still has to use begin_paint()/end_paint() for the input shape to
be applied.

https://bugzilla.gnome.org/show_bug.cgi?id=774534
2016-12-15 13:30:05 +01:00
Emmanuele Bassi
da43bfd272 demo: Fix the GLES fragment shader for GLArea
We have a couple of syntax errors, like 'f' modifier for floating point
values.
2016-12-14 20:56:01 +00:00
Emmanuele Bassi
33e4826efd gl: Check for GL_EXT_framebuffer_blit before using glBlitFramebuffer
We check when we realize the GdkGLContext, but we never use the check
before using the API, and it breaks on drivers that do not implement the
extension, or on drivers that only support OpenGL ES 2.0.
2016-12-14 20:55:21 +00:00
Benjamin Otte
e04654f865 css: An opaque background does not allow omitting push_group
When the background-clip of the background is smaller than the
background-clip of blended images, not pushing a group is wrong.

Test testing exactly that included.
2016-12-13 23:01:54 +01:00
Matthias Clasen
a8991a6bea 3.22.5 2016-12-09 11:54:24 -05:00
Matthias Clasen
5b12c21d20 css nodes tests: Update expected output for progressbar
This changed since we add some more style classes now.
2016-12-09 11:54:24 -05:00
Gianvito Cavasoli
44fb5c9c70 Update Italian translation 2016-12-09 10:34:45 +00:00
Olivier Fourdan
7f39c7cbf7 wayland: destroy subsurfaces along with parents
Wayland subsurfaces can have other native window parents, but those need
to be destroyed along with the rest of the window hierarchy otherwise
an assert() is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=774915
2016-12-05 10:57:04 +01:00
Lapo Calamandrei
155dbaaa14 HC: progressbar style fix
Reset styling on the progress node when trough node has the `empty'
styleclass.

See https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-12-03 16:30:23 +00:00
Lapo Calamandrei
d55aa2a859 Adwaita: progressbar style fix
Reset styling on the progress node when trough node has the `empty'
styleclass.

See https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-12-03 16:30:23 +00:00
Daniel Boles
42d7f81649 GtkProgressBar: trivial conditional optimisation
I'd hope the compiler would realise this for us, but let's be explicit.
2016-12-03 16:30:23 +00:00
Simon Steinbeiss
a793f8f243 progressbar: add empty and full classes on trough based on fill-level
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774695
2016-12-03 16:26:15 +00:00
Debarshi Ray
8952975304 flowbox: Fix get_child_at_index crash with an invalid index
https://bugzilla.gnome.org/show_bug.cgi?id=775525
2016-12-02 16:38:05 +01:00
Lapo Calamandrei
e6d7df7233 Adwaita: render updated assets. 2016-12-01 13:17:02 +00:00
Lapo Calamandrei
35e6a8eb0d Adwaita: update assets svg
correct colors for pointy sliders assets.
2016-12-01 13:17:02 +00:00
Daniel Boles
7fca502115 ComboBox: Do not select item before menu realised
For a menu mode CB with wrap_width == 0 and an active item, that item is
selected in gtk_combo_box_menu_popup. Selection causes the MenuShell to
activate and hence take a grab. This was done before the menu was popped
up. A patch distributed in Debian sid - after being proposed on our BZ -
revealed that on the 1st popup of any such ComboBox, within grab_add,
the MenuShell's toplevel's GdkWindow is NULL. This causes a Gdk-CRITICAL
assertion fail on the 1st time opening any such CB, on Debian and if
that patch were merged to GTK+. By selecting after popup, we ensure the
MenuShell is realised before its grab_add and so avoid the critical.

https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-12-01 12:58:59 +00:00
William Hua
f50ed5b358 gtkcombobox: pass trigger event when popping up menu
https://bugzilla.gnome.org/show_bug.cgi?id=771242
2016-12-01 12:58:59 +00:00
Daniel Boles
3971439a17 ComboBox: Fix whitespace
* Replace tabs for indentation with spaces
 * Remove whitespace at ends of lines
2016-12-01 12:58:59 +00:00
Matthias Clasen
43b2b107f1 wayland: Don't warn if we loose the compositor connection
And instead, exit cleanly. This avoids filling the logs with
these warnings from every single application that has a
connection to the compositor.
2016-11-30 13:46:34 -05:00
Matthias Clasen
c70ba3a4f0 x11: Don't warn if the display is closed
This causes a storm of warnings from all applications in the logs
whenever the display goes away, and is not useful.
2016-11-30 13:46:29 -05:00
Olivier Fourdan
57a14565c6 wayland: Check for subsurface looking up the toplevel
gdk_window_get_toplevel() walks up the windows tree looking for the
corresponding toplevel window, but needs to account for subsurfaces as
well on Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=775319
2016-11-30 10:06:40 +01:00
Matthias Clasen
197eaaacb7 gtk-demo: Add a demo for tabs
One of the least-appreciated features in pango.
It deserves a demo.
2016-11-29 16:39:21 -05:00
Matthias Clasen
f7fb610278 Don't leak a pixbuf reference in dnd
https://bugzilla.gnome.org/show_bug.cgi?id=775316
2016-11-29 14:45:41 -05:00
Matthias Clasen
17ec4f10e4 Fix reference handling in GtkScaleButton
We were leaking the adjustment, since we confuse ourselves
with a property whose initial value comes out of a template.
Stop doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=775212
2016-11-28 15:04:49 -05:00
Matthias Clasen
cf4fd0d3e3 Reduce a warning to a message
The warning interferes with having a testcase to check this behavior,
so reduce this to a message.
2016-11-28 14:43:07 -05:00
Andrew Chadwick
0b129f3534 win32 event: check for NULL display or dev mgr
The recent Wintab testing revealed an interesting edge case: we cannot
for certain say that windowing system messages will not be received
while the default display and its device manager are still being set up.
We've ruled out the Wintab case now, but cannot rule out some future bit
of runtime DLL code doing stuff at this critical time.

This commit detects and avoids a potential null pointer dereference in
the message handling code while detecting grabs. Grabs don't really
exist yet, if the default display and/or its device manager are not yet
globally known.

https://bugzilla.gnome.org/show_bug.cgi?id=774379
2016-11-28 15:05:13 +00:00
Anders Jonsson
f8d90378a4 Update Swedish translation 2016-11-28 14:05:07 +00:00
Sébastien Wilmet
2f940d91a0 docs: fix a parameter name of GtkEntry::populate-popup
Trivial commit.

The documentation block refers to @widget, not @popup. @widget is a
better name since the type is GtkWidget.
2016-11-26 12:35:14 +01:00
Sébastien Wilmet
ca75748223 docs: fix docs of functions to convert layout_index <-> text_index
Trivial commit.

The documentation was swapped. The documentation for the parameters and
the return values is good.
2016-11-26 12:34:48 +01:00
Cosimo Cecchi
5282991ab9 Adwaita: make rubberband selection work again for libgd apps
libgd views still use the old style class.
2016-11-25 18:53:21 +01:00
Matthias Clasen
6c0cd1a16d Make gtk-encode-symbolic-svg work for icons with dotted names
We were producing org.symbolic.png from org.gnome.Recipes-symbolic.svg,
which is not useful. Look for the last dot in the original name, to
produce the expected org.gnome.Recipes-symbolic.symbolic.png instead.
2016-11-25 08:57:50 -05:00
Olivier Fourdan
605303681b wayland: Place subsurfaces relative to their parent
Now that subsurfaces can be created as child of another GdkWindow (and
not just the root window), they must be placed according to the location
of their parent, i.e. the abs_x/abs_y must be updated and taken into
account when placing and moving subsurfaces under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=774917
2016-11-24 09:33:35 +01:00
Matthias Clasen
4cd8796c0e inspector: Respect text-scaling-factor value initially
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774893
2016-11-23 19:37:28 -05:00
Florian Müllner
cc6335d94d GtkLabelAccessible: Initialize link before setting parent
Since at-spi-atk commit 96621a5e95 fixed PropertyChange notifications
for AccessibleParent, setting the parent will result in a call to
ref_state_set() which assumes that the object is fully initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=774939
2016-11-23 19:02:40 -05:00
Christian Hergert
ecb38bc824 inspector: ensure controller is a GtkGesture
While GtkEventController implementations today are all GtkGesture, it is
possible to create a GtkEventController manually. This is an extrac check
to ensure we only add gestures to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=774760
2016-11-23 14:02:15 -08:00
Stas Solovey
dd3cf38c53 Update Russian translation 2016-11-23 20:42:59 +00:00
Matthias Clasen
43b9b7f4e6 menu: Don't leak check menu items
Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774686
2016-11-23 14:50:16 -05:00
Matthias Clasen
7d695068e2 notebook: Don't leak arrow gadgets
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774743
2016-11-23 14:49:15 -05:00
Matthias Clasen
da9bd46aed text handle: Don't leak adjustments
This can happen if the weak pointer is triggered before the
adjustments are unset. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=774790
2016-11-23 13:58:00 -05:00
Balázs Meskó
6e856f6226 Update Hungarian translation 2016-11-22 13:41:01 +00:00
Andrew Chadwick
66a08bf3a6 wintab: init only after the display is assigned
Only attempt to initialize Wintab after the display manager announces
that the first default display has been set. Fixes a segfault during
initialization of specific tablet drivers' wintab32.dlls. Add assertions
and verbose comments explaining this nonsense because this stuff is a
pain to have to keep fixing.

https://bugzilla.gnome.org/show_bug.cgi?id=774379
2016-11-22 12:52:00 +01:00
Andrew Chadwick
dd6a00bb31 wintab tilt: Check return location for validity
https://bugzilla.gnome.org/show_bug.cgi?id=774265
2016-11-22 12:17:32 +01:00
Andrew Chadwick
61a57465ea win32: Fix tilt from Wintab devices
Move the orientation sanity-checks into the packet decode func.
Rationale: the packet handling func may otherwise read beyond the end of
device->last_axis_data.

Also expand them to cope with my test Huion's weird reporting.

Also correct the azimuth angle to align with GDK's presentation.

Most importantly, fix annoying comment typo.

https://bugzilla.gnome.org/show_bug.cgi?id=774265
2016-11-22 11:22:16 +01:00
Andrew Chadwick
f40191ff19 wintab: fix skipping of odd-numbered devices
Fix a regression introduced in 4ce6d10601
which causes devices with an odd-numbered zero-based index in the list
to be passed over incorrectly. This might present as yet another "device
does not send pressure" bug for ~50% of devices out there.

This commit also closes off another potential segfault for wintab_devices
lists which have an odd length.

https://bugzilla.gnome.org/show_bug.cgi?id=774699
2016-11-21 19:12:41 +01:00
Gustavo Noronha Silva
aa1307a787 Fix off by one in check for GtkRoundedBox containing a rectangle
When checking if a rectangle is contained by the rounded box, the code
will refuse a rectangle which is the exact size as the one backing the
rounded box, since it checks for greater or equal width and height.
Check for greater only instead.

https://bugzilla.gnome.org/show_bug.cgi?id=774114
2016-11-21 11:03:36 -02:00
Matthias Clasen
5301644a3f Document gtk_menu_place_on_monitor 2016-11-19 13:53:05 -05:00
Matthias Clasen
157b630d72 Add a since tag 2016-11-19 13:29:17 -05:00
Matthias Clasen
462a5df644 docs: Add gtk_menu_place_on_monitor 2016-11-19 12:52:26 -05:00
Baurzhan Muftakhidinov
4bc2904dae Update Kazakh translation 2016-11-19 12:15:59 +00:00
Matthias Clasen
4569bb372f 3.22.4 2016-11-18 13:55:21 -05:00
Timm Bäder
dc184902d7 filechooserwidget: Forward file filter to entry
And in the entry, apply the currently used filter as a second step to
the completion items.

https://bugzilla.gnome.org/show_bug.cgi?id=773007
2016-11-18 13:29:58 -05:00
Olivier Fourdan
0b46c5b176 gdkwindow: Allow native subsurface for all parents
Under Wayland, a subsurface can have another surface as parent, but
gdk would not allow native windows if the parent is not the root window.

Allow native subsurface for all parent under Wayland, not just for the
root window.

https://bugzilla.gnome.org/show_bug.cgi?id=774475
2016-11-18 13:26:29 -05:00
Carlos Garnacho
4805780016 wayland: Keep last scale factor on surfaces after it left all outputs
This can be triggered on workspace switches, and on hidpi results in
the scale factor being reset to 1 while the window is not in the
current workspace.

https://bugzilla.gnome.org/show_bug.cgi?id=774476
2016-11-18 13:26:10 -05:00
Мирослав Николић
042e37e6cc Updated Serbian translation 2016-11-18 09:15:04 +01:00
Matthias Clasen
748a1450a8 placeview: Don't leak the file enumerator
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774634
2016-11-17 13:55:44 -05:00
Charles Monzat
8b334fef63 Update French translation 2016-11-17 18:47:41 +00:00
Matthias Clasen
595ef21feb docs: Fix print-related includes
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774614.
2016-11-17 09:35:04 -05:00
Matthias Clasen
71b859a9ce gtk-demo: Set local-only to FALSE for the file chooser
No good reason for that.
2016-11-17 08:52:28 -05:00
Michael Koloberdin
504beaddb1 gdk: Fix screen geometry detection for non-randr setups
https://bugzilla.gnome.org/show_bug.cgi?id=773601
2016-11-17 07:55:50 -05:00
Matthias Clasen
c5f6d61783 docs: Update an example
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774490
2016-11-17 06:24:32 -05:00
Caolán McNamara
dbcbaac982 spin entry should be a child of spin context
https://bugzilla.gnome.org/show_bug.cgi?id=774609
2016-11-17 06:10:27 -05:00
Rafael Fontenelle
0103bbf5eb Update Brazilian Portuguese translation 2016-11-17 04:21:21 +00:00
Piotr Drąg
24f5d99be9 Update Polish translation 2016-11-16 13:08:19 +01:00
Piotr Drąg
528b80a165 Update Polish translation 2016-11-16 11:43:23 +01:00
Chun-wei Fan
25fd5710f7 Visual Studio builds: Fix Broadway builds
After building GDK with broadway, we need to copy the GDK DLL from
[Release|Debug]_Broadway\bin to [Release|Debug]\bin, so that the
introspection builds can be done normally with CFG=[Release|Debug].  As we
renamed the projects, we needed to update the property sheets that does
the copying, which was accidently missed.  Fix that.
2016-11-16 11:50:32 +08:00
Marek Cernocky
13ccbd0111 Updated Czech translation 2016-11-15 14:39:14 +01:00
Matthias Clasen
7f7501b1e7 Allow replacing input file in gtk-builder-tool simplify 2016-11-15 06:14:59 -05:00
Matthias Clasen
9a257e1f6a entry: Avoid recursion in gtk_entry_ensure_layout
This was unintentional, and lead to a memory leak.
2016-11-14 15:18:25 -05:00
Lauri Kasanen
a28022e916 recent-manager: Fix a memory leak caused by "recent-manager: Add a limit to the list's size"
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-14 14:27:03 -05:00
Matthias Clasen
14545342d5 appchooser: Plug a memory leak
We were not dropping the reference that the model gives us.

https://bugzilla.gnome.org/show_bug.cgi?id=774352
2016-11-14 14:21:17 -05:00
Matthias Clasen
cc0c286869 widget-factory: Better progressbar testing
Hook the two top progressbars up to the scale with marks.
Your turn, Lapo.
2016-11-14 08:48:24 -05:00
Olivier Fourdan
57f551a114 gtkstack: reorder size_allocate and move_window
Unlike other container widgets, GtkStack would allocate its children
prior to moving its windows, which might prevent further valid size
allocation signals to be emitted.

Re-order the size allocation of child widgets to be performed after
moving the GtkStack windows.

Thanks to Owen for spotting the real issue here.

https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-11-14 12:02:43 +01:00
Olivier Fourdan
f70039cb96 Revert "gdkwindow: configure native windows in move_native_children()"
This reverts commit 12579fe71b.
2016-11-14 12:02:40 +01:00
Olivier Fourdan
c1507cf680 Revert "gdk: Get rid of unused variables"
This reverts commit 6f7a6f769f.
2016-11-14 12:02:37 +01:00
Chun-wei Fan
a820acee00 Visual Studio builds: Fix .pc generation
We want to look for the gdk-pixbuf-2.0 package, and we should leave a space
between -ldwmapi and -lzlib1 when we enable Broadway.

Also copy the generated gdk-3.0.pc and gtk+-3.0.pc as gdk-win32-3.0.pc and
gtk+-win32-3.0.pc respectively, to be in-line with the autotools builds.
2016-11-14 16:27:21 +08:00
Chun-wei Fan
d3bdd384a1 gdkscreen-win32.c: Also define _WIN32_WINNT
As in the last commit on gdkdisplay-win32.c, we need to define that to be
0x0600 (Vista) or later so that the items needed in the Windows headers be
activated.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 21:03:46 +08:00
Chun-wei Fan
27b68ff193 gdkdisplay-win32.c: Define _WIN32_WINNT
... to be for Vista (0x0600) or later.  This is so that the necessary
items in the Windows headers be activated so that the code will build
properly on mingw-w64, and we already require Vista or later for GTK+.

Thanks Ting-Wei Lan for pointing this out.

See: https://bugzilla.gnome.org/show_bug.cgi?id=768081#c62
2016-11-11 20:53:41 +08:00
Lauri Kasanen
bf560369f2 recent-manager: Add a limit to the list's size
This fixes a DOS where any app can cause all running gtk apps
to use arbitrary amounts of memory.

Originally reported against mate-panel, where running a big slideshow
in eye-of-mate caused increasing RAM usage in mate-panel.

v2: Hardcode the value
Signed-off-by: Lauri Kasanen <curaga@operamail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773587
2016-11-10 17:10:34 -05:00
Jan Alexander Steffens (heftig)
cb53562659 gdkscreen-x11: Fix screen and monitor size calculation
The monitors are already in scaled pixels, so scaling again when retrieving
the screen size is wrong.

With GDK_SCALE unset, the initial monitor sizes are unscaled, and when the
xsettings client sets a scale > 1, the monitor sizes should be updated.

The end result is that the monitor sizes start out wrong, and get
corrected on the first xrandr event, while the screen size starts out
right and becomes wrong after the event.

This patch fixes Firefox misplacing menus and popovers when the xrandr
configuration changes while it is running.

Fix for the X11 side of

https://bugzilla.gnome.org/show_bug.cgi?id=772202
2016-11-10 15:34:39 -05:00
Matthias Clasen
275bbbf88d places sidebar: Don't leak a reference
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185
2016-11-10 15:17:28 -05:00
Matthias Clasen
9e5510420c Fix a copy-paste error
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=774185#c3
2016-11-10 15:07:45 -05:00
Matthias Clasen
53474fa404 headerbar: Don't leak widgets
We were not properly freeing separators that we end up
not using.

https://bugzilla.gnome.org/show_bug.cgi?id=774066
2016-11-10 15:04:35 -05:00
Matthias Clasen
f8900e5ac4 spinbutton: Fix some gadget handling issues
We were not adding the down_button gadget to the parent,
and we were not unreffing the button gadgets.

https://bugzilla.gnome.org/show_bug.cgi?id=774046
2016-11-10 14:47:58 -05:00
Massimo Valentini
4657e21be8 GdkGLContext: chain finalize handler
https://bugzilla.gnome.org/show_bug.cgi?id=773979
2016-11-10 14:35:06 -05:00
Thibaut Girka
f9796b01ff Fix loading cached compose tables
https://bugzilla.gnome.org/show_bug.cgi?id=773916
2016-11-10 14:33:43 -05:00
Gustavo Noronha Silva
04f3940488 cssshadowvalue: scale the blur surface by the same factor as the target
Making sure the surfaces are using the same scale factor makes it more
likely a fast path will be used when pixman gets involved, as pointed
out by Benjamin Otte.

https://bugzilla.gnome.org/show_bug.cgi?id=772075
2016-11-10 16:30:36 -02:00
Carlos Garcia Campos
255225584e printing: Do not truncate job names in GtkPrintOperation
We are currently truncating job names to 255 bytes, because that's the
maximum allowed length of job-name attribute in CUPS. This is a CUPS
limitation that GtkPrintOperation shouldn't need to know, and it
shouldn't affect other backends, that might have other limitations or
even no limitation at all. This has another side effect, that what you
set as GtkPrintOperation:job-name could be different to what you get if
the property is truncated, this is not documented in
gtk_print_operation_set_job_name(). So, I think the job name should be
truncated by the CUPS backend, right before setting the job-name
attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=774097
2016-11-10 16:56:43 +01:00
Florian Müllner
0bccddb2ff wayland: Set startup ID from GApplication platform data
The GApplication platform data may contain a startup ID that on X11
is used to set the startup notification ID when activated. Do the
same on the wayland backend to make startup notifications work for
DBus-activated applications where the DESKTOP_STARTUP_ID environment
variable is not set.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-08 13:29:55 -05:00
Florian Müllner
75ee402c6a gdkdisplay-wayland: Add API to set startup notification ID
For wayland clients, the startup notification ID is currently only set
from the DESKTOP_STARTUP_ID environment variable. As that variable is
only set for clients launched via exec(), startup completion is not
indicated correctly for DBus-activated applications unless an explicit
ID is specified - usually that is not the case, as the default handling
uses gdk_notify_startup_complete().
To address this, we need API to set the startup notification ID from GTK
as we have on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=768531
2016-11-08 13:29:55 -05:00
hanniedu
305f473f73 Updated Dutch translation 3.22 2016-11-08 11:05:48 +01:00
Piotr Drąg
2bdfed2da2 Update POTFILES.skip 2016-11-08 10:08:31 +01:00
Benjamin Otte
dbc0337498 range: Don't leak pointers to discarded gadgets 2016-11-08 02:25:45 +01:00
Benjamin Otte
96e7fbde2e reftests: Add reftest for the last 2 fixes
Makes sure that the clipping we do when pushing a group is at the
correct place and in particular doesn't influence shadows.
2016-11-08 02:25:45 +01:00
Benjamin Otte
a68460847e render: Draw shadows outside of potential push_group() call
Before, the shadows were clipped.
2016-11-08 02:25:45 +01:00
Benjamin Otte
34d45def37 render: Clip the correct rectangle
We translated before.
2016-11-08 02:25:45 +01:00
Matthias Clasen
11a4dcba77 Forgotten NEWS edit 2016-11-07 11:51:26 -05:00
Matthias Clasen
99fed96b44 3.22.3 2016-11-07 11:24:43 -05:00
Matthias Clasen
a61d7f7acf Avoid deprecation warnings
The recent round of deprecation additions has caused some
warnings that we should avoid.
2016-11-07 11:24:43 -05:00
Chun-wei Fan
4add92a431 GDK-Win32: Enable HiDPI support for Windows
This enables HiDPI support for GTK+ on Windows, so that the
fonts and window look better on HiDPI displays.  Notes for the current
work:

-The DPI awareness enabling can be disabled if and only if an application
 manifest is not embedded in the app to enable DPI awareness AND a user
 compatibility setting is not set to limit DPI awareness for the app, via
 the envvar GDK_WIN32_DISABLE_HIDPI.  The app manifest/user setting for
 DPI awareness will always win against the envvar, and so the HiDPI items
 will be always setup in such scenarios, unless DPI awareness is disabled.

-Both automatic detection for the scaling factor and setting the scale
 factor using the GDK_SCALE envvar are supported, where the envvar takes
 precedence, which will therefore disable automatic scaling when
 resolution changes.

-I am unable to test the wintab items because I don't have such devices
 around.

https://bugzilla.gnome.org/show_bug.cgi?id=768081
2016-11-07 15:38:02 +08:00
Hannie Dumoleyn
a64a0bc617 Updated Dutch translation 3-22 2016-11-05 17:45:58 +01:00
Piotr Drąg
bd2d1ccc13 Update POTFILES.skip 2016-11-05 08:52:07 +01:00
Benjamin Otte
04db216026 gtk-demo: Add fishbowl demo 2016-11-05 03:38:46 +01:00
Benjamin Otte
03de0c3444 widget: Deprecate gtk_widget_is_composited()
Also GtkWidget::composited-changed is gone.
2016-11-05 03:38:13 +01:00
Georges Basile Stavracas Neto
b3e3946b2f levelbar: update css nodes even when no offset value is found
GtkLevelBar supports adding custom offsets as style classes, and they
are applied whenever the :value property matches. The current code,
however, only updates any CSS nodes when an offset is found, causing
it to not update when a discrete value changes but no custom offset
is added.

Fix that by always updating the CSS nodes.

https://bugzilla.gnome.org/show_bug.cgi?id=773799
2016-11-04 12:45:03 -04:00
Rui Matos
c5a9c0db80 gdkwindow-x11: Add support for gdk_window_fullscreen_on_monitor
This way we can recommend that applications use the
fullscreen_on_monitor() API on both X and Wayland otherwise they'd
have to keep a path for each backend to achieve this functionality.

https://bugzilla.gnome.org/show_bug.cgi?id=773857
2016-11-04 12:12:06 -04:00
Lapo Calamandrei
a47a3fbd3b Adwaita: correctly style headerbars in a stack
corners are correctly rounded now. Stacked splitted headerbars are
not supported yet though.
2016-11-03 18:54:44 +01:00
Ernestas Kulik
39a8a6ef72 popover: pop down when pressing escape
Simply hiding the popover may introduce inconsistencies in application
behavior, since popping up/down is the usual use case.

https://bugzilla.gnome.org/show_bug.cgi?id=773885
2016-11-03 15:47:54 +02:00
Matthias Clasen
dbd5fb43ab Add a testcase for stacked headerbars
This currently has some theming issues.
This example is for Lapo to work those out.
2016-11-03 08:33:38 -04:00
Olivier Fourdan
209e01fd91 wayland: check valid pending cairo surface
gdk_wayland_window_attach_image() is normally called from
gdk_window_end_paint() to notify the compositor of newly staged drawing.

If any of the drawing code inadvertently dispatches the wayland event
loop (for instance with a gdk_flush() call), then it's possible that by
the time gdk_window_end_paint() is called, the staged drawing is already
destroyed.

This commit bypasses the attach_image call in scenarios where the staged
drawing is prematurely dropped.

https://bugzilla.gnome.org/show_bug.cgi?id=773274
2016-11-03 08:49:39 +01:00
Chun-wei Fan
29b2828c9d Visual Studio projects: Fix RootNamespace
This is more of a cosmetic fix, but make things more consistent across the
board.
2016-11-02 10:37:07 +08:00
Juan Pablo Ugarte
5fa8def9df Use GLSL version 110 for OpenGL 2 shaders.
According to docs and Intel legacy drivers,
GLSL version 130 is for GL 3.0 not GL 2.0/2.1

Validated files with reference compiler from
https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/
2016-11-01 11:58:16 -03:00
Juan Pablo Ugarte
28ce953caa gdk/Makefile.am: fixed glsl resources extra dist files.
Use the same wildcard partern used to generate gdk.gresource.xml to include files in EXTRA_DIST var.
2016-10-31 10:14:42 -03:00
Lapo Calamandrei
0ad5d51d8a Adwaita: no rounded corners for solid-csd. 2016-10-29 17:21:23 +02:00
Chun-wei Fan
b67a1c7f39 GDK-Win32: Improve GL on Windows
Update the GDKGL implementation:

-Allow legacy contexts to be created.
-Use finer-grained attributes to ask for a pixel format when possible,
 which also adds support for anti-aliasing

In fact the changes here are required for GTKGL to work properly on
Windows for 4.x.

Note that creation of gles contexts are not done here, as the system does
not support such contexts directly on Windows, but only through means such
as ANGLE, which is a totally different issue here.

https://bugzilla.gnome.org/show_bug.cgi?id=773528
2016-10-28 16:07:02 +08:00
Chun-wei Fan
45cf4c7d57 gtk/gtkmenu.c: Avoid compound literals
We only start requiring compound literals from GTK+-3.90, so fix this so
that pre-C99 compilers can build GTK+-3.22 properly.
2016-10-28 15:49:29 +08:00
Benjamin Otte
be1af1e01b visual: Deprecate querying APIs
They are going away in 4.0 and nobody should be using them anyway.
2016-10-28 06:04:58 +02:00
Мирослав Николић
eb43c3e6b6 Updated Serbian translation 2016-10-27 19:56:03 +02:00
Sébastien Wilmet
dd91ac7086 docs: consistent get/set function order for GtkScrolledWindow
Trivial commit.

For all the other GtkScrolledWindow functions, the order was get -> set.
Except for 3 functions, so fix that.
2016-10-27 12:33:12 +02:00
Chun-wei Fan
038766a82f MSVC builds: Simplify install process for MSVC 2010+
Use a for loop to copy the logo files.  Unfortunately the MSVC 2008
projects don't like this approach, seemingly.
2016-10-27 14:44:12 +08:00
Chun-wei Fan
271211da8c build/win32/vs10/gtk3-install.vcxproj: Fix project references
There is a typo for gtk-update-icon-cache, which may cause problems
when running the install project.  Fix this.
2016-10-27 12:30:04 +08:00
Matthias Clasen
c54f348edf color chooser: Fix a problem with show-editor=TRUE
For some reason we end up allocating the colorplane widget
before it is realized, and then never initialize the surface.

Fix this by explicitly doing it on realize.

https://bugzilla.gnome.org/show_bug.cgi?id=773474
2016-10-26 14:32:28 -04:00
Sébastien Wilmet
94c6d19415 docs: fix copy/paste errors in the docs of GtkScrolledWindow
Trivial commit.
2016-10-26 15:23:16 +02:00
Sébastien Wilmet
21d0de30ac docs: update section file for GtkScrolledWindow
Trivial commit.

- More logical ordering (re-group related things).
- Add missing functions: max_content_width/height.
2016-10-26 14:39:45 +02:00
Felix Riemann
27029a79fa GtkShortcutType: Fix typos in developer documentation
https://bugzilla.gnome.org/show_bug.cgi?id=773479
2016-10-25 20:10:24 +02:00
Matthias Clasen
f2bdf6e372 3.22.2 2016-10-23 23:09:16 -04:00
Emmanuele Bassi
a1115c05be gl: Set legacy bit depending on OpenGL version
GDK defaults to asking for an OpenGL 3.2 Core Profile, but if we get a
legacy profile from the underlying windowing system, the OpenGL version
will be fixed to 3.0. If that happens, we need to set the legacy bit on
the GdkGLContext, since that bit will be used to determine the version
and type of GLSL shaders that will be used by application and toolkit
code alike.

(cherry picked from commit 31c05771e9)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-10-23 21:28:54 +01:00
Emmanuele Bassi
4cdd4d03cc gl: Check whether use_es is positive
Now that the use_es field is an int with a possible negative value, we
cannot use it its truth value directly; we need to check if it's a
positive value, instead.

(cherry picked from commit 8e85f55240)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2016-10-23 21:28:45 +01:00
Mario Blättermann
ffb1ac56a8 Update German translation 2016-10-21 23:44:55 +00:00
Matthias Clasen
e51d73afa3 Emit ::style-set after setting priv->style
This was inadvertedly changed with an optimization a while ago,
and can lead to application crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=773029
2016-10-21 14:39:10 -04:00
Jonas Ådahl
3ad1677a3a GtkMenu: Try using gdk_window_move_to_rect() more often
With best-effort, try to use gdk_window_move_to_rect() more often, when
all pieces fit together. For the non-legacy paths to be triggered for
when gtk_menu_popup_for_device() or gtk_menu_popup() were used, the
following conditions must be met:

 1) There is no custom positioning function specified
 2) The menu is attached to a widget (using gtk_menu_attach_to_widget())
 3) There is a associated grab device

https://bugzilla.gnome.org/show_bug.cgi?id=772922
2016-10-21 11:55:39 -04:00
Pavel Grunt
2b527d6e97 overlay: Document availability of properties
Add missing "Since"

https://bugzilla.gnome.org/show_bug.cgi?id=773082
2016-10-21 11:53:36 -04:00
Robert Roth
6ee17810d1 Fix css documentation typo for color definition
'ligher' should be 'lighter', of course.

https://bugzilla.gnome.org/show_bug.cgi?id=773246
2016-10-21 11:44:21 -04:00
Emmanuele Bassi
803362bb5d gdk/gl: Allow autodetection for GL/GLES
If the GdkGLContext was not explicitly instructed to use or not GLES, we
can detect whether the underlying API is going to be desktop GL or GLES.

https://bugzilla.gnome.org/show_bug.cgi?id=773180
2016-10-21 11:41:43 -04:00
Adam Jackson
d40c6f180f gdk: Don't second-guess whether a context is GLES
We've already set ->use_es correctly at context creation time, all this
can possibly do is change our mind about what kind of GL we're using.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773180
2016-10-21 11:41:29 -04:00
Victor Toso
440ff48bba tests: fix clipboard test by loading correct icon
The icon name changed from "terminal" to "utilities-terminal" in
Adwaita-icon-theme.

Signed-off-by: Victor Toso <victortoso@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773113
2016-10-21 11:38:19 -04:00
Matthias Clasen
eaff061b48 docs: Expand icon-palette example
Add a warning color, and show that hex colors work here.
2016-10-21 11:08:51 -04:00
Matthias Clasen
cd495a26b7 Deprecate gdk_window_set_debug_updates
This is gone in GTK+ 4, so lets deprecate it.
2016-10-21 10:55:16 -04:00
Matthias Clasen
a372f554eb Deprecate GtkContainer::child
It is gone in GTK+ 4, so let it deprecate here.
2016-10-21 10:21:44 -04:00
Matthias Clasen
72baa37452 Deprecate the gdk_window_set_background* functions
These functions are gone in GTK+ 4, so deprecate them here.
2016-10-20 14:51:31 -04:00
Matthias Clasen
796107c833 Deprecate gtk_window_set_wmclass
This function was already documented as "don't use", and it is
removed in GTK+ 4, so deprecate it properly.
2016-10-20 14:26:43 -04:00
Matthias Clasen
b109d25e8b Some forgotten deprecation cleanup 2016-10-20 13:58:49 -04:00
Matthias Clasen
0ca9b468b8 Deprecate gtk_drag_dest_set_proxy 2016-10-20 13:48:05 -04:00
Matthias Clasen
d3ad642519 Deprecate more to-be-removed screen apis
These will be removed in GTK+ 4, therefore, we're deprecating
them now.
2016-10-20 13:44:23 -04:00
Matthias Clasen
61fc7ddd87 Deprecate to-be-removed screen API
GTK+ 4 is removing the monitor-related screen APIs. We should
deprecate them in 3.22 so people know to port away from them.
2016-10-20 12:06:42 -04:00
Jaime Velasco Juan
0d104b041a win32 theme: Fix tooltip borders
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
ebd2487df2 win32 theme: Fix combobox
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
ad258bc81c win32 theme: Fix column headers
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
d47d342012 win32 theme: Fix popup window decorations
Windows such as combobox's popup were using toplevel window's borders

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
c46c744529 gtkwin32theme: delete #if 0 code
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
49f2ed37cd win32 theme: Fix scale widget
It was invisible before.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
424b59aec6 win32 theme: No need to create a DC for GetThemePartSize
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
db41f815c7 win32 theme: use TS_TRUE in GetThemePartSize
Several styles return a size of 0x0px when using TS_DRAW, as
we don't pass a RECT to draw into.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
bece404043 win32 theme: Fix scrollbars
The fix is only partial, when both scrollbars are visible their ends
overlap.

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
91d4879f82 Fix CSS warnings in win32 theme
https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Jaime Velasco Juan
eda51b4ef5 Fix tiny fonts in win32 theme
broken since df08fc91... (css: always get default font size in pixels)

https://bugzilla.gnome.org/show_bug.cgi?id=773221
2016-10-20 16:57:24 +02:00
Carlos Garnacho
2dfaae6737 wayland: Allow grabless xdg_popups
xdg_shell v6 allows grabless popups, whose behavior is not that
different from override redirect windows with no grab to take
keyboard input (and pointer events outside).

This means we can relax the requirement to have a grab before
creating an xdg_popup. The warning is still useful to have so
people stop relying on gdk_window_show();gdk_device_grab() being
an ok pattern to popup a window, it's been moved to wayland
implementation of gdk_device_grab() instead, so we warn if trying
to grab a GDK_WINDOW_TEMP window that's already visible.

https://bugzilla.gnome.org/show_bug.cgi?id=771694
2016-10-20 11:35:31 +02:00
Lapo Calamandrei
e75314ec17 Adwaita: make circular button border looking nice
the darker bottom border used on buttons looks bad on circular ones
so now a gradient clipped on the border-box and a transparent
border is used in that partcular case.
See https://bugzilla.gnome.org/show_bug.cgi?id=771205 for details.
2016-10-19 15:59:33 +02:00
Lapo Calamandrei
f3d78aff12 Adwaita: sass, make button mixin export a global $button_fill var
$button_fill contains the background-image property value of
buttons, having it readable outside the drawing mixin allows, for
example, stacking background images in an easier way.
2016-10-19 15:59:33 +02:00
Chun-wei Fan
d93f8b00ad Remove gtk3-install.props's during re-generation
This is to ensure the changes in the generated
build/win32/vs10/gtk3-install.props are applied in
build/win32/vs[11|12|14] as well.
2016-10-19 18:50:10 +08:00
Chun-wei Fan
b1bb8c2e85 build/: Force MSVC project file generation on Makefile.am changes
Make the Makefile.am targets for generating the Visual Studio projects re-generate the
project files and the header listings whenever the Makefile.am's that include
build/Makefile.msvcproj changes, so that whenever a source/header is added, they will
be reflected in the projects and in the property sheets that are used to copy the
headers.

Also ensure that these are applied to the vs11, vs12 and vs14 projects when this
happens, as they are copied and processed from the Visual Studio 2010 projects.
2016-10-19 18:49:14 +08:00
Lapo Calamandrei
38056d0f6e Adwaita: sass cleanup
aggregate circular button style to the main button structure.
2016-10-18 13:19:02 +02:00
Lapo Calamandrei
6660dc5186 widget-factory: use circular style class on the circular button...
...in place of the circular-button one, killing the custom style
shipped, realying on the theme style.
2016-10-18 13:19:02 +02:00
Kjartan Maraas
29e586fe2e Updated Norwegian bokmål translation from Kjartan Maraas. 2016-10-18 07:50:37 +02:00
Benjamin Otte
6f7a6f769f gdk: Get rid of unused variables 2016-10-17 15:43:03 +02:00
Aurimas Černius
bc99feffe2 Updated Lithuanian translation 2016-10-15 22:07:11 +03:00
Kjartan Maraas
00cf0587a9 Updated Norwegian bokmål translation. 2016-10-15 16:29:33 +02:00
Matthias Clasen
149351048e Avoid 0/FALSE confusion
Since this is supposedly exemplary code, lets get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=772683
2016-10-14 11:17:42 -04:00
Alan Jenkins
1e2e736d0d shortcutswindow: working version of set_section_name()
(testing before+after, it actually works now)

https://bugzilla.gnome.org/show_bug.cgi?id=772926
2016-10-14 10:58:17 -04:00
Christian Hergert
17bcd0d127 menusectionbox: add support for "text-direction" attribute
This allows the use of a "text-direction" hint set to one of "none", "rtl",
or "ltr" to enforce the text direction of a "horizontal-buttons"
display-hint.

This is useful when a menu has buttons that map to physical space in the
UI and therefore must match the application widgetry.

https://bugzilla.gnome.org/show_bug.cgi?id=772775
2016-10-14 10:44:57 -04:00
Alan Jenkins
45528cf5b5 scrolledwindow: fix leak of pan_gesture
https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:52:00 -04:00
Alan Jenkins
29fbeea84d headerbar: fix leak of label_sizing_box
Since the widget is not added to a container, we have the responsibility
to sink the initial floating reference, and ultimately to unref it.

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:55 -04:00
Alan Jenkins
3eb53e9e7c headerbar: fix leak of separator
https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:48 -04:00
Alan Jenkins
b3af460860 headerbar: fix leak of start_box/end_box
gtk_widget_destroy() removes widgets from their container.  However
_internal_ widgets must be unref'ed using gtk_widget_unparent() instead.
This is symmetric with the fact that these widgets were ref'ed by direct
call to gtk_widget_set_parent().  It's also the method that was used in
gtk_headerbar_destroy().

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:42 -04:00
Alan Jenkins
4100a848a7 shortcutsgroup: fix leak of title
like previous commit, albeit simpler this time

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:35 -04:00
Alan Jenkins
e2f5425a1d applicationwindow: fix leak of help_overlay
> Due to Gtk+ keeping a reference to the window internally,
> gtk_window_new() does not return a reference to the caller.
> To delete a GtkWindow, call gtk_widget_destroy().

Caller(s) aren't expecting a need to delete help_overlay themselves
once they've installed it.  (E.g. see gtk_application_window_added()).

I didn't notice any direct precedents, but there's a parallel in the
current implementation of gtk_container_destroy() which uses
gtk_widget_destroy() on any added widget.

This avoids leaking 100s of kB per window, when I tested nautilus.

https://bugzilla.gnome.org/show_bug.cgi?id=772859
2016-10-13 09:51:13 -04:00
Olivier Fourdan
12579fe71b gdkwindow: configure native windows in move_native_children()
ClutterEmbed on Wayland uses a subsurface and relocates it on configure
events, but when placed within a scrolled window, no configure event is
emitted and the ClutterEmbed subsurface remains static.

Emit a configure event for native windows in GdkWindow's internal
move_native_children() so that custom widgets relying on configure
events such as ClutterEmbed can relocate their stuff.

Similarly, when switching to/from normal/maximized/fullscreen states
which change the shadows' size and possibly shows/hides a header bar,
we need to emit a configure event even if the abs_x/abs_y haven't
changed to make sure the subsurface is size appropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=771320
https://bugzilla.gnome.org/show_bug.cgi?id=767713
2016-10-13 08:46:03 +02:00
Matthias Clasen
dd9a9d9dcc Deprecate gtk_menu_popup and gtk_menu_popup_for_device
These functions don't work well on backends without global
coordinates (such as Wayland or Mir), and the gtk_menu_popup_at_
variants are better alternatives.

https://bugzilla.gnome.org/show_bug.cgi?id=772552
2016-10-12 13:50:55 -04:00
Piotr Drąg
0ecc4ac7de Update Polish translation 2016-10-12 19:49:23 +02:00
Lapo Calamandrei
c41294e2be Adwaita: dodge drop active style for window and decoration nodes
to hilight drop target there is a wildcard selector which turns
the border and shadow to green, this clearly shouldn't happen when
the whole window is a drop target.
2016-10-12 19:33:40 +02:00
Hannie Dumoleyn
9af1353e6d Updated Dutch translation gtk+-properties3.22 2016-10-12 17:00:55 +02:00
Hannie Dumoleyn
f60605e758 Updated Dutch translation 3.22 2016-10-12 16:36:51 +02:00
Tom Tryfonidis
e74dc54567 Update Greek translation 2016-10-11 11:05:21 +00:00
Christian Hergert
90ac584437 shortcuts: the accelerator should always be LTR
Even on RTL languages, we want the shortcut to be LTR so that we always
have <control> to the left of the accel keyval.

https://bugzilla.gnome.org/show_bug.cgi?id=772695
2016-10-10 15:13:48 -07:00
djb
bfc6287910 gtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible
...by putting it in a stack. The busy_spinner and eject_button are
mutually exclusive, but only the latter was coded to ensure that its
visibility did not cause the rest of the row to reflow. By putting both
widgets in a stack and setting child_visible on that, the row allocates
enough space to show one - or none - at once, avoiding any misalignment.

https://bugzilla.gnome.org/show_bug.cgi?id=772345

https://bugzilla.gnome.org/show_bug.cgi?id=772348
2016-10-10 15:14:49 -04:00
Adam Jackson
19aa3a4fca Use eglGetPlatformDisplay{,EXT} if available
Calling eglGetDisplay forces libEGL to guess what kind of pointer you
passed it. Different EGL libraries will do different things here, and in
particular glvnd will do something different than Mesa. Since we do have
an API that allows us to explicitly type the display, use it.

The explicit call to eglGetProcAddress is working around a bug in
libepoxy 1.3, which does not understand the EGL concept of client
extensions. Since it does not, the normal epoxy resolver for
eglGetPlatformDisplayEXT would not find any provider for that entry
point, and crash when you attempted to call it.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:38:28 -04:00
Adam Jackson
0757914aba Fix some EGLDisplay * abuse
EGLDisplays are already opaque pointers, and eglGetDisplay returns an
EGLDisplay not a pointer to one.

Signed-off-by: Adam Jackson <ajax@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772415
2016-10-10 14:37:39 -04:00
Ask Hjorth Larsen
e11df6cca0 Updated Danish translation 2016-10-09 22:05:52 +02:00
Rūdolfs Mazurs
8c0738113e Update Latvian translation 2016-10-09 19:33:18 +03:00
gogo
0a08a199d8 Update Croatian translation 2016-10-06 16:16:32 +00:00
gogo
051fddaa61 Update Croatian translation 2016-10-06 16:08:43 +00:00
Kalev Lember
154b2a124b Revert "Add GDK_AVAILABLE_IN_3_90"
Revert 3.90 macros on the 3.22 branch.

This reverts commit 13e00b70c0.
2016-10-06 16:42:22 +02:00
Milo Casagrande
1eed051c41 Updated Italian translation 2016-10-06 11:57:05 +00:00
Milo Casagrande
8d14c5c7cd Updated Italian translation 2016-10-06 11:53:32 +00:00
Matthias Clasen
17c08d062f entry: Fix a corner case of overwrite mode
We currently beep when a character is appended at the end in
overwrite mode. That is obviously not right. Patch based on
a patch by Ian MacDonald.

https://bugzilla.gnome.org/show_bug.cgi?id=772389
2016-10-05 12:23:18 -04:00
1355 changed files with 406332 additions and 185858 deletions

93
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,93 @@
stages:
- build
- docs
cache:
paths:
- _ccache/
fedora-autotools:
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
stage: build
script:
- bash -x ./.gitlab-ci/test-docker-autotools.sh
fedora-distcheck:
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
variables:
DO_DISTCHECK: "yes"
when: manual
stage: build
script:
- bash -x ./.gitlab-ci/test-docker-autotools.sh
fedora-meson:
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
stage: build
variables:
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
script:
- bash -x ./.gitlab-ci/test-docker-meson.sh
artifacts:
when: always
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths:
- "_build/meson-logs"
- "_build/testsuite/reftests/output"
debian-meson:
image: registry.gitlab.gnome.org/gnome/gtk/debian-gtk3:v1
stage: build
variables:
EXTRA_MESON_FLAGS: "-Ddefault_library=both"
script:
- bash -x ./.gitlab-ci/test-docker-meson.sh
artifacts:
when: always
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths:
- "_build/meson-logs"
- "_build/testsuite/reftests/output"
reference:
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v1
stage: docs
variables:
EXTRA_MESON_FLAGS: "--buildtype=release -Dgtk_doc=true -Dman=true"
script:
- bash -x ./.gitlab-ci/test-docker-meson.sh
- ninja -C _build gdk3-doc gtk3-doc
- tar -c -J -f gdk3-docs.tar.xz _build/docs/reference/gdk
- tar -c -J -f gtk3-docs.tar.xz _build/docs/reference/gtk
artifacts:
paths:
- gdk3-docs.tar.xz
- gtk3-docs.tar.xz
msys2-mingw32-meson:
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
stage: build
tags:
- win32
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-meson.sh"
artifacts:
when: always
name: "gtk3-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
paths:
- "_build/meson-logs"
msys2-mingw32-autotools:
when: manual
variables:
MSYSTEM: "MINGW32"
CHERE_INVOKING: "yes"
stage: build
tags:
- win32
script:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2-autotools.sh"

View File

@@ -0,0 +1,71 @@
FROM debian:buster
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
adwaita-icon-theme \
ccache \
dconf-gsettings-backend \
g++ \
gcc \
gettext \
git \
gobject-introspection \
gvfs \
hicolor-icon-theme \
itstool \
libatk-bridge2.0-dev \
libatk1.0-dev \
libc6-dev \
libcairo2-dev \
libcairo-gobject2 \
libcolord-dev \
libcups2-dev \
libegl1-mesa-dev \
libepoxy-dev \
libfontconfig1-dev \
libfreetype6-dev \
libgdk-pixbuf2.0-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libharfbuzz-dev \
libjson-glib-dev \
libpango1.0-dev \
librest-dev \
librsvg2-common \
libsoup2.4-dev \
libwayland-dev \
libx11-dev \
libxcomposite-dev \
libxcursor-dev \
libxdamage-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libxml2-dev \
libxrandr-dev \
locales \
ninja-build \
pkg-config \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
shared-mime-info \
wayland-protocols \
xauth \
xvfb \
&& rm -rf /usr/share/doc/* /usr/share/man/*
# Locale for our build
RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8

View File

@@ -0,0 +1,71 @@
FROM fedora:31
RUN dnf -y install \
adwaita-icon-theme \
atk-devel \
at-spi2-atk-devel \
avahi-gobject-devel \
cairo-devel \
cairo-gobject-devel \
ccache \
colord-devel \
cups-devel \
dbus-x11 \
fribidi-devel \
gcc \
gcc-c++ \
gdk-pixbuf2-devel \
gdk-pixbuf2-modules \
gettext \
gettext-devel \
git \
glib2-devel \
gobject-introspection-devel \
graphene-devel \
gtk-doc \
hicolor-icon-theme \
iso-codes \
itstool \
json-glib-devel \
libcloudproviders-devel \
libepoxy-devel \
libmount-devel \
librsvg2 \
libXcomposite-devel \
libXcursor-devel \
libXcursor-devel \
libXdamage-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libxkbcommon-devel \
libXrandr-devel \
libXrender-devel \
libXtst-devel \
make \
mesa-libEGL-devel \
mesa-libwayland-egl-devel \
meson \
ninja-build \
pango-devel \
python3 \
python3-pip \
python3-wheel \
redhat-rpm-config \
rest-devel \
sassc \
vulkan-devel \
wayland-devel \
wayland-protocols-devel \
xorg-x11-server-Xvfb \
&& dnf clean all
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
USER user
WORKDIR /home/user
ENV LANG C.utf8
ENV PATH="/usr/lib64/ccache:${PATH}"

135
.gitlab-ci/run-docker.sh Executable file
View File

@@ -0,0 +1,135 @@
#!/bin/bash
read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read "$1" <<< "${BASH_REMATCH[1]}"
else
read "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
set -e
build=0
run=0
push=0
list=0
print_help=0
no_login=0
while (($# > 0)); do
case "${1%%=*}" in
build) build=1;;
run) run=1;;
push) push=1;;
list) list=1;;
help) print_help=1;;
--base|-b) read_arg base "$@" || shift;;
--base-version) read_arg base_version "$@" || shift;;
--no-login) no_login=1;;
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
esac
shift
done
if [ $print_help == 1 ]; then
echo "$0 - Build and run Docker images"
echo ""
echo "Usage: $0 <command> [options] [basename]"
echo ""
echo "Available commands"
echo ""
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
echo " list - List available images"
echo " help - This help message"
echo ""
exit 0
fi
cd "$(dirname "$0")"
if [ $list == 1 ]; then
echo "Available Docker images:"
for f in *.Dockerfile; do
filename=$( basename -- "$f" )
basename="${filename%.*}"
echo -e " \e[1;39m$basename\e[0m"
done
exit 0
fi
# All commands after this require --base to be set
if [ -z $base ]; then
echo "Usage: $0 <command>"
exit 1
fi
if [ ! -f "$base.Dockerfile" ]; then
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
exit 1
fi
if [ -z $base_version ]; then
base_version="latest"
else
base_version="v$base_version"
fi
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
# Docker is actually implemented by podman, and its OCI output
# is incompatible with some of the dockerd instances on GitLab
# CI runners.
echo "Using: Podman"
format="--format docker"
CMD="podman"
else
echo "Using: Docker"
format=""
CMD="sudo socker"
fi
REGISTRY="registry.gitlab.gnome.org"
TAG="${REGISTRY}/gnome/gtk/${base}:${base_version}"
if [ $build == 1 ]; then
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
${CMD} build \
${format} \
--build-arg HOST_USER_ID="$UID" \
--tag "${TAG}" \
--file "${base}.Dockerfile" .
exit $?
fi
if [ $push == 1 ]; then
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
if [ $no_login == 0 ]; then
${CMD} login ${REGISTRY}
fi
${CMD} push ${TAG}
exit $?
fi
if [ $run == 1 ]; then
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
${CMD} run \
--rm \
--volume "$(pwd)/..:/home/user/app" \
--workdir "/home/user/app" \
--tty \
--interactive "${TAG}" \
bash
exit $?
fi

View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -e
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export N_PROCS=$(($(nproc) - 1))
EXTRA_CONFIGURE_OPT=""
# Only enable documentation when distchecking, since it's required
if [ -n "${DO_DISTCHECK-}" ]; then
EXTRA_CONFIGURE_OPTS="${EXTRA_CONFIGURE_OPTS} --enable-gtk-doc"
fi
NOCONFIGURE=1 ./autogen.sh
mkdir _build
cd _build
../configure \
--enable-cloudproviders \
--enable-broadway-backend \
--enable-wayland-backend \
--enable-x11-backend \
--enable-xinerama \
${EXTRA_CONFIGURE_OPTS}
make -j${N_PROCS}
if [ -n "${DO_DISTCHECK-}" ]; then
make -j${N_PROCS} check SKIP_GDKTARGET="echo Not actually running tests for now"
make -j${N_PROCS} distcheck SKIP_GDKTARGET="echo Not actually running tests for now"
fi

30
.gitlab-ci/test-docker-meson.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
set -e
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export PATH="${HOME}/.local/bin:${PATH}"
python3 -m pip install --user meson==0.49.2
meson \
-Dinstalled_tests=true \
-Dbroadway_backend=true \
-Dx11_backend=true \
-Dwayland_backend=true \
-Dxinerama=yes \
-Dprint_backends="file,lpr,test,cloudprint,cups" \
${EXTRA_MESON_FLAGS:-} \
_build
cd _build
ninja
xvfb-run -a -s "-screen 0 1024x768x24" \
meson test \
--timeout-multiplier 4 \
--print-errorlogs \
--suite=gtk+-3.0 \
--no-suite=gtk+-3.0:a11y

View File

@@ -0,0 +1,44 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
else
export MSYS2_ARCH="x86_64"
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
base-devel \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-pkg-config \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-libepoxy \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-gtk-doc
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
export CC="ccache gcc"
# Build
ccache --zero-stats
ccache --show-stats
./autogen.sh
make -j4
ccache --show-stats

View File

@@ -0,0 +1,48 @@
#!/bin/bash
set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then
export MSYS2_ARCH="i686"
else
export MSYS2_ARCH="x86_64"
fi
# Update everything
pacman --noconfirm -Suy
# Install the required packages
pacman --noconfirm -S --needed \
mingw-w64-$MSYS2_ARCH-toolchain \
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-pkg-config \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-libepoxy \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-meson \
mingw-w64-$MSYS2_ARCH-ninja \
mingw-w64-$MSYS2_ARCH-gtk-doc
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
# Build
ccache --zero-stats
ccache --show-stats
meson \
-Dman=true \
-Dbroadway_backend=true \
_build
ninja -C _build
ccache --show-stats

View File

@@ -22,7 +22,14 @@ EXTRA_DIST += \
sanitize-la.sh \
po/README.translators \
po/po2tbl.sed.in \
make-pot
make-pot \
meson_options.txt \
meson.build \
po/meson.build \
po-properties/meson.build \
build-aux/meson/post-install.py \
config.h.meson \
gtk.supp
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
@@ -34,13 +41,17 @@ MAINTAINERCLEANFILES = \
$(srcdir)/gtk-doc.make \
$(srcdir)/ChangeLog
if OS_UNIX
valgrinddir = $(datadir)/gtk-3.0/valgrind
valgrind_DATA = gtk.supp
endif
## Copy .pc files to target-specific names
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc gtk+-mir-3.0.pc: gtk+-3.0.pc
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc: gtk+-3.0.pc
rm -f $@ && \
cp gtk+-3.0.pc $@
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc gdk-mir-3.0.pc: gdk-3.0.pc
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc: gdk-3.0.pc
rm -f $@ && \
cp gdk-3.0.pc $@
@@ -61,17 +72,19 @@ DISTCLEANFILES = \
gtk+-quartz-3.0.pc \
gtk+-broadway-3.0.pc \
gtk+-wayland-3.0.pc \
gtk+-mir-3.0.pc \
gdk-3.0.pc \
gdk-x11-3.0.pc \
gdk-win32-3.0.pc \
gdk-quartz-3.0.pc \
gdk-broadway-3.0.pc \
gdk-wayland-3.0.pc \
gdk-mir-3.0.pc \
gail-3.0.pc \
config.lt
dist-hook:
mkdir $(distdir)/subprojects
cp -p $(srcdir)/subprojects/*.wrap $(distdir)/subprojects
distclean-local:
if test "$(srcdir)" = "."; then :; else \
rm -f ChangeLog; \

1607
NEWS

File diff suppressed because it is too large Load Diff

View File

@@ -156,11 +156,14 @@ Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk. Be prepared to manually edit various
makefile.msc files, and the makefile snippets in build/win32.
There are also VS 2008/2010 solution and project files to build GTK+, which
There are also VS 2008~2017 solution and project files to build GTK+, which
are maintained by Chun-wei Fan. They should build GTK+ out of the box,
provided that the afore-mentioned dependencies are installed. They will
build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in),
the GAIL-Util library and the gtk-demo program.
the GAIL-Util library and the gtk-demo program. Please also refer to the
README file(s) that reside in build/win32 on how to enable additional features
that are not enabled by default, such as EGL support via libANGLE, which
emulate the GL/EGL calls using Direct3D 9/11.
Please refer to the following GNOME Live! page for a more detailed ouline
on the process of building the GTK+ stack and its dependencies with Visual
@@ -178,6 +181,96 @@ instance the makefile.msc files might not produce identically named
DLLs and import libraries as the "autoconfiscated" makefiles and
libtool do. If this bothers you, you will have to fix the makefiles.
3) Using Meson (for Visual Studio and MinGW builds)
---
Meson can now be used to build GTK+-3.x with either MinGW or Visual Studio.
You will need the following items in addition to all the dependencies
listed above:
- Python 3.5 or later
- Meson build system, 0.48.0 or later
- Ninja (if not using the Visual Studio project generator for
Visual Studio 2010, 2015, 2017, 2019)
- CMake (optional, used for dependency searching)
- pkg-config (optional, or some compatible tool, highly recommended)
For all Windows builds, note that unless -Dbuiltin_immodules=no is specified,
the input modules (immodules) are built directly into the GTK DLL.
For building with Meson using Visual Studio, do the following:
Create an empty build directory somewhere that is on the same drive
as the source tree, and launch the Visual Studio command prompt that
matches the build configuration (Visual Studio version and architecture),
and run the following:
- Ensure that both the installation directory of Python and its script
directory is in your PATH, as well as the Ninja, CMake and pkg-config
executables (if used). If a pkg-config compatible drop-in replacement
tool is being used, ensure that PKG_CONFIG is set to point to the
executable of that tool as well.
- For non-GNOME dependencies (such as Cairo and Harfbuzz), where pkg-config
files or CMake files could not be properly located, set INCLUDE and LIB
to ensure that their header files and .lib files can be found respectively.
The DLLs of those dependencies should also be in the PATH during the build
as well, especially if introspection files are to be built.
- For GNOME dependencies, the pkg-config files for those dependencies should
be searchable by pkg-config (or a compatible tool). Verify this by running
$(PKG_CONFIG) --modversion <dependency>.
- Run the following:
meson <path_to_directory_of_this_file> --buildtype=... --prefix=...,
where buildtype can be release, debugoptimized, debug or plain. Please
refer to the Meson documentation for more details. You may also wish to
pass in -Dbroadway_backend=true if building the Broadway GDK backend is
desired, and/or pass in -Dbuiltin_immodules=no to build the immodules as
standalone DLLs that can be loaded by GTK dynamically. For Visual Studio
2010, 2015, 2017 and 2019 builds, you may pass in --backend=vs to generate
Visual Studio project files to be used to carry out the builds.
If you are building with Visual Studio 2008, note the following items as well:
- For x64 builds, the compiler may hang when building the certain files, due
to optimization issues in the compiler. If this happens, use the Windows
Task Manager and terminate all cl.exe processes, and the build will fail
with the source files that did not finish compiling due to the hang.
Look for them in build.ninja in the build directory, and change their compiler
flag "/O2" to "/O1", and the compilation and linking should proceed normally.
At this time of writing, the following files are known to cause this hang:
gtk\gtkfilechoosernativewin32.c
gtk\gtkfilesystemmodel.c
gtk\gtktextsegment.c
gtk\gtktextbtree.c
gtk\gtkrbtree.c
testsuite\gtk\treemodel.c
testsuite\gtk\textbuffer.c
testsuite\gtk\rbtree.c
testsuite\gtk\icontheme.c
- Upon running install (via "ninja install"), it is likely that
gtk-query-immodules-3.0.exe will fail to run as it cannot find msvcr90.dll or
msvcr90D.dll. You can ignore this if you did not specify -Dbuiltin_immodules=no
when configuring via Meson. If -Dbuiltin_immodules=no is specified, you need to
run the following after embedding the manifests as outlined in the next point:
<gtk_install_prefix>\bin\gtk-query-immodules-3.0.exe > <gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules.cache
- You will need to run the following upon completing install, from the build
directory in the Visual Studio 2008/SDK 6.0 command prompt (third line is not
needed unless -Dbuiltin_immodules=no is specified) so that the built binaries
can run:
for /r %f in (*.dll.manifest) do if exist <gtk_install_prefix>\bin\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\bin\%~nf;2
for /r %f in (*.exe.manifest) do if exist <gtk_install_prefix>\bin\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\bin\%~nf;1
for /r %f in (*.dll.manifest) do if exist <gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules\%~nf mt /manifest %f /outputresource:<gtk_install_prefix>\lib\gtk-3.0\3.0.0\immodules\%~nf;2
- The more modern visual style for the print dialog is not applied for Visual
Studio 2008 builds. Any solutions to this is really appreciated.
Using GTK+ on Win32
===================

View File

@@ -0,0 +1,45 @@
{
"app-id": "org.gtk.WidgetFactory",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"command": "gtk3-widget-factory",
"tags": ["devel", "development", "nightly"],
"rename-desktop-file": "gtk3-widget-factory.desktop",
"rename-icon": "gtk3-widget-factory",
"finish-args": [
"--device=dri",
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*",
"--talk-name=ca.desrt.conf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf"
],
"cleanup": [
"/include",
"/lib/pkgconfig", "/share/pkgconfig",
"/share/aclocal",
"/man", "/share/man", "/share/gtk-doc",
"*.la", ".a",
"/lib/girepository-1.0",
"/share/gir-1.0",
"/share/doc"
],
"modules": [
{
"name": "gtk",
"buildsystem": "autotools",
"builddir": true,
"config-opts": [
"--libdir=/app/lib"
],
"sources": [
{
"type": "git",
"branch": "gtk-3-24",
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
}
]
}
]
}

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env python3
import os
import shutil
import sys
import subprocess
if 'DESTDIR' not in os.environ:
gtk_api_version = sys.argv[1]
gtk_abi_version = sys.argv[2]
gtk_bindir = sys.argv[3]
gtk_libdir = sys.argv[4]
gtk_datadir = sys.argv[5]
gtk_query_immodules = os.path.join(gtk_bindir, 'gtk-query-immodules-' + gtk_api_version)
gtk_update_icon_cache = os.path.join(gtk_bindir, 'gtk-update-icon-cache')
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
if os.name == 'nt':
for lib in ['gdk', 'gtk', 'gailutil']:
# Make copy for MSVC-built .lib files, e.g. xxx-3.lib->xxx-3.0.lib
installed_lib = os.path.join(gtk_libdir, lib + '-' + gtk_api_version.split('.')[0] + '.lib')
installed_lib_dst = os.path.join(gtk_libdir, lib + '-' + gtk_api_version + '.lib')
if os.path.isfile(installed_lib):
shutil.copyfile(installed_lib, installed_lib_dst)
print('Compiling GSettings schemas...')
subprocess.call(['glib-compile-schemas',
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
print('Updating icon cache...')
subprocess.call([gtk_update_icon_cache, '-q', '-t' ,'-f',
os.path.join(gtk_datadir, 'icons', 'hicolor')])
print('Updating module cache for input methods...')
os.makedirs(gtk_immodule_dir, exist_ok=True)
immodule_cache_file = open(os.path.join(gtk_moduledir, 'immodules.cache'), 'w')
subprocess.call([gtk_query_immodules], stdout=immodule_cache_file)
immodule_cache_file.close()
# Untested!
print('Updating module cache for print backends...')
os.makedirs(gtk_printmodule_dir, exist_ok=True)
subprocess.call(['gio-querymodules', gtk_printmodule_dir])

View File

@@ -9,35 +9,43 @@
# Author: Fan, Chun-wei
# November 05, 2012
# MSVC_VER_LONG: Long Version of Visual Studio (2012, 2013, 14 and so on)
# MSVC_VER: Short Version of Visual Studio (11 for 2012, 12 for 2013, 14 for 2015 and so on)
# MSVC_FORMAT_VER: Use 12 for MSVC 2012 through 2015
# MSVC_VER_LONG: Long Version of target Visual Studio (2012, 2013, 14 and so on)
# MSVC_VER: Short Version of target Visual Studio (110 for 2012, 120 for 2013, 140 for 2015, 141 for 2017)
# MSVC_TOOLSET: Use if target MSVC toolsett is not in the form v $(MSVC_VER)0, meaning v$(MSVC_TOOLSET)
%.sln:
if MSVC_BASE_NO_TOOLSET_SET
MSVC_BASE_TOOLSET = $(MSVC_BASE_VER)0
endif
if MSVC_NO_TOOLSET_SET
MSVC_TOOLSET = $(MSVC_VER)0
endif
%.sln: $(top_builddir)/build/win32/vs10/Makefile
sed 's/11\.00/$(MSVC_FORMAT_VER)\.00/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/2010/$(MSVC_VER_LONG)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
%.txt:
%.txt: $(top_builddir)/build/win32/vs10/Makefile
sed 's/vs10/vs$(MSVC_VER)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
sed 's/VS10/VS$(MSVC_VER)/g' < $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@
rm $(top_builddir)/build/win32/vs$(MSVC_VER)/$@.tmp
%.vcxproj:
%.vcxproj: $(top_builddir)/build/win32/vs10/Makefile
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
sed 's/v100/v$(MSVC_VER)0/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
sed 's/v100/v$(MSVC_VER)0/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
sed 's/v100/v$(MSVC_TOOLSET)/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
%.props:
%.props: $(top_builddir)/build/win32/vs10/Makefile
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_srcdir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \
sed 's/<VSVer>10<\/VSVer>/<VSVer>$(MSVC_VER)<\/VSVer>/g' < $(top_builddir)/build/win32/vs10/$@ > $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
fi
%.vcxproj.filters:
%.vcxproj.filters: $(top_builddir)/build/win32/vs10/Makefile
if test -e $(top_srcdir)/build/win32/vs10/$@; then \
cp $(top_srcdir)/build/win32/vs10/$@ $(top_builddir)/build/win32/vs$(MSVC_VER)/$@; \
else \

View File

@@ -79,7 +79,8 @@ $(if $(or $(findstring --header-only,$($(_gir_name)_MSVC_SCANNERFLAGS)),
$($(_gir_name)_MSVC_PROGRAM)),,
$(error Need to define $(_gir_name)_MSVC_LIBS or $(_gir_name)_MSVC_PROGRAM))
$(top_builddir)/build/win32/$(_gir_name)_list:
$(top_builddir)/build/win32/$(_gir_name)_list: Makefile
rm -f $(top_builddir)/build/win32/$(_gir_name)_list
for F in $(_gir_files_msvc); do \
case $$$$F in \
*.c|*.cpp|*.cc|*.cxx|*.h|*.hpp|*.hh|*.hxx) \
@@ -88,11 +89,11 @@ $(top_builddir)/build/win32/$(_gir_name)_list:
esac; \
done
$(top_builddir)/build/win32/$(1).msvc.introspect:
$(top_builddir)/build/win32/$(1).msvc.introspect: Makefile
-$(RM) $(top_builddir)/build/win32/$(1).msvc.introspect
# Assemble the Command to Run g-ir-scanner
echo $(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo 'vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\'$(1)': '$(_gir_name)'_list '$($(_gir_name)_MSVC_GIR_DEPS)>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' @-echo Generating $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(PYTHON) $$$$(G_IR_SCANNER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --verbose -no-libtool \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
@@ -101,6 +102,7 @@ $(top_builddir)/build/win32/$(1).msvc.introspect:
echo ' '$(_gir_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_libraries_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_program_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --add-include-path=./vs$$$$(VSVER)/$$$$(CFG)/$$$$(PLAT)/bin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --add-include-path=$$$$(G_IR_INCLUDEDIR) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_includes_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(_gir_export_packages_msvc)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
@@ -109,15 +111,16 @@ $(top_builddir)/build/win32/$(1).msvc.introspect:
echo ' --cflags-end \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$($(_gir_name)_MSVC_SCANNERFLAGS)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --filelist='$(_gir_name)'_list \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -L.\vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
# Finally Assemble the Command to Compile the generated .gir
echo '$(_typelib_basename_msvc).typelib: '$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo 'vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\$(_typelib_basename_msvc).typelib: vs$$$$(VSVER)\$$$$(CFG)\$$$$(PLAT)\bin\'$(_typelib_basename_msvc)'.gir'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' @-echo Compiling $$$$@...'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(G_IR_COMPILER) \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --includedir=. --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' '$(1)' \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' --includedir=$$$$(@D:\=/) --debug --verbose \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' $$$$(@R:\=/).gir \'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo ' -o $$$$@'>>$(top_builddir)/build/win32/$(1).msvc.introspect
echo '' >>$(top_builddir)/build/win32/$(1).msvc.introspect
endef

View File

@@ -60,10 +60,19 @@ $(1).sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(1).vs10.sourcefiles.filters: $(top_builddir)/build/win32/vs9/$(1).vcproj
$(top_builddir)/build/win32/vs9/$(1).vcproj:
$(top_builddir)/build/win32/vs9/$(1).vcproj: Makefile
-$(RM) $(top_builddir)/build/win32/vs9/$(1).vcproj
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs11/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs12/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs14/$(1).vcxproj.filters
-$(RM) $(top_builddir)/build/win32/vs15/$(1).vcxproj
-$(RM) $(top_builddir)/build/win32/vs15/$(1).vcxproj.filters
for F in $(_proj_files); do \
case $$$$F in \
@@ -87,7 +96,7 @@ $(top_builddir)/build/win32/vs9/$(1).vcproj:
$(top_builddir)/build/win32/vs10/$(1).vs10.headers: $(top_builddir)/build/win32/vs9/$(1).headers
$(top_builddir)/build/win32/vs9/$(1).headers:
$(top_builddir)/build/win32/vs9/$(1).headers: Makefile
-$(RM) $(top_builddir)/build/win32/vs9/$(1).headers
-$(RM) $(top_builddir)/build/win32/vs10/$(1).vs10.headers

View File

@@ -31,15 +31,24 @@ SUBDIRS = \
vs10 \
vs11 \
vs12 \
vs14
vs14 \
vs15 \
vs16
EXTRA_DIST += \
config-msvc.mak \
config-msvc.mak.in \
create-lists.bat \
create-lists-msvc.mak \
detectenv-msvc.mak \
introspection-msvc.mak \
gen-gdkversionmacros-h.py \
generate-msvc.mak \
gtk-introspection-msvc.mak \
introspection-msvc.mak \
replace.py \
pc_base.py \
gtkpc.py \
README_EGL_MSVC.txt \
$(GENERATED_ITEMS)
-include $(top_srcdir)/git.mk

View File

@@ -0,0 +1,29 @@
Notes on enabling EGL (ANGLE/D3D support) for Windows/Visual Studio builds
==========================================================================
There is now support in the GL context creation code for Windows in GDK for
creating and using EGL (OpenGL ES 3) contexts, which can be used instead of
the existing OpenGL (Desktop) support, especially when the graphics drivers
do not support OpenGL adequately.
This support is not enabled by default in the project files. In order to do
so, please do the following:
-Obtain or compile a build of recent version of ANGLE. The one that comes
with QT 5.10.x is sufficiently recent, but not the one that comes with QT-
5.6.x. Note that Visual Studio 2013 or later is required for building
ANGLE from QT-5.10.x, but the Visual Studio 2013-built ANGLE DLLs does work
without problems with GTK+ built with Visual Studio 2008~2013. You may
need to obtain D3Dcompiler_[47|43|42].dll if it does not come with the
system (which is part of the DirectX runtimes). Its headers and .lib
needs to be set to be found by the compiler and linker respectively before
building libepoxy.
-Build libepoxy with EGL support, which has to be enabled explicitly on
Windows builds. Pass in -Degl=yes when building libepoxy using Meson.
Build and install, making sure the headers and .lib can be located by the
compiler and linker respectively.
-Open the vsX/gtk+.sln, and open the project properties in the "gdk3-win32"
project. Under "C/C++", add GDK_WIN32_ENABLE_EGL in the "Preprocessor
Definitions" to the existing definitions in there for the configuration
that is being built. Then build the solution.
-To force the use of the EGL code, set the envvar GDK_GL=(...,)gles , where (...,)
are the other GDK_GL options desired.

View File

@@ -0,0 +1,95 @@
# NMake Makefile portion for enabling features for Windows builds
!include detectenv-msvc.mak
# Default prefix if not defined
!ifndef PREFIX
PREFIX=..\..\..\vs$(VSVER)\$(PLAT)
!endif
# Configurable paths to the various interpreters we need
!ifndef PERL
PERL = perl
!endif
!ifndef PYTHON
PYTHON=python
!endif
# Path to the pkg-config tool, if not already in the PATH
!if "$(PKG_CONFIG)" == ""
PKG_CONFIG=pkg-config
!endif
# Configurable paths to the various scripts and tools that we are using
!ifndef GLIB_MKENUMS
GLIB_MKENUMS = $(PREFIX)\bin\glib-mkenums
!endif
!ifndef GLIB_GENMARSHAL
GLIB_GENMARSHAL = $(PREFIX)\bin\glib-genmarshal
!endif
!ifndef GLIB_COMPILE_RESOURCES
GLIB_COMPILE_RESOURCES = $(PREFIX)\bin\glib-compile-resources.exe
!endif
!ifndef GDBUS_CODEGEN
GDBUS_CODEGEN = $(PREFIX)\bin\gdbus-codegen
!endif
# Please do not change anything beneath this line unless maintaining the NMake Makefiles
GTK_VERSION = @GTK_VERSION@
GDK_PREPROCESSOR_FLAGS = \
/DG_LOG_USE_STRUCTURED=1 \
/DGDK_COMPILATION \
/I..\.. \
/I..\..\gdk \
/I..\..\gdk\win32
GTK_PREPROCESSOR_FLAGS = \
/I..\..\gtk \
/I..\..\gdk \
/I..\..\gdk\win32 \
/I..\.. \
/I$(PREFIX)\include\gdk-pixbuf-2.0 \
/I$(PREFIX)\include\pango-1.0 \
/I$(PREFIX)\include\atk-1.0 \
/I$(PREFIX)\include\cairo \
/I$(PREFIX)\include\gio-win32-2.0 \
/I$(PREFIX)\include\glib-2.0 \
/I$(PREFIX)\lib\glib-2.0\include \
/I$(PREFIX)\include \
/DHAVE_CONFIG_H \
/DG_DISABLE_SINGLE_INCLUDES \
/DATK_DISABLE_SINGLE_INCLUDES \
/DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES \
/DGTK_DISABLE_SINGLE_INCLUDES \
/D_USE_MATH_DEFINES \
/DGTK_COMPILATION \
/DG_LOG_DOMAIN=\"Gtk\" \
/DGTK_HOST=\"i686-pc-vs$(VSVER)\" \
/DGTK_PRINT_BACKENDS=\"file\" \
/DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
/DINCLUDE_IM_am_et \
/DINCLUDE_IM_cedilla \
/DINCLUDE_IM_cyrillic_translit \
/DINCLUDE_IM_ime \
/DINCLUDE_IM_inuktitut \
/DINCLUDE_IM_ipa \
/DINCLUDE_IM_multipress \
/DINCLUDE_IM_thai \
/DINCLUDE_IM_ti_er \
/DINCLUDE_IM_ti_et \
/DINCLUDE_IM_viqr \
/DGTK_LIBDIR=\"$(PREFIX:\=/)/lib\" \
/DGTK_DATADIR=\"$(PREFIX:\=/)/share\" \
/DGTK_DATA_PREFIX=\"$(PREFIX:\=/)\" \
/DGTK_SYSCONFDIR=\"$(PREFIX:\=/)/etc\" \
/DMULTIPRESS_CONFDIR=\"$(PREFIX:\=/)/etc/gtk-3.0\" \
/DMULTIPRESS_LOCALEDIR=\"$(PREFIX:\=/)/share/locale\" \
/DGTK_VERSION=\"$(GTK_VERSION)\" \
/DGTK_BINARY_VERSION=\"3.0.0\" \
/DGDK_DISABLE_DEPRECATED \
/DISOLATION_AWARE_ENABLED

View File

@@ -0,0 +1,101 @@
# Convert the source listing to object (.obj) listing in
# another NMake Makefile module, include it, and clean it up.
# This is a "fact-of-life" regarding NMake Makefiles...
# This file does not need to be changed unless one is maintaining the NMake Makefiles
# For those wanting to add things here:
# To add a list, do the following:
# # $(description_of_list)
# if [call create-lists.bat header $(makefile_snippet_file) $(variable_name)]
# endif
#
# if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]
# endif
#
# if [call create-lists.bat footer $(makefile_snippet_file)]
# endif
# ... (repeat the if [call ...] lines in the above order if needed)
# !include $(makefile_snippet_file)
#
# (add the following after checking the entries in $(makefile_snippet_file) is correct)
# (the batch script appends to $(makefile_snippet_file), you will need to clear the file unless the following line is added)
#!if [del /f /q $(makefile_snippet_file)]
#!endif
# In order to obtain the .obj filename that is needed for NMake Makefiles to build DLLs/static LIBs or EXEs, do the following
# instead when doing 'if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]'
# (repeat if there are multiple $(srcext)'s in $(source_list), ignore any headers):
# !if [for %c in ($(source_list)) do @if "%~xc" == ".$(srcext)" @call create-lists.bat file $(makefile_snippet_file) $(intdir)\%~nc.obj]
#
# $(intdir)\%~nc.obj needs to correspond to the rules added in build-rules-msvc.mak
# %~xc gives the file extension of a given file, %c in this case, so if %c is a.cc, %~xc means .cc
# %~nc gives the file name of a given file without extension, %c in this case, so if %c is a.cc, %~nc means a
NULL=
# For GDK resources
!if [call create-lists.bat header resources_sources.mak GDK_RESOURCES]
!endif
!if [for %f in (..\..\gdk\resources\glsl\*.glsl) do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [call create-lists.bat footer resources_sources.mak]
!endif
!if [call create-lists.bat header resources_sources.mak GTK_RESOURCES]
!endif
!if [for %f in (..\..\gtk\theme\Adwaita\gtk.css ..\..\gtk\theme\Adwaita\gtk-dark.css ..\..\gtk\theme\Adwaita\gtk-contained.css ..\..\gtk\theme\Adwaita\gtk-contained-dark.css) do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [for %x in (png svg) do @(for %f in (..\..\gtk\theme\Adwaita\assets\*.%x) do @call create-lists.bat file resources_sources.mak %f)]
!endif
!if [for %f in (..\..\gtk\theme\HighContrast\gtk.css ..\..\gtk\theme\HighContrast\gtk-inverse.css ..\..\gtk\theme\HighContrast\gtk-contained.css ..\..\gtk\theme\HighContrast\gtk-contained-inverse.css) do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [for %x in (png svg) do @(for %f in (..\..\gtk\theme\HighContrast\assets\*.%x) do @call create-lists.bat file resources_sources.mak %f)]
!endif
!if [for %f in (..\..\gtk\theme\win32\gtk-win32-base.css ..\..\gtk\theme\win32\gtk.css) do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [for %f in (..\..\gtk\cursor\*.png ..\..\gtk\gesture\*.symbolic.png ..\..\gtk\ui\*.ui) do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [for %s in (16 22 24 32 48) do @(for %c in (actions status categories) do @(for %f in (..\..\gtk\icons\%sx%s\%c\*.png) do @call create-lists.bat file resources_sources.mak %f))]
!endif
!if [for %s in (scalable) do @(for %c in (status) do @(for %f in (..\..\gtk\icons\%s\%c\*.svg) do @call create-lists.bat file resources_sources.mak %f))]
!endif
!if [for %f in (..\..\gtk\inspector\*.ui ..\..\gtk\inspector\logo.png ..\..\gtk\emoji\emoji.data) do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [call create-lists.bat footer resources_sources.mak]
!endif
!if [call create-lists.bat header resources_sources.mak GTK_DEMO_RESOURCES]
!endif
!if [for /f %f in ('$(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir=..\..\demos\gtk-demo ..\..\demos\gtk-demo\demo.gresource.xml') do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [call create-lists.bat footer resources_sources.mak]
!endif
!if [call create-lists.bat header resources_sources.mak ICON_BROWSER_RESOURCES]
!endif
!if [for /f %f in ('$(GLIB_COMPILE_RESOURCES) --sourcedir=..\..\demos\icon-browser --generate-dependencies ..\..\demos\icon-browser\iconbrowser.gresource.xml') do @call create-lists.bat file resources_sources.mak %f]
!endif
!if [call create-lists.bat footer resources_sources.mak]
!endif
!include resources_sources.mak
!if [del /f /q resources_sources.mak]
!endif

View File

@@ -0,0 +1,42 @@
@echo off
rem Simple .bat script for creating the NMake Makefile snippets.
if not "%1" == "header" if not "%1" == "file" if not "%1" == "footer" goto :error_cmd
if "%2" == "" goto error_no_destfile
if "%1" == "header" goto :header
if "%1" == "file" goto :addfile
if "%1" == "footer" goto :footer
:header
if "%3" == "" goto error_var
echo %3 = \>>%2
goto done
:addfile
if "%3" == "" goto error_file
echo. %3 \>>%2
goto done
:footer
echo. $(NULL)>>%2
echo.>>%2
goto done
:error_cmd
echo Specified command '%1' was invalid. Valid commands are: header file footer.
goto done
:error_no_destfile
echo Destination NMake snippet file must be specified
goto done
:error_var
echo A name must be specified for using '%1'.
goto done
:error_file
echo A file must be specified for using '%1'.
goto done
:done

View File

@@ -40,8 +40,12 @@ VSVER = 10
VSVER = 11
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
VSVER = 12
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 1910
VSVER = 14
!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 1920
VSVER = 15
!elseif $(VCVERSION) > 1919 && $(VCVERSION) < 2000
VSVER = 16
!else
VSVER = 0
!endif
@@ -49,7 +53,7 @@ VSVER = 0
!if "$(VSVER)" == "0"
MSG = ^
This NMake Makefile set supports Visual Studio^
9 (2008) through 14 (2015). Your Visual Studio^
9 (2008) through 16 (2019). Your Visual Studio^
version is not supported.
!error $(MSG)
!endif

View File

@@ -0,0 +1,33 @@
#!/usr/bin/python3
# Generate gdk/gdkversionmacros.h
# Author: Fan, Chun-wei
# Date: July 25, 2019
import os
import sys
import argparse
from replace import replace_multi, replace
def main(argv):
srcdir = os.path.dirname(__file__)
top_srcdir = os.path.join(srcdir, os.pardir, os.pardir)
parser = argparse.ArgumentParser(description='Generate gdkversionmacros.h')
parser.add_argument('--version', help='Version of the package',
required=True)
args = parser.parse_args()
gdk_sourcedir = os.path.join(top_srcdir, 'gdk')
version_parts = args.version.split('.')
gdkversionmacro_replace_items = {'@GTK_MAJOR_VERSION@': version_parts[0],
'@GTK_MINOR_VERSION@': version_parts[1],
'@GTK_MICRO_VERSION@': version_parts[2]}
replace_multi(os.path.join(gdk_sourcedir, 'gdkversionmacros.h.in'),
os.path.join(gdk_sourcedir, 'gdkversionmacros.h'),
gdkversionmacro_replace_items)
if __name__ == '__main__':
sys.exit(main(sys.argv))

View File

@@ -0,0 +1,222 @@
# NMake Makefile portion for code generation and
# intermediate build directory creation
# Items in here should not need to be edited unless
# one is maintaining the NMake build files.
!include config-msvc.mak
!include create-lists-msvc.mak
# Copy the pre-defined gdkconfig.h.[win32|win32_broadway]
!if "$(CFG)" == "release" || "$(CFG)" == "Release"
GDK_OLD_CFG = debug
!else
GDK_OLD_CFG = release
!endif
!ifdef BROADWAY
GDK_CONFIG = broadway
GDK_DEL_CONFIG = win32
GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32_broadway
!else
GDK_CONFIG = win32
GDK_DEL_CONFIG = broadway
GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32
!endif
GDK_MARSHALERS_FLAGS = --prefix=_gdk_marshal --valist-marshallers
GDK_RESOURCES_ARGS = ..\..\gdk\gdk.gresource.xml --target=$@ --sourcedir=..\..\gdk --c-name _gdk --manual-register
GTK_MARSHALERS_FLAGS = --prefix=_gtk_marshal --valist-marshallers
GTK_RESOURCES_ARGS = ..\..\gtk\gtk.gresource.xml --target=$@ --sourcedir=..\..\gtk --c-name _gtk --manual-register
all: \
..\..\config.h \
..\..\gdk\gdkconfig.h \
..\..\gdk\gdkversionmacros.h \
..\..\gdk\gdkmarshalers.h \
..\..\gdk\gdkmarshalers.c \
..\..\gdk\gdkresources.h \
..\..\gdk\gdkresources.c \
..\..\gtk\gtk-win32.rc \
..\..\gtk\libgtk3.manifest \
..\..\gtk\gtkdbusgenerated.h \
..\..\gtk\gtkdbusgenerated.c \
..\..\gtk\gtktypefuncs.inc \
..\..\gtk\gtk.gresource.xml \
..\..\gtk\gtkmarshalers.h \
..\..\gtk\gtkmarshalers.c \
..\..\gtk\gtkresources.h \
..\..\gtk\gtkresources.c \
..\..\demos\gtk-demo\demos.h \
..\..\demos\gtk-demo\demo_resources.c \
..\..\demos\icon-browser\resources.c
# Copy the pre-defined config.h.win32 and demos.h.win32
..\..\config.h: ..\..\config.h.win32
..\..\demos\gtk-demo\demos.h: ..\..\demos\gtk-demo\demos.h.win32
..\..\gtk\gtk-win32.rc: ..\..\gtk\gtk-win32.rc.body
..\..\gdk-$(CFG)-$(GDK_CONFIG)-build: $(GDK_CONFIG_TEMPLATE)
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build
@if exist ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build
@copy $** $@
..\..\gdk\gdkconfig.h: ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build
..\..\config.h \
..\..\gdk\gdkconfig.h \
..\..\gtk\gtk-win32.rc \
..\..\demos\gtk-demo\demos.h:
@echo Copying $@...
@copy $** $@
..\..\gdk\gdkversionmacros.h: ..\..\gdk\gdkversionmacros.h.in
@echo Generating $@...
@$(PYTHON) gen-gdkversionmacros-h.py --version=$(GTK_VERSION)
..\..\gdk\gdkmarshalers.h: ..\..\gdk\gdkmarshalers.list
@echo Generating $@...
@$(PYTHON) $(GLIB_GENMARSHAL) $(GDK_MARSHALERS_FLAGS) --header $** > $@.tmp
@move $@.tmp $@
..\..\gdk\gdkmarshalers.c: ..\..\gdk\gdkmarshalers.list
@echo Generating $@...
@$(PYTHON) $(GLIB_GENMARSHAL) $(GDK_MARSHALERS_FLAGS) --body $** > $@.tmp
@move $@.tmp $@
..\..\gdk\gdk.gresource.xml: $(GDK_RESOURCES)
@echo Generating $@...
@echo ^<?xml version='1.0' encoding='UTF-8'?^> >$@
@echo ^<gresources^> >> $@
@echo ^<gresource prefix='/org/gtk/libgdk'^> >> $@
@for %%f in (..\..\gdk\resources\glsl\*.glsl) do @echo ^<file alias='glsl/%%~nxf'^>resources/glsl/%%~nxf^</file^> >> $@
@echo ^</gresource^> >> $@
@echo ^</gresources^> >> $@
..\..\gdk\gdkresources.h: ..\..\gdk\gdk.gresource.xml
@echo Generating $@...
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
@$(GLIB_COMPILE_RESOURCES) $(GDK_RESOURCES_ARGS) --generate-header
..\..\gdk\gdkresources.c: ..\..\gdk\gdk.gresource.xml $(GDK_RESOURCES)
@echo Generating $@...
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
@$(GLIB_COMPILE_RESOURCES) $(GDK_RESOURCES_ARGS) --generate-source
..\..\gtk\libgtk3.manifest: ..\..\gtk\libgtk3.manifest.in
@echo Generating $@...
@$(PYTHON) replace.py \
--action=replace-var \
--input=$** --output=$@ \
--var=EXE_MANIFEST_ARCHITECTURE \
--outstring=*
..\..\gtk\gtkdbusgenerated.h ..\..\gtk\gtkdbusgenerated.c: ..\..\gtk\gtkdbusinterfaces.xml
@echo Generating GTK DBus sources...
@$(PYTHON) $(PREFIX)\bin\gdbus-codegen \
--interface-prefix org.Gtk. --c-namespace _Gtk \
--generate-c-code gtkdbusgenerated $** \
--output-directory $(@D)
..\..\gtk\gtktypefuncs.inc: ..\..\gtk\gentypefuncs.py
@echo Generating $@...
@echo #undef GTK_COMPILATION > $(@R).preproc.c
@echo #include "gtkx.h" >> $(@R).preproc.c
@cl /EP $(GTK_PREPROCESSOR_FLAGS) $(@R).preproc.c > $(@R).combined.c
@$(PYTHON) $** $@ $(@R).combined.c
@del $(@R).preproc.c $(@R).combined.c
..\..\gtk\gtk.gresource.xml: $(GTK_RESOURCES)
@echo Generating $@...
@echo ^<?xml version='1.0' encoding='UTF-8'?^>> $@
@echo ^<gresources^>>> $@
@echo ^<gresource prefix='/org/gtk/libgtk'^>>> $@
@echo ^<file^>theme/Adwaita/gtk.css^</file^>>> $@
@echo ^<file^>theme/Adwaita/gtk-dark.css^</file^>>> $@
@echo ^<file^>theme/Adwaita/gtk-contained.css^</file^>>> $@
@echo ^<file^>theme/Adwaita/gtk-contained-dark.css^</file^>>> $@
@for %%f in (..\..\gtk\theme\Adwaita\assets\*.png) do @echo ^<file preprocess='to-pixdata'^>theme/Adwaita/assets/%%~nxf^</file^>>> $@
@for %%f in (..\..\gtk\theme\Adwaita\assets\*.svg) do @echo ^<file^>theme/Adwaita/assets/%%~nxf^</file^>>> $@
@echo ^<file^>theme/HighContrast/gtk.css^</file^>>> $@
@echo ^<file alias='theme/HighContrastInverse/gtk.css'^>theme/HighContrast/gtk-inverse.css^</file^>>> $@
@echo ^<file^>theme/HighContrast/gtk-contained.css^</file^>>> $@
@echo ^<file^>theme/HighContrast/gtk-contained-inverse.css^</file^>>> $@
@for %%f in (..\..\gtk\theme\HighContrast\assets\*.png) do @echo ^<file preprocess='to-pixdata'^>theme/HighContrast/assets/%%~nxf^</file^>>> $@
@for %%f in (..\..\gtk\theme\HighContrast\assets\*.svg) do @echo ^<file^>theme/HighContrast/assets/%%~nxf^</file^>>> $@
@echo ^<file^>theme/win32/gtk-win32-base.css^</file^>>> $@
@echo ^<file^>theme/win32/gtk.css^</file^>>> $@
@for %%f in (..\..\gtk\cursor\*.png) do @echo ^<file^>cursor/%%~nxf^</file^>>> $@
@for %%f in (..\..\gtk\gesture\*.symbolic.png) do @echo ^<file alias='icons/64x64/actions/%%~nxf'^>gesture/%%~nxf^</file^>>> $@
@for %%f in (..\..\gtk\ui\*.ui) do @echo ^<file preprocess='xml-stripblanks'^>ui/%%~nxf^</file^>>> $@
@for %%s in (16 22 24 32 48) do @(for %%c in (actions status categories) do @(for %%f in (..\..\gtk\icons\%%sx%%s\%%c\*.png) do @echo ^<file^>icons/%%sx%%s/%%c/%%~nxf^</file^>>> $@))
@for %%s in (scalable) do @(for %%c in (status) do @(for %%f in (..\..\gtk\icons\%%s\%%c\*.svg) do @echo ^<file^>icons/%%s/%%c/%%~nxf^</file^>>> $@))
@for %%f in (..\..\gtk\inspector\*.ui) do @echo ^<file compressed='true' preprocess='xml-stripblanks'^>inspector/%%~nxf^</file^>>> $@
@echo ^<file^>inspector/logo.png^</file^>>> $@
@echo ^<file^>emoji/emoji.data^</file^>>> $@
@echo ^</gresource^>>> $@
@echo ^</gresources^>>> $@
..\..\gtk\gtkresources.h: ..\..\gtk\gtk.gresource.xml
@echo Generating $@...
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
@$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-header
..\..\gtk\gtkresources.c: ..\..\gtk\gtk.gresource.xml $(GTK_RESOURCES)
@echo Generating $@...
@if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT)
@if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT)
@if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA)
@$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-source
..\..\gtk\gtkmarshalers.h: ..\..\gtk\gtkmarshalers.list
@echo Generating $@...
@$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --header $** > $@.tmp
@move $@.tmp $@
..\..\gtk\gtkmarshalers.c: ..\..\gtk\gtkmarshalers.list
@echo Generating $@...
@echo #undef G_ENABLE_DEBUG> $@.tmp
@$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --body $** >> $@.tmp
@move $@.tmp $@
..\..\demos\gtk-demo\demo_resources.c: ..\..\demos\gtk-demo\demo.gresource.xml $(GTK_DEMO_RESOURCES)
@echo Generating $@...
@$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\demo.gresource.xml
..\..\demos\icon-browser\resources.c: ..\..\demos\icon-browser\iconbrowser.gresource.xml $(ICON_BROWSER_RESOURCES)
@echo Generating $@...
@$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\iconbrowser.gresource.xml
# Remove the generated files
clean:
@-del /f /q ..\..\demos\icon-browser\resources.c
@-del /f /q ..\..\demos\gtk-demo\demo_resources.c
@-del /f /q ..\..\demos\gtk-demo\demos.h
@-del /f /q ..\..\gtk\gtkresources.c
@-del /f /q ..\..\gtk\gtkresources.h
@-del /f /q ..\..\gtk\gtkmarshalers.c
@-del /f /q ..\..\gtk\gtkmarshalers.h
@-del /f /q ..\..\gtk\gtk.gresource.xml
@-del /f /q ..\..\gtk\gtktypefuncs.inc
@-del /f /q ..\..\gtk\gtkdbusgenerated.c
@-del /f /q ..\..\gtk\gtkdbusgenerated.h
@-del /f /q ..\..\gtk\libgtk3.manifest
@-del /f /q ..\..\gtk\gtk-win32.rc
@-del /f /q ..\..\gdk\gdkresources.c
@-del /f /q ..\..\gdk\gdkresources.h
@-del /f /q ..\..\gdk\gdk.gresource.xml
@-del /f /q ..\..\gdk\gdkmarshalers.c
@-del /f /q ..\..\gdk\gdkmarshalers.h
@-del /f /q ..\..\gdk\gdkversionmacros.h
@-del /f /q ..\..\gdk\gdkconfig.h
@if exist ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build
@if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build
@if exist ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build
@-del /f /q ..\..\config.h

View File

@@ -6,8 +6,15 @@ APIVERSION = 3.0
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
built_install_girs = Gdk-$(APIVERSION).gir GdkWin32-$(APIVERSION).gir Gtk-$(APIVERSION).gir
built_install_typelibs = Gdk-$(APIVERSION).typelib GdkWin32-$(APIVERSION).typelib Gtk-$(APIVERSION).typelib
built_install_girs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).gir
built_install_typelibs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).typelib
!include introspection-msvc.mak
@@ -29,9 +36,9 @@ setgirbuildenv:
!include introspection.body.mak
install-introspection: all
@-copy *.gir $(G_IR_INCLUDEDIR)
@-copy /b *.typelib $(G_IR_TYPELIBDIR)
install-introspection: all
@-copy vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir "$(G_IR_INCLUDEDIR)"
@-copy /b vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib "$(G_IR_TYPELIBDIR)"
!else
all:
@@ -39,5 +46,5 @@ all:
!endif
clean:
@-del /f/q *.typelib
@-del /f/q *.gir
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir

View File

@@ -30,10 +30,10 @@ def main(argv):
atk_min_ver = '2.15.1'
cairo_min_ver = '1.14.0'
gdk_pixbuf_min_ver = '2.30.0'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid -lwinmm -ldwmapi'
gdk_win32_sys_libs = '-lgdi32 -limm32 -lshell32 -lole32 -lwinmm -ldwmapi'
cairo_libs = '-lcairo-gobject -lcairo '
glib_min_ver = '2.45.8'
cairo_backends = 'cairo-win32'
gdk_backends = 'win32'
gio_package = 'gio-2.0 >= ' + glib_min_ver
broadway_extra_libs = ''
@@ -41,22 +41,19 @@ def main(argv):
gdk_args = gdk_parser.parse_args()
if getattr(gdk_args, 'broadway', None) is 1:
# On Visual Studio, we link to zlib1.lib
broadway_extra_libs = '-lzlib1'
broadway_extra_libs = ' -lzlib1'
gdk_backends += ' broadway'
cairo_backends += ' cairo'
pkg_replace_items = {'@GTK_API_VERSION@': '3.0',
'@GDK_BACKENDS@': gdk_backends}
pkg_required_packages = 'gdk-pixbuf >= ' + gdk_pixbuf_min_ver + ' ' + \
'cairo >= ' + cairo_min_ver + ' ' + \
'cairo-gobject >= ' + cairo_min_ver
pkg_required_packages = 'gdk-pixbuf-2.0 >= ' + gdk_pixbuf_min_ver
gdk_pc_replace_items = {'@GDK_PACKAGES@': gio_package + ' ' + \
'pangowin32 pangocairo' + ' ' + \
pkg_required_packages,
'@GDK_PRIVATE_PACKAGES@': gio_package + ' ' + cairo_backends,
'@GDK_EXTRA_LIBS@': gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_PRIVATE_PACKAGES@': gio_package,
'@GDK_EXTRA_LIBS@': cairo_libs + gdk_win32_sys_libs + broadway_extra_libs,
'@GDK_EXTRA_CFLAGS@': '',
'gdk-3': 'gdk-3.0'}

View File

@@ -21,9 +21,15 @@ valid_actions = ['remove-prefix',
'replace-str',
'remove-str']
def open_file(filename, mode):
if sys.version_info[0] < 3:
return open(filename, mode=mode)
else:
return open(filename, mode=mode, encoding='utf-8')
def replace_multi(src, dest, replace_items):
with open(src, 'r') as s:
with open(dest, 'w') as d:
with open_file(src, 'r') as s:
with open_file(dest, 'w') as d:
for line in s:
replace_dict = dict((re.escape(key), value) \
for key, value in replace_items.items())

View File

@@ -33,7 +33,6 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxprojin \
gdk3-win32.vcxproj.filtersin \
gdk3-broadway.vcxprojin \
@@ -62,6 +61,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filtersin \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
gtk3-build-defines.props \
gtk3-copy-gdk-broadway.props \
gtk3-gen-srcs.props \
@@ -74,6 +74,10 @@ DISTCLEANFILES = \
$(GENERATED_ITEMS)
gtk3-install.props: $(top_srcdir)/build/win32/vs10/gtk3-install.propsin $(MSVC10_HEADERS_LISTS)
-$(RM) $(top_builddir)/build/win32/vs11/gtk3-install.props
-$(RM) $(top_builddir)/build/win32/vs12/gtk3-install.props
-$(RM) $(top_builddir)/build/win32/vs14/gtk3-install.props
-$(RM) $(top_builddir)/build/win32/vs15/gtk3-install.props
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/gtk3-install.propsin >$@
rm $(MSVC10_HEADERS_LISTS)

View File

@@ -24,8 +24,8 @@ You will also need a Python 2.6+/3.x interpretor installed on your system,
which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe)
either needs to be in your PATH before attempting the build of GTK+, or it
can be found in the path specified by PythonPath in gtk-version-paths.props.
If you happen to change the PythonPath setting in gtk-version-paths.props after
can be found in the path specified by PythonDir in gtk-version-paths.props.
If you happen to change the PythonDir setting in gtk-version-paths.props after
opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,
delete all the *.sdf, *.suo and *.user files before re-attempting the build.
@@ -81,6 +81,21 @@ built DLLs go into <root>\vs10\<PlatformName>\bin, built LIBs into
project files higher in the stack are supposed to look for them, not
from a specific GLib source tree.
There is now a "gtk3-introspect" project that is used to build the
introspection files. In order for this to work, check that the paths for
PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
system. Note that it must be the same Python installation that was used to
build GObject-Introspection (G-I), and a complete G-I build/installation
needs to be found in <root>\vs10\<PlatformName>\, with the introspection files
for ATK, Pango and GDK-Pixbuf. Note also that this is not built by default,
so you will need to right-click on the project to build it, which will build
and "install" the other projects that are normally built, if those were not yet
built. The introspection files that are built will be "installed" to
<root>\vs10\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
<root>\vs10\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
successful build. for building this in a different configuration, therefore,
you will need to clean this project specifically and then rebuild.
Please note, as GTK+ uses the Adwaita theme for all platforms by default,
most icons used are not included with GTK+ (which *are* needed), so please see
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the

View File

@@ -30,6 +30,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-query-settings", "gtk-q
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcxproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcxproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -274,6 +276,14 @@ Global
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|x64.ActiveCfg = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -17,11 +17,6 @@
<ItemGroup>
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc"><Filter>Resource Files</Filter></ResourceCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
<ItemGroup>
#include "gtk-3.vs10.sourcefiles.filters"
<ClCompile Include="..\..\..\modules\input\gtkimcontextime.c"><Filter>Source Files</Filter></ClCompile>

View File

@@ -162,50 +162,6 @@
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\gtk\gtkdbusinterfaces.xml">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkDbusBuiltSources)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ DBus Sources...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkDbusBuiltSourcesX64)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\gtk-win32.rc.body">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying GTK+ Win32 Version Resource...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyGtkWin32RC)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\gtk-win32.rc;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gtk\libgtk3.manifest.in">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Generating GTK+ Win32 Manifest...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenerateGtkWin32Manifest)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gtk\libgtk3.manifest;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\gtk\gtk-win32.rc" />
</ItemGroup>

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<RootNamespace>gtkbuildertool</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9F22107A-3EF7-4B52-B269-747B65307F36}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<RootNamespace>gtkquerysettings</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<RootNamespace>gtkupdateiconcache</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

View File

@@ -10,10 +10,14 @@
<GdkDefines>GDK_COMPILATION;G_LOG_DOMAIN="Gdk"</GdkDefines>
<GtkIncludedImmodulesDefines>INCLUDE_IM_am_et;INCLUDE_IM_cedilla;INCLUDE_IM_cyrillic_translit;INCLUDE_IM_ime;INCLUDE_IM_inuktitut;INCLUDE_IM_ipa;INCLUDE_IM_multipress;INCLUDE_IM_thai;INCLUDE_IM_ti_er;INCLUDE_IM_ti_et;INCLUDE_IM_viqr</GtkIncludedImmodulesDefines>
<GtkDefines>GTK_COMPILATION;G_LOG_DOMAIN="Gtk";GTK_HOST="i686-pc-vs$(VSVer)";GTK_PRINT_BACKENDS="file";GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED;$(GtkIncludedImmodulesDefines);GTK_LIBDIR="$(GtkDummyPrefix)/lib";GTK_DATADIR="$(GtkDummyPrefix)/share";GTK_DATA_PREFIX="$(GtkDummyPrefix)";GTK_SYSCONFDIR="$(GtkDummyPrefix)/etc";MULTIPRESS_CONFDIR="$(GtkDummyPrefix)/etc/gtk-$(ApiVersion)";MULTIPRESS_LOCALEDIR="$(GtkDummyPrefix)/share/locale";GTK_VERSION="$(GtkVersion)/etc";GTK_BINARY_VERSION="$(GtkBinaryVersion)/etc";GDK_DISABLE_DEPRECATED;ISOLATION_AWARE_ENABLED</GtkDefines>
<GtkGdkCommonLibs>imm32.lib</GtkGdkCommonLibs>
<GtkGdkCommonLibs>pangowin32-1.0.lib;fribidi.lib;imm32.lib</GtkGdkCommonLibs>
<GdkAdditionalLibs>winmm.lib;dwmapi.lib;setupapi.lib;$(GtkGdkCommonLibs)</GdkAdditionalLibs>
<GdkBroadwayAdditionalLibs>ws2_32.lib</GdkBroadwayAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;pangowin32-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkAdditionalLibs>atk-1.0.lib;winspool.lib;comctl32.lib;$(GtkGdkCommonLibs)</GtkAdditionalLibs>
<GtkIntrospectNMakeCmd>cd ..
set VCInstallDir=$(VCInstallDir)
nmake -f gtk-introspection-msvc.mak CFG=$(Configuration) PREFIX=$(GlibEtcInstallRoot)</GtkIntrospectNMakeCmd>
<GtkIntrospectBuiltFiles>$(BinDir)\Gtk-3.0.gir;$(BinDir)\Gtk-3.0.typelib</GtkIntrospectBuiltFiles>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3builddefinesprops</_PropertySheetDisplayName>
@@ -22,7 +26,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\fribidi;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@@ -31,6 +35,11 @@
<Link>
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;epoxy.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='11.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='12.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='14.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='15.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(VisualStudioVersion)|$(Platform)'=='16.0|x64'">/HIGHENTROPYVA %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@@ -64,5 +73,11 @@
<BuildMacro Include="GtkAdditionalLibs">
<Value>$(GtkAdditionalLibs)</Value>
</BuildMacro>
<BuildMacro Include="GtkIntrospectNMakeCmd">
<Value>$(GtkIntrospectNMakeCmd)</Value>
</BuildMacro>
<BuildMacro Include="GtkIntrospectBuiltFiles">
<Value>$(GtkIntrospectBuiltFiles)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -25,7 +25,7 @@ if "$(Configuration)" == "Debug_Broadway" goto DoDebug
mkdir .\Release\$(Platform)\bin
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll .\Release\$(Platform)\bin\
copy /b $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib .\Release\$(Platform)\bin\

View File

@@ -90,7 +90,6 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
@@ -114,7 +113,6 @@
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
@@ -138,7 +136,6 @@
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
@@ -162,7 +159,6 @@
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>

View File

@@ -4,77 +4,28 @@
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<GenConfigH>copy ..\..\..\config.h.win32 ..\..\..\config.h</GenConfigH>
<GenGdkConfigHWin32>
if exist ..\..\..\MSVC_$(Configuration) goto DONE_GDKCONFIG_H
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD
if exist ..\..\..\MSVC_$(Configuration)_Broadway del ..\..\..\MSVC_$(Configuration)_Broadway
if exist $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll
if exist $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib del $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib
if "$(Configuration)" == "Release" del ..\..\..\MSVC_Debug
if "$(Configuration)" == "Debug" del ..\..\..\MSVC_Release
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\GDK_WIN32ONLY_BUILD
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)
:DONE_GDKCONFIG_H
</GenGdkConfigHWin32>
<GenGdkConfigHBroadway>
if exist ..\..\..\MSVC_$(Configuration)_Broadway goto DONE_GDKCONFIG_H
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD
if exist ..\..\..\MSVC_Release del ..\..\..\MSVC_Release
if exist ..\..\..\MSVC_Debug del ..\..\..\MSVC_Debug
if "$(Configuration)" == "Release_Broadway" del ..\..\..\MSVC_Debug_Broadway
if "$(Configuration)" == "Debug_Broadway" del ..\..\..\MSVC_Release_Broadway
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
:DONE_GDKCONFIG_H
</GenGdkConfigHBroadway>
<GDbusCodeGenCmd>$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml</GDbusCodeGenCmd>
<GenerateGtkDbusBuiltSources>cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSources>
<GenerateGtkDbusBuiltSourcesX64>cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)</GenerateGtkDbusBuiltSourcesX64>
<CopyGtkWin32RC>copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc</CopyGtkWin32RC>
<GenerateGtkWin32Manifest>$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*</GenerateGtkWin32Manifest>
<CopyDemosH>copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h</CopyDemosH>
<GenerateRequiredSourcesBase>cd ..
set VCInstallDir=$(VCInstallDir)
nmake -f generate-msvc.mak PREFIX=$(GlibEtcInstallRoot)</GenerateRequiredSourcesBase>
<GeneratedGdkSources>..\..\..\config.h;..\..\..\gdk\gdkconfig.h;..\..\gdk\gdkversionmacros.h;..\..\..\gdk\gdkmarshalers.h;..\..\..\gdk\gdkmarshalers.c;..\..\..\gdk\gdkresources.h;..\..\..\gdk\gdkresources.c</GeneratedGdkSources>
<GeneratedGtkSources>..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;..\..\..\gtk\gtkdbusgenerated.h;..\..\..\gtk\gtkdbusgenerated.c</GeneratedGtkSources>
<GeneratedDemoSources>..\..\..\demos\gtk-demo\demos.h</GeneratedDemoSources>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3gensrcsprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="GenConfigH">
<Value>$(GenConfigH)</Value>
<BuildMacro Include="GenerateRequiredSourcesBase">
<Value>$(GenerateRequiredSourcesBase)</Value>
</BuildMacro>
<BuildMacro Include="GenGdkConfigHWin32">
<Value>$(GenGdkConfigHWin32)</Value>
<BuildMacro Include="GeneratedGdkSources">
<Value>$(GeneratedGdkSources)</Value>
</BuildMacro>
<BuildMacro Include="GenGdkConfigHBroadway">
<Value>$(GenGdkConfigHBroadway)</Value>
<BuildMacro Include="GeneratedGtkSources">
<Value>$(GeneratedGtkSources)</Value>
</BuildMacro>
<BuildMacro Include="GDbusCodeGenCmd">
<Value>$(GDbusCodeGenCmd)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkDbusBuiltSources">
<Value>$(GenerateGtkDbusBuiltSources)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkDbusBuiltSourcesX64">
<Value>$(GenerateGtkDbusBuiltSourcesX64)</Value>
</BuildMacro>
<BuildMacro Include="CopyGtkWin32RC">
<Value>$(CopyGtkWin32RC)</Value>
</BuildMacro>
<BuildMacro Include="GenerateGtkWin32Manifest">
<Value>$(GenerateGtkWin32Manifest)</Value>
</BuildMacro>
<BuildMacro Include="CopyDemosH">
<Value>$(CopyDemosH)</Value>
<BuildMacro Include="GeneratedDemoSources">
<Value>$(GeneratedDemoSources)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -7,7 +7,9 @@
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\share\gir-1.0
mkdir $(CopyDir)\lib\pkgconfig
mkdir $(CopyDir)\lib\girepository-1.0
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb" $(CopyDir)\bin
@@ -35,6 +37,12 @@ copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
if exist $(BinDir)\Gdk-3.0.gir copy "$(BinDir)\Gdk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\GdkWin32-3.0.gir copy "$(BinDir)\GdkWin32-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gtk-3.0.gir copy "$(BinDir)\Gtk-3.0.gir" $(CopyDir)\share\gir-1.0
if exist $(BinDir)\Gdk-3.0.typelib copy "$(BinDir)\Gdk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\GdkWin32-3.0.typelib copy "$(BinDir)\GdkWin32-3.0.typelib" $(CopyDir)\lib\girepository-1.0
if exist $(BinDir)\Gtk-3.0.typelib copy "$(BinDir)\Gtk-3.0.typelib" $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
:DO_BROADWAY_BIN
@@ -64,6 +72,12 @@ copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Release\$(Platform)\bin\Gdk-3.0.gir copy .\Release\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.gir copy .\Release\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.gir copy .\Release\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Release\$(Platform)\bin\Gdk-3.0.typelib copy .\Release\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Release\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Release\$(Platform)\bin\Gtk-3.0.typelib copy .\Release\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
goto DONE_BIN
@@ -88,11 +102,19 @@ copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
if exist .\Debug\$(Platform)\bin\Gdk-3.0.gir copy .\Debug\$(Platform)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.gir copy .\Debug\$(Platform)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.gir copy .\Debug\$(Platform)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0
if exist .\Debug\$(Platform)\bin\Gdk-3.0.typelib copy .\Debug\$(Platform)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib copy .\Debug\$(Platform)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0
if exist .\Debug\$(Platform)\bin\Gtk-3.0.typelib copy .\Debug\$(Platform)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0
:DONE_BIN
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc
copy "..\gtk+-3.0.pc" $(CopyDir)\lib\pkgconfig
copy "..\gtk+-3.0.pc" "$(CopyDir)\lib\pkgconfig\gtk+-3.0.pc"
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig
</GtkDoInstallBin>
<GtkDoInstall>
@@ -110,22 +132,14 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
mkdir $(CopyDir)\include\gail-$(ApiVersion)\libgail-util
#include "gailutil-3.vs10.headers"
mkdir $(CopyDir)\share\icons\hicolor\16x16\apps
copy ..\..\..\demos\gtk-demo\data\16x16\gtk3-demo.png $(CopyDir)\share\icons\hicolor\16x16\apps
mkdir $(CopyDir)\share\icons\hicolor\22x22\apps
copy ..\..\..\demos\gtk-demo\data\22x22\gtk3-demo.png $(CopyDir)\share\icons\hicolor\22x22\apps
mkdir $(CopyDir)\share\icons\hicolor\24x24\apps
copy ..\..\..\demos\gtk-demo\data\24x24\gtk3-demo.png $(CopyDir)\share\icons\hicolor\24x24\apps
mkdir $(CopyDir)\share\icons\hicolor\32x32\apps
copy ..\..\..\demos\gtk-demo\data\32x32\gtk3-demo.png $(CopyDir)\share\icons\hicolor\32x32\apps
mkdir $(CopyDir)\share\icons\hicolor\48x48\apps
copy ..\..\..\demos\gtk-demo\data\48x48\gtk3-demo.png $(CopyDir)\share\icons\hicolor\48x48\apps
mkdir $(CopyDir)\share\icons\hicolor\256x256\apps
copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps
for &#37;&#37;s in (16 22 24 32 48 256) do ((mkdir $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps) &amp; (copy /b ..\..\..\demos\gtk-demo\data\&#37;&#37;sx&#37;&#37;s\gtk3-demo.png $(CopyDir)\share\icons\hicolor\&#37;&#37;sx&#37;&#37;s\apps))
mkdir $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
@@ -140,8 +154,8 @@ $(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\sch
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkPostInstall>
<GenerateGtkPC>$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GenerateGtkPC>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)</GenerateGtkPC>
<GenerateGtkPCX64>$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)</GenerateGtkPCX64>
<GtkPCFiles>..\gdk-3.0.pc;..\gtk+-3.0.pc;..\gail-3.0.pc</GtkPCFiles>
</PropertyGroup>
<PropertyGroup>

View File

@@ -249,7 +249,7 @@
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
<ProjectReference Include="gtk-update-icon-cache.vcxproj">
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>

View File

@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A8092C4E-0A21-4B1D-AC82-16764E418D1F}</ProjectGuid>
<RootNamespace>gtk3introspect</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<NMakeBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeOutput>$(GtkIntrospectBuiltFiles)</NMakeOutput>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-3.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -41,46 +41,46 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" Label="Configuration">
<ConfigurationType>Utility</ConfigurationType>
<ConfigurationType>Makefile</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
@@ -121,121 +121,19 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GlibEtcInstallRoot)\</OutDir>
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" />
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam)</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean all</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Debug_Broadway'">$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Release_Broadway'">$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Debug'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)' == 'Release'">$(GenerateRequiredSourcesBase) CFG=$(Configuration) $(IntrospectPythonParam) clean</NMakeCleanCommandLine>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\config.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Copying config.h from config.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenConfigH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\config.h;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying gdkconfig from gdkconfig.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GenGdkConfigHWin32)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(Configuration);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying gdkconfig from gdkconfig.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GenGdkConfigHWin32)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(Configuration);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying gdkconfig from gdkconfig.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GenGdkConfigHWin32)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(Configuration);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying gdkconfig from gdkconfig.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GenGdkConfigHWin32)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(Configuration);%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32_broadway">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Copying gdkconfig from gdkconfig.win32_broadway...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GenGdkConfigHBroadway)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(Configuration)_Broadway;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Copying gdkconfig from gdkconfig.win32_broadway...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GenGdkConfigHBroadway)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(Configuration)_Broadway;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Copying gdkconfig from gdkconfig.win32_broadway...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GenGdkConfigHBroadway)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(Configuration)_Broadway;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Copying gdkconfig from gdkconfig.win32_broadway...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GenGdkConfigHBroadway)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(Configuration)_Broadway;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\..\..\demos\gtk-demo\demos.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Copying demos.h from demos.h.win32...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(CopyDemosH)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">..\..\..\demos\gtk-demo\demos.h;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\gdk\gdkconfig.h.win32_broadway"><Filter>Resource Files</Filter></CustomBuild>
<CustomBuild Include="..\..\..\demos\gtk-demo\demos.h.win32"><Filter>Resource Files</Filter></CustomBuild>
</ItemGroup>
</Project>

View File

@@ -12,8 +12,19 @@
<GtkSeparateVSDllSuffix>-vs$(VSVer)</GtkSeparateVSDllSuffix>
<GtkDllPrefix>$(GtkSeparateVSDllPrefix)</GtkDllPrefix>
<GtkDllSuffix>$(GtkSeparateVSDllSuffix)</GtkDllSuffix>
<PythonPath>c:\python34</PythonPath>
<PythonPathX64>$(PythonPath).x64</PythonPathX64>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '10.0|Win32'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '11.0|Win32'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '12.0|Win32'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '14.0|Win32'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '15.0|Win32'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '16.0|Win32'">c:\python36</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '10.0|x64'">c:\python34.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '11.0|x64'">c:\python34.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '12.0|x64'">c:\python34.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '14.0|x64'">c:\python36.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '15.0|x64'">c:\python36.x64</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)|$(Platform)' == '16.0|x64'">c:\python36.x64</PythonDir>
<IntrospectPythonParam>PYTHON=$(PythonDir)\python.exe</IntrospectPythonParam>
</PropertyGroup>
<PropertyGroup>
<_PropertySheetDisplayName>gtk3versionpathsprops</_PropertySheetDisplayName>
@@ -52,11 +63,11 @@
<BuildMacro Include="GtkDllSuffix">
<Value>$(GtkDllSuffix)</Value>
</BuildMacro>
<BuildMacro Include="PythonPath">
<Value>$(PythonPath)</Value>
<BuildMacro Include="PythonDir">
<Value>$(PythonDir)</Value>
</BuildMacro>
<BuildMacro Include="PythonPathX64">
<Value>$(PythonPathX64)</Value>
<BuildMacro Include="IntrospectPythonParam">
<Value>$(IntrospectPythonParam)</Value>
</BuildMacro>
</ItemGroup>
</Project>

View File

@@ -4,7 +4,6 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
@@ -29,6 +28,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \

View File

@@ -4,7 +4,6 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
@@ -29,6 +28,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \

View File

@@ -4,7 +4,6 @@ EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gtk3-prebuild.vcxproj.filters \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
@@ -29,6 +28,7 @@ EXTRA_DIST += \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \

View File

@@ -0,0 +1,52 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtk3-icon-browser.vcxproj \
gtk3-icon-browser.vcxproj.filters \
gailutil-3.vcxproj \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \
gdk3-broadway.vcxproj.filters \
gtk3-build-defines.props \
gtk3-copy-gdk-broadway.props \
gtk3-gen-srcs.props \
gtk3-ignore-broadway.props \
gtk3-install.props \
gtk3-version-paths.props
DISTCLEANFILES = $(EXTRA_DIST)
MSVC_VER = 15
MSVC_VER_LONG = 15
MSVC_TOOLSET = 141
MSVC_FORMAT_VER = 12
include $(top_srcdir)/build/Makefile-newvs.am
-include $(top_srcdir)/git.mk

View File

@@ -0,0 +1,52 @@
include $(top_srcdir)/Makefile.decl
EXTRA_DIST += \
README.txt \
gtk+.sln \
gtk3-prebuild.vcxproj \
gdk3-win32.vcxproj \
gdk3-win32.vcxproj.filters \
gdk-3.vcxproj \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-query-settings.vcxproj \
gtk-query-settings.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtk3-icon-browser.vcxproj \
gtk3-icon-browser.vcxproj.filters \
gailutil-3.vcxproj \
gailutil-3.vcxproj.filters \
gtk3-install.vcxproj \
gtk3-install.vcxproj.filters \
gtk3-introspect.vcxproj \
broadwayd.vcxproj \
broadwayd.vcxproj.filters \
gdk3-broadway.vcxproj \
gdk3-broadway.vcxproj.filters \
gtk3-build-defines.props \
gtk3-copy-gdk-broadway.props \
gtk3-gen-srcs.props \
gtk3-ignore-broadway.props \
gtk3-install.props \
gtk3-version-paths.props
DISTCLEANFILES = $(EXTRA_DIST)
MSVC_VER = 16
MSVC_VER_LONG = 16
MSVC_TOOLSET = 142
MSVC_FORMAT_VER = 12
include $(top_srcdir)/build/Makefile-newvs.am
-include $(top_srcdir)/git.mk

View File

@@ -36,6 +36,7 @@ EXTRA_DIST += \
gtk3-icon-browser.vcprojin \
gailutil-3.vcprojin \
gtk3-install.vcproj \
gtk3-introspect.vcproj \
broadwayd.vcprojin \
gdk3-broadway.vcprojin \
gtk3-build-defines.vsprops \

View File

@@ -23,8 +23,8 @@ You will also need a Python 2.6+/3.x interpretor installed on your system,
which can be obtained from the official installers available from
http://www.python.org. Please note that the Python interpretor (python.exe)
either needs to be in your PATH before attempting the build of GTK+, or it
can be found in the path specified by PythonPath in gtk-version-paths.vsprops.
If you happen to change the PythonPath setting in gtk-version-paths.vsprops after
can be found in the path specified by PythonDir in gtk-version-paths.vsprops.
If you happen to change the PythonDir setting in gtk-version-paths.vsprops after
opening gtk+.sln with Visual Studio, you will need to close the gtk+.sln solution,
delete all the *.ncb, *.suo and *.user files before re-attempting the build.
@@ -80,6 +80,21 @@ built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into
project files higher in the stack are supposed to look for them, not
from a specific GLib source tree.
There is now a "gtk3-introspect" project that is used to build the
introspection files. In order for this to work, check that the paths for
PythonDir (32-bit builds) and PythonDirX64 (x64 builds) are correct for your
system. Note that it must be the same Python installation that was used to
build GObject-Introspection (G-I), and a complete G-I build/installation
needs to be found in <root>\vs9\<PlatformName>\, with the introspection files
for ATK, Pango and GDK-Pixbuf. Note also that this is not built by default,
so you will need to right-click on the project to build it, which will build
and "install" the other projects that are normally built, if those were not yet
built. The introspection files that are built will be "installed" to
<root>\vs9\<PlatformName>\share\gir-1.0 (the .gir file(s)) and
<root>\vs9\<PlatformName>\lib\girepository-1.0 (the .typelib files(s)) upon
successful build. for building this in a different configuration, therefore,
you will need to clean this project specifically and then rebuild.
Please note, as GTK+ uses the Adwaita theme for all platforms by default,
most icons used are not included with GTK+ (which *are* needed), so please see
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the

View File

@@ -89,6 +89,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
{9F22107A-3EF7-4B52-B269-747B65307F36} = {9F22107A-3EF7-4B52-B269-747B65307F36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-introspect", "gtk3-introspect.vcproj", "{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -325,6 +331,14 @@ Global
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|Win32.Build.0 = Release|Win32
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.ActiveCfg = Release|x64
{9F22107A-3EF7-4B52-B269-747B65307F36}.Release_Broadway|x64.Build.0 = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release|x64.ActiveCfg = Release|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{A8092C4E-0A21-4B1D-AC82-16764E418D1F}.Release_Broadway|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -162,96 +162,6 @@
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File RelativePath="..\..\..\gtk\gtkdbusinterfaces.xml">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSources)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ DBus Sources..."
CommandLine="$(GenerateGtkDbusBuiltSourcesX64)"
Outputs="..\..\..\gtk\gtkdbusgenerated.c;..\..\..\gtk\gtkdbusgenerated.h"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc.body">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying GTK+ Win32 Version Resource..."
CommandLine="$(CopyGtkWin32RC)"
Outputs="..\..\..\gtk\gtk-win32.rc"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\libgtk3.manifest.in">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Generating GTK+ Win32 Manifest..."
CommandLine="$(GenerateGtkWin32Manifest)"
Outputs="..\..\..\gtk\libgtk3.manifest"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gtk\gtk-win32.rc" />
<File RelativePath="..\..\..\gtk\libgtk3.manifest" />
</Filter>

View File

@@ -9,7 +9,7 @@
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include"
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\fribidi;$(GlibEtcInstallRoot)\include"
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;_USE_MATH_DEFINES"
ForcedIncludeFiles="msvc_recommended_pragmas.h"
AdditionalOptions="/MP"
@@ -45,7 +45,7 @@
/>
<UserMacro
Name="GtkGdkCommonLibs"
Value="imm32.lib"
Value="pangowin32-1.0.lib fribidi.lib imm32.lib"
/>
<UserMacro
Name="GdkBroadwayAdditionalLibs"
@@ -57,6 +57,14 @@
/>
<UserMacro
Name="GtkAdditionalLibs"
Value="atk-1.0.lib pangowin32-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
Value="atk-1.0.lib winspool.lib comctl32.lib $(GtkGdkCommonLibs)"
/>
<UserMacro
Name="GtkIntrospectNMakeCmd"
Value="cd ..&#x0D;&#x0A;set VCInstallDir=$(VCInstallDir)&#x0D;&#x0A;nmake -f gtk-introspection-msvc.mak CFG=$(ConfigurationName) PREFIX=$(GlibEtcInstallRoot)"
/>
<UserMacro
Name="GtkIntrospectBuiltFiles"
Value="$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir;$(SolutionDir)\$(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib"
/>
</VisualStudioPropertySheet>

View File

@@ -17,7 +17,7 @@ if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; goto DoDebug&#
:DoRelease&#x0D;&#x0A;
mkdir .\Release\$(PlatformName)\bin&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
copy /b $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib .\Release\$(PlatformName)\bin\&#x0D;&#x0A;
goto END&#x0D;&#x0A;

View File

@@ -47,7 +47,6 @@
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
@@ -80,7 +79,6 @@
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
@@ -113,7 +111,6 @@
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
@@ -146,7 +143,6 @@
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>

View File

@@ -6,76 +6,19 @@
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<UserMacro
Name="GenConfigH"
Value="
copy ..\..\..\config.h.win32 ..\..\..\config.h
"
Name="GenerateRequiredSourcesBase"
Value="cd ..&#x0D;&#x0A;set VCInstallDir=$(VCInstallDir)&#x0D;&#x0A;nmake -f generate-msvc.mak PREFIX=$(GlibEtcInstallRoot)"
/>
<UserMacro
Name="GenGdkConfigHWin32"
Value="
if exist ..\..\..\MSVC_$(ConfigurationName) goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
if exist ..\..\..\GDK_BROADWAY_BUILD del ..\..\..\GDK_BROADWAY_BUILD&#x0D;&#x0A;
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway del ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll del $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib del $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release&quot; del ..\..\..\MSVC_Debug&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug&quot; del ..\..\..\MSVC_Release&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32 ..\..\..\GDK_WIN32ONLY_BUILD&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
Name="GeneratedGdkSources"
Value="..\..\..\config.h;..\..\..\gdk\gdkconfig.h;..\..\gdk\gdkversionmacros.h;..\..\..\gdk\gdkmarshalers.h;..\..\..\gdk\gdkmarshalers.c;..\..\..\gdk\gdkresources.h;..\..\..\gdk\gdkresources.c"
/>
<UserMacro
Name="GenGdkConfigHBroadway"
Value="
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD&#x0D;&#x0A;
if exist ..\..\..\MSVC_Release del ..\..\..\MSVC_Release&#x0D;&#x0A;
if exist ..\..\..\MSVC_Debug del ..\..\..\MSVC_Debug&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; del ..\..\..\MSVC_Debug_Broadway&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; del ..\..\..\MSVC_Release_Broadway&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;&#x0A;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
Name="GeneratedGtkSources"
Value="..\..\..\gtk\gtk-win32.rc;..\..\..\gtk\libgtk3.manifest;..\..\..\gtk\gtkdbusgenerated.h;..\..\..\gtk\gtkdbusgenerated.c"
/>
<UserMacro
Name="GDbusCodeGenCmd"
Value="$(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSources"
Value="cd ..\..\..\gtk &amp; $(PythonPath)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="GenerateGtkDbusBuiltSourcesX64"
Value="cd ..\..\..\gtk &amp; $(PythonPathX64)\python $(GDbusCodeGenCmd) &amp; cd $(SolutionDir)"
/>
<UserMacro
Name="CopyGtkWin32RC"
Value="copy ..\..\..\gtk\gtk-win32.rc.body ..\..\..\gtk\gtk-win32.rc"
/>
<UserMacro
Name="GenerateGtkWin32Manifest"
Value="$(PythonPath)\python ..\replace.py --action=replace-var --input=..\..\..\gtk\libgtk3.manifest.in --output=..\..\..\gtk\libgtk3.manifest --var=EXE_MANIFEST_ARCHITECTURE --outstring=*"
/>
<UserMacro
Name="CopyDemosH"
Value="copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h"
Name="GeneratedDemoSources"
Value="..\..\..\demos\gtk-demo\demos.h"
/>
</VisualStudioPropertySheet>

View File

@@ -9,7 +9,9 @@
Name="GtkDoInstallBin"
Value="
mkdir $(CopyDir)\bin&#x0D;&#x0A;
mkdir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
mkdir $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
mkdir $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk-3$(GtkDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
@@ -37,6 +39,12 @@ copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir copy $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib copy $(ConfigurationName)\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_BIN&#x0D;&#x0A;
@@ -66,6 +74,12 @@ copy .\Release\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#
copy .\Release\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gdk-3.0.gir copy .\Release\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\GdkWin32-3.0.gir copy .\Release\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gtk-3.0.gir copy .\Release\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gdk-3.0.typelib copy .\Release\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\GdkWin32-3.0.typelib copy .\Release\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Release\$(PlatformName)\bin\Gtk-3.0.typelib copy .\Release\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_DEBUG&#x0D;&#x0A;
@@ -89,10 +103,18 @@ copy .\Debug\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gdk-3.0.gir copy .\Debug\$(PlatformName)\bin\Gdk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\GdkWin32-3.0.gir copy .\Debug\$(PlatformName)\bin\GdkWin32-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gtk-3.0.gir copy .\Debug\$(PlatformName)\bin\Gtk-3.0.gir $(CopyDir)\share\gir-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gdk-3.0.typelib copy .\Debug\$(PlatformName)\bin\Gdk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\GdkWin32-3.0.typelib copy .\Debug\$(PlatformName)\bin\GdkWin32-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
if exist .\Debug\$(PlatformName)\bin\Gtk-3.0.typelib copy .\Debug\$(PlatformName)\bin\Gtk-3.0.typelib $(CopyDir)\lib\girepository-1.0&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
copy ..\gdk-3.0.pc $(CopyDir)\lib\pkgconfig\gdk-win32-3.0.pc&#x0D;&#x0A;
copy &quot;..\gtk+-3.0.pc&quot; $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
copy &quot;..\gtk+-3.0.pc&quot; &quot;$(CopyDir)\lib\pkgconfig\gtk+-win32-3.0.pc&quot;&#x0D;&#x0A;
copy ..\gail-3.0.pc $(CopyDir)\lib\pkgconfig&#x0D;&#x0A;
"
/>
@@ -128,9 +150,10 @@ mkdir $(CopyDir)\share\icons\hicolor\256x256\apps&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\data\256x256\gtk3-demo.png $(CopyDir)\share\icons\hicolor\256x256\apps\&#x0D;&#x0A;
mkdir $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.EmojiChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
"
/>
@@ -154,10 +177,10 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
/>
<UserMacro
Name="GenerateGtkPC"
Value="$(PythonPath)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
Value="$(PythonDir)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=i686-pc-vs$(VSVer)"
/>
<UserMacro
Name="GenerateGtkPCX64"
Value="$(PythonPathX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
Value="$(PythonDirX64)\python ..\gtkpc.py --prefix=$(CopyDir) --version=$(GtkVersion) --host=x86_64-pc-vs$(VSVer)"
/>
</VisualStudioPropertySheet>

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk3-introspect"
ProjectGUID="{A8092C4E-0A21-4B1D-AC82-16764E418D1F}"
Keyword="MakeFileProj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParam) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64)"
ReBuildCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean all"
CleanCommandLine="$(GtkIntrospectNMakeCmd) $(IntrospectPythonParamX64) clean"
Output="$(GtkIntrospectBuiltFiles)"
/>
</Configuration>
</Configurations>
</VisualStudioProject>

View File

@@ -21,262 +21,127 @@
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Debug|x64"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Debug_Broadway|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Debug_Broadway|x64"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Debug BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Release|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
WholeProgramOptimization="1"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Release|x64"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
WholeProgramOptimization="1"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=$(ConfigurationName) $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Release_Broadway|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
WholeProgramOptimization="1"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
<Configuration
Name="Release_Broadway|x64"
ConfigurationType="10"
ConfigurationType="0"
InheritedPropertySheets=".\gtk3-gen-srcs.vsprops"
CharacterSet="2"
DeleteExtensionsOnClean=""
WholeProgramOptimization="1"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam)"
ReBuildCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean all"
CleanCommandLine="$(GenerateRequiredSourcesBase) CFG=Release BROADWAY=1 $(IntrospectPythonParam) clean"
Output="$(GeneratedGdkSources);$(GeneratedDemoSources);$(GeneratedGtkSources)"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File RelativePath="..\..\..\config.h.win32">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_Broadway|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_Broadway|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying config.h from config.h.win32..."
CommandLine="$(GenConfigH)"
Outputs="..\..\..\config.h"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gdk\gdkconfig.h.win32">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32..."
CommandLine="$(GenGdkConfigHWin32)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(ConfigurationName)"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32..."
CommandLine="$(GenGdkConfigHWin32)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(ConfigurationName)"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32..."
CommandLine="$(GenGdkConfigHWin32)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(ConfigurationName)"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32..."
CommandLine="$(GenGdkConfigHWin32)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_WIN32ONLY_BUILD;..\..\..\MSVC_$(ConfigurationName)"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\gdk\gdkconfig.h.win32_broadway">
<FileConfiguration Name="Debug_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32_broadway..."
CommandLine="$(GenGdkConfigHBroadway)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(ConfigurationName)_Broadway"
/>
</FileConfiguration>
<FileConfiguration Name="Release_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32_broadway..."
CommandLine="$(GenGdkConfigHBroadway)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(ConfigurationName)_Broadway"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_Broadway|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32_broadway..."
CommandLine="$(GenGdkConfigHBroadway)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(ConfigurationName)_Broadway"
/>
</FileConfiguration>
<FileConfiguration Name="Release_Broadway|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying gdkconfig.h from gdkconfig.h.win32_broadway..."
CommandLine="$(GenGdkConfigHBroadway)"
Outputs="..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(ConfigurationName)_Broadway"
/>
</FileConfiguration>
</File>
<File RelativePath="..\..\..\demos\gtk-demo\demos.h.win32">
<FileConfiguration Name="Debug|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_Broadway|Win32">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Debug_Broadway|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
<FileConfiguration Name="Release_Broadway|x64">
<Tool Name="VCCustomBuildTool"
Description="Copying demos.h from demos.h.win32..."
CommandLine="$(CopyDemosH)"
Outputs="..\..\..\demos\gtk-demo\demos.h"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -51,11 +51,19 @@
Value="$(GtkSeparateVSDllSuffix)"
/>
<UserMacro
Name="PythonPath"
Name="PythonDir"
Value="c:\python27"
/>
<UserMacro
Name="PythonPathX64"
Value="$(PythonPath).x64"
Name="PythonDirX64"
Value="$(PythonDir).x64"
/>
<UserMacro
Name="IntrospectPythonParam"
Value="PYTHON=$(PythonDir)\python.exe"
/>
<UserMacro
Name="IntrospectPythonParamX64"
Value="PYTHON=$(PythonDirX64)\python.exe"
/>
</VisualStudioPropertySheet>

283
config.h.meson Normal file
View File

@@ -0,0 +1,283 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#mesondefine ENABLE_NLS
/* The prefix for our gettext translation domains. */
#mesondefine GETTEXT_PACKAGE
/* Disable deprecation warnings from glib */
#mesondefine GLIB_DISABLE_DEPRECATION_WARNINGS
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#mesondefine HAVE_BIND_TEXTDOMAIN_CODESET
/* Define if libcloudproviders is available */
#mesondefine HAVE_CLOUDPROVIDERS
/* define if we have colord */
#mesondefine HAVE_COLORD
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#mesondefine HAVE_DCGETTEXT
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
*/
#mesondefine HAVE_DECL_ISINF
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
*/
#mesondefine HAVE_DECL_ISNAN
/* Define to 1 if you have the <dev/evdev/input.h> header file. */
#mesondefine HAVE_DEV_EVDEV_INPUT_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#mesondefine HAVE_DLFCN_H
/* Define to 1 if you have the `exp2' function. */
#mesondefine HAVE_EXP2
/* Define to 1 if you have the `flockfile' function. */
#mesondefine HAVE_FLOCKFILE
/* Define to 1 if you have the <ftw.h> header file. */
#mesondefine HAVE_FTW_H
/* Define to 1 if you have the `getpagesize' function. */
#mesondefine HAVE_GETPAGESIZE
/* Define to 1 if you have the `getresuid' function. */
#mesondefine HAVE_GETRESUID
/* Define if gio-unix is available */
#mesondefine HAVE_GIO_UNIX
/* defines whether we have HarfBuzz */
#mesondefine HAVE_HARFBUZZ
/* Define to 1 if you have the <inttypes.h> header file. */
#mesondefine HAVE_INTTYPES_H
/* Define to 1 if the system has the type `IPrintDialogCallback'. */
#mesondefine HAVE_IPRINTDIALOGCALLBACK
/* Define to 1 if you have the <linux/input.h> header file. */
#mesondefine HAVE_LINUX_INPUT_H
/* Define to 1 if you have the <linux/memfd.h> header file. */
#mesondefine HAVE_LINUX_MEMFD_H
/* Define to 1 if you have the `localtime_r' function. */
#mesondefine HAVE_LOCALTIME_R
/* Define to 1 if you have the `log2' function. */
#mesondefine HAVE_LOG2
/* Define to 1 if you have the `lstat' function. */
#mesondefine HAVE_LSTAT
/* Define to 1 if you have the `mallinfo' function. */
#mesondefine HAVE_MALLINFO
/* Define to 1 if you have the <memory.h> header file. */
#mesondefine HAVE_MEMORY_H
/* Define to 1 if you have the `mkstemp' function. */
#mesondefine HAVE_MKSTEMP
/* Define to 1 if you have a working `mmap' system call. */
#mesondefine HAVE_MMAP
/* Define to 1 if you have the `nearbyint' function. */
#mesondefine HAVE_NEARBYINT
/* defines whether we have pangoft2 */
#mesondefine HAVE_PANGOFT
/* Define to 1 if libpapi available */
#mesondefine HAVE_PAPI
/* Define to 1 if you have the `posix_fallocate' function. */
#mesondefine HAVE_POSIX_FALLOCATE
/* Have the Xrandr extension library */
#mesondefine HAVE_RANDR
/* Have the Xrandr 1.5 extension library */
#mesondefine HAVE_RANDR15
/* Define to 1 if you have the `rint' function. */
#mesondefine HAVE_RINT
/* Define to 1 if you have the `round' function. */
#mesondefine HAVE_ROUND
/* Define to 1 if SetupDiGetDevicePropertyW() is available */
#mesondefine HAVE_SETUP_DI_GET_DEVICE_PROPERTY_W
/* Define to 1 if you have the `sincos' function. */
#mesondefine HAVE_SINCOS
/* Define to 1 if solaris xinerama is available */
#mesondefine HAVE_SOLARIS_XINERAMA
/* Define to 1 if you have the <stdint.h> header file. */
#mesondefine HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#mesondefine HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#mesondefine HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#mesondefine HAVE_STRING_H
/* Define to 1 if you have the <sys/mman.h> header file. */
#mesondefine HAVE_SYS_MMAN_H
/* Define to 1 if you have the <sys/param.h> header file. */
#mesondefine HAVE_SYS_PARAM_H
/* Have the sysprof-capture library */
#mesondefine HAVE_SYSPROF_CAPTURE
/* Define to 1 if you have the <sys/stat.h> header file. */
#mesondefine HAVE_SYS_STAT_H
/* Define to 1 if sys/sysinfo.h is available */
#mesondefine HAVE_SYS_SYSINFO_H
/* Define to 1 if sys/systeminfo.h is available */
#mesondefine HAVE_SYS_SYSTEMINFO_H
/* Define to 1 if you have the <sys/time.h> header file. */
#mesondefine HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#mesondefine HAVE_SYS_TYPES_H
/* Define to 1 if you have the `trunc' function. */
#mesondefine HAVE_TRUNC
/* Define to 1 if you have the <unistd.h> header file. */
#mesondefine HAVE_UNISTD_H
/* Have the XCOMPOSITE X extension */
#mesondefine HAVE_XCOMPOSITE
/* Have the Xcursor library */
#mesondefine HAVE_XCURSOR
/* Have the XDAMAGE X extension */
#mesondefine HAVE_XDAMAGE
/* Have the XFIXES X extension */
#mesondefine HAVE_XFIXES
/* Define to 1 if XFree Xinerama is available */
#mesondefine HAVE_XFREE_XINERAMA
/* Have XGenericEvent */
#mesondefine HAVE_XGENERICEVENTS
/* Define to 1 if xinerama is available */
#mesondefine HAVE_XINERAMA
/* Define to use XKB extension */
#mesondefine HAVE_XKB
/* Have the SYNC extension library */
#mesondefine HAVE_XSYNC
/* Define to 1 if you have the `_lock_file' function. */
#mesondefine HAVE__LOCK_FILE
/* Define if _NL_MEASUREMENT_MEASUREMENT is available */
#mesondefine HAVE__NL_MEASUREMENT_MEASUREMENT
/* Define if _NL_PAPER_HEIGHT is available */
#mesondefine HAVE__NL_PAPER_HEIGHT
/* Define if _NL_PAPER_WIDTH is available */
#mesondefine HAVE__NL_PAPER_WIDTH
/* Define if _NL_TIME_FIRST_WEEKDAY is available */
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
/* Define to the address where bug reports for this package should be sent. */
#mesondefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#mesondefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#mesondefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#mesondefine PACKAGE_TARNAME
/* Define to the home page for this package. */
#mesondefine PACKAGE_URL
/* Define to the version of this package. */
#mesondefine PACKAGE_VERSION
/* Use NSBundle functions to determine load paths for libraries, translations,
etc. */
#mesondefine QUARTZ_RELOCATION
/* The size of `DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY', as computed by sizeof.
*/
#mesondefine SIZEOF_DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY
/* Define to 1 if XInput 2.0 is available */
#mesondefine XINPUT_2
/* Define to 1 if XInput 2.2 is available */
#mesondefine XINPUT_2_2
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#mesondefine _FILE_OFFSET_BITS
/* defines how to decorate public symbols while building */
#mesondefine _GDK_EXTERN
/* Define for large files, on AIX-style hosts. */
#mesondefine _LARGE_FILES
/* Define to 1 if on MINIX. */
#mesondefine _MINIX
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
#mesondefine _POSIX_1_SOURCE
/* Define to 1 if you need to in order for `stat' and other things to work. */
#mesondefine _POSIX_SOURCE
/* Define to `int' if <sys/types.h> doesn't define. */
#mesondefine gid_t
/* Define to `int' if <sys/types.h> doesn't define. */
#mesondefine uid_t
#mesondefine GTK_DATADIR
#mesondefine GTK_LIBDIR
#mesondefine GTK_PRINT_BACKENDS
/* Define the location where the catalogs will be installed */
#mesondefine GTK_LOCALEDIR
#mesondefine ISO_CODES_PREFIX

View File

@@ -26,12 +26,6 @@
/* define if we have colord */
/* #undef HAVE_COLORD */
/* Define to 1 if you have the <crt_externs.h> header file. */
/* #undef HAVE_CRT_EXTERNS_H */
/* Define to 1 if CUPS 1.2 API is available */
/* #undef HAVE_CUPS_API_1_2 */
/* Define to 1 if you have the `dcgettext' function. */
#define HAVE_DCGETTEXT 1
@@ -77,15 +71,6 @@
/* Define if gio-unix is available */
/* #undef HAVE_GIO_UNIX */
/* Have GNU ftw */
/* #undef HAVE_GNU_FTW */
/* Define to 1 if you have the `httpGetAuthString' function. */
/* #undef HAVE_HTTPGETAUTHSTRING */
/* Define if cups http_t authstring field is accessible */
/* #undef HAVE_HTTP_AUTHSTRING */
/* Define to 1 if you have the <inttypes.h> header file. */
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
#define HAVE_INTTYPES_H 1
@@ -157,9 +142,6 @@
/* Define to 1 if sincos() is available */
/* #undef HAVE_SINCOS */
/* Have the sockaddr_un.sun_len member */
/* #undef HAVE_SOCKADDR_UN_SUN_LEN */
/* Define to 1 if solaris xinerama is available */
/* #undef HAVE_SOLARIS_XINERAMA */
@@ -209,6 +191,11 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if trunc() is available */
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
# define HAVE_TRUNC 1
#endif
/* Define to 1 if you have the <unistd.h> header file. */
#ifndef _MSC_VER
#define HAVE_UNISTD_H 1
@@ -258,16 +245,10 @@
/* Define if _NL_TIME_FIRST_WEEKDAY is available */
/* #undef HAVE__NL_TIME_FIRST_WEEKDAY */
/* Define to 1 if you have the `_NSGetEnviron' function. */
/* #undef HAVE__NSGETENVIRON */
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define if <X11/extensions/XIproto.h> needed for xReply */
/* #undef NEED_XIPROTO_H_FOR_XREPLY */
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#ifndef _MSC_VER
/* #undef NO_MINUS_C_MINUS_O */

View File

@@ -9,9 +9,9 @@
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [22])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [1])
m4_define([gtk_minor_version], [24])
m4_define([gtk_micro_version], [17])
m4_define([gtk_interface_age], [13])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -42,8 +42,8 @@ m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_major], [2])
m4_define([glib_required_minor], [49])
m4_define([glib_required_micro], [4])
m4_define([glib_required_minor], [57])
m4_define([glib_required_micro], [2])
m4_define([glib_required_version],
[glib_required_major.glib_required_minor.glib_required_micro])
m4_define([glib_min_required_minor],
@@ -54,16 +54,17 @@ m4_define([glib_min_required_version], m4_join([_], [GLIB_VERSION], glib_require
m4_define([glib_max_allowed_version], m4_join([_], [GLIB_VERSION], glib_required_major, glib_max_allowed_minor))
GLIB_VERSION_CFLAGS="-DGLIB_MIN_REQUIRED_VERSION=glib_min_required_version -DGLIB_MAX_ALLOWED_VERSION=glib_max_allowed_version"
m4_define([pango_required_version], [1.37.3])
m4_define([pango_required_version], [1.41.0])
m4_define([fribidi_required_version], [0.19.7])
m4_define([atk_required_version], [2.15.1])
m4_define([cairo_required_version], [1.14.0])
m4_define([gdk_pixbuf_required_version], [2.30.0])
m4_define([introspection_required_version], [1.39.0])
m4_define([wayland_required_version], [1.9.91])
m4_define([wayland_protocols_required_version], [1.7])
m4_define([mirclient_required_version], [0.22.0])
m4_define([mircookie_required_version], [0.17.0])
m4_define([epoxy_required_version], [1.0])
m4_define([wayland_required_version], [1.14.91])
m4_define([wayland_protocols_required_version], [1.14])
m4_define([epoxy_required_version], [1.4])
m4_define([cloudproviders_required_version], [0.2.5])
m4_define([sysprof_required_version], [3.33.2])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
ATK_REQUIRED_VERSION=atk_required_version
@@ -81,7 +82,7 @@ AC_SUBST(INTROSPECTION_REQUIRED_VERSION)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
AM_INIT_AUTOMAKE([1.11 -Wall no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
AM_INIT_AUTOMAKE([1.11 -Wall subdir-objects no-define -Wno-portability tar-ustar no-dist-gzip dist-xz])
AM_MAINTAINER_MODE([enable])
# Support silent build rules. Disable
@@ -341,10 +342,16 @@ AC_ARG_ENABLE(wayland-backend,
[AS_HELP_STRING([--enable-wayland-backend],
[enable the wayland gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(mir-backend,
[AS_HELP_STRING([--enable-mir-backend],
[enable the Mir gdk backend])],
[backend_set=yes])
AC_ARG_ENABLE(cloudproviders,
[AS_HELP_STRING([--enable-cloudproviders],
[enable libcloudproviders integration])],
[cloudproviders_set=yes])
AC_ARG_ENABLE(profiler,
[AS_HELP_STRING([--enable-profiler],
[enable profiler integration])],
[enable_profiler=$enableval],
[enable_profiler=no])
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
@@ -352,7 +359,6 @@ if test -z "$backend_set"; then
else
enable_x11_backend=yes
enable_wayland_backend=maybe
enable_mir_backend=no
fi
fi
@@ -403,7 +409,7 @@ if test "x$enable_quartz_backend" = xyes; then
backend_immodules="$backend_immodules,quartz"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_QUARTZ"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -Wl,-framework,Cocoa"
DISABLE_ON_QUARTZ='%'
AM_CONDITIONAL(USE_QUARTZ, true)
if test "x$quartz_relocation" = xyes; then
@@ -453,10 +459,11 @@ if test "$enable_wayland_backend" = "yes"; then
GDK_BACKENDS="$GDK_BACKENDS wayland"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WAYLAND"
backend_immodules="$backend_immodules,wayland"
WAYLAND_PACKAGES="$WAYLAND_DEPENDENCIES"
AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no])
AS_IF([test "x$WAYLAND_SCANNER" = "xno"],
AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols]))
[AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])])
AC_SUBST([WAYLAND_SCANNER])
AM_CONDITIONAL(USE_WAYLAND, true)
@@ -464,30 +471,6 @@ else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
MIR_DEPENDENCIES="mirclient >= mirclient_required_version mircookie >= mircookie_required_version"
if test "$enable_mir_backend" = "maybe" ; then
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
if test "$have_mir_deps" = "no" ; then
enable_mir_backend=no
else
enable_mir_backend=yes
fi
AC_MSG_RESULT($enable_mir_backend)
fi
if test "$enable_mir_backend" = "yes"; then
cairo_backends="$cairo_backends cairo"
GDK_BACKENDS="$GDK_BACKENDS mir"
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_MIR"
MIR_PACKAGES="$MIR_DEPENDENCIES"
AM_CONDITIONAL(USE_MIR, true)
else
AM_CONDITIONAL(USE_MIR, false)
fi
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS#* }
@@ -578,6 +561,7 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
[glib-2.0 >= glib_required_version dnl
atk >= atk_required_version dnl
pango >= pango_required_version dnl
fribidi >= fribidi_required_version dnl
cairo >= cairo_required_version dnl
cairo-gobject >= cairo_required_version dnl
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
@@ -812,7 +796,13 @@ LIBS=$gtk_save_LIBS
AC_CHECK_HEADERS(linux/memfd.h,
AC_DEFINE(HAVE_LINUX_MEMFD_H, 1,
[Define to 1 if memfd.h is available]))
[Define to 1 if linux/memfd.h is available]))
AC_CHECK_HEADERS(linux/input.h,
AC_DEFINE(HAVE_LINUX_INPUT_H, 1,
[Define to 1 if linux/input.h is available]))
AC_CHECK_HEADERS(dev/evdev/input.h,
AC_DEFINE(HAVE_DEV_EVDEV_INPUT_H, 1,
[Define to 1 if dev/evdev/input.h is available]))
AC_CHECK_HEADERS(sys/mman.h,
AC_DEFINE(HAVE_SYS_MMAN_H, 1,
[Define to 1 if mman.h is available]))
@@ -826,19 +816,6 @@ AC_CHECK_HEADERS(ftw.h,
AC_DEFINE(HAVE_FTW_H, 1,
[Define to 1 if ftw.h is available]))
AC_MSG_CHECKING([for GNU ftw extensions])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include <ftw.h>]],
[[int flags = FTW_ACTIONRETVAL;]])],
[gtk_ok=yes],[gtk_ok=no])
if test $gtk_ok = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
else
AC_MSG_RESULT([no])
fi
#
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
@@ -863,15 +840,12 @@ AC_CHECK_FUNCS(mallinfo)
AC_CHECK_FUNCS(getresuid)
AC_TYPE_UID_T
# Check for round(), rint(), isnan(), isinf() and nearbyint()
# Check for round(), rint(), isnan() and isinf()
# Check for log2(), exp2(), nearbyint() and trunc()
AC_CHECK_LIB(m,round,,)
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2)
AC_CHECK_FUNCS(round rint nearbyint sincos exp2 log2 trunc)
AC_CHECK_DECLS([isnan, isinf], [], [], [[#include <math.h>]])
# Checks for gdkspawn
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)
AC_MSG_CHECKING(whether to build dynamic modules)
AC_ARG_ENABLE(modules,
@@ -984,6 +958,7 @@ AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
AM_CONDITIONAL(INCLUDE_IM_WAYLAND, [test x"$INCLUDE_wayland" = xyes])
# Checks to see whether we should include mediaLib
# support.
@@ -1070,17 +1045,6 @@ if test "x$enable_x11_backend" = xyes; then
AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
# Check if <X11/extensions/XIproto.h> is needed for xReply.
AC_CHECK_TYPE([xReply], ,
[AC_CHECK_TYPE([xReply],
[AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
[Define if <X11/extensions/XIproto.h> needed for xReply])],
[AC_MSG_ERROR([xReply type unavailable. X11 is too old])],
[[#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>]])],
[[#include <X11/Xlibint.h>]])
# Check for XKB support.
if test "x$enable_xkb" = "xyes"; then
@@ -1341,11 +1305,41 @@ else
LIBS="$gtk_save_LIBS"
fi
# Check for libcloudproviders
CLOUDPROVIDER_PACKAGES=""
if test "x$cloudproviders_set" = "xyes"; then
CLOUDPROVIDER_PACKAGES="cloudproviders >= cloudproviders_required_version"
if $PKG_CONFIG --exists $CLOUDPROVIDER_PACKAGES ; then
AC_DEFINE(HAVE_CLOUDPROVIDERS, [1],
[Define if libcloudproviders is available]
)
else
AC_MSG_ERROR([
*** libcloudproviders not found.])
fi
fi
# Check for profiler support
PROFILER_PACKAGES=""
if test "x$enable_profiler" = "xyes"; then
PROFILER_PACKAGES="sysprof-capture-3 >= sysprof_required_version"
if $PKG_CONFIG --exists $PROFILER_PACKAGES; then
AC_DEFINE(HAVE_SYSPROF_CAPTURE, [1],
[Define if sysprof-capture-3 is available]
)
else
AC_MSG_ERROR([
*** sysprof-capture-3 not found.])
fi
fi
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES $cairo_backends epoxy >= epoxy_required_version"
GDK_PRIVATE_PACKAGES="$GDK_GIO_PACKAGE $X_PACKAGES $WAYLAND_PACKAGES $cairo_backends epoxy >= epoxy_required_version $CLOUDPROVIDER_PACKAGES $PROFILER_PACKAGES fribidi >= fribidi_required_version"
PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
@@ -1379,7 +1373,7 @@ fi
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES epoxy >= epoxy_required_version fribidi >= fribidi_required_version"
if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
fi
@@ -1397,6 +1391,22 @@ if test x"$os_win32" = xyes; then
GTK_EXTRA_CFLAGS="$msnative_struct"
fi
##################################################
# Check for harfbuzz and pangoft2
##################################################
PKG_CHECK_MODULES(GTK_FONT_CHOOSER_WIDGET,
harfbuzz >= 0.9 pangoft2,
build_font_demo=yes,
build_font_demo=no)
AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ])
if test "x$build_font_demo" = xyes; then
AC_DEFINE([HAVE_HARFBUZZ], 1, [defines whether we have HarfBuzz])
AC_DEFINE([HAVE_PANGOFT], 1, [defines whether we have pangoft2])
GTK_DEP_CFLAGS="$GTK_DEP_CFLAGS $GTK_FONT_CHOOSER_WIDGET_CFLAGS"
GTK_DEP_LIBS="$GTK_DEP_LIBS $GTK_FONT_CHOOSER_WIDGET_LIBS"
fi
if $PKG_CONFIG --exists x11; then
X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
elif test x"$prefix" != xNONE; then
@@ -1405,10 +1415,48 @@ else
X11_PREFIX="$ac_default_prefix"
fi
AC_ARG_ENABLE(win32-gles,
[AS_HELP_STRING([--enable-win32-gles],
[enable OpenGL ES rendering in Win32 backend, disabled by default])],
[win32_gles=yes],
[win32_gles=no])
if test x"$enable_win32_backend" = xyes; then
AC_MSG_CHECKING(WGL support in epoxy)
WGL_SUPPORT="`$PKG_CONFIG --variable=epoxy_has_wgl epoxy`"
if test x"$WGL_SUPPORT" = x1; then
AC_MSG_RESULT([supported])
else
AC_MSG_ERROR([
*** epoxy was not built with WGL support or epoxy version is too old.
*** WGL support in epoxy is enabled by default for all Windows builds,
*** and is used by GTK+ uncondititonally. If it is not there, then
*** something is very wrong.
])
fi
if test x"$win32_gles" = xyes; then
AC_MSG_CHECKING(EGL support in epoxy)
EGL_SUPPORT="`$PKG_CONFIG --variable=epoxy_has_egl epoxy`"
if test x"$EGL_SUPPORT" = x1; then
AC_MSG_RESULT([supported])
else
AC_MSG_ERROR([
*** epoxy was not built with EGL support or epoxy version is too old.
*** EGL support in epoxy is disabled by default in Windows builds,
*** you might need to rebuild epoxy with explicit --enable-egl=yes.
*** EGL support is needed for OpenGL ES rendering.
])
fi
fi
fi
AM_CONDITIONAL(WIN32_GLES, test x"$platform_win32" = xyes -a x"$win32_gles" = xyes)
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
ISO_CODES_PREFIX="`$PKG_CONFIG --variable=prefix iso-codes`"
AC_SUBST(GTK_PACKAGES)
AC_SUBST(GTK_PRIVATE_PACKAGES)
@@ -1422,6 +1470,7 @@ AC_SUBST(GLIB_PREFIX)
AC_SUBST(ATK_PREFIX)
AC_SUBST(PANGO_PREFIX)
AC_SUBST(CAIRO_PREFIX)
AC_SUBST(ISO_CODES_PREFIX)
AC_SUBST(GTK_DEBUG_FLAGS)
AC_SUBST(GTK_XIM_FLAGS)
@@ -1429,37 +1478,6 @@ AC_SUBST(GTK_XIM_FLAGS)
GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
AC_SUBST(GDK_PIXBUF_LIBS)
########################
# Checks needed for gail
########################
old_LIBS="$LIBS"
dnl Checks for inet libraries:
AC_SEARCH_LIBS(gethostent, nsl)
AC_SEARCH_LIBS(setsockopt, socket)
AC_SEARCH_LIBS(connect, inet)
dnl check for the sockaddr_un.sun_len member
AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
[struct_sockaddr_un_sun_len=true],
[struct_sockaddr_un_suin_len=false],
[#include <sys/types.h>
#include <sys/un.h>]
)
case $struct_sockaddr_un_sun_len in
true)
AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
[Have the sockaddr_un.sun_len member])
;;
*)
;;
esac
GAIL_INET_LIBS="$LIBS"
AC_SUBST([GAIL_INET_LIBS])
LIBS="$old_LIBS"
################################################################
# Printing system checks
################################################################
@@ -1487,19 +1505,13 @@ else
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
CUPS_LIBS=`$CUPS_CONFIG --libs`
CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
CUPS_API_VERSION=`$CUPS_CONFIG --version`
CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
if test $CUPS_API_MAJOR -lt 1 -o \
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 2; then
AC_MSG_ERROR([CUPS >= 1.2 not found])
fi
if test $CUPS_API_MAJOR -gt 1 -o \
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
[Define to 1 if CUPS 1.6 API is available])
have_cups_api_1_6=yes
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 7; then
AC_MSG_ERROR([CUPS >= 1.7 not found])
fi
AC_SUBST(CUPS_API_MAJOR)
@@ -1512,22 +1524,6 @@ else
PRINT_BACKENDS="$PRINT_BACKENDS cups"
AM_CONDITIONAL(HAVE_CUPS, true)
have_cups=yes
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cups/http.h>]],
[[http_t http; char *s = http.authstring;]])],
[AC_DEFINE([HAVE_HTTP_AUTHSTRING], [],
[Define if cups http_t authstring field is accessible])],
[])
CFLAGS="$gtk_save_cflags"
AC_SUBST(HAVE_HTTP_AUTHSTRING)
gtk_save_libs="$LIBS"
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
fi
fi
@@ -1709,15 +1705,6 @@ if test "$have_colord" = "yes"; then
fi
AM_CONDITIONAL(HAVE_COLORD, test "x$have_colord" = "xyes")
##################################################
# Check for harfbuzz and pangoft2
##################################################
PKG_CHECK_MODULES(FONTDEMO, harfbuzz >= 0.9 pangoft2, build_font_demo=yes, build_font_demo=no)
AC_SUBST(FONTDEMO_CFLAGS)
AC_SUBST(FONTDEMO_LIBS)
AM_CONDITIONAL(BUILD_FONT_DEMO, [ test "x$build_font_demo" = xyes ])
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
@@ -1799,7 +1786,7 @@ case "$host" in
SAVED_CFLAGS="${CFLAGS}"
CFLAGS="-fvisibility=hidden"
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
AC_TRY_COMPILE([], [int main (void) { return 0; }],
AC_TRY_COMPILE([], [return 0],
AC_MSG_RESULT(yes)
enable_fvisibility_hidden=yes,
AC_MSG_RESULT(no)
@@ -1815,6 +1802,14 @@ case "$host" in
esac
AC_SUBST(GDK_HIDDEN_VISIBILITY_CFLAGS)
##################################################
# Theming
##################################################
AC_PATH_PROG([SASSC], [sassc])
AC_ARG_VAR(SASSC)
AM_CONDITIONAL([REBUILD_SCSS], [test "x$SASSC" != x])
##################################################
# Output commands
##################################################
@@ -1872,8 +1867,7 @@ AC_ARG_ENABLE(Bsymbolic,
[SAVED_LDFLAGS="${LDFLAGS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
[[int main (void) { return 0; }]])],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])],
[AC_MSG_RESULT(yes)
enable_Bsymbolic=yes],
[AC_MSG_RESULT(no)
@@ -1885,6 +1879,13 @@ if test "x${enable_Bsymbolic}" = "xyes" ; then
fi
AC_SUBST(GTK_LINK_FLAGS)
dnl
dnl Check whether MSVC toolset is explicitly set
dnl
AM_CONDITIONAL(MSVC_BASE_NO_TOOLSET_SET, [test x$MSVC_BASE_TOOLSET = x])
AM_CONDITIONAL(MSVC_NO_TOOLSET_SET, [test x$MSVC_TOOLSET = x])
AC_CONFIG_FILES([
README
INSTALL
@@ -1935,11 +1936,13 @@ docs/reference/gdk/version.xml
docs/reference/gtk/Makefile
docs/reference/gtk/gtk3.types
docs/reference/gtk/version.xml
docs/reference/gtk/getting_started.xml
docs/reference/libgail-util/Makefile
docs/reference/libgail-util/version.xml
docs/tools/Makefile
build/Makefile
build/win32/Makefile
build/win32/config-msvc.mak
build/win32/vs9/Makefile
build/win32/vs9/gtk3-version-paths.vsprops
build/win32/vs10/Makefile
@@ -1947,6 +1950,8 @@ build/win32/vs10/gtk3-version-paths.props
build/win32/vs11/Makefile
build/win32/vs12/Makefile
build/win32/vs14/Makefile
build/win32/vs15/Makefile
build/win32/vs16/Makefile
gdk/Makefile
gdk/broadway/Makefile
gdk/x11/Makefile
@@ -1955,7 +1960,6 @@ gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/quartz/Makefile
gdk/wayland/Makefile
gdk/mir/Makefile
gdk/gdkversionmacros.h
gtk/Makefile
gtk/makefile.msc
@@ -1995,3 +1999,4 @@ echo " colord support: $have_colord"
echo " Introspection: $found_introspection"
echo " Debugging: $enable_debug"
echo " Documentation: $enable_gtk_doc"
echo " Profiler: $enable_profiler"

View File

@@ -3,4 +3,7 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = gtk-demo widget-factory icon-browser
EXTRA_DIST += \
meson.build
-include $(top_srcdir)/git.mk

View File

@@ -27,6 +27,7 @@ demos_base = \
event_axes.c \
expander.c \
filtermodel.c \
fishbowl.c \
foreigndrawing.c \
gestures.c \
glarea.c \
@@ -47,6 +48,7 @@ demos_base = \
offscreen_window2.c \
overlay.c \
overlay2.c \
paint.c \
panes.c \
pickers.c \
pixbufs.c \
@@ -63,6 +65,7 @@ demos_base = \
spinbutton.c \
spinner.c \
stack.c \
tabs.c \
textmask.c \
textview.c \
textscroll.c \
@@ -101,11 +104,6 @@ LDADDS = \
$(GDK_DEP_LIBS) \
-lm
if BUILD_FONT_DEMO
AM_CPPFLAGS += $(FONTDEMO_CFLAGS)
LDADDS += $(FONTDEMO_LIBS)
endif
bin_PROGRAMS = gtk3-demo gtk3-demo-application
desktopdir = $(datadir)/applications
@@ -119,7 +117,9 @@ EXTRA_DIST += \
demo.gresource.xml \
$(resource_files) \
org.gtk.Demo.gschema.xml \
demos.h.win32
demos.h.win32 \
meson.build \
geninclude.py
gsettings_SCHEMAS = \
org.gtk.Demo.gschema.xml
@@ -136,6 +136,8 @@ nodist_gtk3_demo_SOURCES = demos.h
gtk3_demo_SOURCES = \
$(demos) \
gtkfishbowl.c \
gtkfishbowl.h \
demo_resources.c \
main.c
@@ -149,7 +151,7 @@ gtk3_demo_application_SOURCES = \
gtk3_demo_application_LDADD = $(LDADDS)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(builddir)/demo.gresource.xml)
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/demo.gresource.xml)
demo_resources.c: demo.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $(srcdir)/demo.gresource.xml

View File

@@ -151,7 +151,7 @@ query_for_toplevel (GdkScreen *screen,
g_object_unref (cursor);
gtk_widget_destroy (popup);
gdk_flush (); /* Really release the grab */
gdk_display_flush (display); /* Really release the grab */
return toplevel;
}

View File

@@ -144,7 +144,7 @@ create_capital_store (void)
{ NULL, "Jackson" },
{ NULL, "Jefferson City" },
{ NULL, "Juneau" },
{ "K - O" },
{ "K - O", NULL },
{ NULL, "Lansing" },
{ NULL, "Lincoln" },
{ NULL, "Little Rock" },
@@ -154,7 +154,7 @@ create_capital_store (void)
{ NULL, "Nashville" },
{ NULL, "Oklahoma City" },
{ NULL, "Olympia" },
{ NULL, "P - S" },
{ "P - S", NULL },
{ NULL, "Phoenix" },
{ NULL, "Pierre" },
{ NULL, "Providence" },

View File

@@ -94,6 +94,11 @@
<file>zoom_in_cursor.png</file>
<file>zoom_out_cursor.png</file>
</gresource>
<gresource prefix="/fishbowl">
<file>fishbowl.ui</file>
<file>gtkfishbowl.c</file>
<file>gtkfishbowl.h</file>
</gresource>
<gresource prefix="/iconview">
<file preprocess="to-pixdata">gnome-fs-directory.png</file>
<file preprocess="to-pixdata">gnome-fs-regular.png</file>
@@ -150,6 +155,7 @@
<file>event_axes.c</file>
<file>expander.c</file>
<file>filtermodel.c</file>
<file>fishbowl.c</file>
<file>flowbox.c</file>
<file>foreigndrawing.c</file>
<file>font_features.c</file>
@@ -171,6 +177,7 @@
<file>offscreen_window2.c</file>
<file>overlay.c</file>
<file>overlay2.c</file>
<file>paint.c</file>
<file>pagesetup.c</file>
<file>panes.c</file>
<file>pickers.c</file>
@@ -188,6 +195,7 @@
<file>stack.c</file>
<file>spinbutton.c</file>
<file>spinner.c</file>
<file>tabs.c</file>
<file>textview.c</file>
<file>textscroll.c</file>
<file>theming_style_classes.c</file>

269
demos/gtk-demo/fishbowl.c Normal file
View File

@@ -0,0 +1,269 @@
/* Benchmark/Fishbowl
*
* This demo models the fishbowl demos seen on the web in a GTK way.
* It's also a neat little tool to see how fast your computer (or
* your GTK version) is.
*/
#include <gtk/gtk.h>
#include "gtkfishbowl.h"
const char *const css =
".blurred-button {"
" box-shadow: 0px 0px 5px 10px rgba(0, 0, 0, 0.5);"
"}"
"";
char **icon_names = NULL;
gsize n_icon_names = 0;
static void
init_icon_names (GtkIconTheme *theme)
{
GPtrArray *icons;
GList *l, *icon_list;
if (icon_names)
return;
icon_list = gtk_icon_theme_list_icons (theme, NULL);
icons = g_ptr_array_new ();
for (l = icon_list; l; l = l->next)
{
if (g_str_has_suffix (l->data, "symbolic"))
continue;
g_ptr_array_add (icons, g_strdup (l->data));
}
n_icon_names = icons->len;
g_ptr_array_add (icons, NULL); /* NULL-terminate the array */
icon_names = (char **) g_ptr_array_free (icons, FALSE);
/* don't free strings, we assigned them to the array */
g_list_free_full (icon_list, g_free);
}
static const char *
get_random_icon_name (GtkIconTheme *theme)
{
init_icon_names (theme);
return icon_names[g_random_int_range(0, n_icon_names)];
}
GtkWidget *
create_icon (void)
{
GtkWidget *image;
image = gtk_image_new_from_icon_name (get_random_icon_name (gtk_icon_theme_get_default ()), GTK_ICON_SIZE_DND);
return image;
}
static GtkWidget *
create_button (void)
{
return gtk_button_new_with_label ("Button");
}
static GtkWidget *
create_blurred_button (void)
{
GtkWidget *w = gtk_button_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (w), "blurred-button");
return w;
}
static GtkWidget *
create_font_button (void)
{
return gtk_font_button_new ();
}
static GtkWidget *
create_level_bar (void)
{
GtkWidget *w = gtk_level_bar_new_for_interval (0, 100);
gtk_level_bar_set_value (GTK_LEVEL_BAR (w), 50);
/* Force them to be a bit larger */
gtk_widget_set_size_request (w, 200, -1);
return w;
}
static GtkWidget *
create_spinner (void)
{
GtkWidget *w = gtk_spinner_new ();
gtk_spinner_start (GTK_SPINNER (w));
return w;
}
static GtkWidget *
create_spinbutton (void)
{
GtkWidget *w = gtk_spin_button_new_with_range (0, 10, 1);
return w;
}
static GtkWidget *
create_label (void)
{
GtkWidget *w = gtk_label_new ("pLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
gtk_label_set_line_wrap (GTK_LABEL (w), TRUE);
gtk_label_set_max_width_chars (GTK_LABEL (w), 100);
return w;
}
#if 0
static GtkWidget *
create_gears (void)
{
GtkWidget *w = gtk_gears_new ();
gtk_widget_set_size_request (w, 100, 100);
return w;
}
#endif
static GtkWidget *
create_switch (void)
{
GtkWidget *w = gtk_switch_new ();
gtk_switch_set_state (GTK_SWITCH (w), TRUE);
return w;
}
static const struct {
const char *name;
GtkWidget * (*create_func) (void);
} widget_types[] = {
{ "Icon", create_icon },
{ "Button", create_button },
{ "Blurbutton", create_blurred_button },
{ "Fontbutton", create_font_button },
{ "Levelbar", create_level_bar },
{ "Label", create_label },
{ "Spinner", create_spinner },
{ "Spinbutton", create_spinbutton },
// { "Gears", create_gears },
{ "Switch", create_switch },
};
static int selected_widget_type = -1;
static const int N_WIDGET_TYPES = G_N_ELEMENTS (widget_types);
static void
set_widget_type (GtkFishbowl *fishbowl,
int widget_type_index)
{
GtkWidget *window, *headerbar;
if (widget_type_index == selected_widget_type)
return;
selected_widget_type = widget_type_index;
gtk_fishbowl_set_creation_func (fishbowl,
widget_types[selected_widget_type].create_func);
window = gtk_widget_get_toplevel (GTK_WIDGET (fishbowl));
headerbar = gtk_window_get_titlebar (GTK_WINDOW (window));
gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar),
widget_types[selected_widget_type].name);
}
void
next_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
GtkFishbowl *fishbowl = user_data;
int new_index;
if (selected_widget_type + 1 >= N_WIDGET_TYPES)
new_index = 0;
else
new_index = selected_widget_type + 1;
set_widget_type (fishbowl, new_index);
}
void
prev_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
GtkFishbowl *fishbowl = user_data;
int new_index;
if (selected_widget_type - 1 < 0)
new_index = N_WIDGET_TYPES - 1;
else
new_index = selected_widget_type - 1;
set_widget_type (fishbowl, new_index);
}
GtkWidget *
do_fishbowl (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
static GtkCssProvider *provider = NULL;
if (provider == NULL)
{
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_data (provider, css, -1, NULL);
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
if (!window)
{
GtkBuilder *builder;
GtkWidget *bowl;
g_type_ensure (GTK_TYPE_FISHBOWL);
builder = gtk_builder_new_from_resource ("/fishbowl/fishbowl.ui");
gtk_builder_add_callback_symbols (builder,
"next_button_clicked_cb", G_CALLBACK (next_button_clicked_cb),
"prev_button_clicked_cb", G_CALLBACK (prev_button_clicked_cb),
NULL);
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
set_widget_type (GTK_FISHBOWL (bowl), 0);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_widget_realize (window);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
return window;
}

119
demos/gtk-demo/fishbowl.ui Normal file
View File

@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkWindow" id="window">
<property name="title" translatable="yes">Fishbowl</property>
<child type="titlebar">
<object class="GtkHeaderBar" id="">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<child>
<object class="GtkImage">
<property name="icon-name">pan-start-symbolic</property>
<property name="visible">True</property>
</object>
</child>
<signal name="clicked" handler="prev_button_clicked_cb" object="bowl" swapped="no"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<child>
<object class="GtkImage">
<property name="icon-name">pan-end-symbolic</property>
<property name="visible">True</property>
</object>
</child>
<signal name="clicked" handler="next_button_clicked_cb" object="bowl" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">fps</property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" bind-source="bowl" bind-property="framerate"/>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Icons, </property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label" bind-source="bowl" bind-property="count"/>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="changes_allow">
<property name="visible" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean"/>
<property name="relief">none</property>
<child>
<object class="GtkImage">
<property name="icon-name">changes-allow</property>
<property name="visible">True</property>
</object>
</child>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<object class="GtkToggleButton" id="changes_prevent">
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
<property name="relief">none</property>
<child>
<object class="GtkImage">
<property name="icon-name">changes-prevent</property>
<property name="visible">True</property>
</object>
</child>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkFishbowl" id="bowl">
<property name="visible">True</property>
<property name="animating">True</property>
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
</object>
</child>
</object>
</interface>

View File

@@ -836,7 +836,7 @@ draw_spinbutton (GtkWidget *widget,
/* This information is taken from the GtkSpinButton docs, see "CSS nodes" */
spin_context = get_style (NULL, "spinbutton.horizontal:focus");
entry_context = get_style (NULL, "entry:focus");
entry_context = get_style (spin_context, "entry:focus");
up_context = get_style (spin_context, "button.up:focus:active");
down_context = get_style (spin_context, "button.down:focus");

108
demos/gtk-demo/geninclude.py Executable file
View File

@@ -0,0 +1,108 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import re
import os
from collections import *
out_file = sys.argv[1]
in_files = sys.argv[2:]
file_output = """
typedef GtkWidget *(*GDoDemoFunc) (GtkWidget *do_widget);
typedef struct _Demo Demo;
struct _Demo
{
gchar *name;
gchar *title;
gchar *filename;
GDoDemoFunc func;
Demo *children;
};
"""
# Demo = namedtuple('Demo', ['name', 'title', 'file', 'func'])
demos = []
for demo_file in in_files:
filename = demo_file[demo_file.rfind('/')+1:]
demo_name = filename.replace(".c", "")
with open(demo_file, 'r', encoding='utf-8') as f:
title = f.readline().replace("/*", "").strip()
file_output += "GtkWidget *do_" + demo_name + " (GtkWidget *do_widget);\n"
# demos += Demo(name = demo_name,
# title = title,
# file = demo_file,
# func = "do_" + title)
demos.append((demo_name, title, filename, "do_" + demo_name, -1))
# Generate a List of "Parent names"
parents = []
parent_ids = []
parent_index = 0
for demo in demos:
if "/" in demo[1]:
slash_index = demo[1].index('/')
parent_name = demo[1][:slash_index]
do_break = False
# Check for duplicates
if not parent_name in parents:
parents.append(parent_name)
parent_ids.append(parent_index)
demos.append(("NULL", parent_name, "NULL", "NULL", parent_index))
parent_index = parent_index + 1
# For every child with a parent, generate a list of child demos
i = 0
for parent in parents:
id = parent_ids[i]
file_output += "\nDemo child" + str(id) + "[] = {\n"
# iterate over all demos and check if the name starts with the given parent name
for child in demos:
if child[1].startswith(parent + "/"):
title = child[1][child[1].rfind('/') + 1:]
file_output += " { \"" + child[0] + "\", \"" + title + "\", \"" + child[2] + "\", " + child[3] + ", NULL },\n"
file_output += " { NULL }\n};\n"
i = i + 1
# Sort demos by title
demos = sorted(demos, key=lambda x: x[1])
file_output += "\nDemo gtk_demos[] = {\n"
for demo in demos:
# Do not generate one of these for demos with a parent demo
if "/" not in demo[1]:
child_array = "NULL"
name = demo[0];
title = demo[1];
file = demo[2]
if name != "NULL":
name = "\"" + name + "\""
if title != "NULL":
title = "\"" + title + "\""
if file != "NULL":
file = "\"" + file + "\""
if demo[4] != -1:
child_array = "child" + str(demo[4])
file_output += " { " + name + ", " + title + ", " + file + ", " + demo[3] + ", " + child_array + " },\n"
file_output += " { NULL }\n};\n"
ofile = open(out_file, "w", encoding="utf-8")
ofile.write(file_output)
ofile.close()

View File

@@ -13,6 +13,17 @@ static gdouble swipe_x = 0;
static gdouble swipe_y = 0;
static gboolean long_pressed = FALSE;
static gboolean
touchpad_swipe_gesture_begin (GtkGesture *gesture,
GdkEventSequence *sequence,
GtkWidget *widget)
{
/* Disallow touchscreen events here */
if (sequence != NULL)
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
return sequence == NULL;
}
static void
swipe_gesture_swept (GtkGestureSwipe *gesture,
gdouble velocity_x,
@@ -85,11 +96,12 @@ drawing_area_draw (GtkWidget *widget,
cairo_pattern_t *pat;
cairo_matrix_t matrix;
gdouble angle, scale;
gdouble x_center, y_center;
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
cairo_get_matrix (cr, &matrix);
cairo_matrix_translate (&matrix,
allocation.width / 2,
allocation.height / 2);
cairo_matrix_translate (&matrix, x_center, y_center);
cairo_save (cr);
@@ -161,6 +173,19 @@ do_gestures (GtkWidget *do_widget)
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* 3fg swipe for touchpads */
gesture = g_object_new (GTK_TYPE_GESTURE_SWIPE,
"widget", drawing_area,
"n-points", 3,
NULL);
g_signal_connect (gesture, "begin",
G_CALLBACK (touchpad_swipe_gesture_begin), drawing_area);
g_signal_connect (gesture, "swipe",
G_CALLBACK (swipe_gesture_swept), drawing_area);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Long press */
gesture = gtk_gesture_long_press_new (drawing_area);
g_signal_connect (gesture, "pressed",

View File

@@ -1,7 +1,7 @@
precision highp float;
precision mediump float;
void main() {
float lerpVal = gl_FragCoord.y / 500.0f;
float lerpVal = gl_FragCoord.y / 500.0;
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);
}

View File

@@ -333,7 +333,7 @@ create_axis_slider (int axis)
GtkAdjustment *adj;
const char *text;
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
switch (axis)
{

View File

@@ -0,0 +1,714 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include "gtkfishbowl.h"
#include "gtk/fallback-c89.c"
typedef struct _GtkFishbowlPrivate GtkFishbowlPrivate;
typedef struct _GtkFishbowlChild GtkFishbowlChild;
struct _GtkFishbowlPrivate
{
GtkFishCreationFunc creation_func;
GList *children;
guint count;
gint64 last_frame_time;
gint64 update_delay;
guint tick_id;
double framerate;
int last_benchmark_change;
guint benchmark : 1;
};
struct _GtkFishbowlChild
{
GtkWidget *widget;
double x;
double y;
double dx;
double dy;
};
enum {
PROP_0,
PROP_ANIMATING,
PROP_BENCHMARK,
PROP_COUNT,
PROP_FRAMERATE,
PROP_UPDATE_DELAY,
NUM_PROPERTIES
};
static GParamSpec *props[NUM_PROPERTIES] = { NULL, };
G_DEFINE_TYPE_WITH_PRIVATE (GtkFishbowl, gtk_fishbowl, GTK_TYPE_CONTAINER)
static void
gtk_fishbowl_init (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
gtk_widget_set_has_window (GTK_WIDGET (fishbowl), FALSE);
priv->update_delay = G_USEC_PER_SEC;
}
/**
* gtk_fishbowl_new:
*
* Creates a new #GtkFishbowl.
*
* Returns: a new #GtkFishbowl.
*/
GtkWidget*
gtk_fishbowl_new (void)
{
return g_object_new (GTK_TYPE_FISHBOWL, NULL);
}
static void
gtk_fishbowl_get_preferred_width (GtkWidget *widget,
int *minimum,
int *natural)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *children;
gint child_min, child_nat;
*minimum = 0;
*natural = 0;
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_get_preferred_width (child->widget, &child_min, &child_nat);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
}
static void
gtk_fishbowl_get_preferred_height (GtkWidget *widget,
int *minimum,
int *natural)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *children;
gint child_min, child_nat;
*minimum = 0;
*natural = 0;
for (children = priv->children; children; children = children->next)
{
int min_width;
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_get_preferred_width (child->widget, &min_width, NULL);
gtk_widget_get_preferred_height_for_width (child->widget, min_width, &child_min, &child_nat);
*minimum = MAX (*minimum, child_min);
*natural = MAX (*natural, child_nat);
}
}
static void
gtk_fishbowl_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GtkAllocation child_allocation;
GtkRequisition child_requisition;
GList *children;
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (!gtk_widget_get_visible (child->widget))
continue;
gtk_widget_get_preferred_size (child->widget, &child_requisition, NULL);
child_allocation.x = allocation->x + round (child->x * (allocation->width - child_requisition.width));
child_allocation.y = allocation->y + round (child->y * (allocation->height - child_requisition.height));
child_allocation.width = child_requisition.width;
child_allocation.height = child_requisition.height;
gtk_widget_size_allocate (child->widget, &child_allocation);
}
}
static double
new_speed (void)
{
/* 5s to 50s to cross screen seems fair */
return g_random_double_range (0.02, 0.2);
}
static void
gtk_fishbowl_add (GtkContainer *container,
GtkWidget *widget)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child_info;
g_return_if_fail (GTK_IS_FISHBOWL (fishbowl));
g_return_if_fail (GTK_IS_WIDGET (widget));
child_info = g_new0 (GtkFishbowlChild, 1);
child_info->widget = widget;
child_info->x = 0;
child_info->y = 0;
child_info->dx = new_speed ();
child_info->dy = new_speed ();
gtk_widget_set_parent (widget, GTK_WIDGET (fishbowl));
priv->children = g_list_prepend (priv->children, child_info);
priv->count++;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
}
static void
gtk_fishbowl_remove (GtkContainer *container,
GtkWidget *widget)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GtkWidget *widget_bowl = GTK_WIDGET (fishbowl);
GList *children;
for (children = priv->children; children; children = children->next)
{
child = children->data;
if (child->widget == widget)
{
gboolean was_visible = gtk_widget_get_visible (widget);
gtk_widget_unparent (widget);
priv->children = g_list_remove_link (priv->children, children);
g_list_free (children);
g_free (child);
if (was_visible && gtk_widget_get_visible (widget_bowl))
gtk_widget_queue_resize (widget_bowl);
priv->count--;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_COUNT]);
break;
}
}
}
static void
gtk_fishbowl_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (container);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *children;
if (!include_internals)
return;
children = priv->children;
while (children)
{
child = children->data;
children = children->next;
(* callback) (child->widget, callback_data);
}
}
static void
gtk_fishbowl_dispose (GObject *object)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
gtk_fishbowl_set_animating (fishbowl, FALSE);
gtk_fishbowl_set_count (fishbowl, 0);
G_OBJECT_CLASS (gtk_fishbowl_parent_class)->dispose (object);
}
static void
gtk_fishbowl_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
switch (prop_id)
{
case PROP_ANIMATING:
gtk_fishbowl_set_animating (fishbowl, g_value_get_boolean (value));
break;
case PROP_BENCHMARK:
gtk_fishbowl_set_benchmark (fishbowl, g_value_get_boolean (value));
break;
case PROP_COUNT:
gtk_fishbowl_set_count (fishbowl, g_value_get_uint (value));
break;
case PROP_UPDATE_DELAY:
gtk_fishbowl_set_update_delay (fishbowl, g_value_get_int64 (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_fishbowl_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (object);
switch (prop_id)
{
case PROP_ANIMATING:
g_value_set_boolean (value, gtk_fishbowl_get_animating (fishbowl));
break;
case PROP_BENCHMARK:
g_value_set_boolean (value, gtk_fishbowl_get_benchmark (fishbowl));
break;
case PROP_COUNT:
g_value_set_uint (value, gtk_fishbowl_get_count (fishbowl));
break;
case PROP_FRAMERATE:
g_value_set_double (value, gtk_fishbowl_get_framerate (fishbowl));
break;
case PROP_UPDATE_DELAY:
g_value_set_int64 (value, gtk_fishbowl_get_update_delay (fishbowl));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_fishbowl_class_init (GtkFishbowlClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
object_class->dispose = gtk_fishbowl_dispose;
object_class->set_property = gtk_fishbowl_set_property;
object_class->get_property = gtk_fishbowl_get_property;
widget_class->get_preferred_width = gtk_fishbowl_get_preferred_width;
widget_class->get_preferred_height = gtk_fishbowl_get_preferred_height;
widget_class->size_allocate = gtk_fishbowl_size_allocate;
container_class->add = gtk_fishbowl_add;
container_class->remove = gtk_fishbowl_remove;
container_class->forall = gtk_fishbowl_forall;
props[PROP_ANIMATING] =
g_param_spec_boolean ("animating",
"animating",
"Whether children are moving around",
FALSE,
G_PARAM_READWRITE);
props[PROP_BENCHMARK] =
g_param_spec_boolean ("benchmark",
"Benchmark",
"Adapt the count property to hit the maximum framerate",
FALSE,
G_PARAM_READWRITE);
props[PROP_COUNT] =
g_param_spec_uint ("count",
"Count",
"Number of widgets",
0, G_MAXUINT,
0,
G_PARAM_READWRITE);
props[PROP_FRAMERATE] =
g_param_spec_double ("framerate",
"Framerate",
"Framerate of this widget in frames per second",
0, G_MAXDOUBLE,
0,
G_PARAM_READABLE);
props[PROP_UPDATE_DELAY] =
g_param_spec_int64 ("update-delay",
"Update delay",
"Number of usecs between updates",
0, G_MAXINT64,
G_USEC_PER_SEC,
G_PARAM_READWRITE);
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
}
guint
gtk_fishbowl_get_count (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->count;
}
void
gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
guint count)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (priv->count == count)
return;
g_object_freeze_notify (G_OBJECT (fishbowl));
while (priv->count > count)
{
gtk_fishbowl_remove (GTK_CONTAINER (fishbowl), ((GtkFishbowlChild *) priv->children->data)->widget);
}
while (priv->count < count)
{
GtkWidget *new_widget;
new_widget = priv->creation_func ();
gtk_widget_show (new_widget);
gtk_fishbowl_add (GTK_CONTAINER (fishbowl), new_widget);
}
g_object_thaw_notify (G_OBJECT (fishbowl));
}
gboolean
gtk_fishbowl_get_benchmark (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->benchmark;
}
void
gtk_fishbowl_set_benchmark (GtkFishbowl *fishbowl,
gboolean benchmark)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (priv->benchmark == benchmark)
return;
priv->benchmark = benchmark;
if (!benchmark)
priv->last_benchmark_change = 0;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_BENCHMARK]);
}
gboolean
gtk_fishbowl_get_animating (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->tick_id != 0;
}
static gint64
guess_refresh_interval (GdkFrameClock *frame_clock)
{
gint64 interval;
gint64 i;
interval = G_MAXINT64;
for (i = gdk_frame_clock_get_history_start (frame_clock);
i < gdk_frame_clock_get_frame_counter (frame_clock);
i++)
{
GdkFrameTimings *t, *before;
gint64 ts, before_ts;
t = gdk_frame_clock_get_timings (frame_clock, i);
before = gdk_frame_clock_get_timings (frame_clock, i - 1);
if (t == NULL || before == NULL)
continue;
ts = gdk_frame_timings_get_frame_time (t);
before_ts = gdk_frame_timings_get_frame_time (before);
if (ts == 0 || before_ts == 0)
continue;
interval = MIN (interval, ts - before_ts);
}
if (interval == G_MAXINT64)
return 0;
return interval;
}
static void
gtk_fishbowl_do_update (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GdkFrameClock *frame_clock;
GdkFrameTimings *start, *end;
gint64 start_counter, end_counter;
gint64 n_frames, expected_frames;
gint64 start_timestamp, end_timestamp;
gint64 interval;
frame_clock = gtk_widget_get_frame_clock (GTK_WIDGET (fishbowl));
if (frame_clock == NULL)
return;
start_counter = gdk_frame_clock_get_history_start (frame_clock);
end_counter = gdk_frame_clock_get_frame_counter (frame_clock);
start = gdk_frame_clock_get_timings (frame_clock, start_counter);
for (end = gdk_frame_clock_get_timings (frame_clock, end_counter);
end_counter > start_counter && end != NULL && !gdk_frame_timings_get_complete (end);
end = gdk_frame_clock_get_timings (frame_clock, end_counter))
end_counter--;
if (end_counter - start_counter < 4)
return;
start_timestamp = gdk_frame_timings_get_presentation_time (start);
end_timestamp = gdk_frame_timings_get_presentation_time (end);
if (start_timestamp == 0 || end_timestamp == 0)
{
start_timestamp = gdk_frame_timings_get_frame_time (start);
end_timestamp = gdk_frame_timings_get_frame_time (end);
}
n_frames = end_counter - start_counter;
priv->framerate = ((double) n_frames) * G_USEC_PER_SEC / (end_timestamp - start_timestamp);
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_FRAMERATE]);
if (!priv->benchmark)
return;
interval = gdk_frame_timings_get_refresh_interval (end);
if (interval == 0)
{
interval = guess_refresh_interval (frame_clock);
if (interval == 0)
return;
}
expected_frames = round ((double) (end_timestamp - start_timestamp) / interval);
if (n_frames >= expected_frames)
{
if (priv->last_benchmark_change > 0)
priv->last_benchmark_change *= 2;
else
priv->last_benchmark_change = 1;
}
else if (n_frames + 1 < expected_frames)
{
if (priv->last_benchmark_change < 0)
priv->last_benchmark_change--;
else
priv->last_benchmark_change = -1;
}
else
{
priv->last_benchmark_change = 0;
}
gtk_fishbowl_set_count (fishbowl, MAX (1, (int) priv->count + priv->last_benchmark_change));
}
static gboolean
gtk_fishbowl_tick (GtkWidget *widget,
GdkFrameClock *frame_clock,
gpointer unused)
{
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
GtkFishbowlChild *child;
GList *l;
gint64 frame_time, elapsed;
gboolean do_update;
frame_time = gdk_frame_clock_get_frame_time (gtk_widget_get_frame_clock (widget));
elapsed = frame_time - priv->last_frame_time;
do_update = frame_time / priv->update_delay != priv->last_frame_time / priv->update_delay;
priv->last_frame_time = frame_time;
/* last frame was 0, so we're just starting to animate */
if (elapsed == frame_time)
return G_SOURCE_CONTINUE;
for (l = priv->children; l; l = l->next)
{
child = l->data;
child->x += child->dx * ((double) elapsed / G_USEC_PER_SEC);
child->y += child->dy * ((double) elapsed / G_USEC_PER_SEC);
if (child->x <= 0)
{
child->x = 0;
child->dx = new_speed ();
}
else if (child->x >= 1)
{
child->x = 1;
child->dx = - new_speed ();
}
if (child->y <= 0)
{
child->y = 0;
child->dy = new_speed ();
}
else if (child->y >= 1)
{
child->y = 1;
child->dy = - new_speed ();
}
}
gtk_widget_queue_allocate (widget);
if (do_update)
gtk_fishbowl_do_update (fishbowl);
return G_SOURCE_CONTINUE;
}
void
gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
gboolean animating)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (gtk_fishbowl_get_animating (fishbowl) == animating)
return;
if (animating)
{
priv->tick_id = gtk_widget_add_tick_callback (GTK_WIDGET (fishbowl),
gtk_fishbowl_tick,
NULL,
NULL);
}
else
{
priv->last_frame_time = 0;
gtk_widget_remove_tick_callback (GTK_WIDGET (fishbowl), priv->tick_id);
priv->tick_id = 0;
priv->framerate = 0;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_FRAMERATE]);
}
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_ANIMATING]);
}
double
gtk_fishbowl_get_framerate (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->framerate;
}
gint64
gtk_fishbowl_get_update_delay (GtkFishbowl *fishbowl)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
return priv->update_delay;
}
void
gtk_fishbowl_set_update_delay (GtkFishbowl *fishbowl,
gint64 update_delay)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
if (priv->update_delay == update_delay)
return;
priv->update_delay = update_delay;
g_object_notify_by_pspec (G_OBJECT (fishbowl), props[PROP_UPDATE_DELAY]);
}
void
gtk_fishbowl_set_creation_func (GtkFishbowl *fishbowl,
GtkFishCreationFunc creation_func)
{
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
g_object_freeze_notify (G_OBJECT (fishbowl));
gtk_fishbowl_set_count (fishbowl, 0);
priv->last_benchmark_change = 0;
priv->creation_func = creation_func;
gtk_fishbowl_set_count (fishbowl, 1);
g_object_thaw_notify (G_OBJECT (fishbowl));
}

View File

@@ -0,0 +1,69 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2017 Benjamin Otte <otte@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GTK_FISHBOWL_H__
#define __GTK_FISHBOWL_H__
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GTK_TYPE_FISHBOWL (gtk_fishbowl_get_type ())
#define GTK_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FISHBOWL, GtkFishbowl))
#define GTK_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
#define GTK_IS_FISHBOWL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FISHBOWL))
#define GTK_IS_FISHBOWL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_FISHBOWL))
#define GTK_FISHBOWL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_FISHBOWL, GtkFishbowlClass))
typedef struct _GtkFishbowl GtkFishbowl;
typedef struct _GtkFishbowlClass GtkFishbowlClass;
typedef GtkWidget * (* GtkFishCreationFunc) (void);
struct _GtkFishbowl
{
GtkContainer parent;
};
struct _GtkFishbowlClass
{
GtkContainerClass parent_class;
};
GType gtk_fishbowl_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_fishbowl_new (void);
guint gtk_fishbowl_get_count (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_count (GtkFishbowl *fishbowl,
guint count);
gboolean gtk_fishbowl_get_animating (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_animating (GtkFishbowl *fishbowl,
gboolean animating);
gboolean gtk_fishbowl_get_benchmark (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_benchmark (GtkFishbowl *fishbowl,
gboolean animating);
double gtk_fishbowl_get_framerate (GtkFishbowl *fishbowl);
gint64 gtk_fishbowl_get_update_delay (GtkFishbowl *fishbowl);
void gtk_fishbowl_set_update_delay (GtkFishbowl *fishbowl,
gint64 update_delay);
void gtk_fishbowl_set_creation_func (GtkFishbowl *fishbowl,
GtkFishCreationFunc creation_func);
G_END_DECLS
#endif /* __GTK_FISHBOWL_H__ */

View File

@@ -97,6 +97,7 @@ do_infobar (GtkWidget *do_widget)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
gtk_info_bar_set_default_response (GTK_INFO_BAR (bar), GTK_RESPONSE_OK);
button = gtk_toggle_button_new_with_label ("Question");
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);

View File

@@ -1,7 +1,7 @@
/* Links
*
* GtkLabel can show hyperlinks. The default action is to call
* gtk_show_uri() on their URI, but it is possible to override
* gtk_show_uri_on_window() on their URI, but it is possible to override
* this with a custom handler.
*/

View File

@@ -762,15 +762,14 @@ load_file (const gchar *demoname,
/* Skipping blank lines */
while (g_ascii_isspace (*p))
p++;
if (*p)
{
p = lines[i];
state++;
/* Fall through */
}
else
if (!*p)
break;
p = lines[i];
state++;
/* Fall through */
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);

148
demos/gtk-demo/meson.build Normal file
View File

@@ -0,0 +1,148 @@
## These should be in the order you want them to appear in the
## demo app, which means alphabetized by demo title, not filename
demos = files([
'application_demo.c',
'assistant.c',
'builder.c',
'button_box.c',
'changedisplay.c',
'clipboard.c',
'colorsel.c',
'combobox.c',
'css_accordion.c',
'css_basics.c',
'css_blendmodes.c',
'css_multiplebgs.c',
'css_pixbufs.c',
'css_shadows.c',
'cursors.c',
'dialog.c',
'drawingarea.c',
'editable_cells.c',
'entry_buffer.c',
'entry_completion.c',
'event_axes.c',
'expander.c',
'filtermodel.c',
'fishbowl.c',
'foreigndrawing.c',
'gestures.c',
'glarea.c',
'headerbar.c',
'hypertext.c',
'iconview.c',
'iconview_edit.c',
'images.c',
'infobar.c',
'links.c',
'listbox.c',
'flowbox.c',
'list_store.c',
'markup.c',
'menus.c',
'modelbutton.c',
'offscreen_window.c',
'offscreen_window2.c',
'overlay.c',
'overlay2.c',
'paint.c',
'panes.c',
'pickers.c',
'pixbufs.c',
'popover.c',
'printing.c',
'revealer.c',
'rotated_text.c',
'scale.c',
'search_entry.c',
'search_entry2.c',
'shortcuts.c',
'sidebar.c',
'sizegroup.c',
'spinbutton.c',
'spinner.c',
'stack.c',
'tabs.c',
'textmask.c',
'textview.c',
'textscroll.c',
'theming_style_classes.c',
'toolpalette.c',
'transparent.c',
'tree_store.c',
])
gtkdemo_deps = [libgtk_dep]
if harfbuzz_dep.found() and pangoft_dep.found()
demos += files('font_features.c')
gtkdemo_deps += [harfbuzz_dep, pangoft_dep]
endif
if os_unix
demos += files('pagesetup.c')
endif
gtkdemo_sources = demos + files([
'gtkfishbowl.c',
'gtkfishbowl.h',
'main.c',
])
geninclude = find_program('geninclude.py')
demos_h = custom_target(
'gtk3 demo header',
output : 'demos.h',
input : demos,
command : [geninclude, '@OUTPUT@', '@INPUT@'],
)
gtkdemo_resources = gnome.compile_resources(
'gtkdemo_resources',
'demo.gresource.xml',
source_dir: '.'
)
gtkdemo = executable(
'gtk3-demo',
gtkdemo_sources,
demos_h,
gtkdemo_resources,
dependencies: gtkdemo_deps,
include_directories : confinc,
install: true
)
gtkapplicationdemo = executable(
'gtk3-demo-application',
'application.c',
demos_h,
gtkdemo_resources,
dependencies: gtkdemo_deps,
include_directories : confinc,
install: true
)
gtk_settings_schemas = [
'org.gtk.Settings.FileChooser.gschema.xml',
'org.gtk.Settings.ColorChooser.gschema.xml',
'org.gtk.Settings.EmojiChooser.gschema.xml',
'org.gtk.Settings.Debug.gschema.xml',
]
foreach s: [ '16', '22', '24', '32', '48', '256']
icon_destdir = join_paths(gtk_datadir, 'icons', 'hicolor', '@0@x@0@'.format(s), 'apps')
icons = [join_paths('data', '@0@x@0@'.format(s), 'gtk3-demo.png'),
join_paths('data', '@0@x@0@'.format(s), 'gtk3-demo-symbolic.symbolic.png')]
install_data(icons, install_dir: icon_destdir)
endforeach
# desktop file
install_data('gtk3-demo.desktop', install_dir: gtk_applicationsdir)
# GSettings
install_data('org.gtk.Demo.gschema.xml', install_dir: gtk_schemasdir)
gnome.compile_schemas(depend_files: files(['org.gtk.Demo.gschema.xml']))

257
demos/gtk-demo/paint.c Normal file
View File

@@ -0,0 +1,257 @@
/* Paint
*
* Demonstrates practical handling of drawing tablets in a real world
* usecase.
*/
#include <gtk/gtk.h>
typedef struct
{
GtkEventBox parent_instance;
cairo_surface_t *surface;
cairo_t *cr;
GdkRGBA draw_color;
GtkGesture *stylus_gesture;
} DrawingArea;
typedef struct
{
GtkEventBoxClass parent_class;
} DrawingAreaClass;
G_DEFINE_TYPE (DrawingArea, drawing_area, GTK_TYPE_EVENT_BOX)
static void
drawing_area_ensure_surface (DrawingArea *area,
gint width,
gint height)
{
if (!area->surface ||
cairo_image_surface_get_width (area->surface) != width ||
cairo_image_surface_get_height (area->surface) != height)
{
cairo_surface_t *surface;
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
width, height);
if (area->surface)
{
cairo_t *cr;
cr = cairo_create (surface);
cairo_set_source_surface (cr, area->surface, 0, 0);
cairo_paint (cr);
cairo_surface_destroy (area->surface);
cairo_destroy (area->cr);
cairo_destroy (cr);
}
area->surface = surface;
area->cr = cairo_create (surface);
}
}
static void
drawing_area_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
DrawingArea *area = (DrawingArea *) widget;
drawing_area_ensure_surface (area, allocation->width, allocation->height);
GTK_WIDGET_CLASS (drawing_area_parent_class)->size_allocate (widget, allocation);
}
static void
drawing_area_map (GtkWidget *widget)
{
GtkAllocation allocation;
GTK_WIDGET_CLASS (drawing_area_parent_class)->map (widget);
gdk_window_set_event_compression (gtk_widget_get_window (widget), TRUE);
gtk_widget_get_allocation (widget, &allocation);
drawing_area_ensure_surface ((DrawingArea *) widget,
allocation.width, allocation.height);
}
static void
drawing_area_unmap (GtkWidget *widget)
{
DrawingArea *area = (DrawingArea *) widget;
g_clear_pointer (&area->cr, cairo_destroy);
g_clear_pointer (&area->surface, cairo_surface_destroy);
GTK_WIDGET_CLASS (drawing_area_parent_class)->unmap (widget);
}
static gboolean
drawing_area_draw (GtkWidget *widget,
cairo_t *cr)
{
DrawingArea *area = (DrawingArea *) widget;
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_paint (cr);
cairo_set_source_surface (cr, area->surface, 0, 0);
cairo_paint (cr);
cairo_set_source_rgb (cr, 0.6, 0.6, 0.6);
cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_stroke (cr);
return TRUE;
}
static void
drawing_area_class_init (DrawingAreaClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
widget_class->size_allocate = drawing_area_size_allocate;
widget_class->draw = drawing_area_draw;
widget_class->map = drawing_area_map;
widget_class->unmap = drawing_area_unmap;
}
static void
drawing_area_apply_stroke (DrawingArea *area,
GdkDeviceTool *tool,
gdouble x,
gdouble y,
gdouble pressure)
{
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
{
cairo_set_line_width (area->cr, 10 * pressure);
cairo_set_operator (area->cr, CAIRO_OPERATOR_DEST_OUT);
}
else
{
cairo_set_line_width (area->cr, 4 * pressure);
cairo_set_operator (area->cr, CAIRO_OPERATOR_SATURATE);
}
cairo_set_source_rgba (area->cr, area->draw_color.red,
area->draw_color.green, area->draw_color.blue,
area->draw_color.alpha * pressure);
//cairo_set_source_rgba (area->cr, 0, 0, 0, pressure);
cairo_line_to (area->cr, x, y);
cairo_stroke (area->cr);
cairo_move_to (area->cr, x, y);
}
static void
stylus_gesture_down (GtkGestureStylus *gesture,
gdouble x,
gdouble y,
DrawingArea *area)
{
cairo_new_path (area->cr);
}
static void
stylus_gesture_motion (GtkGestureStylus *gesture,
gdouble x,
gdouble y,
DrawingArea *area)
{
GdkDeviceTool *tool;
gdouble pressure;
tool = gtk_gesture_stylus_get_device_tool (gesture);
if (!gtk_gesture_stylus_get_axis (gesture, GDK_AXIS_PRESSURE, &pressure))
pressure = 1;
drawing_area_apply_stroke (area, tool, x, y, pressure);
gtk_widget_queue_draw (GTK_WIDGET (area));
}
static void
drawing_area_init (DrawingArea *area)
{
const GdkRGBA draw_rgba = { 0, 0, 0, 1 };
gtk_event_box_set_visible_window (GTK_EVENT_BOX (area), TRUE);
area->stylus_gesture = gtk_gesture_stylus_new (GTK_WIDGET (area));
g_signal_connect (area->stylus_gesture, "down",
G_CALLBACK (stylus_gesture_down), area);
g_signal_connect (area->stylus_gesture, "motion",
G_CALLBACK (stylus_gesture_motion), area);
area->draw_color = draw_rgba;
}
GtkWidget *
drawing_area_new (void)
{
return g_object_new (drawing_area_get_type (), NULL);
}
void
drawing_area_set_color (DrawingArea *area,
GdkRGBA *color)
{
area->draw_color = *color;
}
static void
color_button_color_set (GtkColorButton *button,
DrawingArea *draw_area)
{
GdkRGBA color;
gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (button), &color);
drawing_area_set_color (draw_area, &color);
}
GtkWidget *
do_paint (GtkWidget *toplevel)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkWidget *draw_area, *headerbar, *colorbutton;
const GdkRGBA draw_rgba = { 0, 0, 0, 1 };
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
draw_area = drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), draw_area);
headerbar = gtk_header_bar_new ();
gtk_header_bar_set_title (GTK_HEADER_BAR (headerbar), "Paint");
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (headerbar), TRUE);
colorbutton = gtk_color_button_new ();
g_signal_connect (colorbutton, "color-set",
G_CALLBACK (color_button_color_set), draw_area);
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (colorbutton),
&draw_rgba);
gtk_header_bar_pack_end (GTK_HEADER_BAR (headerbar), colorbutton);
gtk_window_set_titlebar (GTK_WINDOW (window), headerbar);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -53,6 +53,7 @@ do_pickers (GtkWidget *do_widget)
gtk_widget_set_hexpand (label, TRUE);
picker = gtk_file_chooser_button_new ("Pick a File",
GTK_FILE_CHOOSER_ACTION_OPEN);
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (picker), FALSE);
gtk_grid_attach (GTK_GRID (table), label, 0, 2, 1, 1);
gtk_grid_attach (GTK_GRID (table), picker, 1, 2, 1, 1);

63
demos/gtk-demo/tabs.c Normal file
View File

@@ -0,0 +1,63 @@
/* Text View/Tabs
*
* GtkTextView can position text at fixed positions, using tabs.
*/
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
GtkWidget *
do_tabs (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkWidget *view;
GtkWidget *sw;
GtkTextBuffer *buffer;
PangoTabArray *tabs;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Tabs");
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_window_set_default_size (GTK_WINDOW (window), 450, 450);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
view = gtk_text_view_new ();
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 20);
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 20);
tabs = pango_tab_array_new (3, TRUE);
pango_tab_array_set_tab (tabs, 0, PANGO_TAB_LEFT, 0);
pango_tab_array_set_tab (tabs, 1, PANGO_TAB_LEFT, 150);
pango_tab_array_set_tab (tabs, 2, PANGO_TAB_LEFT, 300);
gtk_text_view_set_tabs (GTK_TEXT_VIEW (view), tabs);
pango_tab_array_free (tabs);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_set_text (buffer, "one\ttwo\tthree\nfour\tfive\tsix\nseven\teight\tnine", -1);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (window), sw);
gtk_container_add (GTK_CONTAINER (sw), view);
gtk_widget_show_all (sw);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -61,7 +61,7 @@
<property name="label" translatable="yes">Raised</property>
<property name="use_underline">1</property>
<property name="is_important">1</property>
<property name="icon_name">edit-find-symbolic</property>
<property name="icon_name">edit-find</property>
<style>
<class name="raised"/>
</style>
@@ -77,7 +77,7 @@
<property name="label" translatable="yes">Raised Active</property>
<property name="use_underline">1</property>
<property name="is_important">1</property>
<property name="icon_name">edit-find-symbolic</property>
<property name="icon_name">edit-find</property>
<property name="active">1</property>
<style>
<class name="raised"/>

View File

@@ -33,7 +33,9 @@ resources.c: iconbrowser.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourc
EXTRA_DIST = \
menus.ui \
iconbrowser.gresource.xml \
window.ui
window.ui \
icon.list \
meson.build
# ------------------- MSVC Build Items ----------------
MSVCPROJS = gtk3-icon-browser

View File

@@ -0,0 +1,515 @@
[volume]
Name=Volume
Description=Icons related to audio input and output volume
audio-volume-high=The icon used to indicate high audio volume
audio-volume-low=The icon used to indicate low audio volume
audio-volume-medium=The icon used to indicate medium audio volume
audio-volume-muted=The icon used to indicate the muted state for audio playback
microphone-sensitivity-high=The icon used to indicate high microphone sensitivity
microphone-sensitivity-low=The icon used to indicate low microphone sensitivity
microphone-sensitivity-medium=The icon used to indicate medium microphone sensitivity
microphone-sensitivity-muted=The icon used to indicate that a microphone is muted
[multimedia]
Name=Multimedia
Description=Icons related to playback of media
media-playlist-repeat=The icon for the repeat mode of a media player
media-playlist-repeat-song=The icon for repeating a song in a media player
media-playlist-shuffle=The icon for the shuffle mode of a media player
media-playlist-consecutive=The icon for consecutive mode of a media player
media-skip-backward=The icon for the skip backward action of a media player
media-seek-backward=The icon for the seek backward action of a media player
media-playback-start=The icon for the start playback action of a media player
media-seek-forward=The icon for the seek forward action of a media player
media-skip-forward=The icon for the skip forward action of a media player
media-playback-stop=The icon for the stop action of a media player
media-playback-pause=The icon for the pause action of a media player
media-eject=The icon for the eject action of a media player or file manager
media-record=The icon for the record action of a media application
media-view-subtitles=The icon used to show subtitles in a media player
[network]
Name=Network
Description=Icons related to network status");
network-transmit-receive=The icon used data is being both transmitted and received simultaneously, while the computing device is connected to a network
network-transmit=The icon used when data is being transmitted, while the computing device is connected to a network
network-receive=The icon used when data is being received, while the computing device is connected to a network
network-idle=The icon used when no data is being transmitted or received, while the computing device is connected to a network
network-error=The icon used when an error occurs trying to intialize the network connection of the computing device
network-offline=The icon used when the computing device is disconnected from the network
[weather]
Name=Weather
Description=Icons about weather conditions
weather-clear=The icon used while the weather for a region is “clear skies”
weather-clear-night=The icon used while the weather for a region is “clear skies” during the night
weather-few-clouds=The icon used while the weather for a region is “partly cloudy”
weather-few-clouds-night=The icon used while the weather for a region is “partly cloudy” during the night
weather-fog=The icon used while the weather for a region is “foggy”
weather-overcast=The icon used while the weather for a region is “overcast”
weather-severe-alert=The icon used while a sever weather alert is in effect for a region
weather-showers=The icon used while rain showers are occurring in a region
weather-showers-scattered=The icon used while scattered rain showers are occurring in a region
weather-snow=The icon used while snow showers are occurring in a region
weather-storm=The icon used while storms are occurring in a region
weather-windy=The icon used while the weather is windy
[navigation]
Name=Navigation
Description=Icons for navigation in the user interface of a program
go-first=The icon for the go to the first item in a list
go-previous=The icon for the go to the previous item in a list
go-next=The icon for the go to the next item in a list
go-last=The icon for the go to the last item in a list
go-bottom=The icon for the go to bottom of a list
go-down=The icon for the go down in a list
go-up=The icon for the go up in a list
go-top=The icon for the go to the top of a list
go-home=The icon for the go to home location
go-jump=The icon for the jump to action
[editing]
Name=Editing
Description=Icons related to editing a document
format-indent-less=The icon for the decrease indent formatting action
format-indent-more=The icon for the increase indent formatting action
format-justify-center=The icon for the center justification formatting action
format-justify-fill=The icon for the fill justification formatting action
format-justify-left=The icon for the left justification formatting action
format-justify-right=The icon for the right justification action
format-text-direction-ltr=The icon for the left-to-right text formatting action
format-text-direction-rtl=The icon for the right-to-left formatting action
format-text-bold=The icon for the bold text formatting action
format-text-italic=The icon for the italic text formatting action
format-text-underline=The icon for the underlined text formatting action
format-text-strikethrough=The icon for the strikethrough text formatting action
edit-clear=The icon for the clear action
edit-clear-all=
edit-copy=The icon for the copy action
edit-cut=The icon for the cut action
edit-delete=The icon for the delete action
edit-find-replace=The icon for the find and replace action
edit-paste=The icon for the paste action
edit-redo=The icon for the redo action
edit-select-all=The icon for the select all action
edit-select=
edit-undo=The icon for the undo action
error-correct=
document-properties=The icon for the action to view the properties of a document in an application
document-new=The icon used for the action to create a new document
document-open=The icon used for the action to open a document
document-open-recent=The icon used for the action to open a document that was recently opened
document-save=The icon for the save action. Should be an arrow pointing down and toward a hard disk
document-save-as=The icon for the save as action
document-send=The icon for the send action. Should be an arrow pointing up and away from a hard disk
document-page-setup=The icon for the page setup action of a document editor
document-edit=The icon for the action to edit a document
object-flip-horizontal=The icon for the action to flip an object horizontally
object-flip-vertical=The icon for the action to flip an object vertically
object-rotate-left=The icon for the rotate left action performed on an object
object-rotate-right=The icon for the rotate rigt action performed on an object
insert-image=The icon for the insert image action of an application
insert-link=The icon for the insert link action of an application
insert-object=The icon for the insert object action of an application
insert-text=The icon for the insert text action of an application
accessories-text-editor=The icon used for the desktop's text editing accessory program
[view]
Name=View Controls
Description=Icons for view controls in a user interface
view-list=The icon used for “List“ view mode
view-grid=The icon used for “Grid“ view mode (as opposed to “List“)
view-fullscreen=The icon used for the “Fullscreen” item in the application's “View” menu
view-restore=The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view
zoom-fit-best=The icon used for the “Best Fit” item in the application's “View” menu
zoom-in=The icon used for the “Zoom in” item in the application's “View” menu
zoom-out=The icon used for the “Zoom Out” item in the application's “View” menu
zoom-original=The icon used for the “Original Size” item in the application's “View” menu
view-continuous=The icon used for a continuous view mode
view-paged=The icon used for a paged view mode (as opposed to continuous)
view-dual=The icon used for a side-by-side view of paginated content
view-wrapped=The icon used to indicate a wrap-around to the beginning
view-pin=The icon used for 'pin a view'
[calendar]
Name=Calendar, Tasks and Alarms
Description=Icons related to calendars, tasks and alarms
task-due=The icon used when a task is due soon
task-past-due=The icon used when a task that was due, has been left incomplete
appointment-soon=The icon used when an appointment will occur soon
appointment-missed=The icon used when an appointment was missed
alarm=The icon used for alarms when a task or appointment is due
[communication]
Name=Communication
Description=Icons related email, phone calls, IM and other forms of communication
mail-unread=The icon used for an electronic mail that is unread
mail-read=The icon used for an electronic mail that is read
mail-replied=The icon used for an electronic mail that has been replied to
mail-attachment=The icon used for an electronic mail that contains attachments
mail-mark-important=The icon for the mark as important action of an electronic mail application
mail-send=The icon for the send action of an electronic mail application
mail-send-receive=The icon for the send and receive action of an electronic mail application
call-start=The icon used for initiating or accepting a call
call-stop=The icon used for stopping a current call
call-missed=The icon used to show a missed call
user-available=The icon used when a user on a chat network is available to initiate a conversation with
user-offline=The icon used when a user on a chat network is not available
user-idle=The icon used when a user on a chat network has not been an active participant in any chats on the network, for an extended period of time
user-invisible=The icon used when a user is on a chat network, but is invisible to others
user-busy=The icon used when a user is on a chat network, and has marked himself as busy
user-away=The icon used when a user on a chat network is away from their keyboard and the chat program
user-status-pending=The icon used when the current user status on a chat network is not known
[devices]
Name=Devices and Media
Description=Icons for devices and media
audio-input-microphone=The icon used for the microphone audio input device
camera-web=The fallback icon for web cameras
camera-photo=The icon used for a digital still camera devices
input-keyboard=The icon used for the keyboard input device
printer=The icon used for a printer device
video-display=The icon used for the monitor that video gets displayed to
computer=The icon used for the computing device as a whole
media-optical=The icon used for physical optical media such as CD and DVD
phone=The icon used for phone devices which support connectivity to the PC, such as VoIP, cellular, or possibly landline phones
input-dialpad=The icon used for dialpad input devices
input-touchpad=The icon used for touchpad input devices
scanner=The icon used for a scanner device
audio-card=The icon used for the audio rendering device
input-gaming=The icon used for the gaming input device
input-mouse=The icon used for the mousing input device
multimedia-player=The icon used for generic multimedia playing devices
audio-headphones=The icon used for headphones
audio-headset=The icon used for headsets
display-projector=The icon used for projectors
media-removable=The icon used for generic removable media
printer-network=The icon used for printers which are connected via the network
audio-speakers=The icon used for speakers
camera-video=The fallback icon for video cameras
drive-optical=The icon used for optical media drives such as CD and DVD
drive-removable-media=The icon used for removable media drives
input-tablet=The icon used for graphics tablet input devices
network-wireless=The icon used for wireless network connections
network-wired=The icon used for wired network connections
media-floppy=The icon used for physical floppy disk media
media-flash=The fallback icon used for flash media, such as memory stick and SD
[contenttypes]
Name=Content Types
Description=Icons for different types of data, such as audio or image files
application-certificate=
application-rss+xml=
application-x-appliance=
audio-x-generic=The icon used for generic audio file types
folder=The standard folder icon used to represent directories on local filesystems, mail folders, and other hierarchical groups
text-x-generic=The icon used for generic text file types
video-x-generic=The icon used for generic video file types
x-office-calendar=The icon used for generic calendar file types
[emotes]
Name=Emotes
Description=Icons for emotions that are expressed through text chat applications such as :-) or :-P in IRC or instant messengers
face-angel=The icon used for the 0:-) emote
face-angry=The icon used for the X-( emote
face-cool=The icon used for the B-) emote
face-crying=The icon used for the :'( emote
face-devilish=The icon used for the >:-) emote
face-embarrassed=The icon used for the :-[ emote
face-kiss=The icon used for the :-* emote
face-laugh=The icon used for the :-)) emote
face-monkey=The icon used for the :-(|) emote
face-plain=The icon used for the :-| emote
face-raspberry=The icon used for the :-P emote
face-sad=The icon used for the :-( emote
face-shutmouth=The 'shut mouth' emote
face-sick=The icon used for the :-& emote
face-smile=The icon used for the :-) emote
face-smile-big=The icon used for the :-D emote
face-smirk=The icon used for the :-! emote
face-surprise=The icon used for the :-0 emote
face-tired=The icon used for the |-) emote
face-uncertain=The icon used for the :-/ emote
face-wink=The icon used for the ;-) emote
face-worried=The icon used for the :-S emote
face-yawn=
[general]
Name=General
Description=Generally useful icons that don't fit in a particular category
edit-find=The icon for generic search actions
content-loading=The icon used to indicate that content is loading
open-menu=The icon used for a menu button in the header bar
view-more=The icon used for a “View More“ action
tab-new=The icon used for a “New Tab“ action
bookmark-new=The icon used for creating a new bookmark
mark-location=The icon used to mark a location on a map
find-location=The icon used for a “Search location“ action
send-to=The icon used for a “Send to“ action
object-select=The icon used for generic selection actions
window-close=The icon used for actions that close a view, such as window or tab close button
view-refresh=The icon used for the “Refresh” item in the application's “View” menu
process-stop=The icon used for the “Stop” action in applications with actions that may take a while to process, such as web page loading in a browser
action-unavailable=The icon used to indicate that an action is currently unavailable, such as “Pause“ when no media is playing
document-print=The icon for the print action of an application
printer-printing=The icon used while a print job is successfully being spooled to a printing device
printer-warning=The icon used when a recoverable problem occurs while attempting to printing
printer-error=The icon used when an error occurs while attempting to print
dialog-information=The icon used when a dialog is opened to give information to the user that may be pertinent to the requested action
dialog-question=The icon used when a dialog is opened to ask a simple question of the user
dialog-warning=The icon used when a dialog is opened to warn the user of impending issues with the requested action
dialog-password=The icon used when a dialog requesting the authentication credentials for a user is opened
dialog-error=The icon used when a dialog is opened to explain an error condition to the user
list-add=The icon for the add to list action
list-remove=The icon for the remove from list action
non-starred=The icon used to indicate that an object is not 'starred'
semi-starred=The icon used to indicate that an object has is 'half-starred'
starred=The icon used to indicate that an object is 'starred'
star-new=The used for the “New Star“ action
security-low=The icon used to indicate that the security level of a connection is presumed to be insecure, either by using weak encryption, or by using a certificate that the could not be automatically verified, and which the user has not chosent to trust
security-medium=The icon used to indicate that the security level of a connection is presumed to be secure, using strong encryption, and a certificate that could not be automatically verified, but which the user has chosen to trust
security-high=The icon used to indicate that the security level of a connection is known to be secure, using strong encryption and a valid certificate
user-trash=The icon for the user's “Trash” place in the file system
user-trash-full=The icon for the user's “Trash” in the file system, when there are items in the “Trash” waiting for disposal or recovery
emblem-system=The icon used as an emblem for directories that contain system libraries, settings, and data
avatar-default=The generic avatar icon, which is used to represent a user that doesn't have a personalized avatar
emblem-synchronizing=The icon used as an emblem to indicate that a a synchronizing operation is in process
emblem-shared=The icon used as an emblem for files and directories that are shared to other users
help-browser=The icon used for the desktop's help browsing application
[other]
Name=Other
Description=Icons which have may be too specialized and not of general interest
changes-allow=
changes-prevent=
view-sort-ascending=The icon used for the “Sort Ascending” item in the application's “View” menu, or in a button for changing the sort method for a list
view-sort-descending=The icon used for the “Sort Descending” item in the application's “View” menu, or in a button for changing the sort method for a list
document-revert=The icon for the action of reverting to a previous version of a document
address-book-new=The icon used for the action to create a new address book
application-exit=The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit
appointment-new=The icon used for the action to create a new appointment in a calendaring application
contact-new=The icon used for the action to create a new contact in an address book application
document-print-preview=The icon for the print preview action of an application
folder-new=The icon for creating a new folder
help-about=The icon for the About item in the Help menu
help-contents=The icon for Contents item in the Help menu
help-faq=The icon for the FAQ item in the Help menu
list-remove-all=
mail-forward=The icon for the forward action of an electronic mail application
mail-mark-junk=The icon for the mark as junk action of an electronic mail application
mail-mark-notjunk=The icon for the mark as not junk action of an electronic mail application
mail-mark-read=The icon for the mark as read action of an electronic mail application
mail-mark-unread=The icon for the mark as unread action of an electronic mail application
mail-message-new=The icon for the compose new mail action of an electronic mail application
mail-reply-all=The icon for the reply to all action of an electronic mail application
mail-reply-sender=The icon for the reply to sender action of an electronic mail application
pan-down=
pan-end=
pan-start=
pan-up=
system-lock-screen=The icon used for the “Lock Screen” item in the desktop's panel application
system-log-out=The icon used for the “Log Out” item in the desktop's panel application
system-run=The icon used for the “Run Application...” item in the desktop's panel application
system-search=The icon used for the “Search” item in the desktop's panel application
system-reboot=The icon used for the “Reboot” item in the desktop's panel application
system-shutdown=The icon used for the “Shutdown” item in the desktop's panel application
tools-check-spelling=The icon used for the “Check Spelling” item in the application's “Tools” menu
window-maximize=
window-minimize=
window-restore=
window-new=The icon used for the “New Window” item in the application's “Windows” menu
accessories-calculator=The icon used for the desktop's calculator accessory program
accessories-character-map=The icon used for the desktop's international and extended text character accessory program
accessories-dictionary=The icon used for the desktop's dictionary accessory program
multimedia-volume-control=The icon used for the desktop's hardware volume control application
preferences-desktop-accessibility=The icon used for the desktop's accessibility preferences
preferences-desktop-display=
preferences-desktop-font=The icon used for the desktop's font preferences
preferences-desktop-keyboard=The icon used for the desktop's keyboard preferences
preferences-desktop-keyboard-shortcuts=
preferences-desktop-locale=The icon used for the desktop's locale preferences
preferences-desktop-remote-desktop=
preferences-desktop-multimedia=The icon used for the desktop's multimedia preferences
preferences-desktop-screensaver=The icon used for the desktop's screen saving preferences
preferences-desktop-theme=The icon used for the desktop's theme preferences
preferences-desktop-wallpaper=The icon used for the desktop's wallpaper preferences
preferences-system-privacy=
preferences-system-windows=
system-file-manager=The icon used for the desktop's file management application
system-software-install=The icon used for the desktop's software installer application
system-software-update=The icon used for the desktop's software updating application
system-users=
user-info=
utilities-system-monitor=The icon used for the desktop's system resource monitor application
utilities-terminal=The icon used for the desktop's terminal emulation application.
application-x-addon=
application-x-executable=The icon used for executable file types
font-x-generic=The icon used for generic font file types
image-x-generic=The icon used for generic image file types
package-x-generic=The icon used for generic package file types
text-html=The icon used for HTML text file types
text-x-generic-template=The icon used for generic text templates
text-x-preview=
text-x-script=The icon used for script file types, such as shell scripts
x-office-address-book=The icon used for generic address book file types
x-office-document=The icon used for generic document and letter file types
x-office-document-template=
x-office-presentation=The icon used for generic presentation file types
x-office-presentation-template=
x-office-spreadsheet=The icon used for generic spreadsheet file types
x-office-spreadsheet-template=
x-package-repository=
applications-accessories=The icon for the “Accessories” sub-menu of the Programs menu
applications-development=The icon for the “Programming” sub-menu of the Programs menu
applications-engineering=The icon for the “Engineering” sub-menu of the Programs menu
applications-games=The icon for the “Games” sub-menu of the Programs menu
applications-graphics=The icon for the “Graphics” sub-menu of the Programs menu
applications-internet=The icon for the “Internet” sub-menu of the Programs menu
applications-multimedia=The icon for the “Multimedia” sub-menu of the Programs menu
applications-office=The icon for the “Office” sub-menu of the Programs menu
applications-other=The icon for the “Other” sub-menu of the Programs menu
applications-science=The icon for the “Science” sub-menu of the Programs menu
applications-system=The icon for the “System Tools” sub-menu of the Programs menu
applications-utilities=The icon for the “Utilities” sub-menu of the Programs menu
preferences-desktop=The icon for the “Desktop Preferences” category
preferences-desktop-peripherals=The icon for the “Peripherals” sub-category of the “Desktop Preferences” category
preferences-desktop-personal=The icon for the “Personal” sub-category of the “Desktop Preferences” category
preferences-other=The icon for the “Other” preferences category
preferences-system=The icon for the “System Preferences” category
preferences-system-network=The icon for the “Network” sub-category of the “System Preferences” category
system-help=The icon for the “Help” system category
battery=The icon used for the system battery device
computer-apple-ipad=
colorimeter-colorhug=
drive-harddisk=The icon used for hard disk drives
drive-harddisk-ieee1394=
drive-harddisk-system=
drive-multidisk=
media-optical-bd=
media-optical-cd-audio=
media-optical-dvd=
media-tape=The icon used for generic physical tape media
media-zip=
modem=The icon used for modem devices
multimedia-player-apple-ipod-touch=
network-vpn=
pda=This is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon
phone-apple-iphone=
uninterruptible-power-supply=
emblem-default=The icon used as an emblem to specify the default selection of a printer for example
emblem-documents=The icon used as an emblem for the directory where a user's documents are stored
emblem-downloads=The icon used as an emblem for the directory where a user's downloads from the internet are stored
emblem-favorite=The icon used as an emblem for files and directories that the user marks as favorites
emblem-generic=
emblem-important=The icon used as an emblem for files and directories that are marked as important by the user
emblem-mail=The icon used as an emblem to specify the directory where the user's electronic mail is stored
emblem-new=
emblem-ok=
emblem-package=
emblem-photos=The icon used as an emblem to specify the directory where the user stores photographs
emblem-readonly=The icon used as an emblem for files and directories which can not be written to by the user
emblem-symbolic-link=The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem
emblem-synchronized=The icon used as an emblem for files or directories that are configured to be synchronized to another device
emblem-unreadable=The icon used as an emblem for files and directories that are inaccessible.
emblem-urgent=
emblem-videos=
emblem-web=
folder-documents=
folder-download=The icon representing the location in the file system where downloaded files are stored
folder-music=
folder-pictures=
folder-publicshare=
folder-remote=The icon used for normal directories on a remote filesystem
folder-saved-search=
folder-templates=
folder-videos=
network-server=The icon used for individual host machines under the “Network Servers” place in the file manager
network-workgroup=The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network
start-here=The icon used by the desktop's main menu for accessing places, applications, and other features
user-bookmarks=The icon for the user's special “Bookmarks” place
user-desktop=The icon for the special “Desktop” directory of the user
user-home=The icon for the special “Home” directory of the user
airplane-mode=
battery-caution-charging=
battery-caution=The icon used when the battery is below 40%
battery-empty-charging=
battery-empty=
battery-full-charged=
battery-full-charging=
battery-full=
battery-good-charging=
battery-good=
battery-low-charging=
battery-low=The icon used when the battery is below 20%
battery-missing=
bluetooth-active=
bluetooth-disabled=
channel-insecure=
channel-secure=
computer-fail=
display-brightness=
keyboard-brightness=
folder-drag-accept=The icon used for a folder while an object is being dragged onto it, that is of a type that the directory can contain
folder-open=The icon used for folders, while their contents are being displayed within the same window. This icon would normally be shown in a tree or list view, next to the main view of a folder's contents
folder-visiting=The icon used for folders, while their contents are being displayed in another window. This icon would typically be used when using multiple windows to navigate the hierarchy, such as in Nautilus's spatial mode
image-loading=The icon used when another image is being loaded, such as thumnails for larger images in the file manager
image-missing=The icon used when another image could not be loaded
mail-signed=The icon used for an electronic mail that contains a signature
mail-signed-verified=The icon used for an electronic mail that contains a signature which has also been verified by the security system
network-cellular-3g=
network-cellular-4g=
network-cellular-edge=
network-cellular-gprs=
network-cellular-umts=
network-cellular-acquiring=
network-cellular-connected=
network-cellular-no-route=
network-cellular-offline=
network-cellular-signal-excellent=
network-cellular-signal-good=
network-cellular-signal-ok=
network-cellular-signal-weak=
network-cellular-signal-none=
network-vpn-acquiring=
network-vpn=
network-wired-acquiring=
network-wired-disconnected=
network-wired-no-route=
network-wired-offline=
network-wireless-acquiring=
network-wireless-connected=
network-wireless-encrypted=
network-wireless-hotspot=
network-wireless-no-route=
network-wireless-offline=
network-wireless-signal-excellent=
network-wireless-signal-good=
network-wireless-signal-ok=
network-wireless-signal-weak=
network-wireless-signal-none=
rotation-allowed=
rotation-locked=
software-update-available=The icon used when an update is available for software installed on the computing device, through the system software update program
software-update-urgent=The icon used when an urgent update is available through the system software update program
sync-error=The icon used when an error occurs while attempting to synchronize data from the computing device, to another device
sync-synchronizing=The icon used while data is successfully synchronizing to another device
touchpad-disabled=
trophy-bronze=
trophy-silver=
trophy-gold=
night-light=
daytime-sunrise=
daytime-sunset=

View File

@@ -3,5 +3,6 @@
<gresource prefix="/org/gtk/iconbrowser/gtk">
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">menus.ui</file>
<file>icon.list</file>
</gresource>
</gresources>

View File

@@ -4,13 +4,29 @@
#include "iconstore.h"
#include <gtk/gtk.h>
/* Drag 'n Drop */
static GtkTargetEntry target_table[] = {
{ "text/uri-list", 0, 0 },
};
typedef struct
{
const gchar *id;
const gchar *name;
const gchar *description;
gchar *id;
gchar *name;
gchar *description;
} Context;
static void
context_free (gpointer data)
{
Context *context = data;
g_free (context->id);
g_free (context->name);
g_free (context->description);
g_free (context);
}
struct _IconBrowserWindow
{
GtkApplicationWindow parent;
@@ -35,6 +51,8 @@ struct _IconBrowserWindow
GtkWidget *image3;
GtkWidget *image4;
GtkWidget *image5;
GtkWidget *image6;
GtkWidget *label6;
GtkWidget *description;
};
@@ -116,6 +134,19 @@ item_activated (GtkIconView *icon_view, GtkTreePath *path, IconBrowserWindow *wi
set_image (win->image3, name, 32);
set_image (win->image4, name, 48);
set_image (win->image5, name, 64);
if (win->symbolic)
{
gtk_widget_show (win->image6);
gtk_widget_show (win->label6);
gtk_widget_show (gtk_widget_get_parent (win->image6));
set_image (win->image6, name, 64);
}
else
{
gtk_widget_hide (win->image6);
gtk_widget_hide (win->label6);
gtk_widget_hide (gtk_widget_get_parent (win->image6));
}
if (description && description[0])
{
gtk_label_set_text (GTK_LABEL (win->description), description);
@@ -154,6 +185,7 @@ add_icon (IconBrowserWindow *win,
g_free (symbolic_name);
symbolic_name = NULL;
}
gtk_list_store_insert_with_values (win->store, NULL, -1,
ICON_STORE_NAME_COLUMN, regular_name,
ICON_STORE_SYMBOLIC_NAME_COLUMN, symbolic_name,
@@ -172,11 +204,11 @@ add_context (IconBrowserWindow *win,
GtkWidget *row;
c = g_new (Context, 1);
c->id = id;
c->name = name;
c->description = description;
c->id = g_strdup (id);
c->name = g_strdup (name);
c->description = g_strdup (description);
g_hash_table_insert (win->contexts, (gpointer)id, c);
g_hash_table_insert (win->contexts, c->id, c);
row = gtk_label_new (name);
g_object_set_data (G_OBJECT (row), "context", c);
@@ -213,475 +245,50 @@ selected_context_changed (GtkListBox *list, IconBrowserWindow *win)
static void
populate (IconBrowserWindow *win)
{
add_context (win, "volume", "Volume", "Icons related to audio input and output volume");
add_icon (win, "audio-volume-high", "The icon used to indicate high audio volume", "volume");
add_icon (win, "audio-volume-low", "The icon used to indicate low audio volume", "volume");
add_icon (win, "audio-volume-medium", "The icon used to indicate medium audio volume", "volume");
add_icon (win, "audio-volume-muted", "The icon used to indicate the muted state for audio playback", "volume");
add_icon (win, "microphone-sensitivity-high", "The icon used to indicate high microphone sensitivity", "volume");
add_icon (win, "microphone-sensitivity-low", "The icon used to indicate low microphone sensitivity", "volume");
add_icon (win, "microphone-sensitivity-medium", "The icon used to indicate medium microphone sensitivity", "volume");
add_icon (win, "microphone-sensitivity-muted", "The icon used to indicate that a microphone is muted", "volume");
GFile *file;
GKeyFile *kf;
char *data;
gsize length;
char **groups;
int i;
add_context (win, "multimedia", "Multimedia", "Icons related to playback of media");
add_icon (win, "media-playlist-repeat", "The icon for the repeat mode of a media player", "multimedia");
add_icon (win, "media-playlist-repeat-song", "The icon for repeating a song in a media player", "multimedia");
add_icon (win, "media-playlist-shuffle", "The icon for the shuffle mode of a media player", "multimedia");
add_icon (win, "media-playlist-consecutive", "The icon for consecutive mode of a media player", "multimedia");
add_icon (win, "media-skip-backward", "The icon for the skip backward action of a media player", "multimedia");
add_icon (win, "media-seek-backward", "The icon for the seek backward action of a media player", "multimedia");
add_icon (win, "media-playback-start", "The icon for the start playback action of a media player", "multimedia");
add_icon (win, "media-seek-forward", "The icon for the seek forward action of a media player", "multimedia");
add_icon (win, "media-skip-forward", "The icon for the skip forward action of a media player", "multimedia");
add_icon (win, "media-playback-stop", "The icon for the stop action of a media player", "multimedia");
add_icon (win, "media-playback-pause", "The icon for the pause action of a media player", "multimedia");
add_icon (win, "media-eject", "The icon for the eject action of a media player or file manager", "multimedia");
add_icon (win, "media-record", "The icon for the record action of a media application", "multimedia");
add_icon (win, "media-view-subtitles", "The icon used to show subtitles in a media player", "multimedia");
file = g_file_new_for_uri ("resource:/org/gtk/iconbrowser/gtk/icon.list");
g_file_load_contents (file, NULL, &data, &length, NULL, NULL);
add_context (win, "network", "Network", "Icons related to network status");
add_icon (win, "network-transmit-receive", "The icon used data is being both transmitted and received simultaneously, while the computing device is connected to a network", "network");
add_icon (win, "network-transmit", "The icon used when data is being transmitted, while the computing device is connected to a network", "network");
add_icon (win, "network-receive", "The icon used when data is being received, while the computing device is connected to a network", "network");
add_icon (win, "network-idle", "The icon used when no data is being transmitted or received, while the computing device is connected to a network", "network");
add_icon (win, "network-error", "The icon used when an error occurs trying to intialize the network connection of the computing device", "network");
add_icon (win, "network-offline", "The icon used when the computing device is disconnected from the network", "network");
kf = g_key_file_new ();
g_key_file_load_from_data (kf, data, length, G_KEY_FILE_NONE, NULL);
add_context (win, "weather", "Weather", "Icons about weather conditions");
add_icon (win, "weather-clear", "The icon used while the weather for a region is “clear skies”", "weather");
add_icon (win, "weather-clear-night", "The icon used while the weather for a region is “clear skies” during the night", "weather");
add_icon (win, "weather-few-clouds", "The icon used while the weather for a region is “partly cloudy”", "weather");
add_icon (win, "weather-few-clouds-night", "The icon used while the weather for a region is “partly cloudy” during the night", "weather");
add_icon (win, "weather-fog", "The icon used while the weather for a region is “foggy”", "weather");
add_icon (win, "weather-overcast", "The icon used while the weather for a region is “overcast”", "weather");
add_icon (win, "weather-severe-alert", "The icon used while a sever weather alert is in effect for a region", "weather");
add_icon (win, "weather-showers", "The icon used while rain showers are occurring in a region", "weather");
add_icon (win, "weather-showers-scattered", "The icon used while scattered rain showers are occurring in a region", "weather");
add_icon (win, "weather-snow", "The icon used while snow showers are occurring in a region", "weather");
add_icon (win, "weather-storm", "The icon used while storms are occurring in a region", "weather");
groups = g_key_file_get_groups (kf, &length);
for (i = 0; i < length; i++)
{
const char *context;
const char *name;
const char *description;
char **keys;
gsize len;
int j;
add_context (win, "navigation", "Navigation", "Icons for navigation in the user interface of a program");
add_icon (win, "go-first", "The icon for the go to the first item in a list", "navigation");
add_icon (win, "go-previous", "The icon for the go to the previous item in a list", "navigation");
add_icon (win, "go-next", "The icon for the go to the next item in a list", "navigation");
add_icon (win, "go-last", "The icon for the go to the last item in a list", "navigation");
add_icon (win, "go-bottom", "The icon for the go to bottom of a list", "navigation");
add_icon (win, "go-down", "The icon for the go down in a list", "navigation");
add_icon (win, "go-up", "The icon for the go up in a list", "navigation");
add_icon (win, "go-top", "The icon for the go to the top of a list", "navigation");
add_icon (win, "go-home", "The icon for the go to home location", "navigation");
add_icon (win, "go-jump", "The icon for the jump to action", "navigation");
context = groups[i];
name = g_key_file_get_string (kf, context, "Name", NULL);
description = g_key_file_get_string (kf, context, "Description", NULL);
add_context (win, context, name, description);
add_context (win, "editing", "Editing", "Icons related to editing a document");
add_icon (win, "format-indent-less", "The icon for the decrease indent formatting action", "editing");
add_icon (win, "format-indent-more", "The icon for the increase indent formatting action", "editing");
add_icon (win, "format-justify-center", "The icon for the center justification formatting action", "editing");
add_icon (win, "format-justify-fill", "The icon for the fill justification formatting action", "editing");
add_icon (win, "format-justify-left", "The icon for the left justification formatting action", "editing");
add_icon (win, "format-justify-right", "The icon for the right justification action", "editing");
add_icon (win, "format-text-direction-ltr", "The icon for the left-to-right text formatting action", "editing");
add_icon (win, "format-text-direction-rtl", "The icon for the right-to-left formatting action", "editing");
add_icon (win, "format-text-bold", "The icon for the bold text formatting action", "editing");
add_icon (win, "format-text-italic", "The icon for the italic text formatting action", "editing");
add_icon (win, "format-text-underline", "The icon for the underlined text formatting action", "editing");
add_icon (win, "format-text-strikethrough", "The icon for the strikethrough text formatting action", "editing");
add_icon (win, "edit-clear", "The icon for the clear action", "editing");
add_icon (win, "edit-clear-all", "", "editing");
add_icon (win, "edit-copy", "The icon for the copy action", "editing");
add_icon (win, "edit-cut", "The icon for the cut action", "editing");
add_icon (win, "edit-delete", "The icon for the delete action", "editing");
add_icon (win, "edit-find-replace", "The icon for the find and replace action", "editing");
add_icon (win, "edit-paste", "The icon for the paste action", "editing");
add_icon (win, "edit-redo", "The icon for the redo action", "editing");
add_icon (win, "edit-select-all", "The icon for the select all action", "editing");
add_icon (win, "edit-select", "", "editing");
add_icon (win, "edit-undo", "The icon for the undo action", "editing");
add_icon (win, "document-properties", "The icon for the action to view the properties of a document in an application", "editing");
add_icon (win, "document-new", "The icon used for the action to create a new document", "editing");
add_icon (win, "document-open", "The icon used for the action to open a document", "editing");
add_icon (win, "document-open-recent", "The icon used for the action to open a document that was recently opened", "editing");
add_icon (win, "document-save", "The icon for the save action. Should be an arrow pointing down and toward a hard disk", "editing");
add_icon (win, "document-save-as", "The icon for the save as action", "editing");
add_icon (win, "document-send", "The icon for the send action. Should be an arrow pointing up and away from a hard disk", "editing");
add_icon (win, "document-page-setup", "The icon for the page setup action of a document editor", "editing");
add_icon (win, "changes-allow", "", "other");
add_icon (win, "changes-prevent", "", "other");
add_icon (win, "object-flip-horizontal", "The icon for the action to flip an object horizontally", "editing");
add_icon (win, "object-flip-vertical", "The icon for the action to flip an object vertically", "editing");
add_icon (win, "object-rotate-left", "The icon for the rotate left action performed on an object", "editing");
add_icon (win, "object-rotate-right", "The icon for the rotate rigt action performed on an object", "editing");
add_icon (win, "insert-image", "The icon for the insert image action of an application", "editing");
add_icon (win, "insert-link", "The icon for the insert link action of an application", "editing");
add_icon (win, "insert-object", "The icon for the insert object action of an application", "editing");
add_icon (win, "insert-text", "The icon for the insert text action of an application", "editing");
add_icon (win, "accessories-text-editor", "The icon used for the desktop's text editing accessory program", "editing");
keys = g_key_file_get_keys (kf, context, &len, NULL);
for (j = 0; j < len; j++)
{
const char *key = keys[j];
const char *value;
add_context (win, "view", "View Controls", "Icons for view controls in a user interface");
add_icon (win, "view-list", "The icon used for “List“ view mode", "view");
add_icon (win, "view-grid", "The icon used for “Grid“ view mode (as opposed to “List“)", "view");
add_icon (win, "view-fullscreen", "The icon used for the “Fullscreen” item in the application's “View” menu", "view");
add_icon (win, "view-restore", "The icon used by an application for leaving the fullscreen view, and returning to a normal windowed view", "view");
add_icon (win, "zoom-fit-best", "The icon used for the “Best Fit” item in the application's “View” menu", "view");
add_icon (win, "zoom-in", "The icon used for the “Zoom in” item in the application's “View” menu", "view");
add_icon (win, "zoom-out", "The icon used for the “Zoom Out” item in the application's “View” menu ", "view");
add_icon (win, "zoom-original", "The icon used for the “Original Size” item in the application's “View” menu", "view");
add_icon (win, "view-continuous", "The icon used for a continuous view mode", "view");
add_icon (win, "view-paged", "The icon used for a paged view mode (as opposed to continuous)", "view");
add_icon (win, "view-dual", "The icon used for a side-by-side view of paginated content", "view");
add_icon (win, "view-wrapped", "The icon used to indicate a wrap-around to the beginning", "view");
if (strcmp (key, "Name") == 0 || strcmp (key, "Description") == 0)
continue;
add_context (win, "calendar", "Calendar, Tasks and Alarms", "Icons related to calendars, tasks and alarms");
add_icon (win, "task-due", "The icon used when a task is due soon", "calendar");
add_icon (win, "task-past-due", "The icon used when a task that was due, has been left incomplete", "calendar");
add_icon (win, "appointment-soon", "The icon used when an appointment will occur soon", "calendar");
add_icon (win, "appointment-missed", "The icon used when an appointment was missed", "calendar");
add_icon (win, "alarm", "The icon used for alarms when a task or appointment is due", "calendar");
value = g_key_file_get_string (kf, context, key, NULL);
add_context (win, "communication", "Communication", "Icons related email, phone calls, IM and other forms of communication");
add_icon (win, "mail-unread", "The icon used for an electronic mail that is unread", "communication");
add_icon (win, "mail-read", "The icon used for an electronic mail that is read", "communication");
add_icon (win, "mail-replied", "The icon used for an electronic mail that has been replied to", "communication");
add_icon (win, "mail-attachment", "The icon used for an electronic mail that contains attachments", "communication");
add_icon (win, "mail-mark-important", "The icon for the mark as important action of an electronic mail application", "communication");
add_icon (win, "mail-send", "The icon for the send action of an electronic mail application", "communication");
add_icon (win, "mail-send-receive", "The icon for the send and receive action of an electronic mail application", "communication");
add_icon (win, "call-start", "The icon used for initiating or accepting a call", "communication");
add_icon (win, "call-stop", "The icon used for stopping a current call", "communication");
add_icon (win, "call-missed", "The icon used to show a missed call", "communication");
add_icon (win, "user-available", "The icon used when a user on a chat network is available to initiate a conversation with", "communication");
add_icon (win, "user-offline", "The icon used when a user on a chat network is not available", "communication");
add_icon (win, "user-idle", "The icon used when a user on a chat network has not been an active participant in any chats on the network, for an extended period of time", "communication");
add_icon (win, "user-invisible", "The icon used when a user is on a chat network, but is invisible to others", "communication");
add_icon (win, "user-busy", "The icon used when a user is on a chat network, and has marked himself as busy", "communication");
add_icon (win, "user-away", "The icon used when a user on a chat network is away from their keyboard and the chat program", "communication");
add_icon (win, "user-status-pending", "The icon used when the current user status on a chat network is not known", "communication");
add_context (win, "devices", "Devices and Media", "Icons for devices and media");
add_icon (win, "audio-input-microphone", "The icon used for the microphone audio input device", "devices");
add_icon (win, "camera-web", "The fallback icon for web cameras", "devices");
add_icon (win, "camera-photo", "The icon used for a digital still camera devices", "devices");
add_icon (win, "input-keyboard", "The icon used for the keyboard input device", "devices");
add_icon (win, "printer", "The icon used for a printer device", "devices");
add_icon (win, "video-display", "The icon used for the monitor that video gets displayed to", "devices");
add_icon (win, "computer", "The icon used for the computing device as a whole", "devices");
add_icon (win, "media-optical", "The icon used for physical optical media such as CD and DVD", "devices");
add_icon (win, "phone", "The icon used for phone devices which support connectivity to the PC, such as VoIP, cellular, or possibly landline phones", "devices");
add_icon (win, "input-dialpad", "The icon used for dialpad input devices", "devices");
add_icon (win, "input-touchpad", "The icon used for touchpad input devices", "devices");
add_icon (win, "scanner", "The icon used for a scanner device", "devices");
add_icon (win, "audio-card", "The icon used for the audio rendering device", "devices");
add_icon (win, "input-gaming", "The icon used for the gaming input device", "devices");
add_icon (win, "input-mouse", "The icon used for the mousing input device", "devices");
add_icon (win, "multimedia-player", "The icon used for generic multimedia playing devices", "devices");
add_icon (win, "audio-headphones", "The icon used for headphones", "devices");
add_icon (win, "audio-headset", "The icon used for headsets", "devices");
add_icon (win, "display-projector", "The icon used for projectors", "devices");
add_icon (win, "media-removable", "The icon used for generic removable media", "devices");
add_icon (win, "printer-network", "The icon used for printers which are connected via the network", "devices");
add_icon (win, "audio-speakers", "The icon used for speakers", "devices");
add_icon (win, "camera-video", "The fallback icon for video cameras", "devices");
add_icon (win, "drive-optical", "The icon used for optical media drives such as CD and DVD", "devices");
add_icon (win, "drive-removable-media", "The icon used for removable media drives", "devices");
add_icon (win, "input-tablet", "The icon used for graphics tablet input devices", "devices");
add_icon (win, "network-wireless", "The icon used for wireless network connections", "devices");
add_icon (win, "network-wired", "The icon used for wired network connections", "devices");
add_icon (win, "media-floppy", "The icon used for physical floppy disk media", "devices");
add_icon (win, "media-flash", "The fallback icon used for flash media, such as memory stick and SD", "devices");
add_context (win, "contenttypes", "Content Types", "Icons for different types of data, such as audio or image files");
add_icon (win, "application-certificate", "", "contenttypes");
add_icon (win, "application-rss+xml", "", "contenttypes");
add_icon (win, "application-x-appliance", "", "contenttypes");
add_icon (win, "audio-x-generic", "The icon used for generic audio file types", "contenttypes");
add_icon (win, "folder", "The standard folder icon used to represent directories on local filesystems, mail folders, and other hierarchical groups", "contenttypes");
add_icon (win, "text-x-generic", "The icon used for generic text file types", "contenttypes");
add_icon (win, "video-x-generic", "The icon used for generic video file types", "contenttypes");
add_icon (win, "x-office-calendar", "The icon used for generic calendar file types", "contenttypes");
add_context (win, "emotes", "Emotes", "Icons for emotions that are expressed through text chat applications such as :-) or :-P in IRC or instant messengers");
add_icon (win, "face-angel", "The icon used for the 0:-) emote", "emotes");
add_icon (win, "face-angry", "The icon used for the X-( emote", "emotes");
add_icon (win, "face-cool", "The icon used for the B-) emote", "emotes");
add_icon (win, "face-crying", "The icon used for the :'( emote", "emotes");
add_icon (win, "face-devilish", "The icon used for the >:-) emote", "emotes");
add_icon (win, "face-embarrassed", "The icon used for the :-[ emote", "emotes");
add_icon (win, "face-kiss", "The icon used for the :-* emote", "emotes");
add_icon (win, "face-laugh", "The icon used for the :-)) emote", "emotes");
add_icon (win, "face-monkey", "The icon used for the :-(|) emote", "emotes");
add_icon (win, "face-plain", "The icon used for the :-| emote", "emotes");
add_icon (win, "face-raspberry", "The icon used for the :-P emote", "emotes");
add_icon (win, "face-sad", "The icon used for the :-( emote", "emotes");
add_icon (win, "face-shutmouth", "The 'shut mouth' emote", "emotes");
add_icon (win, "face-sick", "The icon used for the :-& emote", "emotes");
add_icon (win, "face-smile", "The icon used for the :-) emote", "emotes");
add_icon (win, "face-smile-big", "The icon used for the :-D emote", "emotes");
add_icon (win, "face-smirk", "The icon used for the :-! emote", "emotes");
add_icon (win, "face-surprise", "The icon used for the :-0 emote", "emotes");
add_icon (win, "face-tired", "The icon used for the |-) emote", "emotes");
add_icon (win, "face-uncertain", "The icon used for the :-/ emote", "emotes");
add_icon (win, "face-wink", "The icon used for the ;-) emote", "emotes");
add_icon (win, "face-worried", "The icon used for the :-S emote", "emotes");
add_icon (win, "face-yawn", "", "emotes");
add_context (win, "general", "General", "Generally useful icons that don't fit in a particular category");
add_icon (win, "edit-find", "The icon for generic search actions", "general");
add_icon (win, "content-loading", "The icon used to indicate that content is loading", "general");
add_icon (win, "open-menu", "The icon used for a menu button in the header bar", "general");
add_icon (win, "view-more", "The icon used for a “View More“ action", "general");
add_icon (win, "tab-new", "The icon used for a “New Tab“ action", "general");
add_icon (win, "bookmark-new", "The icon used for creating a new bookmark", "general");
add_icon (win, "mark-location", "The icon used to mark a location on a map", "general");
add_icon (win, "find-location", "The icon used for a “Search location“ action", "general");
add_icon (win, "send-to", "The icon used for a “Send to“ action", "general");
add_icon (win, "object-select", "The icon used for generic selection actions", "general");
add_icon (win, "window-close", "The icon used for actions that close a view, such as window or tab close button", "general");
add_icon (win, "view-refresh", "The icon used for the “Refresh” item in the application's “View” menu", "general");
add_icon (win, "process-stop", "The icon used for the “Stop” action in applications with actions that may take a while to process, such as web page loading in a browser", "general");
add_icon (win, "action-unavailable", "The icon used to indicate that an action is currently unavailable, such as “Pause“ when no media is playing", "general");
add_icon (win, "document-print", "The icon for the print action of an application", "general");
add_icon (win, "printer-printing", "The icon used while a print job is successfully being spooled to a printing device", "general");
add_icon (win, "printer-warning", "The icon used when a recoverable problem occurs while attempting to printing", "general");
add_icon (win, "printer-error", "The icon used when an error occurs while attempting to print", "general");
add_icon (win, "dialog-information", "The icon used when a dialog is opened to give information to the user that may be pertinent to the requested action", "general");
add_icon (win, "dialog-question", "The icon used when a dialog is opened to ask a simple question of the user", "general");
add_icon (win, "dialog-warning", "The icon used when a dialog is opened to warn the user of impending issues with the requested action", "general");
add_icon (win, "dialog-password", "The icon used when a dialog requesting the authentication credentials for a user is opened", "general");
add_icon (win, "dialog-error", "The icon used when a dialog is opened to explain an error condition to the user", "general");
add_icon (win, "list-add", "The icon for the add to list action", "general");
add_icon (win, "list-remove", "The icon for the remove from list action", "general");
add_icon (win, "non-starred", "The icon used to indicate that an object is not 'starred'", "general");
add_icon (win, "semi-starred", "The icon used to indicate that an object has is 'half-starred'", "general");
add_icon (win, "starred", "The icon used to indicate that an object is 'starred'", "general");
add_icon (win, "star-new", "The used for the “New Star“ action", "general");
add_icon (win, "security-low", "The icon used to indicate that the security level of a connection is presumed to be insecure, either by using weak encryption, or by using a certificate that the could not be automatically verified, and which the user has not chosent to trust", "general");
add_icon (win, "security-medium", "The icon used to indicate that the security level of a connection is presumed to be secure, using strong encryption, and a certificate that could not be automatically verified, but which the user has chosen to trust", "general");
add_icon (win, "security-high", "The icon used to indicate that the security level of a connection is known to be secure, using strong encryption and a valid certificate", "general");
add_icon (win, "user-trash", "The icon for the user's “Trash” place in the file system", "other");
add_icon (win, "user-trash-full", "The icon for the user's “Trash” in the file system, when there are items in the “Trash” waiting for disposal or recovery", "general");
add_icon (win, "emblem-system", "The icon used as an emblem for directories that contain system libraries, settings, and data", "general");
add_icon (win, "avatar-default", "The generic avatar icon, which is used to represent a user that doesn't have a personalized avatar", "general");
add_icon (win, "emblem-synchronizing", "The icon used as an emblem to indicate that a a synchronizing operation is in process", "general");
add_icon (win, "emblem-shared", "The icon used as an emblem for files and directories that are shared to other users", "general");
add_icon (win, "folder-download", "The icon representing the location in the file system where downloaded files are stored", "general");
add_icon (win, "help-browser", "The icon used for the desktop's help browsing application", "general");
add_context (win, "other", "Other", "Icons which have may be too specialized and not of general interest");
add_icon (win, "view-sort-ascending", "The icon used for the “Sort Ascending” item in the application's “View” menu, or in a button for changing the sort method for a list", "other");
add_icon (win, "view-sort-descending", "The icon used for the “Sort Descending” item in the application's “View” menu, or in a button for changing the sort method for a list", "other");
add_icon (win, "document-revert", "The icon for the action of reverting to a previous version of a document", "other");
add_icon (win, "address-book-new", "The icon used for the action to create a new address book", "other");
add_icon (win, "application-exit", "The icon used for exiting an application. Typically this is seen in the application's menus as File->Quit", "other");
add_icon (win, "appointment-new", "The icon used for the action to create a new appointment in a calendaring application", "other");
add_icon (win, "contact-new", "The icon used for the action to create a new contact in an address book application", "other");
add_icon (win, "document-print-preview", "The icon for the print preview action of an application", "other");
add_icon (win, "folder-new", "The icon for creating a new folder", "other");
add_icon (win, "help-about", "The icon for the About item in the Help menu", "other");
add_icon (win, "help-contents", "The icon for Contents item in the Help menu", "other");
add_icon (win, "help-faq", "The icon for the FAQ item in the Help menu", "other");
add_icon (win, "list-remove-all", "", "other");
add_icon (win, "mail-forward", "The icon for the forward action of an electronic mail application", "other");
add_icon (win, "mail-mark-junk", "The icon for the mark as junk action of an electronic mail application", "other");
add_icon (win, "mail-mark-notjunk", "The icon for the mark as not junk action of an electronic mail application", "other");
add_icon (win, "mail-mark-read", "The icon for the mark as read action of an electronic mail application", "other");
add_icon (win, "mail-mark-unread", "The icon for the mark as unread action of an electronic mail application", "other");
add_icon (win, "mail-message-new", "The icon for the compose new mail action of an electronic mail application", "other");
add_icon (win, "mail-reply-all", "The icon for the reply to all action of an electronic mail application", "other");
add_icon (win, "mail-reply-sender", "The icon for the reply to sender action of an electronic mail application", "other");
add_icon (win, "pan-down", "", "other");
add_icon (win, "pan-end", "", "other");
add_icon (win, "pan-start", "", "other");
add_icon (win, "pan-up", "", "other");
add_icon (win, "system-lock-screen", "The icon used for the “Lock Screen” item in the desktop's panel application", "other");
add_icon (win, "system-log-out", "The icon used for the “Log Out” item in the desktop's panel application", "other");
add_icon (win, "system-run", "The icon used for the “Run Application...” item in the desktop's panel application", "other");
add_icon (win, "system-search", "The icon used for the “Search” item in the desktop's panel application", "other");
add_icon (win, "system-reboot", "The icon used for the “Reboot” item in the desktop's panel application", "other");
add_icon (win, "system-shutdown", "The icon used for the “Shutdown” item in the desktop's panel application", "other");
add_icon (win, "tools-check-spelling", "The icon used for the “Check Spelling” item in the application's “Tools” menu", "other");
add_icon (win, "window-maximize", "", "other");
add_icon (win, "window-minimize", "", "other");
add_icon (win, "window-restore", "", "other");
add_icon (win, "window-new", "The icon used for the “New Window” item in the application's “Windows” menu", "other");
add_icon (win, "accessories-calculator", "The icon used for the desktop's calculator accessory program", "other");
add_icon (win, "accessories-character-map", "The icon used for the desktop's international and extended text character accessory program", "other");
add_icon (win, "accessories-dictionary", "The icon used for the desktop's dictionary accessory program", "other");
add_icon (win, "multimedia-volume-control", "The icon used for the desktop's hardware volume control application", "other");
add_icon (win, "preferences-desktop-accessibility", "The icon used for the desktop's accessibility preferences", "other");
add_icon (win, "preferences-desktop-display", "", "other");
add_icon (win, "preferences-desktop-font", "The icon used for the desktop's font preferences", "other");
add_icon (win, "preferences-desktop-keyboard", "The icon used for the desktop's keyboard preferences", "other");
add_icon (win, "preferences-desktop-keyboard-shortcuts", "", "other");
add_icon (win, "preferences-desktop-locale", "The icon used for the desktop's locale preferences", "other");
add_icon (win, "preferences-desktop-remote-desktop", "", "other");
add_icon (win, "preferences-desktop-multimedia", "The icon used for the desktop's multimedia preferences", "other");
add_icon (win, "preferences-desktop-screensaver", "The icon used for the desktop's screen saving preferences", "other");
add_icon (win, "preferences-desktop-theme", "The icon used for the desktop's theme preferences", "other");
add_icon (win, "preferences-desktop-wallpaper", "The icon used for the desktop's wallpaper preferences", "other");
add_icon (win, "preferences-system-privacy", "", "other");
add_icon (win, "preferences-system-windows", "", "other");
add_icon (win, "system-file-manager", "The icon used for the desktop's file management application", "other");
add_icon (win, "system-software-install", "The icon used for the desktop's software installer application", "other");
add_icon (win, "system-software-update", "The icon used for the desktop's software updating application", "other");
add_icon (win, "system-users", "", "other");
add_icon (win, "user-info", "", "other");
add_icon (win, "utilities-system-monitor", "The icon used for the desktop's system resource monitor application", "other");
add_icon (win, "utilities-terminal", "The icon used for the desktop's terminal emulation application. ", "other");
add_icon (win, "application-x-addon", "", "other");
add_icon (win, "application-x-executable", "The icon used for executable file types", "other");
add_icon (win, "font-x-generic", "The icon used for generic font file types", "other");
add_icon (win, "image-x-generic", "The icon used for generic image file types", "other");
add_icon (win, "package-x-generic", "The icon used for generic package file types", "other");
add_icon (win, "text-html", "The icon used for HTML text file types", "other");
add_icon (win, "text-x-generic-template", "The icon used for generic text templates", "other");
add_icon (win, "text-x-preview", "", "other");
add_icon (win, "text-x-script", "The icon used for script file types, such as shell scripts", "other");
add_icon (win, "x-office-address-book", "The icon used for generic address book file types", "other");
add_icon (win, "x-office-document", "The icon used for generic document and letter file types", "other");
add_icon (win, "x-office-document-template", "", "other");
add_icon (win, "x-office-presentation", "The icon used for generic presentation file types", "other");
add_icon (win, "x-office-presentation-template", "", "other");
add_icon (win, "x-office-spreadsheet", "The icon used for generic spreadsheet file types", "other");
add_icon (win, "x-office-spreadsheet-template", "", "other");
add_icon (win, "x-package-repository", "", "other");
add_icon (win, "applications-accessories", "The icon for the “Accessories” sub-menu of the Programs menu", "other");
add_icon (win, "applications-development", "The icon for the “Programming” sub-menu of the Programs menu", "other");
add_icon (win, "applications-engineering", "The icon for the “Engineering” sub-menu of the Programs menu", "other");
add_icon (win, "applications-games", "The icon for the “Games” sub-menu of the Programs menu", "other");
add_icon (win, "applications-graphics", "The icon for the “Graphics” sub-menu of the Programs menu", "other");
add_icon (win, "applications-internet", "The icon for the “Internet” sub-menu of the Programs menu", "other");
add_icon (win, "applications-multimedia", "The icon for the “Multimedia” sub-menu of the Programs menu", "other");
add_icon (win, "applications-office", "The icon for the “Office” sub-menu of the Programs menu", "other");
add_icon (win, "applications-other", "The icon for the “Other” sub-menu of the Programs menu", "other");
add_icon (win, "applications-science", "The icon for the “Science” sub-menu of the Programs menu", "other");
add_icon (win, "applications-system", "The icon for the “System Tools” sub-menu of the Programs menu", "other");
add_icon (win, "applications-utilities", "The icon for the “Utilities” sub-menu of the Programs menu", "other");
add_icon (win, "preferences-desktop", "The icon for the “Desktop Preferences” category", "other");
add_icon (win, "preferences-desktop-peripherals", "The icon for the “Peripherals” sub-category of the “Desktop Preferences” category", "other");
add_icon (win, "preferences-desktop-personal", "The icon for the “Personal” sub-category of the “Desktop Preferences” category", "other");
add_icon (win, "preferences-other", "The icon for the “Other” preferences category", "other");
add_icon (win, "preferences-system", "The icon for the “System Preferences” category", "other");
add_icon (win, "preferences-system-network", "The icon for the “Network” sub-category of the “System Preferences” category", "other");
add_icon (win, "system-help", "The icon for the “Help” system category", "other");
add_icon (win, "battery", "The icon used for the system battery device", "other");
add_icon (win, "computer-apple-ipad", "", "other");
add_icon (win, "colorimeter-colorhug", "", "other");
add_icon (win, "drive-harddisk", "The icon used for hard disk drives", "other");
add_icon (win, "drive-harddisk-ieee1394", "", "other");
add_icon (win, "drive-harddisk-system", "", "other");
add_icon (win, "drive-multidisk", "", "other");
add_icon (win, "media-optical-bd", "", "other");
add_icon (win, "media-optical-cd-audio", "", "other");
add_icon (win, "media-optical-dvd", "", "other");
add_icon (win, "media-tape", "The icon used for generic physical tape media", "other");
add_icon (win, "media-zip", "", "other");
add_icon (win, "modem", "The icon used for modem devices", "other");
add_icon (win, "multimedia-player-apple-ipod-touch", "", "other");
add_icon (win, "network-vpn", "", "other");
add_icon (win, "pda", "This is the fallback icon for Personal Digial Assistant devices. Primary use of this icon is for PDA devices connected to the PC. Connection medium is not an important aspect of the icon. The metaphor for this fallback icon should be a generic PDA device icon", "other");
add_icon (win, "phone-apple-iphone", "", "other");
add_icon (win, "uninterruptible-power-supply", "", "other");
add_icon (win, "emblem-default", "The icon used as an emblem to specify the default selection of a printer for example", "other");
add_icon (win, "emblem-documents", "The icon used as an emblem for the directory where a user's documents are stored", "other");
add_icon (win, "emblem-downloads", "The icon used as an emblem for the directory where a user's downloads from the internet are stored", "other");
add_icon (win, "emblem-favorite", "The icon used as an emblem for files and directories that the user marks as favorites", "other");
add_icon (win, "emblem-generic", "", "other");
add_icon (win, "emblem-important", "The icon used as an emblem for files and directories that are marked as important by the user", "other");
add_icon (win, "emblem-mail", "The icon used as an emblem to specify the directory where the user's electronic mail is stored", "other");
add_icon (win, "emblem-new", "", "other");
add_icon (win, "emblem-ok", "", "other");
add_icon (win, "emblem-package", "", "other");
add_icon (win, "emblem-photos", "The icon used as an emblem to specify the directory where the user stores photographs", "other");
add_icon (win, "emblem-readonly", "The icon used as an emblem for files and directories which can not be written to by the user", "other");
add_icon (win, "emblem-symbolic-link", "The icon used as an emblem for files and direcotires that are links to other files or directories on the filesystem", "other");
add_icon (win, "emblem-synchronized", "The icon used as an emblem for files or directories that are configured to be synchronized to another device", "other");
add_icon (win, "emblem-unreadable", "The icon used as an emblem for files and directories that are inaccessible. ", "other");
add_icon (win, "emblem-urgent", "", "other");
add_icon (win, "emblem-videos", "", "other");
add_icon (win, "emblem-web", "", "other");
add_icon (win, "folder-documents", "", "other");
add_icon (win, "folder-download", "", "other");
add_icon (win, "folder-music", "", "other");
add_icon (win, "folder-pictures", "", "other");
add_icon (win, "folder-documents", "", "other");
add_icon (win, "folder-publicshare", "", "other");
add_icon (win, "folder-remote", "The icon used for normal directories on a remote filesystem", "other");
add_icon (win, "folder-saved-search", "", "other");
add_icon (win, "folder-templates", "", "other");
add_icon (win, "folder-videos", "", "other");
add_icon (win, "network-server", "The icon used for individual host machines under the “Network Servers” place in the file manager", "other");
add_icon (win, "network-workgroup", "The icon for the “Network Servers” place in the desktop's file manager, and workgroups within the network", "other");
add_icon (win, "start-here", "The icon used by the desktop's main menu for accessing places, applications, and other features", "other");
add_icon (win, "user-bookmarks", "The icon for the user's special “Bookmarks” place", "other");
add_icon (win, "user-desktop", "The icon for the special “Desktop” directory of the user", "other");
add_icon (win, "user-home", "The icon for the special “Home” directory of the user", "other");
add_icon (win, "airplane-mode", "", "other");
add_icon (win, "battery-caution-charging", "", "other");
add_icon (win, "battery-caution", "The icon used when the battery is below 40%", "other");
add_icon (win, "battery-empty-charging", "", "other");
add_icon (win, "battery-empty", "", "other");
add_icon (win, "battery-full-charged", "", "other");
add_icon (win, "battery-full-charging", "", "other");
add_icon (win, "battery-full", "", "other");
add_icon (win, "battery-good-charging", "", "other");
add_icon (win, "battery-good", "", "other");
add_icon (win, "battery-low-charging", "", "other");
add_icon (win, "battery-low", "The icon used when the battery is below 20%", "other");
add_icon (win, "battery-missing", "", "other");
add_icon (win, "bluetooth-active", "", "other");
add_icon (win, "bluetooth-disabled", "", "other");
add_icon (win, "channel-insecure", "", "other");
add_icon (win, "channel-secure", "", "other");
add_icon (win, "computer-fail", "", "other");
add_icon (win, "display-brightness", "", "other");
add_icon (win, "keyboard-brightness", "", "other");
add_icon (win, "folder-drag-accept", "The icon used for a folder while an object is being dragged onto it, that is of a type that the directory can contain", "other");
add_icon (win, "folder-open", "The icon used for folders, while their contents are being displayed within the same window. This icon would normally be shown in a tree or list view, next to the main view of a folder's contents", "other");
add_icon (win, "folder-visiting", "The icon used for folders, while their contents are being displayed in another window. This icon would typically be used when using multiple windows to navigate the hierarchy, such as in Nautilus's spatial mode", "other");
add_icon (win, "image-loading", "The icon used when another image is being loaded, such as thumnails for larger images in the file manager", "other");
add_icon (win, "image-missing", "The icon used when another image could not be loaded", "other");
add_icon (win, "mail-signed", "The icon used for an electronic mail that contains a signature", "other");
add_icon (win, "mail-signed-verified", "The icon used for an electronic mail that contains a signature which has also been verified by the security system", "other");
add_icon (win, "network-cellular-3g", "", "other");
add_icon (win, "network-cellular-4g", "", "other");
add_icon (win, "network-cellular-edge", "", "other");
add_icon (win, "network-cellular-gprs", "", "other");
add_icon (win, "network-cellular-umts", "", "other");
add_icon (win, "network-cellular-acquiring", "", "other");
add_icon (win, "network-cellular-connected", "", "other");
add_icon (win, "network-cellular-no-route", "", "other");
add_icon (win, "network-cellular-offline", "", "other");
add_icon (win, "network-cellular-signal-excellent", "", "other");
add_icon (win, "network-cellular-signal-good", "", "other");
add_icon (win, "network-cellular-signal-ok", "", "other");
add_icon (win, "network-cellular-signal-weak", "", "other");
add_icon (win, "network-cellular-signal-none", "", "other");
add_icon (win, "network-vpn-acquiring", "", "other");
add_icon (win, "network-vpn", "", "other");
add_icon (win, "network-wired-acquiring", "", "other");
add_icon (win, "network-wired-disconnected", "", "other");
add_icon (win, "network-wired-no-route", "", "other");
add_icon (win, "network-wired-offline", "", "other");
add_icon (win, "network-wireless-acquiring", "", "other");
add_icon (win, "network-wireless-connected", "", "other");
add_icon (win, "network-wireless-encrypted", "", "other");
add_icon (win, "network-wireless-hotspot", "", "other");
add_icon (win, "network-wireless-no-route", "", "other");
add_icon (win, "network-wireless-offline", "", "other");
add_icon (win, "network-wireless-signal-excellent", "", "other");
add_icon (win, "network-wireless-signal-good", "", "other");
add_icon (win, "network-wireless-signal-ok", "", "other");
add_icon (win, "network-wireless-signal-weak", "", "other");
add_icon (win, "network-wireless-signal-none", "", "other");
add_icon (win, "rotation-allowed", "", "other");
add_icon (win, "rotation-locked", "", "other");
add_icon (win, "software-update-available", "The icon used when an update is available for software installed on the computing device, through the system software update program", "other");
add_icon (win, "software-update-urgent", "The icon used when an urgent update is available through the system software update program", "other");
add_icon (win, "sync-error", "The icon used when an error occurs while attempting to synchronize data from the computing device, to another device", "other");
add_icon (win, "sync-synchronizing", "The icon used while data is successfully synchronizing to another device", "other");
add_icon (win, "touchpad-disabled", "", "other");
add_icon (win, "trophy-bronze", "", "other");
add_icon (win, "trophy-silver", "", "other");
add_icon (win, "trophy-gold", "", "other");
add_icon (win, key, value, context);
}
g_strfreev (keys);
}
g_strfreev (groups);
}
static gboolean
@@ -694,6 +301,16 @@ key_press_event_cb (GtkWidget *widget,
return gtk_search_bar_handle_event (GTK_SEARCH_BAR (win->searchbar), event);
}
static void
copy_to_clipboard (GtkButton *button,
IconBrowserWindow *win)
{
GtkClipboard *clipboard;
clipboard = gtk_clipboard_get_default (gdk_display_get_default ());
gtk_clipboard_set_text (clipboard, gtk_window_get_title (GTK_WINDOW (win->details)), -1);
}
static gboolean
icon_visible_func (GtkTreeModel *model,
GtkTreeIter *iter,
@@ -748,7 +365,7 @@ symbolic_toggled (GtkToggleButton *toggle, IconBrowserWindow *win)
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->cell, "icon-name", column, NULL);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (win->list), win->text_cell, "text", column, NULL);
gtk_tree_model_filter_refilter (win->filter_model);
gtk_widget_queue_draw (win->list);
}
@@ -783,6 +400,35 @@ get_image_data (GtkWidget *widget,
g_object_unref (pixbuf);
}
static void
get_scalable_image_data (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection,
guint target_info,
guint time,
gpointer data)
{
gchar *uris[2];
GtkIconInfo *info;
GtkWidget *image;
GFile *file;
const gchar *name;
image = gtk_bin_get_child (GTK_BIN (widget));
gtk_image_get_icon_name (GTK_IMAGE (image), &name, NULL);
info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), name, -1, 0);
file = g_file_new_for_path (gtk_icon_info_get_filename (info));
uris[0] = g_file_get_uri (file);
uris[1] = NULL;
gtk_selection_data_set_uris (selection, uris);
g_free (uris[0]);
g_object_unref (info);
g_object_unref (file);
}
static void
setup_image_dnd (GtkWidget *image)
{
@@ -794,6 +440,19 @@ setup_image_dnd (GtkWidget *image)
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_image_data), NULL);
}
static void
setup_scalable_image_dnd (GtkWidget *image)
{
GtkWidget *parent;
parent = gtk_widget_get_parent (image);
gtk_drag_source_set (parent, GDK_BUTTON1_MASK,
target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY);
g_signal_connect (parent, "drag-data-get", G_CALLBACK (get_scalable_image_data), NULL);
}
static void
icon_browser_window_init (IconBrowserWindow *win)
{
@@ -820,8 +479,9 @@ icon_browser_window_init (IconBrowserWindow *win)
setup_image_dnd (win->image3);
setup_image_dnd (win->image4);
setup_image_dnd (win->image5);
setup_scalable_image_dnd (win->image6);
win->contexts = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
win->contexts = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, context_free);
gtk_tree_model_filter_set_visible_func (win->filter_model, icon_visible_func, win, NULL);
gtk_window_set_transient_for (GTK_WINDOW (win->details), GTK_WINDOW (win));
@@ -859,6 +519,8 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image3);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image4);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image5);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, image6);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, label6);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), IconBrowserWindow, description);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), search_text_changed);
@@ -866,6 +528,7 @@ icon_browser_window_class_init (IconBrowserWindowClass *class)
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selected_context_changed);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), symbolic_toggled);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), key_press_event_cb);
gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), copy_to_clipboard);
}
IconBrowserWindow *

View File

@@ -0,0 +1,24 @@
iconbrowser_sources = [
'main.c',
'iconbrowserapp.c',
'iconbrowserwin.c',
'iconstore.c'
]
iconbrowser_resources = gnome.compile_resources(
'iconbrowser_resources',
'iconbrowser.gresource.xml',
source_dir: '.'
)
iconbrowser = executable(
'gtk3-icon-browser',
iconbrowser_sources,
iconbrowser_resources,
dependencies: libgtk_dep,
include_directories : confinc,
install: true
)
# desktop file
install_data('gtk3-icon-browser.desktop', install_dir: gtk_applicationsdir)

View File

@@ -8,8 +8,8 @@
</object>
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
<property name="title" translatable="yes">Icon Browser</property>
<property name="default-width">600</property>
<property name="default-height">800</property>
<property name="default-width">1024</property>
<property name="default-height">768</property>
<signal name="key-press-event" handler="key_press_event_cb"/>
<child type="titlebar">
<object class="GtkHeaderBar" id="header">
@@ -109,7 +109,7 @@
<object class="GtkCellRendererPixbuf" id="cell">
<property name="xpad">10</property>
<property name="ypad">10</property>
<property name="stock-size">5</property>
<property name="stock-size">6</property>
<property name="follow-state">True</property>
</object>
</child>
@@ -150,6 +150,7 @@
<property name="margin">10</property>
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
<property name="halign">center</property>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
@@ -230,6 +231,22 @@
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<child>
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
</child>
</object>
<packing>
<property name="left-attach">5</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
@@ -307,21 +324,41 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="description">
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="wrap">True</property>
<property name="max-width-chars">60</property>
<property name="xalign">0</property>
<property name="valign">start</property>
<property name="halign">center</property>
<property name="valign">baseline</property>
<property name="label">scalable</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="width">5</property>
<property name="left-attach">5</property>
<property name="top-attach">2</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="label" translatable="yes">Copy to Clipboard</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="margin">20</property>
<signal name="clicked" handler="copy_to_clipboard"/>
</object>
</child>
<child>
<object class="GtkLabel" id="description">
<property name="margin">10</property>
<property name="visible">True</property>
<property name="wrap">True</property>
<property name="max-width-chars">60</property>
<property name="valign">start</property>
</object>
</child>
</object>
</child>
</object>

3
demos/meson.build Normal file
View File

@@ -0,0 +1,3 @@
subdir('icon-browser')
subdir('widget-factory')
subdir('gtk-demo')

View File

@@ -63,10 +63,10 @@ uninstall-update-icon-cache:
EXTRA_DIST += \
widget-factory.ui \
widget-factory.css \
menus.ui \
help-overlay.ui \
widget-factory.gresource.xml \
data/source.svg \
data/symbolic-source.svg
data/symbolic-source.svg \
meson.build
-include $(top_srcdir)/git.mk

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">About</attribute>
<attribute name="action">app.about</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="action">app.quit</attribute>
<attribute name="accel">&lt;Primary&gt;q</attribute>
</item>
</section>
</menu>
</interface>

View File

@@ -0,0 +1,29 @@
widgetfactory_sources = [
'widget-factory.c'
]
widgetfactory_resources = gnome.compile_resources(
'widgetfactory_resources',
'widget-factory.gresource.xml',
source_dir: '.'
)
foreach s: [ '16', '22', '24', '32', '48', '256']
icon_destdir = join_paths(gtk_datadir, 'icons', 'hicolor', '@0@x@0@'.format(s), 'apps')
icons = [join_paths('data', '@0@x@0@'.format(s), 'gtk3-widget-factory.png'),
join_paths('data', '@0@x@0@'.format(s), 'gtk3-widget-factory-symbolic.symbolic.png')]
install_data(icons, install_dir: icon_destdir)
endforeach
widget_factory = executable(
'gtk3-widget-factory',
widgetfactory_sources,
widgetfactory_resources,
dependencies: libgtk_dep,
include_directories : confinc,
install: true
)
# desktop file
install_data('gtk3-widget-factory.desktop', install_dir: gtk_applicationsdir)

View File

@@ -211,15 +211,15 @@ activate_about (GSimpleAction *action,
gtk_get_micro_version ());
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
"program-name", "GTK+ Widget Factory",
"program-name", "GTK Widget Factory",
"version", version,
"copyright", "(C) 1997-2013 The GTK+ Team",
"copyright", "© 19972019 The GTK Team",
"license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK+ themes and widgets",
"comments", "Program to demonstrate GTK themes and widgets",
"authors", authors,
"logo-icon-name", "gtk3-widget-factory",
"title", "About GTK+ Widget Factory",
"title", "About GTK Widget Factory",
NULL);
g_free (version);
@@ -246,6 +246,14 @@ activate_quit (GSimpleAction *action,
}
}
static void
activate_inspector (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
gtk_window_set_interactive_debugging (TRUE);
}
static void
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
{
@@ -1637,6 +1645,16 @@ scale_format_value (GtkScale *scale, gdouble value)
return g_strdup_printf ("%0.*f", 1, value);
}
static void
adjustment3_value_changed (GtkAdjustment *adj, GtkProgressBar *pbar)
{
double fraction;
fraction = gtk_adjustment_get_value (adj) / (gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj));
gtk_progress_bar_set_fraction (pbar, fraction);
}
static void
activate (GApplication *app)
{
@@ -1686,7 +1704,7 @@ activate (GApplication *app)
gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory/widget-factory.css");
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_USER);
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
g_object_unref (provider);
builder = gtk_builder_new_from_resource ("/org/gtk/WidgetFactory/widget-factory.ui");
@@ -1718,12 +1736,14 @@ activate (GApplication *app)
widget = (GtkWidget *)gtk_builder_get_object (builder, "statusbar");
gtk_statusbar_push (GTK_STATUSBAR (widget), 0, "All systems are operating normally.");
g_action_map_add_action (G_ACTION_MAP (window),
G_ACTION (g_property_action_new ("statusbar", widget, "visible")));
action = G_ACTION (g_property_action_new ("statusbar", widget, "visible"));
g_action_map_add_action (G_ACTION_MAP (window), action);
g_object_unref (G_OBJECT (action));
widget = (GtkWidget *)gtk_builder_get_object (builder, "toolbar");
g_action_map_add_action (G_ACTION_MAP (window),
G_ACTION (g_property_action_new ("toolbar", widget, "visible")));
action = G_ACTION (g_property_action_new ("toolbar", widget, "visible"));
g_action_map_add_action (G_ACTION_MAP (window), action);
g_object_unref (G_OBJECT (action));
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment1");
@@ -1910,6 +1930,12 @@ activate (GApplication *app)
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "decrease_button");
g_object_set_data (G_OBJECT (widget), "decrease_button", widget2);
adj = (GtkAdjustment *)gtk_builder_get_object (builder, "adjustment3");
widget = (GtkWidget *)gtk_builder_get_object (builder, "progressbar1");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "progressbar2");
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget);
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget2);
gtk_widget_show_all (GTK_WIDGET (window));
g_object_unref (builder);
@@ -1950,6 +1976,7 @@ main (int argc, char *argv[])
static GActionEntry app_entries[] = {
{ "about", activate_about, NULL, NULL, NULL },
{ "quit", activate_quit, NULL, NULL, NULL },
{ "inspector", activate_inspector, NULL, NULL, NULL },
{ "main", NULL, "s", "'steak'", NULL },
{ "wine", NULL, NULL, "false", NULL },
{ "beer", NULL, NULL, "false", NULL },

View File

@@ -1,9 +1,26 @@
.circular-button {
border-radius: 20px;
-gtk-outline-radius: 20px;
}
.small-button {
padding: 0;
outline-width: 0;
}
frame.border-inset > border {
border-style: inset;
}
frame.border-outset > border {
border-style: outset;
}
frame.border-groove > border {
border-style: groove;
}
frame.border-ridge > border {
border-style: ridge;
}
/* These effects use 2 lines, so show them */
frame.border-groove > border,
frame.border-ridge > border {
border-width: 2px;
}

View File

@@ -6,9 +6,6 @@
<gresource prefix="/org/gtk/WidgetFactory">
<file>widget-factory.css</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">menus.ui</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>

Some files were not shown because too many files have changed in this diff Show More