Compare commits
353 Commits
doc-scale-
...
wip/ebassi
Author | SHA1 | Date | |
---|---|---|---|
|
ed087f2a30 | ||
|
df54c81d7f | ||
|
3ccd45b9e0 | ||
|
0d08d2d63a | ||
|
40de4d590a | ||
|
111a440dda | ||
|
9df3067bb8 | ||
|
46c7128094 | ||
|
781b5aac86 | ||
|
df28f92187 | ||
|
59f95e1e1f | ||
|
0a2467ce3b | ||
|
d6acfd81c7 | ||
|
697d0e9ed9 | ||
|
a21409c61b | ||
|
e825ca92e7 | ||
|
ed3740933e | ||
|
0f1a8bfe20 | ||
|
f78330139f | ||
|
5e973006b4 | ||
|
b1c5475046 | ||
|
ea3c2f4889 | ||
|
2aeb9f61a6 | ||
|
11151379df | ||
|
fc15f027ec | ||
|
63dc543d0e | ||
|
4befa6b653 | ||
|
c454c1ad2c | ||
|
84c5472752 | ||
|
88d02b8f91 | ||
|
8c9717119d | ||
|
b3063fe3a0 | ||
|
bf4c44fbf1 | ||
|
92273b5d19 | ||
|
710a326db2 | ||
|
8851d75ba8 | ||
|
ed8db31f81 | ||
|
d40636b6b0 | ||
|
fddc1a9708 | ||
|
4ea6ee4567 | ||
|
9286c1c0fa | ||
|
82166f8d72 | ||
|
cf96e92b8b | ||
|
1140c20309 | ||
|
5228506b6f | ||
|
6fd807ae0d | ||
|
cd78d1a69a | ||
|
fe590578f9 | ||
|
ae4e72d944 | ||
|
00d4b62dce | ||
|
c0cd978311 | ||
|
cd14236dfe | ||
|
fb9413d464 | ||
|
7f22c023de | ||
|
bda1701301 | ||
|
399a03f475 | ||
|
8f75be4647 | ||
|
daec615286 | ||
|
2695f32eb3 | ||
|
9ec2875543 | ||
|
5b735cff00 | ||
|
ae10683e95 | ||
|
0c39051cbe | ||
|
1cd7d4f7cd | ||
|
34b6993d15 | ||
|
c99536c752 | ||
|
2e70e041f1 | ||
|
aed3ab1e85 | ||
|
6c08ea6283 | ||
|
4c986971fd | ||
|
9b9141fea9 | ||
|
8471405b7f | ||
|
c77cc127ea | ||
|
89500c5d84 | ||
|
e48cc71656 | ||
|
db10f1ff64 | ||
|
020e4e5bfa | ||
|
bbf11f749b | ||
|
0ca16c5a7e | ||
|
11085dccae | ||
|
f9ca3f0143 | ||
|
512cbcb6e0 | ||
|
78f320c01d | ||
|
f661d097a6 | ||
|
c481c01322 | ||
|
2059da9967 | ||
|
cc6b7a5ea0 | ||
|
66d16d19c1 | ||
|
77dc24be86 | ||
|
829676c93d | ||
|
e02836f989 | ||
|
841ca89956 | ||
|
509a219fcb | ||
|
5313aa28d6 | ||
|
984e205ddb | ||
|
e3bf255d2f | ||
|
07d823e9ff | ||
|
3bf8f49ead | ||
|
ea982b5564 | ||
|
d0c6c6251e | ||
|
c04db84c48 | ||
|
9155bbaafb | ||
|
8420dc7682 | ||
|
9dde2ebf67 | ||
|
999db0f9c8 | ||
|
34a5eb01e3 | ||
|
cf76f81409 | ||
|
c4a2f3b5fb | ||
|
7a98ef45e1 | ||
|
907fc8d21e | ||
|
51b889bf8f | ||
|
d1d2ae6c25 | ||
|
53cbbf8cf2 | ||
|
145e45db26 | ||
|
4e2f35fdf2 | ||
|
81377767a2 | ||
|
6aed0210a4 | ||
|
9992e35c59 | ||
|
79a9f700c4 | ||
|
ea95e22a75 | ||
|
625e930222 | ||
|
0eaf85704b | ||
|
55d2522fb0 | ||
|
0f57ab4a54 | ||
|
ae8d209e50 | ||
|
a422f45544 | ||
|
2378965e92 | ||
|
dbeeaf7de6 | ||
|
55e599c561 | ||
|
84739239ce | ||
|
7b73bc3572 | ||
|
7173df1dd1 | ||
|
a0aa1d963a | ||
|
2332ac444c | ||
|
a12b691b76 | ||
|
857d241e22 | ||
|
20b2e479f8 | ||
|
6a9be60a16 | ||
|
39e848c0eb | ||
|
5563ba96bc | ||
|
fc9826fb41 | ||
|
db6f9a8e45 | ||
|
b3adbbe5e7 | ||
|
1f132607f7 | ||
|
590e7e68d8 | ||
|
e75bbafeac | ||
|
9557364216 | ||
|
fbf6aa1776 | ||
|
4ba169b82e | ||
|
5880d1b990 | ||
|
9bb816f8ee | ||
|
3fdbe2ea13 | ||
|
24d59f6c34 | ||
|
44885bcfed | ||
|
923b868400 | ||
|
175800f345 | ||
|
8b9153d109 | ||
|
5e388fc3e4 | ||
|
1db5d7fd8d | ||
|
81e5996c91 | ||
|
d8892c0fdb | ||
|
137e1aa988 | ||
|
68cab95c5d | ||
|
d64ca9560c | ||
|
a87bdc47c7 | ||
|
dae97c3027 | ||
|
cf9b9a034b | ||
|
07cd87eb9c | ||
|
95b9981a87 | ||
|
12dad0c234 | ||
|
a65a4de38d | ||
|
17895e746c | ||
|
b4a7fc7d75 | ||
|
e76ba9a3c3 | ||
|
4a95f8802c | ||
|
36b7ad0cd2 | ||
|
6c7b6f9654 | ||
|
cda617df4d | ||
|
1d4f23da8e | ||
|
d4d3374729 | ||
|
4df6ddad54 | ||
|
1518fe0a8f | ||
|
7ae008421a | ||
|
9b9b475f0a | ||
|
1a7dcb2053 | ||
|
59c702d88c | ||
|
10a7963ebf | ||
|
95d2f0b831 | ||
|
1a5b842682 | ||
|
dd83f9ca86 | ||
|
66dd954290 | ||
|
f2c455fedb | ||
|
9f930c08a6 | ||
|
f360a69f4c | ||
|
58a76b700f | ||
|
ed184b3935 | ||
|
5b00a31c30 | ||
|
9fd1a1bbe3 | ||
|
ccd3ff7fba | ||
|
281c1e4fe5 | ||
|
08c1c584b3 | ||
|
9a388690f4 | ||
|
addb655aee | ||
|
7377b7e5c2 | ||
|
3c901d6376 | ||
|
b1d35a594e | ||
|
9f5baf9130 | ||
|
999d45b4e8 | ||
|
6a6c49369e | ||
|
601839c825 | ||
|
feac88dc52 | ||
|
86dbe591d2 | ||
|
2455bd0857 | ||
|
1add02879e | ||
|
878f2e4107 | ||
|
d34b7d98b2 | ||
|
80ab5ea942 | ||
|
16b0906b4a | ||
|
bc0cef27a2 | ||
|
4a2c087a1e | ||
|
a80a1cf8a6 | ||
|
b3bd5fefb1 | ||
|
4c10807e24 | ||
|
96d9abded8 | ||
|
2cfa05fc84 | ||
|
040db1efcd | ||
|
627a824cab | ||
|
efffa3b6bd | ||
|
aca35a14a0 | ||
|
116cb9fc0c | ||
|
2e96f8ae70 | ||
|
ba9220591f | ||
|
05353ec933 | ||
|
33ece4e37a | ||
|
134556435d | ||
|
d06d17b81e | ||
|
9c09669711 | ||
|
7fa4ac08ea | ||
|
9cfbaf4916 | ||
|
3b336dda73 | ||
|
2acc31b46a | ||
|
155fa4664d | ||
|
8a3595236d | ||
|
5d3a5ffdfb | ||
|
7f79a3fade | ||
|
cc3dceee83 | ||
|
7088d9d294 | ||
|
367f13a76f | ||
|
9b5a50bf22 | ||
|
ad155fb26c | ||
|
f37cb8f9d0 | ||
|
eadb49d97f | ||
|
421be38a3c | ||
|
d36e4125d1 | ||
|
b9a304cf6f | ||
|
ac31a00dcf | ||
|
10e24d58c3 | ||
|
10a92a210b | ||
|
9f2ca684e2 | ||
|
590cd6a9f2 | ||
|
4162d65a7b | ||
|
485d1b9835 | ||
|
9d43644153 | ||
|
f45dadadd0 | ||
|
c301357627 | ||
|
91f989006c | ||
|
eace2cf421 | ||
|
bae12e6a2f | ||
|
0df388051d | ||
|
05763e4875 | ||
|
361d322bfb | ||
|
1aa336b500 | ||
|
662001b60a | ||
|
380494c1d7 | ||
|
021fe010b6 | ||
|
89f2e17f91 | ||
|
8d54c641f1 | ||
|
ad64402a55 | ||
|
77cdbfde97 | ||
|
fec8069e7b | ||
|
fcbd480c76 | ||
|
2fd5048943 | ||
|
fe24fcbc3e | ||
|
fb3d9022ad | ||
|
9a5de96187 | ||
|
d09e48cec1 | ||
|
9be9e00a0e | ||
|
6b9e481e38 | ||
|
26f9b584be | ||
|
0be88cc76e | ||
|
579edbbca8 | ||
|
ed30f271f5 | ||
|
2033b06cb6 | ||
|
4445807421 | ||
|
013caef941 | ||
|
c2125e80a3 | ||
|
4ed9452e90 | ||
|
1a0a423250 | ||
|
d2a8667f83 | ||
|
c0276e2c5c | ||
|
9222b4cd7c | ||
|
f7cebf5c1f | ||
|
7232b4f735 | ||
|
d33c251cf6 | ||
|
266fd36f3f | ||
|
29c570a660 | ||
|
76d95c312d | ||
|
dcb816f99a | ||
|
7016409e9f | ||
|
713d4ad3e6 | ||
|
a703ba8406 | ||
|
b7baf3371b | ||
|
565b35ac00 | ||
|
b6cdc3961a | ||
|
21fa12120c | ||
|
a9464f65c3 | ||
|
38667b8dd0 | ||
|
982c4a70b6 | ||
|
3731da14a0 | ||
|
8ef4f7fd74 | ||
|
8aa9339b2d | ||
|
353281d9d0 | ||
|
133da65433 | ||
|
9e2b1ad39e | ||
|
b65fbbf739 | ||
|
9054e49776 | ||
|
3e3f20854b | ||
|
a68915abd1 | ||
|
fe6030a41b | ||
|
0d00e0c3d3 | ||
|
434ce02ebe | ||
|
3b11575f0b | ||
|
31b77ae0b6 | ||
|
5db8cc4f18 | ||
|
b373c6054e | ||
|
a03a12098d | ||
|
ce74c3a5a5 | ||
|
bbe5980c54 | ||
|
b337b405a3 | ||
|
d053d5c58f | ||
|
74f3d7f6d3 | ||
|
ecd384eeb7 | ||
|
4cce6104a4 | ||
|
eeffde368f | ||
|
f06485e278 | ||
|
ddd1ac0934 | ||
|
3da324fbce | ||
|
f2eda1acc5 | ||
|
81cad59aeb | ||
|
83efaaf64a | ||
|
870af2b7c6 | ||
|
fac9d59303 | ||
|
51fb56504e |
57
Makefile.am
@@ -1,8 +1,8 @@
|
||||
## Makefile.am for GTK+
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
|
||||
SRC_SUBDIRS = gdk gsk gtk modules demos tests testsuite examples
|
||||
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
||||
|
||||
@@ -36,40 +36,41 @@ MAINTAINERCLEANFILES = \
|
||||
|
||||
|
||||
## Copy .pc files to target-specific names
|
||||
gtk+-x11-3.0.pc gtk+-win32-3.0.pc gtk+-quartz-3.0.pc gtk+-broadway-3.0.pc gtk+-wayland-3.0.pc gtk+-mir-3.0.pc: gtk+-3.0.pc
|
||||
gtk+-x11-4.0.pc gtk+-win32-4.0.pc gtk+-quartz-4.0.pc gtk+-broadway-4.0.pc gtk+-wayland-4.0.pc gtk+-mir-4.0.pc: gtk+-4.0.pc
|
||||
rm -f $@ && \
|
||||
cp gtk+-3.0.pc $@
|
||||
cp gtk+-4.0.pc $@
|
||||
|
||||
gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-wayland-3.0.pc gdk-mir-3.0.pc: gdk-3.0.pc
|
||||
gdk-x11-4.0.pc gdk-win32-4.0.pc gdk-quartz-4.0.pc gdk-broadway-4.0.pc gdk-wayland-4.0.pc gdk-mir-4.0.pc: gdk-4.0.pc
|
||||
rm -f $@ && \
|
||||
cp gdk-3.0.pc $@
|
||||
cp gdk-4.0.pc $@
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-3.0.pc gtk+-3.0.pc gail-3.0.pc
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gtk+-%-3.0.pc}
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gdk-%-3.0.pc}
|
||||
pkgconfig_DATA = gdk-4.0.pc gsk-4.0.pc gtk+-4.0.pc gail-4.0.pc
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gtk+-%-4.0.pc}
|
||||
pkgconfig_DATA += ${GDK_BACKENDS:%=gdk-%-4.0.pc}
|
||||
|
||||
if OS_UNIX
|
||||
pkgconfig_DATA += gtk+-unix-print-3.0.pc
|
||||
pkgconfig_DATA += gtk+-unix-print-4.0.pc
|
||||
endif
|
||||
|
||||
DISTCLEANFILES = \
|
||||
gtk+-unix-print-3.0.pc \
|
||||
gtk+-3.0.pc \
|
||||
gtk+-x11-3.0.pc \
|
||||
gtk+-win32-3.0.pc \
|
||||
gtk+-quartz-3.0.pc \
|
||||
gtk+-broadway-3.0.pc \
|
||||
gtk+-wayland-3.0.pc \
|
||||
gtk+-mir-3.0.pc \
|
||||
gdk-3.0.pc \
|
||||
gdk-x11-3.0.pc \
|
||||
gdk-win32-3.0.pc \
|
||||
gdk-quartz-3.0.pc \
|
||||
gdk-broadway-3.0.pc \
|
||||
gdk-wayland-3.0.pc \
|
||||
gdk-mir-3.0.pc \
|
||||
gail-3.0.pc \
|
||||
gtk+-unix-print-4.0.pc \
|
||||
gtk+-4.0.pc \
|
||||
gtk+-x11-4.0.pc \
|
||||
gtk+-win32-4.0.pc \
|
||||
gtk+-quartz-4.0.pc \
|
||||
gtk+-broadway-4.0.pc \
|
||||
gtk+-wayland-4.0.pc \
|
||||
gtk+-mir-4.0.pc \
|
||||
gsk-4.0.pc \
|
||||
gdk-4.0.pc \
|
||||
gdk-x11-4.0.pc \
|
||||
gdk-win32-4.0.pc \
|
||||
gdk-quartz-4.0.pc \
|
||||
gdk-broadway-4.0.pc \
|
||||
gdk-wayland-4.0.pc \
|
||||
gdk-mir-4.0.pc \
|
||||
gail-4.0.pc \
|
||||
config.lt
|
||||
|
||||
distclean-local:
|
||||
@@ -93,7 +94,7 @@ ChangeLog:
|
||||
.PHONY: ChangeLog
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-3.0.pc
|
||||
rm -f $(DESTDIR)$(pkgconfigdir)/gtk+-4.0.pc
|
||||
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-gtk-doc \
|
||||
@@ -104,6 +105,6 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-installed-tests
|
||||
|
||||
GITIGNORE_TRANSLATION_DIRS = po-properties
|
||||
GITIGNOREFILES = po-properties/gtk30-properties.pot
|
||||
GITIGNOREFILES = po-properties/gtk40-properties.pot
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
87
configure.ac
@@ -9,15 +9,15 @@
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [3])
|
||||
m4_define([gtk_minor_version], [22])
|
||||
m4_define([gtk_micro_version], [1])
|
||||
m4_define([gtk_interface_age], [1])
|
||||
m4_define([gtk_minor_version], [89])
|
||||
m4_define([gtk_micro_version], [0])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
m4_define([gtk_api_version], [3.0])
|
||||
# This is the X.Y used in -lgtk-X.Y
|
||||
m4_define([gtk_api_version], [4.0])
|
||||
|
||||
AC_PREREQ([2.62])
|
||||
AC_INIT([gtk+], [gtk_version],
|
||||
@@ -38,7 +38,7 @@ AC_CANONICAL_HOST
|
||||
# for GTK+.
|
||||
#
|
||||
#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
|
||||
m4_define([gtk_binary_version], [3.0.0])
|
||||
m4_define([gtk_binary_version], [4.0.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_major], [2])
|
||||
@@ -64,6 +64,7 @@ m4_define([wayland_protocols_required_version], [1.7])
|
||||
m4_define([mirclient_required_version], [0.22.0])
|
||||
m4_define([mircookie_required_version], [0.17.0])
|
||||
m4_define([epoxy_required_version], [1.0])
|
||||
m4_define([graphene_required_version], [1.2])
|
||||
GLIB_REQUIRED_VERSION=glib_required_version
|
||||
PANGO_REQUIRED_VERSION=pango_required_version
|
||||
ATK_REQUIRED_VERSION=atk_required_version
|
||||
@@ -168,7 +169,7 @@ AC_USE_SYSTEM_EXTENSIONS
|
||||
AM_GNU_GETTEXT([external])
|
||||
AM_GNU_GETTEXT_VERSION([0.19.7])
|
||||
|
||||
GETTEXT_PACKAGE=gtk30
|
||||
GETTEXT_PACKAGE=gtk40
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
||||
[The prefix for our gettext translation domains.])
|
||||
@@ -1365,6 +1366,26 @@ AC_SUBST(GDK_EXTRA_CFLAGS)
|
||||
AC_SUBST(GDK_DEP_LIBS)
|
||||
AC_SUBST(GDK_DEP_CFLAGS)
|
||||
|
||||
########################################
|
||||
# Check for GSK flags
|
||||
########################################
|
||||
|
||||
GSK_EXTRA_LIBS=
|
||||
GSK_EXTRA_CFLAGS=
|
||||
|
||||
GSK_PACKAGES="gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version graphene-1.0 >= graphene_required_version"
|
||||
GSK_PRIVATE_PACKAGES="epoxy >= epoxy_required_version"
|
||||
|
||||
PKG_CHECK_MODULES(GSK_DEP, $PANGO_PACKAGES $GSK_PACKAGES $GSK_PRIVATE_PACKAGES)
|
||||
GSK_DEP_LIBS="$GSK_EXTRA_LIBS $GSK_DEP_LIBS $MATH_LIB"
|
||||
GSK_DEP_CFLAGS="$GSK_DEP_CFLAGS $GSK_EXTRA_CFLAGS"
|
||||
|
||||
AC_SUBST(GSK_PACKAGES)
|
||||
AC_SUBST(GSK_PRIVATE_PACKAGES)
|
||||
AC_SUBST(GSK_EXTRA_LIBS)
|
||||
AC_SUBST(GSK_EXTRA_CFLAGS)
|
||||
AC_SUBST(GSK_DEP_LIBS)
|
||||
AC_SUBST(GSK_DEP_CFLAGS)
|
||||
|
||||
########################################
|
||||
# Check for Accessibility Toolkit flags
|
||||
@@ -1379,7 +1400,7 @@ fi
|
||||
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
|
||||
|
||||
GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
|
||||
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
|
||||
GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version graphene-1.0 >= graphene_required_version"
|
||||
if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
|
||||
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
|
||||
fi
|
||||
@@ -1862,6 +1883,37 @@ _______EOF
|
||||
gdk_windowing='$GDK_WINDOWING'
|
||||
])
|
||||
|
||||
dnl Compiler flags; macro originates from systemd
|
||||
dnl See https://bugzilla.gnome.org/show_bug.cgi?id=608953
|
||||
AC_ARG_ENABLE(compile-warnings,
|
||||
[AS_HELP_STRING([--disable-compile-warnings], [Do not use builtin compiler warnings])],
|
||||
[],
|
||||
[enable_compile_warnings=yes])
|
||||
AS_IF([test "x$enable_compile_warnings" = xyes], [
|
||||
AX_APPEND_COMPILE_FLAGS([ dnl
|
||||
-Wall dnl
|
||||
-Wundef dnl
|
||||
-Wnested-externs dnl
|
||||
-Wpointer-arith dnl
|
||||
-Wstrict-prototypes dnl
|
||||
-Wcast-align dnl
|
||||
-Wuninitialized dnl
|
||||
-Wmissing-include-dirs dnl
|
||||
-Wshadow dnl
|
||||
-Wformat=2 dnl
|
||||
-Wformat-nonliteral dnl
|
||||
-Wformat-security dnl
|
||||
-Wimplicit-function-declaration dnl
|
||||
-Werror=redundant-decls dnl
|
||||
-Werror=write-strings dnl
|
||||
-Werror=missing-declarations dnl
|
||||
-Werror=missing-prototypes dnl
|
||||
-Werror=empty-body dnl
|
||||
-Werror=init-self dnl
|
||||
], [GTK_WARN_CFLAGS])
|
||||
])
|
||||
AC_SUBST(GTK_WARN_CFLAGS)
|
||||
|
||||
dnl
|
||||
dnl Check for -Bsymbolic-functions linker flag used to avoid
|
||||
dnl intra-library PLT jumps, if available.
|
||||
@@ -1891,11 +1943,11 @@ INSTALL
|
||||
config.h.win32
|
||||
gtk-zip.sh
|
||||
Makefile
|
||||
gdk-3.0.pc
|
||||
gtk+-3.0.pc
|
||||
gtk+-unix-print-3.0.pc
|
||||
gail-3.0.pc
|
||||
m4macros/Makefile
|
||||
gdk-4.0.pc
|
||||
gsk-4.0.pc
|
||||
gtk+-4.0.pc
|
||||
gtk+-unix-print-4.0.pc
|
||||
gail-4.0.pc
|
||||
po/Makefile.in
|
||||
po-properties/Makefile.in
|
||||
demos/Makefile
|
||||
@@ -1925,6 +1977,7 @@ testsuite/css/parser/Makefile
|
||||
testsuite/css/nodes/Makefile
|
||||
testsuite/css/style/Makefile
|
||||
testsuite/gdk/Makefile
|
||||
testsuite/gsk/Makefile
|
||||
testsuite/gtk/Makefile
|
||||
testsuite/reftests/Makefile
|
||||
testsuite/tools/Makefile
|
||||
@@ -1932,11 +1985,11 @@ docs/Makefile
|
||||
docs/reference/Makefile
|
||||
docs/reference/gdk/Makefile
|
||||
docs/reference/gdk/version.xml
|
||||
docs/reference/gsk/Makefile
|
||||
docs/reference/gsk/version.xml
|
||||
docs/reference/gtk/Makefile
|
||||
docs/reference/gtk/gtk3.types
|
||||
docs/reference/gtk/gtk4.types
|
||||
docs/reference/gtk/version.xml
|
||||
docs/reference/libgail-util/Makefile
|
||||
docs/reference/libgail-util/version.xml
|
||||
docs/tools/Makefile
|
||||
build/Makefile
|
||||
build/win32/Makefile
|
||||
@@ -1957,12 +2010,12 @@ gdk/quartz/Makefile
|
||||
gdk/wayland/Makefile
|
||||
gdk/mir/Makefile
|
||||
gdk/gdkversionmacros.h
|
||||
gsk/Makefile
|
||||
gtk/Makefile
|
||||
gtk/makefile.msc
|
||||
gtk/gtkversion.h
|
||||
gtk/gtk-win32.rc.body
|
||||
gtk/libgtk3.manifest
|
||||
libgail-util/Makefile
|
||||
modules/Makefile
|
||||
modules/input/Makefile
|
||||
modules/printbackends/Makefile
|
||||
|
@@ -92,11 +92,11 @@ AM_CPPFLAGS = \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
DEPS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la
|
||||
$(top_builddir)/gtk/libgtk-4.la
|
||||
|
||||
LDADDS = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(top_builddir)/gtk/libgtk-4.la \
|
||||
$(top_builddir)/gdk/libgdk-4.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(GDK_DEP_LIBS) \
|
||||
-lm
|
||||
@@ -106,10 +106,10 @@ AM_CPPFLAGS += $(FONTDEMO_CFLAGS)
|
||||
LDADDS += $(FONTDEMO_LIBS)
|
||||
endif
|
||||
|
||||
bin_PROGRAMS = gtk3-demo gtk3-demo-application
|
||||
bin_PROGRAMS = gtk4-demo gtk4-demo-application
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = gtk3-demo.desktop
|
||||
dist_desktop_DATA = gtk4-demo.desktop
|
||||
|
||||
BUILT_SOURCES = demos.h demo_resources.c
|
||||
|
||||
@@ -132,22 +132,22 @@ demos.h: $(demos) geninclude.pl
|
||||
demos.h.win32: $(demos_base) geninclude.pl
|
||||
$(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos_base)) > demos.h.win32
|
||||
|
||||
nodist_gtk3_demo_SOURCES = demos.h
|
||||
nodist_gtk4_demo_SOURCES = demos.h
|
||||
|
||||
gtk3_demo_SOURCES = \
|
||||
gtk4_demo_SOURCES = \
|
||||
$(demos) \
|
||||
demo_resources.c \
|
||||
main.c
|
||||
|
||||
gtk3_demo_DEPENDENCIES = $(DEPS)
|
||||
gtk3_demo_LDADD = $(LDADDS)
|
||||
gtk3_demo_LDFLAGS = -export-dynamic
|
||||
gtk4_demo_DEPENDENCIES = $(DEPS)
|
||||
gtk4_demo_LDADD = $(LDADDS)
|
||||
gtk4_demo_LDFLAGS = -export-dynamic
|
||||
|
||||
gtk3_demo_application_SOURCES = \
|
||||
gtk4_demo_application_SOURCES = \
|
||||
application.c \
|
||||
demo_resources.c
|
||||
|
||||
gtk3_demo_application_LDADD = $(LDADDS)
|
||||
gtk4_demo_application_LDADD = $(LDADDS)
|
||||
|
||||
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(builddir)/demo.gresource.xml)
|
||||
|
||||
@@ -164,12 +164,12 @@ appsicon48dir = $(iconthemedir)/48x48/apps
|
||||
appsicon256dir = $(iconthemedir)/256x256/apps
|
||||
appsiconscalabledir = $(iconthemedir)/scalable/apps
|
||||
|
||||
dist_appsicon16_DATA = data/16x16/gtk3-demo.png data/16x16/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk3-demo.png data/22x22/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk3-demo.png data/24x24/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk3-demo.png data/32x32/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk3-demo.png data/48x48/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk3-demo.png data/256x256/gtk3-demo-symbolic.symbolic.png
|
||||
dist_appsicon16_DATA = data/16x16/gtk4-demo.png data/16x16/gtk4-demo-symbolic.symbolic.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk4-demo.png data/22x22/gtk4-demo-symbolic.symbolic.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk4-demo.png data/24x24/gtk4-demo-symbolic.symbolic.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk4-demo.png data/32x32/gtk4-demo-symbolic.symbolic.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk4-demo.png data/48x48/gtk4-demo-symbolic.symbolic.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk4-demo.png data/256x256/gtk4-demo-symbolic.symbolic.png
|
||||
|
||||
update_icon_cache = $(top_builddir)/gtk/gtk-update-icon-cache$(EXEEXT) --ignore-theme-index --force
|
||||
|
||||
@@ -185,19 +185,19 @@ uninstall-update-icon-cache:
|
||||
test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)"
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gtk3-demo gtk3-demo-application
|
||||
MSVCPROJS = gtk4-demo gtk4-demo-application
|
||||
|
||||
gtk3_demo_FILES = $(gtk3_demo_SOURCES)
|
||||
gtk3_demo_EXCLUDES = font_features.c|pagesetup.c
|
||||
gtk4_demo_FILES = $(gtk4_demo_SOURCES)
|
||||
gtk4_demo_EXCLUDES = font_features.c|pagesetup.c
|
||||
|
||||
gtk3_demo_application_FILES = $(gtk3_demo_application_SOURCES)
|
||||
gtk3_demo_application_EXCLUDES = dummy
|
||||
gtk4_demo_application_FILES = $(gtk4_demo_application_SOURCES)
|
||||
gtk4_demo_application_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
|
||||
dist-hook: \
|
||||
$(top_builddir)/build/win32/vs9/gtk3-demo.vcproj \
|
||||
$(top_builddir)/build/win32/vs9/gtk3-demo-application.vcproj
|
||||
$(top_builddir)/build/win32/vs9/gtk4-demo.vcproj \
|
||||
$(top_builddir)/build/win42/vs9/gtk4-demo-application.vcproj
|
||||
|
||||
DISTCLEANFILES = demos.h demos.h.win32
|
||||
|
||||
|
@@ -94,15 +94,14 @@ create_page1 (GtkWidget *assistant)
|
||||
GtkWidget *box, *label, *entry;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
|
||||
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (box), entry, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), entry, TRUE, TRUE);
|
||||
g_signal_connect (G_OBJECT (entry), "changed",
|
||||
G_CALLBACK (on_entry_changed), assistant);
|
||||
|
||||
@@ -118,11 +117,10 @@ create_page2 (GtkWidget *assistant)
|
||||
GtkWidget *box, *checkbutton;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
"even if you do not check this");
|
||||
gtk_box_pack_start (GTK_BOX (box), checkbutton, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), checkbutton, FALSE, FALSE);
|
||||
|
||||
gtk_widget_show_all (box);
|
||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
||||
|
@@ -11,7 +11,6 @@
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">12</property>
|
||||
<property name="row_spacing">12</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
|
@@ -23,7 +23,6 @@ create_bbox (gint horizontal,
|
||||
else
|
||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||
@@ -62,70 +61,68 @@ do_button_box (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
|
||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
|
||||
gtk_widget_set_margin_top (frame_horz, 10);
|
||||
gtk_widget_set_margin_bottom (frame_horz, 10);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
|
||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND),
|
||||
TRUE, TRUE, 5);
|
||||
TRUE, TRUE);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -305,7 +305,6 @@ create_frame (ChangeDisplayInfo *info,
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -313,7 +312,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
||||
GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin, TRUE, TRUE);
|
||||
|
||||
*tree_view = gtk_tree_view_new ();
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
||||
@@ -323,7 +322,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE);
|
||||
|
||||
if (!info->size_group)
|
||||
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
@@ -363,11 +362,11 @@ create_display_frame (ChangeDisplayInfo *info)
|
||||
|
||||
button = left_align_button_new ("_Open...");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE);
|
||||
|
||||
button = left_align_button_new ("_Close");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE);
|
||||
|
||||
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
||||
G_TYPE_STRING,
|
||||
@@ -539,11 +538,10 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (info->window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE);
|
||||
|
||||
frame = create_display_frame (info);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
|
||||
|
||||
initialize_displays (info);
|
||||
|
||||
|
@@ -219,51 +219,47 @@ do_clipboard (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
|
||||
|
||||
/* Create the first entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_with_mnemonic (_("_Copy"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (copy_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE);
|
||||
|
||||
/* Create the button */
|
||||
button = gtk_button_new_with_mnemonic (_("_Paste"));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE);
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (paste_button_clicked), entry);
|
||||
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
|
||||
|
||||
/* Create the first image */
|
||||
image = gtk_image_new_from_icon_name ("dialog-warning",
|
||||
|
@@ -74,10 +74,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
@@ -86,7 +83,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
|
||||
@@ -101,7 +98,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
gtk_widget_set_halign (button, GTK_ALIGN_END);
|
||||
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE);
|
||||
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (change_color_callback), NULL);
|
||||
|
@@ -318,8 +318,6 @@ do_combobox (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -327,10 +325,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
* insensitive rows
|
||||
*/
|
||||
frame = gtk_frame_new ("Items with icons");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_icon_store ();
|
||||
@@ -368,10 +365,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
/* A combobox demonstrating trees.
|
||||
*/
|
||||
frame = gtk_frame_new ("Where are we ?");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_capital_store ();
|
||||
@@ -396,10 +392,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
/* A GtkComboBoxEntry with validation */
|
||||
frame = gtk_frame_new ("Editable");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new_with_entry ();
|
||||
@@ -414,10 +409,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
|
||||
/* A combobox with string IDs */
|
||||
frame = gtk_frame_new ("String IDs");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new ();
|
||||
|
@@ -45,7 +45,7 @@ css_text_changed (GtkTextBuffer *buffer,
|
||||
gtk_text_buffer_remove_all_tags (buffer, &start, &end);
|
||||
|
||||
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
gtk_css_provider_load_from_data (provider, text, -1, NULL);
|
||||
gtk_css_provider_load_from_data (provider, text, -1);
|
||||
g_free (text);
|
||||
|
||||
gtk_style_context_reset_widgets (gdk_screen_get_default ());
|
||||
|
@@ -50,7 +50,7 @@ update_css_for_blend_mode (GtkCssProvider *provider,
|
||||
blend_mode,
|
||||
blend_mode);
|
||||
|
||||
gtk_css_provider_load_from_data (provider, css, -1, NULL);
|
||||
gtk_css_provider_load_from_data (provider, css, -1);
|
||||
|
||||
g_bytes_unref (bytes);
|
||||
g_free (css);
|
||||
|
@@ -45,7 +45,7 @@ css_text_changed (GtkTextBuffer *buffer,
|
||||
gtk_text_buffer_remove_all_tags (buffer, &start, &end);
|
||||
|
||||
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
gtk_css_provider_load_from_data (provider, text, -1, NULL);
|
||||
gtk_css_provider_load_from_data (provider, text, -1);
|
||||
g_free (text);
|
||||
|
||||
gtk_style_context_reset_widgets (gdk_screen_get_default ());
|
||||
|
@@ -44,7 +44,7 @@ css_text_changed (GtkTextBuffer *buffer,
|
||||
gtk_text_buffer_remove_all_tags (buffer, &start, &end);
|
||||
|
||||
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
gtk_css_provider_load_from_data (provider, text, -1, NULL);
|
||||
gtk_css_provider_load_from_data (provider, text, -1);
|
||||
g_free (text);
|
||||
|
||||
gtk_style_context_reset_widgets (gdk_screen_get_default ());
|
||||
|
@@ -43,7 +43,7 @@ css_text_changed (GtkTextBuffer *buffer,
|
||||
gtk_text_buffer_remove_all_tags (buffer, &start, &end);
|
||||
|
||||
text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
|
||||
gtk_css_provider_load_from_data (provider, text, -1, NULL);
|
||||
gtk_css_provider_load_from_data (provider, text, -1);
|
||||
g_free (text);
|
||||
|
||||
gtk_style_context_reset_widgets (gdk_screen_get_default ());
|
||||
|
@@ -27,13 +27,13 @@ add_section (GtkWidget *box,
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_margin_top (label, 10);
|
||||
gtk_widget_set_margin_bottom (label, 10);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, TRUE);
|
||||
section = gtk_flow_box_new ();
|
||||
gtk_widget_set_halign (section, GTK_ALIGN_START);
|
||||
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (section), GTK_SELECTION_NONE);
|
||||
gtk_flow_box_set_min_children_per_line (GTK_FLOW_BOX (section), 2);
|
||||
gtk_flow_box_set_max_children_per_line (GTK_FLOW_BOX (section), 20);
|
||||
gtk_box_pack_start (GTK_BOX (box), section, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), section, FALSE, TRUE);
|
||||
|
||||
return section;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 324 B After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 874 B After Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 437 B After Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 465 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 854 B After Width: | Height: | Size: 854 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
@@ -56,16 +56,15 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), hbox, FALSE, FALSE);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("dialog-question", GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE);
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
||||
local_entry1 = gtk_entry_new ();
|
||||
@@ -114,41 +113,38 @@ do_dialog (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
|
||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (message_dialog_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL),
|
||||
FALSE, FALSE, 0);
|
||||
FALSE, FALSE);
|
||||
|
||||
/* Interactive dialog*/
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (interactive_dialog_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE);
|
||||
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
||||
|
@@ -215,10 +215,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_window), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
@@ -228,11 +225,11 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Checkerboard pattern</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
@@ -250,11 +247,11 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Scribble area</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
|
@@ -349,7 +349,6 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Editable Cells");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
@@ -358,7 +357,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Shopping list (you can edit the cells!)"),
|
||||
FALSE, FALSE, 0);
|
||||
FALSE, FALSE);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
@@ -366,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE);
|
||||
|
||||
/* create models */
|
||||
items_model = create_items_model ();
|
||||
@@ -387,17 +386,17 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
/* some buttons */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (add_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE);
|
||||
|
||||
button = gtk_button_new_with_label ("Remove item");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
||||
}
|
||||
|
@@ -29,24 +29,23 @@ do_entry_buffer (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"Entries share a buffer. Typing in one is reflected in the other.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
/* Create a buffer */
|
||||
buffer = gtk_entry_buffer_new (NULL, 0);
|
||||
|
||||
/* Create our first entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE);
|
||||
|
||||
/* Create the second entry */
|
||||
entry = gtk_entry_new_with_buffer (buffer);
|
||||
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE);
|
||||
|
||||
g_object_unref (buffer);
|
||||
}
|
||||
|
@@ -56,15 +56,14 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
/* Create our entry */
|
||||
entry = gtk_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE);
|
||||
|
||||
/* Create the completion object */
|
||||
completion = gtk_entry_completion_new ();
|
||||
|
@@ -85,7 +85,7 @@ do_expander (GtkWidget *do_widget)
|
||||
"resize the window. Do it already !", -1);
|
||||
gtk_container_add (GTK_CONTAINER (sw), tv);
|
||||
gtk_container_add (GTK_CONTAINER (expander), sw);
|
||||
gtk_box_pack_end (GTK_BOX (area), expander, TRUE, TRUE, 0);
|
||||
gtk_box_pack_end (GTK_BOX (area), expander, TRUE, TRUE);
|
||||
gtk_widget_show_all (expander);
|
||||
g_signal_connect (expander, "notify::expanded",
|
||||
G_CALLBACK (expander_cb), window);
|
||||
|
@@ -180,11 +180,11 @@ draw_style_common (GtkStyleContext *context,
|
||||
GtkBorder margin, border, padding;
|
||||
int min_width, min_height;
|
||||
|
||||
gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &margin);
|
||||
gtk_style_context_get_border (context, gtk_style_context_get_state (context), &border);
|
||||
gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding);
|
||||
gtk_style_context_get_margin (context, &margin);
|
||||
gtk_style_context_get_border (context, &border);
|
||||
gtk_style_context_get_padding (context, &padding);
|
||||
|
||||
gtk_style_context_get (context, gtk_style_context_get_state (context),
|
||||
gtk_style_context_get (context,
|
||||
"min-width", &min_width,
|
||||
"min-height", &min_height,
|
||||
NULL);
|
||||
@@ -217,11 +217,11 @@ query_size (GtkStyleContext *context,
|
||||
GtkBorder margin, border, padding;
|
||||
int min_width, min_height;
|
||||
|
||||
gtk_style_context_get_margin (context, gtk_style_context_get_state (context), &margin);
|
||||
gtk_style_context_get_border (context, gtk_style_context_get_state (context), &border);
|
||||
gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding);
|
||||
gtk_style_context_get_margin (context, &margin);
|
||||
gtk_style_context_get_border (context, &border);
|
||||
gtk_style_context_get_padding (context, &padding);
|
||||
|
||||
gtk_style_context_get (context, gtk_style_context_get_state (context),
|
||||
gtk_style_context_get (context,
|
||||
"min-width", &min_width,
|
||||
"min-height", &min_height,
|
||||
NULL);
|
||||
@@ -308,7 +308,7 @@ draw_menu (GtkWidget *widget,
|
||||
&menu_x, &menu_y, &menu_width, &menu_height);
|
||||
|
||||
/* Hovered with right arrow */
|
||||
gtk_style_context_get (hoveredarrowmenuitem_context, gtk_style_context_get_state (hoveredarrowmenuitem_context),
|
||||
gtk_style_context_get (hoveredarrowmenuitem_context,
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
draw_style_common (hovermenuitem_context, cr, menu_x, menu_y, menu_width, menuitem1_height,
|
||||
@@ -320,13 +320,13 @@ draw_menu (GtkWidget *widget,
|
||||
/* Left arrow sensitive, and right arrow insensitive */
|
||||
draw_style_common (menuitem_context, cr, menu_x, menu_y + menuitem1_height, menu_width, menuitem2_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_style_context_get (arrowmenuitem_context, gtk_style_context_get_state (arrowmenuitem_context),
|
||||
gtk_style_context_get (arrowmenuitem_context,
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
gtk_render_arrow (arrowmenuitem_context, cr, G_PI / 2,
|
||||
contents_x,
|
||||
contents_y + (contents_height - arrow_size) / 2, arrow_size);
|
||||
gtk_style_context_get (disabledarrowmenuitem_context, gtk_style_context_get_state (disabledarrowmenuitem_context),
|
||||
gtk_style_context_get (disabledarrowmenuitem_context,
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
gtk_render_arrow (disabledarrowmenuitem_context, cr, G_PI / 2,
|
||||
@@ -337,7 +337,7 @@ draw_menu (GtkWidget *widget,
|
||||
/* Left check enabled, sensitive, and right check unchecked, insensitive */
|
||||
draw_style_common (menuitem_context, cr, menu_x, menu_y + menuitem1_height + menuitem2_height, menu_width, menuitem3_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_style_context_get (checkmenuitem_context, gtk_style_context_get_state (checkmenuitem_context),
|
||||
gtk_style_context_get (checkmenuitem_context,
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (checkmenuitem_context, cr,
|
||||
contents_x,
|
||||
@@ -345,7 +345,7 @@ draw_menu (GtkWidget *widget,
|
||||
toggle_width, toggle_height,
|
||||
&toggle_x, &toggle_y, &toggle_width, &toggle_height);
|
||||
gtk_render_check (checkmenuitem_context, cr, toggle_x, toggle_y, toggle_width, toggle_height);
|
||||
gtk_style_context_get (disabledcheckmenuitem_context, gtk_style_context_get_state (disabledcheckmenuitem_context),
|
||||
gtk_style_context_get (disabledcheckmenuitem_context,
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (disabledcheckmenuitem_context, cr,
|
||||
contents_x + contents_width - toggle_width,
|
||||
@@ -363,7 +363,7 @@ draw_menu (GtkWidget *widget,
|
||||
draw_style_common (menuitem_context, cr, menu_x, menu_y + menuitem1_height + menuitem2_height + menuitem3_height + menuitem4_height,
|
||||
menu_width, menuitem5_height,
|
||||
&contents_x, &contents_y, &contents_width, &contents_height);
|
||||
gtk_style_context_get (radiomenuitem_context, gtk_style_context_get_state (radiomenuitem_context),
|
||||
gtk_style_context_get (radiomenuitem_context,
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (radiomenuitem_context, cr,
|
||||
contents_x,
|
||||
@@ -371,7 +371,7 @@ draw_menu (GtkWidget *widget,
|
||||
toggle_width, toggle_height,
|
||||
&toggle_x, &toggle_y, &toggle_width, &toggle_height);
|
||||
gtk_render_check (radiomenuitem_context, cr, toggle_x, toggle_y, toggle_width, toggle_height);
|
||||
gtk_style_context_get (disabledradiomenuitem_context, gtk_style_context_get_state (disabledradiomenuitem_context),
|
||||
gtk_style_context_get (disabledradiomenuitem_context,
|
||||
"min-width", &toggle_width, "min-height", &toggle_height, NULL);
|
||||
draw_style_common (disabledradiomenuitem_context, cr,
|
||||
contents_x + contents_width - toggle_width,
|
||||
@@ -527,7 +527,7 @@ draw_horizontal_scrollbar (GtkWidget *widget,
|
||||
query_size (trough_context, NULL, height);
|
||||
query_size (slider_context, NULL, height);
|
||||
|
||||
gtk_style_context_get (slider_context, gtk_style_context_get_state (slider_context),
|
||||
gtk_style_context_get (slider_context,
|
||||
"min-width", &slider_width, NULL);
|
||||
|
||||
draw_style_common (scrollbar_context, cr, x, y, width, *height, NULL, NULL, NULL, NULL);
|
||||
@@ -780,7 +780,7 @@ draw_combobox (GtkWidget *widget,
|
||||
query_size (button_box_context, NULL, height);
|
||||
query_size (arrow_context, NULL, height);
|
||||
|
||||
gtk_style_context_get (arrow_context, gtk_style_context_get_state (arrow_context),
|
||||
gtk_style_context_get (arrow_context,
|
||||
"min-width", &arrow_width, "min-height", &arrow_height, NULL);
|
||||
arrow_size = MIN (arrow_width, arrow_height);
|
||||
|
||||
@@ -852,7 +852,7 @@ draw_spinbutton (GtkWidget *widget,
|
||||
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
|
||||
|
||||
gtk_style_context_get (up_context, gtk_style_context_get_state (up_context),
|
||||
gtk_style_context_get (up_context,
|
||||
"min-width", &icon_width, "min-height", &icon_height, NULL);
|
||||
icon_size = MIN (icon_width, icon_height);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "list-add-symbolic", icon_size, 0);
|
||||
@@ -864,7 +864,7 @@ draw_spinbutton (GtkWidget *widget,
|
||||
g_object_unref (pixbuf);
|
||||
|
||||
|
||||
gtk_style_context_get (down_context, gtk_style_context_get_state (down_context),
|
||||
gtk_style_context_get (down_context,
|
||||
"min-width", &icon_width, "min-height", &icon_height, NULL);
|
||||
icon_size = MIN (icon_width, icon_height);
|
||||
icon_info = gtk_icon_theme_lookup_icon (icon_theme, "list-remove-symbolic", icon_size, 0);
|
||||
|
@@ -333,7 +333,7 @@ create_axis_slider (int axis)
|
||||
GtkAdjustment *adj;
|
||||
const char *text;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
||||
switch (axis)
|
||||
{
|
||||
@@ -393,7 +393,6 @@ create_glarea_window (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "OpenGL Area");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 600);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=GTK+ Demo
|
||||
Comment=GTK+ code examples and demonstrations
|
||||
Exec=gtk3-demo
|
||||
Icon=gtk3-demo
|
||||
Exec=gtk4-demo
|
||||
Icon=gtk4-demo
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
@@ -268,8 +268,6 @@ do_hypertext (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 20);
|
||||
|
@@ -266,7 +266,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
tool_bar = gtk_toolbar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), tool_bar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), tool_bar, FALSE, FALSE);
|
||||
|
||||
up_button = gtk_tool_button_new (NULL, NULL);
|
||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (up_button), _("_Up"));
|
||||
@@ -291,7 +291,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE);
|
||||
|
||||
/* Create the store and fill it with the contents of '/' */
|
||||
parent = g_strdup ("/");
|
||||
|
@@ -347,22 +347,19 @@ do_images (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (cleanup_callback), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Image loaded from a file</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
image = gtk_image_new_from_icon_name ("gtk3-demo", GTK_ICON_SIZE_DIALOG);
|
||||
|
||||
@@ -374,13 +371,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Animation loaded from a file</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
image = gtk_image_new_from_resource ("/images/floppybuddy.gif");
|
||||
|
||||
@@ -391,13 +388,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Symbolic themed icon</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
|
||||
image = gtk_image_new_from_gicon (gicon, GTK_ICON_SIZE_DIALOG);
|
||||
@@ -410,13 +407,13 @@ do_images (GtkWidget *do_widget)
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label),
|
||||
"<u>Progressive image loading</u>");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
/* Create an empty image for now; the progressive loader
|
||||
* will create the pixbuf and fill it in.
|
||||
@@ -428,7 +425,7 @@ do_images (GtkWidget *do_widget)
|
||||
|
||||
/* Sensitivity control */
|
||||
button = gtk_toggle_button_new_with_mnemonic ("_Insensitive");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE);
|
||||
|
||||
g_signal_connect (button, "toggled",
|
||||
G_CALLBACK (toggle_sensitivity_callback),
|
||||
|
@@ -59,30 +59,29 @@ do_infobar (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Info Bars");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Message");
|
||||
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Warning");
|
||||
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);
|
||||
@@ -91,54 +90,55 @@ do_infobar (GtkWidget *do_widget)
|
||||
bar = gtk_info_bar_new_with_buttons (_("_OK"), GTK_RESPONSE_OK, NULL);
|
||||
gtk_info_bar_set_show_close_button (GTK_INFO_BAR (bar), TRUE);
|
||||
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Question");
|
||||
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Error");
|
||||
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
|
||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE);
|
||||
|
||||
button = gtk_toggle_button_new_with_label ("Other");
|
||||
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);
|
||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||
|
||||
frame = gtk_frame_new ("Info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
|
||||
gtk_widget_set_margin_top (frame, 8);
|
||||
gtk_widget_set_margin_bottom (frame, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
/* Standard message dialog */
|
||||
label = gtk_label_new ("An example of different info bars");
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE);
|
||||
|
||||
gtk_widget_show_all (actions);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), actions, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), actions, FALSE, FALSE);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -56,7 +56,6 @@ do_links (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Links");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
|
@@ -262,13 +262,12 @@ do_list_store (GtkWidget *do_widget)
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
@@ -276,7 +275,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE);
|
||||
|
||||
/* create tree model */
|
||||
model = create_model ();
|
||||
|
@@ -359,10 +359,10 @@ do_listbox (GtkWidget *do_widget)
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
label = gtk_label_new ("Messages from Gtk+ and friends");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scrolled, TRUE, TRUE);
|
||||
listbox = gtk_list_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (scrolled), listbox);
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk30">
|
||||
<interface domain="gtk40">
|
||||
<!-- interface-requires gtk+ 3.10 -->
|
||||
<!-- interface-requires gtkdemo 3.10 -->
|
||||
<object class="GtkMenu" id="menu1">
|
||||
|
@@ -105,8 +105,6 @@ do_menus (GtkWidget *do_widget)
|
||||
accel_group = gtk_accel_group_new ();
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_widget_show (box);
|
||||
@@ -117,7 +115,7 @@ do_menus (GtkWidget *do_widget)
|
||||
|
||||
menubar = gtk_menu_bar_new ();
|
||||
gtk_widget_set_hexpand (menubar, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (box1), menubar, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box1), menubar, FALSE, TRUE);
|
||||
gtk_widget_show (menubar);
|
||||
|
||||
menu = create_menu (2);
|
||||
@@ -138,20 +136,19 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
button = gtk_button_new_with_label ("Flip");
|
||||
g_signal_connect (button, "clicked",
|
||||
G_CALLBACK (change_orientation), menubar);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE);
|
||||
gtk_widget_show (button);
|
||||
|
||||
button = gtk_button_new_with_label ("Close");
|
||||
g_signal_connect_swapped (button, "clicked",
|
||||
G_CALLBACK(gtk_widget_destroy), window);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE);
|
||||
gtk_widget_set_can_default (button, TRUE);
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
|
@@ -233,18 +233,16 @@ gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
GdkWindow *window;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
guint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
attributes.x = allocation.x + border_width;
|
||||
attributes.y = allocation.y + border_width;
|
||||
attributes.width = allocation.width - 2 * border_width;
|
||||
attributes.height = allocation.height - 2 * border_width;
|
||||
attributes.x = allocation.x;
|
||||
attributes.y = allocation.y;
|
||||
attributes.width = allocation.width;
|
||||
attributes.height = allocation.height;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
@@ -255,10 +253,9 @@ gtk_rotated_bin_realize (GtkWidget *widget)
|
||||
| GDK_ENTER_NOTIFY_MASK
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
||||
|
||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
@@ -384,8 +381,6 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
double s, c;
|
||||
double w, h;
|
||||
guint border_width;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
@@ -396,12 +391,8 @@ gtk_rotated_bin_size_request (GtkWidget *widget,
|
||||
|
||||
s = sin (bin->angle);
|
||||
c = cos (bin->angle);
|
||||
w = c * child_requisition.width + s * child_requisition.height;
|
||||
h = s * child_requisition.width + c * child_requisition.height;
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
requisition->width = border_width * 2 + w;
|
||||
requisition->height = border_width * 2 + h;
|
||||
requisition->width = c * child_requisition.width + s * child_requisition.height;
|
||||
requisition->height = s * child_requisition.width + c * child_requisition.height;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -433,21 +424,18 @@ gtk_rotated_bin_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
|
||||
guint border_width;
|
||||
gint w, h;
|
||||
gdouble s, c;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
w = allocation->width;
|
||||
h = allocation->height;
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_window_move_resize (gtk_widget_get_window (widget),
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
allocation->x,
|
||||
allocation->y,
|
||||
w, h);
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
@@ -578,8 +566,6 @@ do_offscreen_window (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
scale = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,
|
||||
0, G_PI/2, 0.01);
|
||||
@@ -591,8 +577,8 @@ do_offscreen_window (GtkWidget *do_widget)
|
||||
g_signal_connect (scale, "value-changed", G_CALLBACK (scale_changed), bin);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (bin), button);
|
||||
}
|
||||
|
||||
|
@@ -172,18 +172,16 @@ gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
GdkWindow *window;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
guint border_width;
|
||||
GtkRequisition child_requisition;
|
||||
|
||||
gtk_widget_set_realized (widget, TRUE);
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
attributes.x = allocation.x + border_width;
|
||||
attributes.y = allocation.y + border_width;
|
||||
attributes.width = allocation.width - 2 * border_width;
|
||||
attributes.height = allocation.height - 2 * border_width;
|
||||
attributes.x = allocation.x;
|
||||
attributes.y = allocation.y;
|
||||
attributes.width = allocation.width;
|
||||
attributes.height = allocation.height;
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.event_mask = gtk_widget_get_events (widget)
|
||||
| GDK_EXPOSURE_MASK
|
||||
@@ -194,10 +192,9 @@ gtk_mirror_bin_realize (GtkWidget *widget)
|
||||
| GDK_ENTER_NOTIFY_MASK
|
||||
| GDK_LEAVE_NOTIFY_MASK;
|
||||
|
||||
attributes.visual = gtk_widget_get_visual (widget);
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y;
|
||||
|
||||
window = gdk_window_new (gtk_widget_get_parent_window (widget),
|
||||
&attributes, attributes_mask);
|
||||
@@ -310,7 +307,6 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
GtkRequisition child_requisition;
|
||||
guint border_width;
|
||||
|
||||
child_requisition.width = 0;
|
||||
child_requisition.height = 0;
|
||||
@@ -319,9 +315,8 @@ gtk_mirror_bin_size_request (GtkWidget *widget,
|
||||
gtk_widget_get_preferred_size ( (bin->child),
|
||||
&child_requisition, NULL);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
requisition->width = border_width * 2 + child_requisition.width + 10;
|
||||
requisition->height = border_width * 2 + child_requisition.height * 2 + 10;
|
||||
requisition->width = child_requisition.width + 10;
|
||||
requisition->height = child_requisition.height * 2 + 10;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -354,19 +349,16 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
|
||||
gint w, h;
|
||||
guint border_width;
|
||||
|
||||
gtk_widget_set_allocation (widget, allocation);
|
||||
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
|
||||
w = allocation->width - border_width * 2;
|
||||
h = allocation->height - border_width * 2;
|
||||
w = allocation->width;
|
||||
h = allocation->height;
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_window_move_resize (gtk_widget_get_window (widget),
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
allocation->x,
|
||||
allocation->y,
|
||||
w, h);
|
||||
|
||||
if (bin->child && gtk_widget_get_visible (bin->child))
|
||||
@@ -383,8 +375,8 @@ gtk_mirror_bin_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
gdk_window_move_resize (bin->offscreen_window,
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
allocation->x,
|
||||
allocation->y,
|
||||
child_allocation.width, child_allocation.height);
|
||||
gtk_widget_size_allocate (bin->child, &child_allocation);
|
||||
}
|
||||
@@ -483,8 +475,6 @@ do_offscreen_window2 (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
bin = gtk_mirror_bin_new ();
|
||||
@@ -502,11 +492,11 @@ do_offscreen_window2 (GtkWidget *do_widget)
|
||||
gtk_size_group_add_widget (group, applybutton);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (bin), hbox);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), backbutton, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), applybutton, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), backbutton, FALSE, FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), applybutton, FALSE, FALSE);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
@@ -63,10 +63,14 @@ do_overlay (GtkWidget *do_widget)
|
||||
|
||||
label = gtk_label_new ("<span foreground='blue' weight='ultrabold' font='40'>Numbers</span>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 8);
|
||||
gtk_widget_set_margin_top (label, 8);
|
||||
gtk_widget_set_margin_bottom (label, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 8);
|
||||
gtk_widget_set_margin_top (entry, 8);
|
||||
gtk_widget_set_margin_bottom (entry, 8);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), overlay);
|
||||
|
||||
|
@@ -85,7 +85,6 @@ create_pane_options (GtkPaned *paned,
|
||||
child2 = gtk_paned_get_child2 (paned);
|
||||
|
||||
frame = gtk_frame_new (frame_label);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -142,14 +141,12 @@ do_panes (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Paned Widgets");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE);
|
||||
|
||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||
@@ -179,14 +176,14 @@ do_panes (GtkWidget *do_widget)
|
||||
"Horizontal",
|
||||
"Left",
|
||||
"Right"),
|
||||
FALSE, FALSE, 0);
|
||||
FALSE, FALSE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_pane_options (GTK_PANED (vpaned),
|
||||
"Vertical",
|
||||
"Top",
|
||||
"Bottom"),
|
||||
FALSE, FALSE, 0);
|
||||
FALSE, FALSE);
|
||||
|
||||
gtk_widget_show_all (vbox);
|
||||
}
|
||||
|
@@ -22,15 +22,11 @@ do_pickers (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 3);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 10);
|
||||
|
||||
label = gtk_label_new ("Color:");
|
||||
gtk_widget_set_halign (label, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
|
||||
|
@@ -25,7 +25,6 @@ create_popover (GtkWidget *parent,
|
||||
popover = gtk_popover_new (parent);
|
||||
gtk_popover_set_position (GTK_POPOVER (popover), pos);
|
||||
gtk_container_add (GTK_CONTAINER (popover), child);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (popover), 6);
|
||||
gtk_widget_show (child);
|
||||
|
||||
return popover;
|
||||
@@ -132,7 +131,6 @@ do_popover (GtkWidget *do_widget)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 24);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
|
@@ -2,7 +2,6 @@
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.6 -->
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="border_width">5</property>
|
||||
<property name="default_width">300</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="title">Revealer</property>
|
||||
|
@@ -21,7 +21,6 @@
|
||||
</object>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Scales</property>
|
||||
<property name="border-width" translatable="yes">20</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">1</property>
|
||||
|
@@ -239,25 +239,23 @@ do_search_entry (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE);
|
||||
|
||||
/* Create our entry */
|
||||
entry = gtk_search_entry_new ();
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE);
|
||||
|
||||
/* Create the find and cancel buttons */
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
|
||||
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), notebook, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), notebook, FALSE, FALSE);
|
||||
|
||||
find_button = gtk_button_new_with_label ("Find");
|
||||
g_signal_connect (find_button, "clicked",
|
||||
|
@@ -87,17 +87,16 @@ do_search_entry2 (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
|
||||
|
||||
entry = gtk_search_entry_new ();
|
||||
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (container), entry, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (container), entry, FALSE, FALSE);
|
||||
searchbar = gtk_search_bar_new ();
|
||||
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_ENTRY (entry));
|
||||
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (searchbar), FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (searchbar), container);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), searchbar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), searchbar, FALSE, FALSE);
|
||||
|
||||
/* Hook the search bar to key presses */
|
||||
g_signal_connect (window, "key-press-event",
|
||||
@@ -105,27 +104,26 @@ do_search_entry2 (GtkWidget *do_widget)
|
||||
|
||||
/* Help */
|
||||
label = gtk_label_new ("Start Typing to search");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE);
|
||||
|
||||
/* Toggle button */
|
||||
button = gtk_toggle_button_new_with_label ("Search");
|
||||
g_object_bind_property (button, "active",
|
||||
searchbar, "search-mode-enabled",
|
||||
G_BINDING_BIDIRECTIONAL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE);
|
||||
|
||||
/* Result */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE);
|
||||
|
||||
label = gtk_label_new ("Result:");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_margin_start (label, 6);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE);
|
||||
|
||||
g_signal_connect (entry, "search-changed",
|
||||
G_CALLBACK (search_changed_cb), label);
|
||||
@@ -133,16 +131,15 @@ do_search_entry2 (GtkWidget *do_widget)
|
||||
G_CALLBACK (changed_cb), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE);
|
||||
|
||||
label = gtk_label_new ("Signal:");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_margin_start (label, 6);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE);
|
||||
|
||||
g_signal_connect (entry, "search-changed",
|
||||
G_CALLBACK (search_changed), label);
|
||||
|
@@ -375,6 +375,7 @@
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="visible">1</property>
|
||||
<property name="max-height">16</property>
|
||||
<property name="section-name">terminal</property>
|
||||
<property name="title" translatable="yes">Terminal Shortcuts</property>
|
||||
<child>
|
||||
@@ -452,6 +453,43 @@
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">'Special' combinations</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">t+t</property>
|
||||
<property name="title" translatable="yes">You want tea ?</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><shift><ctrl></property>
|
||||
<property name="title" translatable="yes">Shift Control</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>&<ctrl></property>
|
||||
<property name="title" translatable="yes">Control Control</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Control_L&Control_R</property>
|
||||
<property name="title" translatable="yes">Left and right control</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
@@ -499,41 +537,18 @@
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="visible">1</property>
|
||||
<property name="title" translatable="yes">'Special' combinations</property>
|
||||
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">t+t</property>
|
||||
<property name="title" translatable="yes">You want tea ?</property>
|
||||
<property name="shortcut-type">gesture-swipe-left</property>
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><shift><ctrl></property>
|
||||
<property name="title" translatable="yes">Shift Control</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator"><ctrl>&<ctrl></property>
|
||||
<property name="title" translatable="yes">Control Control</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="visible">1</property>
|
||||
<property name="accelerator">Control_L&Control_R</property>
|
||||
<property name="title" translatable="yes">Left and right control</property>
|
||||
<property name="shortcut-type">gesture-swipe-right</property>
|
||||
<property name="title" translatable="yes">A stock swipe gesture</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
@@ -49,7 +49,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
sidebar = gtk_stack_sidebar_new ();
|
||||
gtk_box_pack_start (GTK_BOX (box), sidebar, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), sidebar, FALSE, FALSE);
|
||||
|
||||
stack = gtk_stack_new ();
|
||||
gtk_stack_set_transition_type (GTK_STACK (stack), GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
|
||||
@@ -57,9 +57,9 @@ do_sidebar (GtkWidget *do_widget)
|
||||
|
||||
/* Separator between sidebar and stack */
|
||||
widget = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX(box), widget, FALSE, FALSE);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (box), stack, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), stack, TRUE, TRUE);
|
||||
|
||||
for (i=0; (c = *(pages+i)) != NULL; i++ )
|
||||
{
|
||||
|
@@ -109,17 +109,15 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
g_object_set_data_full (G_OBJECT (window), "size-group", size_group, g_object_unref);
|
||||
|
||||
/* Create one frame holding color options */
|
||||
frame = gtk_frame_new ("Color Options");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 5);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -129,10 +127,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
/* And another frame holding line style options */
|
||||
frame = gtk_frame_new ("Line Options");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 5);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -142,7 +139,7 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
|
||||
/* And a check button to turn grouping on and off */
|
||||
check_button = gtk_check_button_new_with_mnemonic ("_Enable grouping");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), check_button, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), check_button, FALSE, FALSE);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE);
|
||||
g_signal_connect (check_button, "toggled",
|
||||
|
@@ -52,8 +52,7 @@ do_spinner (GtkWidget *do_widget)
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), vbox, TRUE, TRUE);
|
||||
|
||||
/* Sensitive */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
|
@@ -157,7 +157,7 @@ create_text_view (GtkWidget *hbox,
|
||||
guint timeout;
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), swindow, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), swindow, TRUE, TRUE);
|
||||
textview = gtk_text_view_new ();
|
||||
gtk_container_add (GTK_CONTAINER (swindow), textview);
|
||||
|
||||
|
@@ -481,10 +481,8 @@ do_textview (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Multiple Views");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vpaned);
|
||||
|
||||
/* For convenience, we just use the autocreated buffer from
|
||||
|
@@ -25,7 +25,6 @@ do_theming_style_classes (GtkWidget *do_widget)
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Style Classes");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
|
@@ -443,7 +443,6 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
|
||||
/* Add widgets to control the ToolPalette appearance: */
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
@@ -473,7 +472,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
"text", 0,
|
||||
NULL);
|
||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_orientation), &iter);
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_orientation, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_orientation, FALSE, FALSE);
|
||||
|
||||
/* Style combo box: */
|
||||
style_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
|
||||
@@ -512,11 +511,11 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
"text", 0,
|
||||
NULL);
|
||||
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_style), &iter);
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE);
|
||||
|
||||
/* Add hbox */
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE);
|
||||
|
||||
/* Add and fill the ToolPalette: */
|
||||
palette = gtk_tool_palette_new ();
|
||||
@@ -529,7 +528,6 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (palette_scroller),
|
||||
GTK_POLICY_NEVER,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (palette_scroller), 6);
|
||||
gtk_widget_set_hexpand (palette_scroller, TRUE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
|
||||
@@ -549,8 +547,7 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
/* ===== notebook ===== */
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER (notebook), 6);
|
||||
gtk_box_pack_end (GTK_BOX(hbox), notebook, FALSE, FALSE, 0);
|
||||
gtk_box_pack_end (GTK_BOX(hbox), notebook, FALSE, FALSE);
|
||||
|
||||
/* ===== DnD for tool items ===== */
|
||||
|
||||
@@ -585,7 +582,6 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_ALWAYS);
|
||||
gtk_container_add (GTK_CONTAINER (contents_scroller), contents);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
contents_scroller,
|
||||
@@ -615,7 +611,6 @@ do_toolpalette (GtkWidget *do_widget)
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_ALWAYS);
|
||||
gtk_container_add (GTK_CONTAINER (contents_scroller), contents);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
|
||||
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), contents_scroller,
|
||||
gtk_label_new ("Interactive DnD Mode"));
|
||||
|
@@ -202,7 +202,6 @@ do_transparent (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Transparency");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
|
||||
@@ -220,7 +219,7 @@ do_transparent (GtkWidget *do_widget)
|
||||
provider = gtk_css_provider_new ();
|
||||
css = g_strdup_printf ("* { border-width: 0px %dpx %dpx 0px; }",
|
||||
SHADOW_OFFSET_X, SHADOW_OFFSET_Y);
|
||||
gtk_css_provider_load_from_data (provider, css, -1, NULL);
|
||||
gtk_css_provider_load_from_data (provider, css, -1);
|
||||
g_free (css);
|
||||
gtk_style_context_add_provider (gtk_widget_get_style_context (entry),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
|
@@ -398,12 +398,11 @@ do_tree_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
gtk_label_new ("Jonathan's Holiday Card Planning Sheet"),
|
||||
FALSE, FALSE, 0);
|
||||
FALSE, FALSE);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
@@ -411,7 +410,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE);
|
||||
|
||||
/* create model */
|
||||
model = create_model ();
|
||||
|
@@ -6,17 +6,17 @@ AM_CPPFLAGS = \
|
||||
$(GTK_DEP_CFLAGS)
|
||||
|
||||
LDADD = \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(top_builddir)/gtk/libgtk-4.la \
|
||||
$(top_builddir)/gdk/libgdk-4.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
bin_PROGRAMS = gtk3-icon-browser
|
||||
bin_PROGRAMS = gtk4-icon-browser
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = gtk3-icon-browser.desktop
|
||||
dist_desktop_DATA = gtk4-icon-browser.desktop
|
||||
|
||||
gtk3_icon_browser_SOURCES = \
|
||||
gtk4_icon_browser_SOURCES = \
|
||||
main.c \
|
||||
iconbrowserapp.c iconbrowserapp.h \
|
||||
iconbrowserwin.c iconbrowserwin.h \
|
||||
@@ -36,13 +36,13 @@ EXTRA_DIST = \
|
||||
window.ui
|
||||
|
||||
# ------------------- MSVC Build Items ----------------
|
||||
MSVCPROJS = gtk3-icon-browser
|
||||
MSVCPROJS = gtk4-icon-browser
|
||||
|
||||
gtk3_icon_browser_FILES = $(gtk3_icon_browser_SOURCES)
|
||||
gtk3_icon_browser_EXCLUDES = dummy
|
||||
gtk4_icon_browser_FILES = $(gtk4_icon_browser_SOURCES)
|
||||
gtk4_icon_browser_EXCLUDES = dummy
|
||||
|
||||
include $(top_srcdir)/build/Makefile.msvcproj
|
||||
|
||||
dist-hook: $(top_builddir)/build/win32/vs9/gtk3-icon-browser.vcproj
|
||||
dist-hook: $(top_builddir)/build/win32/vs9/gtk4-icon-browser.vcproj
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Icon Browser
|
||||
Comment=An application that shows themed icons
|
||||
Exec=gtk3-icon-browser
|
||||
Icon=gtk3-icon-browser
|
||||
Exec=gtk4-icon-browser
|
||||
Icon=gtk4-icon-browser
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
@@ -1,29 +1,29 @@
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
bin_PROGRAMS = gtk3-widget-factory
|
||||
bin_PROGRAMS = gtk4-widget-factory
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
dist_desktop_DATA = gtk3-widget-factory.desktop
|
||||
dist_desktop_DATA = gtk4-widget-factory.desktop
|
||||
|
||||
gtk3_widget_factory_SOURCES = \
|
||||
gtk4_widget_factory_SOURCES = \
|
||||
widget-factory.c \
|
||||
widget_factory_resources.c
|
||||
|
||||
BUILT_SOURCES = \
|
||||
widget_factory_resources.c
|
||||
|
||||
gtk3_widget_factory_DEPENDENCIES = \
|
||||
$(top_builddir)/gtk/libgtk-3.la
|
||||
gtk4_widget_factory_DEPENDENCIES = \
|
||||
$(top_builddir)/gtk/libgtk-4.la
|
||||
|
||||
gtk3_widget_factory_CPPFLAGS = \
|
||||
gtk4_widget_factory_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GTK_DEP_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
gtk3_widget_factory_LDADD = \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
gtk4_widget_factory_LDADD = \
|
||||
$(top_builddir)/gdk/libgdk-4.la \
|
||||
$(top_builddir)/gtk/libgtk-4.la \
|
||||
$(GTK_DEP_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
@@ -40,12 +40,12 @@ appsicon32dir = $(iconthemedir)/32x32/apps
|
||||
appsicon48dir = $(iconthemedir)/48x48/apps
|
||||
appsicon256dir = $(iconthemedir)/256x256/apps
|
||||
|
||||
dist_appsicon16_DATA = data/16x16/gtk3-widget-factory.png data/16x16/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk3-widget-factory.png data/22x22/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk3-widget-factory.png data/24x24/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk3-widget-factory.png data/32x32/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk3-widget-factory.png data/48x48/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk3-widget-factory.png data/256x256/gtk3-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon16_DATA = data/16x16/gtk4-widget-factory.png data/16x16/gtk4-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon22_DATA = data/22x22/gtk4-widget-factory.png data/22x22/gtk4-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon24_DATA = data/24x24/gtk4-widget-factory.png data/24x24/gtk4-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon32_DATA = data/32x32/gtk4-widget-factory.png data/32x32/gtk4-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon48_DATA = data/48x48/gtk4-widget-factory.png data/48x48/gtk4-widget-factory-symbolic.symbolic.png
|
||||
dist_appsicon256_DATA = data/256x256/gtk4-widget-factory.png data/256x256/gtk4-widget-factory-symbolic.symbolic.png
|
||||
|
||||
update_icon_cache = $(top_builddir)/gtk/gtk-update-icon-cache$(EXEEXT) --ignore-theme-index --force
|
||||
|
||||
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 550 B After Width: | Height: | Size: 550 B |
Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 369 B After Width: | Height: | Size: 369 B |
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 963 B |
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Widget Factory
|
||||
Comment=A showcase for GTK+ widgets, designed for testing themes.
|
||||
Exec=gtk3-widget-factory
|
||||
Icon=gtk3-widget-factory
|
||||
Exec=gtk4-widget-factory
|
||||
Icon=gtk4-widget-factory
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
@@ -787,7 +787,7 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
|
||||
"margin", 6,
|
||||
"xalign", 0.0,
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (row), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (row), label, TRUE, TRUE);
|
||||
gdk_rgba_parse (&rgba, color);
|
||||
swatch = g_object_new (g_type_from_name ("GtkColorSwatch"),
|
||||
"rgba", &rgba,
|
||||
@@ -799,7 +799,7 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
|
||||
NULL);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), swatch);
|
||||
gtk_box_pack_start (GTK_BOX (row), box, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (row), box, FALSE, FALSE);
|
||||
gtk_widget_show_all (row);
|
||||
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
|
||||
row = gtk_widget_get_parent (row);
|
||||
@@ -898,7 +898,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
"margin", 6,
|
||||
"xalign", 0.0,
|
||||
NULL);
|
||||
gtk_box_pack_start (GTK_BOX (row), label, TRUE, TRUE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (row), label, TRUE, TRUE);
|
||||
gdk_rgba_parse (&rgba, colors[i].color);
|
||||
swatch = g_object_new (g_type_from_name ("GtkColorSwatch"),
|
||||
"rgba", &rgba,
|
||||
@@ -910,7 +910,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
NULL);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), swatch);
|
||||
gtk_box_pack_start (GTK_BOX (row), box, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (row), box, FALSE, FALSE);
|
||||
gtk_widget_show_all (row);
|
||||
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
|
||||
row = gtk_widget_get_parent (row);
|
||||
@@ -1507,45 +1507,7 @@ g_test_permission_class_init (GTestPermissionClass *class)
|
||||
permission_class->release_finish = release_finish;
|
||||
}
|
||||
|
||||
static int icon_sizes[5];
|
||||
|
||||
static void
|
||||
register_icon_sizes (void)
|
||||
{
|
||||
static gboolean registered;
|
||||
|
||||
if (registered)
|
||||
return;
|
||||
|
||||
registered = TRUE;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
icon_sizes[0] = gtk_icon_size_register ("a", 16, 16);
|
||||
icon_sizes[1] = gtk_icon_size_register ("b", 24, 24);
|
||||
icon_sizes[2] = gtk_icon_size_register ("c", 32, 32);
|
||||
icon_sizes[3] = gtk_icon_size_register ("d", 48, 48);
|
||||
icon_sizes[4] = gtk_icon_size_register ("e", 64, 64);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
static int
|
||||
find_icon_size (GtkIconSize size)
|
||||
{
|
||||
gint w, h, w2, h2;
|
||||
gint i;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_icon_size_lookup (size, &w, &h);
|
||||
for (i = 0; i < G_N_ELEMENTS (icon_sizes); i++)
|
||||
{
|
||||
gtk_icon_size_lookup (icon_sizes[i], &w2, &h2);
|
||||
if (w == w2)
|
||||
return i;
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
return 2;
|
||||
}
|
||||
static int icon_sizes[] = {0, 1, 2, 3, 4, 5, 6};
|
||||
|
||||
static void
|
||||
update_buttons (GtkWidget *iv, int pos)
|
||||
@@ -1564,21 +1526,16 @@ increase_icon_size (GtkWidget *iv)
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
GtkIconSize size;
|
||||
int i;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_get (cell, "stock-size", &size, NULL);
|
||||
|
||||
i = find_icon_size (size);
|
||||
i = CLAMP (i + 1, 0, G_N_ELEMENTS (icon_sizes) - 1);
|
||||
size = icon_sizes[i];
|
||||
|
||||
size = MIN (size + 1, G_N_ELEMENTS (icon_sizes) - 1);
|
||||
g_object_set (cell, "stock-size", size, NULL);
|
||||
|
||||
update_buttons (iv, i);
|
||||
update_buttons (iv, size);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
@@ -1589,21 +1546,16 @@ decrease_icon_size (GtkWidget *iv)
|
||||
GList *cells;
|
||||
GtkCellRendererPixbuf *cell;
|
||||
GtkIconSize size;
|
||||
int i;
|
||||
|
||||
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (iv));
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_get (cell, "stock-size", &size, NULL);
|
||||
|
||||
i = find_icon_size (size);
|
||||
i = CLAMP (i - 1, 0, G_N_ELEMENTS (icon_sizes) - 1);
|
||||
size = icon_sizes[i];
|
||||
|
||||
size = MAX (size - 1, 1);
|
||||
g_object_set (cell, "stock-size", size, NULL);
|
||||
|
||||
update_buttons (iv, i);
|
||||
update_buttons (iv, size);
|
||||
|
||||
gtk_widget_queue_resize (iv);
|
||||
}
|
||||
@@ -1618,7 +1570,7 @@ reset_icon_size (GtkWidget *iv)
|
||||
cell = cells->data;
|
||||
g_list_free (cells);
|
||||
|
||||
g_object_set (cell, "stock-size", icon_sizes[2], NULL);
|
||||
g_object_set (cell, "stock-size", 2, NULL);
|
||||
|
||||
update_buttons (iv, 2);
|
||||
|
||||
@@ -1680,7 +1632,6 @@ activate (GApplication *app)
|
||||
GAction *action;
|
||||
|
||||
g_type_ensure (my_text_view_get_type ());
|
||||
register_icon_sizes ();
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider, "/org/gtk/WidgetFactory/widget-factory.css");
|
||||
|
@@ -441,7 +441,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkBox" id="page1">
|
||||
<property name="visible">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="border-width">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box2">
|
||||
@@ -1830,7 +1829,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="border-width">16</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
@@ -2778,7 +2776,7 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="model">iconsmodel</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererPixbuf" id="iconviewcell">
|
||||
<property name="stock-size">5</property>
|
||||
<property name="stock-size">2</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="icon-name">0</attribute>
|
||||
@@ -2873,7 +2871,6 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">1</property>
|
||||
<property name="border-width">16</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
@@ -28,8 +28,8 @@ Make sure that gtk-doc is the latest released version.
|
||||
|
||||
3) Update the pot files and commit the changes:
|
||||
|
||||
make -C po gtk30.pot
|
||||
make -C po-properties gtk30-properties.pot
|
||||
make -C po gtk40.pot
|
||||
make -C po-properties gtk40-properties.pot
|
||||
|
||||
4) In particular, if this is a major, stable, release, verify that
|
||||
README.in contains the relevant release notes and that the
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = gdk gtk libgail-util
|
||||
SUBDIRS = gdk gsk gtk
|
||||
|
||||
GITIGNOREFILES = */*.1
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gdk3
|
||||
DOC_MODULE=gdk4
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gdk-docs.sgml
|
||||
@@ -61,7 +61,7 @@ AM_CPPFLAGS = \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/libgdk-3.la $(GDK_DEP_LIBS)
|
||||
GTKDOC_LIBS = $(top_builddir)/gdk/libgdk-4.la $(GDK_DEP_LIBS)
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--output-format=xml --name-space=gdk
|
||||
|
@@ -6,7 +6,7 @@
|
||||
]>
|
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<bookinfo>
|
||||
<title>GDK 3 Reference Manual</title>
|
||||
<title>GDK 4 Reference Manual</title>
|
||||
<releaseinfo>
|
||||
This document is for the GDK 3 library, version &version;
|
||||
The latest versions can be found online at
|
||||
|
@@ -22,12 +22,6 @@ gdk_get_display
|
||||
<SUBSECTION>
|
||||
gdk_flush
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_screen_width
|
||||
gdk_screen_height
|
||||
gdk_screen_width_mm
|
||||
gdk_screen_height_mm
|
||||
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_pointer_grab
|
||||
@@ -211,13 +205,8 @@ gdk_screen_is_composited
|
||||
gdk_screen_get_root_window
|
||||
gdk_screen_get_display
|
||||
gdk_screen_get_number
|
||||
gdk_screen_get_width
|
||||
gdk_screen_get_height
|
||||
gdk_screen_get_width_mm
|
||||
gdk_screen_get_height_mm
|
||||
gdk_screen_list_visuals
|
||||
gdk_screen_get_toplevel_windows
|
||||
gdk_screen_make_display_name
|
||||
gdk_screen_get_n_monitors
|
||||
gdk_screen_get_primary_monitor
|
||||
gdk_screen_get_monitor_geometry
|
||||
@@ -233,8 +222,6 @@ gdk_screen_get_font_options
|
||||
gdk_screen_set_font_options
|
||||
gdk_screen_get_resolution
|
||||
gdk_screen_set_resolution
|
||||
gdk_screen_get_active_window
|
||||
gdk_screen_get_window_stack
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_SCREEN
|
||||
@@ -410,9 +397,6 @@ gdk_window_mark_paint_from_clip
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_window_get_clip_region
|
||||
gdk_window_begin_paint_rect
|
||||
gdk_window_begin_paint_region
|
||||
gdk_window_end_paint
|
||||
gdk_window_begin_draw_frame
|
||||
gdk_window_end_draw_frame
|
||||
gdk_window_should_draw
|
||||
@@ -430,7 +414,6 @@ gdk_window_freeze_updates
|
||||
gdk_window_thaw_updates
|
||||
gdk_window_process_all_updates
|
||||
gdk_window_process_updates
|
||||
gdk_window_set_debug_updates
|
||||
gdk_window_enable_synchronized_configure
|
||||
gdk_window_configure_finished
|
||||
gdk_window_get_frame_clock
|
||||
@@ -624,7 +607,6 @@ gdk_pango_context_get_for_display
|
||||
<FILE>cairo_interaction</FILE>
|
||||
gdk_window_create_similar_surface
|
||||
gdk_window_create_similar_image_surface
|
||||
gdk_cairo_create
|
||||
gdk_cairo_get_clip_rectangle
|
||||
gdk_cairo_get_drawing_context
|
||||
gdk_cairo_set_source_color
|
79
docs/reference/gsk/Makefile.am
Normal file
@@ -0,0 +1,79 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE = gsk3
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE = gsk-docs.xml
|
||||
|
||||
# Extra options to supply to gtkdoc-scan
|
||||
SCAN_OPTIONS = --deprecated-guards=GDK_DISABLE_DEPRECATED \
|
||||
--ignore-decorators=G_GNUC_WARN_UNUSED_RESULT
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR = $(top_srcdir)/gsk
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB = $(top_srcdir)/gsk/*.h
|
||||
CFILE_GLOB = $(top_srcdir)/gsk/*.c
|
||||
|
||||
# Header files to ignore when scanning
|
||||
IGNORE_HFILES = \
|
||||
gskcairorendererprivate.h \
|
||||
gskdebugprivate.h \
|
||||
gskdriverprivate.h \
|
||||
gskprofilerprivate.h \
|
||||
gskglrendererprivate.h \
|
||||
gskprivate.h \
|
||||
gskprofilerprivate.h \
|
||||
gskrendererprivate.h \
|
||||
gskrendernodeprivate.h \
|
||||
gskshaderbiulderprivate.h
|
||||
|
||||
# Extra files to add when scanning
|
||||
EXTRA_HFILES =
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_builddir)/gsk \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = $(top_builddir)/gsk/libgsk-3.la $(GDK_DEP_LIBS)
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--output-format=xml --name-space=gsk
|
||||
|
||||
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
|
||||
content_files = \
|
||||
version.xml
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES =
|
||||
|
||||
if ENABLE_DOC_CROSS_REFERENCES
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS= \
|
||||
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/gobject \
|
||||
--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html/glib \
|
||||
--extra-dir=$(CAIRO_PREFIX)/share/gtk-doc/html/cairo
|
||||
endif
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
TESTS_ENVIRONMENT = cd $(srcdir) && \
|
||||
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
|
||||
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
|
||||
#TESTS = $(GTKDOC_CHECK)
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
29
docs/reference/gsk/gsk-docs.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
]>
|
||||
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<bookinfo>
|
||||
<title>GSK 3 Reference Manual</title>
|
||||
<releaseinfo>
|
||||
This document is for the GSK 3 library, version &version;
|
||||
The latest versions can be found online at
|
||||
<ulink role="online-location" url="http://developer.gnome.org/gdk3/">http://developer.gnome.org/gsk3/</ulink>.
|
||||
</releaseinfo>
|
||||
</bookinfo>
|
||||
|
||||
<reference id="reference">
|
||||
<title>API Reference</title>
|
||||
<xi:include href="xml/GskRenderer.xml" />
|
||||
<xi:include href="xml/GskRenderNode.xml" />
|
||||
<xi:include href="xml/GskRenderNodeIter.xml" />
|
||||
</reference>
|
||||
|
||||
<index id="api-index-full">
|
||||
<title>Index of all symbols</title>
|
||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
</book>
|
87
docs/reference/gsk/gsk3-sections.txt
Normal file
@@ -0,0 +1,87 @@
|
||||
<SECTION>
|
||||
<FILE>GskRenderer</FILE>
|
||||
gsk_renderer_get_for_display
|
||||
gsk_renderer_set_viewport
|
||||
gsk_renderer_get_viewport
|
||||
gsk_renderer_set_scale_factor
|
||||
gsk_renderer_get_scale_factor
|
||||
gsk_renderer_set_window
|
||||
gsk_renderer_get_window
|
||||
gsk_renderer_get_display
|
||||
gsk_renderer_realize
|
||||
gsk_renderer_unrealize
|
||||
gsk_renderer_create_render_node
|
||||
gsk_renderer_render
|
||||
<SUBSECTION Standard>
|
||||
GSK_IS_RENDERER
|
||||
GSK_RENDERER
|
||||
GSK_TYPE_RENDERER
|
||||
GskRenderer
|
||||
GskRendererClass
|
||||
gsk_renderer_get_type
|
||||
GSK_TYPE_SCALING_FILTER
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>GskRenderNode</FILE>
|
||||
gsk_render_node_ref
|
||||
gsk_render_node_unref
|
||||
gsk_render_node_get_parent
|
||||
gsk_render_node_get_first_child
|
||||
gsk_render_node_get_last_child
|
||||
gsk_render_node_get_next_sibling
|
||||
gsk_render_node_get_previous_sibling
|
||||
gsk_render_node_append_child
|
||||
gsk_render_node_prepend_child
|
||||
gsk_render_node_insert_child_at_pos
|
||||
gsk_render_node_insert_child_before
|
||||
gsk_render_node_insert_child_after
|
||||
gsk_render_node_remove_child
|
||||
gsk_render_node_replace_child
|
||||
gsk_render_node_remove_all_children
|
||||
gsk_render_node_get_n_children
|
||||
gsk_render_node_contains
|
||||
gsk_render_node_set_bounds
|
||||
gsk_render_node_set_transform
|
||||
gsk_render_node_set_anchor_point
|
||||
gsk_render_node_set_opacity
|
||||
gsk_render_node_set_hidden
|
||||
gsk_render_node_is_hidden
|
||||
gsk_render_node_set_opaque
|
||||
gsk_render_node_is_opaque
|
||||
gsk_render_node_get_draw_context
|
||||
GskBlendMode
|
||||
gsk_render_node_set_blend_mode
|
||||
GskScalingFilter
|
||||
gsk_render_node_set_scaling_filters
|
||||
gsk_render_node_get_scale_factor
|
||||
gsk_render_node_set_name
|
||||
gsk_value_set_render_node
|
||||
gsk_value_take_render_node
|
||||
gsk_value_get_render_node
|
||||
gsk_value_dup_render_node
|
||||
<SUBSECTION Standard>
|
||||
GSK_IS_RENDER_NODE
|
||||
GSK_RENDER_NODE
|
||||
GSK_TYPE_RENDER_NODE
|
||||
GSK_VALUE_HOLDS_RENDER_NODE
|
||||
GskRenderNode
|
||||
GskRenderNodeClass
|
||||
gsk_render_node_get_type
|
||||
GSK_TYPE_BLEND_MODE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>GskRenderNodeIter</FILE>
|
||||
gsk_render_node_iter_new
|
||||
gsk_render_node_iter_free
|
||||
gsk_render_node_iter_init
|
||||
gsk_render_node_iter_is_valid
|
||||
gsk_render_node_iter_prev
|
||||
gsk_render_node_iter_next
|
||||
gsk_render_node_iter_remove
|
||||
<SUBSECTION Standard>
|
||||
GSK_TYPE_RENDER_NODE_ITER
|
||||
GskRenderNodeIter
|
||||
gsk_render_node_iter_get_type
|
||||
</SECTION>
|
3
docs/reference/gsk/gsk3.types
Normal file
@@ -0,0 +1,3 @@
|
||||
gsk_render_node_get_type
|
||||
gsk_render_node_iter_get_type
|
||||
gsk_renderer_get_type
|
@@ -3,7 +3,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.6
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=gtk3
|
||||
DOC_MODULE=gtk4
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=gtk-docs.sgml
|
||||
@@ -157,7 +157,6 @@ IGNORE_HFILES = \
|
||||
gtksidebarrowprivate.h \
|
||||
gtksizegroup-private.h \
|
||||
gtksizerequestcacheprivate.h \
|
||||
gtksocketprivate.h \
|
||||
gtkstyleanimationprivate.h \
|
||||
gtkstylecascadeprivate.h \
|
||||
gtkstylecontextprivate.h \
|
||||
@@ -233,7 +232,6 @@ IGNORE_HFILES = \
|
||||
gtksearchenginesimple.h \
|
||||
gtksearchenginequartz.h \
|
||||
gtksequence.h \
|
||||
gtksocketprivate.h \
|
||||
gtktextbtree.h \
|
||||
gtktextbufferserialize.h \
|
||||
gtktextdisplay.h \
|
||||
@@ -248,9 +246,6 @@ IGNORE_HFILES = \
|
||||
gtktreedatalist.h \
|
||||
gtktreemenu.h \
|
||||
gtktypebuiltins.h \
|
||||
gtkxembed.h \
|
||||
gtkwin32embed.h \
|
||||
gtkwin32embedwidget.h \
|
||||
gtkwindow-decorate.h \
|
||||
xdgmime \
|
||||
xembed.h
|
||||
@@ -270,8 +265,8 @@ CPPFLAGS += \
|
||||
-UGTK_DISABLE_SINGLE_INCLUDES
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/gdk/libgdk-3.la \
|
||||
$(top_builddir)/gtk/libgtk-3.la \
|
||||
$(top_builddir)/gdk/libgdk-4.la \
|
||||
$(top_builddir)/gtk/libgtk-4.la \
|
||||
$(GTK_DEP_LIBS)
|
||||
|
||||
|
||||
@@ -291,14 +286,14 @@ content_files = \
|
||||
drawing-model.xml \
|
||||
getting_started.xml \
|
||||
glossary.xml \
|
||||
gtk3-demo-application.xml \
|
||||
gtk3-demo.xml \
|
||||
gtk3-icon-browser.xml \
|
||||
gtk3-widget-factory.xml \
|
||||
gtk4-demo-application.xml \
|
||||
gtk4-demo.xml \
|
||||
gtk4-icon-browser.xml \
|
||||
gtk4-widget-factory.xml \
|
||||
gtk-builder-tool.xml \
|
||||
gtk-encode-symbolic-svg.xml \
|
||||
gtk-launch.xml \
|
||||
gtk-query-immodules-3.0.xml \
|
||||
gtk-query-immodules-4.0.xml \
|
||||
gtk-query-settings.xml \
|
||||
gtk-update-icon-cache.xml \
|
||||
input-handling.xml \
|
||||
@@ -450,8 +445,6 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/focus.png \
|
||||
$(srcdir)/images/handles.png \
|
||||
$(srcdir)/images/extensions.png \
|
||||
$(srcdir)/images/numerableicon.png \
|
||||
$(srcdir)/images/numerableicon2.png \
|
||||
$(srcdir)/images/bloatpad-osx.png \
|
||||
$(srcdir)/images/bloatpad-gnome.png \
|
||||
$(srcdir)/images/bloatpad-xfce.png \
|
||||
@@ -498,19 +491,19 @@ endif
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in gtk3.types.in
|
||||
EXTRA_DIST += version.xml.in gtk4.types.in
|
||||
|
||||
########################################################################
|
||||
|
||||
man_MANS = \
|
||||
gtk-query-immodules-3.0.1 \
|
||||
gtk-query-immodules-4.0.1 \
|
||||
gtk-update-icon-cache.1 \
|
||||
gtk-encode-symbolic-svg.1 \
|
||||
gtk-launch.1 \
|
||||
gtk3-demo.1 \
|
||||
gtk3-demo-application.1 \
|
||||
gtk3-widget-factory.1 \
|
||||
gtk3-icon-browser.1 \
|
||||
gtk4-demo.1 \
|
||||
gtk4-demo-application.1 \
|
||||
gtk4-widget-factory.1 \
|
||||
gtk4-icon-browser.1 \
|
||||
broadwayd.1 \
|
||||
gtk-builder-tool.1 \
|
||||
gtk-query-settings.1
|
||||
|
@@ -29,10 +29,10 @@ The following interactive shell session demonstrates how
|
||||
<literal>pkg-config</literal> is used (the actual output on
|
||||
your system may be different):
|
||||
<programlisting>
|
||||
$ pkg-config --cflags gtk+-3.0
|
||||
-pthread -I/usr/include/gtk-3.0 -I/usr/lib64/gtk-3.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
|
||||
$ pkg-config --libs gtk+-3.0
|
||||
-pthread -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
|
||||
$ pkg-config --cflags gtk+-4.0
|
||||
-pthread -I/usr/include/gtk-4.0 -I/usr/lib64/gtk-4.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
|
||||
$ pkg-config --libs gtk+-4.0
|
||||
-pthread -lgtk-4 -lgdk-4 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
@@ -42,7 +42,7 @@ feature of the shell. If you enclose a command in backticks
|
||||
substituted into the command line before execution. So to compile
|
||||
a GTK+ Hello, World, you would type the following:
|
||||
<programlisting>
|
||||
$ cc `pkg-config --cflags gtk+-3.0` hello.c -o hello `pkg-config --libs gtk+-3.0`
|
||||
$ cc `pkg-config --cflags gtk+-4.0` hello.c -o hello `pkg-config --libs gtk+-4.0`
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -67,7 +67,7 @@ this range will trigger compiler warnings.
|
||||
Here is how you would compile hello.c if you want to allow it
|
||||
to use symbols that were not deprecated in 3.2:
|
||||
<programlisting>
|
||||
$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 hello.c -o hello `pkg-config --libs gtk+-3.0`
|
||||
$ cc `pkg-config --cflags gtk+-4.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 hello.c -o hello `pkg-config --libs gtk+-4.0`
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -75,7 +75,7 @@ $ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 he
|
||||
And here is how you would compile hello.c if you don't want
|
||||
it to use any symbols that were introduced after 3.4:
|
||||
<programlisting>
|
||||
$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 hello.c -o hello `pkg-config --libs gtk+-3.0`
|
||||
$ cc `pkg-config --cflags gtk+-4.0` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 hello.c -o hello `pkg-config --libs gtk+-4.0`
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -97,34 +97,5 @@ define the preprocessor symbol GDK_MULTIDEVICE_SAFE by using the command
|
||||
line option <literal>-DGTK_MULTIDEVICE_SAFE=1</literal>.
|
||||
</para>
|
||||
|
||||
<refsect2>
|
||||
<title>Useful autotools macros</title>
|
||||
|
||||
<para>
|
||||
GTK+ provides various macros for easily checking version and backends
|
||||
supported. The macros are
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>AM_PATH_GTK_3_0([minimum-version], [if-found], [if-not-found], [modules])</term>
|
||||
<listitem>This macro should be used to check that GTK+ is installed
|
||||
and available for compilation. The four arguments are optional, and
|
||||
they are: <emphasis>minimum-version</emphasis>, the minimum version
|
||||
of GTK+ required for compilation; <emphasis>if-found</emphasis>, the
|
||||
action to perform if a valid version of GTK+ has been found;
|
||||
<emphasis>if-not-found</emphasis>, the action to perform if a valid
|
||||
version of GTK+ has not been found; <emphasis>modules</emphasis>, a
|
||||
list of modules to be checked along with GTK+.</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GTK_CHECK_BACKEND([backend-name], [minimum-version], [if-found], [if-not-found])</term>
|
||||
<listitem>This macro should be used to check if a specific backend
|
||||
is supported by GTK+. The <emphasis>minimum-version</emphasis>,
|
||||
<emphasis>if-found</emphasis> and <emphasis>if-not-found</emphasis>
|
||||
arguments are optional.</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|