Commit Graph

54 Commits

Author SHA1 Message Date
Matthias Clasen
fb8e52f0c9 gtk-demo: Stop using gtk_widget_show/hide 2022-11-28 14:34:55 -05:00
Matthias Clasen
2c6ac137a3 gtk-demo: Improve language handlng
In the font features demo, don't add a
item for the default language to the dropdown,
that does not make sense.
2022-11-07 15:42:38 +01: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
756888a53d gtk-demo: Port to async dialog API 2022-10-29 13:31:41 -04:00
Matthias Clasen
e6f4c596fa gtk-demo: Use global style in font_features 2022-10-22 11:38:46 -04:00
Matthias Clasen
3d7fb26588 gtk-demo: Replace combo boxes in font features
This is a slightly more complicated combo box,
so we need an auxiliary object.
2022-10-22 11:35:35 -04:00
Matthias Clasen
6efb18330f demos and examples: Ignore deprecations
For now, just ignore deprecations. Eventually,
we will have to go through, drop demos that are
for wholly deprecated widgets, and update others.
2022-10-11 17:18:21 -04:00
Matthias Clasen
5ba8fc8f10 Font features demo improvements
Use font-provided names for ssNN and cvNN features.

But good luck finding a font that has these!
2022-07-03 01:19:19 -04:00
Matthias Clasen
5d05daaed0 Font features demo improvements
Add buttons to cycle through samples.
2022-07-02 23:37:34 -04:00
Matthias Clasen
86dd72fad6 Fix up font features demo
The conversion to a textview was incomplete.
2022-07-02 22:46:27 -04:00
Matthias Clasen
9c4490b7ad gtk4-demo: Add color to font features 2022-07-02 11:35:24 -04:00
Matthias Clasen
cd40cd145f gtk4-demo: Cosmetics 2022-07-01 00:10:16 -04:00
Matthias Clasen
88bbb933a1 gtk4-demo: Add a waterfall to font features 2022-06-30 23:52:37 -04:00
Matthias Clasen
4070e794d2 gtk4-demo: Fix font features animation 2022-06-30 21:11:49 -04:00
Matthias Clasen
64f3ac6760 gtk3-demo: Add animation to font features 2022-06-30 19:02:02 -04:00
Matthias Clasen
508ceccb66 gtk4-demo: Polish the font features demo 2022-06-30 19:02:02 -04:00
Matthias Clasen
d6dde63074 gtk4-demo: Restructure the font features demo 2022-06-30 19:02:02 -04:00
Matthias Clasen
bdb1886fc9 gtk4-demo: Cosmetics
Rename the ui file to match the C source, to preserve sanity.
2022-06-30 19:02:02 -04:00
Matthias Clasen
e4781e393c gtk-demo: Beef up font features demo
Some work on making this demo better.
2022-06-30 09:42:32 -04:00
Chun-wei Fan
169172a9e0 demos: Always build font explorer demo
We are no longer using PangoFT2 APIs in this demo, so make sure that we build
it on all builds since we already depend on a HarfBuzz/Pango version that
provide everything that we need here.

Drop the unnecessary pangofc-font.h include as a result.
2022-01-12 17:29:30 +08:00
Chun-wei Fan
efb875daef demos: Mark non-static signal handler symbols for export
The symbols in the .ui files for the signal handlers and functions must be
exported so that the system can pick them up during execution.

Fixes #3918.
2021-05-07 10:38:02 +08:00
Timm Bäder
56e89e8d26 demos: Remove a dead assignment 2020-10-22 17:46:34 +02:00
Matthias Clasen
2c5c938f0d Clean up uses of gtk_toggle_button_get/set_active
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
7a05381825 gtk-demo: Port to font explorer to grouped checkbuttons
Stop using radio buttons here.
2020-08-30 17:59:23 -04:00
Matthias Clasen
af07cfea5f gtk-demo: Avoid invalid OpenType feature tags
ss00 doesn't exist, and we use xxxx as placeholder
for 'default' choices in alternatives. Add a warning
in case we run across invalid OpenType feature tags
in fonts.

Fixes: #2962
2020-08-02 21:13:37 -04:00
Benjamin Otte
3078b180fe Replace "gdouble" with "double" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d375dce9f5 Replace "gchar" with "char" 2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Matthias Clasen
2a24b8c653 Replace most remaining uses of container api
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
932aa58237 Avoid container api on grids
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
025375ff5f Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
2020-05-11 12:20:59 -04:00
Matthias Clasen
cd0081d08a Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Matthias Clasen
8f9c3ed44a Stop using gtk_widget_destroyed
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
2020-05-11 12:19:37 -04:00
Timm Bäder
dc36c21835 demos/gtk-demo: Add common_cflags to build
With a few exceptions.
2020-03-07 15:30:35 +01:00
Matthias Clasen
663fb93af7 gtk-demo: Fix font explore initial state 2019-12-23 22:35:44 -05:00
Matthias Clasen
db42c23c0a gtk-demo: Fix a crash in the font explorer demo
gtk_widget_add_controller is transfer-full.
2019-12-23 22:33:02 -05:00
Benjamin Otte
a15fb95c46 gtk-demo: Use normal way to lookup up symbols
We're a normal application, so we can use the normal way to hook up code
into builder files, which is using dlsym() for the function pointers.

There's no need to to extra work exporting static symbols.
2019-12-03 18:12:25 +01:00
Robert Ancell
25e4174a38 gtk-demo: Fix incorrect use of g_strdup_printf
Was broken in a refactoring in 4a2f313
2019-11-26 10:11:28 +13:00
Benjamin Otte
b025ee428c builder: Connect signals automatically
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
2019-11-22 17:42:31 +01:00
Benjamin Otte
27d05102ab builder: Remove user_data argument from gtk_builder_connect_signals()
This is pretty unused and gets in the way of the next steps.

A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
2019-11-22 07:46:18 +01:00
Matthias Clasen
4a2f3130d2 gtk-demo: Use harfbuzz for font features
We don't need freetype anymore here; harfbuzz
has what we need.
2019-11-01 13:01:54 -04:00
Matthias Clasen
5368f98dd5 demos: Stop using gtk_button_clicked 2019-05-18 14:33:41 -04:00
Emmanuele Bassi
f39ae35e4b demo: Ignore deprecated HarfBuzz API
We should avoid warnings just because we're building against bleeding
edge HarfBuzz.
2019-04-13 14:30:09 +01:00
Matthias Clasen
9e0c471b03 entry, spin button: Drop redundant API
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Carlos Garnacho
15e00759c7 eventcontrollerkey: Port to new API model 2018-04-26 17:59:42 +02:00
Matthias Clasen
918d552472 gtk-demo: Stop using ::key-press-event in font explorer
Use a key controller instead. Note that this currently
breaks the handling of Enter, since we activate key bindings
twice, causing us to switch to the label and back.
2018-04-05 19:26:53 +02:00
Matthias Clasen
ebeca18635 gtk-demo: Update font explorer example
Revise the UI (no more double checkboxes), add font variations,
update font features from the dialog, allow tweaking ranges.
2018-01-03 14:56:36 -05:00
Matthias Clasen
25ab8f7c6b gtk-demo: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Matthias Clasen
9de3b24c20 gtk-demo: Expand font features demo
Add more features to the list, allow selecting script/language
from the set that is supported by the font, indicate which
features are present in the font for the selected script/language,
and expand the default specimen to cover latin, cyrillic and
greek.
2016-01-25 22:26:21 -05:00
Matthias Clasen
e1068255b3 gtk-demo: Fix font features sources
The resources had the prefix, causing the ui file not
to show up.
2016-01-19 22:47:19 -05:00