Commit Graph

47949 Commits

Author SHA1 Message Date
Matthias Clasen
a12ee84ec3 wayland: Link against librt
This is required for shm_open.

https://bugzilla.gnome.org/show_bug.cgi?id=769603
2016-08-07 16:11:55 -04:00
Matthias Clasen
5fefc7a714 headerbar: Fix size allocation
The GtkHeaderBar gadget implementation was subtly broken: it called
gtk_widget_set_allocation both in gtk_header_bar_size_allocate (with
the actual allocation) and in gtk_header_bar_allocate_contents (with
the content allocation of the main gadget). Dropping the second call
fixes the render node conversion for GtkHeaderBar.
2016-08-07 15:08:44 -04:00
Yosef Or Boczko
cb3fc956c5 Updated Hebrew translation 2016-08-07 16:05:42 +03:00
Yosef Or Boczko
6a2cba08c9 Updated Hebrew translation 2016-08-07 15:56:25 +03:00
Philip Withnall
7b40fdbc21 gdkwindow: Fix potential NULL pointer dereferences in event code
The event code could potentially dereference pointer_info if the
invariant that ENTER_NOTIFY and LEAVE_NOTIFY events are only emitted on
devices which have pointers is violated elsewhere.

Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2016-08-07 08:17:50 +01:00
Philip Withnall
76721e736e gtkicontheme: Don’t emit warning about fallback theme when in unit tests
In order to eliminate g_test_expect_message() (which doesn’t work with
G_LOG_USE_STRUCTURED), make the warning about the fallback theme not
existing be conditional on the icon theme search path containing a
system path. Any application code which modifies the search path does so
through appends and prepends, so this should not affect whether the
warning is emitted in production.

https://bugzilla.gnome.org/show_bug.cgi?id=769485
2016-08-06 17:13:25 -04:00
Matthias Clasen
1306f780ab tests: Avoid g_test_expect_message
Instead of using g_test_expect_message, just ignore the warning.
2016-08-06 17:13:25 -04:00
Colomban Wendling
64521345b9 GtkMenuButton: use :toggled instead of :clicked
:toggled is triggered on :clicked, so using :toggled lead to the menu
to be popped up at the same time, while allowing to use the toggle state
and avoiding any need to a hack to prevent recursion, which somehow
wasn't enough for double emission of GtkMenuToolButton:show-popup.

https://bugzilla.gnome.org/show_bug.cgi?id=769287
2016-08-04 23:31:42 +02:00
Piotr Drąg
41be1e7e1f Updated Polish translation 2016-08-04 21:09:57 +02:00
Timm Bäder
2f9b22243a csslookup: Remove useless cast
The style passed to _gtk_css_lookup_resolve is already a
GtkCssStaticStyle.
2016-08-04 20:40:34 +02:00
Bernd Homuth
be2e0e0baf Updated German translation
(cherry picked from commit 070c4f7486)
2016-08-04 18:38:21 +00:00
Руслан Ижбулатов
5e6c1928b4 W32: Prefer the deadkey combinations that the OS uses
Pick the W32 API for possible deadkey+<something> combinations
and prefer these to other sources of deadkey combos.
Specifically, if W32 API supports at least one combo for a particular
deadkey, only use that data and do not attempt to do other, unsupported
combinations, even if they make sense otherwise.
This is needed to, for example, correctly support US-International
keyboard layout, which produces a combined character for <' + a>
combo, but not for <' + s>, for example.

This is achieved by stashing all the deadkeys that we find in
an array, then doing extra loop through all virtual key codes and
trying to combine them with each of these deadkeys. Any combinations
that produce a single character are cached for later use.

In GTK Simple IM context, call a new GDK W32 function to do a lookup
on that cached combination table early on, among the "special cases"
(which are now partially obsolete).

A limitation of this code is that combinations with more than
one deadkey are not supported, except for combinations that consist
entirely of 2 known deadkeys. The upshot is that lookups should
be relatively fast, as deadkey array stays small and the combination
tree stays shallow.

Note that the use of ToUnicodeEx() seems suboptimal, as it should
be possible to just load a keyboard library (KBD*.DLL) manually
and obtain and use its key table directly. However, that is much more
complicated and would result in a significant rewrite of gdkkeys-win32.
The code from this commit, though hacky, is a direct addition to
existing code and should cover vast majority of the use-cases.

https://bugzilla.gnome.org/show_bug.cgi?id=569581
2016-08-04 16:37:19 +00:00
Руслан Ижбулатов
52c7e07948 GDK W32: Cache multiple keyboard layouts simultaneously
This changes the group/level semantic.
Previously W32 backend used "group 0/1" to denote "AltGr OFF/ON"
and "level 0/1" to denote "Shift is OFF/ON".
Now "group" means "keyboard layout" and there can be up to 255 groups,
while AltGr and Shift are combined into a single level enum that
takes values between 0 and 4.
Unlike X, W32 doesn't do effective group overriding, meaning that
it will never tell the caller that a different group was actually
used (even for universal keys, such as Enter), because key symbol
table is completely fabricated and there's no point in trying to
save a few of kilobytes of RAM by not duplicating universal key
records for all groups.

Also contains many whitespace changes (tab elimination, fixed
indentation) and cleanup (axed a few global variables, these are
now accessed via the default keymap).

https://bugzilla.gnome.org/show_bug.cgi?id=768722
2016-08-04 16:37:18 +00:00
Timm Bäder
60f3c02080 shortcutlabel: Make parameter names match 2016-08-04 13:33:07 +02:00
Timm Bäder
50a0c5f242 widget: remove some unneeded function prototypes 2016-08-04 13:09:08 +02:00
Timm Bäder
6032e7b216 filechooserwidget: Remove unused enum 2016-08-04 13:09:01 +02:00
Timm Bäder
41c8446631 label: Destroy the popup menu on unmap 2016-08-04 13:07:23 +02:00
Daniel Mustieles
6107e50c98 Updated Spanish translation 2016-08-03 12:28:56 +00:00
Emmanuele Bassi
445286c2c3 Modify git.mk to handle our split NLS directories
GTK+ has two directories for translations: the default 'po' and the
additional 'po-properties' for the GObject properties translation
domain.

Since the content of the translations directories are filled by
autoreconf and gettext, and are duplicated between the two gettext
domains we use, we should handle this ad hoc inside git.mk, instead of
trying to catch up by adding po-properties files in GITIGNOREFILES.
2016-08-03 11:52:08 +01:00
Emmanuele Bassi
9e1afd7ba8 Add ignore file for macro dir
The contents of the macro directory are too complicated for git.mk to
handle: the contents are filled by autotools and may change between
systems or autotools releases; and we additionally ship our own m4
macros.

To avoid unnecessary noise on the `git status` output we should simply
add an ignore file specifically for the macro directory.
2016-08-03 11:49:15 +01:00
Matthias Clasen
80d329a3e7 Skip GtkShortcutLabel::accelerator in notify test
This property is not freely settable, since the string
gets parsed.
2016-08-02 23:59:34 -04:00
Matthias Clasen
2de6b0800d menu: Fix up new properties
The new positioning-related properties had some quality of
implementation issues, such as incorrect initial values and
excessive change notification. This broke the notify test.
2016-08-02 23:57:37 -04:00
Matthias Clasen
5ab2b8f562 Make icontheme test work with structured logging
Since we've opted in to G_LOG_USE_STRUCTURED, this test
now needs to do its thing using a log writer function.
2016-08-02 23:23:43 -04:00
Matthias Clasen
d9c07c0a6a Skip GdkDrawingContext in default value tests
GdkDrawingContext objects can't be freely constructed.
2016-08-02 22:32:25 -04:00
Emmanuele Bassi
43a5331125 Require a new version of GLib
We need GLib 2.49.4 because of the new API requirements introduced by
commit 936c1649.

https://bugzilla.gnome.org/show_bug.cgi?id=769451
2016-08-02 22:15:26 +01:00
Daniel Mustieles
60c393d32f Updated Spanish translation 2016-08-02 16:52:29 +02:00
Daniel Mustieles
55a9568264 Updated Spanish translation 2016-08-02 16:52:19 +02:00
Emmanuele Bassi
831d8b1261 Update the docs for gtk_window_get_position()
Drop mentions of GnomeClient, and add mentions of different windowing
systems instead of just assuming that we're using X11.
2016-08-02 12:29:26 +01:00
Matthias Clasen
0989614d2d Add a release not about GtkTable expand flags 2016-08-01 09:09:19 -04:00
Christoph Reiter
4556d0f0fe gtkbox: remove unnecessary queue_compute_expand()
The expand child property does not have any effect on the
expand state of the GtkBox, so queuing a compute_expand
when changing it is not needed.

https://bugzilla.gnome.org/show_bug.cgi?id=769162
2016-08-01 09:02:04 -04:00
Christoph Reiter
a72f1c76c8 gtktable: don't try to propagate expand related child props in compute_expand()
It tried to set the expand state if either xexpand/yexpand where true.
Due to a missing queue_compute_expand when adding a child it actually
only computed the expand state in case a child queued after being added
or in case a child had the expand property set (see optimization in
gtk_widget_set_parent)

In my case this broke layouts as a child of GtkCombBox started setting
an exand flag with 3.20 which queued a compute_expand, which in turn
propagated an expand child props set for a cell in the same table up
and overrode the expand child prop of a parent GtkBox.

This removes the custom compute_expand implementation to match the
behaviour of GtkBox (don't propagate child prop expand flags
but let child expand flags override the child props) and not get random
expand behaviour depending on whether and when child widgets set their
expand state.

https://bugzilla.gnome.org/show_bug.cgi?id=769162
2016-08-01 09:02:04 -04:00
Aurimas Černius
e4c072fc11 Updated Lithuanian translation 2016-07-31 19:58:56 +03:00
Bastien Nocera
64739f46fc demos: Fix build failure
gtk+/demos/gtk-demo/css_blendmodes.c: In function ‘update_css_for_blend_mode’:
gtk+/demos/gtk-demo/css_blendmodes.c:49:26: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
                          blend_mode);
                          ^~~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=769236
2016-07-29 11:02:50 -04:00
Sébastien Wilmet
331af2afb6 docs: trivial build fix
The error was:
gtk3-scan.c:193: undefined reference to `gtk_shortcuts_label_get_type'
collect2: error: ld returned 1 exit status

It's since commit 7543cd8ce4, which made
the GtkShortcutLabel class public.
2016-07-28 21:15:09 +02:00
Matthias Clasen
b01e975667 Port GtkPrintOperationPortal to gtk_window_export_handle 2016-07-28 13:01:22 -04:00
Matthias Clasen
936c1649de Port gtk_show_uri_on_window to gtk_window_export_handle
As part of this, make it use the new
g_app_info_launch_default_for_uri_async, since we need a way
to unexport the window handle afterwards.
2016-07-28 13:01:22 -04:00
Matthias Clasen
237df66a33 Port GtkFileChooserNativePortal to gtk_window_export_handle 2016-07-28 13:01:22 -04:00
Matthias Clasen
18aa05110f Put window exporting behind a display protocol agnostic API
Introduce a private API meant for abstracting how to get a handle
of a window that can be shared with other processes. The API is
async, since some implementations will require that. Currently,
only X11 is supported, which doesn't.

Based on a patch by Jonas Adahl.
2016-07-28 13:01:22 -04:00
Руслан Ижбулатов
2233566f48 GDK W32: Support UTF-16 surrogate pairs passed via VK_PACKET
This is, essentially, a piece of g_utf16_to_ucs4() built into GDK
W32 keyboard message processing.

https://bugzilla.gnome.org/show_bug.cgi?id=769126
2016-07-28 15:55:11 +00:00
Benjamin Otte
5ccc0e40f5 css: Fix case where we didn't convert pt => px
Fixes gtk_widget_override_font() not behaving properly since commit
df08fc91bd.

https://bugzilla.gnome.org/show_bug.cgi?id=768902
2016-07-28 11:42:54 -04:00
Benjamin Otte
f422208040 css: Rename functions
I don't want to use a generic function for font sizes as font sizes are
special. Plus, the function is only used in one place.
2016-07-28 11:42:54 -04:00
Emilio Pozuelo Monfort
ca6c928c5b Properly declare the font CSS property
https://bugzilla.gnome.org/show_bug.cgi?id=769004
2016-07-28 17:13:15 +02:00
Emilio Pozuelo Monfort
b9f61e3a8e Don't use one-stop gradients
They are deprecated, which causes a warning that makes
the test fail.

https://bugzilla.gnome.org/show_bug.cgi?id=769004
2016-07-28 17:12:25 +02:00
Murray Cumming
0fd69ce99a Fix tiny typo. 2016-07-28 11:12:54 +02:00
Lapo Calamandrei
15b2dbf9a8 Adwaita: use a transition to animate checks and radios
see https://bugzilla.gnome.org/show_bug.cgi?id=762260
2016-07-27 23:00:35 +02:00
Georges Basile Stavracas Neto
ddee89f4a3 shortcut-label: add 'disabled-text' property
When there's no useful shortcut accelerator set,
GtkShortcutLabel doesn't show any useful information.

To work around that, add a new property to set the
text to be displayed when there's no accelerator
available.

https://bugzilla.gnome.org/show_bug.cgi?id=769205
2016-07-27 16:30:43 -03:00
Georges Basile Stavracas Neto
7543cd8ce4 shortcut-label: make it public
GtkShortcutLabel is a widget that displays a single
shortcut accelerator or gesture in the user interface,
and is currently used by the shortcuts window.

This widget, however, has public value as other applications
also may want to expose their own shortcuts. For instance,
it'll be useful for the Keyboard panel on Control Center and
the new shortcut editor in Pitivi, among others.

This patch exposes GtkShortcutLabel as a public widget,
and adds the necessary documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=769205
2016-07-27 16:30:31 -03:00
Carlos Garnacho
8e6a68c5fc GtkScrolledWindow: reset scroll history if it contained no real history
Scroll history must refer to a timespan for the values to be valid, otherwise
we return FALSE, in this case the stored event(s) should be discarded anyway.
2016-07-27 20:29:38 +02:00
Carlos Garnacho
9eb356d9f2 GtkScrolledWindow: Always uninstall scroll cursor when starting deceleration
It could be the case that the last scroll event is received long after any
previous scroll event, in this case the last scroll event discards all "old"
scroll events, and scroll_history_finish() returns FALSE because there's no
time/offset deltas in the scroll history.

This is desired so we don't trigger the deceleration effect if there was no
effective velocity, we still must reset the installed scroll cursor, so take
it out of this if() condition.
2016-07-27 20:28:23 +02:00
Tiago Santos
c0f66ed1ea Updated Portuguese translation 2016-07-27 07:35:14 +00:00