Compare commits
363 Commits
GTK_2_16_0
...
resolution
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
923bf3c625 | ||
|
|
d36604ae41 | ||
|
|
48d73e164e | ||
|
|
09f41f5000 | ||
|
|
b645bb9e02 | ||
|
|
350757e78c | ||
|
|
6810564f42 | ||
|
|
f02dedde6d | ||
|
|
f6890e3b35 | ||
|
|
23fa53f1bc | ||
|
|
de3cc27706 | ||
|
|
362127c33c | ||
|
|
b6fc50c855 | ||
|
|
6abc52a29d | ||
|
|
21594f5574 | ||
|
|
ed33a20b29 | ||
|
|
2b3de3dd75 | ||
|
|
bc42bca9dd | ||
|
|
0532056349 | ||
|
|
2901695dfd | ||
|
|
1fe7308dd1 | ||
|
|
b9a27c2636 | ||
|
|
1d4cba6876 | ||
|
|
69a0611391 | ||
|
|
bb362f754a | ||
|
|
c98ebe3165 | ||
|
|
2accf2fd21 | ||
|
|
67632a578b | ||
|
|
d87dbd66d6 | ||
|
|
3f20ccd710 | ||
|
|
a27e748586 | ||
|
|
de280cc5c8 | ||
|
|
b521039fc3 | ||
|
|
97dc802ec3 | ||
|
|
cf0ab196fe | ||
|
|
7b8d2096a2 | ||
|
|
766b97cf5a | ||
|
|
0135c33e48 | ||
|
|
8eed87383d | ||
|
|
a70f5ff12a | ||
|
|
20bc246960 | ||
|
|
a01a4df697 | ||
|
|
9ae398f60e | ||
|
|
a12a583c99 | ||
|
|
9a4122a130 | ||
|
|
c981ddf92f | ||
|
|
beb617c206 | ||
|
|
c7a0a513f5 | ||
|
|
4b16b875db | ||
|
|
dccfd423ca | ||
|
|
8da1c40d72 | ||
|
|
a85fac7145 | ||
|
|
4d7bbd058e | ||
|
|
5bf51be576 | ||
|
|
3302114358 | ||
|
|
961ab2e5c1 | ||
|
|
b1277f32de | ||
|
|
4bcf3e59d5 | ||
|
|
597a24edf6 | ||
|
|
d2cd949ca1 | ||
|
|
64b8f4e039 | ||
|
|
47db0f0020 | ||
|
|
5964109ef3 | ||
|
|
ac0ed81b6f | ||
|
|
44690f17c8 | ||
|
|
d2ac65c8ba | ||
|
|
7b49379b55 | ||
|
|
2a87eb83d1 | ||
|
|
8166a0e1af | ||
|
|
d1f921b5bc | ||
|
|
73a9c40b51 | ||
|
|
d0f887ddb1 | ||
|
|
48c8818fa2 | ||
|
|
96912b564f | ||
|
|
478cc88f8d | ||
|
|
1199b3f741 | ||
|
|
7437a79b85 | ||
|
|
e18a4fa047 | ||
|
|
bd84d95e63 | ||
|
|
e07d8adcca | ||
|
|
1eff9aba24 | ||
|
|
3969d1b969 | ||
|
|
bcf754ea1d | ||
|
|
a746df7d37 | ||
|
|
7fe8fb35b5 | ||
|
|
9b7fa7a904 | ||
|
|
122e0b40ba | ||
|
|
ffd12347be | ||
|
|
f64ef8ea51 | ||
|
|
fc2b45cb50 | ||
|
|
79c9a7ec5e | ||
|
|
94b63ec9b7 | ||
|
|
375d19aa92 | ||
|
|
5133d934f6 | ||
|
|
7ca16dad51 | ||
|
|
f253b6927c | ||
|
|
91190ce281 | ||
|
|
26c10075f9 | ||
|
|
67e0a44100 | ||
|
|
4134c346f9 | ||
|
|
e2bce0d630 | ||
|
|
c57fc80465 | ||
|
|
52325ccd66 | ||
|
|
5d8a4f78ab | ||
|
|
2e9385efe2 | ||
|
|
0fd185fa6d | ||
|
|
dc0dde995d | ||
|
|
ac9ea01ec9 | ||
|
|
ae94c371d1 | ||
|
|
2f60e18c70 | ||
|
|
563e8e8e1d | ||
|
|
9dbb30482b | ||
|
|
141ddd99f3 | ||
|
|
4fc49fd8db | ||
|
|
7cfda03395 | ||
|
|
038dfa53d0 | ||
|
|
e4d97d9652 | ||
|
|
b89a059967 | ||
|
|
fc72a20782 | ||
|
|
6748d421b6 | ||
|
|
87a46136b3 | ||
|
|
556fb4dd5f | ||
|
|
f2d4669ff8 | ||
|
|
9426ba2735 | ||
|
|
47c00c7ad4 | ||
|
|
339298b638 | ||
|
|
6fc6b8b4e8 | ||
|
|
ce4382e444 | ||
|
|
74f03f97b1 | ||
|
|
a398c840be | ||
|
|
e5702523ff | ||
|
|
cc4cf97d62 | ||
|
|
c0c10b993a | ||
|
|
ce517a4152 | ||
|
|
86e5df91c1 | ||
|
|
44c6b24fc7 | ||
|
|
4ea26a6864 | ||
|
|
4f4643207e | ||
|
|
b125eeae9d | ||
|
|
5d617ee80b | ||
|
|
6eb95098b1 | ||
|
|
850965101f | ||
|
|
7f6a534d0f | ||
|
|
00524901e1 | ||
|
|
3dc395ad4e | ||
|
|
d183f44748 | ||
|
|
6aa6338578 | ||
|
|
e4bbfd9a4b | ||
|
|
e6373738fc | ||
|
|
832be659b7 | ||
|
|
1fe0b8e906 | ||
|
|
5325959fe2 | ||
|
|
46bc2ec740 | ||
|
|
49e1700bb2 | ||
|
|
dc8f36e254 | ||
|
|
6e51533ec3 | ||
|
|
bc74cdb8ae | ||
|
|
01946b5120 | ||
|
|
06ff893683 | ||
|
|
60b62e6c88 | ||
|
|
098a5b0500 | ||
|
|
c92f56531c | ||
|
|
127e8d8a1b | ||
|
|
9816a939b7 | ||
|
|
1b5b4812b9 | ||
|
|
b20c7555fe | ||
|
|
637252af65 | ||
|
|
8076c8fbbf | ||
|
|
8f1a578ade | ||
|
|
5457956c79 | ||
|
|
33f4ead506 | ||
|
|
dae20e2561 | ||
|
|
812e129cd6 | ||
|
|
70d0129f48 | ||
|
|
33ff8e3488 | ||
|
|
b2a5e870df | ||
|
|
42efae2d47 | ||
|
|
6919f989f7 | ||
|
|
82e9821dd8 | ||
|
|
1113402c7b | ||
|
|
2d2a6d2bf4 | ||
|
|
6fb824a0b3 | ||
|
|
26ae475590 | ||
|
|
3b35e523fd | ||
|
|
6c6f1b3dcd | ||
|
|
30c5e6fe7a | ||
|
|
fda93a2977 | ||
|
|
151e5c58a8 | ||
|
|
32baa433b7 | ||
|
|
b00d7d6585 | ||
|
|
954890278f | ||
|
|
c07c77a489 | ||
|
|
85641efa08 | ||
|
|
c43a02ba55 | ||
|
|
2266d16148 | ||
|
|
b0b636ca85 | ||
|
|
09607127d4 | ||
|
|
f43a78a892 | ||
|
|
fa00f3e50a | ||
|
|
459b6a2e72 | ||
|
|
3f00129e17 | ||
|
|
5b4855d40e | ||
|
|
1632d64a51 | ||
|
|
aa6045b137 | ||
|
|
28a6068eb9 | ||
|
|
b33db85956 | ||
|
|
24b8f2dfec | ||
|
|
2c5ae21cdc | ||
|
|
6e121ee85e | ||
|
|
f1bb36c9d7 | ||
|
|
4059557491 | ||
|
|
45d076fcc2 | ||
|
|
0e99a5849e | ||
|
|
3c625fed07 | ||
|
|
39eb2c618e | ||
|
|
dcc506aa6e | ||
|
|
61af085938 | ||
|
|
11adc5a0d3 | ||
|
|
c28fabe3f6 | ||
|
|
a982cea9ce | ||
|
|
553523048a | ||
|
|
db1e138952 | ||
|
|
cf68d7f1d5 | ||
|
|
3c9e7c73bf | ||
|
|
ec0dd9f1ab | ||
|
|
09602ccff7 | ||
|
|
fbfea09f37 | ||
|
|
5d1a16b74e | ||
|
|
cedc4415b4 | ||
|
|
24fde41c85 | ||
|
|
7ecf03e84a | ||
|
|
dfbc1199d4 | ||
|
|
663bf3db0e | ||
|
|
2bac62984b | ||
|
|
647db71507 | ||
|
|
73fff08dfb | ||
|
|
ee3734e935 | ||
|
|
2bcaf6c2af | ||
|
|
82ba15b349 | ||
|
|
85f6ac2ab2 | ||
|
|
bf641cd461 | ||
|
|
419686f716 | ||
|
|
fd9ee5539f | ||
|
|
035be761f4 | ||
|
|
33857adc7d | ||
|
|
bfb8eed292 | ||
|
|
b07c6616f8 | ||
|
|
2c6db0bae2 | ||
|
|
db7d72c82f | ||
|
|
f07613bb12 | ||
|
|
7b2bda7c84 | ||
|
|
e5af8c67a1 | ||
|
|
d8da8dd4ff | ||
|
|
8066cc1555 | ||
|
|
fd513c3e1a | ||
|
|
67d8ed9ed3 | ||
|
|
d77156952d | ||
|
|
5261d14d6f | ||
|
|
f0b4779d56 | ||
|
|
1f1db4f288 | ||
|
|
af56f63561 | ||
|
|
24a9dadfe9 | ||
|
|
de64faabeb | ||
|
|
3f41896abe | ||
|
|
f702e212d8 | ||
|
|
fbbbf7a936 | ||
|
|
d2bea918b9 | ||
|
|
8bc711b43b | ||
|
|
543ac9298f | ||
|
|
84a9e65ca3 | ||
|
|
a15b14032e | ||
|
|
ea866c635b | ||
|
|
9eaa76e70d | ||
|
|
b037b39886 | ||
|
|
b9355968fc | ||
|
|
45ac4f2523 | ||
|
|
954552a4cf | ||
|
|
d89c9911f0 | ||
|
|
d79a25a0db | ||
|
|
7e6cd2b31c | ||
|
|
fbe7ba55ce | ||
|
|
4ecd6a0f89 | ||
|
|
3fb6fbd801 | ||
|
|
dec55c311b | ||
|
|
5e0bd0c9be | ||
|
|
87459ff86c | ||
|
|
bb093cf44c | ||
|
|
b5116d8eab | ||
|
|
45894c9fad | ||
|
|
eeb3223802 | ||
|
|
209af946f3 | ||
|
|
1a312bfa3e | ||
|
|
779deb2b9d | ||
|
|
1ad8bfb69a | ||
|
|
c338228a86 | ||
|
|
8ab5f5673b | ||
|
|
4774d9c1fd | ||
|
|
e7b496719e | ||
|
|
de0c9503ba | ||
|
|
b25cfb78fc | ||
|
|
923b126f1c | ||
|
|
5ef4c2b9bd | ||
|
|
0dd7155f79 | ||
|
|
a33934f5d7 | ||
|
|
eb982b2f3e | ||
|
|
3b437b016c | ||
|
|
94129a4e2b | ||
|
|
d21f55fe9a | ||
|
|
4d520f241d | ||
|
|
de60fd8cfd | ||
|
|
e5110c50b6 | ||
|
|
d7f5c0de0e | ||
|
|
d8ea13216c | ||
|
|
b6cba0b542 | ||
|
|
7cfac711e2 | ||
|
|
7dfb01937d | ||
|
|
e0045d59c7 | ||
|
|
cd96bd0209 | ||
|
|
6b41d44670 | ||
|
|
b2d263cd99 | ||
|
|
b48e4b070f | ||
|
|
4bf41bbf53 | ||
|
|
584bd9cbc6 | ||
|
|
576ef4d6ea | ||
|
|
6a14ed9b64 | ||
|
|
0b0b56833f | ||
|
|
b414832f25 | ||
|
|
c3879d400c | ||
|
|
25deb501ad | ||
|
|
f339176285 | ||
|
|
f48419708f | ||
|
|
73625e3f87 | ||
|
|
c7049ff5a0 | ||
|
|
d0314558e6 | ||
|
|
f3bcc940a6 | ||
|
|
e944e67130 | ||
|
|
5af3180212 | ||
|
|
6da2eb3805 | ||
|
|
0e5777ad61 | ||
|
|
3ea3fe9f40 | ||
|
|
f096b32283 | ||
|
|
5fcd7c66ae | ||
|
|
7a8ade9c32 | ||
|
|
91afe20d7a | ||
|
|
42ae70adb6 | ||
|
|
4bc09e5dae | ||
|
|
7ef7ff7a5f | ||
|
|
a486e1c54a | ||
|
|
5bd99d1ac1 | ||
|
|
f2e6ff9ee2 | ||
|
|
2bb143a369 | ||
|
|
fad2a3a005 | ||
|
|
9fc0c78c8a | ||
|
|
4215486cc5 | ||
|
|
4ea77c86f4 | ||
|
|
3ece05f028 | ||
|
|
f346c82673 | ||
|
|
89437c9f5f | ||
|
|
7c8847a8d8 | ||
|
|
360ad81b58 | ||
|
|
0405f73722 | ||
|
|
5a7d00bcc7 | ||
|
|
6a3f590d9f |
@@ -1,3 +1,119 @@
|
||||
=== ChangeLog discontinued ===
|
||||
|
||||
With the move to git, GTK+ is switching from a ChangeLog file
|
||||
to relying on commit messages to provide change history. Please
|
||||
see README.commits for guidance on the expected message format.
|
||||
|
||||
2009-03-29 Christian Persch <chpe@gnome.org>
|
||||
|
||||
Bug 577224 – crash when setting new icon after setting icon in
|
||||
gtkstatusicon
|
||||
|
||||
* gtk/gtkstatusicon.c: (gtk_status_icon_reset_image_data),
|
||||
(gtk_status_icon_set_from_gicon): Retain a reference when setting
|
||||
from a GIcon, and use g_object_unref on GIcon, not g_free.
|
||||
|
||||
2009-03-27 Behdad Esfahbod <behdad@gnome.org>
|
||||
|
||||
Bug 437533 – Implement draw_shape PangoRenderer method
|
||||
|
||||
* gdk/gdkpango.c (gdk_pango_renderer_draw_shape),
|
||||
(gdk_pango_renderer_class_init): Implement draw_shape
|
||||
|
||||
* demos/gtk-demo/rotated_text.c (fancy_shape_renderer),
|
||||
(create_fancy_attr_list_for_layout), (rotated_text_expose_event),
|
||||
(do_rotated_text):
|
||||
1) Port to pangocairo
|
||||
2) Also show a rotated label
|
||||
3) Install a custom shape renderer on both. The second one goes
|
||||
through gdkpango and hence tests the patch above. It's working.
|
||||
|
||||
2009-03-26 Stef Walter <stef@memberwebs.com>
|
||||
|
||||
* gtk/gtkfilechooserentry.c
|
||||
(char_after_cursor_is_directory_separator)
|
||||
(gtk_file_chooser_entry_do_insert_text)
|
||||
(gtk_file_chooser_entry_focus)
|
||||
(commit_completion_and_refresh)
|
||||
(refresh_current_folder_and_file_part) (autocomplete):
|
||||
* gtk/gtkspinbutton.c (gtk_spin_button_insert_text):
|
||||
* modules/other/gail/gailentry.c (gail_entry_real_initialize)
|
||||
(text_setup) (gail_entry_get_run_attributes)
|
||||
(gail_entry_get_character_extents)
|
||||
(gail_entry_get_offset_at_point): Use gtk_entry_xxx functions
|
||||
rather than using GtkEntry structure directly.
|
||||
See bug #576801
|
||||
|
||||
2009-03-25 Christian Dywan <christian@twotoasts.de>
|
||||
|
||||
* gtk/gtkselection.c: Typo correction, s/hilding/holding
|
||||
|
||||
2009-03-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* gdk/directfb/gdkwindow-directfb.c
|
||||
(gdk_window_directfb_process_all_updates): compile fix for build
|
||||
with DIRECT_ENABLE_DEBUG.
|
||||
|
||||
2009-03-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 576306 – gdkscreen.c: get_nearest_monitor too simple, gives wrong
|
||||
result, mispositioning tooltips
|
||||
|
||||
* gdk/gdkscreen.c (get_nearest_monitor): Make this function work.
|
||||
Problem reported by Dave Gilbert.
|
||||
|
||||
2009-03-23 Hiroyuki Ikezoe <poincare@ikezoe.net>
|
||||
|
||||
Bug 576254 - <object> requires attribute "id"
|
||||
|
||||
* docs/reference/gtk/tmpl/gtkdialog.sgml: Add id attribute to
|
||||
GtkBuilder UI sample.
|
||||
|
||||
2009-03-21 Cody Russell <bratsche@gnome.org>
|
||||
|
||||
Bug 538840 – [Win32] GTK menu theming could be improved
|
||||
|
||||
* modules/engines/ms-windows/xp_theme.c
|
||||
* modules/engines/ms-windows/msw_style.c: Use newer
|
||||
menu styling API. This makes gtk+ look much better on
|
||||
Windows Vista.
|
||||
|
||||
2009-03-19 Claudio Saavedra <csaavedra@igalia.com>
|
||||
|
||||
Bug 574283 – unused assignment and dead code in
|
||||
gtk_widget_set_tooltip_window()
|
||||
|
||||
* gtk/gtkwidget.c: (gtk_widget_set_tooltip_window): Remove
|
||||
an unused assignment and clean up, improving checks.
|
||||
|
||||
2009-03-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* gtk/gtkscalebutton.c: add static function
|
||||
gtk_scale_button_set_orientation_private() and use it instead of
|
||||
the public but deprecated gtk_scale_button_set_orientation().
|
||||
|
||||
2009-03-17 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Bug 575700 - Crash when moving a GtkWindow
|
||||
|
||||
* gdk/win32/gdkevents-win32.c (gdk_event_translate): Fix
|
||||
embarrassing crasher bug introduced on 2009-03-11. A variable was
|
||||
assigned a value only inside a GDK_NOTE but still used outside
|
||||
that.
|
||||
|
||||
2009-03-17 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkprintoperation-win32.c: Newer mingw-w64 uses an
|
||||
underscore-prefixed identification macro.
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* README.in: Late release notes for 2.16
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.16.0 ===
|
||||
41
HACKING
41
HACKING
@@ -15,45 +15,50 @@ can be found here:
|
||||
|
||||
http://developer.gnome.org
|
||||
|
||||
including information about using Subversion with GNOME:
|
||||
Information about using git with GNOME can be found here:
|
||||
|
||||
http://developer.gnome.org/tools/svn.html
|
||||
http://live.gnome.org/Git
|
||||
|
||||
In order to get SVN gtk+ installed on your system, you need to have
|
||||
the most recent SVN versions of glib, pango, and atk installed as well.
|
||||
In order to get GIT gtk+ installed on your system, you need to have
|
||||
the most recent GIT versions of glib, pango, and atk installed as well.
|
||||
The installation process of these libraries is similar to that of gtk+, but
|
||||
needs to be fulfilled prior to installation of gtk+.
|
||||
|
||||
If at all possible, please use SVN to get the latest development version of
|
||||
gtk+ and glib. You can do the following to get glib and gtk+ from SVN:
|
||||
If at all possible, please use GIT to get the latest development version of
|
||||
gtk+ and glib. You can do the following to get glib and gtk+ from GIT:
|
||||
|
||||
$ svn checkout http://svn.gnome.org/svn/glib/trunk glib
|
||||
$ svn checkout http://svn.gnome.org/svn/pango/trunk pango
|
||||
$ svn checkout http://svn.gnome.org/svn/atk/trunk atk
|
||||
$ svn checkout http://svn.gnome.org/svn/gtk+/trunk gtk+
|
||||
$ git clone git://git.gnome.org/glib
|
||||
$ git clone git://git.gnome.org/pango
|
||||
$ git clone git://git.gnome.org/atk
|
||||
$ git clone git://git.gnome.org/gtk+
|
||||
|
||||
To compile the SVN version of gtk+ on your system, you will need to take
|
||||
Note: if you plan to push changes to back to the master repository and
|
||||
have a gnome account, you want to use the following instead:
|
||||
|
||||
$ git clone ssh://<username>@git.gnome.org/git/gtk+
|
||||
|
||||
To compile the GIT version of gtk+ on your system, you will need to take
|
||||
several steps to setup the tree for compilation. You can do all these
|
||||
steps at once by running:
|
||||
|
||||
gtk+$ ./autogen.sh
|
||||
|
||||
|
||||
Basically this does the following for you:
|
||||
|
||||
gtk+$ aclocal; automake; autoconf
|
||||
|
||||
The above commands create the `configure' script. Now you
|
||||
run the `configure' script in `gtk+/' to create all Makefiles.
|
||||
run the `configure' script in `gtk+/' to create all Makefiles.
|
||||
More information about that in `INSTALL'.
|
||||
|
||||
Before running `autogen.sh' or `configure', make sure you have libtool
|
||||
in your path.
|
||||
Before running `autogen.sh' or `configure', make sure you have libtool
|
||||
in your path.
|
||||
|
||||
Note that autogen.sh runs configure for you. If you wish to pass
|
||||
options like `--prefix=/usr' to `configure' you can give those options
|
||||
to `autogen.sh' and they will be passed on to `configure'.
|
||||
|
||||
For information about submitting patches and committing changes
|
||||
to SVN, see the `README' and `README.commits' files. In particular,
|
||||
don't, under any circumstances, commit anything to SVN before
|
||||
For information about submitting patches and pushing changes
|
||||
to GIT, see the `README' and `README.commits' files. In particular,
|
||||
don't, under any circumstances, push anything to GIT before
|
||||
reading and understanding `README.commmits'.
|
||||
|
||||
41
INSTALL
41
INSTALL
@@ -1,41 +0,0 @@
|
||||
Prerequisites
|
||||
=============
|
||||
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, ATK and cairo libraries, available at the same
|
||||
location as GTK+. GTK+ 2.16.0 requires at least GLib 2.17.6,
|
||||
Pango 1.20, ATK 1.13.0 and cairo 1.6.0.
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
likely have these installed on your system already. If not
|
||||
these libraries are available from:
|
||||
|
||||
http://www.libtiff.org/
|
||||
http://www.libpng.org/
|
||||
http://www.ijg.org/
|
||||
|
||||
libtiff must be version 3.6.0 or higher.
|
||||
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.16.0.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.16.0 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK+
|
||||
[ Become root if necessary ]
|
||||
% make install # install GTK+
|
||||
|
||||
The Details
|
||||
===========
|
||||
|
||||
Complete information about installing GTK+ and related libraries can be found
|
||||
in the file:
|
||||
|
||||
docs/reference/gtk/html/gtk-building.html
|
||||
|
||||
Or online at:
|
||||
|
||||
http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html
|
||||
|
||||
56
Makefile.am
56
Makefile.am
@@ -19,6 +19,9 @@ EXTRA_DIST += \
|
||||
ChangeLog.pre-2-6 \
|
||||
ChangeLog.pre-2-8 \
|
||||
ChangeLog.pre-2-10 \
|
||||
ChangeLog.pre-2-12 \
|
||||
ChangeLog.pre-2-14 \
|
||||
ChangeLog.pre-2-16 \
|
||||
ChangeLog.gtk-async-file-chooser \
|
||||
ChangeLog.gtk-printing \
|
||||
README.commits \
|
||||
@@ -115,6 +118,26 @@ EXTRA_DIST += \
|
||||
examples/spinbutton/spinbutton.c \
|
||||
examples/spinbutton/Makefile \
|
||||
examples/find-examples.sh
|
||||
MAINTAINERCLEANFILES = \
|
||||
$(srcdir)/INSTALL \
|
||||
$(srcdir)/README \
|
||||
$(srcdir)/aclocal.m4 \
|
||||
$(srcdir)/autoscan.log \
|
||||
$(srcdir)/compile \
|
||||
$(srcdir)/config.guess \
|
||||
$(srcdir)/config.h.in \
|
||||
$(srcdir)/config.sub \
|
||||
$(srcdir)/configure.scan \
|
||||
$(srcdir)/depcomp \
|
||||
$(srcdir)/install-sh \
|
||||
$(srcdir)/ltmain.sh \
|
||||
$(srcdir)/missing \
|
||||
$(srcdir)/mkinstalldirs \
|
||||
$(srcdir)/omf.make \
|
||||
$(srcdir)/xmldocs.make \
|
||||
$(srcdir)/gtk-doc.make \
|
||||
$(srcdir)/ChangeLog \
|
||||
`find "$(srcdir)" -type f -name Makefile.in -print`
|
||||
|
||||
GDKTARGET=@gdktarget@
|
||||
|
||||
@@ -152,6 +175,25 @@ DISTCLEANFILES = \
|
||||
gail-uninstalled.pc \
|
||||
config.lt
|
||||
|
||||
distclean-local:
|
||||
if test "$(srcdir)" = "."; then :; else \
|
||||
rm -f ChangeLog; \
|
||||
fi
|
||||
|
||||
ChangeLog:
|
||||
@echo Creating $@
|
||||
@if test -d "$(srcdir)/.git"; then \
|
||||
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log GTK_2_16_0^^.. --stat) | fmt --split-only > $@.tmp \
|
||||
&& mv -f $@.tmp $@ \
|
||||
|| ($(RM) $@.tmp; \
|
||||
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
|
||||
(test -f $@ || echo git-log is required to generate this file >> $@)); \
|
||||
else \
|
||||
test -f $@ || \
|
||||
(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
|
||||
echo A git checkout and git-log is required to generate this file >> $@); \
|
||||
fi
|
||||
|
||||
## copy the default target for this platform to gdk-2.0.pc and gtk+-2.0.pc
|
||||
DEFAULT_GDKTARGET=x11
|
||||
install-data-hook:
|
||||
@@ -176,7 +218,7 @@ dist-hook:
|
||||
&& cp INSTALL README $(distdir) ; \
|
||||
fi
|
||||
|
||||
.PHONY: files release sanity snapshot
|
||||
.PHONY: files release sanity snapshot ChangeLog
|
||||
|
||||
files:
|
||||
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
|
||||
@@ -201,3 +243,15 @@ snapshot:
|
||||
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds
|
||||
|
||||
GITIGNOREFILES = \
|
||||
po-properties/Makefile.in.in \
|
||||
po-properties/Makefile.in \
|
||||
po-properties/Makefile \
|
||||
po-properties/*.gmo \
|
||||
po-properties/*.mo \
|
||||
po-properties/POTFILES \
|
||||
po-properties/stamp-it \
|
||||
po-properties/.intltool-merge-cache
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
239
NEWS
239
NEWS
@@ -1,3 +1,242 @@
|
||||
Overview of Changes from GTK+ 2.17.1 to 2.17.2
|
||||
==============================================
|
||||
|
||||
* GtkInfoBar: A new widget to show a transient 'message area'
|
||||
inside a content pane. The API is similar to GtkDialog and
|
||||
supports theming for different message types (warnings,
|
||||
errors, etc)
|
||||
|
||||
* GtkFileChooser:
|
||||
- Improve path bar by ellipsizing long names and preventing
|
||||
vertical size changes
|
||||
- Backup files are now hidden by default
|
||||
- GTK+ remembers the file chooser sorting state now
|
||||
|
||||
* GtkButtonBox: Implements the GtkOrientable interface now.
|
||||
|
||||
* Printing:
|
||||
- GTK+ supports printing an application-defined 'selection' now,
|
||||
in addition to usual page ranges.
|
||||
|
||||
* Changes that are relevant for theme authors:
|
||||
- The new GtkInfoBar widget uses symbolic colors for theming
|
||||
its background color depending on the message type. By default,
|
||||
it uses the same background color as tooltips. This can be turned
|
||||
off with style property.
|
||||
- The GTK+ file chooser (as well as nautilus and other users of GIO
|
||||
icon information) can now show different icons for xdg user dirs.
|
||||
The icon names are folder-documents, folder-download, folder-music,
|
||||
folder-pictures, folder-publicshare, folder-templates, folder-videos,
|
||||
with an automatic fallback to the standard folder icon.
|
||||
|
||||
* Bugs fixed:
|
||||
584021 titchy leak
|
||||
579590 gtk_entry_set_icon_from_stock should warn when invalid st...
|
||||
584125 GtkAssistant asserts if last page is GTK_ASSISTANT_PAGE_C...
|
||||
171416 Resume editing if name of new folder is "Type name of new...
|
||||
420335 Page assignment when printing 4 pages to a sheet
|
||||
161670 Bad behaviour from gtk_file_chooser_set_filename
|
||||
327152 Long names in the FileChooserDialog directory buttons sho...
|
||||
355851 File Dialog shows Backup Files
|
||||
390312 Gtk grabs keyboard on DND
|
||||
486839 Filechooser 'Places' items should not move up and down th...
|
||||
562335 Deprecate gtk_tree_view_column_get_cell_renderers and gtk...
|
||||
565317 Resulting image of GtkCellRendererPixbuf depends on order...
|
||||
565998 configure script doesn't check for cairo-xlib.pc
|
||||
580079 Better configure detection of Xinerama on Solaris
|
||||
580511 gdk_x11_atom_to_xatom_for_display translates GDK_NONE as ...
|
||||
580560 Backspace key does not go to the parent directory
|
||||
584598 GtkButtonBox silently ignores gtk_orientable_set_orientation
|
||||
584637 Missing conditionals for X11 shape extension in GdkWindow
|
||||
584805 GtkEntryCompletion selection reset when calling gtk_entry...
|
||||
584832 Duplicate the exec string returned by gtk_recent_info_get...
|
||||
585024 some gtksettings properties need extra initialisation
|
||||
585371 Add additional sizes to the font selector
|
||||
585791 use g_*gettext instead of *gettext directly
|
||||
562579 [Patch] Remove error dialog when directory does not exist
|
||||
344519 custom print ranges
|
||||
484922 Should remember the sort state of columns
|
||||
555344 consider adding a message area widget
|
||||
|
||||
* Updated translations:
|
||||
Danish
|
||||
Brazilian Portuguese
|
||||
Estonian
|
||||
Oriya
|
||||
Bengali India
|
||||
Norwegian bokmål
|
||||
Hindi
|
||||
Spanish
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.17.0 to 2.17.1
|
||||
==============================================
|
||||
|
||||
* GtkLabel:
|
||||
- GtkLabel can show embedded URLs, much like SexyUrlLabel
|
||||
|
||||
* Printing:
|
||||
- GTK+ includes a print backend that works with the PAPI
|
||||
printing service.
|
||||
- The file and lpr backends can print multiple pages per sheet.
|
||||
|
||||
* Changes that are relevant for theme authors:
|
||||
- The URL support in GtkLabel uses the link-color / visited-link-color
|
||||
style properties
|
||||
|
||||
* Bugs fixed:
|
||||
576091 GtkTooltip destroy the custom widget
|
||||
315462 GtkButton doesn't center its child when the child is too ...
|
||||
390331 "Pages per sheet" does not work for LPR printing
|
||||
531490 gdk_window_set_events (0) will _ADD_ events to the root w...
|
||||
574386 Remove deprecated call to gtk_status_icon_set_tooltip in ...
|
||||
576678 cups printbackend doesn't list printers on NetBSD
|
||||
579366 gtkbuilderparser leaks RequiresInfo objects.
|
||||
579884 casting problem in gmodule
|
||||
580511 gdk_x11_atom_to_xatom_for_display translates GDK_NONE as ...
|
||||
581876 Remove deprecated call to gtk_action_connect_proxy in tes...
|
||||
581878 Remove deprecated call to gtk_scale_button_get_orientatio...
|
||||
582003 Calling gdk_window_get_events() changes the event mask, b...
|
||||
582488 GtkNotebook behaves poorly when allocated less than reque...
|
||||
582950 Use number of pages to print when showing printing progress
|
||||
582963 Crash when printing from a thread
|
||||
583050 unclear disposition of function gtk_combo_box_get_active...
|
||||
583522 Trivial error in GtkBuilder migration documentation
|
||||
535557 gdk_window_set_icon_name should accept NULL to unset
|
||||
549859 "file" printer doesn't support n-up
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
British English
|
||||
Catalan
|
||||
Czech
|
||||
Danish
|
||||
Estonian
|
||||
French
|
||||
German
|
||||
Greek
|
||||
Hungarian
|
||||
Irish
|
||||
Italian
|
||||
Kannada
|
||||
Portuguese
|
||||
Russian
|
||||
Slovenian
|
||||
Spanish
|
||||
Ukrainian
|
||||
Simplified Chinese
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.16.x to 2.17.0
|
||||
==============================================
|
||||
|
||||
* GtkBuilder:
|
||||
- Scale marks can now be specified in builder markup
|
||||
- GtkAssistant action widgets can be added in builder markup
|
||||
|
||||
* Changes that are relevant for theme authors
|
||||
- GtkEntry now has a ::invisible-char style property that allows
|
||||
themes to set the preferred invisible character
|
||||
|
||||
* Printing:
|
||||
- GTK+ supports authentication of users against CUPS servers now.
|
||||
|
||||
* Bugs fixed:
|
||||
578634 gtkdial example fails to compile
|
||||
580678 Minor improvement to GTK+ mediaLib code
|
||||
580511 gdk_x11_atom_to_xatom_for_display translates GDK_NONE...
|
||||
581110 Handlebox widget uses static variables, crashes in multi...
|
||||
553385 gtk-builder-convert creates untranslated combobox models
|
||||
580814 GtkTextLayout incorrectly assumes pango iterates in logi...
|
||||
579366 gtkbuilderparser leaks RequiresInfo objects
|
||||
579741 gailcombox should emit property-changed:accessible-name...
|
||||
574386 Remove deprecated call to gtk_status_icon_set_tooltip...
|
||||
384940 handle rejecting jobs and authentication meaningfully
|
||||
|
||||
* Updated translations
|
||||
Arabic
|
||||
Brazilian Portuguese
|
||||
British English
|
||||
Catalan
|
||||
Czech
|
||||
Estonian
|
||||
Italian
|
||||
Kannada
|
||||
Oriya
|
||||
Simplified Chinese
|
||||
Slovenian
|
||||
Spanish
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.16.0 to 2.16.1
|
||||
==============================================
|
||||
|
||||
* GtkBuilder:
|
||||
- Accessible action names can now be marked as translatable.
|
||||
- gtk-builder-convert correctly handles response ids in all dialogs.
|
||||
- gtk-builder-convert warns about duplicate ids.
|
||||
|
||||
* GDK:
|
||||
- GDK no longer refuses to work on 30-bit visuals
|
||||
|
||||
* Win32:
|
||||
- The appearance of GTK+ menus on Vista has been improved.
|
||||
|
||||
* Bugs fixed:
|
||||
575700 Crash when moving a GtkWindow
|
||||
574283 unused assignment and dead code in gtk_widget_set_tooltip_window
|
||||
538840 [Win32] GTK menu theming could be improved
|
||||
576254 <object> requires attribute "id"
|
||||
576306 gdkscreen.c: get_nearest_monitor too simple...
|
||||
437533 Implement draw_shape PangoRenderer method
|
||||
577224 crash when setting new icon after setting icon...
|
||||
576150 Doc bug for GtkMenuPositionFunc
|
||||
562863 GtkVscrollbar is hardly documented
|
||||
575644 Cygwin gail build patch
|
||||
571374 Add 30-bit visuals to the list of supported depths
|
||||
577650 gtkitemfactory.h fails to compile
|
||||
578094 ProcessIdToSessionId needs to be declared as WINAPI
|
||||
518642 Custom tags and translatable content
|
||||
532858 segv setting GBoxed subclass <property>
|
||||
557629 Response ID not converted for GtkFileChooserDialog
|
||||
577789 about dialogue doesn't linkify licence text
|
||||
577824 empathy_chat_window_init: GClosure is leaked
|
||||
577964 Page Range entry is not accessible
|
||||
578221 Assertion warning `GTK_IS_TEXT_LAYOUT (layout)' failed
|
||||
578271 PageSetup should be sent to the previewer
|
||||
578276 gtk-builder-convert improperly converts GtkComboBox
|
||||
578290 two memory leaks
|
||||
578354 Memory leak in gdkscreen-x11
|
||||
578365 GtkMountOperation does not allow passwordless mount of sf...
|
||||
578366 file descriptor leak
|
||||
573922 Using NET_WM_USER_TIME even if startup notification times...
|
||||
561345 Title of Print Preview window should not be previewXXXXXX...
|
||||
577868 about dialogue changes appearance on style-set (change th...
|
||||
572797 GtkCellRendererAccel display string i18n in OTHER mode
|
||||
|
||||
* Updated translations:
|
||||
Arabic
|
||||
Assamese
|
||||
Basque
|
||||
Bulgarian
|
||||
Crimean Tatar
|
||||
Danish
|
||||
Galician
|
||||
German
|
||||
Greek
|
||||
Gujarati
|
||||
Japanese
|
||||
Kannada
|
||||
Malayalam
|
||||
Marathi
|
||||
Oriya
|
||||
Pashto
|
||||
Russian
|
||||
Spanish
|
||||
Telugu
|
||||
Turkish
|
||||
|
||||
Overview of Changes from GTK+ 2.15.5 to 2.16.0
|
||||
==============================================
|
||||
|
||||
|
||||
401
README
401
README
@@ -1,401 +0,0 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.16.0. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
GTK+ is free software and part of the GNU Project. However, the
|
||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
||||
developers, including those developing proprietary software, without any
|
||||
license fees or royalties.
|
||||
|
||||
The official ftp site is:
|
||||
ftp://ftp.gtk.org/pub/gtk
|
||||
|
||||
The official web site is:
|
||||
http://www.gtk.org/
|
||||
|
||||
Information about mailing lists can be found at
|
||||
http://www.gtk.org/mailinglists.html
|
||||
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
See the file 'INSTALL'
|
||||
|
||||
|
||||
Release notes for 2.14
|
||||
======================
|
||||
|
||||
* gtkitemfactory.h is now completely deprecated.
|
||||
As gtkactiongroup.h and gtkstock.h no longer include the gtkitemfactory.h
|
||||
header, this might break application using gtk_item_factory_* symbols
|
||||
without including gtkitemfactory.h - even though this behaviour has never
|
||||
been supported in the first place.
|
||||
|
||||
* The GtkFileSystem semi-private interface has been removed.
|
||||
The GTK+ filechooser implementation now uses GIO directly, which has
|
||||
rendered external filesystem implementations unnecessary. Consequently,
|
||||
the GtkFileSystem interface is no longer available, nor the filechooser
|
||||
will load any GtkFileSystem implementation.
|
||||
|
||||
* GtkComboBox now renders the popdown button insensitive when
|
||||
the model is empty. Applications which want to populate the list
|
||||
only before displaying it can set gtk_combo_box_set_button_sensitivity
|
||||
to GTK_SENSITIVITY_ON, so that the button is always sensitive or
|
||||
GTK_SENSITIVITY_OFF to make it insensitive respectively.
|
||||
|
||||
* GtkAdjustment now enforces that values are restricted to the
|
||||
range [lower, upper - page_size]. This has always been the documented
|
||||
behaviour, and the recommended practice is to set page_size to 0
|
||||
when using adjustments for simple scalar values, like in a slider
|
||||
or spin button.
|
||||
|
||||
* gdk-pixbuf will use GIO for mime type detection if possible. For
|
||||
this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
|
||||
set accordingly at configure time. Otherwise, gdk-pixbuf falls
|
||||
back to its built-in sniffing implementation.
|
||||
|
||||
Release notes for 2.12
|
||||
======================
|
||||
|
||||
* gtk_about_dialog_get/set_name() were deprecated in favour of
|
||||
gtk_about_dialog_get/set_program_name(), the GtkAboutDialog now uses the
|
||||
"program-name" property instead of the conflicting "name" property.
|
||||
|
||||
* The gdk-pixbuf tiff loader now requires libtiff 3.6.0 or later.
|
||||
|
||||
* Support for Windows 9x/ME has officially been removed. It hasn't worked
|
||||
since 2.6 anyway.
|
||||
|
||||
* The GtkTextBufferTargetInfo enumeration values have been changed from
|
||||
G_MAXUINT-0, G_MAXUINT-1, G_MAXUINT-2, etc, to -1, -2, -3 to stay within
|
||||
ANSI C limits.
|
||||
|
||||
* A change in the handling of _NET_WM_USER_TIME properties on toplevel
|
||||
windows can cause deadlock problems with window managers that are using
|
||||
GDK for drawing decorations. In particular, metacity <= 2.18.0 is affected
|
||||
by this. The problem has been fixed in metacity 2.18.1.
|
||||
|
||||
* Semi-private GtkTextLayout api has changed: new GtkTextLayout method
|
||||
invalidate_cursors(), and new functions gtk_text_layout_invalidate_cursors()
|
||||
and gtk_text_layout_cursors_changed(), which should be used in place of
|
||||
gtk_text_layout_invalidate() and gtk_text_layout_changed() if invalidation
|
||||
is due to marks moved or changed selection; new GtkTextLineDisplay structure
|
||||
member. Source compatibility is preserved; binary compatibility may break
|
||||
only if GtkTextLineDisplay structure was created on stack or as a part
|
||||
of another structure (in particular GnomeCanvas and its clones do not need
|
||||
recompiling).
|
||||
|
||||
* Another new signal has been added to GtkNotebook. The new signal
|
||||
is called create-window, so this name can no longer be used for signals
|
||||
in objects derived from GtkNotebook.
|
||||
|
||||
* The gtk_notebook_set/get_group_id() functions were found to be insufficient
|
||||
and have been deprecated in favour of gtk_notebook_set/get_group().
|
||||
|
||||
* The move-focus signal has been moved to GtkWidget, to unify the
|
||||
various implementations of this signal in specific widgets. Great care
|
||||
has been taken to make sure that all code using this signal continues
|
||||
to work.
|
||||
|
||||
* An unused and hardly visible GtkFrame has been removed from the menu
|
||||
widget hierarchy when GtkComboBox::appears-as-list style property is
|
||||
set. Any RC file applying a different style to any widget below the
|
||||
widget path "gtk-combobox-popup-window.GtkFrame" should take into
|
||||
account that the frame no longer exists.
|
||||
|
||||
* The external print preview application used by GtkPrintOperationPreview
|
||||
is now passed the print settings on the command line with the
|
||||
--print-settings parameter pointing to a temp file containing the
|
||||
settings. The preview application assumes ownership of the file and
|
||||
should delete it once it does not need it anymore. The --print-settings
|
||||
commandline option is understood by Evince 0.9.0 and newer. To use a
|
||||
different print preview application, change the gtk-print-preview-command
|
||||
setting in your gtkrc file, e.g. gtk-print-preview-command = "ggv %f"
|
||||
|
||||
* GtkMenuShell is now defined as an abstract type. It was already
|
||||
documented as an abstract class, and there is little reason to
|
||||
instantiate it.
|
||||
|
||||
* The GtkTooltips struct (this is the old tooltips API) is now considered
|
||||
private. Code that used to access this struct, in particular the
|
||||
tips_data_list field, will need to change. All of the old tooltips
|
||||
API has been deprecated in favour of a new implementation and
|
||||
API. This affects all of the gtk_tooltips_ functions, and functions
|
||||
which take a GtkTooltips argument, such as gtk_tool_item_set_tooltip()
|
||||
and gtk_menu_tool_button_set_arrow_tooltip().
|
||||
|
||||
* The memory management of the GtkRecentManager object has been changed,
|
||||
as using the screen didn't guarantee that the singleton instance was
|
||||
correctly destroyed. The screen-related functions have been deprecated,
|
||||
and should not be used anymore; the GtkRecentManager instance returned by
|
||||
the gtk_recent_manager_get_default() function is guaranteed to be valid
|
||||
for the entire lifetime of an application.
|
||||
|
||||
* A number of interfaces that have been superseded by newer interfaces for
|
||||
a long time have finally been deprecated. This includes
|
||||
gtk_widget_ref/unref(), gtk_rc_style_ref/unref() and the old file selector.
|
||||
|
||||
* The various coordinate systems in use in GtkTreeView widgets have
|
||||
been clarified in the documentation, and in the cause of doing so,
|
||||
the functions gtk_tree_view_widget_to_tree_coords() and
|
||||
gtk_tree_view_tree_to_widget_coords() have been deprecated in
|
||||
favour of a new family of gtk_tree_view_convert_ functions.
|
||||
|
||||
* gtk_menu_item_remove_submenu() has been deprecated in favour of
|
||||
gtk_menu_item_set_submenu (..., NULL).
|
||||
|
||||
* gtk_default_draw_check() has been fixed to really decrease the
|
||||
indicator size by one pixel to ensure an odd size instead of
|
||||
accidentially increasing it.
|
||||
Consequently, gtk_cell_renderer_toggle_render() could be fixed to
|
||||
not subtract 1 from the size passed to gtk_paint_option(), which
|
||||
was just a workaround for above off-by-two for even sizes (theme
|
||||
engines now get the real indicator size passed).
|
||||
The default toggle size of GtkCheckMenuItem and GtkCellRendererToggle
|
||||
has been changed to 13 to be consistent with GtkCheckButton.
|
||||
The only visible change with default settings is that the indicator in
|
||||
GtkCellRendererToggle has changed its size from 11 to 13 and is now
|
||||
consistent with menus and toggle buttons.
|
||||
|
||||
* GTK+ has always required that gtk_init() (or a variant thereof) is
|
||||
called before any other GTK+ function. Some applications call functions
|
||||
like gtk_clipboard_get() to check if they need to call gtk_init(),
|
||||
anyway. A change in GLib 2.14 has recently broken this unsupported
|
||||
practise. It is worth pointing out that calling gtk_init() twice
|
||||
does no harm.
|
||||
|
||||
|
||||
Release notes for 2.10
|
||||
======================
|
||||
|
||||
* The hexadecimal Unicode input feature has been reworked. It no longer
|
||||
blocks the use of the sixteen Ctrl-Shift-<hex digit> key sequences. Now
|
||||
it only uses Ctrl-Shift-u.
|
||||
|
||||
* A memory leak in GtkStyle handling has been fixed. This may expose bugs
|
||||
in third-party widgets which forget to call gtk_style_attach() in their
|
||||
realize functions.
|
||||
|
||||
* Range widgets like GtkScrollbar now render their arrows insensitive
|
||||
when the slider is at the end. Applications which react to arrow
|
||||
clicks even if the slider is at the end may want to use the new
|
||||
gtk_range_set_[upper/lower]_stepper_sensitivity() functions to
|
||||
prevent the arrows from being rendered insensitive.
|
||||
|
||||
* GtkObject now uses the "floating reference" support in GObject.
|
||||
GTK_OBJECT_IS_FLOATING() will still work, but direct checking
|
||||
of the GTK_FLOATING flag will no longer detect the floating
|
||||
reference. Details about floating references can be found in the docs:
|
||||
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
|
||||
|
||||
* Accelerators like (_F) are now stripped from labels when they are
|
||||
displayed in toolbars. If this is not wanted, the feature can be
|
||||
suppressed by inserting a Unicode control character, e.g ZWNJ.
|
||||
|
||||
* The pixbuf theme engine can now customize expanders (in GtkTreeView
|
||||
and GtkExpander) and resize grips, using the new EXPANDER and
|
||||
RESIZE_GRIP function values.
|
||||
|
||||
* Dialogs created by gtk_about_dialog_new() no longer hide automatically
|
||||
when the user clicks close. It is the applications responsibility to
|
||||
hide or destroy the dialog.
|
||||
|
||||
* Several new signals have been added to GtkNotebook. Care has been taken
|
||||
to choose signal names which do not collide with signals added by well-known
|
||||
derived classes. The names which can no longer be used for signals in
|
||||
objects derived from GtkNotebook are page-reordered, page-removed and
|
||||
page-added.
|
||||
|
||||
* Due to the interface changes in the file chooser backend interface,
|
||||
the GTK+ ABI version has been bumped to 2.10.0. Third-party filesystem
|
||||
backends have to be ported to the new interface, other modules, such as
|
||||
theme engines, input method modules or pixbuf loaders have to be rebuilt
|
||||
so that they are installed in the right place for GTK+ to find them.
|
||||
|
||||
|
||||
Release notes for 2.8
|
||||
=====================
|
||||
|
||||
* GTK+ 2.8 and Pango 1.10 require the cairo library.
|
||||
|
||||
* The default theme has been renamed to "Raleigh". Existing configurations
|
||||
specifying the "Default" theme name should still work.
|
||||
|
||||
* The GtkTreeView::enable-search property has been changed to control
|
||||
only typeahead search, not the C-f keybinding to start an interactive
|
||||
search. To turn off interactive searching completely, you have to
|
||||
set GtkTreeView::search-column to -1.
|
||||
|
||||
* The restriction on using the same cell renderer in multiple columns
|
||||
of a GtkTreeView is now more strictly enforced.
|
||||
|
||||
* In GTK+ 2.8, GtkCalendar uses nl_langinfo() (if available) to determine
|
||||
the first day of the week. Thus, it is possible to select the first day
|
||||
of the week independently from the language, by setting LC_TIME.
|
||||
|
||||
* In GTK+ 2.8, the gtk-update-icon-cache utility includes image data
|
||||
in the icon caches, which will make the icon cache files larger than
|
||||
the one produced by GTK+ 2.6. This change will reduce the memory
|
||||
overhead of icon themes at runtime, since all GTK+ applications can
|
||||
share the image data in memory.
|
||||
|
||||
* In 2.8, GDK emits GdkEventGrabBroken events when a keyboard or pointer
|
||||
grab is broken. On X11, this can happen if the same application grabs
|
||||
again, or if the window used for the grab becomes unviewable. It happens
|
||||
more often on Win32. Applications which use grabs should pay attention
|
||||
to these events and do the necessary cleanups when the grab is lost.
|
||||
* The GIOChannel code for sockets on win32 has been rewritten.
|
||||
Applications who make non-trivial use of GIOChannels on win32 should
|
||||
be watched for possible problems.
|
||||
|
||||
* GLib 2.8 uses atomic operations to implement reference counting, thus
|
||||
g_object_ref/unref, g_closure_ref/sink/unref and g_iochannel_ref/unref
|
||||
can be used without locking in multithreaded applications. Note that
|
||||
other modifications, like concurrent setting of properties still require
|
||||
locking.
|
||||
|
||||
* g_convert() and related character set conversion functions have been
|
||||
fixed to emit pending shift states and to not cache iconv descriptors
|
||||
across multiple calls, since that is problematic for some encodings.
|
||||
Note that these functions are not suitable for streaming conversions;
|
||||
use g_iconv() to do streaming conversion.
|
||||
|
||||
|
||||
Release notes for 2.6
|
||||
=====================
|
||||
|
||||
* GTK+ 2.6 supports clipboard persistency. To make use of this feature,
|
||||
a clipboard manager following the specification at
|
||||
http://www.freedesktop.org/wiki/Standards/clipboard-manager-spec
|
||||
must be running. A sample implementation of such a clipboard manager
|
||||
is available at
|
||||
http://people.imendio.com/andersca/archives/clipboard-manager-0.3.tar.gz
|
||||
Applications can use the function gdk_display_supports_clipboard_persistence()
|
||||
to find out if clipboard persistence is available.
|
||||
|
||||
* Notification on clipboard ownership changes via GdkOwnerChange events
|
||||
requires the XFIXES X extension. Applications can use the function
|
||||
gdk_display_supports_selection_notification() to find out if ownerchip
|
||||
change notification is available.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 follows the freedesktop.org icon theme
|
||||
specification. Setting the XDG_DATA_DIRS environtment variable may be
|
||||
necessary if your icons aren't installed in the default location
|
||||
/usr/share/icons.
|
||||
|
||||
* The icon theme code in GTK+ 2.6 can make use of mmap()able cache files
|
||||
to avoid a lot of disk searching overhead. GTK+ includes a utility named
|
||||
gtk-update-icon-cache to generate these cache files. For further details,
|
||||
see the gtk-update-icon-cache man page or the GTK+ documentation.
|
||||
|
||||
* To reduce code size and improve efficiency, GTK+, when compiled
|
||||
with the GNU toolchain, has separate internal and external entry
|
||||
points for exported functions. The internal names, which begin with
|
||||
IA__, may be seen when debugging a GTK+ program.
|
||||
|
||||
* The following functions have been deprecated in GTK+ 2.6:
|
||||
gdk_pango_context_set_colormap
|
||||
gtk_cell_renderer_editing_canceled
|
||||
|
||||
* The new GtkFileChooser widget emphasizes simplicity and thus does
|
||||
not provide a navigation entry by default when opening files.
|
||||
Experienced command line users will likely want to make heavy use of
|
||||
the location dialog brought up by the Control-L key shortcut.
|
||||
|
||||
* The GTK+ libraries use an '_' prefix to indicate private symbols that
|
||||
must not be used by applications. On some platforms, symbols beginning
|
||||
with prefixes such as _gtk, _gdk, and _pango will be exported
|
||||
from the library, on others not. In no case can applications
|
||||
use these private symbols. In addition to that, GTK+ 2.6 makes several
|
||||
symbols private which were not in any installed header files and
|
||||
were never intended to be exported.
|
||||
|
||||
* The gdk_pixbuf_xlib library included in the contrib/ directory
|
||||
and the framebuffer GDK backend included in the gdk/linux-fb directory
|
||||
of GTK+ are provided on an as-is basis and have not been tested at all.
|
||||
No guarantees about the degree of workingness or about future
|
||||
compatibility are provided.
|
||||
|
||||
* On Unix, the assumption of GLib and GTK+ by default is that filenames on
|
||||
the filesystem are encoded in UTF-8 rather than the encoding of the locale;
|
||||
the GTK+ developers consider that having filenames whose interpretation
|
||||
depends on the current locale is fundamentally a bad idea.
|
||||
|
||||
If you have filenames encoded in the encoding of your locale, then you
|
||||
may want to set the G_FILENAME_ENCODING environment variable:
|
||||
|
||||
G_FILENAME_ENCODING=@locale
|
||||
export G_FILENAME_ENCODING
|
||||
|
||||
(Earlier versions of GLib 2.x required a different environment variable
|
||||
setting; G_BROKEN_FILENAMES=1 to achieve the same effect; this
|
||||
is still supported, but G_FILENAME_ENCODING is preferred.)
|
||||
Best integration of GTK+ 2.6 with the environment is achieved by
|
||||
using a UTF-8 locale.
|
||||
|
||||
On Windows, filenames passed to GTK+ should always be in UTF-8, as
|
||||
in GLib 2.6. This is different than in previous versions of GTK+
|
||||
where the system codepage was used. As in GLib, for DLL ABI
|
||||
stability, applications built against previous versions of GTK+ will
|
||||
use entry points providing the old semantics.
|
||||
|
||||
When compiling against GTK+ 2.6, applications intended to be
|
||||
portable to Windows must take the UTF-8 file name encoding into
|
||||
consideration, and use the gstdio wrappers to access files whose
|
||||
names have been constructed from strings returned from GTK+ or GLib.
|
||||
|
||||
|
||||
How to report bugs
|
||||
==================
|
||||
|
||||
Bugs should be reported to the GNOME bug tracking system.
|
||||
(http://bugzilla.gnome.org, product gtk+.) You will need to create an
|
||||
account for yourself.
|
||||
|
||||
In the bug report please include:
|
||||
|
||||
* Information about your system. For instance:
|
||||
|
||||
- What operating system and version
|
||||
- What version of X
|
||||
- For Linux, what version of the C library
|
||||
|
||||
And anything else you think is relevant.
|
||||
|
||||
* How to reproduce the bug.
|
||||
|
||||
If you can reproduce it with one of the tests or demos built with GTK+,
|
||||
such as demos/gtk-demo/gtk-demo, that would be most convenient. Otherwise,
|
||||
please include a short test program that exhibits the behavior. As a
|
||||
last resort, you can also provide a pointer to a larger piece of software
|
||||
that can be downloaded.
|
||||
|
||||
* If the bug was a crash, the exact text that was printed out when the
|
||||
crash occured.
|
||||
|
||||
* Further information such as stack traces may be useful, but is not
|
||||
necessary. If you do send a stack trace, and the error is an X error,
|
||||
it will be more useful if the stacktrace is produced running the test
|
||||
program with the --sync command line option.
|
||||
|
||||
|
||||
Patches
|
||||
=======
|
||||
|
||||
Patches should also be submitted to bugzilla.gnome.org. If the patch
|
||||
fixes an existing bug, add the patch as an attachment to that bug
|
||||
report.
|
||||
|
||||
Otherwise, enter a new bug report that describes the patch, and attach
|
||||
the patch to that bug report.
|
||||
|
||||
Bug reports containing patches should include the PATCH keyword in their
|
||||
keyword fields. If the patch adds to or changes the GTK+ programming
|
||||
interface, the API keyword should also be included.
|
||||
|
||||
Patches should be in unified diff form. (The -u option to GNU diff.)
|
||||
@@ -1,11 +1,11 @@
|
||||
GTK+ is part of the GNOME Subversion repository. At the current time, any
|
||||
GTK+ is part of the GNOME git repository. At the current time, any
|
||||
person with write access to the GNOME repository, can make changes to
|
||||
GTK+. This is a good thing, in that it encourages many people to work
|
||||
on GTK+, and progress can be made quickly. However, GTK+ is a fairly
|
||||
large and complicated package that many other things depend on, so to
|
||||
avoid unnecessary breakage, and to take advantage of the knowledge
|
||||
about GTK+ that has been built up over the last 4 years, we'd like
|
||||
to ask people commiting to GTK+ to follow a few rules:
|
||||
about GTK+ that has been built up over the years, we'd like to ask
|
||||
people committing to GTK+ to follow a few rules:
|
||||
|
||||
0) Ask first. If your changes are major, or could possibly break existing
|
||||
code, you should always ask. If your change is minor and you've
|
||||
@@ -14,9 +14,9 @@ to ask people commiting to GTK+ to follow a few rules:
|
||||
somebody may know a better way to do things.
|
||||
|
||||
If you are making changes to GTK+, you should be subscribed
|
||||
to gtk-devel-list@gnome.org. (Subscription address:
|
||||
to gtk-devel-list@gnome.org. (Subscription address:
|
||||
gtk-devel-list-request@gnome.org.) This is a good place to ask
|
||||
about intended changes.
|
||||
about intended changes.
|
||||
|
||||
#gtk+ on GIMPNet (irc.gimp.org, irc.us.gimp.org, irc.eu.gimp.org, ...)
|
||||
is also a good place to find GTK+ developers to discuss changes with,
|
||||
@@ -25,30 +25,48 @@ to ask people commiting to GTK+ to follow a few rules:
|
||||
|
||||
1) Ask _first_.
|
||||
|
||||
2) There must be a ChangeLog for every commit. (If you discover that
|
||||
you only committed half the files you meant to and need to fix that
|
||||
up, or something, you don't need a new ChangeLog entry. But in general,
|
||||
ChangeLog entries are mandatory.) Changes without ChangeLog entries
|
||||
will be reverted.
|
||||
|
||||
3) There _must_ be a ChangeLog for every commit.
|
||||
2) With git, we no longer maintain a ChangeLog file, but you are expected
|
||||
to produce a meaningful commit message. Changes without a sufficient
|
||||
commit message will be reverted. See below for the expected format
|
||||
of commit messages.
|
||||
|
||||
Notes:
|
||||
|
||||
* If you are going to be changing many files in an experimental fashion,
|
||||
it probably is a good idea to create a separate branch for your changes.
|
||||
* When developing larger features or complicated bug fixes, it is
|
||||
advisable to work in a branch in your own cloned GTK+ repository.
|
||||
You may even consider making your repository publically available
|
||||
so that others can easily test and review your changes.
|
||||
|
||||
* The ChangeLog entries should preferably match in date format
|
||||
with the existing entries. You can set how emacs does this
|
||||
by using customize mode:
|
||||
* The expected format for git commit messages is as follows:
|
||||
|
||||
- M-x customize
|
||||
- set Programming/Tools/ChangeLog/Add Log Time Format to
|
||||
'Old Format'
|
||||
=== begin example commit ===
|
||||
Short explanation of the commit
|
||||
|
||||
Longer explanation explaining exactly what's changed, whether any
|
||||
external or private interfaces changed, what bugs were fixed (with bug
|
||||
tracker reference if applicable) and so forth. Be concise but not too brief.
|
||||
=== end example commit ===
|
||||
|
||||
- Always add a brief description of the commit to the _first_ line of
|
||||
the commit and terminate by two newlines (it will work without the
|
||||
second newline, but that is not nice for the interfaces).
|
||||
|
||||
- First line (the brief description) must only be one sentence and
|
||||
should start with a capital letter unless it starts with a lowercase
|
||||
symbol or identifier. Don't use a trailing period either. Don't exceed
|
||||
72 characters.
|
||||
|
||||
- The main description (the body) is normal prose and should use normal
|
||||
punctuation and capital letters where appropriate. Normally, for patches
|
||||
sent to a mailing list it's copied from there.
|
||||
|
||||
- When committing code on behalf of others use the --author option, e.g.
|
||||
git commit -a --author "Joe Coder <joe@coder.org>" and --signoff.
|
||||
|
||||
Or, set the add-log-time-format to 'current-time-string in
|
||||
your .emacs file.
|
||||
|
||||
Owen Taylor
|
||||
13 Aug 1998
|
||||
17 Apr 2001
|
||||
|
||||
Matthias Clasen
|
||||
31 Mar 2009
|
||||
|
||||
43
README.in
43
README.in
@@ -27,6 +27,35 @@ Installation
|
||||
See the file 'INSTALL'
|
||||
|
||||
|
||||
Release notes for 2.18
|
||||
======================
|
||||
|
||||
* gtk_tooltip_set_custom now accept a NULL custom_widget to unset the
|
||||
old custom_widget. Custom_widget does not get destroyed when the
|
||||
tooltip goes away.
|
||||
|
||||
|
||||
Release notes for 2.16
|
||||
======================
|
||||
|
||||
* Password entries now display a caps-lock warning. This can be turned off
|
||||
with the caps-lock-warning property.
|
||||
|
||||
* Various orientation-related functions have been deprecated in favour
|
||||
of the new GtkOrientable interface: gtk_scale_button_get_orientation,
|
||||
gtk_scale_button_set_orientation, gtk_toolbar_set_orientation.
|
||||
|
||||
* The action-proxy interaction has been changed. Widgets that operate as
|
||||
proxies have to implement the GtkActivatable interface now. GtkActivatable
|
||||
implementation are responsible for syncing their appearance with the
|
||||
action and for activating the action. All GTK+ widgets that are commonly
|
||||
used as proxies implement the GtkActivatable interface.
|
||||
|
||||
* The handling of keyboard shortcuts has been changed, to help with a
|
||||
longstanding complaint about the way GTK+ handles multiple layouts. GTK+
|
||||
now only uses keys from groups other than the current group if they are
|
||||
not present in the current group.
|
||||
|
||||
Release notes for 2.14
|
||||
======================
|
||||
|
||||
@@ -48,11 +77,15 @@ Release notes for 2.14
|
||||
to GTK_SENSITIVITY_ON, so that the button is always sensitive or
|
||||
GTK_SENSITIVITY_OFF to make it insensitive respectively.
|
||||
|
||||
* GtkAdjustment now enforces that values are restricted to the
|
||||
range [lower, upper - page_size]. This has always been the documented
|
||||
behaviour, and the recommended practice is to set page_size to 0
|
||||
when using adjustments for simple scalar values, like in a slider
|
||||
or spin button.
|
||||
* In the early 2.14.x releases, GtkAdjustment was changed to enforce
|
||||
that values are restricted to the range [lower, upper - page_size].
|
||||
This has always been the documented behaviour, and the recommended
|
||||
practice is to set page_size to 0 when using adjustments for simple
|
||||
scalar values, like in a slider or spin button.
|
||||
Due to the large number of applications that are affected by this
|
||||
change, the behaviour has been reverted to the old behaviour in
|
||||
2.14.3, with an explicit warning that this change will be
|
||||
reintroduced in 2.90.
|
||||
|
||||
* gdk-pixbuf will use GIO for mime type detection if possible. For
|
||||
this to work, shared-mime-info needs to be installed and XDG_DATA_DIRS
|
||||
|
||||
157
configure.in
157
configure.in
@@ -11,8 +11,8 @@ AC_PREREQ(2.54)
|
||||
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [16])
|
||||
m4_define([gtk_micro_version], [0])
|
||||
m4_define([gtk_minor_version], [17])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_interface_age], [0])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
@@ -378,6 +378,19 @@ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
pango >= pango_required_version dnl
|
||||
cairo >= cairo_required_version])
|
||||
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
## check that the correct cairo backend is there. E.g. if the GDK
|
||||
## target is win32 we need the cairo-win32 backend and so on.
|
||||
cairo_backend=$gdktarget
|
||||
|
||||
# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
|
||||
# backend names are identical.
|
||||
if test "x$cairo_backend" = "xx11"; then
|
||||
cairo_backend=xlib
|
||||
fi
|
||||
PKG_CHECK_MODULES(CAIRO_BACKEND,
|
||||
[cairo-$cairo_backend >= cairo_required_version])
|
||||
|
||||
if test "$os_win32" != yes; then
|
||||
# libtool option to control which symbols are exported
|
||||
# right now, symbols starting with _ are not exported
|
||||
@@ -1424,9 +1437,8 @@ if test "x$gdktarget" = "xx11"; then
|
||||
|
||||
# Check for shaped window extension
|
||||
|
||||
AC_CHECK_FUNC(XShapeCombineMask,
|
||||
AC_DEFINE(HAVE_SHAPE_EXT, 1,
|
||||
[Define to 1 if the XShape extension is available]))
|
||||
AC_CHECK_FUNC(XShapeCombineMask, :,
|
||||
[AC_MSG_ERROR([Shape extension not found, check your development headers])])
|
||||
|
||||
# X SYNC check
|
||||
gtk_save_CFLAGS="$CFLAGS"
|
||||
@@ -1492,54 +1504,55 @@ if test "x$gdktarget" = "xx11"; then
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $x_cflags"
|
||||
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
# Check for XFree
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
[Define to 1 if solaris xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 if xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Check for XFree
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
|
||||
have_xfree_xinerama=false
|
||||
if $PKG_CONFIG --exists xinerama ; then
|
||||
have_xfree_xinerama=true
|
||||
X_PACKAGES="$X_PACKAGES xinerama"
|
||||
else
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||
have_xfree_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
fi
|
||||
have_xfree_xinerama=false
|
||||
if $PKG_CONFIG --exists xinerama ; then
|
||||
have_xfree_xinerama=true
|
||||
X_PACKAGES="$X_PACKAGES xinerama"
|
||||
else
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
[GTK_ADD_LIB(x_extra_libs,Xinerama)
|
||||
have_xfree_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
fi
|
||||
|
||||
if $have_xfree_xinerama ; then
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
||||
[Define to 1 if XFree Xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 is Xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if $have_xfree_xinerama ; then
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
|
||||
[Define to 1 if XFree Xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 is Xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
|
||||
have_solaris_xinerama=false
|
||||
AC_CHECK_FUNC(XineramaGetInfo,
|
||||
[AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
[have_solaris_xinerama=true], :,
|
||||
[#include <X11/Xlib.h>])])
|
||||
|
||||
if $have_solaris_xinerama ; then
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
|
||||
[Define to 1 if solaris xinerama is available])
|
||||
AC_DEFINE(HAVE_XINERAMA, 1,
|
||||
[Define to 1 if xinerama is available])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
# set up things for XInput
|
||||
@@ -1645,18 +1658,7 @@ if test "x$gdktarget" = "xdirectfb"; then
|
||||
DIRECTFB_REQUIRED_VERSION=1.0.0
|
||||
AC_MSG_CHECKING(for DirectFB)
|
||||
|
||||
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
|
||||
AC_MSG_RESULT(found)
|
||||
GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
|
||||
GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
|
||||
else
|
||||
AC_MSG_ERROR([
|
||||
*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend
|
||||
*** are required. The latest version of DirectFB is always available
|
||||
*** from http://www.directfb.org/.
|
||||
])
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
|
||||
AM_CONDITIONAL(USE_DIRECTFB, true)
|
||||
else
|
||||
AM_CONDITIONAL(USE_DIRECTFB, false)
|
||||
@@ -1700,13 +1702,9 @@ fi
|
||||
CFLAGS="$saved_cflags"
|
||||
LDFLAGS="$saved_ldflags"
|
||||
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES cairo-xlib"
|
||||
fi
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES cairo-$cairo_backend"
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
|
||||
|
||||
#
|
||||
# If we aren't writing explicit dependencies, then don't put the extra libraries we need
|
||||
# into the pkg-config files
|
||||
@@ -1879,6 +1877,28 @@ else
|
||||
AM_CONDITIONAL(HAVE_CUPS, false)
|
||||
fi
|
||||
|
||||
# Checks to see if we should compile with PAPI backend for GTK+
|
||||
#
|
||||
|
||||
AC_ARG_ENABLE(papi,
|
||||
[AC_HELP_STRING([--disable-papi]
|
||||
[disable papi print backend])],,
|
||||
[enable_papi=auto])
|
||||
|
||||
if test "x$enable_papi" = "xauto"
|
||||
then
|
||||
AC_MSG_CHECKING(libpapi)
|
||||
AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
|
||||
if test $have_papi = yes; then
|
||||
AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
|
||||
else
|
||||
AM_CONDITIONAL(HAVE_PAPI, false)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_PAPI_CUPS, test $have_papi = yes && test "x$CUPS_CONFIG" != "xno")
|
||||
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
|
||||
|
||||
@@ -2107,6 +2127,7 @@ modules/printbackends/Makefile
|
||||
modules/printbackends/cups/Makefile
|
||||
modules/printbackends/lpr/Makefile
|
||||
modules/printbackends/file/Makefile
|
||||
modules/printbackends/papi/Makefile
|
||||
modules/printbackends/test/Makefile
|
||||
perf/Makefile
|
||||
contrib/Makefile
|
||||
|
||||
@@ -4,3 +4,5 @@ SUBDIRS =
|
||||
if USE_X11
|
||||
SUBDIRS += gdk-pixbuf-xlib
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
=== ChangeLog discontinued ===
|
||||
|
||||
With the move to git, GTK+ is switching from a ChangeLog file
|
||||
to relying on commit messages to provide change history. Please
|
||||
see README.commits for guidance on the expected message format.
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.16.0 ===
|
||||
|
||||
@@ -38,3 +38,5 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gdk-pixbuf-xlib-2.0.pc
|
||||
|
||||
EXTRA_DIST += gdk-pixbuf-xlib-2.0.pc.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -82,3 +82,5 @@ EXTRA_DIST += \
|
||||
gnu-keys.png
|
||||
|
||||
DISTCLEANFILES = test-inline-pixbufs.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
|
||||
|
||||
democodedir=$(datadir)/gtk-2.0/demo
|
||||
|
||||
## These should be in the order you want them to appear in the
|
||||
## These should be in the order you want them to appear in the
|
||||
## demo app, which means alphabetized by demo title, not filename
|
||||
demos = \
|
||||
appwindow.c \
|
||||
@@ -23,12 +23,14 @@ demos = \
|
||||
iconview.c \
|
||||
iconview_edit.c \
|
||||
images.c \
|
||||
links.c \
|
||||
list_store.c \
|
||||
menus.c \
|
||||
panes.c \
|
||||
pickers.c \
|
||||
pixbufs.c \
|
||||
printing.c \
|
||||
resolution_independence.c \
|
||||
rotated_text.c \
|
||||
search_entry.c \
|
||||
sizegroup.c \
|
||||
@@ -96,3 +98,5 @@ IMAGEFILES= alphatest.png \
|
||||
democode_DATA = $(demos) $(IMAGEFILES) demo.ui
|
||||
|
||||
DISTCLEANFILES = demos.h
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *infobar = NULL;
|
||||
static GtkWidget *messagelabel = NULL;
|
||||
|
||||
static void
|
||||
activate_action (GtkAction *action)
|
||||
@@ -16,7 +18,7 @@ activate_action (GtkAction *action)
|
||||
const gchar *typename = G_OBJECT_TYPE_NAME (action);
|
||||
|
||||
GtkWidget *dialog;
|
||||
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
@@ -29,7 +31,7 @@ activate_action (GtkAction *action)
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
}
|
||||
|
||||
@@ -41,37 +43,32 @@ activate_radio_action (GtkAction *action, GtkRadioAction *current)
|
||||
gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current));
|
||||
gint value = gtk_radio_action_get_current_value (GTK_RADIO_ACTION (current));
|
||||
|
||||
if (active)
|
||||
if (active)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_CLOSE,
|
||||
"You activated radio action: \"%s\" of type \"%s\".\n"
|
||||
"Current value: %d",
|
||||
name, typename, value);
|
||||
gchar *text;
|
||||
|
||||
/* Close dialog on user response */
|
||||
g_signal_connect (dialog,
|
||||
"response",
|
||||
G_CALLBACK (gtk_widget_destroy),
|
||||
NULL);
|
||||
|
||||
gtk_widget_show (dialog);
|
||||
text = g_strdup_printf ("You activated radio action: \"%s\" of type \"%s\".\n"
|
||||
"Current value: %d",
|
||||
name, typename, value);
|
||||
gtk_label_set_text (GTK_LABEL (messagelabel), text);
|
||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), (GtkMessageType)value);
|
||||
gtk_widget_show (infobar);
|
||||
g_free (text);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
activate_email (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("send mail to %s\n", link);
|
||||
gchar *text;
|
||||
text = g_strdup_printf ("send mail to %s", link);
|
||||
g_print ("%s\n", text);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
activate_url (GtkAboutDialog *about,
|
||||
const gchar *link,
|
||||
gpointer data)
|
||||
@@ -147,12 +144,12 @@ about_cb (GtkAction *action,
|
||||
g_object_unref (transparent);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
GtkAction action;
|
||||
} ToolMenuAction;
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
GtkActionClass parent_class;
|
||||
} ToolMenuActionClass;
|
||||
@@ -179,30 +176,30 @@ static GtkActionEntry entries[] = {
|
||||
{ "HelpMenu", NULL, "_Help" }, /* name, stock id, label */
|
||||
{ "New", GTK_STOCK_NEW, /* name, stock id */
|
||||
"_New", "<control>N", /* label, accelerator */
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
"Create a new file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "File1", NULL, /* name, stock id */
|
||||
"File1", NULL, /* label, accelerator */
|
||||
"File1", NULL, /* label, accelerator */
|
||||
"Open first file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Save", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"_Save","<control>S", /* label, accelerator */
|
||||
"_Save","<control>S", /* label, accelerator */
|
||||
"Save current file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "SaveAs", GTK_STOCK_SAVE, /* name, stock id */
|
||||
"Save _As...", NULL, /* label, accelerator */
|
||||
"Save _As...", NULL, /* label, accelerator */
|
||||
"Save to a file", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "Quit", GTK_STOCK_QUIT, /* name, stock id */
|
||||
"_Quit", "<control>Q", /* label, accelerator */
|
||||
"_Quit", "<control>Q", /* label, accelerator */
|
||||
"Quit", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
{ "About", NULL, /* name, stock id */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
"_About", "<control>A", /* label, accelerator */
|
||||
"About", /* tooltip */
|
||||
G_CALLBACK (about_cb) },
|
||||
{ "Logo", "demo-gtk-logo", /* name, stock id */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
NULL, NULL, /* label, accelerator */
|
||||
"GTK+", /* tooltip */
|
||||
G_CALLBACK (activate_action) },
|
||||
};
|
||||
@@ -211,9 +208,9 @@ static guint n_entries = G_N_ELEMENTS (entries);
|
||||
|
||||
static GtkToggleActionEntry toggle_entries[] = {
|
||||
{ "Bold", GTK_STOCK_BOLD, /* name, stock id */
|
||||
"_Bold", "<control>B", /* label, accelerator */
|
||||
"_Bold", "<control>B", /* label, accelerator */
|
||||
"Bold", /* tooltip */
|
||||
G_CALLBACK (activate_action),
|
||||
G_CALLBACK (activate_action),
|
||||
TRUE }, /* is_active */
|
||||
};
|
||||
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||
@@ -226,13 +223,13 @@ enum {
|
||||
|
||||
static GtkRadioActionEntry color_entries[] = {
|
||||
{ "Red", NULL, /* name, stock id */
|
||||
"_Red", "<control>R", /* label, accelerator */
|
||||
"_Red", "<control>R", /* label, accelerator */
|
||||
"Blood", COLOR_RED }, /* tooltip, value */
|
||||
{ "Green", NULL, /* name, stock id */
|
||||
"_Green", "<control>G", /* label, accelerator */
|
||||
"_Green", "<control>G", /* label, accelerator */
|
||||
"Grass", COLOR_GREEN }, /* tooltip, value */
|
||||
{ "Blue", NULL, /* name, stock id */
|
||||
"_Blue", "<control>B", /* label, accelerator */
|
||||
"_Blue", "<control>B", /* label, accelerator */
|
||||
"Sky", COLOR_BLUE }, /* tooltip, value */
|
||||
};
|
||||
static guint n_color_entries = G_N_ELEMENTS (color_entries);
|
||||
@@ -245,18 +242,18 @@ enum {
|
||||
|
||||
static GtkRadioActionEntry shape_entries[] = {
|
||||
{ "Square", NULL, /* name, stock id */
|
||||
"_Square", "<control>S", /* label, accelerator */
|
||||
"_Square", "<control>S", /* label, accelerator */
|
||||
"Square", SHAPE_SQUARE }, /* tooltip, value */
|
||||
{ "Rectangle", NULL, /* name, stock id */
|
||||
"_Rectangle", "<control>R", /* label, accelerator */
|
||||
"_Rectangle", "<control>R", /* label, accelerator */
|
||||
"Rectangle", SHAPE_RECTANGLE }, /* tooltip, value */
|
||||
{ "Oval", NULL, /* name, stock id */
|
||||
"_Oval", "<control>O", /* label, accelerator */
|
||||
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||
"_Oval", "<control>O", /* label, accelerator */
|
||||
"Egg", SHAPE_OVAL }, /* tooltip, value */
|
||||
};
|
||||
static guint n_shape_entries = G_N_ELEMENTS (shape_entries);
|
||||
|
||||
static const gchar *ui_info =
|
||||
static const gchar *ui_info =
|
||||
"<ui>"
|
||||
" <menubar name='MenuBar'>"
|
||||
" <menu action='FileMenu'>"
|
||||
@@ -288,7 +285,7 @@ static const gchar *ui_info =
|
||||
" <toolitem action='Open'>"
|
||||
" <menu action='OpenMenu'>"
|
||||
" <menuitem action='File1'/>"
|
||||
" </menu>"
|
||||
" </menu>"
|
||||
" </toolitem>"
|
||||
" <toolitem action='Quit'/>"
|
||||
" <separator action='Sep1'/>"
|
||||
@@ -308,7 +305,7 @@ static void
|
||||
register_stock_icons (void)
|
||||
{
|
||||
static gboolean registered = FALSE;
|
||||
|
||||
|
||||
if (!registered)
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
@@ -320,12 +317,12 @@ register_stock_icons (void)
|
||||
"_GTK!",
|
||||
0, 0, NULL }
|
||||
};
|
||||
|
||||
|
||||
registered = TRUE;
|
||||
|
||||
/* Register our stock items */
|
||||
gtk_stock_add (items, G_N_ELEMENTS (items));
|
||||
|
||||
|
||||
/* Add our custom icon factory to the list of defaults */
|
||||
factory = gtk_icon_factory_new ();
|
||||
gtk_icon_factory_add_default (factory);
|
||||
@@ -350,7 +347,7 @@ register_stock_icons (void)
|
||||
|
||||
/* The gtk-logo-rgb icon has a white background, make it transparent */
|
||||
transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
|
||||
|
||||
|
||||
icon_set = gtk_icon_set_new_from_pixbuf (transparent);
|
||||
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
|
||||
gtk_icon_set_unref (icon_set);
|
||||
@@ -359,7 +356,7 @@ register_stock_icons (void)
|
||||
}
|
||||
else
|
||||
g_warning ("failed to load GTK logo for toolbar");
|
||||
|
||||
|
||||
/* Drop our reference to the factory, GTK will hold a reference. */
|
||||
g_object_unref (factory);
|
||||
}
|
||||
@@ -373,9 +370,9 @@ update_statusbar (GtkTextBuffer *buffer,
|
||||
gint row, col;
|
||||
gint count;
|
||||
GtkTextIter iter;
|
||||
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message,
|
||||
* underflow is allowed
|
||||
|
||||
gtk_statusbar_pop (statusbar, 0); /* clear any previous message,
|
||||
* underflow is allowed
|
||||
*/
|
||||
|
||||
count = gtk_text_buffer_get_char_count (buffer);
|
||||
@@ -409,21 +406,21 @@ update_resize_grip (GtkWidget *widget,
|
||||
GdkEventWindowState *event,
|
||||
GtkStatusbar *statusbar)
|
||||
{
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
if (event->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN))
|
||||
{
|
||||
gboolean maximized;
|
||||
|
||||
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
maximized = event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED |
|
||||
GDK_WINDOW_STATE_FULLSCREEN);
|
||||
gtk_statusbar_set_has_resize_grip (statusbar, !maximized);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
GtkWidget *
|
||||
do_appwindow (GtkWidget *do_widget)
|
||||
{
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *table;
|
||||
@@ -438,10 +435,10 @@ do_appwindow (GtkWidget *do_widget)
|
||||
GError *error = NULL;
|
||||
|
||||
register_stock_icons ();
|
||||
|
||||
|
||||
/* Create the toplevel window
|
||||
*/
|
||||
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
@@ -453,15 +450,15 @@ do_appwindow (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
table = gtk_table_new (1, 4, FALSE);
|
||||
|
||||
table = gtk_table_new (1, 5, FALSE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
|
||||
/* Create the menubar and toolbar
|
||||
*/
|
||||
|
||||
|
||||
action_group = gtk_action_group_new ("AppWindowActions");
|
||||
open_action = g_object_new (tool_menu_action_get_type (),
|
||||
open_action = g_object_new (tool_menu_action_get_type (),
|
||||
"name", "Open",
|
||||
"label", "_Open",
|
||||
"tooltip", "Open a file",
|
||||
@@ -469,30 +466,30 @@ do_appwindow (GtkWidget *do_widget)
|
||||
NULL);
|
||||
gtk_action_group_add_action (action_group, open_action);
|
||||
g_object_unref (open_action);
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
gtk_action_group_add_actions (action_group,
|
||||
entries, n_entries,
|
||||
window);
|
||||
gtk_action_group_add_toggle_actions (action_group,
|
||||
toggle_entries, n_toggle_entries,
|
||||
gtk_action_group_add_toggle_actions (action_group,
|
||||
toggle_entries, n_toggle_entries,
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
color_entries, n_color_entries,
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
color_entries, n_color_entries,
|
||||
COLOR_RED,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
shape_entries, n_shape_entries,
|
||||
gtk_action_group_add_radio_actions (action_group,
|
||||
shape_entries, n_shape_entries,
|
||||
SHAPE_SQUARE,
|
||||
G_CALLBACK (activate_radio_action),
|
||||
G_CALLBACK (activate_radio_action),
|
||||
NULL);
|
||||
|
||||
merge = gtk_ui_manager_new ();
|
||||
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge,
|
||||
g_object_set_data_full (G_OBJECT (window), "ui-manager", merge,
|
||||
g_object_unref);
|
||||
gtk_ui_manager_insert_action_group (merge, action_group, 0);
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_window_add_accel_group (GTK_WINDOW (window),
|
||||
gtk_ui_manager_get_accel_group (merge));
|
||||
|
||||
|
||||
if (!gtk_ui_manager_add_ui_from_string (merge, ui_info, -1, &error))
|
||||
{
|
||||
g_message ("building menus failed: %s", error->message);
|
||||
@@ -502,7 +499,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
bar = gtk_ui_manager_get_widget (merge, "/MenuBar");
|
||||
gtk_widget_show (bar);
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
bar,
|
||||
bar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 0, 1,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
@@ -511,7 +508,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
bar = gtk_ui_manager_get_widget (merge, "/ToolBar");
|
||||
gtk_widget_show (bar);
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
bar,
|
||||
bar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
@@ -520,6 +517,25 @@ do_appwindow (GtkWidget *do_widget)
|
||||
/* Create document
|
||||
*/
|
||||
|
||||
infobar = gtk_info_bar_new ();
|
||||
gtk_widget_set_no_show_all (infobar, TRUE);
|
||||
messagelabel = gtk_label_new ("");
|
||||
gtk_widget_show (messagelabel);
|
||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))),
|
||||
messagelabel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_info_bar_add_button (GTK_INFO_BAR (infobar),
|
||||
GTK_STOCK_OK, GTK_RESPONSE_OK);
|
||||
g_signal_connect (infobar, "response",
|
||||
G_CALLBACK (gtk_widget_hide), NULL);
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
infobar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
@@ -528,20 +544,21 @@ do_appwindow (GtkWidget *do_widget)
|
||||
|
||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_SHADOW_IN);
|
||||
|
||||
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
sw,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 2, 3,
|
||||
0, 1, 3, 4,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
|
||||
0, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
200, 200);
|
||||
|
||||
GTK_SIZE_ONE_TWELFTH_EM (200),
|
||||
GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
|
||||
contents = gtk_text_view_new ();
|
||||
gtk_widget_grab_focus (contents);
|
||||
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (sw),
|
||||
contents);
|
||||
|
||||
@@ -551,7 +568,7 @@ do_appwindow (GtkWidget *do_widget)
|
||||
gtk_table_attach (GTK_TABLE (table),
|
||||
statusbar,
|
||||
/* X direction */ /* Y direction */
|
||||
0, 1, 3, 4,
|
||||
0, 1, 4, 5,
|
||||
GTK_EXPAND | GTK_FILL, 0,
|
||||
0, 0);
|
||||
|
||||
@@ -570,12 +587,12 @@ do_appwindow (GtkWidget *do_widget)
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
g_signal_connect_object (window,
|
||||
"window_state_event",
|
||||
G_CALLBACK (update_resize_grip),
|
||||
statusbar,
|
||||
0);
|
||||
|
||||
|
||||
update_statusbar (buffer, GTK_STATUSBAR (statusbar));
|
||||
}
|
||||
|
||||
@@ -584,9 +601,11 @@ do_appwindow (GtkWidget *do_widget)
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
infobar = NULL;
|
||||
messagelabel = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
|
||||
@@ -58,14 +58,32 @@ on_entry_changed (GtkWidget *widget, gpointer data)
|
||||
gtk_assistant_set_page_complete (assistant, current_page, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
on_unit_changed (GtkWidget *assistant,
|
||||
gpointer user_data)
|
||||
{
|
||||
int n;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *page;
|
||||
|
||||
/* update icons on all pages */
|
||||
for (n = 0; n < 3; n++)
|
||||
{
|
||||
page = gtk_assistant_get_nth_page (GTK_ASSISTANT (assistant), n);
|
||||
pixbuf = gtk_widget_render_icon (assistant, GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG, NULL);
|
||||
gtk_assistant_set_page_header_image (GTK_ASSISTANT (assistant), page, pixbuf);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
create_page1 (GtkWidget *assistant)
|
||||
{
|
||||
GtkWidget *box, *label, *entry;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_hbox_new (FALSE, 12);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
box = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
@@ -91,8 +109,8 @@ create_page2 (GtkWidget *assistant)
|
||||
GtkWidget *box, *checkbutton;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
box = gtk_vbox_new (12, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 12);
|
||||
box = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
"even if you do not check this");
|
||||
@@ -134,7 +152,7 @@ do_assistant (GtkWidget *do_widget)
|
||||
{
|
||||
assistant = gtk_assistant_new ();
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, 300);
|
||||
gtk_window_set_default_size (GTK_WINDOW (assistant), -1, GTK_SIZE_ONE_TWELFTH_EM (300));
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (assistant),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
@@ -151,6 +169,10 @@ do_assistant (GtkWidget *do_widget)
|
||||
G_CALLBACK (on_assistant_apply), NULL);
|
||||
g_signal_connect (G_OBJECT (assistant), "prepare",
|
||||
G_CALLBACK (on_assistant_prepare), NULL);
|
||||
|
||||
/* need to reset the header pixbufs to correct size when the units change */
|
||||
g_signal_connect (G_OBJECT (assistant), "unit-changed",
|
||||
G_CALLBACK (on_unit_changed), NULL);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (assistant))
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *
|
||||
create_bbox (gint horizontal,
|
||||
char *title,
|
||||
gint spacing,
|
||||
gint layout)
|
||||
create_bbox (gint horizontal,
|
||||
char *title,
|
||||
GtkSize spacing,
|
||||
gint layout)
|
||||
{
|
||||
GtkWidget *frame;
|
||||
GtkWidget *bbox;
|
||||
@@ -22,7 +22,7 @@ create_bbox (gint horizontal,
|
||||
else
|
||||
bbox = gtk_vbutton_box_new ();
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (bbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
||||
|
||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
||||
@@ -61,56 +61,56 @@ do_button_box (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 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_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
|
||||
create_bbox (TRUE, "Spread", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (TRUE, "Edge", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (TRUE, "Start", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (TRUE, "End", GTK_SIZE_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
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, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Spread", 30, GTK_BUTTONBOX_SPREAD),
|
||||
create_bbox (FALSE, "Spread", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_SPREAD),
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Edge", 30, GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (FALSE, "Edge", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_EDGE),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "Start", 30, GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (FALSE, "Start", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_START),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (hbox),
|
||||
create_bbox (FALSE, "End", 30, GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, 5);
|
||||
create_bbox (FALSE, "End", GTK_SIZE_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_END),
|
||||
TRUE, TRUE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -354,8 +354,8 @@ create_frame (ChangeDisplayInfo *info,
|
||||
|
||||
*frame = gtk_frame_new (title);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (*frame), hbox);
|
||||
|
||||
scrollwin = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -372,7 +372,7 @@ create_frame (ChangeDisplayInfo *info,
|
||||
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
|
||||
*button_vbox = gtk_vbox_new (FALSE, 5);
|
||||
*button_vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
|
||||
|
||||
if (!info->size_group)
|
||||
@@ -611,15 +611,15 @@ do_changedisplay (GtkWidget *do_widget)
|
||||
"Change", GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (info->window), 300, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (info->window), GTK_SIZE_ONE_TWELFTH_EM (300), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
g_signal_connect (info->window, "response",
|
||||
G_CALLBACK (response_cb), info);
|
||||
g_signal_connect (info->window, "destroy",
|
||||
G_CALLBACK (destroy_cb), &info);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->window)->vbox), vbox,
|
||||
TRUE, TRUE, 0);
|
||||
|
||||
@@ -207,7 +207,7 @@ do_clipboard (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -215,8 +215,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first entry */
|
||||
@@ -232,8 +232,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
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);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the second entry */
|
||||
@@ -249,8 +249,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
/* Create the first image */
|
||||
|
||||
@@ -87,10 +87,10 @@ 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);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
@@ -108,7 +108,7 @@ do_colorsel (GtkWidget *do_widget)
|
||||
G_CALLBACK (expose_event_callback), NULL);
|
||||
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 200, 200);
|
||||
gtk_widget_set_size_request (da, GTK_SIZE_ONE_TWELFTH_EM (200), GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
/* set the color */
|
||||
gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
|
||||
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
|
||||
enum
|
||||
{
|
||||
PIXBUF_COL,
|
||||
TEXT_COL
|
||||
STOCK_ID_COL,
|
||||
TEXT_COL,
|
||||
|
||||
NUM_COLUMNS,
|
||||
};
|
||||
|
||||
static gchar *
|
||||
@@ -50,7 +52,6 @@ create_stock_icon_store (void)
|
||||
};
|
||||
|
||||
GtkStockItem item;
|
||||
GdkPixbuf *pixbuf;
|
||||
GtkWidget *cellview;
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
@@ -59,29 +60,25 @@ create_stock_icon_store (void)
|
||||
|
||||
cellview = gtk_cell_view_new ();
|
||||
|
||||
store = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
|
||||
store = gtk_list_store_new (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (stock_id); i++)
|
||||
{
|
||||
if (stock_id[i])
|
||||
{
|
||||
pixbuf = gtk_widget_render_icon (cellview, stock_id[i],
|
||||
GTK_ICON_SIZE_BUTTON, NULL);
|
||||
gtk_stock_lookup (stock_id[i], &item);
|
||||
gtk_stock_lookup (stock_id[i], &item);
|
||||
label = strip_underscore (item.label);
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
PIXBUF_COL, pixbuf,
|
||||
STOCK_ID_COL, stock_id[i],
|
||||
TEXT_COL, label,
|
||||
-1);
|
||||
g_object_unref (pixbuf);
|
||||
g_free (label);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
PIXBUF_COL, NULL,
|
||||
TEXT_COL, "separator",
|
||||
-1);
|
||||
}
|
||||
@@ -343,9 +340,9 @@ do_combobox (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (2));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
@@ -355,7 +352,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_stock_icon_store ();
|
||||
@@ -366,7 +363,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
|
||||
"pixbuf", PIXBUF_COL,
|
||||
"stock-id", STOCK_ID_COL,
|
||||
NULL);
|
||||
|
||||
gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
|
||||
@@ -396,7 +393,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_capital_store ();
|
||||
@@ -425,7 +422,7 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
box = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_entry_new_text ();
|
||||
|
||||
@@ -148,8 +148,9 @@
|
||||
</accessibility>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="default_height">250</property>
|
||||
<property name="default_width">440</property>
|
||||
<!-- 100 mm = 10 cm ~= 4 inches -->
|
||||
<property name="default_height">100 mm</property>
|
||||
<property name="default_width">36.6667em</property>
|
||||
<property name="title">GtkBuilder demo</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
|
||||
@@ -51,16 +51,16 @@ interactive_dialog_clicked (GtkButton *button,
|
||||
GTK_RESPONSE_CANCEL,
|
||||
NULL);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
stock = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), stock, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
gtk_table_attach_defaults (GTK_TABLE (table),
|
||||
@@ -112,17 +112,17 @@ do_dialog (GtkWidget *do_widget)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Dialogs");
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||
g_signal_connect (button, "clicked",
|
||||
@@ -132,7 +132,7 @@ do_dialog (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
|
||||
|
||||
/* Interactive dialog*/
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
vbox2 = gtk_vbox_new (FALSE, 0);
|
||||
|
||||
@@ -143,8 +143,8 @@ do_dialog (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||
|
||||
@@ -245,10 +245,10 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
@@ -266,7 +266,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 100, 100);
|
||||
gtk_widget_set_size_request (da, GTK_SIZE_ONE_TWELFTH_EM (100), GTK_SIZE_ONE_TWELFTH_EM (100));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
@@ -288,7 +288,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
gtk_widget_set_size_request (da, 100, 100);
|
||||
gtk_widget_set_size_request (da, GTK_SIZE_ONE_TWELFTH_EM (100), GTK_SIZE_ONE_TWELFTH_EM (100));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (frame), da);
|
||||
|
||||
|
||||
@@ -328,11 +328,11 @@ 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), "Shopping list");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@@ -365,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (sw), treeview);
|
||||
|
||||
/* some buttons */
|
||||
hbox = gtk_hbox_new (TRUE, 4);
|
||||
hbox = gtk_hbox_new (TRUE, GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("Add item");
|
||||
@@ -378,7 +378,7 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
G_CALLBACK (remove_item), treeview);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (320), GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -58,9 +58,9 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (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.");
|
||||
|
||||
@@ -32,9 +32,9 @@ do_expander (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
label = gtk_label_new ("Expander demo. Click on the triangle for details.");
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
@@ -267,7 +267,7 @@ do_hypertext (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (450), GTK_SIZE_ONE_TWELFTH_EM (450));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
@@ -263,7 +263,7 @@ do_iconview (GtkWidget *do_widget)
|
||||
GError *error;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (650), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
|
||||
@@ -332,10 +332,10 @@ do_images (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (cleanup_callback), NULL);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
||||
85
demos/gtk-demo/links.c
Normal file
85
demos/gtk-demo/links.c
Normal file
@@ -0,0 +1,85 @@
|
||||
/* Links
|
||||
*
|
||||
* GtkLabel can show hyperlinks. The default action is to call
|
||||
* gtk_show_uri() on their URI, but it is possible to override
|
||||
* this with a custom handler.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
response_cb (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
activate_link (GtkWidget *label,
|
||||
const gchar *uri,
|
||||
gpointer data)
|
||||
{
|
||||
if (g_strcmp0 (uri, "keynav") == 0)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *parent;
|
||||
|
||||
parent = gtk_widget_get_toplevel (label);
|
||||
dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (parent),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"The term <i>keynav</i> is a shorthand for "
|
||||
"keyboard navigation and refers to the process of using "
|
||||
"a program (exclusively) via keyboard input.");
|
||||
|
||||
gtk_window_present (GTK_WINDOW (dialog));
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (response_cb), NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_links (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box;
|
||||
GtkWidget *label;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK(gtk_widget_destroyed), &window);
|
||||
g_signal_connect (window, "delete-event",
|
||||
G_CALLBACK (gtk_true), NULL);
|
||||
|
||||
label = gtk_label_new ("Some <a href=\"http://en.wikipedia.org/wiki/Text\""
|
||||
"title=\"plain text\">text</a> may be marked up\n"
|
||||
"as hyperlinks, which can be clicked\n"
|
||||
"or activated via <a href=\"keynav\">keynav</a>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
g_signal_connect (label, "activate-link", G_CALLBACK (activate_link), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), label);
|
||||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -173,9 +173,9 @@ 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);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (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).");
|
||||
@@ -206,7 +206,7 @@ do_list_store (GtkWidget *do_widget)
|
||||
add_columns (GTK_TREE_VIEW (treeview));
|
||||
|
||||
/* finish & show */
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (280), GTK_SIZE_ONE_TWELFTH_EM (250));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -764,9 +764,9 @@ create_text (GtkTextBuffer **buffer,
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
|
||||
GTK_WRAP_WORD);
|
||||
gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (text_view),
|
||||
2);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (2));
|
||||
gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (text_view),
|
||||
2);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (2));
|
||||
}
|
||||
|
||||
return scrolled_window;
|
||||
@@ -792,7 +792,7 @@ create_tree (void)
|
||||
|
||||
gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection),
|
||||
GTK_SELECTION_BROWSE);
|
||||
gtk_widget_set_size_request (tree_view, 200, -1);
|
||||
gtk_widget_set_size_request (tree_view, GTK_SIZE_ONE_TWELFTH_EM (200), -1);
|
||||
|
||||
/* this code only supports 1 level of children. If we
|
||||
* want more we probably have to use a recursing function.
|
||||
@@ -946,6 +946,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
/* -- End of hack -- */
|
||||
|
||||
gtk_enable_resolution_independence ();
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
setup_default_icon ();
|
||||
@@ -969,7 +970,7 @@ main (int argc, char **argv)
|
||||
gtk_label_new_with_mnemonic ("_Info"));
|
||||
|
||||
tag = gtk_text_buffer_create_tag (info_buffer, "title",
|
||||
"font", "Sans 18",
|
||||
"scale", PANGO_SCALE_XX_LARGE,
|
||||
NULL);
|
||||
g_object_unref (info_buffer);
|
||||
|
||||
@@ -999,9 +1000,9 @@ main (int argc, char **argv)
|
||||
"weight", PANGO_WEIGHT_BOLD,
|
||||
"foreground", "DarkGoldenrod4",
|
||||
NULL);
|
||||
g_object_unref (source_buffer);
|
||||
g_object_unref (source_buffer);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (600), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
gtk_widget_show_all (window);
|
||||
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ do_menus (GtkWidget *do_widget)
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
|
||||
gtk_widget_show (menuitem);
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
box2 = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
gtk_widget_show (box2);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ create_pane_options (GtkPaned *paned,
|
||||
GtkWidget *check_button;
|
||||
|
||||
frame = gtk_frame_new (frame_label);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (frame), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
|
||||
table = gtk_table_new (3, 2, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -138,14 +138,14 @@ do_panes (GtkWidget *do_widget)
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
hpaned = gtk_hpaned_new ();
|
||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_size_request (frame, 60, 60);
|
||||
gtk_widget_set_size_request (frame, GTK_SIZE_ONE_TWELFTH_EM (60), GTK_SIZE_ONE_TWELFTH_EM (60));
|
||||
gtk_paned_add1 (GTK_PANED (hpaned), frame);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Hi there");
|
||||
@@ -153,12 +153,12 @@ do_panes (GtkWidget *do_widget)
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_size_request (frame, 80, 60);
|
||||
gtk_widget_set_size_request (frame, GTK_SIZE_ONE_TWELFTH_EM (80), GTK_SIZE_ONE_TWELFTH_EM (60));
|
||||
gtk_paned_add2 (GTK_PANED (hpaned), frame);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
|
||||
gtk_widget_set_size_request (frame, 60, 80);
|
||||
gtk_widget_set_size_request (frame, GTK_SIZE_ONE_TWELFTH_EM (60), GTK_SIZE_ONE_TWELFTH_EM (80));
|
||||
gtk_paned_add2 (GTK_PANED (vpaned), frame);
|
||||
|
||||
/* Now create toggle buttons to control sizing */
|
||||
|
||||
@@ -18,19 +18,20 @@ do_pickers (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Pickers");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
table = gtk_table_new (4, 2, FALSE);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 10);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 3);
|
||||
gtk_table_set_col_spacing (GTK_TABLE (table), 0, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (3));
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
|
||||
label = gtk_label_new ("Color:");
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
|
||||
239
demos/gtk-demo/resolution_independence.c
Normal file
239
demos/gtk-demo/resolution_independence.c
Normal file
@@ -0,0 +1,239 @@
|
||||
/* Resolution Independence
|
||||
*
|
||||
* This demonstates resolution independence features available since
|
||||
* version 2.14 of GTK+. Use the slider to change the effective DPI
|
||||
* per monitor. Note that the changes will only affect windows from
|
||||
* this process.
|
||||
*/
|
||||
#include <gtk/gtk.h>
|
||||
#include "config.h"
|
||||
#include "demo-common.h"
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWindowGroup *window_group = NULL;
|
||||
static GtkWidget *hscale;
|
||||
static GtkWidget *label;
|
||||
static GtkWidget *button;
|
||||
static gdouble button_dpi;
|
||||
|
||||
#define INCHES_TO_MM 25.4
|
||||
|
||||
#define MIN_DPI 24.0
|
||||
#define MAX_DPI 480.0
|
||||
#define STEP_DPI 1.0
|
||||
|
||||
static void
|
||||
update (void)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
gint monitor_num;
|
||||
char *plug_name;
|
||||
char *s;
|
||||
gdouble dpi;
|
||||
char *font_name;
|
||||
GtkSettings *settings;
|
||||
int width_mm;
|
||||
int height_mm;
|
||||
GdkRectangle geometry;
|
||||
|
||||
plug_name = NULL;
|
||||
font_name = NULL;
|
||||
width_mm = -1;
|
||||
height_mm = -1;
|
||||
geometry.x = -1;
|
||||
geometry.y = -1;
|
||||
geometry.width = -1;
|
||||
geometry.height = -1;
|
||||
|
||||
screen = gtk_window_get_screen (GTK_WINDOW (window));
|
||||
monitor_num = gtk_widget_get_monitor_num (window);
|
||||
if (screen != NULL && monitor_num >= 0)
|
||||
{
|
||||
plug_name = gdk_screen_get_monitor_plug_name (screen, monitor_num);
|
||||
width_mm = gdk_screen_get_monitor_width_mm (screen, monitor_num);
|
||||
height_mm = gdk_screen_get_monitor_height_mm (screen, monitor_num);
|
||||
gdk_screen_get_monitor_geometry (screen, monitor_num, &geometry);
|
||||
}
|
||||
if (screen != NULL)
|
||||
settings = gtk_settings_get_for_screen (screen);
|
||||
else
|
||||
settings = gtk_settings_get_default ();
|
||||
g_object_get (settings, "gtk-font-name", &font_name, NULL);
|
||||
|
||||
s = g_strdup_printf ("Monitor %d (%s) @ %dx%d+%d+%d\n"
|
||||
"%d mm x %d mm\n"
|
||||
"DPI: %.1f x %.1f\n"
|
||||
"Font \"%s\"\n"
|
||||
"1 em -> %g pixels\n"
|
||||
"1 mm -> %g pixels",
|
||||
monitor_num,
|
||||
plug_name != NULL ? plug_name : "unknown name",
|
||||
geometry.width, geometry.height, geometry.x, geometry.y,
|
||||
width_mm, height_mm,
|
||||
INCHES_TO_MM * geometry.width / width_mm,
|
||||
INCHES_TO_MM * geometry.height / height_mm,
|
||||
font_name,
|
||||
gtk_size_to_pixel_double (screen, monitor_num, gtk_size_em (1.0)),
|
||||
gtk_size_to_pixel_double (screen, monitor_num, gtk_size_mm (1.0)));
|
||||
gtk_label_set_text (GTK_LABEL (label), s);
|
||||
g_free (s);
|
||||
|
||||
button_dpi = MIN (INCHES_TO_MM * geometry.width / width_mm,
|
||||
INCHES_TO_MM * geometry.height / height_mm);
|
||||
s = g_strdup_printf ("Set DPI to %.1f", button_dpi);
|
||||
gtk_button_set_label (GTK_BUTTON (button), s);
|
||||
g_free (s);
|
||||
|
||||
dpi = -1;
|
||||
if (screen != NULL)
|
||||
{
|
||||
dpi = gdk_screen_get_resolution_for_monitor (screen, monitor_num);
|
||||
gtk_range_set_value (GTK_RANGE (hscale), dpi);
|
||||
}
|
||||
|
||||
g_free (plug_name);
|
||||
g_free (font_name);
|
||||
}
|
||||
|
||||
static void
|
||||
window_mapped (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
update ();
|
||||
}
|
||||
|
||||
static void
|
||||
unit_changed (GtkWidget *widget, gpointer user_data)
|
||||
{
|
||||
update ();
|
||||
}
|
||||
|
||||
static void
|
||||
monitor_num_notify (GtkWindow *window, GParamSpec *psec, gpointer user_data)
|
||||
{
|
||||
g_debug ("notify::monitor-num");
|
||||
update ();
|
||||
}
|
||||
|
||||
static void
|
||||
update_value (void)
|
||||
{
|
||||
gdouble slider_value;
|
||||
|
||||
slider_value = gtk_range_get_value (GTK_RANGE (hscale));
|
||||
if (slider_value >= MIN_DPI && slider_value <= MAX_DPI)
|
||||
{
|
||||
GdkScreen *screen;
|
||||
gint monitor_num;
|
||||
|
||||
screen = gtk_window_get_screen (GTK_WINDOW (window));
|
||||
monitor_num = gtk_widget_get_monitor_num (window);
|
||||
if (screen != NULL && monitor_num >= 0)
|
||||
{
|
||||
gdk_screen_set_resolution_for_monitor (screen, monitor_num, slider_value);
|
||||
g_signal_emit_by_name (screen, "monitors-changed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean is_pressed = FALSE;
|
||||
|
||||
static gboolean
|
||||
hscale_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||
{
|
||||
is_pressed = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
hscale_button_release_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||
{
|
||||
is_pressed = FALSE;
|
||||
update_value ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
hscale_value_changed (GtkRange *range, gpointer user_data)
|
||||
{
|
||||
if (!is_pressed)
|
||||
update_value ();
|
||||
}
|
||||
|
||||
static char *
|
||||
hscale_format_value (GtkScale *scale, gdouble value, gpointer user_data)
|
||||
{
|
||||
return g_strdup_printf ("%g DPI", value);
|
||||
}
|
||||
|
||||
static void
|
||||
dpi_button_clicked (GtkButton *button, gpointer user_data)
|
||||
{
|
||||
gtk_range_set_value (GTK_RANGE (hscale), button_dpi);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_resolution_independence (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
|
||||
if (window != NULL)
|
||||
goto have_window;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Resolution Independence");
|
||||
gtk_window_set_icon_name (GTK_WINDOW (window), "gtk-fullscreen");
|
||||
|
||||
g_signal_connect (G_OBJECT (window), "map", G_CALLBACK (window_mapped), NULL);
|
||||
g_signal_connect (G_OBJECT (window), "notify::monitor-num", G_CALLBACK (monitor_num_notify), NULL);
|
||||
g_signal_connect (G_OBJECT (window), "unit-changed", G_CALLBACK (unit_changed), NULL);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, gtk_size_em (1));
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||
|
||||
hscale = gtk_hscale_new_with_range (MIN_DPI, MAX_DPI, STEP_DPI);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hscale, FALSE, FALSE, 0);
|
||||
|
||||
g_signal_connect (G_OBJECT (hscale), "value-changed", G_CALLBACK (hscale_value_changed), NULL);
|
||||
g_signal_connect (G_OBJECT (hscale), "button-press-event", G_CALLBACK (hscale_button_press_event), NULL);
|
||||
g_signal_connect (G_OBJECT (hscale), "button-release-event", G_CALLBACK (hscale_button_release_event), NULL);
|
||||
g_signal_connect (G_OBJECT (hscale), "format-value", G_CALLBACK (hscale_format_value), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), gtk_size_em (1));
|
||||
gtk_widget_set_size_request (window, GTK_SIZE_ONE_TWELFTH_EM (500), -1);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
|
||||
button = gtk_button_new ();
|
||||
g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (dpi_button_clicked), NULL);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
||||
/* avoid dialogs (e.g. printing) grabbing focus from us */
|
||||
if (window_group == NULL)
|
||||
window_group = gtk_window_group_new ();
|
||||
gtk_window_group_add_window (window_group, GTK_WINDOW (window));
|
||||
|
||||
/* make sure we're on top */
|
||||
gtk_window_set_keep_above (GTK_WINDOW (window), TRUE);
|
||||
|
||||
have_window:
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
{
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (window);
|
||||
window = NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1,101 +1,173 @@
|
||||
/* Rotated Text
|
||||
*
|
||||
* This demo shows how to use GDK and Pango to draw rotated and transformed
|
||||
* text. The use of GdkPangoRenderer in this example is a somewhat advanced
|
||||
* technique; most applications can simply use gdk_draw_layout(). We use
|
||||
* it here mostly because that allows us to work in user coordinates - that is,
|
||||
* coordinates prior to the application of the transformation matrix, rather
|
||||
* than device coordinates.
|
||||
* This demo shows how to use PangoCairo to draw rotated and transformed
|
||||
* text. The right pane shows a rotated GtkLabel widget.
|
||||
*
|
||||
* As of GTK+-2.6, the ability to draw transformed and anti-aliased graphics
|
||||
* as shown in this example is only present for text. With GTK+-2.8, a new
|
||||
* graphics system called "Cairo" will be introduced that provides these
|
||||
* capabilities and many more for all types of graphics.
|
||||
* In both cases, a custom PangoCairo shape renderer is installed to draw
|
||||
* a red heard using cairo drawing operations instead of the Unicode heart
|
||||
* character.
|
||||
*/
|
||||
#include <math.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
#define HEART "♥"
|
||||
const char text[] = "I ♥ GTK+";
|
||||
|
||||
static void
|
||||
fancy_shape_renderer (cairo_t *cr,
|
||||
PangoAttrShape *attr,
|
||||
gboolean do_path,
|
||||
gpointer data)
|
||||
{
|
||||
double x, y;
|
||||
cairo_get_current_point (cr, &x, &y);
|
||||
cairo_translate (cr, x, y);
|
||||
|
||||
cairo_scale (cr,
|
||||
(double) attr->ink_rect.width / PANGO_SCALE,
|
||||
(double) attr->ink_rect.height / PANGO_SCALE);
|
||||
|
||||
switch (GPOINTER_TO_UINT (attr->data))
|
||||
{
|
||||
case 0x2665: /* U+2665 BLACK HEART SUIT */
|
||||
{
|
||||
cairo_move_to (cr, .5, .0);
|
||||
cairo_line_to (cr, .9, -.4);
|
||||
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
|
||||
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (!do_path) {
|
||||
cairo_set_source_rgb (cr, 1., 0., 0.);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
}
|
||||
|
||||
PangoAttrList *
|
||||
create_fancy_attr_list_for_layout (PangoLayout *layout)
|
||||
{
|
||||
PangoAttrList *attrs;
|
||||
PangoFontMetrics *metrics;
|
||||
int ascent;
|
||||
PangoRectangle ink_rect, logical_rect;
|
||||
const char *p;
|
||||
|
||||
/* Get font metrics and prepare fancy shape size */
|
||||
metrics = pango_context_get_metrics (pango_layout_get_context (layout),
|
||||
pango_layout_get_font_description (layout),
|
||||
NULL);
|
||||
ascent = pango_font_metrics_get_ascent (metrics);
|
||||
logical_rect.x = 0;
|
||||
logical_rect.width = ascent;
|
||||
logical_rect.y = -ascent;
|
||||
logical_rect.height = ascent;
|
||||
ink_rect = logical_rect;
|
||||
pango_font_metrics_unref (metrics);
|
||||
|
||||
/* Set fancy shape attributes for all hearts */
|
||||
attrs = pango_attr_list_new ();
|
||||
for (p = text; (p = strstr (p, HEART)); p += strlen (HEART))
|
||||
{
|
||||
PangoAttribute *attr;
|
||||
|
||||
attr = pango_attr_shape_new_with_data (&ink_rect,
|
||||
&logical_rect,
|
||||
GUINT_TO_POINTER (g_utf8_get_char (p)),
|
||||
NULL, NULL);
|
||||
|
||||
attr->start_index = p - text;
|
||||
attr->end_index = attr->start_index + strlen (HEART);
|
||||
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
}
|
||||
|
||||
return attrs;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
rotated_text_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event,
|
||||
gpointer data)
|
||||
{
|
||||
#define RADIUS 150
|
||||
#define N_WORDS 10
|
||||
#define FONT "Sans Bold 27"
|
||||
|
||||
PangoRenderer *renderer;
|
||||
PangoMatrix matrix = PANGO_MATRIX_INIT;
|
||||
#define N_WORDS 5
|
||||
#define FONT "Serif 18"
|
||||
|
||||
PangoContext *context;
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
cairo_t *cr;
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
PangoAttrList *attrs;
|
||||
|
||||
int width = widget->allocation.width;
|
||||
int height = widget->allocation.height;
|
||||
double device_radius;
|
||||
int i;
|
||||
|
||||
/* Get the default renderer for the screen, and set it up for drawing */
|
||||
renderer = gdk_pango_renderer_get_default (gtk_widget_get_screen (widget));
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), widget->window);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), widget->style->black_gc);
|
||||
|
||||
/* Set up a transformation matrix so that the user space coordinates for
|
||||
* the centered square where we draw are [-RADIUS, RADIUS], [-RADIUS, RADIUS]
|
||||
* We first center, then change the scale */
|
||||
/* Create a cairo context and set up a transformation matrix so that the user
|
||||
* space coordinates for the centered square where we draw are [-RADIUS, RADIUS],
|
||||
* [-RADIUS, RADIUS].
|
||||
* We first center, then change the scale. */
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
device_radius = MIN (width, height) / 2.;
|
||||
pango_matrix_translate (&matrix,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
device_radius + (height - 2 * device_radius) / 2);
|
||||
pango_matrix_scale (&matrix, device_radius / RADIUS, device_radius / RADIUS);
|
||||
cairo_translate (cr,
|
||||
device_radius + (width - 2 * device_radius) / 2,
|
||||
device_radius + (height - 2 * device_radius) / 2);
|
||||
cairo_scale (cr, device_radius / RADIUS, device_radius / RADIUS);
|
||||
|
||||
/* Create a PangoLayout, set the font and text */
|
||||
/* Create and a subtle gradient source and use it. */
|
||||
pattern = cairo_pattern_create_linear (-RADIUS, -RADIUS, RADIUS, RADIUS);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 0., .5, .0, .0);
|
||||
cairo_pattern_add_color_stop_rgb (pattern, 1., .0, .0, .5);
|
||||
cairo_set_source (cr, pattern);
|
||||
|
||||
/* Create a PangoContext and set up our shape renderer */
|
||||
context = gtk_widget_create_pango_context (widget);
|
||||
pango_cairo_context_set_shape_renderer (context,
|
||||
fancy_shape_renderer,
|
||||
NULL, NULL);
|
||||
|
||||
/* Create a PangoLayout, set the text, font, and attributes */
|
||||
layout = pango_layout_new (context);
|
||||
pango_layout_set_text (layout, "Text", -1);
|
||||
pango_layout_set_text (layout, text, -1);
|
||||
desc = pango_font_description_from_string (FONT);
|
||||
pango_layout_set_font_description (layout, desc);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
attrs = create_fancy_attr_list_for_layout (layout);
|
||||
pango_layout_set_attributes (layout, attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
GdkColor color;
|
||||
PangoMatrix rotated_matrix = matrix;
|
||||
int width, height;
|
||||
double angle = (360. * i) / N_WORDS;
|
||||
|
||||
/* Gradient from red at angle == 60 to blue at angle == 300 */
|
||||
color.red = 65535 * (1 + cos ((angle - 60) * G_PI / 180.)) / 2;
|
||||
color.green = 0;
|
||||
color.blue = 65535 - color.red;
|
||||
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, &color);
|
||||
|
||||
pango_matrix_rotate (&rotated_matrix, angle);
|
||||
|
||||
pango_context_set_matrix (context, &rotated_matrix);
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_layout_context_changed (layout);
|
||||
pango_cairo_update_layout (cr, layout);
|
||||
|
||||
pango_layout_get_size (layout, &width, &height);
|
||||
pango_renderer_draw_layout (renderer, layout,
|
||||
- width / 2, - RADIUS * PANGO_SCALE);
|
||||
pango_layout_get_pixel_size (layout, &width, &height);
|
||||
cairo_move_to (cr, - width / 2, - RADIUS * .9);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
/* Rotate for the next turn */
|
||||
cairo_rotate (cr, G_PI*2 / N_WORDS);
|
||||
}
|
||||
|
||||
/* Clean up default renderer, since it is shared */
|
||||
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
|
||||
PANGO_RENDER_PART_FOREGROUND, NULL);
|
||||
gdk_pango_renderer_set_drawable (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
gdk_pango_renderer_set_gc (GDK_PANGO_RENDERER (renderer), NULL);
|
||||
|
||||
/* free the objects we created */
|
||||
pango_font_description_free (desc);
|
||||
g_object_unref (layout);
|
||||
g_object_unref (context);
|
||||
cairo_pattern_destroy (pattern);
|
||||
cairo_destroy (cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -103,21 +175,31 @@ rotated_text_expose_event (GtkWidget *widget,
|
||||
GtkWidget *
|
||||
do_rotated_text (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *drawing_area;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *box;
|
||||
GtkWidget *drawing_area;
|
||||
GtkWidget *label;
|
||||
PangoLayout *layout;
|
||||
PangoAttrList *attrs;
|
||||
|
||||
const GdkColor white = { 0, 0xffff, 0xffff, 0xffff };
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Rotated Text");
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
gtk_size_em ((4 * RADIUS)), gtk_size_em ((4 * RADIUS)));
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_hbox_new (TRUE, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
/* Add a drawing area */
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), drawing_area);
|
||||
gtk_container_add (GTK_CONTAINER (box), drawing_area);
|
||||
|
||||
/* This overrides the background color from the theme */
|
||||
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
|
||||
@@ -125,7 +207,20 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
g_signal_connect (drawing_area, "expose-event",
|
||||
G_CALLBACK (rotated_text_expose_event), NULL);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 2 * RADIUS, 2 * RADIUS);
|
||||
/* And a label */
|
||||
label = gtk_label_new (text);
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
|
||||
gtk_label_set_angle (label, 45);
|
||||
|
||||
/* Set up fancy stuff on the label */
|
||||
layout = gtk_label_get_layout (label);
|
||||
pango_cairo_context_set_shape_renderer (pango_layout_get_context (layout),
|
||||
fancy_shape_renderer,
|
||||
NULL, NULL);
|
||||
attrs = create_fancy_attr_list_for_layout (layout);
|
||||
gtk_label_set_attributes (label, attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -115,9 +115,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 5);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
||||
@@ -127,9 +127,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
add_row (GTK_TABLE (table), 0, size_group, "_Foreground", color_options);
|
||||
@@ -141,9 +141,9 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
|
||||
|
||||
table = gtk_table_new (2, 2, FALSE);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_row_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
add_row (GTK_TABLE (table), 0, size_group, "_Dashing", dash_options);
|
||||
|
||||
@@ -420,12 +420,12 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Stock Icons and Items");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, 500);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, GTK_SIZE_ONE_TWELFTH_EM (500));
|
||||
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 8);
|
||||
hbox = gtk_hbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
@@ -494,8 +494,8 @@ do_stock_browser (GtkWidget *do_widget)
|
||||
frame = gtk_frame_new ("Selected Item");
|
||||
gtk_container_add (GTK_CONTAINER (align), frame);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (4));
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
display = g_new (StockItemDisplay, 1);
|
||||
|
||||
@@ -182,9 +182,9 @@ do_textscroll (GtkWidget *do_widget)
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (600), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 6);
|
||||
hbox = gtk_hbox_new (TRUE, GTK_SIZE_ONE_TWELFTH_EM (6));
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
create_text_view (hbox, TRUE);
|
||||
|
||||
@@ -114,7 +114,7 @@ create_tags (GtkTextBuffer *buffer)
|
||||
"justification", GTK_JUSTIFY_RIGHT, NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "wide_margins",
|
||||
"left_margin", 50, "right_margin", 50,
|
||||
"left_margin", GTK_SIZE_ONE_TWELFTH_EM (50), "right_margin", GTK_SIZE_ONE_TWELFTH_EM (50),
|
||||
NULL);
|
||||
|
||||
gtk_text_buffer_create_tag (buffer, "strikethrough",
|
||||
@@ -139,9 +139,9 @@ create_tags (GtkTextBuffer *buffer)
|
||||
gtk_text_buffer_create_tag (buffer, "rtl_quote",
|
||||
"wrap_mode", GTK_WRAP_WORD,
|
||||
"direction", GTK_TEXT_DIR_RTL,
|
||||
"indent", 30,
|
||||
"left_margin", 20,
|
||||
"right_margin", 20,
|
||||
"indent", GTK_SIZE_ONE_TWELFTH_EM (30),
|
||||
"left_margin", GTK_SIZE_ONE_TWELFTH_EM (20),
|
||||
"right_margin", GTK_SIZE_ONE_TWELFTH_EM (20),
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,10 @@ insert_text (GtkTextBuffer *buffer)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
|
||||
scaled = gdk_pixbuf_scale_simple (pixbuf,
|
||||
gtk_size_to_pixel (NULL, 0, GTK_SIZE_ONE_TWELFTH_EM (32)),
|
||||
gtk_size_to_pixel (NULL, 0, GTK_SIZE_ONE_TWELFTH_EM (32)),
|
||||
GDK_INTERP_BILINEAR);
|
||||
g_object_unref (pixbuf);
|
||||
pixbuf = scaled;
|
||||
|
||||
@@ -409,7 +412,7 @@ attach_widgets (GtkTextView *text_view)
|
||||
{
|
||||
widget = gtk_hscale_new (NULL);
|
||||
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
|
||||
gtk_widget_set_size_request (widget, 70, -1);
|
||||
gtk_widget_set_size_request (widget, GTK_SIZE_ONE_TWELFTH_EM (70), -1);
|
||||
}
|
||||
else if (i == 3)
|
||||
{
|
||||
@@ -454,7 +457,7 @@ do_textview (GtkWidget *do_widget)
|
||||
gtk_window_set_screen (GTK_WINDOW (window),
|
||||
gtk_widget_get_screen (do_widget));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window),
|
||||
450, 450);
|
||||
GTK_SIZE_ONE_TWELFTH_EM (450), GTK_SIZE_ONE_TWELFTH_EM (450));
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
@@ -463,7 +466,7 @@ do_textview (GtkWidget *do_widget)
|
||||
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
|
||||
|
||||
vpaned = gtk_vpaned_new ();
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(vpaned), GTK_SIZE_ONE_TWELFTH_EM (5));
|
||||
gtk_container_add (GTK_CONTAINER (window), vpaned);
|
||||
|
||||
/* For convenience, we just use the autocreated buffer from
|
||||
@@ -534,7 +537,7 @@ recursive_attach_view (int depth,
|
||||
gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color);
|
||||
|
||||
align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), 1);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (align), GTK_SIZE_ONE_TWELFTH_EM (1));
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (event_box), align);
|
||||
gtk_container_add (GTK_CONTAINER (align), child_view);
|
||||
@@ -590,7 +593,7 @@ easter_egg_callback (GtkWidget *button,
|
||||
window_ptr = &window;
|
||||
g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
|
||||
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (300), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* havoc column */
|
||||
@@ -313,7 +313,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* tim column */
|
||||
@@ -336,7 +336,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* owen column */
|
||||
@@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
|
||||
/* dave column */
|
||||
@@ -380,7 +380,7 @@ add_columns (GtkTreeView *treeview)
|
||||
column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
|
||||
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
|
||||
GTK_TREE_VIEW_COLUMN_FIXED);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
|
||||
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GTK_SIZE_ONE_TWELFTH_EM (50));
|
||||
gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
|
||||
}
|
||||
|
||||
@@ -402,8 +402,8 @@ do_tree_store (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_vbox_new (FALSE, 8);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
|
||||
vbox = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (vbox), GTK_SIZE_ONE_TWELFTH_EM (8));
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@@ -435,7 +435,7 @@ do_tree_store (GtkWidget *do_widget)
|
||||
/* expand all rows after the treeview widget has been realized */
|
||||
g_signal_connect (treeview, "realize",
|
||||
G_CALLBACK (gtk_tree_view_expand_all), NULL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), GTK_SIZE_ONE_TWELFTH_EM (50), GTK_SIZE_ONE_TWELFTH_EM (400));
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
|
||||
@@ -204,7 +204,7 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
label = gtk_label_new ("Type\n<alt>\nto start");
|
||||
gtk_widget_set_size_request (label, 200, 200);
|
||||
gtk_widget_set_size_request (label, GTK_SIZE_ONE_TWELFTH_EM (200), GTK_SIZE_ONE_TWELFTH_EM (200));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
|
||||
|
||||
@@ -213,8 +213,8 @@ do_ui_manager (GtkWidget *do_widget)
|
||||
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
|
||||
|
||||
|
||||
box2 = gtk_vbox_new (FALSE, 10);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
|
||||
box2 = gtk_vbox_new (FALSE, GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_container_set_border_width (GTK_CONTAINER (box2), GTK_SIZE_ONE_TWELFTH_EM (10));
|
||||
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
|
||||
|
||||
button = gtk_button_new_with_label ("close");
|
||||
|
||||
@@ -189,6 +189,7 @@ load_file (const gchar *filename)
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
|
||||
fclose (file);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -19,3 +19,5 @@ EXTRA_DIST += \
|
||||
generation.txt \
|
||||
gtkdocs_fix \
|
||||
RELEASE-HOWTO
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -9,17 +9,19 @@ dependencies:
|
||||
Without those packages make distcheck will *not* pass.
|
||||
|
||||
|
||||
0) Blow away your gtk+ directory, check a new version out
|
||||
0) Go back to a pristine working directory. With git, this works:
|
||||
|
||||
1) autogen and build it, make sure to enable docs by specifying
|
||||
git clean -f -x
|
||||
|
||||
1) autogen and build it, make sure to enable docs by specifying
|
||||
--enable-gtk-doc --enable-man
|
||||
|
||||
2) Update NEWS based on the various ChangeLog files; follow the format
|
||||
2) Update NEWS based on the content of git log; follow the format
|
||||
of prior entries. This includes finding noteworthy new features,
|
||||
collecting summaries for all the fixed bugs that are referenced
|
||||
and collecting all updated translations.
|
||||
Also collect the names of all contributors that are mentioned.
|
||||
We don't discriminate between bug reporters, patch writers,
|
||||
and collecting all updated translations.
|
||||
Also collect the names of all contributors that are mentioned.
|
||||
We don't discriminate between bug reporters, patch writers,
|
||||
committers, etc. Anybody who is mentioned in ChangeLog gets
|
||||
credits, but only real names, not email addresses or nicknames.
|
||||
|
||||
@@ -29,14 +31,14 @@ Without those packages make distcheck will *not* pass.
|
||||
with configure.in.
|
||||
|
||||
4) Verify that the version in configure.in has been bumped after the last
|
||||
release. (Note that this is critical, a slip-up here will cause the
|
||||
release. (Note that this is critical, a slip-up here will cause the
|
||||
soname to change).
|
||||
|
||||
5) Make sure that make check is happy (If you don't do it here, make distcheck
|
||||
will also catch it, but it is kind of disheartening to see make distcheck
|
||||
fail due to an extraneous symbol after watching it build the docs for an
|
||||
hour...).
|
||||
Typical problems to expect here (depending on whether this is a devel
|
||||
will also catch it, but it is kind of disheartening to see make distcheck
|
||||
fail due to an extraneous symbol after watching it build the docs for an
|
||||
hour...).
|
||||
Typical problems to expect here (depending on whether this is a devel
|
||||
snapshot or a stable release):
|
||||
* forgotten source files
|
||||
* new symbols missing from .symbols files
|
||||
@@ -48,57 +50,58 @@ Without those packages make distcheck will *not* pass.
|
||||
|
||||
6) If this is a devel release, make sure that the docs for new symbols
|
||||
are in good shape. Look at the -unused.txt files and add stuff found
|
||||
there to the corresponding -sections.txt file. Look at the
|
||||
there to the corresponding -sections.txt file. Look at the
|
||||
-undocumented.txt files and see if there is anything in there that
|
||||
should be documented. If it is, this may be due to typos in the doc
|
||||
comments in the source. Make sure that all new symbols have proper
|
||||
Since: tags, and that there is an index in the main -docs.sgml for
|
||||
the next stable version.
|
||||
comments in the source. Make sure that all new symbols have proper
|
||||
Since: tags, and that there is an index in the main -docs.sgml for
|
||||
the next stable version.
|
||||
|
||||
7) Add === Released 2.x.y === at the top of all ChangeLog files
|
||||
7) make distcheck
|
||||
|
||||
8) make distcheck
|
||||
8) Fix broken stuff found by 7), repeat
|
||||
|
||||
9) Fix broken stuff found by 8), repeat
|
||||
9) Commit all changes: git commit -a. You will have a bunch of po file
|
||||
changes, NEWS and maybe some doc changes too
|
||||
|
||||
10) svn commit; you'll have a bunch of po file changes, ChangeLog updates,
|
||||
and maybe some doc changes too
|
||||
|
||||
11) If 10) fails because someone else committed inbetween, curse, svn up,
|
||||
fix conflicts and go to 8)
|
||||
|
||||
12) Now you've got the tarball. Check that the tarball size looks
|
||||
10) Now you've got the tarball. Check that the tarball size looks
|
||||
reasonable compared to previous releases. If the size goes down
|
||||
a lot, likely the docs went missing for some reason. Or the translations.
|
||||
If the size goes up by a lot, something else may be wrong.
|
||||
|
||||
13) Tag the release. The command for doing that looks like
|
||||
11) Tag the release. The git command for doing that looks like
|
||||
|
||||
svn cp svn+ssh://matthiasc@svn.gnome.org/svn/gtk+/branches/gtk-2-12 \
|
||||
svn+ssh://matthiasc@svn.gnome.org/svn/gtk+/tags/GTK_2_12_10
|
||||
git tag -m "GTK+ 2.12.10" 2.12.10
|
||||
|
||||
14) Bump the version number in configure.in and commit this change
|
||||
with a ChangeLog entry
|
||||
12) Push the tagged commit upstream. The git command for doing that is
|
||||
|
||||
15) Upload the tarball to master.gnome.org and run install-module to transfer
|
||||
git push origin refs/tags/2.12.10
|
||||
|
||||
13) Bump the version number in configure.in and commit and push this change
|
||||
|
||||
14) Upload the tarball to master.gnome.org and run install-module to transfer
|
||||
it to download.gnome.org. If you don't have an account on master.gnome.org,
|
||||
find someone who can do it for you. The command for this looks like
|
||||
|
||||
|
||||
scp gtk+-2.12.10.tar.gz matthiasc@master.gnome.org:
|
||||
ssh matthiasc@master.gnome.org
|
||||
install-module gtk+-2.12.10.tar.gz
|
||||
|
||||
16) Get the bz2 tarball and the .md5sum files back from master.gnome.org
|
||||
You can probably also create it locally, but I've experienced md5
|
||||
mismatches when doing so
|
||||
15) Get the .bz2 tarball and the .md5sum files back from master.gnome.org
|
||||
You can probably also create it locally, but I've experienced md5
|
||||
mismatches when doing so.
|
||||
|
||||
16) Upload the .gz and .bz2 tarballs and checksums to ftp.gtk.org and put
|
||||
them in the right directory below /ftp/pub. Pay attention to correct
|
||||
ownership, and don't forget to update the LATEST file in the directory.
|
||||
|
||||
17) Go to the gnome-announce list archives, find the last announce message,
|
||||
create a new message in the same form, replacing version numbers,
|
||||
commentary at the top about "what this release is about" and the
|
||||
Summary of changes.
|
||||
create a new message in the same form, replacing version numbers,
|
||||
commentary at the top about "what this release is about" and the
|
||||
summary of changes.
|
||||
|
||||
18) Send it to gnome-announce-list, gtk-list, gtk-app-devel-list and
|
||||
gtk-devel-list. Set reply-to to gnome-hackers.
|
||||
|
||||
19) Add a link to the release announcement to www.gtk.org which lives
|
||||
19) Add a link to the release announcement to www.gtk.org which lives
|
||||
in the gtk-web cvs module.
|
||||
|
||||
@@ -38,3 +38,5 @@ dist-hook:
|
||||
endif
|
||||
|
||||
.PHONY: html
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -824,8 +824,8 @@ However, bindings for many other languages are available.</para>
|
||||
<para>So, after you have installed GTK+ there are a couple of
|
||||
things that can ease you into developing applications with
|
||||
it. There is the GTK+ Tutorial <ulink
|
||||
url="http://www.gtk.org/tutorial/">
|
||||
http://www.gtk.org/tutorial/</ulink>, which is undergoing
|
||||
url="http://library.gnome.org/devel/gtk-tutorial/stable/">
|
||||
http://library.gnome.org/devel/gtk-tutorial/stable/</ulink>, which is undergoing
|
||||
development. This will introduce you to writing applications
|
||||
using C.</para>
|
||||
|
||||
|
||||
@@ -1,3 +1,28 @@
|
||||
=== ChangeLog discontinued ===
|
||||
|
||||
With the move to git, GTK+ is switching from a ChangeLog file
|
||||
to relying on commit messages to provide change history. Please
|
||||
see README.commits for guidance on the expected message format.
|
||||
|
||||
2009-03-25 Paul Bolle <pebolle@tiscali.nl>
|
||||
|
||||
Bug 562863 - GtkVscrollbar is hardly documented
|
||||
|
||||
* gtk/tmpl/gtkvscrollbar.sgml:
|
||||
* gtk/tmpl/gtkhscrollbar.sgml: Minor tweaks.
|
||||
|
||||
2009-03-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 576150 – Doc bug for GtkMenuPositionFunc
|
||||
|
||||
* gtk/tmpl/gtkmenu.sgml: Remove a misleading sentence.
|
||||
Pointed out by Owen Taylor.
|
||||
|
||||
2009-03-23 Claudio Saavedra <csaavedra@igalia.com>
|
||||
|
||||
* gdk-pixbuf/tmpl/animation.sgml: Fix typos and document the
|
||||
GdkPixbufSimpleAnim structure.
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.16.0 ===
|
||||
|
||||
@@ -3,3 +3,6 @@ include $(top_srcdir)/Makefile.decl
|
||||
|
||||
SUBDIRS = gdk-pixbuf gdk gtk libgail-util
|
||||
|
||||
GITIGNOREFILES = */*.1
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -79,19 +79,21 @@ EXTRA_DIST += version.xml.in \
|
||||
|
||||
########################################################################
|
||||
|
||||
man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1
|
||||
|
||||
if ENABLE_MAN
|
||||
|
||||
man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1
|
||||
|
||||
%.1 : %.xml
|
||||
@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||
|
||||
endif
|
||||
|
||||
BUILT_EXTRA_DIST = $(man_MANS)
|
||||
|
||||
endif
|
||||
|
||||
dist-hook-local: $(BUILT_EXTRA_DIST)
|
||||
files='$(BUILT_EXTRA_DIST)'; \
|
||||
for f in $$files; do \
|
||||
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
||||
cp $$d/$$f $(distdir) || exit 1; done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
'\" t
|
||||
.\" Title: gdk-pixbuf-csource
|
||||
.\" Author: [see the "Author" section]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.74.2 <http://docbook.sf.net/>
|
||||
.\" Date: 03/02/2009
|
||||
.\" Manual: [FIXME: manual]
|
||||
.\" Source: [FIXME: source]
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "GDK\-PIXBUF\-CSOURCE" "1" "03/02/2009" "[FIXME: source]" "[FIXME: manual]"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
gdk-pixbuf-csource \- C code generation utility for GdkPixbuf images
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBgdk\-pixbuf\-csource\fR\ 'u
|
||||
\fBgdk\-pixbuf\-csource\fR [options] [image]
|
||||
.HP \w'\fBgdk\-pixbuf\-csource\fR\ 'u
|
||||
\fBgdk\-pixbuf\-csource\fR [options] \-\-build\-list [[name]\ [image]...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
|
||||
\fBgdk\-pixbuf\-csource\fR
|
||||
is a small utility that generates C code containing images, useful for compiling images directly into programs\&.
|
||||
.SH "INVOCATION"
|
||||
.PP
|
||||
|
||||
\fBgdk\-pixbuf\-csource\fR
|
||||
either takes as input one image file name to generate code for, or, using the
|
||||
\fB\-\-build\-list\fR
|
||||
option, a list of (\fIname\fR,
|
||||
\fIimage\fR) pairs to generate code for a list of images into named variables\&.
|
||||
.SS "Options"
|
||||
.PP
|
||||
\fB\-\-stream\fR
|
||||
.RS 4
|
||||
Generate pixbuf data stream (a single string containing a serialized
|
||||
GdkPixdata
|
||||
structure in network byte order)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-struct\fR
|
||||
.RS 4
|
||||
Generate GdkPixdata structure (needs the
|
||||
GdkPixdata
|
||||
structure definition from
|
||||
gdk\-pixdata\&.h)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-macros\fR
|
||||
.RS 4
|
||||
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and *_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-rle\fR
|
||||
.RS 4
|
||||
Enables run\-length encoding for the generated pixel data (default)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-raw\fR
|
||||
.RS 4
|
||||
Disables run\-length encoding for the generated pixel data\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-extern\fR
|
||||
.RS 4
|
||||
Generate extern symbols\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-static\fR
|
||||
.RS 4
|
||||
Generate static symbols (default)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-decoder\fR
|
||||
.RS 4
|
||||
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition to decode run\-length encoded image data\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-name=identifier\fR
|
||||
.RS 4
|
||||
Specifies the identifier name (prefix) for the generated variables or macros (useful only if
|
||||
\fB\-\-build\-list\fR
|
||||
was not specified)\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-build\-list\fR
|
||||
.RS 4
|
||||
Enables (\fIname\fR,
|
||||
\fIimage\fR) pair parsing mode\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
.RS 4
|
||||
Print brief help and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
.RS 4
|
||||
Print version and exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-\-g\-fatal\-warnings\fR
|
||||
.RS 4
|
||||
Make warnings fatal (causes the program to abort)\&.
|
||||
.RE
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
The
|
||||
GdkPixbuf
|
||||
documentation, shipped with the Gtk+ distribution, available from
|
||||
\m[blue]\fBwww\&.gtk\&.org\fR\m[]\&\s-2\u[1]\d\s+2\&.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
The runlength encoder gets out of sync with the pixel boundaries, since it includes the rowstride padding in the encoded stream\&. Furthermore, it generates pixbufs with suboptimal rowstride in some cases\&.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
|
||||
\fBgdk\-pixbuf\-csource\fR
|
||||
was written by Tim Janik
|
||||
timj@gtk\&.org\&.
|
||||
.PP
|
||||
This manual page was provided by Tim Janik
|
||||
timj@gtk\&.org\&.
|
||||
.SH "NOTES"
|
||||
.IP " 1." 4
|
||||
www.gtk.org
|
||||
.RS 4
|
||||
\%http://www.gtk.org
|
||||
.RE
|
||||
@@ -1,50 +0,0 @@
|
||||
'\" t
|
||||
.\" Title: gdk-pixbuf-query-loaders
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.74.2 <http://docbook.sf.net/>
|
||||
.\" Date: 03/13/2009
|
||||
.\" Manual: [FIXME: manual]
|
||||
.\" Source: [FIXME: source]
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "GDK\-PIXBUF\-QUERY\-" "1" "03/13/2009" "[FIXME: source]" "[FIXME: manual]"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
gdk-pixbuf-query-loaders \- GdkPixbuf loader registration utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBgdk\-pixbuf\-query\-loaders\fR\ 'u
|
||||
\fBgdk\-pixbuf\-query\-loaders\fR [module...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
|
||||
\fBgdk\-pixbuf\-query\-loaders\fR
|
||||
collects information about loadable modules for
|
||||
gdk\-pixbuf
|
||||
and writes it to
|
||||
stdout\&.
|
||||
.PP
|
||||
If called without arguments, it looks for modules in the
|
||||
gdk\-pixbuf
|
||||
loader directory\&.
|
||||
.PP
|
||||
If called with arguments, it looks for the specified modules\&. The arguments may be absolute or relative paths\&.
|
||||
.SH "ENVIRONMENT"
|
||||
.PP
|
||||
The environment variable
|
||||
\fBGDK_PIXBUF_MODULEDIR\fR
|
||||
can be used to specify a different loader directory\&. The default
|
||||
gdk\-pixbuf
|
||||
loader directory is
|
||||
\fIlibdir\fR/gtk\-2\&.0/\fIversion\fR/loaders\&.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
None known yet\&.
|
||||
@@ -136,6 +136,8 @@ gdk_pixbuf_animation_iter_get_pixbuf
|
||||
GdkPixbufSimpleAnim
|
||||
gdk_pixbuf_simple_anim_new
|
||||
gdk_pixbuf_simple_anim_add_frame
|
||||
gdk_pixbuf_simple_anim_set_loop
|
||||
gdk_pixbuf_simple_anim_get_loop
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_PIXBUF_ANIMATION
|
||||
|
||||
@@ -25,13 +25,13 @@ Animated images.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
|
||||
<para>
|
||||
And opaque struct representing an animation.
|
||||
An opaque struct representing an animation.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufAnimationIter ##### -->
|
||||
<para>
|
||||
And opaque struct representing an iterator which points to a
|
||||
An opaque struct representing an iterator which points to a
|
||||
certain position in an animation.
|
||||
</para>
|
||||
|
||||
@@ -148,7 +148,7 @@ certain position in an animation.
|
||||
|
||||
<!-- ##### STRUCT GdkPixbufSimpleAnim ##### -->
|
||||
<para>
|
||||
An
|
||||
An opaque struct representing a simple animation.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -172,3 +172,21 @@ An
|
||||
@pixbuf:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_set_loop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@loop:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_get_loop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@animation:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -152,3 +152,5 @@ include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
# Other files to distribute
|
||||
EXTRA_DIST += version.xml.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -225,8 +225,12 @@ gdk_screen_broadcast_client_message
|
||||
gdk_screen_get_setting
|
||||
gdk_screen_get_font_options
|
||||
gdk_screen_set_font_options
|
||||
gdk_screen_get_font_options_for_monitor
|
||||
gdk_screen_set_font_options_for_monitor
|
||||
gdk_screen_get_resolution
|
||||
gdk_screen_set_resolution
|
||||
gdk_screen_get_resolution_for_monitor
|
||||
gdk_screen_set_resolution_for_monitor
|
||||
gdk_screen_get_active_window
|
||||
gdk_screen_get_window_stack
|
||||
<SUBSECTION Spawning>
|
||||
@@ -874,6 +878,7 @@ gdk_pango_renderer_set_stipple
|
||||
gdk_pango_renderer_set_override_color
|
||||
gdk_pango_context_get
|
||||
gdk_pango_context_get_for_screen
|
||||
gdk_pango_context_get_for_screen_for_monitor
|
||||
gdk_pango_context_set_colormap
|
||||
GdkPangoAttrEmbossed
|
||||
GdkPangoAttrEmbossColor
|
||||
|
||||
@@ -129,17 +129,18 @@ content_files = \
|
||||
drawing-model.xml \
|
||||
glossary.xml \
|
||||
migrating-checklist.sgml \
|
||||
migrating-GtkAboutDialog.sgml \
|
||||
migrating-GtkAction.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkBuilder.sgml \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkComboBox.sgml \
|
||||
migrating-GtkEntry-icons.sgml \
|
||||
migrating-GtkFileChooser.sgml \
|
||||
migrating-GtkIconView.sgml \
|
||||
migrating-GtkAboutDialog.sgml \
|
||||
migrating-GtkColorButton.sgml \
|
||||
migrating-GtkAssistant.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
migrating-GtkLabel-links.sgml \
|
||||
migrating-GtkLinkButton.sgml \
|
||||
migrating-GtkBuilder.sgml \
|
||||
migrating-GtkRecentChooser.sgml \
|
||||
migrating-GtkTooltip.sgml \
|
||||
objects_grouped.sgml \
|
||||
osx.sgml \
|
||||
@@ -344,7 +345,10 @@ HTML_IMAGES = \
|
||||
$(srcdir)/images/layout-rlbt.png \
|
||||
$(srcdir)/images/layout-rltb.png \
|
||||
$(srcdir)/images/layout-tblr.png \
|
||||
$(srcdir)/images/layout-tbrl.png
|
||||
$(srcdir)/images/layout-tbrl.png \
|
||||
$(srcdir)/images/gtk-ri-file-chooser-size-6.png \
|
||||
$(srcdir)/images/gtk-ri-file-chooser-size-12.png \
|
||||
$(srcdir)/images/gtk-ri-file-chooser-size-24.png
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html \
|
||||
@@ -361,19 +365,21 @@ EXTRA_DIST += version.xml.in
|
||||
|
||||
########################################################################
|
||||
|
||||
man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
|
||||
|
||||
if ENABLE_MAN
|
||||
|
||||
man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
|
||||
|
||||
%.1 : %.xml
|
||||
@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
|
||||
|
||||
endif
|
||||
|
||||
BUILT_EXTRA_DIST = $(man_MANS)
|
||||
|
||||
endif
|
||||
|
||||
dist-hook-local: $(BUILT_EXTRA_DIST)
|
||||
files='$(BUILT_EXTRA_DIST)'; \
|
||||
for f in $$files; do \
|
||||
if test -f $$f; then d=.; else d=$(srcdir); fi; \
|
||||
cp $$d/$$f $(distdir) || exit 1; done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
'\" t
|
||||
.\" Title: gtk-builder-convert
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.74.2 <http://docbook.sf.net/>
|
||||
.\" Date: 03/13/2009
|
||||
.\" Manual: [FIXME: manual]
|
||||
.\" Source: [FIXME: source]
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "GTK\-BUILDER\-CONVER" "1" "03/13/2009" "[FIXME: source]" "[FIXME: manual]"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
gtk-builder-convert \- Glade file conversion utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBgtk\-builder\-convert\fR\ 'u
|
||||
\fBgtk\-builder\-convert\fR [\-\-skip\-windows] [\-\-root\ \fIname\fR] {input} {output}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBgtk\-builder\-convert\fR
|
||||
converts glade files into XML files which can be loaded with GtkBuilder\&.
|
||||
.PP
|
||||
It expects the name of a glade file as the first argument, and writes its output the file specified as the second argument\&.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\-\-skip\-windows, \-w
|
||||
.RS 4
|
||||
Convert everything but GtkWindow subclasses\&.
|
||||
.RE
|
||||
.PP
|
||||
\-\-root, \-r
|
||||
.RS 4
|
||||
Convert only the widget named
|
||||
\fIname\fR
|
||||
and its children\&.
|
||||
.RE
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
Toolbars are not handled\&.
|
||||
.PP
|
||||
Support for accessibility is not yet implemented\&.
|
||||
.PP
|
||||
The script requires a python interpreter to run\&.
|
||||
@@ -126,6 +126,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtktypeutils.xml" />
|
||||
<xi:include href="xml/gtktesting.xml" />
|
||||
<xi:include href="xml/filesystem.xml" />
|
||||
<xi:include href="xml/gtksize.xml" />
|
||||
</part>
|
||||
|
||||
<part id="gtkobjects">
|
||||
@@ -159,6 +160,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/gtklabel.xml" />
|
||||
<xi:include href="xml/gtkprogressbar.xml" />
|
||||
<xi:include href="xml/gtkstatusbar.xml" />
|
||||
<xi:include href="xml/gtkinfobar.xml" />
|
||||
<xi:include href="xml/gtkstatusicon.xml" />
|
||||
</chapter>
|
||||
|
||||
@@ -432,6 +434,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<xi:include href="xml/migrating-GtkBuilder.sgml" />
|
||||
<xi:include href="xml/migrating-GtkTooltip.sgml" />
|
||||
<xi:include href="xml/migrating-GtkEntry-icons.sgml" />
|
||||
<xi:include href="xml/migrating-GtkLabel-links.sgml" />
|
||||
</part>
|
||||
|
||||
<part>
|
||||
@@ -483,4 +486,8 @@ that is, GUI components such as #GtkButton or #GtkTextView.
|
||||
<title>Index of new symbols in 2.16</title>
|
||||
<xi:include href="xml/api-index-2.16.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-18" role="2.18">
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
</book>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
'\" t
|
||||
.\" Title: gtk-query-immodules-2.0
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.74.2 <http://docbook.sf.net/>
|
||||
.\" Date: 03/13/2009
|
||||
.\" Manual: [FIXME: manual]
|
||||
.\" Source: [FIXME: source]
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "GTK\-QUERY\-IMMODULE" "1" "03/13/2009" "[FIXME: source]" "[FIXME: manual]"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
gtk-query-immodules-2.0 \- Input method module registration utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBgtk\-query\-immodules\-2\&.0\fR\ 'u
|
||||
\fBgtk\-query\-immodules\-2\&.0\fR [module...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
|
||||
\fBgtk\-query\-immodules\-2\&.0\fR
|
||||
collects information about loadable input method modules for GTK+ and writes it to
|
||||
stdout\&.
|
||||
.PP
|
||||
If called without arguments, it looks for modules in the GTK+ input method module path\&.
|
||||
.PP
|
||||
If called with arguments, it looks for the specified modules\&. The arguments may be absolute or relative paths\&.
|
||||
.SH "ENVIRONMENT"
|
||||
.PP
|
||||
The environment variable
|
||||
\fBGTK_PATH\fR
|
||||
can be used to prepend directories to the input method module path\&.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
None known yet\&.
|
||||
@@ -328,6 +328,7 @@ GtkAlignment
|
||||
gtk_alignment_new
|
||||
gtk_alignment_set
|
||||
gtk_alignment_get_padding
|
||||
gtk_alignment_get_padding_unit
|
||||
gtk_alignment_set_padding
|
||||
<SUBSECTION Standard>
|
||||
GTK_ALIGNMENT
|
||||
@@ -471,9 +472,11 @@ gtk_box_pack_end_defaults
|
||||
gtk_box_get_homogeneous
|
||||
gtk_box_set_homogeneous
|
||||
gtk_box_get_spacing
|
||||
gtk_box_get_spacing_unit
|
||||
gtk_box_set_spacing
|
||||
gtk_box_reorder_child
|
||||
gtk_box_query_child_packing
|
||||
gtk_box_query_child_packing_unit
|
||||
gtk_box_set_child_packing
|
||||
<SUBSECTION Standard>
|
||||
GTK_BOX
|
||||
@@ -1033,6 +1036,7 @@ gtk_container_unset_focus_chain
|
||||
gtk_container_class_find_child_property
|
||||
gtk_container_class_install_child_property
|
||||
gtk_container_class_list_child_properties
|
||||
gtk_container_get_border_width_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_CONTAINER
|
||||
GTK_IS_CONTAINER
|
||||
@@ -1414,6 +1418,7 @@ gtk_expander_set_expanded
|
||||
gtk_expander_get_expanded
|
||||
gtk_expander_set_spacing
|
||||
gtk_expander_get_spacing
|
||||
gtk_expander_get_spacing_unit
|
||||
gtk_expander_set_label
|
||||
gtk_expander_get_label
|
||||
gtk_expander_set_use_underline
|
||||
@@ -1931,14 +1936,19 @@ gtk_icon_view_set_columns
|
||||
gtk_icon_view_get_columns
|
||||
gtk_icon_view_set_item_width
|
||||
gtk_icon_view_get_item_width
|
||||
gtk_icon_view_get_item_width_unit
|
||||
gtk_icon_view_set_spacing
|
||||
gtk_icon_view_get_spacing
|
||||
gtk_icon_view_get_spacing_unit
|
||||
gtk_icon_view_set_row_spacing
|
||||
gtk_icon_view_get_row_spacing
|
||||
gtk_icon_view_get_row_spacing_unit
|
||||
gtk_icon_view_set_column_spacing
|
||||
gtk_icon_view_get_column_spacing
|
||||
gtk_icon_view_get_column_spacing_unit
|
||||
gtk_icon_view_set_margin
|
||||
gtk_icon_view_get_margin
|
||||
gtk_icon_view_get_margin_unit
|
||||
gtk_icon_view_select_path
|
||||
gtk_icon_view_unselect_path
|
||||
gtk_icon_view_path_is_selected
|
||||
@@ -2016,6 +2026,7 @@ gtk_image_set
|
||||
gtk_image_get
|
||||
gtk_image_set_pixel_size
|
||||
gtk_image_get_pixel_size
|
||||
gtk_image_get_pixel_size_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_IMAGE
|
||||
GTK_IS_IMAGE
|
||||
@@ -2274,6 +2285,7 @@ gtk_label_set_use_markup
|
||||
gtk_label_set_use_underline
|
||||
gtk_label_set_single_line_mode
|
||||
gtk_label_set_angle
|
||||
gtk_label_get_current_uri
|
||||
<SUBSECTION Standard>
|
||||
GTK_LABEL
|
||||
GTK_IS_LABEL
|
||||
@@ -2587,6 +2599,37 @@ GTK_MESSAGE_DIALOG_GET_CLASS
|
||||
gtk_message_dialog_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkinfobar</FILE>
|
||||
<TITLE>GtkInfoBar</TITLE>
|
||||
GtkInfoBar
|
||||
gtk_info_bar_new
|
||||
gtk_info_bar_new_with_buttons
|
||||
gtk_info_bar_set_contents
|
||||
gtk_info_bar_add_action_widget
|
||||
gtk_info_bar_add_button
|
||||
gtk_info_bar_add_buttons
|
||||
gtk_info_bar_set_response_sensitive
|
||||
gtk_info_bar_set_default_response
|
||||
gtk_info_bar_response
|
||||
gtk_info_bar_set_message_type
|
||||
gtk_info_bar_get_message_type
|
||||
gtk_info_bar_get_action_area
|
||||
gtk_info_bar_get_content_area
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_INFO_BAR
|
||||
GTK_INFO_BAR
|
||||
GTK_INFO_BAR_CLASS
|
||||
GTK_IS_INFO_BAR
|
||||
GTK_IS_INFO_BAR_CLASS
|
||||
GTK_INFO_BAR_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_info_bar_get_type
|
||||
GtkMessageAreaPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkmisc</FILE>
|
||||
<TITLE>GtkMisc</TITLE>
|
||||
@@ -2595,6 +2638,7 @@ gtk_misc_set_alignment
|
||||
gtk_misc_set_padding
|
||||
gtk_misc_get_alignment
|
||||
gtk_misc_get_padding
|
||||
gtk_misc_get_padding_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_MISC
|
||||
GTK_IS_MISC
|
||||
@@ -3598,10 +3642,14 @@ gtk_table_set_row_spacings
|
||||
gtk_table_set_col_spacings
|
||||
gtk_table_set_homogeneous
|
||||
gtk_table_get_default_row_spacing
|
||||
gtk_table_get_default_row_spacing_unit
|
||||
gtk_table_get_homogeneous
|
||||
gtk_table_get_row_spacing
|
||||
gtk_table_get_row_spacing_unit
|
||||
gtk_table_get_col_spacing
|
||||
gtk_table_get_col_spacing_unit
|
||||
gtk_table_get_default_col_spacing
|
||||
gtk_table_get_default_col_spacing_unit
|
||||
<SUBSECTION Standard>
|
||||
GTK_TABLE
|
||||
GTK_IS_TABLE
|
||||
@@ -3981,18 +4029,24 @@ gtk_text_view_set_overwrite
|
||||
gtk_text_view_get_overwrite
|
||||
gtk_text_view_set_pixels_above_lines
|
||||
gtk_text_view_get_pixels_above_lines
|
||||
gtk_text_view_get_pixels_above_lines_unit
|
||||
gtk_text_view_set_pixels_below_lines
|
||||
gtk_text_view_get_pixels_below_lines
|
||||
gtk_text_view_get_pixels_below_lines_unit
|
||||
gtk_text_view_set_pixels_inside_wrap
|
||||
gtk_text_view_get_pixels_inside_wrap
|
||||
gtk_text_view_get_pixels_inside_wrap_unit
|
||||
gtk_text_view_set_justification
|
||||
gtk_text_view_get_justification
|
||||
gtk_text_view_set_left_margin
|
||||
gtk_text_view_get_left_margin
|
||||
gtk_text_view_get_left_margin_unit
|
||||
gtk_text_view_set_right_margin
|
||||
gtk_text_view_get_right_margin
|
||||
gtk_text_view_get_right_margin_unit
|
||||
gtk_text_view_set_indent
|
||||
gtk_text_view_get_indent
|
||||
gtk_text_view_get_indent_unit
|
||||
gtk_text_view_set_tabs
|
||||
gtk_text_view_get_tabs
|
||||
gtk_text_view_set_accepts_tab
|
||||
@@ -4717,6 +4771,7 @@ gtk_tree_view_column_set_cell_data_func
|
||||
gtk_tree_view_column_clear_attributes
|
||||
gtk_tree_view_column_set_spacing
|
||||
gtk_tree_view_column_get_spacing
|
||||
gtk_tree_view_column_get_spacing_unit
|
||||
gtk_tree_view_column_set_visible
|
||||
gtk_tree_view_column_get_visible
|
||||
gtk_tree_view_column_set_resizable
|
||||
@@ -4725,11 +4780,14 @@ gtk_tree_view_column_set_sizing
|
||||
gtk_tree_view_column_get_sizing
|
||||
gtk_tree_view_column_get_width
|
||||
gtk_tree_view_column_get_fixed_width
|
||||
gtk_tree_view_column_get_fixed_width_unit
|
||||
gtk_tree_view_column_set_fixed_width
|
||||
gtk_tree_view_column_set_min_width
|
||||
gtk_tree_view_column_get_min_width
|
||||
gtk_tree_view_column_get_min_width_unit
|
||||
gtk_tree_view_column_set_max_width
|
||||
gtk_tree_view_column_get_max_width
|
||||
gtk_tree_view_column_get_max_width_unit
|
||||
gtk_tree_view_column_clicked
|
||||
gtk_tree_view_column_set_title
|
||||
gtk_tree_view_column_get_title
|
||||
@@ -4778,6 +4836,7 @@ GtkTreeViewMappingFunc
|
||||
GtkTreeViewSearchEqualFunc
|
||||
gtk_tree_view_new
|
||||
gtk_tree_view_get_level_indentation
|
||||
gtk_tree_view_get_level_indentation_unit
|
||||
gtk_tree_view_get_show_expanders
|
||||
gtk_tree_view_set_level_indentation
|
||||
gtk_tree_view_set_show_expanders
|
||||
@@ -4952,13 +5011,17 @@ GtkCellRendererMode
|
||||
GtkCellRenderer
|
||||
GtkCellRendererClass
|
||||
gtk_cell_renderer_get_size
|
||||
gtk_cell_renderer_get_size_unit
|
||||
gtk_cell_renderer_render
|
||||
gtk_cell_renderer_activate
|
||||
gtk_cell_renderer_start_editing
|
||||
gtk_cell_renderer_editing_canceled
|
||||
gtk_cell_renderer_stop_editing
|
||||
gtk_cell_renderer_get_fixed_size
|
||||
gtk_cell_renderer_get_fixed_size_unit
|
||||
gtk_cell_renderer_set_fixed_size
|
||||
gtk_cell_renderer_get_tree_view_column
|
||||
gtk_cell_renderer_get_tree_view
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_CELL_RENDERER
|
||||
@@ -5493,6 +5556,15 @@ gtk_widget_set_has_tooltip
|
||||
gtk_widget_trigger_tooltip_query
|
||||
gtk_widget_get_snapshot
|
||||
gtk_widget_get_window
|
||||
gtk_widget_get_monitor_num
|
||||
gtk_widget_get_size_request_unit
|
||||
gtk_widget_size_to_pixel
|
||||
gtk_widget_size_to_pixel_double
|
||||
gtk_widget_style_get_property_unit
|
||||
gtk_widget_style_get_unit_valist
|
||||
gtk_widget_style_get_unit
|
||||
gtk_widget_get_unit_valist
|
||||
gtk_widget_get_unit
|
||||
<SUBSECTION>
|
||||
gtk_requisition_copy
|
||||
gtk_requisition_free
|
||||
@@ -5579,6 +5651,7 @@ gtk_window_get_deletable
|
||||
gtk_window_get_default_icon_list
|
||||
gtk_window_get_default_icon_name
|
||||
gtk_window_get_default_size
|
||||
gtk_window_get_default_size_unit
|
||||
gtk_window_get_destroy_with_parent
|
||||
gtk_window_get_frame_dimensions
|
||||
gtk_window_get_has_frame
|
||||
@@ -5614,6 +5687,7 @@ gtk_window_set_icon_name
|
||||
gtk_window_set_auto_startup_notification
|
||||
gtk_window_get_opacity
|
||||
gtk_window_set_opacity
|
||||
gtk_window_get_monitor_num
|
||||
<SUBSECTION Standard>
|
||||
GTK_WINDOW
|
||||
GTK_IS_WINDOW
|
||||
@@ -5782,6 +5856,9 @@ gtk_style_set_font
|
||||
gtk_style_get_style_property
|
||||
gtk_style_get_valist
|
||||
gtk_style_get
|
||||
gtk_style_get_style_property_unit
|
||||
gtk_style_get_unit_valist
|
||||
gtk_style_get_unit
|
||||
gtk_draw_hline
|
||||
gtk_draw_vline
|
||||
gtk_draw_shadow
|
||||
@@ -6458,7 +6535,10 @@ gtk_icon_set_ref
|
||||
gtk_icon_set_render_icon
|
||||
gtk_icon_set_unref
|
||||
gtk_icon_size_lookup
|
||||
gtk_icon_size_lookup_unit
|
||||
gtk_icon_size_lookup_for_settings
|
||||
gtk_icon_size_lookup_for_settings_for_monitor
|
||||
gtk_icon_size_lookup_for_settings_unit
|
||||
gtk_icon_size_register
|
||||
gtk_icon_size_register_alias
|
||||
gtk_icon_size_from_name
|
||||
@@ -6532,6 +6612,10 @@ gtk_print_operation_set_defer_drawing
|
||||
gtk_print_operation_get_status
|
||||
gtk_print_operation_get_status_string
|
||||
gtk_print_operation_is_finished
|
||||
gtk_print_operation_set_support_selection
|
||||
gtk_print_operation_get_support_selection
|
||||
gtk_print_operation_set_has_selection
|
||||
gtk_print_operation_get_has_selection
|
||||
gtk_print_run_page_setup_dialog
|
||||
GtkPageSetupDoneFunc
|
||||
gtk_print_run_page_setup_dialog_async
|
||||
@@ -6576,8 +6660,13 @@ gtk_print_unix_dialog_set_settings
|
||||
gtk_print_unix_dialog_get_settings
|
||||
gtk_print_unix_dialog_get_selected_printer
|
||||
gtk_print_unix_dialog_add_custom_tab
|
||||
gtk_print_unix_dialog_set_support_selection
|
||||
gtk_print_unix_dialog_get_support_selection
|
||||
gtk_print_unix_dialog_set_has_selection
|
||||
gtk_print_unix_dialog_get_has_selection
|
||||
GtkPrintCapabilities
|
||||
gtk_print_unix_dialog_set_manual_capabilities
|
||||
gtk_print_unix_dialog_get_manual_capabilities
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_PRINT_UNIX_DIALOG
|
||||
@@ -6995,3 +7084,31 @@ GTK_TYPE_ORIENTABLE
|
||||
<SUBSECTION Private>
|
||||
gtk_orientable_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<TITLE>Units</TITLE>
|
||||
<FILE>gtksize</FILE>
|
||||
GtkSize
|
||||
GtkUSize
|
||||
GtkSizeUnit
|
||||
gtk_size_em
|
||||
gtk_size_mm
|
||||
gtk_size_get_em
|
||||
gtk_size_get_mm
|
||||
GTK_SIZE_ONE_TWELFTH_EM
|
||||
GTK_SIZE_MAXPIXEL
|
||||
GTK_SIZE_MINPIXEL
|
||||
gtk_size_get_unit
|
||||
gtk_size_to_pixel
|
||||
gtk_size_to_pixel_double
|
||||
gtk_size_to_string
|
||||
gtk_param_spec_size
|
||||
gtk_value_set_size
|
||||
gtk_value_get_size
|
||||
gtk_value_size_skip_conversion
|
||||
gtk_param_spec_usize
|
||||
gtk_value_set_usize
|
||||
gtk_value_get_usize
|
||||
gtk_value_usize_skip_conversion
|
||||
gtk_enable_resolution_independence
|
||||
</SECTION>
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
.\" ** You probably do not want to edit this file directly **
|
||||
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
|
||||
.\" Instead of manually editing it, you probably should edit the DocBook XML
|
||||
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
|
||||
.TH "GTK\-UPDATE\-ICON\-CACH" "1" "11/07/2005" "" ""
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH "NAME"
|
||||
gtk\-update\-icon\-cache \- Icon theme caching utility
|
||||
.SH "SYNOPSIS"
|
||||
.HP 22
|
||||
\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-ignore\-theme\-index] [\-\-index\-only] [\-\-source\ [name]] [\-\-quiet] {iconpath}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBgtk\-update\-icon\-cache\fR
|
||||
creates mmap()able cache files for icon themes.
|
||||
.PP
|
||||
It expects to be given the path to a icon theme directory containing an
|
||||
\fIindex.theme\fR, e.g.
|
||||
\fI/usr/share/icons/hicolor\fR, and writes a
|
||||
\fIicon\-theme.cache\fR
|
||||
containing cached information about the icons in the directory tree below the given directory.
|
||||
.PP
|
||||
GTK+ can use the cache files created by
|
||||
\fBgtk\-update\-icon\-cache\fR
|
||||
to avoid a lot of system call and disk seek overhead when the application starts. Since the format of the cache files allows them to be mmap()ed shared between multiple applications, the overall memory consumption is reduced as well.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\-\-force, \-f
|
||||
Overwrite an existing cache file even if it appears to be uptodate.
|
||||
.TP
|
||||
\-\-ignore\-theme\-index, \-t
|
||||
Don't check for the existence of 'index.theme' in the icon theme directory. Without this option,
|
||||
\fBgtk\-update\-icon\-cache\fR
|
||||
refuses to create an icon cache in a directory which does not appear to be the toplevel directory of an icon theme.
|
||||
.TP
|
||||
\-\-index\-only, \-i
|
||||
Don't include image data in the cache.
|
||||
.TP
|
||||
\-\-source, \-c
|
||||
Output a C header file declaring a constant
|
||||
\fIname\fR
|
||||
with the contents of the icon cache.
|
||||
.TP
|
||||
\-\-quiet, \-q
|
||||
Turn off verbose output.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
None known yet.
|
||||
@@ -72,6 +72,7 @@ gtk_hruler_get_type
|
||||
gtk_hscale_get_type
|
||||
gtk_hscrollbar_get_type
|
||||
gtk_hseparator_get_type
|
||||
gtk_hsv_get_type
|
||||
gtk_icon_factory_get_type
|
||||
gtk_icon_theme_get_type
|
||||
gtk_icon_view_get_type
|
||||
@@ -80,6 +81,7 @@ gtk_image_menu_item_get_type
|
||||
gtk_im_context_get_type
|
||||
gtk_im_context_simple_get_type
|
||||
gtk_im_multicontext_get_type
|
||||
gtk_info_bar_get_type
|
||||
gtk_input_dialog_get_type
|
||||
gtk_invisible_get_type
|
||||
gtk_item_factory_get_type
|
||||
|
||||
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-12.png
Normal file
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-12.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 60 KiB |
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-24.png
Normal file
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-24.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-6.png
Normal file
BIN
docs/reference/gtk/images/gtk-ri-file-chooser-size-6.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -16,14 +16,65 @@
|
||||
A good way to start a migration from libglade to GtkBuilder is
|
||||
to run the <link linkend="gtk-builder-convert">gtk-builder-convert</link>
|
||||
utility on your glade file, and inspect the resulting output.
|
||||
If your code uses the @root parameter of glade_xml_new(), you
|
||||
If your code uses the @root parameter of glade_xml_new(), you
|
||||
may want to split your glade file into multiple GtkBuilder files
|
||||
by using the <option>--root</option> option of
|
||||
by using the <option>--root</option> option of
|
||||
<application>gtk-builder-convert</application>. Alternatively, you
|
||||
can use gtk_builder_add_objects_from_file() to construct only certain
|
||||
objects from a GtkBuilder file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Alternatively, you can open the glade file with
|
||||
<application>glade3</application> and then save it in GtkBuilder
|
||||
format. This is supported by glade3 since version 3.6.
|
||||
</para>
|
||||
|
||||
<table pgwide="1" frame="topbot">
|
||||
<title>Step-by-step instructions for porting code from libglade to GtkBuilder</title>
|
||||
<tgroup cols="2" colsep="0" rowsep="0">
|
||||
<thead>
|
||||
<row><entry>libglade</entry><entry>GtkBuilder</entry></row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry><![CDATA[#include <glade/glade.h>]]></entry>
|
||||
<entry>not needed</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>GladeXML*</screen></entry>
|
||||
<entry><screen>GtkBuilder*</screen></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_xml_new (FILE, "first_widget", NULL)</screen></entry>
|
||||
<entry>
|
||||
<screen>
|
||||
GError* error = NULL;
|
||||
GtkBuilder* builder = gtk_builder_new (<!-- -->);
|
||||
if (!gtk_builder_add_from_file (builder, FILE, &error))
|
||||
{
|
||||
g_warning ("Couldn't load builder file: %amp;s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
</screen>
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_xml_get_widget (gxml, “widget_name”)</screen></entry>
|
||||
<entry><screen>GTK_WIDGET (gtk_builder_get_object (builder, “widget_name”))</screen></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_get_widget_name (widget)</screen></entry>
|
||||
<entry><screen>gtk_widget_get_name (widget)</screen></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><screen>glade_xml_get_widget_prefix (gxml, “prefix”)</screen></entry>
|
||||
<entry>can be emulated by <literal>gtk_builder_get_objects (builder)</literal> together with manual filtering. It returns a GSList* instead of a GList* though.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<para>
|
||||
While GtkBuilder strives to be a complete replacement for
|
||||
libglade, there are a number of areas where it is currently
|
||||
@@ -32,21 +83,23 @@
|
||||
|
||||
<listitem><para>
|
||||
GtkBuilder supports context information in translatable
|
||||
properties in a slightly different way than libglade.
|
||||
Intltool does not yet support this; see
|
||||
<ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=454894">bug
|
||||
454894</ulink> for the current status of intltool support for
|
||||
GtkBuilder files. Thankfully, context in translations is a
|
||||
rarely used feature, and if you are not using it, intltools
|
||||
properties in a slightly different way than libglade.
|
||||
Intltool does not yet support this; see
|
||||
<ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=454894">bug
|
||||
454894</ulink> for the current status of intltool support for
|
||||
GtkBuilder files. Thankfully, context in translations is a
|
||||
rarely used feature, and if you are not using it, intltools
|
||||
glade format support works just fine for GtkBuilder files.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
While libglade can often tolerate multiple widgets having the
|
||||
same id in a glade file, GtkBuilder will not accept duplicate
|
||||
object ids. Both <application>gtk-builder-convert</application>
|
||||
and the GtkBuilder parser emit warnings when they see
|
||||
duplicate ids.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
More details about migrating from libglade to GtkBuilder will
|
||||
appear here over time...
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
24
docs/reference/gtk/migrating-GtkLabel-links.sgml
Normal file
24
docs/reference/gtk/migrating-GtkLabel-links.sgml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
||||
]>
|
||||
<chapter id="gtk-migrating-label-links">
|
||||
|
||||
<title>Migrating from SexyUrlLabel to GtkLabel</title>
|
||||
|
||||
<para>
|
||||
GTK+ 2.18 supports showing links inside a #GtkLabel, similar to
|
||||
SexyUrlLabel. Porting from SexyUrlLabel to GtkLabel is relatively
|
||||
straightforward. GtkLabel accepts links in the markup using the
|
||||
same HTML <tag>a</tag> notation that SexyUrlLabel uses. In addition
|
||||
to the href attribute, GtkLabel accepts a title attribute that
|
||||
is displayed as a tooltip on the link. Instead of
|
||||
sexy_url_label_set_markup(), just call gtk_label_set_markup().
|
||||
</para>
|
||||
<para>
|
||||
One difference between the two APIs is that the ::url-activated signal
|
||||
from SexyUrlLabel has been replaced by the #GtkLabel::activate-link
|
||||
signal. The need for connecting to this signal is greatly reduced,
|
||||
since GtkLabel has a default handler that calls gtk_show_uri().
|
||||
</para>
|
||||
</chapter>
|
||||
106
docs/reference/gtk/tmpl/filesystem.sgml
Normal file
106
docs/reference/gtk/tmpl/filesystem.sgml
Normal file
@@ -0,0 +1,106 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Filesystem utilities
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkMountOperation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:is-showing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkMountOperation:screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@parent:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_is_showing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_set_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@parent:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_get_parent ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_set_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@screen:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_mount_operation_get_screen ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_show_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@uri:
|
||||
@timestamp:
|
||||
@error:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -24,16 +24,20 @@ recognized by looking for <literal>http://url</literal>, with
|
||||
<literal>url</literal> extending to the next space, tab or line break.
|
||||
</para>
|
||||
<para id="gtk-about-dialog-hook-setup">
|
||||
When setting the website and email hooks for the #GtkAboutDialog widget,
|
||||
you should remember that the order is important: you should set the hook
|
||||
functions before setting the website and email URL properties, like this:
|
||||
Since 2.18 #GtkAboutDialog provides default website and email hooks that use
|
||||
gtk_show_uri().
|
||||
</para>
|
||||
<para>
|
||||
If you want provide your own hooks overriding the default ones, it is important
|
||||
to do so before setting the website and email URL properties, like this:
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
gtk_about_dialog_set_url_hook (GTK_ABOUT_DIALOG (dialog), launch_url, NULL, NULL);
|
||||
gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), app_url);
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
Otherwise the GtkAboutDialog widget will not display the website and the
|
||||
To disable the default hooks, you can pass %NULL as the hook func. Then,
|
||||
the #GtkAboutDialog widget will not display the website or the
|
||||
email addresses as clickable.
|
||||
</para>
|
||||
<para>
|
||||
|
||||
98
docs/reference/gtk/tmpl/gtkactivatable.sgml
Normal file
98
docs/reference/gtk/tmpl/gtkactivatable.sgml
Normal file
@@ -0,0 +1,98 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkActivatable
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkActivatable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ARG GtkActivatable:related-action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkActivatable:use-action-appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### STRUCT GtkActivatableIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@g_iface:
|
||||
@update:
|
||||
@sync_action_properties:
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_do_set_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_get_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_get_use_action_appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_sync_action_properties ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_set_related_action ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@action:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_activatable_set_use_action_appearance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@activatable:
|
||||
@use_appearance:
|
||||
|
||||
|
||||
@@ -10,6 +10,16 @@ A #GtkAssistant is a widget used to represent a generally complex
|
||||
operation splitted in several steps, guiding the user through its pages
|
||||
and controlling the page flow to collect the necessary data.
|
||||
</para>
|
||||
<refsect2 id="GtkAssistant-BUILDER-UI"><title>GtkAssistant as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkAssistant implementation of the GtkBuildable interface exposes the
|
||||
@action_area as internal children with the name "action_area".
|
||||
</para>
|
||||
<para>
|
||||
To add pages to an assistant in GtkBuilder, simply add it as a <child>
|
||||
to the GtkAssistant object, and set its child properties as necessary.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
@@ -7,46 +7,46 @@ Build an interface from an XML UI definition
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A GtkBuilder is an auxiliary object that reads textual descriptions
|
||||
of a user interface and instantiates the described objects. To pass a
|
||||
description to a GtkBuilder, call gtk_builder_add_from_file() or
|
||||
of a user interface and instantiates the described objects. To pass a
|
||||
description to a GtkBuilder, call gtk_builder_add_from_file() or
|
||||
gtk_builder_add_from_string(). These functions can be called multiple
|
||||
times; the builder merges the content of all descriptions.
|
||||
times; the builder merges the content of all descriptions.
|
||||
</para>
|
||||
<para>
|
||||
A GtkBuilder holds a reference to all objects that it has constructed
|
||||
and drops these references when it is finalized. This finalization can
|
||||
cause the destruction of non-widget objects or widgets which are not
|
||||
contained in a toplevel window. For toplevel windows constructed by a
|
||||
builder, it is the responsibility of the user to call gtk_widget_destroy()
|
||||
and drops these references when it is finalized. This finalization can
|
||||
cause the destruction of non-widget objects or widgets which are not
|
||||
contained in a toplevel window. For toplevel windows constructed by a
|
||||
builder, it is the responsibility of the user to call gtk_widget_destroy()
|
||||
to get rid of them and all the widgets they contain.
|
||||
</para>
|
||||
<para>
|
||||
The functions gtk_builder_get_object() and gtk_builder_get_objects()
|
||||
can be used to access the widgets in the interface by the names assigned
|
||||
can be used to access the widgets in the interface by the names assigned
|
||||
to them inside the UI description. Toplevel windows returned by these
|
||||
functions will stay around until the user explicitly destroys them
|
||||
with gtk_widget_destroy(). Other widgets will either be part of a
|
||||
with gtk_widget_destroy(). Other widgets will either be part of a
|
||||
larger hierarchy constructed by the builder (in which case you should
|
||||
not have to worry about their lifecycle), or without a parent, in which
|
||||
case they have to be added to some container to make use of them.
|
||||
not have to worry about their lifecycle), or without a parent, in which
|
||||
case they have to be added to some container to make use of them.
|
||||
Non-widget objects need to be reffed with g_object_ref() to keep them
|
||||
beyond the lifespan of the builder.
|
||||
</para>
|
||||
<para>
|
||||
The function gtk_builder_connect_signals() and variants thereof can be
|
||||
used to connect handlers to the named signals in the description.
|
||||
The function gtk_builder_connect_signals() and variants thereof can be
|
||||
used to connect handlers to the named signals in the description.
|
||||
</para>
|
||||
|
||||
<refsect2 id="BUILDER-UI"><title>GtkBuilder UI Definitions</title>
|
||||
<para>
|
||||
GtkBuilder parses textual descriptions of user interfaces which
|
||||
are specified in an XML format which can be roughly described
|
||||
by the DTD below. We refer to these descriptions as
|
||||
GtkBuilder parses textual descriptions of user interfaces which
|
||||
are specified in an XML format which can be roughly described
|
||||
by the DTD below. We refer to these descriptions as
|
||||
<firstterm>GtkBuilder UI definitions</firstterm> or just
|
||||
<firstterm>UI definitions</firstterm> if the context is clear.
|
||||
Do not confuse GtkBuilder UI Definitions with
|
||||
<link linkend="XML-UI">GtkUIManager UI Definitions</link>,
|
||||
which are more limited in scope.
|
||||
Do not confuse GtkBuilder UI Definitions with
|
||||
<link linkend="XML-UI">GtkUIManager UI Definitions</link>,
|
||||
which are more limited in scope.
|
||||
</para>
|
||||
<para>
|
||||
<programlisting><![CDATA[
|
||||
@@ -65,7 +65,7 @@ which are more limited in scope.
|
||||
<!ATTLIST requires lib #REQUIRED
|
||||
version #REQUIRED >
|
||||
<!ATTLIST property name #REQUIRED
|
||||
translatable #IMPLIED
|
||||
translatable #IMPLIED
|
||||
comments #IMPLIED
|
||||
context #IMPLIED >
|
||||
<!ATTLIST signal name #REQUIRED
|
||||
@@ -93,7 +93,7 @@ or columns in a tree model). A <child> element contains
|
||||
an <object> element which describes the child object.
|
||||
The target toolkit version(s) are described by <requires>
|
||||
elements, the "lib" attribute specifies the widget library in
|
||||
question (currently the only supported value is "gtk+") and the "version"
|
||||
question (currently the only supported value is "gtk+") and the "version"
|
||||
attribute specifies the target version in the form "<major>.<minor>".
|
||||
The builder will error out if the version requirements are not met.
|
||||
</para>
|
||||
@@ -101,28 +101,28 @@ The builder will error out if the version requirements are not met.
|
||||
Typically, the specific kind of object represented by an
|
||||
<object> element is specified by the "class" attribute.
|
||||
If the type has not been loaded yet, GTK+ tries to find the
|
||||
<function>_get_type()</function> from the class name by applying
|
||||
<function>_get_type()</function> from the class name by applying
|
||||
heuristics. This works in most cases, but if necessary, it is
|
||||
possible to specify the name of the <function>_get_type()</function>
|
||||
explictly with the "type-func" attribute. As a special case,
|
||||
possible to specify the name of the <function>_get_type()</function>
|
||||
explictly with the "type-func" attribute. As a special case,
|
||||
GtkBuilder allows to use an object that has been constructed
|
||||
by a #GtkUIManager in another part of the UI definition by
|
||||
specifying the id of the #GtkUIManager in the "constructor"
|
||||
attribute and the name of the object in the "id" attribute.
|
||||
</para>
|
||||
<para>
|
||||
Objects must be given a name with the "id" attribute, which
|
||||
allows the application to retrieve them from the builder with
|
||||
gtk_builder_get_object(). An id is also necessary to use the
|
||||
Objects must be given a name with the "id" attribute, which
|
||||
allows the application to retrieve them from the builder with
|
||||
gtk_builder_get_object(). An id is also necessary to use the
|
||||
object as property value in other parts of the UI definition.
|
||||
</para>
|
||||
<para>
|
||||
Setting properties of objects is pretty straightforward with
|
||||
the <property> element: the "name" attribute specifies
|
||||
the name of the property, and the content of the element
|
||||
specifies the value. If the "translatable" attribute is
|
||||
the name of the property, and the content of the element
|
||||
specifies the value. If the "translatable" attribute is
|
||||
set to a true value, GTK+ uses gettext() (or dgettext() if
|
||||
the builder has a translation domain set) to find a translation
|
||||
the builder has a translation domain set) to find a translation
|
||||
for the value. This happens before the value is parsed, so
|
||||
it can be used for properties of any type, but it is probably
|
||||
most useful for string properties. It is also possible to
|
||||
@@ -134,16 +134,16 @@ GtkBuilder can parse textual representations for the most
|
||||
common property types: characters, strings, integers, floating-point
|
||||
numbers, booleans (strings like "TRUE", "t", "yes", "y", "1" are
|
||||
interpreted as %TRUE, strings like "FALSE, "f", "no", "n", "0" are
|
||||
interpreted as %FALSE), enumerations (can be specified by their
|
||||
name, nick or integer value), flags (can be specified by their name,
|
||||
nick, integer value, optionally combined with "|", e.g.
|
||||
"GTK_VISIBLE|GTK_REALIZED") and colors (in a format understood by
|
||||
gdk_color_parse()). Objects can be referred to by their name.
|
||||
interpreted as %FALSE), enumerations (can be specified by their
|
||||
name, nick or integer value), flags (can be specified by their name,
|
||||
nick, integer value, optionally combined with "|", e.g.
|
||||
"GTK_VISIBLE|GTK_REALIZED") and colors (in a format understood by
|
||||
gdk_color_parse()). Objects can be referred to by their name.
|
||||
Pixbufs can be specified as a filename of an image file to load.
|
||||
In general, GtkBuilder allows forward references to objects —
|
||||
In general, GtkBuilder allows forward references to objects —
|
||||
an object doesn't have to constructed before it can be referred to.
|
||||
The exception to this rule is that an object has to be constructed
|
||||
before it can be used as the value of a construct-only property.
|
||||
before it can be used as the value of a construct-only property.
|
||||
</para>
|
||||
<para>
|
||||
Signal handlers are set up with the <signal> element.
|
||||
@@ -152,25 +152,25 @@ The "name" attribute specifies the name of the signal, and the
|
||||
By default, GTK+ tries to find the handler using g_module_symbol(),
|
||||
but this can be changed by passing a custom #GtkBuilderConnectFunc
|
||||
to gtk_builder_connect_signals_full(). The remaining attributes,
|
||||
"after", "swapped" and "object", have the same meaning as the
|
||||
"after", "swapped" and "object", have the same meaning as the
|
||||
corresponding parameters of the g_signal_connect_object() or
|
||||
g_signal_connect_data() functions. A "last_modification_time" attribute
|
||||
is also allowed, but it does not have a meaning to the builder.
|
||||
</para>
|
||||
<para>
|
||||
Sometimes it is necessary to refer to widgets which have implicitly
|
||||
been constructed by GTK+ as part of a composite widget, to set
|
||||
properties on them or to add further children (e.g. the @vbox
|
||||
been constructed by GTK+ as part of a composite widget, to set
|
||||
properties on them or to add further children (e.g. the @vbox
|
||||
of a #GtkDialog). This can be achieved by setting the "internal-child"
|
||||
propery of the <child> element to a true value. Note that
|
||||
GtkBuilder still requires an <object> element for the internal
|
||||
child, even if it has already been constructed.
|
||||
</para>
|
||||
<para>
|
||||
A number of widgets have different places where a child can be
|
||||
A number of widgets have different places where a child can be
|
||||
added (e.g. tabs vs. page content in notebooks). This can be reflected
|
||||
in a UI definition by specifying the "type" attribute on a <child>
|
||||
The possible values for the "type" attribute are described in
|
||||
The possible values for the "type" attribute are described in
|
||||
the sections describing the widget-specific portions of UI definitions.
|
||||
</para>
|
||||
<example>
|
||||
@@ -205,11 +205,11 @@ their own XML DTD fragments for filling in the ANY placeholders
|
||||
in the DTD above. Note that a custom element in a <child>
|
||||
element gets parsed by the custom tag handler of the parent
|
||||
object, while a custom element in an <object> element
|
||||
gets parsed by the custom tag handler of the object.
|
||||
gets parsed by the custom tag handler of the object.
|
||||
</para>
|
||||
<para>
|
||||
These XML fragments are explained in the documentation of the
|
||||
respective objects, see
|
||||
respective objects, see
|
||||
<link linkend="GtkWidget-BUILDER-UI">GtkWidget</link>,
|
||||
<link linkend="GtkLabel-BUILDER-UI">GtkLabel</link>,
|
||||
<link linkend="GtkWindow-BUILDER-UI">GtkWindow</link>,
|
||||
@@ -228,7 +228,9 @@ respective objects, see
|
||||
<link linkend="GtkTreeView-BUILDER-UI">GtkTreeView</link>,
|
||||
<link linkend="GtkUIManager-BUILDER-UI">GtkUIManager</link>,
|
||||
<link linkend="GtkActionGroup-BUILDER-UI">GtkActionGroup</link>.
|
||||
<link linkend="GtkMenuItem-BUILDER-UI">GtkMenuItem</link>.
|
||||
<link linkend="GtkMenuItem-BUILDER-UI">GtkMenuItem</link>,
|
||||
<link linkend="GtkAssistant-BUILDER-UI">GtkAssistant</link>,
|
||||
<link linkend="GtkScale-BUILDER-UI">GtkScale</link>.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
@@ -285,6 +287,7 @@ using #GtkBuilder.
|
||||
some attribute value.
|
||||
@GTK_BUILDER_ERROR_VERSION_MISMATCH: The input file requires a newer version
|
||||
of GTK+.
|
||||
@GTK_BUILDER_ERROR_DUPLICATE_ID: An object id occurred twice.
|
||||
|
||||
<!-- ##### FUNCTION gtk_builder_new ##### -->
|
||||
<para>
|
||||
|
||||
@@ -120,9 +120,9 @@ is the id of widget (which should be a child of the dialogs @action_area).
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkDialog" id="dialog1">
|
||||
<child internal-child="vbox">"
|
||||
<object class="GtkVBox">
|
||||
<object class="GtkVBox" id="vbox">
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkHButtonBox">
|
||||
<object class="GtkHButtonBox" id="button_box">
|
||||
<child>
|
||||
<object class="GtkButton" id="button_cancel"/>
|
||||
</child>
|
||||
|
||||
@@ -378,6 +378,11 @@ The #GtkEntry-struct struct contains only private data.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntry:invisible-char ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkEntry:progress-border ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -433,12 +433,12 @@ other, rather than vertically stacked
|
||||
|
||||
<!-- ##### ENUM GtkUpdateType ##### -->
|
||||
<para>
|
||||
|
||||
Used by #GtkRange to control the policy for notifying value changes.
|
||||
</para>
|
||||
|
||||
@GTK_UPDATE_CONTINUOUS:
|
||||
@GTK_UPDATE_DISCONTINUOUS:
|
||||
@GTK_UPDATE_DELAYED:
|
||||
@GTK_UPDATE_CONTINUOUS: Notify updates whenever the value changed
|
||||
@GTK_UPDATE_DISCONTINUOUS: Notify updates when the mouse button has been released
|
||||
@GTK_UPDATE_DELAYED: Space out updates with a small timeout
|
||||
|
||||
<!-- ##### ENUM GtkVisibility ##### -->
|
||||
<para>
|
||||
|
||||
@@ -11,7 +11,8 @@ The #GtkHScrollbar widget is a widget arranged horizontally creating a
|
||||
scrollbar. See #GtkScrollbar for details on
|
||||
scrollbars. #GtkAdjustment pointers may be added to handle the
|
||||
adjustment of the scrollbar or it may be left %NULL in which case one
|
||||
will be created for you. See #GtkAdjustment for details.
|
||||
will be created for you. See #GtkScrollbar for a description of what the
|
||||
fields in an adjustment represent for a scrollbar.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
@@ -35,7 +35,21 @@ saturation.
|
||||
|
||||
</para>
|
||||
|
||||
@parent_instance:
|
||||
|
||||
<!-- ##### SIGNAL GtkHSV::changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@hsv: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkHSV::move ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@hsv: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### FUNCTION gtk_hsv_new ##### -->
|
||||
<para>
|
||||
|
||||
210
docs/reference/gtk/tmpl/gtkimcontext.sgml
Normal file
210
docs/reference/gtk/tmpl/gtkimcontext.sgml
Normal file
@@ -0,0 +1,210 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkIMContext
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkIMContext ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::commit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@arg1:
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::delete-surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@arg1:
|
||||
@arg2:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-changed ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-end ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::preedit-start ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkIMContext::retrieve-surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@imcontext: the object which received the signal.
|
||||
@Returns:
|
||||
|
||||
<!-- ##### STRUCT GtkIMContextClass ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@preedit_start:
|
||||
@preedit_end:
|
||||
@preedit_changed:
|
||||
@commit:
|
||||
@retrieve_surrounding:
|
||||
@delete_surrounding:
|
||||
@set_client_window:
|
||||
@get_preedit_string:
|
||||
@filter_keypress:
|
||||
@focus_in:
|
||||
@focus_out:
|
||||
@reset:
|
||||
@set_cursor_location:
|
||||
@set_use_preedit:
|
||||
@set_surrounding:
|
||||
@get_surrounding:
|
||||
|
||||
<!-- ##### STRUCT GtkIMContextInfo ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context_id:
|
||||
@context_name:
|
||||
@domain:
|
||||
@domain_dirname:
|
||||
@default_locales:
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_client_window ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@window:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_get_preedit_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@str:
|
||||
@attrs:
|
||||
@cursor_pos:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_filter_keypress ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@event:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_focus_in ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_focus_out ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_reset ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_cursor_location ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@area:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_use_preedit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@use_preedit:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_set_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@text:
|
||||
@len:
|
||||
@cursor_index:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_get_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@text:
|
||||
@cursor_index:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_im_context_delete_surrounding ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@offset:
|
||||
@n_chars:
|
||||
@Returns:
|
||||
|
||||
|
||||
@@ -162,6 +162,24 @@ aligns in its available space, see gtk_misc_set_alignment().
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Links</title>
|
||||
|
||||
<para>
|
||||
Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
|
||||
to regular Pango markup. The markup for links is borrowed from HTML, using the
|
||||
<tag>a</tag> with href and title attributes. GTK+ renders links similar to the
|
||||
way they appear in web browsers, with colored, underlined text. The title
|
||||
attribute is displayed as a tooltip on the link. An example looks like this:
|
||||
<informalexample><programlisting>
|
||||
gtk_label_set_markup (label, "Go to the <a href=\"http://www.gtk.org\" title=\"&lt;i&gt;Our&/i&gt; website\">GTK+ website</a> for more...");
|
||||
</programlisting></informalexample>
|
||||
It is possible to implement custom handling for links and their tooltips with
|
||||
the #GtkLabel::activate-link signal and the gtk_label_get_current_uri() function.
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
@@ -177,6 +195,22 @@ described below.
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkLabel::activate-current-link ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkLabel::activate-link ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label: the object which received the signal.
|
||||
@arg1:
|
||||
@Returns:
|
||||
|
||||
<!-- ##### SIGNAL GtkLabel::copy-clipboard ##### -->
|
||||
<para>
|
||||
|
||||
@@ -703,3 +737,12 @@ Sets the text within the GtkLabel widget.
|
||||
@angle:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_label_get_current_uri ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -449,6 +449,8 @@ Returns the #GtkWidget that the menu is attached to.
|
||||
A user function supplied when calling gtk_menu_popup() which controls the
|
||||
positioning of the menu when it is displayed. The function sets the @x
|
||||
and @y parameters to the coordinates where the menu is to be drawn.
|
||||
To make the menu appear on a different monitor than the mouse pointer,
|
||||
gtk_menu_set_monitor() must be called.
|
||||
</para>
|
||||
|
||||
@menu: a #GtkMenu.
|
||||
@@ -457,7 +459,7 @@ menu shall be drawn. This is an output parameter.
|
||||
@y: address of the #gint representing the vertical position where the
|
||||
menu shall be drawn. This is an output parameter.
|
||||
@push_in: This parameter controls how menus placed outside the monitor are handled.
|
||||
If this is set to TRUE and part of the menu is outside the monitor then
|
||||
If this is set to %TRUE and part of the menu is outside the monitor then
|
||||
GTK+ pushes the window into the visible area, effectively modifying the
|
||||
popup position.
|
||||
Note that moving and possibly resizing the menu around will alter the
|
||||
@@ -466,9 +468,6 @@ menu shall be drawn. This is an output parameter.
|
||||
In practice, this behavior is only useful for combobox popups or option
|
||||
menus and cannot be used to simply confine a menu to monitor boundaries.
|
||||
In that case, changing the scroll offset is not desirable.
|
||||
To simply constrain the menu within the monitor, get its size with
|
||||
gtk_widget_size_request() before showing it, and alter the coordinates
|
||||
passed to gtk_menu_popup() accordingly.
|
||||
@user_data: the data supplied by the user in the gtk_menu_popup() @data
|
||||
parameter.
|
||||
|
||||
|
||||
@@ -178,6 +178,16 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
|
||||
<!-- ##### SIGNAL GtkPrintOperation::update-custom-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@printoperation: the object which received the signal.
|
||||
@widget:
|
||||
@arg1:
|
||||
@arg2:
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:allow-async ##### -->
|
||||
<para>
|
||||
|
||||
@@ -203,6 +213,11 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:has-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:job-name ##### -->
|
||||
<para>
|
||||
|
||||
@@ -233,6 +248,11 @@ Printing support was added in GTK+ 2.10.
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:support-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintOperation:track-print-status ##### -->
|
||||
<para>
|
||||
|
||||
@@ -520,6 +540,42 @@ The #GQuark used for #GtkPrintError errors.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@support_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_set_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@has_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_operation_get_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@op:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_run_page_setup_dialog ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -717,6 +717,7 @@ multiple pages per sheet.
|
||||
@GTK_PRINT_PAGES_ALL:
|
||||
@GTK_PRINT_PAGES_CURRENT:
|
||||
@GTK_PRINT_PAGES_RANGES:
|
||||
@GTK_PRINT_PAGES_SELECTION:
|
||||
|
||||
<!-- ##### MACRO GTK_PRINT_SETTINGS_PRINT_PAGES ##### -->
|
||||
<para>
|
||||
|
||||
@@ -90,6 +90,16 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:has-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:manual-capabilities ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:page-setup ##### -->
|
||||
<para>
|
||||
|
||||
@@ -105,6 +115,11 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkPrintUnixDialog:support-selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_new ##### -->
|
||||
<para>
|
||||
|
||||
@@ -188,6 +203,42 @@ The GtkPrintUnixDialog implementation of the GtkBuildable interface exposes its
|
||||
@tab_label:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_set_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@support_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_support_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_set_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@has_selection:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_has_selection ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkPrintCapabilities ##### -->
|
||||
<para>
|
||||
An enum for specifying which features the print dialog should offer.
|
||||
@@ -220,3 +271,12 @@ formats are supported.
|
||||
@capabilities:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_print_unix_dialog_get_manual_capabilities ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dialog:
|
||||
@Returns:
|
||||
|
||||
|
||||
|
||||
@@ -7,18 +7,29 @@ Base class for GtkHScale and GtkVScale
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkScale is a slider control used to select a numeric value.
|
||||
To use it, you'll probably want to investigate the methods on
|
||||
To use it, you'll probably want to investigate the methods on
|
||||
its base class, #GtkRange, in addition to the methods for #GtkScale itself.
|
||||
To set the value of a scale, you would normally use gtk_range_set_value().
|
||||
To detect changes to the value, you would normally use the "value_changed"
|
||||
To set the value of a scale, you would normally use gtk_range_set_value().
|
||||
To detect changes to the value, you would normally use the "value_changed"
|
||||
signal.
|
||||
</para>
|
||||
<para>
|
||||
The #GtkScale widget is an abstract class, used only for deriving the
|
||||
subclasses #GtkHScale and #GtkVScale. To create a scale widget,
|
||||
subclasses #GtkHScale and #GtkVScale. To create a scale widget,
|
||||
call gtk_hscale_new_with_range() or gtk_vscale_new_with_range().
|
||||
</para>
|
||||
|
||||
<refsect2 id="GtkScale-BUILDER-UI"><title>GtkScale as GtkBuildable</title>
|
||||
<para>
|
||||
GtkScale supports a custom <marks> element, which
|
||||
can contain multiple <mark> elements. The "value" and "position"
|
||||
attributes have the same meaning as gtk_scale_add_mark() parameters of the
|
||||
same name. If the element is not empty, its content is taken as the markup
|
||||
to show at the mark. It can be translated with the usual "translatable and
|
||||
"context" attributes.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
@@ -6,7 +6,35 @@ Sharing settings between applications
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
GtkSettings provide a mechanism to share global settings between applications.
|
||||
On the X window system, this sharing is realized by an <ulink href="http://www.freedesktop.org/wiki/Specifications/xsettings-spec">XSettings</ulink>
|
||||
manager that is usually part of the desktop environment, along with utilities
|
||||
that let the user change these settings. In the absence of an Xsettings manager,
|
||||
settings can also be specified in RC files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Applications can override system-wide settings with gtk_settings_set_string_property(),
|
||||
gtk_settings_set_long_property(), etc. This should be restricted to special
|
||||
cases though; GtkSettings are not meant as an application configuration
|
||||
facility. When doing so, you need to be aware that settings that are specific
|
||||
to individual widgets may not be available before the widget type has been
|
||||
realized at least once. The following example demonstrates a way to do this:
|
||||
<informalexample><programlisting>
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
/* make sure the type is realized &ast/
|
||||
g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
|
||||
|
||||
g_object_set (gtk_settings_get_default (), "gtk-menu-images", FALSE, NULL);
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There is one GtkSettings instance per screen. It can be obtained with
|
||||
gtk_settings_get_for_screen(), but in many cases, it is more convenient
|
||||
to use gtk_widget_get_settings(). gtk_settings_get_default() returns the
|
||||
GtkSettings instance for the default screen.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
229
docs/reference/gtk/tmpl/gtksize.sgml
Normal file
229
docs/reference/gtk/tmpl/gtksize.sgml
Normal file
@@ -0,0 +1,229 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
Units
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GtkSize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### TYPEDEF GtkUSize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### ENUM GtkSizeUnit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@GTK_SIZE_UNIT_PIXEL:
|
||||
@GTK_SIZE_UNIT_EM:
|
||||
@GTK_SIZE_UNIT_MM:
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_em ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@em:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@mm:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_get_em ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_get_mm ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_SIZE_ONE_TWELFTH_EM ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_SIZE_MAXPIXEL ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### MACRO GTK_SIZE_MINPIXEL ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_get_unit ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_to_pixel ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_to_pixel_double ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@screen:
|
||||
@monitor_num:
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_size_to_string ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@size:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_param_spec_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@nick:
|
||||
@blurb:
|
||||
@minimum:
|
||||
@maximum:
|
||||
@default_value:
|
||||
@flags:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_set_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@v_size:
|
||||
@widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_get_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_size_skip_conversion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_param_spec_usize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@name:
|
||||
@nick:
|
||||
@blurb:
|
||||
@minimum:
|
||||
@maximum:
|
||||
@default_value:
|
||||
@flags:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_set_usize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@v_size:
|
||||
@widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_get_usize ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_value_usize_skip_conversion ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@value:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_enable_resolution_independence ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
|
||||
80
docs/reference/gtk/tmpl/gtktoolshell.sgml
Normal file
80
docs/reference/gtk/tmpl/gtktoolshell.sgml
Normal file
@@ -0,0 +1,80 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkToolShell
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkToolShell ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkToolShellIface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@get_icon_size:
|
||||
@get_orientation:
|
||||
@get_style:
|
||||
@get_relief_style:
|
||||
@rebuild_menu:
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_icon_size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_orientation ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_relief_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_get_style ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_tool_shell_rebuild_menu ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@shell:
|
||||
|
||||
|
||||
@@ -6,11 +6,12 @@ A vertical scrollbar
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
The #GtkVScrollbar widget is a widget arranged verticall creating a
|
||||
The #GtkVScrollbar widget is a widget arranged vertically creating a
|
||||
scrollbar. See #GtkScrollbar for details on
|
||||
scrollbars. #GtkAdjustment pointers may be added to handle the
|
||||
adjustment of the scrollbar or it may be left %NULL in which case one
|
||||
will be created for you. See #GtkAdjustment for details.
|
||||
will be created for you. See #GtkScrollbar for a description of what the
|
||||
fields in an adjustment represent for a scrollbar.
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
|
||||
@@ -49,7 +49,7 @@ internal child "accessible" of a <structname>GtkWidget</structname>.
|
||||
</object>
|
||||
<object class="GtkButton" id="button1">
|
||||
<accessibility>
|
||||
<action action_name="click" description="Click the button."/>
|
||||
<action action_name="click" translatable="yes">Click the button.</action>
|
||||
<relation target="label1" type="labelled-by"/>
|
||||
</accessibility>
|
||||
<child internal-child="accessible">
|
||||
|
||||
@@ -32,3 +32,5 @@ content_files =
|
||||
HTML_IMAGES =
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -40,3 +40,5 @@ clean-local:
|
||||
*) rm -f $$file ;; \
|
||||
esac ; \
|
||||
done
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -72,3 +72,5 @@ dist-hook:
|
||||
echo "***"
|
||||
endif
|
||||
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -190,11 +190,11 @@ gtk_dial_set_adjustment (GtkDial *dial,
|
||||
dial->adjustment = adjustment;
|
||||
g_object_ref (GTK_OBJECT (dial->adjustment));
|
||||
|
||||
g_signal_connect (GTK_OBJECT (adjustment), "changed",
|
||||
GTK_SIGNAL_FUNC (gtk_dial_adjustment_changed),
|
||||
g_signal_connect (G_OBJECT (adjustment), "changed",
|
||||
G_CALLBACK (gtk_dial_adjustment_changed),
|
||||
(gpointer) dial);
|
||||
g_signal_connect (GTK_OBJECT (adjustment), "value_changed",
|
||||
GTK_SIGNAL_FUNC (gtk_dial_adjustment_value_changed),
|
||||
g_signal_connect (G_OBJECT (adjustment), "value_changed",
|
||||
G_CALLBACK (gtk_dial_adjustment_value_changed),
|
||||
(gpointer) dial);
|
||||
|
||||
dial->old_value = adjustment->value;
|
||||
@@ -333,6 +333,8 @@ gtk_dial_expose( GtkWidget *widget,
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
blankstyle->black_gc =
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL];
|
||||
blankstyle->depth =
|
||||
gdk_drawable_get_depth( GDK_DRAWABLE (widget->window));
|
||||
|
||||
gtk_paint_polygon (blankstyle,
|
||||
widget->window,
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
=== ChangeLog discontinued ===
|
||||
|
||||
With the move to git, GTK+ is switching from a ChangeLog file
|
||||
to relying on commit messages to provide change history. Please
|
||||
see README.commits for guidance on the expected message format.
|
||||
|
||||
2009-03-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.16.0 ===
|
||||
|
||||
@@ -718,3 +718,5 @@ gdk-pixbuf.loaders:
|
||||
echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
|
||||
touch gdk-pixbuf.loaders;
|
||||
endif
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
||||
|
||||
@@ -2459,7 +2459,7 @@ gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
|
||||
domain = format->domain;
|
||||
else
|
||||
domain = GETTEXT_PACKAGE;
|
||||
description = dgettext (domain, format->description);
|
||||
description = g_dgettext (domain, format->description);
|
||||
|
||||
return g_strdup (description);
|
||||
}
|
||||
|
||||
@@ -25,9 +25,12 @@
|
||||
* Havoc Pennington <hp@redhat.com>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib.h>
|
||||
|
||||
#define GDK_PIXBUF_C_COMPILATION
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixbuf-io.h"
|
||||
#include "gdk-pixbuf-simple-anim.h"
|
||||
#include "gdk-pixbuf-alias.h"
|
||||
@@ -109,6 +112,21 @@ static GdkPixbufAnimationIter *get_iter (GdkPixbufAnimation *anim,
|
||||
const GTimeVal *start_time);
|
||||
|
||||
|
||||
static void gdk_pixbuf_simple_anim_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static void gdk_pixbuf_simple_anim_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_LOOP
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GdkPixbufSimpleAnim, gdk_pixbuf_simple_anim, GDK_TYPE_PIXBUF_ANIMATION)
|
||||
|
||||
static void
|
||||
@@ -124,13 +142,30 @@ gdk_pixbuf_simple_anim_class_init (GdkPixbufSimpleAnimClass *klass)
|
||||
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
anim_class = GDK_PIXBUF_ANIMATION_CLASS (klass);
|
||||
|
||||
|
||||
object_class->set_property = gdk_pixbuf_simple_anim_set_property;
|
||||
object_class->get_property = gdk_pixbuf_simple_anim_get_property;
|
||||
object_class->finalize = gdk_pixbuf_simple_anim_finalize;
|
||||
|
||||
anim_class->is_static_image = is_static_image;
|
||||
anim_class->get_static_image = get_static_image;
|
||||
anim_class->get_size = get_size;
|
||||
anim_class->get_iter = get_iter;
|
||||
|
||||
/**
|
||||
* GdkPixbufSimpleAnim:loop:
|
||||
*
|
||||
* Whether the animation should loop when it reaches the end.
|
||||
*
|
||||
* Since: 2.18
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_LOOP,
|
||||
g_param_spec_boolean ("loop",
|
||||
P_("Loop"),
|
||||
P_("Whether the animation should loop when it reaches the end"),
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -277,7 +312,7 @@ advance (GdkPixbufAnimationIter *anim_iter,
|
||||
{
|
||||
GdkPixbufSimpleAnimIter *iter;
|
||||
gint elapsed;
|
||||
gint loop;
|
||||
gint loop_count;
|
||||
GList *tmp;
|
||||
GList *old;
|
||||
|
||||
@@ -302,13 +337,13 @@ advance (GdkPixbufAnimationIter *anim_iter,
|
||||
/* See how many times we've already played the full animation,
|
||||
* and subtract time for that.
|
||||
*/
|
||||
loop = elapsed / iter->simple_anim->total_time;
|
||||
loop_count = elapsed / iter->simple_anim->total_time;
|
||||
elapsed = elapsed % iter->simple_anim->total_time;
|
||||
|
||||
iter->position = elapsed;
|
||||
|
||||
/* Now move to the proper frame */
|
||||
if (loop < 1)
|
||||
if (loop_count < 1 || iter->simple_anim->loop)
|
||||
tmp = iter->simple_anim->frames;
|
||||
else
|
||||
tmp = NULL;
|
||||
@@ -437,6 +472,82 @@ gdk_pixbuf_simple_anim_add_frame (GdkPixbufSimpleAnim *animation,
|
||||
animation->frames = g_list_append (animation->frames, frame);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_pixbuf_simple_anim_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkPixbufSimpleAnim *animation = GDK_PIXBUF_SIMPLE_ANIM (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_LOOP:
|
||||
g_value_set_boolean (value,
|
||||
gdk_pixbuf_simple_anim_get_loop (animation));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_pixbuf_simple_anim_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GdkPixbufSimpleAnim *animation = GDK_PIXBUF_SIMPLE_ANIM (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_LOOP:
|
||||
gdk_pixbuf_simple_anim_set_loop (animation,
|
||||
g_value_get_boolean (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_simple_anim_set_loop:
|
||||
* @animation: a #GdkPixbufSimpleAnim
|
||||
* @loop: whether to loop the animation
|
||||
*
|
||||
* Sets whether @animation should loop indefinitely when it reaches the end.
|
||||
*
|
||||
* Since: 2.18
|
||||
**/
|
||||
void
|
||||
gdk_pixbuf_simple_anim_set_loop (GdkPixbufSimpleAnim *animation,
|
||||
gboolean loop)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_PIXBUF_SIMPLE_ANIM (animation));
|
||||
|
||||
if (loop != animation->loop) {
|
||||
animation->loop = loop;
|
||||
g_object_notify (G_OBJECT (animation), "loop");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_pixbuf_simple_anim_get_loop:
|
||||
* @animation: a #GdkPixbufSimpleAnim
|
||||
*
|
||||
* Gets whether @animation should loop indefinitely when it reaches the end.
|
||||
*
|
||||
* Returns: %TRUE if the animation loops forever, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.18
|
||||
**/
|
||||
gboolean
|
||||
gdk_pixbuf_simple_anim_get_loop (GdkPixbufSimpleAnim *animation)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_PIXBUF_SIMPLE_ANIM (animation), FALSE);
|
||||
|
||||
return animation->loop;
|
||||
}
|
||||
|
||||
#define __GDK_PIXBUF_SIMPLE_ANIM_C__
|
||||
#include "gdk-pixbuf-aliasdef.c"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user