Compare commits

..

178 Commits

Author SHA1 Message Date
Matthias Clasen
aa8cae655a 2.14.7
svn path=/branches/gtk-2-14/; revision=22076
2009-01-07 23:05:24 +00:00
Matthias Clasen
9ce8d8a683 Bug 566862 – pixbuf_new_from_file does not autodetect format
2009-01-07  Matthias Clasen  <mclasen@redhat.com>

        Bug 566862 – pixbuf_new_from_file does not autodetect format

        * gdk-pixbuf-io.c (_gdk_pixbuf_get_module): Go back to sniffing
        without looking at the filename, to avoid breaking expected
        functionality.


svn path=/branches/gtk-2-14/; revision=22074
2009-01-07 15:20:39 +00:00
Tor Lillqvist
549e96bd41 Insert a space.
svn path=/branches/gtk-2-14/; revision=22067
2009-01-05 15:30:48 +00:00
Tor Lillqvist
7fa8ece199 Bug 566628 - gdk_display_close always asserts on win32
2009-01-05  Tor Lillqvist  <tml@iki.fi>

	Bug 566628 - gdk_display_close always asserts on win32

	* gdk/win32/gdkdisplay-win32.c
	(_gdk_windowing_set_default_display): Allow also a NULL parameter
	in the g_assert(). Still don't actually do anything in this
	function, though.


svn path=/branches/gtk-2-14/; revision=22066
2009-01-05 15:29:14 +00:00
Matthias Clasen
1e51aec065 Bug 566391 – gtk_about_dialog_set_url_hook should activate pre-existing
2009-01-03  Matthias Clasen  <mclasen@redhat.com>

        Bug 566391 – gtk_about_dialog_set_url_hook should activate
        pre-existing website links

        * gtk/gtkaboutdialog.c: Make setting website, website-label and
        url hook work independent of their order. Reported by Steven
        Sheehy.


svn path=/branches/gtk-2-14/; revision=22061
2009-01-05 03:39:58 +00:00
Matthias Clasen
1b393f5fa0 Recheck _NET_SUPPORTING_WM_CHECK every now and then to avoid getting stuck
* gdk/x11/gdkscreen-x11.h:
        * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window): Recheck
        _NET_SUPPORTING_WM_CHECK every now and then to avoid getting
        stuck on the id of a former wmcheck window that got reused by
        another client (see RH bug 471927)

svn path=/branches/gtk-2-14/; revision=22057
2009-01-04 04:48:40 +00:00
Matthias Clasen
d019b714ca Updates
svn path=/branches/gtk-2-14/; revision=22054
2009-01-03 07:23:09 +00:00
Matthias Clasen
40dc168114 Don't assert when using the "unsorted" sort column id.
* gtk/gtktreemodelsort.c: Don't assert when using the "unsorted"
        sort column id.


svn path=/branches/gtk-2-14/; revision=22053
2009-01-03 07:17:09 +00:00
Matthias Clasen
f9947ebb34 Bug 558694 – Paned window splitter keynav broken
* gtk/gtkpaned.c (get_child_panes): Don't add unrealized
        widgets.


svn path=/branches/gtk-2-14/; revision=22052
2009-01-03 07:14:54 +00:00
Matthias Clasen
27da2ad464 Start Xvfb with -ac -noreset to try and get the gui tests working.
* Makefile.decl: Start Xvfb with -ac -noreset to try
        and get the gui tests working.



svn path=/branches/gtk-2-14/; revision=22051
2009-01-03 07:13:10 +00:00
Matthias Clasen
7130f157d1 Bug 565846 – "va_end(args);" should be added into gtk_tree_store_new
* gtk/gtktreestore.c (gtk_tree_store_new): Add a missing
        va_end() call. Pointed out by Jiwon Lee.


svn path=/branches/gtk-2-14/; revision=22050
2009-01-03 07:11:57 +00:00
Matthias Clasen
b7023fafa0 Bug #549251. No need to set name if there is no a11y item object.
* gtk/gtkiconview.c: (gtk_icon_view_accessible_model_row_changed):
        Bug #549251. No need to set name if there is no a11y item object.



svn path=/branches/gtk-2-14/; revision=22049
2009-01-03 07:09:46 +00:00
Leonardo Ferreira Fontenelle
885a47c57d Fixed minor error in Brazilian Portuguese translation.
2008-12-21  Leonardo Ferreira Fontenelle  <leonardof@gnome.org>

	* pt_BR.po: Fixed minor error in Brazilian Portuguese translation.

svn path=/branches/gtk-2-14/; revision=21921
2008-12-21 14:45:13 +00:00
Yair Hershkovitz
541bdbdb12 Bug 565203: RTL locales: icons are misplaced when horizontal gtkiconview
2008-12-21  Yair Hershkovitz  <yairhr@gmail.com>

        Bug 565203: RTL locales: icons are misplaced when horizontal 
                    gtkiconview is contained in a gtkscrolledwindow.

        * gtk/gtkiconview.c (gtk_icon_view_layout_single_row):
        Fix horizontal icon positions when in RTL locale.

svn path=/branches/gtk-2-14/; revision=21919
2008-12-21 08:20:31 +00:00
Ihar Hrachyshka
ce87d9d300 Updated be@latin.po
svn path=/branches/gtk-2-14/; revision=21916
2008-12-19 21:47:35 +00:00
Matthias Clasen
6658142dfb Bump version
svn path=/branches/gtk-2-14/; revision=21912
2008-12-16 05:26:14 +00:00
Matthias Clasen
039a7e52ee 2.14.6
svn path=/branches/gtk-2-14/; revision=21910
2008-12-16 05:23:14 +00:00
Matthias Clasen
7c568f8dd0 Fix exports
svn path=/branches/gtk-2-14/; revision=21908
2008-12-15 19:52:26 +00:00
Matthias Clasen
0410444101 Updates
svn path=/branches/gtk-2-14/; revision=21907
2008-12-15 18:18:19 +00:00
Tomas Bzatek
034edd2ef4 Mask G_FILE_TYPE_SHORTCUT as a directory (#561494)
2008-12-15  Tomas Bzatek  <tbzatek@redhat.com> 

        * gtk/gtkfilechooserdefault.c: (list_row_activated):
        * gtk/gtkfilesystem.c: (_gtk_file_info_consider_as_directory):
        Mask G_FILE_TYPE_SHORTCUT as a directory (#561494)


svn path=/branches/gtk-2-14/; revision=21905
2008-12-15 16:05:37 +00:00
Tor Lillqvist
8f344cf163 Remove the fuzzy marker for the metadata entry.
2008-12-14  Tor Lillqvist  <tml@novell.com>

	* ast.po: Remove the fuzzy marker for the metadata entry.


svn path=/branches/gtk-2-14/; revision=21903
2008-12-14 18:33:13 +00:00
Tor Lillqvist
7cb26450d4 Use charset=UTF-8 to avoid error with some versions of GNU msgfmt.
2008-12-14  Tor Lillqvist  <tml@novell.com>

	* ast.po: Use charset=UTF-8 to avoid error with some versions of
	GNU msgfmt.


svn path=/branches/gtk-2-14/; revision=21902
2008-12-14 18:31:37 +00:00
Matthias Clasen
97874d93a4 Mount the enclosing volume if the folder we're switching to is not
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Mount the enclosing volume if the folder we're switching to is not
        mounted. Patch by Tomas Bzatek, based on work by Carlos Garnacho


svn path=/branches/gtk-2-14/; revision=21901
2008-12-14 04:30:02 +00:00
Matthias Clasen
ff0ec9fabb Bug 561494 – FileChooser network browsing and authentication support
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 561494 – FileChooser network browsing and authentication support

        * gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory):
        Privately export this method. It classifies directories and mountables
        the same.

        * gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop
        G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible
        mounts.

        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserentry.c:
        * gtk/gtkfilechooserdefault.c: Use the new function instead of
        direct checks for G_FILE_TYPE_DIRECTORY throughout.


svn path=/branches/gtk-2-14/; revision=21900
2008-12-14 04:24:08 +00:00
Matthias Clasen
75bcafa983 fix the build
svn path=/branches/gtk-2-14/; revision=21897
2008-12-14 01:16:41 +00:00
Matthias Clasen
05b9007c59 Bug 562579 – Remove error dialog when directory does not exist
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 562579 – Remove error dialog when directory does not exist

        * gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Don't show an error dialog when changing to a non-existing folder,
        since this is ususally just an annoyance. 


svn path=/branches/gtk-2-14/; revision=21895
2008-12-14 00:45:18 +00:00
Matthias Clasen
05b4d62854 Bug 556233 – local-only causes G_IS_FILE warning
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 556233 – local-only causes G_IS_FILE warning

        * gtk/gktfilechooserdefault.c (set_local_only): Avoid a warning
        in tests. Patch by Christian Dywan


svn path=/branches/gtk-2-14/; revision=21893
2008-12-14 00:34:08 +00:00
Matthias Clasen
3313fffcbb Bug 563158 – CellRendererProgress pulsing and progressing rows can not
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 563158 – CellRendererProgress pulsing and progressing rows can
        not be used together

        * gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_set_pulse):
        Don't try to keep state in a cell renderer between two paint
        calls. It doesn't work. Patch by Kristian Mueller


svn path=/branches/gtk-2-14/; revision=21891
2008-12-13 08:19:48 +00:00
Matthias Clasen
0efafccca2 Bug 555560 – gtk_combo_box_set_active fails with no model
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 555560 – gtk_combo_box_set_active fails with no model

        * gtk/gtkcombobox.c: Allow out-of-order setting of model and active.
        Patch by Christian Dywan



svn path=/branches/gtk-2-14/; revision=21889
2008-12-13 08:13:01 +00:00
Matthias Clasen
154318504b Bug 558306 – Cannot build gdk (gtk+ 2.14.4) on Solaris 8
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 558306 – Cannot build gdk (gtk+ 2.14.4) on Solaris 8

        * gdk/x11/gdktestutils-x11.c (gdk_test_simulate_button):
        Remove a C99ism. Pointed out by Eric Lamarque



svn path=/branches/gtk-2-14/; revision=21887
2008-12-13 08:06:11 +00:00
Matthias Clasen
3a93de7e16 Bug 549251 – GTK icon view accessible issue.
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 549251 – GTK icon view accessible issue.

        * gtk/gtkiconview.c (gtk_icon_view_accessible_model_row_changed):
        Handle separate append/set for rows.  Patch by Li Yuan



svn path=/branches/gtk-2-14/; revision=21885
2008-12-13 08:00:58 +00:00
Matthias Clasen
f5a3a0a32e Bug 556839 – Crash when opening a link
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 556839 – Crash when opening a link

        * gtk/gtkstatusicon.c (gtk_status_icon_finalize): Destroy the
        image too. Patch by Carlos Garcia Campos



svn path=/branches/gtk-2-14/; revision=21883
2008-12-13 05:43:50 +00:00
Matthias Clasen
c48d156ee5 Bug 563751 – xatom cache is prefilled too late
2008-12-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 563751 – xatom cache is prefilled too late

        * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize the
        XAtom cache earlier. Patch by Christian Persch



svn path=/branches/gtk-2-14/; revision=21881
2008-12-13 05:33:56 +00:00
Matthias Clasen
8b1a98a84f Use the new order correctly. Patch by Li Yuan
* gtk/gtkiconview.c (gtk_icon_view_accessible_model_rows_reordered):
        Use the new order correctly.  Patch by Li Yuan


svn path=/branches/gtk-2-14/; revision=21879
2008-12-13 05:30:10 +00:00
Matthias Clasen
a424f4ded9 Handle being called early. Bug report by Andrés G. Aragoneses
* gtk/gtkrc.c (gtk_rc_parse_default_files): Handle being called
        early. Bug report by Andrés G. Aragoneses


svn path=/branches/gtk-2-14/; revision=21876
2008-12-13 04:41:26 +00:00
Matthias Clasen
861efd5085 Set an empty title on password dialogs. Pointed out by Máirín Duffy.
2008-12-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkmountoperation.c: Set an empty title on password dialogs.
        Pointed out by Máirín Duffy.



svn path=/branches/gtk-2-14/; revision=21874
2008-12-13 03:55:53 +00:00
Matthias Clasen
b14f1a69dd Bug 560135 - Print when the user double clicks a printer
* gtk/gtkprintunixdialog.c: add handling of double click to
        GtkPrintUnixDialog.


svn path=/branches/gtk-2-14/; revision=21869
2008-12-11 03:45:00 +00:00
Matthias Clasen
958bd2c5e0 Improve some docs
svn path=/branches/gtk-2-14/; revision=21866
2008-12-10 17:14:40 +00:00
Matthias Clasen
83f1beccb0 Enhanced deprecation annotation
svn path=/branches/gtk-2-14/; revision=21865
2008-12-10 16:32:24 +00:00
Behdad Esfahbod
33a3ebcfcf Bug 563547 – Update gdkx11 atom precache table
2008-12-07  Behdad Esfahbod  <behdad@gnome.org>

        Bug 563547 – Update gdkx11 atom precache table

        * gdk/x11/gdkdisplay-x11.c: Add more atoms to precache.


svn path=/branches/gtk-2-14/; revision=21850
2008-12-08 00:03:07 +00:00
Simos Xenitellis
b16bdfa56b Fixed 557420#23 – Updated the dead key lower bound back to dead_grave.
svn path=/branches/gtk-2-14/; revision=21844
2008-12-04 00:49:17 +00:00
Matthias Clasen
fa596e5552 Filter out shadow mounts. Patch by David Zeuthen.
* gtk/gtkfilesystem.c (get_volumes_list): Filter out shadow mounts.
        Patch by David Zeuthen.



svn path=/branches/gtk-2-14/; revision=21839
2008-12-01 05:44:12 +00:00
Federico Mena Quintero
80936f6072 bnc447004 - Flip tree lines around in the right-to-left case
2008-11-29  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): If tree lines are
	enabled, flip them around for the right-to-left case.  Fixes
	https://bugzilla.novell.com/show_bug.cgi?id=447004.  Patch by
	Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt>

Signed-off-by: Federico Mena Quintero <federico@novell.com>

svn path=/branches/gtk-2-14/; revision=21830
2008-11-29 22:21:03 +00:00
Matthias Clasen
c662b8563c Bug 353088 – gtk_expander_get_label should return the full label text
2008-11-27  Matthias Clasen  <mclasen@redhat.com>

        Bug 353088 – gtk_expander_get_label should return the full label text

        * gailexpander.c: Don't rely on gtk_expander_get_label.
        Patch by Peter Johanson.



svn path=/branches/gtk-2-14/; revision=21813
2008-11-28 04:05:27 +00:00
Simos Xenitellis
654b81af1c Closed #557420 - Some compose sequences don't work anymore
svn path=/branches/gtk-2-14/; revision=21811
2008-11-27 23:44:32 +00:00
Simos Xenitellis
0868642d33 Closed #557420 - Some compose sequences don't work anymore
svn path=/branches/gtk-2-14/; revision=21810
2008-11-27 23:43:52 +00:00
Tristan Van Berkom
f709557372 Bug 561539 - Fix warnings when size allocations fall short of border width
2008-11-24  Tristan Van Berkom <tvb@gnome.org>

	* gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations
	fall short of border width and padding.


svn path=/branches/gtk-2-14/; revision=21806
2008-11-24 19:26:12 +00:00
Matthias Clasen
e693824435 Bump version
svn path=/branches/gtk-2-14/; revision=21804
2008-11-24 17:07:51 +00:00
Matthias Clasen
a666f55012 2.14.5
svn path=/branches/gtk-2-14/; revision=21802
2008-11-24 16:47:23 +00:00
Matthias Clasen
5b16fcc396 Updates
svn path=/branches/gtk-2-14/; revision=21801
2008-11-24 07:04:27 +00:00
Hans Breuer
1959fc875e don't define USE_MMX for msvc updated
2008-11-23  Hans Breuer  <hans@breuer.org>

	* config.h.win32.in : don't define USE_MMX for msvc
	* gdk-pixbuf/makefile.msc gtk/makefile.msc.in : updated

svn path=/branches/gtk-2-14/; revision=21799
2008-11-23 17:26:26 +00:00
Kjartan Maraas
606222f819 Missing format specifiers and some other small bits. Bugzilla bug #554567.
2008-11-21  Kjartan Maraas  <kmaraas@gnome.org>

	* gtk/gtkbuilder.c: (_gtk_builder_flags_from_string):
	* gtk/gtkfilechooserdefault.c:
	(file_list_drag_data_received_get_info_cb):
	* gtk/gtkiconfactory.c: (icon_source_start_element):
	* gtk/gtkprintbackend.c: (gtk_print_backend_module_load):
	* gtk/gtkprintoperation.c: (run_pdf):
	* gtk/gtkthemes.c: (gtk_theme_engine_load):
	* gtk/tests/builder.c: (test_file):
	* tests/testmerge.c: (dump_tree):
	Missing format specifiers and some other small bits.
	Bugzilla bug #554567.

svn path=/branches/gtk-2-14/; revision=21797
2008-11-21 14:55:44 +00:00
Kjartan Maraas
fa932f5e06 Missing format specifier. Bug #554567.
2008-11-08  Kjartan Maraas  <kmaraas@gnome.org>

	* gailtextview.c: (gail_streamable_content_get_stream):
	Missing format specifier. Bug #554567.

svn path=/branches/gtk-2-14/; revision=21796
2008-11-21 14:54:34 +00:00
Changwoo Ryu
4bc5fd4028 Updated Korean translation
svn path=/branches/gtk-2-14/; revision=21793
2008-11-21 00:49:35 +00:00
Matthias Clasen
0619940a7f Bug 552956 – Should check composite extension version
* gdk/x11/gdkdisplay-x11.c: Check that the version of the
        composite extension is at least 0.4.
        Patch by Owen Taylor


svn path=/branches/gtk-2-14/; revision=21790
2008-11-15 00:38:29 +00:00
Matthias Clasen
b01062ec91 Bug 541391 – Unfocussable Treeview swallows focus
* gtk/gtktreeview.c (grab_focus_and_unset_draw_keyfocus),
        (gtk_tree_view_focus): Honor GTK_WIDGET_CAN_FOCUS properly


svn path=/branches/gtk-2-14/; revision=21789
2008-11-15 00:33:26 +00:00
Richard Hult
2da67f5c85 Merged from trunk:
2008-11-05  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c:
	(get_keyboard_modifiers_from_ns_event), (create_key_event): Revert
	(at least for now) the alt/cmd switching since it breaks the
	"alt-gr" functionality of alt which makes it impossible to input
	lots of characters.

svn path=/branches/gtk-2-14/; revision=21762
2008-11-05 19:14:51 +00:00
Tor Lillqvist
0140d8ec47 Bug 557212 - Problem with which window gains focus and is visible
2008-11-04  Tor Lillqvist  <tml@novell.com>

	Bug 557212 - Problem with which window gains focus and is visible

	* gdk/win32/gdkevents-win32.c (ensure_stacking_on_activate_app):
	Only do the restacking for the active window of the
	application. Seems to fix the problem.

	(gdk_event_translate): Only call ensure_stacking_on_activate_app()
	when the application is being activated, not deactivated.


svn path=/branches/gtk-2-14/; revision=21755
2008-11-03 22:35:05 +00:00
Tor Lillqvist
5eba4f208a Bug 558278 - Crash when calling a callback set by
2008-11-01  Tor Lillqvist  <tml@novell.com>

	Bug 558278 - Crash when calling a callback set by
	gdk_add_client_message_filter()

	* gdk/win32/gdkevents-win32.c (apply_event_filters): Rename from
	apply_filters() so that it is clear that this function is for
	GdkEventFilters only.

	(print_event): Print more information for GDK_CLIENT_EVENT events.

	(gdk_event_translate): When handling client filters, don't use
	apply_event_filters(). Use similar code as in the X11 backend,
	although not exactly, as the parameter list and return value
	semantics of gdk_event_translate() is different.


svn path=/branches/gtk-2-14/; revision=21747
2008-11-01 11:53:35 +00:00
Matthias Clasen
15942580aa Bug 558323 – glitches when popping up combos in treeviews
2008-10-31  Matthias Clasen  <mclasen@redhat.com>

        Bug 558323 – glitches when popping up combos in treeviews

        gtk/gtkcellrenderercombo.c (gtk_cell_renderer_combo_set_property):
        Don't set the model property on the combo box, since that leads
        to loops.


svn path=/branches/gtk-2-14/; revision=21741
2008-10-31 18:27:20 +00:00
Christian Dywan
3470dfa0f8 Oops, correcting the ChangeLog
svn path=/branches/gtk-2-14/; revision=21730
2008-10-30 09:13:12 +00:00
Christian Dywan
76b8be3ec1 Bug 557316 – GtkLinkButton should consider user-defined tooltip
* gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
Only override the tooltip if not previously set


svn path=/branches/gtk-2-14/; revision=21729
2008-10-30 09:10:30 +00:00
Richard Hult
89e5ad5197 Merged from trunk:
2008-10-27  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	Bug 557894 – Wrong return value for
	gdk_pointer_grab_info_libgtk_only()

	* gdk/quartz/gdkevents-quartz.c:
	(gdk_pointer_grab_info_libgtk_only): Return TRUE when there is a
	pointer grab. Patch by Owen Taylor.

svn path=/branches/gtk-2-14/; revision=21723
2008-10-27 15:09:31 +00:00
Gil Forcada Codinachs
56b8b42d9c Added Asturian translation on behalf of Mikel González
svn path=/branches/gtk-2-14/; revision=21705
2008-10-23 13:49:17 +00:00
Alexander Larsson
f5e4abd61e Merged from trunk:
2008-10-23  Alexander Larsson  <alexl@redhat.com>

	Merged from trunk:

	Bug 528320 - Incorrect icons displayed for files with custom mimetype icons
	
        * gtk/gtkfilesystem.c:
        (_gtk_file_info_render_icon):
	Fall back on default file icon if there was no icon or it
	was not found in the theme. This goes with the corresponding
	change in glib to not add the fallback icon, but is useful
	in other cases too.



svn path=/branches/gtk-2-14/; revision=21703
2008-10-23 10:00:44 +00:00
Kjartan Maraas
5b0e467eae Updated Norwegian bokmål translation.
2008-10-23  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.

svn path=/branches/gtk-2-14/; revision=21701
2008-10-23 08:13:34 +00:00
Matthias Clasen
017fbcb0c1 Only emit size-changed if the screen size actually changed.
2008-10-22  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkscreen-x11.c: Only emit size-changed if the screen
        size actually changed.


svn path=/branches/gtk-2-14/; revision=21699
2008-10-22 14:59:00 +00:00
Mark Krapivner
b0917066d5 fix a typo
svn path=/branches/gtk-2-14/; revision=21697
2008-10-22 09:58:26 +00:00
Gintautas Miliauskas
5230df0fbb Updated Lithuanian translation.
2008-10-22  Gintautas Miliauskas  <gintas@akl.lt>

	* lt.po: Updated Lithuanian translation.



svn path=/branches/gtk-2-14/; revision=21696
2008-10-21 23:14:50 +00:00
Tor Lillqvist
cb614c1491 Bug 557266 - Window Management Problem
2008-10-21  Tor Lillqvist  <tml@novell.com>

	Bug 557266 - Window Management Problem

	Also reported in mail to gtk-list, and of course it has been well
	known in general that window state management is messy and buggy
	in various ways in gdk/win32.

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Correct
	handling of GDK_WINDOW_STATE_ABOVE windows. It doesn't work to set
	the WS_EX_TOPMOST extended style bit using SetWindowLong(). We
	must call SetWindowPos() on the window using HWND_TOPMOST
	instead. The description for WS_EX_TOPMOST in the documentation
	for CreateWindowEx() even implies that if you read it carefully.


svn path=/branches/gtk-2-14/; revision=21693
2008-10-21 20:22:59 +00:00
Christian Persch
fdaf62e882 Bug 557059 – crash when compositing emblems with icon
2008-10-20  Christian Persch  <chpe@gnome.org>

	Bug 557059 – crash when compositing emblems with icon

	* gtk/gtkicontheme.c: (apply_emblems): Copy the pixbuf before using it
	with gtk_pixbuf_composite, in case its pixdata is read-only (mmaped
	from icon cache or builtins).

svn path=/branches/gtk-2-14/; revision=21691
2008-10-20 16:56:14 +00:00
Petr Kovar
28813733d3 Updated Czech translation.
2008-10-19  Petr Kovar  <pknbe@volny.cz>

	* cs.po: Updated Czech translation.

svn path=/branches/gtk-2-14/; revision=21688
2008-10-19 17:23:21 +00:00
Matej Urbančič
4ca827ea31 Updated Slovenian translation
svn path=/branches/gtk-2-14/; revision=21687
2008-10-19 15:00:51 +00:00
Gil Forcada Codinachs
a3b76f46e1 Updated Catalan translation by David Planella
svn path=/branches/gtk-2-14/; revision=21685
2008-10-19 11:51:41 +00:00
Djihed Afifi
b45d882556 Updated Arabic Translation by Anas Afif Emad.
* Updated Arabic Translation by Anas Afif Emad. 

svn path=/branches/gtk-2-14/; revision=21684
2008-10-19 11:43:06 +00:00
Theppitak Karoonboonyanan
27d6d5cd09 Updated Thai translation.
2008-10-19  Theppitak Karoonboonyanan  <thep@linux.thai.net>

	* th.po: Updated Thai translation.


svn path=/branches/gtk-2-14/; revision=21683
2008-10-19 04:03:43 +00:00
Theppitak Karoonboonyanan
951642506b Updated Thai translation.
2008-10-19  Theppitak Karoonboonyanan  <thep@linux.thai.net>

	* th.po: Updated Thai translation.


svn path=/branches/gtk-2-14/; revision=21681
2008-10-19 02:55:45 +00:00
Ignacio Casal Quinteiro
bd70be44c2 Updated Galician Translation.
svn path=/branches/gtk-2-14/; revision=21679
2008-10-18 14:36:42 +00:00
Ignacio Casal Quinteiro
6e667e11e6 Updated Galician translation
svn path=/branches/gtk-2-14/; revision=21678
2008-10-18 14:35:20 +00:00
Takeshi AIHANA
c618083f1f Updated Japanese translation.
2008-10-18  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/branches/gtk-2-14/; revision=21677
2008-10-18 03:42:51 +00:00
Tor Lillqvist
91e142b555 On WM_WINDOWPOSCHANGING, don't dereference windowpos in the debugging
2008-10-18  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_WINDOWPOSCHANGING, don't dereference windowpos in the debugging
	output without setting it first.


svn path=/branches/gtk-2-14/; revision=21675
2008-10-17 22:52:26 +00:00
Tor Lillqvist
28fb940e10 Bug 556578 - GIMP windows stay on top of other windows
2008-10-18  Tor Lillqvist  <tml@novell.com>

	Bug 556578 - GIMP windows stay on top of other windows

	* gdk/win32/gdkevents-win32.c (ensure_stacking_on_unminimize)
	(ensure_stacking_on_window_pos_changing)
	(ensure_stacking_on_activate_app): Ignore unmapped windows in the
	loops where we look for the lowest "transient-type" window.

	(gdk_event_translate): Don't call
	ensure_stacking_on_window_pos_changing() or
	ensure_stacking_on_activate_app() for unmapped windows.


svn path=/branches/gtk-2-14/; revision=21674
2008-10-17 22:13:22 +00:00
Luca Ferretti
8d20b0e3e1 Updated Italian translations.
2008-10-17  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translations.

svn path=/branches/gtk-2-14/; revision=21673
2008-10-17 20:06:31 +00:00
Gil Forcada Codinachs
3d16757865 Updated Catalan translation
svn path=/branches/gtk-2-14/; revision=21671
2008-10-17 18:37:26 +00:00
Matthias Clasen
e2261e010d Bump version
svn path=/branches/gtk-2-14/; revision=21669
2008-10-17 13:58:44 +00:00
Matthias Clasen
e62585d3a3 2.14.4
svn path=/branches/gtk-2-14/; revision=21667
2008-10-17 13:49:31 +00:00
Matthias Clasen
5240b8fabd Updates
svn path=/branches/gtk-2-14/; revision=21666
2008-10-17 03:21:41 +00:00
Marcel Telka
e081180ffb Updated Slovak translation by Pavol Šimo.
2008-10-16  Marcel Telka  <marcel@telka.sk>

	* sk.po: Updated Slovak translation by Pavol Šimo.

svn path=/branches/gtk-2-14/; revision=21663
2008-10-16 22:53:13 +00:00
Marcel Telka
3b7c4153e9 Updated Slovak translation by Pavol Šimo.
2008-10-16  Marcel Telka  <marcel@telka.sk>

	* sk.po: Updated Slovak translation by Pavol Šimo.

svn path=/branches/gtk-2-14/; revision=21662
2008-10-16 22:51:31 +00:00
Andre Klapper
8d683ae99a Updated German translation.
2008-10-16  Andre Klapper  <a9016009@gmx.de>

	* de.po: Updated German translation.


svn path=/branches/gtk-2-14/; revision=21661
2008-10-16 12:24:47 +00:00
Michael Natterer
ece6aa91b3 Merged from trunk:
2008-10-15  Michael Natterer  <mitch@imendio.com>

	Merged from trunk:

	* gdk/gdkapplaunchcontext.h (GDK_IS_APP_LAUNCH_CONTEXT): fix typo
	in the type name so the macro becomes usable.


svn path=/branches/gtk-2-14/; revision=21659
2008-10-15 15:50:51 +00:00
Daniel Nylander
651bfec50b sv.po: Updated Swedish translation
svn path=/branches/gtk-2-14/; revision=21657
2008-10-15 07:53:29 +00:00
Jorge Gonzalez Gonzalez
28ebf66c93 Updated Spanish translation
svn path=/branches/gtk-2-14/; revision=21656
2008-10-14 17:48:08 +00:00
Og B. Maciel
d0385c9c42 Updated Brazilian Portuguese translation.
svn path=/branches/gtk-2-14/; revision=21654
2008-10-14 15:49:55 +00:00
Claude Paroz
2627b132ac Updated French translation.
2008-10-14  Claude Paroz  <claude@2xlibre.net>

	* fr.po: Updated French translation.

svn path=/branches/gtk-2-14/; revision=21652
2008-10-14 13:14:57 +00:00
Matthias Clasen
742abd9630 Bug 555779 – GtkCellRendererPixbuf crashed on failed GIcon lookup
2008-10-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 555779 – GtkCellRendererPixbuf crashed on failed GIcon lookup

        * gtk/gtkcellrendererpixbuf
        (gtk_cell_renderer_pixbuf_create_themed_pixbuf): Don't crash
        if a GIcon is not present in the current theme. Patch by
        Alex Larsson.


svn path=/branches/gtk-2-14/; revision=21651
2008-10-14 03:49:18 +00:00
Matthias Clasen
4806c17f25 Bug 552318 – menubar mnemonics consumed even when
2008-10-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 552318 – menubar mnemonics consumed even when
        gtk-enable-mnemonics=false

        * gtk/gtkwindow.c (gtk_window_activate_key): Don't let mnemonic
        entries block accelerator activation when gtk-enable-mnemonics is
        FALSE. Problem reported by Andreas Moog.


svn path=/branches/gtk-2-14/; revision=21649
2008-10-14 02:03:46 +00:00
Matthias Clasen
b89688efd1 Bug 555953 – libferret missing link against libgtk-x11
2008-10-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 555953 – libferret missing link against libgtk-x11

        * test/Makefile.am: Link libferret against gtk.


svn path=/branches/gtk-2-14/; revision=21647
2008-10-13 16:01:44 +00:00
Matthias Clasen
5eca684b30 Bug 555791 – Natuilus Crashes when opening USB MP3 Player Contents
2008-10-13  Matthias Clasen  <mclasen@redhat.com>

        Bug 555791 – Natuilus Crashes when opening USB MP3 Player Contents

        * io-tga.c (gdk_pixbuf__tga_stop_load): Don't segfault on
        short files.
        Problem reported by Pedro Villavicencio


svn path=/branches/gtk-2-14/; revision=21644
2008-10-13 14:20:34 +00:00
Takeshi AIHANA
d23c2c51d3 Fixed wrong translations (Bug #556017).
2008-10-13  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Fixed wrong translations (Bug #556017).

svn path=/branches/gtk-2-14/; revision=21639
2008-10-13 00:36:43 +00:00
Leonardo Ferreira Fontenelle
73f5108fc1 Fixed terminology in Brazilian Portuguese translation by Vladimir Melo.
2008-10-12  Leonardo Ferreira Fontenelle  <leonardof@gnome.org>

	* pt_BR.po: Fixed terminology in Brazilian Portuguese translation by
	Vladimir Melo.

svn path=/branches/gtk-2-14/; revision=21635
2008-10-12 17:17:49 +00:00
Simos Xenitellis
789c038b1e Fixed Bug 555000, check_algorithmically() applies to deadkey keysyms only.
svn path=/branches/gtk-2-14/; revision=21628
2008-10-10 08:29:36 +00:00
Simos Xenitellis
e364e9fd8a Fixed Bug 555000, check_algorithmically() applies to deadkey keysyms only.
svn path=/branches/gtk-2-14/; revision=21625
2008-10-10 08:27:34 +00:00
Simos Xenitellis
22e548b122 Fixed Bug 555000, check_algorithmically() applies to deadkey keysyms only.
svn path=/branches/gtk-2-14/; revision=21624
2008-10-10 08:26:01 +00:00
Richard Hult
eaacd364b6 Merged from trunk:
2008-10-09  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	Bug 550342 – Splash screens have a caption

	* gdk/quartz/gdkwindow-quartz.c: (_gdk_window_new),
	(gdk_window_set_decorations): Patch from Marianne Gagnon to make
	splash windows borderless.

svn path=/branches/gtk-2-14/; revision=21618
2008-10-09 11:30:10 +00:00
Simos Xenitellis
d5a1933dc0 Fixed Bug 554192 – deadkey-only compose sequences now working
svn path=/branches/gtk-2-14/; revision=21614
2008-10-08 23:09:57 +00:00
Christian Persch
a81b85df5b Bug 554702 – gtkfilesystem leaks GError
Also fixes some "format not a string literal and no format arguments"
warnings.

svn path=/branches/gtk-2-14/; revision=21612
2008-10-08 21:01:50 +00:00
Matthias Clasen
865dd1f3ff Don't forget to reset reload_state when current_folder is already correct.
2008-10-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
        Don't forget to reset reload_state when current_folder is already
        correct. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=465992



svn path=/branches/gtk-2-14/; revision=21610
2008-10-08 15:34:53 +00:00
Matthias Clasen
6235e5c9ed Avoid unitialized memory warnings from valgrind.
2008-10-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (gtk_tooltip_show_tooltip): Avoid unitialized
        memory warnings from valgrind.


svn path=/branches/gtk-2-14/; revision=21604
2008-10-07 18:08:09 +00:00
Matthias Clasen
b6685dda46 Bug 554950 – gail must make itself resident
2008-10-07 Matthias Clasen <mclasen@redhat.com>

        Bug 554950 – gail must make itself resident

        * gail.c: Make the module resident, since it can't handle
        being unloaded.


svn path=/branches/gtk-2-14/; revision=21602
2008-10-07 17:49:07 +00:00
Tor Lillqvist
0a32c2f1e1 Clarification.
svn path=/branches/gtk-2-14/; revision=21594
2008-10-06 21:33:25 +00:00
Matthias Clasen
5f9b49bebe Show the tooltip on the range entry itself, too.
2008-10-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c (create_main_page): Show the tooltip
        on the range entry itself, too.


svn path=/branches/gtk-2-14/; revision=21592
2008-10-06 18:29:50 +00:00
Kjartan Maraas
451a29b95e Updated Norwegian bokmål translation.
2008-10-06  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.

2008-10-01 Og Maciel <ogmaciel@gnome.org>

svn path=/branches/gtk-2-14/; revision=21590
2008-10-06 16:29:52 +00:00
Tor Lillqvist
43df0edf6f Slight editing of last entry.
svn path=/branches/gtk-2-14/; revision=21588
2008-10-05 00:10:58 +00:00
Tor Lillqvist
67ff5f6ec3 Bug 132501 - Make utility window translate to tool window in win32
2008-10-04  Tor Lillqvist  <tml@novell.com>

	Bug 132501 - Make utility window translate to tool window in win32

	Implement the utility window type hint. Such windows are kept on
	top of other windows. Makes GIMP's toolbox and dock windows behave
	more like in GNOME under metacity. Apply the same logic also to
	windows marked with the dialog window type hint, and windows that
	are transient for some other window. I'll call such windows
	"transient-type" below.

	* gdk/win32/gdkevents-win32.c (doesnt_want_key): Drop unused
	variables.

	(ensure_stacking_on_unminimize)
	(ensure_stacking_on_window_pos_changing)
	(ensure_stacking_on_activate_app): New functions to implement the
	desired stacking order. Make sure that a window that is not
	transient-type stays below any transient-type windows of the
	application. When activating a non-transient-type window make sure
	it rises as high as possible.

	(gdk_event_translate): Call above functions on
	WM_WINDOWPOSCHANGING, WM_ACTIVATEAPP and on WM_SIZE when
	unminimizing. Improve debugging printout.

	* gdk/win32/gdkwindow-win32.c (get_effective_window_decorations):
	Handle utility windows like toolbar windows.

	(gdk_window_new_internal) (update_style_bits): Give utility
	windows the WS_EX_TOOLWINDOW extended style.

	(gdk_window_set_title): If debugging "misc" or "events", make the
	handle of top-level windows show up in their title bars. Very
	useful when looking at debugging output.

	(gdk_window_set_keep_above) (gdk_window_set_keep_below)
	(gdk_window_set_modal_hint) (gdk_window_set_skip_taskbar_hint)
	(gdk_window_set_skip_pager_hint): Add and improve debugging
	printout.

	(gdk_window_set_type_hint): Print hint symbolically in GDK_NOTE().


svn path=/branches/gtk-2-14/; revision=21586
2008-10-04 23:47:06 +00:00
Tor Lillqvist
7c0afcf02c New debugging printout function. Decodes the SWP_* bits.
2008-10-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain-win32.c
	(_gdk_win32_window_pos_bits_to_string): New debugging
	printout function. Decodes the SWP_* bits.

	* gdk/win32/gdkprivate-win32.h: Declare it.


svn path=/branches/gtk-2-14/; revision=21585
2008-10-04 23:20:26 +00:00
Tor Lillqvist
47d82c8304 New debugging printout function. Decodes the WS_EX_* bits.
2008-10-04  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkmain-win32.c (_gdk_win32_window_exstyle_to_string):
	New debugging printout function. Decodes the WS_EX_* bits.
	
	* gdk/win32/gdkprivate-win32.h: Declare it. Define
	GDK_DEBUG_MISC_OR_EVENTS for use in GDK_NOTE() to match either
	"misc" or "events".


svn path=/branches/gtk-2-14/; revision=21584
2008-10-04 20:27:31 +00:00
Matthias Clasen
395071a745 Merged from trunk:
2008-10-02  Matthias Clasen <mclasen@redhat.com>

        Merged from trunk:

        530575 – GtkEntry with invisible chars has a confused cursor in
        overwrite mode
        Bug 371908 – Password Entry broken

        * gtk/gtkentry.c (gtk_entry_draw_cursor): Use the visible text
        in the layout when positioning the cursor, not the actual text
        content of the entry. This makes a different when using overwrite
        mode in an invisible entry.
        Problem noticed by Jonathan Blandford

        * gtk/gtkentry.c (gtk_entry_backspace): Make backspace behave
        properly when invisible.


svn path=/branches/gtk-2-14/; revision=21581
2008-10-03 01:42:41 +00:00
Simos Xenitellis
e20d555abe Fixed Bug 554506 – combining diacritics broken, became deadkeys
svn path=/branches/gtk-2-14/; revision=21579
2008-10-02 22:34:07 +00:00
Christian Persch
1d9431b920 Bug 554704 – gtkfilesystemmodel does too much work
svn path=/branches/gtk-2-14/; revision=21578
2008-10-02 19:56:01 +00:00
Christian Persch
e65267157a Bug 554701 – filechooser spams console with useless warnings
svn path=/branches/gtk-2-14/; revision=21577
2008-10-02 19:55:55 +00:00
Christian Persch
c87722f364 Bug 554698 – mem leak in filechooser
svn path=/branches/gtk-2-14/; revision=21576
2008-10-02 19:55:47 +00:00
Christian Persch
8afb9c371a Bug 554696 – invalid free function used
svn path=/branches/gtk-2-14/; revision=21575
2008-10-02 19:55:40 +00:00
Christian Persch
e5ad7979fb Bug 554691 – mem leak in filechooser
svn path=/branches/gtk-2-14/; revision=21574
2008-10-02 19:55:33 +00:00
Christian Persch
abb636126d Bug 554690 – mem leak in filechooser
svn path=/branches/gtk-2-14/; revision=21573
2008-10-02 19:55:26 +00:00
Og B. Maciel
0ce3515807 Updated Brazilian Portuguese translation.
svn path=/branches/gtk-2-14/; revision=21562
2008-10-01 15:49:10 +00:00
Tor Lillqvist
77243ed6c2 Don't #define _GNU_SOURCE on Windows as it confuses newest mingw headers.
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkscalebutton.c: Don't #define _GNU_SOURCE on Windows as it
	confuses newest mingw headers.


svn path=/branches/gtk-2-14/; revision=21560
2008-10-01 11:04:00 +00:00
Tor Lillqvist
195a935813 Don't #define _GNU_SOURCE on Windows as it confuses newest mingw headers.
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* io-icns.c: Don't #define _GNU_SOURCE on Windows as it confuses
	newest mingw headers.


svn path=/branches/gtk-2-14/; revision=21556
2008-10-01 10:43:55 +00:00
Richard Hult
dfa2fc1f2d Merged from trunk:
2008-09-29  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	Bug 554141 – uninitialized data use/free in gtkclipboard-quartz.c

	* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_contents):
	Patch from Jon A. Cruz to initialize the allocated selection data.

svn path=/branches/gtk-2-14/; revision=21541
2008-09-29 10:51:58 +00:00
Jovan Naumovski
589b292b4a 2008-09-29 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/branches/gtk-2-14/; revision=21539
2008-09-29 00:18:11 +00:00
Jovan Naumovski
de355de4dc 2008-09-29 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/branches/gtk-2-14/; revision=21538
2008-09-29 00:16:27 +00:00
Gil Forcada Codinachs
ccb57be391 Updated Catalan translation by David Planella
svn path=/branches/gtk-2-14/; revision=21536
2008-09-27 17:18:05 +00:00
Luca Ferretti
06604076a9 Updated Italian translation.
2008-09-27  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.

svn path=/branches/gtk-2-14/; revision=21533
2008-09-27 11:20:14 +00:00
Luca Ferretti
298a7818f7 Updated Italian translation by Milo Casagrande.
2008-09-27  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation by Milo Casagrande.

svn path=/branches/gtk-2-14/; revision=21532
2008-09-27 11:19:33 +00:00
Matthias Clasen
2d11ee82cf Also get the content-type, since it is used later on. Pointed out by Davyd
* gtk/gtkfilechooserdefault.c (show_and_select_files): Also
        get the content-type, since it is used later on.
        Pointed out by Davyd Madeley.

svn path=/branches/gtk-2-14/; revision=21528
2008-09-27 00:21:43 +00:00
Matthias Clasen
4b5d2bd0db Bug 553578 - tabs are not drawn correctly
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553578 - tabs are not drawn correctly

        * gtk/gtknotebook.c: Track the visibility state of notebook tabs
        between allocations so that we know to redraw the tab labels if
        tabs are hidden and shown without changing position.
        Reported by Marek Kašík, patch by Owen Taylor.



svn path=/branches/gtk-2-14/; revision=21526
2008-09-27 00:00:32 +00:00
Matthias Clasen
e1040c7d22 Bug 553133 – GtkFileChooser won't ask to mount a volume
2008-09-26  Matthias Clasen  <mclasen@redhat.com>

        Bug 553133 – GtkFileChooser won't ask to mount a volume

        * gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Use
        a GtkMountOperation when mounting, so that we get a password
        dialog when required.



svn path=/branches/gtk-2-14/; revision=21524
2008-09-26 19:45:13 +00:00
Matej Urbančič
2ee27686b3 Updated Slovenian translation
svn path=/branches/gtk-2-14/; revision=21519
2008-09-25 17:44:11 +00:00
Luca Ferretti
e0b181669d Updated Italian translation by Milo Casagrande.
2008-09-25  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation by Milo Casagrande.

svn path=/branches/gtk-2-14/; revision=21518
2008-09-25 13:46:07 +00:00
Marek Kasik
44e183447c Bug 553241 – double freed pointer in lpr_write cause firefox3 crash
2008-09-25  Marek Kasik  <mkasik@redhat.com>

	Bug 553241 – double freed pointer in lpr_write cause firefox3 crash

	* modules/printbackends/lpr/gtkprintbackendlpr.c:
	The redundant freeing of memory was removed.

	Patch by Chris Wang

svn path=/branches/gtk-2-14/; revision=21517
2008-09-25 11:57:56 +00:00
Michael Natterer
b3449c79db Merged from trunk:
2008-09-25  Michael Natterer  <mitch@imendio.com>

	Merged from trunk:

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
	don't unref the file system backend, the newly added
	unset_file_system_backend() already does this (bug #553135).


svn path=/branches/gtk-2-14/; revision=21515
2008-09-25 11:23:42 +00:00
Tor Lillqvist
354e3059e4 Include all of share/man, lib/pkgconfig, share/aclocal and share/gtk-doc
2008-09-24  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: Include all of share/man, lib/pkgconfig,
	share/aclocal and share/gtk-doc instead of trying to list
	individual files or subdirectories. We had missed gail.pc, for
	instance.


svn path=/branches/gtk-2-14/; revision=21510
2008-09-24 09:21:48 +00:00
Matthias Clasen
d52f1a2fc7 Bump version
svn path=/branches/gtk-2-14/; revision=21505
2008-09-24 04:29:30 +00:00
Matthias Clasen
887449e0a8 2.14.3
svn path=/branches/gtk-2-14/; revision=21503
2008-09-24 04:26:41 +00:00
Matthias Clasen
0876876cdc fix the tests
svn path=/branches/gtk-2-14/; revision=21502
2008-09-24 03:06:27 +00:00
Matthias Clasen
dcb0268b6a Updates
svn path=/branches/gtk-2-14/; revision=21501
2008-09-23 23:18:26 +00:00
Matthias Clasen
111001a343 Warn if the adjustment has nonzero page size.
2008-09-23  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkspinbutton.c: Warn if the adjustment has nonzero page size.



svn path=/branches/gtk-2-14/; revision=21500
2008-09-23 22:23:09 +00:00
Matthias Clasen
3802693e6f Update to explain the situation.
2008-09-23  Matthias Clasen  <mclasen@redhat.com>

        * README.in: Update to explain the situation.

        * gtk/gtkadjustment.c: Revert to the old behaviour of allowing
        values in the range [lower, upper]. Relying on the possibility
        to set values in the [upper - page_size, upper] subrange is
        considered deprecated, though, and will trigger a warning.

        * gtk/gtkcombobox.c:
        * gtk/gtkiconview.c:
        * gtk/gtkrange.c:
        * gtk/gtkscrolledwindow.c:
        * gtk/gtktreeview.c: Add the CLAMPing back that was removed after
        the GtkAdjustment behaviour change.


svn path=/branches/gtk-2-14/; revision=21499
2008-09-23 21:23:49 +00:00
Andre Klapper
d508d9259a Updated Afrikaans translation on behalf of F Wolff. Fixes bug #355812.
2008-09-22  Andre Klapper  <a9016009@gmx.de>

	* af.po: Updated Afrikaans translation on behalf of F Wolff.
	Fixes bug #355812.


svn path=/branches/gtk-2-14/; revision=21494
2008-09-22 20:59:54 +00:00
Matthias Clasen
0f9908b238 Bug 553135 – eog crash: assertion failed. Gtk error:
2008-09-22  Matthias Clasen  <mclasen@redhat.com>

        Bug 553135 – eog crash: assertion failed. Gtk error:
        shortcuts_remove_rows: code should not be reached

        * gtk/gtkfilechooserdefault.c: Disconnect from GtkFileSystem
        signals when we are destroyed, in order to avoid nasty surprises.
        Patch by Claudio Saavedra


svn path=/branches/gtk-2-14/; revision=21493
2008-09-22 18:33:51 +00:00
Matej Urbančič
9d41335b72 Updated Slovenian translation
svn path=/branches/gtk-2-14/; revision=21490
2008-09-22 14:18:14 +00:00
Frederic Crozat
bbc3430856 use the correct gi18n header. Fixes bug #553000.
2008-09-22  Frederic Crozat  <fcrozat@mandriva.com>

        * gtk/gtkfilesystem.c: use the correct gi18n header.
        Fixes bug #553000.


svn path=/branches/gtk-2-14/; revision=21487
2008-09-22 08:58:15 +00:00
Priit Laes
87d0a759cd Translation updated by Ivar Smolin
2008-09-22  Priit Laes  <plaes at svn dot gnome dot org>

	* et.po: Translation updated by Ivar Smolin

svn path=/branches/gtk-2-14/; revision=21484
2008-09-22 08:05:40 +00:00
Priit Laes
5fe70d970b Translation updated by Ivar Smolin
2008-09-22  Priit Laes  <plaes at svn dot gnome dot org>

	* et.po: Translation updated by Ivar Smolin

svn path=/branches/gtk-2-14/; revision=21483
2008-09-22 08:04:36 +00:00
Ankitkumar Rameshchandra Patel
ca2533127f Updated Gujarati Translations.
svn path=/branches/gtk-2-14/; revision=21482
2008-09-22 05:44:28 +00:00
Praveen Arimbrathodiyil
7cb7211a49 Malayalam translation updated by Hari Vishnu
svn path=/branches/gtk-2-14/; revision=21481
2008-09-22 00:02:13 +00:00
Nickolay V. Shmyrev
544950f67d Updated Russian translation.
2008-09-21  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation.


svn path=/branches/gtk-2-14/; revision=21479
2008-09-21 18:58:33 +00:00
Nickolay V. Shmyrev
179fc518b9 Updated Russian translation by Yurii Penkin.
2008-09-21  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation by Yurii Penkin.


svn path=/branches/gtk-2-14/; revision=21478
2008-09-21 18:57:57 +00:00
Gabor Kelemen
cbbdbe4bb0 Translation updated.
2008-09-21  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated.

svn path=/branches/gtk-2-14/; revision=21474
2008-09-21 11:54:57 +00:00
Rajesh Ranjan
25ea6b6d93 hindi update by Rajesh Ranjan
svn path=/branches/gtk-2-14/; revision=21472
2008-09-21 06:44:03 +00:00
Matthias Clasen
e199eb5957 Plug a possible leak of textutils
svn path=/branches/gtk-2-14/; revision=21471
2008-09-21 05:35:14 +00:00
Matthias Clasen
0068ec2781 Don't leak a GFile
svn path=/branches/gtk-2-14/; revision=21469
2008-09-21 05:22:21 +00:00
Kenneth Nielsen
090171160f Updated Danish translation
svn path=/branches/gtk-2-14/; revision=21467
2008-09-20 20:35:54 +00:00
Kenneth Nielsen
12ff393bbf Updated Danish translation
svn path=/branches/gtk-2-14/; revision=21464
2008-09-20 20:29:47 +00:00
Ilkka Tuohela
085c714429 Updated Finnish translation
svn path=/branches/gtk-2-14/; revision=21461
2008-09-20 10:08:12 +00:00
Takeshi AIHANA
7053b6c34c Updated Japanese translation.
2008-09-20  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/branches/gtk-2-14/; revision=21459
2008-09-20 00:26:39 +00:00
Goran Rakic
f3d07160e1 Updated Serbian translation
svn path=/branches/gtk-2-14/; revision=21457
2008-09-19 19:28:01 +00:00
Matej Urbančič
c955d4ad04 Updated Slovenian translation
svn path=/branches/gtk-2-14/; revision=21455
2008-09-19 15:17:35 +00:00
Matej Urbančič
fc08f5a96f Updated Slovenian translation
svn path=/branches/gtk-2-14/; revision=21454
2008-09-19 15:17:24 +00:00
Matej Urbančič
f9e4216fee Updated Slovenian translation
svn path=/branches/gtk-2-14/; revision=21453
2008-09-19 14:48:22 +00:00
Matthias Clasen
f7b5f6c119 Plug a small memory leak
svn path=/branches/gtk-2-14/; revision=21452
2008-09-19 14:36:07 +00:00
Mugurel Tudor
901f98928e Updated Romanian translation by Mişu Moldovan <dumol@gnome.ro>
2008-09-19  Mugurel Tudor  <mugurelu@gnome.ro>

	* ro.po: Updated Romanian translation by
	Mişu Moldovan <dumol@gnome.ro>

svn path=/branches/gtk-2-14/; revision=21450
2008-09-19 14:24:05 +00:00
Mugurel Tudor
8ed4295637 Updated Romanian translation by Mişu Moldovan <dumol@gnome.ro>
2008-09-19  Mugurel Tudor  <mugurelu@gnome.ro>

	* ro.po: Updated Romanian translation by
	Mişu Moldovan <dumol@gnome.ro>

svn path=/branches/gtk-2-14/; revision=21449
2008-09-19 14:22:12 +00:00
Christian Persch
0cae3b1f88 Bug 552837 – mem leak in gtkimmulticontext
* gtk/gtkimmulticontext.c: (gtk_im_multicontext_get_slave): Plug mem
	leak.

svn path=/branches/gtk-2-14/; revision=21444
2008-09-19 12:27:46 +00:00
Felix I
ba6d64651d Tamil translation updated
svn path=/branches/gtk-2-14/; revision=21443
2008-09-19 12:22:03 +00:00
Felix I
12c7fa961f Tamil translation updated
svn path=/branches/gtk-2-14/; revision=21442
2008-09-19 12:19:02 +00:00
Felix I
9f8575cfaf Tamil translation updated
svn path=/branches/gtk-2-14/; revision=21441
2008-09-19 11:34:05 +00:00
Matthias Clasen
f64f8211a4 Plug a memory leak
svn path=/branches/gtk-2-14/; revision=21440
2008-09-19 04:45:53 +00:00
1152 changed files with 320302 additions and 529370 deletions

View File

@@ -1,3 +1,818 @@
2009-01-07 Matthias Clasen <mclasen@redhat.com>
* === Released 2.14.7 ===
* NEWS: Updates
2009-01-05 Tor Lillqvist <tml@iki.fi>
Bug 566628 - gdk_display_close always asserts on win32
* gdk/win32/gdkdisplay-win32.c
(_gdk_windowing_set_default_display): Allow also a NULL parameter
in the g_assert(). Still don't actually do anything in this
function, though.
2009-01-03 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 566391 gtk_about_dialog_set_url_hook should activate
pre-existing website links
* gtk/gtkaboutdialog.c: Make setting website, website-label and
url hook work independent of their order. Reported by Steven
Sheehy.
2009-01-03 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkscreen-x11.h:
* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window): Recheck
_NET_SUPPORTING_WM_CHECK every now and then to avoid getting
stuck on the id of a former wmcheck window that got reused by
another client (see RH bug 471927)
2009-01-03 Matthias Clasen <mclasen@redhat.com>
* NEWS: Updates
2009-01-03 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtktreemodelsort.c: Don't assert when using the "unsorted"
sort column id.
2009-01-03 Matthias Clasen <mclasen@redhat.com>
` Merged from trunk:
Bug 558694 Paned window splitter keynav broken
* gtk/gtkpaned.c (get_child_panes): Don't add unrealized
widgets.
2009-01-03 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* Makefile.decl: Start Xvfb with -ac -noreset to try
and get the gui tests working.
2009-01-03 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 565846 "va_end(args);" should be added into gtk_tree_store_new
* gtk/gtktreestore.c (gtk_tree_store_new): Add a missing
va_end() call. Pointed out by Jiwon Lee.
2009-01-03 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkiconview.c: (gtk_icon_view_accessible_model_row_changed):
Bug #549251. No need to set name if there is no a11y item object.
2008-12-21 Yair Hershkovitz <yairhr@gmail.com>
Bug 565203: RTL locales: icons are misplaced when horizontal
gtkiconview is contained in a gtkscrolledwindow.
* gtk/gtkiconview.c (gtk_icon_view_layout_single_row):
Fix horizontal icon positions when in RTL locale.
2008-12-16 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
2008-12-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.14.6 ===
2008-12-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprintunixdialog.c: Don't export emit_ok_response
2008-12-15 Matthias Clasen <mclasen@redhat.com>
* NEWS: Updates
2008-12-15 Tomas Bzatek <tbzatek@redhat.com>
* gtk/gtkfilechooserdefault.c: (list_row_activated):
* gtk/gtkfilesystem.c: (_gtk_file_info_consider_as_directory):
Mask G_FILE_TYPE_SHORTCUT as a directory (#561494)
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Mount the enclosing volume if the folder we're switching to is not
mounted. Patch by Tomas Bzatek, based on work by Carlos Garnacho
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 561494 FileChooser network browsing and authentication support
* gtk/gtkfilesystem.[hc] (_gtk_file_info_consider_as_directory):
Privately export this method. It classifies directories and mountables
the same.
* gtk/gtkfilesystem.c (enclosing_volume_mount_cb): Silently drop
G_IO_ERROR_ALREADY_MOUNTED error for gvfs backends without visible
mounts.
* gtk/gtkfilesystemmodel.c:
* gtk/gtkfilechooserbutton.c:
* gtk/gtkfilechooserentry.c:
* gtk/gtkfilechooserdefault.c: Use the new function instead of
direct checks for G_FILE_TYPE_DIRECTORY throughout.
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 562579 Remove error dialog when directory does not exist
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Don't show an error dialog when changing to a non-existing folder,
since this is ususally just an annoyance.
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 556233 local-only causes G_IS_FILE warning
* gtk/gktfilechooserdefault.c (set_local_only): Avoid a warning
in tests. Patch by Christian Dywan
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 563158 CellRendererProgress pulsing and progressing rows can
not be used together
* gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_set_pulse):
Don't try to keep state in a cell renderer between two paint
calls. It doesn't work. Patch by Kristian Mueller
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 555560 gtk_combo_box_set_active fails with no model
* gtk/gtkcombobox.c: Allow out-of-order setting of model and active.
Patch by Christian Dywan
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 558306 Cannot build gdk (gtk+ 2.14.4) on Solaris 8
* gdk/x11/gdktestutils-x11.c (gdk_test_simulate_button):
Remove a C99ism. Pointed out by Eric Lamarque
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 549251 GTK icon view accessible issue.
* gtk/gtkiconview.c (gtk_icon_view_accessible_model_row_changed):
Handle separate append/set for rows. Patch by Li Yuan
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 556839 Crash when opening a link
* gtk/gtkstatusicon.c (gtk_status_icon_finalize): Destroy the
image too. Patch by Carlos Garcia Campos
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 563751 xatom cache is prefilled too late
* gdk/x11/gdkdisplay-x11.c (gdk_display_open): Initialize the
XAtom cache earlier. Patch by Christian Persch
2008-12-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 564212 gtk_icon_view_accessible_model_rows_reordered explain
new_order in the wrong way
* gtk/gtkiconview.c (gtk_icon_view_accessible_model_rows_reordered):
Use the new order correctly. Patch by Li Yuan
2008-12-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 564066 Crash in gtk_rc_parse_default_files
* gtk/gtkrc.c (gtk_rc_parse_default_files): Handle being called
early. Bug report by Andrés G. Aragoneses
2008-12-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkmountoperation.c: Set an empty title on password dialogs.
Pointed out by Máirín Duffy.
2008-12-10 Matthias Clasen <mclasen@redhat.com>
Merge from trunk:
Bug 560135 - Print when the user double clicks a printer
* gtk/gtkprintunixdialog.c: add handling of double click to
GtkPrintUnixDialog. Patch by Marek Kasik
2008-12-10 Matthias Clasen <mclasen@redhat.com>
Bug 563991 gtk_file_chooser_button_new_with_backend is deprecated
-- but what should be used instead?
* gtk/gtkfilechooserbutton.c: Enhanced deprecation annotation.
2008-12-07 Behdad Esfahbod <behdad@gnome.org>
Bug 563547 Update gdkx11 atom precache table
* gdk/x11/gdkdisplay-x11.c: Add more atoms to precache.
2008-12-04 Simos Xenitellis <simos@gnome.org>
Bug 557420#c23:
* gtk/gtkimcontextsimple.c: Fixed the lower bound for dead keys
to dead_grave (instead of dead_stroke).
2008-12-01 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 555334 connected server feature
* gtk/gtkfilesystem.c (get_volumes_list): Filter out shadow mounts.
Patch by David Zeuthen.
2008-11-29 Federico Mena Quintero <federico@novell.com>
Merged from trunk:
* gtk/gtktreeview.c (gtk_tree_view_bin_expose): If tree lines are
enabled, flip them around for the right-to-left case. Fixes
https://bugzilla.novell.com/show_bug.cgi?id=447004. Patch by
Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt>
2008-11-27 Simos Xenitellis <simos@gnome.org>
Bug 557420 Some compose sequences don't work anymore (or only in
a specific order)
* gtk/gtkimcontextsimple.c: Update of table size, keysym boundary,
to match the gtkimcontextsimpleseqs.h table.
* gtk/gtkimcontextsimpleseqs.h: Update with older gtk+ compose
sequences that went missing due to table update with upstream.
* gtk/compose-parse.py: Updated to include gtk-compose-lookaside.txt
* gtk/gtk-compose-lookaside.txt: Older gtk+ compose sequences that
are not found in the X.Org Compose file.
2008-11-24 Tristan Van Berkom <tvb@gnome.org>
* gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations
fall short of border width and padding.
2008-11-24 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
* === Released 2.14.5 ===
* NEWS: Updates
2008-11-23 Hans Breuer <hans@breuer.org>
* config.h.win32.in : don't define USE_MMX for msvc
* gdk-pixbuf/makefile.msc gtk/makefile.msc.in : updated
2008-11-21 Kjartan Maraas <kmaraas@gnome.org>
* gtk/gtkbuilder.c: (_gtk_builder_flags_from_string):
* gtk/gtkfilechooserdefault.c:
(file_list_drag_data_received_get_info_cb):
* gtk/gtkiconfactory.c: (icon_source_start_element):
* gtk/gtkprintbackend.c: (gtk_print_backend_module_load):
* gtk/gtkprintoperation.c: (run_pdf):
* gtk/gtkthemes.c: (gtk_theme_engine_load):
* gtk/tests/builder.c: (test_file):
* tests/testmerge.c: (dump_tree):
Missing format specifiers and some other small bits.
Bugzilla bug #554567.
2008-11-14 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 552956 Should check composite extension version
* gdk/x11/gdkdisplay-x11.c: Check that the version of the
composite extension is at least 0.4.
Patch by Owen Taylor
2008-11-14 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 541391 Unfocussable Treeview swallows focus
* gtk/gtktreeview.c (grab_focus_and_unset_draw_keyfocus),
(gtk_tree_view_focus): Honor GTK_WIDGET_CAN_FOCUS properly.
Patch by Christian Dywan.
2008-11-05 Richard Hult <richard@imendio.com>
Merged from trunk:
* gdk/quartz/gdkevents-quartz.c:
(get_keyboard_modifiers_from_ns_event), (create_key_event): Revert
(at least for now) the alt/cmd switching since it breaks the
"alt-gr" functionality of alt which makes it impossible to input
lots of characters.
2008-11-04 Tor Lillqvist <tml@novell.com>
Bug 557212 - Problem with which window gains focus and is visible
* gdk/win32/gdkevents-win32.c (ensure_stacking_on_activate_app):
Only do the restacking for the active window of the
application. Seems to fix the problem.
(gdk_event_translate): Only call ensure_stacking_on_activate_app()
when the application is being activated, not deactivated.
2008-11-01 Tor Lillqvist <tml@novell.com>
Bug 558278 - Crash when calling a callback set by
gdk_add_client_message_filter()
* gdk/win32/gdkevents-win32.c (apply_event_filters): Rename from
apply_filters() so that it is clear that this function is for
GdkEventFilters only.
(print_event): Print more information for GDK_CLIENT_EVENT events.
(gdk_event_translate): When handling client filters, don't use
apply_event_filters(). Use similar code as in the X11 backend,
although not exactly, as the parameter list and return value
semantics of gdk_event_translate() is different.
2008-10-31 Matthias Clasen <mclasen@redhat.com>
Bug 558323 glitches when popping up combos in treeviews
gtk/gtkcellrenderercombo.c (gtk_cell_renderer_combo_set_property):
Don't set the model property on the combo box, since that leads
to loops. Reported by Tristan Van Berkom
2008-10-30 Christian Dywan <christian@imendio.com>
Bug 557316 GtkLinkButton should consider user-defined tooltip
* gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
Only override the tooltip if not previously set
2008-10-27 Richard Hult <richard@imendio.com>
Merged from trunk:
Bug 557894 Wrong return value for
gdk_pointer_grab_info_libgtk_only()
* gdk/quartz/gdkevents-quartz.c:
(gdk_pointer_grab_info_libgtk_only): Return TRUE when there is a
pointer grab. Patch by Owen Taylor.
2008-10-23 Alexander Larsson <alexl@redhat.com>
Merged from trunk:
Bug 528320 - Incorrect icons displayed for files with custom mimetype icons
* gtk/gtkfilesystem.c:
(_gtk_file_info_render_icon):
Fall back on default file icon if there was no icon or it
was not found in the theme. This goes with the corresponding
change in glib to not add the fallback icon, but is useful
in other cases too.
2008-10-22 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gdk/x11/gdkscreen-x11.c: Only emit size-changed if the screen
size actually changed.
2008-10-21 Tor Lillqvist <tml@novell.com>
Bug 557266 - Window Management Problem
Also reported in mail to gtk-list, and of course it has been well
known in general that window state management is messy and buggy
in various ways in gdk/win32.
* gdk/win32/gdkwindow-win32.c (show_window_internal): Correct
handling of GDK_WINDOW_STATE_ABOVE windows. It doesn't work to set
the WS_EX_TOPMOST extended style bit using SetWindowLong(). We
must call SetWindowPos() on the window using HWND_TOPMOST
instead. The description for WS_EX_TOPMOST in the documentation
for CreateWindowEx() even implies that if you read it carefully.
2008-10-20 Christian Persch <chpe@gnome.org>
Bug 557059 crash when compositing emblems with icon
* gtk/gtkicontheme.c: (apply_emblems): Copy the pixbuf before using it
with gtk_pixbuf_composite, in case its pixdata is read-only (mmaped
from icon cache or builtins).
2008-10-18 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
WM_WINDOWPOSCHANGING, don't dereference windowpos in the debugging
output without setting it first.
2008-10-18 Tor Lillqvist <tml@novell.com>
Bug 556578 - GIMP windows stay on top of other windows
* gdk/win32/gdkevents-win32.c (ensure_stacking_on_unminimize)
(ensure_stacking_on_window_pos_changing)
(ensure_stacking_on_activate_app): Ignore unmapped windows in the
loops where we look for the lowest "transient-type" window.
(gdk_event_translate): Don't call
ensure_stacking_on_window_pos_changing() or
ensure_stacking_on_activate_app() for unmapped windows.
2008-10-17 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
2008-10-16 Matthias Clasen <mclasen@redhat.com>
* === Released 2.14.4 ====
* NEWS: Updates
2008-10-15 Michael Natterer <mitch@imendio.com>
Merged from trunk:
* gdk/gdkapplaunchcontext.h (GDK_IS_APP_LAUNCH_CONTEXT): fix typo
in the type name so the macro becomes usable.
2008-10-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 555779 GtkCellRendererPixbuf crashed on failed GIcon lookup
* gtk/gtkcellrendererpixbuf
(gtk_cell_renderer_pixbuf_create_themed_pixbuf): Don't crash
if a GIcon is not present in the current theme. Patch by
Alex Larsson.
2008-10-13 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 552318 menubar mnemonics consumed even when
gtk-enable-mnemonics=false
* gtk/gtkwindow.c (gtk_window_activate_key): Don't let mnemonic
entries block accelerator activation when gtk-enable-mnemonics is
FALSE. Problem reported by Andreas Moog.
2008-10-10 Simos Xenitellis <simos@gnome.org>
Merged from trunk:
Bug 555000 Wrong treatment on non-spacing marks dead keys in
GtkIMContextSimple
* gtk/gtkimcontextsimple.c: Change IS_DEAD_KEY() macro so that
it only checks if input is a deadkey.
2008-10-09 Richard Hult <richard@imendio.com>
Merged from trunk:
Bug 550342 Splash screens have a caption
* gdk/quartz/gdkwindow-quartz.c: (_gdk_window_new),
(gdk_window_set_decorations): Patch from Marianne Gagnon to make
splash windows borderless.
2008-10-09 Simos Xenitellis <simos@gnome.org>
Bug 554192 double press on the "circumflex" dead key
(standard french 105 keyboard) no longer produces the "^" character
* gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
Changed the order, put check_compact_table() first, then
check_algorithmically().
2008-10-08 Christian Persch <chpe@gnome.org>
Bug 554702 gtkfilesystem leaks GError
* gtk/gtkfilesystem.c (_gtk_file_system_init): Free the GError.
2008-10-08 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
Don't forget to reset reload_state when current_folder is already
correct. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=465992
2008-10-06 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtktooltip.c (gtk_tooltip_show_tooltip): Avoid unitialized
memory warnings from valgrind.
2008-10-06 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkprintunixdialog.c (create_main_page): Show the tooltip
on the range entry itself, too.
2008-10-04 Tor Lillqvist <tml@novell.com>
Bug 132501 - Make utility window translate to tool window in win32
Implement the utility window type hint. Such windows are kept on
top of other windows of the same process. Makes GIMP's toolbox and
dock windows behave more like in GNOME under metacity. Apply the
same logic also to windows marked with the dialog window type
hint, and windows that are transient for some other window. I'll
call such windows "transient-type" below.
* gdk/win32/gdkevents-win32.c (doesnt_want_key): Drop unused
variables.
(ensure_stacking_on_unminimize)
(ensure_stacking_on_window_pos_changing)
(ensure_stacking_on_activate_app): New functions to implement the
desired stacking order. Make sure that a window that is not
transient-type stays below any transient-type windows of the
application. When activating a non-transient-type window make sure
it rises as high as possible while still staying below the lowest
transient-type window.
(gdk_event_translate): Call above functions on
WM_WINDOWPOSCHANGING, WM_ACTIVATEAPP and on WM_SIZE when
unminimizing. Improve debugging printout.
* gdk/win32/gdkwindow-win32.c (get_effective_window_decorations):
Handle utility windows like toolbar windows.
(gdk_window_new_internal) (update_style_bits): Give utility
windows the WS_EX_TOOLWINDOW extended style.
(gdk_window_set_title): If debugging "misc" or "events", make the
handle of top-level windows show up in their title bars. Very
useful when looking at debugging output.
(gdk_window_set_transient_for) (gdk_window_set_keep_above)
(gdk_window_set_keep_below) (gdk_window_set_modal_hint)
(gdk_window_set_skip_taskbar_hint)
(gdk_window_set_skip_pager_hint): Add and improve debugging
printout.
(gdk_window_set_type_hint): Print hint symbolically in GDK_NOTE().
2008-10-04 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkmain-win32.c (_gdk_win32_window_exstyle_to_string)
(_gdk_win32_window_pos_bits_to_string): New debugging printout
functions. Decode the WS_EX_* and SWP_* bits.
* gdk/win32/gdkprivate-win32.h: Declare them. Define
GDK_DEBUG_MISC_OR_EVENTS for use in GDK_NOTE() to match either
"misc" or "events".
2008-10-02 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
530575 GtkEntry with invisible chars has a confused cursor in
overwrite mode
Bug 371908 Password Entry broken
* gtk/gtkentry.c (gtk_entry_draw_cursor): Use the visible text
in the layout when positioning the cursor, not the actual text
content of the entry. This makes a different when using overwrite
mode in an invisible entry.
Problem noticed by Jonathan Blandford
* gtk/gtkentry.c (gtk_entry_backspace): Make backspace behave
properly when invisible.
2008-10-02 Simos Xenitellis <simos@gnome.org>
Bug 554506 combining diacritics broken, became deadkeys
* gtk/gtkimcontextsimple.c: added check if keysym is greater
than 0x1000000, in this case it is not a dead key.
2008-10-02 Christian Persch
Bug 554704 gtkfilesystemmodel does too much work
* gtk/gtkfilesystemmodel.c: Replace g_slist_length()<1 check with a
simple NULL check.
2008-10-02 Christian Persch
Bug 554701 filechooser spams console with useless warnings
* gtk/gtkfilesystem.c.c: Don't warn if the async call was simply
cancelled.
2008-10-02 Christian Persch
Bug 554698 mem leak in filechooser
* gtk/gtkfilechooserdefault.c: Plug a mem leak.
2008-10-02 Christian Persch
Bug 554696 invalid free function used
* gtk/gtkfilesystemmodel.c: Use the right free func.
2008-10-02 Christian Persch
Bug 554691 mem leak in filechooser
* gtk/gtkfilesystemmodel.c: Plug a mem leak.
2008-10-02 Christian Persch
Bug 554690 mem leak in filechooser
* gtk/gtkfilechooserdefault.c: Plug a mem leak.
2008-10-01 Tor Lillqvist <tml@novell.com>
* gtk/gtkscalebutton.c: Don't #define _GNU_SOURCE on Windows as it
confuses newest mingw headers.
2008-09-29 Richard Hult <richard@imendio.com>
Merged from trunk:
Bug 554141 uninitialized data use/free in gtkclipboard-quartz.c
* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_contents):
Patch from Jon A. Cruz to initialize the allocated selection data.
2008-09-26 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 553211 GtkFileChooserButton unsets filter after first use
* gtk/gtkfilechooserdefault.c (show_and_select_files): Also
get the content-type, since it is used later on.
Pointed out by Davyd Madeley.
2008-09-26 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 553578 - tabs are not drawn correctly
* gtk/gtknotebook.c: Track the visibility state of notebook tabs
between allocations so that we know to redraw the tab labels if
tabs are hidden and shown without changing position.
Reported by Marek Kašík, patch by Owen Taylor.
2008-09-26 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 553133 GtkFileChooser won't ask to mount a volume
* gtk/gtkfilechooserdefault.c (shortcuts_activate_volume): Use
a GtkMountOperation when mounting, so that we get a password
dialog when required.
2008-09-25 Marek Kasik <mkasik@redhat.com>
Bug 553241 double freed pointer in lpr_write cause firefox3 crash
* modules/printbackends/lpr/gtkprintbackendlpr.c:
The redundant freeing of memory was removed.
Patch by Chris Wang
2008-09-25 Michael Natterer <mitch@imendio.com>
Merged from trunk:
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_finalize):
don't unref the file system backend, the newly added
unset_file_system_backend() already does this (bug #553135).
2008-09-24 Tor Lillqvist <tml@novell.com>
* gtk-zip.sh.in: Include all of share/man, lib/pkgconfig,
share/aclocal and share/gtk-doc instead of trying to list
individual files or subdirectories. We had missed gail.pc, for
instance.
2008-09-23 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
* === Released 2.14.3 ===
* gtk/tests/builder.c: Fix the spinbutton test to use page_size 0.
2008-09-23 Matthias Clasen <mclasen@redhat.com>
* NEWS: Updates
2008-09-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkspinbutton.c: Warn if the adjustment has nonzero page size.
* README.in: Update to explain the situation.
* gtk/gtkadjustment.c: Revert to the old behaviour of allowing
values in the range [lower, upper]. Relying on the possibility
to set values in the [upper - page_size, upper] subrange is
considered deprecated, though, and will trigger a warning.
* gtk/gtkcombobox.c:
* gtk/gtkiconview.c:
* gtk/gtkrange.c:
* gtk/gtkscrolledwindow.c:
* gtk/gtktreeview.c: Add the CLAMPing back that was removed after
the GtkAdjustment behaviour change.
2008-09-22 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 553135 eog crash: assertion failed. Gtk error:
shortcuts_remove_rows: code should not be reached
* gtk/gtkfilechooserdefault.c: Disconnect from GtkFileSystem
signals when we are destroyed, in order to avoid nasty surprises.
Patch by Claudio Saavedra
2008-09-22 Frederic Crozat <fcrozat@mandriva.com>
* gtk/gtkfilesystem.c: use the correct gi18n header.
Fixes bug #553000.
2008-09-20 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkfilechooserbutton.c (filter_model_visible_func): Don't
leak a GFile.
2008-09-19 Christian Persch <chpe@gnome.org>
Bug 552837 mem leak in gtkimmulticontext
* gtk/gtkimmulticontext.c: (gtk_im_multicontext_get_slave): Plug mem
leak.
2008-09-17 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version

File diff suppressed because it is too large Load Diff

41
HACKING
View File

@@ -15,50 +15,45 @@ can be found here:
http://developer.gnome.org
Information about using git with GNOME can be found here:
including information about using Subversion with GNOME:
http://live.gnome.org/Git
http://developer.gnome.org/tools/svn.html
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.
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.
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 GIT to get the latest development version of
gtk+ and glib. You can do the following to get glib and gtk+ from GIT:
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:
$ 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+
$ 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+
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
To compile the SVN 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 pushing changes
to GIT, see the `README' and `README.commits' files. In particular,
don't, under any circumstances, push anything to GIT before
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
reading and understanding `README.commmits'.

41
INSTALL Normal file
View File

@@ -0,0 +1,41 @@
Prerequisites
=============
GTK+ requires the following packages:
- The GLib, Pango, ATK and cairo libraries, available at the same
location as GTK+. GTK+ 2.14.7 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.14.7.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.14.7 # 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

View File

@@ -6,7 +6,6 @@ SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
# require automake 1.4
AUTOMAKE_OPTIONS = 1.7
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST += \
HACKING \
@@ -20,9 +19,6 @@ 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 \
@@ -119,26 +115,6 @@ 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@
@@ -173,28 +149,9 @@ DISTCLEANFILES = \
gail.pc \
gtk+-$(GDKTARGET)-2.0-uninstalled.pc \
gdk-$(GDKTARGET)-2.0-uninstalled.pc \
gail-uninstalled.pc \
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:
@@ -219,7 +176,7 @@ dist-hook:
&& cp INSTALL README $(distdir) ; \
fi
.PHONY: files release sanity snapshot ChangeLog
.PHONY: files release sanity snapshot
files:
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
@@ -243,16 +200,4 @@ sanity:
snapshot:
$(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"`
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds --enable-introspection
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
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man --disable-rebuilds

1598
NEWS

File diff suppressed because it is too large Load Diff

405
README Normal file
View File

@@ -0,0 +1,405 @@
General Information
===================
This is GTK+ version 2.14.7. 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.
* 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
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.)

View File

@@ -1,11 +1,11 @@
GTK+ is part of the GNOME git repository. At the current time, any
GTK+ is part of the GNOME Subversion 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 years, we'd like to ask
people committing to GTK+ to follow a few rules:
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:
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 @@ people committing 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,48 +25,30 @@ people committing to GTK+ to follow a few rules:
1) Ask _first_.
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.
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.
Notes:
* 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.
* 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.
* The expected format for git commit messages is as follows:
* The ChangeLog entries should preferably match in date format
with the existing entries. You can set how emacs does this
by using customize mode:
=== 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.
- M-x customize
- set Programming/Tools/ChangeLog/Add Log Time Format to
'Old Format'
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

View File

@@ -27,68 +27,6 @@ Installation
See the file 'INSTALL'
Release notes for 2.20
======================
* GtkStatusbar now has a message area (see gtk_status_bar_get_message_area)
which makes it easy to place additional widgets inside the statusbar
frame or to replace the label widgets. Previously, this was only possible
by accessing the innards of the statusbar widget directly. Applications
which are doing so may need some adjustments, since the addition of the
message area changed the internal widget hierarchy.
* GDK will now set all matching virtual modifiers in the state field of
key events. Depending on your X modifier map, this can lead to more bits
in the state field being set than before. If you are manually matching
key events against key/modifier combinations you should make sure that
you properly mask away irrelevant parts of the state field. The
gdk_keymap_map_virtual_modifiers() function can help with matching
against virtual modifiers.
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.
* JPEG2000 support is no longer enabled by default. It must be
explicitly turned on, by passing --with-libjasper to configure.
* GDK has been reworked to implement 'client-side windows'. This offers
exciting new possibilities, such as transformed, offscreen rendering,
but it breaks some long-standing assumptions that applications may
have about GDK windows. Setting the environment variable
GDK_NATIVE_WINDOWS makes GDK create a native X11 window for each
GDK window, which might make problematic applications work better.
* GTK+ calls signal (SIGPIPE, SIG_IGN) during initialization, to ignore
SIGPIPE signals, since these are almost never wanted in graphical
applications. If you do need to handle SIGPIPE for some reason, reset
the handler after gtk_init(), but notice that other libraries (e.g.
libdbus or gvfs) might do similar things.
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
======================
@@ -110,15 +48,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.
* 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
* 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.
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
@@ -460,4 +398,8 @@ report.
Otherwise, enter a new bug report that describes the patch, and attach
the patch to that bug report.
Patches should be in unified diff form. (The -up option to GNU diff.)
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.)

View File

@@ -1,184 +1,117 @@
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
For prebuilt runtime and developer packages see
http://ftp.gnome.org/pub/gnome/binaries/win32/
Building GTK+ on Win32
======================
First you obviously need developer packages for the compile-time
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
zlib, libtiff at least. See
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
After installing the dependencies, there are two ways to build GTK+
for win32.
1) GNU tools, ./configure && make install
-----------------------------------------
This requires you have mingw and MSYS.
Use the configure script, and the resulting Makefiles (which use
libtool and gcc to do the compilation). I use this myself, but it can
be hard to setup correctly.
The full script I run to build GTK+ 2.16 unpacked from a source
distribution is as below. This is from bulding GTK+ 2.16.5. I don't
use any script like this to build the development branch, as I don't
distribute any binaries from development branches.
# This is a shell script that calls functions and scripts from
# tml@iki.fi's personal work envíronment. It is not expected to be
# usable unmodified by others, and is included only for reference.
MOD=gtk+
VER=2.16.5
REV=1
ARCH=win32
THIS=${MOD}_${VER}-${REV}_${ARCH}
RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip
DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
TARGET=c:/devel/target/$HEX
usedev
usemsvs6
(
set -x
DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg`
PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl`
PKG_CONFIG_PATH=
for D in $DEPS; do
PATH=/devel/dist/${ARCH}/$D/bin:$PATH
[ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH
done
LIBPNG=`latest --arch=${ARCH} libpng`
ZLIB=`latest --arch=${ARCH} zlib`
LIBTIFF=`latest --arch=${ARCH} libtiff`
JPEG=`latest --arch=${ARCH} jpeg`
patch -p0 <<'EOF'
EOF
lt_cv_deplibs_check_method='pass_all' \
CC='gcc -mtune=pentium3 -mthreads' \
CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \
-I/devel/dist/${ARCH}/${ZLIB}/include \
-I/devel/dist/${ARCH}/${LIBTIFF}/include \
-I/devel/dist/${ARCH}/${JPEG}/include \
-I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \
LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \
-L/devel/dist/${ARCH}/${ZLIB}/lib \
-L/devel/dist/${ARCH}/${LIBTIFF}/lib \
-L/devel/dist/${ARCH}/${JPEG}/lib \
-L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \
-Wl,--enable-auto-image-base" \
LIBS=-lintl \
CFLAGS=-O2 \
./configure \
--with-gdktarget=win32 \
--disable-gdiplus \
--with-included-immodules \
--without-libjasper \
--enable-debug=yes \
--enable-explicit-deps=no \
--disable-gtk-doc \
--disable-static \
--prefix=$TARGET &&
libtoolcacheize &&
rm gtk/gtk.def &&
(PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) &&
PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders &&
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
./gtk-zip.sh &&
mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP &&
mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP
) 2>&1 | tee /devel/src/tml/packaging/$THIS.log
(cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) &&
manifestify /tmp/$RUNZIP /tmp/$DEVZIP
You should not just copy the above blindly. There are some things in
the script that are very specific to *my* build setup on *my* current
machine. For instance the "latest" command, the "usedev" and
"usemsvs6" shell functions, the /devel/dist folder. The above script
is really just meant for reference, to give an idea. You really need
to understand what things like PKG_CONFIG_PATH are and set them up
properly after installing the dependencies before building GTK+.
As you see above, after running configure, one can just say "make
install", like on Unix. A post-build fix is needed, running
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
file.
For a 64-bit build you need to remove the gtk/gtk.def file and let it
be regenerated by the makefilery. This is because the 64-bit GTK dll
has a slightly different list of exported function names. This is on
purpose and not a bug. The API is the same at the source level, and
the same #defines of some function names to actually have a _utf8
suffix is used (just to keep the header simpler). But the
corresponding non-suffixed function to maintain ABI stability are not
needed in the 64-bit case (because there are no older EXEs around that
would require such for ABI stability).
2) Microsoft's tools
--------------------
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk. Be prepared to manually edit various
makefile.msc files, and the makefile snippets in build/win32.
Alternative 1 also generates Microsoft import libraries (.lib), if you
have lib.exe available. It might also work for cross-compilation from
Unix.
I use method 1 myself. Hans Breuer has been taking care of the MSVC
makefiles. At times, we disagree a bit about various issues, and for
instance the makefile.msc files might not produce identically named
DLLs and import libraries as the "autoconfiscated" makefiles and
libtool do. If this bothers you, you will have to fix the makefiles.
Using GTK+ on Win32
===================
To use GTK+ on Win32, you also need either one of the above mentioned
compilers. Other compilers might work, but don't count on it. Look for
prebuilt developer packages (DLLs, import libraries, headers) on the
above website.
Multi-threaded use of GTK+ on Win32
===================================
Multi-threaded GTK+ programs might work on Windows in special simple
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
in the same thread, it might work. Otherwise, probably not at
all. Possible ways to fix this are being investigated.
Wintab
======
The tablet support uses the Wintab API. The Wintab development kit is
no longer required. The wintab.h header file is bundled with GTK+
sources. Unfortunately it seems that only Wacom tablets come with
support for the Wintab API nowadays.
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>
The Win32 backend in GTK+ is not as stable or correct as the X11 one.
For prebuilt runtime and developer packages see
http://ftp.gnome.org/pub/gnome/binaries/win32/
Building GTK+ on Win32
======================
First you obviously need developer packages for the compile-time
dependencies: Pango, atk, glib, gettext-runtime, libiconv, libpng,
zlib, libtiff at least. See
http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies .
After installing the dependencies, there are two ways to build GTK+
for win32.
1) GNU tools, ./configure && make install
-----------------------------------------
This requires you have mingw and MSYS.
Use the configure script, and the resulting Makefiles (which use
libtool and gcc to do the compilation). I use this myself, but it can
be hard to setup correctly.
The full script I run to build GTK+ 2.10 unpacked from a source
distribution is as below. This is from bulding GTK+ 2.10.9, slightly
edited to make it match this 2.11 development branch. Actually I don't
use any script like this to build the development branch, as I don't
distribute any binaries from development branches.
MOD=gtk+
VER=2.10.9
THIS=$MOD-$VER
HEX=`echo $THIS | md5sum | cut -d' ' -f1`
TARGET=c:/devel/target/$HEX
DEPS="`/devel/src/tml/latest.sh glib atk cairo pango`"
sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
usedev
usemsvs6
MY_PKG_CONFIG_PATH=""
for D in $DEPS; do
PATH=/devel/dist/$D/bin:$PATH
MY_PKG_CONFIG_PATH=/devel/dist/$D/lib/pkgconfig:$MY_PKG_CONFIG_PATH
done
PKG_CONFIG_PATH=$MY_PKG_CONFIG_PATH:$PKG_CONFIG_PATH CC='gcc -mtune=pentium3 -mthreads' CPPFLAGS='-I/opt/gnu/include -I/opt/gnuwin32/include -I/opt/misc/include' LDFLAGS='-L/opt/gnu/lib -L/opt/gnuwin32/lib -L/opt/misc/lib -Wl,--enable-auto-image-base' LIBS=-lintl CFLAGS=-O2 ./configure --with-gdktarget=win32 --enable-debug=yes --disable-gtk-doc --disable-static --prefix=$TARGET &&
libtoolcacheize &&
unset MY_PKG_CONFIG_PATH &&
PATH=/devel/target/$HEX/bin:.libs:$PATH make install &&
(cd $TARGET/bin; strip --strip-unneeded *.dll *.exe) &&
(cd $TARGET/lib/gtk-2.0/2.10.0/loaders; strip --strip-unneeded *.dll) &&
(cd $TARGET/lib/gtk-2.0/2.10.0/immodules; strip --strip-unneeded *.dll) &&
(cd $TARGET/lib/gtk-2.0/2.10.0/engines; strip --strip-unneeded *.dll) &&
PATH=$TARGET/bin:$PATH gdk-pixbuf-query-loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp &&
mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders &&
grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp &&
mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules &&
./gtk-zip.sh &&
(cd /devel/src/tml && zip /tmp/$MOD-dev-$VER.zip make/$THIS.make) &&
manifestify /tmp/$MOD*-$VER.zip
You should not just copy the above blindly. There are some things in
the script that are very specific to *my* build setup on *my* current
machine. For instance the "latest.sh" script, the "usedev" and
"usemsvs6" shell functions, the /devel/dist folder. The above script
is really just meant for reference, to give an idea. You really need
to understand what things like PKG_CONFIG_PATH are and set them up
properly after installing the dependencies before building GTK+.
As you see above, after running configure, one can just say "make
install", like on Unix. A post-build fix is needed, running
gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders
file.
2) Microsoft's tools
--------------------
Use the Microsoft compiler, cl and Make, nmake. Say nmake -f
makefile.msc in gdk and gtk. Be prepared to manually edit various
makefile.msc files, and the makefile snippets in build/win32.
Alternative 1 also generates Microsoft import libraries (.lib), if you
have lib.exe available. It might also work for cross-compilation from
Unix.
I use method 1 myself. Hans Breuer has been taking care of the MSVC
makefiles. At times, we disagree a bit about various issues, and for
instance the makefile.msc files might not produce identically named
DLLs and import libraries as the "autoconfiscated" makefiles and
libtool do. If this bothers you, you will have to fix the makefiles.
Using GTK+ on Win32
===================
To use GTK+ on Win32, you also need either one of the above mentioned
compilers. Other compilers might work, but don't count on it. Look for
prebuilt developer packages (DLLs, import libraries, headers) on the
above website.
Multi-threaded use of GTK+ on Win32
===================================
Multi-threaded GTK+ programs might work on Windows in special simple
cases, but not in general. Sorry. If you have all GTK+ and GDK calls
in the same thread, it might work. Otherwise, probably not at
all. Possible ways to fix this are being investigated.
Wintab
======
The tablet support uses the Wintab API. The Wintab development kit is
no longer required. The wintab.h header file is bundled with GTK+
sources. Unfortunately it seems that only Wacom tablets come with
support for the Wintab API nowadays.
--Tor Lillqvist <tml@iki.fi>, <tml@novell.com>

View File

@@ -14,10 +14,7 @@ DIE=0
have_libtool=false
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`libtoolize --version |
head -1 |
sed -e 's/^\(.*\)([^)]*)\(.*\)$/\1\2/g' \
-e 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
case $libtool_version in
1.4*|1.5*|2.2*)
have_libtool=true
@@ -48,24 +45,16 @@ fi
DIE=1
}
if automake-1.11 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE=automake-1.11
ACLOCAL=aclocal-1.11
else if automake-1.10 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE=automake-1.10
ACLOCAL=aclocal-1.10
else if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
if automake-1.7 --version < /dev/null > /dev/null 2>&1 ; then
AUTOMAKE=automake-1.7
ACLOCAL=aclocal-1.7
else
echo
echo "You must have automake 1.7.x, 1,10.x or 1.11.x installed to compile $PROJECT."
echo "You must have automake 1.7.x installed to compile $PROJECT."
echo "Install the appropriate package for your distribution,"
echo "or get the source tarball at http://ftp.gnu.org/gnu/automake/"
DIE=1
fi
fi
fi
if test "$DIE" -eq 1; then
exit 1
@@ -109,7 +98,7 @@ rm -rf autom4te.cache
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL
$ACLOCAL -I m4 $ACLOCAL_FLAGS || exit $?
$ACLOCAL $ACLOCAL_FLAGS || exit $?
libtoolize --force || exit $?
gtkdocize || exit $?

View File

@@ -270,9 +270,7 @@
/* Define to 1 if XXM is available and should be used */
#ifndef _MSC_VER
# define USE_MMX 1
#else
# undef USE_MMX
#define USE_MMX 1
#endif
/* Define to 1 if no XInput should be used */

View File

@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
# require autoconf 2.54
AC_PREREQ(2.62)
AC_PREREQ(2.54)
# Making releases:
# GTK_MICRO_VERSION += 1;
@@ -11,9 +11,9 @@ AC_PREREQ(2.62)
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [19])
m4_define([gtk_micro_version], [2])
m4_define([gtk_interface_age], [0])
m4_define([gtk_minor_version], [14])
m4_define([gtk_micro_version], [7])
m4_define([gtk_interface_age], [7])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -31,9 +31,9 @@ m4_define([gtk_api_version], [2.0])
m4_define([gtk_binary_version], [2.10.0])
# required versions of other packages
m4_define([glib_required_version], [2.21.3])
m4_define([glib_required_version], [2.17.6])
m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.29.2])
m4_define([atk_required_version], [1.13.0])
m4_define([cairo_required_version], [1.6])
@@ -43,19 +43,12 @@ AC_INIT([gtk+], [gtk_version],
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
AM_INIT_AUTOMAKE([no-define -Wno-portability])
AM_INIT_AUTOMAKE(no-define)
AM_CONFIG_HEADER(config.h)
# Support silent build rules, requires at least automake-1.11. Enable
# by either passing --enable-silent-rules to configure or passing V=0
# to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
#
# For each of the libraries we build, we define the following
@@ -309,7 +302,6 @@ AM_SANITY_CHECK
# Checks for programs.
AC_ISC_POSIX
AM_PROG_CC_STDC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@@ -386,19 +378,6 @@ 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
@@ -525,26 +504,6 @@ AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
esac])
dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
dnl po-properties/POTFILES during configure; see GNOME #573515.
dnl
dnl Generate list of files to be processed by xgettext which will
dnl be included in po-properties/Makefile.
test -d po-properties || mkdir po-properties
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
popropsrcprefix="$srcdir/"
else
popropsrcprefix="../$srcdir/"
fi
else
popropsrcprefix="../"
fi
rm -f po-properties/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
dnl The DU4 header files don't provide library prototypes unless
@@ -582,7 +541,6 @@ case $host in
;;
esac
AC_SUBST(MATH_LIB)
#
# see bug 162979
#
@@ -834,13 +792,12 @@ AC_ARG_WITH(libtiff,
[AC_HELP_STRING([--without-libtiff],
[disable TIFF loader for gdk-pixbuf])])
AC_ARG_WITH(libjasper,
[AC_HELP_STRING([--with-libjasper],
[enable JPEG2000 loader for gdk-pixbuf])])
[AC_HELP_STRING([--without-libjasper],
[disable JPEG2000 loader for gdk-pixbuf])])
AC_ARG_ENABLE(gdiplus,
[AC_HELP_STRING([--enable-gdiplus],
[enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
[enable_gdiplus=no])
[AC_HELP_STRING([--disable-gdiplus],
[disable GDI+ loaders for gdk-pixbuf])])
AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
@@ -950,11 +907,11 @@ dnl Test for libpng
fi
dnl Test for libjasper
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
fi
if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
AC_MSG_ERROR([
*** Checks for JPEG2000 loader failed. You can build without it by passing
*** --without-libjasper to configure])
@@ -993,7 +950,7 @@ fi
# because some important apps like GIMP need to read and write
# arbitrary tEXt chunks which doesn't seem to be possible through GDI+
all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm"
if test x$with_libjasper != xno; then
all_loaders="$all_loaders,jasper"
fi
@@ -1064,7 +1021,6 @@ AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
# As all GDI+ loaders are either built-in or not, arbitrarily just
# check one of the variables here
AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
@@ -1207,11 +1163,8 @@ if $dynworks ; then
if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
fi
if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
fi
else
STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
fi
# Checks to see whether we should include mediaLib
@@ -1328,6 +1281,7 @@ GDK_PIXBUF_XLIB_PACKAGES=
GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
GDK_PIXBUF_XLIB_EXTRA_LIBS=
X_PACKAGES=fontconfig
GDK_EXTRA_LIBS="$GDK_WLIBS"
GDK_EXTRA_CFLAGS=
@@ -1336,8 +1290,6 @@ GTK_DEP_PACKAGES_FOR_X=
GTK_DEP_LIBS_FOR_X=
if test "x$gdktarget" = "xx11"; then
X_PACKAGES=fontconfig
#
# We use fontconfig very peripherally when decoding the default
# settings.
@@ -1449,8 +1401,9 @@ if test "x$gdktarget" = "xx11"; then
# Check for shaped window extension
AC_CHECK_FUNC(XShapeCombineMask, :,
[AC_MSG_ERROR([Shape extension not found, check your development headers])])
AC_CHECK_FUNC(XShapeCombineMask,
AC_DEFINE(HAVE_SHAPE_EXT, 1,
[Define to 1 if the XShape extension is available]))
# X SYNC check
gtk_save_CFLAGS="$CFLAGS"
@@ -1516,55 +1469,54 @@ if test "x$gdktarget" = "xx11"; then
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
# Check for XFree
AC_MSG_CHECKING(for Xinerama support on XFree86)
case "$host" in
*-*-solaris*)
# Check for solaris
AC_MSG_CHECKING(for Xinerama support on Solaris)
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)
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>])])
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
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
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
fi
# set up things for XInput
@@ -1586,7 +1538,7 @@ if test "x$gdktarget" = "xx11"; then
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
# Check for the RANDR extension
if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
if $PKG_CONFIG --exists "xrandr >= 1.2" ; then
AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
X_PACKAGES="$X_PACKAGES xrandr"
@@ -1638,8 +1590,6 @@ if test "x$gdktarget" = "xx11"; then
AM_CONDITIONAL(USE_X11, true)
else
XPACKAGES=
AM_CONDITIONAL(XINPUT_XFREE, false)
AM_CONDITIONAL(USE_X11, false)
AM_CONDITIONAL(HAVE_X11R6, false)
@@ -1669,10 +1619,21 @@ AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
if test "x$gdktarget" = "xdirectfb"; then
DIRECTFB_REQUIRED_VERSION=1.0.0
DIRECTFB_REQUIRED_VERSION=0.9.24
AC_MSG_CHECKING(for DirectFB)
PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
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
AM_CONDITIONAL(USE_DIRECTFB, true)
else
AM_CONDITIONAL(USE_DIRECTFB, false)
@@ -1716,9 +1677,13 @@ fi
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES cairo-$cairo_backend"
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
if test "x$gdktarget" = "xx11"; then
GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES"
fi
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
@@ -1846,19 +1811,10 @@ AC_ARG_ENABLE(cups,
[disable cups print backend])],,
[enable_cups=auto])
if test "x$enable_cups" = "xno"; then
AM_CONDITIONAL(HAVE_CUPS, false)
else
if test "x$enable_cups" = "xauto"
then
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
if test "x$CUPS_CONFIG" = "xno"; then
if test "x$enable_cups" = "xauto"; then
AM_CONDITIONAL(HAVE_CUPS, false)
else
AC_MSG_ERROR([
*** cups not found.
])
fi
else
if test "x$CUPS_CONFIG" != "xno"; then
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
CUPS_LIBS=`$CUPS_CONFIG --libs`
@@ -1878,55 +1834,31 @@ else
AC_SUBST(CUPS_LIBS)
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
AM_CONDITIONAL(HAVE_CUPS, true)
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
AC_TRY_COMPILE([#include <cups/http.h>],
[http_t http; char *s = http.authstring;],
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
[Define if cups http_t authstring field is accessible])],)
CFLAGS="$gtk_save_cflags"
AC_SUBST(HAVE_HTTP_AUTHSTRING)
gtk_save_libs="$LIBS"
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
fi
fi
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
# Checks to see if we should compile with PAPI backend for GTK+
#
gtk_save_cflags="$CFLAGS"
CFLAGS="$CUPS_CFLAGS"
AC_TRY_COMPILE([#include <cups/http.h>],
[http_t http; char *s = http.authstring;],
[AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
[Define if cups http_t authstring field is accessible])],)
CFLAGS="$gtk_save_cflags"
AC_ARG_ENABLE(papi,
[AC_HELP_STRING([--disable-papi]
[disable papi print backend])],,
[enable_papi=auto])
AC_SUBST(HAVE_HTTP_AUTHSTRING)
gtk_save_libs="$LIBS"
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
if test "x$enable_papi" = "xno"; then
AM_CONDITIONAL(HAVE_PAPI, false)
else
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)
if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
AC_MSG_ERROR([
*** papi not found.
])
fi
AM_CONDITIONAL(HAVE_CUPS, false)
fi
AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
*** Can't find cairo-pdf.h. You must build Cairo with the pdf
*** backend enabled.]))
@@ -1935,10 +1867,6 @@ if test "$os_win32" != "yes"; then
AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
*** Can't find cairo-ps.h. You must build Cairo with the
*** postscript backend enabled.]))
AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
*** Can't find cairo-svg.h. You must build Cairo with the
*** svg backend enabled.]))
fi
CPPFLAGS="$gtk_save_cppflags"
@@ -1973,23 +1901,12 @@ if test -n "$export_dynamic"; then
GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
fi
##################################################
# GObject introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.6.7])
# Hack around introspection installing into an absolute path breaking distcheck
tmp=`pkg-config --variable=datadir gobject-introspection-1.0`
INTROSPECTION_GIRDIR=${INTROSPECTION_GIRDIR/$tmp/\$(datadir)}
tmp=`pkg-config --variable=libdir gobject-introspection-1.0`
INTROSPECTION_TYPELIBDIR=${INTROSPECTION_TYPELIBDIR/$tmp/\$(libdir)}
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
GTK_DOC_CHECK([1.11])
GTK_DOC_CHECK([1.8])
AC_CHECK_PROG(DB2HTML, db2html, true, false)
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
@@ -2167,7 +2084,6 @@ 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

View File

@@ -4,5 +4,3 @@ SUBDIRS =
if USE_X11
SUBDIRS += gdk-pixbuf-xlib
endif
-include $(top_srcdir)/git.mk

View File

@@ -1,36 +1,22 @@
=== ChangeLog discontinued ===
2009-01-07 Matthias Clasen <mclasen@redhat.com>
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.
* === Released 2.14.7 ===
2009-03-13 Matthias Clasen <mclasen@redhat.com>
2008-12-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.16.0 ===
* === Released 2.14.6 ===
2009-03-02 Matthias Clasen <mclasen@redhat.com>
2008-11-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.5 ===
* === Released 2.14.5 ===
2009-02-17 Matthias Clasen <mclasen@redhat.com>
2008-10-16 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.4 ===
* === Released 2.14.4 ====
2009-02-02 Matthias Clasen <mclasen@redhat.com>
2008-09-23 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.3 ===
2009-01-27 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.2 ===
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.1 ===
2009-01-01 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.0 ===
* === Released 2.14.3 ===
2008-09-17 Matthias Clasen <mclasen@redhat.com>

View File

@@ -38,5 +38,3 @@ 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

View File

@@ -154,7 +154,7 @@ rgb1 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int bpl;
register guint8 data;
guint8 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
d (printf ("1 bits/pixel\n"));
@@ -191,7 +191,7 @@ rgb1a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int bpl;
register guint8 data;
guint8 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
guint32 remap[2];
d (printf ("1 bits/pixel\n"));
@@ -241,7 +241,7 @@ rgb8 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int bpl;
guint32 mask;
register guint32 data;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
register guint8 *s;
register guint8 *o;
@@ -282,7 +282,7 @@ rgb8a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
guint32 remap[256];
register guint8 *s; /* read 2 pixels at once */
register guint32 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -336,7 +336,7 @@ rgb565lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint8 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -407,7 +407,7 @@ rgb565msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint32 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -479,7 +479,7 @@ rgb565alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif
register guint32 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -536,7 +536,7 @@ rgb565amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif
register guint32 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -592,7 +592,7 @@ rgb555lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint8 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -663,7 +663,7 @@ rgb555msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint32 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -735,7 +735,7 @@ rgb555alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif
register guint32 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -792,7 +792,7 @@ rgb555amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif
register guint32 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -840,7 +840,7 @@ rgb888alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
guint8 *s; /* for byte order swapping */
guint8 *o;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
width = image->width;
height = image->height;
@@ -871,7 +871,7 @@ rgb888lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
int width, height;
int bpl;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
guint8 *o, *s;
width = image->width;
@@ -901,7 +901,7 @@ rgb888amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
int width, height;
int bpl;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
#ifdef LITTLE
guint32 *o;
guint32 *s;
@@ -949,7 +949,7 @@ rgb888msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
int width, height;
int bpl;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
guint8 *s;
guint8 *o;
@@ -983,7 +983,7 @@ convert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *
int xx, yy;
int width, height;
int bpl;
guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *srow = image->data, *orow = pixels;
guint8 *o;
guint32 pixel;
Visual *v;
@@ -1134,7 +1134,7 @@ xlib_window_is_viewable (Window w)
while (w != 0) {
Window parent, root, *children;
guint nchildren;
int nchildren;
XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);
if (wa.map_state != IsViewable)
@@ -1223,7 +1223,7 @@ gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
int dest_x, int dest_y,
int width, int height)
{
guint src_width, src_height;
int src_width, src_height;
XImage *image;
int rowstride, bpp, alpha;
XWindowAttributes wa;
@@ -1260,8 +1260,7 @@ gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
src_height = wa.height;
} else {
Window root;
int tx, ty;
guint bwidth, depth;
int tx, ty, bwidth, depth;
XGetGeometry (gdk_pixbuf_dpy, src, &root, &tx, &ty,
&src_width, &src_height, &bwidth, &depth);
}

View File

@@ -19,14 +19,11 @@ DEPS = \
LDADDS = \
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS) \
$(MATH_LIB)
$(top_builddir)/gtk/$(gtktargetlib)
noinst_PROGRAMS = \
testpixbuf-drawable \
testanimation \
testpixbuf-color \
testpixbuf-save \
testpixbuf-scale \
pixbuf-demo
@@ -55,7 +52,6 @@ test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
testpixbuf_DEPENDENCIES = $(DEPS)
testpixbuf_drawable_DEPENDENCIES = $(DEPS)
testpixbuf_save_DEPENDENCIES = $(DEPS)
testpixbuf_color_DEPENDENCIES = $(DEPS)
testpixbuf_scale_DEPENDENCIES = $(DEPS)
testanimation_DEPENDENCIES = $(DEPS)
pixbuf_demo_DEPENDENCIES = $(DEPS)
@@ -63,7 +59,6 @@ pixbuf_demo_DEPENDENCIES = $(DEPS)
testpixbuf_LDADD = $(LDADDS)
testpixbuf_drawable_LDADD = $(LDADDS)
testpixbuf_save_LDADD = $(LDADDS)
testpixbuf_color_LDADD = $(LDADDS)
testpixbuf_scale_LDADD = $(LDADDS)
testanimation_LDADD = $(LDADDS)
pixbuf_demo_LDADD = $(LDADDS)
@@ -71,7 +66,6 @@ pixbuf_demo_LDADD = $(LDADDS)
testpixbuf_SOURCES = testpixbuf.c pixbuf-init.c
testpixbuf_drawable_SOURCES = testpixbuf-drawable.c pixbuf-init.c
testpixbuf_save_SOURCES = testpixbuf-save.c
testpixbuf_color_SOURCES = testpixbuf-color.c
testpixbuf_scale_SOURCES = testpixbuf-scale.c pixbuf-init.c
testanimation_SOURCES = testanimation.c pixbuf-init.c
pixbuf_demo_SOURCES = pixbuf-demo.c pixbuf-init.c
@@ -88,5 +82,3 @@ EXTRA_DIST += \
gnu-keys.png
DISTCLEANFILES = test-inline-pixbufs.h
-include $(top_srcdir)/git.mk

View File

@@ -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 \
@@ -17,31 +17,23 @@ demos = \
dialog.c \
drawingarea.c \
editable_cells.c \
entry_buffer.c \
entry_completion.c \
expander.c \
hypertext.c \
iconview.c \
iconview_edit.c \
images.c \
infobar.c \
links.c \
list_store.c \
menus.c \
offscreen_window.c \
offscreen_window2.c \
panes.c \
pickers.c \
pixbufs.c \
printing.c \
rotated_text.c \
search_entry.c \
sizegroup.c \
spinner.c \
stock_browser.c \
textview.c \
textscroll.c \
toolpalette.c \
tree_store.c \
ui_manager.c
@@ -62,8 +54,7 @@ DEPS = \
LDADDS = \
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \
$(top_builddir)/gdk/$(gdktargetlib) \
$(top_builddir)/gtk/$(gtktargetlib) \
$(GTK_DEP_LIBS)
$(top_builddir)/gtk/$(gtktargetlib)
bin_PROGRAMS = gtk-demo
@@ -104,5 +95,3 @@ IMAGEFILES= alphatest.png \
democode_DATA = $(demos) $(IMAGEFILES) demo.ui
DISTCLEANFILES = demos.h
-include $(top_srcdir)/git.mk

View File

@@ -8,8 +8,6 @@
#include "demo-common.h"
static GtkWidget *window = NULL;
static GtkWidget *infobar = NULL;
static GtkWidget *messagelabel = NULL;
static void
activate_action (GtkAction *action)
@@ -18,7 +16,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,
@@ -31,7 +29,7 @@ activate_action (GtkAction *action)
"response",
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_widget_show (dialog);
}
@@ -43,32 +41,37 @@ 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)
{
gchar *text;
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);
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);
/* Close dialog on user response */
g_signal_connect (dialog,
"response",
G_CALLBACK (gtk_widget_destroy),
NULL);
gtk_widget_show (dialog);
}
}
static void
static void
activate_email (GtkAboutDialog *about,
const gchar *link,
gpointer data)
{
gchar *text;
text = g_strdup_printf ("send mail to %s", link);
g_print ("%s\n", text);
g_free (text);
g_print ("send mail to %s\n", link);
}
static void
static void
activate_url (GtkAboutDialog *about,
const gchar *link,
gpointer data)
@@ -129,9 +132,9 @@ about_cb (GtkAction *action,
gtk_about_dialog_set_email_hook (activate_email, NULL, NULL);
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
"name", "GTK+ Code Demos",
"version", PACKAGE_VERSION,
"copyright", "(C) 1997-2009 The GTK+ Team",
"copyright", "(C) 1997-2005 The GTK+ Team",
"license", license,
"website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK+ functions.",
@@ -144,12 +147,12 @@ about_cb (GtkAction *action,
g_object_unref (transparent);
}
typedef struct
typedef struct
{
GtkAction action;
} ToolMenuAction;
typedef struct
typedef struct
{
GtkActionClass parent_class;
} ToolMenuActionClass;
@@ -176,30 +179,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) },
};
@@ -208,9 +211,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);
@@ -223,13 +226,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);
@@ -242,18 +245,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'>"
@@ -285,7 +288,7 @@ static const gchar *ui_info =
" <toolitem action='Open'>"
" <menu action='OpenMenu'>"
" <menuitem action='File1'/>"
" </menu>"
" </menu>"
" </toolitem>"
" <toolitem action='Quit'/>"
" <separator action='Sep1'/>"
@@ -305,7 +308,7 @@ static void
register_stock_icons (void)
{
static gboolean registered = FALSE;
if (!registered)
{
GdkPixbuf *pixbuf;
@@ -317,12 +320,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);
@@ -347,7 +350,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);
@@ -356,7 +359,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);
}
@@ -370,9 +373,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);
@@ -406,21 +409,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;
@@ -435,10 +438,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));
@@ -450,15 +453,15 @@ do_appwindow (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed),
&window);
table = gtk_table_new (1, 5, FALSE);
table = gtk_table_new (1, 4, 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",
@@ -466,30 +469,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);
@@ -499,7 +502,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,
@@ -508,7 +511,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,
@@ -517,25 +520,6 @@ 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),
@@ -544,20 +528,20 @@ 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, 3, 4,
0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
0, 0);
gtk_window_set_default_size (GTK_WINDOW (window),
200, 200);
contents = gtk_text_view_new ();
gtk_widget_grab_focus (contents);
gtk_container_add (GTK_CONTAINER (sw),
contents);
@@ -567,7 +551,7 @@ do_appwindow (GtkWidget *do_widget)
gtk_table_attach (GTK_TABLE (table),
statusbar,
/* X direction */ /* Y direction */
0, 1, 4, 5,
0, 1, 3, 4,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
@@ -586,12 +570,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));
}
@@ -600,11 +584,9 @@ do_appwindow (GtkWidget *do_widget)
gtk_widget_show_all (window);
}
else
{
{
gtk_widget_destroy (window);
window = NULL;
infobar = NULL;
messagelabel = NULL;
}
return window;

View File

@@ -203,10 +203,6 @@ do_clipboard (GtkWidget *do_widget)
GtkClipboard *clipboard;
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), "Clipboard demo");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);

View File

@@ -1,65 +0,0 @@
/* Entry/Entry Buffer
*
* GtkEntryBuffer provides the text content in a GtkEntry.
*
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
GtkWidget *
do_entry_buffer (GtkWidget *do_widget)
{
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *entry;
GtkEntryBuffer *buffer;
if (!window)
{
window = gtk_dialog_new_with_buttons ("GtkEntryBuffer",
GTK_WINDOW (do_widget),
0,
GTK_STOCK_CLOSE,
GTK_RESPONSE_NONE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Entries share a buffer. Typing in one is reflected in the other.");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
/* Create a buffer */
buffer = gtk_entry_buffer_new (NULL, 0);
/* Create our first entry */
entry = gtk_entry_new_with_buffer (buffer);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
/* Create the second entry */
entry = gtk_entry_new_with_buffer (buffer);
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
g_object_unref (buffer);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -1,4 +1,4 @@
/* Entry/Entry Completion
/* Entry Completion
*
* GtkEntryCompletion provides a mechanism for adding support for
* completion in GtkEntry.

View File

@@ -1,104 +0,0 @@
/* Info bar
*
* Info bar widgets are used to report important messages to the user.
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
static void
on_bar_response (GtkInfoBar *info_bar,
gint response_id,
gpointer user_data)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
"You clicked a button on an info bar");
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"Your response has id %d", response_id);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
GtkWidget *
do_infobar (GtkWidget *do_widget)
{
GtkWidget *frame;
GtkWidget *bar;
GtkWidget *vbox;
GtkWidget *vbox2;
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_window_set_title (GTK_WINDOW (window), "Info Bars");
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
bar = gtk_info_bar_new_with_buttons (GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
bar = gtk_info_bar_new ();
gtk_box_pack_start (GTK_BOX (vbox), bar, FALSE, FALSE, 0);
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
frame = gtk_frame_new ("Info bars");
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 8);
vbox2 = gtk_vbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
gtk_container_add (GTK_CONTAINER (frame), vbox2);
/* Standard message dialog */
label = gtk_label_new ("An example of different info bars");
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
}
if (!GTK_WIDGET_VISIBLE (window))
{
gtk_widget_show_all (window);
}
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

View File

@@ -1,84 +0,0 @@
/* 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;
}
static GtkWidget *window = NULL;
GtkWidget *
do_links (GtkWidget *do_widget)
{
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_window_set_title (GTK_WINDOW (window), "Links");
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
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;
}

View File

@@ -10,8 +10,6 @@
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
static GtkTreeModel *model = NULL;
static guint timeout = 0;
typedef struct
{
@@ -28,8 +26,6 @@ enum
COLUMN_NUMBER,
COLUMN_SEVERITY,
COLUMN_DESCRIPTION,
COLUMN_PULSE,
COLUMN_ACTIVE,
NUM_COLUMNS
};
@@ -51,33 +47,6 @@ static Bug data[] =
{ FALSE, 1, "Normal", "First bug :=)" },
};
static gboolean
spinner_timeout (gpointer data)
{
GtkTreeIter iter;
guint pulse;
if (model == NULL)
return FALSE;
gtk_tree_model_get_iter_first (model, &iter);
gtk_tree_model_get (model, &iter,
COLUMN_PULSE, &pulse,
-1);
if (pulse == G_MAXUINT)
pulse = 0;
else
pulse++;
gtk_list_store_set (GTK_LIST_STORE (model),
&iter,
COLUMN_PULSE, pulse,
COLUMN_ACTIVE, TRUE,
-1);
return TRUE;
}
static GtkTreeModel *
create_model (void)
{
@@ -87,25 +56,21 @@ create_model (void)
/* create list store */
store = gtk_list_store_new (NUM_COLUMNS,
G_TYPE_BOOLEAN,
G_TYPE_UINT,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_UINT,
G_TYPE_BOOLEAN);
G_TYPE_BOOLEAN,
G_TYPE_UINT,
G_TYPE_STRING,
G_TYPE_STRING);
/* add data to the list store */
for (i = 0; i < G_N_ELEMENTS (data); i++)
{
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
COLUMN_FIXED, data[i].fixed,
COLUMN_NUMBER, data[i].number,
COLUMN_SEVERITY, data[i].severity,
COLUMN_DESCRIPTION, data[i].description,
COLUMN_PULSE, 0,
COLUMN_ACTIVE, FALSE,
-1);
COLUMN_FIXED, data[i].fixed,
COLUMN_NUMBER, data[i].number,
COLUMN_SEVERITY, data[i].severity,
COLUMN_DESCRIPTION, data[i].description,
-1);
}
return GTK_TREE_MODEL (store);
@@ -113,8 +78,8 @@ create_model (void)
static void
fixed_toggled (GtkCellRendererToggle *cell,
gchar *path_str,
gpointer data)
gchar *path_str,
gpointer data)
{
GtkTreeModel *model = (GtkTreeModel *)data;
GtkTreeIter iter;
@@ -145,75 +110,48 @@ add_columns (GtkTreeView *treeview)
/* column for fixed toggles */
renderer = gtk_cell_renderer_toggle_new ();
g_signal_connect (renderer, "toggled",
G_CALLBACK (fixed_toggled), model);
G_CALLBACK (fixed_toggled), model);
column = gtk_tree_view_column_new_with_attributes ("Fixed?",
renderer,
"active", COLUMN_FIXED,
NULL);
renderer,
"active", COLUMN_FIXED,
NULL);
/* set this column to a fixed sizing (of 50 pixels) */
gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
GTK_TREE_VIEW_COLUMN_FIXED);
GTK_TREE_VIEW_COLUMN_FIXED);
gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
gtk_tree_view_append_column (treeview, column);
/* column for bug numbers */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Bug number",
renderer,
"text",
COLUMN_NUMBER,
NULL);
renderer,
"text",
COLUMN_NUMBER,
NULL);
gtk_tree_view_column_set_sort_column_id (column, COLUMN_NUMBER);
gtk_tree_view_append_column (treeview, column);
/* column for severities */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Severity",
renderer,
"text",
COLUMN_SEVERITY,
NULL);
renderer,
"text",
COLUMN_SEVERITY,
NULL);
gtk_tree_view_column_set_sort_column_id (column, COLUMN_SEVERITY);
gtk_tree_view_append_column (treeview, column);
/* column for description */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Description",
renderer,
"text",
COLUMN_DESCRIPTION,
NULL);
renderer,
"text",
COLUMN_DESCRIPTION,
NULL);
gtk_tree_view_column_set_sort_column_id (column, COLUMN_DESCRIPTION);
gtk_tree_view_append_column (treeview, column);
/* column for spinner */
renderer = gtk_cell_renderer_spinner_new ();
column = gtk_tree_view_column_new_with_attributes ("Spinning",
renderer,
"pulse",
COLUMN_PULSE,
"active",
COLUMN_ACTIVE,
NULL);
gtk_tree_view_column_set_sort_column_id (column, COLUMN_PULSE);
gtk_tree_view_append_column (treeview, column);
}
static gboolean
window_closed (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
model = NULL;
window = NULL;
if (timeout != 0)
{
g_source_remove (timeout);
timeout = 0;
}
return FALSE;
}
GtkWidget *
@@ -224,16 +162,17 @@ do_list_store (GtkWidget *do_widget)
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *sw;
GtkTreeModel *model;
GtkWidget *treeview;
/* create window, etc */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "GtkListStore demo");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
vbox = gtk_vbox_new (FALSE, 8);
@@ -244,10 +183,10 @@ do_list_store (GtkWidget *do_widget)
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_ETCHED_IN);
GTK_SHADOW_ETCHED_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (vbox), sw, TRUE, TRUE, 0);
/* create tree model */
@@ -257,7 +196,7 @@ do_list_store (GtkWidget *do_widget)
treeview = gtk_tree_view_new_with_model (model);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (treeview), TRUE);
gtk_tree_view_set_search_column (GTK_TREE_VIEW (treeview),
COLUMN_DESCRIPTION);
COLUMN_DESCRIPTION);
g_object_unref (model);
@@ -268,27 +207,14 @@ do_list_store (GtkWidget *do_widget)
/* finish & show */
gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
g_signal_connect (window, "delete-event",
G_CALLBACK (window_closed), NULL);
}
if (!GTK_WIDGET_VISIBLE (window))
{
gtk_widget_show_all (window);
if (timeout == 0) {
/* FIXME this should use the animation-duration instead */
timeout = g_timeout_add (80, spinner_timeout, NULL);
}
}
gtk_widget_show_all (window);
else
{
gtk_widget_destroy (window);
window = NULL;
if (timeout != 0)
{
g_source_remove (timeout);
timeout = 0;
}
}
return window;

View File

@@ -7,7 +7,7 @@
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include "demos.h"
#include <demos.h>
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
@@ -41,7 +41,7 @@ get_democodedir (void)
if (result == NULL)
{
result = g_win32_get_package_installation_directory_of_module (NULL);
result = g_win32_get_package_installation_directory (NULL, NULL);
if (result == NULL)
result = "unknown-location";

View File

@@ -2,10 +2,10 @@
*
* There are several widgets involved in displaying menus. The
* GtkMenuBar widget is a menu bar, which normally appears horizontally
* at the top of an application, but can also be layed out vertically.
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
* menu items (GtkMenuItem). Each menu item contains text and/or images
* at the top of an application, but can also be layed out vertically.
* The GtkMenu widget is the actual menu that pops up. Both GtkMenuBar
* and GtkMenu are subclasses of GtkMenuShell; a GtkMenuShell contains
* menu items (GtkMenuItem). Each menu item contains text and/or images
* and can be selected by the user.
*
* There are several kinds of menu item, including plain GtkMenuItem,
@@ -22,6 +22,7 @@
* GtkUIManager provides a higher-level interface for creating menu bars
* and menus; while you can construct menus manually, most people don't
* do that. There's a separate demo for GtkUIManager.
*
*/
#include <gtk/gtk.h>
@@ -117,35 +118,37 @@ change_orientation (GtkWidget *button,
}
}
static GtkWidget *window = NULL;
GtkWidget *
do_menus (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
GtkWidget *box;
GtkWidget *box1;
GtkWidget *box2;
GtkWidget *button;
if (!window)
{
GtkWidget *menubar;
GtkWidget *menu;
GtkWidget *menuitem;
GtkAccelGroup *accel_group;
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), "Menus");
g_signal_connect (window, "destroy",
G_CALLBACK(gtk_widget_destroyed), &window);
g_signal_connect (window, "delete-event",
G_CALLBACK (gtk_true), NULL);
accel_group = gtk_accel_group_new ();
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
gtk_window_set_title (GTK_WINDOW (window), "menus");
gtk_container_set_border_width (GTK_CONTAINER (window), 0);
box = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box);
gtk_widget_show (box);
@@ -153,18 +156,18 @@ do_menus (GtkWidget *do_widget)
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (box), box1);
gtk_widget_show (box1);
menubar = gtk_menu_bar_new ();
gtk_box_pack_start (GTK_BOX (box1), menubar, FALSE, TRUE, 0);
gtk_widget_show (menubar);
menu = create_menu (2, TRUE);
menuitem = gtk_menu_item_new_with_label ("test\nline2");
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_widget_show (menuitem);
menuitem = gtk_menu_item_new_with_label ("foo");
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), create_menu (3, TRUE));
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
@@ -175,7 +178,7 @@ do_menus (GtkWidget *do_widget)
gtk_menu_item_set_right_justified (GTK_MENU_ITEM (menuitem), TRUE);
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);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);

View File

@@ -1,579 +0,0 @@
/* Offscreen windows/Rotated button
*
* Offscreen windows can be used to transform parts of a widget
* hierarchy. Note that the rotated button is fully functional.
*/
#include <math.h>
#include <gtk/gtk.h>
#define GTK_TYPE_ROTATED_BIN (gtk_rotated_bin_get_type ())
#define GTK_ROTATED_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ROTATED_BIN, GtkRotatedBin))
#define GTK_ROTATED_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ROTATED_BIN, GtkRotatedBinClass))
#define GTK_IS_ROTATED_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ROTATED_BIN))
#define GTK_IS_ROTATED_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ROTATED_BIN))
#define GTK_ROTATED_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ROTATED_BIN, GtkRotatedBinClass))
typedef struct _GtkRotatedBin GtkRotatedBin;
typedef struct _GtkRotatedBinClass GtkRotatedBinClass;
struct _GtkRotatedBin
{
GtkContainer container;
GtkWidget *child;
GdkWindow *offscreen_window;
gdouble angle;
};
struct _GtkRotatedBinClass
{
GtkContainerClass parent_class;
};
GType gtk_rotated_bin_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_rotated_bin_new (void);
void gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
gdouble angle);
/*** implementation ***/
static void gtk_rotated_bin_realize (GtkWidget *widget);
static void gtk_rotated_bin_unrealize (GtkWidget *widget);
static void gtk_rotated_bin_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_rotated_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean gtk_rotated_bin_damage (GtkWidget *widget,
GdkEventExpose *event);
static gboolean gtk_rotated_bin_expose (GtkWidget *widget,
GdkEventExpose *offscreen);
static void gtk_rotated_bin_add (GtkContainer *container,
GtkWidget *child);
static void gtk_rotated_bin_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_rotated_bin_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static GType gtk_rotated_bin_child_type (GtkContainer *container);
G_DEFINE_TYPE (GtkRotatedBin, gtk_rotated_bin, GTK_TYPE_CONTAINER);
static void
to_child (GtkRotatedBin *bin,
double widget_x,
double widget_y,
double *x_out,
double *y_out)
{
GtkAllocation child_area;
double x, y, xr, yr;
double c, s;
double w, h;
s = sin (bin->angle);
c = cos (bin->angle);
child_area = bin->child->allocation;
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
x = widget_x;
y = widget_y;
x -= (w - child_area.width) / 2;
y -= (h - child_area.height) / 2;
x -= child_area.width / 2;
y -= child_area.height / 2;
xr = x * c + y * s;
yr = y * c - x * s;
x = xr;
y = yr;
x += child_area.width / 2;
y += child_area.height / 2;
*x_out = x;
*y_out = y;
}
static void
to_parent (GtkRotatedBin *bin,
double offscreen_x,
double offscreen_y,
double *x_out,
double *y_out)
{
GtkAllocation child_area;
double x, y, xr, yr;
double c, s;
double w, h;
s = sin (bin->angle);
c = cos (bin->angle);
child_area = bin->child->allocation;
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
x = offscreen_x;
y = offscreen_y;
x -= child_area.width / 2;
y -= child_area.height / 2;
xr = x * c - y * s;
yr = x * s + y * c;
x = xr;
y = yr;
x += child_area.width / 2;
y += child_area.height / 2;
x -= (w - child_area.width) / 2;
y -= (h - child_area.height) / 2;
*x_out = x;
*y_out = y;
}
static void
gtk_rotated_bin_class_init (GtkRotatedBinClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
widget_class->realize = gtk_rotated_bin_realize;
widget_class->unrealize = gtk_rotated_bin_unrealize;
widget_class->size_request = gtk_rotated_bin_size_request;
widget_class->size_allocate = gtk_rotated_bin_size_allocate;
widget_class->expose_event = gtk_rotated_bin_expose;
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
GTK_TYPE_ROTATED_BIN,
g_cclosure_new (G_CALLBACK (gtk_rotated_bin_damage),
NULL, NULL));
container_class->add = gtk_rotated_bin_add;
container_class->remove = gtk_rotated_bin_remove;
container_class->forall = gtk_rotated_bin_forall;
container_class->child_type = gtk_rotated_bin_child_type;
}
static void
gtk_rotated_bin_init (GtkRotatedBin *bin)
{
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
}
GtkWidget *
gtk_rotated_bin_new (void)
{
return g_object_new (GTK_TYPE_ROTATED_BIN, NULL);
}
static GdkWindow *
pick_offscreen_child (GdkWindow *offscreen_window,
double widget_x,
double widget_y,
GtkRotatedBin *bin)
{
GtkAllocation child_area;
double x, y;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
to_child (bin, widget_x, widget_y, &x, &y);
child_area = bin->child->allocation;
if (x >= 0 && x < child_area.width &&
y >= 0 && y < child_area.height)
return bin->offscreen_window;
}
return NULL;
}
static void
offscreen_window_to_parent (GdkWindow *offscreen_window,
double offscreen_x,
double offscreen_y,
double *parent_x,
double *parent_y,
GtkRotatedBin *bin)
{
to_parent (bin, offscreen_x, offscreen_y, parent_x, parent_y);
}
static void
offscreen_window_from_parent (GdkWindow *window,
double parent_x,
double parent_y,
double *offscreen_x,
double *offscreen_y,
GtkRotatedBin *bin)
{
to_child (bin, parent_x, parent_y, offscreen_x, offscreen_y);
}
static void
gtk_rotated_bin_realize (GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GdkWindowAttr attributes;
gint attributes_mask;
gint border_width;
GtkRequisition child_requisition;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
border_width = GTK_CONTAINER (widget)->border_width;
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
attributes.width = widget->allocation.width - 2 * border_width;
attributes.height = widget->allocation.height - 2 * border_width;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
| GDK_POINTER_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
| GDK_SCROLL_MASK
| GDK_ENTER_NOTIFY_MASK
| GDK_LEAVE_NOTIFY_MASK;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
g_signal_connect (widget->window, "pick-embedded-child",
G_CALLBACK (pick_offscreen_child), bin);
attributes.window_type = GDK_WINDOW_OFFSCREEN;
child_requisition.width = child_requisition.height = 0;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
attributes.width = bin->child->allocation.width;
attributes.height = bin->child->allocation.height;
}
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (bin->offscreen_window, widget);
if (bin->child)
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
g_signal_connect (bin->offscreen_window, "to-embedder",
G_CALLBACK (offscreen_window_to_parent), bin);
g_signal_connect (bin->offscreen_window, "from-embedder",
G_CALLBACK (offscreen_window_from_parent), bin);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
gdk_window_show (bin->offscreen_window);
}
static void
gtk_rotated_bin_unrealize (GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
gdk_window_set_user_data (bin->offscreen_window, NULL);
gdk_window_destroy (bin->offscreen_window);
bin->offscreen_window = NULL;
GTK_WIDGET_CLASS (gtk_rotated_bin_parent_class)->unrealize (widget);
}
static GType
gtk_rotated_bin_child_type (GtkContainer *container)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
if (bin->child)
return G_TYPE_NONE;
return GTK_TYPE_WIDGET;
}
static void
gtk_rotated_bin_add (GtkContainer *container,
GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
if (!bin->child)
{
gtk_widget_set_parent_window (widget, bin->offscreen_window);
gtk_widget_set_parent (widget, GTK_WIDGET (bin));
bin->child = widget;
}
else
g_warning ("GtkRotatedBin cannot have more than one child\n");
}
static void
gtk_rotated_bin_remove (GtkContainer *container,
GtkWidget *widget)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
gboolean was_visible;
was_visible = GTK_WIDGET_VISIBLE (widget);
if (bin->child == widget)
{
gtk_widget_unparent (widget);
bin->child = NULL;
if (was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
}
static void
gtk_rotated_bin_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (container);
g_return_if_fail (callback != NULL);
if (bin->child)
(*callback) (bin->child, callback_data);
}
void
gtk_rotated_bin_set_angle (GtkRotatedBin *bin,
gdouble angle)
{
g_return_if_fail (GTK_IS_ROTATED_BIN (bin));
bin->angle = angle;
gtk_widget_queue_resize (GTK_WIDGET (bin));
gdk_window_geometry_changed (bin->offscreen_window);
}
static void
gtk_rotated_bin_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
GtkRequisition child_requisition;
double s, c;
double w, h;
child_requisition.width = 0;
child_requisition.height = 0;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
s = sin (bin->angle);
c = cos (bin->angle);
w = c * child_requisition.width + s * child_requisition.height;
h = s * child_requisition.width + c * child_requisition.height;
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + w;
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + h;
}
static void
gtk_rotated_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
gint border_width;
gint w, h;
gdouble s, c;
widget->allocation = *allocation;
border_width = GTK_CONTAINER (widget)->border_width;
w = allocation->width - border_width * 2;
h = allocation->height - border_width * 2;
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (widget->window,
allocation->x + border_width,
allocation->y + border_width,
w, h);
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
s = sin (bin->angle);
c = cos (bin->angle);
gtk_widget_get_child_requisition (bin->child, &child_requisition);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
if (c == 0.0)
child_allocation.width = h / s;
else if (s == 0.0)
child_allocation.width = w / c;
else
child_allocation.width = MIN ((w - s * child_allocation.height) / c,
(h - c * child_allocation.height) / s);
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (bin->offscreen_window,
child_allocation.x,
child_allocation.y,
child_allocation.width,
child_allocation.height);
child_allocation.x = child_allocation.y = 0;
gtk_widget_size_allocate (bin->child, &child_allocation);
}
}
static gboolean
gtk_rotated_bin_damage (GtkWidget *widget,
GdkEventExpose *event)
{
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
return TRUE;
}
static gboolean
gtk_rotated_bin_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkRotatedBin *bin = GTK_ROTATED_BIN (widget);
gint width, height;
gdouble s, c;
gdouble w, h;
if (GTK_WIDGET_DRAWABLE (widget))
{
if (event->window == widget->window)
{
GdkPixmap *pixmap;
GtkAllocation child_area;
cairo_t *cr;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
child_area = bin->child->allocation;
cr = gdk_cairo_create (widget->window);
/* transform */
s = sin (bin->angle);
c = cos (bin->angle);
w = c * child_area.width + s * child_area.height;
h = s * child_area.width + c * child_area.height;
cairo_translate (cr, (w - child_area.width) / 2, (h - child_area.height) / 2);
cairo_translate (cr, child_area.width / 2, child_area.height / 2);
cairo_rotate (cr, bin->angle);
cairo_translate (cr, -child_area.width / 2, -child_area.height / 2);
/* clip */
gdk_drawable_get_size (pixmap, &width, &height);
cairo_rectangle (cr, 0, 0, width, height);
cairo_clip (cr);
/* paint */
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
cairo_paint (cr);
cairo_destroy (cr);
}
}
else if (event->window == bin->offscreen_window)
{
gtk_paint_flat_box (widget->style, event->window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "blah",
0, 0, -1, -1);
if (bin->child)
gtk_container_propagate_expose (GTK_CONTAINER (widget),
bin->child,
event);
}
}
return FALSE;
}
/*** ***/
static void
scale_changed (GtkRange *range,
GtkRotatedBin *bin)
{
gtk_rotated_bin_set_angle (bin, gtk_range_get_value (range));
}
static GtkWidget *window = NULL;
GtkWidget *
do_offscreen_window (GtkWidget *do_widget)
{
if (!window)
{
GtkWidget *bin, *vbox, *scale, *button;
GdkColor black;
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 widget");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gdk_color_parse ("black", &black);
gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &black);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_vbox_new (0, FALSE);
scale = gtk_hscale_new_with_range (0, G_PI/2, 0.01);
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
button = gtk_button_new_with_label ("A Button");
bin = gtk_rotated_bin_new ();
g_signal_connect (scale, "value-changed", G_CALLBACK (scale_changed), bin);
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (bin), button);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

View File

@@ -1,500 +0,0 @@
/* Offscreen windows/Effects
*
* Offscreen windows can be used to render elements multiple times to achieve
* various effects.
*/
#include <gtk/gtk.h>
#define GTK_TYPE_MIRROR_BIN (gtk_mirror_bin_get_type ())
#define GTK_MIRROR_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MIRROR_BIN, GtkMirrorBin))
#define GTK_MIRROR_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MIRROR_BIN, GtkMirrorBinClass))
#define GTK_IS_MIRROR_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MIRROR_BIN))
#define GTK_IS_MIRROR_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MIRROR_BIN))
#define GTK_MIRROR_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MIRROR_BIN, GtkMirrorBinClass))
typedef struct _GtkMirrorBin GtkMirrorBin;
typedef struct _GtkMirrorBinClass GtkMirrorBinClass;
struct _GtkMirrorBin
{
GtkContainer container;
GtkWidget *child;
GdkWindow *offscreen_window;
};
struct _GtkMirrorBinClass
{
GtkContainerClass parent_class;
};
GType gtk_mirror_bin_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_mirror_bin_new (void);
/*** implementation ***/
static void gtk_mirror_bin_realize (GtkWidget *widget);
static void gtk_mirror_bin_unrealize (GtkWidget *widget);
static void gtk_mirror_bin_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_mirror_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static gboolean gtk_mirror_bin_damage (GtkWidget *widget,
GdkEventExpose *event);
static gboolean gtk_mirror_bin_expose (GtkWidget *widget,
GdkEventExpose *offscreen);
static void gtk_mirror_bin_add (GtkContainer *container,
GtkWidget *child);
static void gtk_mirror_bin_remove (GtkContainer *container,
GtkWidget *widget);
static void gtk_mirror_bin_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static GType gtk_mirror_bin_child_type (GtkContainer *container);
G_DEFINE_TYPE (GtkMirrorBin, gtk_mirror_bin, GTK_TYPE_CONTAINER);
static void
to_child (GtkMirrorBin *bin,
double widget_x,
double widget_y,
double *x_out,
double *y_out)
{
*x_out = widget_x;
*y_out = widget_y;
}
static void
to_parent (GtkMirrorBin *bin,
double offscreen_x,
double offscreen_y,
double *x_out,
double *y_out)
{
*x_out = offscreen_x;
*y_out = offscreen_y;
}
static void
gtk_mirror_bin_class_init (GtkMirrorBinClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
widget_class->realize = gtk_mirror_bin_realize;
widget_class->unrealize = gtk_mirror_bin_unrealize;
widget_class->size_request = gtk_mirror_bin_size_request;
widget_class->size_allocate = gtk_mirror_bin_size_allocate;
widget_class->expose_event = gtk_mirror_bin_expose;
g_signal_override_class_closure (g_signal_lookup ("damage-event", GTK_TYPE_WIDGET),
GTK_TYPE_MIRROR_BIN,
g_cclosure_new (G_CALLBACK (gtk_mirror_bin_damage),
NULL, NULL));
container_class->add = gtk_mirror_bin_add;
container_class->remove = gtk_mirror_bin_remove;
container_class->forall = gtk_mirror_bin_forall;
container_class->child_type = gtk_mirror_bin_child_type;
}
static void
gtk_mirror_bin_init (GtkMirrorBin *bin)
{
GTK_WIDGET_UNSET_FLAGS (bin, GTK_NO_WINDOW);
}
GtkWidget *
gtk_mirror_bin_new (void)
{
return g_object_new (GTK_TYPE_MIRROR_BIN, NULL);
}
static GdkWindow *
pick_offscreen_child (GdkWindow *offscreen_window,
double widget_x,
double widget_y,
GtkMirrorBin *bin)
{
GtkAllocation child_area;
double x, y;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
to_child (bin, widget_x, widget_y, &x, &y);
child_area = bin->child->allocation;
if (x >= 0 && x < child_area.width &&
y >= 0 && y < child_area.height)
return bin->offscreen_window;
}
return NULL;
}
static void
offscreen_window_to_parent (GdkWindow *offscreen_window,
double offscreen_x,
double offscreen_y,
double *parent_x,
double *parent_y,
GtkMirrorBin *bin)
{
to_parent (bin, offscreen_x, offscreen_y, parent_x, parent_y);
}
static void
offscreen_window_from_parent (GdkWindow *window,
double parent_x,
double parent_y,
double *offscreen_x,
double *offscreen_y,
GtkMirrorBin *bin)
{
to_child (bin, parent_x, parent_y, offscreen_x, offscreen_y);
}
static void
gtk_mirror_bin_realize (GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GdkWindowAttr attributes;
gint attributes_mask;
gint border_width;
GtkRequisition child_requisition;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
border_width = GTK_CONTAINER (widget)->border_width;
attributes.x = widget->allocation.x + border_width;
attributes.y = widget->allocation.y + border_width;
attributes.width = widget->allocation.width - 2 * border_width;
attributes.height = widget->allocation.height - 2 * border_width;
attributes.window_type = GDK_WINDOW_CHILD;
attributes.event_mask = gtk_widget_get_events (widget)
| GDK_EXPOSURE_MASK
| GDK_POINTER_MOTION_MASK
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
| GDK_SCROLL_MASK
| GDK_ENTER_NOTIFY_MASK
| GDK_LEAVE_NOTIFY_MASK;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
attributes.wclass = GDK_INPUT_OUTPUT;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (widget->window, widget);
g_signal_connect (widget->window, "pick-embedded-child",
G_CALLBACK (pick_offscreen_child), bin);
attributes.window_type = GDK_WINDOW_OFFSCREEN;
child_requisition.width = child_requisition.height = 0;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
attributes.width = bin->child->allocation.width;
attributes.height = bin->child->allocation.height;
}
bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (bin->offscreen_window, widget);
if (bin->child)
gtk_widget_set_parent_window (bin->child, bin->offscreen_window);
gdk_offscreen_window_set_embedder (bin->offscreen_window, widget->window);
g_signal_connect (bin->offscreen_window, "to-embedder",
G_CALLBACK (offscreen_window_to_parent), bin);
g_signal_connect (bin->offscreen_window, "from-embedder",
G_CALLBACK (offscreen_window_from_parent), bin);
widget->style = gtk_style_attach (widget->style, widget->window);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, bin->offscreen_window, GTK_STATE_NORMAL);
gdk_window_show (bin->offscreen_window);
}
static void
gtk_mirror_bin_unrealize (GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
gdk_window_set_user_data (bin->offscreen_window, NULL);
gdk_window_destroy (bin->offscreen_window);
bin->offscreen_window = NULL;
GTK_WIDGET_CLASS (gtk_mirror_bin_parent_class)->unrealize (widget);
}
static GType
gtk_mirror_bin_child_type (GtkContainer *container)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
if (bin->child)
return G_TYPE_NONE;
return GTK_TYPE_WIDGET;
}
static void
gtk_mirror_bin_add (GtkContainer *container,
GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
if (!bin->child)
{
gtk_widget_set_parent_window (widget, bin->offscreen_window);
gtk_widget_set_parent (widget, GTK_WIDGET (bin));
bin->child = widget;
}
else
g_warning ("GtkMirrorBin cannot have more than one child\n");
}
static void
gtk_mirror_bin_remove (GtkContainer *container,
GtkWidget *widget)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
gboolean was_visible;
was_visible = GTK_WIDGET_VISIBLE (widget);
if (bin->child == widget)
{
gtk_widget_unparent (widget);
bin->child = NULL;
if (was_visible && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (GTK_WIDGET (container));
}
}
static void
gtk_mirror_bin_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (container);
g_return_if_fail (callback != NULL);
if (bin->child)
(*callback) (bin->child, callback_data);
}
static void
gtk_mirror_bin_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
GtkRequisition child_requisition;
child_requisition.width = 0;
child_requisition.height = 0;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
gtk_widget_size_request (bin->child, &child_requisition);
requisition->width = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.width + 10;
requisition->height = GTK_CONTAINER (widget)->border_width * 2 + child_requisition.height * 2 + 10;
}
static void
gtk_mirror_bin_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
gint border_width;
gint w, h;
widget->allocation = *allocation;
border_width = GTK_CONTAINER (widget)->border_width;
w = allocation->width - border_width * 2;
h = allocation->height - border_width * 2;
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (widget->window,
allocation->x + border_width,
allocation->y + border_width,
w, h);
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
GtkRequisition child_requisition;
GtkAllocation child_allocation;
gtk_widget_get_child_requisition (bin->child, &child_requisition);
child_allocation.x = 0;
child_allocation.y = 0;
child_allocation.height = child_requisition.height;
child_allocation.width = child_requisition.width;
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (bin->offscreen_window,
allocation->x + border_width,
allocation->y + border_width,
child_allocation.width, child_allocation.height);
gtk_widget_size_allocate (bin->child, &child_allocation);
}
}
static gboolean
gtk_mirror_bin_damage (GtkWidget *widget,
GdkEventExpose *event)
{
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
return TRUE;
}
static gboolean
gtk_mirror_bin_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
gint width, height;
if (GTK_WIDGET_DRAWABLE (widget))
{
if (event->window == widget->window)
{
GdkPixmap *pixmap;
cairo_t *cr;
cairo_matrix_t matrix;
cairo_pattern_t *mask;
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
pixmap = gdk_offscreen_window_get_pixmap (bin->offscreen_window);
gdk_drawable_get_size (pixmap, &width, &height);
cr = gdk_cairo_create (widget->window);
cairo_save (cr);
cairo_rectangle (cr, 0, 0, width, height);
cairo_clip (cr);
/* paint the offscreen child */
gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
cairo_paint (cr);
cairo_restore (cr);
cairo_matrix_init (&matrix, 1.0, 0.0, 0.3, 1.0, 0.0, 0.0);
cairo_matrix_scale (&matrix, 1.0, -1.0);
cairo_matrix_translate (&matrix, -10, - 3 * height - 10);
cairo_transform (cr, &matrix);
cairo_rectangle (cr, 0, height, width, height);
cairo_clip (cr);
gdk_cairo_set_source_pixmap (cr, pixmap, 0, height);
/* create linear gradient as mask-pattern to fade out the source */
mask = cairo_pattern_create_linear (0.0, height, 0.0, 2*height);
cairo_pattern_add_color_stop_rgba (mask, 0.0, 0.0, 0.0, 0.0, 0.0);
cairo_pattern_add_color_stop_rgba (mask, 0.25, 0.0, 0.0, 0.0, 0.01);
cairo_pattern_add_color_stop_rgba (mask, 0.5, 0.0, 0.0, 0.0, 0.25);
cairo_pattern_add_color_stop_rgba (mask, 0.75, 0.0, 0.0, 0.0, 0.5);
cairo_pattern_add_color_stop_rgba (mask, 1.0, 0.0, 0.0, 0.0, 1.0);
/* paint the reflection */
cairo_mask (cr, mask);
cairo_pattern_destroy (mask);
cairo_destroy (cr);
}
}
else if (event->window == bin->offscreen_window)
{
gtk_paint_flat_box (widget->style, event->window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "blah",
0, 0, -1, -1);
if (bin->child)
gtk_container_propagate_expose (GTK_CONTAINER (widget),
bin->child,
event);
}
}
return FALSE;
}
/*** ***/
static GtkWidget *window = NULL;
GtkWidget *
do_offscreen_window2 (GtkWidget *do_widget)
{
if (!window)
{
GtkWidget *bin, *vbox;
GtkWidget *hbox, *entry, *applybutton, *backbutton;
GtkSizeGroup *group;
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), "Effects");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
vbox = gtk_vbox_new (0, FALSE);
bin = gtk_mirror_bin_new ();
group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
hbox = gtk_hbox_new (FALSE, 6);
backbutton = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (backbutton),
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, 4));
gtk_size_group_add_widget (group, backbutton);
entry = gtk_entry_new ();
gtk_size_group_add_widget (group, entry);
applybutton = gtk_button_new ();
gtk_size_group_add_widget (group, applybutton);
gtk_container_add (GTK_CONTAINER (applybutton),
gtk_image_new_from_stock (GTK_STOCK_APPLY, 4));
gtk_container_add (GTK_CONTAINER (window), vbox);
gtk_box_pack_start (GTK_BOX (vbox), bin, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (bin), hbox);
gtk_box_pack_start (GTK_BOX (hbox), backbutton, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (hbox), applybutton, FALSE, FALSE, 0);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

View File

@@ -13,19 +13,19 @@
#define HEADER_HEIGHT (10*72/25.4)
#define HEADER_GAP (3*72/25.4)
typedef struct
typedef struct
{
gchar *filename;
gdouble font_size;
gint lines_per_page;
gint lines_per_page;
gchar **lines;
gint num_lines;
gint num_pages;
} PrintData;
static void
begin_print (GtkPrintOperation *operation,
begin_print (GtkPrintOperation *operation,
GtkPrintContext *context,
gpointer user_data)
{
@@ -35,9 +35,9 @@ begin_print (GtkPrintOperation *operation,
double height;
height = gtk_print_context_get_height (context) - HEADER_HEIGHT - HEADER_GAP;
data->lines_per_page = floor (height / data->font_size);
g_file_get_contents (data->filename, &contents, NULL, NULL);
data->lines = g_strsplit (contents, "\n", 0);
@@ -46,7 +46,7 @@ begin_print (GtkPrintOperation *operation,
i = 0;
while (data->lines[i] != NULL)
i++;
data->num_lines = i;
data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1;
@@ -72,10 +72,10 @@ draw_page (GtkPrintOperation *operation,
width = gtk_print_context_get_width (context);
cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
cairo_fill_preserve (cr);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_set_line_width (cr, 1);
cairo_stroke (cr);
@@ -107,19 +107,19 @@ draw_page (GtkPrintOperation *operation,
pango_layout_get_pixel_size (layout, &text_width, &text_height);
cairo_move_to (cr, width - text_width - 4, (HEADER_HEIGHT - text_height) / 2);
pango_cairo_show_layout (cr, layout);
g_object_unref (layout);
layout = gtk_print_context_create_pango_layout (context);
desc = pango_font_description_from_string ("monospace");
pango_font_description_set_size (desc, data->font_size * PANGO_SCALE);
pango_layout_set_font_description (layout, desc);
pango_font_description_free (desc);
cairo_move_to (cr, 0, HEADER_HEIGHT + HEADER_GAP);
line = page_nr * data->lines_per_page;
for (i = 0; i < data->lines_per_page && line < data->num_lines; i++)
for (i = 0; i < data->lines_per_page && line < data->num_lines; i++)
{
pango_layout_set_text (layout, data->lines[line], -1);
pango_cairo_show_layout (cr, layout);
@@ -131,7 +131,7 @@ draw_page (GtkPrintOperation *operation,
}
static void
end_print (GtkPrintOperation *operation,
end_print (GtkPrintOperation *operation,
GtkPrintContext *context,
gpointer user_data)
{
@@ -147,10 +147,7 @@ GtkWidget *
do_printing (GtkWidget *do_widget)
{
GtkPrintOperation *operation;
GtkPrintSettings *settings;
PrintData *data;
gchar *uri, *ext;
const gchar *dir;
GError *error = NULL;
operation = gtk_print_operation_new ();
@@ -158,55 +155,37 @@ do_printing (GtkWidget *do_widget)
data->filename = demo_find_file ("printing.c", NULL);
data->font_size = 12.0;
g_signal_connect (G_OBJECT (operation), "begin-print",
g_signal_connect (G_OBJECT (operation), "begin-print",
G_CALLBACK (begin_print), data);
g_signal_connect (G_OBJECT (operation), "draw-page",
g_signal_connect (G_OBJECT (operation), "draw-page",
G_CALLBACK (draw_page), data);
g_signal_connect (G_OBJECT (operation), "end-print",
g_signal_connect (G_OBJECT (operation), "end-print",
G_CALLBACK (end_print), data);
gtk_print_operation_set_use_full_page (operation, FALSE);
gtk_print_operation_set_unit (operation, GTK_UNIT_POINTS);
gtk_print_operation_set_embed_page_setup (operation, TRUE);
settings = gtk_print_settings_new ();
dir = g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS);
if (dir == NULL)
dir = g_get_home_dir ();
if (g_strcmp0 (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT), "ps") == 0)
ext = ".ps";
else if (g_strcmp0 (gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT), "svg") == 0)
ext = ".svg";
else
ext = ".pdf";
uri = g_strconcat ("file://", dir, "/", "gtk-demo", ext, NULL);
gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_URI, uri);
gtk_print_operation_set_print_settings (operation, settings);
gtk_print_operation_run (operation, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, GTK_WINDOW (do_widget), &error);
g_object_unref (operation);
g_object_unref (settings);
g_free (uri);
if (error)
{
GtkWidget *dialog;
dialog = gtk_message_dialog_new (GTK_WINDOW (do_widget),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"%s", error->message);
g_error_free (error);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
gtk_widget_show (dialog);
}
return NULL;
}

View File

@@ -1,173 +1,101 @@
/* Rotated Text
*
* This demo shows how to use PangoCairo to draw rotated and transformed
* text. The right pane shows a rotated GtkLabel widget.
* 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.
*
* 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.
* 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.
*/
#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 5
#define FONT "Serif 18"
#define N_WORDS 10
#define FONT "Sans Bold 27"
PangoRenderer *renderer;
PangoMatrix matrix = PANGO_MATRIX_INIT;
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;
/* 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);
/* 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 */
device_radius = MIN (width, height) / 2.;
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);
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);
/* 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 */
/* Create a PangoLayout, set the font and text */
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);
attrs = create_fancy_attr_list_for_layout (layout);
pango_layout_set_attributes (layout, attrs);
pango_attr_list_unref (attrs);
pango_font_description_free (desc);
/* 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;
/* Inform Pango to re-layout the text with the new transformation matrix */
pango_cairo_update_layout (cr, layout);
/* 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;
pango_layout_get_pixel_size (layout, &width, &height);
cairo_move_to (cr, - width / 2, - RADIUS * .9);
pango_cairo_show_layout (cr, layout);
gdk_pango_renderer_set_override_color (GDK_PANGO_RENDERER (renderer),
PANGO_RENDER_PART_FOREGROUND, &color);
pango_matrix_rotate (&rotated_matrix, angle);
/* Rotate for the next turn */
cairo_rotate (cr, G_PI*2 / N_WORDS);
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_layout_get_size (layout, &width, &height);
pango_renderer_draw_layout (renderer, layout,
- width / 2, - RADIUS * PANGO_SCALE);
}
/* 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;
}
@@ -175,30 +103,21 @@ 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), 4 * RADIUS, 2 * 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 (box), drawing_area);
gtk_container_add (GTK_CONTAINER (window), drawing_area);
/* This overrides the background color from the theme */
gtk_widget_modify_bg (drawing_area, GTK_STATE_NORMAL, &white);
@@ -206,21 +125,7 @@ do_rotated_text (GtkWidget *do_widget)
g_signal_connect (drawing_area, "expose-event",
G_CALLBACK (rotated_text_expose_event), NULL);
/* And a label */
label = gtk_label_new (text);
gtk_container_add (GTK_CONTAINER (box), label);
gtk_label_set_angle (GTK_LABEL (label), 45);
/* Set up fancy stuff on the label */
layout = gtk_label_get_layout (GTK_LABEL (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 (GTK_LABEL (label), attrs);
pango_attr_list_unref (attrs);
gtk_window_set_default_size (GTK_WINDOW (window), 2 * RADIUS, 2 * RADIUS);
}
if (!GTK_WIDGET_VISIBLE (window))

View File

@@ -1,283 +0,0 @@
/* Entry/Search Entry
*
* GtkEntry allows to display icons and progress information.
* This demo shows how to use these features in a search entry.
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
static GtkWidget *menu = NULL;
static GtkWidget *notebook = NULL;
static guint search_progress_id = 0;
static guint finish_search_id = 0;
static void
show_find_button (void)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
}
static void
show_cancel_button (void)
{
gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 1);
}
static gboolean
search_progress (gpointer data)
{
gtk_entry_progress_pulse (GTK_ENTRY (data));
return TRUE;
}
static void
search_progress_done (GtkEntry *entry)
{
gtk_entry_set_progress_fraction (entry, 0.0);
}
static gboolean
finish_search (GtkButton *button)
{
show_find_button ();
g_source_remove (search_progress_id);
search_progress_id = 0;
return FALSE;
}
static gboolean
start_search_feedback (gpointer data)
{
search_progress_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 100,
(GSourceFunc)search_progress, data,
(GDestroyNotify)search_progress_done);
return FALSE;
}
static void
start_search (GtkButton *button,
GtkEntry *entry)
{
show_cancel_button ();
search_progress_id = g_timeout_add_seconds (1, (GSourceFunc)start_search_feedback, entry);
finish_search_id = g_timeout_add_seconds (15, (GSourceFunc)finish_search, button);
}
static void
stop_search (GtkButton *button,
gpointer data)
{
g_source_remove (finish_search_id);
finish_search (button);
}
static void
icon_press_cb (GtkEntry *entry,
gint position,
GdkEventButton *event,
gpointer data)
{
if (position == GTK_ENTRY_ICON_PRIMARY)
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
event->button, event->time);
else
gtk_entry_set_text (entry, "");
}
static void
text_changed_cb (GtkEntry *entry,
GParamSpec *pspec,
GtkWidget *button)
{
gboolean has_text;
has_text = gtk_entry_get_text_length (entry) > 0;
gtk_entry_set_icon_sensitive (entry,
GTK_ENTRY_ICON_SECONDARY,
has_text);
gtk_widget_set_sensitive (button, has_text);
}
static void
activate_cb (GtkEntry *entry,
GtkButton *button)
{
if (search_progress_id != 0)
return;
start_search (button, entry);
}
static void
search_by_name (GtkWidget *item,
GtkEntry *entry)
{
gtk_entry_set_icon_from_stock (entry,
GTK_ENTRY_ICON_PRIMARY,
GTK_STOCK_FIND);
gtk_entry_set_icon_tooltip_text (entry,
GTK_ENTRY_ICON_PRIMARY,
"Search by name\n"
"Click here to change the search type");
}
static void
search_by_description (GtkWidget *item,
GtkEntry *entry)
{
gtk_entry_set_icon_from_stock (entry,
GTK_ENTRY_ICON_PRIMARY,
GTK_STOCK_EDIT);
gtk_entry_set_icon_tooltip_text (entry,
GTK_ENTRY_ICON_PRIMARY,
"Search by description\n"
"Click here to change the search type");
}
static void
search_by_file (GtkWidget *item,
GtkEntry *entry)
{
gtk_entry_set_icon_from_stock (entry,
GTK_ENTRY_ICON_PRIMARY,
GTK_STOCK_OPEN);
gtk_entry_set_icon_tooltip_text (entry,
GTK_ENTRY_ICON_PRIMARY,
"Search by file name\n"
"Click here to change the search type");
}
static void
search_entry_destroyed (GtkWidget *widget)
{
if (finish_search_id != 0)
g_source_remove (finish_search_id);
if (search_progress_id != 0)
g_source_remove (search_progress_id);
window = NULL;
}
GtkWidget *
do_search_entry (GtkWidget *do_widget)
{
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *entry;
GtkWidget *item;
GtkWidget *image;
GtkWidget *find_button;
GtkWidget *cancel_button;
if (!window)
{
window = gtk_dialog_new_with_buttons ("Search Entry",
GTK_WINDOW (do_widget),
0,
GTK_STOCK_CLOSE,
GTK_RESPONSE_NONE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
g_signal_connect (window, "destroy",
G_CALLBACK (search_entry_destroyed), &window);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 0);
/* Create our entry */
entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
/* Create the find and cancel buttons */
notebook = gtk_notebook_new ();
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
gtk_box_pack_start (GTK_BOX (hbox), notebook, FALSE, FALSE, 0);
find_button = gtk_button_new_with_label ("Find");
g_signal_connect (find_button, "clicked",
G_CALLBACK (start_search), entry);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), find_button, NULL);
gtk_widget_show (find_button);
cancel_button = gtk_button_new_with_label ("Cancel");
g_signal_connect (cancel_button, "clicked",
G_CALLBACK (stop_search), NULL);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), cancel_button, NULL);
gtk_widget_show (cancel_button);
/* Set up the search icon */
search_by_name (NULL, GTK_ENTRY (entry));
/* Set up the clear icon */
gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
GTK_ENTRY_ICON_SECONDARY,
GTK_STOCK_CLEAR);
text_changed_cb (GTK_ENTRY (entry), NULL, find_button);
g_signal_connect (entry, "icon-press",
G_CALLBACK (icon_press_cb), NULL);
g_signal_connect (entry, "notify::text",
G_CALLBACK (text_changed_cb), find_button);
g_signal_connect (entry, "activate",
G_CALLBACK (activate_cb), NULL);
/* Create the menu */
menu = gtk_menu_new ();
gtk_menu_attach_to_widget (GTK_MENU (menu), entry, NULL);
item = gtk_image_menu_item_new_with_label ("Search by name");
image = gtk_image_new_from_stock (GTK_STOCK_FIND, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (item, "activate", G_CALLBACK (search_by_name), entry);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_image_menu_item_new_with_label ("Search by description");
image = gtk_image_new_from_stock (GTK_STOCK_EDIT, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (item, "activate", G_CALLBACK (search_by_description), entry);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_image_menu_item_new_with_label ("Search by file name");
image = gtk_image_new_from_stock (GTK_STOCK_OPEN, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (item, "activate", G_CALLBACK (search_by_file), entry);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show_all (menu);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
{
gtk_widget_destroy (menu);
gtk_widget_destroy (window);
window = NULL;
}
return window;
}

View File

@@ -1,94 +0,0 @@
/* Spinner
*
* GtkSpinner allows to show that background activity is on-going.
*
*/
#include <gtk/gtk.h>
static GtkWidget *window = NULL;
static GtkWidget *spinner_sensitive = NULL;
static GtkWidget *spinner_unsensitive = NULL;
static void
on_play_clicked (GtkButton *button, gpointer user_data)
{
gtk_spinner_start (GTK_SPINNER (spinner_sensitive));
gtk_spinner_start (GTK_SPINNER (spinner_unsensitive));
}
static void
on_stop_clicked (GtkButton *button, gpointer user_data)
{
gtk_spinner_stop (GTK_SPINNER (spinner_sensitive));
gtk_spinner_stop (GTK_SPINNER (spinner_unsensitive));
}
GtkWidget *
do_spinner (GtkWidget *do_widget)
{
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *button;
GtkWidget *spinner;
if (!window)
{
window = gtk_dialog_new_with_buttons ("GtkSpinner",
GTK_WINDOW (do_widget),
0,
GTK_STOCK_CLOSE,
GTK_RESPONSE_NONE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_vbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
/* Sensitive */
hbox = gtk_hbox_new (FALSE, 5);
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (hbox), spinner);
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
gtk_container_add (GTK_CONTAINER (vbox), hbox);
spinner_sensitive = spinner;
/* Disabled */
hbox = gtk_hbox_new (FALSE, 5);
spinner = gtk_spinner_new ();
gtk_container_add (GTK_CONTAINER (hbox), spinner);
gtk_container_add (GTK_CONTAINER (hbox), gtk_entry_new ());
gtk_container_add (GTK_CONTAINER (vbox), hbox);
spinner_unsensitive = spinner;
gtk_widget_set_sensitive (hbox, FALSE);
button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_PLAY);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_play_clicked), spinner);
gtk_container_add (GTK_CONTAINER (vbox), button);
button = gtk_button_new_from_stock (GTK_STOCK_MEDIA_STOP);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_stop_clicked), spinner);
gtk_container_add (GTK_CONTAINER (vbox), button);
/* Start by default to test for:
* https://bugzilla.gnome.org/show_bug.cgi?id=598496 */
on_play_clicked (NULL, NULL);
}
if (!GTK_WIDGET_VISIBLE (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
return window;
}

View File

@@ -1,792 +0,0 @@
/* Tool Palette
*
* A tool palette widget shows groups of toolbar items as a grid of icons
* or a list of names.
*/
#include <string.h>
#include <gtk/gtk.h>
#include "config.h"
#include "demo-common.h"
static GtkWidget *window = NULL;
static void load_stock_items (GtkToolPalette *palette);
static void load_toggle_items (GtkToolPalette *palette);
static void load_special_items (GtkToolPalette *palette);
typedef struct _CanvasItem CanvasItem;
struct _CanvasItem
{
GdkPixbuf *pixbuf;
gdouble x, y;
};
static CanvasItem *drop_item = NULL;
static GList *canvas_items = NULL;
/********************************/
/* ====== Canvas drawing ====== */
/********************************/
static CanvasItem*
canvas_item_new (GtkWidget *widget,
GtkToolButton *button,
gdouble x,
gdouble y)
{
CanvasItem *item = NULL;
const gchar *stock_id;
GdkPixbuf *pixbuf;
stock_id = gtk_tool_button_get_stock_id (button);
pixbuf = gtk_widget_render_icon (widget, stock_id, GTK_ICON_SIZE_DIALOG, NULL);
if (pixbuf)
{
item = g_slice_new0 (CanvasItem);
item->pixbuf = pixbuf;
item->x = x;
item->y = y;
}
return item;
}
static void
canvas_item_free (CanvasItem *item)
{
g_object_unref (item->pixbuf);
g_slice_free (CanvasItem, item);
}
static void
canvas_item_draw (const CanvasItem *item,
cairo_t *cr,
gboolean preview)
{
gdouble cx = gdk_pixbuf_get_width (item->pixbuf);
gdouble cy = gdk_pixbuf_get_height (item->pixbuf);
gdk_cairo_set_source_pixbuf (cr,
item->pixbuf,
item->x - cx * 0.5,
item->y - cy * 0.5);
if (preview)
cairo_paint_with_alpha (cr, 0.6);
else
cairo_paint (cr);
}
static gboolean
canvas_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
cairo_t *cr;
GList *iter;
cr = gdk_cairo_create (widget->window);
gdk_cairo_region (cr, event->region);
cairo_clip (cr);
cairo_set_source_rgb (cr, 1, 1, 1);
cairo_rectangle (cr, 0, 0, widget->allocation.width, widget->allocation.height);
cairo_fill (cr);
for (iter = canvas_items; iter; iter = iter->next)
canvas_item_draw (iter->data, cr, FALSE);
if (drop_item)
canvas_item_draw (drop_item, cr, TRUE);
cairo_destroy (cr);
return TRUE;
}
/*****************************/
/* ====== Palette DnD ====== */
/*****************************/
static void
palette_drop_item (GtkToolItem *drag_item,
GtkToolItemGroup *drop_group,
gint x,
gint y)
{
GtkWidget *drag_group = gtk_widget_get_parent (GTK_WIDGET (drag_item));
GtkToolItem *drop_item = gtk_tool_item_group_get_drop_item (drop_group, x, y);
gint drop_position = -1;
if (drop_item)
drop_position = gtk_tool_item_group_get_item_position (GTK_TOOL_ITEM_GROUP (drop_group), drop_item);
if (GTK_TOOL_ITEM_GROUP (drag_group) != drop_group)
{
gboolean homogeneous, expand, fill, new_row;
g_object_ref (drag_item);
gtk_container_child_get (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item),
"homogeneous", &homogeneous,
"expand", &expand,
"fill", &fill,
"new-row", &new_row,
NULL);
gtk_container_remove (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item));
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (drop_group),
drag_item, drop_position);
gtk_container_child_set (GTK_CONTAINER (drop_group), GTK_WIDGET (drag_item),
"homogeneous", homogeneous,
"expand", expand,
"fill", fill,
"new-row", new_row,
NULL);
g_object_unref (drag_item);
}
else
gtk_tool_item_group_set_item_position (GTK_TOOL_ITEM_GROUP (drop_group),
drag_item, drop_position);
}
static void
palette_drop_group (GtkToolPalette *palette,
GtkWidget *drag_group,
GtkWidget *drop_group)
{
gint drop_position = -1;
if (drop_group)
drop_position = gtk_tool_palette_get_group_position (palette, drop_group);
gtk_tool_palette_set_group_position (palette, drag_group, drop_position);
}
static void
palette_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection,
guint info,
guint time,
gpointer data)
{
GtkWidget *drag_palette = gtk_drag_get_source_widget (context);
GtkWidget *drag_item = NULL, *drop_group = NULL;
while (drag_palette && !GTK_IS_TOOL_PALETTE (drag_palette))
drag_palette = gtk_widget_get_parent (drag_palette);
if (drag_palette)
{
drag_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (drag_palette),
selection);
drop_group = gtk_tool_palette_get_drop_group (GTK_TOOL_PALETTE (widget),
x, y);
}
if (GTK_IS_TOOL_ITEM_GROUP (drag_item))
palette_drop_group (GTK_TOOL_PALETTE (drag_palette), drag_item, drop_group);
else if (GTK_IS_TOOL_ITEM (drag_item) && drop_group)
palette_drop_item (GTK_TOOL_ITEM (drag_item),
GTK_TOOL_ITEM_GROUP (drop_group),
x - GTK_WIDGET (drop_group)->allocation.x,
y - GTK_WIDGET (drop_group)->allocation.y);
}
/********************************/
/* ====== Passive Canvas ====== */
/********************************/
static void
passive_canvas_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection,
guint info,
guint time,
gpointer data)
{
/* find the tool button, which is the source of this DnD operation */
GtkWidget *palette = gtk_drag_get_source_widget (context);
CanvasItem *canvas_item = NULL;
GtkWidget *tool_item = NULL;
while (palette && !GTK_IS_TOOL_PALETTE (palette))
palette = gtk_widget_get_parent (palette);
if (palette)
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
selection);
g_assert (NULL == drop_item);
/* append a new canvas item when a tool button was found */
if (GTK_IS_TOOL_ITEM (tool_item))
canvas_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
if (canvas_item)
{
canvas_items = g_list_append (canvas_items, canvas_item);
gtk_widget_queue_draw (widget);
}
}
/************************************/
/* ====== Interactive Canvas ====== */
/************************************/
static gboolean
interactive_canvas_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time,
gpointer data)
{
if (drop_item)
{
/* already have a drop indicator - just update position */
drop_item->x = x;
drop_item->y = y;
gtk_widget_queue_draw (widget);
gdk_drag_status (context, GDK_ACTION_COPY, time);
}
else
{
/* request DnD data for creating a drop indicator */
GdkAtom target = gtk_drag_dest_find_target (widget, context, NULL);
if (!target)
return FALSE;
gtk_drag_get_data (widget, context, target, time);
}
return TRUE;
}
static void
interactive_canvas_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection,
guint info,
guint time,
gpointer data)
{
/* find the tool button which is the source of this DnD operation */
GtkWidget *palette = gtk_drag_get_source_widget (context);
GtkWidget *tool_item = NULL;
while (palette && !GTK_IS_TOOL_PALETTE (palette))
palette = gtk_widget_get_parent (palette);
if (palette)
tool_item = gtk_tool_palette_get_drag_item (GTK_TOOL_PALETTE (palette),
selection);
/* create a drop indicator when a tool button was found */
g_assert (NULL == drop_item);
if (GTK_IS_TOOL_ITEM (tool_item))
{
drop_item = canvas_item_new (widget, GTK_TOOL_BUTTON (tool_item), x, y);
gdk_drag_status (context, GDK_ACTION_COPY, time);
gtk_widget_queue_draw (widget);
}
}
static gboolean
interactive_canvas_drag_drop (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time,
gpointer data)
{
if (drop_item)
{
/* turn the drop indicator into a real canvas item */
drop_item->x = x;
drop_item->y = y;
canvas_items = g_list_append (canvas_items, drop_item);
drop_item = NULL;
/* signal the item was accepted and redraw */
gtk_drag_finish (context, TRUE, FALSE, time);
gtk_widget_queue_draw (widget);
return TRUE;
}
return FALSE;
}
static gboolean
interactive_canvas_real_drag_leave (gpointer data)
{
if (drop_item)
{
GtkWidget *widget = GTK_WIDGET (data);
canvas_item_free (drop_item);
drop_item = NULL;
gtk_widget_queue_draw (widget);
}
return FALSE;
}
static void
interactive_canvas_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time,
gpointer data)
{
/* defer cleanup until a potential "drag-drop" signal was received */
g_idle_add (interactive_canvas_real_drag_leave, widget);
}
static void
on_combo_orientation_changed (GtkComboBox *combo_box,
gpointer user_data)
{
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
GtkScrolledWindow *sw = GTK_SCROLLED_WINDOW (GTK_WIDGET (palette)->parent);
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
GtkTreeIter iter;
gint val = 0;
if (!gtk_combo_box_get_active_iter (combo_box, &iter))
return;
gtk_tree_model_get (model, &iter, 1, &val, -1);
gtk_orientable_set_orientation (GTK_ORIENTABLE (palette), val);
if (val == GTK_ORIENTATION_HORIZONTAL)
gtk_scrolled_window_set_policy (sw, GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
else
gtk_scrolled_window_set_policy (sw, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
}
static void
on_combo_style_changed (GtkComboBox *combo_box,
gpointer user_data)
{
GtkToolPalette *palette = GTK_TOOL_PALETTE (user_data);
GtkTreeModel *model = gtk_combo_box_get_model (combo_box);
GtkTreeIter iter;
gint val = 0;
if (!gtk_combo_box_get_active_iter (combo_box, &iter))
return;
gtk_tree_model_get (model, &iter, 1, &val, -1);
if (val == -1)
gtk_tool_palette_unset_style (palette);
else
gtk_tool_palette_set_style (palette, val);
}
GtkWidget *
do_toolpalette (GtkWidget *do_widget)
{
GtkWidget *box = NULL;
GtkWidget *hbox = NULL;
GtkWidget *combo_orientation = NULL;
GtkListStore *orientation_model = NULL;
GtkWidget *combo_style = NULL;
GtkListStore *style_model = NULL;
GtkCellRenderer *cell_renderer = NULL;
GtkTreeIter iter;
GtkWidget *palette = NULL;
GtkWidget *palette_scroller = NULL;
GtkWidget *notebook = NULL;
GtkWidget *contents = NULL;
GtkWidget *contents_scroller = NULL;
if (!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), "Tool Palette");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 600);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
/* Add widgets to control the ToolPalette appearance: */
box = gtk_vbox_new (FALSE, 6);
gtk_container_add (GTK_CONTAINER (window), box);
/* Orientation combo box: */
orientation_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
gtk_list_store_append (orientation_model, &iter);
gtk_list_store_set (orientation_model, &iter,
0, "Horizontal",
1, GTK_ORIENTATION_HORIZONTAL,
-1);
gtk_list_store_append (orientation_model, &iter);
gtk_list_store_set (orientation_model, &iter,
0, "Vertical",
1, GTK_ORIENTATION_VERTICAL,
-1);
combo_orientation =
gtk_combo_box_new_with_model (GTK_TREE_MODEL (orientation_model));
cell_renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_orientation),
cell_renderer,
TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_orientation),
cell_renderer,
"text", 0,
NULL);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_orientation), &iter);
gtk_box_pack_start (GTK_BOX (box), combo_orientation, FALSE, FALSE, 0);
/* Style combo box: */
style_model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
gtk_list_store_append (style_model, &iter);
gtk_list_store_set (style_model, &iter,
0, "Text",
1, GTK_TOOLBAR_TEXT,
-1);
gtk_list_store_append (style_model, &iter);
gtk_list_store_set (style_model, &iter,
0, "Both",
1, GTK_TOOLBAR_BOTH,
-1);
gtk_list_store_append (style_model, &iter);
gtk_list_store_set (style_model, &iter,
0, "Both: Horizontal",
1, GTK_TOOLBAR_BOTH_HORIZ,
-1);
gtk_list_store_append (style_model, &iter);
gtk_list_store_set (style_model, &iter,
0, "Icons",
1, GTK_TOOLBAR_ICONS,
-1);
gtk_list_store_append (style_model, &iter);
gtk_list_store_set (style_model, &iter,
0, "Default",
1, -1, /* A custom meaning for this demo. */
-1);
combo_style = gtk_combo_box_new_with_model (GTK_TREE_MODEL (style_model));
cell_renderer = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_style),
cell_renderer,
TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_style),
cell_renderer,
"text", 0,
NULL);
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_style), &iter);
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
/* Add hbox */
hbox = gtk_hbox_new (FALSE, 5);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
/* Add and fill the ToolPalette: */
palette = gtk_tool_palette_new ();
load_stock_items (GTK_TOOL_PALETTE (palette));
load_toggle_items (GTK_TOOL_PALETTE (palette));
load_special_items (GTK_TOOL_PALETTE (palette));
palette_scroller = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (palette_scroller),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_container_set_border_width (GTK_CONTAINER (palette_scroller), 6);
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
gtk_container_add (GTK_CONTAINER (hbox), palette_scroller);
gtk_widget_show_all (box);
/* Connect signals: */
g_signal_connect (combo_orientation, "changed",
G_CALLBACK (on_combo_orientation_changed), palette);
g_signal_connect (combo_style, "changed",
G_CALLBACK (on_combo_style_changed), palette);
/* Keep the widgets in sync: */
on_combo_orientation_changed (GTK_COMBO_BOX (combo_orientation), palette);
/* ===== notebook ===== */
notebook = gtk_notebook_new ();
gtk_container_set_border_width (GTK_CONTAINER (notebook), 6);
gtk_box_pack_end (GTK_BOX(hbox), notebook, FALSE, FALSE, 0);
/* ===== DnD for tool items ===== */
g_signal_connect (palette, "drag-data-received",
G_CALLBACK (palette_drag_data_received), NULL);
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
palette,
GTK_DEST_DEFAULT_ALL,
GTK_TOOL_PALETTE_DRAG_ITEMS |
GTK_TOOL_PALETTE_DRAG_GROUPS,
GDK_ACTION_MOVE);
/* ===== passive DnD dest ===== */
contents = gtk_drawing_area_new ();
gtk_widget_set_app_paintable (contents, TRUE);
g_object_connect (contents,
"signal::expose-event", canvas_expose_event, NULL,
"signal::drag-data-received", passive_canvas_drag_data_received, NULL,
NULL);
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
contents,
GTK_DEST_DEFAULT_ALL,
GTK_TOOL_PALETTE_DRAG_ITEMS,
GDK_ACTION_COPY);
contents_scroller = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (contents_scroller),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (contents_scroller),
contents);
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
contents_scroller,
gtk_label_new ("Passive DnD Mode"));
/* ===== interactive DnD dest ===== */
contents = gtk_drawing_area_new ();
gtk_widget_set_app_paintable (contents, TRUE);
g_object_connect (contents,
"signal::expose-event", canvas_expose_event, NULL,
"signal::drag-motion", interactive_canvas_drag_motion, NULL,
"signal::drag-data-received", interactive_canvas_drag_data_received, NULL,
"signal::drag-leave", interactive_canvas_drag_leave, NULL,
"signal::drag-drop", interactive_canvas_drag_drop, NULL,
NULL);
gtk_tool_palette_add_drag_dest (GTK_TOOL_PALETTE (palette),
contents,
GTK_DEST_DEFAULT_HIGHLIGHT,
GTK_TOOL_PALETTE_DRAG_ITEMS,
GDK_ACTION_COPY);
contents_scroller = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (contents_scroller),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (contents_scroller),
contents);
gtk_container_set_border_width (GTK_CONTAINER (contents_scroller), 6);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), contents_scroller,
gtk_label_new ("Interactive DnD Mode"));
}
if (!GTK_WIDGET_VISIBLE (window))
{
gtk_widget_show_all (window);
}
else
{
gtk_widget_destroy (window);
window = NULL;
}
return window;
}
static void
load_stock_items (GtkToolPalette *palette)
{
GtkWidget *group_af = gtk_tool_item_group_new ("Stock Icons (A-F)");
GtkWidget *group_gn = gtk_tool_item_group_new ("Stock Icons (G-N)");
GtkWidget *group_or = gtk_tool_item_group_new ("Stock Icons (O-R)");
GtkWidget *group_sz = gtk_tool_item_group_new ("Stock Icons (S-Z)");
GtkWidget *group = NULL;
GtkToolItem *item;
GSList *stock_ids;
GSList *iter;
stock_ids = gtk_stock_list_ids ();
stock_ids = g_slist_sort (stock_ids, (GCompareFunc) strcmp);
gtk_container_add (GTK_CONTAINER (palette), group_af);
gtk_container_add (GTK_CONTAINER (palette), group_gn);
gtk_container_add (GTK_CONTAINER (palette), group_or);
gtk_container_add (GTK_CONTAINER (palette), group_sz);
for (iter = stock_ids; iter; iter = g_slist_next (iter))
{
GtkStockItem stock_item;
gchar *id = iter->data;
switch (id[4])
{
case 'a':
group = group_af;
break;
case 'g':
group = group_gn;
break;
case 'o':
group = group_or;
break;
case 's':
group = group_sz;
break;
}
item = gtk_tool_button_new_from_stock (id);
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item), id);
gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
if (!gtk_stock_lookup (id, &stock_item) || !stock_item.label)
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), id);
g_free (id);
}
g_slist_free (stock_ids);
}
static void
load_toggle_items (GtkToolPalette *palette)
{
GSList *toggle_group = NULL;
GtkToolItem *item;
GtkWidget *group;
char *label;
int i;
group = gtk_tool_item_group_new ("Radio Item");
gtk_container_add (GTK_CONTAINER (palette), group);
for (i = 1; i <= 10; ++i)
{
label = g_strdup_printf ("#%d", i);
item = gtk_radio_tool_button_new (toggle_group);
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), label);
g_free (label);
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
toggle_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item));
}
}
static GtkToolItem *
create_entry_item (const char *text)
{
GtkToolItem *item;
GtkWidget *entry;
entry = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), text);
gtk_entry_set_width_chars (GTK_ENTRY (entry), 5);
item = gtk_tool_item_new ();
gtk_container_add (GTK_CONTAINER (item), entry);
return item;
}
static void
load_special_items (GtkToolPalette *palette)
{
GtkToolItem *item;
GtkWidget *group;
GtkWidget *label_button;
group = gtk_tool_item_group_new (NULL);
label_button = gtk_button_new_with_label ("Advanced Features");
gtk_widget_show (label_button);
gtk_tool_item_group_set_label_widget (GTK_TOOL_ITEM_GROUP (group),
label_button);
gtk_container_add (GTK_CONTAINER (palette), group);
item = create_entry_item ("homogeneous=FALSE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, NULL);
item = create_entry_item ("homogeneous=FALSE, expand=TRUE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, "expand", TRUE,
NULL);
item = create_entry_item ("homogeneous=FALSE, expand=TRUE, fill=FALSE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, "expand", TRUE,
"fill", FALSE, NULL);
item = create_entry_item ("homogeneous=FALSE, expand=TRUE, new-row=TRUE");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE, "expand", TRUE,
"new-row", TRUE, NULL);
item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_UP);
gtk_tool_item_set_tooltip_text (item, "Show on vertical palettes only");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_tool_item_set_visible_horizontal (item, FALSE);
item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
gtk_tool_item_set_tooltip_text (item, "Show on horizontal palettes only");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_tool_item_set_visible_vertical (item, FALSE);
item = gtk_tool_button_new_from_stock (GTK_STOCK_DELETE);
gtk_tool_item_set_tooltip_text (item, "Do not show at all");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_widget_set_no_show_all (GTK_WIDGET (item), TRUE);
item = gtk_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);
gtk_tool_item_set_tooltip_text (item, "Expanded this item");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
"homogeneous", FALSE,
"expand", TRUE,
NULL);
item = gtk_tool_button_new_from_stock (GTK_STOCK_HELP);
gtk_tool_item_set_tooltip_text (item, "A regular item");
gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
}

View File

@@ -189,7 +189,6 @@ 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

View File

@@ -1,159 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
#define ICC_PROFILE "/usr/share/color/icc/bluish.icc"
#define ICC_PROFILE_SIZE 3966
static gboolean
save_image_png (const gchar *filename, GdkPixbuf *pixbuf, GError **error)
{
gchar *contents = NULL;
gchar *contents_encode = NULL;
gsize length;
gboolean ret;
gint len;
/* get icc file */
ret = g_file_get_contents (ICC_PROFILE, &contents, &length, error);
if (!ret)
goto out;
contents_encode = g_base64_encode ((const guchar *) contents, length);
ret = gdk_pixbuf_save (pixbuf, filename, "png", error,
"tEXt::Software", "Hello my name is dave",
"icc-profile", contents_encode,
NULL);
len = strlen (contents_encode);
g_debug ("ICC profile was %i bytes", len);
out:
g_free (contents);
g_free (contents_encode);
return ret;
}
static gboolean
save_image_tiff (const gchar *filename, GdkPixbuf *pixbuf, GError **error)
{
gchar *contents = NULL;
gchar *contents_encode = NULL;
gsize length;
gboolean ret;
gint len;
/* get icc file */
ret = g_file_get_contents (ICC_PROFILE, &contents, &length, error);
if (!ret)
goto out;
contents_encode = g_base64_encode ((const guchar *) contents, length);
ret = gdk_pixbuf_save (pixbuf, filename, "tiff", error,
"icc-profile", contents_encode,
NULL);
len = strlen (contents_encode);
g_debug ("ICC profile was %i bytes", len);
out:
g_free (contents);
g_free (contents_encode);
return ret;
}
static gboolean
save_image_verify (const gchar *filename, GError **error)
{
gboolean ret = FALSE;
GdkPixbuf *pixbuf = NULL;
const gchar *option;
gchar *icc_profile = NULL;
gsize len = 0;
/* load */
pixbuf = gdk_pixbuf_new_from_file (filename, error);
if (pixbuf == NULL)
goto out;
/* check values */
option = gdk_pixbuf_get_option (pixbuf, "icc-profile");
if (option == NULL) {
*error = g_error_new (1, 0, "no profile set");
goto out;
}
/* decode base64 */
icc_profile = (gchar *) g_base64_decode (option, &len);
if (len != ICC_PROFILE_SIZE) {
*error = g_error_new (1, 0, "profile length invalid, got %i", len);
g_file_set_contents ("error.icc", icc_profile, len, NULL);
goto out;
}
/* success */
ret = TRUE;
out:
if (pixbuf != NULL)
g_object_unref (pixbuf);
g_free (icc_profile);
return ret;
}
int
main (int argc, char **argv)
{
GdkWindow *root;
GdkPixbuf *pixbuf;
gboolean ret;
gint retval = 1;
GError *error = NULL;
gtk_init (&argc, &argv);
gtk_widget_set_default_colormap (gdk_rgb_get_colormap ());
root = gdk_get_default_root_window ();
pixbuf = gdk_pixbuf_get_from_drawable (NULL, root, NULL,
0, 0, 0, 0, 150, 160);
/* PASS */
g_debug ("try to save PNG with a profile");
ret = save_image_png ("icc-profile.png", pixbuf, &error);
if (!ret) {
g_warning ("FAILED: did not save image: %s", error->message);
g_error_free (error);
goto out;
}
/* PASS */
g_debug ("try to save TIFF with a profile");
ret = save_image_tiff ("icc-profile.tiff", pixbuf, &error);
if (!ret) {
g_warning ("FAILED: did not save image: %s", error->message);
g_error_free (error);
goto out;
}
/* PASS */
g_debug ("try to load PNG and get color attributes");
ret = save_image_verify ("icc-profile.png", &error);
if (!ret) {
g_warning ("FAILED: did not load image: %s", error->message);
g_error_free (error);
goto out;
}
/* PASS */
g_debug ("try to load TIFF and get color attributes");
ret = save_image_verify ("icc-profile.tiff", &error);
if (!ret) {
g_warning ("FAILED: did not load image: %s", error->message);
g_error_free (error);
goto out;
}
/* success */
retval = 0;
g_debug ("ALL OKAY!");
out:
return retval;
}

View File

@@ -72,7 +72,7 @@ save_to_loader (const gchar *buf, gsize count, GError **err, gpointer data)
{
GdkPixbufLoader *loader = data;
return gdk_pixbuf_loader_write (loader, (const guchar *)buf, count, err);
return gdk_pixbuf_loader_write (loader, buf, count, err);
}
static GdkPixbuf *
@@ -82,7 +82,7 @@ buffer_to_pixbuf (const gchar *buf, gsize count, GError **err)
GdkPixbuf *pixbuf;
loader = gdk_pixbuf_loader_new ();
if (gdk_pixbuf_loader_write (loader, (const guchar *)buf, count, err) &&
if (gdk_pixbuf_loader_write (loader, buf, count, err) &&
gdk_pixbuf_loader_close (loader, err)) {
pixbuf = g_object_ref (gdk_pixbuf_loader_get_pixbuf (loader));
g_object_unref (loader);

View File

@@ -19,5 +19,3 @@ EXTRA_DIST += \
generation.txt \
gtkdocs_fix \
RELEASE-HOWTO
-include $(top_srcdir)/git.mk

View File

@@ -9,19 +9,17 @@ dependencies:
Without those packages make distcheck will *not* pass.
0) Go back to a pristine working directory. With git, this works:
0) Blow away your gtk+ directory, check a new version out
git clean -f -x
1) autogen and build it, make sure to enable docs by specifying
1) autogen and build it, make sure to enable docs by specifying
--enable-gtk-doc --enable-man
2) Update NEWS based on the content of git log; follow the format
2) Update NEWS based on the various ChangeLog files; 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.
@@ -31,14 +29,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
@@ -50,58 +48,57 @@ 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) make distcheck
7) Add === Released 2.x.y === at the top of all ChangeLog files
8) Fix broken stuff found by 7), repeat
8) make distcheck
9) Commit all changes: git commit -a. You will have a bunch of po file
changes, NEWS and maybe some doc changes too
9) Fix broken stuff found by 8), repeat
10) Now you've got the tarball. Check that the tarball size looks
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
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.
11) Tag the release. The git command for doing that looks like
13) Tag the release. The command for doing that looks like
git tag -m "GTK+ 2.12.10" 2.12.10
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
12) Push the tagged commit upstream. The git command for doing that is
14) Bump the version number in configure.in and commit this change
with a ChangeLog entry
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
15) 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
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.
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
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.

View File

@@ -48,6 +48,15 @@ Events that are assured to have a valid GdkEvent.any.window field are
GDK_EXPOSE GtkWidget::expose_event
gtk_widget_ref() vs. gtk_object_ref()
-------------------------------------
The widget referencing functions gtk_widget_ref() and gtk_widget_unref()
are currently just wrappers about the corresponding referencing functions
for objects. Still you should use the widget referencing functions if you
are sure the referenced object is of type GTK_WIDGET_TYPE.
Writing Gdk functions
---------------------

View File

@@ -62,6 +62,8 @@ used by anything other than the DND code in GTK+.
/* Drag and Drop */
GdkDragContext * gdk_drag_context_new (void);
void gdk_drag_context_ref (GdkDragContext *context);
void gdk_drag_context_unref (GdkDragContext *context);
These create and refcount GdkDragContexts in a
straightforward manner.

View File

@@ -38,5 +38,3 @@ dist-hook:
endif
.PHONY: html
-include $(top_srcdir)/git.mk

View File

@@ -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://library.gnome.org/devel/gtk-tutorial/stable/">
http://library.gnome.org/devel/gtk-tutorial/stable/</ulink>, which is undergoing
url="http://www.gtk.org/tutorial/">
http://www.gtk.org/tutorial/</ulink>, which is undergoing
development. This will introduce you to writing applications
using C.</para>
@@ -2108,10 +2108,10 @@ not.</para>
snippet:</para>
<programlisting role="C">
g_object_ref(widget);
gtk_widget_ref(widget);
gtk_container_remove(GTK_CONTAINER(old_parent), widget);
gtk_container_add(GTK_CONTAINER(new_parent), widget);
g_object_unref(widget);
gtk_widget_unref(widget);
</programlisting>
</sect1>
@@ -2307,8 +2307,8 @@ used, as in:</para>
NULL, gtk_widget_get_colormap(top),
&amp;pixmap_mask, NULL, pixfile);
pixw = gtk_pixmap_new (pixmap, pixmap_mask);
g_object_unref (pixmap);
g_object_unref (pixmap_mask);
gdk_pixmap_unref (pixmap);
gdk_pixmap_unref (pixmap_mask);
</programlisting>
</sect1>

View File

@@ -250,12 +250,12 @@ Example code sequences that require reference wraps:
/* gtk_container_remove() will unparent the child and therefore
* cause its reference count to be decremented by one.
*/
g_object_ref (widget);
gtk_widget_ref (widget);
gtk_container_remove (container, widget);
/* without the reference count, the widget would have been destroyed here.
*/
gtk_container_add (container, widget);
g_object_unref (widget);
gtk_widget_unref (widget);
/* all items in item_list need to be referenced
@@ -267,7 +267,7 @@ Example code sequences that require reference wraps:
slist = NULL;
for (list = item_list; list; list = list->next)
{
g_object_ref (GTK_WIDGET (list->data));
gtk_widget_ref (GTK_WIDGET (list->data));
slist = g_slist_prepend (slist, list->data);
}
gtk_list_remove_items (list, item_list);
@@ -280,7 +280,7 @@ Example code sequences that require reference wraps:
tmp = slist;
slist = slist->next;
g_object_unref (GTK_WIDGET (tmp->data));
gtk_widget_unref (GTK_WIDGET (tmp->data));
g_slist_free_1 (tmp);
}

View File

@@ -1,428 +1,28 @@
=== ChangeLog discontinued ===
2009-01-07 Matthias Clasen <mclasen@redhat.com>
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.
* === Released 2.14.7 ===
2009-03-25 Paul Bolle <pebolle@tiscali.nl>
2008-12-15 Matthias Clasen <mclasen@redhat.com>
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 ===
2009-03-02 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Rename gtk_style_get_property to
gtk_style_get_style_property
2009-03-02 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.5 ===
2009-03-01 Matthias Clasen <mclasen@redhat.com>
Bug 573393 Deprecated functions in gdk-Threads example code snippet
* gdk/tmpl/threads.sgml: Don't use deprecated GTK+ api.
Spotted by Andre Klapper
2009-03-01 Matthias Clasen <mclasen@redhat.com>
* gtk/images/messagedialog.png: Fix this image
* gtk/images/aboutdialog.png: New image
* gtk/Makefile.am: Add it here.
* gtk/visual_index.xml: And here.
2009-02-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_window_get_default_icon_name
2009-02-17 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.4 ===
2009-02-06 Stefan Kost <ensonic@users.sf.net>
* gdk-pixbuf/gdk-pixbuf.sgml:
* gdk/gdk-docs.sgml:
* gtk/gtk-docs.sgml:
* libgail-util/gail-libgail-util-docs.sgml:
Add online urls for library.gnome.org. This allows other docs to do
gtkdoc-rebase --online --html-dir=html
before publishing docs and have working xrefs.
Whitespece cleanup for gdk/gdk-docs.sgml.
2009-02-02 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.3 ===
2009-01-27 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.2 ===
2009-01-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new image menu item api
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.1 ===
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add GtkActivatableIface, too
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new GtkActivatable API
* gtk/gtk-docs.sgml: Include GtkActivatable section
* gtk.types: Add gtk_activatable_get_type
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Additions
2009-01-23 Matthias Clasen <mclasen@redhat.com>
* gdk/tmpl/properties.sgml: Typo fix
2009-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new GtkAction api
2009-01-20 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new scale api
2009-01-19 Matthias Clasen <mclasen@redhat.com>
* gdk/tmpl/cursors.sgml: Document GDK_BLANK_CURSOR.
2009-01-18 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new api
2009-01-13 Christian Dywan <christian@imendio.com>
Bug 567569 Typo in GtkFileChooser example in GTK+ documentation
* gtk/tmpl/gtkfilechooser.sgml: s/gobject_unref/g_object_unref.
Patch by Priyank Gosalia.
2009-01-05 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkstock.sgml: Add GTK_STOCK_CAPS_LOCK_WARNING
* gtk/Makefile.am: And copy the icon
2009-01-04 Matthias Clasen <mclasen@redhat.com>
Bug 566045 GtkViewport is lacking a description
* gtk/tmpl/gtkviewport.sgml: Add some descriptive text, shamelessly
copied from gtkscrolledwindow.sgml. Requested by Andrew Cowie.
2009-01-01 Matthias Clasen <mclasen@redhat.com>
* === Released 2.15.0 ===
2008-12-31 Matthias Clasen <mclasen@redhat.com>
* gtk/migrating-GtkEntry-icons.sgml: Add a section about
signals.
* gtk/tmpl/gtkentry.sgml: Update to new signal names
2008-12-30 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkorientable.sgml:
* gtk/tmpl/gtkvscrollbar.sgml:
* gtk/tmpl/gtkhsv.sgml: Add short/long description.
2008-12-30 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkwidget.sgml:
* gtk/tmpl/gtkprintoperation.sgml: Additions
* gtk/tmpl/gtkprintunixdialog.sgml: Document the preview
capability.
2008-12-29 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtktreeview.sgml: Document GtkTreeViewGridLines
2008-12-29 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkprintsettings.sgml: Document NumberUpLayout
* gtk/images/layout-*.png: n-up page layout images
* gtk/Makefile.am: Glue
2008-12-29 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkenums.sgml:
* gtk/tmpl/gtkmain.sgml:
* gtk/tmpl/gtktypeutils.sgml: Additions
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkprintunixdialog.sgml: Document capabilities
* gtk/tmpl/gtkstyle.sgml: Document GtkBorder
* gtk/tmpl/gtkmenubar.sgml: Document GtkPackDirection
* gtk/tmpl/gtkenums.sgml: Document GtkArrowPlacement
* gtk/tmpl/gtkbuilder.sgml: Document GtkBuilderError
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Remove duplicate vscrollbar section.
Merge accident ?
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtktreesortable.sgml: Small addition
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Move GtkFixedChild, GtkTableChild and
GtkTableRowCol to Private
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkfontseldlg.sgml: Merge docs inline.
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/building.sgml: It's <envar>, not <envvar>
* gtk/gtk-sections.txt: Remove duplicates, pick up misc new api
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkscrolledwindow.sgml:
* gtk/tmpl/gtkscale.sgml: Merge docs inline.
2008-12-28 Matthias Clasen <mclasen@redhat.com>
* docs/reference/gtk/gtk-sections.txt: Remove overridden INCLUDE
* gtk/tmpl/gtkfontsel.sgml:
* gtk/tmpl/gtkeditable.sgml: Merge docs inline.
2008-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkmessagedialog.sgml:
* gtk/tmpl/gtkmenushell.sgml:
* gtk/tmpl/gtklinkbutton.sgml:
* gtk/tmpl/gtkimage.sgml: Additions
* gtk/gtk-sections.txt:
* gtk/gtk-docs.sgml: Add GtkHSV
* gtk/Makefile.am: Don't ignore gtkhsv.h
2008-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Remove nonexisting api
* gtk/migrating-GtkEntry-icons.sgml: Formatting fixes
2008-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/Makefile.am: Add migrating-GtkEntry-icons.sgml to
content_files and expand_content_files.
2008-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/migrating-GtkLinkButton.sgml: Mention default hook
* gtk/migrating-GtkEntry-icons.sgml: Migration chapter
SexyIconEntry -> GtkEntry
2008-12-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add GtkEntryIconPosition
* gtk/tmpl/gtkentry.sgml: Add note about a11y concerns.
2008-12-26 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkentry.sgml: Mention new functionality
* gtk/gtk-sections.txt: Add new api
2008-12-26 Matthias Clasen <mclasen@redhat.com>
* gtk/migrating-GtkBuilder.xml: Update
2008-12-26 Matthias Clasen <mclasen@redhat.com>
* gtk/drawing-model.sgml: Turn into a refentry to fit better in
the overall formatting.
2008-12-25 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-docs.sgml: Add a "Since 2.16" index
* === Released 2.14.6 ===
2008-12-10 Matthias Clasen <mclasen@redhat.com>
Bug 563876 [Regression] GTK_MODULES env var is no longer relevant
Bug 563876 [Regression] GTK_MODULES env var is no longer relevant
* gtk/running.sgml: Improve GTK_MODULES docs.
* gtk/running.sgml: Improve GTK_MODULES docs.
2008-12-07 Matthias Clasen <mclasen@redhat.com>
2008-11-24 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkcontainer.sgml: Document translatable child
properties in GtkBuilder
* === Released 2.14.5 ===
2008-11-29 Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>
2008-10-16 Matthias Clasen <mclasen@redhat.com>
* docs/reference/gtk/images/accel-label.png:
* docs/reference/gtk/images/assistant.png:
* docs/reference/gtk/images/button.png:
* docs/reference/gtk/images/check-button.png:
* docs/reference/gtk/images/color-button.png:
* docs/reference/gtk/images/colorsel.png:
* docs/reference/gtk/images/combo-box-entry.png:
* docs/reference/gtk/images/combo-box.png:
* docs/reference/gtk/images/entry.png:
* docs/reference/gtk/images/file-button.png:
* docs/reference/gtk/images/filechooser.png:
* docs/reference/gtk/images/font-button.png:
* docs/reference/gtk/images/fontsel.png:
* docs/reference/gtk/images/frame.png:
* docs/reference/gtk/images/icon-view.png:
* docs/reference/gtk/images/image.png:
* docs/reference/gtk/images/label.png
* docs/reference/gtk/images/link-button.png:
* docs/reference/gtk/images/list-and-tree.png:
* docs/reference/gtk/images/menubar.png:
* docs/reference/gtk/images/messagedialog.png:
* docs/reference/gtk/images/multiline-text.png:
* docs/reference/gtk/images/notebook.png:
* docs/reference/gtk/images/pagesetupdialog.png:
* docs/reference/gtk/images/panes.png:
* docs/reference/gtk/images/printdialog.png:
* docs/reference/gtk/images/progressbar.png:
* docs/reference/gtk/images/radio-group.png:
* docs/reference/gtk/images/recentchooserdialog.png:
* docs/reference/gtk/images/scales.png:
* docs/reference/gtk/images/scrolledwindow.png:
* docs/reference/gtk/images/separator.png:
* docs/reference/gtk/images/spinbutton.png:
* docs/reference/gtk/images/statusbar.png:
* docs/reference/gtk/images/toggle-button.png:
* docs/reference/gtk/images/toolbar.png:
* docs/reference/gtk/images/volumebutton.png:
* docs/reference/gtk/images/window.png:
update all screenshots to have a consistent look.
Closes the bug 523264.
* === Released 2.14.4 ====
2008-11-29 Matthias Clasen <mclasen@redhat.com>
2008-09-23 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtktooltips.sgml:
* gtk/tmpl/gtkoptionmenu.sgml:
* gtk/tmpl/gtkcombo.sgml:
* gtk/tmpl/gtkwindow.sgml:
* gtk/tmpl/gtkwidget.sgml:
* gtk/tmpl/gtktogglebutton.sgml:
* gtk/tmpl/gtkstyle.sgml:
* gtk/tmpl/gtkspinbutton.sgml:
* gtk/tmpl/gtkrc.sgml:
* gtk/tmpl/gtknotebook.sgml:
* gtk/tmpl/gtklabel.sgml:
* gtk/tmpl/gtkdrawingarea.sgml:
* gtk/tmpl/gtkcheckmenuitem.sgml:
* gtk/tmpl/gtkcalendar.sgml:
* gtk/tmpl/gtkbbox.sgml: Improve deprecation annotations.
2008-11-21 Matthias Clasen <mclasen@redhat.com>
* gtk/Makefile.am:
* gdk/Makefile.am:
* gdk-pixbuf/Makefile.am: Use a new gtk-doc feature to generate
much nicer indices.
* gtk/drawing-model.xml: Fix document structure
2008-11-25 Christian Dywan <christian@imendio.com>
Bug 559009 gtk_radio_button_get_group documentation needs
to say whether to free the returned GSList
* gtk/tmpl/gtkradiobutton.sgml: Clarify radio_button_get_group docs
2008-11-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new statusicon api.
2008-11-01 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add new GtkStyle functions.
2008-10-29 Federico Mena Quintero <federico@novell.com>
* gtk/drawing-model.xml: New chapter for "The GTK+ Drawing Model".
* gtk/Makefile.am (content_files): Add drawing-model.xml.
(HTML_IMAGES): Add a the images for that new chapter.
* gtk/tmpl/gtkwidget.sgml: Link to the drawing model docs from the
descriptions of GTK_APP_PAINTABLE and GTK_DOUBLE_BUFFERED.
* gtk/glossary.xml: Link to the drawing model docs on no-window
widgets.
2008-10-27 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt:
* gtk/gtk-docs.sgml:
* gtk/gtk.types: Add GtkOrientable
2008-10-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk.types: Add gtk_mount_operation_get_type
2008-10-09 Michael Natterer <mitch@imendio.com>
Bug 516425 Optionally display accelerators in popups
* gtk/tmpl/gtkuimanager.sgml: document the enhanced XML syntax and
the new enum value for popups with accelerators.
2008-10-07 Michael Natterer <mitch@imendio.com>
* gtk/gtk-sections.txt: add gtk_box_new.
2008-10-02 Michael Natterer <mitch@imendio.com>
* gtk/gtk-sections.txt: add gtk_ruler_new.
2008-09-30 Michael Natterer <mitch@imendio.com>
* gtk/gtk-sections.txt: add gtk_separator_new.
2008-09-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_im_multi_context_get_context_id.
2008-09-29 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add gdk_keymap_get_caps_locks_state.
* === Released 2.14.3 ===
2008-09-17 Matthias Clasen <mclasen@redhat.com>

View File

@@ -3,6 +3,3 @@ include $(top_srcdir)/Makefile.decl
SUBDIRS = gdk-pixbuf gdk gtk libgail-util
GITIGNOREFILES = */*.1
-include $(top_srcdir)/git.mk

View File

@@ -47,7 +47,7 @@ GTKDOC_LIBS = \
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--main-sgml-file=$(DOC_MAIN_SGML_FILE) --sgml-mode --source-dir=../../../contrib/gdk-pixbuf-xlib --output-format=xml --name-space=gdk_pixbuf
MKDB_OPTIONS=--main-sgml-file=$(DOC_MAIN_SGML_FILE) --sgml-mode --source-dir=../../../contrib/gdk-pixbuf-xlib --output-format=xml
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
content_files = \
@@ -79,21 +79,19 @@ EXTRA_DIST += version.xml.in \
########################################################################
if ENABLE_MAN
man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1
if ENABLE_MAN
%.1 : %.xml
@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
BUILT_EXTRA_DIST = $(man_MANS)
endif
BUILT_EXTRA_DIST = $(man_MANS)
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

View File

@@ -0,0 +1,118 @@
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "GDK-PIXBUF-CSOURCE" 1 "" "" ""
.SH NAME
gdk-pixbuf-csource \- C code generation utility for GdkPixbuf images
.SH "SYNOPSIS"
.ad l
.hy 0
.HP 19
\fBgdk\-pixbuf\-csource\fR [options] [image]
.ad
.hy
.ad l
.hy 0
.HP 19
\fBgdk\-pixbuf\-csource\fR [options] \-\-build\-list [[name]\ [image]...]
.ad
.hy
.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"
.TP
\fB\-\-stream\fR
Generate pixbuf data stream (a single string containing a serialized GdkPixdata structure in network byte order)\&.
.TP
\fB\-\-struct\fR
Generate GdkPixdata structure (needs the GdkPixdata structure definition from \fIgdk\-pixdata\&.h\fR)\&.
.TP
\fB\-\-macros\fR
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and *_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image\&.
.TP
\fB\-\-rle\fR
Enables run\-length encoding for the generated pixel data (default)\&.
.TP
\fB\-\-raw\fR
Disables run\-length encoding for the generated pixel data\&.
.TP
\fB\-\-extern\fR
Generate extern symbols\&.
.TP
\fB\-\-static\fR
Generate static symbols (default)\&.
.TP
\fB\-\-decoder\fR
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition to decode run\-length encoded image data\&.
.TP
\fB\-\-name=identifier\fR
Specifies the identifier name (prefix) for the generated variables or macros (useful only if \fB\-\-build\-list\fR was not specified)\&.
.TP
\fB\-\-build\-list\fR
Enables (\fIname\fR, \fIimage\fR) pair parsing mode\&.
.TP
\fB\-h\fR, \fB\-\-help\fR
Print brief help and exit\&.
.TP
\fB\-v\fR, \fB\-\-version\fR
Print version and exit\&.
.TP
\fB\-\-g\-fatal\-warnings\fR
Make warnings fatal (causes the program to abort)\&.
.SH "SEE ALSO"
.PP
The GdkPixbuf documentation, shipped with the Gtk+ distribution, available from www\&.gtk\&.org: \fIhttp://www.gtk.org\fR\&.
.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>\&.

View File

@@ -0,0 +1,49 @@
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "GDK-PIXBUF-QUERY" 1 "" "" ""
.SH NAME
gdk-pixbuf-query-loaders \- GdkPixbuf loader registration utility
.SH "SYNOPSIS"
.nf
\fBgdk-pixbuf-query-loaders\fR [module...]
.fi
.SH "DESCRIPTION"
.PP
\fBgdk-pixbuf-query-loaders\fR collects information about loadable modules for gdk-pixbuf and writes it to \fIstdout\fR\&.
.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 \fI\fIlibdir\fR/gtk-2\&.0/\fIversion\fR/loaders\fR\&.
.SH "BUGS"
.PP
None known yet\&.

View File

@@ -136,8 +136,6 @@ 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

View File

@@ -9,12 +9,8 @@
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GDK-PixBuf Reference Manual</title>
<releaseinfo>
Version &version;
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://library.gnome.org/devel/gdk-pixbuf/unstable/">http://library.gnome.org/devel/gdk-pixbuf/unstable/</ulink>.
</releaseinfo>
<title>The &gdk-pixbuf; Library</title>
<releaseinfo>Version &version;</releaseinfo>
<authorgroup>
<author>
<firstname>Federico</firstname>
@@ -127,15 +123,16 @@
<index id="api-index-2-4" role="2.4">
<title>Index of new symbols in 2.4</title>
<xi:include href="xml/api-index-2.4.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-6" role="2.6">
<title>Index of new symbols in 2.6</title>
<xi:include href="xml/api-index-2.6.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-8" role="2.8">
<title>Index of new symbols in 2.8</title>
<xi:include href="xml/api-index-2.8.xml"><xi:fallback /></xi:include>
</index>
<!-- -->
<index id="api-index-2-10" role="2.10">
<title>Index of new symbols in 2.10</title>
<xi:include href="xml/api-index-2.10.xml"><xi:fallback /></xi:include>
@@ -143,11 +140,12 @@
<index id="api-index-2-12" role="2.12">
<title>Index of new symbols in 2.12</title>
<xi:include href="xml/api-index-2.12.xml"><xi:fallback /></xi:include>
</index>
</index>
<!-- -->
<index id="api-index-2-14" role="2.14">
<title>Index of new symbols in 2.14</title>
<xi:include href="xml/api-index-2.14.xml"><xi:fallback /></xi:include>
</index>
</index>
<xi:include href="porting-from-imlib.sgml" />

View File

@@ -4,5 +4,3 @@ gdk_pixbuf_get_type
gdk_pixbuf_loader_get_type
gdk_pixbuf_animation_get_type
gdk_pixbuf_animation_iter_get_type
gdk_pixbuf_simple_anim_get_type

View File

@@ -25,13 +25,13 @@ Animated images.
<!-- ##### STRUCT GdkPixbufAnimation ##### -->
<para>
An opaque struct representing an animation.
And opaque struct representing an animation.
</para>
<!-- ##### STRUCT GdkPixbufAnimationIter ##### -->
<para>
An opaque struct representing an iterator which points to a
And 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 opaque struct representing a simple animation.
An
</para>
@@ -172,21 +172,3 @@ An opaque struct representing a simple animation.
@pixbuf:
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_set_loop ##### -->
<para>
</para>
@animation:
@loop:
<!-- ##### FUNCTION gdk_pixbuf_simple_anim_get_loop ##### -->
<para>
</para>
@animation:
@Returns:

View File

@@ -52,7 +52,7 @@ GTKDOC_LIBS = $(top_builddir)/gdk/$(gdktargetlib)
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=gdk
MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra SGML files that are included by DOC_MAIN_SGML_FILE
content_files = \
@@ -152,5 +152,3 @@ include $(top_srcdir)/gtk-doc.make
# Other files to distribute
EXTRA_DIST += version.xml.in
-include $(top_srcdir)/git.mk

View File

@@ -7,11 +7,7 @@
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GDK Reference Manual</title>
<releaseinfo>
for GDK &version;
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://library.gnome.org/devel/gdk/unstable/">http://library.gnome.org/devel/gdk/unstable/</ulink>.
</releaseinfo>
<releaseinfo>for GDK &version;</releaseinfo>
</bookinfo>
<reference id="reference">
@@ -79,33 +75,25 @@
<index id="api-index-2-4" role="2.4">
<title>Index of new symbols in 2.4</title>
<xi:include href="xml/api-index-2.4.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-6" role="2.6">
<title>Index of new symbols in 2.6</title>
<xi:include href="xml/api-index-2.6.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-8" role="2.8">
<title>Index of new symbols in 2.8</title>
<xi:include href="xml/api-index-2.8.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-10" role="2.10">
<title>Index of new symbols in 2.10</title>
<xi:include href="xml/api-index-2.10.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-12" role="2.12">
<title>Index of new symbols in 2.12</title>
<xi:include href="xml/api-index-2.12.xml"><xi:fallback /></xi:include>
</index>
</index>
<index id="api-index-2-14" role="2.14">
<title>Index of new symbols in 2.14</title>
<xi:include href="xml/api-index-2.14.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-2-16" role="2.16">
<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>

View File

@@ -640,7 +640,6 @@ gdk_window_at_pointer
gdk_window_show
gdk_window_show_unraised
gdk_window_hide
gdk_window_is_destroyed
gdk_window_is_visible
gdk_window_is_viewable
gdk_window_get_state
@@ -662,8 +661,6 @@ gdk_window_resize
gdk_window_move_resize
gdk_window_scroll
gdk_window_move_region
gdk_window_flush
gdk_window_ensure_native
gdk_window_reparent
gdk_window_clear
gdk_window_clear_area
@@ -671,7 +668,6 @@ gdk_window_clear_area_e
gdk_window_copy_area
gdk_window_raise
gdk_window_lower
gdk_window_restack
gdk_window_focus
gdk_window_register_dnd
gdk_window_begin_resize_drag
@@ -723,7 +719,6 @@ gdk_window_set_background
gdk_window_set_back_pixmap
GDK_PARENT_RELATIVE
gdk_window_set_cursor
gdk_window_get_cursor
gdk_window_set_colormap
gdk_window_get_user_data
gdk_window_get_geometry
@@ -744,7 +739,6 @@ gdk_window_get_colormap
gdk_window_get_type
gdk_window_get_origin
gdk_window_get_deskrelative_origin
gdk_window_get_root_coords
gdk_window_get_pointer
GdkModifierType
gdk_window_get_parent
@@ -773,10 +767,6 @@ GdkPointerHooks
gdk_set_pointer_hooks
<SUBSECTION>
gdk_offscreen_window_get_pixmap
gdk_offscreen_window_set_embedder
gdk_offscreen_window_get_embedder
gdk_window_geometry_changed
gdk_window_redirect_to_drawable
gdk_window_remove_redirection
@@ -915,7 +905,6 @@ gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_pixmap
gdk_cairo_rectangle
gdk_cairo_region
gdk_cairo_reset_clip
</SECTION>
<SECTION>
@@ -942,7 +931,6 @@ gdk_region_get_clipbox
gdk_region_get_rectangles
gdk_region_empty
gdk_region_equal
gdk_region_rect_equal
gdk_region_point_in
gdk_region_rect_in
GdkOverlapType
@@ -1004,8 +992,6 @@ gdk_keymap_get_entries_for_keyval
gdk_keymap_get_entries_for_keycode
gdk_keymap_get_direction
gdk_keymap_have_bidi_layouts
gdk_keymap_get_caps_lock_state
gdk_keymap_map_virtual_modifiers
<SUBSECTION>
gdk_keyval_name

View File

@@ -85,12 +85,3 @@ Cairo paths and to use pixbufs as sources for drawing operations.
@region:
<!-- ##### FUNCTION gdk_cairo_reset_clip ##### -->
<para>
</para>
@cr:
@drawable:

View File

@@ -121,9 +121,8 @@ The standard cursors available.
@GDK_WATCH: <inlinegraphic format="PNG" fileref="watch.png"></inlinegraphic>
@GDK_XTERM: <inlinegraphic format="PNG" fileref="xterm.png"></inlinegraphic>
@GDK_LAST_CURSOR: last cursor type
@GDK_BLANK_CURSOR: Blank cursor. Since 2.16
@GDK_CURSOR_IS_PIXMAP: type of cursors constructed with
gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
gdk_cursor_new_from_pixmap() or gdk_cursor_new_from_pixbuf()
<!-- ##### FUNCTION gdk_cursor_new ##### -->
<para>

View File

@@ -221,7 +221,7 @@ Generated when all or part of a window becomes visible and needs to be
redrawn.
</para>
@type: the type of the event (%GDK_EXPOSE or %GDK_DAMAGE).
@type: the type of the event (%GDK_EXPOSE).
@window: the window which received the event.
@send_event: %TRUE if the event was sent explicitly (e.g. using
<function>XSendEvent</function>).

View File

@@ -94,7 +94,6 @@ for the possible window states
was added in 2.8.
@GDK_DAMAGE: the content of the window has been changed. This event type
was added in 2.14.
@GDK_EVENT_LAST: marks the end of the GdkEventType enumeration. Added in 2.18
<!-- ##### ENUM GdkEventMask ##### -->
<para>

View File

@@ -2,7 +2,7 @@
Application launching
<!-- ##### SECTION Short_Description ##### -->
Startup notification for applications
startup notification for applications
<!-- ##### SECTION Long_Description ##### -->
<para>
@@ -38,7 +38,7 @@ g_object_unref (context);
<!-- ##### TYPEDEF GdkAppLaunchContext ##### -->
<para>
An opaque structure representing an application launch context.
</para>

View File

@@ -2,7 +2,7 @@
Testing
<!-- ##### SECTION Short_Description ##### -->
Test utilities
test utilities
<!-- ##### SECTION Long_Description ##### -->
<para>

View File

@@ -57,7 +57,12 @@ devices without having to keep track of complicated per-device
settings.
</para>
<para>
Various aspects of each device may be configured.
Various aspects of each device may be configured. The easiest way of
creating a GUI to allow the user to configure such a device
is to use the #GtkInputDialog widget in GTK+.
However, even when using this widget, application writers
will need to directly query and set the configuration parameters
in order to save the state between invocations of the application.
The configuration of devices is queried using gdk_devices_list().
Each device must be activated using gdk_device_set_mode(), which
also controls whether the device's range is mapped to the
@@ -228,11 +233,15 @@ Specifies how an axis of a device is used.
<!-- ##### FUNCTION gdk_device_get_state ##### -->
<para>
Gets the current state of a device.
</para>
@device:
@window:
@axes:
@mask:
@device: a #GdkDevice.
@window: a #GdkWindow.
@axes: an array of doubles to store the values of the axes of @device in,
or %NULL.
@mask: location to store the modifiers, or %NULL.
<!-- ##### FUNCTION gdk_device_get_history ##### -->

View File

@@ -11,15 +11,10 @@ They appear in the <structfield>keyval</structfield> field of the
#GdkEventKey structure, which is passed to signal handlers for the
"key-press-event" and "key-release-event" signals.
The complete list of key values can be found in the <filename>&lt;gdk/gdkkeysyms.h&gt;</filename>
header file. <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> is not included in <filename>&lt;gdk/gdk.h&gt;</filename>,
header file. <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> is not included in <filename>&lt;gtk/gtk.h&gt;</filename>,
it must be included independently, because the file is quite large.
</para>
<para>
Key values are regularly updated from the upstream X.org X11 implementation,
so new values are added regularly. They will be prefixed with GDK_ rather than
XF86XK_ or XK_ (for older symbols).
</para>
<para>
Key values can be converted into a string representation using
gdk_keyval_name(). The reverse function, converting a string to a key value,
is provided by gdk_keyval_from_name().
@@ -113,13 +108,6 @@ in the keymap and see what keyval it corresponds to.
@keymap: the object which received the signal.
<!-- ##### SIGNAL GdkKeymap::state-changed ##### -->
<para>
</para>
@gdkkeymap: the object which received the signal.
<!-- ##### STRUCT GdkKeymapKey ##### -->
<para>
A <structname>GdkKeymapKey</structname> is a hardware key that can
@@ -225,15 +213,6 @@ Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL.
@Returns:
<!-- ##### FUNCTION gdk_keymap_get_caps_lock_state ##### -->
<para>
</para>
@keymap:
@Returns:
<!-- ##### FUNCTION gdk_keyval_name ##### -->
<para>
Converts a key value into a symbolic name.

View File

@@ -77,15 +77,76 @@ for the new pixmap. Can be %NULL, if the depth is given.
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
<para>
Create a pixmap from a XPM file.
</para>
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap.
@mask: a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be %NULL,
in which case transparency will be ignored.
@transparent_color: the color to be used for the pixels
that are transparent in the input file. Can be %NULL,
in which case a default color will be used.
@filename: the filename of a file containing XPM data.
@Returns: the #GdkPixmap
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
<para>
Create a pixmap from a XPM file using a particular colormap.
</para>
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL if @colormap is given.
@colormap: the #GdkColormap that the new pixmap will be use.
If omitted, the colormap for @window will be used.
@mask: a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be %NULL,
in which case transparency will be ignored.
@transparent_color: the color to be used for the pixels
that are transparent in the input file. Can be %NULL,
in which case a default color will be used.
@filename: the filename of a file containing XPM data.
@Returns: the #GdkPixmap.
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
<para>
Create a pixmap from data in XPM format.
</para>
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap.
@mask: Pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be %NULL,
in which case transparency will be ignored.
@transparent_color: This color will be used for the pixels
that are transparent in the input file. Can be %NULL
in which case a default color will be used.
@data: Pointer to a string containing the XPM data.
@Returns: the #GdkPixmap
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
<para>
Create a pixmap from data in XPM format using a particular
colormap.
</para>
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL if @colormap is given.
@colormap: the #GdkColormap that the new pixmap will be use.
If omitted, the colormap for @window will be used.
@mask: a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be %NULL,
in which case transparency will be ignored.
@transparent_color: the color to be used for the pixels
that are transparent in the input file. Can be %NULL,
in which case a default color will be used.
@data: Pointer to a string containing the XPM data.
@Returns: the #GdkPixmap.
<!-- ##### MACRO gdk_pixmap_ref ##### -->

View File

@@ -305,7 +305,7 @@ is provided.
@data: location to store a pointer to the data. The retrieved
data should be freed with g_free() when you are finished
using it.
@Returns: %TRUE if data was successfully received and stored
@Returns: %TRUE if data was sucessfully received and stored
in @data, otherwise %FALSE.

View File

@@ -175,16 +175,6 @@ included in the region, while areas overlapped an even number of times are not.
@Returns:
<!-- ##### FUNCTION gdk_region_rect_equal ##### -->
<para>
</para>
@region:
@rectangle:
@Returns:
<!-- ##### FUNCTION gdk_region_point_in ##### -->
<para>

View File

@@ -212,7 +212,8 @@ int main (int argc, char *argv[])
/* create a window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (window, "destroy", G_CALLBACK (destroy), NULL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (destroy), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);

View File

@@ -8,18 +8,10 @@ Onscreen display areas in the target window system
<para>
A #GdkWindow is a rectangular region on the screen. It's a low-level object,
used to implement high-level objects such as #GtkWidget and #GtkWindow on the
GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
GTK+ level. A #GtkWindow is a toplevel window, the thing a user might think of
as a "window" with a titlebar and so on; a #GtkWindow may contain many #GdkWindow.
For example, each #GtkButton has a #GdkWindow associated with it.
</para>
<refsect2 id="COMPOSITED-WINDOWS"><title>Composited Windows</title>
<para>
Normally, the windowing system takes care of rendering the contents of a child
window onto its parent window. This mechanism can be intercepted by calling
gdk_window_set_composited() on the child window. For a
<firstterm>composited</firstterm> window it is the responsibility of the
application to render the window contents at the right spot.
</para>
<example id="composited-window-example"><title>Composited windows</title>
<programlisting><![CDATA[
#include <gtk/gtk.h>
@@ -62,7 +54,7 @@ transparent_expose (GtkWidget *widget,
* this handler is called after the red has been drawn. If it was
* called before then GTK would just blindly paint over our work.
*
* Note: if the child window has children, then you need a cairo 1.6
* Note: if the child window has children, then you need a cairo 1.16
* feature to make this work correctly.
*/
static gboolean
@@ -161,10 +153,10 @@ main (int argc, char **argv)
]]>
</programlisting></example>
<para>
In the example <xref linkend="composited-window-example"/>, a button is
placed inside of an event box inside of a window. The event box is
set as composited and therefore is no longer automatically drawn to
the screen.
In the example <xref linkend="composited-window-example"/>, a button is
placed inside of an event box inside of a window. The event box is
set as composited and therefore is no longer automatically drawn to
the screen.
</para>
<para>
When the contents of the event box change, an expose event is
@@ -176,31 +168,8 @@ that it wishes.
<para>
In our case, we merge the contents with a 50% transparency. We
also set the background colour of the window to red. The effect is
that the background shows through the button.
that the background shows through the button.
</para>
</refsect2>
<refsect2 id="OFFSCREEN-WINDOWS"><title>Offscreen Windows</title>
<para>
Offscreen windows are more general than composited windows, since they
allow not only to modify the rendering of the child window onto its parent,
but also to apply coordinate transformations.
</para>
<para>
To integrate an offscreen window into a window hierarchy, one has to call
gdk_window_set_embedder() and handle a number of signals. The
gdk_offscreen_window_set_embedder() and handle a number of signals. The
#GdkWindow::pick-embedded-child signal on the embedder window is used to
select an offscreen child at given coordinates, and the #GdkWindow::to-embedder
and #GdkWindow::from-embedder signals on the offscreen window are used to
translate coordinates between the embedder and the offscreen window.
</para>
<para>
For rendering an offscreen window onto its embedder, the contents of the
offscreen window are available as a pixmap, via
gdk_offscreen_window_get_pixmap().
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
@@ -220,43 +189,6 @@ these types.
</para>
<!-- ##### SIGNAL GdkWindow::from-embedder ##### -->
<para>
</para>
@gdkwindow: the object which received the signal.
@arg1:
@arg2:
@arg3:
@arg4:
<!-- ##### SIGNAL GdkWindow::pick-embedded-child ##### -->
<para>
</para>
@gdkwindow: the object which received the signal.
@arg1:
@arg2:
@Returns:
<!-- ##### SIGNAL GdkWindow::to-embedder ##### -->
<para>
</para>
@gdkwindow: the object which received the signal.
@arg1:
@arg2:
@arg3:
@arg4:
<!-- ##### ARG GdkWindow:cursor ##### -->
<para>
</para>
<!-- ##### ENUM GdkWindowType ##### -->
<para>
Describes the kind of window.
@@ -268,7 +200,6 @@ Describes the kind of window.
@GDK_WINDOW_DIALOG: useless/deprecated compatibility type
@GDK_WINDOW_TEMP: override redirect temporary window (used to implement #GtkMenu)
@GDK_WINDOW_FOREIGN: foreign window (see gdk_window_foreign_new())
@GDK_WINDOW_OFFSCREEN: offscreen window (see <xref linkend="OFFSCREEN-WINDOWS"/>). Since 2.18
<!-- ##### ENUM GdkWindowClass ##### -->
<para>
@@ -566,15 +497,6 @@ Deprecated equivalent of g_object_unref()
@window:
<!-- ##### FUNCTION gdk_window_is_destroyed ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gdk_window_is_visible ##### -->
<para>
@@ -763,23 +685,6 @@ Deprecated equivalent of g_object_unref()
@dy:
<!-- ##### FUNCTION gdk_window_flush ##### -->
<para>
</para>
@window:
<!-- ##### FUNCTION gdk_window_ensure_native ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gdk_window_reparent ##### -->
<para>
@@ -859,16 +764,6 @@ Deprecated equivalent to gdk_draw_drawable(), see that function for docs
@window:
<!-- ##### FUNCTION gdk_window_restack ##### -->
<para>
</para>
@window:
@sibling:
@above:
<!-- ##### FUNCTION gdk_window_focus ##### -->
<para>
@@ -1305,15 +1200,6 @@ window.
@cursor:
<!-- ##### FUNCTION gdk_window_get_cursor ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### MACRO gdk_window_set_colormap ##### -->
<para>
Deprecated equivalent to gdk_drawable_set_colormap()
@@ -1498,18 +1384,6 @@ Deprecated equivalent of gdk_drawable_get_type().
@Returns:
<!-- ##### FUNCTION gdk_window_get_root_coords ##### -->
<para>
</para>
@window:
@x:
@y:
@root_x:
@root_y:
<!-- ##### FUNCTION gdk_window_get_pointer ##### -->
<para>
@@ -1785,39 +1659,12 @@ Applications should never have any reason to use this facility
@Returns:
<!-- ##### FUNCTION gdk_offscreen_window_get_pixmap ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gdk_offscreen_window_set_embedder ##### -->
<para>
</para>
@window:
@embedder:
<!-- ##### FUNCTION gdk_offscreen_window_get_embedder ##### -->
<para>
</para>
@window:
@Returns:
<!-- ##### FUNCTION gdk_window_geometry_changed ##### -->
<para>
</para>
@window:
<!--
Local variables:
mode: sgml
sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")
End:
-->
<!-- ##### FUNCTION gdk_window_redirect_to_drawable ##### -->
@@ -1843,11 +1690,3 @@ Applications should never have any reason to use this facility
@window:
<!--
Local variables:
mode: sgml
sgml-parent-document: ("../gdk-docs.sgml" "book" "refsect2" "")
End:
-->

View File

@@ -41,9 +41,11 @@ IGNORE_HFILES= \
gtkfilesystemmodel.h \
gtkfilesystemunix.h \
gtkfilesystemwin32.h \
gtkhsv.h \
gtkiconcache.h \
gtkiconcachevalidator.h \
gtkiconthemeparser.h \
gtkimmodule.h \
gtkintl.h \
gtkkeyhash.h \
gtkmarshal.h \
@@ -87,7 +89,6 @@ IGNORE_HFILES= \
gtktrayicon.h \
gtktreedatalist.h \
gtktreeprivate.h \
gtktoolpaletteprivate.h \
gtktypebuiltins.h \
gtkxembed.h \
gtkwin32embed.h \
@@ -116,7 +117,7 @@ GTKDOC_LIBS = \
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml --name-space=gtk
MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = \
@@ -127,22 +128,18 @@ content_files = \
changes-2.0.sgml \
compiling.sgml \
directfb.sgml \
drawing-model.xml \
glossary.xml \
migrating-checklist.sgml \
migrating-ClientSideWindows.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-GtkLabel-links.sgml \
migrating-GtkLinkButton.sgml \
migrating-GtkAboutDialog.sgml \
migrating-GtkColorButton.sgml \
migrating-GtkAssistant.sgml \
migrating-GtkRecentChooser.sgml \
migrating-GtkLinkButton.sgml \
migrating-GtkBuilder.sgml \
migrating-GtkTooltip.sgml \
objects_grouped.sgml \
osx.sgml \
@@ -158,20 +155,16 @@ content_files = \
visual_index.xml
expand_content_files = \
drawing-model.xml \
glossary.xml \
migrating-checklist.sgml \
migrating-ClientSideWindows.sgml \
migrating-GtkAction.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-GtkTooltip.sgml \
@@ -186,7 +179,6 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/20/gtk-apply.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-bold.png \
$(top_srcdir)/gtk/stock-icons/20/gtk-cancel.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-caps-lock-warning.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-cdrom.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-clear.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-close.png \
@@ -300,7 +292,6 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-leave-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-info.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/assistant.png \
$(srcdir)/images/button.png \
@@ -310,8 +301,6 @@ HTML_IMAGES = \
$(srcdir)/images/combo-box.png \
$(srcdir)/images/combo-box-entry.png \
$(srcdir)/images/entry.png \
$(srcdir)/images/figure-hierarchical-drawing.png \
$(srcdir)/images/figure-windowed-label.png \
$(srcdir)/images/file-button.png \
$(srcdir)/images/filechooser.png \
$(srcdir)/images/font-button.png \
@@ -336,22 +325,12 @@ HTML_IMAGES = \
$(srcdir)/images/scrolledwindow.png \
$(srcdir)/images/separator.png \
$(srcdir)/images/spinbutton.png \
$(srcdir)/images/spinner.png \
$(srcdir)/images/statusbar.png \
$(srcdir)/images/toggle-button.png \
$(srcdir)/images/toolbar.png \
$(srcdir)/images/toolpalette.png \
$(srcdir)/images/tree-view-coordinates.png \
$(srcdir)/images/volumebutton.png \
$(srcdir)/images/window.png \
$(srcdir)/images/layout-btlr.png \
$(srcdir)/images/layout-btrl.png \
$(srcdir)/images/layout-lrbt.png \
$(srcdir)/images/layout-lrtb.png \
$(srcdir)/images/layout-rlbt.png \
$(srcdir)/images/layout-rltb.png \
$(srcdir)/images/layout-tblr.png \
$(srcdir)/images/layout-tbrl.png
$(srcdir)/images/window.png
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html \
@@ -368,21 +347,19 @@ EXTRA_DIST += version.xml.in
########################################################################
if ENABLE_MAN
man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
if ENABLE_MAN
%.1 : %.xml
@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
BUILT_EXTRA_DIST = $(man_MANS)
endif
BUILT_EXTRA_DIST = $(man_MANS)
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

View File

@@ -262,7 +262,7 @@ How to compile GTK+ itself
for mime types that are used by GIO and, indirectly, by GTK+.
gdk-pixbuf will use GIO for mime type detection if possible. For this
to work, shared-mime-info needs to be installed and
<envar>XDG_DATA_DIRS</envar> set accordingly at configure time.
<envvar>XDG_DATA_DIRS</envvar> set accordingly at configure time.
Otherwise, gdk-pixbuf falls back to its built-in mime type detection.
</para>
</listitem>

View File

@@ -69,17 +69,12 @@ toplevel headers <filename>gtk.h</filename>, <filename>gdk.h</filename>,
If you want to make sure that your program follows this recommended
practise, you can define the preprocessor symbols GTK_DISABLE_SINGLE_INCLUDES
and GDK_PIXBUF_DISABLE_SINGLE_INCLUDES to make GTK+ generate an error
when individual headers are directly included.
There are some exceptions: <filename>gdkkeysyms.h</filename> is not included in
<filename>gdk.h</filename> because the file is quite large; see
<link linkend="gdk-Keyboard-Handling">Key Values documentation</link>.
<filename>gdkx.h</filename> must be included independently because It's
platform-specific; see
<link linkend="gdk-X-Window-System-Interaction">X Window System Interaction</link>
documentation.
The same for <filename>gtkunixprint.h</filename> if you use the non-portable
<link linkend="GtkPrintUnixDialog">GtkPrintUnixDialog</link> API.
when individual headers are directly included.
</para>
</refsect1>
</refentry>

View File

@@ -1,586 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="chap-drawing-model">
<refmeta>
<refentrytitle>The GTK+ Drawing Model</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>The GTK+ Drawing Model</refname>
<refpurpose>
The GTK+ drawing model in detail
</refpurpose>
</refnamediv>
<refsect1 id="drawing-overview">
<title>Overview of the drawing model</title>
<para>
This chapter describes the GTK+ drawing model in detail. If you
are interested in the procedure which GTK+ follows to draw its
widgets and windows, you should read this chapter; this will be
useful to know if you decide to implement your own widgets. This
chapter will also clarify the reasons behind the ways certain
things are done in GTK+; for example, why you cannot change the
background color of all widgets with the same method.
</para>
<para>
Programs that run in a windowing system generally create
rectangular regions in the screen called
<firstterm>windows</firstterm>. Traditional windowing systems
do not automatically save the graphical content of windows, and
instead ask client programs to repaint those windows whenever it
is needed. For example, if a window that is stacked below other
windows gets raised to the top, then a client program has to
repaint the area that was previously obscured. When the
windowing system asks a client program to redraw part of a
window, it sends an <firstterm>exposure event</firstterm> to the
program for that window.
</para>
<para>
Here, "windows" means "rectangular regions with automatic
clipping", instead of "toplevel application windows". Most
windowing systems support nested windows, where the contents of
child windows get clipped by the boundaries of their parents.
Although GTK+ and GDK in particular may run on a windowing
system with no such notion of nested windows, GDK presents the
illusion of being under such a system. A toplevel window may
contain many subwindows and sub-subwindows, for example, one for
the menu bar, one for the document area, one for each scrollbar,
and one for the status bar. In addition, controls that receive
user input, such as clickable buttons, are likely to have their
own subwindows as well.
</para>
<para>
Generally, the drawing cycle begins when GTK+ receives an
exposure event from the underlying windowing system: if the
user drags a window over another one, the windowing system will
tell the underlying window that it needs to repaint itself. The
drawing cycle can also be initiated when a widget itself decides
that it needs to update its display. For example, when the user
types a character in a <link
linkend="GtkEntry"><classname>GtkEntry</classname></link>
widget, the entry asks GTK+ to queue a redraw operation for
itself.
</para>
<para>
The following sections describe how GTK+ decides which widgets
need to be repainted, and how widgets work internally in terms
of the resources they use from the windowing system.
</para>
<refsect2 id="window-no-window-widgets">
<title>Window and no-window widgets</title>
<para>
A <link linkend="GdkWindow"><classname>GdkWindow</classname></link>
represents a window from the underlying windowing system on which GTK+
is running. For example, on X11 it corresponds to a
<type>Window</type>; on Win32, it corresponds to a <type>HANDLE</type>.
The windowing system generates events for these windows. The GDK
interface to the windowing system translates such native events into
<link linkend="GdkEvent"><structname>GdkEvent</structname></link>
structures and sends them on to the GTK layer. In turn, the GTK layer
finds the widget that corresponds to a particular
<classname>GdkWindow</classname> and emits the corresponding event
signals on that widget.
</para>
<para>
When the program needs to redraw a region of a
<classname>GdkWindow</classname>, GDK generates an event of
type <link
linkend="GDK_EVENT_EXPOSE"><constant>GDK_EVENT_EXPOSE</constant></link>
for that window. The GTK+ widget layer in turn finds the
widget that corresponds to that window, and emits the <link
linkend="GtkWidget-expose-event">expose-event signal</link>
for that widget.
</para>
<para>
In principle, each widget could have a
<classname>GdkWindow</classname> of its own. With such a
scheme, the drawing cycle would be trivial: when GDK notifies
the GTK layer about an exposure event for a
<classname>GdkWindow</classname>, the GTK layer would simply
emit the <link linkend="GtkWidget-expose-event">expose-event
signal</link> for that widget. The widget's expose event
handler would subsequently repaint the widget. No further
work would be necessary; the windowing system would generate
exposure events for each window that needs it, and then each
corresponding widget would draw itself in turn.
</para>
<para>
However, in practice it is convenient to have widgets which do
not have a <classname>GdkWindow</classname> of their own, but
rather share the one from their parent widget. Such widgets
have the <constant>GTK_NO_WINDOW</constant> <link
linkend="GtkWidgetFlags">widget flag</link> turned on; this
can be tested easily with the <link
linkend="GTK-WIDGET-NO-WINDOW-CAPS"><function>GTK_WIDGET_NO_WINDOW()</function></link>
macro. As such, these are called <firstterm>no-window
widgets</firstterm>.
</para>
<para>
No-window widgets are useful for various reasons:
</para>
<itemizedlist>
<listitem>
<para>
Some widgets may want the parent's background to show through, even
when they draw on parts of it. For example, consider a theme that
uses textured backgrounds, such as gradients or repeating
patterns. If each widget had its own window, and in turn its own
gradient background, labels would look bad because there would be a
visible break with respect to their surroundings. <xref
linkend="figure-windowed-label"/> shows this undesirable effect.
</para>
<figure id="figure-windowed-label">
<title>Windowed label vs. no-window label</title>
<graphic fileref="figure-windowed-label.png" format="png"/>
</figure>
</listitem>
<listitem>
<para>
Reducing the number of windows creates less traffic between GTK+ and
the underlying windowing system, especially when getting events.
</para>
</listitem>
</itemizedlist>
<para>
On the other hand, widgets that would benefit from having a "hard"
clipping region may find it more convenient to create their own
windows. Also, widgets which want to receive events resulting from
user interaction may find it convenient to use windows of their own as
well. Widgets may have more than one window if they want to
define different regions for capturing events.
</para>
</refsect2>
<refsect2 id="hierarchical-drawing">
<title>Hierarchical drawing</title>
<para>
When the GTK layer receives an exposure event from GDK, it
finds the widget that corresponds to the window which received
the event. By definition, this corresponds to a widget that
has the <constant>GTK_NO_WINDOW</constant> flag turned
<emphasis>off</emphasis> (otherwise, the widget wouldn't own
the window!). First this widget paints its background, and
then, if it is a container widget, it tells each of its
<constant>GTK_NO_WINDOW</constant> children to paint
themselves. This process is applied recursively for all the
<constant>GTK_NO_WINDOW</constant> descendants of the original
widget.
</para>
<para>
Note that this process does not get propagated to widgets
which have windows of their own, that is, to widgets which
have the <constant>GTK_NO_WINDOW</constant> flag turned off.
If such widgets require redrawing, then the windowing system
will already have sent exposure events to their corresponding
windows. As such, there is no need to
<firstterm>propagate</firstterm> the exposure to them on the
GTK+ side.
</para>
<para>
<xref
linkend="figure-hierarchical-drawing"/> shows how a simple toplevel window would
paint itself when it contains only <constant>GTK_NO_WINDOW</constant> descendants:
<orderedlist>
<listitem>
<para>
The outermost, thick rectangle is a toplevel <link
linkend="GtkWindow"><classname>GtkWindow</classname></link>,
which is not a <constant>GTK_NO_WINDOW</constant> widget &mdash;
as such, it does receive its exposure event as it comes from GDK.
First the <classname>GtkWindow</classname> would paint its own
background. Then, it would ask its only child to paint itself,
numbered 2.
</para>
</listitem>
<listitem>
<para>
The dotted rectangle represents a <link
linkend="GtkVBox"><classname>GtkVBox</classname></link>, which
has been made the sole child of the
<classname>GtkWindow</classname>. Boxes are just layout
containers that do not paint anything by themselves, so this
<classname>GtkVBox</classname> would draw nothing, but rather ask
its children to draw themselves. The children are numbered 3 and
6.
</para>
</listitem>
<listitem>
<para>
The thin rectangle is a <link
linkend="GtkFrame"><classname>GtkFrame</classname></link>,
which has two children: a label for the frame, numbered 4, and
another label inside, numbered 5. First the frame would draw its
own beveled box, then ask the frame label and its internal child to
draw themselves.
</para>
</listitem>
<listitem>
<para>
The frame label has no children, so it just draws its text: "Frame&nbsp;Label".
</para>
</listitem>
<listitem>
<para>
The internal label has no children, so it just draws its text: "This
is some text inside the frame!".
</para>
</listitem>
<listitem>
<para>
The dotted rectangle represents a <link
linkend="GtkHBox"><classname>GtkHBox</classname></link>. Again,
this does not draw anything by itself, but rather asks its children
to draw themselves. The children are numbered 7 and 9.
</para>
</listitem>
<listitem>
<para>
The thin rectangle is a <link
linkend="GtkButton"><classname>GtkButton</classname></link> with
a single child, numbered 8. First the button would draw its
beveled box, and then it would ask its child to draw itself.
</para>
</listitem>
<listitem>
<para>
This is a text label which has no children, so it just draws its
own text: "Cancel".
</para>
</listitem>
<listitem>
<para>
Similar to number 7, this is a button with a single child, numbered
10. First the button would draw its beveled box, and then it would
ask its child to draw itself.
</para>
</listitem>
<listitem>
<para>
Similar to number 8, this is a text label which has no children,
so it just draws its own text: "OK".
</para>
</listitem>
</orderedlist>
</para>
<figure id="figure-hierarchical-drawing">
<title>Hierarchical drawing order</title>
<graphic fileref="figure-hierarchical-drawing.png" format="png"/>
</figure>
<para>
To avoid the flickering that would result from each widget drawing
itself in turn, GTK+ uses a double-buffering mechanism. The following
sections describe this mechanism in detail.
</para>
</refsect2>
<refsect2 id="notes-on-drawing-no-window-widgets">
<title>Notes on drawing no-window widgets</title>
<para>
Remember that the coordinates in a <link
linkend="GdkEventExpose">GdkEventExpose</link> are relative to
the <classname>GdkWindow</classname> that received the event,
<emphasis>not</emphasis> to the widget whose expose-event
handler is being called. If your widget owns the window, then
these coordinates are probably what you expect. However, if
you have a <constant>GTK_NO_WINDOW</constant> widget that
shares its parent's window, then the event's coordinates will
be offset by your widget's allocation: remember that the
allocation is always relative to the parent
<emphasis>window</emphasis> of the widget, not to the parent
<emphasis>widget</emphasis> itself.
</para>
<para>
For example, if you have a no-window widget whose allocation
is {&nbsp;x=5,&nbsp;y=6,
<replaceable>width</replaceable>,&nbsp;<replaceable>height</replaceable>&nbsp;},
then your drawing origin should be at (5,&nbsp;6), not at
(0,&nbsp;0).
</para>
</refsect2>
<refsect2 id="include-inferiors">
<title>Drawing over child windows</title>
<para>
When you draw on a <classname>GdkWindow</classname>, your
drawing gets clipped by any child windows that it may
intersect. Sometimes you need to draw over your child windows
as well; for example, when drawing a drag-handle to resize
something. In this case, turn on the <link
linkend="GDK-INCLUDE-INFERIORS:CAPS">GDK_INCLUDE_INFERIORS</link>
subwindow mode for the <link
linkend="gdk-Graphics-Contexts">GdkGC</link> which you use for
drawing.
</para>
</refsect2>
</refsect1>
<refsect1 id="double-buffering">
<title>Double buffering</title>
<para>
When the GTK layer receives an exposure event from GDK, it first finds
the <literal>!<constant>GTK_NO_WINDOW</constant></literal> widget that
corresponds to the event's window. Then, it emits the <link
linkend="GtkWidget-expose-event">expose-event signal</link> for that
widget. As described above, that widget will first draw its background,
and then ask each of its <constant>GTK_NO_WINDOW</constant> children to
draw themselves.
</para>
<para>
If each of the drawing calls made by each subwidget's
<literal>expose-event</literal> handler were sent directly to the
windowing system, flicker could result. This is because areas may get
redrawn repeatedly: the background, then decorative frames, then text
labels, etc. To avoid flicker, GTK+ employs a <firstterm>double
buffering</firstterm> system at the GDK level. Widgets normally don't
know that they are drawing to an off-screen buffer; they just issue their
normal drawing commands, and the buffer gets sent to the windowing system
when all drawing operations are done.
</para>
<!-- FIXME: figure with a timeline of non-double-buffered and
double-buffered paints:
onscreen:
[garbage]
[background]
[button-frame]
[icon]
[label]
onscreen: offscreen:
[garbage]
[background]
[button-frame]
[icon]
[label]
[final result]
-->
<para>
Two basic functions in GDK form the core of the double-buffering
mechanism: <link
linkend="gdk_window_begin_paint_region"><function>gdk_window_begin_paint_region()</function></link>
and <link
linkend="gdk_window_end_paint"><function>gdk_window_end_paint()</function></link>.
The first function tells a <classname>GdkWindow</classname> to
create a temporary off-screen buffer for drawing. All
subsequent drawing operations to this window get automatically
redirected to that buffer. The second function actually paints
the buffer onto the on-screen window, and frees the buffer.
</para>
<refsect2 id="automatic-double-buffering">
<title>Automatic double buffering</title>
<para>
It would be inconvenient for all widgets to call
<function>gdk_window_begin_paint_region()</function> and
<function>gdk_window_end_paint()</function> at the beginning
and end of their expose-event handlers.
</para>
<para>
To make this easier, most GTK+ widgets have the
<constant>GTK_DOUBLE_BUFFERED</constant> <link
linkend="GtkWidgetFlags">widget flag</link> turned on by
default. When GTK+ encounters such a widget, it automatically
calls <function>gdk_window_begin_paint_region()</function>
before emitting the expose-event signal for the widget, and
then it calls <function>gdk_window_end_paint()</function>
after the signal has been emitted. This is convenient for
most widgets, as they do not need to worry about creating
their own temporary drawing buffers or about calling those
functions.
</para>
<para>
However, some widgets may prefer to disable this kind of
automatic double buffering and do things on their own. To do
this, turn off the <constant>GTK_DOUBLE_BUFFERED</constant>
flag in your widget's constructor.
</para>
<example id="disabling-double-buffering">
<title>Disabling automatic double buffering</title>
<programlisting>
static void
my_widget_init (MyWidget *widget)
{
...
GTK_WIDGET_UNSET_FLAGS (widget, GTK_DOUBLE_BUFFERED);
...
}
</programlisting>
</example>
<para>
When is it convenient to disable double buffering? Generally,
this is the case only if your widget gets drawn in such a way
that the different drawing operations do not overlap each
other. For example, this may be the case for a simple image
viewer: it can just draw the image in a single operation.
This would <emphasis>not</emphasis> be the case with a word
processor, since it will need to draw and over-draw the page's
background, then the background for highlighted text, and then
the text itself.
</para>
<para>
Even if you turn off the
<constant>GTK_DOUBLE_BUFFERED</constant> flag on a widget, you
can still call
<function>gdk_window_begin_paint_region()</function> and
<function>gdk_window_end_paint()</function> by hand to use
temporary drawing buffers.
</para>
</refsect2>
</refsect1>
<refsect1 id="app-paintable-widgets">
<title>App-paintable widgets</title>
<para>
Generally, applications use the pre-defined widgets in GTK+ and
they do not draw extra things on top of them (the exception
being <classname>GtkDrawingArea</classname>). However,
applications may sometimes find it convenient to draw directly
on certain widgets like toplevel windows or event boxes. When
this is the case, GTK+ needs to be told not to overwrite your
drawing afterwards, when the window gets to drawing its default
contents.
</para>
<para>
<classname>GtkWindow</classname> and
<classname>GtkEventBox</classname> are the only two widgets
which will draw their default contents unless you turn on the
<constant>GTK_APP_PAINTABLE</constant> <link
linkend="GtkWidgetFlags">widget flag</link>. If you turn on
this flag, then they will not draw their contents and let you do
it instead.
</para>
<para>
The expose-event handler for <classname>GtkWindow</classname> is
implemented effectively like this:
</para>
<programlisting>
static gint
gtk_window_expose (GtkWidget *widget,
GdkEventExpose *event)
{
if (!GTK_WIDGET_APP_PAINTABLE (widget))
gtk_paint_flat_box (widget->style, widget->window, GTK_STATE_NORMAL,
GTK_SHADOW_NONE, event->area, widget, "base", 0, 0, -1, -1);
if (GTK_WIDGET_CLASS (gtk_window_parent_class)->expose_event)
return GTK_WIDGET_CLASS (gtk_window_parent_class)->expose_event (widget, event);
return FALSE;
}
</programlisting>
<para>
The expose-event handler for <classname>GtkEventBox</classname>
is implemented in a similar fashion.
</para>
<para>
Since the <link linkend="GtkWidget-expose-event">expose-event
signal</link> runs user-connected handlers
<emphasis>before</emphasis> the widget's default handler, what
happens is this:
</para>
<orderedlist>
<listitem>
<para>
Your own expose-event handler gets run. It paints something
on the window or the event box.
</para>
</listitem>
<listitem>
<para>
The widget's default expose-event handler gets run. If
<constant>GTK_APP_PAINTABLE</constant> is turned off (this
is the default), <emphasis>your drawing will be
overwritten</emphasis>. If that flag is turned on, the
widget will not draw its default contents and preserve your
drawing instead.
</para>
</listitem>
<listitem>
<para>
The expose-event handler for the parent class gets run.
Since both <classname>GtkWindow</classname> and
<classname>GtkEventBox</classname> are descendants of
<classname>GtkContainer</classname>, their no-window
children will be asked to draw themselves recursively, as
described in <xref linkend="hierarchical-drawing"/>.
</para>
</listitem>
</orderedlist>
<formalpara>
<title>Summary of app-paintable widgets</title>
<para>
Turn on the <constant>GTK_APP_PAINTABLE</constant> flag if you
intend to draw your own content directly on a
<classname>GtkWindow</classname> and
<classname>GtkEventBox</classname>. You seldom need to draw
on top of other widgets, and
<classname>GtkDrawingArea</classname> ignores this flag, as it
<emphasis>is</emphasis> intended to be drawn on.
</para>
</formalpara>
</refsect1>
</refentry>
<!--
Local variables:
mode: xml
sgml-parent-document: ("gtk-docs.sgml" "book" "part" "refentry")
End:
-->

View File

@@ -197,9 +197,7 @@
draw its contents, but rather shares its <glossterm
linkend="parent">parent's</glossterm>. Such a widget has the
%GTK_NO_WINDOW <link linkend="GtkWidgetFlags">flag</link> set, and
can be tested with the GTK_WIDGET_NO_WINDOW() macro. See
<xref linkend="window-no-window-widgets"/> for a detailed
description of this flag.
can be tested with the GTK_WIDGET_NO_WINDOW() macro.
</para>
</glossdef>
</glossentry>

View File

@@ -0,0 +1,43 @@
.\" Title: gtk-builder-convert
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
.\" Date: 07/10/2007
.\" Manual:
.\" Source:
.\"
.TH "GTK\-BUILDER\-CONVERT" "1" "07/10/2007" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
gtk\-builder\-convert \- Glade file conversion utility
.SH "SYNOPSIS"
.HP 20
\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.

View File

@@ -8,11 +8,7 @@
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GTK+ Reference Manual</title>
<releaseinfo>
for GTK+ &version;
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://library.gnome.org/devel/gtk/unstable/">http://library.gnome.org/devel/gtk/unstable/</ulink>.
</releaseinfo>
<releaseinfo>for GTK+ &version;</releaseinfo>
</bookinfo>
<part id="gtk">
@@ -100,7 +96,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="directfb.sgml" />
<xi:include href="resources.sgml" />
<xi:include href="xml/question_index.sgml" />
<xi:include href="drawing-model.xml" />
</part>
@@ -159,9 +154,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" />
<xi:include href="xml/gtkspinner.xml" />
</chapter>
<chapter id="ButtonWidgets">
@@ -178,7 +171,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<chapter id="NumericEntry">
<title>Numeric/Text Data Entry</title>
<xi:include href="xml/gtkentry.xml" />
<xi:include href="xml/gtkentrybuffer.xml" />
<xi:include href="xml/gtkentrycompletion.xml" />
<xi:include href="xml/gtkhscale.xml" />
<xi:include href="xml/gtkvscale.xml" />
@@ -220,7 +212,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtkcellrendererspin.xml" />
<xi:include href="xml/gtkcellrenderertext.xml" />
<xi:include href="xml/gtkcellrenderertoggle.xml" />
<xi:include href="xml/gtkcellrendererspinner.xml" />
<xi:include href="xml/gtkliststore.xml" />
<xi:include href="xml/gtktreestore.xml" />
</chapter>
@@ -240,8 +231,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtktoolshell.xml" />
<xi:include href="xml/gtktoolbar.xml" />
<xi:include href="xml/gtktoolitem.xml" />
<xi:include href="xml/gtktoolpalette.xml" />
<xi:include href="xml/gtktoolitemgroup.xml" />
<xi:include href="xml/gtkseparatortoolitem.xml" />
<xi:include href="xml/gtktoolbutton.xml" />
<xi:include href="xml/gtkmenutoolbutton.xml" />
@@ -257,15 +246,13 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtktoggleaction.xml" />
<xi:include href="xml/gtkradioaction.xml" />
<xi:include href="xml/gtkrecentaction.xml" />
<xi:include href="xml/gtkactivatable.xml" />
</chapter>
<chapter id="SelectorWidgets">
<title>Selectors (File/Font/Color/Input Devices)</title>
<xi:include href="xml/gtkcolorbutton.xml" />
<xi:include href="xml/gtkcolorseldlg.xml" />
<xi:include href="xml/gtkcolorsel.xml" />
<xi:include href="xml/gtkhsv.xml" />
<xi:include href="xml/gtkcolorseldlg.xml" />
<xi:include href="xml/gtkfilechooser.xml" />
<xi:include href="xml/gtkfilechooserbutton.xml" />
<xi:include href="xml/gtkfilechooserdialog.xml" />
@@ -292,7 +279,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/gtknotebook.xml" />
<xi:include href="xml/gtktable.xml" />
<xi:include href="xml/gtkexpander.xml" />
<xi:include href="xml/gtkorientable.xml" />
</chapter>
<chapter id="Ornaments">
@@ -437,9 +423,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<xi:include href="xml/migrating-GtkLinkButton.sgml" />
<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" />
<xi:include href="xml/migrating-ClientSideWindows.sgml" />
</part>
<part>
@@ -487,16 +470,4 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<title>Index of new symbols in 2.14</title>
<xi:include href="xml/api-index-2.14.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-2-16" role="2.16">
<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>
<index id="api-index-2-20" role="2.20">
<title>Index of new symbols in 2.20</title>
<xi:include href="xml/api-index-2.20.xml"><xi:fallback /></xi:include>
</index>
</book>

View File

@@ -0,0 +1,49 @@
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "GTK-QUERY-IMMODUL" 1 "" "" ""
.SH NAME
gtk-query-immodules-2.0 \- Input method module registration utility
.SH "SYNOPSIS"
.nf
\fBgtk-query-immodules-2.0\fR [module...]
.fi
.SH "DESCRIPTION"
.PP
\fBgtk-query-immodules-2.0\fR collects information about loadable input method modules for GTK+ and writes it to \fIstdout\fR\&.
.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\&.

View File

@@ -188,35 +188,12 @@ gtk_action_disconnect_proxy
gtk_action_get_proxies
gtk_action_connect_accelerator
gtk_action_disconnect_accelerator
gtk_action_block_activate
gtk_action_unblock_activate
gtk_action_block_activate_from
gtk_action_unblock_activate_from
gtk_action_get_always_show_image
gtk_action_set_always_show_image
gtk_action_get_accel_path
gtk_action_set_accel_path
gtk_action_get_accel_closure
gtk_action_set_accel_group
gtk_action_set_label
gtk_action_get_label
gtk_action_set_short_label
gtk_action_get_short_label
gtk_action_set_tooltip
gtk_action_get_tooltip
gtk_action_set_stock_id
gtk_action_get_stock_id
gtk_action_set_gicon
gtk_action_get_gicon
gtk_action_set_icon_name
gtk_action_get_icon_name
gtk_action_set_visible_horizontal
gtk_action_get_visible_horizontal
gtk_action_set_visible_vertical
gtk_action_get_visible_vertical
gtk_action_set_is_important
gtk_action_get_is_important
<SUBSECTION Standard>
GTK_TYPE_ACTION
GTK_ACTION
@@ -230,27 +207,6 @@ gtk_action_get_type
GtkActionPrivate
</SECTION>
<SECTION>
<FILE>gtkactivatable</FILE>
<TITLE>GtkActivatable</TITLE>
GtkActivatable
GtkActivatableIface
gtk_activatable_do_set_related_action
gtk_activatable_get_related_action
gtk_activatable_get_use_action_appearance
gtk_activatable_sync_action_properties
gtk_activatable_set_related_action
gtk_activatable_set_use_action_appearance
<SUBSECTION Standard>
GTK_ACTIVATABLE
GTK_ACTIVATABLE_CLASS
GTK_ACTIVATABLE_GET_IFACE
GTK_IS_ACTIVATABLE
GTK_TYPE_ACTIVATABLE
<SUBSECTION Private>
gtk_activatable_get_type
</SECTION>
<SECTION>
<FILE>gtkactiongroup</FILE>
<TITLE>GtkActionGroup</TITLE>
@@ -488,6 +444,21 @@ GTK_BOX_GET_CLASS
gtk_box_get_type
</SECTION>
<SECTION>
<FILE>gtkvscrollbar</FILE>
<TITLE>GtkVScrollbar</TITLE>
GtkVScrollbar
gtk_vscrollbar_new
<SUBSECTION Standard>
GTK_VSCROLLBAR
GTK_IS_VSCROLLBAR
GTK_TYPE_VSCROLLBAR
gtk_vscrollbar_get_type
GTK_VSCROLLBAR_CLASS
GTK_IS_VSCROLLBAR_CLASS
GTK_VSCROLLBAR_GET_CLASS
</SECTION>
<SECTION>
<FILE>gtkbuildable</FILE>
GtkBuildable
@@ -822,29 +793,6 @@ gtk_color_button_get_type
GtkColorButtonPrivate
</SECTION>
<SECTION>
<FILE>gtkhsv</FILE>
<TITLE>GtkHSV</TITLE>
GtkHSV
gtk_hsv_new
gtk_hsv_set_color
gtk_hsv_get_color
gtk_hsv_set_metrics
gtk_hsv_get_metrics
gtk_hsv_is_adjusting
gtk_hsv_to_rgb
gtk_rgb_to_hsv
<SUBSECTION Standard>
GTK_TYPE_HSV
GTK_HSV
GTK_HSV_CLASS
GTK_IS_HSV
GTK_IS_HSV_CLASS
GTK_HSV_GET_CLASS
<SUBSECTION Private>
gtk_hsv_get_type
</SECTION>
<SECTION>
<FILE>gtkcolorsel</FILE>
<TITLE>GtkColorSelection</TITLE>
@@ -1184,7 +1132,6 @@ gtk_dialog_set_default_response
gtk_dialog_set_has_separator
gtk_dialog_set_response_sensitive
gtk_dialog_get_response_for_widget
gtk_dialog_get_widget_for_response
gtk_dialog_get_action_area
gtk_dialog_get_content_area
<SUBSECTION>
@@ -1271,10 +1218,7 @@ gtk_old_editable_get_type
<TITLE>GtkEntry</TITLE>
GtkEntry
gtk_entry_new
gtk_entry_new_with_buffer
gtk_entry_new_with_max_length
gtk_entry_get_buffer
gtk_entry_set_buffer
gtk_entry_set_text
gtk_entry_append_text
gtk_entry_prepend_text
@@ -1284,7 +1228,6 @@ gtk_entry_get_text_length
gtk_entry_select_region
gtk_entry_set_visibility
gtk_entry_set_invisible_char
gtk_entry_unset_invisible_char
gtk_entry_set_editable
gtk_entry_set_max_length
gtk_entry_get_activates_default
@@ -1310,33 +1253,6 @@ gtk_entry_set_completion
gtk_entry_get_completion
gtk_entry_set_cursor_hadjustment
gtk_entry_get_cursor_hadjustment
gtk_entry_set_progress_fraction
gtk_entry_get_progress_fraction
gtk_entry_set_progress_pulse_step
gtk_entry_get_progress_pulse_step
gtk_entry_progress_pulse
GtkEntryIconPosition
gtk_entry_set_icon_from_pixbuf
gtk_entry_set_icon_from_stock
gtk_entry_set_icon_from_icon_name
gtk_entry_set_icon_from_gicon
gtk_entry_get_icon_storage_type
gtk_entry_get_icon_pixbuf
gtk_entry_get_icon_stock
gtk_entry_get_icon_name
gtk_entry_get_icon_gicon
gtk_entry_set_icon_activatable
gtk_entry_get_icon_activatable
gtk_entry_set_icon_sensitive
gtk_entry_get_icon_sensitive
gtk_entry_get_icon_at_pos
gtk_entry_set_icon_tooltip_text
gtk_entry_get_icon_tooltip_text
gtk_entry_set_icon_tooltip_markup
gtk_entry_get_icon_tooltip_markup
gtk_entry_set_icon_drag_source
gtk_entry_get_current_icon_drag_source
<SUBSECTION Standard>
GTK_ENTRY
GTK_IS_ENTRY
@@ -1348,34 +1264,6 @@ GTK_ENTRY_GET_CLASS
gtk_entry_get_type
</SECTION>
<SECTION>
<FILE>gtkentrybuffer</FILE>
<TITLE>GtkEntryBuffer</TITLE>
GtkEntryBuffer
gtk_entry_buffer_new
gtk_entry_buffer_get_text
gtk_entry_buffer_set_text
gtk_entry_buffer_get_bytes
gtk_entry_buffer_get_length
gtk_entry_buffer_get_max_length
gtk_entry_buffer_set_max_length
gtk_entry_buffer_insert_text
gtk_entry_buffer_delete_text
gtk_entry_buffer_emit_deleted_text
gtk_entry_buffer_emit_inserted_text
<SUBSECTION Standard>
GTK_ENTRY_BUFFER
GTK_IS_ENTRY_BUFFER
GTK_TYPE_ENTRY_BUFFER
GTK_ENTRY_BUFFER_CLASS
GTK_IS_ENTRY_BUFFER_CLASS
GTK_ENTRY_BUFFER_GET_CLASS
GTK_ENTRY_BUFFER_MAX_SIZE
<SUBSECTION Private>
gtk_entry_buffer_get_type
</SECTION>
<SECTION>
<FILE>gtkentrycompletion</FILE>
<TITLE>GtkEntryCompletion</TITLE>
@@ -1486,8 +1374,6 @@ gtk_file_chooser_set_show_hidden
gtk_file_chooser_get_show_hidden
gtk_file_chooser_set_do_overwrite_confirmation
gtk_file_chooser_get_do_overwrite_confirmation
gtk_file_chooser_set_create_folders
gtk_file_chooser_get_create_folders
gtk_file_chooser_set_current_name
gtk_file_chooser_get_filename
gtk_file_chooser_set_filename
@@ -1656,6 +1542,7 @@ gtk_file_selection_get_type
<FILE>gtkfixed</FILE>
<TITLE>GtkFixed</TITLE>
GtkFixed
GtkFixedChild
gtk_fixed_new
gtk_fixed_put
gtk_fixed_move
@@ -1669,7 +1556,6 @@ GTK_FIXED_CLASS
GTK_IS_FIXED_CLASS
GTK_FIXED_GET_CLASS
<SUBSECTION Private>
GtkFixedChild
gtk_fixed_get_type
</SECTION>
@@ -1975,8 +1861,6 @@ gtk_icon_view_set_column_spacing
gtk_icon_view_get_column_spacing
gtk_icon_view_set_margin
gtk_icon_view_get_margin
gtk_icon_view_set_item_padding
gtk_icon_view_get_item_padding
gtk_icon_view_select_path
gtk_icon_view_unselect_path
gtk_icon_view_path_is_selected
@@ -2070,7 +1954,6 @@ GtkImagePixmapData
GtkImageStockData
GtkImageAnimationData
GtkImageIconNameData
GtkImageGIconData
</SECTION>
<SECTION>
@@ -2083,11 +1966,6 @@ gtk_image_menu_item_new
gtk_image_menu_item_new_from_stock
gtk_image_menu_item_new_with_label
gtk_image_menu_item_new_with_mnemonic
gtk_image_menu_item_get_use_stock
gtk_image_menu_item_set_use_stock
gtk_image_menu_item_get_always_show_image
gtk_image_menu_item_set_always_show_image
gtk_image_menu_item_set_accel_group
<SUBSECTION Standard>
GtkImageMenuItemClass
GTK_IMAGE_MENU_ITEM
@@ -2104,8 +1982,6 @@ gtk_image_menu_item_get_type
<FILE>gtkimcontext</FILE>
<TITLE>GtkIMContext</TITLE>
GtkIMContext
GtkIMContextClass
GtkIMContextInfo
gtk_im_context_set_client_window
gtk_im_context_get_preedit_string
gtk_im_context_filter_keypress
@@ -2152,8 +2028,6 @@ gtk_im_context_simple_get_type
GtkIMMulticontext
gtk_im_multicontext_new
gtk_im_multicontext_append_menuitems
gtk_im_multicontext_get_context_id
gtk_im_multicontext_set_context_id
<SUBSECTION Standard>
GTK_IM_MULTICONTEXT
GTK_IS_IM_MULTICONTEXT
@@ -2312,9 +2186,6 @@ 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
gtk_label_set_track_visited_links
gtk_label_get_track_visited_links
<SUBSECTION Standard>
GTK_LABEL
GTK_IS_LABEL
@@ -2460,8 +2331,6 @@ gtk_menu_get_title
gtk_menu_set_monitor
gtk_menu_get_monitor
gtk_menu_get_tearoff_state
gtk_menu_set_reserve_toggle_size
gtk_menu_get_reserve_toggle_size
<SUBSECTION>
gtk_menu_popdown
gtk_menu_reposition
@@ -2518,15 +2387,11 @@ gtk_menu_item_new_with_label
gtk_menu_item_new_with_mnemonic
gtk_menu_item_set_right_justified
gtk_menu_item_get_right_justified
gtk_menu_item_get_label
gtk_menu_item_set_label
gtk_menu_item_get_use_underline
gtk_menu_item_set_use_underline
gtk_menu_item_set_submenu
gtk_menu_item_get_submenu
gtk_menu_item_remove_submenu
gtk_menu_item_set_accel_path
gtk_menu_item_get_accel_path
gtk_menu_item_remove_submenu
gtk_menu_item_select
gtk_menu_item_deselect
gtk_menu_item_activate
@@ -2630,36 +2495,6 @@ 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_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>
@@ -2734,8 +2569,6 @@ gtk_notebook_set_group_id
gtk_notebook_get_group_id
gtk_notebook_set_group
gtk_notebook_get_group
gtk_notebook_set_action_widget
gtk_notebook_get_action_widget
GtkNotebookWindowCreationFunc
gtk_notebook_set_window_creation_hook
<SUBSECTION Standard>
@@ -3077,8 +2910,6 @@ gtk_range_set_lower_stepper_sensitivity
gtk_range_get_lower_stepper_sensitivity
gtk_range_set_upper_stepper_sensitivity
gtk_range_get_upper_stepper_sensitivity
gtk_range_get_flippable
gtk_range_set_flippable
<SUBSECTION Standard>
GTK_RANGE
GTK_IS_RANGE
@@ -3329,6 +3160,7 @@ GTK_TYPE_RULER
GTK_RULER_CLASS
GTK_IS_RULER_CLASS
GTK_RULER_GET_CLASS
<SUBSECTION Private>
gtk_ruler_get_type
gtk_ruler_draw_ticks
@@ -3347,8 +3179,6 @@ gtk_scale_get_draw_value
gtk_scale_get_value_pos
gtk_scale_get_layout
gtk_scale_get_layout_offsets
gtk_scale_add_mark
gtk_scale_clear_marks
<SUBSECTION Standard>
GTK_SCALE
GTK_IS_SCALE
@@ -3383,7 +3213,6 @@ GTK_SCALE_BUTTON_CLASS
GTK_IS_SCALE_BUTTON_CLASS
GTK_SCALE_BUTTON_GET_CLASS
<SUBSECTION Private>
GtkScaleButtonPrivate
gtk_scale_button_get_type
</SECTION>
@@ -3582,24 +3411,6 @@ GTK_SPIN_BUTTON_GET_CLASS
gtk_spin_button_get_type
</SECTION>
<SECTION>
<FILE>gtkspinner</FILE>
<TITLE>GtkSpinner</TITLE>
GtkSpinner
gtk_spinner_new
gtk_spinner_start
gtk_spinner_stop
<SUBSECTION Standard>
GTK_SPINNER
GTK_IS_SPINNER
GTK_TYPE_SPINNER
GTK_SPINNER_CLASS
GTK_IS_SPINER_CLASS
GTK_SPINNER_GET_CLASS
<SUBSECTION Private>
gtk_spinner_get_type
</SECTION>
<SECTION>
<FILE>gtkstatusbar</FILE>
<TITLE>GtkStatusbar</TITLE>
@@ -3611,7 +3422,6 @@ gtk_statusbar_pop
gtk_statusbar_remove
gtk_statusbar_set_has_resize_grip
gtk_statusbar_get_has_resize_grip
gtk_statusbar_get_message_area
<SUBSECTION Standard>
GTK_STATUSBAR
GTK_IS_STATUSBAR
@@ -3647,14 +3457,6 @@ gtk_status_icon_get_size
gtk_status_icon_set_screen
gtk_status_icon_get_screen
gtk_status_icon_set_tooltip
gtk_status_icon_set_tooltip_text
gtk_status_icon_get_tooltip_text
gtk_status_icon_set_tooltip_markup
gtk_status_icon_get_tooltip_markup
gtk_status_icon_set_has_tooltip
gtk_status_icon_get_has_tooltip
gtk_status_icon_set_title
gtk_status_icon_get_title
gtk_status_icon_set_visible
gtk_status_icon_get_visible
gtk_status_icon_set_blinking
@@ -3680,6 +3482,8 @@ gtk_status_icon_get_type
<FILE>gtktable</FILE>
<TITLE>GtkTable</TITLE>
GtkTable
GtkTableChild
GtkTableRowCol
gtk_table_new
gtk_table_resize
gtk_table_attach
@@ -3702,8 +3506,6 @@ GTK_TABLE_CLASS
GTK_IS_TABLE_CLASS
GTK_TABLE_GET_CLASS
<SUBSECTION Private>
GtkTableChild
GtkTableRowCol
gtk_table_get_type
</SECTION>
@@ -3747,9 +3549,16 @@ GTK_TEXT_INDEX
GTK_TEXT
GTK_IS_TEXT
GTK_TYPE_TEXT
gtk_text_get_type
GTK_TEXT_CLASS
GTK_IS_TEXT_CLASS
GTK_TEXT_GET_CLASS
<SUBSECTION Standard>
GTK_TEXT
GTK_IS_TEXT
GTK_TYPE_TEXT
GTK_TEXT_CLASS
GTK_IS_TEXT_CLASS
<SUBSECTION Private>
gtk_text_get_type
</SECTION>
@@ -3838,6 +3647,20 @@ gtk_text_buffer_unregister_deserialize_format
gtk_text_buffer_unregister_serialize_format
<SUBSECTION Standard>
gtk_text_buffer_deserialize
gtk_text_buffer_deserialize_get_can_create_tags
gtk_text_buffer_deserialize_set_can_create_tags
gtk_text_buffer_get_copy_target_list
gtk_text_buffer_get_deserialize_formats
gtk_text_buffer_get_paste_target_list
gtk_text_buffer_get_serialize_formats
gtk_text_buffer_register_deserialize_format
gtk_text_buffer_register_deserialize_tagset
gtk_text_buffer_register_serialize_format
gtk_text_buffer_register_serialize_tagset
gtk_text_buffer_serialize
gtk_text_buffer_unregister_deserialize_format
gtk_text_buffer_unregister_serialize_format
GTK_TEXT_BUFFER
GTK_IS_TEXT_BUFFER
GTK_TYPE_TEXT_BUFFER
@@ -4189,15 +4012,11 @@ gtk_toggle_button_get_type
<TITLE>GtkToolShell</TITLE>
GtkToolShell
GtkToolShellIface
gtk_tool_shell_get_ellipsize_mode
gtk_tool_shell_get_icon_size
gtk_tool_shell_get_orientation
gtk_tool_shell_get_relief_style
gtk_tool_shell_get_style
gtk_tool_shell_get_text_alignment
gtk_tool_shell_get_text_orientation
gtk_tool_shell_rebuild_menu
gtk_tool_shell_get_text_size_group
<SUBSECTION Standard>
GTK_IS_TOOL_SHELL
@@ -4284,19 +4103,15 @@ gtk_tool_item_set_visible_vertical
gtk_tool_item_get_visible_vertical
gtk_tool_item_set_is_important
gtk_tool_item_get_is_important
gtk_tool_item_get_ellipsize_mode
gtk_tool_item_get_icon_size
gtk_tool_item_get_orientation
gtk_tool_item_get_toolbar_style
gtk_tool_item_get_relief_style
gtk_tool_item_get_text_alignment
gtk_tool_item_get_text_orientation
gtk_tool_item_retrieve_proxy_menu_item
gtk_tool_item_get_proxy_menu_item
gtk_tool_item_set_proxy_menu_item
gtk_tool_item_rebuild_menu
gtk_tool_item_toolbar_reconfigured
gtk_tool_item_get_text_size_group
<SUBSECTION Standard>
GTK_TYPE_TOOL_ITEM
@@ -4461,79 +4276,6 @@ GTK_TOOLTIPS_GET_CLASS
gtk_tooltips_get_type
</SECTION>
<SECTION>
<FILE>gtktoolitemgroup</FILE>
<TITLE>GtkToolItemGroup</TITLE>
GtkToolItemGroup
gtk_tool_item_group_get_collapsed
gtk_tool_item_group_get_drop_item
gtk_tool_item_group_get_ellipsize
gtk_tool_item_group_get_item_position
gtk_tool_item_group_get_n_items
gtk_tool_item_group_get_label
gtk_tool_item_group_get_label_widget
gtk_tool_item_group_get_nth_item
gtk_tool_item_group_get_header_relief
gtk_tool_item_group_insert
gtk_tool_item_group_new
gtk_tool_item_group_set_collapsed
gtk_tool_item_group_set_ellipsize
gtk_tool_item_group_set_item_position
gtk_tool_item_group_set_label
gtk_tool_item_group_set_label_widget
gtk_tool_item_group_set_header_relief
<SUBSECTION Standard>
GtkToolItemGroupClass
GTK_TOOL_ITEM_GROUP
GTK_IS_TOOL_ITEM_GROUP
GTK_TYPE_TOOL_ITEM_GROUP
GTK_TOOL_ITEM_GROUP_CLASS
GTK_IS_TOOL_ITEM_GROUP_CLASS
GTK_TOOL_ITEM_GROUP_GET_CLASS
<SUBSECTION Private>
gtk_tool_item_group_get_type
</SECTION>
<SECTION>
<FILE>gtktoolpalette</FILE>
<TITLE>GtkToolPalette</TITLE>
GtkToolPalette
gtk_tool_palette_new
gtk_tool_palette_get_exclusive
gtk_tool_palette_set_exclusive
gtk_tool_palette_get_expand
gtk_tool_palette_set_expand
gtk_tool_palette_get_group_position
gtk_tool_palette_set_group_position
gtk_tool_palette_get_icon_size
gtk_tool_palette_set_icon_size
gtk_tool_palette_unset_icon_size
gtk_tool_palette_get_style
gtk_tool_palette_set_style
gtk_tool_palette_unset_style
gtk_tool_palette_add_drag_dest
gtk_tool_palette_get_drag_item
gtk_tool_palette_get_drag_target_group
gtk_tool_palette_get_drag_target_item
gtk_tool_palette_get_drop_group
gtk_tool_palette_get_drop_item
GtkToolPaletteDragTargets
gtk_tool_palette_set_drag_source
gtk_tool_palette_get_hadjustment
gtk_tool_palette_get_vadjustment
<SUBSECTION Standard>
GtkToolPaletteClass
GTK_TOOL_PALETTE
GTK_IS_TOOL_PALETTE
GTK_TYPE_TOOL_PALETTE
GTK_TOOL_PALETTE_CLASS
GTK_IS_TOOL_PALETTE_CLASS
GTK_TOOL_PALETTE_GET_CLASS
<SUBSECTION Private>
gtk_tool_palette_get_type
GtkToolPalettePrivate
</SECTION>
<SECTION>
<FILE>gtktooltip</FILE>
<TITLE>GtkTooltip</TITLE>
@@ -4543,7 +4285,6 @@ gtk_tooltip_set_text
gtk_tooltip_set_icon
gtk_tooltip_set_icon_from_stock
gtk_tooltip_set_icon_from_icon_name
gtk_tooltip_set_icon_from_gicon
gtk_tooltip_set_custom
gtk_tooltip_trigger_tooltip_query
gtk_tooltip_set_tip_area
@@ -5075,7 +4816,6 @@ gtk_cell_view_new_with_text
gtk_cell_view_new_with_markup
gtk_cell_view_new_with_pixbuf
gtk_cell_view_set_model
gtk_cell_view_get_model
gtk_cell_view_set_displayed_row
gtk_cell_view_get_displayed_row
gtk_cell_view_get_size_of_row
@@ -5133,14 +4873,6 @@ gtk_cell_renderer_editing_canceled
gtk_cell_renderer_stop_editing
gtk_cell_renderer_get_fixed_size
gtk_cell_renderer_set_fixed_size
gtk_cell_renderer_get_visible
gtk_cell_renderer_set_visible
gtk_cell_renderer_get_sensitive
gtk_cell_renderer_set_sensitive
gtk_cell_renderer_get_alignment
gtk_cell_renderer_set_alignment
gtk_cell_renderer_get_padding
gtk_cell_renderer_set_padding
<SUBSECTION Standard>
GTK_CELL_RENDERER
@@ -5204,23 +4936,6 @@ GtkCellRendererSpinPrivate
gtk_cell_renderer_spin_get_type
</SECTION>
<SECTION>
<FILE>gtkcellrendererspinner</FILE>
<TITLE>GtkCellRendererSpinner</TITLE>
GtkCellRendererSpinner
gtk_cell_renderer_spinner_new
<SUBSECTION Standard>
GTK_TYPE_CELL_RENDERER_SPINNER
GTK_CELL_RENDERER_SPINNER
GTK_CELL_RENDERER_SPINNER_CLASS
GTK_IS_CELL_RENDERER_SPINNER
GTK_IS_CELL_RENDERER_SPINNER_CLASS
GTK_CELL_RENDERER_SPINNER_GET_CLASS
<SUBSECTION Private>
GtkCellRendererSpinnerPrivate
gtk_cell_renderer_spinner_get_type
</SECTION>
<SECTION>
<FILE>gtkcellrendererpixbuf</FILE>
<TITLE>GtkCellRendererPixbuf</TITLE>
@@ -5263,9 +4978,6 @@ gtk_cell_renderer_toggle_get_radio
gtk_cell_renderer_toggle_set_radio
gtk_cell_renderer_toggle_get_active
gtk_cell_renderer_toggle_set_active
gtk_cell_renderer_toggle_get_activatable
gtk_cell_renderer_toggle_set_activatable
<SUBSECTION Standard>
GTK_CELL_RENDERER_TOGGLE
GTK_IS_CELL_RENDERER_TOGGLE
@@ -5395,7 +5107,6 @@ gtk_viewport_set_hadjustment
gtk_viewport_set_vadjustment
gtk_viewport_set_shadow_type
gtk_viewport_get_shadow_type
gtk_viewport_get_bin_window
<SUBSECTION Standard>
GTK_VIEWPORT
GTK_IS_VIEWPORT
@@ -5697,29 +5408,6 @@ gtk_widget_trigger_tooltip_query
gtk_widget_get_snapshot
gtk_widget_get_window
gtk_widget_get_allocation
gtk_widget_set_allocation
gtk_widget_get_app_paintable
gtk_widget_get_can_default
gtk_widget_set_can_default
gtk_widget_get_can_focus
gtk_widget_set_can_focus
gtk_widget_get_double_buffered
gtk_widget_get_has_window
gtk_widget_set_has_window
gtk_widget_get_sensitive
gtk_widget_is_sensitive
gtk_widget_get_state
gtk_widget_get_visible
gtk_widget_set_visible
gtk_widget_has_default
gtk_widget_has_focus
gtk_widget_has_grab
gtk_widget_is_drawable
gtk_widget_is_toplevel
gtk_widget_set_window
gtk_widget_set_receives_default
gtk_widget_get_receives_default
<SUBSECTION>
gtk_requisition_copy
gtk_requisition_free
@@ -5793,6 +5481,7 @@ gtk_window_set_deletable
gtk_window_set_frame_dimensions
gtk_window_set_has_frame
gtk_window_set_mnemonic_modifier
gtk_window_set_role
gtk_window_set_type_hint
gtk_window_set_skip_taskbar_hint
gtk_window_set_skip_pager_hint
@@ -5804,7 +5493,6 @@ gtk_window_set_role
gtk_window_get_decorated
gtk_window_get_deletable
gtk_window_get_default_icon_list
gtk_window_get_default_icon_name
gtk_window_get_default_size
gtk_window_get_destroy_with_parent
gtk_window_get_frame_dimensions
@@ -5826,7 +5514,6 @@ gtk_window_get_urgency_hint
gtk_window_get_accept_focus
gtk_window_get_focus_on_map
gtk_window_get_group
gtk_window_get_window_type
gtk_window_move
gtk_window_parse_geometry
gtk_window_reshow_with_initial_size
@@ -6007,9 +5694,6 @@ gtk_style_lookup_icon_set
gtk_style_render_icon
gtk_style_get_font
gtk_style_set_font
gtk_style_get_style_property
gtk_style_get_valist
gtk_style_get
gtk_draw_hline
gtk_draw_vline
gtk_draw_shadow
@@ -6046,7 +5730,6 @@ gtk_paint_polygon
gtk_paint_shadow
gtk_paint_shadow_gap
gtk_paint_slider
gtk_paint_spinner
gtk_paint_string
gtk_paint_tab
gtk_paint_vline
@@ -6077,7 +5760,6 @@ GTK_TYPE_BORDER
<SUBSECTION Private>
gtk_style_get_type
gtk_border_get_type
GtkThemeEngine
</SECTION>
<SECTION>
@@ -6165,7 +5847,6 @@ gtk_selection_data_targets_include_image
gtk_selection_data_targets_include_text
gtk_selection_data_targets_include_uri
gtk_selection_data_targets_include_rich_text
gtk_selection_data_get_selection
gtk_selection_data_get_data
gtk_selection_data_get_length
gtk_selection_data_get_data_type
@@ -6184,6 +5865,7 @@ gtk_selection_data_free
GTK_TYPE_SELECTION_DATA
GTK_TYPE_TARGET_LIST
<SUBSECTION Private>
gtk_selection_data_copy
gtk_selection_data_get_type
gtk_target_list_get_type
</SECTION>
@@ -6444,7 +6126,6 @@ gtk_binding_set_add_path
<TITLE>Standard Enumerations</TITLE>
GtkAccelFlags
GtkAnchorType
GtkArrowPlacement
GtkArrowType
GtkAttachOptions
GtkButtonBoxStyle
@@ -6507,7 +6188,6 @@ GTK_STOCK_ADD
GTK_STOCK_APPLY
GTK_STOCK_BOLD
GTK_STOCK_CANCEL
GTK_STOCK_CAPS_LOCK_WARNING
GTK_STOCK_CDROM
GTK_STOCK_CLEAR
GTK_STOCK_CLOSE
@@ -6747,7 +6427,6 @@ gtk_print_operation_set_print_settings
gtk_print_operation_get_print_settings
gtk_print_operation_set_job_name
gtk_print_operation_set_n_pages
gtk_print_operation_get_n_pages_to_print
gtk_print_operation_set_current_page
gtk_print_operation_set_use_full_page
gtk_print_operation_set_unit
@@ -6757,17 +6436,9 @@ gtk_print_operation_set_track_print_status
gtk_print_operation_set_custom_tab_label
gtk_print_operation_run
gtk_print_operation_cancel
gtk_print_operation_draw_page_finish
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_operation_set_embed_page_setup
gtk_print_operation_get_embed_page_setup
gtk_print_run_page_setup_dialog
GtkPageSetupDoneFunc
gtk_print_run_page_setup_dialog_async
@@ -6812,16 +6483,8 @@ 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
gtk_print_unix_dialog_set_embed_page_setup
gtk_print_unix_dialog_get_embed_page_setup
gtk_print_unix_dialog_get_page_setup_set
GtkPrintCapabilities
gtk_print_unix_dialog_set_manual_capabilities
gtk_print_unix_dialog_get_manual_capabilities
<SUBSECTION Standard>
GTK_TYPE_PRINT_UNIX_DIALOG
@@ -6864,7 +6527,6 @@ gtk_printer_has_details
gtk_printer_request_details
gtk_printer_get_capabilities
gtk_printer_get_default_page_size
gtk_printer_get_hard_margins
GtkPrinterFunc
gtk_enumerate_printers
@@ -6943,21 +6605,12 @@ gtk_print_settings_set_n_copies
GTK_PRINT_SETTINGS_NUMBER_UP
gtk_print_settings_get_number_up
gtk_print_settings_set_number_up
GtkNumberUpLayout
GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT
gtk_print_settings_get_number_up_layout
gtk_print_settings_set_number_up_layout
GTK_PRINT_SETTINGS_RESOLUTION
gtk_print_settings_get_resolution
gtk_print_settings_set_resolution
gtk_print_settings_set_resolution_xy
GTK_PRINT_SETTINGS_RESOLUTION_X
gtk_print_settings_get_resolution_x
GTK_PRINT_SETTINGS_RESOLUTION_Y
gtk_print_settings_get_resolution_y
GTK_PRINT_SETTINGS_PRINTER_LPI
gtk_print_settings_get_printer_lpi
gtk_print_settings_set_printer_lpi
GTK_PRINT_SETTINGS_SCALE
gtk_print_settings_get_scale
gtk_print_settings_set_scale
@@ -7049,10 +6702,8 @@ gtk_paper_size_to_key_file
<SUBSECTION Standard>
GTK_TYPE_PAPER_SIZE
<SUBSECTION Private>
gtk_paper_size_get_type
gtk_custom_paper_unix_dialog_get_type
</SECTION>
@@ -7222,23 +6873,3 @@ GTK_TYPE_MOUNT_OPERATION
gtk_mount_operation_get_type
GtkMountOperationPrivate
</SECTION>
<SECTION>
<FILE>gtkorientable</FILE>
<TITLE>Orientable</TITLE>
GtkOrientable
gtk_orientable_get_orientation
gtk_orientable_set_orientation
<SUBSECTION Standard>
GtkOrientableIface
GTK_IS_ORIENTABLE
GTK_IS_ORIENTABLE_CLASS
GTK_ORIENTABLE
GTK_ORIENTABLE_CLASS
GTK_ORIENTABLE_GET_IFACE
GTK_TYPE_ORIENTABLE
<SUBSECTION Private>
gtk_orientable_get_type
</SECTION>

View File

@@ -0,0 +1,51 @@
.\" ** 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.

View File

@@ -8,7 +8,6 @@ gtk_accel_map_get_type
gtk_accessible_get_type
gtk_action_get_type
gtk_action_group_get_type
gtk_activatable_get_type
gtk_adjustment_get_type
gtk_alignment_get_type
gtk_arrow_get_type
@@ -29,7 +28,6 @@ gtk_cell_renderer_get_type
gtk_cell_renderer_pixbuf_get_type
gtk_cell_renderer_progress_get_type
gtk_cell_renderer_spin_get_type
gtk_cell_renderer_spinner_get_type
gtk_cell_renderer_text_get_type
gtk_cell_renderer_toggle_get_type
gtk_cell_view_get_type
@@ -49,7 +47,6 @@ gtk_curve_get_type
gtk_dialog_get_type
gtk_drawing_area_get_type
gtk_editable_get_type
gtk_entry_buffer_get_type
gtk_entry_completion_get_type
gtk_entry_get_type
gtk_event_box_get_type
@@ -74,7 +71,6 @@ 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
@@ -83,7 +79,6 @@ 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
@@ -101,12 +96,10 @@ gtk_menu_shell_get_type
gtk_menu_tool_button_get_type
gtk_message_dialog_get_type
gtk_misc_get_type
gtk_mount_operation_get_type
gtk_notebook_get_type
gtk_object_get_type
gtk_old_editable_get_type
gtk_option_menu_get_type
gtk_orientable_get_type
gtk_page_setup_get_type
gtk_page_setup_unix_dialog_get_type
gtk_paned_get_type
@@ -147,7 +140,6 @@ gtk_settings_get_type
gtk_size_group_get_type
gtk_socket_get_type
gtk_spin_button_get_type
gtk_spinner_get_type
gtk_statusbar_get_type
gtk_status_icon_get_type
gtk_style_get_type
@@ -168,8 +160,6 @@ gtk_toggle_tool_button_get_type
gtk_toolbar_get_type
gtk_tool_button_get_type
gtk_tool_item_get_type
gtk_tool_item_group_get_type
gtk_tool_palette_get_type
gtk_tooltips_get_type
gtk_tree_drag_dest_get_type
gtk_tree_drag_source_get_type

View File

@@ -1,6 +1,6 @@
This directory contains a collection of images of various widgets.
They are created via the shooter command in gtk+/docs/tools/, and are
updated semi-regularly. The images are used in both the headers of
This directory contains a collection of images of various widgets. They
are created via the shooter command in gtk+/docs/tools/, and are
updated semi-regularly. The images are used in both the headers of
individual widgets as well as the visual index of widgets.
There are a number of other images in this directory as well.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Some files were not shown because too many files have changed in this diff Show More