Commit Graph

26819 Commits

Author SHA1 Message Date
Benjamin Otte
e1a03ead7a Use NULL for generic marshallers in g_signal_new()
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
2016-08-29 16:20:54 +02:00
Matthias Clasen
6af5033386 about dialog: Set a max-content-height on credits
This keeps the credits section from making the dialog grow
when there are lots of credits.

https://bugzilla.gnome.org/show_bug.cgi?id=770458
2016-08-29 10:01:20 -04:00
Carlos Soriano
cfe4c9e0f4 gtkplacessidebar: fix signal marshal
We were using __VOID for the SHOW_OTHER_LOCATION signal that
uses flags named SHOR_OTHER_LOCATION_WITH_FLAGS.
However, if a signal uses flags the marshal needs to use __FLAGS.

This patch addresses this using VOID__FLAGS as the marshaler parameter.

Thanks to Jan Steffens for pointing this out.

https://bugzilla.gnome.org/show_bug.cgi?id=770550
2016-08-29 15:01:12 +02:00
Benjamin Otte
35c96c2c1f Add braces to appease gcc
-ftrack-macro-expansion=0 doesn't like if statements without braces when
evaluating indentation levels.
2016-08-25 23:02:27 +02:00
Benjamin Otte
c8b301f1ea uimanager: Correctly indent code 2016-08-25 23:02:27 +02:00
Benjamin Otte
da8cef16dc a11y: Correctly indent code 2016-08-25 23:02:27 +02:00
Matthias Clasen
f53706b003 cell renderer text: Allow entries to shrink
Set a small max-width on entries used for editing cells, so they
adapt to small columns and don't overlap the next column.

https://bugzilla.gnome.org/show_bug.cgi?id=770374
2016-08-25 07:53:32 -04:00
Matthias Clasen
f66a76d998 Document window-icon related api as 'may not work'
Some platforms simply don't have window icons (such as Wayland).
2016-08-24 14:43:58 -04:00
Matthias Clasen
ae636ba0c2 notebook: Update arrow state when switching pages
Otherwise, we may end up showing clickable arrows that don't
do anything.

https://bugzilla.gnome.org/show_bug.cgi?id=770332
2016-08-24 14:10:35 -04:00
Matthias Clasen
07e9b399d5 scale: Document interaction between rounding and autoscrolling
This is a bit of a gotcha, so better document it.
2016-08-24 12:58:54 -04:00
Matthias Clasen
6163b3b2b5 Allow activating the desktop portal for inhibit
We allow it everywhere else, and there is nothing wrong with it.
2016-08-24 10:55:44 -04:00
Carlos Garnacho
e9771d642f GtkPadController: Make ring/strip actions be activated with the axis value
This way these axes may be used in detail by the implementors of pad GActions.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
b24a865d9b GtkEventController: Add some comment describing the filter_event private vfunc
It might not be entirely clear what the boolean return value means.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
e66a821a74 GtkPadController: Notify actions back to the windowing on wayland
This allows applications to provide descriptions of the actions performed
by each pad feature. pass the GtkPadActionEntry labels for this.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
a0b9586465 gtk: Add GtkPadController
This GdkEventController is a helper object to handle pad events,
it allows setting a mapping to action names, to be triggered in
the given action group.

In order to help on places where advanced mapping/configurability
of pad features is not desirable, this controller also allows
passing a NULL pad device, meaning it will listen on all pads,
and/or passing -1 on mode/index, so an action applies to all
modes/features (eg. strips/rings).

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
3a6d0ff2ab gtk: Add minimal handling of pad events
No real handling is yet performed, to be done through a GdkEventController

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:44 +02:00
Philip Withnall
d3c204c774 gtkbindings: Add an example for gtk_binding_entry_add_signal()
Otherwise the way the varargs are supposed to be used is completely
opaque.

https://bugzilla.gnome.org/show_bug.cgi?id=770236
2016-08-23 11:51:13 +01:00
Philip Withnall
92a95c7de7 gtkbindings: Clarify that widgets need has-focus for bindings to work
https://bugzilla.gnome.org/show_bug.cgi?id=770242
2016-08-22 18:06:39 +01:00
Lapo Calamandrei
a6409458f0 Adwaita: increase border radius on button.circular...
...to allow huge circular buttons.
See https://bugzilla.gnome.org/show_bug.cgi?id=770166
2016-08-22 14:17:34 +02:00
Timm Bäder
5c696a7ee3 popover: Clarify transitions-enabled deprecation
https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-20 20:54:20 +02:00
Timm Bäder
73b949173e stylepropertyimpl: Remove double assignment 2016-08-20 09:54:44 +02: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
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
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
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
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
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
Руслан Ижбулатов
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
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
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
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
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
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
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
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