Commit Graph

51334 Commits

Author SHA1 Message Date
Matthias Clasen
aa1fb13451 Fix the meson build 2017-08-12 19:06:00 -04:00
Matthias Clasen
f54aca20ee widget-factory: Add a use of show-emoji-icon
This also serves as a testcase for nested popovers
that was missing in widget-factory so far.
2017-08-12 18:50:50 -04:00
Matthias Clasen
e24ffbbc21 Add a testcase for the new Emoji chooser
For now, add it in testentryicons.
2017-08-12 18:48:14 -04:00
Matthias Clasen
558aebfbc4 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-12 18:48:14 -04:00
Matthias Clasen
46f7804f3a 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-12 18:48:14 -04:00
Matthias Clasen
c6c1619646 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-12 18:48:14 -04:00
Matthias Clasen
44999fa239 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-12 18:48:14 -04:00
Daniel Boles
a2768144f1 InfoBar: Fix wrong/uninit var use in code example
https://bugzilla.gnome.org/show_bug.cgi?id=786144
2017-08-12 21:08:24 +01:00
Daniel Boles
854bfb916c Adwaita: Sync CSS files with current SASS 2017-08-12 16:02:18 +01:00
Daniel Boles
c8e2ccd7a1 LevelBar: Don’t pointlessly copy an allocation
now featuring the required comma :/
2017-08-12 15:13:36 +01:00
Timm Bäder
07d6c7817d widget: Remove private _gtk_widget_set_has_focus
The css state here is now handled in gtk_widget_set_focus_child
2017-08-12 15:56:53 +02:00
Matthias Clasen
a5ba6dfe97 Revert "LevelBar: Avoid unnecessarily copying allocation"
This reverts commit d5e25be9bc.

It doesn't build.
2017-08-12 09:46:06 -04:00
Matthias Clasen
124b790a77 Fix a bootstrapping problem without root windows
We create various windows during the initial creation of display
objects, which causes some bootstrapping issues when we try to
find the default screen to get its root window. To work around this,
pass the display object into gdk_window_new.

This is not an API change, since gdk_window_new is no longer public API.
2017-08-12 09:42:19 -04:00
Daniel Boles
d5e25be9bc LevelBar: Avoid unnecessarily copying allocation
Just use the original allocation, instead of copying it and passing that
2017-08-12 14:23:55 +01:00
Matthias Clasen
342fdee0a1 Remove an unused field
Nothing uses bubble_window, so it can go.
2017-08-11 19:53:06 -04:00
Matthias Clasen
535e604b91 Drop the shape window example in testgtk
Not sure this can be rescued without root window coordinates.
It is also somewhat inherently X11-specific.
2017-08-11 15:46:00 -04:00
Matthias Clasen
0eaf861420 Remove root window getters from public API
These are now just used internally in GDK.
2017-08-11 15:45:24 -04:00
Matthias Clasen
916702f7a9 Make the xim module build without root getters
This is X specific code anyway, so no need to use
generic GDK api for this.
2017-08-11 15:45:24 -04:00
Matthias Clasen
127922cf44 Stop passing root window to gdk_device_query_state
The backends do the right thing now.
2017-08-11 15:45:24 -04:00
Matthias Clasen
9859f8f69f Allow passing a NULL window to gdk_device_query_state
Interpret NULL as "root window" here - we only have one
screen nowadays, so there is no choice involved, and this
will let us avoid dealing with the root window in the
fontend code.
2017-08-11 15:45:24 -04:00
Matthias Clasen
c409fca703 Drop root windows from some internal apis
_gdk_device_query_state was needlessly shuffling
root windows around.
2017-08-11 15:45:23 -04:00
Matthias Clasen
8d3dd50948 Drop keynav for dnd
This is very much an easter egg, and it is the last place where
we use the root window in libgtk.
2017-08-11 15:45:23 -04:00
Lapo Calamandrei
96062ffeae adwaita: remove min-<lenght> from levelbar blocks
It's not needed and causes issues, see for details:
https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-11 16:25:40 +02:00
Lapo Calamandrei
30a7264865 adwaita: Remove menu margins
menu margins have been added has a hack to mitigate bug:
https://bugzilla.gnome.org/show_bug.cgi?id=591258 with gtk+4 this
doesn't work anymore on gtk+4, the margin should probably be moved
to the parent window node, but it's not selectable, commenting out
for now.
2017-08-11 15:07:13 +02:00
Piotr Drąg
f3200b3336 Update Polish translation 2017-08-11 00:05:26 +02:00
Timm Bäder
a8a755e5cd widget: Remove gtk_widget_set_redraw_on_alloc
Since gtk+ draws more than the widget and allocates more size to it than
it knows about, this flag doesn't work anymore. Removing it (or setting
it to TRUE for widgets that used to set it to FALSE) fixes drawing
invalidation when these widgets get allocated a new size.
2017-08-09 16:26:26 +02:00
Timm Bäder
5874a30c73 GdkWindow: Remove gdk_window_new_input
Not needed anymore.
2017-08-09 15:19:46 +02:00
John Ralls
a2c4c54a2f 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:21:55 +03:00
Daniel Boles
c25f619033 Revert "levelbar: Don't underallocate block widgets"
This reverts commit e25e1c54a4.

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:58:13 +01:00
Matthias Clasen
2f02401344 3.91.2 2017-08-07 22:21:22 -04:00
Matthias Clasen
80afb8c90a Fix docs build 2017-08-07 22:21:22 -04:00
Daniel Boles
23b6699ec3 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 returned 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
revealed 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:09 +01:00
Daniel Boles
c4865bed43 Container: Fix scrolled coord in set_focus_child()
Commit 885bcd9fe4 trampled the bit here
that is meant to translate between the nominated focus child and the
actual innermost one that is used for updating the h/v adjustments.

So, we need to save the passed focus child before diving into its
children, then translate and get allocations between them both. This
makes GTK+ 4 behave like GTK+ 3 again: instead of priv->focus_child and
focus_child, we now have focus_child and child, serving the roles of the
nominated focus child and its innermost focus child respectively.

This also ditches the unnecessary call to Widget:get_focus_child(), as
Container::set_focus_child() gets that same new child as an argument.
2017-08-07 18:42:15 +01:00
Daniel Boles
e29f39b66c AccelLabel: set_accel_closure() arg is nullable 2017-08-07 10:32:13 +01:00
Daniel Boles
a42634c3e5 AccelLabel: set_accel_widget() arg is nullable 2017-08-07 10:29:53 +01:00
Matej Urbančič
5ac3ee99a9 Updated Slovenian translation 2017-08-07 10:07:50 +02:00
Matej Urbančič
d8defe7439 Updated Slovenian translation 2017-08-07 09:10:37 +02:00
Fabio Tomat
495e45f090 Update Friulian translation 2017-08-07 06:04:19 +00:00
Carlos Garnacho
4f31afcd9c window: Fix traversal of popovers during picking
These need to be traversed in the opposite direction. Given the order is
opposite to rendering, use a GQueue so it's cheap to traverse/add either
way.
2017-08-06 22:44:40 +02:00
Daniel Boles
be85c8b1fd 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:03:27 +01:00
Daniel Boles
d6e4ce127a 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:44:18 +01:00
Daniel Boles
fec4a9f16a AccelLabel: Fix typos of Ctl to Ctrl 2017-08-06 17:35:07 +01:00
Daniel Boles
30eac22974 icon-browser: Add missing document-edit icon
https://bugzilla.gnome.org/show_bug.cgi?id=777515
2017-08-06 03:30:21 +01:00
Daniel Boles
b3ab230aac gdkdisplay: Remove a pointless assignment
https://bugzilla.gnome.org/show_bug.cgi?id=784016
2017-08-06 01:13:51 +01:00
Matthias Clasen
642aee75d5 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:31:52 -04:00
Matthias Clasen
c250dddb00 Use the right gettext domain
Most of our .ui files were still using the gtk30 domain,
despite the library having switched to gtk40. Fix this.
2017-08-05 18:17:29 -04:00
Daniel Boles
e9af8a2a67 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:27:43 +01:00
Daniel Boles
7dd9f212ad CenterBox: minor tweaks to doc blurb 2017-08-05 18:57:08 +01:00
Daniel Boles
cbe53fec07 CenterBox: Add missing nullable annotations
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:56:01 +01:00
Daniel Boles
4accb9f167 CenterBox: Guard against directly including header
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:44:02 +01:00