Compare commits
383 Commits
incrementa
...
sort-list-
Author | SHA1 | Date | |
---|---|---|---|
|
0b7f7028d9 | ||
|
5dba053ad1 | ||
|
cd8a810d69 | ||
|
8f63a5ab63 | ||
|
eb3381723f | ||
|
7e87ad1887 | ||
|
ef6babf896 | ||
|
7f9570b95b | ||
|
d8d8a71a7a | ||
|
2ff3e3d1e4 | ||
|
73f4f518b8 | ||
|
6e9dbba130 | ||
|
706aa93ab5 | ||
|
54deed9a5a | ||
|
0e70ddcab3 | ||
|
f2bdb1fb87 | ||
|
ec9fd76c87 | ||
|
bacaa5eb9a | ||
|
9a297516ba | ||
|
e9bff53015 | ||
|
3078b180fe | ||
|
556997f9df | ||
|
d375dce9f5 | ||
|
d7266b25ba | ||
|
2a43ce1705 | ||
|
3324a6e6b3 | ||
|
46423e614d | ||
|
f7b73b2e01 | ||
|
c85e424279 | ||
|
b146c48e23 | ||
|
3176d69009 | ||
|
89f7d841ab | ||
|
7e2fceebca | ||
|
1e00c887ec | ||
|
561d3c68a0 | ||
|
03601cb794 | ||
|
3108b8b4d3 | ||
|
d1afe32762 | ||
|
603dd72b09 | ||
|
e81ba8924a | ||
|
8832ab45d9 | ||
|
87d6e17bc7 | ||
|
a5033cd79b | ||
|
44cbf3d605 | ||
|
fb6288791e | ||
|
2160f52cbf | ||
|
8825e621c9 | ||
|
e22abd73f2 | ||
|
f77d4d7fc0 | ||
|
8243133ca7 | ||
|
63a4345d2c | ||
|
56685a483d | ||
|
b23f793753 | ||
|
2b19e2fc1f | ||
|
703f8b8136 | ||
|
5b18968867 | ||
|
e8c4e1205a | ||
|
bf5c540357 | ||
|
c03383d3e5 | ||
|
eaaa287078 | ||
|
554defaf1a | ||
|
659fe52b7b | ||
|
0970077af9 | ||
|
814c88fbc1 | ||
|
3b24c8a0a4 | ||
|
e34c7e6796 | ||
|
8c608e9c1c | ||
|
283c3b70dd | ||
|
93599c2c48 | ||
|
080e625090 | ||
|
26696a741e | ||
|
a209e54b8f | ||
|
8921dadaa1 | ||
|
47232acbd8 | ||
|
cbad8ec2e4 | ||
|
800170b47d | ||
|
97c5cb3514 | ||
|
081afc0477 | ||
|
e807fc3be0 | ||
|
a1bd3389ed | ||
|
03a3b5a0b1 | ||
|
1ee2d9a5fa | ||
|
2e07fcd680 | ||
|
d3365d5a60 | ||
|
9dbf99d91a | ||
|
0154a7f528 | ||
|
add47bebc6 | ||
|
514b62223d | ||
|
7884ab6161 | ||
|
bc542c5304 | ||
|
d66ac4981e | ||
|
9b647a47d1 | ||
|
b67ffe9650 | ||
|
2c519b006d | ||
|
852429d163 | ||
|
ee9c6bbf75 | ||
|
d9ece94377 | ||
|
486fbce42b | ||
|
ed92026632 | ||
|
05e614feb7 | ||
|
14059afdf1 | ||
|
9b294eb94e | ||
|
96d42cf1cc | ||
|
4786a16696 | ||
|
14bb12125f | ||
|
07e8dafcea | ||
|
ab67a81f11 | ||
|
aa76f7e210 | ||
|
0c15463e41 | ||
|
5df1356295 | ||
|
95fc81c565 | ||
|
378e594f75 | ||
|
86c7fceb09 | ||
|
b5e20a3e37 | ||
|
75a30b1f98 | ||
|
c64a021af4 | ||
|
9b64635925 | ||
|
7b76be5360 | ||
|
2e2336ffce | ||
|
76d80ef516 | ||
|
287d80bd36 | ||
|
77072b3eaa | ||
|
c7833bb090 | ||
|
899024cef7 | ||
|
4da3edd42e | ||
|
6b59626817 | ||
|
7c02ae00c2 | ||
|
80e29a3627 | ||
|
26163a4f30 | ||
|
dbd88fc210 | ||
|
2de31e4cac | ||
|
1bff328895 | ||
|
facf78a5b6 | ||
|
6b19fcd859 | ||
|
ca784e3e1a | ||
|
314c8558d7 | ||
|
af30a7fe06 | ||
|
9ffd7d1970 | ||
|
cb906c80eb | ||
|
96ce0eb600 | ||
|
0e476c1f28 | ||
|
f2924988db | ||
|
671435e07f | ||
|
b17cfb9b65 | ||
|
0385f1aaf4 | ||
|
8611faf338 | ||
|
7e19911d3f | ||
|
c1f5153f6d | ||
|
2bd87ce771 | ||
|
de0547ede7 | ||
|
14589c2a59 | ||
|
f678b3804d | ||
|
720c298786 | ||
|
f721d2de15 | ||
|
11f07cb5ad | ||
|
37d7ab88dc | ||
|
6cde64072d | ||
|
6a60b0f591 | ||
|
339d9f05e4 | ||
|
4e4207457f | ||
|
46bb3e3046 | ||
|
34008e6aab | ||
|
d6b3ac850d | ||
|
9742200ff6 | ||
|
ec10857b84 | ||
|
353d4d161c | ||
|
bcd650f169 | ||
|
72d66dfcdd | ||
|
5e97df5058 | ||
|
059d131e2b | ||
|
8f7c207c7c | ||
|
b9e8935037 | ||
|
5f33f4ae8e | ||
|
adf0e8b1e6 | ||
|
7500f9b255 | ||
|
a8d433dd26 | ||
|
ecaf6fced0 | ||
|
31a7cac4a6 | ||
|
5eec736b07 | ||
|
cf4a8e2152 | ||
|
31bb969cce | ||
|
f4a7c7f6bf | ||
|
495069c868 | ||
|
dfe470475b | ||
|
de56e892aa | ||
|
e518c1f2f3 | ||
|
c5ea59d7d1 | ||
|
22eccbdbb6 | ||
|
58e85c85e4 | ||
|
6b89148487 | ||
|
ddb9e428ec | ||
|
b7fa353db2 | ||
|
87b5eadb7c | ||
|
60a09e59e8 | ||
|
6f8e9bf3a9 | ||
|
90b7b84337 | ||
|
088b5fc57f | ||
|
a4cd974912 | ||
|
65359dcc59 | ||
|
ac8b398c50 | ||
|
aac2417893 | ||
|
ad8892df10 | ||
|
edc7977c4e | ||
|
8bf8ac5076 | ||
|
c36cbd5140 | ||
|
ee96bc7185 | ||
|
f94f325636 | ||
|
6c1217dd93 | ||
|
edb792503b | ||
|
3a43859286 | ||
|
c55dd104d4 | ||
|
497d137fb8 | ||
|
df01c5c7a4 | ||
|
2d1135fba6 | ||
|
f54ed6f7dc | ||
|
b7efd896b6 | ||
|
46eb51bc30 | ||
|
500dbaabc3 | ||
|
594ec3d822 | ||
|
f280508209 | ||
|
480b88c776 | ||
|
a4e63905b1 | ||
|
5666127dbc | ||
|
c1c110ba65 | ||
|
eb2a839892 | ||
|
1c537a6d2e | ||
|
c12261a6ec | ||
|
5af7d6bff3 | ||
|
de0f4b0f5b | ||
|
966ab1152d | ||
|
74a4432688 | ||
|
115d0cdc07 | ||
|
d0ec616fba | ||
|
38cce2bb18 | ||
|
9cb7002b98 | ||
|
eb9c91c0a9 | ||
|
be07153efa | ||
|
627ec82e60 | ||
|
ccc34ca06c | ||
|
2b5dd0082d | ||
|
7b36b339aa | ||
|
b7eb663b82 | ||
|
1b28353be5 | ||
|
a07c030d02 | ||
|
339cccdf53 | ||
|
577126e99c | ||
|
125ea5ee4a | ||
|
3c5afc06d1 | ||
|
f87c15f4f9 | ||
|
fe5c0e2fe3 | ||
|
c8421cfd82 | ||
|
fbf99b8d65 | ||
|
57312c9b79 | ||
|
35d2539ef8 | ||
|
08a4f4552c | ||
|
6502d3669f | ||
|
53831e67a7 | ||
|
e742fc1206 | ||
|
4ef5ee23e6 | ||
|
4a8330fda0 | ||
|
b4096cee64 | ||
|
032302c358 | ||
|
a888e1cb65 | ||
|
c80b33b2ad | ||
|
f32239df1f | ||
|
22c1b541df | ||
|
78a59c95fe | ||
|
7583d48266 | ||
|
f1188aaeac | ||
|
4dac5c222f | ||
|
0145809a94 | ||
|
2e6b8810c0 | ||
|
d8abcdb5a1 | ||
|
65ecfa20dd | ||
|
aa5ab02166 | ||
|
7ddbbb50ff | ||
|
f2eb036119 | ||
|
8a8b96bf4b | ||
|
bdcda2d8f0 | ||
|
ef3f997d55 | ||
|
b41d380230 | ||
|
0210850e86 | ||
|
053223bf65 | ||
|
746b84cc0f | ||
|
f1ad883e00 | ||
|
191e0e8d5e | ||
|
55217e2181 | ||
|
7c8cd23c5f | ||
|
6aafb81702 | ||
|
0578422612 | ||
|
ad04da84c9 | ||
|
333b013f7f | ||
|
b3dc517565 | ||
|
70e4dabe89 | ||
|
d3443d6f2a | ||
|
a508f68044 | ||
|
f191b64bbc | ||
|
e9efe77839 | ||
|
d98c0d32f2 | ||
|
dfa2dcceb8 | ||
|
d441e7106b | ||
|
4cd92f979c | ||
|
d1a068e5b1 | ||
|
4d90846182 | ||
|
986f721938 | ||
|
7903246355 | ||
|
0252ae2be3 | ||
|
fa90e42a38 | ||
|
2d36109565 | ||
|
de8258171a | ||
|
2ed6224778 | ||
|
e1a0171094 | ||
|
395521f3d3 | ||
|
8c95a84ea4 | ||
|
75db19c789 | ||
|
f00d2b30bb | ||
|
c0c5ce2f9b | ||
|
ee9f9ae05e | ||
|
387649ded4 | ||
|
be12131d74 | ||
|
896ebdc9d7 | ||
|
bc58bd0b83 | ||
|
8d4c87876b | ||
|
cebc99ddc7 | ||
|
1b62203f18 | ||
|
06dd8c2cfd | ||
|
5da21ca4dc | ||
|
3e16ef33b0 | ||
|
2746a2d929 | ||
|
e31bacf7be | ||
|
911ae64931 | ||
|
99a0b35705 | ||
|
89bf8af878 | ||
|
f3744c991a | ||
|
dcee15c0f1 | ||
|
2321e9de05 | ||
|
73dcda460f | ||
|
0f8bc67a98 | ||
|
379d830123 | ||
|
bc8bc68b80 | ||
|
8c4df51a14 | ||
|
06d67d2384 | ||
|
cc8bb5fc54 | ||
|
8fb1e33d0f | ||
|
0dc946da63 | ||
|
26a23d3e56 | ||
|
766f4bc8fe | ||
|
3d008d5929 | ||
|
0546e26434 | ||
|
e6d8eedc00 | ||
|
13b37b0ba4 | ||
|
779c71b66d | ||
|
8e73d007f5 | ||
|
e376d638fb | ||
|
52982a88aa | ||
|
422c1d9c0d | ||
|
ccc8ad8700 | ||
|
6b0eb970d8 | ||
|
775e35865c | ||
|
49ce680d53 | ||
|
463f3d3a52 | ||
|
f6347f18b0 | ||
|
2e959fe300 | ||
|
56f771ba29 | ||
|
32e96215b4 | ||
|
86f800e11d | ||
|
4d371b2b16 | ||
|
7e97c2513f | ||
|
2bf5a150e6 | ||
|
18c87faaa5 | ||
|
fdeda388bf | ||
|
ea2c27c640 | ||
|
dfc04a590d | ||
|
fe5b364675 | ||
|
9b73c55559 | ||
|
0b38a0663d | ||
|
e5c0716293 | ||
|
54a3293cad | ||
|
818287a7ce | ||
|
59119cd898 | ||
|
130bd5937c | ||
|
2fb755e0c9 | ||
|
cd096819d8 |
@@ -19,8 +19,8 @@ variables:
|
||||
COMMON_MESON_FLAGS: "--fatal-meson-warnings --werror"
|
||||
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true -Dvulkan=yes"
|
||||
FEATURE_FLAGS: "-Dcloudproviders=true"
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v17"
|
||||
MESON_TEST_TIMEOUT_MULTIPLIER: 3
|
||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v20"
|
||||
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
|
||||
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v19"
|
||||
|
||||
@@ -180,6 +180,22 @@ static-scan:
|
||||
- _scan_build/meson-logs
|
||||
allow_failure: true
|
||||
|
||||
# Run tests with the address sanitizer. We need to turn off introspection,
|
||||
# since it is incompatible with asan
|
||||
asan-build:
|
||||
image: $FEDORA_IMAGE
|
||||
tags: [ asan ]
|
||||
stage: analysis
|
||||
variables:
|
||||
script:
|
||||
- CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=false _build
|
||||
- ninja -C _build
|
||||
- .gitlab-ci/run-tests.sh _build wayland
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/meson-logs
|
||||
allow_failure: true
|
||||
|
||||
reference:
|
||||
image: $DOCS_IMAGE
|
||||
stage: docs
|
||||
|
0
.gitlab-ci/.lock
Normal file
0
.gitlab-ci/.lock
Normal file
@@ -35,4 +35,13 @@ branch, as well as their available versions.
|
||||
- [ ] Add the new job to `.gitlab-ci.yml` referencing the image
|
||||
- [ ] Open a merge request with your changes and let it run
|
||||
|
||||
### Checklist for Adding a new dependency to a CI image
|
||||
|
||||
Our images are layered, and the base (called fedora-base) contains
|
||||
all the rpm payload. Therefore, adding a new dependency is a 2-step
|
||||
process:
|
||||
|
||||
1. [ ] Build and upload fedora-base:$version+1
|
||||
1. [ ] Build and upload fedora:$version+1 based on fedora-base:version+1
|
||||
|
||||
[registry]: https://gitlab.gnome.org/GNOME/gtk/container_registry
|
||||
|
@@ -41,12 +41,14 @@ RUN dnf -y install \
|
||||
itstool \
|
||||
json-glib-devel \
|
||||
lcov \
|
||||
libasan \
|
||||
libattr-devel \
|
||||
libepoxy-devel \
|
||||
libffi-devel \
|
||||
libmount-devel \
|
||||
librsvg2 \
|
||||
libselinux-devel \
|
||||
libubsan \
|
||||
libXcomposite-devel \
|
||||
libXcursor-devel \
|
||||
libXcursor-devel \
|
||||
|
@@ -1,4 +1,4 @@
|
||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v19
|
||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v20
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
|
@@ -7,10 +7,14 @@ srcdir=$( pwd )
|
||||
builddir=$1
|
||||
backend=$2
|
||||
|
||||
# Ignore memory leaks lower in dependencies
|
||||
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp
|
||||
|
||||
case "${backend}" in
|
||||
x11)
|
||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
@@ -30,6 +34,7 @@ case "${backend}" in
|
||||
export WAYLAND_DISPLAY=wayland-5
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
@@ -48,6 +53,7 @@ case "${backend}" in
|
||||
export BROADWAY_DISPLAY=:5
|
||||
|
||||
meson test -C ${builddir} \
|
||||
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||
--print-errorlogs \
|
||||
--setup=${backend} \
|
||||
--suite=gtk \
|
||||
|
86
NEWS
86
NEWS
@@ -1,3 +1,89 @@
|
||||
Overview of Changes in GTK 3.99.0
|
||||
=================================
|
||||
|
||||
* Add GtkEditableLabel, a label that can be edited
|
||||
|
||||
* Add GtkBookmarkList, a list model for bookmarks
|
||||
|
||||
* Add GtkStringList, a list model for strings
|
||||
|
||||
* Add GtkBitset, and use it for representing selections
|
||||
|
||||
* GtkTreeView:
|
||||
- Make cell editing work again
|
||||
|
||||
* GtkSpinButton:
|
||||
- Make autosizing work again
|
||||
|
||||
* Printing:
|
||||
- Use GtkDropDown in the print dialog
|
||||
|
||||
* GtkApplication
|
||||
- Support opening files on OS X
|
||||
|
||||
* GtkFileChooser:
|
||||
- Fix libcloudproviders support
|
||||
- Turn GtkFileFilter into a GtkFilter
|
||||
- Simplify the api
|
||||
|
||||
* GtkGridView, GtkListView:
|
||||
- Improve scrolling behavior
|
||||
- Autoscroll and autoexpand during DND
|
||||
|
||||
* GtkScrolledWindow:
|
||||
- Make autoscrolling work again
|
||||
|
||||
* GtkFilterListModel:
|
||||
- Add incremental filtering
|
||||
|
||||
* GtkSortListModel:
|
||||
- Use timsort
|
||||
- Add various tweaks that massively speed up sorting
|
||||
- Add incremental sorting
|
||||
|
||||
* GtkWidget:
|
||||
- Massively speed up action handling
|
||||
|
||||
* GtkEntry:
|
||||
- Make entry completion work again
|
||||
- Drop action support from GtkEntryCompletion
|
||||
|
||||
* Inspector:
|
||||
- Improve list model support
|
||||
- Add direct navigation between objects
|
||||
|
||||
* GDK:
|
||||
- Compress scroll events
|
||||
- Keep a scroll history
|
||||
- Clean up GdkDevice api
|
||||
- Improve frame clock accuracy
|
||||
- Add a new macOS backend
|
||||
|
||||
* GSK:
|
||||
- Use GL_ARB_framebuffer_object
|
||||
|
||||
* gtk-demo:
|
||||
- Add incremental refill to the color grid
|
||||
- Improve performance of the color grid
|
||||
- Add an incrementally filtering word list
|
||||
- Improve the sidebar
|
||||
|
||||
* Install print-editor as another demo
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
Catalan
|
||||
Chinese
|
||||
Japanese
|
||||
Kazakh
|
||||
Lithuanian
|
||||
Polish
|
||||
Romanian
|
||||
Spanish
|
||||
Turkish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in GTK 3.98.5
|
||||
=================================
|
||||
|
||||
|
@@ -1,29 +1,38 @@
|
||||
{
|
||||
"app-id": "org.gtk.WidgetFactory4",
|
||||
"runtime": "org.gnome.Platform",
|
||||
"runtime-version": "master",
|
||||
"sdk": "org.gnome.Sdk",
|
||||
"command": "gtk4-widget-factory",
|
||||
"tags": ["devel", "development", "nightly"],
|
||||
"desktop-file-name-prefix": "(Development) ",
|
||||
"finish-args": [
|
||||
"app-id" : "org.gtk.WidgetFactory4",
|
||||
"runtime" : "org.gnome.Platform",
|
||||
"runtime-version" : "master",
|
||||
"sdk" : "org.gnome.Sdk",
|
||||
"command" : "gtk4-widget-factory",
|
||||
"tags" : [
|
||||
"devel",
|
||||
"development",
|
||||
"nightly"
|
||||
],
|
||||
"desktop-file-name-prefix" : "(Development) ",
|
||||
"finish-args" : [
|
||||
"--device=dri",
|
||||
"--share=ipc",
|
||||
"--socket=fallback-x11",
|
||||
"--socket=wayland",
|
||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*"
|
||||
"--talk-name=org.gtk.vfs",
|
||||
"--talk-name=org.gtk.vfs.*"
|
||||
],
|
||||
"cleanup": [
|
||||
"cleanup" : [
|
||||
"/include",
|
||||
"/lib/pkgconfig", "/share/pkgconfig",
|
||||
"/lib/pkgconfig",
|
||||
"/share/pkgconfig",
|
||||
"/share/aclocal",
|
||||
"/man", "/share/man", "/share/gtk-doc",
|
||||
"*.la", ".a",
|
||||
"/man",
|
||||
"/share/man",
|
||||
"/share/gtk-doc",
|
||||
"*.la",
|
||||
".a",
|
||||
"/lib/girepository-1.0",
|
||||
"/share/gir-1.0",
|
||||
"/share/doc"
|
||||
],
|
||||
"modules": [
|
||||
"modules" : [
|
||||
{
|
||||
"name" : "wayland",
|
||||
"buildsystem" : "autotools",
|
||||
@@ -39,18 +48,18 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "graphene",
|
||||
"buildsystem": "meson",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"name" : "graphene",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib",
|
||||
"-Dtests=false",
|
||||
"-Dbenchmarks=false"
|
||||
],
|
||||
"sources": [
|
||||
"sources" : [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/ebassi/graphene.git"
|
||||
"type" : "git",
|
||||
"url" : "https://github.com/ebassi/graphene.git"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -58,7 +67,7 @@
|
||||
"name" : "libsass",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts": [
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
@@ -73,7 +82,7 @@
|
||||
"name" : "sassc",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts": [
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources" : [
|
||||
@@ -85,18 +94,23 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "gtk",
|
||||
"buildsystem": "meson",
|
||||
"builddir": true,
|
||||
"config-opts": [
|
||||
"name" : "gtk",
|
||||
"buildsystem" : "meson",
|
||||
"builddir" : true,
|
||||
"config-opts" : [
|
||||
"--libdir=/app/lib"
|
||||
],
|
||||
"sources": [
|
||||
"sources" : [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
|
||||
"type" : "git",
|
||||
"url" : "https://gitlab.gnome.org/GNOME/gtk.git"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"build-options" : {
|
||||
"env" : {
|
||||
"DBUS_SESSION_BUS_ADDRESS" : "''"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,13 @@ if 'DESTDIR' not in os.environ:
|
||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||
|
||||
print('Compiling GSettings schemas...')
|
||||
subprocess.call(['glib-compile-schemas',
|
||||
glib_compile_schemas = subprocess.check_output(['pkg-config',
|
||||
'--variable=glib_compile_schemas',
|
||||
'gio-2.0']).strip()
|
||||
if not os.path.exists(glib_compile_schemas):
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
glib_compile_schemas = 'glib-compile-schemas'
|
||||
subprocess.call([glib_compile_schemas,
|
||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||
|
||||
print('Updating icon cache...')
|
||||
@@ -24,8 +30,14 @@ if 'DESTDIR' not in os.environ:
|
||||
|
||||
print('Updating module cache for print backends...')
|
||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||
subprocess.call(['gio-querymodules', gtk_printmodule_dir])
|
||||
gio_querymodules = subprocess.check_output(['pkg-config',
|
||||
'--variable=gio_querymodules',
|
||||
'gio-2.0']).strip()
|
||||
if not os.path.exists(gio_querymodules):
|
||||
# pkg-config variables only available since GLib 2.62.0.
|
||||
gio_querymodules = 'gio-querymodules'
|
||||
subprocess.call([gio_querymodules, gtk_printmodule_dir])
|
||||
|
||||
print('Updating module cache for input methods...')
|
||||
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
||||
subprocess.call(['gio-querymodules', gtk_immodule_dir])
|
||||
subprocess.call([gio_querymodules, gtk_immodule_dir])
|
||||
|
@@ -81,11 +81,11 @@ constraint_editor_application_activate (GApplication *app)
|
||||
static void
|
||||
constraint_editor_application_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
ConstraintEditorWindow *win;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
{
|
||||
|
@@ -193,7 +193,7 @@ constraint_editor_window_load (ConstraintEditorWindow *self,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
ConstraintEditorWindow *self)
|
||||
{
|
||||
gtk_native_dialog_hide (dialog);
|
||||
@@ -285,7 +285,7 @@ serialize_model (GListModel *list)
|
||||
|
||||
static void
|
||||
save_response_cb (GtkNativeDialog *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
ConstraintEditorWindow *self)
|
||||
{
|
||||
gtk_native_dialog_hide (dialog);
|
||||
|
@@ -174,28 +174,25 @@ constraint_view_init (ConstraintView *self)
|
||||
manager = gtk_constraint_layout_new ();
|
||||
gtk_widget_set_layout_manager (GTK_WIDGET (self), manager);
|
||||
|
||||
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
|
||||
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
|
||||
guides = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (manager));
|
||||
|
||||
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
|
||||
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
|
||||
constraints = (GListModel *)gtk_filter_list_model_new (all_constraints, filter);
|
||||
g_object_unref (filter);
|
||||
|
||||
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
|
||||
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
|
||||
children = (GListModel *)gtk_filter_list_model_new (all_children, filter);
|
||||
g_object_unref (filter);
|
||||
|
||||
list = g_list_store_new (G_TYPE_LIST_MODEL);
|
||||
g_list_store_append (list, children);
|
||||
g_list_store_append (list, guides);
|
||||
g_list_store_append (list, constraints);
|
||||
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
|
||||
g_object_unref (children);
|
||||
g_object_unref (guides);
|
||||
g_object_unref (constraints);
|
||||
g_object_unref (all_children);
|
||||
g_object_unref (all_constraints);
|
||||
g_object_unref (list);
|
||||
|
||||
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
|
||||
|
||||
controller = (GtkEventController *)gtk_gesture_drag_new ();
|
||||
g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self);
|
||||
|
@@ -34,7 +34,7 @@ static void create_window (GApplication *app, const char *contents);
|
||||
static void
|
||||
show_action_dialog (GSimpleAction *action)
|
||||
{
|
||||
const gchar *name;
|
||||
const char *name;
|
||||
GtkWidget *dialog;
|
||||
|
||||
name = g_action_get_name (G_ACTION (action));
|
||||
@@ -58,9 +58,9 @@ show_action_infobar (GSimpleAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
DemoApplicationWindow *window = data;
|
||||
gchar *text;
|
||||
const gchar *name;
|
||||
const gchar *value;
|
||||
char *text;
|
||||
const char *name;
|
||||
const char *value;
|
||||
|
||||
name = g_action_get_name (G_ACTION (action));
|
||||
value = g_variant_get_string (parameter, NULL);
|
||||
@@ -92,7 +92,7 @@ activate_new (GSimpleAction *action,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
gint response_id,
|
||||
int response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFileChooserNative *native = user_data;
|
||||
@@ -185,7 +185,7 @@ activate_about (GSimpleAction *action,
|
||||
{
|
||||
GtkWidget *window = user_data;
|
||||
|
||||
const gchar *authors[] = {
|
||||
const char *authors[] = {
|
||||
"Peter Mattis",
|
||||
"Spencer Kimball",
|
||||
"Josh MacDonald",
|
||||
@@ -193,7 +193,7 @@ activate_about (GSimpleAction *action,
|
||||
NULL
|
||||
};
|
||||
|
||||
const gchar *documentors[] = {
|
||||
const char *documentors[] = {
|
||||
"Owen Taylor",
|
||||
"Tony Gale",
|
||||
"Matthias Clasen <mclasen@redhat.com>",
|
||||
@@ -244,9 +244,9 @@ static void
|
||||
update_statusbar (GtkTextBuffer *buffer,
|
||||
DemoApplicationWindow *window)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
gint count;
|
||||
char *msg;
|
||||
int row, col;
|
||||
int count;
|
||||
GtkTextIter iter;
|
||||
|
||||
/* clear any previous message, underflow is allowed */
|
||||
|
@@ -16,8 +16,8 @@ static GtkWidget *placeholder;
|
||||
|
||||
static void
|
||||
on_name_appeared (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
const gchar *name_owner,
|
||||
const char *name,
|
||||
const char *name_owner,
|
||||
gpointer user_data)
|
||||
{
|
||||
name_seen = TRUE;
|
||||
@@ -25,7 +25,7 @@ on_name_appeared (GDBusConnection *connection,
|
||||
|
||||
static void
|
||||
on_name_vanished (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
const char *name,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (!name_seen)
|
||||
@@ -55,7 +55,7 @@ do_application_demo (GtkWidget *toplevel)
|
||||
|
||||
if (placeholder == NULL)
|
||||
{
|
||||
const gchar *command;
|
||||
const char *command;
|
||||
GError *error = NULL;
|
||||
|
||||
if (g_file_test ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
||||
|
@@ -12,7 +12,7 @@ static GtkWidget *progress_bar = NULL;
|
||||
static gboolean
|
||||
apply_changes_gradually (gpointer data)
|
||||
{
|
||||
gdouble fraction;
|
||||
double fraction;
|
||||
|
||||
/* Work, work, work... */
|
||||
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
|
||||
@@ -47,8 +47,8 @@ on_assistant_close_cancel (GtkWidget *widget, gpointer data)
|
||||
static void
|
||||
on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
|
||||
{
|
||||
gint current_page, n_pages;
|
||||
gchar *title;
|
||||
int current_page, n_pages;
|
||||
char *title;
|
||||
|
||||
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget));
|
||||
n_pages = gtk_assistant_get_n_pages (GTK_ASSISTANT (widget));
|
||||
@@ -70,8 +70,8 @@ on_entry_changed (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GtkAssistant *assistant = GTK_ASSISTANT (data);
|
||||
GtkWidget *current_page;
|
||||
gint page_number;
|
||||
const gchar *text;
|
||||
int page_number;
|
||||
const char *text;
|
||||
|
||||
page_number = gtk_assistant_get_current_page (assistant);
|
||||
current_page = gtk_assistant_get_nth_page (assistant, page_number);
|
||||
|
@@ -38,7 +38,7 @@ create_icon_store (void)
|
||||
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
@@ -77,7 +77,7 @@ set_sensitive (GtkCellLayout *cell_layout,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gint *indices;
|
||||
int *indices;
|
||||
gboolean sensitive;
|
||||
|
||||
path = gtk_tree_model_get_path (tree_model, iter);
|
||||
@@ -175,7 +175,7 @@ create_capital_store (void)
|
||||
|
||||
GtkTreeIter iter, iter2;
|
||||
GtkTreeStore *store;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
store = gtk_tree_store_new (1, G_TYPE_STRING);
|
||||
|
||||
|
@@ -38,14 +38,14 @@ struct {
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
static void
|
||||
update_css_for_blend_mode (GtkCssProvider *provider,
|
||||
const gchar *blend_mode)
|
||||
const char *blend_mode)
|
||||
{
|
||||
GBytes *bytes;
|
||||
gchar *css;
|
||||
char *css;
|
||||
|
||||
bytes = g_resources_lookup_data ("/css_blendmodes/css_blendmodes.css", 0, NULL);
|
||||
|
||||
css = g_strdup_printf ((gchar*) g_bytes_get_data (bytes, NULL),
|
||||
css = g_strdup_printf ((char *) g_bytes_get_data (bytes, NULL),
|
||||
blend_mode,
|
||||
blend_mode,
|
||||
blend_mode);
|
||||
@@ -62,7 +62,7 @@ row_activated (GtkListBox *listbox,
|
||||
GtkListBoxRow *row,
|
||||
GtkCssProvider *provider)
|
||||
{
|
||||
const gchar *blend_mode;
|
||||
const char *blend_mode;
|
||||
|
||||
blend_mode = blend_modes[gtk_list_box_row_get_index (row)].id;
|
||||
|
||||
@@ -75,7 +75,7 @@ setup_listbox (GtkBuilder *builder,
|
||||
{
|
||||
GtkWidget *normal_row;
|
||||
GtkWidget *listbox;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
normal_row = NULL;
|
||||
listbox = gtk_list_box_new ();
|
||||
|
@@ -17,7 +17,7 @@ G_DEFINE_TYPE(DemoImage, demo_image, GTK_TYPE_WIDGET)
|
||||
static GdkPaintable *
|
||||
get_image_paintable (GtkImage *image)
|
||||
{
|
||||
const gchar *icon_name;
|
||||
const char *icon_name;
|
||||
GtkIconTheme *icon_theme;
|
||||
GtkIconPaintable *icon;
|
||||
|
||||
|
@@ -16,7 +16,7 @@ message_dialog_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
static gint i = 1;
|
||||
static int i = 1;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
|
@@ -597,6 +597,83 @@ css_button_new (const char *class)
|
||||
return button;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
GdkRGBA color;
|
||||
} ColorSwatch;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
} ColorSwatchClass;
|
||||
|
||||
G_DEFINE_TYPE (ColorSwatch, color_swatch, GTK_TYPE_WIDGET)
|
||||
|
||||
static GdkContentProvider *
|
||||
color_swatch_drag_prepare (GtkDragSource *source,
|
||||
double x,
|
||||
double y,
|
||||
ColorSwatch *swatch)
|
||||
{
|
||||
return gdk_content_provider_new_typed (GDK_TYPE_RGBA, &swatch->color);
|
||||
}
|
||||
|
||||
static void
|
||||
color_swatch_init (ColorSwatch *swatch)
|
||||
{
|
||||
GtkDragSource *source = gtk_drag_source_new ();
|
||||
g_signal_connect (source, "prepare", G_CALLBACK (color_swatch_drag_prepare), swatch);
|
||||
gtk_widget_add_controller (GTK_WIDGET (swatch), GTK_EVENT_CONTROLLER (source));
|
||||
}
|
||||
|
||||
static void
|
||||
color_swatch_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
ColorSwatch *swatch = (ColorSwatch *)widget;
|
||||
float w = gtk_widget_get_width (widget);
|
||||
float h = gtk_widget_get_height (widget);
|
||||
|
||||
gtk_snapshot_append_color (snapshot, &swatch->color,
|
||||
&GRAPHENE_RECT_INIT(0, 0, w, h));
|
||||
}
|
||||
|
||||
void
|
||||
color_swatch_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum_size,
|
||||
int *natural_size,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
*minimum_size = *natural_size = 48;
|
||||
else
|
||||
*minimum_size = *natural_size = 32;
|
||||
}
|
||||
|
||||
static void
|
||||
color_swatch_class_init (ColorSwatchClass *class)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
widget_class->snapshot = color_swatch_snapshot;
|
||||
widget_class->measure = color_swatch_measure;
|
||||
gtk_widget_class_set_css_name (widget_class, "colorswatch");
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
color_swatch_new (const char *color)
|
||||
{
|
||||
ColorSwatch *swatch = g_object_new (color_swatch_get_type (), NULL);
|
||||
|
||||
gdk_rgba_parse (&swatch->color, color);
|
||||
|
||||
return GTK_WIDGET (swatch);
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
@@ -670,18 +747,7 @@ do_dnd (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box3);
|
||||
|
||||
for (i = 0; colors[i]; i++)
|
||||
{
|
||||
GdkRGBA rgba;
|
||||
GtkWidget *swatch;
|
||||
|
||||
gdk_rgba_parse (&rgba, colors[i]);
|
||||
|
||||
swatch = g_object_new (g_type_from_name ("GtkColorSwatch"),
|
||||
"rgba", &rgba,
|
||||
"selectable", FALSE,
|
||||
NULL);
|
||||
gtk_box_append (GTK_BOX (box3), swatch);
|
||||
}
|
||||
gtk_box_append (GTK_BOX (box3), color_swatch_new (colors[i]));
|
||||
|
||||
gtk_box_append (GTK_BOX (box3), css_button_new ("rainbow1"));
|
||||
gtk_box_append (GTK_BOX (box3), css_button_new ("rainbow2"));
|
||||
|
@@ -64,8 +64,8 @@ scribble_draw (GtkDrawingArea *da,
|
||||
/* Draw a rectangle on the screen */
|
||||
static void
|
||||
draw_brush (GtkWidget *widget,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
double x,
|
||||
double y)
|
||||
{
|
||||
GdkRectangle update_rect;
|
||||
cairo_t *cr;
|
||||
|
@@ -16,9 +16,9 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint number;
|
||||
gchar *product;
|
||||
gint yummy;
|
||||
int number;
|
||||
char *product;
|
||||
int yummy;
|
||||
}
|
||||
Item;
|
||||
|
||||
@@ -74,7 +74,7 @@ add_items (void)
|
||||
static GtkTreeModel *
|
||||
create_items_model (void)
|
||||
{
|
||||
gint i = 0;
|
||||
int i = 0;
|
||||
GtkListStore *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
@@ -109,7 +109,7 @@ static GtkTreeModel *
|
||||
create_numbers_model (void)
|
||||
{
|
||||
#define N_NUMBERS 10
|
||||
gint i = 0;
|
||||
int i = 0;
|
||||
GtkListStore *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
@@ -192,7 +192,7 @@ remove_item (GtkWidget *widget, gpointer data)
|
||||
|
||||
if (gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
GtkTreePath *path;
|
||||
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
@@ -211,7 +211,7 @@ separator_row (GtkTreeModel *model,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gint idx;
|
||||
int idx;
|
||||
|
||||
path = gtk_tree_model_get_path (model, iter);
|
||||
idx = gtk_tree_path_get_indices (path)[0];
|
||||
@@ -224,7 +224,7 @@ separator_row (GtkTreeModel *model,
|
||||
static void
|
||||
editing_started (GtkCellRenderer *cell,
|
||||
GtkCellEditable *editable,
|
||||
const gchar *path,
|
||||
const char *path,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
|
||||
@@ -233,15 +233,15 @@ editing_started (GtkCellRenderer *cell,
|
||||
|
||||
static void
|
||||
cell_edited (GtkCellRendererText *cell,
|
||||
const gchar *path_string,
|
||||
const gchar *new_text,
|
||||
const char *path_string,
|
||||
const char *new_text,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||
int column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
|
||||
@@ -249,7 +249,7 @@ cell_edited (GtkCellRendererText *cell,
|
||||
{
|
||||
case COLUMN_ITEM_NUMBER:
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_array_index (articles, Item, i).number = atoi (new_text);
|
||||
@@ -261,8 +261,8 @@ cell_edited (GtkCellRendererText *cell,
|
||||
|
||||
case COLUMN_ITEM_PRODUCT:
|
||||
{
|
||||
gint i;
|
||||
gchar *old_text;
|
||||
int i;
|
||||
char *old_text;
|
||||
|
||||
gtk_tree_model_get (model, &iter, column, &old_text, -1);
|
||||
g_free (old_text);
|
||||
|
@@ -13,7 +13,7 @@
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
response_cb (GtkDialog *dialog, gint response_id)
|
||||
response_cb (GtkDialog *dialog, int response_id)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
window = NULL;
|
||||
|
@@ -22,8 +22,8 @@ format_number (GtkTreeViewColumn *col,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gint num;
|
||||
gchar *text;
|
||||
int num;
|
||||
char *text;
|
||||
|
||||
gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1);
|
||||
text = g_strdup_printf ("%d", num);
|
||||
@@ -35,11 +35,11 @@ static void
|
||||
filter_modify_func (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
GValue *value,
|
||||
gint column,
|
||||
int column,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModelFilter *filter_model = GTK_TREE_MODEL_FILTER (model);
|
||||
gint width, height;
|
||||
int width, height;
|
||||
GtkTreeModel *child_model;
|
||||
GtkTreeIter child_iter;
|
||||
|
||||
@@ -75,7 +75,7 @@ visible_func (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gint width;
|
||||
int width;
|
||||
|
||||
gtk_tree_model_get (model, iter,
|
||||
WIDTH_COLUMN, &width,
|
||||
|
@@ -29,7 +29,7 @@ draw_color (GtkDrawingArea *drawingarea,
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
color_swatch_new (const gchar *color)
|
||||
color_swatch_new (const char *color)
|
||||
{
|
||||
GtkWidget *button, *area;
|
||||
|
||||
@@ -48,7 +48,7 @@ do_flowbox (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *scrolled, *flowbox;
|
||||
const gchar *colors[] = {
|
||||
const char *colors[] = {
|
||||
"AliceBlue",
|
||||
"AntiqueWhite",
|
||||
"AntiqueWhite1",
|
||||
@@ -716,7 +716,7 @@ do_flowbox (GtkWidget *do_widget)
|
||||
"YellowGreen",
|
||||
NULL
|
||||
};
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
|
@@ -295,7 +295,7 @@ update_display (void)
|
||||
GList *l;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
gint ins, bound;
|
||||
int ins, bound;
|
||||
guint start, end;
|
||||
PangoLanguage *lang;
|
||||
char *font_desc;
|
||||
@@ -479,7 +479,7 @@ update_script_combo (void)
|
||||
{
|
||||
GtkListStore *store;
|
||||
hb_font_t *hb_font;
|
||||
gint i, j, k;
|
||||
int i, j, k;
|
||||
PangoFont *pango_font;
|
||||
GHashTable *tags;
|
||||
GHashTableIter iter;
|
||||
@@ -593,7 +593,7 @@ update_script_combo (void)
|
||||
static void
|
||||
update_features (void)
|
||||
{
|
||||
gint i, j;
|
||||
int i, j;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
guint script_index, lang_index;
|
||||
@@ -728,8 +728,8 @@ static void
|
||||
entry_activated (GtkEntry *entry,
|
||||
GtkAdjustment *adjustment)
|
||||
{
|
||||
gdouble value;
|
||||
gchar *err = NULL;
|
||||
double value;
|
||||
char *err = NULL;
|
||||
|
||||
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
|
||||
if (err != NULL)
|
||||
@@ -939,7 +939,7 @@ instance_changed (GtkComboBox *combo)
|
||||
{
|
||||
Axis *axis;
|
||||
Axis akey;
|
||||
gdouble value;
|
||||
double value;
|
||||
|
||||
value = coords[ai[i].axis_index];
|
||||
|
||||
|
@@ -36,11 +36,11 @@ adjustment_get_normalized_value (GtkAdjustment *adj)
|
||||
|
||||
static void
|
||||
val_to_xy (GtkFontPlane *plane,
|
||||
gint *x,
|
||||
gint *y)
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
gdouble u, v;
|
||||
gint width, height;
|
||||
double u, v;
|
||||
int width, height;
|
||||
|
||||
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
|
||||
height = gtk_widget_get_allocated_height (GTK_WIDGET (plane));
|
||||
@@ -57,8 +57,8 @@ plane_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
GtkFontPlane *plane = GTK_FONT_PLANE (widget);
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
int x, y;
|
||||
int width, height;
|
||||
cairo_t *cr;
|
||||
|
||||
val_to_xy (plane, &x, &y);
|
||||
@@ -125,11 +125,11 @@ adjustment_set_normalized_value (GtkAdjustment *adj,
|
||||
|
||||
static void
|
||||
update_value (GtkFontPlane *plane,
|
||||
gint x,
|
||||
gint y)
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (plane);
|
||||
gdouble u, v;
|
||||
double u, v;
|
||||
|
||||
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
|
||||
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
|
||||
@@ -142,8 +142,8 @@ update_value (GtkFontPlane *plane,
|
||||
|
||||
static void
|
||||
plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
||||
gdouble start_x,
|
||||
gdouble start_y,
|
||||
double start_x,
|
||||
double start_y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
guint button;
|
||||
@@ -164,11 +164,11 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
||||
|
||||
static void
|
||||
plane_drag_gesture_update (GtkGestureDrag *gesture,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y,
|
||||
double offset_x,
|
||||
double offset_y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
gdouble start_x, start_y;
|
||||
double start_x, start_y;
|
||||
|
||||
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
|
||||
&start_x, &start_y);
|
||||
@@ -177,8 +177,8 @@ plane_drag_gesture_update (GtkGestureDrag *gesture,
|
||||
|
||||
static void
|
||||
plane_drag_gesture_end (GtkGestureDrag *gesture,
|
||||
gdouble offset_x,
|
||||
gdouble offset_y,
|
||||
double offset_x,
|
||||
double offset_y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
set_cross_cursor (GTK_WIDGET (plane), FALSE);
|
||||
|
@@ -9,8 +9,8 @@
|
||||
|
||||
static GtkGesture *rotate = NULL;
|
||||
static GtkGesture *zoom = NULL;
|
||||
static gdouble swipe_x = 0;
|
||||
static gdouble swipe_y = 0;
|
||||
static double swipe_x = 0;
|
||||
static double swipe_y = 0;
|
||||
static gboolean long_pressed = FALSE;
|
||||
|
||||
static gboolean
|
||||
@@ -26,8 +26,8 @@ touchpad_swipe_gesture_begin (GtkGesture *gesture,
|
||||
|
||||
static void
|
||||
swipe_gesture_swept (GtkGestureSwipe *gesture,
|
||||
gdouble velocity_x,
|
||||
gdouble velocity_y,
|
||||
double velocity_x,
|
||||
double velocity_y,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
swipe_x = velocity_x / 10;
|
||||
@@ -37,8 +37,8 @@ swipe_gesture_swept (GtkGestureSwipe *gesture,
|
||||
|
||||
static void
|
||||
long_press_gesture_pressed (GtkGestureLongPress *gesture,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
long_pressed = TRUE;
|
||||
@@ -56,8 +56,8 @@ long_press_gesture_end (GtkGesture *gesture,
|
||||
|
||||
static void
|
||||
rotation_angle_changed (GtkGestureRotate *gesture,
|
||||
gdouble angle,
|
||||
gdouble delta,
|
||||
double angle,
|
||||
double delta,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
gtk_widget_queue_draw (widget);
|
||||
@@ -65,7 +65,7 @@ rotation_angle_changed (GtkGestureRotate *gesture,
|
||||
|
||||
static void
|
||||
zoom_scale_changed (GtkGestureZoom *gesture,
|
||||
gdouble scale,
|
||||
double scale,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
gtk_widget_queue_draw (widget);
|
||||
@@ -93,8 +93,8 @@ drawing_area_draw (GtkDrawingArea *area,
|
||||
{
|
||||
cairo_pattern_t *pat;
|
||||
cairo_matrix_t matrix;
|
||||
gdouble angle, scale;
|
||||
gdouble x_center, y_center;
|
||||
double angle, scale;
|
||||
double x_center, y_center;
|
||||
|
||||
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
|
||||
|
||||
|
@@ -98,7 +98,7 @@ gtk_fishbowl_measure (GtkWidget *widget,
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
GtkFishbowlChild *child;
|
||||
gint child_min, child_nat;
|
||||
int child_min, child_nat;
|
||||
|
||||
*minimum = 0;
|
||||
*natural = 0;
|
||||
|
@@ -18,7 +18,7 @@ static void
|
||||
insert_link (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter,
|
||||
const char *text,
|
||||
gint page)
|
||||
int page)
|
||||
{
|
||||
GtkTextTag *tag;
|
||||
|
||||
@@ -35,7 +35,7 @@ insert_link (GtkTextBuffer *buffer,
|
||||
*/
|
||||
static void
|
||||
show_page (GtkTextBuffer *buffer,
|
||||
gint page)
|
||||
int page)
|
||||
{
|
||||
GtkTextIter iter;
|
||||
|
||||
@@ -91,7 +91,7 @@ follow_if_link (GtkWidget *text_view,
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
@@ -134,14 +134,14 @@ key_pressed (GtkEventController *controller,
|
||||
}
|
||||
|
||||
static void set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
gint x,
|
||||
gint y);
|
||||
int x,
|
||||
int y);
|
||||
|
||||
static void
|
||||
released_cb (GtkGestureClick *gesture,
|
||||
guint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *text_view)
|
||||
{
|
||||
GtkTextIter start, end, iter;
|
||||
@@ -168,8 +168,8 @@ released_cb (GtkGestureClick *gesture,
|
||||
|
||||
static void
|
||||
motion_cb (GtkEventControllerMotion *controller,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
double x,
|
||||
double y,
|
||||
GtkTextView *text_view)
|
||||
{
|
||||
set_cursor_if_appropriate (text_view, x, y);
|
||||
@@ -183,8 +183,8 @@ static gboolean hovering_over_link = FALSE;
|
||||
*/
|
||||
static void
|
||||
set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
gint x,
|
||||
gint y)
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
GSList *tags = NULL, *tagp = NULL;
|
||||
GtkTextIter iter;
|
||||
@@ -196,7 +196,7 @@ set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@ enum
|
||||
|
||||
|
||||
static GdkPixbuf *file_pixbuf, *folder_pixbuf;
|
||||
gchar *parent;
|
||||
char *parent;
|
||||
GtkWidget *up_button;
|
||||
|
||||
/* Loads the images for the demo and returns whether the operation succeeded */
|
||||
@@ -47,7 +47,7 @@ static void
|
||||
fill_store (GtkListStore *store)
|
||||
{
|
||||
GDir *dir;
|
||||
const gchar *name;
|
||||
const char *name;
|
||||
GtkTreeIter iter;
|
||||
|
||||
/* First clear the store */
|
||||
@@ -62,7 +62,7 @@ fill_store (GtkListStore *store)
|
||||
name = g_dir_read_name (dir);
|
||||
while (name != NULL)
|
||||
{
|
||||
gchar *path, *display_name;
|
||||
char *path, *display_name;
|
||||
gboolean is_dir;
|
||||
|
||||
/* We ignore hidden files that start with a '.' */
|
||||
@@ -90,14 +90,14 @@ fill_store (GtkListStore *store)
|
||||
g_dir_close (dir);
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
sort_func (GtkTreeModel *model,
|
||||
GtkTreeIter *a,
|
||||
GtkTreeIter *b,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean is_dir_a, is_dir_b;
|
||||
gchar *name_a, *name_b;
|
||||
char *name_a, *name_b;
|
||||
int ret;
|
||||
|
||||
/* We need this function because we want to sort
|
||||
@@ -158,7 +158,7 @@ item_activated (GtkIconView *icon_view,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkListStore *store;
|
||||
gchar *path;
|
||||
char *path;
|
||||
GtkTreeIter iter;
|
||||
gboolean is_dir;
|
||||
|
||||
@@ -192,7 +192,7 @@ up_clicked (GtkButton *item,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkListStore *store;
|
||||
gchar *dir_name;
|
||||
char *dir_name;
|
||||
|
||||
store = GTK_LIST_STORE (user_data);
|
||||
|
||||
|
@@ -19,8 +19,8 @@ static void
|
||||
fill_store (GtkListStore *store)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
const gchar *text[] = { "Red", "Green", "Blue", "Yellow" };
|
||||
gint i;
|
||||
const char *text[] = { "Red", "Green", "Blue", "Yellow" };
|
||||
int i;
|
||||
|
||||
/* First clear the store */
|
||||
gtk_list_store_clear (store);
|
||||
@@ -49,7 +49,7 @@ set_cell_color (GtkCellLayout *cell_layout,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *text;
|
||||
char *text;
|
||||
GdkRGBA color;
|
||||
guint32 pixel = 0;
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -60,10 +60,10 @@ set_cell_color (GtkCellLayout *cell_layout,
|
||||
|
||||
if (gdk_rgba_parse (&color, text))
|
||||
pixel =
|
||||
((gint)(color.red * 255)) << 24 |
|
||||
((gint)(color.green * 255)) << 16 |
|
||||
((gint)(color.blue * 255)) << 8 |
|
||||
((gint)(color.alpha * 255));
|
||||
((int)(color.red * 255)) << 24 |
|
||||
((int)(color.green * 255)) << 16 |
|
||||
((int)(color.blue * 255)) << 8 |
|
||||
((int)(color.alpha * 255));
|
||||
|
||||
g_free (text);
|
||||
|
||||
@@ -77,8 +77,8 @@ set_cell_color (GtkCellLayout *cell_layout,
|
||||
|
||||
static void
|
||||
edited (GtkCellRendererText *cell,
|
||||
gchar *path_string,
|
||||
gchar *text,
|
||||
char *path_string,
|
||||
char *text,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
|
@@ -43,10 +43,10 @@ progressive_prepared_callback (GdkPixbufLoader *loader,
|
||||
|
||||
static void
|
||||
progressive_updated_callback (GdkPixbufLoader *loader,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
@@ -58,7 +58,7 @@ progressive_updated_callback (GdkPixbufLoader *loader,
|
||||
gtk_picture_set_pixbuf (GTK_PICTURE (picture), pixbuf);
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
progressive_timeout (gpointer data)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
static void
|
||||
on_bar_response (GtkInfoBar *info_bar,
|
||||
gint response_id,
|
||||
int response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
static void
|
||||
response_cb (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
int response_id,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
@@ -17,7 +17,7 @@ response_cb (GtkWidget *dialog,
|
||||
|
||||
static gboolean
|
||||
activate_link (GtkWidget *label,
|
||||
const gchar *uri,
|
||||
const char *uri,
|
||||
gpointer data)
|
||||
{
|
||||
if (g_strcmp0 (uri, "keynav") == 0)
|
||||
|
@@ -81,7 +81,7 @@ spinner_timeout (gpointer data)
|
||||
static GtkTreeModel *
|
||||
create_model (void)
|
||||
{
|
||||
gint i = 0;
|
||||
int i = 0;
|
||||
GtkListStore *store;
|
||||
GtkTreeIter iter;
|
||||
|
||||
|
@@ -89,14 +89,14 @@ static GParamSpec *color_properties[N_COLOR_PROPS] = { NULL, };
|
||||
|
||||
static void
|
||||
rgb_to_hsv (GdkRGBA *rgba,
|
||||
gdouble *h_out,
|
||||
gdouble *s_out,
|
||||
gdouble *v_out)
|
||||
double *h_out,
|
||||
double *s_out,
|
||||
double *v_out)
|
||||
{
|
||||
gdouble red, green, blue;
|
||||
gdouble h, s, v;
|
||||
gdouble min, max;
|
||||
gdouble delta;
|
||||
double red, green, blue;
|
||||
double h, s, v;
|
||||
double min, max;
|
||||
double delta;
|
||||
|
||||
red = rgba->red;
|
||||
green = rgba->green;
|
||||
@@ -662,7 +662,6 @@ create_color_grid (void)
|
||||
{
|
||||
GtkWidget *gridview;
|
||||
GtkListItemFactory *factory;
|
||||
GListModel *model, *selection;
|
||||
|
||||
gridview = gtk_grid_view_new ();
|
||||
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
||||
@@ -676,13 +675,6 @@ create_color_grid (void)
|
||||
gtk_grid_view_set_max_columns (GTK_GRID_VIEW (gridview), 24);
|
||||
gtk_grid_view_set_enable_rubberband (GTK_GRID_VIEW (gridview), TRUE);
|
||||
|
||||
model = G_LIST_MODEL (gtk_sort_list_model_new (gtk_color_list_new (0), NULL));
|
||||
|
||||
selection = G_LIST_MODEL (gtk_multi_selection_new (model));
|
||||
gtk_grid_view_set_model (GTK_GRID_VIEW (gridview), selection);
|
||||
g_object_unref (selection);
|
||||
g_object_unref (model);
|
||||
|
||||
return gridview;
|
||||
}
|
||||
|
||||
@@ -835,6 +827,22 @@ update_selection_average (GListModel *model,
|
||||
g_object_unref (color);
|
||||
}
|
||||
|
||||
static void
|
||||
update_progress_cb (GtkSortListModel *model,
|
||||
GParamSpec *pspec,
|
||||
GtkProgressBar *progress)
|
||||
{
|
||||
guint total;
|
||||
guint pending;
|
||||
|
||||
total = g_list_model_get_n_items (G_LIST_MODEL (model));
|
||||
total = MAX (total, 1); /* avoid div by 0 below */
|
||||
pending = gtk_sort_list_model_get_pending (model);
|
||||
|
||||
gtk_widget_set_visible (GTK_WIDGET (progress), pending != 0);
|
||||
gtk_progress_bar_set_fraction (progress, (total - pending) / (double) total);
|
||||
}
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
GtkWidget *
|
||||
@@ -842,10 +850,11 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
{
|
||||
if (window == NULL)
|
||||
{
|
||||
GtkWidget *header, *gridview, *sw, *box, *dropdown;
|
||||
GtkMultiSelection *selection;
|
||||
GtkSortListModel *sort_model;
|
||||
GtkWidget *header, *overlay, *gridview, *sw, *box, *dropdown;
|
||||
GtkListItemFactory *factory;
|
||||
GListStore *factories;
|
||||
GListModel *model;
|
||||
GtkSorter *sorter;
|
||||
GtkSorter *multi_sorter;
|
||||
GListStore *sorters;
|
||||
@@ -863,6 +872,7 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
GtkWidget *selection_average_picture;
|
||||
GtkWidget *selection_info_toggle;
|
||||
GtkWidget *selection_info_revealer;
|
||||
GtkWidget *progress;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
@@ -872,6 +882,10 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
800);
|
||||
g_object_unref (provider);
|
||||
|
||||
sort_model = gtk_sort_list_model_new (gtk_color_list_new (0), NULL);
|
||||
gtk_sort_list_model_set_incremental (sort_model, TRUE);
|
||||
selection = GTK_MULTI_SELECTION (gtk_multi_selection_new (G_LIST_MODEL (sort_model)));
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Colors");
|
||||
header = gtk_header_bar_new ();
|
||||
@@ -882,8 +896,17 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
gtk_widget_get_display (do_widget));
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer*)&window);
|
||||
|
||||
overlay = gtk_overlay_new ();
|
||||
gtk_window_set_child (GTK_WINDOW (window), overlay);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
gtk_overlay_set_child (GTK_OVERLAY (overlay), box);
|
||||
|
||||
progress = gtk_progress_bar_new ();
|
||||
gtk_widget_set_hexpand (progress, TRUE);
|
||||
gtk_widget_set_valign (progress, GTK_ALIGN_START);
|
||||
g_signal_connect (sort_model, "notify::pending", G_CALLBACK (update_progress_cb), progress);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), progress);
|
||||
|
||||
selection_info_revealer = gtk_revealer_new ();
|
||||
gtk_box_append (GTK_BOX (box), selection_info_revealer);
|
||||
@@ -936,12 +959,12 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
gtk_box_append (GTK_BOX (box), sw);
|
||||
|
||||
gridview = create_color_grid ();
|
||||
gtk_grid_view_set_model (GTK_GRID_VIEW (gridview), G_LIST_MODEL (selection));
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), gridview);
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
model = gtk_grid_view_get_model (GTK_GRID_VIEW (gridview));
|
||||
|
||||
selection_filter = G_LIST_MODEL (gtk_selection_filter_model_new (GTK_SELECTION_MODEL (model)));
|
||||
selection_filter = G_LIST_MODEL (gtk_selection_filter_model_new (GTK_SELECTION_MODEL (selection)));
|
||||
g_signal_connect (selection_filter, "items-changed", G_CALLBACK (update_selection_count), selection_size_label);
|
||||
g_signal_connect (selection_filter, "items-changed", G_CALLBACK (update_selection_average), selection_average_picture);
|
||||
|
||||
@@ -950,8 +973,6 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
g_object_unref (selection_filter);
|
||||
g_object_unref (no_selection);
|
||||
|
||||
g_object_get (model, "model", &model, NULL);
|
||||
|
||||
selection_info_toggle = gtk_toggle_button_new ();
|
||||
gtk_button_set_icon_name (GTK_BUTTON (selection_info_toggle), "emblem-important-symbolic");
|
||||
gtk_widget_set_tooltip_text (selection_info_toggle, "Show selection info");
|
||||
@@ -964,7 +985,7 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
button = gtk_button_new_with_mnemonic ("_Refill");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (refill),
|
||||
gtk_sort_list_model_get_model (GTK_SORT_LIST_MODEL (model)));
|
||||
gtk_sort_list_model_get_model (sort_model));
|
||||
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), button);
|
||||
|
||||
@@ -979,15 +1000,14 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
gtk_label_set_width_chars (GTK_LABEL (label), len + 2);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 1);
|
||||
|
||||
g_signal_connect (gtk_grid_view_get_model (GTK_GRID_VIEW (gridview)),
|
||||
"items-changed", G_CALLBACK (items_changed_cb), label);
|
||||
g_signal_connect (selection, "items-changed", G_CALLBACK (items_changed_cb), label);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), label);
|
||||
|
||||
dropdown = gtk_drop_down_new ();
|
||||
gtk_drop_down_set_from_strings (GTK_DROP_DOWN (dropdown), (const char *[]) { "8", "64", "512", "4096", "32768", "262144", "2097152", "16777216", NULL });
|
||||
g_signal_connect (dropdown, "notify::selected",
|
||||
G_CALLBACK (limit_changed_cb),
|
||||
gtk_sort_list_model_get_model (GTK_SORT_LIST_MODEL (model)));
|
||||
gtk_sort_list_model_get_model (sort_model));
|
||||
g_signal_connect (dropdown, "notify::selected",
|
||||
G_CALLBACK (limit_changed_cb2),
|
||||
label);
|
||||
@@ -1079,7 +1099,7 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
gtk_drop_down_set_model (GTK_DROP_DOWN (dropdown), G_LIST_MODEL (sorters));
|
||||
g_object_unref (sorters);
|
||||
|
||||
g_object_bind_property (dropdown, "selected-item", model, "sorter", G_BINDING_SYNC_CREATE);
|
||||
g_object_bind_property (dropdown, "selected-item", sort_model, "sorter", G_BINDING_SYNC_CREATE);
|
||||
|
||||
factories = g_list_store_new (GTK_TYPE_LIST_ITEM_FACTORY);
|
||||
|
||||
@@ -1111,7 +1131,6 @@ do_listview_colors (GtkWidget *do_widget)
|
||||
g_object_unref (factories);
|
||||
|
||||
g_object_bind_property (dropdown, "selected-item", gridview, "factory", G_BINDING_SYNC_CREATE);
|
||||
g_object_unref (model);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -1,11 +1,11 @@
|
||||
list.viewswitcher {
|
||||
listview.viewswitcher {
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
list.viewswitcher > row {
|
||||
listview.viewswitcher > row {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
list.viewswitcher row:selected {
|
||||
listview.viewswitcher row:selected {
|
||||
background: gray;
|
||||
}
|
||||
|
@@ -215,7 +215,6 @@ transform_settings_to_keys (GBinding *binding,
|
||||
GtkFilterListModel *filter_model;
|
||||
GtkFilter *filter;
|
||||
GtkNoSelection *selection_model;
|
||||
GtkExpression *expression;
|
||||
char **keys;
|
||||
guint i;
|
||||
|
||||
@@ -243,19 +242,11 @@ transform_settings_to_keys (GBinding *binding,
|
||||
g_object_unref (settings);
|
||||
|
||||
sort_model = gtk_sort_list_model_new (G_LIST_MODEL (store),
|
||||
gtk_column_view_get_sorter (GTK_COLUMN_VIEW (data)));
|
||||
g_object_unref (store);
|
||||
|
||||
expression = gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name");
|
||||
filter = gtk_string_filter_new ();
|
||||
gtk_string_filter_set_expression (GTK_STRING_FILTER (filter), expression);
|
||||
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (sort_model), filter);
|
||||
gtk_expression_unref (expression);
|
||||
g_object_unref (sort_model);
|
||||
g_object_ref (gtk_column_view_get_sorter (GTK_COLUMN_VIEW (data))));
|
||||
|
||||
filter = gtk_string_filter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name"));
|
||||
g_set_object (¤t_filter, filter);
|
||||
|
||||
g_object_unref (filter);
|
||||
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (sort_model), filter);
|
||||
|
||||
selection_model = gtk_no_selection_new (G_LIST_MODEL (filter_model));
|
||||
g_object_unref (filter_model);
|
||||
|
@@ -160,7 +160,6 @@ do_listview_words (GtkWidget *do_widget)
|
||||
GtkNoSelection *selection;
|
||||
GtkStringList *stringlist;
|
||||
GtkFilter *filter;
|
||||
GtkExpression *expression;
|
||||
GFile *file;
|
||||
|
||||
file = g_file_new_for_path ("/usr/share/dict/words");
|
||||
@@ -177,10 +176,7 @@ do_listview_words (GtkWidget *do_widget)
|
||||
g_strfreev (words);
|
||||
}
|
||||
|
||||
filter = gtk_string_filter_new ();
|
||||
expression = gtk_property_expression_new (GTK_TYPE_STRING_OBJECT, NULL, "string");
|
||||
gtk_string_filter_set_expression (GTK_STRING_FILTER (filter), expression);
|
||||
gtk_expression_unref (expression);
|
||||
filter = gtk_string_filter_new (gtk_property_expression_new (GTK_TYPE_STRING_OBJECT, NULL, "string"));
|
||||
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (stringlist), filter);
|
||||
gtk_filter_list_model_set_incremental (filter_model, TRUE);
|
||||
|
||||
@@ -215,6 +211,7 @@ do_listview_words (GtkWidget *do_widget)
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), progress);
|
||||
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_widget_set_vexpand (sw, TRUE);
|
||||
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
|
||||
|
||||
listview = gtk_list_view_new_with_factory (
|
||||
|
@@ -13,11 +13,12 @@
|
||||
static GtkWidget *info_view;
|
||||
static GtkWidget *source_view;
|
||||
|
||||
static gchar *current_file = NULL;
|
||||
static char *current_file = NULL;
|
||||
|
||||
static GtkWidget *notebook;
|
||||
static GtkSingleSelection *selection;
|
||||
static GtkWidget *toplevel;
|
||||
static char **search_needle;
|
||||
|
||||
typedef struct _GtkDemo GtkDemo;
|
||||
struct _GtkDemo
|
||||
@@ -140,7 +141,7 @@ activate_about (GSimpleAction *action,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
const gchar *authors[] = {
|
||||
const char *authors[] = {
|
||||
"The GTK Team",
|
||||
NULL
|
||||
};
|
||||
@@ -251,11 +252,9 @@ static const char *types[] =
|
||||
"static",
|
||||
"const ",
|
||||
"void",
|
||||
"gint",
|
||||
" int ",
|
||||
" char ",
|
||||
"gchar ",
|
||||
"gfloat",
|
||||
"char ",
|
||||
"float",
|
||||
"double",
|
||||
"gint8",
|
||||
@@ -271,8 +270,6 @@ static const char *types[] =
|
||||
"gshort",
|
||||
"gushort",
|
||||
"gulong",
|
||||
"gdouble",
|
||||
"gldouble",
|
||||
"gpointer",
|
||||
"NULL",
|
||||
"GList",
|
||||
@@ -384,14 +381,14 @@ static const char *control[] =
|
||||
NULL
|
||||
};
|
||||
void
|
||||
parse_chars (gchar *text,
|
||||
gchar **end_ptr,
|
||||
gint *state,
|
||||
parse_chars (char *text,
|
||||
char **end_ptr,
|
||||
int *state,
|
||||
const char **tag,
|
||||
gboolean start)
|
||||
{
|
||||
gint i;
|
||||
gchar *next_token;
|
||||
int i;
|
||||
char *next_token;
|
||||
|
||||
/* Handle comments first */
|
||||
if (*state == STATE_IN_COMMENT)
|
||||
@@ -461,7 +458,7 @@ parse_chars (gchar *text,
|
||||
/* check for string */
|
||||
if (text[0] == '"')
|
||||
{
|
||||
gint maybe_escape = FALSE;
|
||||
int maybe_escape = FALSE;
|
||||
|
||||
*end_ptr = text + 1;
|
||||
*tag = "string";
|
||||
@@ -524,9 +521,9 @@ void
|
||||
fontify (GtkTextBuffer *source_buffer)
|
||||
{
|
||||
GtkTextIter start_iter, next_iter, tmp_iter;
|
||||
gint state;
|
||||
gchar *text;
|
||||
gchar *start_ptr, *end_ptr;
|
||||
int state;
|
||||
char *text;
|
||||
char *start_ptr, *end_ptr;
|
||||
const char *tag;
|
||||
|
||||
gtk_text_buffer_create_tag (source_buffer, "source",
|
||||
@@ -694,10 +691,10 @@ static struct {
|
||||
};
|
||||
|
||||
static void
|
||||
add_data_tab (const gchar *demoname)
|
||||
add_data_tab (const char *demoname)
|
||||
{
|
||||
gchar *resource_dir, *resource_name;
|
||||
gchar **resources;
|
||||
char *resource_dir, *resource_name;
|
||||
char **resources;
|
||||
GtkWidget *widget, *label;
|
||||
guint i, j;
|
||||
|
||||
@@ -741,15 +738,15 @@ add_data_tab (const gchar *demoname)
|
||||
static void
|
||||
remove_data_tabs (void)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) - 1; i > 1; i--)
|
||||
gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), i);
|
||||
}
|
||||
|
||||
void
|
||||
load_file (const gchar *demoname,
|
||||
const gchar *filename)
|
||||
load_file (const char *demoname,
|
||||
const char *filename)
|
||||
{
|
||||
GtkTextBuffer *info_buffer, *source_buffer;
|
||||
GtkTextIter start, end;
|
||||
@@ -757,9 +754,9 @@ load_file (const gchar *demoname,
|
||||
GError *err = NULL;
|
||||
int state = 0;
|
||||
gboolean in_para = 0;
|
||||
gchar **lines;
|
||||
char **lines;
|
||||
GBytes *bytes;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (!g_strcmp0 (current_file, filename))
|
||||
return;
|
||||
@@ -799,9 +796,9 @@ load_file (const gchar *demoname,
|
||||
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
|
||||
for (i = 0; lines[i] != NULL; i++)
|
||||
{
|
||||
gchar *p;
|
||||
gchar *q;
|
||||
gchar *r;
|
||||
char *p;
|
||||
char *q;
|
||||
char *r;
|
||||
|
||||
/* Make sure \r is stripped at the end for the poor windows people */
|
||||
lines[i] = g_strchomp (lines[i]);
|
||||
@@ -945,7 +942,18 @@ selection_cb (GtkSingleSelection *sel,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkTreeListRow *row = gtk_single_selection_get_selected_item (sel);
|
||||
GtkDemo *demo = gtk_tree_list_row_get_item (row);
|
||||
GtkDemo *demo;
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (notebook), !!row);
|
||||
|
||||
if (!row)
|
||||
{
|
||||
gtk_window_set_title (GTK_WINDOW (toplevel), "No match");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
demo = gtk_tree_list_row_get_item (row);
|
||||
|
||||
if (demo->filename)
|
||||
load_file (demo->name, demo->filename);
|
||||
@@ -953,6 +961,84 @@ selection_cb (GtkSingleSelection *sel,
|
||||
gtk_window_set_title (GTK_WINDOW (toplevel), demo->title);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
filter_demo (GtkDemo *demo)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Show only if the name maches every needle */
|
||||
for (i = 0; search_needle[i]; i++)
|
||||
{
|
||||
if (!demo->title)
|
||||
return FALSE;
|
||||
|
||||
if (g_str_match_string (search_needle[i], demo->title, TRUE))
|
||||
continue;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
demo_filter_by_name (GtkTreeListRow *row,
|
||||
GtkFilterListModel *model)
|
||||
{
|
||||
GListModel *children;
|
||||
GtkDemo *demo;
|
||||
guint i, n;
|
||||
|
||||
/* Show all items if search is empty */
|
||||
if (!search_needle || !search_needle[0] || !*search_needle[0])
|
||||
return TRUE;
|
||||
|
||||
g_assert (GTK_IS_TREE_LIST_ROW (row));
|
||||
g_assert (GTK_IS_FILTER_LIST_MODEL (model));
|
||||
|
||||
children = gtk_tree_list_row_get_children (row);
|
||||
if (children)
|
||||
{
|
||||
n = g_list_model_get_n_items (children);
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
demo = g_list_model_get_item (children, i);
|
||||
g_assert (GTK_IS_DEMO (demo));
|
||||
|
||||
if (filter_demo (demo))
|
||||
{
|
||||
g_object_unref (demo);
|
||||
return TRUE;
|
||||
}
|
||||
g_object_unref (demo);
|
||||
}
|
||||
}
|
||||
|
||||
demo = gtk_tree_list_row_get_item (row);
|
||||
g_assert (GTK_IS_DEMO (demo));
|
||||
|
||||
return filter_demo (demo);
|
||||
}
|
||||
|
||||
static void
|
||||
demo_search_changed_cb (GtkSearchEntry *entry,
|
||||
GtkFilter *filter)
|
||||
{
|
||||
const char *text;
|
||||
|
||||
g_assert (GTK_IS_SEARCH_ENTRY (entry));
|
||||
g_assert (GTK_IS_FILTER (filter));
|
||||
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
|
||||
g_clear_pointer (&search_needle, g_strfreev);
|
||||
|
||||
if (text && *text)
|
||||
search_needle = g_strsplit (text, " ", 0);
|
||||
|
||||
gtk_filter_changed (filter, GTK_FILTER_CHANGE_DIFFERENT);
|
||||
}
|
||||
|
||||
static GListModel *
|
||||
create_demo_model (void)
|
||||
{
|
||||
@@ -1007,13 +1093,25 @@ get_child_model (gpointer item,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
clear_search (GtkSearchBar *bar)
|
||||
{
|
||||
if (!gtk_search_bar_get_search_mode (bar))
|
||||
{
|
||||
GtkWidget *entry = gtk_search_bar_get_child (GTK_SEARCH_BAR (bar));
|
||||
gtk_editable_set_text (GTK_EDITABLE (entry), "");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
activate (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GListModel *listmodel;
|
||||
GtkTreeListModel *treemodel;
|
||||
GtkWidget *window, *listview;
|
||||
GtkWidget *window, *listview, *search_entry, *search_bar;
|
||||
GtkFilterListModel *filter_model;
|
||||
GtkFilter *filter;
|
||||
|
||||
static GActionEntry win_entries[] = {
|
||||
{ "run", activate_run, NULL, NULL, NULL }
|
||||
@@ -1034,6 +1132,8 @@ activate (GApplication *app)
|
||||
toplevel = GTK_WIDGET (window);
|
||||
listview = GTK_WIDGET (gtk_builder_get_object (builder, "listview"));
|
||||
g_signal_connect (listview, "activate", G_CALLBACK (activate_cb), window);
|
||||
search_bar = GTK_WIDGET (gtk_builder_get_object (builder, "searchbar"));
|
||||
g_signal_connect (search_bar, "notify::search-mode-enabled", G_CALLBACK (clear_search), NULL);
|
||||
|
||||
listmodel = create_demo_model ();
|
||||
treemodel = gtk_tree_list_model_new (FALSE,
|
||||
@@ -1042,7 +1142,14 @@ activate (GApplication *app)
|
||||
get_child_model,
|
||||
NULL,
|
||||
NULL);
|
||||
selection = gtk_single_selection_new (G_LIST_MODEL (treemodel));
|
||||
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (treemodel), NULL);
|
||||
filter = gtk_custom_filter_new ((GtkCustomFilterFunc)demo_filter_by_name, filter_model, NULL);
|
||||
gtk_filter_list_model_set_filter (filter_model, filter);
|
||||
g_object_unref (filter);
|
||||
search_entry = GTK_WIDGET (gtk_builder_get_object (builder, "search-entry"));
|
||||
g_signal_connect (search_entry, "search-changed", G_CALLBACK (demo_search_changed_cb), filter);
|
||||
|
||||
selection = gtk_single_selection_new (G_LIST_MODEL (filter_model));
|
||||
g_signal_connect (selection, "notify::selected-item", G_CALLBACK (selection_cb), NULL);
|
||||
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
|
||||
|
||||
@@ -1080,12 +1187,12 @@ list_demos (void)
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
command_line (GApplication *app,
|
||||
GApplicationCommandLine *cmdline)
|
||||
{
|
||||
GVariantDict *options;
|
||||
const gchar *name = NULL;
|
||||
const char *name = NULL;
|
||||
gboolean autoquit = FALSE;
|
||||
gboolean list = FALSE;
|
||||
DemoData *d, *c;
|
||||
@@ -1139,7 +1246,6 @@ out:
|
||||
demo = (func) (window);
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (demo), GTK_WINDOW (window));
|
||||
gtk_window_set_modal (GTK_WINDOW (demo), TRUE);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (demo), "destroy", G_CALLBACK (g_application_quit), app);
|
||||
}
|
||||
@@ -1189,8 +1295,8 @@ main (int argc, char **argv)
|
||||
{ "inspector", activate_inspector, NULL, NULL, NULL },
|
||||
};
|
||||
struct {
|
||||
const gchar *action_and_target;
|
||||
const gchar *accelerators[2];
|
||||
const char *action_and_target;
|
||||
const char *accelerators[2];
|
||||
} accels[] = {
|
||||
{ "app.about", { "F1", NULL } },
|
||||
{ "app.quit", { "<Control>q", NULL } },
|
||||
|
@@ -55,12 +55,29 @@
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-width">150</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="listview">
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="resource">/ui/main-listitem.ui</property>
|
||||
<object class="GtkBox">
|
||||
<property name="width-request">220</property>
|
||||
<property name="orientation">vertical</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkSearchBar" id="searchbar">
|
||||
<property name="key-capture-widget">window</property>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="search-entry"/>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkListView" id="listview">
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="resource">/ui/main-listitem.ui</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@@ -21,7 +21,7 @@ source_toggled (GtkToggleButton *button)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
gchar *markup;
|
||||
char *markup;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2));
|
||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||
@@ -50,7 +50,7 @@ do_markup (GtkWidget *do_widget)
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GBytes *bytes;
|
||||
const gchar *markup;
|
||||
const char *markup;
|
||||
GtkWidget *header;
|
||||
GtkWidget *show_source;
|
||||
|
||||
@@ -102,7 +102,7 @@ do_markup (GtkWidget *do_widget)
|
||||
gtk_stack_add_named (GTK_STACK (stack), sw, "source");
|
||||
|
||||
bytes = g_resources_lookup_data ("/markup/markup.txt", 0, NULL);
|
||||
markup = (const gchar *)g_bytes_get_data (bytes, NULL);
|
||||
markup = (const char *)g_bytes_get_data (bytes, NULL);
|
||||
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||
|
@@ -12,9 +12,9 @@ static void
|
||||
margin_changed (GtkAdjustment *adjustment,
|
||||
GtkTextView *text)
|
||||
{
|
||||
gint value;
|
||||
int value;
|
||||
|
||||
value = (gint)gtk_adjustment_get_value (adjustment);
|
||||
value = (int)gtk_adjustment_get_value (adjustment);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), value);
|
||||
g_object_set (tag, "pixels-above-lines", value, NULL);
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#include <gtk/gtkunixprint.h>
|
||||
|
||||
static void
|
||||
done_cb (GtkDialog *dialog, gint response, gpointer data)
|
||||
done_cb (GtkDialog *dialog, int response, gpointer data)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ typedef struct
|
||||
cairo_t *cr;
|
||||
GdkRGBA draw_color;
|
||||
GtkPadController *pad_controller;
|
||||
gdouble brush_size;
|
||||
double brush_size;
|
||||
} DrawingArea;
|
||||
|
||||
typedef struct
|
||||
@@ -38,7 +38,7 @@ static GtkPadActionEntry pad_actions[] = {
|
||||
{ GTK_PAD_ACTION_STRIP, -1, -1, N_("Brush size"), "pad.brush_size" },
|
||||
};
|
||||
|
||||
static const gchar *pad_colors[] = {
|
||||
static const char *pad_colors[] = {
|
||||
"black",
|
||||
"pink",
|
||||
"green",
|
||||
@@ -55,8 +55,8 @@ static void drawing_area_set_color (DrawingArea *area,
|
||||
|
||||
static void
|
||||
drawing_area_ensure_surface (DrawingArea *area,
|
||||
gint width,
|
||||
gint height)
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
if (!area->surface ||
|
||||
cairo_image_surface_get_width (area->surface) != width ||
|
||||
@@ -154,7 +154,7 @@ on_pad_button_activate (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
DrawingArea *area)
|
||||
{
|
||||
const gchar *color = g_object_get_data (G_OBJECT (action), "color");
|
||||
const char *color = g_object_get_data (G_OBJECT (action), "color");
|
||||
GdkRGBA rgba;
|
||||
|
||||
gdk_rgba_parse (&rgba, color);
|
||||
@@ -166,7 +166,7 @@ on_pad_knob_change (GSimpleAction *action,
|
||||
GVariant *parameter,
|
||||
DrawingArea *area)
|
||||
{
|
||||
gdouble value = g_variant_get_double (parameter);
|
||||
double value = g_variant_get_double (parameter);
|
||||
|
||||
area->brush_size = value;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ drawing_area_root (GtkWidget *widget)
|
||||
GSimpleActionGroup *action_group;
|
||||
GSimpleAction *action;
|
||||
GtkWidget *toplevel;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
GTK_WIDGET_CLASS (drawing_area_parent_class)->root (widget);
|
||||
|
||||
@@ -255,9 +255,9 @@ drawing_area_class_init (DrawingAreaClass *klass)
|
||||
static void
|
||||
drawing_area_apply_stroke (DrawingArea *area,
|
||||
GdkDeviceTool *tool,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble pressure)
|
||||
double x,
|
||||
double y,
|
||||
double pressure)
|
||||
{
|
||||
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
|
||||
{
|
||||
@@ -281,8 +281,8 @@ drawing_area_apply_stroke (DrawingArea *area,
|
||||
|
||||
static void
|
||||
stylus_gesture_down (GtkGestureStylus *gesture,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
double x,
|
||||
double y,
|
||||
DrawingArea *area)
|
||||
{
|
||||
cairo_new_path (area->cr);
|
||||
@@ -290,13 +290,13 @@ stylus_gesture_down (GtkGestureStylus *gesture,
|
||||
|
||||
static void
|
||||
stylus_gesture_motion (GtkGestureStylus *gesture,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
double x,
|
||||
double y,
|
||||
DrawingArea *area)
|
||||
{
|
||||
GdkTimeCoord *backlog;
|
||||
GdkDeviceTool *tool;
|
||||
gdouble pressure;
|
||||
double pressure;
|
||||
guint n_items;
|
||||
|
||||
tool = gtk_gesture_stylus_get_device_tool (gesture);
|
||||
|
@@ -47,9 +47,9 @@ toggle_shrink (GtkWidget *widget,
|
||||
|
||||
static GtkWidget *
|
||||
create_pane_options (GtkPaned *paned,
|
||||
const gchar *frame_label,
|
||||
const gchar *label1,
|
||||
const gchar *label2)
|
||||
const char *frame_label,
|
||||
const char *label1,
|
||||
const char *label2)
|
||||
{
|
||||
GtkWidget *child1, *child2;
|
||||
GtkWidget *frame;
|
||||
|
@@ -39,7 +39,7 @@ static GdkPixbuf *frame;
|
||||
|
||||
/* Background image */
|
||||
static GdkPixbuf *background;
|
||||
static gint back_width, back_height;
|
||||
static int back_width, back_height;
|
||||
|
||||
/* Images */
|
||||
static GdkPixbuf *images[N_IMAGES];
|
||||
@@ -51,7 +51,7 @@ static GtkWidget *da;
|
||||
static gboolean
|
||||
load_pixbufs (GError **error)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (background)
|
||||
return TRUE; /* already loaded earlier */
|
||||
|
@@ -14,13 +14,13 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gchar *resourcename;
|
||||
gdouble font_size;
|
||||
char *resourcename;
|
||||
double font_size;
|
||||
|
||||
gint lines_per_page;
|
||||
gchar **lines;
|
||||
gint num_lines;
|
||||
gint num_pages;
|
||||
int lines_per_page;
|
||||
char **lines;
|
||||
int num_lines;
|
||||
int num_pages;
|
||||
} PrintData;
|
||||
|
||||
static void
|
||||
@@ -55,17 +55,17 @@ begin_print (GtkPrintOperation *operation,
|
||||
static void
|
||||
draw_page (GtkPrintOperation *operation,
|
||||
GtkPrintContext *context,
|
||||
gint page_nr,
|
||||
int page_nr,
|
||||
gpointer user_data)
|
||||
{
|
||||
PrintData *data = (PrintData *)user_data;
|
||||
cairo_t *cr;
|
||||
PangoLayout *layout;
|
||||
gint text_width, text_height;
|
||||
gdouble width;
|
||||
gint line, i;
|
||||
int text_width, text_height;
|
||||
double width;
|
||||
int line, i;
|
||||
PangoFontDescription *desc;
|
||||
gchar *page_str;
|
||||
char *page_str;
|
||||
|
||||
cr = gtk_print_context_get_cairo_context (context);
|
||||
width = gtk_print_context_get_width (context);
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static gint count = 0;
|
||||
static int count = 0;
|
||||
static guint timeout = 0;
|
||||
|
||||
static void
|
||||
@@ -25,7 +25,7 @@ static gboolean
|
||||
reveal_one (gpointer data)
|
||||
{
|
||||
GtkWidget *window = data;
|
||||
gchar *name;
|
||||
char *name;
|
||||
GtkRevealer *revealer;
|
||||
|
||||
name = g_strdup_printf ("revealer%d", count);
|
||||
|
@@ -123,7 +123,7 @@ set_search_by (GSimpleAction *action,
|
||||
|
||||
static void
|
||||
icon_press_cb (GtkEntry *entry,
|
||||
gint position,
|
||||
int position,
|
||||
gpointer data)
|
||||
{
|
||||
if (position == GTK_ENTRY_ICON_PRIMARY)
|
||||
|
@@ -8,12 +8,12 @@
|
||||
|
||||
static void
|
||||
show_shortcuts (GtkWidget *window,
|
||||
const gchar *id,
|
||||
const gchar *view)
|
||||
const char *id,
|
||||
const char *view)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *overlay;
|
||||
gchar *path;
|
||||
char *path;
|
||||
|
||||
path = g_strdup_printf ("/shortcuts/%s.ui", id);
|
||||
builder = gtk_builder_new_from_resource (path);
|
||||
|
@@ -18,7 +18,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
GtkWidget *box;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *header;
|
||||
const gchar* pages[] = {
|
||||
const char * pages[] = {
|
||||
"Welcome to GTK",
|
||||
"GtkStackSidebar Widget",
|
||||
"Automatic navigation",
|
||||
@@ -30,7 +30,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
"Page 9",
|
||||
NULL
|
||||
};
|
||||
const gchar *c = NULL;
|
||||
const char *c = NULL;
|
||||
guint i;
|
||||
|
||||
if (!window)
|
||||
|
@@ -11,13 +11,13 @@
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||
gdouble *new_val)
|
||||
double *new_val)
|
||||
{
|
||||
const gchar *buf;
|
||||
gchar *err;
|
||||
gdouble res;
|
||||
const char *buf;
|
||||
char *err;
|
||||
double res;
|
||||
|
||||
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
|
||||
res = strtol (buf, &err, 16);
|
||||
@@ -28,19 +28,19 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
gchar *buf;
|
||||
gdouble val;
|
||||
char *buf;
|
||||
double val;
|
||||
|
||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||
val = gtk_adjustment_get_value (adjustment);
|
||||
if (fabs (val) < 1e-5)
|
||||
buf = g_strdup ("0x00");
|
||||
else
|
||||
buf = g_strdup_printf ("0x%.2X", (gint) val);
|
||||
buf = g_strdup_printf ("0x%.2X", (int) val);
|
||||
if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button))))
|
||||
gtk_editable_set_text (GTK_EDITABLE (spin_button), buf);
|
||||
g_free (buf);
|
||||
@@ -48,17 +48,17 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||
gdouble *new_val)
|
||||
double *new_val)
|
||||
{
|
||||
const gchar *text;
|
||||
gchar **str;
|
||||
const char *text;
|
||||
char **str;
|
||||
gboolean found = FALSE;
|
||||
gint hours;
|
||||
gint minutes;
|
||||
gchar *endh;
|
||||
gchar *endm;
|
||||
int hours;
|
||||
int minutes;
|
||||
char *endh;
|
||||
char *endm;
|
||||
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (spin_button));
|
||||
str = g_strsplit (text, ":", 2);
|
||||
@@ -87,13 +87,13 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_time_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
gchar *buf;
|
||||
gdouble hours;
|
||||
gdouble minutes;
|
||||
char *buf;
|
||||
double hours;
|
||||
double minutes;
|
||||
|
||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||
hours = gtk_adjustment_get_value (adjustment) / 60.0;
|
||||
@@ -121,12 +121,12 @@ static const char *month[12] = {
|
||||
"December"
|
||||
};
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||
gdouble *new_val)
|
||||
double *new_val)
|
||||
{
|
||||
gint i;
|
||||
gchar *tmp1, *tmp2;
|
||||
int i;
|
||||
char *tmp1, *tmp2;
|
||||
gboolean found = FALSE;
|
||||
|
||||
for (i = 1; i <= 12; i++)
|
||||
@@ -145,17 +145,17 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||
*new_val = 0.0;
|
||||
return GTK_INPUT_ERROR;
|
||||
}
|
||||
*new_val = (gdouble) i;
|
||||
*new_val = (double) i;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_month_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
gdouble value;
|
||||
gint i;
|
||||
double value;
|
||||
int i;
|
||||
|
||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||
value = gtk_adjustment_get_value (adjustment);
|
||||
|
@@ -14,7 +14,7 @@
|
||||
typedef struct _TreeItem TreeItem;
|
||||
struct _TreeItem
|
||||
{
|
||||
const gchar *label;
|
||||
const char *label;
|
||||
gboolean alex;
|
||||
gboolean havoc;
|
||||
gboolean tim;
|
||||
@@ -222,7 +222,7 @@ create_model (void)
|
||||
|
||||
static void
|
||||
item_toggled (GtkCellRendererToggle *cell,
|
||||
gchar *path_str,
|
||||
char *path_str,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
@@ -230,7 +230,7 @@ item_toggled (GtkCellRendererToggle *cell,
|
||||
GtkTreeIter iter;
|
||||
gboolean toggle_item;
|
||||
|
||||
gint *column;
|
||||
int *column;
|
||||
|
||||
column = g_object_get_data (G_OBJECT (cell), "column");
|
||||
|
||||
@@ -252,7 +252,7 @@ item_toggled (GtkCellRendererToggle *cell,
|
||||
static void
|
||||
add_columns (GtkTreeView *treeview)
|
||||
{
|
||||
gint col_offset;
|
||||
int col_offset;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
||||
@@ -272,7 +272,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* alex column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)ALEX_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)ALEX_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@@ -294,7 +294,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* havoc column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)HAVOC_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)HAVOC_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@@ -315,7 +315,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* tim column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)TIM_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)TIM_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@@ -337,7 +337,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* owen column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)OWEN_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)OWEN_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* dave column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)DAVE_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)DAVE_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
|
@@ -43,7 +43,7 @@ about_activated (GSimpleAction *action,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
const gchar *authors[] = {
|
||||
const char *authors[] = {
|
||||
"The GTK Team",
|
||||
NULL
|
||||
};
|
||||
@@ -103,7 +103,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
icon_browser_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (icon_browser_app_parent_class)->startup (app);
|
||||
|
||||
|
@@ -44,13 +44,13 @@ icon_browser_window_get_icon_theme (IconBrowserWindow *win)
|
||||
|
||||
static void
|
||||
add_icon (IconBrowserWindow *win,
|
||||
const gchar *name,
|
||||
const gchar *description,
|
||||
const gchar *context)
|
||||
const char *name,
|
||||
const char *description,
|
||||
const char *context)
|
||||
{
|
||||
GtkIconTheme *icon_theme = icon_browser_window_get_icon_theme (win);
|
||||
gchar *regular_name;
|
||||
gchar *symbolic_name;
|
||||
char *regular_name;
|
||||
char *symbolic_name;
|
||||
IbIcon *icon;
|
||||
|
||||
regular_name = g_strdup (name);
|
||||
@@ -77,9 +77,9 @@ add_icon (IconBrowserWindow *win,
|
||||
|
||||
static void
|
||||
add_context (IconBrowserWindow *win,
|
||||
const gchar *id,
|
||||
const gchar *name,
|
||||
const gchar *description)
|
||||
const char *id,
|
||||
const char *name,
|
||||
const char *description)
|
||||
{
|
||||
IbContext *context;
|
||||
|
||||
@@ -161,7 +161,7 @@ copy_to_clipboard (GtkButton *button,
|
||||
}
|
||||
|
||||
static void
|
||||
set_image (GtkWidget *image, const gchar *name, gint size)
|
||||
set_image (GtkWidget *image, const char *name, int size)
|
||||
{
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
||||
@@ -219,7 +219,7 @@ item_activated (GtkGridView *view,
|
||||
static GdkPaintable *
|
||||
get_image_paintable (GtkImage *image)
|
||||
{
|
||||
const gchar *icon_name;
|
||||
const char *icon_name;
|
||||
GtkIconTheme *icon_theme;
|
||||
GtkIconPaintable *icon;
|
||||
int size;
|
||||
|
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="43.000351" x2="85.000351" y1="39.000164" y2="39.000164">
|
||||
<stop offset="0" stop-color="#26a269"/>
|
||||
<stop offset="0.0934161" stop-color="#84e3b7"/>
|
||||
<stop offset="0.330831" stop-color="#26a269"/>
|
||||
<stop offset="0.686952" stop-color="#26a269"/>
|
||||
<stop offset="0.89736" stop-color="#175e3c"/>
|
||||
<stop offset="1" stop-color="#26a269"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#c0bfbc"/>
|
||||
<stop offset="0.154754" stop-color="#ffffff"/>
|
||||
<stop offset="0.433722" stop-color="#bdbbb5"/>
|
||||
<stop offset="0.650505" stop-color="#c1c0ba"/>
|
||||
<stop offset="0.825253" stop-color="#ffffff"/>
|
||||
<stop offset="1" stop-color="#c0bfbc"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="c" gradientTransform="matrix(0.0811899 -0.046875 0.069079 0.119648 307.03142 127.069456)" x1="-1710.210571" x2="-1774.45166" xlink:href="#b" y1="-1202.376709" y2="-1202.376709"/>
|
||||
<linearGradient id="d" gradientTransform="matrix(-0.0811899 -0.046875 -0.069079 0.119648 -177.242852 127.069447)" x1="-1710.210571" x2="-1774.45166" xlink:href="#b" y1="-1202.376709" y2="-1202.376709"/>
|
||||
<linearGradient id="e" gradientUnits="userSpaceOnUse" x1="14" x2="56" y1="94.999964" y2="94.999964">
|
||||
<stop offset="0" stop-color="#813d9c"/>
|
||||
<stop offset="0.109119" stop-color="#b378ca"/>
|
||||
<stop offset="0.241583" stop-color="#813d9c"/>
|
||||
<stop offset="0.731841" stop-color="#813d9c"/>
|
||||
<stop offset="0.872163" stop-color="#4d255d"/>
|
||||
<stop offset="1" stop-color="#813d9c"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="f" gradientUnits="userSpaceOnUse" x1="72" x2="114" y1="94.999964" y2="94.999964">
|
||||
<stop offset="0" stop-color="#e66100"/>
|
||||
<stop offset="0.0678478" stop-color="#ff903e"/>
|
||||
<stop offset="0.168852" stop-color="#e66100"/>
|
||||
<stop offset="0.886626" stop-color="#e66100"/>
|
||||
<stop offset="1" stop-color="#9d4200"/>
|
||||
</linearGradient>
|
||||
<clipPath id="g">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="h">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<filter id="i" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="j">
|
||||
<g clip-path="url(#h)" filter="url(#i)">
|
||||
<g clip-path="url(#g)">
|
||||
<path d="m 51 18 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 51 12 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#57e389"/>
|
||||
<path d="m 76.976562 55.453125 c 1.480469 -0.855469 3.371094 -0.347656 4.226563 1.132813 l 6.742187 11.679687 c 0.855469 1.480469 0.347657 3.371094 -1.132812 4.226563 c -1.480469 0.851562 -3.371094 0.347656 -4.226562 -1.132813 l -6.742188 -11.679687 c -0.855469 -1.480469 -0.347656 -3.371094 1.132812 -4.226563 z m 0 0" fill="url(#c)"/>
|
||||
<path d="m 52.8125 55.453125 c -1.480469 -0.855469 -3.371094 -0.347656 -4.226562 1.132813 l -6.742188 11.679687 c -0.855469 1.480469 -0.347656 3.371094 1.132812 4.226563 c 1.480469 0.851562 3.371094 0.347656 4.226563 -1.132813 l 6.742187 -11.679687 c 0.855469 -1.480469 0.347657 -3.371094 -1.132812 -4.226563 z m 0 0" fill="url(#d)"/>
|
||||
<path d="m 22 74 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#e)"/>
|
||||
<path d="m 22 68 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#dc8add"/>
|
||||
<path d="m 80 74 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#f)"/>
|
||||
<path d="m 80 68 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#ffa348"/>
|
||||
</g>
|
||||
</g>
|
||||
</mask>
|
||||
<mask id="k">
|
||||
<g filter="url(#i)">
|
||||
<rect fill-opacity="0.8" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<linearGradient id="l" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)" gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
|
||||
<stop offset="0" stop-color="#f9f06b"/>
|
||||
<stop offset="1" stop-color="#f5c211"/>
|
||||
</linearGradient>
|
||||
<clipPath id="m">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="n">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<path d="m 51 18 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 51 12 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#57e389"/>
|
||||
<path d="m 76.976562 55.453125 c 1.480469 -0.855469 3.371094 -0.347656 4.226563 1.132813 l 6.742187 11.679687 c 0.855469 1.480469 0.347657 3.371094 -1.132812 4.226563 c -1.480469 0.851562 -3.371094 0.347656 -4.226562 -1.132813 l -6.742188 -11.679687 c -0.855469 -1.480469 -0.347656 -3.371094 1.132812 -4.226563 z m 0 0" fill="url(#c)"/>
|
||||
<path d="m 52.8125 55.453125 c -1.480469 -0.855469 -3.371094 -0.347656 -4.226562 1.132813 l -6.742188 11.679687 c -0.855469 1.480469 -0.347656 3.371094 1.132812 4.226563 c 1.480469 0.851562 3.371094 0.347656 4.226563 -1.132813 l 6.742187 -11.679687 c 0.855469 -1.480469 0.347657 -3.371094 -1.132812 -4.226563 z m 0 0" fill="url(#d)"/>
|
||||
<path d="m 22 74 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#e)"/>
|
||||
<path d="m 22 68 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#dc8add"/>
|
||||
<path d="m 80 74 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#f)"/>
|
||||
<path d="m 80 68 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#ffa348"/>
|
||||
<g clip-path="url(#n)" mask="url(#j)">
|
||||
<g clip-path="url(#m)" mask="url(#k)">
|
||||
<path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#l)"/>
|
||||
<path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m 42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v -21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.4 KiB |
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="43.000351" x2="85.000351" y1="39.000164" y2="39.000164">
|
||||
<stop offset="0" stop-color="#26a269"/>
|
||||
<stop offset="0.0934161" stop-color="#84e3b7"/>
|
||||
<stop offset="0.330831" stop-color="#26a269"/>
|
||||
<stop offset="0.686952" stop-color="#26a269"/>
|
||||
<stop offset="0.89736" stop-color="#175e3c"/>
|
||||
<stop offset="1" stop-color="#26a269"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#c0bfbc"/>
|
||||
<stop offset="0.154754" stop-color="#ffffff"/>
|
||||
<stop offset="0.433722" stop-color="#bdbbb5"/>
|
||||
<stop offset="0.650505" stop-color="#c1c0ba"/>
|
||||
<stop offset="0.825253" stop-color="#ffffff"/>
|
||||
<stop offset="1" stop-color="#c0bfbc"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="c" gradientTransform="matrix(0.0811899 -0.046875 0.069079 0.119648 307.03142 127.069456)" x1="-1710.210571" x2="-1774.45166" xlink:href="#b" y1="-1202.376709" y2="-1202.376709"/>
|
||||
<linearGradient id="d" gradientTransform="matrix(-0.0811899 -0.046875 -0.069079 0.119648 -177.242852 127.069447)" x1="-1710.210571" x2="-1774.45166" xlink:href="#b" y1="-1202.376709" y2="-1202.376709"/>
|
||||
<linearGradient id="e" gradientUnits="userSpaceOnUse" x1="14" x2="56" y1="94.999964" y2="94.999964">
|
||||
<stop offset="0" stop-color="#813d9c"/>
|
||||
<stop offset="0.109119" stop-color="#b378ca"/>
|
||||
<stop offset="0.241583" stop-color="#813d9c"/>
|
||||
<stop offset="0.731841" stop-color="#813d9c"/>
|
||||
<stop offset="0.872163" stop-color="#4d255d"/>
|
||||
<stop offset="1" stop-color="#813d9c"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="f" gradientUnits="userSpaceOnUse" x1="72" x2="114" y1="94.999964" y2="94.999964">
|
||||
<stop offset="0" stop-color="#e66100"/>
|
||||
<stop offset="0.0678478" stop-color="#ff903e"/>
|
||||
<stop offset="0.168852" stop-color="#e66100"/>
|
||||
<stop offset="0.886626" stop-color="#e66100"/>
|
||||
<stop offset="1" stop-color="#9d4200"/>
|
||||
</linearGradient>
|
||||
<path d="m 51 18 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 51 12 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#57e389"/>
|
||||
<path d="m 76.976562 55.453125 c 1.480469 -0.855469 3.371094 -0.347656 4.226563 1.132813 l 6.742187 11.679687 c 0.855469 1.480469 0.347657 3.371094 -1.132812 4.226563 c -1.480469 0.851562 -3.371094 0.347656 -4.226562 -1.132813 l -6.742188 -11.679687 c -0.855469 -1.480469 -0.347656 -3.371094 1.132812 -4.226563 z m 0 0" fill="url(#c)"/>
|
||||
<path d="m 52.8125 55.453125 c -1.480469 -0.855469 -3.371094 -0.347656 -4.226562 1.132813 l -6.742188 11.679687 c -0.855469 1.480469 -0.347656 3.371094 1.132812 4.226563 c 1.480469 0.851562 3.371094 0.347656 4.226563 -1.132813 l 6.742187 -11.679687 c 0.855469 -1.480469 0.347657 -3.371094 -1.132812 -4.226563 z m 0 0" fill="url(#d)"/>
|
||||
<path d="m 22 74 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#e)"/>
|
||||
<path d="m 22 68 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#dc8add"/>
|
||||
<path d="m 80 74 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="url(#f)"/>
|
||||
<path d="m 80 68 h 26 c 4.417969 0 8 3.582031 8 8 v 26 c 0 4.417969 -3.582031 8 -8 8 h -26 c -4.417969 0 -8 -3.582031 -8 -8 v -26 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#ffa348"/>
|
||||
</svg>
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m 5.75 1 c -0.414062 0 -0.75 0.335938 -0.75 0.75 v 4.5 c 0 0.414062 0.335938 0.75 0.75 0.75 h 0.191406 l -1 2 h -3.191406 c -0.414062 0 -0.75 0.335938 -0.75 0.75 v 4.5 c 0 0.414062 0.335938 0.75 0.75 0.75 h 4.5 c 0.414062 0 0.75 -0.335938 0.75 -0.75 v -4.5 c 0 -0.414062 -0.335938 -0.75 -0.75 -0.75 h -0.191406 l 1 -2 h 1.882812 l 1 2 h -0.191406 c -0.414062 0 -0.75 0.335938 -0.75 0.75 v 4.5 c 0 0.414062 0.335938 0.75 0.75 0.75 h 4.5 c 0.414062 0 0.75 -0.335938 0.75 -0.75 v -4.5 c 0 -0.414062 -0.335938 -0.75 -0.75 -0.75 h -3.191406 l -1 -2 h 0.191406 c 0.414062 0 0.75 -0.335938 0.75 -0.75 v -4.5 c 0 -0.414062 -0.335938 -0.75 -0.75 -0.75 z m 0 0"/>
|
||||
</svg>
|
After Width: | Height: | Size: 801 B |
@@ -19,3 +19,12 @@ executable('gtk4-node-editor',
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: false)
|
||||
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
endforeach
|
||||
|
@@ -101,7 +101,7 @@ activate_about (GSimpleAction *action,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to test GTK rendering",
|
||||
"authors", (const char *[]){ "Benjamin Otte", "Timm Bäder", NULL},
|
||||
"logo-icon-name", "text-editor-symbolic",
|
||||
"logo-icon-name", "org.gtk.gtk4.NodeEditor.Devel",
|
||||
"title", "About GTK Node Editor",
|
||||
"system-information", s->str,
|
||||
NULL);
|
||||
@@ -199,11 +199,11 @@ node_editor_application_activate (GApplication *app)
|
||||
static void
|
||||
node_editor_application_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
NodeEditorWindow *win;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
{
|
||||
|
@@ -80,7 +80,7 @@ text_view_error_free (TextViewError *e)
|
||||
g_free (e->message);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
static char *
|
||||
get_current_text (GtkTextBuffer *buffer)
|
||||
{
|
||||
GtkTextIter start, end;
|
||||
@@ -288,14 +288,14 @@ text_view_query_tooltip_cb (GtkWidget *widget,
|
||||
|
||||
if (keyboard_tip)
|
||||
{
|
||||
gint offset;
|
||||
int offset;
|
||||
|
||||
g_object_get (self->text_buffer, "cursor-position", &offset, NULL);
|
||||
gtk_text_buffer_get_iter_at_offset (self->text_buffer, &iter, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
gint bx, by, trailing;
|
||||
int bx, by, trailing;
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (self->text_view), GTK_TEXT_WINDOW_TEXT,
|
||||
x, y, &bx, &by);
|
||||
@@ -399,7 +399,7 @@ node_editor_window_load (NodeEditorWindow *self,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
NodeEditorWindow *self)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
@@ -448,7 +448,7 @@ open_cb (GtkWidget *button,
|
||||
|
||||
static void
|
||||
save_response_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
NodeEditorWindow *self)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
@@ -577,7 +577,7 @@ create_cairo_texture (NodeEditorWindow *self)
|
||||
|
||||
static void
|
||||
export_image_response_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
GdkTexture *texture)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
|
@@ -0,0 +1,179 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<linearGradient id="a" gradientTransform="matrix(0.232143 0 0 0.328947 -7.567033 263.82666)" gradientUnits="userSpaceOnUse" x1="88.595886" x2="536.595886" y1="-449.394012" y2="-449.394012">
|
||||
<stop offset="0" stop-color="#acabae"/>
|
||||
<stop offset="0.0384615" stop-color="#deddda"/>
|
||||
<stop offset="0.0768555" stop-color="#c0bfbc"/>
|
||||
<stop offset="0.923077" stop-color="#c0bfbc"/>
|
||||
<stop offset="0.961538" stop-color="#deddda"/>
|
||||
<stop offset="1" stop-color="#9a9996"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="26.999876" x2="100.999876" y1="32.999688" y2="32.999688">
|
||||
<stop offset="0" stop-color="#7e7c77"/>
|
||||
<stop offset="0.3" stop-color="#9a9996"/>
|
||||
<stop offset="1" stop-color="#9a9996"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="c" gradientUnits="userSpaceOnUse" x1="67.467916" x2="67.467916" y1="83.999688" y2="36.782906">
|
||||
<stop offset="0" stop-color="#deddda"/>
|
||||
<stop offset="1" stop-color="#c0bfbc"/>
|
||||
</linearGradient>
|
||||
<clipPath id="d">
|
||||
<path d="m 79 72 h 15 v 16 h -15 z m 0 0"/>
|
||||
</clipPath>
|
||||
<clipPath id="e">
|
||||
<path d="m 93.21875 72.921875 l -14.21875 14.21875 h -4.0625 v -18.28125 h 18.28125 z m 0 0"/>
|
||||
</clipPath>
|
||||
<linearGradient id="f" gradientTransform="matrix(0 0.126951 0.126951 0 76.460862 36.359884)" gradientUnits="userSpaceOnUse" x1="344" x2="340" y1="76" y2="72">
|
||||
<stop offset="0" stop-color="#d5d3cf"/>
|
||||
<stop offset="1" stop-color="#ffffff"/>
|
||||
</linearGradient>
|
||||
<filter id="g" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="h">
|
||||
<g filter="url(#g)">
|
||||
<rect fill-opacity="0.396" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<linearGradient id="i" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#1c71d8"/>
|
||||
<stop offset="0.323117" stop-color="#62a0ea"/>
|
||||
<stop offset="0.59387" stop-color="#1b5aa6"/>
|
||||
<stop offset="1" stop-color="#1c71d8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="j" gradientTransform="matrix(1.597748 1.597748 -1.06066 1.06066 -56.853041 -543.720139)" x1="224.504562" x2="231.453873" xlink:href="#i" y1="282.5" y2="282.5"/>
|
||||
<radialGradient id="k" cx="227.599915" cy="201.029724" gradientTransform="matrix(4.072817 4.073078 -5.940048 5.939073 373.883117 -2098.049112)" gradientUnits="userSpaceOnUse" r="2.5">
|
||||
<stop offset="0" stop-color="#93bdf1"/>
|
||||
<stop offset="1" stop-color="#1a5fb4"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="l" gradientTransform="matrix(2.121328 2.121328 -2.174353 2.174353 181.766074 -1021.145947)" gradientUnits="userSpaceOnUse" x1="226.90625" x2="228.86203" y1="288.75" y2="288.767151">
|
||||
<stop offset="0" stop-color="#77767b"/>
|
||||
<stop offset="0.443872" stop-color="#f6f5f4"/>
|
||||
<stop offset="1" stop-color="#5e5c64"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="m" gradientTransform="matrix(1.258421 1.258421 -1.06066 1.06066 57.381892 -503.024312)" gradientUnits="userSpaceOnUse" x1="223.1875" x2="233.0625" y1="278" y2="278">
|
||||
<stop offset="0" stop-color="#ffa348"/>
|
||||
<stop offset="0.265823" stop-color="#ffd7af"/>
|
||||
<stop offset="0.734177" stop-color="#ff8d1c"/>
|
||||
<stop offset="1" stop-color="#ffa348"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="n" gradientTransform="matrix(1.573027 1.573027 -1.06066 1.06066 -14.348129 -574.754333)" x1="224.504562" x2="231.453873" xlink:href="#i" y1="282.5" y2="282.5"/>
|
||||
<clipPath id="o">
|
||||
<path d="m 79 72 h 15 v 16 h -15 z m 0 0"/>
|
||||
</clipPath>
|
||||
<clipPath id="p">
|
||||
<path d="m 93.21875 72.921875 l -14.21875 14.21875 h -4.0625 v -18.28125 h 18.28125 z m 0 0"/>
|
||||
</clipPath>
|
||||
<mask id="q">
|
||||
<g filter="url(#g)">
|
||||
<rect fill-opacity="0.396" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<clipPath id="r">
|
||||
<rect height="152" width="192"/>
|
||||
</clipPath>
|
||||
<g id="s" clip-path="url(#r)">
|
||||
<path d="m 29 112 c -4.433594 0 -8 -3.566406 -8 -8 v -2 c 0 4.433594 3.566406 8 8 8 h 88 c 4.433594 0 8 -3.566406 8 -8 v 2 c 0 4.433594 -3.566406 8 -8 8 z m 0 0" fill="#f6f5f4"/>
|
||||
</g>
|
||||
<clipPath id="t">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="u">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<mask id="v">
|
||||
<g clip-path="url(#u)" filter="url(#g)">
|
||||
<g clip-path="url(#t)">
|
||||
<path d="m 21 16 c -4.433594 0 -8 3.566406 -8 8 v 84 c 0 4.433594 3.566406 8 8 8 h 4 v -4 h 80 v 4 h 4 c 4.433594 0 8 -3.566406 8 -8 v -84 c 0 -4.433594 -3.566406 -8 -8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 21 12 h 88 c 4.417969 0 8 3.582031 8 8 v 68 c 0 4.417969 -3.582031 8 -8 8 h -88 c -4.417969 0 -8 -3.582031 -8 -8 v -68 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#deddda"/>
|
||||
<path d="m 27 28 h 74 v 10 h -74 z m 0 0" fill="url(#b)"/>
|
||||
<path d="m 27 38 h 74 v 46 h -74 z m 0 0" fill="url(#c)"/>
|
||||
<path d="m 24 33 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#bf5f00" fill-opacity="0.964567"/>
|
||||
<path d="m 18 40 h 6 v 12 h -6 z m 0 0" fill="#acacac" fill-opacity="0.984252"/>
|
||||
<path d="m 18 40 h 6 v 10 h -6 z m 0 0" fill="#d1d1d1" fill-opacity="0.984252"/>
|
||||
<path d="m 37 36 h 56 v 44 h -56 z m 0 0" fill="#deddda" fill-opacity="0.984252"/>
|
||||
<path d="m 37 34 h 56 c 1.105469 0 2 0.894531 2 2 s -0.894531 2 -2 2 h -56 c -1.105469 0 -2 -0.894531 -2 -2 s 0.894531 -2 2 -2 z m 0 0" fill-opacity="0.940945"/>
|
||||
<path d="m 37 36.859375 h 56 v 36.925781 l -14.125 14.214844 h -41.875 z m 0 0" fill="#9a9996" fill-opacity="0.984252"/>
|
||||
<path d="m 37 36 h 56 v 36.925781 l -14.125 14.214844 h -41.875 z m 0 0" fill="#f6f5f4" fill-opacity="0.984252"/>
|
||||
<g clip-path="url(#o)">
|
||||
<g clip-path="url(#p)">
|
||||
<path d="m 79 77.386719 v 9.351562 c 0 2.464844 2 4.464844 4.464844 4.464844 h 9.351562 c 2.464844 0 4.464844 -2 4.464844 -4.464844 v -9.351562 c 0 -2.464844 -2 -4.464844 -4.464844 -4.464844 h -9.351562 c -2.464844 0 -4.464844 2 -4.464844 4.464844 z m 0 0" fill="url(#f)"/>
|
||||
</g>
|
||||
</g>
|
||||
<path d="m 27 100 h 76 c 1.109375 0 2 0.890625 2 2 v 10 h -80 v -10 c 0 -1.109375 0.890625 -2 2 -2 z m 0 0" fill="#5e5c64" fill-opacity="0.940945"/>
|
||||
<path d="m 27 102 h 76 c 1.109375 0 2 0.890625 2 2 v 10 h -80 v -10 c 0 -1.109375 0.890625 -2 2 -2 z m 0 0" fill="#9a9996"/>
|
||||
<path d="m 13 106 v 2 c 0 4.433594 3.566406 8 8 8 h 4 v -2 h -4 c -4.433594 0 -8 -3.566406 -8 -8 z m 104 0 c 0 4.433594 -3.566406 8 -8 8 h -4 v 2 h 4 c 4.433594 0 8 -3.566406 8 -8 z m -92 6 v 2 h 80 v -2 z m 0 0" fill="#9e9c99" fill-opacity="0.366142"/>
|
||||
<path d="m 27 38 v 46 l 6 -46 z m 0 0" fill="#7e7c77" fill-opacity="0.11811"/>
|
||||
<path d="m 24 32 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#ffa348" fill-opacity="0.964567"/>
|
||||
<use mask="url(#q)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#s"/>
|
||||
<path d="m 89.503906 31.144531 l 10.066406 10.066407 l -41.71875 41.71875 l -10.066406 -10.066407 z m 0 0" fill="#ffa348"/>
|
||||
<path d="m 88.246094 29.886719 l 7.550781 7.550781 l -41.71875 41.71875 l -7.550781 -7.550781 z m 0 0" fill="#ff7800"/>
|
||||
<path d="m 86.789062 28.429688 l 2.515626 2.515624 l -41.71875 41.71875 l -2.515626 -2.515624 z m 0 0" fill="#ffbe6f"/>
|
||||
<path d="m 121.898438 -0.101562 c -4.855469 0.921874 -11.730469 5.152343 -18.140626 11.558593 l -16.96875 16.972657 l 12.78125 12.78125 l 16.972657 -16.972657 c 6.40625 -6.40625 10.636719 -13.28125 11.558593 -18.136719 z m 0 0" fill="url(#j)"/>
|
||||
<path d="m 110.011719 13.882812 c -2.1875 -0.398437 -5.421875 0.988282 -8.167969 3.730469 l -11.871094 11.875 l -6.6875 6.6875 c -4.800781 4.800781 -9.234375 12.007813 -9.648437 13.042969 c -0.484375 1.207031 -0.449219 2.730469 0.953125 4.136719 c 1.40625 1.40625 2.917968 1.441406 4.136718 0.953125 c 1.035157 -0.414063 8.292969 -4.984375 13.042969 -9.648438 l 2.402344 -2.398437 l 16.160156 -16.160157 c 2.742188 -2.746093 4.128907 -5.976562 3.730469 -8.167968 c -0.742188 1.390625 -1.859375 2.902344 -3.308594 4.347656 l -13.996094 13.996094 l -5.089843 -5.089844 l 13.996093 -13.996094 c 1.445313 -1.445312 2.960938 -2.566406 4.347657 -3.308594 z m 0 0" fill="url(#k)"/>
|
||||
<path d="m 95.273438 36.914062 l -2.960938 2.960938 l -2.398438 2.402344 c -4.90625 5.101562 -11.855468 10.828125 -11.855468 10.828125 c 1.011718 -0.433594 8.167968 -5.101563 12.914062 -9.769531 l 2.402344 -2.402344 l 2.960938 -2.957032 z m 0 0" fill="#62a0ea"/>
|
||||
<path d="m 87.320312 26.835938 l 13.789063 13.789062 c 0.292969 0.292969 0.292969 0.769531 0 1.0625 s -0.769531 0.292969 -1.0625 0 l -13.789063 -13.789062 c -0.292968 -0.292969 -0.292968 -0.769532 0 -1.0625 c 0.292969 -0.289063 0.769532 -0.289063 1.0625 0 z m 0 0" fill="#3584e4"/>
|
||||
<path d="m 42.421875 89.765625 c -3 3 -6.382813 4.484375 -7.554687 3.3125 c -1.171876 -1.171875 0.3125 -4.554687 3.3125 -7.554687 c 3.003906 -3.003907 6.386718 -4.488282 7.558593 -3.316407 s -0.3125 4.554688 -3.316406 7.558594 z m 0 0" fill="url(#l)"/>
|
||||
<path d="m 45.269531 70.347656 l -7.851562 12.511719 l 7.835937 7.925781 l 12.597656 -7.855468 z m -6.039062 13.171875 l 5.449219 5.449219 c 0.347656 0.347656 0.449218 0.933594 0.097656 1.160156 c -0.886719 0.570313 -2.9375 1.539063 -2.9375 1.539063 c -0.25 0.128906 -0.539063 0.164062 -0.773438 -0.066407 l -4.546875 -4.550781 c -0.234375 -0.230469 -0.207031 -0.527343 -0.066406 -0.773437 l 1.617187 -2.859375 c 0.207032 -0.363281 0.8125 -0.25 1.160157 0.101562 z m 0 0" fill="url(#m)"/>
|
||||
<path d="m 43.332031 74.777344 l 9.867188 9.867187 c 0.394531 0.390625 0.476562 0.871094 0.128906 1.066407 l -7.710937 5.253906 c -0.308594 0.210937 -0.785157 0.160156 -1.171876 -0.226563 l -6.984374 -6.988281 c -0.386719 -0.386719 -0.4375 -0.859375 -0.230469 -1.167969 l 5.234375 -7.8125 c 0.125 -0.285156 0.558594 -0.304687 0.867187 0.007813 z m 0 0" fill="url(#n)"/>
|
||||
</g>
|
||||
</g>
|
||||
</mask>
|
||||
<mask id="w">
|
||||
<g filter="url(#g)">
|
||||
<rect fill-opacity="0.8" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<linearGradient id="x" gradientTransform="matrix(0 0.37 -0.98462 0 295.38501 -30.360001)" gradientUnits="userSpaceOnUse" x1="300" x2="428" y1="235" y2="235">
|
||||
<stop offset="0" stop-color="#f9f06b"/>
|
||||
<stop offset="1" stop-color="#f5c211"/>
|
||||
</linearGradient>
|
||||
<clipPath id="y">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
<clipPath id="z">
|
||||
<rect height="128" width="128"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<path d="m 21 16 c -4.433594 0 -8 3.566406 -8 8 v 84 c 0 4.433594 3.566406 8 8 8 h 4 v -4 h 80 v 4 h 4 c 4.433594 0 8 -3.566406 8 -8 v -84 c 0 -4.433594 -3.566406 -8 -8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 21 12 h 88 c 4.417969 0 8 3.582031 8 8 v 68 c 0 4.417969 -3.582031 8 -8 8 h -88 c -4.417969 0 -8 -3.582031 -8 -8 v -68 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#deddda"/>
|
||||
<path d="m 27 28 h 74 v 10 h -74 z m 0 0" fill="url(#b)"/>
|
||||
<path d="m 27 38 h 74 v 46 h -74 z m 0 0" fill="url(#c)"/>
|
||||
<path d="m 24 33 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#bf5f00" fill-opacity="0.964567"/>
|
||||
<g fill-opacity="0.984252">
|
||||
<path d="m 18 40 h 6 v 12 h -6 z m 0 0" fill="#acacac"/>
|
||||
<path d="m 18 40 h 6 v 10 h -6 z m 0 0" fill="#d1d1d1"/>
|
||||
<path d="m 37 36 h 56 v 44 h -56 z m 0 0" fill="#deddda"/>
|
||||
</g>
|
||||
<path d="m 37 34 h 56 c 1.105469 0 2 0.894531 2 2 s -0.894531 2 -2 2 h -56 c -1.105469 0 -2 -0.894531 -2 -2 s 0.894531 -2 2 -2 z m 0 0" fill-opacity="0.940945"/>
|
||||
<path d="m 37 36.859375 h 56 v 36.925781 l -14.125 14.214844 h -41.875 z m 0 0" fill="#9a9996" fill-opacity="0.984252"/>
|
||||
<path d="m 37 36 h 56 v 36.925781 l -14.125 14.214844 h -41.875 z m 0 0" fill="#f6f5f4" fill-opacity="0.984252"/>
|
||||
<g clip-path="url(#d)">
|
||||
<g clip-path="url(#e)">
|
||||
<path d="m 79 77.386719 v 9.351562 c 0 2.464844 2 4.464844 4.464844 4.464844 h 9.351562 c 2.464844 0 4.464844 -2 4.464844 -4.464844 v -9.351562 c 0 -2.464844 -2 -4.464844 -4.464844 -4.464844 h -9.351562 c -2.464844 0 -4.464844 2 -4.464844 4.464844 z m 0 0" fill="url(#f)"/>
|
||||
</g>
|
||||
</g>
|
||||
<path d="m 27 100 h 76 c 1.109375 0 2 0.890625 2 2 v 10 h -80 v -10 c 0 -1.109375 0.890625 -2 2 -2 z m 0 0" fill="#5e5c64" fill-opacity="0.940945"/>
|
||||
<path d="m 27 102 h 76 c 1.109375 0 2 0.890625 2 2 v 10 h -80 v -10 c 0 -1.109375 0.890625 -2 2 -2 z m 0 0" fill="#9a9996"/>
|
||||
<path d="m 13 106 v 2 c 0 4.433594 3.566406 8 8 8 h 4 v -2 h -4 c -4.433594 0 -8 -3.566406 -8 -8 z m 104 0 c 0 4.433594 -3.566406 8 -8 8 h -4 v 2 h 4 c 4.433594 0 8 -3.566406 8 -8 z m -92 6 v 2 h 80 v -2 z m 0 0" fill="#9e9c99" fill-opacity="0.366142"/>
|
||||
<path d="m 27 38 v 46 l 6 -46 z m 0 0" fill="#7e7c77" fill-opacity="0.11811"/>
|
||||
<path d="m 24 32 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#ffa348" fill-opacity="0.964567"/>
|
||||
<use mask="url(#h)" transform="matrix(1 0 0 1 -8 -16)" xlink:href="#s"/>
|
||||
<path d="m 89.503906 31.144531 l 10.066406 10.066407 l -41.71875 41.71875 l -10.066406 -10.066407 z m 0 0" fill="#ffa348"/>
|
||||
<path d="m 88.246094 29.886719 l 7.550781 7.550781 l -41.71875 41.71875 l -7.550781 -7.550781 z m 0 0" fill="#ff7800"/>
|
||||
<path d="m 86.789062 28.429688 l 2.515626 2.515624 l -41.71875 41.71875 l -2.515626 -2.515624 z m 0 0" fill="#ffbe6f"/>
|
||||
<path d="m 121.898438 -0.101562 c -4.855469 0.921874 -11.730469 5.152343 -18.140626 11.558593 l -16.96875 16.972657 l 12.78125 12.78125 l 16.972657 -16.972657 c 6.40625 -6.40625 10.636719 -13.28125 11.558593 -18.136719 z m 0 0" fill="url(#j)"/>
|
||||
<path d="m 110.011719 13.882812 c -2.1875 -0.398437 -5.421875 0.988282 -8.167969 3.730469 l -11.871094 11.875 l -6.6875 6.6875 c -4.800781 4.800781 -9.234375 12.007813 -9.648437 13.042969 c -0.484375 1.207031 -0.449219 2.730469 0.953125 4.136719 c 1.40625 1.40625 2.917968 1.441406 4.136718 0.953125 c 1.035157 -0.414063 8.292969 -4.984375 13.042969 -9.648438 l 2.402344 -2.398437 l 16.160156 -16.160157 c 2.742188 -2.746093 4.128907 -5.976562 3.730469 -8.167968 c -0.742188 1.390625 -1.859375 2.902344 -3.308594 4.347656 l -13.996094 13.996094 l -5.089843 -5.089844 l 13.996093 -13.996094 c 1.445313 -1.445312 2.960938 -2.566406 4.347657 -3.308594 z m 0 0" fill="url(#k)"/>
|
||||
<path d="m 95.273438 36.914062 l -2.960938 2.960938 l -2.398438 2.402344 c -4.90625 5.101562 -11.855468 10.828125 -11.855468 10.828125 c 1.011718 -0.433594 8.167968 -5.101563 12.914062 -9.769531 l 2.402344 -2.402344 l 2.960938 -2.957032 z m 0 0" fill="#62a0ea"/>
|
||||
<path d="m 87.320312 26.835938 l 13.789063 13.789062 c 0.292969 0.292969 0.292969 0.769531 0 1.0625 s -0.769531 0.292969 -1.0625 0 l -13.789063 -13.789062 c -0.292968 -0.292969 -0.292968 -0.769532 0 -1.0625 c 0.292969 -0.289063 0.769532 -0.289063 1.0625 0 z m 0 0" fill="#3584e4"/>
|
||||
<path d="m 42.421875 89.765625 c -3 3 -6.382813 4.484375 -7.554687 3.3125 c -1.171876 -1.171875 0.3125 -4.554687 3.3125 -7.554687 c 3.003906 -3.003907 6.386718 -4.488282 7.558593 -3.316407 s -0.3125 4.554688 -3.316406 7.558594 z m 0 0" fill="url(#l)"/>
|
||||
<path d="m 45.269531 70.347656 l -7.851562 12.511719 l 7.835937 7.925781 l 12.597656 -7.855468 z m -6.039062 13.171875 l 5.449219 5.449219 c 0.347656 0.347656 0.449218 0.933594 0.097656 1.160156 c -0.886719 0.570313 -2.9375 1.539063 -2.9375 1.539063 c -0.25 0.128906 -0.539063 0.164062 -0.773438 -0.066407 l -4.546875 -4.550781 c -0.234375 -0.230469 -0.207031 -0.527343 -0.066406 -0.773437 l 1.617187 -2.859375 c 0.207032 -0.363281 0.8125 -0.25 1.160157 0.101562 z m 0 0" fill="url(#m)"/>
|
||||
<path d="m 43.332031 74.777344 l 9.867188 9.867187 c 0.394531 0.390625 0.476562 0.871094 0.128906 1.066407 l -7.710937 5.253906 c -0.308594 0.210937 -0.785157 0.160156 -1.171876 -0.226563 l -6.984374 -6.988281 c -0.386719 -0.386719 -0.4375 -0.859375 -0.230469 -1.167969 l 5.234375 -7.8125 c 0.125 -0.285156 0.558594 -0.304687 0.867187 0.007813 z m 0 0" fill="url(#n)"/>
|
||||
<g clip-path="url(#z)" mask="url(#v)">
|
||||
<g clip-path="url(#y)" mask="url(#w)">
|
||||
<path d="m 128 80.640625 v 47.359375 h -128 v -47.359375 z m 0 0" fill="url(#x)"/>
|
||||
<path d="m 13.308594 80.640625 l 47.355468 47.359375 h 21.214844 l -47.359375 -47.359375 z m 42.421875 0 l 47.363281 47.359375 h 21.214844 l -47.363282 -47.359375 z m 42.429687 0 l 29.839844 29.839844 v -21.210938 l -8.628906 -8.628906 z m -98.160156 7.90625 v 21.214844 l 18.238281 18.238281 h 21.214844 z m 0 0"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 18 KiB |
100
demos/print-editor/data/scalable/apps/org.gtk.PrintEditor4.svg
Normal file
100
demos/print-editor/data/scalable/apps/org.gtk.PrintEditor4.svg
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientTransform="matrix(0.232143 0 0 0.328947 -7.567033 263.82666)" gradientUnits="userSpaceOnUse" x1="88.595886" x2="536.595886" y1="-449.394012" y2="-449.394012">
|
||||
<stop offset="0" stop-color="#acabae"/>
|
||||
<stop offset="0.0384615" stop-color="#deddda"/>
|
||||
<stop offset="0.0768555" stop-color="#c0bfbc"/>
|
||||
<stop offset="0.923077" stop-color="#c0bfbc"/>
|
||||
<stop offset="0.961538" stop-color="#deddda"/>
|
||||
<stop offset="1" stop-color="#9a9996"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="26.999876" x2="100.999876" y1="32.999688" y2="32.999688">
|
||||
<stop offset="0" stop-color="#7e7c77"/>
|
||||
<stop offset="0.3" stop-color="#9a9996"/>
|
||||
<stop offset="1" stop-color="#9a9996"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="c" gradientUnits="userSpaceOnUse" x1="67.467916" x2="67.467916" y1="83.999688" y2="36.782906">
|
||||
<stop offset="0" stop-color="#deddda"/>
|
||||
<stop offset="1" stop-color="#c0bfbc"/>
|
||||
</linearGradient>
|
||||
<clipPath id="d">
|
||||
<path d="m 79 72 h 15 v 16 h -15 z m 0 0"/>
|
||||
</clipPath>
|
||||
<clipPath id="e">
|
||||
<path d="m 93.21875 72.921875 l -14.21875 14.21875 h -4.0625 v -18.28125 h 18.28125 z m 0 0"/>
|
||||
</clipPath>
|
||||
<linearGradient id="f" gradientTransform="matrix(0 0.126951 0.126951 0 76.460862 36.359884)" gradientUnits="userSpaceOnUse" x1="344" x2="340" y1="76" y2="72">
|
||||
<stop offset="0" stop-color="#d5d3cf"/>
|
||||
<stop offset="1" stop-color="#ffffff"/>
|
||||
</linearGradient>
|
||||
<filter id="g" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="h">
|
||||
<g filter="url(#g)">
|
||||
<rect fill-opacity="0.396" height="128" width="128"/>
|
||||
</g>
|
||||
</mask>
|
||||
<clipPath id="i">
|
||||
<rect height="152" width="192"/>
|
||||
</clipPath>
|
||||
<linearGradient id="j" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#1c71d8"/>
|
||||
<stop offset="0.323117" stop-color="#62a0ea"/>
|
||||
<stop offset="0.59387" stop-color="#1b5aa6"/>
|
||||
<stop offset="1" stop-color="#1c71d8"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="k" gradientTransform="matrix(1.597748 1.597748 -1.06066 1.06066 -56.853041 -543.720139)" x1="224.504562" x2="231.453873" xlink:href="#j" y1="282.5" y2="282.5"/>
|
||||
<radialGradient id="l" cx="227.599915" cy="201.029724" gradientTransform="matrix(4.072817 4.073078 -5.940048 5.939073 373.883117 -2098.049112)" gradientUnits="userSpaceOnUse" r="2.5">
|
||||
<stop offset="0" stop-color="#93bdf1"/>
|
||||
<stop offset="1" stop-color="#1a5fb4"/>
|
||||
</radialGradient>
|
||||
<linearGradient id="m" gradientTransform="matrix(2.121328 2.121328 -2.174353 2.174353 181.766074 -1021.145947)" gradientUnits="userSpaceOnUse" x1="226.90625" x2="228.86203" y1="288.75" y2="288.767151">
|
||||
<stop offset="0" stop-color="#77767b"/>
|
||||
<stop offset="0.443872" stop-color="#f6f5f4"/>
|
||||
<stop offset="1" stop-color="#5e5c64"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="n" gradientTransform="matrix(1.258421 1.258421 -1.06066 1.06066 57.381892 -503.024312)" gradientUnits="userSpaceOnUse" x1="223.1875" x2="233.0625" y1="278" y2="278">
|
||||
<stop offset="0" stop-color="#ffa348"/>
|
||||
<stop offset="0.265823" stop-color="#ffd7af"/>
|
||||
<stop offset="0.734177" stop-color="#ff8d1c"/>
|
||||
<stop offset="1" stop-color="#ffa348"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="o" gradientTransform="matrix(1.573027 1.573027 -1.06066 1.06066 -14.348129 -574.754333)" x1="224.504562" x2="231.453873" xlink:href="#j" y1="282.5" y2="282.5"/>
|
||||
<path d="m 21 16 c -4.433594 0 -8 3.566406 -8 8 v 84 c 0 4.433594 3.566406 8 8 8 h 4 v -4 h 80 v 4 h 4 c 4.433594 0 8 -3.566406 8 -8 v -84 c 0 -4.433594 -3.566406 -8 -8 -8 z m 0 0" fill="url(#a)"/>
|
||||
<path d="m 21 12 h 88 c 4.417969 0 8 3.582031 8 8 v 68 c 0 4.417969 -3.582031 8 -8 8 h -88 c -4.417969 0 -8 -3.582031 -8 -8 v -68 c 0 -4.417969 3.582031 -8 8 -8 z m 0 0" fill="#deddda"/>
|
||||
<path d="m 27 28 h 74 v 10 h -74 z m 0 0" fill="url(#b)"/>
|
||||
<path d="m 27 38 h 74 v 46 h -74 z m 0 0" fill="url(#c)"/>
|
||||
<path d="m 24 33 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#bf5f00" fill-opacity="0.964567"/>
|
||||
<g fill-opacity="0.984252">
|
||||
<path d="m 18 40 h 6 v 12 h -6 z m 0 0" fill="#acacac"/>
|
||||
<path d="m 18 40 h 6 v 10 h -6 z m 0 0" fill="#d1d1d1"/>
|
||||
<path d="m 37 36 h 56 v 44 h -56 z m 0 0" fill="#deddda"/>
|
||||
</g>
|
||||
<path d="m 37 34 h 56 c 1.105469 0 2 0.894531 2 2 s -0.894531 2 -2 2 h -56 c -1.105469 0 -2 -0.894531 -2 -2 s 0.894531 -2 2 -2 z m 0 0" fill-opacity="0.940945"/>
|
||||
<path d="m 37 36.859375 h 56 v 36.925781 l -14.125 14.214844 h -41.875 z m 0 0" fill="#9a9996" fill-opacity="0.984252"/>
|
||||
<path d="m 37 36 h 56 v 36.925781 l -14.125 14.214844 h -41.875 z m 0 0" fill="#f6f5f4" fill-opacity="0.984252"/>
|
||||
<g clip-path="url(#d)">
|
||||
<g clip-path="url(#e)">
|
||||
<path d="m 79 77.386719 v 9.351562 c 0 2.464844 2 4.464844 4.464844 4.464844 h 9.351562 c 2.464844 0 4.464844 -2 4.464844 -4.464844 v -9.351562 c 0 -2.464844 -2 -4.464844 -4.464844 -4.464844 h -9.351562 c -2.464844 0 -4.464844 2 -4.464844 4.464844 z m 0 0" fill="url(#f)"/>
|
||||
</g>
|
||||
</g>
|
||||
<path d="m 27 100 h 76 c 1.109375 0 2 0.890625 2 2 v 10 h -80 v -10 c 0 -1.109375 0.890625 -2 2 -2 z m 0 0" fill="#5e5c64" fill-opacity="0.940945"/>
|
||||
<path d="m 27 102 h 76 c 1.109375 0 2 0.890625 2 2 v 10 h -80 v -10 c 0 -1.109375 0.890625 -2 2 -2 z m 0 0" fill="#9a9996"/>
|
||||
<path d="m 13 106 v 2 c 0 4.433594 3.566406 8 8 8 h 4 v -2 h -4 c -4.433594 0 -8 -3.566406 -8 -8 z m 104 0 c 0 4.433594 -3.566406 8 -8 8 h -4 v 2 h 4 c 4.433594 0 8 -3.566406 8 -8 z m -92 6 v 2 h 80 v -2 z m 0 0" fill="#9e9c99" fill-opacity="0.366142"/>
|
||||
<path d="m 27 38 v 46 l 6 -46 z m 0 0" fill="#7e7c77" fill-opacity="0.11811"/>
|
||||
<path d="m 24 32 c 0 1.65625 -1.34375 3 -3 3 s -3 -1.34375 -3 -3 s 1.34375 -3 3 -3 s 3 1.34375 3 3 z m 0 0" fill="#ffa348" fill-opacity="0.964567"/>
|
||||
<g clip-path="url(#i)" mask="url(#h)" transform="matrix(1 0 0 1 -8 -16)">
|
||||
<path d="m 29 112 c -4.433594 0 -8 -3.566406 -8 -8 v -2 c 0 4.433594 3.566406 8 8 8 h 88 c 4.433594 0 8 -3.566406 8 -8 v 2 c 0 4.433594 -3.566406 8 -8 8 z m 0 0" fill="#f6f5f4"/>
|
||||
</g>
|
||||
<path d="m 89.503906 31.144531 l 10.066406 10.066407 l -41.71875 41.71875 l -10.066406 -10.066407 z m 0 0" fill="#ffa348"/>
|
||||
<path d="m 88.246094 29.886719 l 7.550781 7.550781 l -41.71875 41.71875 l -7.550781 -7.550781 z m 0 0" fill="#ff7800"/>
|
||||
<path d="m 86.789062 28.429688 l 2.515626 2.515624 l -41.71875 41.71875 l -2.515626 -2.515624 z m 0 0" fill="#ffbe6f"/>
|
||||
<path d="m 121.898438 -0.101562 c -4.855469 0.921874 -11.730469 5.152343 -18.140626 11.558593 l -16.96875 16.972657 l 12.78125 12.78125 l 16.972657 -16.972657 c 6.40625 -6.40625 10.636719 -13.28125 11.558593 -18.136719 z m 0 0" fill="url(#k)"/>
|
||||
<path d="m 110.011719 13.882812 c -2.1875 -0.398437 -5.421875 0.988282 -8.167969 3.730469 l -11.871094 11.875 l -6.6875 6.6875 c -4.800781 4.800781 -9.234375 12.007813 -9.648437 13.042969 c -0.484375 1.207031 -0.449219 2.730469 0.953125 4.136719 c 1.40625 1.40625 2.917968 1.441406 4.136718 0.953125 c 1.035157 -0.414063 8.292969 -4.984375 13.042969 -9.648438 l 2.402344 -2.398437 l 16.160156 -16.160157 c 2.742188 -2.746093 4.128907 -5.976562 3.730469 -8.167968 c -0.742188 1.390625 -1.859375 2.902344 -3.308594 4.347656 l -13.996094 13.996094 l -5.089843 -5.089844 l 13.996093 -13.996094 c 1.445313 -1.445312 2.960938 -2.566406 4.347657 -3.308594 z m 0 0" fill="url(#l)"/>
|
||||
<path d="m 95.273438 36.914062 l -2.960938 2.960938 l -2.398438 2.402344 c -4.90625 5.101562 -11.855468 10.828125 -11.855468 10.828125 c 1.011718 -0.433594 8.167968 -5.101563 12.914062 -9.769531 l 2.402344 -2.402344 l 2.960938 -2.957032 z m 0 0" fill="#62a0ea"/>
|
||||
<path d="m 87.320312 26.835938 l 13.789063 13.789062 c 0.292969 0.292969 0.292969 0.769531 0 1.0625 s -0.769531 0.292969 -1.0625 0 l -13.789063 -13.789062 c -0.292968 -0.292969 -0.292968 -0.769532 0 -1.0625 c 0.292969 -0.289063 0.769532 -0.289063 1.0625 0 z m 0 0" fill="#3584e4"/>
|
||||
<path d="m 42.421875 89.765625 c -3 3 -6.382813 4.484375 -7.554687 3.3125 c -1.171876 -1.171875 0.3125 -4.554687 3.3125 -7.554687 c 3.003906 -3.003907 6.386718 -4.488282 7.558593 -3.316407 s -0.3125 4.554688 -3.316406 7.558594 z m 0 0" fill="url(#m)"/>
|
||||
<path d="m 45.269531 70.347656 l -7.851562 12.511719 l 7.835937 7.925781 l 12.597656 -7.855468 z m -6.039062 13.171875 l 5.449219 5.449219 c 0.347656 0.347656 0.449218 0.933594 0.097656 1.160156 c -0.886719 0.570313 -2.9375 1.539063 -2.9375 1.539063 c -0.25 0.128906 -0.539063 0.164062 -0.773438 -0.066407 l -4.546875 -4.550781 c -0.234375 -0.230469 -0.207031 -0.527343 -0.066406 -0.773437 l 1.617187 -2.859375 c 0.207032 -0.363281 0.8125 -0.25 1.160157 0.101562 z m 0 0" fill="url(#n)"/>
|
||||
<path d="m 43.332031 74.777344 l 9.867188 9.867187 c 0.394531 0.390625 0.476562 0.871094 0.128906 1.066407 l -7.710937 5.253906 c -0.308594 0.210937 -0.785157 0.160156 -1.171876 -0.226563 l -6.984374 -6.988281 c -0.386719 -0.386719 -0.4375 -0.859375 -0.230469 -1.167969 l 5.234375 -7.8125 c 0.125 -0.285156 0.558594 -0.304687 0.867187 0.007813 z m 0 0" fill="url(#o)"/>
|
||||
</svg>
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<filter id="a" height="100%" width="100%" x="0%" y="0%">
|
||||
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
|
||||
</filter>
|
||||
<mask id="b">
|
||||
<g filter="url(#a)">
|
||||
<rect fill-opacity="0.396" height="16" width="16"/>
|
||||
</g>
|
||||
</mask>
|
||||
<clipPath id="c">
|
||||
<rect height="152" width="192"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#c)" mask="url(#b)" transform="matrix(1 0 0 1 -168 -16)">
|
||||
<path d="m 29 112 c -4.433594 0 -8 -3.566406 -8 -8 v -2 c 0 4.433594 3.566406 8 8 8 h 88 c 4.433594 0 8 -3.566406 8 -8 v 2 c 0 4.433594 -3.566406 8 -8 8 z m 0 0" fill="#f6f5f4"/>
|
||||
</g>
|
||||
<g fill="#2e3436">
|
||||
<path d="m 4 2 v 2 h 5.585938 l 2 -2 z m -2 3 c -0.5 0 -1 0.5 -1 1 v 4 c 0 0.5 0.5 1 1 1 h 1 v -2 h 2 c 0 -0.265625 0.105469 -0.519531 0.292969 -0.707031 l 3.292969 -3.292969 z m 11.414062 0 l -4 4 h 3.585938 v 2 h 1 c 0.5 0 1 -0.5 1 -1 v -4 c 0 -0.5 -0.5 -1 -1 -1 z m -9.414062 5 v 5 h 8 v -5 h -3.585938 l -0.707031 0.707031 c -0.1875 0.1875 -0.441406 0.292969 -0.707031 0.292969 h -1 c -0.550781 0 -1 -0.449219 -1 -1 z m 0 0"/>
|
||||
<path d="m 6 10 h 1 l 9 -9 l -1 -1 l -9 9 z m 0 0"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
@@ -12,3 +12,12 @@ install_data('org.gtk.PrintEditor4.desktop', install_dir: gtk_applicationsdir)
|
||||
|
||||
# appdata
|
||||
install_data('org.gtk.PrintEditor4.appdata.xml', install_dir: gtk_appdatadir)
|
||||
|
||||
# icons
|
||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||
|
||||
foreach size: ['scalable', 'symbolic']
|
||||
install_subdir('data/' + size,
|
||||
install_dir: icontheme_dir
|
||||
)
|
||||
endforeach
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Name=Print Editor
|
||||
Comment=A simple editor demonstrating GTK printing
|
||||
Exec=gtk4-print-editor %f
|
||||
Icon=text-editor-symbolic
|
||||
Icon=org.gtk.PrintEditor4.Devel
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
|
@@ -33,8 +33,8 @@ update_title (GtkWindow *window)
|
||||
static void
|
||||
update_statusbar (void)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
char *msg;
|
||||
int row, col;
|
||||
GtkTextIter iter;
|
||||
const char *print_str;
|
||||
|
||||
@@ -633,7 +633,7 @@ activate_about (GSimpleAction *action,
|
||||
"website", "http://www.gtk.org",
|
||||
"comments", "Program to demonstrate GTK printing",
|
||||
"authors", (const char *[]){ "Alexander Larsson", NULL },
|
||||
"logo-icon-name", "text-editor-symbolic",
|
||||
"logo-icon-name", "org.gtk.PrintEditor4.Devel",
|
||||
"title", "About GTK Print Editor",
|
||||
"system-information", sysinfo->str,
|
||||
NULL);
|
||||
@@ -675,7 +675,7 @@ static GActionEntry app_entries[] = {
|
||||
{ "print", activate_print, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
static const gchar ui_info[] =
|
||||
static const char ui_info[] =
|
||||
"<interface>"
|
||||
" <menu id='menubar'>"
|
||||
" <submenu>"
|
||||
@@ -781,6 +781,8 @@ activate (GApplication *app)
|
||||
gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (main_window), TRUE);
|
||||
update_title (GTK_WINDOW (main_window));
|
||||
|
||||
gtk_widget_add_css_class (main_window, "devel");
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (main_window), box);
|
||||
|
||||
|
@@ -139,9 +139,9 @@ get_busy (GSimpleAction *action,
|
||||
gtk_widget_set_sensitive (window, FALSE);
|
||||
}
|
||||
|
||||
static gint current_page = 0;
|
||||
static int current_page = 0;
|
||||
static gboolean
|
||||
on_page (gint i)
|
||||
on_page (int i)
|
||||
{
|
||||
return current_page == i;
|
||||
}
|
||||
@@ -250,12 +250,12 @@ activate_about (GSimpleAction *action,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkApplication *app = user_data;
|
||||
const gchar *authors[] = {
|
||||
const char *authors[] = {
|
||||
"Andrea Cimitan",
|
||||
"Cosimo Cecchi",
|
||||
NULL
|
||||
};
|
||||
gchar *version;
|
||||
char *version;
|
||||
GString *s;
|
||||
|
||||
s = g_string_new ("");
|
||||
@@ -422,8 +422,8 @@ static void
|
||||
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
|
||||
{
|
||||
GtkWidget *w;
|
||||
gint v;
|
||||
gchar *text;
|
||||
int v;
|
||||
char *text;
|
||||
|
||||
v = (int)gtk_adjustment_get_value (adjustment);
|
||||
|
||||
@@ -454,8 +454,8 @@ spin_value_reset (GtkWidget *button, GtkAdjustment *adjustment)
|
||||
dismiss (button);
|
||||
}
|
||||
|
||||
static gint pulse_time = 250;
|
||||
static gint pulse_entry_mode = 0;
|
||||
static int pulse_time = 250;
|
||||
static int pulse_entry_mode = 0;
|
||||
|
||||
static void
|
||||
remove_pulse (gpointer pulse_id)
|
||||
@@ -482,7 +482,7 @@ pulse_it (GtkWidget *widget)
|
||||
static void
|
||||
update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget)
|
||||
{
|
||||
gdouble value;
|
||||
double value;
|
||||
guint pulse_id;
|
||||
|
||||
value = gtk_adjustment_get_value (adjustment);
|
||||
@@ -537,12 +537,12 @@ on_entry_icon_release (GtkEntry *entry,
|
||||
|
||||
static void
|
||||
on_scale_button_value_changed (GtkScaleButton *button,
|
||||
gdouble value,
|
||||
double value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
gdouble val;
|
||||
gchar *str;
|
||||
double val;
|
||||
char *str;
|
||||
|
||||
adjustment = gtk_scale_button_get_adjustment (button);
|
||||
val = gtk_scale_button_get_value (button);
|
||||
@@ -557,9 +557,9 @@ on_scale_button_value_changed (GtkScaleButton *button,
|
||||
}
|
||||
else
|
||||
{
|
||||
gint percent;
|
||||
int percent;
|
||||
|
||||
percent = (gint) (100. * val / (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) + .5);
|
||||
percent = (int) (100. * val / (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) + .5);
|
||||
|
||||
str = g_strdup_printf (C_("volume percentage", "%d %%"), percent);
|
||||
}
|
||||
@@ -627,7 +627,7 @@ static void
|
||||
on_range_from_changed (GtkSpinButton *from)
|
||||
{
|
||||
GtkSpinButton *to;
|
||||
gint v1, v2;
|
||||
int v1, v2;
|
||||
|
||||
to = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (from), "range_to_spin"));
|
||||
|
||||
@@ -642,7 +642,7 @@ static void
|
||||
on_range_to_changed (GtkSpinButton *to)
|
||||
{
|
||||
GtkSpinButton *from;
|
||||
gint v1, v2;
|
||||
int v1, v2;
|
||||
|
||||
from = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (to), "range_from_spin"));
|
||||
|
||||
@@ -654,7 +654,7 @@ on_range_to_changed (GtkSpinButton *to)
|
||||
}
|
||||
|
||||
static void
|
||||
info_bar_response (GtkWidget *infobar, gint response_id)
|
||||
info_bar_response (GtkWidget *infobar, int response_id)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_CLOSE)
|
||||
gtk_widget_hide (infobar);
|
||||
@@ -703,7 +703,7 @@ action_dialog_button_clicked (GtkButton *button, GtkWidget *page)
|
||||
static void
|
||||
page_changed_cb (GtkWidget *stack, GParamSpec *pspec, gpointer data)
|
||||
{
|
||||
const gchar *name;
|
||||
const char *name;
|
||||
GtkWidget *window;
|
||||
GtkWidget *page;
|
||||
|
||||
@@ -853,10 +853,10 @@ update_title_header (GtkListBoxRow *row,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *header;
|
||||
gchar *title;
|
||||
char *title;
|
||||
|
||||
header = gtk_list_box_row_get_header (row);
|
||||
title = (gchar *)g_object_get_data (G_OBJECT (row), "title");
|
||||
title = (char *)g_object_get_data (G_OBJECT (row), "title");
|
||||
if (!header && title)
|
||||
{
|
||||
title = g_strdup_printf ("<b>%s</b>", title);
|
||||
@@ -881,8 +881,8 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
|
||||
{
|
||||
GtkWidget *box, *row, *label, *swatch;
|
||||
GdkRGBA rgba;
|
||||
const gchar *color;
|
||||
gchar *text;
|
||||
const char *color;
|
||||
char *text;
|
||||
GtkWidget *silver;
|
||||
GtkWidget *gold;
|
||||
|
||||
@@ -983,7 +983,7 @@ set_color (GtkListBox *box, GtkListBoxRow *row, GtkColorChooser *chooser)
|
||||
static void
|
||||
populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
{
|
||||
struct { const gchar *name; const gchar *color; const gchar *title; } colors[] = {
|
||||
struct { const char *name; const char *color; const char *title; } colors[] = {
|
||||
{ "2.5", "#C8828C", "Red" },
|
||||
{ "5", "#C98286", NULL },
|
||||
{ "7.5", "#C9827F", NULL },
|
||||
@@ -1025,7 +1025,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
{ "7.5", "#C48299", NULL },
|
||||
{ "10", "#C68292", NULL }
|
||||
};
|
||||
gint i;
|
||||
int i;
|
||||
GtkWidget *row, *box, *label, *swatch;
|
||||
GtkWidget *sw;
|
||||
GdkRGBA rgba;
|
||||
@@ -1081,7 +1081,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
|
||||
typedef struct {
|
||||
GtkWidget *flowbox;
|
||||
gchar *filename;
|
||||
char *filename;
|
||||
} BackgroundData;
|
||||
|
||||
static void
|
||||
@@ -1127,11 +1127,11 @@ background_loaded_cb (GObject *source,
|
||||
static void
|
||||
populate_flowbox (GtkWidget *flowbox)
|
||||
{
|
||||
const gchar *location;
|
||||
const char *location;
|
||||
GDir *dir;
|
||||
GError *error = NULL;
|
||||
const gchar *name;
|
||||
gchar *filename;
|
||||
const char *name;
|
||||
char *filename;
|
||||
GFile *file;
|
||||
GInputStream *stream;
|
||||
BackgroundData *bd;
|
||||
@@ -1288,7 +1288,7 @@ my_text_view_class_init (MyTextViewClass *class)
|
||||
}
|
||||
|
||||
static void
|
||||
my_text_view_set_background (MyTextView *tv, const gchar *filename, gboolean is_resource)
|
||||
my_text_view_set_background (MyTextView *tv, const char *filename, gboolean is_resource)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GFile *file;
|
||||
@@ -1331,12 +1331,12 @@ my_text_view_set_adjustment (MyTextView *tv, GtkAdjustment *adjustment)
|
||||
}
|
||||
|
||||
static void
|
||||
close_selection_dialog (GtkWidget *dialog, gint response, GtkWidget *tv)
|
||||
close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv)
|
||||
{
|
||||
GtkWidget *box;
|
||||
GtkWidget *child;
|
||||
GList *children;
|
||||
const gchar *filename;
|
||||
const char *filename;
|
||||
gboolean is_resource;
|
||||
|
||||
gtk_widget_hide (dialog);
|
||||
@@ -1352,7 +1352,7 @@ close_selection_dialog (GtkWidget *dialog, gint response, GtkWidget *tv)
|
||||
return;
|
||||
|
||||
child = children->data;
|
||||
filename = (const gchar *)g_object_get_data (G_OBJECT (child), "filename");
|
||||
filename = (const char *)g_object_get_data (G_OBJECT (child), "filename");
|
||||
is_resource = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (child), "is-resource"));
|
||||
|
||||
g_list_free (children);
|
||||
@@ -1377,8 +1377,8 @@ static void
|
||||
handle_insert (GtkWidget *button, GtkWidget *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
const gchar *id;
|
||||
const gchar *text;
|
||||
const char *id;
|
||||
const char *text;
|
||||
|
||||
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
|
||||
|
||||
@@ -1402,7 +1402,7 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GdkClipboard *clipboard;
|
||||
const gchar *id;
|
||||
const char *id;
|
||||
|
||||
clipboard = gtk_widget_get_clipboard (textview);
|
||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
|
||||
@@ -1421,7 +1421,7 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview)
|
||||
static void
|
||||
clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *button)
|
||||
{
|
||||
const gchar *id;
|
||||
const char *id;
|
||||
gboolean has_text;
|
||||
|
||||
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
|
||||
@@ -1434,7 +1434,7 @@ clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *b
|
||||
static void
|
||||
textbuffer_notify_selection (GObject *object, GParamSpec *pspec, GtkWidget *button)
|
||||
{
|
||||
const gchar *id;
|
||||
const char *id;
|
||||
gboolean has_selection;
|
||||
|
||||
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
|
||||
@@ -1469,7 +1469,7 @@ page_combo_separator_func (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gchar *text;
|
||||
char *text;
|
||||
gboolean res;
|
||||
|
||||
gtk_tree_model_get (model, iter, 0, &text, -1);
|
||||
@@ -1594,7 +1594,7 @@ text_view_add_to_context_menu (GtkTextView *text_view)
|
||||
static void
|
||||
open_popover_text_changed (GtkEntry *entry, GParamSpec *pspec, GtkWidget *button)
|
||||
{
|
||||
const gchar *text;
|
||||
const char *text;
|
||||
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
gtk_widget_set_sensitive (button, strlen (text) > 0);
|
||||
@@ -1864,8 +1864,8 @@ activate (GApplication *app)
|
||||
{ "print", activate_print, NULL, NULL, NULL },
|
||||
};
|
||||
struct {
|
||||
const gchar *action_and_target;
|
||||
const gchar *accelerators[2];
|
||||
const char *action_and_target;
|
||||
const char *accelerators[2];
|
||||
} accels[] = {
|
||||
{ "app.about", { "F1", NULL } },
|
||||
{ "app.quit", { "<Control>q", NULL } },
|
||||
@@ -1878,15 +1878,15 @@ activate (GApplication *app)
|
||||
{ "win.lock", { "<Control>l", NULL } },
|
||||
};
|
||||
struct {
|
||||
const gchar *action_and_target;
|
||||
const gchar *accelerators[2];
|
||||
const char *action_and_target;
|
||||
const char *accelerators[2];
|
||||
} late_accels[] = {
|
||||
{ "app.cut", { "<Control>x", NULL } },
|
||||
{ "app.copy", { "<Control>c", NULL } },
|
||||
{ "app.paste", { "<Control>v", NULL } },
|
||||
{ "win.delete", { "Delete", NULL } },
|
||||
};
|
||||
gint i;
|
||||
int i;
|
||||
GPermission *permission;
|
||||
GAction *action;
|
||||
GError *error = NULL;
|
||||
@@ -2282,7 +2282,7 @@ main (int argc, char *argv[])
|
||||
{ "check-off-disabled", NULL, NULL, "false", NULL },
|
||||
{ "radio-x-disabled", NULL, "s", "'x'", NULL },
|
||||
};
|
||||
gint status;
|
||||
int status;
|
||||
|
||||
app = gtk_application_new ("org.gtk.WidgetFactory4", G_APPLICATION_NON_UNIQUE);
|
||||
|
||||
|
@@ -474,19 +474,19 @@ The maximum width of each column is given by the longest element in the
|
||||
column:
|
||||
|
||||
```c
|
||||
void gtk_type_set_property (GtkType *type,
|
||||
const gchar *value,
|
||||
GError **error);
|
||||
const gchar *gtk_type_get_property (GtkType *type);
|
||||
void gtk_type_set_property (GtkType *type,
|
||||
const char *value,
|
||||
GError **error);
|
||||
const char *gtk_type_get_property (GtkType *type);
|
||||
```
|
||||
|
||||
It is also possible to align the columns to the next tab:
|
||||
|
||||
```c
|
||||
void gtk_type_set_prop (GtkType *type,
|
||||
gfloat value);
|
||||
gfloat gtk_type_get_prop (GtkType *type);
|
||||
gint gtk_type_update_foobar (GtkType *type);
|
||||
float value);
|
||||
float gtk_type_get_prop (GtkType *type);
|
||||
int gtk_type_update_foobar (GtkType *type);
|
||||
```
|
||||
|
||||
Public headers should never be included directly:
|
||||
|
@@ -426,8 +426,8 @@ draw_cb (GtkDrawingArea *drawing_area,
|
||||
/* Draw a rectangle on the surface at the given position */
|
||||
static void
|
||||
draw_brush (GtkWidget *widget,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
double x,
|
||||
double y)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
@@ -797,8 +797,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
@@ -1138,7 +1138,7 @@ example_app_startup (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *app_menu;
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -1476,7 +1476,7 @@ static void
|
||||
search_text_changed (GtkEntry *entry,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *text;
|
||||
const char *text;
|
||||
GtkWidget *tab;
|
||||
GtkWidget *view;
|
||||
GtkTextBuffer *buffer;
|
||||
|
@@ -177,6 +177,7 @@ def ConvertToDocbook(infile, outfile):
|
||||
subprocess.check_call(["pandoc", infile, "-o", outfile,
|
||||
"--from=" + input_format,
|
||||
"--to=" + output_format,
|
||||
"--standalone",
|
||||
"--top-level-division=" + division])
|
||||
|
||||
def ExpandGtkDocAbbreviations(infile, outfile):
|
||||
|
@@ -65,9 +65,9 @@
|
||||
<section>
|
||||
<xi:include href="xml/gtksorter.xml" />
|
||||
<xi:include href="xml/gtkcustomsorter.xml" />
|
||||
<xi:include href="xml/gtkmultisorter.xml" />
|
||||
<xi:include href="xml/gtkstringsorter.xml" />
|
||||
<xi:include href="xml/gtknumericsorter.xml" />
|
||||
<xi:include href="xml/gtkmultisorter.xml" />
|
||||
</section>
|
||||
<xi:include href="xml/gtkselectionmodel.xml" />
|
||||
<section>
|
||||
@@ -93,7 +93,9 @@
|
||||
<xi:include href="xml/gtklistview.xml" />
|
||||
<xi:include href="xml/gtkgridview.xml" />
|
||||
<xi:include href="xml/gtkcolumnview.xml" />
|
||||
<xi:include href="xml/gtkcolumnviewcolumn.xml" />
|
||||
<section>
|
||||
<xi:include href="xml/gtkcolumnviewcolumn.xml" />
|
||||
</section>
|
||||
<xi:include href="xml/gtkdropdown.xml" />
|
||||
</chapter>
|
||||
|
||||
|
@@ -1300,10 +1300,6 @@ gtk_file_chooser_get_current_name
|
||||
<SUBSECTION>
|
||||
gtk_file_chooser_get_file
|
||||
gtk_file_chooser_set_file
|
||||
gtk_file_chooser_select_file
|
||||
gtk_file_chooser_unselect_file
|
||||
gtk_file_chooser_select_all
|
||||
gtk_file_chooser_unselect_all
|
||||
gtk_file_chooser_get_files
|
||||
gtk_file_chooser_set_current_folder
|
||||
gtk_file_chooser_get_current_folder
|
||||
@@ -1316,7 +1312,7 @@ gtk_file_chooser_get_filter
|
||||
<SUBSECTION>
|
||||
gtk_file_chooser_add_shortcut_folder
|
||||
gtk_file_chooser_remove_shortcut_folder
|
||||
gtk_file_chooser_list_shortcut_folders
|
||||
gtk_file_chooser_get_shortcut_folders
|
||||
<SUBSECTION>
|
||||
gtk_file_chooser_add_choice
|
||||
gtk_file_chooser_remove_choice
|
||||
@@ -1444,6 +1440,8 @@ gtk_directory_list_get_file
|
||||
gtk_directory_list_set_file
|
||||
gtk_directory_list_get_io_priority
|
||||
gtk_directory_list_set_io_priority
|
||||
gtk_directory_list_get_monitored
|
||||
gtk_directory_list_set_monitored
|
||||
gtk_directory_list_is_loading
|
||||
gtk_directory_list_get_error
|
||||
<SUBSECTION Standard>
|
||||
@@ -2043,8 +2041,6 @@ gtk_menu_button_get_menu_model
|
||||
GtkArrowType
|
||||
gtk_menu_button_set_direction
|
||||
gtk_menu_button_get_direction
|
||||
gtk_menu_button_set_align_widget
|
||||
gtk_menu_button_get_align_widget
|
||||
gtk_menu_button_set_icon_name
|
||||
gtk_menu_button_get_icon_name
|
||||
gtk_menu_button_set_label
|
||||
@@ -2834,6 +2830,9 @@ gtk_sort_list_model_set_sorter
|
||||
gtk_sort_list_model_get_sorter
|
||||
gtk_sort_list_model_set_model
|
||||
gtk_sort_list_model_get_model
|
||||
gtk_sort_list_model_set_incremental
|
||||
gtk_sort_list_model_get_incremental
|
||||
gtk_sort_list_model_get_peanding
|
||||
<SUBSECTION Standard>
|
||||
GTK_SORT_LIST_MODEL
|
||||
GTK_IS_SORT_LIST_MODEL
|
||||
@@ -3422,6 +3421,7 @@ gtk_tree_list_row_get_type
|
||||
<SECTION>
|
||||
<FILE>gtktreeexpander</FILE>
|
||||
<TITLE>GtkTreeExpander</TITLE>
|
||||
GtkTreeExpander
|
||||
gtk_tree_expander_new
|
||||
gtk_tree_expander_get_child
|
||||
gtk_tree_expander_set_child
|
||||
@@ -7543,12 +7543,27 @@ gtk_expression_watch_unwatch
|
||||
<SUBSECTION>
|
||||
gtk_property_expression_new
|
||||
gtk_property_expression_new_for_pspec
|
||||
gtk_property_expression_get_expression
|
||||
gtk_property_expression_get_pspec
|
||||
gtk_constant_expression_new
|
||||
gtk_constant_expression_new_for_value
|
||||
gtk_constant_expression_get_value
|
||||
gtk_object_expression_new
|
||||
gtk_object_expression_get_object
|
||||
gtk_closure_expression_new
|
||||
gtk_cclosure_expression_new
|
||||
|
||||
<SUBSECTION>
|
||||
GTK_VALUE_HOLDS_EXPRESSION
|
||||
gtk_value_set_expression
|
||||
gtk_value_take_expression
|
||||
gtk_value_get_expression
|
||||
gtk_value_dup_expression
|
||||
|
||||
<SUBSECTION>
|
||||
GtkParamSpecExpression
|
||||
gtk_param_spec_expression
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_IS_EXPRESSION
|
||||
GTK_TYPE_EXPRESSION
|
||||
|
@@ -19,6 +19,7 @@ gtk_assistant_get_type
|
||||
gtk_assistant_page_get_type
|
||||
gtk_bin_layout_get_type
|
||||
gtk_bitset_get_type
|
||||
gtk_expression_get_type
|
||||
gtk_bookmark_list_get_type
|
||||
gtk_box_get_type
|
||||
gtk_box_layout_get_type
|
||||
@@ -29,6 +30,7 @@ gtk_builder_list_item_factory_get_type
|
||||
gtk_builder_scope_get_type
|
||||
gtk_button_get_type
|
||||
gtk_calendar_get_type
|
||||
gtk_cclosure_expression_get_type
|
||||
gtk_cell_area_get_type
|
||||
gtk_cell_area_box_get_type
|
||||
gtk_cell_area_context_get_type
|
||||
@@ -46,6 +48,7 @@ gtk_cell_renderer_toggle_get_type
|
||||
gtk_cell_view_get_type
|
||||
gtk_center_layout_get_type
|
||||
gtk_check_button_get_type
|
||||
gtk_closure_expression_get_type
|
||||
gtk_color_button_get_type
|
||||
gtk_color_chooser_get_type
|
||||
gtk_color_chooser_dialog_get_type
|
||||
@@ -54,6 +57,7 @@ gtk_column_view_get_type
|
||||
gtk_column_view_column_get_type
|
||||
gtk_combo_box_get_type
|
||||
gtk_combo_box_text_get_type
|
||||
gtk_constant_expression_get_type
|
||||
gtk_constraint_get_type
|
||||
gtk_constraint_guide_get_type
|
||||
gtk_constraint_layout_get_type
|
||||
@@ -150,6 +154,7 @@ gtk_no_selection_get_type
|
||||
gtk_notebook_get_type
|
||||
gtk_notebook_page_get_type
|
||||
gtk_numeric_sorter_get_type
|
||||
gtk_object_expression_get_type
|
||||
gtk_orientable_get_type
|
||||
gtk_overlay_get_type
|
||||
gtk_overlay_layout_get_type
|
||||
@@ -172,6 +177,7 @@ gtk_print_operation_preview_get_type
|
||||
gtk_print_settings_get_type
|
||||
@DISABLE_ON_W32@gtk_print_unix_dialog_get_type
|
||||
gtk_progress_bar_get_type
|
||||
gtk_property_expression_get_type
|
||||
gtk_radio_button_get_type
|
||||
gtk_range_get_type
|
||||
gtk_recent_manager_get_type
|
||||
@@ -229,6 +235,7 @@ gtk_text_view_get_type
|
||||
gtk_toggle_button_get_type
|
||||
gtk_tree_drag_dest_get_type
|
||||
gtk_tree_drag_source_get_type
|
||||
gtk_tree_expander_get_type
|
||||
gtk_tree_list_model_get_type
|
||||
gtk_tree_list_row_get_type
|
||||
gtk_tree_list_row_sorter_get_type
|
||||
|
@@ -137,8 +137,41 @@ use gtk_button_new_from_icon_name().
|
||||
|
||||
### Stop using GtkWidget event signals
|
||||
|
||||
Event controllers and #GtkGestures replace event signals in GTK 4.
|
||||
They have been backported to GTK 3.x so you can prepare for this change.
|
||||
Event controllers and gestures replace event signals in GTK 4.
|
||||
|
||||
Most of them have been backported to GTK 3.x so you can prepare
|
||||
for this change.
|
||||
|
||||
| Signal | Event controller |
|
||||
| --- | --- |
|
||||
| ::event | #GtkEventControllerLegacy |
|
||||
| ::event-after | #GtkEventControllerLegacy |
|
||||
| ::button-press-event | #GtkGestureClick |
|
||||
| ::button-release-event | #GtkGestureClick |
|
||||
| ::touch-event | various touch gestures |
|
||||
| ::scroll-event | #GtkEventControllerScroll |
|
||||
| ::motion-notify-event | #GtkEventControllerMotion |
|
||||
| ::delete-event | - |
|
||||
| ::key-press-event | #GtkEventControllerKey |
|
||||
| ::key-release-event | #GtkEventControllerKey |
|
||||
| ::enter-notify-event | #GtkEventControllerMotion |
|
||||
| ::leave-notify-event | #GtkEventControllerMotion |
|
||||
| ::configure-event | replaced by #GdkSurface::size-changed |
|
||||
| ::focus-in-event | #GtkEventControllerFocus |
|
||||
| ::focus-out-event | #GtkEventControllerFocus |
|
||||
| ::map-event | replaced by #GdkSurface:mapped |
|
||||
| ::unmap-event | replaced by #GdkSurface:mapped |
|
||||
| ::property-notify-event | replaced by #GdkClipboard |
|
||||
| ::selection-clear-event | replaced by #GdkClipboard |
|
||||
| ::selection-request-event | replaced by #GdkClipboard |
|
||||
| ::selection-notify-event | replaced by #GdkClipboard |
|
||||
| Drag-and-Drop signals | #GtkDragSource, #GtkDropTarget |
|
||||
| ::proximity-in-event | #GtkGestureStylus |
|
||||
| ::proximity-out-event | #GtkGestureStylus |
|
||||
| ::visibility-notify-event | - |
|
||||
| ::window-state-event | replaced by #GdkToplevel:state |
|
||||
| ::damage-event | - |
|
||||
| ::grab-broken-event | - |
|
||||
|
||||
### Set a proper application ID
|
||||
|
||||
@@ -170,7 +203,7 @@ in GTK 3, you can prepare for the switch by using gtk_widget_destroy()
|
||||
only on toplevel windows, and replace all other uses with
|
||||
gtk_container_remove() or g_object_unref().
|
||||
|
||||
### Reduce the use of generic container APIs</title>
|
||||
### Reduce the use of generic container APIs
|
||||
|
||||
GTK 4 removes gtk_container_add() and gtk_container_remove(). While there
|
||||
is not always a replacement for gtk_container_remove() in GTK 3, you can
|
||||
@@ -531,6 +564,26 @@ by a layout manager (if they are layout-related), or handled in some
|
||||
other way. One possibility is to use child meta objects, as seen with
|
||||
GtkAssistantPage, GtkStackPage and the like.
|
||||
|
||||
The replacements for gtk_container_add() are:
|
||||
|
||||
| Widget | Replacement |
|
||||
| ------ | ----------- |
|
||||
| GtkActionBar | gtk_action_bar_pack_start(), gtk_action_bar_pack_end() |
|
||||
| GtkBox | gtk_box_append() |
|
||||
| GtkExpander | gtk_expander_set_child() |
|
||||
| GtkFixed | gtk_fixed_put() |
|
||||
| GtkFlowBox | gtk_flow_box_insert() |
|
||||
| GtkGrid | gtk_grid_attach() |
|
||||
| GtkHeaderBar | gtk_header_bar_pack_start(), gtk_header_bar_pack_end() |
|
||||
| GtkIconView | - |
|
||||
| GtkInfoBar | gtk_info_bar_add_child() |
|
||||
| GtkListBox | gtk_list_box_insert() |
|
||||
| GtkNotebook | gtk_notebook_append_page() |
|
||||
| GtkPaned | gtk_paned_set_start_child(), gtk_paned_set_end_child() |
|
||||
| GtkStack | gtk_stack_add_named() |
|
||||
| GtkTextView | gtk_text_view_add_child_at_anchor(), gtk_text_view_add_overlay() |
|
||||
| GtkTreeView | - |
|
||||
|
||||
### Stop using GtkContainer::border-width
|
||||
|
||||
GTK 4 has removed the #GtkContainer::border-width property (together
|
||||
|
@@ -123,6 +123,32 @@ the number of listitems they create such as with gtk_grid_view_set_max_columns()
|
||||
and developers running into performance problems should definitely study the
|
||||
tradeoffs of those and experiment with them.
|
||||
|
||||
## Choosing the right model {#model-choosing}
|
||||
|
||||
GTK offers a wide variety of wrapping models which change or supplement an
|
||||
existing model (or models) in some way. But when it comes to storing your
|
||||
actual data, there are only a few ready-made choices available: #GListStore
|
||||
and #GtkStringList.
|
||||
|
||||
GListStore is backed by a balanced tree and has performance characteristics
|
||||
that are expected for that data structure. It works reasonably well for dataset
|
||||
sizes in the 1,000,000 range, and can handle insertions and deletions. It uses
|
||||
a cached iter to make linear access to the items fast.
|
||||
|
||||
GtkStringList is not a general store - it can only handle strings. It is
|
||||
backed by an dynamically allocated array and has performance characteristics
|
||||
that are expected for that data structure. GtkStringList is a good fit for any
|
||||
place where you would otherwise use `char*[]` and works best if the dataset
|
||||
is not very dynamic.
|
||||
|
||||
If these models don't fit your use case or scalability requirements, you
|
||||
should make a custom #GListModel. It is a small interface and not very hard
|
||||
to implement.
|
||||
|
||||
For asymptotic performance comparisons between tree- and array-based
|
||||
implementations, see this
|
||||
[article](https://en.wikipedia.org/wiki/Dynamic_array#Performance).
|
||||
|
||||
## Displaying trees {#displaying-trees}
|
||||
|
||||
While #GtkTreeView provided built-in support for trees, the list widgets, and
|
||||
@@ -183,7 +209,7 @@ transitioning code for easy lookup:
|
||||
| #GtkTreeModel | #GListModel |
|
||||
| #GtkTreePath | #guint position, #GtkTreeListRow |
|
||||
| #GtkTreeIter | #guint position |
|
||||
| GtkTreeRowReference | #GObject item |
|
||||
| #GtkTreeRowReference | #GObject item |
|
||||
| #GtkListStore | #GListStore |
|
||||
| #GtkTreeStore | #GtkTreeListModel, #GtkTreeExpander |
|
||||
| #GtkTreeSelection | #GtkSelectionModel |
|
||||
|
@@ -189,7 +189,7 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GtkTreeModel *model;
|
||||
gchar *author;
|
||||
char *author;
|
||||
|
||||
if (gtk_tree_selection_get_selected (selection, &model, &iter))
|
||||
{
|
||||
|
@@ -141,8 +141,8 @@ take_window_shot (Window child,
|
||||
XWindowAttributes attrs;
|
||||
Window xid;
|
||||
Display *dpy;
|
||||
gint x = 0, y = 0;
|
||||
gint width, height;
|
||||
int x = 0, y = 0;
|
||||
int width, height;
|
||||
|
||||
GdkPixbuf *tmp, *tmp2;
|
||||
GdkPixbuf *retval = NULL;
|
||||
|
@@ -797,7 +797,7 @@ static WidgetInfo *
|
||||
create_about_dialog (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
const gchar *authors[] = {
|
||||
const char *authors[] = {
|
||||
"Peter Mattis",
|
||||
"Spencer Kimball",
|
||||
"Josh MacDonald",
|
||||
|
@@ -15,7 +15,7 @@ typedef enum
|
||||
typedef struct WidgetInfo
|
||||
{
|
||||
GtkWidget *window;
|
||||
gchar *name;
|
||||
char *name;
|
||||
gboolean no_focus;
|
||||
gboolean include_decorations;
|
||||
WidgetSize size;
|
||||
|
@@ -32,7 +32,7 @@ static GActionEntry win_entries[] = {
|
||||
{ "close", action_activated },
|
||||
};
|
||||
|
||||
const gchar *menu_ui =
|
||||
const char *menu_ui =
|
||||
"<interface>"
|
||||
" <menu id='doc-menu'>"
|
||||
" <section>"
|
||||
|
@@ -27,8 +27,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -25,7 +25,7 @@ static void
|
||||
search_text_changed (GtkEntry *entry,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *text;
|
||||
const char *text;
|
||||
GtkWidget *tab;
|
||||
GtkWidget *view;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -55,7 +55,7 @@ static void
|
||||
find_word (GtkButton *button,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *word;
|
||||
const char *word;
|
||||
|
||||
word = gtk_button_get_label (button);
|
||||
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
|
||||
@@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win)
|
||||
GtkWidget *tab, *view, *row;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
gchar *word, *key;
|
||||
char *word, *key;
|
||||
GtkWidget *child;
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
|
||||
@@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win)
|
||||
GtkWidget *tab, *view;
|
||||
GtkTextBuffer *buffer;
|
||||
int count;
|
||||
gchar *lines;
|
||||
char *lines;
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
|
||||
|
||||
@@ -248,9 +248,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
|
@@ -27,8 +27,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -27,8 +27,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -36,9 +36,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
@@ -39,7 +39,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -63,8 +63,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -46,9 +46,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
|
||||
basename = g_file_get_basename (file);
|
||||
|
@@ -39,7 +39,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -63,8 +63,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -66,9 +66,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
|
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -70,8 +70,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -67,9 +67,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
|
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -70,8 +70,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -20,7 +20,7 @@ static void
|
||||
search_text_changed (GtkEntry *entry,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *text;
|
||||
const char *text;
|
||||
GtkWidget *tab;
|
||||
GtkWidget *view;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -120,9 +120,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
|
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -70,8 +70,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -23,7 +23,7 @@ static void
|
||||
search_text_changed (GtkEntry *entry,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *text;
|
||||
const char *text;
|
||||
GtkWidget *tab;
|
||||
GtkWidget *view;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -53,7 +53,7 @@ static void
|
||||
find_word (GtkButton *button,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *word;
|
||||
const char *word;
|
||||
|
||||
word = gtk_button_get_label (button);
|
||||
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
|
||||
@@ -67,7 +67,7 @@ update_words (ExampleAppWindow *win)
|
||||
GtkWidget *tab, *view, *row;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
gchar *word, *key;
|
||||
char *word, *key;
|
||||
GtkWidget *child;
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
|
||||
@@ -212,9 +212,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
|
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
|
||||
static void
|
||||
example_app_startup (GApplication *app)
|
||||
{
|
||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||
|
||||
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
|
||||
|
||||
@@ -70,8 +70,8 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
const gchar *hint)
|
||||
int n_files,
|
||||
const char *hint)
|
||||
{
|
||||
GList *windows;
|
||||
ExampleAppWindow *win;
|
||||
|
@@ -25,7 +25,7 @@ static void
|
||||
search_text_changed (GtkEntry *entry,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *text;
|
||||
const char *text;
|
||||
GtkWidget *tab;
|
||||
GtkWidget *view;
|
||||
GtkTextBuffer *buffer;
|
||||
@@ -55,7 +55,7 @@ static void
|
||||
find_word (GtkButton *button,
|
||||
ExampleAppWindow *win)
|
||||
{
|
||||
const gchar *word;
|
||||
const char *word;
|
||||
|
||||
word = gtk_button_get_label (button);
|
||||
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
|
||||
@@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win)
|
||||
GtkWidget *tab, *view, *row;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter start, end;
|
||||
gchar *word, *key;
|
||||
char *word, *key;
|
||||
GtkWidget *child;
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
|
||||
@@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win)
|
||||
GtkWidget *tab, *view;
|
||||
GtkTextBuffer *buffer;
|
||||
int count;
|
||||
gchar *lines;
|
||||
char *lines;
|
||||
|
||||
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
|
||||
|
||||
@@ -246,9 +246,9 @@ void
|
||||
example_app_window_open (ExampleAppWindow *win,
|
||||
GFile *file)
|
||||
{
|
||||
gchar *basename;
|
||||
char *basename;
|
||||
GtkWidget *scrolled, *view;
|
||||
gchar *contents;
|
||||
char *contents;
|
||||
gsize length;
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextTag *tag;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user