Commit Graph

28301 Commits

Author SHA1 Message Date
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
Matthias Clasen
08e20ce597 Silence a compiler warning 2019-04-10 15:46:31 -04:00
Iain Lane
d151223b1b
cellrendererpixbuf: Use fallback icons with icon-name
This gives us a better chance of finding an icon to show.

Closes: #1809
(cherry picked from commit fbe0e32813)
2019-04-08 16:30:03 +01:00
segfault
3f77da62bd gtkplacessidebar: Add loop devices 2019-04-05 18:59:50 +02:00
Matthias Clasen
3a770b1b80 Merge branch 'adwaita-selected-row-switch-fix' into 'gtk-3-24'
Adwaita: Fix switch slider border on selected row

See merge request GNOME/gtk!703
2019-04-02 15:49:29 +00:00
Alex Monday
3770defce7 Adwaita: Fix switch slider border on selected row
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1802
2019-04-02 20:12:56 +05:00
Carlos Garnacho
a6eb593370 Merge branch 'startup-id-private' into 'gtk-3-24'
Centralize DESKTOP_STARTUP/AUTOSTART_ID handling

See merge request GNOME/gtk!659
2019-04-02 12:38:18 +00:00
Jan Alexander Steffens (heftig)
2d3936cbe6
Centralize DESKTOP_STARTUP/AUTOSTART_ID handling
Add private API to GDK to move these variables from the environment into
static scope. Also move the DESKTOP_STARTUP_ID validation here to reduce
code duplication.

Use constructors to read them as early as possible; however, do not
unset them until first requested. This avoids breaking gnome-shell and
gnome-settings-daemon, which want to use the DESKTOP_AUTOSTART_ID in
their own gnome-session clients.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1761
2019-04-02 09:14:35 +02:00
Emmanuele Bassi
6ed7d60a20 Set the a11y name of the "create folder" button
Otherwise it'll get a generic "Menu" name.

https://gitlab.gnome.org/GNOME/gtk/issues/137
2019-04-01 14:44:25 +01:00
Matthias Clasen
59a272fdef Close a documentation gap 2019-03-31 18:36:38 -04:00
Rick Yorgason
446659e80f Fixed bug that prevented GTK from storing printer driver preferences in the print dialogue on Windows. Also saving devmode->dmDeviceName so the dialogue remembers which printer your selected last, and doesn't try to feed to saved preferences to the wrong printer. 2019-03-31 13:57:12 -07:00
Benjamin Otte
cd4b6a77a4 flowbox: children per line may not be 0 2019-03-29 23:59:52 -05:00
Christian Hergert
8dfb33fb5f flowbox: check for flowbox when updating selection 2019-03-29 16:26:20 -07:00
Matthias Clasen
f9e19dca49 Merge branch 'portal-session-state' into 'gtk-3-24'
Portal session state

See merge request GNOME/gtk!519
2019-03-29 23:22:47 +00:00
Matthias Clasen
08da4a2377 application: Add a query-end signal
This lets us take just-in-time inhibitors, and makes
the session support a little more real.
2019-03-29 19:12:40 -04:00
Matthias Clasen
a3e070f59c Application: Support sandboxed session state changes
React to the session-state in StateChanged signals from
the inhibit portal and call QueryEndResponse as appropriate.
2019-03-29 19:12:20 -04:00
Matthias Clasen
a6f35772e7 Merge branch 'separate-marks-margins-on-scales' into 'gtk-3-24'
themes: Optimize code for marks margins on scales

See merge request GNOME/gtk!612
2019-03-29 22:58:49 +00:00
Christoph Reiter
567cc15132 Fix some translation domains in .ui files copied from gtk4
gtk40->gtk30
2019-03-29 17:35:35 +01:00
Matthias Clasen
1e2bd15b22 Merge branch 'wip/jimmac/list-image-buttons' into 'gtk-3-24'
list image buttons

See merge request GNOME/gtk!656
2019-03-29 14:26:13 +00:00
Matthias Clasen
1bb106012a Merge branch 'fix-gi-build-with-lto' into 'gtk-3-24'
Fix the introspection build with "-Wl,--as-needed -flto -O2". Fixes #1692

See merge request GNOME/gtk!665
2019-03-27 05:56:15 +00:00
Benjamin Otte
bbb70857be gtk: Remove all gtk_widget_set_redraw_on_allocate() calls
They're either wrong (when using FALSE because the widgets don't account
for changes to the CSS) or unnecessary (when using TRUE because it's the
default).

Fixes !1777
2019-03-27 00:02:34 +01:00
Matthias Clasen
f35ce26336 color editor: Don't warn if editing is cancelled
Thats a valid way to end color picking.
2019-03-25 16:52:40 -04:00
Jakub Steiner
fc3317138e Adwaita: tone down app icon shadows
- based on Tobias' and Allan's feedback, the app icon dropshadow
  were too prominent.
2019-03-25 17:59:24 +01:00
Christoph Reiter
55e73682cc Fix the introspection build with "-Wl,--as-needed -flto -O2". Fixes #1692
The above flags in combination with "-fvisibility=hidden" break the
g-i build because it results in the g-i generated dumper executable not
linking against the libraries because they are detected as unused and
thrown out.

Fix by only using -fvisibility=hidden for the library and not g-i.
2019-03-25 09:54:54 +01:00
Руслан Ижбулатов
c33f9a2769 Inspector: Find themes the same way GtkCSSProvider does
Look for subdirectories named "gtk-3.x", where 'x' starts as current
minor version and counts down to 14, then drops to 0.
Only look for gtk.css in these directories though. If a theme only
provides gtk-dark.css, it won't be found.
2019-03-22 23:31:18 +00:00
Matthias Clasen
17665f06e3 Merge branch 'wip/jimmac/adwaita-selection-checked-buttons' into 'gtk-3-24'
Adwaita: checked buttons workaround

See merge request GNOME/gtk!657
2019-03-20 14:05:23 +00:00
Matthias Clasen
17dc55474b Merge branch 'adwaita-headerbar-switch-margins' into 'gtk-3-24'
Adwaita: Adjust switch margins on headerbars

See merge request GNOME/gtk!650
2019-03-20 14:04:32 +00:00
Jakub Steiner
e60b55626e Adwaita: focus ring radius
- backport from master

fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
2019-03-20 13:40:21 +01:00
Jakub Steiner
e7e31a4835 Adwaita: only tone down image buttons
- Rather than making labeled buttons inside lists toned down,
  only tone down image buttons, so that we don't have to include
  icon-only actions. Places like Software can continue using label
  buttons with no change without having those less visible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1748
2019-03-20 11:31:50 +01:00
Jakub Steiner
c9cfdf7a91 Adwaita: checked buttons workaround
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1642 once and for all

(until it resurfaces)
2019-03-19 17:22:42 +01:00
Alex Monday
430caaa167 Adwaita: Adjust switch margins on headerbars
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
2019-03-19 19:46:00 +05:00
Kristian Rietveld
91f2ad4a2f Bug 743717 - Crashes on clipboard operation, influence by clipboard ...
The problem here was that NSPasteboard would release the clipboard
owner if all data items were transferred. When trying to re-use this
owner at a later point, GTK+ would attempt a retain call on a released
object and crash.

Fix this by not immediately releasing the owner after declaring types,
so by keeping our own reference around.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/529
2019-03-18 14:00:51 -07:00
John Ralls
93bf85e92f [Quartz] Fix some compile warnings in gtkclipboard-quartz.c. 2019-03-18 13:33:40 -07:00
Carlos Garnacho
224a53d97b gtkapplication: Stash DESKTOP_STARTUP_ID on a constructor
It might be too late to do it at GtkApplication::add_platform_data time,
since the envvar may be consumed earlier on if gdk_display_open() happened
to be called before (eg. through gtk_get_option_group(TRUE)).

Stash the envvar in a constructor function, so its ensured to happen before
it can get consumed.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1754
2019-03-18 12:28:48 +01:00
Matthias Clasen
967c5f7f7f Merge branch 'wip/carlosg/include-constructors-header-3-24' into 'gtk-3-24'
gdk: Include copy of glib/gconstructor.h

See merge request GNOME/gtk!643
2019-03-18 01:09:40 +00:00
Carlos Garnacho
05bc2f4dc1 gdk: Include copy of glib/gconstructor.h
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
2019-03-17 21:50:35 +01:00
Matthias Clasen
7b2c731fae entry: Use a better icon for Caps Lock warning
Use the same icon we use in master now.
2019-03-15 18:57:46 -04:00
Matthias Clasen
9e658cb51d Merge branch 'wip/kalev/gtk_window_present-runtime-warnings' into 'gtk-3-24'
window: Undo runtime gtk_window_present deprecation warnings

See merge request GNOME/gtk!632
2019-03-15 00:46:51 +00:00
Руслан Ижбулатов
3fe8b66b3b Fix UAC manifest RC file
CREATEPROCESS_MANIFEST_RESOURCE_ID is a macro defined in winbase.h,
so we need an include to resolve that macro to its value, 1.

Without that it stays as a literal CREATEPROCESS_MANIFEST_RESOURCE_ID,
and ends up in the .exe file as-is, and Windows can't find it by that name,
resulting in UAC manifest not working and gtk-update-icon-cache bringing
up UAC prompt.
2019-03-14 09:24:17 +00:00
Matthias Clasen
67f1113370 Merge branch 'adwaita-remove-selectionmode-assets' into 'gtk-3-24'
Adwaita: Drop checkbox-selectionmode assets

See merge request GNOME/gtk!633
2019-03-14 03:07:19 +00:00
Emmanuele Bassi
7771869ab3 Move the gtkunixprint.h include in the gtk-doc stanza
Every time a new <INCLUDE> directive is used inside a gtk-doc
sections.txt file it overrides the current include header until the next
<INCLUDE> directive. This has the unfortunate effect of making every
single section following the print-related ones to generate
documentation that says to include gtkunixprint.h.

In order to avoid re-arranging the gtk3-sections.txt file, we can tell
gtk-doc what's the default header to include for GTK, and override it
using `@Include` directives directly into the gtk-doc stanzas of the
sections that require a different header.

Fixes: #1746
2019-03-13 17:44:32 +00:00
Alex Monday
1edf11774c Adwaita: Drop checkbox-selectionmode assets 2019-03-13 14:13:42 +05:00
Kalev Lember
a8bbcf33ec window: Undo runtime gtk_window_present deprecation warnings
Now that gtk_window_present is no longer deprecated, remove the runtime
warnings as well.
2019-03-12 21:50:04 +01:00
Matthias Clasen
f88e8ea6fe Undo the gtk_window_present deprecation
It doesn't make sense to have it in 3.x if we don't
have it in master.
2019-03-12 16:25:10 -04:00
Matthias Clasen
e910ee2c19 Merge branch 'control-enter' into 'gtk-3-24'
atk key: Always convert control character events into key names

See merge request GNOME/gtk!630
2019-03-12 18:13:10 +00:00
Samuel Thibault
728f6869cb atk key: Always convert control character events into key names
including when the control modifier is present, i.e. when one is typing
control-I for instance.

Orca would convert them back to the corresponding ASCII letter anyway, and
when pressing control-tab, we do want to pass "tab", not pass "\t" that Orca
would erroneously convert to "control-I".

Fixes #1743
2019-03-12 18:22:36 +01:00
Jakub Steiner
ff6b519286 Merge branch 'monday15/gtk-adwaita-selectionmode-checkboxes2' into gtk-3-24 2019-03-12 17:24:41 +01:00
Alex Monday
a58d7573f6 Adwaita: Fix selection-mode checkboxes
Use object-select-symbolic as a check icon, adjust styles.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/28
2019-03-12 17:24:19 +01:00
John Ralls
942a2dede5 [GtkSearchEngineQuartz]Don't create file paths from NULL. 2019-03-11 17:58:38 -07:00
John Ralls
75b8abbf24 [GtkSearchEngineQuartz] Limit the scope of the Spotlight search.
If the query has a non-null location, set the scope to that directory,
otherwise set it to the local computer.

There is unfortunately no way to get Spotlight to search
non-recursively, nor does NSFileManager offer a convenient search of
the contents of a directory's regular files.
2019-03-11 17:58:38 -07:00
Matthias Clasen
e74622b0b8 Merge branch 'clipboard-quartz' into 'gtk-3-24'
gtkclipboard-quartz: Update annotations for gtk_clipboard_wait_for_targets

See merge request GNOME/gtk!624
2019-03-11 15:13:37 +00:00
Jakub Steiner
e8e2f5163c Merge branch 'adwaita-radii-fixes' into 'gtk-3-24'
Adwaita radii fixes

See merge request GNOME/gtk!619
2019-03-11 10:59:55 +00:00
Tomasz Miąsko
593025a917 gtkclipboard-quartz: Update annotations for gtk_clipboard_wait_for_targets
Copy documentation for gtk_clipboard_wait_for_targets from gtk/gtkclipboard.c
to quartz implementation. Primarily to add transfer container annotation as
otherwise pygobject tries to deallocate individual GdkAtoms.

Issue #1584.
2019-03-10 20:54:46 +01:00
Matthias Clasen
31a33593cd Merge branch 'adwaita-fix-backdrop-label' into 'gtk-3-24'
Adwaita: Fix label color on backdrop devel window

See merge request GNOME/gtk!623
2019-03-10 01:04:44 +00:00
Alex Monday
22d9241ab4 Adwaita: Fix label color on backdrop devel window
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1734
2019-03-10 00:52:48 +05:00
Matthias Clasen
54899a369e Merge branch 'adwaita-typo-fix' into 'gtk-3-24'
Adwaita: Fix typo (missing comma)

See merge request GNOME/gtk!617
2019-03-04 17:35:55 +00:00
Alex Monday
1d960d7028 Adwaita: Adjust entry border-radius
Replace entry border-radius value with $button_radius variable.
2019-03-04 22:25:37 +05:00
Alex Monday
44fcc0435c Adwaita: Replace spinbutton border-radii with variables
Replace hardcoded border-radius values with $button_radius
variable on spinbuttons.
2019-03-04 22:25:11 +05:00
Alex Monday
625a0e3d6c Adwaita: Replace all %linked radii with variables
Some of hardcoded border-radius values on linked elements were left
unchanged during Adwaita refresh.
2019-03-04 22:24:20 +05:00
Alex Monday
0b61d6f6ae Adwaita: Fix typo (missing comma)
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1713
2019-03-04 20:30:43 +05:00
Benjamin Otte
28ea04efca Merge branch 'treeview-separator-fix-drawing-zero-height' into 'gtk-3-24'
treeview: make sure separator nodes have a height > 0

See merge request GNOME/gtk!614
2019-03-04 12:22:42 +00:00
Emmanuele Bassi
c830ab2d55 Merge branch 'master' into 'master'
A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells

See merge request GNOME/gtk!505

(cherry picked from commit 95c0f07295)

a52431d2 A11y: export gtk_cell_accessible_parent_get_(row|column)_header_cells
2019-03-03 20:22:09 +00:00
Christoph Reiter
af6dd6bf35 treeview: make sure separator nodes have a height > 0
In case the theme doesn't set a height/min-height for the treeview
separator the treeview drawing gets confused and draws rows on top of each
other depending on the redraw area.

This is due to gtk_tree_view_get_row_height() assuming that a node with a
height <= 0 is not set and not a separator and it will default to the
expander size.

Ideally gtk_tree_view_get_row_height() would know if it operates on a separator,
but there are too many calls/levels, so just make sure the separator height
is at least 1 (Adwaita already sets "min-height: 2px", so no change there)
2019-03-03 10:44:52 +01:00
Alex Monday
deba92f729 themes: Optimize code for marks margins on scales
Separate marks margins for horizontal/vertical scales. Prevents
generation of unused margins.

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1703
2019-03-02 14:20:02 +05:00
Jakub Steiner
2cd62574ac Adwaita: define insensitive links
- tone down the disabled/insensitive links.

Fixes issue #1645
2019-02-27 12:10:56 +01:00
Jakub Steiner
1a91c953eb Adwaita: scrolled context menus
- fix margins as per merg request #547
2019-02-27 11:45:27 +01:00
Martin Blanchard
d6840ad3dd menu: Fix accel-group property reset
GtkMenu's "accel-group" property setter, gtk_menu_set_accel_group(),
currently returns in failure if the caller passes it a NULL `accel_group`
argument. This argument is annotated with `(allow-none)`. This patch
add support for the NULL case.
2019-02-23 10:42:23 +00:00
Bastien Nocera
8ed0471785 window: Warn when gtk_window_present_with_time() is passed 0
When 0 or GDK_CURRENT_TIME is passed to gtk_window_present_with_time(),
print a warning so that the application developer knows that this isn't
a supported use of the function, but carry on working for now.
2019-02-22 18:38:13 -05:00
Bastien Nocera
5d7183ee0c all: Don't warn about deprecated gtk_window_present usage
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-22 18:38:11 -05:00
Bastien Nocera
2ca4a3cb41 window: Deprecate gtk_window_present()
And expect gtk_window_present_with_time() to be used instead.
2019-02-22 18:34:24 -05:00
Jakub Steiner
864e1ca526 Adwaita: circles for .circular buttons
- doesn't catch all cases, but most buttons need uniform paddings
  to remain circular, not elliptical.

fixes issue #1695
2019-02-22 12:35:32 +01:00
Emmanuele Bassi
2934482aee treeview: Don't show empty tooltips
If the column used for the GtkTreeView:tooltip-column contains NULL
we're already skipping a tooltip; let's ignore empty strings as well,
as an empty tooltip is pretty much pointless.

Close #1681
2019-02-18 17:44:17 +00:00
Emmanuele Bassi
6058495f50 Use C locale when building gtktypefuncs.c
We're using [a-z] ranges with sed and grep, and POSIX does not specify
their behaviour in non-ASCII locales:

  In the POSIX locale, a range expression represents the set of
  collating elements that fall between two elements in the collation
  sequence, inclusive. In other locales, a range expression has
  unspecified behavior
    -- IEEE Std 1003.1-2017, § 9.3.5 (7)

This can lead to no results, or invalid replacements, which in turn can
lead to broken builds or broken build artifacts.

Fixes: #1662
2019-02-14 17:06:49 +00:00
Jakub Steiner
03394c559d Adwaita: lost selectionmode resources
- somehow we lost the selection mode image resources
- FIXME: checkbox-active-selectionmode is not being used.
2019-02-08 15:53:00 +01:00
Jonas Ådahl
57300b4960 menu: Fixate size calculated by gdk_window_move_to_rect()
When we receive a size from the move-to-rect implementation, force GTK
to continue using that size until reconfigured by move-to-rect, or
when remapped.

Fixes: #1651
2019-02-07 10:01:05 +01:00
Jonas Ådahl
7298e73c44 menu: Force recalculation of size before positioning
On X11, the position of the menu is calculated synchronously by
gdk_window_move_to_rect(). This means that calculating the window size
when showing is too late, as that'd mean the size used when calculating
the position is out-of-date. The first time a menu is mapped, however,
the size is calculated during realization; but a window is only realized
once, so it doesn't work for subsequent maps.

Currently, this is harmless, as a GtkMenu can change its size however it
wants after it has been mapped. This, however, is problematic, as it
means the position calculated by gdk_window_move_to_rect() might no
longer be valid, or constraints made by the same function might no
longer be respected.

Thus, this is a preparation for making GtkMenu popups stay the same size
until they are remapped again at a later point.
2019-02-07 10:01:05 +01:00
Jonas Ådahl
461f5fde03 window: Add private API to force-resize
Sometimes (read for GtkMenu on X11) it's not enough to resize on show,
and relying on the size to be calculated on realization only works the
first time a menu is popped up, so add an API that GtkMenu can use to
ensure the size of a menu is "refreshed" before passing anything along
to gdk_window_move_to_rect().
2019-02-07 10:01:05 +01:00
Jonas Ådahl
edb57a9202 window: Add private API to fixate size
This causes window size guessing to always use the remembered size (the
size of the GdkWindow). This will be useful for menus which size is
managed by gdk_window_move_to_rect(), to avoid overriding the size
calculated by the move-to-rect implementation.
2019-02-06 19:34:20 +01:00
Emmanuele Bassi
43980583e3 sw: Do not cast clear function in g_clear_pointer()
We don't need to do it, since g_clear_pointer() will do it for us, and
will also check if the function conforms to a GDestroyNotify. Using an
explicit cast will generate a compiler warning.
2019-02-05 15:35:27 +01:00
Emmanuele Bassi
eb732b3f68 container: Disable deprecation warnings
We know we're using deprecated GtkContainer API, because we're
implementing it.
2019-02-05 15:23:09 +01:00
Emmanuele Bassi
c2ddb932b2 popover: Disable deprecation warning
For gtk_render_frame_gap().
2019-02-05 15:22:06 +01:00
Emmanuele Bassi
d9d3ec7cad menu: Fix condition check
A logical "and" became a binary "and" in commit c35878ec.
2019-02-05 15:18:41 +01:00
Jakub Steiner
224213dad6 Adwaita: selection mode buttons fix
- don't allow the headerbar :active darkening (bug #1588) to override
  selection-mode blue buttons.

Fixes issue #1642
2019-02-04 17:24:55 +01:00
Alex Monday
7c325ed852 HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-02-04 15:08:07 +01:00
Alex Monday
950480cea4 HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-02-04 15:07:56 +01:00
Jakub Steiner
57ba052522 Revert "HighContrast: Add style for overflow buttons"
This reverts commit ff4dcf5fa4.
2019-02-04 15:05:43 +01:00
Jakub Steiner
af3bcc6adc Revert "HighContrast: Add menu padding"
Revert conflicting patches to rebase adwaita-3-32 easily. will apply afterwards.

This reverts commit a7ea8248ce.
2019-02-04 15:05:43 +01:00
Matthias Clasen
ffa8fef2fa gtk: Stop using deprecated pango api 2019-02-04 15:05:43 +01:00
Matthias Clasen
13c126b277 gtk: Add a copy of some deprecated pango api
We use pango_find_base_dir() in a few places, and
this api has been deprecated.
2019-02-04 15:05:43 +01:00
Alex Monday
806e98d67e HighContrast: Add style for overflow buttons
Add missing style for overflow buttons located on scrollable dropdown
menus.
2019-02-04 15:05:43 +01:00
Alex Monday
377b2872be HighContrast: Add menu padding
Add 1px padding to menus, to prevent menuitems and overflow buttons
overlapping with menu's border.
2019-02-04 15:05:43 +01:00
Emmanuele Bassi
e28c7a41ee switch: Take gadget clip into account
Now that we've switched the on and off states to gadgets, we need to
ensure that the widget's clip take into account the clip of every
gadget.

Fixes #1631
2019-02-04 15:05:43 +01:00
Alex Monday
933765204f Adwaita: Horizontal OSD spinbutton entry fix
Add placeholder to hande horizontal spinbutton entries,
add instructions for horizontal OSD spinbutton entry to use this
placeholder.
2019-02-04 15:05:43 +01:00
Alex Monday
7395160e5b Adwaita: Improve dropdown menu buttons
Improve overflow arrow buttons drawing on a scrollable dropdown menu:
reduce top button's margin-top to match size of a bottom button, add
margin-top for bottom button to compensate bottom margin (otherwise
button overlaps with menu content).

Closes https://gitlab.gnome.org/GNOME/gtk/issues/1539
2019-01-31 16:42:32 +01:00
Jakub Steiner
b522c59880 Adwaita: switches with no labels
- it's less busy and still clearer without the label
- It may be right that color alone is a poor differentiator,
  but labels do still exist for the accessible theme.
2019-01-28 12:34:48 +01:00
Jakub Steiner
519ff2ac6a Merge branch 'fix-button-icon-position' into 'wip/jimmac/adwaita-3-32'
Adwaita: Fix wrong icon position in some buttons

See merge request GNOME/gtk!533
2019-01-28 11:57:42 +01:00
Jakub Steiner
6f1e611c3b Merge branch 'wip/jimmac/adwaita-3-32' into 'fix-button-icon-position'
# Conflicts:
#   gtk/theme/Adwaita/_common.scss
#   gtk/theme/Adwaita/gtk-contained-dark.css
#   gtk/theme/Adwaita/gtk-contained.css
2019-01-28 10:46:48 +00:00
Sam Hewitt
17ab084f28 Adwaita: fix padding and rounding on menubar submenus 2019-01-28 11:43:54 +01:00
Jakub Steiner
4d08be5d03 Adwaita: selection mode labels
- when not in focus, make sure labels are legible
  but flat.

Fixes issue #1562
2019-01-28 11:43:54 +01:00
Jakub Steiner
b6082efdc0 Adwaita: use neutral greys for dark
- the hint of warm color is too subtle to even notice for most people

Fixes issue #1589
2019-01-28 11:43:54 +01:00
Jakub Steiner
aa1e565fb5 Adwaita: darken dark mode
- match lightness of the old theme.

Fixes issue #1605
2019-01-28 11:43:54 +01:00
feichtmeier
fec7874d0e Reduce vertical menu padding from 8px to 4px 2019-01-28 11:43:54 +01:00
Jakub Steiner
72010d7894 Adwaita: do show labels on switches
- now that we have I/O and not ON/OFF
2019-01-28 11:43:54 +01:00
Jakub Steiner
25bf546eee Adwaita: headerbar buttons separators
- make the border more aparent for when two :active buttons
  are neighboring (Builder panel toggles).
2019-01-28 11:43:54 +01:00
Jakub Steiner
24e6995d92 Adwaita: headerbar togglebuttons backdrop
- redefine overriden backdrop state
2019-01-28 11:43:54 +01:00
Jakub Steiner
079aef0b8d Adwaita: expand the headerbar button styling
- it's not just stackswitcher buttons, apparently. Builder uses
  togglebuttons.
2019-01-28 11:43:54 +01:00
Jakub Steiner
7da52e5255 Adwaita: don't do undershoot
- No need to indicate overflown content. No other OS does this.

fixes #1591
2019-01-28 11:43:54 +01:00
Jakub Steiner
568ea3b7f9 Adwaita: update image assets
- mainly sliders

fixes #1590
2019-01-28 11:43:54 +01:00
Jakub Steiner
0f764eb16e Adwaita: make switcher buttons' active darker
- create more contrast against the headerbar background without lowering
  contrast with the label and border.
- top border shaded for extra aid of the state being pressed (in the two button   scenatio)

Addesses issue #1588
2019-01-28 11:43:54 +01:00
Jakub Steiner
de1f87b1f4 Adwaita: tone down the window roundounding 2019-01-28 11:43:54 +01:00
Jakub Steiner
86acf52032 Adwaita: button-alt toning down
- checkboxes and radios were too 3d
2019-01-28 11:43:54 +01:00
Jakub Steiner
c514cf75e4 Adwaita: darker active state for buttons 2019-01-28 11:43:54 +01:00
Jakub Steiner
5c67d7d7b1 Adwaita: selection dropdown vcentering
- somewhat odd off-center vertical centering on the selection
  filter popover
2019-01-28 11:43:54 +01:00
Jakub Steiner
5a7fc7e352 Adwaita: remove chin from circular buttons
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:54 +01:00
Jakub Steiner
3b81932981 Adwaita: colored/darker button tweaks
- less contrasty border on colored buttons
- tone down edge highlight on darker buttons

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:54 +01:00
Jakub Steiner
71cfb8e077 Adwaita: rounding of popovers
- you give Tobias a finger and he grbs the whole arm

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
37c47d70f6 Adwaita: no hardsh bottom shading
- felt like an inset shadow in some situations

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
0e95206697 Adwaita: non-square buttons rejiggle
- rather than squishing vertically, stretch horizontally.
  The previous method made some non-button widgets odd looking.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
99a48fe7e7 Adwaita: headerbar radius
- last occurence of window border radius, I swear :)

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
60230b4653 Adwaita: window radius
- found the lapo magic to fix the non-csd corner anti-aliasing
- csd headerbars to do

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
9b820cde49 Adwaita: a *hair* lighter shadows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
15bd30d222 Adwaita: move button shadows down a pixel
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
8d205fd518 Adwaita: slightly larger radius for windows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
b06712d3c9 Adwaita: modals also need the rame rounding
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
83a45d3bb0 Adwaita: increase window radius
- to match the button radius, increase the windwo border radius

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
aa1593505d Adwaita: no 'chin' for buttons
- box-shadow doesn't mix with the chin

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
501bce47ea Adwaita: buttons cast a shadow
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
585569f66e Adwaita: squash buttons as per reqs
- not a big fan of this one

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
5541152724 Adwaita: hide close separator
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
1c5071c346 Adwaita: round buttons
- Grumpy old man commits the first thing he dislikes on
  Allan's proposal.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-28 11:43:53 +01:00
Jakub Steiner
7e623b4f12 Adwaita: GNOME 3.32 changes
- colorsheme based on the new icon HIG color palette
- new switches
- darker headerbar to contrast with unfocused windows
- raised buttons derived from the icon style
2019-01-28 11:43:53 +01:00
Matthias Clasen
80b5024239 switch: Update the .symbolic.png icon too
Regenerate switch-off-symbolic.symbolic.png from switch-off-symbolic.svg.
2019-01-25 15:27:45 -05:00
Jakub Steiner
f900087f30 switch: fix off icon shape
- the recoloring would only work on rects and paths
2019-01-25 20:21:57 +01:00
nana-4
d82edf0c91 Adwaita: Fix wrong icon position in some buttons
This commit reverts min-width sizes and changes horizontal padding instead in
order to avoid off-centered button icons.

Fixes #1621
2019-01-25 21:02:47 +09:00
Matthias Clasen
75a4ae2aba switch: use icons
Use the newly added icons.
2019-01-24 20:15:47 -05:00
Matthias Clasen
9fe0ef42a1 Add switch icons
These will be used in GtkSwitch in the future.
2019-01-24 17:47:28 -05:00
Sam Hewitt
cde6ae938e Adwaita: fix padding and rounding on menubar submenus 2019-01-24 11:32:25 -05:00
Matthias Clasen
6a4ce55a69 switch: Avoid problems with glyph availability
If none of the glyphs we want are available, fall
back to using empty strings here, rather than causing
critical warnings.
2019-01-23 12:04:08 -05:00
Iain Lane
882c81dab2 Fix -Wincompatible-pointer-types warnings 2019-01-23 12:18:18 +00:00
Jakub Steiner
e7d7cb580e Adwaita: selection mode labels
- when not in focus, make sure labels are legible
  but flat.

Fixes issue #1562
2019-01-22 12:15:47 +01:00
Jakub Steiner
f2c3481b5c Adwaita: use neutral greys for dark
- the hint of warm color is too subtle to even notice for most people

Fixes issue #1589
2019-01-22 11:59:40 +01:00
Jakub Steiner
393a016c5a Adwaita: darken dark mode
- match lightness of the old theme.

Fixes issue #1605
2019-01-22 11:55:10 +01:00
Jakub Steiner
1f9ee936e8 Merge branch 'Menus_based_on_wip/jimmac/adwaita-3-32' into 'wip/jimmac/adwaita-3-32'
Reduce vertical menu padding from 8px to 4px

See merge request GNOME/gtk!520
2019-01-21 21:24:44 +01:00
feichtmeier
254719ee50 Reduce vertical menu padding from 8px to 4px 2019-01-21 20:31:19 +01:00
Jakub Steiner
dc144d1266 Adwaita: do show labels on switches
- now that we have I/O and not ON/OFF
2019-01-21 19:34:33 +01:00
Jakub Steiner
c82d6f9872 Adwaita: headerbar buttons separators
- make the border more aparent for when two :active buttons
  are neighboring (Builder panel toggles).
2019-01-21 13:16:42 -05:00
Jakub Steiner
6ff9e5ab7d Adwaita: headerbar togglebuttons backdrop
- redefine overriden backdrop state
2019-01-21 13:16:42 -05:00
Jakub Steiner
b8d142f8b8 Adwaita: expand the headerbar button styling
- it's not just stackswitcher buttons, apparently. Builder uses
  togglebuttons.
2019-01-21 13:16:42 -05:00
Jakub Steiner
e66c0a45d4 Adwaita: don't do undershoot
- No need to indicate overflown content. No other OS does this.

fixes #1591
2019-01-21 13:16:42 -05:00
Jakub Steiner
83dcdaa402 Adwaita: update image assets
- mainly sliders

fixes #1590
2019-01-21 13:16:42 -05:00
Jakub Steiner
091b189ce3 Adwaita: make switcher buttons' active darker
- create more contrast against the headerbar background without lowering
  contrast with the label and border.
- top border shaded for extra aid of the state being pressed (in the two button   scenatio)

Addesses issue #1588
2019-01-21 13:16:42 -05:00
Jakub Steiner
0fc284bf61 Adwaita: tone down the window roundounding 2019-01-21 13:16:42 -05:00
Jakub Steiner
e51f08bda0 Adwaita: button-alt toning down
- checkboxes and radios were too 3d
2019-01-21 13:16:42 -05:00
Jakub Steiner
1efa376b83 Adwaita: darker active state for buttons 2019-01-21 13:16:42 -05:00
Jakub Steiner
6d391b89b8 Adwaita: selection dropdown vcentering
- somewhat odd off-center vertical centering on the selection
  filter popover
2019-01-21 13:16:42 -05:00
Jakub Steiner
4300a5c609 Adwaita: remove chin from circular buttons
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
914813c44a Adwaita: colored/darker button tweaks
- less contrasty border on colored buttons
- tone down edge highlight on darker buttons

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
c529de1765 Adwaita: rounding of popovers
- you give Tobias a finger and he grbs the whole arm

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
71a97accf2 Adwaita: no hardsh bottom shading
- felt like an inset shadow in some situations

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
7a51da1e69 Adwaita: non-square buttons rejiggle
- rather than squishing vertically, stretch horizontally.
  The previous method made some non-button widgets odd looking.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
2badd5f45a Adwaita: headerbar radius
- last occurence of window border radius, I swear :)

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
92ebd74101 Adwaita: window radius
- found the lapo magic to fix the non-csd corner anti-aliasing
- csd headerbars to do

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:42 -05:00
Jakub Steiner
df40f2cc2b Adwaita: a *hair* lighter shadows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
2dd73b7f76 Adwaita: move button shadows down a pixel
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
034103b078 Adwaita: slightly larger radius for windows
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
9f885ba16c Adwaita: modals also need the rame rounding
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
d5fcc8d522 Adwaita: increase window radius
- to match the button radius, increase the windwo border radius

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
213aeffd62 Adwaita: no 'chin' for buttons
- box-shadow doesn't mix with the chin

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
25148ac344 Adwaita: buttons cast a shadow
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
8fc57f144c Adwaita: squash buttons as per reqs
- not a big fan of this one

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
8a7023fe33 Adwaita: hide close separator
https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
6ef7c2ef29 Adwaita: round buttons
- Grumpy old man commits the first thing he dislikes on
  Allan's proposal.

https://gitlab.gnome.org/GNOME/gtk/issues/1510
2019-01-21 13:16:41 -05:00
Jakub Steiner
3fa0e4b0be Adwaita: GNOME 3.32 changes
- colorsheme based on the new icon HIG color palette
- new switches
- darker headerbar to contrast with unfocused windows
- raised buttons derived from the icon style
2019-01-21 13:16:41 -05:00
Jakub Steiner
f7df4853e8 Merge branch 'wip/dboles/spinbutton-button-backdrop-disabled-3' into 'gtk-3-24'
SpinButton: Fix wrong background/icon colours in button:backdrop:disabled

See merge request GNOME/gtk!489
2019-01-21 13:57:43 +00:00
Matthias Clasen
b984074e29 Merge branch 'mcatanzaro/#1492' into 'gtk-3-24'
filechoosernative: Implement gtk_file_chooser_set_filter()

See merge request GNOME/gtk!435
2019-01-19 00:54:15 +00:00
Matthias Clasen
e2d9563a55 Merge branch 'wip/long-combo-boxes' into 'gtk-3-24'
Fix long combo box positioning

See merge request GNOME/gtk!514
2019-01-18 22:42:04 +00:00
Chun-wei Fan
5ffbeeff91 MSVC builds: Improve introspection build process
To avoid confusion, have the NMake Makefiles output the built introspection
files in the same location where the binaries are built for the project
files, according to the Visual Studio version, platform and configuration
where the build is carried out.

Also make generating the introspection NMake snippet portion more robust to
source additions and removals by checking on Makefile changes too.
2019-01-18 16:25:49 +08:00
Jonas Ådahl
c35878ecf1 menu: Adapt scroll offset if arrow is shown
When a popup is placed using move_to_rect(), it'll get feedback about
the position and size it got assigned. We use this feedback to update
the scroll offset, but while doing so, if the visibility of the arrow
changed, we didn't adapt the offset accordingly.

Fix this by offsetting the provided offset by the height of the arrow,
if it was made visible as a side effect of the scroll offset change
triggered by the feedback.

Related: mutter#105
Closes: #1463
2019-01-17 19:30:31 +01:00
Jonas Ådahl
3e586a82e6 menu: Force resize when remapping
A menu will be clamped to the work area as a side effect of the
move_to_rect() logic if the resize anchor flags was set. For it to work
a second time, the initial size needs to be the actual menu size before
being clamped again. Achieve this by forcing a size recalculation before
showing the menu.
2019-01-17 19:23:21 +01:00
Jonas Ådahl
00486efd51 menu: Don't constrain initial menu size
Don't constrain the initial menu size by the work area of some monitor;
instead let the move_to_rect() logic in the backend do the constraining.
This fixes two things:

1) The anchor delta provided to the backend will not be invalid. The
delta is calculated by looking at the active menu item, calculating the
offset given that, but since we clamped the window size before showing
the window, the delta became invalid. This caused visible issues when
the delta was large enough to make the initially calculated popup window
geometry to be placed outside the geometry of the parent window, which
is a violation of the Wayland protocol.

2) The scroll offset to be correct when receiving the positioning
feedback. While the scroll offset was based on the pre-clamped window
size, the feedback, which was used to calculate the new offset, was not,
causing the scroll offset to be clamped as well.
2019-01-17 19:14:37 +01:00
Michael Catanzaro
c0a0bfd388 filechoosernativeportal: stuff the current filter into options
We need to tell the portal what filter is supposed to be selected by
default, or it will just pick the first one, which could be wrong and
annoying.

This will require updated xdg-desktop-portal and xdg-desktop-portal-gtk
to work properly.

Fixes #1492
2019-01-16 17:45:44 -06:00
Matthias Clasen
ab748d05f0 about dialog: Use ::activate-link for license
This should behave the same as all the other links
in this dialog.

Closes: #1561
2019-01-15 23:16:16 -05:00
Emmanuele Bassi
ed39721aa7 Add fallbacks for GtkSwitch state labels
While the IEC power symbols have been part of Unicode since version 9.0,
released in 2016, not every font supports them.

We can use the old symbols as a fallback, as they seem to have the
better coverage, if not the best appearance.
2019-01-15 15:22:09 +00:00
Michael Catanzaro
3307944746 filechoosernativeportal: remove redundant casts
We are casting from GtkFileChooserNative to... GtkFileChooserNative.
Boo.
2019-01-14 20:53:19 -06:00
Michael Catanzaro
a136cbae8f filechoosernative: forward current_filter to delegate dialog
gtk_file_chooser_set_filter() doesn't work for GtkFileChooserNative. The
code forwards added and removed filters to the delegate dialog, but
doesn't do anything to set the selected one, so the wrong one gets
chosen. So fix that.

This only fixes the fallback dialog. The portal will be fixed in a
subsequent commit.

Partial fix for #1492
2019-01-14 20:07:01 -06:00
Matthias Clasen
da3100e99c Revert a non-working addition
Cell rendererers don't support <style> in ui files.
2019-01-13 22:06:51 -05:00
John Ralls
3c49c593f5 [GtkSearchEngineQuartz] Don't run off the end of the results array and crash. 2019-01-11 16:18:45 -08:00
Emmanuele Bassi
796e884c3f Use power symbols for GtkSwitch labels
Both the "on" and "off" IEC states have a corresponding Unicode glyph,
starting from Unicode 9.0.
2019-01-11 15:08:58 +00:00
Timm Bäder
ca583836d9 Merge branch 'wip/muktupavels/listbox' into 'gtk-3-24'
listbox: set selected_row before emitting signal

See merge request GNOME/gtk!479
2019-01-11 11:38:19 +00:00
Matthias Clasen
325b968567 Merge branch 'io-switch' into 'gtk-3-24'
switch: Always use I/O

See merge request GNOME/gtk!501
2019-01-10 22:23:03 +00:00
Matthias Clasen
45ee476e36 switch: Always use I/O
This allows for smaller switches, and goes better with
modern themes that have round switches.
2019-01-10 16:58:16 -05:00
Mohammed Sadiq
e7eec51772 gtkpopover: Fix popover when parent widget is partially visible
fixes https://gitlab.gnome.org/GNOME/gtk/issues/750
2019-01-09 17:08:40 +05:30
Matthias Clasen
d79de8657b Merge branch 'wip/jimmac/app-icon-helpers' into 'gtk-3-24'
Theme: add helper class names for Adwaita

See merge request GNOME/gtk!449
2019-01-08 01:26:58 +00:00
Matthias Clasen
c8f91c3f2d Document icon helper style classes 2019-01-07 20:20:23 -05:00
Michael Catanzaro
65311c8439 Revert "Revealer: Don’t (under)allocate child if not shown"
This reverts commit d179b0667d.

This broke the downloads popover in Epiphany. See #1057.
2019-01-07 18:20:01 -06:00
Daniel Boles
105dd5eda0 searchenginequartz: Fix naming of Beagle @ comment
As funny as that is, it's not very instructive. :P

https://gitlab.gnome.org/GNOME/gtk/merge_requests/490#note_400993
2019-01-07 20:35:40 +00:00
Matthias Clasen
9d1f751ead Merge branch 'issue1507-bis' into 'gtk-3-24'
a11y: Check display in `*grab_cell_focus()`

See merge request GNOME/gtk!457
2019-01-07 20:30:08 +00:00
Matthias Clasen
db4bd97732 Merge branch 'wip/carlosg/flowbox-late-claim' into 'gtk-3-24'
flowbox: Accept multipress gesture late

See merge request GNOME/gtk!480
2019-01-07 20:26:23 +00:00
Matthias Clasen
4fe28ba02a Merge branch 'gtk-3-24' into 'gtk-3-24'
GtkSearchEngineQuartz Fixes

See merge request GNOME/gtk!490
2019-01-07 20:24:48 +00:00
Christian Hergert
ebcb0ea2a8 eventcontrollermotion: translate event to widget coordinates
When creating the motion controller, we know the widget that is of interest
based on gtk_event_controller_motion_new(). However, not all incoming
events are guaranteed to be of the GdkWindow associated to that widget.
They may also be for a descendant. Therefore, it is useful to translate
those coordinates into the target widget coordinate space as that is
likely what they care about.
2019-01-07 11:49:19 -08:00
John Ralls
ad9fd969de [GtkSearchEngineQuartz] Limit the returned hits.
When the result set is larger than the limit.
2019-01-06 16:19:49 -08:00
Daniel Boles
ae8be92437 [GtkSearchEngineQuartz] Resolve the path to a GtkFile* for the hit list.
Instead of a char* path, which the search_hit parser doesn't expect,
causing a crash.

Closes: $https://gitlab.gnome.org/GNOME/gtk/issues/815
2019-01-06 15:56:57 -08:00
Daniel Boles
d1b14a7deb HC: Fix fgcolor of backdrop:disabled spinbutton +-
We shouldn't give the icons here the same fg colour as the bg... which
makes them disappear and the buttons look like meaningless flat squares.

Fix by just using the same colour the same as foreground disabled. Note:
insensitive_fg_color is more prominent than !disabled, so clearly wrong.
2019-01-06 20:03:44 +00:00
Daniel Boles
6eb1be27f7 Adwaita: Fix bg of backdrop:disabled spinbutton +-
The +/- buttons are meant to be transparent, showing the base_color,
but when backdropped they were picking up background-image from the base
button, meaning they suddenly became more like theme_bg_color instead,
and jumped out of the spinbutton when in backdrop unlike the rest of it.
This looks strange and achieves nothing (especially not indicating that
they are disabled, which is already served fine by their dim fg colour).

Fix this by explicitly saying we don't want any background-image there.
2019-01-06 20:03:35 +00:00
Matthias Clasen
4eee51b0e5 Check for the session bus before using it
Patch by Chris Allen, #475
2019-01-02 20:38:18 -05:00
Matthias Clasen
06ffbb2a22 Merge branch 'wip/nbenitezl/move-bookmark-placeholder-index-3' into 'gtk-3-24'
gtkplacessidebar.c: move bookmark at the placeholder index

See merge request GNOME/gtk!458
2019-01-03 01:28:34 +00:00
Orivej Desh
f6bc2415ab Zero-fill new GtkTextIter
iter_init_common() is used on uninitialized GtkTextIter, and since neither it
nor its callers initiliaze its padding fields, they contain garbage.

This is a problem for Go - which checks that structs passed to C functions do
not contain pointers to Go-allocated memory - when the garbage happens to be
such a pointer.  Although Go zero-fills all GtkTextIter that it allocates, this
does not help when GTK functions such as insert_pixbuf_or_widget_segment called
for gtk_text_buffer_create_child_anchor copy garbage from their stack-allocated
GtkTextIter into a clean iter.  To work around this a GtkTextIter has to be
discraded after use in text buffer anchor inserting functions:
https://github.com/gotk3/gotk3/pull/307
2019-01-02 20:05:10 -05:00
Carlos Garnacho
c4949aef09 flowbox: Accept multipress gesture late
So it's able to operate properly with the DnD gesture set by
gtk_drag_source_set(). We usually just react on button release,
that's the right time to claim the gesture.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1557
2019-01-02 21:09:53 +01:00
Timm Bäder
dea38f0222 Merge branch 'wip/carlosg/revealer-fix-interrupted-animations' into 'gtk-3-24'
revealer: Fully set the target state if unmapped during animation

See merge request GNOME/gtk!465
2019-01-02 08:50:36 +00:00
Alberts Muktupāvels
4ff4809ede listbox: set selected_row before emitting signal
Signal emittion was added in 6f857f87dc commit and it seems that
this is only place where selected_row is set after emitting signal.

Because of this gtk_list_box_get_selected_row currently returns NULL
as selected row if selection mode is set to GTK_SELECTION_BROWSE.
2019-01-02 01:14:17 +02:00
Daniel Boles
63e0eb5de5 Fix 'Fix "A11y: Add support for AtkTableCell"'...
...since one of the "fixes" there was wrong, at least cosmetically:
.get_position() is declared as returning a gboolean, which is in fact an
int in practice, but we should say what we mean, like we already did.
2018-12-30 18:11:50 +00:00
Chun-wei Fan
c876c74eb7 Fix "A11y: Add support for AtkTableCell"
Make sure that the return types of the vfuncs match the ones that are
specified for post-atk-2.11.x AtkTableCellIface, since we already
require atk-2.15.1 and later.
2018-12-26 12:17:20 +08:00
Tomasz Miąsko
d3b6d16d85 Annotate values of PRIORITY constants
g-ir-scanner incorrectly evaluates macro definition that include
references to other macro definitions. Provide a correct value as an
annotation.

Differences in generated gir files:

```diff
@@ -19017 +19017 @@
-    <constant name="PRIORITY_REDRAW" value="20" c:type="GDK_PRIORITY_REDRAW">
+    <constant name="PRIORITY_REDRAW" value="120" c:type="GDK_PRIORITY_REDRAW">
@@ -74229,3 +74229,3 @@
     </constant>
-    <constant name="PRIORITY_RESIZE" value="10" c:type="GTK_PRIORITY_RESIZE">
+    <constant name="PRIORITY_RESIZE" value="110" c:type="GTK_PRIORITY_RESIZE">
       <doc xml:space="preserve">Use this priority for functionality related to size allocation.
@@ -106786,3 +106786,3 @@
     <constant name="TEXT_VIEW_PRIORITY_VALIDATE"
-              value="5"
+              value="125"
               c:type="GTK_TEXT_VIEW_PRIORITY_VALIDATE">
```
2018-12-22 13:17:58 +01:00
Timm Bäder
b69aae4ab3 Merge branch 'cherry-pick-5b049364' into 'gtk-3-24'
Merge branch 'fix-polygon-svg-recolor' into 'master'

See merge request GNOME/gtk!468
2018-12-22 09:10:49 +00:00
Christoph Reiter
ea518ec2f5 Merge branch 'fix-typo-win32-compilation-speedup-macro' into 'gtk-3-24'
Win32: Fix typo on compilation speedup macro define

See merge request GNOME/gtk!470
2018-12-22 07:13:31 +00:00
Luca Bacci
a9d7d41b59 Win32: Fix typo on compilation speedup macro define
There is a typo, the correct macro to define is WIN32_LEAN_AND_MEAN.
After this change <shellapi.h> must be included in order to use
ExtractIconExW().
2018-12-22 00:48:10 +01:00
Matthias Clasen
b283b0b910 Merge branch 'fix-polygon-svg-recolor' into 'master'
icontheme: Recolor <polygon> elements in SVGs too

See merge request GNOME/gtk!443

(cherry picked from commit 5b049364dc)

284d9093 icontheme: Recolor <polygon> elements in SVGs too
2018-12-20 03:01:36 +00:00
Mike Gorse
e9f527b328 A11y: Add support for AtkTableCell 2018-12-19 21:09:59 -05:00
Carlos Garnacho
32ad0ffa0f revealer: Fully set the target state if unmapped during animation
If the revealer is told do animate and then unrealize itself, we do
(correctly) stop the animation, but used to do a shortcut where we
just set the target state as current.

Other things are dependent on the animation properly finishing though,
like the contained widget child visibility. This may lead to inconsistent
state where gtk_revealer_get_child_revealed() returns TRUE but the child
widget is unmapped, or vice-versa.

Fully finish the animation here, so the child state is coherent the next
time the revealer is mapped. We can also skip notifying on the property
since it will be handled by gtk_revealer_set_position().

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/issues/316
2018-12-19 19:37:42 +01:00
Daniel Boles
d179b0667d Revealer: Don’t (under)allocate child if not shown
If the child is not (partly) revealed, don’t allocate it, or we spam the
console with warnings about giving negative width to children’s gadgets.
We can check :child-visible, which is FALSE if (current&target)_pos == 0

Close https://gitlab.gnome.org/GNOME/gtk/issues/1057
2018-12-18 21:00:08 +00:00
Nelson Benítez León
f7eb7efeb5 gtkplacessidebar.c: move bookmark at the placeholder index
As that index is set in drag_motion_callback() and visually shown
on the widget as a drop target hint.

https://bugzilla.gnome.org/show_bug.cgi?id=787356
https://gitlab.gnome.org/GNOME/gtk/issues/904
2018-12-17 19:17:17 +00:00
Olivier Fourdan
e91197a37f a11y: Check display in *grab_cell_focus()
Calling the accessibility function `grab_focus()` on a `GtkCell` under
Wayland will cause the client to crash.

This is another case of `gdk_x11_get_server_time()` being called
regardless of the actual windowing backend used.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1507
2018-12-17 14:17:54 +01:00
Daniel Boles
112645edf2 EventControllerKey: Add missing docs from master
These never got backported, meaning a pretty useless documentation page.

We still need to add other missing bits, but let's sync these up first.
2018-12-14 22:59:56 +00:00
Matthias Clasen
8b0fd8e148 Merge branch '1476-nautilus-does-not-enable-to-connect-to-an-nfs-share' into 'gtk-3-24'
Resolve "Nautilus does not enable to connect to an NFS share"

See merge request GNOME/gtk!427
2018-12-14 17:26:35 +00:00
Alberts Muktupāvels
31d896c5cf statusicon: Create pixbuf at correct size
Surface returned from gtk_icon_helper_load_surface can be smaller
then requested pixel size. This happens when icon is embedded in
panel that has bigger size then loaded pixbuf.
2018-12-12 19:55:20 +02:00
Szunti
4c8fcd6a6f Add gdk_x11_display_get_parent_relative_pattern().
Fixes #1280, tray icons not drawing background. This is a magic pattern only
usable for gdk_window_set_background_pattern() that sets the underlying
X window's background to ParentRelative.
2018-12-12 02:56:35 +01:00