Commit Graph

439 Commits

Author SHA1 Message Date
Matthias Clasen
3080cb7acd Add GtkUriLauncher 2023-01-14 17:39:28 -05:00
Matthias Clasen
d758754f20 build: Lift gir and build_gir to toplevel
build_gir is used in multiple subdirectories,
so it is a bit nasty that it is defined in
one too.
2022-12-19 22:38:38 -05:00
Nirbheek Chauhan
cd77936265 meson: Fix find_program and subproject usage
Dummy dependencies are not required to execute a subproject
automatically for providing a program, nor do you need to explicitly
call subproject() to do that.

A `[provide]` section in the wrap file is enough.
2022-12-19 03:09:11 +05:30
Matthias Clasen
a471a8b57c Merge branch 'ebassi/gidocgen-update' into 'main'
ci: Update the gi-docgen dependencies

See merge request GNOME/gtk!5263
2022-12-14 16:24:48 +00:00
Matthias Clasen
00bdad23b0 Deprecate gtk_show_uri
This API has been superseded by GtkFileLauncher.
2022-12-09 13:36:28 -05:00
Matthias Clasen
1d9ee050f4 Add GtkFileLauncher
This is a replacement for gtk_show_uri_full,
which can open a GFile in an application, or
open its containing folder in a file manager.
2022-12-09 13:25:02 -05:00
Emmanuele Bassi
cc546d7af1 build: Add a check argument to run_command()
Silence a Meson warning.
2022-11-26 15:18:42 +00:00
Matthias Clasen
942f8d4b4b Deprecate GtkInfoBar
This widget has a dialog-like API, which is something
we want to get rid of in GTK 5, and libadwaita has
a replacement with AdwBanner incoming.
2022-11-23 13:00:09 -05:00
Matthias Clasen
9948053cd7 Deprecate GtkDialog
GtkDialog is too flexible in terms of UI (headerbars vs action bar,
etc), and has archaic APIs. It is time to retire it.
2022-10-29 15:27:53 -04:00
Matthias Clasen
f54ab91ff3 Deprecate GtkFileChooser and implementations
These are being replaced by GtkFileDialog.

This commit only moves the headers for GtkFileChooserWidget and
GtkFileChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFileChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
66b062a976 Deprecate GtkMessageDialog
It is getting replaced by GtkAlertDialog

This commit only moves the header to deprecated/,
and keeps the implementation in gtk/, since it will
eventually be salvaged into a private, dialog-free
widget.
2022-10-29 13:31:41 -04:00
Matthias Clasen
15572b0183 Deprecate GtkFontChooser and implementations
These are being replaced by GtkFontDialog
and GtkFontDialogButton

This commit only moves the headers for GtkFontChooserWidget and
GtkFontChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFontChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
a51a6a3ee2 Deprecate GtkColorChooser and implementations
These are being replaced by GtkColorDialog
and GtkColorDialogButton.

This commit only moves the headers for GtkColorChooserWidget
and GtkColorChooserDialog to deprecated/, and keeps the
implementations in gtk/, since they will eventually be
salvaged into a private GtkColorChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
6ed2d2b232 Add GtkFileDialog
Add an async API for picking a file, together with
a builder object for it. This is meant to replace direct
use of GtkFileChooserDialog.
2022-10-29 13:31:41 -04:00
Matthias Clasen
cccc74786f Add GtkAlertDialog
This is replacing GtkMessageDialog with an
async API for showing informational messages.
2022-10-29 13:31:41 -04:00
Matthias Clasen
aeacc8f3c5 Add GtkFontDialogButton
This is like GtkColorDialogButton, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
7d0ebe02db Add GtkFontDialog
This is similar to GtkColorDialog, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
655675e6a1 Add GtkColorDialogButton
This is a new color button implementation
built around GtkColorDialog.
2022-10-29 13:02:15 -04:00
Matthias Clasen
f877f33c19 Add GtkColorDialog
Add an async API for picking a color, together with
a builder object for it. This is meant to replace direct
use of GtkColorChooserDialog.
2022-10-29 10:18:37 -04:00
Matthias Clasen
2fce117d15 Add GtkDialogError
This error domain will be used by async apis
in future commits.
2022-10-29 10:18:37 -04:00
Matthias Clasen
44b5076cf2 filechooserwidget: Make context menus mostly work
Move the gestures to the individual cells, and
make them trigger the context menu via an action
that takes item position and coordinates.

The semantics are changed slightly: the menu actions
now operate on the clicked item, not on the selection.

Still to do: Fix up keyboard activation.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
a0d3bdc911 filechooserwidget: Move file icon to column view
This commit moves the icon loading code into a new private
widget called GtkFileThumbnail, which is bound to the GFileInfo
of the model, and asynchronously loads the file icon from that.
2022-10-20 22:34:40 -04:00
Matthias Clasen
6af69a7b7d Make GtkColumnViewSorter public
API is yet to come.
2022-10-20 13:01:18 -04:00
Matthias Clasen
17819ad4f6 filechooser: Improve "Open in File Manager"
Just relying on GAppInfo leads to suboptimal
results. Instead, call either the OpenURI portal
or the org.freedesktop.FileManager1 interface
directly, and only fall back to GAppInfo.

The wrapper code for the OpenURI portal is taken
from gio, with small adjustments.

Fixes: #5260
2022-10-19 15:01:21 -04:00
Matthias Clasen
ee8c2a235f stylecontext: Deprecate most apis
The notable exception here are the global provider apis,
which are needed in some form and don't have a replacement
yet. Move them to gtkstyleprovider.[hc], so we can wholly
deprecated gtkstylecontext.[hc].
2022-10-12 15:35:00 -04:00
Matthias Clasen
73f991a7fd Add gtk_css_style_snapshot_layout
This function renders a PangoLayout at a given
position, using text shadows and color from css.
2022-10-12 15:35:00 -04:00
Matthias Clasen
35370752d5 Deprecate gtk_render apis
These take a GtkStyleContext as argument, and we
want to get rid of GtkStyleContext eventually.
The proper drawing api these days is gtk_snapshot.
2022-10-12 15:35:00 -04:00
Matthias Clasen
5e256590db Deprecate treeviews and cell renderers
This includes

GtkCellArea
GtkCellAreaBox
GtkCellAreaContext
GtkCellEditable
GtkCellRenderer
GtkCellRendererAccel
GtkCellRendererCombo
GtkCellRendererPixbuf
GtkCellRendererProgress
GtkCellRendererSpin
GtkCellRendererSpinner
GtkCellRendererText
GtkCellRendererToggle
GtkCellView
GtkComboBox
GtkComboBoxText
GtkIconView
GtkListStore
GtkTreeModel
GtkTreeModelFilter
GtkTreeModelSort
GtkTreeStore
GtkTreeView
GtkTreeViewColumn
GtkTreeSelection
2022-10-11 17:18:21 -04:00
Matthias Clasen
d4dd0dcd79 Merge branch 'accessible_range_interface' into 'main'
Introduce GtkAccessibleRange

See merge request GNOME/gtk!5066
2022-10-05 11:33:56 +00:00
Matthias Clasen
7e9ca5b41d Deprecate GtkEntryCompletion
We want to drop cell renderers and tree models
in GTK 5. The functionality of GtkEntryCompletion
may be replaced by a new widget in GTK 5.
2022-10-03 23:23:56 -04:00
Matthias Clasen
a527a4d82e Deprecate the app chooser widgets
These are a family of pretty specialized widgets, and
are very rarely used. Instead of porting them away
from GtkTreeView and GtkComboBox, deprecate them.
2022-10-03 23:02:09 -04:00
Matthias Clasen
adfc29968a Revert "gtk: Use gnome.mkenums_simple"
This reverts commit 11829fe7d0.

The mkenums_simple function can't properly handle headers
in subdirectories currently, so go back to the template
version.
2022-10-03 22:20:07 -04:00
Lukáš Tyrychtr
a7814a0963 Introduce GtkAccessibleRange
This introduces GtkAccessibleRange, an interface which allows the accessibility backend to work with a control which can adjust a value.
2022-09-29 09:36:08 +02:00
Matthias Clasen
11829fe7d0 gtk: Use gnome.mkenums_simple
This lets us avoid template files, and works just as well.
2022-09-24 21:23:00 -04:00
Matthias Clasen
f141da6b55 gtk: Dissolve gtk-autocleanup.h
Move the autocleanup declarations into their
respective headers.
2022-09-23 23:07:43 -04:00
Simon McVittie
60a83a51c3 build: Use more conservative GResource embedding on non-x86_64
Doing clever things with objcopy is faster and seems to be reliable on
x86_64 Linux, but also doesn't work on all toolchains and architectures:
in particular, Debian has had trouble with this on arm and mips.
In a distro build environment where we are compiling all of GTK every
time, the cost of potentially unreliable builds is higher than the cost
of using slower but more conservative GResource embedding.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/5107
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-09-17 21:50:38 +01:00
Luca Bacci
86a38918d7 Implement GtkColorPicker for Windows
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5136
2022-09-01 19:25:07 +02:00
Marc-André Lureau
8ab57fc8ef build-sys: generate GdkWin32.gir
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-08-19 17:42:30 +04:00
Benjamin Otte
b6a8080b2f Add GtkInscription
A label alternative that renders itself into a given rectangle.

The main use case is cells in column view.

Related: #3334
2022-06-09 05:58:27 +02:00
Matthias Clasen
c0747f2c2e Add an explicit harfbuzz dependency
We are using Harfbuzz api in the file chooser,
so lets make this official.
2022-05-15 10:37:24 -04:00
Matthias Clasen
8bd77441a9 Cosmetic fixes to objcopy hack
Preserve the elf section name that we would get
without the objcopy hack. Minimizing the differences
2022-05-14 07:53:47 -04:00
Matthias Clasen
b6b2682bd6 build: Avoid objcopy on arm
The trickery we do with objcopy and ld to speed up
resource inclusion does not seem to work right on
32bit Arm, so just skip it there.

Fixes: #4757, #4748, #4752
2022-03-14 08:44:09 -04:00
Kévin Commaille
d8c79e91a2
emoji: Add more locales
Based on the locales that are at least 85% translated in Damned Lies:
https://l10n.gnome.org/releases/gnome-41/
Limited by the locales available in emojibase

Closes #4568
2022-02-22 11:28:15 +01:00
Chun-wei Fan
ee2dd1acc7 gtk/meson.build: Fix builds without PangoFT2
We aren't really using PangoFT2 for [language|script]-names.c, and are
always using items from them, so make sure they are being built.

Also always include the pangoft2 dependency in gtk_dep if it is found.
2022-01-12 17:29:28 +08:00
Matthias Clasen
70732afb95 Drop the script name data
It is not used in GTK itself, and gtk4-demo
has its own copy.
2022-01-10 10:43:05 -05:00
Simon McVittie
17c2a1cb4e build: Tell glib-compile-resources to make symbols internal where possible
Partial solution to https://gitlab.gnome.org/GNOME/gtk/-/issues/4598

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-01-04 18:08:22 +00:00
Matthias Clasen
46509b6dd2 Make our stack noexec
The change to use ld and objcopy for resources
had some side-effects: it leaked a few symbols
and made our stack executable. We don't want that.

Use -z nonexecstack and --strip-all to avoid this.

Fixes: #4598
2022-01-04 07:51:56 -05:00
Emmanuele Bassi
a70988ecd5 build: Remove deprecated get_pkgconfig_variable()
Replace it with `get_variable(pkgconfig:...)`.
2021-12-24 15:55:26 +00:00
Chun-wei Fan
e2b4108377 Revert "gtk/meson.build: Fix linking on Visual Studio 2013"
We now require a Pango version that requires Visual Studio 2015 or later to
build, and non-UCRT-based (VS2013) binaries may not bode well with
UCRT-based binaries (VS2015+). Drop the support for VS2013 as a result.

This reverts commit e208e0e07886248d4d86118aa5591c9882f0ed5c.
2021-12-14 10:29:28 +08:00
Emmanuele Bassi
a1861112ee build: Don't use ld when cross-compiling
We can't guarantee anything on the target toolchain, in that case.
2021-11-04 13:41:35 +00:00