Commit Graph

47937 Commits

Author SHA1 Message Date
Руслан Ижбулатов
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
Matthias Clasen
0f32919503 Stop using one-stop gradients in reftests
This is causing warnings now that make the tests fail.
2016-07-26 07:25:01 -04:00
Matthias Clasen
45957100b0 Revert a mistaken change
I thought I needed ot rearrange the ordering of the animation-direction
values for the parser, overlooking the fact that we already parse them
backwards to address this very problem.
2016-07-26 00:21:48 -04:00
Sébastien Wilmet
af5ef152b1 docs: GtkWidget::style-updated vs GtkStyleContext::changed
Explain the difference between those two signals.

Add "Since: 3.0" for GtkStyleContext::changed, since that signal has
been added in commit 9f84e101bf, present
since 2.91.6.

https://bugzilla.gnome.org/show_bug.cgi?id=769047
2016-07-25 09:26:41 -04:00
Sébastien Wilmet
3432587f89 docs: add missing info for gtk_widget_get_style_context()
It is important to know whether the returned object can or cannot
change, for a certain widget. For example to connect to the
GtkStyleContext::changed signal.

https://bugzilla.gnome.org/show_bug.cgi?id=769047
2016-07-25 09:26:41 -04:00
Matthias Clasen
f089d7503b GtkApplication: some cleanups
Always return an error if we fail to get a dbus proxy; the callers
are only looking whether error is set, not whether the return value
is NULL.

Use the same function for the inhibit proxy as well, and clean up
the sm_proxy in finalize.
2016-07-25 09:11:21 -04:00
Simon McVittie
f65c116d2a Don't apply GDK_HINT_RESIZE_INC to GDK_WINDOW_STATE_TILED windows
This matches the behaviour of Mutter, Metacity and traditional X11
window managers on the window manager side, and is what we want
for at least gnome-terminal. I can't think of any reason why we'd
want incremental resize in any other tiled window.

Signed-off-by: Simon McVittie <smcv@debian.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=760944

https://bugzilla.gnome.org/show_bug.cgi?id=755947
2016-07-25 09:00:01 -04:00
Cosimo Cecchi
d9dd7eb757 reftests: override GSETTINGS_SCHEMA_DIR when running tests
The reftest depends on a schema we install ourselves. Instruct GIO to
look in the build directory to avoid a cyclic dep.

https://bugzilla.gnome.org/show_bug.cgi?id=768930
2016-07-25 08:34:52 -04:00
Matthias Clasen
f44baf51d9 Avoid a division by zero
It appears that xvfb returns nonsense in its xrandr resources.
Avoid a crash when that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=768999
2016-07-25 08:32:24 -04:00
Matthias Clasen
8db8891c66 Use g_clear_object in a few more places 2016-07-25 08:32:08 -04:00
Lapo Calamandrei
bab906f838 Adwaita: use margins for entry image spacing
there used to be a padding, since it was the only option in the
past, that makes little sense now, hence use margins.
2016-07-24 19:11:27 +02:00
Lapo Calamandrei
bc070a70a5 HC: export unfocused_insensitive_color...
...to reflect Adwaita changes.
2016-07-24 18:59:58 +02:00
Lapo Calamandrei
f84b8c1c26 Adwaita: export yet another named color for insensitive bg/fg...
...which was needed, but not there, use responsibly.
2016-07-24 18:04:51 +02:00