Commit Graph

28265 Commits

Author SHA1 Message Date
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