Commit Graph

780 Commits

Author SHA1 Message Date
Chun-wei Fan
1feb169bfa Visual Studio projects: move projects to win32/
This will simplify our source tree a bit
2020-07-16 18:57:03 +08:00
Simon McVittie
c37bbb2641 Add miscellaneous unpackaged files to dist tarball
Various files are in git but not in dist tarballs. Some of them look
like potentially useful references for downstream distributors.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-08 13:43:28 +01:00
Yariv Barkan
1c050bdcf4 demo: Use pinch translation in the gestures demo
Add the pinch translation offset to the pinch gesture demo. That allows
moving the square around in addition to the already-supported rotate and
zoom.
2020-01-17 22:37:55 +02:00
Matthias Clasen
cf31119bf4 gtk-demo: Use a default action in the infobars demo
This makes the question infobar activatable by clicking
anywhere in it.
2020-01-14 00:29:53 -05:00
Christoph Reiter
5107735c9f build: always use utf-8 when reading/writing text files
open() in text mode should never be used without an encoding because it defaults
to the locale encoding which is rarely what is wanted.

This fixes the Windows build in some cases (depending on the locale/paths used)
2019-06-25 08:53:26 +02:00
Rico Tzschichholz
0fcfa1f266 meson: Add missing files to gtk3-demo to fix build 2019-04-17 17:47:12 +02:00
Christoph Reiter
d52dad2042 autotools: dist all meson related build files 2019-04-11 16:45:36 +02:00
Christoph Reiter
1bbd244517 meson: install desktop/gschema files for demos 2019-04-11 16:45:36 +02:00
Chun-wei Fan
6db8e62ae7 meson: Install the icons for the demo programs
Those should be installed as well, and will also eliminate the error
that gtk-update-icon-cache failed during the post install.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
397471d604 demos/gtk-demo/meson.build: Build gtk3-demo-application
This should also get built as well.
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
Jeremy Bicha
f535443da6 demos/gtk-demo/combobox: fix typo
Fix typo that prevented the P-S submenu from displaying correctly

(cherry picked from commit 462193ae26)
2018-12-09 23:31:59 -05:00
Daniel Boles
d9f08c85f4 gtk-demo/main: Suppress implicit fallthru warning
Comments matched to reassure the compiler that fallthrough is
intentional are supposed to precede the case or default keywords, at
least in GCC, so the one here did not suppress the warning with GCC. We
can just the if condition and put the comment at the end to solve that.

https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/
2018-10-12 22:09:42 +01:00
Chun-wei Fan
608b44a9fa demos/gtk-demo/paint.c: Fix build on pre-C99
Use a const GdkRGBA to replace the compound literal use.
2018-08-28 17:43:11 +08:00
Kouhei Sutou
4c94a76237 font chooser widget: Add missing build flags
If we detect HarfBuzz and PangoFT2, GtkFontChooserWidget uses them. So
we need to add CFLAGS and LIBS of them to GTK_DEP_CFLAGS/LIBS. If we
don't add them, MinGW build fails to link.
2018-08-06 16:19:35 +09:00
Yi-Soo An
de18859249 demos/gtk-demo/changedisplay: Remove deprecated gdk_flush
Use gdk_display_flush instead of it.
2018-07-20 15:40:37 +09:00
Carlos Garnacho
effdf3af74 demos: Add "Paint" demo 2018-07-16 15:43:43 +02:00
Chun-wei Fan
f353ba3acb demos/gtk-demo/gtkfishbowl.c: Include gtk/fallback-c89.c
...in place of math.h, as we are using round(), which is possibly not
provided by the compiler since we don't require a C99 compiler in
GTK+-3.x and gtk/fallback-c89.c does include math.h anyways.
2018-06-26 16:40:18 +08:00
Benjamin Otte
f5482e6954 fishbowl: Port version from GTK 4
This version also merges widgetbowl into fishbowl.
2018-04-26 00:32:44 +02:00
Timm Bäder
5d27915aa4 demo: Add widgetbowl demo
Backported from gtk4.
2018-03-15 21:04:45 +01:00
Daniel Boles
1b08e34c11 gtk-demo/theming: Don’t mislead about raised class
This class is not added by any widgets nor themed by Adwaita/HC.
However, it is presented here as if it does something. It doesn’t.

But we changed the 2 buttons with the .raised class to use symbolic
icons, unlike their ‘unraised’ counterparts, which is unnecessarily
confusing and might make people think .raised affects icons somehow.

So, make them use the same icons in all cases; that way, if .raised is
ever made to do anything, 6 years later, what it does will be clear.

https://bugzilla.gnome.org/show_bug.cgi?id=644248
2017-09-14 18:34:07 +01:00
Daniel Boles
1421855234 gtk-demo/Makefile: Really get deps of C GResource
The XML resides in $(srcdir), not $(builddir); it is not a built source.
Using the latter, changes to the referenced files did not cause rebuild.
2017-09-14 18:34:07 +01:00
Carlos Garnacho
4b38a39c9d gtk-demo: Add 3fg touchpad swipe handling to gestures demo
We can handle those on wayland, so we should show it's possible.
2017-03-02 18:21:36 +01:00
Emmanuele Bassi
d93dd81e65 Use gtk_show_uri_on_window() in GtkLabel
Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:34:42 +01:00
Chun-wei Fan
1063460db2 demos: Fix build
Include gtk/fallback-c89.c so that we can ensure that we have round(), and
that file already includes math.h
2017-01-20 18:17:33 +08:00
Benjamin Otte
8b118eb8b5 gtk-demo: Make icon counter work from ui file
Gets rid of update always being 1 frame late.
2017-01-07 03:44:25 +01:00
Benjamin Otte
dd406c8062 gtk-demo: Add GtkFishbowl
Avoids usage of GtkFixed where child properties eat up all the CPU time.
And that's kinda not what I want to benchmark.
2017-01-07 03:41:33 +01:00
Benjamin Otte
a7b0af5d8d gtk-demo: Allow locking of icon count in fishbowl demo
I'm not sure I'm proud of the hack to get the changing icon into the UI
file without having to write code. But it works.
2017-01-07 03:41:33 +01:00
Emmanuele Bassi
da43bfd272 demo: Fix the GLES fragment shader for GLArea
We have a couple of syntax errors, like 'f' modifier for floating point
values.
2016-12-14 20:56:01 +00:00
Matthias Clasen
197eaaacb7 gtk-demo: Add a demo for tabs
One of the least-appreciated features in pango.
It deserves a demo.
2016-11-29 16:39:21 -05:00
Matthias Clasen
71b859a9ce gtk-demo: Set local-only to FALSE for the file chooser
No good reason for that.
2016-11-17 08:52:28 -05:00
Caolán McNamara
dbcbaac982 spin entry should be a child of spin context
https://bugzilla.gnome.org/show_bug.cgi?id=774609
2016-11-17 06:10:27 -05:00
Benjamin Otte
04db216026 gtk-demo: Add fishbowl demo 2016-11-05 03:38:46 +01:00
Matthias Clasen
149351048e Avoid 0/FALSE confusion
Since this is supposedly exemplary code, lets get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=772683
2016-10-14 11:17:42 -04:00
Matthias Clasen
ac95470c01 Add a --version option to gtk3-demo
This was missing, for no good reason.
2016-09-11 11:25:50 -04:00
Matthias Clasen
26f575014d gtk3-demo: Avoid underallocating columns
Setting a fixed width on the columns causes the headers to be
be underallocated. It is not necessary either.
2016-09-04 21:45:31 -04:00
Matthias Clasen
ceb18a989e gtk-demo: Make the scale demo fully functional
The adjustments need to have step-increment and page-increment
set up, or keynav and autoscrolling will not work.
2016-08-24 11:11:57 -04:00
Carlos Garnacho
5d99b7d538 demos: Use stateful actions for rings/strips in "Touch and Drawing Tablets" demo
https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Carlos Garnacho
ae29157a63 demos: Add pad support to "event axes" demo
And rename it to "Touch and Drawing Tablets", since it's no longer about
"axes" really.

As for pad support in the demo, just keep it "simple", make the
controller handle all pad devices, and make all the actions have the
same callback.

https://bugzilla.gnome.org/show_bug.cgi?id=770026
2016-08-23 21:01:45 +02:00
Bastien Nocera
64739f46fc demos: Fix build failure
gtk+/demos/gtk-demo/css_blendmodes.c: In function ‘update_css_for_blend_mode’:
gtk+/demos/gtk-demo/css_blendmodes.c:49:26: error: format not a string literal, argument types not checked [-Werror=format-nonliteral]
                          blend_mode);
                          ^~~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=769236
2016-07-29 11:02:50 -04:00
William Hua
8701e34f74 port to new gtk_menu_popup_at_* () functions
https://bugzilla.gnome.org/show_bug.cgi?id=756579
2016-07-19 09:38:54 -04:00
Matthias Clasen
93f20315d1 gtk3-demo: Simplify the blendmodes example a bit
Just put all of the template into the resource.
2016-07-04 09:59:25 -04:00
Matthias Clasen
507e58df4e gtk3-demo: Make blendmodes example non-resizable
It doesn't need to.
2016-07-03 18:29:21 -04:00
Georges Basile Stavracas Neto
1d93cc2b0b demo: add a demo for blend modes
After introducing the CSS blend mode enum values and including
the background-blend-mode CSS property, it is very important to
actually provide an example of the new feature.

This patch adds a new demo to gtk3-demo which shows how the
background-blend-mode CSS property works.

https://bugzilla.gnome.org/show_bug.cgi?id=768305
2016-07-03 17:24:47 -04:00
Carlos Garnacho
3b98a2d935 demos: Simplify popovers demo
Don't do much unconventional stuff here. This is a demo, not a test.

https://bugzilla.gnome.org/show_bug.cgi?id=767851
2016-06-21 17:56:21 +02:00
Matthias Clasen
e01f35ef5f gtk3-demo: Make the filter model example more interesting
Allow editing values in the first treeview, to see the derived
models update in real time.
2016-06-19 23:54:07 -04:00
Matthias Clasen
815cc23c4c gtk-demo: Use max-content-height in the popover example
This is what the property was invented for.
2016-06-19 23:07:17 -04:00
Matthias Clasen
c2534af15e gtk3-demo: Fix the modelbutton example
The color menu buttons didn't have the necessary target property
to be successfully activated.
2016-06-19 22:56:20 -04:00
Matthias Clasen
2fd984987d gtk-demo: Fix up some warnings
The search entry example was a bit sloppy in cleaning up its
sources, causing warnings.
2016-06-19 22:47:57 -04:00