Matthias Clasen
230107cd84
gtk-demo: Cosmetic improvements to the expander demo
...
Set the textview up like our other readonly textviews.
Also sneak in a little easter egg.
2020-08-09 17:12:04 -04:00
Matthias Clasen
b69dc3d054
gtk-demo: Add warnings to the themes demo
...
Add a warning that the flickering here may be
hazardous to photosensitive viewers.
2020-08-09 16:36:00 -04:00
Matthias Clasen
4650f7ec14
gtk-demo: Cosmetic improvement to listbox2 demo
...
Make the checkbutton and the check align vertically.
2020-08-09 15:43:01 -04:00
Matthias Clasen
eb5329d389
gtk-demo: Group the listbox demos
2020-08-09 12:36:06 -04:00
Matthias Clasen
5b41612f28
gtk-demo: Add another listbox demo
...
This is a more typical listbox use.
2020-08-09 12:36:06 -04:00
Matthias Clasen
3760d44f18
gtk-demo: Fix an indentation mishap
2020-08-09 11:14:28 -04:00
Matthias Clasen
79f0687929
gtk-demo: Drop the modelbutton demo
...
Not a public api, so shouldn't be featured in a demo.
2020-08-09 10:59:22 -04:00
Matthias Clasen
c80a612af7
gtk-demo: Improve filtering
...
Show sidebar rows if any parent matches. This lets one
search for "lists" and get just the subtree with all the
listview demos.
2020-08-09 10:54:45 -04:00
Matthias Clasen
7f565806a8
gtk-demo: Make source formatting uniform
...
Give the text view in the source tab the same
formatting as tabs we add for extra sources.
2020-08-09 00:03:43 -04:00
Matthias Clasen
1d49f933e9
gtk-demo: Adapt hightlighting style for dark themes
...
Switch to a highlight style that is readable with
dark background, if prefer-dark is set or we are
in HighContrastInverse.
2020-08-08 23:50:45 -04:00
Matthias Clasen
1d1d9de09e
gtk-demo: Cosmetics
2020-08-08 23:41:50 -04:00
Matthias Clasen
d1aacc01d4
gtk-demo: Make content views monospace
...
That works better for code.
2020-08-08 23:41:05 -04:00
Matthias Clasen
2a3d3ec079
gtk-demo: Follow font settings again
...
highlight puts font and size information into
its pango markup; strip that out to make our
text follow font settings again.
2020-08-08 23:38:07 -04:00
Matthias Clasen
112883186c
gtk-demo: Fix iconscroll complex text
...
We changed the way fontify works.
Adapt the iconscroll use.
2020-08-08 14:38:18 -04:00
Matthias Clasen
57a213a4ea
gtk-demo: Fix iconscroll colors
...
We changed the way the color grid works.
Adapt the iconscroll use of it.
Fixes : #3030
2020-08-08 14:36:48 -04:00
Matthias Clasen
4f5e3b7b0d
gtk-demo: Improve an error message
...
Be more helpful when we can't do syntax highlighting.
2020-08-08 13:56:17 -04:00
Matthias Clasen
2d72ba21ce
gtk-demo: Don't leak the markup
2020-08-07 15:19:33 -04:00
Matthias Clasen
e0786a4a00
gtk-demo: Fix a memory leak
...
The colors demo was leaking a reference to its model.
This was showing up as crash when you manage to close
both the demo window and the main window while the
sorting is ongoing.
2020-08-07 15:15:18 -04:00
Matthias Clasen
05255bfc90
gtk-demo: Modernize source highlighting
...
Drop the homegrown highlighting code, and just use highlight
to produce Pango markup.
When using an external highlighter, we can also highlight css,
xml, headers, at least.
2020-08-07 11:54:10 -04:00
Matthias Clasen
87a8fda163
demos: Brush up about dialogs
...
Show OS info, and generally polish this here and there.
2020-08-06 22:17:36 -04:00
Matthias Clasen
79e6269058
Merge branch 'gtk-demo-leaks' into 'master'
...
Gtk demo leaks
See merge request GNOME/gtk!2393
2020-08-07 01:36:34 +00:00
Matthias Clasen
14900efe38
gtk-demo: Plug a big memory leak
...
The colors demo was leaking all its colors. Oops.
2020-08-06 21:14:11 -04:00
Matthias Clasen
04c3c659f5
gtk-demo: Plug a small memory leak
...
The settings demo was leaking a GtkBuilderScope.
2020-08-06 21:13:39 -04:00
Benjamin Otte
8557aaf327
demo: fix memleak
2020-08-07 02:53:21 +02:00
Benjamin Otte
278fbcbbb4
demo: Don't crash when closing words demo
...
Make sure the stringlist we're loading into doesn't go away.
It'd be better to have a cancellable, but I'm lazy.
2020-08-07 02:52:22 +02:00
Matthias Clasen
dcf37412c1
gtk-demo: Fix keynav in the puzzle demo
...
Fixes : #3023
2020-08-05 20:52:22 -04:00
Matthias Clasen
b58bad557b
gtk-demo: Make fontrendering demo work more than once
...
We weren't cleaning up properly, causing the window
to not close the second time it is opened.
Fixes : #3019
2020-08-05 14:36:54 -04:00
Matthias Clasen
af63893377
Merge branch 'search-demo-fixes' into 'master'
...
Search demo fixes
Closes #3004
See merge request GNOME/gtk!2354
2020-08-03 02:18:41 +00:00
Matthias Clasen
3304df7042
Merge branch 'tagged-entry-demo' into 'master'
...
gtk-demo: Simplify the tagged entry demo
Closes #3005
See merge request GNOME/gtk!2353
2020-08-03 02:18:28 +00:00
Matthias Clasen
df85ef1754
gtk-demo: Fix cleanup of search entry demo
...
We can't use the ::destroy signal anymore; use
a weak ref instead, and make ensure the entry
stays around long enough for us to finish the
cleanup.
Fixes : #3004
2020-08-02 21:53:59 -04:00
Matthias Clasen
a7e25f2c73
gtk-demo: Make search progress visible again
...
Set a progress fraction, so that the pulsing progress
in the search entry demo is actually visible.
2020-08-02 21:47:21 -04:00
Matthias Clasen
4bdd94fd3f
gtk-demo: Simplify the tagged entry demo
...
No need for an intermediate box widget here;
we can just use a box layout. As a side-effect,
this fixes the theme to apply to the selection.
Fixes : #3005
2020-08-02 21:39: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
Matthias Clasen
ed13e6a41e
grid layout: Rename some properties
...
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.
Fixes : #2967
2020-08-02 17:58:03 -04:00
Timm Bäder
954a144336
mediastream demo: Add a weak pointer to the window
...
Do what other demos do as well.
Fixes 2983
2020-08-01 08:59:46 +02:00
Chun-wei Fan
c97979873a
demos: Fix running on Visual Studio builds
...
We need to mark the non-static callback functions for export.
2020-07-31 23:20:25 +08:00
Chun-wei Fan
e5600ab99b
demos: Fix glarea demo on OpenGL/ES
...
Some implementations of the ES 1.00 shader (such as Google's ANGLE) do
not like the 'f' suffix for floats, so just drop it, as it should be
harmless to drop.
2020-07-30 14:26:33 +08:00
Matthias Clasen
ad3514216d
Update our appdata files
...
Mention the new release in all our appdata files.
2020-07-29 17:58:45 -04:00
Timm Bäder
d5f0256f8b
listbox demo: Remove frames around labels
...
Having frames around those labels looks stupid
2020-07-28 05:34:12 +02:00
Matthias Clasen
99ec400c2a
gtk-demo: Simplify colors demo
...
Make best use of our new constructors.
2020-07-27 13:30:00 -04:00
Matthias Clasen
bc0182fa3e
Merge branch 'ebassi/new-a11y' into 'master'
...
Accessibility rework
See merge request GNOME/gtk!2239
2020-07-27 11:55:19 +00:00
Matthias Clasen
d187ff858c
Merge branch 'drop-down-constructor' into 'master'
...
GtkDropDown api revisions
See merge request GNOME/gtk!2286
2020-07-26 23:57:48 +00:00
Matthias Clasen
eb5c76210e
gridview: Revise constructors
...
Make both gtk_grid_view_new and gtk_grid_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.
Update all callers.
2020-07-26 18:50:50 -04:00
Matthias Clasen
43000abeff
listview: Revise constructors
...
Make both gtk_list_view_new and gtk_list_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.
Update all callers.
2020-07-26 18:27:23 -04:00
Matthias Clasen
f7ab6f665d
dropdown: Revise constructors
...
A dropdown without a model is useless, so accept a model
and expression in the constructor. Allow them to be NULL,
but consume them if given. This makes chained constructors
convenient without breaking language bindings.
Drop gtk_drop_down_set_from_strings() and instead add
gtk_drop_down_new_from_strings().
Update all users.
2020-07-26 18:09:54 -04:00
Matthias Clasen
cdc263f796
multiselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Also make the constructor return GtkMultiSelection *.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
ccb9dcc86b
singleselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
68d6671413
noselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
dd1c0c0b22
treelistmodel: Make constructor transfer full
...
Make gtk_tree_list_model_new() take the root model
as first argument, and make it transfer full, for
consistency with other wrapping list constructors.
Update all callers.
Still missing here: Make the model property writable,
and allow passing NULL in the constructor.
2020-07-26 18:04:40 -04:00
Matthias Clasen
a46cfd3ff4
sortlistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
706d464ae6
filterlistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Emmanuele Bassi
c63087a563
Remove ATK
...
To build a better world sometimes means having to tear the old one down.
-- Alexander Pierce, "Captain America: The Winter Soldier"
ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:
- it maps to a very specific implementation, AT-SPI, which is Linux and
Unix specific
- it requires implementing the same functionality in three different
layers of the stack: AT-SPI, ATK, and GTK
- only GTK uses it; every other Linux and Unix toolkit and application
talks to AT-SPI directly, including assistive technologies
Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:
- add an "accessible" interface, implemented by GTK objects directly,
which describe the accessible role and state changes for every UI
element
- add an "assistive technology context" to proxy a native accessibility
API, and assign it to every widget
- implement the AT context depending on the platform
For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Benjamin Otte
3078b180fe
Replace "gdouble" with "double"
2020-07-25 00:47:36 +02:00
Benjamin Otte
556997f9df
Replace "gfloat" with "float"
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
Benjamin Otte
b23f793753
gtk-demo: Add a progress bar when the colors demo resorts
2020-07-22 14:30:49 +02:00
Benjamin Otte
e8c4e1205a
gtk-demo: Make colors demo do incremental sorting
2020-07-22 14:30:49 +02:00
Matthias Clasen
0e476c1f28
gtk-demo: Don't use GtkColorSwatch
...
Making our own is 80 lines of code, so just do it.
2020-07-17 20:44:06 -04:00
Matthias Clasen
f4a7c7f6bf
gtk-demo: Use better api
...
We have a getter for the model, lets use it.
2020-07-16 16:26:41 -04:00
Benjamin Otte
e518c1f2f3
stringfilter: Make the constructor take an expression
...
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Benjamin Otte
c5ea59d7d1
gtk-demo: Don't make demos modal
...
That way, demo windows can be maximized and multiple demos can run at
once.
It's especially useful when using --run because the main window is
invisible then.
2020-07-16 20:43:16 +02:00
Matthias Clasen
b7eb663b82
gtk-demo: Make the words demo expand
...
We want to fill the window here.
2020-07-13 17:54:27 -04:00
Matthias Clasen
b4096cee64
gtk-demo: Work harder to filter the tree
...
Arrange for an item to be visible if it either
matches the filter or has children that do.
2020-07-12 18:26:56 -04:00
Matthias Clasen
a888e1cb65
demo: Clear filter when search is stopped
...
When the search entry disappears on Escape,
reset the search string to "", so we don't
end up with a filtered list and no obvious
way to remove the filtering.
2020-07-12 16:47:51 -04:00
Matthias Clasen
c80b33b2ad
gtk-demo: Make the search bar appear for typing
...
Having the search bar present from the start is
a bit jarring. Make it appear when called for.
2020-07-12 16:26:17 -04:00
Mohammed Sadiq
7583d48266
demo: Add a search filter
2020-07-12 22:19:40 +05:30
Matthias Clasen
746b84cc0f
gtk-demo: Make style apply in the file browser
...
Commit 5afe6f7825
claims to make this demo
'look good', but it failed to actually make its
css apply. Now it really looks good.
2020-07-12 08:11:42 -04:00
Matthias Clasen
fc770a383a
gtk-demo: Use a progressbar in the words demo
...
This looks better and a bit more polished.
2020-07-06 03:42:43 +02:00
Matthias Clasen
62c385a9dd
gtk-demo: No selection in the words demo
...
This demo is about filtering, not about selection,
so use a GtkNoSelection.
2020-07-06 03:42:43 +02:00
Matthias Clasen
7c4ad1a5c4
gtk-demo: Cosmetic fixes for the words demo
...
Set a window size, and don't put newlines in titles, left align and
ellipsize the label.
2020-07-06 03:42:43 +02:00
Benjamin Otte
ac524bb13a
demo: Make words listview load async
...
And add an "Open" button (why are filechooser buttons such a catastrophe
that I can't make them smaller?).
2020-07-06 03:42:43 +02:00
Benjamin Otte
b64eb6ca13
gtk-demo: Add incremental filtering to words demo
2020-07-06 03:42:43 +02:00
Benjamin Otte
b54f6710a7
gtk-demo: Add a listview demo for filtering strings
2020-07-06 03:42:42 +02:00
Matthias Clasen
cc18191a8e
Merge branch 'wip/exalm/show-title-buttons' into 'master'
...
headerbar: Show title buttons by default
See merge request GNOME/gtk!2175
2020-07-03 05:05:24 +00:00
Matthias Clasen
671daea262
gtk-demo: Track the selection
...
Use GtkSelectionFilterModel to track and display the
selection. Add some other selection information for
good measure.
2020-07-02 22:59:03 -04:00
Alexander Mikhaylenko
7c3b30036e
headerbar: Show title buttons by default
...
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Matthias Clasen
c0e2d7c62f
Drop unnecessary uses of gtk_style_context_add_class
...
We can use gtk_widget_add_css_class instead, most places.
2020-06-30 17:42:30 -04:00
Matthias Clasen
c267a75eef
Stop using GtkFunctionsListItemFactory
...
This was an early attempt at a factory, and has been
superseded by GtkSignalsListItemFactory. Port all users
the the newer one.
2020-06-29 22:10:34 -04:00
Matthias Clasen
cab6808673
gtk-demo: Fix binary name in --version
...
We are gtk4-demo, not gtk3-demo.
2020-06-28 23:36:35 -04:00
Matthias Clasen
01fbf8444b
Stop setting GTK_IM_MODULE_FILE
...
GTK no longer reads this environment variable, so
setting it can have no benefit for uninstalled demos
anymore.
2020-06-28 13:42:02 -04:00
Matthias Clasen
3aa5019e70
gtk-demo: Drop an unused object
...
The main ui file was still creating a tree store,
but we've switched everything over to use list models.
2020-06-27 09:47:29 -04:00
Matthias Clasen
5d11e9812d
gtk-demo: Improve formatting in the color demo
...
Properly align and format the numbers in the size
dropdown.
2020-06-26 22:57:56 -04:00
Benjamin Otte
6ceab55148
gtk-demo: Port listview-colors demo to multiselection again
2020-06-26 07:13:32 +02:00
Matthias Clasen
c9b032acab
gtk-demo: Fix a typo in the listbox demo
2020-06-25 14:28:29 -04:00
Matthias Clasen
f4e200708d
Merge branch 'scrolled-window-api' into 'master'
...
scrolledwindow: Don't take adjustments in new()
See merge request GNOME/gtk!2146
2020-06-24 19:58:03 +00:00
Matthias Clasen
3656994f82
gtk-demo: Enable inline completion
...
Enable inline completion in the entry completion
demo, to have some code exercising this feature.
It is broken.
2020-06-24 13:02:50 -04:00
Matthias Clasen
fd5f6ef57f
gtk-demo: Improve the entry completion demo
...
Add more strings.
2020-06-24 13:02:50 -04:00
Matthias Clasen
386b63b85d
scrolledwindow: Don't take adjustments in new()
...
In 99.9% of all cases, these are just NULL, NULL.
So just do away with these arguments, people can
use the setters for the rare cases where they want
the scrolled window to use a different adjustment.
2020-06-24 11:25:09 -04:00
Matthias Clasen
8a91d1d1ce
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Add a warning to the colors demo
See merge request GNOME/gtk!2131
2020-06-22 13:11:13 +00:00
Matthias Clasen
9fd3212241
gtk-demo: Add a warning to the colors demo
...
Explain that the big sizes cause lockups.
2020-06-22 07:43:47 -04:00
Chun-wei Fan
293f2e6b1c
demos: Fix builds against Visual Studio headers
...
According to [1], '_timezone' is already used for a global variable in the
time.h system header that is supplied by Microsoft, so using that for our
variable name when we are including time.h either directly or indirectly
will cause trouble.
This renames such variables to '_tz' to avoid that
[1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname
2020-06-22 17:04:18 +08:00
Matthias Clasen
9b8c0f3c7f
gtk-demo: Cosmetic improvement to the colors demo
...
Make the count label not jump around, as the model
is refilled.
2020-06-21 14:17:47 +02:00
Benjamin Otte
727a78a74f
gtk-demo: Add an "Unsorted" option (and default to it)
...
Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).
2020-06-21 14:17:47 +02:00
Benjamin Otte
d3f7dea624
gtk-demo: Reinstate incremental filling
...
Do it via the new size setting on the color list.
Also add an option to set the maximum size of the color list that it'll
be filled to so rudimentary performance testing is possible.
Hint: Do not select 16777216.
This reinstates commit c16848c2bb683f7ddf51571aa5951f8a4a1ea622.
2020-06-21 14:17:47 +02:00
Benjamin Otte
456b7628ee
gtk-demo: Allow color list to have any size
...
For now, limit it to 1<<12 so the sorters don't explode.
2020-06-21 14:17:47 +02:00
Benjamin Otte
f149beb474
gtk-demo: Add a permutation to compute colors from the position
...
This way, the colors are furthest apart at the start and fill up the
remaining spots towards the end.
2020-06-21 14:17:47 +02:00
Benjamin Otte
1b0451761a
gtk-demo: Add custom listmodel for all true colors.
2020-06-21 14:17:47 +02:00
Benjamin Otte
1d26341b03
gtk-demo: Make colors demo contain all 16,777,216 colors
...
This makes it slightly slow, so not sure it should stay like this.
2020-06-21 14:17:47 +02:00
Benjamin Otte
8348a113c6
gtk-demo: Compute HSV values directly
2020-06-21 14:17:47 +02:00
Benjamin Otte
bfdede7acc
Revert "gtk-demo: Make the colors demo populate incrementally"
...
This eases adding a bunch of follow-up features. After those features
have landed, this functionality will be readded.
This reverts commit a10340859d
.
2020-06-21 14:17:47 +02:00
Benjamin Otte
70894b48af
gtk-demo: Embed the RGBA value
2020-06-21 14:17:47 +02:00
Benjamin Otte
3549f43902
demo: Use GtkDropDown::selected-item
2020-06-21 02:23:46 +02:00
Matthias Clasen
0214b98c5e
Merge branch 'matthiasc/for-master' into 'master'
...
misc listview scrolling fixes
See merge request GNOME/gtk!2119
2020-06-20 21:21:29 +00:00
Matthias Clasen
a10340859d
gtk-demo: Make the colors demo populate incrementally
...
Add a refill button that incrementally refills the color
demo. This is useful to test how the grid view operates
when the model is frequently changed.
2020-06-20 14:47:57 -04:00
Matthias Clasen
8475d88af0
gtk-demo: Clean up initial selection handling
...
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in 10bcbae68c
.
2020-06-20 14:47:39 -04:00
Matthias Clasen
3fab2b55cc
gtk-demo: Clean up memory handling in the weather demo
...
gtk_weather_info_new was consuming the info, but not
the timestamp, which confused me. Make it not consume
either, and be more explicit about where the unrefs
happen.
2020-06-20 12:18:17 -04:00
Matthias Clasen
677bfe6857
gtk-demo: Clean up initial selection handling
...
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in 10bcbae68c
.
2020-06-20 08:48:29 -04:00
Matthias Clasen
eb25fc1d5a
gtk-demo: Add animated icons to the dnd demo
...
This is to test animated drag icons.
2020-06-19 19:26:43 -04:00
Matthias Clasen
3141eaecd0
gtk-demo: Modernize the tag entry demo
...
Use a layout manager, and reduce boilerplate.
2020-06-19 11:42:47 -04:00
Timm Bäder
5eb181281a
fishbowl: Remove visibility handling
...
First, almost all widgets are either visible and mapped, or visible and
unmapped because they are !child_visible. In both cases, we do care
about the size. If they are indeed invisible, gtk_widget_measure() will
take care of that by returning all 0.
And gtk_widget_unparent() already queues a resize on the parent if
necessary, so that is unneeded as well.
2020-06-19 05:26:24 +02:00
Emmanuele Bassi
c7916c8e48
Use the appropriate name for Juneteenth
...
Juneteenth (a portmanteau of June and nineteenth)[2] (also known as
Freedom Day,[3] Jubilee Day,[4] and Liberation Day,[5]) is an unofficial
American holiday celebrated annually on the 19th of June in the United
States.
-- https://en.wikipedia.org/wiki/Juneteenth
2020-06-18 17:43:46 +01:00
Yuri Chornoivan
c0cf839729
Fix minor typos
2020-06-18 10:47:16 +03:00
Matthias Clasen
cd1078563d
gtk-demo: Fix the settings demo
...
This was not updated to the latest api of GtkEditableLabel.
2020-06-17 18:21:28 -04:00
Matthias Clasen
a9943922d5
gtk-demo: Cosmetic changes
...
Reword the titles and texts for several demos.
2020-06-17 18:12:01 -04:00
Matthias Clasen
b46bfcafd1
gtk-demo: Cosmetic changes to the tagged entry demo
2020-06-17 18:06:28 -04:00
Matthias Clasen
6141c139e6
gtk-demo: Fix the tagged entry demo
...
We were using gtk_box_append on a button. Fallout
from the container removal.
2020-06-17 17:53:40 -04:00
Matthias Clasen
0fb83d7619
gtk4-demo: Cosmetic fixes to the dialog demo
...
Make this look a bit less ancient.
2020-06-17 17:46:40 -04:00
Matthias Clasen
74899599a6
gtk-demo: Add a missing source file
2020-06-17 16:06:37 -04:00
Matthias Clasen
10bcbae68c
gtk-demo: Select the initial demo properly
...
GtkSingleSelection does not give us a notification when
autoselect kicks in to select the first item. This was
barely noticeable, since the notebook ends up correctly
populated anyway, but the window title is not.
2020-06-17 12:25:28 -04:00
Matthias Clasen
02ce417279
gtk-demo: Use editable labels in the settings demo
...
This is more in line with the expected behavior for
editable lists.
2020-06-15 12:08:54 -04:00
Matthias Clasen
a28c75f215
gtk-demo: Expand the sidebar by default
...
Seems better to show what we have. Plus, clicking
those arrows is a little fiddly.
2020-06-06 22:12:12 -04:00
Matthias Clasen
b9d7dab329
gtk-demo: Improve display of image sources
...
Make the images expand to fill the space.
2020-06-06 22:12:12 -04:00
Matthias Clasen
bb7500e984
gtk-demo: Cosmetics
...
Tweak the formatting of the descriptions of
various demos.
2020-06-06 22:05:52 -04:00
Matthias Clasen
e94268944b
gtk-demo: Cosmetics
...
Make the titles of some demos match between sidebar
and window.
2020-06-06 21:42:42 -04:00
Matthias Clasen
e35c0e043e
gtk-demo: Add overline to the markup demo
...
This is a new-ish Pango feature.
2020-06-06 21:38:31 -04:00
Matthias Clasen
15257e3922
gtk-demo: Fix a leak
...
The themes demo was leaking its builder, and
therefore couldn't be closed.
2020-06-06 20:09:42 -04:00
Matthias Clasen
180a5a1ad7
gtk-demo: Cosmetic changes to the dropdown demo
...
Match the window title and the sidebar.
2020-06-06 20:08:50 -04:00
Matthias Clasen
11f971d870
gtk-demo: Cosmetic improvements to clocks demo
...
Reformat the code comments, and add a 10th clock.
2020-06-06 19:43:21 -04:00
Matthias Clasen
14605d4b92
gtk-demo: Use a property selection in the colors demo
...
This makes the property persist across sort changes.
2020-06-06 11:41:51 -04:00
Matthias Clasen
005a3da18f
gtk-demo: Another way to trigger theme benchmark
...
The click on the headerbar seems broken atm, so add
an explicit button to trigger the cycling among the
themes.
2020-06-05 18:40:24 -04:00
Matthias Clasen
34841c3a5f
Merge branch 'master.msvc' into 'master'
...
Fix latest GTK master on Visual Studio
See merge request GNOME/gtk!2028
2020-06-05 18:31:08 +00:00
Matthias Clasen
185f0181ac
Merge branch 'columnview-reorder-cells' into 'master'
...
Columnview reorder cells
See merge request GNOME/gtk!2047
2020-06-05 18:29:26 +00:00
Matthias Clasen
f6d23f0c29
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Bring back the applauncher demo
See merge request GNOME/gtk!2040
2020-06-05 15:38:03 +00:00
Timm Bäder
8bee3e2fe0
demos: Avoid shadowing a global from time.h
...
Sad but true.
2020-06-05 15:38:55 +02:00
Matthias Clasen
2a6dc67fd7
gtk-demo: Improve wrapping in settings demo
...
The columnview overrides the width of its content,
so if a label is not willing to wrap its content
below a certain width, it will just get cut off.
Avoid that by not setting width-chars on the wrapping
content.
2020-06-05 09:35:56 -04:00
Matthias Clasen
669a6ddeaa
gtk-demo: Bring back the applauncher demo
...
Just without the coverflow. It was a well-documented
demo, so it is useful to keep around.
2020-06-05 08:22:48 -04:00
Chun-wei Fan
c370b8f309
demos/gtk-demo/listview*.c: Include stdlib.h
...
atoi() and qsort() both require this header for them to be defined
2020-06-05 11:16:45 +08:00
Matthias Clasen
623a56391c
gtk-demo: Cosmetics
...
Remove a few instances of double semicolon.
2020-06-04 13:30:13 -04:00
Matthias Clasen
1b7fb10361
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Allow editing in the settings demo
See merge request GNOME/gtk!2033
2020-06-04 16:32:21 +00:00
Matthias Clasen
76ff1a2a49
gtk-demo: Drop the awards
...
This was a neat idea, but maintaining it at a sufficient
level is too much work.
2020-06-04 10:19:44 -04:00
Matthias Clasen
3f2d44d517
gtk-demo: Allow editing in the settings demo
...
This gives us an example of a columnview with editable
content, which we didn't have so far.
2020-06-04 08:45:47 -04:00
Alexander Larsson
8707bab450
gtk-demo: Avoid list for children in GtkFishBowl
...
This is a demo that measures performance, so keep the child
info in a hashtable instead of a list. This means adding or removing
a child is not O(n-children).
2020-06-04 12:06:42 +02:00
Matthias Clasen
ce0dd650d7
settings demo: Don't select rows
...
We want no selection here, so use GtkNoSelection.
2020-06-03 17:51:22 -04:00
Matthias Clasen
fa37225a42
Merge branch 'columnview-rubberbanding' into 'master'
...
columnview: Implement rubberbanding
See merge request GNOME/gtk!2008
2020-06-03 21:46:13 +00:00
Matthias Clasen
78a06859b9
Merge branch 'columnview-expand' into 'master'
...
columnview: Implement expanding columns
See merge request GNOME/gtk!2007
2020-06-03 21:39:33 +00:00
Matthias Clasen
f13a596d15
Merge branch 'columnview-resizing' into 'master'
...
columnview: Implement interactive resizing
See merge request GNOME/gtk!2004
2020-06-03 20:04:17 +00:00
Matthias Clasen
510f719975
gtk-demo: Make gridview demo use rubberbanding
2020-06-03 13:34:28 -04:00
Matthias Clasen
5ef427bd65
gtk-demo: Expand columns in the settings demo
...
Expand the columns that are likely to appear
at the end.
2020-06-03 13:32:15 -04:00
Matthias Clasen
50f4e53aef
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Add a dropdown demo
See merge request GNOME/gtk!2023
2020-06-03 17:30:19 +00:00
Matthias Clasen
ac082e5504
gtk-demo: Make some columns resizable
...
Make the columns in the List > Settings demo
resizable, to demonstrate this functionality.
2020-06-03 12:49:40 -04:00
Matthias Clasen
19da93b675
Merge branch 'columnview-menu' into 'master'
...
columnview: Add header menus
See merge request GNOME/gtk!2001
2020-06-03 15:51:26 +00:00
Matthias Clasen
0b1c91dc7c
gtk-demo: Add a dropdown demo
...
This shows a few examples of GtkDropDown.
Mostly taken from tests/testdropdown.c.
2020-06-03 11:34:06 -04:00
Matthias Clasen
5afe6f7825
Cosmetic improvements to the filebrowser demo
...
Make it look good.
2020-06-01 23:13:20 -04:00
Matthias Clasen
d02c48f987
Add more columns to the settings demo
...
Flesh out this demo more, so we can have a
non-trivial column editor here at some point.
2020-06-01 22:10:53 -04:00
Matthias Clasen
c835214540
Add a header menu to settings demo
...
Allow toggling column visibility from here.
2020-06-01 22:10:53 -04:00
Matthias Clasen
9d15e64f0b
gtk-demo: Plug a leak
...
We were leaking a reference to the settings demo.
This showed up as gtk4-demo --run listview_settings
not exiting when the window is closed.
2020-06-01 15:17:21 -04:00
Matthias Clasen
fe73730d21
Merge branch 'gtk-demo-run-no-main-window' into 'master'
...
gtk-demo: Don't show main window if --run is passed in
See merge request GNOME/gtk!1979
2020-06-01 12:26:15 +00:00
Matthias Clasen
cc878160bd
gtk-demo: Fix a crash in the puzzle
...
Avoid a crash when clicking the refresh button
after solving the puzzle.
2020-06-01 00:11:50 -04:00
Matthias Clasen
382153e82d
gtk-demo: Fix keynav in the puzzle
...
We need to make shortcut controller have global
scope, otherwise the shortcuts lose against the
window keybindings.
2020-06-01 00:11:43 -04:00
Matthias Clasen
e195341e30
gtk-demo: Flesh out the settings demo
...
Add columns for type and default value.
2020-05-31 23:43:58 -04:00
Emmanuele Bassi
931d68bc92
Merge branch 'drop-coverflow' into 'master'
...
Drop GtkCoverFlow for now
See merge request GNOME/gtk!2000
2020-05-31 19:12:32 +00:00
Matthias Clasen
73fdb8f7b0
Drop GtkCoverFlow for now
...
There is no agreement that a coverflow widget is
appropriate for GTK 4.
It would be ok as a demo if it could live in gtk-demo,
but that requires us to make GtkListBase public first.
The demo is also somewhat rough and needs more work
to look plausible.
Drop GtkCoverFlow and the related demo for now.
2020-05-31 13:15:51 -04:00
Matthias Clasen
8e0ba37866
gtk-demo: Fixes for the sliding puzzle
...
We were calling check_solved only for key presses,
meaning you could never solve the puzzle with the
mouse.
2020-05-31 13:01:17 -04:00
Matthias Clasen
8780f50e7e
gtk-demo: Some fixes to awards
...
Fix things up enough to make the list show up.
Still not a working example, but closer.
2020-05-31 13:01:17 -04:00
Matthias Clasen
1c389b1f24
gtk-demo: Add more scrolling benchmarks
...
Add a listview and gridview to the scrolling
benchmarks.
2020-05-31 13:01:17 -04:00
Matthias Clasen
336b30c532
gtk-demo: Add a large grid demo
...
This is similar to the flowbox demo, but much bigger.
2020-05-30 19:31:38 -04:00
Matthias Clasen
b087948933
gtk-demo: Use single-click-activate for minesweeper
...
The explanation say we do, so do it.
2020-05-30 19:30:14 -04:00
Matthias Clasen
4a4c15b2ac
gtk-demo: Add filtering to the settings demo
...
A demo of filtering with lists was missing so far.
2020-05-30 19:30:14 -04:00
Matthias Clasen
8804427677
gtk-demo: Demo columnview sorting
...
Enhance the settings demo to have a sortable column.
2020-05-30 19:30:14 -04:00
Matthias Clasen
d717971f41
gtk-demo: Cosmetic improvements to the listview demos
...
Set default sizes, window titles and add more
detail to the descriptions.
2020-05-30 19:30:14 -04:00
Benjamin Otte
b43c8ae646
expression: Allow passing a this object to bind()
...
This gives a bit more control over the arguments passed to expressions.
2020-05-30 19:26:46 -04:00
Benjamin Otte
22e6fa3a64
gtk-demo: Add a Clocks demo
...
This demo is meant to showcase expressions.
It also needs the fixes in glib 2.64 to work properly.
2020-05-30 19:26:46 -04:00
Benjamin Otte
a44c06b264
gtk-demo: Add a Coverflow application launcher
...
This is roughly the simplest demo I could come up with.
But I documented it, so there's your tutorial.
Related: #2214
2020-05-30 19:26:46 -04:00
Benjamin Otte
ca9e0c0e68
gtk-demo: Add a minesweeper demo
...
The demo shows creating ones own listmodel and using it to fill a grid.
I am totally getting the hang of React btw:
500 lines of logic with no UI code and 100 lines of GtkBuilder XML and
I get a sweet UI.
2020-05-30 19:26:46 -04:00
Benjamin Otte
6b98948f9a
demo: Add a file browser demo
2020-05-30 19:26:46 -04:00
Timm Bäder
a8d2bb6b22
demo: Use a listview as sidebar
2020-05-30 19:26:45 -04:00
Benjamin Otte
fcdc5030bd
gtk-demo: Introduce awards
...
We need a way to get a useful listbox, so here we go!
2020-05-30 19:26:45 -04:00
Benjamin Otte
bb7968ba77
demo: Add a GSettings tree demo
...
It is meant to look somewhat like dconf-editor when it is done.
So far, it's just a list.
2020-05-30 19:26:45 -04:00
Benjamin Otte
626c525706
listview: Expose GtkListItemFactory APIs
...
Due to the many different ways to set factories, it makes sense to
expose them as custom objects.
This makes the actual APIs for the list widgets simpler, because they
can just have a regular "factory" property.
As a convenience function, gtk_list_view_new_with_factory() was added
to make this whole approach easy to use from C.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2ef2148fb5
gtk-demo: Add a rough start at a Weather demo
...
This demos a horizontal listview.
2020-05-30 19:26:45 -04:00
Benjamin Otte
d3dc9c41b4
gtk-demo: Make fishbowl info text use bindings
...
It's a good demo for how bindings can format multiple properties into an
informative string with 1 line of code (and 5 lines of XML).
2020-05-30 19:26:44 -04:00
Alexander Larsson
0bd039a524
gtk-demo: Don't show main window if --run is passed in
...
Also, in that case, exit when the demo window is closed.
2020-05-29 13:51:31 +02:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03:00
Matthias Clasen
ffa5334a2d
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Fix the dnd demo drop highlight
See merge request GNOME/gtk!1958
2020-05-23 00:05:16 +00:00
Matthias Clasen
5f6d072459
gtk-demo: Fix the dnd demo drop highlight
...
We want the drop highlight to be around the label,
not around the item containing it, so move the drop
target gesture to the right widget.
2020-05-22 18:52:56 -04:00
Matthias Clasen
ca1c570c21
gtk-demo: Stop using appmenu apis
...
The appmenu-related GtkApplication apis are going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
0f053d1804
gtk-demo: Improve rotation in the dnd demo
...
Make the drag icon preserve the rotation, and improve
placement for the editor and for dnd to take the offset
into account.
2020-05-22 15:38:02 -04:00
Matthias Clasen
7fac6b37db
gtk-demo: Improve editing in the dnd demo
...
Add a scale for the angle, make the edits apply immediately,
and keep the item visible.
2020-05-22 14:06:00 -04:00
Matthias Clasen
d2f979ffaf
gtk-demo: Improve drag icon handling in dnd example
...
Make the opacity change only apply to the 'ghost' of
the item, not the drag icon.
2020-05-22 13:25:17 -04:00
Matthias Clasen
e54060bac2
gtk-demo: Fix entry position in dnd demo
...
gtk_fixed_get_child_position does not work if children
have transforms that are not just 2D translations.
Use gtk_widget_translate_coordinates instead.
2020-05-22 13:17:59 -04:00
Matthias Clasen
965483eb67
gtk-demo: Reorganize the dnd demo
...
Introduce a CanvasItem widget to make things a
bit less ad hoc.
2020-05-22 12:35:18 -04:00
Matthias Clasen
028bccc188
gtk-demo: Use proper drag icons in the dnd demo
...
Use a widget paintable to make the drag icon appear
in two places at once.
2020-05-22 10:50:09 -04:00
Matthias Clasen
8f5444c75b
gtk-demo: Fix breakage in a css demo
...
This is fallout from container api changes. We
were treating a GtkOverlay like a GtkBox, which
it isn't.
2020-05-21 16:24:56 -04:00
Matthias Clasen
96c0fbf209
gtk-demo: Plug another leak
...
We were leaking the builder in the css blendmodes demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 16:24:20 -04:00
Matthias Clasen
98178d8823
gtk-demo: Plug another leak
...
We were leaking the builder in the revealers demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 16:23:42 -04:00
Matthias Clasen
3f6dd34b18
gtk-demo: Plug another leak
...
We were leaking the builder in the cursors demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 15:41:54 -04:00
Matthias Clasen
aaed61de66
gtk-demo: Plug a leak
...
We were leaking the builder in the builder demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 15:41:48 -04:00
Timm Bäder
4b5a8c45b4
gtk4-demo: Fix css_basics demo
2020-05-20 10:29:50 +02:00
Timm Bäder
ae54517b33
gtk4-demo: Fix sliding puzzle demo
2020-05-20 10:29:50 +02:00
Alexander Larsson
32f58e6c0b
gtk-demo/dnd: Fix up drag_cancel
...
This needs to return a boolean, also it should not call end because
that will be called anyway by Gtk+ after cancel, and this was causing
warnings due to the opacity being unset with no dragged widget set.
2020-05-14 10:45:38 +02:00
Alexander Larsson
707229ce17
gtk-demo/dnd: Use gtk_popover_set_child(), not gtk_box_append
2020-05-14 10:13:05 +02:00
Matthias Clasen
7eaa10dd8e
gtk-demo: Fix a problem with the dnd demo
...
When I move this into gtk-demo, I broke the hack
that ensures the GtkColorSwatch type is registered.
Bring it back.
2020-05-14 01:16:56 -04:00
Matthias Clasen
e9d966488b
gtk-demo: Don't overdraw the fishbowl
...
Set overflow to hidden for the fishbowl widget, so the
blur buttons don't leak out into the window shadow.
2020-05-13 19:21:00 -04:00
Matthias Clasen
e87bc3d33d
gtk-demo: Plug a memory leak
...
This leak was there all along. But with the new
gtk_window_destroy(), it shows up as an unclosable
window. Very noticable.
2020-05-13 17:24:57 -04:00
Alexander Mikhaylenko
3bf6bdae73
demo: Remove double borders from the treeview
2020-05-13 20:57:00 +05:00
Alexander Larsson
a02c588b19
gtk-demo: InfoBar is not a GtkBox anymore
...
Use gtk_info_bar_add_child to add children
2020-05-13 11:04:49 +02:00
Alexander Larsson
fede7cd81c
gtk-demo: Fix expander demo
...
GtkExpander is not a GtkBox anymore, so use the new gtk_expander_set_child()
API.
2020-05-13 10:50:41 +02:00
Matthias Clasen
e7bf4a3de8
tests: Move testcairo into gtk4-demo
...
Replace the boring checkboard pattern with this
exciting drawing, and save one test binary at the
same time!
2020-05-12 15:43:43 -04:00
Emmanuele Bassi
4d09bf3b9b
demos: Remove gtk_dialog_run()
...
Use modal dialogs and the "response" signal.
2020-05-12 13:12:08 +01: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
88141103cd
Don't use container api on GtkListBox
2020-05-11 22:21:39 -04:00
Matthias Clasen
3bff7d3a37
Stop using container api on GtkFlowBox
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
0d57abfe65
Stop using container api on GtkFixed
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
932aa58237
Avoid container api on grids
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bc6643f3c2
paned: Redo the api
...
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
2020-05-11 22:21:33 -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
Matthias Clasen
cad890ee29
gtk-demo: Use GtkDrawingArea::resize
...
This signal is a replacement for this (ab)use
of ::size-allocate.
2020-05-06 14:27:45 -04:00
Matthias Clasen
84944f1c63
gtk-demo: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:25:29 -04:00
Matthias Clasen
fa848e94d2
gtk-demo: Port blur demo from GtkBin
2020-05-04 22:53:08 -04:00
Matthias Clasen
ec394e805b
Use gtk_combo_box_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
77af8e303d
Use gtk_overlay_set_child throughout
...
Replace all uses of gtk_container_add on overlays
by gtk_overlay_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
99ef14b59f
Use gtk_search_bar_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
b8d1a9eb0d
flowboxchild: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
f59f355190
Use gtk_window_set_child throughout
...
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
af6e0ee2b3
Use gtk_button_set_child throughout
...
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
67759d4c3e
Use gtk_scrolled_window_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
8e261056b9
Use gtk_popover_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_popover_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
71433d01b3
aspect frame use fixup
2020-05-04 17:01:18 -04:00
Matthias Clasen
4a133b4eef
fishbow: fixup premature popover
2020-05-04 17:01:18 -04:00
Matthias Clasen
1f63896c6b
Use gtk_aspect_frame_set_child throughout
...
Replace all uses of gtk_container_add on aspect frames
by gtk_aspect_frame_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
1706b80815
Use gtk_frame_set_child throughout
...
Replace all uses of gtk_container_add for
frames with gtk_frame_set_child.
2020-05-04 17:01:18 -04:00
Alexander Mikhaylenko
c2e4e1af73
headerbar: Remove user-settable title
...
Use window title, or custom title widget if it's set. Remove 'title'
property.
Update demos and tests to set the title on the window instead of
headerbar.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
35d50f88c8
headerbar: Remove subtitle
...
Also remove the box containing title and subtitle, as there's only one
label now.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
43a453e465
headerbar: Remove has-subtitle property
...
Subtitle will go too in the next commit, but has-subtitle goes first as
it's broken right now anyway.
2020-05-01 19:48:05 +05:00
Matthias Clasen
1ae898bf0b
gtk-demo: Add a shortcuts window
...
Its not very impressive here, but still good to have.
2020-04-26 22:14:10 -04:00
Matthias Clasen
34862dbbb6
gtk-demo: Include pango version in about dialog
...
This is useful information.
2020-04-26 20:02:10 -04:00
Matthias Clasen
f645c063fb
gtk-demo: Update copyright year
2020-04-26 00:44:48 -04:00
Matthias Clasen
44e31855ca
gtk-demo: Remove the colorsel demo
...
We already have a color selector demo in "Pickers".
2020-04-26 00:28:13 -04:00
Matthias Clasen
c6fc7d88c2
gtk-demo: Minor cosmetic fixes
...
Some minor cosmetic fixes to some of the demos.
2020-04-26 00:28:13 -04:00
Matthias Clasen
f6c8af6609
gtk-demo: Improve the dnd demo
...
The DND demo didn't have DND, since it was first created!
Time to fix this. Copying most of testdnd3.c here.
2020-04-26 00:28:13 -04:00
Matthias Clasen
f8f391ceb9
gtk-demo: Polish the clipboard demo
...
The DND part of this demo was broken by recent
icon theme changes. Make it work again.
And make the demo nicer by breaking out a
DemoImage widget.
2020-04-25 21:29:39 -04:00
Carlos Garnacho
ccfffb2578
demos: Initialize brush size in "paint" demo
...
Otherwise lines end up with 0 thickness.
2020-04-24 22:20:09 +02:00
Matthias Clasen
19dbbf6fa5
aspectframe: Modernize
...
Make GtkAspectFrame not derive from GtkFrame anymore,
since frames now always draw, well, a frame. Also,
add proper setters for the properties of GtkAspectFrame.
Update our sole user.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2627
2020-04-17 17:38:52 -04:00
Matthias Clasen
12d5fdd457
menubutton: Drop relief
...
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
df1816a29c
button: Drop relief
...
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
edae2a8dc5
frame: Drop shadow-type
...
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5
scrolledwindow: Drop shadow-type
...
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
638508fa20
gtk-demo: Group the OpenGL demos
2020-04-12 21:58:07 -04:00
Matthias Clasen
ce6c7bae51
gtk-demo: Add a gears demo
2020-04-12 20:52:15 -04:00
Matthias Clasen
394ea32e93
Use gtk_widget_add/remove_css_class more
...
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Matthias Clasen
22e1827f84
Change the default value of GtkWidget:can-focus
...
Make widgets can-focus by default, and change the semantics
of can-focus to be recursive . If it is set to FALSE, focus
can not enter the widget or its descendents at all anymore.
This commit temporarily breaks focus behavior of widgets
that did not expect to receive focus.
2020-04-09 17:50:29 -04:00
Matthias Clasen
0b17658a82
Replace most uses of <Primary> with <Control>
...
The only place where we are still using <Primary> is
in tests, to ensure we keep parsing it. Otherwise,
<Control> is now the preferred syntax.
2020-04-06 17:05:52 -04:00
Matthias Clasen
33928a52c3
gtk-demo: Fix a crash
...
Using the assistant demo repeatedly was crashing.
2020-04-04 15:35:18 -04:00
Matthias Clasen
b636df7784
Merge branch 'matthiasc/for-master' into 'master'
...
shortcuts: documentation fixes
See merge request GNOME/gtk!1628
2020-04-04 15:33:41 -04:00
Matthias Clasen
f2d6a7b36a
demos: Remove can-focus from ui files
2020-04-04 00:28:34 -04:00
Matthias Clasen
e31bbb41d2
gtk-demo: Remove the popover demo
...
It doesn't work anymore, since popovers now need
support in the parent, and we don't really need
a demo just for popovers. They are used everywhere
already.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2429
2020-04-01 15:45:13 -04:00
Matthias Clasen
f3d061e879
gtk-demo: Fix the stack demo
...
The GtkSpinner:active property was renamed to :spinning.
2020-03-28 00:08:12 -04:00
Matthias Clasen
e2c327e025
gtk-demo: Fix the sliding puzzle
...
Update for a change in gtk_shortcut_controller_add_shortcut
behavior.
2020-03-28 00:08:12 -04:00
Matthias Clasen
48910a6d8e
gtk-demo: Fix the shortcuts demo
...
We don't have margins anymore.
2020-03-28 00:08:12 -04:00
Matthias Clasen
fbed55dff9
gtk-demo: Fix the rotated text demo
...
Off-by-one on the heart!
2020-03-28 00:08:12 -04:00
Matthias Clasen
059917b83c
gtk-demo: Fix the overlay demo
...
We must use two separate boxes for the label and
the entry, otherwise we can't keep their can-target
properties apart.
2020-03-28 00:08:12 -04:00
Matthias Clasen
163aa82d45
gtk-demo: Use mnemonics in menu buttons
...
Use GtkMenuButton:use-underline in the modelbutton demo.
2020-03-28 00:08:12 -04:00
Matthias Clasen
bc2c341d60
gtk-demo: Visual fixes to the model button demo
2020-03-28 00:08:12 -04:00
Matthias Clasen
93d54ba10b
gtk-demo: Fix the search entry demo
...
Avoid critical warnings when setting up the context
menu actions.
2020-03-27 16:24:20 -04:00
Matthias Clasen
80b988ef6c
gtk-demo: Stop emitting ::popup-menu
...
The signal was not used anyway, in the font explorer demo.
2020-03-25 23:14:45 -04:00
Benjamin Otte
bb4fbe3d8f
accels: Remove GtkAccelGroup
2020-03-25 23:14:44 -04:00
Benjamin Otte
1ec950d14a
gtk-demo: Port the sliding puzzle demo to shortcuts
2020-03-25 23:14:27 -04:00
Benjamin Otte
92e20deca1
shortcut: Change the API for creating shortcuts
...
When creating shortcuts, there almost always are a trigger and an action
available for use. So make gtk_shortcut_new() take those as arguments.
Also add gtk_shortcut_new_with_arguments() so people can easily pass
those in, too.
2020-03-25 23:14:27 -04:00
Benjamin Otte
cd0332aad5
shortcut: Add GtkShortcutAction
...
Similar to GtkShortcutTrigger, GtkShortCutAction provides all the
different ways to activate a shortcut.
So far, these different ways are supported:
- do nothing
- Call a user-provided callback
- Call gtk_widget_activate()
- Call gtk_widget_mnemonic_activate()
- Emit an action signal
- Activate an action from the widget's action muxer
2020-03-25 23:14:27 -04:00
Benjamin Otte
c3af47f5d9
gtk-demo: Add a dumb demo for shortcut triggers
2020-03-25 23:14:27 -04:00
Matthias Clasen
923a245a80
gtk-demo: Add hyphenation control to the markup demo
2020-03-20 23:58:33 -04:00
Matthias Clasen
38f1dbaba3
gtk-demo: Allow word breaking in the markup demo
...
We want to show hyphenation control here.
2020-03-20 23:58:33 -04:00
Matthias Clasen
31db615885
Revert "Merge branch 'disable-window-test' into 'master'"
...
This reverts commit 3ac4c76b18
, reversing
changes made to 6ec96d2e98
.
2020-03-19 18:03:16 -04:00
Matthias Clasen
98011e6273
gtk-demo: Stop emitting ::popup-menu
...
The signal was not used anyway, in the font explorer demo.
2020-03-18 23:00:51 -04:00
Benjamin Otte
ff6df33b6a
accels: Remove GtkAccelGroup
2020-03-18 23:00:51 -04:00
Benjamin Otte
067bd7019c
gtk-demo: Port the sliding puzzle demo to shortcuts
2020-03-18 23:00:51 -04:00
Benjamin Otte
4a4bfa0766
shortcut: Change the API for creating shortcuts
...
When creating shortcuts, there almost always are a trigger and an action
available for use. So make gtk_shortcut_new() take those as arguments.
Also add gtk_shortcut_new_with_arguments() so people can easily pass
those in, too.
2020-03-18 23:00:51 -04:00
Benjamin Otte
e6d0560a82
shortcut: Add GtkShortcutAction
...
Similar to GtkShortcutTrigger, GtkShortCutAction provides all the
different ways to activate a shortcut.
So far, these different ways are supported:
- do nothing
- Call a user-provided callback
- Call gtk_widget_activate()
- Call gtk_widget_mnemonic_activate()
- Emit an action signal
- Activate an action from the widget's action muxer
- Activate a GAction
2020-03-18 23:00:51 -04:00
Benjamin Otte
662a8a2885
gtk-demo: Add a dumb demo for shortcut triggers
2020-03-18 23:00:50 -04:00
Matthias Clasen
66a0a8d53e
Merge branch 'wip/baedert/test-cflags' into 'master'
...
Pass (almost) all our cflags to tests, testsuite, examples, demos, ...
See merge request GNOME/gtk!1516
2020-03-13 18:40:46 +00:00
Matthias Clasen
703d69692f
demo: stop using gdk_surface_get_state
2020-03-12 14:56:20 -04:00
Timm Bäder
7789d0e23f
builder: Make object names a const array
...
We don't take ownership.
2020-03-07 15:30:38 +01: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
Benjamin Otte
3f7b401de0
gtk-demo: Add a simple peg solitaire DND demo
2020-03-02 03:18:55 +01:00
Benjamin Otte
a411959c91
droptarget: Redo
...
This is a huge reorganization of GtkDropTarget. I did not know how to
split this up, so it's unfortunately all one commit.
Highlights:
- Split GtkDropTarget into GtkDropTarget and GtkDropTargetAsync
GtkDropTarget is the simple one that only works with GTypes and offers
a synchronous interface.
GtkDropTargetAsync retains the full old functionality and allows
handling mime types.
- Drop events are handled differently
Instead of picking a single drop target and sending all DND events to
it, every event is sent to every drop target. The first one to handle
the event gets to call gdk_drop_status(), further handlers do not
interact with the GdkDrop.
Of course, for the ultimate GDK_DROP_STARTING event, only the first
one to accept the drop gets to handle it.
This allows stacking DND event controllers that aren't necessarily
interested in handling the event or that might decide later to drop
it.
- Port all widgets to either of those
Both have a somewhat changed API due to the new event handling.
For the ones who should use the sync version, lots of cleanup was
involved to operate on a sync API.
2020-03-02 03:18:55 +01:00
Matthias Clasen
b5bacb3be6
Drop the margin property
...
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Matthias Clasen
a9c05193a7
Drop the expand property
...
The hexpand and vexpand properties are sufficient.
2020-02-25 18:29:15 -05:00
Matthias Clasen
9d80db29de
Merge branch 'spinning-spinner' into 'master'
...
Rename GtkSpinner::active to ::spinning
See merge request GNOME/gtk!1475
2020-02-25 04:04:46 +00:00
Matthias Clasen
e73a40733f
Rename GtkSpinner::active to ::spinning
...
And add a setter and getter. The old name was
confusing with the widget state of the same
name. 'Active' is just too overloaded.
2020-02-24 22:37:02 -05:00
Matthias Clasen
a43d13aa74
popover: Drop ::relative-to
...
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).
This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Emmanuele Bassi
b09e7df81b
Remove GtkFileChooser:local-only
...
Now that the whole API goes through GFile we don't have the weird split
between local-only and non-local-only modes.
2020-02-22 15:22:06 +00:00
Matthias Clasen
1c7191f45c
gtk-demo: Stop using gtk_get_event_widget
...
This is convenience api that will be going away.
2020-02-21 00:51:03 -05:00
Matthias Clasen
b1eaa502df
events: reorganize getters
...
Restructure the getters for event fields to
be more targeted at particular event types.
Update all callers, and replace all direct
event struct access with getters.
As a side-effect, this drops some unused getters.
2020-02-21 00:51:03 -05:00
Matthias Clasen
31bf9da63a
Strip const from GdkEvent
...
Events are refcounted structs, and we generally don't
pass these as const.
2020-02-21 00:51:02 -05:00
Matthias Clasen
c343031a0e
Stop using g_object_ref/unref on events
...
Use gdk_event_ref/unref instead of g_object_ref/unref.
Events will stop being object soon.
2020-02-21 00:47:53 -05:00
Matthias Clasen
66307f00f1
icontheme: Update the api
...
Add properties, and use string arrays instead of lists.
Among other things, this renames gtk_icon_theme_list_icons
to gtk_icon_theme_get_icon_names.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2410
2020-02-18 20:32:17 -05:00
Benjamin Otte
80ba7fd682
dragdest: Make gtk_drop_target_new() args be transfer full
...
Saves tons of code.
2020-02-17 04:04:21 +01:00