Commit Graph

47979 Commits

Author SHA1 Message Date
Jonas Ådahl
1f7094a3e5 wayland: Use effective toplevel as popup parent
When using the set transient-for as a popup parent, fetch the effective
toplevel instead, otherwise we will position against the wrong
coordinate.

https://bugzilla.gnome.org/show_bug.cgi?id=769402
2016-08-18 04:51:46 -04:00
Timm Bäder
a985e62b25 Use gtk_popover_popdown/popup where appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Timm Bäder
a6b9b3648d GtkPopover: Deprecate transitions-enabled
The effect of transitions-enabled=true can now be
achieved using gtk_popover_popup/popdown and the effect
of transitions-enabled=false can be achieved using
gtk_widget_show/hide.

https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Timm Bäder
1f7b6c1d6f GtkPopover: Add gtk_popover_popdown/popup
Since not chaining up in gtk_widget_show/gtk_widget_hide is not allowed,
we can't just implicitly delay the hiding in GtkPopover's hide
implementation. Fix this by introducing gtk_popover_popup() and
gtk_popover_popdown() to show or hide a popover with transition and
revert GtkPopover's show/hide implementation to apply their effect
without the transition.

https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Andika Triwidada
a782d632f8 Updated Indonesian translation 2016-08-15 06:49:41 +00:00
Andika Triwidada
37e3407ee6 Updated Indonesian translation 2016-08-15 06:30:29 +00:00
William Hua
7665ee4208 mir: group DND, tooltips, and notifications with menu-type windows 2016-08-12 11:37:35 -04:00
Andreas Pokorny
b2719c0383 Remove outdated comments
https://bugzilla.gnome.org/show_bug.cgi?id=768138
2016-08-11 12:23:38 -04:00
Andreas Pokorny
3334e0a21d Use Menus to implement tooltips
The order in which tooltips are created, drawn, shown and then positioned,
always requires repositioning the surface. The tooltip window type only has
limited capability to do so. An alternative could be to use bufferstreams.

https://bugzilla.gnome.org/show_bug.cgi?id=768138
2016-08-11 12:23:38 -04:00
Andreas Pokorny
056ddf2567 Fix execution of dialog
When a dialog is created, the mir event source is already executed on the
call stack. So without the recurse flag it will not be run in the main loop
used for the dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=768138
2016-08-11 12:23:38 -04:00
Matthias Clasen
4e418ed71d file chooser: align date formatting with nautilus
We were treating 'yesterday' not quite the same way.

https://bugzilla.gnome.org/show_bug.cgi?id=769568
2016-08-11 12:22:01 -04:00
Matthias Clasen
64c15545c3 docs: Fix a dangling link
https://bugzilla.gnome.org/show_bug.cgi?id=769601
2016-08-11 09:28:58 -04:00
Matthias Clasen
007ac65f19 Really fix unlinkage for shm_open
Reported in https://bugzilla.gnome.org/show_bug.cgi?id=769603
2016-08-11 07:07:05 -04:00
Andreas Pokorny
f95d270372 Only apply type hint if it would map to a different mir surface type
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:41:27 -04:00
Andreas Pokorny
da17eae747 Apply geometry hints to mir surface
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
96dcf89155 Apply and forward title changes of gdk windows
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
6dfb554558 Only update surface spec when there is no spec change pending 2016-08-10 13:36:38 -04:00
Andreas Pokorny
5a8af1af75 Rework window construction - only recreate surface when necessary
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
83471052cf Forward repeated key presses as further down keys
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
097ed2b40a Fix warning on newer version so mir 0.22 and newer
Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Andreas Pokorny
bc4df6d4b3 Fix gcc warning on potentially uninitialized gdk_event. 2016-08-10 13:36:38 -04:00
Andreas Pokorny
252ccb846f Use the surface output event to keep track of the suggested scale value
The event will be sent when the surface becomes visible on an output. With this change the GdkMirWindowImpl keeps track of the scale value and sends a configure event on change.

Signed-off-by: Andreas Pokorny <andreas.pokorny@canonical.com>
2016-08-10 13:36:38 -04:00
Timm Bäder
bdb77b6cc2 widget-factory: Don't initially show popover
It'll  be set as the popover of a GtkMenuButton later anyway which will
hide it again.
2016-08-10 16:37:17 +02:00
Timm Bäder
0d17421ffd popover: Make some public API NULL-safe
Instad of potentially dereferencing a NULL-pointer, use the NULL-safe
gtk_popover_get_instance_private before the g_return_if_fail
precondition check.
2016-08-10 16:37:17 +02:00
Timm Bäder
57ef631216 label: Remove some useless casts
These were casts of a const GdkEvent* to GdkEvent* even though the
function they are passed to takes a const GdkEvent*.
2016-08-10 16:37:17 +02:00
Ignacio Casal Quinteiro
b0f793c8e7 Use g_snprintf instead of snprintf.
snprintf is not compatible with msvc.
2016-08-10 12:45:39 +02:00
Emmanuele Bassi
da2e612fa8 git.mk: Add config.rpath to the list of ignored files
This finally cleans up the `git status` output.
2016-08-09 17:21:04 +01:00
Emmanuele Bassi
2d2f8e3fa3 Remove config.rpath from EXTRA_DIST
The config.rpath script was added by running gettextize, but it's not
really needed, as config.rpath is generated by autotools and it's
included in the dist tarball automatically.

Upstream gettextize has been fixed so it does not happen any more:
http://savannah.gnu.org/bugs/index.php?48729
2016-08-09 17:19:48 +01:00
Marek Černocký
0be9adc5a3 Updated Czech translation 2016-08-09 12:19:03 +02:00
Dušan Kazik
1c9154b291 Updated Slovak translation 2016-08-08 07:38:30 +00:00
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