Commit Graph

28427 Commits

Author SHA1 Message Date
James Westman
b5ea2c78d6 fontchooser: Fix size label not being hidden
Even when the level property of a font chooser did not include
GTK_FONT_CHOOSER_LEVEL_SIZE, the "Size" label was still displayed.

Fixes #2378.
2020-01-14 16:01:16 -06:00
Matthias Clasen
0bffcd8882 Merge branch 'adwaita-cross-fade-fix-gtk3' into 'gtk-3-24'
Adwaita: Fix syntax error in cross-fade() (GTK3)

See merge request GNOME/gtk!1307
2020-01-14 05:32:45 +00:00
Matthias Clasen
8ed65a96b9 Merge branch 'image-surfce-cache-leak' into 'gtk-3-24'
GtkCssImageSurface: Plug cache surface leak

See merge request GNOME/gtk!1309
2020-01-14 05:32:08 +00:00
Matthias Clasen
0c6ea4c7b2 Adwaita: Add hover for clickable infobars 2020-01-14 00:29:53 -05:00
Matthias Clasen
b55ef8d89a infobar: Activate default action on clicks
When we have a default action set on the infobar, activate it
for clicks anywhere in the infobar.  Also add an .action style
class in this case, so we can add a hover highlight to the infobar
just for this case.
2020-01-14 00:29:53 -05:00
Sebastian Keller
7e2bebb4d5 GtkCssImageSurface: Plug cache surface leak
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2373
2020-01-13 23:24:47 +01:00
nana-4
404f4c6627 Adwaita: Fix syntax error in cross-fade()
cross-fade() requires two images.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2371
2020-01-14 06:21:17 +09:00
Mario Sanchez Prada
c17c18e440 application: Complete startup notification sequence for remote invocations
When a remote instance of a GTK application implementing the Startup
Notification protocol gets spawned it will pass the startup sequence
ID as "platform data" to the main instance. Thus, we need to make sure
that the startup sequence gets completed in that case, since the remote
instance won't do it by itself, since it won't map any top level window.

Checking for this "platform data" in the implementation of the after_emit()
virtual method in the primary instance should be a good place to do so, since
the existence of such data proves that a remote instance has been spawned.

https://gitlab.gnome.org/GNOME/gtk/issues/1084
2020-01-10 13:32:37 +02:00
Alexandr Miloslavskiy
822705fe3e gkimmulticontext: Fix crash due to leaked signal handler
The problem is caused by gtk_im_multicontext_set_slave(), which forgets
to disconnect these signal handlers:
* gtk_im_multicontext_retrieve_surrounding_cb
* gtk_im_multicontext_delete_surrounding_cb

If slave GtkImContext emits signal after GtkIMMulticontext context is
destroyed, this leads to reading freed memory, sometimes causing a crash.

Fixes: #2365
2020-01-06 20:39:34 +01:00
Ondrej Holy
b9e1ef1558 placesview: Always open default location after mounting
The default location (obtained over g_mount_get_default_location) is
opened after mounting volume, or when opening mounts from sidebar, but
not after mounting over "Connect to Server". Let's unify the behavior
and always open the default location.

https://gitlab.gnome.org/GNOME/nautilus/issues/1319


(cherry picked from commit 267ea7552b)
2020-01-06 13:22:31 +00:00
Benjamin Otte
edcddf6561 icontheme: Don't try to scale pixbufs to 0px
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.

(cherry picked from commit 6769db160d)
2020-01-01 18:17:14 +01:00
Carlos Garcia Campos
c6e5030c61 emojichooser: never show emoji chooser when input hint no-emoji is present
It's currently used only to not include the insert emoji option in the
context menu, but it's still possible to show the emoji chooser in both
GtkEntry and GtkTextView using the key bindings.
See also https://bugs.webkit.org/show_bug.cgi?id=205609.
2019-12-30 10:56:06 +01:00
Matthias Clasen
0d6cff45c3 accelgroup: Fix a buffer overrun
gtk_accelerator_parse_with_keycode can
overrun its buffer for certain inputs.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325
2019-12-23 23:19:57 -05:00
Emmanuele Bassi
eeb896d648 Merge branch 'doc-scale-button-css' into 'gtk-3-24'
Document the CSS class used for the ScaleButton popover

See merge request GNOME/gtk!1246
2019-12-22 19:31:40 +00:00
Emmanuele Bassi
e7bd9adf3e Document the CSS class used for the ScaleButton popover
Otherwise it's not easy to divine the selector for the scale widget
inside the popover.
2019-12-22 19:12:20 +00:00
Yariv Barkan
dc896f0910 gtkgesturerotate: Fix a memory leak
On touchpads gtk_gesture_get_sequences() was called without a
corresponding g_list_free(). The same was true for touchscreens
if due to some reason only a single sequence was found.
2019-12-19 20:53:45 +02:00
Matthias Clasen
5df5716871 Merge branch 'wip/sadiq/fix-switch-on-touch' into 'gtk-3-24'
switch: Fix toggling switch on touch devices

See merge request GNOME/gtk!1233
2019-12-12 19:33:57 +00:00
Matthias Clasen
77f465bf19 Merge branch 'terminal-3-24' into 'gtk-3-24'
imwayland: Suppport terminal purpose

See merge request GNOME/gtk!1245
2019-12-12 19:12:34 +00:00
Dorota Czaplejewicz
c7c8ab6624 imwayland: Suppport terminal purpose 2019-12-12 18:20:06 +00:00
Mohammed Sadiq
2fc60a1e3f switch: Fix toggling switch on touch devices
priv->is_switch is used to get hint if the gesture happened
on the switch. On touch devices, ::enter-notify-event may
not be emitted, and so priv->is_switch may not be set.

Let it be set when ::pressed gesture is emitted so that
the switch is toggled when the gesture occurs regardless
of whether a pointing device is present or not.
2019-12-06 20:16:51 +05:30
LutzLue
e3247ed0d9 Annotate GtkTreeModelSort.new_with_model() appropriately
The new_with_model() method is a constructor, and it returns a GtkTreeModelSort
instance, even if the C API returns a GtkTreeModel for the convenience of C
developers.

Fixes: #1077
2019-12-03 16:02:45 +00:00
Alexander Mikhaylenko
379669b153 Adwaita: use transparent borders for popovers
Do the same thing as menus and windows do already.
2019-12-02 21:54:37 +05:00
Matthias Clasen
06d1cf5e52 Merge branch 'wip/muktupavels/opaque-region' into 'gtk-3-24'
window: fix opaque region

See merge request GNOME/gtk!1221
2019-12-01 15:11:52 +00:00
nana-4
f26b9c9f9f Adwaita: Fix some backdrop flat buttons
The commit 6f6070b5 broke the styling.

This fixes it by adding a missing placeholder selector.
2019-12-01 13:06:32 +09:00
Alberts Muktupāvels
44c994e469 window: fix opaque region
Decoration node for drawing is used only for client side decorated
windows, but corners from opaque region is subtracted also for
normal windows.

Rename function to better reflect what it does and do not subtract
corners if decoration node was not used for drawing.
2019-11-30 19:53:40 +02:00
nana-4
ebde8349cb Adwaita: Avoid directly coloring labels wherever possible
Directly coloring labels can create a lot of unintended behaviors.
Unfortunately we can't avoid directly coloring `label:disabled` because
it can be used individually. This, however, tries to inherit color from
the parent element of labels wherever possible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1643
2019-11-29 00:46:20 +09:00
nana-4
f7d57cc1eb themes: Remove remaining @extend with compound selectors
This removes the remaining cases in 6f6070b5 by replacing them with a
simple placeholder selector.

`%button.flat.suggested-action` has been replaced by
`%selection_mode_button_flat`, because it's difficult to replace the
compound selector with a simple placeholder selector, and it doesn't
seem like a proper selector for `.selection-mode button.titlebutton` to
inherit.

The CSSs were generated with libsass 3.5.5 to minimize the git diff, but
I've confirmed that no warning happned with libsass 3.6.3 anymore.

See https://gitlab.gnome.org/GNOME/gtk/issues/2237
2019-11-28 22:21:23 +09:00
Matthias Clasen
f0002ad372 Merge branch 'no-objc' into 'gtk-3-24'
Hide Objective-C from outside GdkQuartz.

See merge request GNOME/gtk!641
2019-11-27 13:39:40 +00:00
Matthias Clasen
9d3e3eea7a Merge branch 'sass-no-extend-compound' into 'gtk-3-24'
themes: remove various @extend with compound selectors

See merge request GNOME/gtk!1171
2019-11-27 13:03:45 +00:00
Matthias Clasen
a8ce096bf8 Merge branch '1630-on3-24branch' into 'gtk-3-24'
Avoid Broadwayd - GtkEntry popup takes 35s after application startup

See merge request GNOME/gtk!1205
2019-11-27 13:00:33 +00:00
nana-4
7564e43a6a HighContrast: Add missing color to entry
So entries don't inherit color from the parent element anymore.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1646
2019-11-27 20:58:15 +09:00
Javier Jardón
c6792a41ab deprecated/gtkstatusicon.c: Fix compilation in wayland
Without this compilation in a wayland-only system fails
2019-11-24 14:33:26 +09:00
Alexandr Miloslavskiy
1efb72210d Fix crash in parse_border()
The bug was introduced in commit:
	9b7640b8 by Benjamin Otte, 2012-03-26 17:24:02
	styleproperty: Make _gtk_style_property_parse_value() return a CssValue

In that commit, `values` changed from `GValue*` to `GtkCssValue**`,
but one `!G_IS_VALUE (&values[8])` was left untouched. As a result,
if `border` shorthand contains anything after color, it might crash,
depending on memory layout.

New test included.

Fixes: #751
2019-11-23 18:06:31 +01:00
Quentin Glidic
45bcc89a01 gtkimcontextsimple.c: Use X11_DATA_PREFIX only on X11
Unlike what commit d01ea18dc3 says, X11 is
not a requirement for Wayland, so a Wayland-only build is possible. We
just use the same logic as other non-X11 platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=784615

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>


(cherry picked from commit f431e28ce3)
2019-11-23 06:33:39 +00:00
Christoph Reiter
6f6070b510 themes: remove various @extend with compound selectors
They are no longer supported by sass and broken with libsass 3.6.3
(https://github.com/sass/libsass/issues/3033)

This removes some of them by replacing them with a placeholder selector.
This at least brings the resulting CSS size down a bit so gtk can be build
again.

The remaining cases I don't know how to convert because I haven't found a way to
reproduce the old output.

The CSS was generated with libsass 3.5.5.

See #2237
2019-11-22 17:54:30 +01:00
Christoph Reiter
39ef5e40d0 HighContrast: rebuild included CSS
afd61c3570 changed the scss but didn't sync the css
2019-11-22 17:49:23 +01:00
Fredy Paquet
edd490cf4d Avoid Broadwayd - GtkEntry popup takes 35s after application startup
preventing conversion attempt and timer being started on broadway
backend.

first iteration for #1630

Author:    Fredy Paquet <fredy@opag.ch>
Signed-off-by: Aurélien Pupier <apupier@redhat.com>
2019-11-22 14:37:53 +01:00
Niklas Hambüchen
d5457d1b14 build: Don't hardcode shared_library() in meson.
Instead, use the standard library().
This is a meson best practice.

Fixes #2248.

Fixes -Ddefault_library=static not having any effect.

Cherry-Picked-From: bb9c07d8fe
2019-11-18 03:31:20 +01:00
Matthias Clasen
e11bdfabc0 Merge branch 'issue-2226' into 'gtk-3-24'
Ensure that cached surface sizes are 1x1

See merge request GNOME/gtk!1189
2019-11-18 00:53:37 +00:00
Emmanuele Bassi
8d0138bd6b Ensure that cached surface sizes are 1x1
We cannot create similar surfaces that are smaller than 1x1 on X11, so
we should always ensure that we clamp the surface size to 1x1 when
calling gdk_window_create_similar_surface().

Fixes: #2226
2019-11-16 18:54:26 +00:00
nana-4
ef32ba3d6a Adwaita: Fix check/radio styling in menu
The new check/radio style increased their specificity, but it was not
synchronized in the menu styling.

This commit increases the specificity to match the updated check/radio
styling.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2096
2019-11-15 23:59:36 +09:00
frederik.feichtmeier
5f5303f8fc Refresh check/radio styling
- use a dedicated mixin
- flatten check/radios
2019-11-15 14:26:47 +01:00
Alberts Muktupāvels
e34037b015 menu: fix critical warning
Unset gdk-attached-grab-window from correct window.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1899
2019-11-14 19:00:50 +02:00
Benjamin Otte
b6528c9f91 Merge branch 'status-icons-hidpi' into 'gtk-3-24'
statusicon: Render as cairo surface

See merge request GNOME/gtk!1135
2019-11-13 17:39:32 +00:00
Emmanuele Bassi
21cd322df9 Do not crash when icon themes do not have a context
The Context key is not mandatory, so we need to handle its absence.

Fixes: #2111
2019-11-13 15:04:42 +00:00
Victor Kareh
4fc32b2751 statusicons: Improve code readability and remove dead code 2019-11-13 07:54:58 -05:00
Victor Kareh
1c09104dc6 statusicon: Render as cairo surface
On HiDPI displays, rendering Status Icons as pixbufs results in blurry
icons. By loading them at scale and rendering as a surface, we preserve
both their size and sharpness.
2019-11-13 07:47:50 -05:00
Emmanuele Bassi
d1936c1ae3 docs: Clarify when to replace old boxes with Grid
Mention that GtkGrid should only replace grid-like layouts achieved with
nested boxes.

Additionally, remove any mention of "future proofing": boxes are not
going away.
2019-11-08 18:02:13 +00:00
Emmanuele Bassi
b7dfb7836f Revert "Refresh checks and radios"
This reverts commit f261b41d47.

The commit broke the theme:

  Theme parsing error: gtk-contained.css:1176:74: Not a valid image
2019-11-04 22:47:00 +00:00
Jakub Steiner
4e346076f2 Merge branch 'adwaita-emoji-picker-adjustments' into 'gtk-3-24'
Adwaita: Emoji picker adjustments

See merge request GNOME/gtk!1159
2019-11-04 19:33:39 +00:00
frederik.feichtmeier
f261b41d47 Refresh checks and radios
- use a dedicated mixin to style checks and radios in _drawing.scss
- keep all special cases for checks and radios in _common.scss
- remove treeview disabled checks/radio styling because it seems no longer needed after testing with the new mixin
- add a fix for checked and indeterminate checks/radios in menus and slightly darken their borders similar to $selected_borders_color
- add a blank in front of a bracket

Fix backdrop

- remove backdrop-hover
- adapt the bg and fg look of checks/radios to other "blue" elements for example suggested action buttons
- fix selected treeview checks in backdrop being gray
2019-11-04 18:09:11 +01:00
Alex Monday
1051c1fcad Adwaita: Emoji picker adjustments
- Add margins for search entry;
- Increase side margins for emoji-section buttons box;
- Apply border-radius on hovered emoji;
- Adjust indication of hovered emoji-section button.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/2026
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1704
2019-11-03 13:03:58 +05:00
Emmanuele Bassi
ce5e97f720 Merge branch 'wip/carlosg/scroll-controller-fixes' into 'gtk-3-24'
Wip/carlosg/scroll controller fixes

See merge request GNOME/gtk!1141
2019-10-21 22:35:17 +00:00
Carlos Garnacho
65bb9c505a gtkwidget: Ensure to run key controllers in the bubble phase
We fall back on controllers in event handlers' default handler,
but we weren't doing so for GDK_KEY_PRESS/RELEASE.
2019-10-21 23:42:19 +02:00
Carlos Garnacho
85f86d1533 keycontroller: Fix ::key-released signal argument
It uses the same signature than ::key-pressed, but this signal
doesn't expose a boolean return value. Use a distinct marshaller
and fix this signal emission.
2019-10-21 23:40:52 +02:00
Matthias Clasen
ffaf56d1c6 key controller: Don't eat modifier events
The key controller was consuming key events
for modifier keys, for no entirely convincing
reason, which leads to problems when somebody
actually listens for those, such as the simple
input method does for C-S-u processing.

(cherry-picked from 91d6893f02)

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1884
2019-10-21 23:19:58 +02:00
Carlos Garnacho
c9a1adf2cc gtkwidget: Forward unhandled scroll events through controllers
Do just like button/motion/touch do, let the scroll events go first
through the event handler, and fallback on the current event controllers
afterwards.

Fixes handling of bubbled scroll events in the scroll controller.
2019-10-21 17:10:30 +02:00
Carlos Garnacho
ebd1840802 scrollcontroller: Set scroll event mask on scroll controller
This ensures adding the controller to a widget will end up with
the expected event masks in the widget default window.
2019-10-21 17:09:17 +02:00
Julian Sparber
ac39847187 GtkEntry: Make GtkEntry: gtk_entry_grab_focus_without_selecting () behave like gtk_widget_grab_focus ()
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2204
2019-10-17 14:32:24 +02:00
nana-4
d250e51018 Adwaita: Fix rounding on menubar menus really
Prioritize the style by increasing specificity.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1976
2019-10-09 01:21:00 +09:00
Luca Bacci
5c6ca889de
Small syntax fix for win32 CSS theme 2019-10-07 16:27:32 +02:00
Daniel Boles
914558f971 Builder: Fix typos and unended sentence in docs 2019-10-06 20:49:47 +01:00
Philip Withnall
8ce68a5194 gtklistbox: Only unparent header rows if they haven’t been reused
It’s possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesn’t want to continually recreate them and reattach signals to
them whenever the row headers change.

Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.

Fix that by only unparenting the header if it hasn’t already been
assigned as the parent of a different row.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 14:30:33 -04:00
Christoph Reiter
e65c703741 Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG
G_ENABLE_DEBUG is tied to the meson builttype property, so building with "plain"
results in G_ENABLE_DEBUG not being defined and the GTK_DEBUG env var just gets ignored
for that build.

Since it can be confusing that GTK_DEBUG has no effect print a warning message instead.

Fixes #2020
2019-09-28 20:54:38 +02:00
Matthias Clasen
ca9fc93925 Merge branch 'BUG_popover_focus_from_another_window_GTK3' into 'gtk-3-24'
popover: fix focus when inside an unfocused window

See merge request GNOME/gtk!1073
2019-09-27 20:29:27 +00:00
Matthias Clasen
e58bb02acd Merge branch 'BUG_popover_focus_new_folder_issue_GTK3' into 'gtk-3-24'
Fix popovers not restablishing default widget

See merge request GNOME/gtk!1075
2019-09-27 20:17:57 +00:00
Matthias Clasen
7ff79452c1 Merge branch '362-gtk-fileopen-dialog-need-filetype-mime-sort-option' into 'gtk-3-24'
GtkFileChooser: add a sortable "Type" column

See merge request GNOME/gtk!858
2019-09-27 19:59:17 +00:00
Matthias Clasen
f9273a86bd Merge branch 'wip/carlosg/atk-util-checks' into 'gtk-3-24'
a11y: Avoid clobbering AtkUtilClass vmethods

See merge request GNOME/gtk!1108
2019-09-27 19:05:34 +00:00
Carlos Garnacho
054165d406 a11y: Avoid clobbering AtkUtilClass vmethods
In the unlikely case that GTK is "embedded" with other toolkits
(hi, Mutter), GTK will clobber the embedder's AtkUtil implementation,
leaving its own a11y in a broken state.

AtkUtil is not meant to be overridden by multiple toolkits within a
single client, so the most sensible thing to do is stay away from it
if that is the case. This helps the embedder's a11y to win.

Fixes Clutter a11y in Mutter after xwayland-on-demand, process
startup used to be in a fixed order so that Clutter's a11y would
eventually win, but x11/gtk startup is now asynchronous and able to
happen at a later point.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1687
2019-09-27 18:15:44 +02:00
Jonas Ådahl
c05f25d968 Merge branch 'dnd-coordinates2' into 'gtk-3-24'
gtk: Properly calculate device offset for DnD

See merge request GNOME/gtk!1104
2019-09-27 15:56:01 +00:00
Benjamin Otte
bdb96507bd CSS: Handle unknown resolution
gdk_screen_get_resolution() can return -1 when the resolution is
unknown. Catch that case and use the default resolution of 96, like in
every other case.

Fixes #2119
2019-09-24 22:39:38 +02:00
Robert Mader
77e0d83000 gtk: Properly calculate device offset for DnD
We need to take the device scale into account, like it is done in
gdkwindow.c.

This fixes wrongly placed DnD surfaces in scaled contexts on X11
as well as Wayland.
2019-09-23 11:50:05 +02:00
Matthias Clasen
ac53fed1f2 Merge branch 'BUG_tooltip_blocks_combo_GTK3' into 'gtk-3-24'
tooltips: hide tooltips before showing popups

See merge request GNOME/gtk!1084
2019-09-15 21:20:37 +00:00
Matthias Clasen
16d8ca8ad9 Merge branch 'builder-notify' into 'gtk-3-24'
Freeze notify queue when building objects

See merge request GNOME/gtk!1086
2019-09-15 15:55:43 +00:00
Matthias Clasen
f4cd637056 Merge branch 'drop-mir' into 'gtk-3-24'
Drop the mir backend

See merge request GNOME/gtk!1062
2019-09-09 20:02:02 +00:00
Emmanuele Bassi
001c0a35ce Freeze notify queue when building objects
We're potentially applying multiple properties during object
construction; we should avoid constantly notifying after setting each
one, and instead coalesce the notifications at the end. In most cases,
the calling code doesn't have access to the instance, so it won't be
able to connect to the "notify" signal anyway, but it avoids a lot of
busy work.
2019-09-04 11:14:01 +01:00
Nelson Benítez León
ce7e99ca5e tooltips: hide tooltips before showing popups
because if there's a tooltip visible then popups fail to show
with the following warning:
"Gdk-WARNING **: Tried to map a popup with a non-top most parent"

This bug affect popups of the form:
 1) popups from gtk_menu_popup_{at_widget|at_rect|for_device}()

    This can be reproduce with a normal GtkComboBox that has a
    tooltip attached (eg. via GtkBuilder 'tooltip_text' attribute).
    Also see GtkLabel reproducer from gtk3-demo mentioned in #1785

 2) custom popups created with gtk_window_new (GTK_WINDOW_POPUP)

    A reproducer that shows this case is a GtkComboBox with
    the property 'appears-as-list'[1] set to TRUE (default is FALSE).

Fixes issue #1785

[1] https://developer.gnome.org/gtk3/stable/GtkComboBox.html#GtkComboBox--s-appears-as-list
2019-09-03 20:01:20 -04:00
Matthias Clasen
3f63656630 css: Support PANGO_WEIGHT_ULTRAHEAVY
The CSS fonts spec allows values between 1 and 1000,
so we can support Pangos ultraheavy weight (= 1000).
2019-09-03 17:12:03 -04:00
Matthias Clasen
d2bd63e455 Merge branch 'mingw-iconcache-use-correct-fstat' into 'gtk-3-24'
gtkiconcache: use _fstat64 under 64bit mingw to match GStatBuf

See merge request GNOME/gtk!1067
2019-09-03 20:17:24 +00:00
Matthias Clasen
340c62ecd6 Merge branch 'issue1044' into 'gtk-3-24'
Fix resize requests being forgotten when maximizing a hidden window

See merge request GNOME/gtk!367
2019-09-03 15:43:07 +00:00
Nelson Benítez León
de99b2f0b8 Fix popovers not restablishing default widget
Popovers have special handling to restablish
the previous 'default' and 'focused' widget,
that code it's in the map() unmap() handlers
in gtk/popover.c .

But, at the same time, GtkWindow also does
automatic restablishing of previous 'default' and
'focused' widgets, that's in _gtk_window_unset_focus_and_default()
function in gtk/gtkwindow.c which is called from
gtk_widget_hide() in gtk/gtkwidget.c .

So, when a popover is closed, both code-paths are
executed, conflicting with each other and resulting
in the popover failing to properly restablish the
default widget.

The commit that introduced _gtk_window_unset_focus_and_default()
to gtkwindow.c is from 2002 (commit ff9c2c5669) so
it predates by far the popover.c implementation,
therefore the rationale thing to do here is to exempt
popovers from being handled in _gtk_window_unset_focus_and_default()
(as that function is oblivion to the fact that
popovers have their own handling).

So, this commit exempts popovers from being handled
in the aforementioned function, but only for
the 'default' widget part atm, because although
by the previous rationale we should exempt it
from the 'focused' widget part too, I could not
find a bug in the issue tracker about that, so
instead we just exempt the 'default' widget part
that we know for sure it fixes issue #2125

Fixes issue #2125
2019-09-01 13:50:39 -04:00
Nelson Benítez León
58f57aeb3b popover: fix focus when inside an unfocused window
Fix popovers to properly gain focus when clicked
inside an unfocused window.

We use the GTK_PHASE_CAPTURE of the 'pressed' event
to early detect that the popover is being clicked
inside an inactive window, this allow us to present
the window (and be focused) before the normal signal
handlers for the popover click/pressed events are run
which would ultimately give focus to popover widget.

This fix works for both modal and 'non modal' popovers
when being clicked inside unfocused windows.

Fixes issue #1871
2019-08-30 21:26:08 -04:00
Christoph Reiter
8809fab111 gtkiconcache: use _fstat64 under 64bit mingw to match GStatBuf
With the switch to meson we no longer built with _FILE_OFFSET_BITS which
results in fstat being the 32 bit variant, not matching GStatBuf, which is
_stat64 on 64bit mingw builds.

This makes things use _fstat64 in this case, to match GStatBuf.
2019-08-26 20:13:48 +02:00
Christoph Reiter
31a57fe389 Drop the mir backend
It depends on libcontent-hub-glib which was dropped from Ubuntu in mid 2017:
https://bugs.launchpad.net/ubuntu/+source/content-hub/+bug/1712874

It was patched downstream to still build until it was disabled at the beginning
of 2018: https://launchpad.net/ubuntu/+source/gtk+3.0/3.22.28-1ubuntu3

This likely means no one has built gtk with mir in 2 years, and there is no plan
to change that, so just remove it.
2019-08-25 22:46:28 +02:00
Matthias Clasen
8f955baf93 Merge branch 'gtk-3-24' into 'gtk-3-24'
gtkprintbackend:backend_create: avoid strdup+free (3.24)

See merge request GNOME/gtk!996
2019-08-25 12:03:03 +00:00
Benjamin Otte
bc1c0584b7 a11y: Include window management buttons in headerbar 2019-08-15 13:09:07 +02:00
Nelson Benítez León
aff5c7ede6 filechooser: keep file selected after being renamed
Because otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.

Fixed by keeping track of the renamed file and revealing
it in the "row-changed" signal handler, which gets emitted
after a file is renamed.

Fixes issue #948
2019-08-12 16:24:35 -04:00
Jonas Ådahl
77bc2dc87c gtk/icon-theme: Handle lack of SVG loader gracefully
When loading a SVG icon from a gresource file only containing SVG icons,
but without having a SVG loader available in gdk-pixbuf, we would crash
when trying to eventually load the resource. Fix this by gracefully
handling this by simply failing to load the icon, while the first time
it happens, log a warning.

https://gitlab.gnome.org/GNOME/gtk/issues/2084
2019-08-08 09:05:17 +02:00
Benjamin Otte
1d1059550c menu: Modernize code
No functional changes, just don't call valist functions anymore.
2019-08-07 13:32:49 +03:00
Luca Bacci
6dc2f6f026 GtkStatusIcon/w32: Also set the tooltip on taskbar_created_msg
When explorer.exe creates a taskbar it broadcasts a "TaskbarCreated"
message to all toplevels. Applications, By handling that message,
are able to re-create the icons to be displayed in the taskbar.

Explorer creates a new taskbar in two circumstances:
A) when explorer starts up
B) when the DPI of the monitor changes

A) happens either when explorer.exe is started for the first time at
   logon, or when it is restarted after being terminated.
B) happens when the user changes the DPI preference of the active
   monitor where the desktop is displayed, or if the desktop is moved
   to a monitor with different DPI.

Currently, this message is handled in Gtk and icons are re-created.
However the current implementation has a small issue in that it
doesn't set the tooltip on the new icons, so tooltips get lost
after re-creation.

The tooltip is important because Windows uses it for identification
of taskbar icons and for storing and applying user preferences. For
an explanation of that see:
https://bugzilla.gnome.org/show_bug.cgi?id=609622

With this commit the tooltip is correctly applied to new taskbar
icons when handling taskbar_created_msg.

See Merge Request !1003
2019-08-02 16:58:25 +00:00
Matthias Clasen
f26b5c8d80 Merge branch 'wip/jimmac/osd-color' into 'gtk-3-24'
Adwaita: increase opacity for OSD bg

See merge request GNOME/gtk!1040
2019-08-02 12:30:10 +00:00
Matthias Clasen
8429cf80c0 Merge branch 'reubengreen73-issue2066' into 'gtk-3-24'
Prevent Gtk-CRITICAL when unrealize-ing a GtkPaned.

See merge request GNOME/gtk!1033
2019-08-02 12:26:25 +00:00
Jakub Steiner
766662f0de Adwaita: increase opacity for OSD bg
- make text more legible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2072
2019-08-02 14:17:14 +02:00
frederik.feichtmeier
147e1ad6b0 Exclude appmenu titlebuttons 2019-08-01 10:20:28 -04:00
frederik.feichtmeier
c73f2d8f22 Make titlebuttons round
- use even sides for the titlebuttons so the result is a circle and not an ellipse
- add maximum border radius
- set min width/height to 0
- adjust margin and padding to match the previous look
2019-08-01 10:09:52 -04:00
Reuben Green
0081a96cbc Prevent Gtk-CRITICAL when unrealize-ing a GtkPaned.
This commit fixes a bug (issue #2066) caused by gdk_window_set_cursor being called with a NULL pointer as its first argument during the
unrealize-ing of a GtkPaned, resulting in a Gtk-CRITICAL. The change ensures that, even if the function gtk_paned_state_flags_changed
is called on a GtkPaned while it is part way through being unrealized (as can happen, for example, if a descendant of the GtkPaned calls
gtk_clipboard_store when it is unrealize-d, see the issue report for a test case), the function gdk_window_set_cursor is not called on
the GtkPaned's priv->handle member if this pointer is NULL.

Closes #2066
Fixes #2066
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2066
2019-07-30 18:50:59 +01:00
Jakub Steiner
e7db2a2f8b Adwaita: make links in infobars legible
- No longer tinted blue, make legible

Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/751
2019-07-29 10:03:19 +02:00
Luca Bacci
f4edfbe56f Implement choices for GtkFileChooserNativeWin32
See Merge Request !990
2019-07-29 03:58:14 +00:00
Benjamin Otte
eb71ec911c window: handle configure request when maximized/fullscreen
Commit 42b02d9d ("ignore resize increments for maximized/fullscreen")
introduced a regression which prevents window from being resized while
maximized or fullscreen.

Move the check for maximized/fullscreen where the geometry is handled
rather than ignoring the geometry info when maximized/fullscreen so that
a client issuing a "move_resize()" while maximized or fullscreen can get
the requested size when restoring the original window state.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1044
2019-07-26 15:51:47 +02:00
frederik.feichtmeier
410684b298 Change check and radio bg and fg color
- make use of already existing checkradio_bg/fg_color
- use the primary color blue ($selected_bg_color) for the check and radio background and white ($selected_fg_color) for the fg color
- no change to backdrop
2019-07-26 08:10:15 -04:00
Feichtmeier
ff61d74280 Tiny refactoring
- use checkradio_fg_color for check/radio in treeview, which points to fg_color, so no change of the hex color, thus no change to the parsed CSS
2019-07-26 13:49:01 +02:00
Jakub Steiner
f95f3c707a Adwaita: subtle app icon dropshadow
- make application icon dropshadow a legibility aid,
  not a strong styling choice.
2019-07-26 13:48:05 +02:00
Emmanuele Bassi
ac83787d18 Merge branch 'gtk-3-24-add-TCRYPT-options-to-ask-password-dialog' into 'gtk-3-24'
gtkmountoperation: Add TCRYPT options to the ask-password dialog

See merge request GNOME/gtk!262
2019-07-25 10:17:00 +00:00
Jeremy Tan
ff21730d8e Fix gdkconfig.h generation for GDK_WINDOWING_QUARTZ 2019-07-20 15:10:34 +08:00
segfault
6c52f76088 gtkmountoperation: Add TCRYPT options to the ask-password dialog 2019-07-18 18:27:12 +02:00
segfault
d1e07e2952 gtkmountoperation: Support TCRYPT options when using proxy handler
GMountOperation now supports options to unlock TCRYPT volumes. This
patch sets these options if they are returned by AskPassword() of a
GtkMountOperationHandlerProxy.
2019-07-18 11:52:22 +02:00
Дилян Палаузов
4bc34c3bcf gtkprintbackend:backend_create: avoid strdup+free 2019-07-17 10:42:05 +00:00
Luca Bacci
8211e083f2 Fix a string leak
Fixes #2014
2019-07-12 08:33:48 +00:00
Timm Bäder
0f216525af treeview: Remove in_scroll flag
Keep using the pixel cache for backwards-compat, but remove the
in_scroll flag to fix the missing invalidation during scrolling.

Fixes #1977
2019-07-03 16:15:52 -04:00
Matthias Clasen
ed0df60d6e Revert "treeview: Remove the pixel cache"
This reverts commit 184424ae40.

It caused regressions in eclipse.
2019-07-03 16:14:08 -04:00
Christoph Reiter
8a53ed9e55 gtkrecentfilter: handle g_content_type_from_mime_type() returning NULL
Otherwise we get errors on g_content_type_is_a(). This happens mostly on Windows
because it only knows a limited set of mime types and tries to convert
them to file extensions without any fallback.
2019-06-30 13:59:13 +02:00
Jakub Steiner
ed691dcba5 Adwaita: allow flat list row buttons to be flat
- Be more specific about the list row image buttons

Addresses corner case of https://gitlab.gnome.org/GNOME/gtk/issues/1748
2019-06-27 12:10:42 +02:00
Jakub Steiner
4a6ff4598e Adwaita: no intention to make circular buttons universal
- No intention to make any button circular with a magic class
  Maybe if Lapo returns, he'll make all your dreams come true.

"Fixes" https://gitlab.gnome.org/GNOME/gtk/issues/861
2019-06-27 11:32:38 +02:00
Jakub Steiner
1f69f5196b Adwaita: lighten dark switch sliders
- addresses legibility concerns

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1819
2019-06-27 10:55:18 +02:00
Jakub Steiner
c5330a2588 Adwaita: darken osd background for A:dark
- OSD background color was too close to $bg_color to make out outline

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1964
2019-06-27 10:28:39 +02:00
Jakub Steiner
2d29cff140 Merge branch 'adwaita-menubar-submenu-rounding' into 'gtk-3-24'
Adwaita: Fix padding/rounding on submenus

See merge request GNOME/gtk!967
2019-06-27 08:25:14 +00:00
Alex Monday
4fa83d55dc Adwaita: Fix padding/rounding on submenus
- Apply menubar submenu style for .csd submenus;
- Remove child subemenu style (looks like it is inherited
  from a parent).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1976
2019-06-27 13:04:02 +05:00
Alex Monday
d3cf55a26d Adwaita: Apply border-radius to .csd popovers
Fix popover_radius variable doesn't apply to .csd popover.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1984
2019-06-27 11:07:51 +05:00
Jakub Steiner
df6e0da623 Adwaita: infobar borders
- defined a bottom border for infobars, move styling into descendant box
  to hide border when unrevealed

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1165
2019-06-25 15:17:39 +02:00
Christoph Reiter
ecf2c68d97 Merge branch 'gtk3-build-explicit-encoding' into 'gtk-3-24'
build: always use utf-8 when reading/writing text files

See merge request GNOME/gtk!953
2019-06-25 07:27:58 +00:00
Christoph Reiter
5107735c9f build: always use utf-8 when reading/writing text files
open() in text mode should never be used without an encoding because it defaults
to the locale encoding which is rarely what is wanted.

This fixes the Windows build in some cases (depending on the locale/paths used)
2019-06-25 08:53:26 +02:00
Daniel Boles
a25aa2082d ShortcutsSection: Fix tiny grammar-o "in for"→"in" 2019-06-24 18:01:53 +01:00
Emmanuele Bassi
6cdb165fa4 Do not add empty strings to GtkFileFilter
When parsing a UI description for GtkFileFilter we should avoid passing
empty strings, to avoid issues when serialising the filter before
sending it over DBus.

Fixes: #1973
2019-06-24 10:53:31 +01:00
Matthias Clasen
e873c98e25 action muxer: Be safe against reinsertion
Be prepared for the eventuality that somebody
might reinsert the same action group without
holding any extra references on it.

This was observed as causing crashes in
gnome-builder.
2019-06-23 20:50:20 -04:00
John Ralls
21694949fc Disable Quartz Native Filechooser when running earlier than MacOS X 10.6
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1685
2019-06-22 14:43:50 -07:00
John Ralls
13e64aa103 "]Quartz] Set the popup menu type hint before realizing the popup."
Otherwise the native window gets created with GDK_TYPE_HINT_NORMAL
and in fullscreen appears on its own screen or tab instead of over
the combo like it's supposed to.
2019-06-22 13:46:18 -07:00
John Ralls
ef72fe750a Hide Objective-C from outside GdkQuartz.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1737

Don't export any functions taking or returning MacOS types in
gdkquartz.h, gdkprivate-quartz.h, or any header that either includes.

The GdkQuartz internal functions are moved to a new header
gdkinternal-quartz.h, the functions used by quartz-specific
Gtk files are moved to another new header gdkquartz-gtk-only.h, and
the key and event enums to a new header gdkkeys-quartz.h.
2019-06-22 13:37:46 -07:00
Daniel Boles
321a21959e Overlay: Use @index_, not @position, in reorder()
We named the argument `position` in the code and doc arguments, but the
rest of the documentation referred to `index` instead. That was maybe
meant to hint at the child property named :index, but we can simply be
fully clear here. We can call the argument `index_`, replacing the local
variable with that name, thus avoiding any possible confusion with the
unrelated ::get-child-position, and refer users to :index for completion

`index_` is used instead of plain `index` in case anyone is #including
<strings.h> and getting the old index() function superseded by strchr();
see https://gitlab.gnome.org/GNOME/gtk/merge_requests/932#note_531149
2019-06-20 21:40:57 +01:00
Daniel Boles
8393c6d9be Overlay: Improve overly brief blurbs @ child props
Be a bit clearer about what :pass-through does, and point :index at the
corresponding reorder_overlay() method that explains what an index means
2019-06-20 21:40:57 +01:00
Daniel Boles
4119578562 Overlay: Document overlay children aren't measured
Some users expect that the Overlay will automatically request enough
size for its overlay children as well as its main child. It doesn't,
because it's just a GtkBin. Add a short paragraph pointing that out.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1939
2019-06-20 21:40:37 +01:00
Daniel Boles
c6b16fbbfa FileChooserButton: Document the CSS nodes & class
The only glancing mention of this we had was that GtkButton mentioned it
in passing when discussing how `button` could get contextual classes.
2019-06-20 20:51:13 +01:00
Matthias Clasen
17ec9ee4af Merge branch 'fix-action-muxer-parent-chain' into 'gtk-3-24'
Fix action muxer parent chain

See merge request GNOME/gtk!950
2019-06-20 14:28:56 +00:00
Matthias Clasen
b38c885eca Merge branch 'wip/jimmac/variable-colors-and-metrics' into 'gtk-3-24'
Adwaita: few vars to adjust color & metrics

See merge request GNOME/gtk!947
2019-06-19 21:55:19 +00:00
Matthias Clasen
08f216e11f action muxer: Fix gtk_widget_get_action_group
The documentation for gtk_widget_get_action_group
and gtk_widget_list_prefixes states that both of
these operate on all the action groups that are
'available' to the widget.

Which means: they are meant to walk up the parent
muxer chain. So do that.

Add tests to verify the expected behavior.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1396
2019-06-19 21:38:27 +00:00
Daniel Boles
ddd5fcb8ce ListBox: Document buildable child type placeholder
andyholmes on IRC asked about this and it wasn't documented, so fix that
2019-06-18 21:43:07 +01:00
Daniel Boles
c34760010f Window: Hyperlink to GtkBuildable from its section 2019-06-18 21:42:40 +01:00
Frederik Feichtmeier
a83e1bcc03 Adwaita: few vars to adjust color & metrics 2019-06-18 15:05:52 +02:00
Jakub Steiner
4bf343a0ec Merge branch 'wip/jimmac/tone-down-infobars' into 'gtk-3-24'
Adwaita: tone down infobars

See merge request GNOME/gtk!946
2019-06-18 08:39:53 +00:00
Jakub Steiner
fa3d410848 Adwaita: tone down infobars
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1957
2019-06-18 10:19:11 +02:00
Michael Gratton
59c05aeb48 entry completion: Update popup visibility on manual complete
Currently, calling `gtk_entry_completion_complete()` does not adjust
the visbility of the popup used to show completion entries. This makes
it difficlt to dynamically populate the model based on what is being
entered into the completion's entry.

For example, if the model is being populated from a database, and no
matches have (yet) been added between typing a character and the 100ms
delay before completion is automatically triggered, the popup will not
be shown even after matches have been added.

This patch simply moves the related code from the private timeout method
to the public function and shuffles the position of some functions so as
to keep the compiler happy.
2019-06-15 23:25:20 +10:00
Matthias Clasen
e47375cc64 Merge branch 'wip/dboles/scrolledwindow-annotations' into 'master'
ScrolledWindow: Replace deprecated annotations; add (nullable) to set_[hvadjustment]()

See merge request GNOME/gtk!868

(cherry picked from commit 28c40a4c3d)

45a98d6a ScrolledWindow: Replace deprecated (allow-none)
7575d521 ScrolledWindow: Annotate h|vadjustment as nullable
2019-06-12 17:10:12 +00:00
Matthias Clasen
e56a9e6ce5 window: Fix focus wraparound
If tab focus falls off the end, and we have an empty headerbar,
we end up with window->focus == NULL. Don't let that happen

Close https://gitlab.gnome.org/GNOME/gtk/issues/686#note_529577
2019-06-12 07:37:27 +01:00
Matthias Clasen
b6c9d23b9a Merge branch 'popover-state-sync' into 'gtk-3-24'
popover: Sync parent state when needed

See merge request GNOME/gtk!931
2019-06-11 18:33:01 +00:00
Colomban Wendling
afd61c3570 HighContrast: Improve contrast of notebook tabs 2019-06-11 17:41:23 +02:00
Matthias Clasen
d6a81377b1 popover: Sync parent state when needed
When the relative-to widget changes, we need
to re-sync our parent state.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1943
2019-06-11 11:36:53 -04:00
Jakub Steiner
2959b2075b Adwaita: update treeview progressbars
- The style resembles Clearlooks and is way outdated.

https://gitlab.gnome.org/GNOME/gtk/issues/1938
2019-06-07 13:43:29 +02:00
Christian Hergert
ef67eb0b3c gdk: backport GdkProfiler
This is a backport of the GdkProfiler from master. It does not include
the pixel bandwidth numbers that come from gdkdrawcontext.c since there
does not seem to be an analog in 3.x.

Additionally, this implements the recent changes for SYsprof's D-Bus
profiler API which adds a Capabilities property and an options hash-table
to the D-Bus interface for forward portability.
2019-06-06 17:17:20 -07:00
Michael Natterer
ae2ef1472c gtk: fix weed_out_neg_zero() in spinbutton and scale
It was not copying the terminating \0 in the string, breaking output
in spinbutton (didn't try scale). Fixes #3452.
2019-06-03 02:25:12 +02:00
Christian Hergert
6033b6457b va_marshaller: add various va_marshallers
We don't need to cover every case with a va_marshaller, but there are a
number of them that are useful because they will often only be connected
to by a single signal handler.

Generally speaking, if I opened into a file to add a va_marshaller, I just
set all of them.
2019-06-01 00:33:32 -07:00
Christian Hergert
44cdb20c10 gtk: fix all uses of g_cclosure_marshal_generic
This adds specific marshallers for all of the locations where a generic
marshaller is being used. It also provides va_marshallers to reduce the
chances that we get stack traces from perf going through ffi_call_unix64.
2019-06-01 00:02:39 -07:00
Matthias Clasen
dd25499f1e Merge branch 'overlay-scrolling-for-3' into 'gtk-3-24'
Overlay scrolling for 3

See merge request GNOME/gtk!895
2019-05-31 19:47:00 +00:00
Christian Hergert
0f2b019d89 gtk: rely on default marshallers
Similar to previous removals of g_cclosure_marshal_VOID__VOID we can remove
other marshallers for which are a simple G_TYPE_NONE with single parameter.
In those cases, GLib will setup both a c_marshaller and va_marshaller for
us. Before this commit, we would not get a va_marshaller because the
c_marshaller is set.

Related to GNOME/Initiatives#10
2019-05-31 11:12:29 -07:00
Matthias Clasen
26b24916c8 scrolled window: respect overlay-scrolling setting
If the gtk-overlay-scrolling setting is FALSE,
don't use overlay scrollbars.
2019-05-31 11:54:06 -04:00
Matthias Clasen
044383fe45 Add a gtk-overlay-scrolling setting
This is in preparation for letting user opt out of
overlay scrolling in the control-center.
2019-05-31 11:54:06 -04:00
Christian Hergert
a8a56e8a0e marshallers: ensure g_cclosure_marshal_VOID__VOIDv is used
If we set c_marshaller manually, then g_signal_newv() will not setup a
va_marshaller for us. However, if we provide c_marshaller as NULL, it will
setup both the c_marshaller (to g_cclosure_marshal_VOID__VOID) and
va_marshaller (to g_cclosure_marshal_VOID__VOIDv) for us.
2019-05-29 13:30:15 -07:00
Timm Bäder
47d24c34cd Merge branch 'gtk3-remove-pixel-cache-from-treeview' into 'gtk-3-24'
treeview: Remove the pixel cache

See merge request GNOME/gtk!867
2019-05-29 07:41:21 +00:00
Nelson Benítez León
c925221aa8 GtkFileChooser: add a sortable "Type" column
along with a new 'type-format' setting that allows
to choose the output format for the "Type" column.

The options implemented for this setting are:

'mime' : Output from g_content_type_get_mime_type().

'description' : Output from g_content_type_get_description().

'category' : It uses the corresponding generic icon
  of the mime type to group by categories (aka basic types).

  This produces a more compact output than previous options,
  and allows for type families to be grouped together, so eg.
  after sorting by "Type" column, jpeg and png images will
  be placed together, or the various types of archiver files
  will also be grouped together.

  This format was copied from and currently used by Nautilus
  list view, so we also improve consistency with Nautilus.
  Bugzilla entry for Nautilus implementation is:
  https://bugzilla.gnome.org/show_bug.cgi?id=683722

  The list of type families or categories can be checked on:
  https://developer.gnome.org/icon-naming-spec/#mimetypes

  This 'category' format is set as default.

Issue #362
2019-05-27 22:05:51 -04:00
Timm Bäder
184424ae40 treeview: Remove the pixel cache
This has caused numerous issues for users, especially in the
filechooser, which have not been fixed in all the years since the pixel
cache has been introduced.

If anyone seriously has complaints about the treeview performance (and
those did not exist with the pixel cache), feel free to revert this
commit *and* fix the pixel cache issues.

Closes #503
Closes #1691
Closes #466
2019-05-21 19:09:18 +02:00
Federico Mena Quintero
b565f5d5c2 Use g_once for all the mkenums template files
Without this, initialization of enum/flags values from multithreaded
programs may not work correctly.

Fixes #1617.
2019-05-21 10:46:04 -05:00
Timm Bäder
1a29a2f03f Merge branch 'fix-non-csd-menu-corners-gtk3' into 'gtk-3-24'
Adwaita: Don't round the non-csd menu corners (GTK3)

See merge request GNOME/gtk!834
2019-05-17 13:45:50 +00:00
Matthias Clasen
9cde2186bf emoji chooser: populate incrementally
It takes half a second on my system to initially
populate the Emoji chooser. That is too long. Do
the work in 8 millisecond chunks to give GTK a
chance to get some frames done.
2019-05-16 17:14:04 +00:00
nana-4
d942a31750 Adwaita: Don't round the non-csd menu corners
Otherwise, the menu will have ugly black corners.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1661
2019-05-12 17:41:41 +09:00
Guido Günther
b1b9de6836 GtkHeaderBar: Don't leak decoration layout
Currently we leak priv->decoration_layout if the layout is set
multiple times.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
2019-05-06 13:14:02 +02:00
Matthias Clasen
4f9ea5e54b css: Use multiple font-family values
Pango API to support this, so we can implement
this very easily.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1854
2019-05-03 16:38:13 -04:00
Ernestas Kulik
b558f7c9ee treeview: Draw rubber band rectangle more often
If the cursor coordinates are outside of the content (the GtkRBTree),
gtk_tree_view_bin_draw() will return and not draw the rubber band
rectangle.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1859
2019-05-01 22:18:50 +02:00
Rico Tzschichholz
c860a2db85 Add a few placeholder documentation block to have g-i annotations 2019-05-01 15:06:15 +02:00
Jakub Steiner
c734c7e918 Adwaita: tone down lowres icon aid
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1818
2019-04-29 15:07:10 +02:00
Felix Riemann
370d8242e7 GtkTextBufferSerialize: Add missing format string argument
The format string has two string parameters however only one was supplied.
2019-04-27 14:41:48 +02:00
Felix Riemann
0dcbbc3344 GtkTextBufferSerialize: Add G_GNUC_PRINTF() to set_error()
This allows the compiler to warn if format string and arguments do not match.
2019-04-27 14:36:35 +02:00
Christoph Reiter
0f957ca4f7 meson: underscorify immodule name when using it as a macro name
This resulted in -DINCLUDE_IM_ti-et getting passed to gcc resulting in
lots of warnings. Use underscorify() so we get the correct -DINCLUDE_IM_ti_et instead.
2019-04-12 20:59:14 +02:00
Emmanuele Bassi
a04fef4b9e meson: Preserve compatibility with Autotools build
The Meson build is missing the libtool versioning of the shared
libraries.
2019-04-11 19:33:25 +01:00
Chun-wei Fan
651715b8e8 meson: Fix building with builtin immodules
We also need to ensure that we pass in -DINCLUDE_IM_xxxx when building
the GTK DLL/.so, in addition to building the respective (static)
immodules, so that we did really link in the immodules into the final
GTK DLL/.so.
2019-04-11 16:46:22 +02:00
Christoph Reiter
5aba13f62d autotools: dist gen-c-array.py and gen-rc.py 2019-04-11 16:46:22 +02:00
Christoph Reiter
749a58ab26 meson: simplify builtin_immodules build option
Make it a yes/no/auto combo. "yes" means all modules are built into libgtk,
"no" that none are and "auto" uses the platform defaults, yes on win32,
no otherwise.

If we need more we can always extend it later.
2019-04-11 16:46:22 +02:00
Christoph Reiter
28833783cc meson: Various config.h related fixes
Various adjustments to make the config.h output between autotools
and meson more similar by testing on Linux and Windows/MSYS2.

Setting things to 1 instead of true and shifting things around is motivated
by reducing the diff between the generated files.
2019-04-11 16:46:22 +02:00
Christoph Reiter
8cfbf63c5a meson: static immodules: depend on generated headers 2019-04-11 16:45:37 +02:00
Christoph Reiter
068f7f7423 meson: set the soversion to just '0' everywhere
This is what glib did for the meson port, so can't be that wrong.
This also makes the DLL names match the autotools Windows DLLs.
2019-04-11 16:45:37 +02:00
Christoph Reiter
7391a078b3 meson: build print backends
This changes the configure option into two states:
auto: build all that can be build (default)
A list of backend names: build them and fail if we can't

"papi" is missing because it's not in Debian and I can't test it.
2019-04-11 16:45:36 +02:00
Christoph Reiter
d52dad2042 autotools: dist all meson related build files 2019-04-11 16:45:36 +02:00
Christoph Reiter
26d32f3bd0 meson: build all input modules; fix static build on Linux 2019-04-11 16:45:36 +02:00
Christoph Reiter
fd758bb2e9 meson: install unix-print headers 2019-04-11 16:45:36 +02:00
Christoph Reiter
b1bc86e905 meson: mkenums: only write basenames in the comments
The autotools build uses relative filenames here while with meson
we get absolute paths. Switch to basename so we get the same result
for both and don't break reproducible builds with absolute paths
in public headers.
2019-04-11 16:45:36 +02:00
Christoph Reiter
331a92d559 meson: gtk gir: depend on xlib and include gtkx.h if X11 is enabled
To match what the autotools build does.
2019-04-11 16:45:36 +02:00
Christoph Reiter
c9d4f53cfc meson: install gtkbuilder.rng/its/loc files 2019-04-11 16:45:36 +02:00
Christoph Reiter
9709d7eb61 meson: Install key themes 2019-04-11 16:45:36 +02:00
Christoph Reiter
74f6832001 meson: add fribidi dep 2019-04-11 16:45:36 +02:00
Chun-wei Fan
5e8edec254 meson: Build the input modules
Build the input modules for GTK+, either as modules or built directly
into GTK.  Also provide a configure option to build the specified
immodules, or all, or the backend immodule(s) or none of the immodules
into GTK.  Note that for Visual Studio all immodules are built into
the GTK DLL by default, like what is done in the Visual Studio projects.

Note that building the backend immodules for Quartz, X11 and Wayland are
currently untested.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
1cd99d63d1 meson: Build the .rc files on Windows
This will ensure that the version info is easily visible from the
GDK/GTK+ DLLs, and ensure that the print dialogs will have a more modern
look and feel.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
b0a31fefd7 meson: Fix Broadway builds
Make sure the source files are in line with GTK+-3.x Broadway backend
sources.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
20c29fd8c0 meson: Fix introspection generation on Linux 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
3b246fbc56 gtk: Fix compiler warning about deprecated declaration 2019-04-11 16:45:36 +02:00
Philippe Normand
215c2be76f meson: Set the compatibility version correctly on macOS
And bump to Meson 0.48 as this feature requires it.
2019-04-11 16:45:36 +02:00
Philippe Normand
89d5c543ac meson: Build fixes for macOS 2019-04-11 16:45:36 +02:00
Philippe Normand
cde5a3f4b4 gtk: Fix paste/clipboard usage on macOS
In Mojave the build fails because declareTypes is nil. Instead use the
clearContents method, although I'm not really sure this is the same.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
00842f4d4e gtk-launch: Fix compilation with MSVC 2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
a4fe15d9f0 meson: Sync build files with master and update to 3.24 2019-04-11 16:45:27 +02:00
Nirbheek Chauhan
8ec004cc08 Import meson build files from an 3.22
Specifically, from 6dd6660c68
2019-04-11 16:40:33 +02:00
Matthias Clasen
c19ae9635e Merge branch 'uajain/clean-gtktypefuncs' into 'gtk-3-24'
gtk/Makefile: Add generated gtktypefuncs.c to DISTCLEANFILES

See merge request GNOME/gtk!732
2019-04-11 13:55:55 +00:00
Jakub Steiner
152e65f07a Adwaita: less purple OSD style
- one of the bits that escaped the purple cast is the osd background color
2019-04-11 15:31:31 +02:00
Umang Jain
adbd9b22d6 gtk/Makefile: Add generated gtktypefuncs.c to DISTCLEANFILES
Otherwise, it errors out on make distcleancheck in debian packaging

```
ERROR: files left in build directory after distclean:
./gtk/gtktypefuncs.c
make[1]: *** [Makefile:1005: distcleancheck] Error 1
```
2019-04-11 11:27:21 +05:30