Compare commits

...

233 Commits

Author SHA1 Message Date
Matthias Clasen 8dd94a9008 2.12.9
svn path=/branches/gtk-2-12/; revision=19766
2008-03-12 06:10:20 +00:00
Matthias Clasen 80140dcbb2 Updates
svn path=/branches/gtk-2-12/; revision=19765
2008-03-12 05:39:21 +00:00
Vladimer Sichinava 619ba1523d Some fixes
svn path=/branches/gtk-2-12/; revision=19764
2008-03-12 02:31:37 +00:00
Matthias Clasen c7583f3773 Use g_ascii_formatd when formatting custom paper sizes, since cups doesn't
2008-03-11  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c: Use
        g_ascii_formatd when formatting custom paper sizes, since
        cups doesn't handle , as decimal separator.  (#521548)



svn path=/branches/gtk-2-12/; revision=19763
2008-03-12 01:36:35 +00:00
Vladimer Sichinava baa373e64a Some fixes
svn path=/branches/gtk-2-12/; revision=19761
2008-03-12 01:26:57 +00:00
Tor Lillqvist ecebf9ed1d Bug 469868 - Filenames with colon ":" are not saved correctly
2008-03-11  Tor Lillqvist  <tml@novell.com>

	Bug 469868 - Filenames with colon ":" are not saved correctly

	* gtk/gtkfilechooserentry.c (insert_text_callback)
	(delete_text_callback) [Win32]: New functions to make sure that
	colons used otherwise than as a separator after a drive letter, or
	characters that are always illegal in file names, are rejected on
	input. This means that the GTK+ file chooser can't be used to
	input full names of alternate data streams, but oh well. There are
	still more checks that could be done on the file names, see the
	bug report. But this will do for now.
	(_gtk_file_chooser_entry_init) [Win32]: Connect above functions.


svn path=/branches/gtk-2-12/; revision=19760
2008-03-11 23:54:38 +00:00
Djihed Afifi f8816994fc Updated Arabic Translation by Djihed Afifi.
svn path=/branches/gtk-2-12/; revision=19759
2008-03-11 22:21:54 +00:00
Djihed Afifi bc0c483119 Updated Arabic Translation by Djihed Afifi.
svn path=/branches/gtk-2-12/; revision=19758
2008-03-11 22:20:29 +00:00
Claudio Saavedra f1d8efe4a0 Set a GDK_ERROR_CORRUPT_IMAGE error if the loader is closed while still
2008-03-11  Claudio Saavedra  <csaavedra@alumnos.utalca.cl>

	* io-bmp.c: (gdk_pixbuf__bmp_image_stop_load): Set a
	GDK_ERROR_CORRUPT_IMAGE error if the loader is closed while
	still reading the headers.  (#505085)


svn path=/branches/gtk-2-12/; revision=19755
2008-03-11 21:00:42 +00:00
Claudio Saavedra 415bfe39e4 Check for the BMP header magic numbers before decoding it. (#505085)
2008-03-11  Claudio Saavedra  <csaavedra@alumnos.utalca.cl>

        * io-bmp.c: (DecodeHeader): Check for the BMP header magic numbers
        before decoding it.  (#505085)


svn path=/branches/gtk-2-12/; revision=19754
2008-03-11 20:51:09 +00:00
Alberto Ruiz bd12de15d5 Merged from trunk:
2008-03-11  Alberto Ruiz  <aruiz@gnome.org>

	Merged from trunk:

  * gtk/gtkcombobox.c (gtk_combo_box_size_allocate):
	Take thickness into account in the size allocation of the child widgets in
	list mode.
	Fixes #521442


svn path=/branches/gtk-2-12/; revision=19748
2008-03-11 13:51:55 +00:00
Wouter Bolsterlee 309b86b222 reviewed by: Matthias Clasen <mclasen@redhat.com>
2008-03-10  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	reviewed by: Matthias Clasen  <mclasen@redhat.com>

	* modules/printbackends/cups/gtkprintbackendcups.c
	(cups_get_user_options):

	Bug 469210 – Honor CUPS user default options for GtkPrint

	Correctly iterate over filename list, avoiding a
	critical warning/crash.

svn path=/branches/gtk-2-12/; revision=19741
2008-03-10 08:56:14 +00:00
Kjartan Maraas 0f7b37bfe1 Updated Norwegian bokmål translation.
2008-03-09  Kjartan Maraas  <kmaraas@gnome.org>

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

svn path=/branches/gtk-2-12/; revision=19739
2008-03-09 13:31:34 +00:00
Petr Kovář d936efe384 Updated Czech translation.
svn path=/branches/gtk-2-12/; revision=19737
2008-03-08 23:35:31 +00:00
Baris Cicek 5157187347 Updated Turkish Translation
svn path=/branches/gtk-2-12/; revision=19736
2008-03-08 20:14:10 +00:00
Alberto Ruiz 080557e033 Merged from trunk:
2008-03-07  Alberto Ruiz  <aruiz@gnome.org>

	Merged from trunk:

	* modules/engines/ms-windows/msw_style.c (draw_shadow):
	Do not draw frame if parent if combobox.
	(draw_box):
	Uses scrollbar width system metrics for combobox button.
	Fixes #461805 for XP theme engine.


svn path=/branches/gtk-2-12/; revision=19734
2008-03-08 07:32:08 +00:00
Federico Mena Quintero f6e00fcc3b Fix ChangeLog
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19729
2008-03-07 04:03:38 +00:00
Federico Mena Quintero 8dab597810 bgo505857 - GtkFileChooserDialog ensures its default response
2008-03-06  Federico Mena Quintero  <federico@novell.com>

	Merged from trunk:

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=505857 -
	GtkFileChooserDialog should set a default response button if the
	app doesn't set it.  Based on a patch by Chris Wang <chris.wang@sun.com>.

	* gtk/gtkfilechooserdialog.c (is_stock_accept_response_id): New
	function, refactor from where there was duplicated code.
	(gtk_file_chooser_dialog_new_valist): If the response ID for the
	button is one of the stock ones, make it the default response
	button.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19728
2008-03-07 03:58:32 +00:00
Gil Forcada Codinachs 1f30863ca5 Updated Catalan translation by David Planella
svn path=/branches/gtk-2-12/; revision=19717
2008-03-06 08:11:58 +00:00
Alberto Ruiz aadae9561d Add --disable-cups option. (#513826, Alberto Ruiz)
2008-03-04  Alberto Ruiz  <aruiz@gnome.org>
	* configure.in: Add --disable-cups option.
		(#513826, Alberto Ruiz)


svn path=/branches/gtk-2-12/; revision=19716
2008-03-05 17:17:29 +00:00
Matthias Clasen d1cbce98da Honor cups user default options from ~/.cups/lpoptions (#469210, Stijn
2008-03-04  Matthias Clasen  <mclasen@redhat.com>

        * modules/printbackends/cups/gtkprintbackendcups.c:
        Honor cups user default options from ~/.cups/lpoptions
        (#469210, Stijn Hoop)



svn path=/branches/gtk-2-12/; revision=19711
2008-03-05 03:48:51 +00:00
Felix I b839f8c614 updated ta translation
svn path=/branches/gtk-2-12/; revision=19707
2008-03-04 12:25:43 +00:00
Jorge Gonzalez Gonzalez 3bac9cc8a1 Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=19704
2008-03-03 23:59:06 +00:00
Jorge Gonzalez Gonzalez f61bbb2c16 Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=19703
2008-03-03 23:58:31 +00:00
Jorge Gonzalez Gonzalez 92723128db Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=19702
2008-03-03 23:30:42 +00:00
Philip Withnall 140f28ef7d Updated British English translation.
2008-03-03  Philip Withnall  <pwithnall@svn.gnome.org>

	* en_GB.po: Updated British English translation.


svn path=/branches/gtk-2-12/; revision=19701
2008-03-03 22:57:45 +00:00
Carlos Garnacho ececb56172 bgo417389 - Scrollwheel for GtkPathBar
2008-03-03  Carlos Garnacho  <carlos@imendio.com>

	Merged from trunk:

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=417389 - Make the
	scrollwheel work in GtkPathBar.

	* gtk/gtkpathbar.h (struct _GtkPathBar): New field event_window.

	* gtk/gtkpathbar.c (gtk_path_bar_realize): New function.  Create
	an input-only window, event_window, which we'll use to capture
	scroll events.
	(gtk_path_bar_map): Show the event_window under the rest of the
	windows, so it will be a catch-all for unhandled events.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19700
2008-03-03 21:18:57 +00:00
Philip Withnall b16a02e4d3 po-properties/en_GB.po Updated British English translation.
2008-03-03  Philip Withnall  <pwithnall@svn.gnome.org>

	* po-properties/en_GB.po
	* po/en_GB.po: Updated British English translation.


svn path=/branches/gtk-2-12/; revision=19698
2008-03-03 21:14:24 +00:00
Sven Neumann d32b4c4b31 Merged from trunk:
2008-03-03  Sven Neumann  <sven@gimp.org>

	Merged from trunk:

	* gtk/gtkfilechooserbutton.c (G_DEFINE_TYPE_WITH_CODE): fixed a
	typo in the documentation of the GtkFileChooserButtons::file-set
	signal (see bug #353196).

svn path=/branches/gtk-2-12/; revision=19697
2008-03-03 12:36:36 +00:00
Timo Jyrinki d21c62afe6 (just update last translated dates, in case ubuntu has problems importing
because of those)

svn path=/branches/gtk-2-12/; revision=19686
2008-03-02 11:08:20 +00:00
Richard Hult a6d56c1581 Merged from trunk:
2008-03-01  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkprivate-quartz.h:
	* gdk/quartz/gdkwindow-quartz.c: Add debugging code to highlight a
	gdkwindow.

svn path=/branches/gtk-2-12/; revision=19683
2008-03-01 14:21:50 +00:00
Johan Dahlin 7bcdd85f44 Merged from trunk:
2008-02-29  Johan Dahlin  <johan@gnome.org>

        Merged from trunk:

        * gtk/gtkbuilder.c:
        * gtk/gtkbuilderparser.c:
        * gtk/gtkbuilderprivate.h:
        Do not use g_error for a few more errors, instead set
        the GError sent in through add_from_file/add_from_string.
        * tests/buildertest.c:
        Add a couple of new parsing tests.
        (#519199, Pavel Syomin)


svn path=/branches/gtk-2-12/; revision=19682
2008-03-01 13:53:39 +00:00
Nurali Abdurahmonov 9acfc51107 updated uzbek cyrillic translation
svn path=/branches/gtk-2-12/; revision=19680
2008-03-01 05:57:39 +00:00
Nurali Abdurahmonov 3fdeec6bed updated uzbek cyrillic translation
svn path=/branches/gtk-2-12/; revision=19679
2008-03-01 05:52:02 +00:00
Federico Mena Quintero b822a3f120 When refreshing an existing unix folder, turn off its is_finished_loading state
2008-02-29  Federico Mena Quintero  <federico@novell.com>

	Merged from trunk:

	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder): When
	refreshing an existing folder (i.e. when we are about to reload
	its file list), turn off the folder's is_finished_loading flag.
	Otherwise callers which do ::is_finished_loading() followed by
	::list_children() will get nothing.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19678
2008-03-01 02:34:02 +00:00
Åsmund Skjæveland 82feefe954 Updated Norwegian Nynorsk translation.
2008-02-29  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19675
2008-02-29 13:34:05 +00:00
Nickolay V. Shmyrev 56acf81297 Updated Russian translation.
2008-02-28  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation.


svn path=/branches/gtk-2-12/; revision=19674
2008-02-28 23:59:01 +00:00
Åsmund Skjæveland cc79b4cb19 Updated Norwegian Nynorsk translation.
2008-02-28  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19672
2008-02-28 21:26:14 +00:00
Åsmund Skjæveland 1fa00a87fc Updated Norwegian Nynorsk translation.
2008-02-27  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19670
2008-02-27 22:46:48 +00:00
Åsmund Skjæveland a4efc109cc Updated Norwegian Nynorsk translation.
2008-02-27  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19669
2008-02-27 21:54:22 +00:00
Richard Hult 3351655750 Merged from trunk:
2008-02-27  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzView.c:
	* gdk/quartz/GdkQuartzView.h:
	* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_decorations):
	Fix performance regression for borderless transparent windows
	with shadow.

svn path=/branches/gtk-2-12/; revision=19667
2008-02-27 10:55:55 +00:00
Sven Neumann 7a8337feb4 Merged from trunk:
2008-02-27  Sven Neumann  <sven@gimp.org>

	Merged from trunk:

	* gtk/Makefile.am (GTK_PRINT_PREVIEW_COMMAND): when building the
	Quartz backend, use a native Mac OS X application for the print
	preview (bug #518624).

svn path=/branches/gtk-2-12/; revision=19664
2008-02-27 10:01:04 +00:00
Åsmund Skjæveland 93a3cc51eb Updated Norwegian Nynorsk translation.
2008-02-26  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19662
2008-02-26 22:58:01 +00:00
Åsmund Skjæveland 876f6600ec Updated Norwegian Nynorsk translation.
2008-02-26  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19661
2008-02-26 22:01:56 +00:00
Åsmund Skjæveland 4ab6bf34f9 Updated Norwegian Nynorsk translation.
2008-02-26  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19660
2008-02-26 19:04:30 +00:00
Åsmund Skjæveland d9c88a51a1 Updated Norwegian Nynorsk translation.
2008-02-26  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19659
2008-02-26 18:54:39 +00:00
Michael Natterer 145acc18d2 Merged from trunk:
2008-02-26  Michael Natterer  <mitch@imendio.com>

	Merged from trunk:

	* gtk/gtktextbufferserialize.c (parse_info_free): don't g_free()
	the members of info->tag_stack since they are a) gobjects and b)
	not even owned by us, ugh... Fixes crash when deserializing fails.


svn path=/branches/gtk-2-12/; revision=19658
2008-02-26 14:21:41 +00:00
Gabor Keleman 582fd1376b Some quick fixes
svn path=/branches/gtk-2-12/; revision=19653
2008-02-25 23:02:04 +00:00
Gabor Kelemen 339b8ca807 Translation updated
2008-02-25  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated


svn path=/branches/gtk-2-12/; revision=19652
2008-02-25 22:56:05 +00:00
Åsmund Skjæveland 1ec2ccb1b0 Updated Norwegian Nynorsk translation.
2008-02-25  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19651
2008-02-25 21:24:56 +00:00
Matthias Clasen 613e88b80b Fix the build
svn path=/branches/gtk-2-12/; revision=19650
2008-02-25 16:01:34 +00:00
Matthias Clasen 852f235f1e Don't use beagle_query_add_hit_type
svn path=/branches/gtk-2-12/; revision=19648
2008-02-25 15:46:26 +00:00
Matthias Clasen 004651e579 Look for libbeagle.so.1
2008-02-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksearchenginebeagle.c: Look for libbeagle.so.1


svn path=/branches/gtk-2-12/; revision=19647
2008-02-25 15:33:41 +00:00
Richard Hult e425a25b74 Merged from trunk:
2008-02-25  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c
	(_gdk_quartz_events_trigger_crossing_events): Fix build on tiger.

svn path=/branches/gtk-2-12/; revision=19645
2008-02-25 12:50:46 +00:00
Åsmund Skjæveland 468b7f8aa3 Updated Norwegian Nynorsk translation.
2008-02-24  Åsmund Skjæveland  <aasmunds@ulrik.uio.no>

	* nn.po: Updated Norwegian Nynorsk translation.

svn path=/branches/gtk-2-12/; revision=19643
2008-02-24 21:58:17 +00:00
Cody Russell c04a3608e5 Fixed declaration in the middle of a block that was causing compile
2008-02-24  Cody Russell  <bratsche@gnome.org>

        * gdk/win32/gdkwindow-win32.c: Fixed declaration in the middle of
        a block that was causing compile problems on old compilers.
        (#518398, reported by Kazuki IWAMOTO)


svn path=/branches/gtk-2-12/; revision=19642
2008-02-24 20:07:26 +00:00
Gabor Kelemen 08b8313896 Translation updated
2008-02-24  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated


svn path=/branches/gtk-2-12/; revision=19641
2008-02-24 18:09:32 +00:00
Richard Hult 03255fa874 Merged from trunk:
2008-02-24  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzWindow.c: Prevent hidden windows from being
	shown without gdk's control when clicking the dock icon.

svn path=/branches/gtk-2-12/; revision=19640
2008-02-24 18:00:43 +00:00
Richard Hult 9dfc48823f Merged from trunk:
2008-02-24  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkprivate-quartz.h:
	* gdk/quartz/gdkeventloop-quartz.c: (got_fd_activity), (poll_func):
	Use the subtype field for the custom event that is used to wake up
	the mainloop so we can have other custom event types.

	* gdk/quartz/gdkevents-quartz.c:
	(_gdk_quartz_events_trigger_crossing_events):
	* gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Create
	crossing events after showing a window if necessary, to work
	around problems with the tracking rect API.

svn path=/branches/gtk-2-12/; revision=19639
2008-02-24 17:59:01 +00:00
Luca Ferretti 6837e6ca22 Updated Italian translation.
2008-02-23  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.

svn path=/branches/gtk-2-12/; revision=19636
2008-02-23 12:04:17 +00:00
Luca Ferretti 3d2d989079 Updated Italian translation.
2008-02-22  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.

svn path=/branches/gtk-2-12/; revision=19633
2008-02-22 16:59:17 +00:00
Jonh Wendell 6fb50c934c Brazilian Portuguese translation updated by Og Maciel.
2008-02-22  Jonh Wendell  <jwendell@gnome.org>

	* pt_BR.po: Brazilian Portuguese translation updated by Og Maciel.

svn path=/branches/gtk-2-12/; revision=19631
2008-02-22 11:57:25 +00:00
Tor Lillqvist ec021e2f7e Small further change to make it more robust.
svn path=/branches/gtk-2-12/; revision=19627
2008-02-21 16:26:11 +00:00
Tor Lillqvist 5c8107296f Must pass the format string to strftime in the C library's locale's
2008-02-21  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilechooserdefault.c (list_mtime_data_func) [Win32]: Must
	pass the format string to strftime in the C library's locale's
	charset, not the system's. Correspondingly, the return value from
	strftime() is in the C library's locale's charset. (#509885)


svn path=/branches/gtk-2-12/; revision=19624
2008-02-21 12:36:49 +00:00
Richard Hult 2601eff280 Merged from trunk:
2008-02-20  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_decorations): Set
	the right window level and shadow after recreating the window.

	* gdk/quartz/GdkQuartzView.c: (drawRect): Invalidate the shadow if
	necessary after drawing (bug #517338).

svn path=/branches/gtk-2-12/; revision=19623
2008-02-20 20:12:45 +00:00
Richard Hult 15c471f7b8 Merged from trunk:
2008-02-20  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzWindow.c: (showAndMakeKey): Update the
	position after showing the window since the window manager might
	not place it where we requested in the first place.

svn path=/branches/gtk-2-12/; revision=19621
2008-02-20 19:33:36 +00:00
Richard Hult e7a79f9009 Merged from trunk:
2008-02-20  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (show_window_internal),
	(_gdk_quartz_window_detach_from_parent),
	(_gdk_quartz_window_attach_to_parent), (gdk_window_focus): Clear
	the toplevel ordering list in all places where the order is
	potentially changed. Fixes mouse focus issues for windows with
	a transient parent set.

svn path=/branches/gtk-2-12/; revision=19620
2008-02-20 19:31:25 +00:00
Pawan Chitrakar 315842bc0a Updated Translation
svn path=/branches/gtk-2-12/; revision=19618
2008-02-20 07:58:16 +00:00
Ignacio Casal Quinteiro 9f55833bd6 Updated Galician Translation.
svn path=/branches/gtk-2-12/; revision=19616
2008-02-19 17:16:32 +00:00
Johan Dahlin a622849f8e Merged from trunk:
2008-02-17  Johan Dahlin  <johan@gnome.org>

        Merged from trunk:

        * gtk/gtk-builder-convert (GtkBuilderConverter._add_action_from_menuitem): 
        When converting a stock item based on the label, remove the label property.


svn path=/branches/gtk-2-12/; revision=19608
2008-02-17 22:53:29 +00:00
Kjartan Maraas 1255866280 Some more fixes.
2008-02-17  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Some more fixes.

svn path=/branches/gtk-2-12/; revision=19606
2008-02-17 11:15:56 +00:00
Artur Flinta 98e34328dc Updated Polish translation by GNOME PL Team.
2008-02-16  Artur Flinta  <aflinta@gmail.com>

	* pl.po: Updated Polish translation by GNOME PL Team.


svn path=/branches/gtk-2-12/; revision=19601
2008-02-16 17:15:20 +00:00
Richard Hult 9cae0ee065 Merged from trunk:
2008-02-15  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzView.c: Adapt to the change to use frame
	instead of bounds when resizing windows.

svn path=/branches/gtk-2-12/; revision=19600
2008-02-16 09:57:25 +00:00
Richard Hult 885f9d272b Merged from trunk:
2008-02-16  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c (create_scroll_event): Add state
	to the scroll event (bug #516757, Paul Davis).

svn path=/branches/gtk-2-12/; revision=19599
2008-02-16 09:52:49 +00:00
Matthias Clasen 13911b5e62 Prevent a crash with hidden, reorderable tabs. (#513230, Mike Massonnet,
2008-02-15  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_stop_reorder): Prevent
        a crash with hidden, reorderable tabs.  (#513230,
        Mike Massonnet, patch by Carlos Garnacho)


svn path=/branches/gtk-2-12/; revision=19594
2008-02-16 04:13:00 +00:00
Claude Paroz 04d270b317 Updated French translation ("Connect" string).
2008-02-15  Claude Paroz  <claude@2xlibre.net>

	* fr.po: Updated French translation ("Connect" string).

svn path=/branches/gtk-2-12/; revision=19581
2008-02-15 21:10:26 +00:00
Amitakhya Phukan 0a52ff76c4 updated assamese translations
svn path=/branches/gtk-2-12/; revision=19576
2008-02-15 10:37:33 +00:00
Runa Bhattacharjee c89efae603 Added Entry for Kannada Translation Updation by Shankar Prasad
svn path=/branches/gtk-2-12/; revision=19575
2008-02-15 05:34:26 +00:00
Runa Bhattacharjee 01b03a6c0e Updated Kannada Translation by Shankar Prasad
svn path=/branches/gtk-2-12/; revision=19574
2008-02-15 05:33:18 +00:00
Tor Lillqvist b705df8d77 Don't leak Registry key handles. (#516578)
2008-02-15  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilesystemwin32.c (get_viewable_logical_drives): Don't
	leak Registry key handles. (#516578)


svn path=/branches/gtk-2-12/; revision=19573
2008-02-15 00:29:37 +00:00
Richard Hult b3bcb11867 Merged from trunk:
2008-02-14  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (gdk_window_focus): Using
	makeKeyWindow unfortunately doesn't work in all cases, we must use
	makeKeyAndOrderFront.

svn path=/branches/gtk-2-12/; revision=19571
2008-02-14 21:55:51 +00:00
Richard Hult e97aecaf01 Merged from trunk:
2008-02-14  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (get_fullscreen_geometry),
	(gdk_window_hide), (gdk_window_fullscreen),
	(gdk_window_unfullscreen): Make sure we leave fullscreen mode if
	the window is hidden.

svn path=/branches/gtk-2-12/; revision=19570
2008-02-14 21:53:36 +00:00
Richard Hult e06b15eca5 Merged from trunk:
2008-02-14  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzWindow.c: Set frame, not bounds when
	resizing to be consistent and to avoid introducing an internal
	transform in the view.

svn path=/branches/gtk-2-12/; revision=19569
2008-02-14 21:52:20 +00:00
Richard Hult 8ef8a36c71 Merged from trunk:
2008-02-13  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_contents):
	Remove unused variables.
	(gtk_clipboard_set_contents),
	(gtk_clipboard_get_owner), (clipboard_unset),
	(gtk_clipboard_request_targets): Notify the previous clipboard
	owner when the owner changes. Fixes bug #493406.

svn path=/branches/gtk-2-12/; revision=19561
2008-02-13 15:43:50 +00:00
Richard Hult 84b8295d35 Merged from trunk:
2008-02-13  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkcolor-quartz.c: (gdk_colormap_alloc_colors): Fix
	the return value (return number of colors that failed), and handle
	RGBA colormap.
	(gdk_colormap_free_colors): Fix typo in comment.

svn path=/branches/gtk-2-12/; revision=19559
2008-02-13 14:24:46 +00:00
Emmanuele Bassi bb217039a2 Merge from trunk:
2008-02-13  Emmanuele Bassi  <ebassi@gnome.org>

	Merge from trunk:

	* gtk/gtkrecentchoosermenu.c:
	(idle_populate_func), (idle_populate_clean_up): Fix possible
	recursion by resetting the idle source id. (#507605, William
	Pitcock)

svn path=/branches/gtk-2-12/; revision=19555
2008-02-13 09:40:10 +00:00
Sunil Mohan Adapa bdbf92bd55 Updated Telugu translation done by Krishna Babu K <kkrothap@redhat.com>.
2008-02-13  Sunil Mohan Adapa  <sunilmohan@fsf.org.in>

        * te.po: Updated Telugu translation done by
        Krishna Babu K <kkrothap@redhat.com>.


svn path=/branches/gtk-2-12/; revision=19554
2008-02-13 09:22:31 +00:00
Matthias Clasen fc02ca7c8d Bump version
svn path=/branches/gtk-2-12/; revision=19552
2008-02-12 23:30:46 +00:00
Matthias Clasen 32f58034a8 2.12.8
svn path=/branches/gtk-2-12/; revision=19549
2008-02-12 23:24:09 +00:00
Matthias Clasen fac16294ac Updates
svn path=/branches/gtk-2-12/; revision=19548
2008-02-12 22:47:46 +00:00
Matthias Clasen aa84805eb3 Fix some i18n errors. Pointed out by Behdad Esfahbod.
2008-02-12  Matthias Clasen  <mclasne@redhat.com>

        * gtk/gtkpapersize.c:
        * gtk/gtkprintoperation.c:
        * gtk/gtkvolumebutton.c:
        * gtk/gtkbulderparser.c: Fix some i18n errors. Pointed
        out by Behdad Esfahbod.


svn path=/branches/gtk-2-12/; revision=19546
2008-02-12 21:57:41 +00:00
Cody Russell ef31de52c6 Merged from trunk:
2008-02-12  Cody Russell  <bratsche@gnome.org>

        Merged from trunk:

        * gdk/win32/gdkprivate-win32.h
        * gdk/win32/gdkevents-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gdk/win32/gdkwindow-win32.h
        * gdk/win32/gdkwin32.h:
        Modal window rework.  (#455627, #511111, #514643, #514789)


svn path=/branches/gtk-2-12/; revision=19545
2008-02-12 21:29:57 +00:00
Cody Russell fbb07bf75a Merged from trunk:
2008-02-10  Cody Russell  <bratsche@gnome.org>

	Merged from trunk:

        * gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder_uri):
        Check the return value of _gtk_file_chooser_get_file_system () for
        NULL before passing it to gtk_file_system_path_to_uri ().
        (#515667, Francesco Montorsi)


svn path=/branches/gtk-2-12/; revision=19544
2008-02-12 21:05:32 +00:00
Federico Mena Quintero 0ae179e974 Don't focus the file list even when activating a bookmark with a shortcut key
2008-02-12  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkfilechooserdefault.c (switch_to_shortcut): Don't focus
	the file list (this was the last place where we would focus the
	file list explicitly).  If you are in the location entry, for
	example, you don't want Alt-Home to take you to the file list; you
	just want the current folder to change.  Thanks to Olle Bergkvist
	<olle.bergkvist@yahoo.se> for pointing this out in
	http://bugzilla.gnome.org/show_bug.cgi?id=419737#c51.
	(focus_browse_tree_view_if_possible): Removed.

svn path=/branches/gtk-2-12/; revision=19542
2008-02-12 19:25:51 +00:00
Matthias Clasen 4cc03789a6 Skip exensions when selecting filenames in the save-as dialog. (#362516,
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        Skip exensions when selecting filenames in the save-as dialog.
        (#362516, Carlos Garnacho)

        * gtk/gtkfilechooserentry.h:
        * gtk/gtkfilechooserentry.c (_gtk_file_chooser_entry_select_filename):
        New function to skip the extension part when selecting a filename.
        (_gtk_file_chooser_entry_set_base_folder): Use it here.

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_entry_grab_focus):
        ...and here.


svn path=/branches/gtk-2-12/; revision=19541
2008-02-12 17:38:54 +00:00
Matthias Clasen 28f05f2aaa Fix state change reporting for accessibility. (#499835, Rich Burridge,
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkiconview.c: Fix state change reporting for
        accessibility.  (#499835, Rich Burridge, patch by LiYan Zhang)



svn path=/branches/gtk-2-12/; revision=19539
2008-02-12 16:53:17 +00:00
Emmanuele Bassi 2f3adcac97 Merged from trunk:
2008-02-12  Emmanuele Bassi  <ebassi@gnome.org>

	Merged from trunk:

	* gtk/gtkrecentchooser.c:
	(gtk_recent_chooser_class_init): Set the default value of the
	show-not-found property to TRUE, as every implementation sets
	it to TRUE already.

	* gtk/gtkrecentchooserdefault.c:
	(_gtk_recent_chooser_default_init): Sync show_tips to the
	default value of the :show-tips property.

svn path=/branches/gtk-2-12/; revision=19537
2008-02-12 16:42:53 +00:00
Matthias Clasen a21cbfc272 Don't let the width or height go below 1. (#516024, Christian Persch)
2008-02-12  Matthias Clasen  <mclasne@redhat.com>

        * gdk-pixbuf-io.c (at_scale_size_prepared_cb): Don't let
        the width or height go below 1.  (#516024, Christian Persch)



svn path=/branches/gtk-2-12/; revision=19536
2008-02-12 16:38:15 +00:00
Matthias Clasen 2caa0a86ef Unify the handling of various "Enter" keysyms all over the place.
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c: Unify the handling of various "Enter" keysyms
        all over the place.  (#515047, Christian Persch)


svn path=/branches/gtk-2-12/; revision=19532
2008-02-12 16:04:54 +00:00
Kristian Rietveld 8bb6729e21 Merge from trunk:
2008-02-12  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row),
	(gtk_tree_view_real_toggle_cursor_row): guard against people
	deleting the row in question in the selection-changed callback.
	(#514621, Andreas Koehler).


svn path=/branches/gtk-2-12/; revision=19531
2008-02-12 16:00:02 +00:00
Matthias Clasen 011a75e87a Forgotten commit
svn path=/branches/gtk-2-12/; revision=19529
2008-02-12 15:57:09 +00:00
Jorge Gonzalez Gonzalez 6a43975787 Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=19523
2008-02-12 11:03:29 +00:00
Matthias Clasen 71586016d5 Support keynav in status icons. (#473786, Li Yuan)
2008-02-11  Matthias Clasen  <mclasen@redhat.com>

        Support keynav in status icons.  (#473786, Li Yuan)

        * gtk/gtkstatusicon.c: Handle keynav, make the tray icon focusable.

        * gtk/gtktrayicon-x11.c: Draw a focus rectangle when focused.



svn path=/branches/gtk-2-12/; revision=19516
2008-02-12 03:26:11 +00:00
Kristian Rietveld ffdd1deed6 Merge from trunk:
2008-02-11  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	* gtk/gtkcellview.c (gtk_cell_view_cell_layout_reorder)
	* gtk/gtkiconview.c (gtk_icon_view_cell_layout_reorder): plug leak
	wrt. link deletion from list; contination of fix for #503569.


svn path=/branches/gtk-2-12/; revision=19514
2008-02-11 15:09:04 +00:00
Emmanuele Bassi 43f4ac3029 Merge from trunk:
2008-02-11  Emmanuele Bassi  <ebassi@gnome.org>

	Merge from trunk:

	* gtk/gtkrecentchoosermenu.c:
	(gtk_recent_chooser_menu_constructor): Set no-show-all flag
	on the placeholder menu item.

	* tests/testrecentchoosermenu.c: 
	(create_recent_chooser_menu): Use gtk_widget_show_all() to test
	whether the placeholder menu item gets shown.

svn path=/branches/gtk-2-12/; revision=19511
2008-02-11 09:58:29 +00:00
Matthias Clasen 17af886caa Propagate local-only. (#511987, Jonh Wendell)
2008-02-10  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkrecentaction.c: Propagate local-only.  (#511987,
        Jonh Wendell)



svn path=/branches/gtk-2-12/; revision=19506
2008-02-10 06:36:55 +00:00
Matthias Clasen de2bebed70 Try harder to return pixbufs of the requested size. (#494515, Mike
2008-02-10  Matthias Clasen  <mclasne@redhat.com>

        * gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs
        of the requested size.  (#494515, Mike Morrison)


svn path=/branches/gtk-2-12/; revision=19505
2008-02-10 06:30:12 +00:00
Richard Hult aedbca9c4f Merge from trunk:
2008-02-08  Richard Hult  <richard@imendio.com>

	Merge from trunk:

	* gdk/quartz/gdkevents-quartz.c (gdk_event_translate): Ignore the
	delta from the NSEvent for now, generating multiple scroll events
	results in a lot of events getting queued up and things get really
	slow.

svn path=/branches/gtk-2-12/; revision=19500
2008-02-08 19:14:07 +00:00
Sven Herzberg f009c071be Adjust the code to match the documentation, examples, "common sense" and
2008-02-08  Sven Herzberg  <sven@imendio.com>

	Adjust the code to match the documentation, examples, "common sense"
	and existing applications.

	* gtk/gtkaction.c: (_gtk_action_sync_menu_visible): take into account
	that a GtkMenu for a <popup> element doesn't have to have a GtkAction
	assigned


svn path=/branches/gtk-2-12/; revision=19498
2008-02-08 00:29:20 +00:00
Yair Hershkovitz 9bd1afdbf5 updated hebrew translation
svn path=/branches/gtk-2-12/; revision=19495
2008-02-07 23:22:26 +00:00
Ignacio Casal Quinteiro 28a934ec50 Updated Galician Translation.
svn path=/branches/gtk-2-12/; revision=19490
2008-02-07 11:02:11 +00:00
Cody Russell 3b72b601e9 Also check that the window is not mapped.
svn path=/branches/gtk-2-12/; revision=19486
2008-02-06 17:03:06 +00:00
Cody Russell 2cc7978998 Merge from trunk:
2008-02-06  Cody Russell  <bratsche@gnome.org>

	Merge from trunk:

        * gdk/win32/gdkevents-win32.c: Check if the window is a temp window,
        otherwise things get wonky when you click on a menu.  This fixes
        a regression caused in #505928.  Thanks to Tor for spotting this
        one!  (#514789)


svn path=/branches/gtk-2-12/; revision=19483
2008-02-06 16:35:40 +00:00
Matthias Clasen e19fe1750f Allow to store half-open ranges.
2008-02-05  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintsettings.c (gtk_print_settings_get_page_ranges):
        Allow to store half-open ranges.



svn path=/branches/gtk-2-12/; revision=19480
2008-02-06 04:06:47 +00:00
Federico Mena Quintero 1b4619a1ab Fix 419737 and 499940 - Don't focus the file list when activating a shortcut
2008-02-05  Federico Mena Quintero  <federico@novell.com>

	Don't focus the file list when shortcuts get activated.  This
	removes a lot of ambiguity in when the file selection should
	change, and makes the overall code flow simpler.

	This fixes http://bugzilla.gnome.org/show_bug.cgi?id=419737 -
	file/save dialog clears the filename entry when changing
	directories.

	Also fixes http://bugzilla.gnome.org/show_bug.cgi?id=499940 -
	focus should not go to the file list when a shortcut is activated.

	* gtk/gtkfilechooserdefault.c
	(shortcuts_activate_volume_mount_cb): Don't focus the file list
	(shortcuts_activate_get_info_cb): Likewise.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19476
2008-02-05 23:11:46 +00:00
Federico Mena Quintero 04de2d6d9e Merge Josselin's patch for single-click shortcuts from trunk
2008-02-05  Federico Mena Quintero  <federico@novell.com>

	Merged from trunk (patch by Josselin Mouette <joss@malsain.org>):

	reviewed by: Federico Mena Quintero

	* gtk/gtkfilechooserdefault.c: (shortcuts_append_paths),
	(shortcuts_add_bookmarks), (shortcuts_selection_changed_cb),
	(shortcuts_list_create), (gtk_file_chooser_default_should_respond):
	Make the shortcuts activate with a single click. (#148828)
        Fix a few things affected by the change:
	  - Set selection mode to GTK_SELECTION_SINGLE to allow a case
	    where no shortcut is selected.
	  - Don't activate a shortcut in the response callback.
	  - Filter out duplicate entries in volumes and bookmarks to
	    avoid the selection to change when reordering them with DnD.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19475
2008-02-05 23:11:32 +00:00
Matthias Clasen 88f4a4fb15 Merge from trunk:
2008-02-05  Matthias Clasen  <mclasen@redhat.com>

        Merge from trunk:

        * gtk/updateiconcache.c: Ignore images in the toplevel theme
        directory, avoiding one source of invalid caches that
        has been spotted in the wild.

        * gtk/updateiconcache.c: Install a printerr handler that
        prepends the program name, since gtk-update-icon-cache output
        often appears in the middle of other output, e.g. rpm
        update logs.



svn path=/branches/gtk-2-12/; revision=19468
2008-02-05 22:24:07 +00:00
Cody Russell 26cafb1ecc More style improvements
svn path=/branches/gtk-2-12/; revision=19460
2008-02-03 05:12:23 +00:00
Leonardo Ferreira Fontenelle 3353b00d41 Brazilian Portuguese translation updated by Luiz Armesto.
2008-02-02  Leonardo Ferreira Fontenelle  <leonardof@svn.gnome.org>

	* pt_BR.po: Brazilian Portuguese translation updated by Luiz Armesto.

svn path=/branches/gtk-2-12/; revision=19459
2008-02-02 17:42:56 +00:00
Ignacio Casal Quinteiro 18a60d65f0 Updated Galician Translation.
svn path=/branches/gtk-2-12/; revision=19458
2008-02-02 14:31:32 +00:00
Ignacio Casal Quinteiro ad218f70c3 Updated Galician Translation.
svn path=/branches/gtk-2-12/; revision=19457
2008-02-02 14:09:02 +00:00
Cody Russell ad09810cda Merge from trunk:
2008-02-01  Cody Russell  <cody@jhu.edu>

        Merge from trunk:

        * modules/engines/ms-windows/xp_theme.[ch]
        * modules/engines/ms-windows/xp_theme_defs.h
        * modules/engines/ms-windows/msw_rc_style.c
        * modules/engines/ms-windows/msw_theme_main.c
        * modules/engines/ms-windows/msw_style.c: Re-indented and generally
        attempted to stylize more like the rest of the gtk+ stack's code.


svn path=/branches/gtk-2-12/; revision=19456
2008-02-01 23:25:54 +00:00
Sven Neumann 09a6b649f8 gdk/directfb/gdkdrawable-directfb.c gdk/directfb/gdkimage-directfb.c
2008-02-01  Sven Neumann  <sven@gimp.org>

	* gdk/directfb/gdkdrawable-directfb.c
	* gdk/directfb/gdkimage-directfb.c
	* gdk/directfb/gdkinput-directfb.c
	* gdk/directfb/gdkpixmap-directfb.c
	* gdk/directfb/gdkwindow-directfb.c: applied
	directfb-deprecation-fixes.patch from Debian. Fixes build with
	GLib 2.15 deprecation of G_GNUC_FUNCTION in favor of G_STRLOC.

svn path=/branches/gtk-2-12/; revision=19453
2008-02-01 10:34:47 +00:00
Cody Russell 4152cd0cc9 Merge from trunk:
2008-01-31  Cody Russell  <bratsche@gnome.org>

        Merge from trunk:

        * gdk/win32/gdkevents-win32.c:
        Refactored some of the window hiding/showing code from
        WM_ACTIVATE to WM_SIZE and WM_SYSCOMMAND.  Having this
        under WM_ACTIVATE was causing the application to go into
        a weird state when the user right-clicked on the taskbar
        entry of a window that was minimized.  (#505928)


svn path=/branches/gtk-2-12/; revision=19452
2008-01-31 22:42:11 +00:00
Cody Russell dd5f8231d7 Merge from trunk:
2008-01-31  Cody Russell  <bratsche@gnome.org>

        Merge from trunk:

        * gtk/gtkpaned.c (gtk_paned_set_position):
        Change queue_resize() to queue_draw(), and add a check for
        child2 != NULL in case someone calls this before there is
        a child packed in there.  (#144269 again)


svn path=/branches/gtk-2-12/; revision=19450
2008-01-31 17:56:34 +00:00
Richard Hult 26078768ee Merge from trunk, except for the reverting since that part wasn't applied
2008-01-31  Richard Hult  <richard@imendio.com>

	Merge from trunk, except for the reverting since that part wasn't
	applied here yet:

	* gdk/quartz/GdkQuartzView.c: Another attempt at fixing focus
	issues with undecorated windows. Revert the change done on
	2008-01-25 and fix it by using the view's bounds instead. The
	bounds will always be up to date when setting up the tracking
	rect, so this should be more robust.

svn path=/branches/gtk-2-12/; revision=19446
2008-01-31 15:20:53 +00:00
Marcel Telka b352f2acf0 Updated Slovak translation by Pavol Šimo.
2008-01-31  Marcel Telka  <marcel@telka.sk>

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

svn path=/branches/gtk-2-12/; revision=19442
2008-01-31 08:49:58 +00:00
Marcel Telka 156c9836ac Updated Slovak translation by Pavol Šimo.
2008-01-31  Marcel Telka  <marcel@telka.sk>

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

svn path=/branches/gtk-2-12/; revision=19441
2008-01-31 08:47:18 +00:00
Nikos Charonitakis 4d31da4bcb Updated Greek translation
svn path=/branches/gtk-2-12/; revision=19437
2008-01-31 00:22:50 +00:00
Nikos Charonitakis 31fa0a3957 Updated Greek translation
svn path=/branches/gtk-2-12/; revision=19436
2008-01-31 00:22:10 +00:00
Daniel Nylander d811b99ef0 sv.po: Updated Swedish translation
svn path=/branches/gtk-2-12/; revision=19435
2008-01-30 23:57:39 +00:00
Matthias Clasen dd673b1f62 Bump version
svn path=/branches/gtk-2-12/; revision=19430
2008-01-30 04:38:23 +00:00
Matthias Clasen 12845f1238 2.12.7
svn path=/branches/gtk-2-12/; revision=19428
2008-01-30 04:14:39 +00:00
Matthias Clasen 0e2a177730 Bump version
svn path=/branches/gtk-2-12/; revision=19425
2008-01-29 04:40:22 +00:00
Matthias Clasen f9d78657c9 2.12.6
svn path=/branches/gtk-2-12/; revision=19423
2008-01-29 04:38:48 +00:00
Matthias Clasen dc4d1e7b32 Updates
svn path=/branches/gtk-2-12/; revision=19422
2008-01-29 02:31:08 +00:00
Matthias Clasen 6aad7e6ca2 Bump version
svn path=/branches/gtk-2-12/; revision=19421
2008-01-28 19:46:23 +00:00
Paolo Borelli 1d56123af5 do not leak the pango layout, fixes #512375.
2008-01-28  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtkprintunixdialog.c (draw_page_cb): do not leak the pango
	layout, fixes #512375.


svn path=/branches/gtk-2-12/; revision=19420
2008-01-28 16:06:47 +00:00
Ihar Hrachyshka f68def9b26 Reverted previous changes for be.po.
svn path=/branches/gtk-2-12/; revision=19412
2008-01-27 15:15:14 +00:00
Petr Kovář e55bb28ea3 cs.po: Updated Czech translation.
svn path=/branches/gtk-2-12/; revision=19409
2008-01-25 20:55:04 +00:00
Johan Dahlin f46e13b2ca Merge from trunk:
2008-01-25  Johan Dahlin  <johan@gnome.org>

	Merge from trunk:

	* gtk/gtk-builder-convert
	(GtkBuilderConverter._convert_adjustment): Handle the case where
	there is no child text node.
	(GtkBuilderConverter): Allow xml comments in most places.

	* gtk/gtk-builder-convert
	(GtkBuilderConverter._convert_combobox_items): Remove the items
	even if there are no items set.
	(GtkBuilderConverter._add_action_from_menuitem): Convert toggled
	signals and tooltips for all menu items subclasses and 
	GtkImageMenuItem:label. 
	Makes it possible to fully convert and run Jokosher.glade.

	* gtk/gtkwidget.c: (gtk_widget_buildable_interface_init),
	(gtk_widget_buildable_get_internal_child), (free_action),
	(free_relation), (gtk_widget_buildable_parser_finished),
	(accessibility_start_element),
	(gtk_widget_buildable_custom_tag_start),
	(gtk_widget_buildable_custom_finished):
	Implement accessible support, fixes #454653.

	* gtk/gtk-builder-convert:
	Add support for migrating old glade files
	
	* tests/buildertest.c: (test_widget), (test_file):
	Add accessible tests and imprve the test_file function to display
	toplevels and run dialogs.


svn path=/branches/gtk-2-12/; revision=19407
2008-01-25 19:52:15 +00:00
Stéphane Raimbault 0345180108 Updated French translation.
svn path=/branches/gtk-2-12/; revision=19397
2008-01-25 08:11:15 +00:00
Sven Herzberg cc7b318d33 Merge from trunk:
2008-01-25  Sven Herzberg  <sven@imendio.com>

	Merge from trunk:

	Reviewed by Johan Dahlin.

	* gtk/gtkuimanager.c (gtk_ui_manager_remove_ui): emit a warning if
	this is called with something that's not a GtkUIManager


svn path=/branches/gtk-2-12/; revision=19396
2008-01-25 01:08:40 +00:00
Ihar Hrachyshka a53b4f690c Backported Belarusian translation from gtk-2.14
svn path=/branches/gtk-2-12/; revision=19390
2008-01-21 00:19:27 +00:00
Yang Zhang ff1a375f1c Updated zh_CN translation from manphiz
svn path=/branches/gtk-2-12/; revision=19388
2008-01-19 14:41:30 +00:00
Yang Zhang 788911254d Updated zh_CN translation from manphiz, backport from trunk
svn path=/branches/gtk-2-12/; revision=19387
2008-01-19 14:10:14 +00:00
Johan Dahlin 2d3b39f09e Merge from trunk:
2008-01-18  Johan Dahlin  <johan@gnome.org>

	Merge from trunk:

	* gtk/gtk-builder-convert (get_property_node): New method
	(GtkBuilderConverter._create_object): Conditionally take a node as
	a property value, so don't lose translate/context attributes if they
	are set. 
	(GtkBuilderConverter._add_action_from_menuitem): Send in Node as
	property values instead of strings.
	(#509153, Erik van Pienbroek)


svn path=/branches/gtk-2-12/; revision=19384
2008-01-18 16:11:00 +00:00
Andre Klapper 91591f61d0 Unbreak the build caused by adding si.po to ALL_LINGUAS.
2008-01-13  Andre Klapper  <a9016009@gmx.de>

	* si.po: Unbreak the build caused by adding si.po 
	to ALL_LINGUAS.


svn path=/branches/gtk-2-12/; revision=19363
2008-01-14 06:59:47 +00:00
Andre Klapper 1d63787d59 add Kannada (kn) and Sinhala (si) to ALL_LINGUAS.
2008-01-12  Andre Klapper  <a9016009@gmx.de>

	* configure.in: add Kannada (kn) and Sinhala (si) to ALL_LINGUAS.


svn path=/branches/gtk-2-12/; revision=19355
2008-01-12 13:23:28 +00:00
Cody Russell c1928d9215 Merge from trunk:
2008-01-10  Cody Russell  <bratsche@gnome.org>

	Merge from trunk:

	* gdk/win32/gdkwindow-win32.c: (gdk_window_set_transient_for),
	Properly ref/unref windows and parents.  (#506769)


svn path=/branches/gtk-2-12/; revision=19345
2008-01-10 21:03:02 +00:00
Richard Hult 5d99b24899 Merged from trunk:
2008-01-10  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (show_window_internal),
	(gdk_window_hide), (move_resize_window_internal): Move the
	tracking rect workaround from here...

	* gdk/quartz/GdkQuartzWindow.c:
	* gdk/quartz/GdkQuartzWindow.h: ...to here, and ignore window
	movements during showing/hiding operations. Fixes bug #508516.

svn path=/branches/gtk-2-12/; revision=19343
2008-01-10 19:50:56 +00:00
Priit Laes 44ba0ec85a Translation updated by Ivar Smolin
2008-01-10  Priit Laes  <plaes at svn dot gnome dot org>

	* et.po: Translation updated by Ivar Smolin

svn path=/branches/gtk-2-12/; revision=19338
2008-01-10 13:16:31 +00:00
Kristian Rietveld f8ce259ffd Merge from trunk:
2008-01-10  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	* gtk/gtktreeview.c (gtk_tree_view_motion_draw_column_motion_arrow),
	(_gtk_tree_view_column_start_drag): fully initialize GdkWindowAttr to
	avoid valgrind warnings.  (#507751, patch from Christian Persch).


svn path=/branches/gtk-2-12/; revision=19337
2008-01-10 10:40:57 +00:00
Kristian Rietveld 1817e87aaf Merge from trunk:
2008-01-10  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_get_path): Fix
	a leak of the path (#504611, patch from Sadrul Habib Chowdhury).


svn path=/branches/gtk-2-12/; revision=19336
2008-01-10 10:39:47 +00:00
Kristian Rietveld 04c303be84 Merge from trunk (omitted unit test updates):
2008-01-10  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk (omitted unit test updates):

	Fix #477175, reported by Juri Pakaste.

	* gtk/gtktreeprivate.h:
	* gtk/gtktreeview.c (gtk_tree_view_top_row_to_dy): do not set
	tree_view->priv->dy here directly, just calculate the new value
	and set it on the adjustment,
	(gtk_tree_view_adjustment_changed): add guards to not call
	gtk_tree_view_dy_to_top_row() if we are currently in
	gtk_tree_view_top_row_to_dy(),
	(gtk_tree_view_put): fix coordinate annotation: these are bin_window
	coordinates, not tree coordinates,
	(gtk_tree_view_real_start_editing): add cast.


svn path=/branches/gtk-2-12/; revision=19335
2008-01-10 10:38:40 +00:00
Johan Dahlin 3391a567ba Merged from trunk:
2007-01-06  Johan Dahlin  <johan@gnome.org>

	Merged from trunk:

	* gtkbuilder.c: remove concept of root objects and just refcount
	all objects in the builder.  Fixes #496651.

	* docs/reference/gtk/tmpl/gtkbuildable.sgml: add clarification stating
	that the construct_child function is responsible for returning a
	reference.
	* gtkbuilder.c (_gtk_builder_construct): remove g_object_ref() for
	objects from constructors
	* gtkuimanager.c (gtk_ui_manager_buildable_construct_child): add
	g_object_ref() to this construction function (it's the only
	implementer in GTK)

	Fixes #496645.


svn path=/branches/gtk-2-12/; revision=19334
2008-01-10 10:20:49 +00:00
Matthias Clasen 32937cbc50 2.12.5
svn path=/branches/gtk-2-12/; revision=19328
2008-01-09 05:23:35 +00:00
Kjartan Maraas 73dd6eced9 Small additions
svn path=/branches/gtk-2-12/; revision=19327
2008-01-08 15:57:58 +00:00
Matthias Clasen 930f8598b3 Bump version
svn path=/branches/gtk-2-12/; revision=19326
2008-01-08 14:51:38 +00:00
Matthias Clasen 147542f4c9 2.12.4
svn path=/branches/gtk-2-12/; revision=19324
2008-01-08 14:41:07 +00:00
Matthias Clasen ef090e9bd1 Updates
svn path=/branches/gtk-2-12/; revision=19323
2008-01-08 04:15:34 +00:00
Matthias Clasen fe41c67383 Be more robust when removing the current page. (#499951, Andreas Sandberg)
2008-01-07  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkassistant.c (remove_page): Be more robust when removing
        the current page.  (#499951, Andreas Sandberg)

2

svn path=/branches/gtk-2-12/; revision=19322
2008-01-08 03:52:22 +00:00
Johan Dahlin d2f20c569b Merged from trunk:
2007-01-06  Johan Dahlin  <johan@gnome.org>

	Merged from trunk:

	* gtk/gtk-builder-convert (GtkBuilderConverter._strip_root): 
	Make sure that --root works for toplevel widgets.
	(#491847, Phil Lello)


svn path=/branches/gtk-2-12/; revision=19310
2008-01-06 02:22:30 +00:00
Michael Natterer 681d09c445 Merged from trunk:
2008-01-04  Michael Natterer  <mitch@imendio.com>

	Merged from trunk:

	* gdk/x11/gdkinput-x11.c (_gdk_device_get_history): don't forget
	to set the time in the returned GdkTimeCoords.


svn path=/branches/gtk-2-12/; revision=19305
2008-01-04 16:22:30 +00:00
Emmanuele Bassi 90df66719e Backport from trunk
2008-01-03  Emmanuele Bassi  <ebassi@gnome.org>

	Backport from trunk

	* gtk/gtkfilechooserdefault.c (recent_sort_mru): Use the
	correct comparison function (kudos to Christian Persch and
	Claudio Saavedra for spotting this).

	* gtk/gtkrecentchooserutils.c:
	(sort_recent_items_mru),
	(sort_recent_items_lru): Ditto as above.

svn path=/branches/gtk-2-12/; revision=19303
2008-01-03 12:43:00 +00:00
Tor Lillqvist 688bcfb9af Remove fuzzy marker for the metadata entry (the first one, for the string
2008-01-03  Tor Lillqvist  <tml@novell.com>

	* io.po: Remove fuzzy marker for the metadata entry (the first
	one, for the string ""), as having that fuzzy crashes msgfmt from
	gettext 0.17, at least for me.


svn path=/branches/gtk-2-12/; revision=19301
2008-01-03 12:15:48 +00:00
Priit Laes caf185f203 Translation updated by Ivar Smolin
2008-01-02  Priit Laes  <plaes at svn dot gnome dot org>

	* et.po: Translation updated by Ivar Smolin

svn path=/branches/gtk-2-12/; revision=19297
2008-01-01 22:58:49 +00:00
Priit Laes cc7e25a8c5 Translation updated by Ivar Smolin
2008-01-02  Priit Laes  <plaes at svn dot gnome dot org>

	* et.po: Translation updated by Ivar Smolin

svn path=/branches/gtk-2-12/; revision=19296
2008-01-01 22:58:18 +00:00
Johannes Schmid 7a7b67d9af Also reorder menu when reordering tabs by drag & drop
2007-12-30  Johannes Schmid <jhs@gnome.org>

        * gtk/gtknotebook.c: (gtk_notebook_stop_reorder):
        Also reorder menu when reordering tabs by drag & drop

        * tests/testnotebookdnd.c: (create_notebook_with_notebooks):
        Add a menu to one of the notebooks to have a test-case for
        the change mentioned above.


svn path=/branches/gtk-2-12/; revision=19293
2007-12-31 15:26:47 +00:00
Christian Persch c098ad9322 Plug a mem leak. Bug #506107.
2007-12-31  Christian Persch  <chpe@gnome.org>

	* gtk/gtkprintunixdialog.c: (gtk_print_unix_dialog_get_property):
	Plug a mem leak. Bug #506107.

svn path=/branches/gtk-2-12/; revision=19291
2007-12-31 00:04:48 +00:00
Johan Dahlin e990e263ee Merged from trunk:
2007-12-28  Johan Dahlin  <johan@gnome.org>

	Merged from trunk:

	* gtk/gtkdialog.c (gtk_dialog_buildable_custom_finished)
	(gtk_dialog_buildable_custom_tag_start): Chain up. 
	This makes it possible to have accelerators tags on GtkDialog 
	subclasses.


svn path=/branches/gtk-2-12/; revision=19269
2007-12-28 10:38:40 +00:00
Matthias Clasen 13714d2bf9 Fix 0<>NULL confusion in gtk_signal_connect... defines. (#505708, MINAMI
2007-12-27  Matthias Clasen  <mclasen@redhat.com>

        * gkt/gtksignal.h: Fix 0<>NULL confusion in gtk_signal_connect...
        defines.  (#505708,  MINAMI Hirokazu)



svn path=/branches/gtk-2-12/; revision=19254
2007-12-28 03:50:22 +00:00
Inaki Larranaga Murgoitio 26bfe50bda Updated Basque translation.
2007-12-27  Inaki Larranaga Murgoitio  <dooteo@euskalgnu.org>

        * eu.po: Updated Basque translation.


svn path=/branches/gtk-2-12/; revision=19250
2007-12-27 15:21:06 +00:00
Inaki Larranaga Murgoitio 74bc175ff8 Updated Basque translation.
2007-12-27  Inaki Larranaga Murgoitio  <dooteo@euskalgnu.org>

        * eu.po: Updated Basque translation.


svn path=/branches/gtk-2-12/; revision=19249
2007-12-27 15:19:04 +00:00
Jorge Gonzalez Gonzalez eda5bfe265 Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=19233
2007-12-24 10:59:07 +00:00
Cody Russell 8a41c27cf0 Merged from trunk:
2007-12-23  Cody Russell  <bratsche@gnome.org>

	Merged from trunk:

        * gdk/win32/gdkevents-win32.c (show_window_recurse): Check that
        the window is mapped before setting SW_RESTORE or SW_MINIMIZE.
        Fixes a regression caused by #164537 patch where transient
        windows that are hidden get shown (incorrectly) when their
        parents are minimized. (#504984)


svn path=/branches/gtk-2-12/; revision=19232
2007-12-23 21:18:14 +00:00
Xan Lopez 555fe02158 pass correct argument to g_signal_emit for TEST_EXPAND_ROW (GtkTreeIter*
2007-12-23  Xan Lopez  <xan@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_build_tree): pass correct argument
	to g_signal_emit for TEST_EXPAND_ROW (GtkTreeIter* vs. GtkTreeIter**).

	Patch by Sadrul Habib Chowdhury (#504804)


svn path=/branches/gtk-2-12/; revision=19226
2007-12-23 01:29:15 +00:00
Seán de Búrca 421e584e60 Updated Irish translation.
2007-12-22  Seán de Búrca  <sdeburca@svn.gnome.org>

    * ga.po: Updated Irish translation.

svn path=/branches/gtk-2-12/; revision=19220
2007-12-22 10:01:07 +00:00
Richard Hult 1527fc1dc5 Merged from trunk:
2007-12-21  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_destroy):
	Plug leak of destroyed subviews, fixes bug #504753.

svn path=/branches/gtk-2-12/; revision=19219
2007-12-21 20:23:35 +00:00
Johan Dahlin 322dea23ec Merge from trunk: Refactor to avoid some duplication. Convert toplevel
2007-12-20  Johan Dahlin  <johan@gnome.org>

	Merge from trunk:
	* gtk/gtk-builder-convert (GtkBuilderConverter._remove_window): 
	Refactor to avoid some duplication.
	Convert toplevel GtkMenu's top popups and not menubars in the ui manager.
	Fixes #504749, Yuri Pimenov


svn path=/branches/gtk-2-12/; revision=19214
2007-12-20 23:54:28 +00:00
Seán de Búrca 9c9a94d7d1 Updated Irish translation.
2007-12-20  Seán de Búrca  <sdeburca@svn.gnome.org>

    * ga.po: Updated Irish translation.

svn path=/branches/gtk-2-12/; revision=19212
2007-12-20 19:42:56 +00:00
Richard Hult ea100431e6 Merged from trunk:
2007-12-20  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzWindow.c:
	* gdk/quartz/GdkQuartzWindow.h: Make manual resizing smoother by
	processing events after changing the size.

svn path=/branches/gtk-2-12/; revision=19207
2007-12-20 13:32:58 +00:00
Kristian Rietveld 4f80d8cad3 Merge from trunk.
2007-12-17  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk.

	* gtk/gtktooltip.c (gtk_tooltip_finalize),
	(gtk_tooltip_set_last_window): use a weak pointer to set last_window
	to NULL as soon as it's destroyed.  (#496546, patch from
	Benjamin Berg).


svn path=/branches/gtk-2-12/; revision=19194
2007-12-17 22:49:10 +00:00
Daniel Nylander a7f987efde sv.po: Swedish translation updated
svn path=/branches/gtk-2-12/; revision=19193
2007-12-17 18:20:08 +00:00
Daniel Nylander 38f0b9edb7 sv.po: Swedish translation updated
svn path=/branches/gtk-2-12/; revision=19191
2007-12-17 18:13:21 +00:00
Mathias Hasselmann 10a9738f66 Prevent assertion failure in gtk_paned_find_neighbours. (#503824,
Sébastien Granjoux)

* gtk/gtkpaned.c: Call gtk_container_forall instead of
gtk_container_foreach in get_child_panes.

svn path=/branches/gtk-2-12/; revision=19187
2007-12-16 19:24:01 +00:00
Xan Lopez 0df9c38c7c Merged from trunk:
2007-12-15  Xan Lopez  <xan.lopez@nokia.com>

	Merged from trunk:

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_reorder):

	Plug leak: When reordering the info in the list the old node is
	removed but not freed. (#503569)



svn path=/branches/gtk-2-12/; revision=19185
2007-12-15 11:25:54 +00:00
Sebastian Dröge 761534e891 Merged from trunk: Use u32 instead of __u32 and u8 instead of __u8 as the
Merged from trunk:
* gdk/directfb/gdkcursor-directfb.c: (gdk_cursor_new_for_display):
Use u32 instead of __u32 and u8 instead of __u8 as the other types
are deprecated since DirectFB 1.0.0. If compiling with an older
version define the new type name to the old types. Fixes bug #503190.

svn path=/branches/gtk-2-12/; revision=19183
2007-12-15 05:01:43 +00:00
Kostas Papadimas d75204ce72 Updated Greek translation
svn path=/branches/gtk-2-12/; revision=19158
2007-12-11 15:51:40 +00:00
Richard Hult 109aa20ac8 Merged from trunk:
2007-12-10  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkdrawable-quartz.c:
	(gdk_quartz_drawable_get_context),
	(gdk_quartz_drawable_release_context):
	* gdk/quartz/gdkeventloop-quartz.c: (gdk_event_prepare),
	(gdk_event_check), (gdk_event_dispatch), (poll_func):
	* gdk/quartz/gdkwindow-quartz.h: Replace the autorelease pools
	used for each drawing context and in prepare, dispatch and poll
	with one that exists across each main loop iteration. Fixes leaks
	on leopard and protects against future leaks introduce when the
	underlying system changes again (bug #492977).

svn path=/branches/gtk-2-12/; revision=19150
2007-12-10 20:25:07 +00:00
Richard Hult 1b0b68823f Merged from trunk:
2007-12-10  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
	Fix the check for no changes to position and size.

svn path=/branches/gtk-2-12/; revision=19148
2007-12-10 19:51:20 +00:00
Richard Hult 2967e14fd2 Merged from trunk:
2007-12-10  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/GdkQuartzView.c: Ignore drawRect calls with zero
	sized areas at (0, 0), patch from Paul Davis.

svn path=/branches/gtk-2-12/; revision=19146
2007-12-10 19:39:53 +00:00
Richard Hult 4b944e5ceb Merged from trunk:
2007-12-10  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkprivate-quartz.h: 
	* gdk/quartz/gdkeventloop-quartz.c:
	(_gdk_quartz_event_loop_get_pending),
	(_gdk_quartz_event_loop_check_pending),
	(_gdk_quartz_event_loop_release_event), (gdk_event_prepare),
	(gdk_event_check), (gdk_event_dispatch):
	* gdk/quartz/gdkevents-quartz.c: (gdk_events_pending)
	(_gdk_events_queue): Fix a bug where we could end up trying to
	handle the same event more than once. Based on patch from Paul
	Davis.

svn path=/branches/gtk-2-12/; revision=19144
2007-12-10 19:17:45 +00:00
Tor Lillqvist 359f67ff92 Merged from trunk:
2007-12-10  Tor Lillqvist  <tml@novell.com>

	Merged from trunk:

	* gtk-zip.sh.in: Include bin/gtk-builder-convert in the dev
	package. (#502850)


svn path=/branches/gtk-2-12/; revision=19142
2007-12-10 14:29:06 +00:00
Matthias Clasen f24bc05f6f Another fix to avoid further fallout from the fix for bug 388321.
2007-12-10  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_real_remove): Another fix
        to avoid further fallout from the fix for bug 388321.



svn path=/branches/gtk-2-12/; revision=19140
2007-12-10 06:21:51 +00:00
Matthias Clasen ac65b919f6 Fix the spinguard logic for big buffers. (#494667, Ed Catmur)
2007-12-09  Matthias Clasen  <mclasen@redhat.com>

        * io-jpeg.c: Fix the spinguard logic for big buffers.
        (#494667, Ed Catmur)


svn path=/branches/gtk-2-12/; revision=19136
2007-12-09 18:56:27 +00:00
Matthias Clasen 5af07304e6 Don't leak pixbufs. (#502250, Yevgen Muntyan)
2007-12-07  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Don't
        leak pixbufs.  (#502250, Yevgen Muntyan)


svn path=/branches/gtk-2-12/; revision=19129
2007-12-07 18:58:08 +00:00
Richard Hult 9cbebf285b Merged from trunk:
2007-12-06  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c:
	(synthesize_crossing_events_for_ns_event): Fix warning when
	switching spaces in leopard.

svn path=/branches/gtk-2-12/; revision=19120
2007-12-06 12:44:16 +00:00
Matthias Clasen bc9f7d7d8b Bump version
svn path=/branches/gtk-2-12/; revision=19114
2007-12-04 21:16:02 +00:00
Matthias Clasen c29a297737 2.12.3
svn path=/branches/gtk-2-12/; revision=19112
2007-12-04 20:36:21 +00:00
Matthias Clasen 9fde410c97 Updates
2007-12-04  Matthias Clasen  <mclasen@redhat.com>

        * NEWS: Updates



svn path=/branches/gtk-2-12/; revision=19111
2007-12-04 19:16:09 +00:00
Richard Hult 5e439f2306 Merged from trunk:
2007-12-04  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c: (_gdk_windowing_window_init):
	Fully initialize the root window, fixes bug #501583.

svn path=/branches/gtk-2-12/; revision=19110
2007-12-04 19:10:19 +00:00
Matthias Clasen 6a6b25c93b Modify the tab-label-destroy fix to not crash epiphany.
2007-12-04  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c: Modify the tab-label-destroy fix to not
        crash epiphany.


svn path=/branches/gtk-2-12/; revision=19108
2007-12-04 18:44:55 +00:00
Richard Hult 4c1bab5db8 Merged from trunk:
2007-12-03  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gtk/gtkquartz.c: (_gtk_quartz_set_selection_data_for_pasteboard):
	Don't crash when dragging from a source that doesn't support uri
	lists (bug #499868, Paul Davis).

svn path=/branches/gtk-2-12/; revision=19103
2007-12-03 19:53:56 +00:00
Richard Hult 4e99673620 Merged from trunk:
2007-12-03  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c:
	(gdk_window_impl_quartz_begin_paint_region): Don't crash when a
	parent relative bg pixmap is set, and no parent has a bg
	pixmap. Fixes bug #500804.

svn path=/branches/gtk-2-12/; revision=19101
2007-12-03 19:37:17 +00:00
Seán de Búrca 00caaf8b51 Updated Irish translation.
2007-12-02  Seán de Búrca  <sdeburca@svn.gnome.org>

    * ga.po: Updated Irish translation.

svn path=/branches/gtk-2-12/; revision=19097
2007-12-02 22:09:15 +00:00
Cody Russell 0e9c362952 Merged from trunk:
2007-12-1  Cody Russell  <bratsche@gnome.org>

	Merged from trunk:

	* gtk/gtkpaned.c: (gtk_paned_set_position) [Win32]:      
	On Windows, queue a redraw of child2 whenever we set
	the pane handle position.  This is unfortunately kind
	of hacky, but solves the visual artifacts that were
	occuring on at least certain types of child widgets
	(e.g., text views and tree views) that are inside
	horizontal or vertical panes. (#144269)


svn path=/branches/gtk-2-12/; revision=19096
2007-12-01 22:33:56 +00:00
Stéphane Raimbault 7ec6657e4a Fixed French translation.
2007-11-28  Stéphane Raimbault  <stephane.raimbault@gmail.com>

	* fr.po: Fixed French translation.

svn path=/branches/gtk-2-12/; revision=19089
2007-11-28 08:56:19 +00:00
Priit Laes 21e70a8aee Translation updated by Ivar Smolin.
2007-11-28  Priit Laes  <plaes@svn.gnome.org>

	* et.po: Translation updated by Ivar Smolin.

svn path=/branches/gtk-2-12/; revision=19088
2007-11-28 07:23:18 +00:00
Priit Laes 69d039dfb0 Translation updated by Ivar Smolin.
2007-11-28  Priit Laes  <plaes@svn.gnome.org>

	* et.po: Translation updated by Ivar Smolin.

svn path=/branches/gtk-2-12/; revision=19087
2007-11-28 07:22:39 +00:00
Seán de Búrca 0ce517a221 Updated Irish translation
2007-11-27  Seán de Búrca  <sdeburca@svn.gnome.org>

    * ga.po: Updated Irish translation

svn path=/branches/gtk-2-12/; revision=19086
2007-11-28 06:16:16 +00:00
Tor Lillqvist c209b1c750 Merged from trunk:
2007-11-28  Tor Lillqvist  <tml@novell.com>

	Merged from trunk: 

	A proper build of GNU libintl is supposed to export the variable
	_nl_msg_cat_cntr. configure looks for that variable in order to
	recognize GNU gettext. If it sees that it is indeed GNU gettext
	that is used, it decides to install message catalogs in
	share/locale, otherwise in lib/locale. Until now on Windows I have
	built GTK+ against a build of GNU gettext that did not export
	_nl_msg_cat_cntr. But this will change, so we can't assume message
	catalogs are always in lib/locale.

	* gtk/gtkmain.c: (_gtk_get_localedir) [Win32]: Rework to handle
	GTK_LOCALEDIR being either in "lib" or "share". Move the function
	before the inclusion of gtkprivate.h so that it sees the original
	GTK_LOCALEDIR.

	* gtk-zip.sh.in: Check whether the message catalogs are in
	share/locale or lib/locale.

	* config.h.win32.in: Tack on "/share/locale" to GTK_LOCALEDIR so
	that the code in _gtk_get_localedir() will find the slashes.


svn path=/branches/gtk-2-12/; revision=19085
2007-11-28 01:16:48 +00:00
Tor Lillqvist 0937798f0e Merged from trunk: Fix #375893, patch by Ben Hague:
2007-11-28  Tor Lillqvist  <tml@novell.com>

	Merged from trunk: Fix #375893, patch by Ben Hague:

	* gtk/gtkfilesystemwin32.c (get_viewable_logical_drives): Wrapper
	around GetLogicalDrives() that takes also the viewable drive
	restrictions in the Registry (which are usually the result of an
	Active Directory Group Policy) into account.

	(check_volumes, gtk_file_system_win32_list_volumes) Call
	get_viewable_logical_drives() instead of GetLogicalDrives().


svn path=/branches/gtk-2-12/; revision=19080
2007-11-27 22:32:27 +00:00
Matthias Clasen e9a0d2a444 Zero some variables to silence valgrind. (#495124, Morten Welinder)
2007-11-27  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkwindow.c (gtk_window_move_resize): Zero some
        variables to silence valgrind.  (#495124, Morten Welinder)


svn path=/branches/gtk-2-12/; revision=19078
2007-11-27 18:16:59 +00:00
Mart Raudsepp 3dcb893b4b Merged from trunk:
2007-11-27  Mart Raudsepp  <leio@gentoo.org>

        Merged from trunk:

        * tests/buildertest.c: (test_window): fix invalid free

svn path=/branches/gtk-2-12/; revision=19076
2007-11-27 16:21:25 +00:00
Matthias Clasen b78cefa20b Bump version
svn path=/branches/gtk-2-12/; revision=19069
2007-11-26 20:54:52 +00:00
Matthias Clasen 37e471289f 2.12.2
svn path=/branches/gtk-2-12/; revision=19067
2007-11-26 20:52:44 +00:00
Matthias Clasen 13c588303f Fix up some doc comments
svn path=/branches/gtk-2-12/; revision=19065
2007-11-26 20:13:27 +00:00
Matthias Clasen 10df3fe5ea Updates
svn path=/branches/gtk-2-12/; revision=19064
2007-11-26 19:34:47 +00:00
Matthias Clasen 26a6bcd73b Use $CUPS_CONFIG instead of hardcoded cups-config. (#495574, Richard Hult)
2007-11-26  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Use $CUPS_CONFIG instead of hardcoded cups-config.
        (#495574, Richard Hult)


svn path=/branches/gtk-2-12/; revision=19063
2007-11-26 19:07:45 +00:00
Matthias Clasen 310b25767c Short-circuit on destroy. (gtk_notebook_destroy): Destroy tab_label
2007-11-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_update_labels): Short-circuit on
        destroy.
        (gtk_notebook_destroy): Destroy tab_label widgets. (#388321, Morten
        Welinder)


svn path=/branches/gtk-2-12/; revision=19060
2007-11-26 18:23:16 +00:00
Matthias Clasen 61ae384fcc Improve alternative button ordering. (#476827, Yevgen Muntyan, patch by
2007-11-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkassistant.c: Improve alternative button
        ordering.  (#476827, Yevgen Muntyan, patch by Carlos Garnacho)


svn path=/branches/gtk-2-12/; revision=19058
2007-11-26 18:17:21 +00:00
Matthias Clasen 9c262a1e27 Fix a theming problem with colors in GtkCalendar. (#499703, Michael
2007-11-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkcalendar.c: Fix a theming problem with colors
        in GtkCalendar.  (#499703, Michael Hofmann)


svn path=/branches/gtk-2-12/; revision=19056
2007-11-26 17:43:07 +00:00
Matthias Clasen 7d02f89099 Don't use guint8 for bitfields, since some compilers choke on that.
2007-11-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserbutton.c:
        * gtk/gtktoolbar.c: Don't use guint8 for bitfields, since
        some compilers choke on that.  (#467722)


svn path=/branches/gtk-2-12/; revision=19052
2007-11-26 17:12:18 +00:00
Tor Lillqvist 66c3f0984b Use the monitor the window currently is on, not always the primary
2007-11-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_fullscreen): Use the
	monitor the window currently is on, not always the primary
	monitor. (#463865, Tim Evans)


svn path=/branches/gtk-2-12/; revision=19046
2007-11-25 22:57:32 +00:00
Matthias Clasen d393a037d9 Fix a typo. (#498922)
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_set_show_expanders): Fix a
        typo.  (#498922)


svn path=/branches/gtk-2-12/; revision=19040
2007-11-25 06:09:47 +00:00
Seán de Búrca c005046c17 Updated Irish translation.
2007-11-24  Seán de Búrca  <sdeburca@svn.gnome.org>

    * ga.po: Updated Irish translation.

svn path=/branches/gtk-2-12/; revision=19037
2007-11-24 22:46:09 +00:00
Matthias Clasen 9c6e62a231 Merged from trunk:
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        Merged from trunk:

        * modules/printbackends/cups/gtkcupsutils.c: Fix a casting problem.
        (#485662, patch by Herbert Valerio Riedel)



svn path=/branches/gtk-2-12/; revision=19031
2007-11-22 06:17:58 +00:00
Matthias Clasen 42c6c0516f Merged from trunk:
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        Merged from trunk:

        * gtk/gtktextiter.c: Fix an aliasing problem.  (#347585, Ed Catmur)



svn path=/branches/gtk-2-12/; revision=19030
2007-11-22 06:16:35 +00:00
Matthias Clasen d6279caadd Merged from trunk:
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        Merged from trunk:

        * tests/testrichtext.c (setup_buffer): Fix C89 compilation issue.
        (#467711, The Written Word)



svn path=/branches/gtk-2-12/; revision=19029
2007-11-22 06:15:04 +00:00
Matthias Clasen 6a13e3d82b Merged from trunk:
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        Merged from trunk:

        * gtk/gtktoolbar.c: Fix the default value of the toolbar-style
        property.  (#489782, Jan Janech)



svn path=/branches/gtk-2-12/; revision=19028
2007-11-22 06:13:23 +00:00
Matthias Clasen 7306716d4a Merged from trunk:
2007-11-22  Matthias Clasen  <mclasen@redhat.com>

        Merged from trunk:

        * gtk/gtkimage.c (animation_timeout): Avoid drawing one too many
        frames.  (#107398, Owen Taylor, Miguel Gomez)



svn path=/branches/gtk-2-12/; revision=19027
2007-11-22 06:11:46 +00:00
Matthias Clasen 1818a9cb06 Add branch marker
svn path=/branches/gtk-2-12/; revision=19026
2007-11-22 06:08:23 +00:00
316 changed files with 81190 additions and 78223 deletions
+1209
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -4,7 +4,7 @@ Prerequisites
GTK+ requires the following packages:
- The GLib, Pango, ATK and cairo libraries, available at the same
location as GTK+. GTK+ 2.12.1 requires at least GLib 2.12,
location as GTK+. GTK+ 2.12.9 requires at least GLib 2.12,
Pango 1.13, ATK 1.9 and cairo 1.2.
- The TIFF, PNG, and JPEG image loading libraries. You most
@@ -20,8 +20,8 @@ GTK+ requires the following packages:
Simple install procedure
========================
% gzip -cd gtk+-2.12.1.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.12.1 # change to the toplevel directory
% gzip -cd gtk+-2.12.9.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.12.9 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK+
[ Become root if necessary ]
+219
View File
@@ -1,3 +1,222 @@
Overview of Changes from GTK+ 2.12.8 to 2.12.9
==============================================
* Bugs fixed:
505085 crash in Image Viewer: I opened file name.bmp, ...
469210 Honor CUPS user default options for GtkPrint
507605 [patch] gtk_recent_files_menu_populate() does not guard p...
513230 Crash when using _set_tab_reorderable but tabs are hidden
519199 Segmentation fault on unknown widget in UI-file
521548 printing does not work for Custom PageSize
461805 The combo cell renderer is broken theme wise
493406 GtkEntry doesn't get unselected when tabbing out of it
509885 crash when browsing for other folders
513826 configure script has no option to override cups check
516578 gtkfilesystemwin32 leaks registry key handles
516757 gdk/quartz scroll events don't send state
517338 Borderless non-opaque windows get incorrectly drawn shadow
518398 gdkwindow-win32.c: variable is declared at middle of block
518624 bad default for GTK_PRINT_PREVIEW_COMMAND on Mac OS X
521442 x/y thickness is being overriden by the combobox realize ...
417389 Scrollwheel on path bar
469868 Filenames with colon ":" are not saved correctly
505857 filepath entered in location bar should be loaded after u...
353196 Add a file-set signal to GtkFileChooserButton
* Updated translations:
Arabic (ar)
Assamese (as)
British English (en_GB)
Spanish (es)
French (fr)
Hungarian (hu)
Italian (it)
Kannada (kn)
Norwegian bokmål (nb)
Nepali (ne)
Norwegian Nynorsk (nn)
Brazilian Portugese (pt_BR)
Russian (ru)
Tamil (ta)
Telugu (te)
Turkish (tr)
Uzbek (uz@cyrillic)
Overview of Changes from GTK+ 2.12.7 to 2.12.8
==============================================
* Make the directfb backend build with GLib 2.15
* Improve the handling of modal windows on win32
* GtkFileChooser:
- Activate bookmarks on single-click
- Improve some focus handling issues
- Don't select filename extensions in the save dialog
* Bugs fixed:
499835 No "object:state-changed:selected" event when [un]selecti...
516024 filechooser critical warning when loading thumbnail pixbufs
144269 GtkHPaned flickers and leaves widgets in child panels unr...
419737 File save dialog deletes/empties filename when changing d...
148828 Side Pane in File Selector requires double-click
455627 Keyboard input gets confused with modal windows
473786 Needs keyboard navigation for gtkstatusicon
494515 GdkPixbufLoader does not always return an image at the si...
499940 Focus shouldn't go to file list when selecting a bookmark
503569 Leak in GtkTreeViewColumn
505928 Right-clicking taskbar entry for minimized window causes ...
511111 [Win32] Modal dialogs should affect the entire applicatio...
511987 filter is not working
514621 Crash when changing model while handling GtkTreeSelection...
514643 Hiding a modal window still causes its parents to be blocked
514789 Clicking a menu in a maximized windowcauses it to restore...
515047 check for all return/space keys consistently
515667 gtk_file_chooser_get_current_folder_uri does not check fo...
362516 File extensions should not be selected by default
* Updated translations:
Greek (el)
Spanish (es)
Galician (gl)
Hebrew (he)
Brazilian Portugese (pt_BR)
Slovak (sk)
Swedish (sv)
Overview of Changes from GTK+ 2.12.5 to 2.12.6
==============================================
* GtkBuilder supports accessibility properties and
relations now
* Bugs fixed:
506769 GtkCellRendererCombo fails for 2.12.3 under Windows
477175 gtk_tree_view_set_cursor doesn't scroll the treeview corr...
496645 dubious refcounting in GtkBuilder
496651 gtkbuilder should refcount everything
504611 A small leak fix
507751 Conditional jump or move depends on uninitialised value(s)
508516 Re-showing a hidden window results in wrong window position
509153 Menu items don't get translated when using GtkBuilder
512375 draw_page_cb leaks the pango context
454653 GtkBuilder accessibility support
* Updated translations:
Belarusian (be)
Czech (cs)
Estonian (et)
French (fr)
Sinhala (si)
Overview of Changes from GTK+ 2.12.3 to 2.12.5
==============================================
* Bugs fixed:
494667 gdkpixloader jpeg loader problems with some files
496546 Tooltips may crashe because a window is destroyed
503824 gtk_paned_find_neighbours aborts with assertion failure
388321 gtk_notebook_remove_tab_label
503190 Doesn't build with directfb >= 1.0
491847 gtk-builder-convert --root option doesn't work for GtkWin...
492977 Setup autorelease pool automatically in each mainloop ite...
499951 GtkAssistant remove_page may leave current_page as a dang...
502250 Leak in gtkfilechooserdefault.c:shortcuts_reload_icons()
503569 Leak in GtkTreeViewColumn
504753 Destroyed subviews are not removed from the view hierarchy
504804 Typo in TEST_EXPAND_ROW signal
504984 Problems with hiding/showing transient windows
505708 compatibility macros for signals has wrong type.
506107 mem leak in print dialogue
502850 gtk-builder-convert program not found
504749 gtk-builder-convert and GtkMenu
* Updated translations:
Greek (el)
Spanish (es)
Estonian (et)
Basque (eu)
Irish (ga)
Swedish (sv)
Overview of Changes from GTK+ 2.12.2 to 2.12.3
==============================================
* Win32:
- Respect viewable drive restrictions
* Bugs fixed:
499868 fix for crash during DnD on Quartz
500804 null pointer dereference in quartz drawing function
144269 GtkHPaned flickers and leaves widgets in child panels unr...
495124 Valgrind error with windows of type GTK_WINDOW_POPUP
501583 Root window not fully initialized
* Updated translations:
Estonian (et)
French (fr)
Irish (ga)
Overview of Changes from GTK+ 2.12.1 to 2.12.2
==============================================
* Bugs fixed:
494776 text file with html causes lockeup
482531 firefox crashed on print preview [@IA__gdk_window_get_top...
488918 gtkbuilder cannot resolve type in turkish locale
347585 segv in gtk_text_iter_ends_line with gcc 4.1.1 -finline-f...
479463 gtk-builder-convert fails to convert glade files generate...
164537 Non-modal transient dialogs should iconify with parent
371036 Win32: Raise modal children dialogs when clicking parent ...
388321 gtk_notebook_remove_tab_label
405178 GTK_DIALOG_MODAL not working with gtk_message_dialog_new
461222 gtk_builder_get_type_from_name() docs could be better
467711 tests/testrichtext.c fails to build on HP-UX 10.20
467722 Invalid bit-field types for AIX 4.3.3 compiler
468793 GtkBuilder ignores <signal> after <child>
473813 Events on the title bar "punch through" sometimes
476827 Wrong button order in GtkAssistant
485662 [gutsy] getting "Error Printing: Too many failed attempts...
486369 Copy and Paste doesn't work
486420 Allow empty property node values
487954 Buttons with relief set to 'none' should draw a focus rect
488017 gdkevents-win32.c: variable is declared at middle of block
488051 Bad cursor movement when tags override visibility
489370 Stacking order for child windows not implemented
491207 gtk_text_buffer_delete_interactive() robustness against c...
492117 ../gdk/quartz/GdkQuartzWindow.h:32: error: ISO C++ forbid...
492209 The expander demo moves the whole window on the first click
493404 Shift-tab not working in leopard
495574 cups-config hardcoded in configure check
495769 useless (i think) delayed_properties hashtable
496689 GtkAboutDialog "name" property deprecation not explained ...
497164 use text_buffer_get_insert everywhere
499703 Text color of the calendar widget wrong for dark background
107398 One too many frame updates for GIF animations?
463865 gtk/gdk_window_fullscreen always uses the primary monitor
489782 Two different default values for toolbar-style property i...
490624 Can we have gtk-error-bell set to FALSE by default on Win...
496734 No constant gtk_check_version return value
496795 GtkTreeStore in a GtkBuilder XML file cannot set column t...
498922 show-expanders code has impossible test
467490 allow multi-file DnD with gtk-osx/quartz
497102 Small patch for textview internals
* Updated translations:
- Arabic (ar)
- Belarusian Latin (be@latin)
- Estonian (et)
- Finnish (fi)
- Irish (ga)
- Norwegian bokmål (nb)
- Slovenian (sl)
Overview of Changes from GTK+ 2.12.0 to 2.12.1
==============================================
+1 -1
View File
@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 2.12.1. GTK+ is a multi-platform toolkit for
This is GTK+ version 2.12.9. 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.
+1 -1
View File
@@ -88,7 +88,7 @@
#define ENABLE_NLS 1
/* Define the location where the catalogs will be installed */
#define GTK_LOCALEDIR "UNUSED"
#define GTK_LOCALEDIR "UNUSED/share/locale"
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+44 -33
View File
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [12])
m4_define([gtk_micro_version], [2])
m4_define([gtk_micro_version], [9])
m4_define([gtk_version],
[gtk_major_version.gtk_minor_version.gtk_micro_version])
m4_define([gtk_interface_age], [2])
m4_define([gtk_interface_age], [9])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
# This is the X.Y used in -lgtk-FOO-X.Y
@@ -477,7 +477,7 @@ fi
# sure that both po/ and po-properties/ have .po files that correspond
# to your language. If you only add one to po/, the build will break
# in po-properties/.
ALL_LINGUAS="af am ang ar as az az_IR be be@latin bg bn bn_IN br bs ca cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy ia id io is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso oc or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK zh_TW"
ALL_LINGUAS="af am ang ar as az az_IR be be@latin bg bn bn_IN br bs ca cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy ia id io is it ja ka kn ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso oc or pa pl pt pt_BR ro ru rw si sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK zh_TW"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
@@ -1551,42 +1551,53 @@ AC_SUBST(GTK_XIM_FLAGS)
# Printing system checks
################################################################
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
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`
AC_ARG_ENABLE(cups,
[AC_HELP_STRING([--disable-cups]
[disable cups print backend])],,
[enable_cups=auto])
CUPS_API_VERSION=`cups-config --api-version`
CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
if test "x$enable_cups" = "xauto"
then
AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
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`
if test $CUPS_API_MAJOR -gt 1 -o \
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
AC_DEFINE(HAVE_CUPS_API_1_2)
CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
if test $CUPS_API_MAJOR -gt 1 -o \
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
AC_DEFINE(HAVE_CUPS_API_1_2)
fi
AC_SUBST(CUPS_API_MAJOR)
AC_SUBST(CUPS_API_MINOR)
AC_SUBST(CUPS_CFLAGS)
AC_SUBST(CUPS_LIBS)
AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
fi
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
AC_SUBST(CUPS_API_MAJOR)
AC_SUBST(CUPS_API_MINOR)
AC_SUBST(CUPS_CFLAGS)
AC_SUBST(CUPS_LIBS)
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_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
AC_SUBST(HAVE_HTTP_AUTHSTRING)
gtk_save_libs="$LIBS"
LIBS="$CUPS_LIBS"
AC_CHECK_FUNCS(httpGetAuthString)
LIBS="$gtk_save_libs"
else
AM_CONDITIONAL(HAVE_CUPS, false)
fi
AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
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"
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
+32
View File
@@ -1,3 +1,35 @@
2008-03-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.9 ===
2008-02-12 Matthias Clasen <mclasne@redhat.com>
* === Released 2.12.8 ===
2008-01-29 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.7 ===
2008-01-28 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.6 ===
2008-01-08 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.5 ===
2008-01-08 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.4 ===
2007-12-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.3 ===
2007-11-26 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.2 ===
2007-10-16 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.1 ===
+43
View File
@@ -1,3 +1,46 @@
2008-03-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.9 ===
2008-02-12 Matthias Clasen <mclasne@redhat.com>
* === Released 2.12.8 ===
2008-01-29 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.7 ===
2008-01-28 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.6 ===
2008-01-24 Johan Dahlin <johan@gnome.org>
* gtk/tmpl/gtkwidget.sgml:
Add documentation for <accessible> buildable tag.
2008-01-14 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.5 ===
2008-01-08 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.4 ===
2007-12-30 Johannes Schmid <jhs@gnome.org>
* gtk/tmpl/gtknotebook.sgml:
Fix method names (gtk_notebook_popup_enable vs.
gtk_notebook_enable_popup)
2007-12-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.3 ===
2007-11-26 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.2 ===
2007-11-19 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkaboutdialog.sgml: Add some hints about
+2 -1
View File
@@ -61,7 +61,8 @@ a GtkBuilder UI definition.
@construct_child: Constructs a child of a buildable that has been
specified as "constructor" in the UI definition. #GtkUIManager implements
this to reference to a widget created in a &lt;ui&gt; tag which is outside
of the normal GtkBuilder UI definition hierarchy.
of the normal GtkBuilder UI definition hierarchy. A reference to the
constructed object is returned and becomes owned by the caller.
@custom_tag_start: Implement this if the buildable needs to parse
content below &lt;child&gt;. To handle an element, the implementation
must fill in the @parser structure and @user_data and return %TRUE.
+1 -1
View File
@@ -16,7 +16,7 @@ things, you can choose on which edge the tabs appear
tabs to fit the noteobook should be made bigger or scrolling
arrows added (see gtk_notebook_set_scrollable), and whether there
will be a popup menu allowing the users to switch pages.
(see gtk_notebook_enable_popup(), gtk_noteobook_disable_popup())
(see gtk_notebook_popup_enable(), gtk_noteobook_popup_disable())
</para>
<refsect2 id="GtkNotebook-BUILDER-UI">
+2
View File
@@ -134,6 +134,8 @@ Tells about the state of the object.
@GTK_IN_DESTRUCTION: the object is currently being destroyed. This is used
internally by GTK+ to prevent reinvokations during destruction.
@GTK_FLOATING:
@GTK_RESERVED_1:
@GTK_RESERVED_2: reserved for future use
<!-- ##### MACRO GTK_OBJECT_FLAGS ##### -->
+2
View File
@@ -52,6 +52,8 @@ accessed through the function described below.
@orientation:
@style:
@icon_size:
@tooltips:
@_tooltips:
<!-- ##### SIGNAL GtkToolbar::focus-home-or-end ##### -->
<para>
+25
View File
@@ -37,6 +37,31 @@ modifiers and signal and allows to specify accelerators.
</object>
]]></programlisting>
</example>
In addition to accelerators, <structname>GtkWidget</structname> also support a
custom &lt;accessible&gt; element, which supports actions and relations.
Properties on the accessible implementation of an object can be set by accessing the
internal child "accessible" of a <structname>GtkWidget</structname>.
<example>
<title>A UI definition fragment specifying an accessible</title>
<programlisting><![CDATA[
<object class="GtkButton" id="label1"/>
<property name="label">I am a Label for a Button</property>
</object>
<object class="GtkButton" id="button1">
<accessibility>
<action action_name="click" description="Click the button."/>
<relation target="label1" type="labelled-by"/>
</accessibility>
<child internal-child="accessible">
<object class="AtkObject" id="a11y-button1">
<property name="AtkObject::name">Clickable Button</property>
</object>
</child>
</object>
]]></programlisting>
</example>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
+60
View File
@@ -1,3 +1,63 @@
2008-03-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.9 ===
2008-03-11 Claudio Saavedra <csaavedra@alumnos.utalca.cl>
* io-bmp.c: (gdk_pixbuf__bmp_image_stop_load): Set a
GDK_ERROR_CORRUPT_IMAGE error if the loader is closed while
still reading the headers. (#505085)
2008-03-11 Claudio Saavedra <csaavedra@alumnos.utalca.cl>
* io-bmp.c: (DecodeHeader): Check for the BMP header magic numbers
before decoding it. (#505085)
2008-02-12 Matthias Clasen <mclasne@redhat.com>
* === Released 2.12.8 ===
2008-02-12 Matthias Clasen <mclasne@redhat.com>
* gdk-pixbuf-io.c (at_scale_size_prepared_cb): Don't let
the width or height go below 1. (#516024, Christian Persch)
2008-02-10 Matthias Clasen <mclasne@redhat.com>
* gdk-pixbuf-scaled-anim.c: Try harder to return pixbufs
of the requested size. (#494515, Mike Morrison)
2008-01-29 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.7 ===
2008-01-28 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.6 ===
2008-01-08 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.5 ===
2008-01-08 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.4 ===
2007-12-09 Matthias Clasen <mclasen@redhat.com>
Merge from trunk:
* io-jpeg.c: Fix the spinguard logic for big buffers.
(#494667, Ed Catmur)
2007-12-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.3 ===
2007-11-26 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.2 ===
2007-11-10 Matthias Clasen <mclasen@redhat.com>
* io-jpeg.c: Avoid unaligned accesses that cause
+3
View File
@@ -975,6 +975,9 @@ size_prepared_cb (GdkPixbufLoader *loader,
height = info->height;
}
width = MAX (width, 1);
height = MAX (height, 1);
gdk_pixbuf_loader_set_size (loader, width, height);
}
+4 -4
View File
@@ -139,8 +139,8 @@ get_scaled_pixbuf (GdkPixbufScaledAnim *scaled,
/* Get a new scaled pixbuf */
scaled->current = gdk_pixbuf_scale_simple (pixbuf,
(int) (gdk_pixbuf_get_width (pixbuf) * scaled->xscale),
(int) (gdk_pixbuf_get_height (pixbuf) * scaled->yscale),
(int) (gdk_pixbuf_get_width (pixbuf) * scaled->xscale + .5),
(int) (gdk_pixbuf_get_height (pixbuf) * scaled->yscale + .5),
GDK_INTERP_BILINEAR);
/* Copy the original pixbuf options to the scaled pixbuf */
@@ -170,9 +170,9 @@ get_size (GdkPixbufAnimation *anim,
GDK_PIXBUF_ANIMATION_GET_CLASS (scaled->anim)->get_size (scaled->anim, width, height);
if (width)
*width = (int)(*width * scaled->xscale);
*width = (int)(*width * scaled->xscale + .5);
if (height)
*height = (int)(*height * scaled->yscale);
*height = (int)(*height * scaled->yscale + .5);
}
static GdkPixbufAnimationIter *
+24 -1
View File
@@ -258,6 +258,17 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
{
gint clrUsed;
/* First check for the two first bytes content. A sane
BMP file must start with bytes 0x42 0x4D. */
if (*BFH != 0x42 || *(BFH + 1) != 0x4D) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("BMP image has bogus header data"));
State->read_state = READ_STATE_ERROR;
return FALSE;
}
/* FIXME this is totally unrobust against bogus image data. */
if (State->BufferSize < lsb_32 (&BIH[0]) + 14) {
State->BufferSize = lsb_32 (&BIH[0]) + 14;
@@ -682,6 +693,8 @@ gdk_pixbuf__bmp_image_begin_load(GdkPixbufModuleSizeFunc size_func,
*/
static gboolean gdk_pixbuf__bmp_image_stop_load(gpointer data, GError **error)
{
gboolean retval = TRUE;
struct bmp_progressive_state *context =
(struct bmp_progressive_state *) data;
@@ -696,10 +709,20 @@ static gboolean gdk_pixbuf__bmp_image_stop_load(gpointer data, GError **error)
if (context->pixbuf)
g_object_unref(context->pixbuf);
if (context->read_state == READ_STATE_HEADERS) {
if (error && *error == NULL) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("Premature end-of-file encountered"));
}
retval = FALSE;
}
g_free(context->buff);
g_free(context);
return TRUE;
return retval;
}
+7 -3
View File
@@ -812,7 +812,7 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
struct jpeg_decompress_struct *cinfo;
my_src_ptr src;
guint num_left, num_copy;
guint last_bytes_left;
guint last_num_left, last_bytes_left;
guint spinguard;
gboolean first;
const guchar *bufhd;
@@ -853,6 +853,7 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
if (num_left == 0)
return TRUE;
last_num_left = num_left;
last_bytes_left = 0;
spinguard = 0;
first = TRUE;
@@ -880,10 +881,13 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
if (first) {
last_bytes_left = src->pub.bytes_in_buffer;
first = FALSE;
} else if (src->pub.bytes_in_buffer == last_bytes_left)
} else if (src->pub.bytes_in_buffer == last_bytes_left
&& num_left == last_num_left) {
spinguard++;
else
} else {
last_bytes_left = src->pub.bytes_in_buffer;
last_num_left = num_left;
}
/* should not go through twice and not pull bytes out of buf */
if (spinguard > 2)
+11 -4
View File
@@ -39,6 +39,13 @@
#include "x-cursors.xbm"
#include <directfb_version.h>
#if DIRECTFB_MAJOR_VERSION < 1
#define u32 __u32
#define u8 __u8
#endif
static struct {
const guchar *bits;
int width, height, hotx, hoty;
@@ -228,7 +235,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
}
else
{
__u32 *dst;
u32 *dst;
int pitch;
ret = temp->Lock (temp, DSLF_WRITE, (void**)&dst, &pitch);
@@ -266,13 +273,13 @@ gdk_cursor_new_for_display (GdkDisplay *display,GdkCursorType cursor_type)
gint bit = x-mx + (y-my) * p;
gint mbit = x + y * mp;
__u32 color = (x-mx < 0 || y-my < 0 ||
u32 color = (x-mx < 0 || y-my < 0 ||
x-mx >= stock_cursors[cursor_type].width ||
y-my >= stock_cursors[cursor_type].height)
? 0x00FFFFFF : (src[bit/8] & (1 << bit%8) ? 0 : 0x00FFFFFF);
__u8 a = color ? 0xE0 : 0xFF;
__u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
u8 a = color ? 0xE0 : 0xFF;
u32 alpha = mask[mbit/8] & (1 << mbit%8) ? (a << 24) : 0;
dst[x + y*pitch] = alpha | color;
}
+3 -3
View File
@@ -476,7 +476,7 @@ gdk_directfb_draw_arc (GdkDrawable *drawable,
gint angle1,
gint angle2)
{
WARN_UNIMPLEMENTED (G_GNUC_FUNCTION);
WARN_UNIMPLEMENTED (G_STRLOC);
}
static void
@@ -560,7 +560,7 @@ gdk_directfb_draw_text (GdkDrawable *drawable,
const gchar *text,
gint text_length)
{
WARN_UNIMPLEMENTED (G_GNUC_FUNCTION);
WARN_UNIMPLEMENTED (G_STRLOC);
}
static void
@@ -572,7 +572,7 @@ gdk_directfb_draw_text_wc (GdkDrawable *drawable,
const GdkWChar *text,
gint text_length)
{
WARN_UNIMPLEMENTED (G_GNUC_FUNCTION);
WARN_UNIMPLEMENTED (G_STRLOC);
}
static void
+2 -2
View File
@@ -151,7 +151,7 @@ gdk_image_new_bitmap (GdkVisual *visual,
GDK_NOTE (MISC, g_print ("gdk_image_new_bitmap: %dx%d\n", w, h));
g_message ("not fully implemented %s", G_GNUC_FUNCTION);
g_message ("not fully implemented %s", G_STRLOC);
image->bpl = (w + 7) / 8;
image->mem = g_malloc (image->bpl * h);
@@ -209,7 +209,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
format = DSPF_ARGB;
break;
default:
g_message ("unimplemented %s for depth %d", G_GNUC_FUNCTION, depth);
g_message ("unimplemented %s for depth %d", G_STRLOC, depth);
return NULL;
}
+2 -2
View File
@@ -228,7 +228,7 @@ gboolean
gdk_device_set_mode (GdkDevice *device,
GdkInputMode mode)
{
g_message ("unimplemented %s", G_GNUC_FUNCTION);
g_message ("unimplemented %s", G_STRLOC);
return FALSE;
}
@@ -303,7 +303,7 @@ gdk_input_set_extension_events (GdkWindow *window,
gint mask,
GdkExtensionMode mode)
{
g_message ("unimplemented %s", G_GNUC_FUNCTION);
g_message ("unimplemented %s", G_STRLOC);
}
GList *
+1 -1
View File
@@ -172,7 +172,7 @@ gdk_pixmap_new (GdkDrawable *drawable,
format = DSPF_RGB32;
break;
default:
g_message ("unimplemented %s for depth %d", G_GNUC_FUNCTION, depth);
g_message ("unimplemented %s for depth %d", G_STRLOC, depth);
return NULL;
}
}
+4 -4
View File
@@ -2411,7 +2411,7 @@ gdk_window_set_functions (GdkWindow *window,
return;
/* N/A */
g_message("unimplemented %s", G_GNUC_FUNCTION);
g_message("unimplemented %s", G_STRLOC);
}
void
@@ -2444,7 +2444,7 @@ gdk_window_set_static_gravities (GdkWindow *window,
return FALSE;
/* N/A */
g_message("unimplemented %s", G_GNUC_FUNCTION);
g_message("unimplemented %s", G_STRLOC);
return FALSE;
}
@@ -2462,7 +2462,7 @@ gdk_window_begin_resize_drag (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
g_message("unimplemented %s", G_GNUC_FUNCTION);
g_message("unimplemented %s", G_STRLOC);
}
void
@@ -2477,7 +2477,7 @@ gdk_window_begin_move_drag (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
g_message("unimplemented %s", G_GNUC_FUNCTION);
g_message("unimplemented %s", G_STRLOC);
}
/**
+23 -3
View File
@@ -64,6 +64,15 @@
if (!(private->event_mask & GDK_EXPOSURE_MASK))
return;
/* For some reason, we occasionally get draw requests for zero sized rects
* at 0,0, just ignore those.
*/
if (rect.origin.x == 0 && rect.origin.y == 0 &&
rect.size.width == 0 && rect.size.height == 0)
{
return;
}
GDK_QUARTZ_ALLOC_POOL;
[self getRectsBeingDrawn:&drawn_rects count:&count];
@@ -107,9 +116,20 @@
gdk_region_destroy (region);
if (needsInvalidateShadow)
{
[[self window] invalidateShadow];
needsInvalidateShadow = NO;
}
GDK_QUARTZ_RELEASE_POOL;
}
-(void)setNeedsInvalidateShadow:(BOOL)invalidate
{
needsInvalidateShadow = invalidate;
}
/* For information on setting up tracking rects properly, see here:
* http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/EventOverview.pdf
*/
@@ -132,7 +152,7 @@
* NSPointInRect ([[self window] convertScreenToBase:[NSEvent mouseLocation]], rect)
*/
rect = NSMakeRect (0, 0, impl->width, impl->height);
rect = [self bounds];
trackingRect = [self addTrackingRect:rect
owner:self
userData:nil
@@ -156,9 +176,9 @@
}
}
-(void)setBounds:(NSRect)bounds
-(void)setFrame:(NSRect)frame
{
[super setBounds:bounds];
[super setFrame:frame];
[self updateTrackingRect];
}
+2
View File
@@ -24,10 +24,12 @@
@interface GdkQuartzView : NSView {
GdkWindow *gdk_window;
NSTrackingRectTag trackingRect;
BOOL needsInvalidateShadow;
}
-(void)setGdkWindow:(GdkWindow *)window;
-(GdkWindow *)gdkWindow;
-(void)setNeedsInvalidateShadow:(BOOL)invalidate;
@end
+108 -4
View File
@@ -79,9 +79,18 @@
-(void)windowDidBecomeMain:(NSNotification *)aNotification
{
GdkWindow *window;
GdkWindow *window = [[self contentView] gdkWindow];
if (![self isVisible])
{
/* Note: This is a hack needed because for unknown reasons, hidden
* windows get shown when clicking the dock icon when the application
* is not already active.
*/
[self orderOut:nil];
return;
}
window = [[self contentView] gdkWindow];
_gdk_quartz_window_did_become_main (window);
}
@@ -136,6 +145,14 @@
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
GdkEvent *event;
/* Ignore new position during showing/hiding the window, otherwise we
* would get the off-screen position that is used for hidden windows to
* get reliable MouseEntered events when showing them again. See comments
* in show() and hide().
*/
if (inShowOrHide)
return;
private->x = content_rect.origin.x;
private->y = _gdk_quartz_window_get_inverted_screen_y (content_rect.origin.y + content_rect.size.height);
@@ -161,7 +178,7 @@
impl->width = content_rect.size.width;
impl->height = content_rect.size.height;
[[self contentView] setBounds:NSMakeRect (0, 0, impl->width, impl->height)];
[[self contentView] setFrame:NSMakeRect (0, 0, impl->width, impl->height)];
/* Synthesize a configure event */
event = gdk_event_new (GDK_CONFIGURE);
@@ -257,6 +274,85 @@
return YES;
}
- (void)showAndMakeKey:(BOOL)makeKey
{
GdkWindow *window = [[self contentView] gdkWindow];
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
gboolean was_hidden;
int requested_x = 0, requested_y = 0;
inShowOrHide = YES;
was_hidden = FALSE;
if (!GDK_WINDOW_IS_MAPPED (window))
{
NSRect content_rect;
NSRect frame_rect;
was_hidden = TRUE;
/* We move the window in place if it's not mapped. See comment in
* hide().
*/
content_rect =
NSMakeRect (private->x,
_gdk_quartz_window_get_inverted_screen_y (private->y) - impl->height,
impl->width, impl->height);
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
[impl->toplevel setFrame:frame_rect display:NO];
requested_x = frame_rect.origin.x;
requested_y = frame_rect.origin.y;
}
if (makeKey)
[impl->toplevel makeKeyAndOrderFront:impl->toplevel];
else
[impl->toplevel orderFront:nil];
inShowOrHide = NO;
/* When the window manager didn't allow our request, update the position
* to what it really ended up as.
*/
if (was_hidden)
{
NSRect frame_rect;
frame_rect = [impl->toplevel frame];
if (requested_x != frame_rect.origin.x || requested_y != frame_rect.origin.y)
{
[self windowDidMove:nil];
}
}
}
- (void)hide
{
GdkWindow *window = [[self contentView] gdkWindow];
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
NSRect content_rect;
NSRect frame_rect;
inShowOrHide = YES;
/* We move the window away when hiding, to make it possible to move it in
* place when showing to get reliable tracking rect events (which are used
* to generate crossing events). We have to do this, probably a bug in
* quartz.
*/
content_rect = NSMakeRect (-500 - impl->width, -500 - impl->height,
impl->width, impl->height);
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
[impl->toplevel setFrame:frame_rect display:NO];
[impl->toplevel orderOut:nil];
inShowOrHide = NO;
}
- (BOOL)trackManualMove
{
NSPoint currentLocation;
@@ -301,9 +397,11 @@
float dx, dy;
NSSize min_size;
if (!inManualResize)
if (!inManualResize || inTrackManualResize)
return NO;
inTrackManualResize = YES;
currentLocation = [self convertBaseToScreen:[self mouseLocationOutsideOfEventStream]];
currentLocation.x -= initialResizeFrame.origin.x;
currentLocation.y -= initialResizeFrame.origin.y;
@@ -332,6 +430,12 @@
[self setFrame:newFrame display:YES];
/* Let the resizing be handled by GTK+. */
if (g_main_context_pending (NULL))
g_main_context_iteration (NULL, FALSE);
inTrackManualResize = NO;
return YES;
}
+5 -1
View File
@@ -23,11 +23,13 @@
#include <glib.h>
@interface GdkQuartzWindow : NSWindow {
BOOL inMove;
BOOL inMove;
BOOL inShowOrHide;
/* Manually triggered move/resize (not by the window manager) */
BOOL inManualMove;
BOOL inManualResize;
BOOL inTrackManualResize;
NSPoint initialMoveLocation;
NSPoint initialResizeLocation;
NSRect initialResizeFrame;
@@ -38,6 +40,8 @@
-(BOOL)trackManualMove;
-(void)beginManualResize;
-(BOOL)trackManualResize;
-(void)showAndMakeKey:(BOOL)makeKey;
-(void)hide;
@end
+17 -9
View File
@@ -137,9 +137,7 @@ gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
/* This function shouldn't do anything since
* colors are neve allocated.
*/
/* This function shouldn't do anything since colors are never allocated. */
}
gint
@@ -151,18 +149,28 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
gboolean *success)
{
int i;
int alpha;
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), ncolors);
g_return_val_if_fail (colors != NULL, ncolors);
g_return_val_if_fail (success != NULL, ncolors);
if (gdk_colormap_get_visual (colormap)->depth == 32)
alpha = 0xff;
else
alpha = 0;
for (i = 0; i < ncolors; i++)
{
colors[i].pixel = ((colors[i].red >> 8) & 0xff) << 16 |
((colors[i].green >> 8) & 0xff) << 8 |
((colors[i].blue >> 8) & 0xff);
colors[i].pixel = alpha << 24 |
((colors[i].red >> 8) & 0xff) << 16 |
((colors[i].green >> 8) & 0xff) << 8 |
((colors[i].blue >> 8) & 0xff);
}
if (success)
*success = TRUE;
*success = TRUE;
return ncolors;
return 0;
}
void
+2 -16
View File
@@ -687,14 +687,8 @@ gdk_quartz_drawable_get_context (GdkDrawable *drawable,
*/
if (window_impl->in_paint_rect_count == 0)
{
window_impl->pool = [[NSAutoreleasePool alloc] init];
if (![window_impl->view lockFocusIfCanDraw])
{
[window_impl->pool release];
window_impl->pool = NULL;
return NULL;
}
return NULL;
}
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
@@ -767,15 +761,7 @@ gdk_quartz_drawable_release_context (GdkDrawable *drawable,
/* See comment in gdk_quartz_drawable_get_context(). */
if (window_impl->in_paint_rect_count == 0)
{
[window_impl->view unlockFocus];
if (window_impl->pool)
{
[window_impl->pool release];
window_impl->pool = NULL;
}
}
[window_impl->view unlockFocus];
}
else if (GDK_IS_PIXMAP_IMPL_QUARTZ (drawable))
CGContextRelease (cg_context);
+48 -34
View File
@@ -23,6 +23,30 @@ static GPollFD *pipe_pollfd;
static guint n_pollfds;
static CFRunLoopSourceRef select_main_thread_source;
static CFRunLoopRef main_thread_run_loop;
static NSAutoreleasePool *autorelease_pool;
gboolean
_gdk_quartz_event_loop_check_pending (void)
{
return current_event != NULL;
}
NSEvent*
_gdk_quartz_event_loop_get_pending (void)
{
NSEvent *event;
event = current_event;
current_event = NULL;
return event;
}
void
_gdk_quartz_event_loop_release_event (NSEvent *event)
{
[event release];
}
static gboolean
gdk_event_prepare (GSource *source,
@@ -30,9 +54,9 @@ gdk_event_prepare (GSource *source,
{
NSEvent *event;
gboolean retval;
GDK_QUARTZ_ALLOC_POOL;
GDK_THREADS_ENTER ();
*timeout = -1;
event = [NSApp nextEventMatchingMask: NSAnyEventMask
@@ -43,7 +67,7 @@ gdk_event_prepare (GSource *source,
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
event != NULL);
GDK_QUARTZ_RELEASE_POOL;
GDK_THREADS_LEAVE ();
return retval;
}
@@ -51,13 +75,23 @@ gdk_event_prepare (GSource *source,
static gboolean
gdk_event_check (GSource *source)
{
gboolean retval;
GDK_THREADS_ENTER ();
if (autorelease_pool)
[autorelease_pool release];
autorelease_pool = [[NSAutoreleasePool alloc] init];
if (_gdk_event_queue_find_first (_gdk_display) != NULL ||
current_event)
return TRUE;
_gdk_quartz_event_loop_check_pending ())
retval = TRUE;
else
retval = FALSE;
/* FIXME: We should maybe try to fetch an event again here */
GDK_THREADS_LEAVE ();
return FALSE;
return retval;
}
static gboolean
@@ -67,7 +101,7 @@ gdk_event_dispatch (GSource *source,
{
GdkEvent *event;
GDK_QUARTZ_ALLOC_POOL;
GDK_THREADS_ENTER ();
_gdk_events_queue (_gdk_display);
@@ -81,7 +115,7 @@ gdk_event_dispatch (GSource *source,
gdk_event_free (event);
}
GDK_QUARTZ_RELEASE_POOL;
GDK_THREADS_LEAVE ();
return TRUE;
}
@@ -105,7 +139,7 @@ got_fd_activity (void *info)
timestamp: 0
windowNumber: 0
context: nil
subtype: 0
subtype: GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP
data1: 0
data2: 0];
@@ -164,8 +198,6 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
int n_active = 0;
int i;
GDK_QUARTZ_ALLOC_POOL;
if (nfds > 1)
{
if (!select_thread) {
@@ -221,7 +253,8 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
if (event)
{
if ([event type] == NSApplicationDefined)
if ([event type] == NSApplicationDefined &&
[event subtype] == GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP)
{
pthread_mutex_lock (&pollfd_mutex);
@@ -264,18 +297,11 @@ poll_func (GPollFD *ufds, guint nfds, gint timeout_)
{
ufds[0].revents = G_IO_IN;
/* FIXME: We can't assert here, but we might need to have a
* queue for events instead.
*/
/*g_assert (current_event == NULL);*/
current_event = [event retain];
n_active ++;
}
GDK_QUARTZ_RELEASE_POOL;
return n_active;
}
@@ -295,19 +321,7 @@ _gdk_quartz_event_loop_init (void)
old_poll_func = g_main_context_get_poll_func (NULL);
g_main_context_set_poll_func (NULL, poll_func);
}
NSEvent *
_gdk_quartz_event_loop_get_current (void)
{
return current_event;
}
void
_gdk_quartz_event_loop_release_current (void)
{
[current_event release];
current_event = NULL;
autorelease_pool = [[NSAutoreleasePool alloc] init];
}
+80 -10
View File
@@ -130,7 +130,7 @@ gboolean
gdk_events_pending (void)
{
return (_gdk_event_queue_find_first (_gdk_display) ||
(_gdk_quartz_event_loop_get_current () != NULL));
(_gdk_quartz_event_loop_check_pending ()));
}
GdkEvent*
@@ -1079,6 +1079,64 @@ find_mouse_window_for_ns_event (NSEvent *nsevent,
return mouse_window;
}
/* Trigger crossing events if necessary. This is used when showing a new
* window, since the tracking rect API doesn't work reliably when a window
* shows up under the mouse cursor. It's done by finding the topmost window
* under the mouse pointer and synthesizing crossing events into that
* window.
*/
void
_gdk_quartz_events_trigger_crossing_events (void)
{
NSPoint point;
gint x;
gint y;
GdkWindow *mouse_window;
GdkWindowImplQuartz *impl;
guint flags = 0;
NSTimeInterval timestamp = 0;
NSEvent *current_event;
NSEvent *nsevent;
point = [NSEvent mouseLocation];
x = point.x;
y = _gdk_quartz_window_get_inverted_screen_y (point.y);
mouse_window = _gdk_quartz_window_find_child (_gdk_root, x, y);
if (mouse_window == _gdk_root)
return;
/* NSMouseEntered always happens on the toplevel. */
mouse_window = gdk_window_get_toplevel (mouse_window);
get_converted_window_coordinates (_gdk_root,
x, y,
mouse_window,
&x, &y);
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (mouse_window)->impl);
/* Fix up the event to be less fake if possible. */
current_event = [NSApp currentEvent];
if (current_event)
{
flags = [current_event modifierFlags];
timestamp = [current_event timestamp];
}
nsevent = [NSEvent otherEventWithType:NSApplicationDefined
location:NSMakePoint(x, impl->height - y)
modifierFlags:flags
timestamp:timestamp
windowNumber:[impl->toplevel windowNumber]
context:nil
subtype:GDK_QUARTZ_EVENT_SUBTYPE_FAKE_CROSSING
data1:0
data2:0];
synthesize_crossing_events (mouse_window, GDK_CROSSING_NORMAL, nsevent, x, y);
}
/* Synthesizes crossing events if necessary, based on the passed in
* NSEvent. Uses NSMouseEntered and NSMouseExisted for toplevels and
* the mouse moved/dragged events for child windows, to see if the
@@ -1172,7 +1230,8 @@ synthesize_crossing_events_for_ns_event (NSEvent *nsevent)
/* If there is a window other than the root window at this
* position, it means we didn't exit to the root window and we
* ignore the event.
* ignore the event. (Note that we can get NULL here when swithing
* spaces for example.)
*
* FIXME: This is not enough, it doesn't catch the case where
* we leave a GDK window to a non-GDK window that has GDK
@@ -1180,9 +1239,12 @@ synthesize_crossing_events_for_ns_event (NSEvent *nsevent)
*/
mouse_window = _gdk_quartz_window_find_child (_gdk_root, x, y);
if (gdk_window_get_toplevel (mouse_window) ==
if (!mouse_window ||
gdk_window_get_toplevel (mouse_window) ==
gdk_window_get_toplevel (current_mouse_window))
mouse_window = _gdk_root;
{
mouse_window = _gdk_root;
}
if (mouse_window == _gdk_root)
synthesize_crossing_events (_gdk_root, GDK_CROSSING_NORMAL, nsevent, x, y);
@@ -1435,6 +1497,7 @@ create_scroll_event (GdkWindow *window,
point = [nsevent locationInWindow];
event->scroll.x = point.x;
event->scroll.y = point.y;
event->scroll.state = get_keyboard_modifiers_from_ns_event (nsevent);
convert_window_coordinates_to_root (window, event->scroll.x, event->scroll.y,
&event->scroll.x_root,
&event->scroll.y_root);
@@ -1777,6 +1840,9 @@ gdk_event_translate (NSEvent *nsevent)
event = create_scroll_event (window, nsevent, direction);
append_event (event);
dy--;
/* Ignore the delta for now, things get too slow when the events queue up. */
break;
}
/* Now do x events */
@@ -1793,6 +1859,9 @@ gdk_event_translate (NSEvent *nsevent)
event = create_scroll_event (window, nsevent, direction);
append_event (event);
dx--;
/* Ignore the delta for now, things get too slow when the events queue up. */
break;
}
}
@@ -1825,14 +1894,15 @@ gdk_event_translate (NSEvent *nsevent)
void
_gdk_events_queue (GdkDisplay *display)
{
NSEvent *current_event = _gdk_quartz_event_loop_get_current ();
NSEvent *event;
if (current_event)
event = _gdk_quartz_event_loop_get_pending ();
if (event)
{
if (!gdk_event_translate (current_event))
[NSApp sendEvent:current_event];
_gdk_quartz_event_loop_release_current ();
if (!gdk_event_translate (event))
[NSApp sendEvent:event];
_gdk_quartz_event_loop_release_event (event);
}
}
+10 -2
View File
@@ -144,8 +144,14 @@ void _gdk_quartz_window_attach_to_parent (GdkWindow *window);
void _gdk_quartz_window_detach_from_parent (GdkWindow *window);
void _gdk_quartz_window_did_become_main (GdkWindow *window);
void _gdk_quartz_window_did_resign_main (GdkWindow *window);
void _gdk_quartz_window_debug_highlight (GdkWindow *window);
/* Events */
typedef enum {
GDK_QUARTZ_EVENT_SUBTYPE_EVENTLOOP,
GDK_QUARTZ_EVENT_SUBTYPE_FAKE_CROSSING
} GdkQuartzEventSubType;
void _gdk_quartz_events_update_focus_window (GdkWindow *new_window,
gboolean got_focus);
GdkWindow * _gdk_quartz_events_get_mouse_window (gboolean consider_grabs);
@@ -153,13 +159,15 @@ void _gdk_quartz_events_update_mouse_window (GdkWindow *window);
void _gdk_quartz_events_update_cursor (GdkWindow *window);
void _gdk_quartz_events_send_map_events (GdkWindow *window);
GdkEventMask _gdk_quartz_events_get_current_event_mask (void);
void _gdk_quartz_events_trigger_crossing_events(void);
extern GdkWindow *_gdk_quartz_keyboard_grab_window;
extern GdkWindow *_gdk_quartz_pointer_grab_window;
/* Event loop */
NSEvent * _gdk_quartz_event_loop_get_current (void);
void _gdk_quartz_event_loop_release_current (void);
gboolean _gdk_quartz_event_loop_check_pending (void);
NSEvent * _gdk_quartz_event_loop_get_pending (void);
void _gdk_quartz_event_loop_release_event (NSEvent *event);
/* FIXME: image */
GdkImage *_gdk_quartz_image_copy_to_image (GdkDrawable *drawable,
+192 -87
View File
@@ -32,8 +32,20 @@ static guint update_idle;
static GSList *main_window_stack;
#define FULLSCREEN_DATA "fullscreen-data"
typedef struct
{
gint x, y;
gint width, height;
GdkWMDecoration decor;
} FullscreenSavedGeometry;
static void update_toplevel_order (void);
static void clear_toplevel_order (void);
static void clear_toplevel_order (void);
static FullscreenSavedGeometry *get_fullscreen_geometry (GdkWindow *window);
#define WINDOW_IS_TOPLEVEL(window) \
(GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD && \
@@ -209,7 +221,7 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
x_offset = y_offset = 0;
window = GDK_WINDOW (drawable_impl->wrapper);
while (window && ((GdkWindowObject *) window)->bg_pixmap == GDK_PARENT_RELATIVE_BG)
while (window && bg_pixmap == GDK_PARENT_RELATIVE_BG)
{
/* If this window should have the same background as the parent,
* fetch the parent. (And if the same goes for the parent, fetch
@@ -218,6 +230,16 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
x_offset += ((GdkWindowObject *) window)->x;
y_offset += ((GdkWindowObject *) window)->y;
window = GDK_WINDOW (((GdkWindowObject *) window)->parent);
bg_pixmap = ((GdkWindowObject *) window)->bg_pixmap;
}
if (bg_pixmap == NULL || bg_pixmap == GDK_NO_BG || bg_pixmap == GDK_PARENT_RELATIVE_BG)
{
/* Parent relative background but the parent doesn't have a
* pixmap.
*/
g_free (rects);
return;
}
/* Note: There should be a CG API to draw tiled images, we might
@@ -442,6 +464,87 @@ get_default_title (void)
return title;
}
static void
get_ancestor_coordinates_from_child (GdkWindow *child_window,
gint child_x,
gint child_y,
GdkWindow *ancestor_window,
gint *ancestor_x,
gint *ancestor_y)
{
GdkWindowObject *child_private = GDK_WINDOW_OBJECT (child_window);
GdkWindowObject *ancestor_private = GDK_WINDOW_OBJECT (ancestor_window);
while (child_private != ancestor_private)
{
child_x += child_private->x;
child_y += child_private->y;
child_private = child_private->parent;
}
*ancestor_x = child_x;
*ancestor_y = child_y;
}
void
_gdk_quartz_window_debug_highlight (GdkWindow *window)
{
GdkWindowObject *private = GDK_WINDOW_OBJECT (window);
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
gint x, y;
GdkWindow *toplevel;
gint tx, ty;
static NSWindow *debug_window;
static NSRect old_rect;
NSRect rect;
if (window == _gdk_root)
return;
if (window == NULL)
return;
toplevel = gdk_window_get_toplevel (window);
get_ancestor_coordinates_from_child (window, 0, 0, toplevel, &x, &y);
gdk_window_get_origin (toplevel, &tx, &ty);
x += tx;
y += ty;
rect = NSMakeRect (x,
_gdk_quartz_window_get_inverted_screen_y (y + impl->height),
impl->width, impl->height);
if (debug_window &&
rect.origin.x == old_rect.origin.x &&
rect.origin.y == old_rect.origin.y &&
rect.size.width == old_rect.size.width &&
rect.size.height == old_rect.size.height)
{
return;
}
old_rect = rect;
if (debug_window)
[debug_window close];
debug_window = [[NSWindow alloc] initWithContentRect:rect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
[debug_window setBackgroundColor:[NSColor redColor]];
[debug_window setAlphaValue:0.4];
[debug_window setOpaque:NO];
[debug_window setReleasedWhenClosed:YES];
[debug_window setIgnoresMouseEvents:YES];
[debug_window setLevel:NSFloatingWindowLevel];
[debug_window orderFront:nil];
}
gboolean
_gdk_quartz_window_is_ancestor (GdkWindow *ancestor,
GdkWindow *window)
@@ -824,6 +927,7 @@ _gdk_windowing_window_init (void)
{
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
GdkDrawableImplQuartz *drawable_impl;
NSRect rect;
g_assert (_gdk_root == NULL);
@@ -841,6 +945,12 @@ _gdk_windowing_window_init (void)
private->state = 0; /* We don't want GDK_WINDOW_STATE_WITHDRAWN here */
private->window_type = GDK_WINDOW_ROOT;
private->depth = 24;
drawable_impl = GDK_DRAWABLE_IMPL_QUARTZ (private->impl);
drawable_impl->wrapper = GDK_DRAWABLE (private);
drawable_impl->colormap = gdk_screen_get_system_colormap (_gdk_screen);
g_object_ref (drawable_impl->colormap);
}
void
@@ -851,6 +961,7 @@ _gdk_windowing_window_destroy (GdkWindow *window,
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
GdkWindowObject *parent;
GdkWindow *mouse_window;
private = GDK_WINDOW_OBJECT (window);
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
@@ -878,24 +989,21 @@ _gdk_windowing_window_destroy (GdkWindow *window,
if (window == _gdk_quartz_keyboard_grab_window)
gdk_keyboard_ungrab (0);
_gdk_quartz_drawable_finish (GDK_DRAWABLE (impl));
mouse_window = _gdk_quartz_events_get_mouse_window (FALSE);
if (window == mouse_window ||
_gdk_quartz_window_is_ancestor (window, mouse_window))
_gdk_quartz_events_update_mouse_window (_gdk_root);
if (!recursing && !foreign_destroy)
{
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (window)->impl);
GdkWindow *mouse_window;
mouse_window = _gdk_quartz_events_get_mouse_window (FALSE);
if (window == mouse_window ||
_gdk_quartz_window_is_ancestor (window, mouse_window))
_gdk_quartz_events_update_mouse_window (_gdk_root);
GDK_QUARTZ_ALLOC_POOL;
_gdk_quartz_drawable_finish (GDK_DRAWABLE (impl));
if (impl->toplevel)
[impl->toplevel close];
else if (impl->view)
[impl->view release];
[impl->view removeFromSuperview];
GDK_QUARTZ_RELEASE_POOL;
}
@@ -947,30 +1055,16 @@ show_window_internal (GdkWindow *window,
if (impl->toplevel)
{
gboolean make_key;
/* Move the window into place, to guarantee that we get the
* initial MouseEntered event.
*/
if (!GDK_WINDOW_IS_MAPPED (window))
{
NSRect content_rect;
NSRect frame_rect;
make_key = (private->accept_focus && focus_on_map && raise &&
private->window_type != GDK_WINDOW_TEMP);
content_rect =
NSMakeRect (private->x,
_gdk_quartz_window_get_inverted_screen_y (private->y) - impl->height,
impl->width, impl->height);
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
[impl->toplevel setFrame:frame_rect display:NO];
}
/* We should make the window not raise for !raise, but at least
* this will keep it from getting focused in that case.
*/
if (private->accept_focus && focus_on_map && raise &&
private->window_type != GDK_WINDOW_TEMP)
[impl->toplevel makeKeyAndOrderFront:impl->toplevel];
else
[impl->toplevel orderFront:nil];
[(GdkQuartzWindow*)impl->toplevel showAndMakeKey:make_key];
clear_toplevel_order ();
}
else
{
@@ -993,6 +1087,9 @@ show_window_internal (GdkWindow *window,
if (impl->transient_for && !GDK_WINDOW_DESTROYED (impl->transient_for))
_gdk_quartz_window_attach_to_parent (window);
if (impl->toplevel)
_gdk_quartz_events_trigger_crossing_events ();
GDK_QUARTZ_RELEASE_POOL;
}
@@ -1016,6 +1113,7 @@ _gdk_quartz_window_detach_from_parent (GdkWindow *window)
parent_impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (impl->transient_for)->impl);
[parent_impl->toplevel removeChildWindow:impl->toplevel];
clear_toplevel_order ();
}
}
@@ -1037,6 +1135,7 @@ _gdk_quartz_window_attach_to_parent (GdkWindow *window)
parent_impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (impl->transient_for)->impl);
[parent_impl->toplevel addChildWindow:impl->toplevel ordered:NSWindowAbove];
clear_toplevel_order ();
}
}
@@ -1065,6 +1164,10 @@ gdk_window_hide (GdkWindow *window)
g_return_if_fail (GDK_IS_WINDOW (window));
/* Make sure we're not stuck in fullscreen mode. */
if (get_fullscreen_geometry (window))
ShowMenuBar ();
if (GDK_WINDOW_DESTROYED (window))
return;
@@ -1084,9 +1187,6 @@ gdk_window_hide (GdkWindow *window)
if (impl->toplevel)
{
NSRect content_rect;
NSRect frame_rect;
/* Update main window. */
main_window_stack = g_slist_remove (main_window_stack, window);
if ([NSApp mainWindow] == impl->toplevel)
@@ -1095,16 +1195,7 @@ gdk_window_hide (GdkWindow *window)
if (impl->transient_for)
_gdk_quartz_window_detach_from_parent (window);
/* Big hack in gdk_window_new() and show_window_internal()
* continued. Move the window away when hidden so that we can
* move it back before showing it.
*/
content_rect = NSMakeRect (-500 - impl->width, -500 - impl->height,
impl->width, impl->height);
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
[impl->toplevel setFrame:frame_rect display:NO];
[impl->toplevel orderOut:nil];
[(GdkQuartzWindow*)impl->toplevel hide];
}
else if (impl->view)
{
@@ -1145,10 +1236,10 @@ move_resize_window_internal (GdkWindow *window,
impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
if ((x == private->x) &&
(y == private->y) &&
(width == impl->width) &&
(height == impl->height))
if ((x == -1 || (x == private->x)) &&
(y == -1 || (y == private->y)) &&
(width == -1 || (width == impl->width)) &&
(height == -1 || (height == impl->height)))
{
return;
}
@@ -1199,12 +1290,19 @@ move_resize_window_internal (GdkWindow *window,
NSRect content_rect;
NSRect frame_rect;
content_rect = NSMakeRect (private->x,
_gdk_quartz_window_get_inverted_screen_y (private->y + impl->height),
impl->width, impl->height);
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
[impl->toplevel setFrame:frame_rect display:YES];
/* We don't update the NSWindow while unmapped, since we move windows
* off-screen when hiding in order for MouseEntered to be triggered
* reliably when showing windows and they appear under the mouse.
*/
if (GDK_WINDOW_IS_MAPPED (window))
{
content_rect = NSMakeRect (private->x,
_gdk_quartz_window_get_inverted_screen_y (private->y + impl->height),
impl->width, impl->height);
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
[impl->toplevel setFrame:frame_rect display:YES];
}
}
else
{
@@ -2204,7 +2302,8 @@ gdk_window_focus (GdkWindow *window,
if (private->accept_focus && private->window_type != GDK_WINDOW_TEMP)
{
GDK_QUARTZ_ALLOC_POOL;
[impl->toplevel makeKeyWindow];
[impl->toplevel makeKeyAndOrderFront:impl->toplevel];
clear_toplevel_order ();
GDK_QUARTZ_RELEASE_POOL;
}
}
@@ -2512,8 +2611,17 @@ gdk_window_set_decorations (GdkWindow *window,
backing:NSBackingStoreBuffered
defer:NO];
[impl->toplevel setHasShadow: window_type_hint_to_shadow (impl->type_hint)];
[impl->toplevel setLevel: window_type_hint_to_level (impl->type_hint)];
[impl->toplevel setContentView:old_view];
[impl->toplevel setFrame:rect display:YES];
/* Invalidate the window shadow for non-opaque views that have shadow
* enabled, to get the shadow shape updated.
*/
if (![old_view isOpaque] && [impl->toplevel hasShadow])
[(GdkQuartzView*)old_view setNeedsInvalidateShadow:YES];
}
GDK_QUARTZ_RELEASE_POOL;
@@ -2702,14 +2810,11 @@ gdk_window_deiconify (GdkWindow *window)
}
}
#define FULLSCREEN_DATA "fullscreen-data"
typedef struct
static FullscreenSavedGeometry *
get_fullscreen_geometry (GdkWindow *window)
{
gint x, y;
gint width, height;
GdkWMDecoration decor;
} FullscreenSavedGeometry;
return g_object_get_data (G_OBJECT (window), FULLSCREEN_DATA);
}
void
gdk_window_fullscreen (GdkWindow *window)
@@ -2722,29 +2827,33 @@ gdk_window_fullscreen (GdkWindow *window)
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (WINDOW_IS_TOPLEVEL (window));
geometry = g_new (FullscreenSavedGeometry, 1);
geometry = get_fullscreen_geometry (window);
if (!geometry)
{
geometry = g_new (FullscreenSavedGeometry, 1);
geometry->x = private->x;
geometry->y = private->y;
geometry->width = impl->width;
geometry->height = impl->height;
if (!gdk_window_get_decorations (window, &geometry->decor))
geometry->decor = GDK_DECOR_ALL;
geometry->x = private->x;
geometry->y = private->y;
geometry->width = impl->width;
geometry->height = impl->height;
g_object_set_data_full (G_OBJECT (window),
FULLSCREEN_DATA, geometry,
g_free);
if (!gdk_window_get_decorations (window, &geometry->decor))
geometry->decor = GDK_DECOR_ALL;
g_object_set_data_full (G_OBJECT (window),
FULLSCREEN_DATA, geometry,
g_free);
gdk_window_set_decorations (window, 0);
frame = [[NSScreen mainScreen] frame];
move_resize_window_internal (window,
0, 0,
frame.size.width, frame.size.height);
}
HideMenuBar ();
gdk_window_set_decorations (window, 0);
frame = [[NSScreen mainScreen] frame];
move_resize_window_internal (window,
0, 0,
frame.size.width, frame.size.height);
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
}
@@ -2756,8 +2865,7 @@ gdk_window_unfullscreen (GdkWindow *window)
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (WINDOW_IS_TOPLEVEL (window));
geometry = g_object_get_data (G_OBJECT (window), FULLSCREEN_DATA);
geometry = get_fullscreen_geometry (window);
if (geometry)
{
ShowMenuBar ();
@@ -2867,9 +2975,6 @@ gdk_window_configure_finished (GdkWindow *window)
void
gdk_window_destroy_notify (GdkWindow *window)
{
/* FIXME: Implement. We should call this from -[GdkQuartzWindow dealloc] or
* -[GdkQuartzView dealloc], although I suspect that currently they leak
* anyway. */
}
void
-5
View File
@@ -54,11 +54,6 @@ struct _GdkWindowImplQuartz
GdkWindowTypeHint type_hint;
/* This is the autorelease pool which is retained
* while the context is being held
*/
NSAutoreleasePool *pool;
NSCursor *nscursor;
GdkRegion *paint_clip_region;
+147 -65
View File
@@ -1,7 +1,7 @@
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* Copyright (C) 1998-2002 Tor Lillqvist
* Copyright (C) 2007 Cody Russell
* Copyright (C) 2007-2008 Cody Russell
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -94,6 +94,7 @@ static gboolean gdk_event_dispatch (GSource *source,
gpointer user_data);
static void append_event (GdkEvent *event);
static gboolean is_modally_blocked (GdkWindow *window);
/* Private variable declarations
*/
@@ -1266,6 +1267,19 @@ apply_filters (GdkWindow *window,
return result;
}
/*
* On Windows, transient windows will not have their own taskbar entries.
* Because of this, we must hide and restore groups of transients in both
* directions. That is, all transient children must be hidden or restored
* with this window, but if this window's transient owner also has a
* transient owner then this window's transient owner must be hidden/restored
* with this one. And etc, up the chain until we hit an ancestor that has no
* transient owner.
*
* It would be a good idea if applications don't chain transient windows
* together. There's a limit to how much evil GTK can try to shield you
* from.
*/
static void
show_window_recurse (GdkWindow *window, gboolean hide_window)
{
@@ -1288,15 +1302,44 @@ show_window_recurse (GdkWindow *window, gboolean hide_window)
}
}
if (!hide_window)
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
else
ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
if (GDK_WINDOW_IS_MAPPED (window))
{
if (!hide_window)
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
else
ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
}
impl->changing_state = FALSE;
}
}
static void
show_window_internal (GdkWindow *window, gboolean hide_window)
{
GdkWindow *tmp_window = NULL;
GdkWindowImplWin32 *tmp_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
if (!tmp_impl->changing_state)
{
/* Find the top-level window in our transient chain. */
while (tmp_impl->transient_owner != NULL)
{
tmp_window = tmp_impl->transient_owner;
tmp_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (tmp_window)->impl);
}
/* If we couldn't find one, use the window provided. */
if (tmp_window == NULL)
{
tmp_window = window;
}
/* Recursively show/hide every window in the chain. */
show_window_recurse (tmp_window, hide_window);
}
}
static gboolean
gdk_window_is_ancestor (GdkWindow *ancestor,
GdkWindow *window)
@@ -1725,6 +1768,13 @@ static gboolean
doesnt_want_key (gint mask,
MSG *msg)
{
GdkWindow *modal_current = _gdk_modal_current ();
GdkWindow *window = (GdkWindow *) gdk_win32_handle_table_lookup ((GdkNativeWindow)msg->hwnd);
gboolean modally_blocked = modal_current != NULL ? gdk_window_get_toplevel (window) != modal_current : FALSE;
if (modally_blocked == TRUE)
return TRUE;
return (((msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP) &&
!(mask & GDK_KEY_RELEASE_MASK)) ||
((msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN) &&
@@ -2763,12 +2813,27 @@ gdk_event_translate (MSG *msg,
break;
case WM_MOUSEACTIVATE:
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|| !((GdkWindowObject *)window)->accept_focus)
{
*ret_valp = MA_NOACTIVATE;
return_val = TRUE;
}
{
GdkWindow *tmp;
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|| !((GdkWindowObject *)window)->accept_focus)
{
*ret_valp = MA_NOACTIVATE;
return_val = TRUE;
}
tmp = _gdk_modal_current ();
if (tmp != NULL)
{
if (gdk_window_get_toplevel (window) != tmp)
{
*ret_valp = MA_NOACTIVATEANDEAT;
return_val = TRUE;
}
}
}
break;
case WM_KILLFOCUS:
@@ -2872,6 +2937,18 @@ gdk_event_translate (MSG *msg,
return_val = TRUE;
break;
case WM_SYSCOMMAND:
switch (msg->wParam)
{
case SC_MINIMIZE:
case SC_RESTORE:
show_window_internal (window, msg->wParam == SC_MINIMIZE ? TRUE : FALSE);
break;
}
break;
case WM_SIZE:
GDK_NOTE (EVENTS,
g_print (" %s %dx%d",
@@ -2895,6 +2972,7 @@ gdk_event_translate (MSG *msg,
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_WITHDRAWN,
GDK_WINDOW_STATE_ICONIFIED);
show_window_internal (window, TRUE);
}
else if ((msg->wParam == SIZE_RESTORED ||
msg->wParam == SIZE_MAXIMIZED) &&
@@ -2907,16 +2985,25 @@ gdk_event_translate (MSG *msg,
handle_configure_event (msg, window);
if (msg->wParam == SIZE_RESTORED)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED |
GDK_WINDOW_STATE_MAXIMIZED |
withdrawn_bit,
0);
{
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED |
GDK_WINDOW_STATE_MAXIMIZED |
withdrawn_bit,
0);
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TEMP && !GDK_WINDOW_IS_MAPPED (window))
{
show_window_internal (window, FALSE);
}
}
else if (msg->wParam == SIZE_MAXIMIZED)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED |
withdrawn_bit,
GDK_WINDOW_STATE_MAXIMIZED);
{
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED |
withdrawn_bit,
GDK_WINDOW_STATE_MAXIMIZED);
}
if (((GdkWindowObject *) window)->resize_count > 1)
((GdkWindowObject *) window)->resize_count -= 1;
@@ -3172,6 +3259,7 @@ gdk_event_translate (MSG *msg,
break;
}
}
*ret_valp = TRUE;
return_val = TRUE;
GDK_NOTE (EVENTS, g_print (" (handled ASPECT: %s)",
@@ -3305,7 +3393,10 @@ gdk_event_translate (MSG *msg,
append_event (event);
}
else
return_val = TRUE;
{
return_val = TRUE;
}
break;
case WM_RENDERFORMAT:
@@ -3340,7 +3431,9 @@ gdk_event_translate (MSG *msg,
/* Now the clipboard owner should have rendered */
if (!_delayed_rendering_data)
GDK_NOTE (EVENTS, g_print (" (no _delayed_rendering_data?)"));
{
GDK_NOTE (EVENTS, g_print (" (no _delayed_rendering_data?)"));
}
else
{
if (msg->wParam == CF_DIB)
@@ -3354,6 +3447,7 @@ gdk_event_translate (MSG *msg,
break;
}
}
/* The requestor is holding the clipboard, no
* OpenClipboard() is required/possible
*/
@@ -3363,47 +3457,20 @@ gdk_event_translate (MSG *msg,
}
break;
case WM_ACTIVATE: {
/*
* On Windows, transient windows will not have their own taskbar entries.
* Because of this, we must hide and restore groups of transients in both
* directions. That is, all transient children must be hidden or restored
* with this window, but if this window's transient owner also has a
* transient owner then this window's transient owner must be hidden/restored
* with this one. And etc, up the chain until we hit an ancestor that has no
* transient owner.
*
* It would be a good idea if applications don't chain transient windows
* together. There's a limit to how much evil GTK can try to shield you
* from.
*/
GdkWindow *tmp_window = NULL;
GdkWindowImplWin32 *tmp_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
case WM_ACTIVATE:
while (tmp_impl->transient_owner != NULL)
/* We handle mouse clicks for modally-blocked windows under WM_MOUSEACTIVATE,
* but we still need to deal with alt-tab, or with SetActiveWindow() type
* situations. */
if (is_modally_blocked (window) && msg->wParam == WA_ACTIVE)
{
tmp_window = tmp_impl->transient_owner;
tmp_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (tmp_window)->impl);
GdkWindow *modal_current = _gdk_modal_current ();
SetActiveWindow (GDK_WINDOW_HWND (modal_current));
*ret_valp = 0;
return_val = TRUE;
break;
}
if (tmp_window == NULL)
tmp_window = window;
if (LOWORD (msg->wParam) == WA_INACTIVE && HIWORD (msg->wParam))
{
if (!tmp_impl->changing_state)
{
show_window_recurse (tmp_window, TRUE);
}
}
else if (LOWORD (msg->wParam) == WA_ACTIVE && HIWORD (msg->wParam))
{
if (!tmp_impl->changing_state)
{
show_window_recurse (tmp_window, FALSE);
}
}
/* Bring any tablet contexts to the top of the overlap order when
* one of our windows is activated.
* NOTE: It doesn't seem to work well if it is done in WM_ACTIVATEAPP
@@ -3412,7 +3479,7 @@ gdk_event_translate (MSG *msg,
if (LOWORD(msg->wParam) != WA_INACTIVE)
_gdk_input_set_tablet_active ();
break;
}
/* Handle WINTAB events here, as we know that gdkinput.c will
* use the fixed WT_DEFBASE as lcMsgBase, and we thus can use the
@@ -3439,10 +3506,12 @@ gdk_event_translate (MSG *msg,
event = gdk_event_new (GDK_NOTHING);
event->any.window = window;
g_object_ref (window);
if (_gdk_input_other_event (event, msg, window))
append_event (event);
else
gdk_event_free (event);
break;
}
@@ -3500,11 +3569,15 @@ gdk_event_check (GSource *source)
GDK_THREADS_ENTER ();
if (event_poll_fd.revents & G_IO_IN)
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
PeekMessageW (&msg, NULL, 0, 0, PM_NOREMOVE)));
{
retval = (_gdk_event_queue_find_first (_gdk_display) != NULL ||
(modal_win32_dialog == NULL &&
PeekMessageW (&msg, NULL, 0, 0, PM_NOREMOVE)));
}
else
retval = FALSE;
{
retval = FALSE;
}
GDK_THREADS_LEAVE ();
@@ -3542,6 +3615,13 @@ gdk_win32_set_modal_dialog_libgtk_only (HWND window)
modal_win32_dialog = window;
}
static gboolean
is_modally_blocked (GdkWindow *window)
{
GdkWindow *modal_current = _gdk_modal_current ();
return modal_current != NULL ? gdk_window_get_toplevel (window) != modal_current : FALSE;
}
static void
check_for_too_much_data (GdkEvent *event)
{
@@ -3549,7 +3629,9 @@ check_for_too_much_data (GdkEvent *event)
event->client.data.l[2] ||
event->client.data.l[3] ||
event->client.data.l[4])
g_warning ("Only four bytes of data are passed in client messages on Win32\n");
{
g_warning ("Only four bytes of data are passed in client messages on Win32\n");
}
}
gboolean
+5
View File
@@ -276,6 +276,11 @@ void _gdk_wchar_text_handle (GdkFont *font,
void *),
void *arg);
void _gdk_push_modal_window (GdkWindow *window);
void _gdk_remove_modal_window (GdkWindow *window);
GdkWindow *_gdk_modal_current ();
#ifdef G_ENABLE_DEBUG
gchar *_gdk_win32_color_to_string (const GdkColor *color);
void _gdk_win32_print_paletteentries (const PALETTEENTRY *pep,
+1 -1
View File
@@ -85,7 +85,7 @@ void gdk_win32_selection_add_targets (GdkWindow *owner,
GdkAtom *targets);
/* For internal GTK use only */
GdkPixbuf * gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon);
GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon);
HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
void gdk_win32_set_modal_dialog_libgtk_only (HWND window);
+108 -11
View File
@@ -51,6 +51,7 @@ static void gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass);
static void gdk_window_impl_win32_finalize (GObject *object);
static gpointer parent_class = NULL;
static GSList *modal_window_stack = NULL;
static void update_style_bits (GdkWindow *window);
static gboolean _gdk_window_get_functions (GdkWindow *window,
@@ -154,14 +155,17 @@ gdk_window_impl_win32_finalize (GObject *object)
{
if (GetCursor () == window_impl->hcursor)
SetCursor (NULL);
GDI_CALL (DestroyCursor, (window_impl->hcursor));
window_impl->hcursor = NULL;
}
if (window_impl->hicon_big != NULL)
{
GDI_CALL (DestroyIcon, (window_impl->hicon_big));
window_impl->hicon_big = NULL;
}
if (window_impl->hicon_small != NULL)
{
GDI_CALL (DestroyIcon, (window_impl->hicon_small));
@@ -338,6 +342,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
wcl.hInstance = _gdk_app_hmodule;
wcl.hIcon = 0;
wcl.hIconSm = 0;
/* initialize once! */
if (0 == hAppIcon && 0 == hAppIconSm)
{
@@ -346,12 +351,16 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
if (0 != GetModuleFileName (_gdk_app_hmodule, sLoc, MAX_PATH))
{
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
if (0 == hAppIcon && 0 == hAppIconSm)
{
if (0 != GetModuleFileName (_gdk_dll_hinstance, sLoc, MAX_PATH))
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
{
ExtractIconEx (sLoc, 0, &hAppIcon, &hAppIconSm, 1);
}
}
}
if (0 == hAppIcon && 0 == hAppIconSm)
{
hAppIcon = LoadImage (NULL, IDI_APPLICATION, IMAGE_ICON,
@@ -362,6 +371,7 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
GetSystemMetrics (SM_CYSMICON), 0);
}
}
if (0 == hAppIcon)
hAppIcon = hAppIconSm;
else if (0 == hAppIconSm)
@@ -844,6 +854,9 @@ _gdk_windowing_window_destroy (GdkWindow *window,
if (private->extension_events != 0)
_gdk_input_window_destroy (window);
/* Remove ourself from the modal stack */
_gdk_remove_modal_window (window);
/* Remove all our transient children */
tmp = window_impl->transient_children;
while (tmp != NULL)
@@ -1775,7 +1788,9 @@ get_effective_window_decorations (GdkWindow *window,
if (((GdkWindowObject *) window)->window_type != GDK_WINDOW_TOPLEVEL &&
((GdkWindowObject *) window)->window_type != GDK_WINDOW_DIALOG)
return FALSE;
{
return FALSE;
}
if ((impl->hint_flags & GDK_HINT_MIN_SIZE) &&
(impl->hint_flags & GDK_HINT_MAX_SIZE) &&
@@ -1783,12 +1798,17 @@ get_effective_window_decorations (GdkWindow *window,
impl->hints.min_height == impl->hints.max_height)
{
*decoration = GDK_DECOR_ALL | GDK_DECOR_RESIZEH | GDK_DECOR_MAXIMIZE;
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_MENU ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_TOOLBAR)
*decoration |= GDK_DECOR_MINIMIZE;
{
*decoration |= GDK_DECOR_MINIMIZE;
}
else if (impl->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
*decoration |= GDK_DECOR_MENU | GDK_DECOR_MINIMIZE;
{
*decoration |= GDK_DECOR_MENU | GDK_DECOR_MINIMIZE;
}
return TRUE;
}
@@ -1798,7 +1818,10 @@ get_effective_window_decorations (GdkWindow *window,
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_MENU ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_TOOLBAR)
*decoration |= GDK_DECOR_MINIMIZE;
{
*decoration |= GDK_DECOR_MINIMIZE;
}
return TRUE;
}
else
@@ -1985,6 +2008,8 @@ gdk_window_set_transient_for (GdkWindow *window,
trans_impl->transient_children = NULL;
}
}
g_object_unref (G_OBJECT (window_impl->transient_owner));
g_object_unref (G_OBJECT (window));
window_impl->transient_owner = NULL;
}
@@ -1993,8 +2018,10 @@ gdk_window_set_transient_for (GdkWindow *window,
parent_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (parent)->impl);
parent_impl->transient_children = g_slist_append (parent_impl->transient_children, window);
g_object_ref (G_OBJECT (window));
parent_impl->num_transients++;
window_impl->transient_owner = parent;
g_object_ref (G_OBJECT (parent));
}
/* This changes the *owner* of the window, despite the misleading
@@ -2008,6 +2035,54 @@ gdk_window_set_transient_for (GdkWindow *window,
WIN32_API_FAILED ("SetWindowLong");
}
void
_gdk_push_modal_window (GdkWindow *window)
{
modal_window_stack = g_slist_prepend (modal_window_stack,
window);
}
void
_gdk_remove_modal_window (GdkWindow *window)
{
GSList *tmp;
g_return_if_fail (window != NULL);
/* It's possible to be NULL here if someone sets the modal hint of the window
* to FALSE before a modal window stack has ever been created. */
if (modal_window_stack == NULL)
return;
/* Find the requested window in the stack and remove it. Yeah, I realize this
* means we're not a 'real stack', strictly speaking. Sue me. :) */
tmp = g_slist_find (modal_window_stack, window);
if (tmp != NULL)
{
modal_window_stack = g_slist_delete_link (modal_window_stack, tmp);
}
}
GdkWindow *
_gdk_modal_current ()
{
if (modal_window_stack != NULL)
{
GSList *tmp = modal_window_stack;
while (tmp != NULL && !GDK_WINDOW_IS_MAPPED (tmp->data))
{
tmp = g_slist_next (tmp);
}
return tmp != NULL ? tmp->data : NULL;
}
else
{
return NULL;
}
}
void
gdk_window_set_background (GdkWindow *window,
const GdkColor *color)
@@ -3313,9 +3388,11 @@ struct _FullscreenInfo
void
gdk_window_fullscreen (GdkWindow *window)
{
gint width, height;
gint x, y, width, height;
FullscreenInfo *fi;
GdkWindowObject *private = (GdkWindowObject *) window;
HMONITOR monitor;
MONITORINFO mi;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -3327,9 +3404,22 @@ gdk_window_fullscreen (GdkWindow *window)
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (private->impl);
width = GetSystemMetrics (SM_CXSCREEN);
height = GetSystemMetrics (SM_CYSCREEN);
monitor = MonitorFromWindow (GDK_WINDOW_HWND (window), MONITOR_DEFAULTTONEAREST);
mi.cbSize = sizeof (mi);
if (monitor && GetMonitorInfo (monitor, &mi))
{
x = mi.rcMonitor.left;
y = mi.rcMonitor.top;
width = mi.rcMonitor.right - x;
height = mi.rcMonitor.bottom - y;
}
else
{
x = y = 0;
width = GetSystemMetrics (SM_CXSCREEN);
height = GetSystemMetrics (SM_CYSCREEN);
}
/* remember for restoring */
fi->hint_flags = impl->hint_flags;
impl->hint_flags &= ~GDK_HINT_MAX_SIZE;
@@ -3340,7 +3430,7 @@ gdk_window_fullscreen (GdkWindow *window)
(fi->style & ~WS_OVERLAPPEDWINDOW) | WS_POPUP);
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, width, height,
x, y, width, height,
SWP_NOCOPYBITS | SWP_SHOWWINDOW));
gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FULLSCREEN);
@@ -3451,13 +3541,20 @@ gdk_window_set_modal_hint (GdkWindow *window,
private->modal_hint = modal;
#if 1
#if 0
/* Not sure about this one.. -- Cody */
if (GDK_WINDOW_IS_MAPPED (window))
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
modal ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE));
#else
if (modal)
_gdk_push_modal_window (window);
else
_gdk_remove_modal_window (window);
#endif
}
-1
View File
@@ -96,7 +96,6 @@ struct _GdkWindowImplWin32
struct _GdkWindowImplWin32Class
{
GdkDrawableImplWin32Class parent_class;
};
GType _gdk_window_impl_win32_get_type (void);
+10 -5
View File
@@ -754,11 +754,16 @@ _gdk_device_get_history (GdkDevice *device,
if (device_coords)
{
coords = _gdk_device_allocate_history (device, *n_events);
for (i=0; i<*n_events; i++)
gdk_input_translate_coordinates (gdkdev, input_window,
device_coords[i].data,
coords[i]->axes, NULL, NULL);
for (i = 0; i < *n_events; i++)
{
coords[i]->time = device_coords[i].time;
gdk_input_translate_coordinates (gdkdev, input_window,
device_coords[i].data,
coords[i]->axes, NULL, NULL);
}
XFreeDeviceMotionEvents (device_coords);
*events = coords;
+16 -3
View File
@@ -14,7 +14,6 @@ cp -p @abs_srcdir@/COPYING share/doc/gtk+-dev-@GTK_VERSION@
rm $ZIP
zip $ZIP -@ <<EOF
COPYING.LIB-2
etc/gtk-2.0/gdk-pixbuf.loaders
etc/gtk-2.0/gtkrc
etc/gtk-2.0/gtk.immodules
@@ -32,8 +31,21 @@ zip $ZIP share/themes/Default/gtk-2.0-key/gtkrc
zip $ZIP share/themes/Emacs/gtk-2.0-key/gtkrc
zip $ZIP share/themes/MS-Windows/gtk-2.0/gtkrc
zip $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
zip $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
if [ -f lib/locale/de/LC_MESSAGES/gtk20.mo -a -f share/locale/de/LC_MESSAGES/gtk20.mo ]; then
if [ lib/locale/de/LC_MESSAGES/gtk20.mo -nt share/locale/de/LC_MESSAGES/gtk20.mo ]; then
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
else
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20.mo
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20-properties.mo
fi
elif [ -f lib/locale/de/LC_MESSAGES/gtk20.mo ]; then
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
zip -r $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
else
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20.mo
zip -r $ZIP share/locale/*/LC_MESSAGES/gtk20-properties.mo
fi
zip -r $ZIP share/doc/gtk+-@GTK_VERSION@
@@ -41,6 +53,7 @@ rm $DEVZIP
zip -r $DEVZIP -@ <<EOF
include/gtk-2.0
bin/gdk-pixbuf-csource.exe
bin/gtk-builder-convert
bin/gtk-demo.exe
man/man1/gdk-pixbuf-csource.1
lib/libgdk_pixbuf-@GTK_API_VERSION@.dll.a
+4
View File
@@ -4,8 +4,12 @@ SUBDIRS=theme-bits
if OS_UNIX
SUBDIRS += xdgmime
if USE_QUARTZ
GTK_PRINT_PREVIEW_COMMAND="/Applications/Preview.app/Contents/MacOS/Preview %f"
else
GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings %s %f"
endif
endif
DIST_SUBDIRS=theme-bits xdgmime
+126 -75
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright (C) 2006-2007 Async Open Source
# Copyright (C) 2006-2008 Async Open Source
# Henrique Romano <henrique@async.com.br>
# Johan Dahlin <jdahlin@async.com.br>
#
@@ -58,7 +58,7 @@ def get_child_nodes(node):
assert node.tagName == 'object'
nodes = []
for child in node.childNodes:
if child.nodeType == Node.TEXT_NODE:
if child.nodeType != Node.ELEMENT_NODE:
continue
if child.tagName != 'child':
continue
@@ -69,7 +69,7 @@ def get_properties(node):
assert node.tagName == 'object'
properties = {}
for child in node.childNodes:
if child.nodeType == Node.TEXT_NODE:
if child.nodeType != Node.ELEMENT_NODE:
continue
if child.tagName != 'property':
continue
@@ -82,11 +82,22 @@ def get_property(node, property_name):
properties = get_properties(node)
return properties.get(property_name)
def get_property_node(node, property_name):
assert node.tagName == 'object'
properties = {}
for child in node.childNodes:
if child.nodeType != Node.ELEMENT_NODE:
continue
if child.tagName != 'property':
continue
if child.getAttribute('name') == property_name:
return child
def get_signal_nodes(node):
assert node.tagName == 'object'
signals = []
for child in node.childNodes:
if child.nodeType == Node.TEXT_NODE:
if child.nodeType != Node.ELEMENT_NODE:
continue
if child.tagName == 'signal':
signals.append(child)
@@ -96,8 +107,9 @@ def get_property_nodes(node):
assert node.tagName == 'object'
properties = []
for child in node.childNodes:
if child.nodeType == Node.TEXT_NODE:
if child.nodeType != Node.ELEMENT_NODE:
continue
# FIXME: handle comments
if child.tagName == 'property':
properties.append(child)
return properties
@@ -106,17 +118,17 @@ def get_accelerator_nodes(node):
assert node.tagName == 'object'
accelerators = []
for child in node.childNodes:
if child.nodeType == Node.TEXT_NODE:
if child.nodeType != Node.ELEMENT_NODE:
continue
if child.tagName == 'accelerator':
accelerators.append(child)
return accelerators
def get_object_node(child_node):
assert child_node.tagName == 'child'
assert child_node.tagName == 'child', child_node
nodes = []
for node in child_node.childNodes:
if node.nodeType == Node.TEXT_NODE:
if node.nodeType != Node.ELEMENT_NODE:
continue
if node.tagName == 'object':
nodes.append(node)
@@ -126,9 +138,11 @@ def get_object_node(child_node):
def copy_properties(node, props, prop_dict):
assert node.tagName == 'object'
for prop_name in props:
value = get_property(node, prop_name)
if value is not None:
prop_dict[prop_name] = value
child = get_property_node(node, prop_name)
if child is not None:
prop_dict[prop_name] = child
return node
class GtkBuilderConverter(object):
@@ -165,7 +179,22 @@ class GtkBuilderConverter(object):
return [w for w in self._dom.getElementsByTagName("object")
if w.getAttribute(attribute) == value]
def _create_object(self, obj_class, obj_id, template=None, **properties):
def _create_object(self, obj_class, obj_id, template=None, properties=None):
"""
Creates a new <object> tag.
Optionally a name template can be provided which will be used
to avoid naming collisions.
The properties dictionary can either contain string values or Node
values. If a node is provided the name of the node will be overridden
by the dictionary key.
@param obj_class: class of the object (class tag)
@param obj_id: identifier of the object (id tag)
@param template: name template to use, for example 'button'
@param properties: dictionary of properties
@type properties: string or Node.
@returns: Newly created node of the object
"""
if template is not None:
count = 1
while True:
@@ -179,16 +208,23 @@ class GtkBuilderConverter(object):
obj = self._dom.createElement('object')
obj.setAttribute('class', obj_class)
obj.setAttribute('id', obj_id)
for name, value in properties.items():
prop = self._dom.createElement('property')
prop.setAttribute('name', name)
prop.appendChild(self._dom.createTextNode(value))
obj.appendChild(prop)
if properties:
for name, value in properties.items():
if isinstance(value, Node):
# Reuse the node, so translatable and context still will be
# set when converting nodes. See also #509153
prop = value
else:
prop = self._dom.createElement('property')
prop.appendChild(self._dom.createTextNode(value))
prop.setAttribute('name', str(name))
obj.appendChild(prop)
self.objects[obj_id] = obj
return obj
def _create_root_object(self, obj_class, template, **properties):
obj = self._create_object(obj_class, None, template, **properties)
def _create_root_object(self, obj_class, template, properties=None):
obj = self._create_object(obj_class, None, template, properties)
self.root_objects.append(obj)
return obj
@@ -227,6 +263,10 @@ class GtkBuilderConverter(object):
for node in self._dom.getElementsByTagName("ui"):
self._convert_ui(node)
# Convert accessibility tag
for node in self._dom.getElementsByTagName("accessibility"):
self._convert_accessibility(node)
# Output the newly created root objects and sort them
# by attribute id
for obj in sorted(self.root_objects,
@@ -241,9 +281,11 @@ class GtkBuilderConverter(object):
self._packing_prop_to_child_attr(
node, "type", "label_item", "label")
elif klass == "GtkMenuBar":
self._convert_menubar(node)
elif klass == "GtkMenu":
self._convert_menu(node)
elif klass == "GtkMenu":
# Only convert toplevel popups
if node.parentNode == self._interface:
self._convert_menu(node, popup=True)
elif klass in WINDOWS and self.skip_windows:
self._remove_window(node)
self._default_widget_converter(node)
@@ -279,42 +321,20 @@ class GtkBuilderConverter(object):
parent.removeChild(node)
parent.appendChild(object_node)
def _convert_menubar(self, node):
def _convert_menu(self, node, popup=False):
if node.hasAttribute('constructor'):
return
uimgr = self._create_root_object('GtkUIManager',
template='uimanager')
menubar = self._dom.createElement('menubar')
menubar.setAttribute('name', node.getAttribute('id'))
node.setAttribute('constructor', uimgr.getAttribute('id'))
if popup:
name = 'popup'
else:
name = 'menubar'
for child in get_child_nodes(node):
obj_node = get_object_node(child)
item = self._convert_menuitem(uimgr, obj_node)
menubar.appendChild(item)
child.removeChild(obj_node)
child.parentNode.removeChild(child)
ui = self._dom.createElement('ui')
uimgr.appendChild(ui)
ui.appendChild(menubar)
def _convert_menu(self, node):
if node.hasAttribute('constructor'):
return
# Only convert toplevel menu objects
if node.parentNode != self._interface:
return
uimgr = self._create_root_object('GtkUIManager',
template='uimanager')
menu = self._dom.createElement('menubar')
menu = self._dom.createElement(name)
menu.setAttribute('name', node.getAttribute('id'))
node.setAttribute('constructor', uimgr.getAttribute('id'))
for child in get_child_nodes(node):
@@ -362,7 +382,7 @@ class GtkBuilderConverter(object):
return menu
def _menuitem_to_action(self, node, properties):
copy_properties(node, ['label'], properties)
copy_properties(node, ['label', 'tooltip'], properties)
def _togglemenuitem_to_action(self, node, properties):
self._menuitem_to_action(node, properties)
@@ -391,27 +411,27 @@ class GtkBuilderConverter(object):
if (children and
children[0].getAttribute('internal-child') == 'image'):
image = get_object_node(children[0])
stock_id = get_property(image, 'stock')
if stock_id is not None:
properties['stock_id'] = stock_id
child = get_property_node(image, 'stock')
if child is not None:
properties['stock_id'] = child
self._menuitem_to_action(node, properties)
elif object_class == 'GtkSeparatorMenuItem':
return
else:
raise NotImplementedError(object_class)
if get_property(node, 'use_stock') == 'True':
stock_id = get_property(node, 'label')
if stock_id is not None:
properties['stock_id'] = stock_id
if 'label' in properties:
properties['stock_id'] = child
del properties['label']
properties['name'] = object_id
action = self._create_object(name,
object_id,
**properties)
properties=properties)
for signal in get_signal_nodes(node):
signal_name = signal.getAttribute('name')
if signal_name == 'activate':
if signal_name in ['activate', 'toggled']:
action.appendChild(signal)
else:
print 'Unhandled signal %s::%s' % (node.getAttribute('class'),
@@ -480,7 +500,7 @@ class GtkBuilderConverter(object):
# 2) Get dialogs action-widgets tag, create if not found
for child in dialog.childNodes:
if child.nodeType == Node.TEXT_NODE:
if child.nodeType != Node.ELEMENT_NODE:
continue
if child.tagName == 'action-widgets':
actions = child
@@ -496,20 +516,28 @@ class GtkBuilderConverter(object):
actions.appendChild(action)
def _convert_adjustment(self, prop):
data = prop.childNodes[0].data
value, lower, upper, step, page, page_size = data.split(' ')
properties = {}
if prop.childNodes:
data = prop.childNodes[0].data
value, lower, upper, step, page, page_size = data.split(' ')
properties.update(value=value,
lower=lower,
upper=upper,
step_increment=step,
page_increment=page,
page_size=page_size)
else:
prop.appendChild(self._dom.createTextNode(""))
adj = self._create_root_object("GtkAdjustment",
template='adjustment',
value=value,
lower=lower,
upper=upper,
step_increment=step,
page_increment=page,
page_size=page_size)
properties=properties)
prop.childNodes[0].data = adj.getAttribute('id')
def _convert_combobox_items(self, node, prop):
parent = prop.parentNode
if not prop.childNodes:
parent.removeChild(prop)
return
value = prop.childNodes[0].data
model = self._create_root_object("GtkListStore",
@@ -534,7 +562,6 @@ class GtkBuilderConverter(object):
col.appendChild(self._dom.createTextNode(item))
row.appendChild(col)
parent = prop.parentNode
model_prop = self._dom.createElement('property')
model_prop.setAttribute('name', 'model')
model_prop.appendChild(
@@ -567,7 +594,7 @@ class GtkBuilderConverter(object):
prop.removeAttribute('translatable')
tbuffer = self._create_root_object("GtkTextBuffer",
template='textbuffer',
text=data)
properties=dict(text=data))
prop.childNodes[0].data = tbuffer.getAttribute('id')
def _packing_prop_to_child_attr(self, node, prop_name, prop_val,
@@ -609,6 +636,35 @@ class GtkBuilderConverter(object):
widget.getAttributeNode("constructor").value = parent_id
node.removeAttribute("id")
def _convert_accessibility(self, node):
objectNode = node.parentNode
parent_id = objectNode.getAttribute("id")
properties = {}
for node in node.childNodes:
if node.nodeName == 'atkproperty':
node.tagName = 'property'
properties[node.getAttribute('name')] = node
node.parentNode.removeChild(node)
elif node.nodeName == 'atkrelation':
node.tagName = 'relation'
relation_type = node.getAttribute('type')
relation_type = relation_type.replace('_', '-')
node.setAttribute('type', relation_type)
elif node.nodeName == 'atkaction':
node.tagName = 'action'
if properties:
child = self._dom.createElement('child')
child.setAttribute("internal-child", "accessible")
atkobject = self._create_object(
"AtkObject", None,
template='a11y-%s' % (parent_id,),
properties=properties)
child.appendChild(atkobject)
objectNode.appendChild(child)
def _strip_root(self, root_name):
for widget in self._dom.getElementsByTagName("widget"):
if widget.getAttribute('id') == root_name:
@@ -617,16 +673,11 @@ class GtkBuilderConverter(object):
raise SystemExit("Could not find an object called `%s'" % (
root_name))
# If it's already a root object, don't do anything
if widget.parentNode is self._interface:
return
for child in self._interface.childNodes[:]:
if child.nodeType != Node.ELEMENT_NODE:
continue
child.parentNode.removeChild(child)
widget.parentNode.removeChild(widget)
self._interface.appendChild(widget)
+2 -1
View File
@@ -1715,7 +1715,8 @@ credits_key_press_event (GtkWidget *text_view,
switch (event->keyval)
{
case GDK_Return:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
+8 -3
View File
@@ -637,7 +637,8 @@ _gtk_action_sync_menu_visible (GtkAction *action,
GtkWidget *proxy,
gboolean empty)
{
gboolean visible, hide_if_empty;
gboolean visible = TRUE;
gboolean hide_if_empty = TRUE;
g_return_if_fail (GTK_IS_MENU_ITEM (proxy));
g_return_if_fail (action == NULL || GTK_IS_ACTION (action));
@@ -645,8 +646,12 @@ _gtk_action_sync_menu_visible (GtkAction *action,
if (action == NULL)
action = g_object_get_qdata (G_OBJECT (proxy), quark_gtk_action_proxy);
visible = gtk_action_is_visible (action);
hide_if_empty = action->private_data->hide_if_empty;
if (action)
{
/* a GtkMenu for a <popup/> doesn't have to have an action */
visible = gtk_action_is_visible (action);
hide_if_empty = action->private_data->hide_if_empty;
}
if (visible && !(empty && hide_if_empty))
gtk_widget_show (proxy);
+6 -3
View File
@@ -728,10 +728,10 @@ gtk_assistant_init (GtkAssistant *assistant)
{
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->close, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->cancel, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->last, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->back, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->forward, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->apply, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->forward, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->back, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (priv->action_area), assistant->last, FALSE, FALSE, 0);
}
gtk_widget_set_parent (priv->action_area, GTK_WIDGET (assistant));
@@ -869,6 +869,9 @@ remove_page (GtkAssistant *assistant,
while (page_node && !GTK_WIDGET_VISIBLE (((GtkAssistantPage *) page_node->data)->page))
page_node = page_node->next;
if (page_node == element)
page_node = page_node->next;
if (page_node)
priv->current_page = page_node->data;
else
+52 -24
View File
@@ -67,7 +67,6 @@ struct _GtkBuilderPrivate
GHashTable *objects;
GSList *delayed_properties;
GSList *signals;
GSList *root_objects;
gchar *filename;
};
@@ -114,7 +113,7 @@ gtk_builder_init (GtkBuilder *builder)
GtkBuilderPrivate);
builder->priv->domain = NULL;
builder->priv->objects = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
g_free, g_object_unref);
}
@@ -135,9 +134,6 @@ gtk_builder_finalize (GObject *object)
g_slist_foreach (priv->signals, (GFunc) _free_signal_info, NULL);
g_slist_free (priv->signals);
g_slist_foreach (priv->root_objects, (GFunc) g_object_unref, NULL);
g_slist_free (priv->root_objects);
G_OBJECT_CLASS (gtk_builder_parent_class)->finalize (object);
}
@@ -338,7 +334,8 @@ gtk_builder_get_parameters (GtkBuilder *builder,
static GObject *
gtk_builder_get_internal_child (GtkBuilder *builder,
ObjectInfo *info,
const gchar *childname)
const gchar *childname,
GError **error)
{
GObject *obj = NULL;
@@ -363,14 +360,19 @@ gtk_builder_get_internal_child (GtkBuilder *builder,
};
if (!obj)
g_error ("Unknown internal child: %s\n", childname);
{
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"Unknown internal child: %s", childname);
}
return obj;
}
GObject *
_gtk_builder_construct (GtkBuilder *builder,
ObjectInfo *info)
ObjectInfo *info,
GError **error)
{
GArray *parameters, *construct_parameters;
GType object_type;
@@ -383,7 +385,14 @@ _gtk_builder_construct (GtkBuilder *builder,
g_assert (info->class_name != NULL);
object_type = gtk_builder_get_type_from_name (builder, info->class_name);
if (object_type == G_TYPE_INVALID)
g_error ("Invalid type: %s", info->class_name);
{
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"Invalid object type `%s'",
info->class_name);
return NULL;
}
gtk_builder_get_parameters (builder, object_type,
info->id,
@@ -397,23 +406,38 @@ _gtk_builder_construct (GtkBuilder *builder,
constructor = gtk_builder_get_object (builder, info->constructor);
if (constructor == NULL)
g_error ("Unknown constructor for %s: %s\n", info->id,
info->constructor);
{
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"Unknown object constructor for %s: %s",
info->id,
info->constructor);
g_array_free (parameters, TRUE);
g_array_free (construct_parameters, TRUE);
return NULL;
}
obj = gtk_buildable_construct_child (GTK_BUILDABLE (constructor),
builder,
info->id);
g_assert (obj != NULL);
if (construct_parameters->len)
g_warning ("Can't pass in construct-only parameters to %s", info->id);
g_object_ref (obj);
}
else if (info->parent && ((ChildInfo*)info->parent)->internal_child != NULL)
{
gchar *childname = ((ChildInfo*)info->parent)->internal_child;
obj = gtk_builder_get_internal_child (builder, info, childname);
obj = gtk_builder_get_internal_child (builder, info, childname, error);
if (!obj)
{
g_array_free (parameters, TRUE);
g_array_free (construct_parameters, TRUE);
return NULL;
}
if (construct_parameters->len)
g_warning ("Can't pass in construct-only parameters to %s", childname);
g_object_ref (obj);
}
else
{
@@ -421,6 +445,18 @@ _gtk_builder_construct (GtkBuilder *builder,
construct_parameters->len,
(GParameter *)construct_parameters->data);
/* No matter what, make sure we have a reference.
*
* If it's an initially unowned object, sink it.
* If it's not initially unowned then we have the reference already.
*
* In the case that this is a window it will be sunk already and
* this is effectively a call to g_object_ref(). That's what
* we want.
*/
if (G_IS_INITIALLY_UNOWNED (obj))
g_object_ref_sink (obj);
GTK_NOTE (BUILDER,
g_print ("created %s of type %s\n", info->id, info->class_name));
@@ -472,15 +508,7 @@ _gtk_builder_construct (GtkBuilder *builder,
g_strdup (info->id),
g_free);
if (!info->parent && !GTK_IS_WINDOW (obj))
{
if (g_object_is_floating (obj))
g_object_ref_sink (obj);
builder->priv->root_objects =
g_slist_prepend (builder->priv->root_objects, obj);
}
/* we already own a reference to obj. put it in the hash table. */
g_hash_table_insert (builder->priv->objects, g_strdup (info->id), obj);
return obj;
+27 -18
View File
@@ -18,24 +18,20 @@
* Boston, MA 02111-1307, USA.
*/
#include <string.h>
#include <glib/gfileutils.h>
#include <glib/gi18n.h>
#include <glib/gmacros.h>
#include <glib/gmessages.h>
#include <glib/gslist.h>
#include <glib/gstrfuncs.h>
#include <glib-object.h>
#include <gmodule.h>
#include <config.h>
#include <string.h>
#include <gmodule.h>
#include <gdk/gdkenumtypes.h>
#include <gdk/gdkkeys.h>
#include <gtk/gtktypeutils.h>
#include "gtktypeutils.h"
#include "gtkbuilderprivate.h"
#include "gtkbuilder.h"
#include "gtkbuildable.h"
#include "gtkdebug.h"
#include "gtktypeutils.h"
#include "gtkintl.h"
#include "gtkalias.h"
static void free_property_info (PropertyInfo *info);
@@ -186,8 +182,9 @@ _gtk_builder_boolean_from_string (const gchar *string,
}
static GObject *
builder_construct (ParserData *data,
ObjectInfo *object_info)
builder_construct (ParserData *data,
ObjectInfo *object_info,
GError **error)
{
GObject *object;
@@ -198,7 +195,10 @@ builder_construct (ParserData *data,
object_info->properties = g_slist_reverse (object_info->properties);
object = _gtk_builder_construct (data->builder, object_info);
object = _gtk_builder_construct (data->builder, object_info, error);
if (!object)
return NULL;
g_assert (G_IS_OBJECT (object));
object_info->object = object;
@@ -349,7 +349,7 @@ parse_child (ParserData *data,
child_info->parent = (CommonInfo*)object_info;
object_info->object = builder_construct (data, object_info);
object_info->object = builder_construct (data, object_info, error);
}
static void
@@ -647,8 +647,13 @@ parse_custom (GMarkupParseContext *context,
{
ObjectInfo* object_info = (ObjectInfo*)parent_info;
if (!object_info->object)
object_info->object = _gtk_builder_construct (data->builder,
object_info);
{
object_info->object = _gtk_builder_construct (data->builder,
object_info,
error);
if (!object_info->object)
return TRUE; /* A GError is already set */
}
g_assert (object_info->object);
object = object_info->object;
child = NULL;
@@ -807,8 +812,12 @@ end_element (GMarkupParseContext *context,
ObjectInfo *object_info = state_pop_info (data, ObjectInfo);
ChildInfo* child_info = state_peek_info (data, ChildInfo);
object_info->object = builder_construct (data, object_info);
object_info->object = builder_construct (data, object_info, error);
if (!object_info->object)
{
free_object_info (object_info);
return;
}
if (child_info)
child_info->object = object_info->object;
+2 -1
View File
@@ -103,7 +103,8 @@ void _gtk_builder_parser_parse_buffer (GtkBuilder *builder,
gsize length,
GError **error);
GObject * _gtk_builder_construct (GtkBuilder *builder,
ObjectInfo *info);
ObjectInfo *info,
GError **error);
void _gtk_builder_add (GtkBuilder *builder,
ChildInfo *child_info);
void _gtk_builder_add_signals (GtkBuilder *builder,
+2 -2
View File
@@ -191,10 +191,10 @@ dates_difference(guint year1, guint mm1, guint dd1,
#define HEADER_BG_COLOR(widget) (& (widget)->style->bg[GTK_WIDGET_STATE (widget)])
#define SELECTED_BG_COLOR(widget) (& (widget)->style->base[GTK_WIDGET_HAS_FOCUS (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE])
#define SELECTED_FG_COLOR(widget) (& (widget)->style->text[GTK_WIDGET_HAS_FOCUS (widget) ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE])
#define NORMAL_DAY_COLOR(widget) (& (widget)->style->fg[GTK_WIDGET_STATE (widget)])
#define NORMAL_DAY_COLOR(widget) (& (widget)->style->text[GTK_WIDGET_STATE (widget)])
#define PREV_MONTH_COLOR(widget) (& (widget)->style->mid[GTK_WIDGET_STATE (widget)])
#define NEXT_MONTH_COLOR(widget) (& (widget)->style->mid[GTK_WIDGET_STATE (widget)])
#define MARKED_COLOR(widget) (& (widget)->style->fg[GTK_WIDGET_STATE (widget)])
#define MARKED_COLOR(widget) (& (widget)->style->text[GTK_WIDGET_STATE (widget)])
#define BACKGROUND_COLOR(widget) (& (widget)->style->base[GTK_WIDGET_STATE (widget)])
#define HIGHLIGHT_BACK_COLOR(widget) (& (widget)->style->mid[GTK_WIDGET_STATE (widget)])
+1 -1
View File
@@ -735,7 +735,7 @@ gtk_cell_view_cell_layout_reorder (GtkCellLayout *layout,
g_return_if_fail (link != NULL);
cellview->priv->cell_list = g_list_remove_link (cellview->priv->cell_list,
cellview->priv->cell_list = g_list_delete_link (cellview->priv->cell_list,
link);
cellview->priv->cell_list = g_list_insert (cellview->priv->cell_list,
info, position);
+38 -17
View File
@@ -1,7 +1,7 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2000 Red Hat, Inc.
* Copyright (C) 2004 Nokia Corporation
* Copyright (C) 2006 Imendio AB
* Copyright (C) 2006-2008 Imendio AB
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -94,26 +94,27 @@ struct _GtkClipboardClass
GtkSelectionData selection_data;
guint info;
selection_data.selection = clipboard->selection;
selection_data.data = NULL;
selection_data.target = _gtk_quartz_pasteboard_type_to_atom (type);
if (!clipboard->target_list)
return;
if (clipboard->target_list &&
gtk_target_list_find (clipboard->target_list, selection_data.target, &info))
memset (&selection_data, 0, sizeof (GtkSelectionData));
selection_data.selection = clipboard->selection;
selection_data.target = _gtk_quartz_pasteboard_type_to_atom (type);
selection_data.display = gdk_display_get_default ();
selection_data.length = -1;
if (gtk_target_list_find (clipboard->target_list, selection_data.target, &info))
{
clipboard->get_func (clipboard, &selection_data,
info,
clipboard->user_data);
}
else
{
selection_data.length = -1;
}
_gtk_quartz_set_selection_data_for_pasteboard (clipboard->pasteboard,
&selection_data);
_gtk_quartz_set_selection_data_for_pasteboard (clipboard->pasteboard,
&selection_data);
g_free (selection_data.data);
g_free (selection_data.data);
}
}
- (void)pasteboardChangedOwner:(NSPasteboard *)sender
@@ -393,6 +394,27 @@ gtk_clipboard_set_contents (GtkClipboard *clipboard,
types = _gtk_quartz_target_entries_to_pasteboard_types (targets, n_targets);
if (!(clipboard->have_owner && have_owner) ||
clipboard->user_data != user_data)
{
clipboard_unset (clipboard);
if (clipboard->get_func)
{
/* Calling unset() caused the clipboard contents to be reset!
* Avoid leaking and return
*/
if (!(clipboard->have_owner && have_owner) ||
clipboard->user_data != user_data)
{
(*clear_func) (clipboard, user_data);
return FALSE;
}
else
return TRUE;
}
}
clipboard->user_data = user_data;
clipboard->have_owner = have_owner;
if (have_owner)
@@ -526,6 +548,7 @@ clipboard_unset (GtkClipboard *clipboard)
if (old_have_owner)
{
clipboard_remove_owner_notify (clipboard);
clipboard->have_owner = FALSE;
}
@@ -844,8 +867,6 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
GdkAtom target)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
gchar *name;
NSData *data;
GtkSelectionData *selection_data = NULL;
if (target == gdk_atom_intern_static_string ("TARGETS"))
+2
View File
@@ -1066,6 +1066,7 @@ palette_activate (GtkWidget *widget,
/* should have a drawing area subclass with an activate signal */
if ((event->keyval == GDK_space) ||
(event->keyval == GDK_Return) ||
(event->keyval == GDK_ISO_Enter) ||
(event->keyval == GDK_KP_Enter) ||
(event->keyval == GDK_KP_Space))
{
@@ -1327,6 +1328,7 @@ key_press (GtkWidget *invisible,
{
case GDK_space:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
grab_color_at_mouse (screen, x, y, data);
+3 -1
View File
@@ -293,7 +293,9 @@ gtk_combo_window_key_press (GtkWidget *window,
{
guint state = event->state & gtk_accelerator_get_default_mod_mask ();
if ((event->keyval == GDK_Return || event->keyval == GDK_KP_Enter) &&
if ((event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter) &&
state == 0)
{
gtk_combo_popdown_list (combo);
+10 -2
View File
@@ -2309,8 +2309,14 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
}
}
child.x += shadow_width;
child.y += shadow_height;
child.width -= shadow_width * 2;
child.height -= shadow_height * 2;
child.width = MAX (1, child.width);
child.height = MAX (1, child.height);
gtk_widget_size_allocate (GTK_BIN (combo_box)->child, &child);
}
}
@@ -3846,7 +3852,7 @@ gtk_combo_box_list_key_press (GtkWidget *widget,
GtkComboBox *combo_box = GTK_COMBO_BOX (data);
GtkTreeIter iter;
if (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter ||
if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter || event->keyval == GDK_KP_Enter ||
event->keyval == GDK_space || event->keyval == GDK_KP_Space)
{
GtkTreeModel *model = NULL;
@@ -5329,7 +5335,9 @@ gtk_cell_editable_key_press (GtkWidget *widget,
return TRUE;
}
else if (event->keyval == GDK_Return)
else if (event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter)
{
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
+9 -1
View File
@@ -256,9 +256,12 @@ gtk_dialog_init (GtkDialog *dialog)
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
}
static GtkBuildableIface *parent_buildable_iface;
static void
gtk_dialog_buildable_interface_init (GtkBuildableIface *iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
iface->get_internal_child = gtk_dialog_buildable_get_internal_child;
iface->custom_tag_start = gtk_dialog_buildable_custom_tag_start;
iface->custom_finished = gtk_dialog_buildable_custom_finished;
@@ -1341,7 +1344,8 @@ gtk_dialog_buildable_custom_tag_start (GtkBuildable *buildable,
return TRUE;
}
return FALSE;
return parent_buildable_iface->custom_tag_start (buildable, builder, child,
tagname, parser, data);
}
static void
@@ -1359,7 +1363,11 @@ gtk_dialog_buildable_custom_finished (GtkBuildable *buildable,
guint signal_id;
if (strcmp (tagname, "action-widgets"))
{
parent_buildable_iface->custom_finished (buildable, builder, child,
tagname, user_data);
return;
}
dialog = GTK_DIALOG (buildable);
parser_data = (ActionWidgetsSubParserData*)user_data;
+1
View File
@@ -4062,6 +4062,7 @@ gtk_drag_key_cb (GtkWidget *widget,
case GDK_space:
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
case GDK_KP_Space:
gtk_drag_end (info, event->time);
+2
View File
@@ -820,6 +820,8 @@ gtk_entry_class_init (GtkEntryClass *class)
*/
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"activate", 0);
+3
View File
@@ -1049,6 +1049,9 @@ gtk_file_chooser_get_current_folder_uri (GtkFileChooser *chooser)
file_system = _gtk_file_chooser_get_file_system (chooser);
path = _gtk_file_chooser_get_current_folder_path (chooser);
if (!path)
return NULL;
uri = gtk_file_system_path_to_uri (file_system, path);
gtk_file_path_free (path);
+11 -11
View File
@@ -162,18 +162,18 @@ struct _GtkFileChooserButtonPrivate
guint8 n_volumes;
guint8 n_shortcuts;
guint8 n_bookmarks;
guint8 has_bookmark_separator : 1;
guint8 has_current_folder_separator : 1;
guint8 has_current_folder : 1;
guint8 has_other_separator : 1;
guint has_bookmark_separator : 1;
guint has_current_folder_separator : 1;
guint has_current_folder : 1;
guint has_other_separator : 1;
/* Used for hiding/showing the dialog when the button is hidden */
guint8 active : 1;
guint active : 1;
/* Used to track whether we need to set a default current folder on ::map() */
guint8 folder_has_been_set : 1;
guint folder_has_been_set : 1;
guint8 focus_on_click : 1;
guint focus_on_click : 1;
};
@@ -348,15 +348,15 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
widget_class->style_set = gtk_file_chooser_button_style_set;
widget_class->screen_changed = gtk_file_chooser_button_screen_changed;
widget_class->mnemonic_activate = gtk_file_chooser_button_mnemonic_activate;
/**
* GtkFileChooserButtons::file-set:
* GtkFileChooserButton::file-set:
* @widget: the object which received the signal.
*
* The ::file-set signal is emitted when the user selects a file.
*
*
* Note that this signal is only emitted when the <emphasis>user</emphasis>
* changes the file.
* changes the file.
*
* Since: 2.12
*/
+85 -96
View File
@@ -73,6 +73,7 @@
#if defined (G_OS_UNIX)
#include "gtkfilesystemunix.h"
#elif defined (G_OS_WIN32)
#include <windows.h>
#include "gtkfilesystemwin32.h"
#endif
@@ -390,10 +391,6 @@ static void check_preview_change (GtkFileChooserDefault *impl);
static void filter_combo_changed (GtkComboBox *combo_box,
GtkFileChooserDefault *impl);
static void shortcuts_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
GtkFileChooserDefault *impl);
static gboolean shortcuts_key_press_event_cb (GtkWidget *widget,
GdkEventKey *event,
@@ -1386,13 +1383,6 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
volume = data;
pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl),
impl->icon_size, NULL);
gtk_list_store_set (impl->shortcuts_model, &iter,
SHORTCUTS_COL_PIXBUF, pixbuf,
-1);
if (pixbuf)
g_object_unref (pixbuf);
}
else if (shortcut_type == SHORTCUT_TYPE_PATH)
{
@@ -1429,13 +1419,6 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)));
pixbuf = gtk_icon_theme_load_icon (icon_theme, "gnome-fs-share",
impl->icon_size, 0, NULL);
gtk_list_store_set (impl->shortcuts_model, &iter,
SHORTCUTS_COL_PIXBUF, pixbuf,
-1);
if (pixbuf)
g_object_unref (pixbuf);
}
}
else if (shortcut_type == SHORTCUT_TYPE_SEARCH)
@@ -1446,6 +1429,14 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
{
pixbuf = render_recent_icon (impl);
}
gtk_list_store_set (impl->shortcuts_model, &iter,
SHORTCUTS_COL_PIXBUF, pixbuf,
-1);
if (pixbuf)
g_object_unref (pixbuf);
}
}
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter));
@@ -2002,9 +1993,7 @@ shortcuts_append_paths (GtkFileChooserDefault *impl,
profile_start ("start", NULL);
/* As there is no separator now, we want to start there.
*/
start_row = shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR);
start_row = shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR) + 1;
num_inserted = 0;
for (; paths; paths = paths->next)
@@ -2016,6 +2005,8 @@ shortcuts_append_paths (GtkFileChooserDefault *impl,
if (impl->local_only &&
!gtk_file_system_path_is_local (impl->file_system, path))
continue;
if (shortcut_find_position (impl, path) != -1)
continue;
label = gtk_file_system_get_bookmark_label (impl->file_system, path);
@@ -2245,13 +2236,14 @@ shortcuts_add_bookmarks (GtkFileChooserDefault *impl)
impl->num_bookmarks + 1);
impl->num_bookmarks = 0;
shortcuts_insert_separator (impl, SHORTCUTS_BOOKMARKS_SEPARATOR);
bookmarks = gtk_file_system_list_bookmarks (impl->file_system);
shortcuts_append_paths (impl, bookmarks);
gtk_file_paths_free (bookmarks);
if (impl->num_bookmarks > 0)
shortcuts_insert_separator (impl, SHORTCUTS_BOOKMARKS_SEPARATOR);
if (impl->num_bookmarks == 0)
shortcuts_remove_rows (impl, shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR), 1);
if (impl->shortcuts_pane_filter_model)
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (impl->shortcuts_pane_filter_model));
@@ -3657,8 +3649,22 @@ static void
shortcuts_selection_changed_cb (GtkTreeSelection *selection,
GtkFileChooserDefault *impl)
{
GtkTreeIter iter;
GtkTreeIter child_iter;
bookmarks_check_remove_sensitivity (impl);
shortcuts_check_popup_sensitivity (impl);
if (impl->changing_folder)
return;
if (gtk_tree_selection_get_selected(selection, NULL, &iter))
{
gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (impl->shortcuts_pane_filter_model),
&child_iter,
&iter);
shortcuts_activate_iter (impl, &child_iter);
}
}
static gboolean
@@ -3930,7 +3936,7 @@ shortcuts_list_create (GtkFileChooserDefault *impl)
GDK_ACTION_COPY | GDK_ACTION_MOVE);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
gtk_tree_selection_set_select_function (selection,
shortcuts_select_func,
impl, NULL);
@@ -3938,9 +3944,6 @@ shortcuts_list_create (GtkFileChooserDefault *impl)
g_signal_connect (selection, "changed",
G_CALLBACK (shortcuts_selection_changed_cb), impl);
g_signal_connect (impl->browse_shortcuts_tree_view, "row_activated",
G_CALLBACK (shortcuts_row_activated_cb), impl);
g_signal_connect (impl->browse_shortcuts_tree_view, "key_press_event",
G_CALLBACK (shortcuts_key_press_event_cb), impl);
@@ -4076,7 +4079,8 @@ trap_activate_cb (GtkWidget *widget,
if ((event->keyval == GDK_Return
|| event->keyval == GDK_ISO_Enter
|| event->keyval == GDK_KP_Enter
|| event->keyval == GDK_space)
|| event->keyval == GDK_space
|| event->keyval == GDK_KP_Space)
&& ((event->state & modifiers) == 0)
&& !(impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
@@ -6857,8 +6861,12 @@ update_chooser_entry (GtkFileChooserDefault *impl)
change_entry = TRUE; /* ... unless we are in one of the folder modes */
if (change_entry)
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry),
impl->browse_files_last_selected_name);
{
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), impl->browse_files_last_selected_name);
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
_gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (impl->location_entry));
}
return;
}
@@ -8193,23 +8201,6 @@ should_respond_after_confirm_overwrite (GtkFileChooserDefault *impl,
}
}
/* Gives the focus to the browse tree view only if it is visible */
static void
focus_browse_tree_view_if_possible (GtkFileChooserDefault *impl)
{
gboolean do_focus;
if ((impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
&& !gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
do_focus = FALSE;
else
do_focus = TRUE;
if (do_focus)
gtk_widget_grab_focus (impl->browse_files_tree_view);
}
static void
action_create_folder_cb (GtkFileSystemHandle *handle,
const GtkFilePath *path,
@@ -8604,25 +8595,6 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
gtk_file_path_free (path);
return retval;
}
else if (impl->toplevel_last_focus_widget == impl->browse_shortcuts_tree_view)
{
/* The focus is on a dialog's action area button, *and* the widget that
* was focused immediately before it is the shortcuts list. Switch to the
* selected shortcut and tell the caller not to respond.
*/
GtkTreeIter iter;
if (shortcuts_get_selected (impl, &iter))
{
shortcuts_activate_iter (impl, &iter);
focus_browse_tree_view_if_possible (impl);
}
else
goto file_list;
return FALSE;
}
else if (impl->toplevel_last_focus_widget == impl->browse_files_tree_view)
{
/* The focus is on a dialog's action area button, *and* the widget that
@@ -9867,7 +9839,7 @@ recent_sort_mru (gconstpointer a,
GtkRecentInfo *info_a = (GtkRecentInfo *) a;
GtkRecentInfo *info_b = (GtkRecentInfo *) b;
return (gtk_recent_info_get_modified (info_a) < gtk_recent_info_get_modified (info_b));
return (gtk_recent_info_get_modified (info_b) - gtk_recent_info_get_modified (info_a));
}
static gint
@@ -10327,8 +10299,6 @@ shortcuts_activate_volume_mount_cb (GtkFileSystemHandle *handle,
if (path != NULL)
{
change_folder_and_display_error (impl, path, FALSE);
focus_browse_tree_view_if_possible (impl);
gtk_file_path_free (path);
}
@@ -10411,10 +10381,7 @@ shortcuts_activate_get_info_cb (GtkFileSystemHandle *handle,
goto out;
if (!error && gtk_file_info_get_is_folder (info))
{
change_folder_and_display_error (data->impl, data->path, FALSE);
focus_browse_tree_view_if_possible (data->impl);
}
change_folder_and_display_error (data->impl, data->path, FALSE);
else
gtk_file_chooser_default_select_path (GTK_FILE_CHOOSER (data->impl),
data->path,
@@ -10482,25 +10449,6 @@ shortcuts_activate_iter (GtkFileChooserDefault *impl,
}
}
/* Callback used when a row in the shortcuts list is activated */
static void
shortcuts_row_activated_cb (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
GtkFileChooserDefault *impl)
{
GtkTreeIter iter;
GtkTreeIter child_iter;
if (!gtk_tree_model_get_iter (impl->shortcuts_pane_filter_model, &iter, path))
return;
gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (impl->shortcuts_pane_filter_model),
&child_iter,
&iter);
shortcuts_activate_iter (impl, &child_iter);
}
/* Handler for GtkWidget::key-press-event on the shortcuts list */
static gboolean
shortcuts_key_press_event_cb (GtkWidget *widget,
@@ -11026,6 +10974,11 @@ list_mtime_data_func (GtkTreeViewColumn *tree_column,
time_t time_mtime;
gchar *date_str = NULL;
gboolean sensitive = TRUE;
#ifdef G_OS_WIN32
const char *locale, *dot = NULL;
gint64 codepage = -1;
char charset[20];
#endif
impl = data;
@@ -11144,11 +11097,48 @@ list_mtime_data_func (GtkTreeViewColumn *tree_column,
format = "%x"; /* Any other date */
}
#ifdef G_OS_WIN32
/* g_locale_from_utf8() returns a string in the system
* code-page, which is not always the same as that used by the C
* library. For instance when running a GTK+ program with
* LANG=ko on an English version of Windows, the system
* code-page is 1252, but the code-page used by the C library is
* 949. (It's GTK+ itself that sets the C library locale when it
* notices the LANG environment variable. See gtkmain.c The
* Microsoft C library doesn't look at any locale environment
* variables.) We need to pass strftime() a string in the C
* library's code-page. See bug #509885.
*/
locale = setlocale (LC_ALL, NULL);
if (locale != NULL)
dot = strchr (locale, '.');
if (dot != NULL)
{
codepage = g_ascii_strtoll (dot+1, NULL, 10);
/* All codepages should fit in 16 bits AFAIK */
if (codepage > 0 && codepage < 65536)
{
sprintf (charset, "CP%u", (guint) codepage);
locale_format = g_convert (format, -1, charset, "UTF-8", NULL, NULL, NULL);
}
}
#else
locale_format = g_locale_from_utf8 (format, -1, NULL, NULL, NULL);
#endif
if (locale_format != NULL &&
strftime (buf, sizeof (buf), locale_format, &tm_mtime) != 0)
{
#ifdef G_OS_WIN32
/* As above but in opposite direction... */
if (codepage > 0 && codepage < 65536)
date_str = g_convert (buf, -1, "UTF-8", charset, NULL, NULL, NULL);
#else
date_str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
#endif
}
if (strftime (buf, sizeof (buf), locale_format, &tm_mtime) != 0)
date_str = g_locale_to_utf8 (buf, -1, NULL, NULL, NULL);
else
if (date_str == NULL)
date_str = g_strdup (_("Unknown"));
g_free (locale_format);
@@ -11279,7 +11269,6 @@ switch_to_shortcut (GtkFileChooserDefault *impl,
g_assert_not_reached ();
shortcuts_activate_iter (impl, &iter);
focus_browse_tree_view_if_possible (impl);
}
/* Handler for the "home-folder" keybinding signal */
+36 -14
View File
@@ -112,6 +112,15 @@ gtk_file_chooser_dialog_finalize (GObject *object)
G_OBJECT_CLASS (gtk_file_chooser_dialog_parent_class)->finalize (object);
}
static gboolean
is_stock_accept_response_id (int response_id)
{
return (response_id == GTK_RESPONSE_ACCEPT
|| response_id == GTK_RESPONSE_OK
|| response_id == GTK_RESPONSE_YES
|| response_id == GTK_RESPONSE_APPLY);
}
/* Callback used when the user activates a file in the file chooser widget */
static void
file_chooser_widget_file_activated (GtkFileChooser *chooser,
@@ -135,10 +144,7 @@ file_chooser_widget_file_activated (GtkFileChooser *chooser,
widget = GTK_WIDGET (l->data);
response_id = gtk_dialog_get_response_for_widget (GTK_DIALOG (dialog), widget);
if (response_id == GTK_RESPONSE_ACCEPT
|| response_id == GTK_RESPONSE_OK
|| response_id == GTK_RESPONSE_YES
|| response_id == GTK_RESPONSE_APPLY)
if (is_stock_accept_response_id (response_id))
{
gtk_widget_activate (widget); /* Should we gtk_dialog_response (dialog, response_id) instead? */
break;
@@ -244,10 +250,7 @@ file_chooser_widget_response_requested (GtkWidget *widget,
widget = GTK_WIDGET (l->data);
response_id = gtk_dialog_get_response_for_widget (GTK_DIALOG (dialog), widget);
if (response_id == GTK_RESPONSE_ACCEPT
|| response_id == GTK_RESPONSE_OK
|| response_id == GTK_RESPONSE_YES
|| response_id == GTK_RESPONSE_APPLY)
if (is_stock_accept_response_id (response_id))
{
dialog->priv->response_requested = TRUE;
gtk_widget_activate (widget); /* Should we gtk_dialog_response (dialog, response_id) instead? */
@@ -383,6 +386,26 @@ set_default_size (GtkFileChooserDialog *dialog)
}
#endif
static void
foreach_ensure_default_response_cb (GtkWidget *widget,
gpointer data)
{
GtkFileChooserDialog *dialog = GTK_FILE_CHOOSER_DIALOG (data);
int response_id;
response_id = gtk_dialog_get_response_for_widget (GTK_DIALOG (dialog), widget);
if (is_stock_accept_response_id (response_id))
gtk_dialog_set_default_response (GTK_DIALOG (dialog), response_id);
}
static void
ensure_default_response (GtkFileChooserDialog *dialog)
{
gtk_container_foreach (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area),
foreach_ensure_default_response_cb,
dialog);
}
/* GtkWidget::map handler */
static void
gtk_file_chooser_dialog_map (GtkWidget *widget)
@@ -390,6 +413,8 @@ gtk_file_chooser_dialog_map (GtkWidget *widget)
GtkFileChooserDialog *dialog = GTK_FILE_CHOOSER_DIALOG (widget);
GtkFileChooserDialogPrivate *priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
ensure_default_response (dialog);
if (!GTK_WIDGET_MAPPED (priv->widget))
gtk_widget_map (priv->widget);
@@ -427,12 +452,9 @@ response_cb (GtkDialog *dialog,
priv = GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE (dialog);
/* Act only on response IDs we recognize */
if ((response_id == GTK_RESPONSE_ACCEPT ||
response_id == GTK_RESPONSE_OK ||
response_id == GTK_RESPONSE_YES ||
response_id == GTK_RESPONSE_APPLY) &&
!priv->response_requested &&
!_gtk_file_chooser_embed_should_respond (GTK_FILE_CHOOSER_EMBED (priv->widget)))
if (is_stock_accept_response_id (response_id)
&& !priv->response_requested
&& !_gtk_file_chooser_embed_should_respond (GTK_FILE_CHOOSER_EMBED (priv->widget)))
{
g_signal_stop_emission_by_name (dialog, "response");
}
+120 -1
View File
@@ -75,6 +75,7 @@ static void gtk_file_chooser_entry_iface_init (GtkEditableClass *iface);
static void gtk_file_chooser_entry_finalize (GObject *object);
static void gtk_file_chooser_entry_dispose (GObject *object);
static void gtk_file_chooser_entry_grab_focus (GtkWidget *widget);
static gboolean gtk_file_chooser_entry_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_file_chooser_entry_activate (GtkEntry *entry);
@@ -86,6 +87,19 @@ static void gtk_file_chooser_entry_do_insert_text (GtkEditable *editable,
static void clear_completion_callback (GtkFileChooserEntry *chooser_entry,
GParamSpec *pspec);
#ifdef G_OS_WIN32
static gint insert_text_callback (GtkFileChooserEntry *widget,
const gchar *new_text,
gint new_text_length,
gint *position,
gpointer user_data);
static void delete_text_callback (GtkFileChooserEntry *widget,
gint start_pos,
gint end_pos,
gpointer user_data);
#endif
static gboolean match_selected_callback (GtkEntryCompletion *completion,
GtkTreeModel *model,
GtkTreeIter *iter,
@@ -120,6 +134,7 @@ _gtk_file_chooser_entry_class_init (GtkFileChooserEntryClass *class)
gobject_class->finalize = gtk_file_chooser_entry_finalize;
gobject_class->dispose = gtk_file_chooser_entry_dispose;
widget_class->grab_focus = gtk_file_chooser_entry_grab_focus;
widget_class->focus = gtk_file_chooser_entry_focus;
entry_class->activate = gtk_file_chooser_entry_activate;
@@ -167,6 +182,13 @@ _gtk_file_chooser_entry_init (GtkFileChooserEntry *chooser_entry)
G_CALLBACK (clear_completion_callback), NULL);
g_signal_connect (chooser_entry, "notify::selection-bound",
G_CALLBACK (clear_completion_callback), NULL);
#ifdef G_OS_WIN32
g_signal_connect (chooser_entry, "insert_text",
G_CALLBACK (insert_text_callback), NULL);
g_signal_connect (chooser_entry, "delete_text",
G_CALLBACK (delete_text_callback), NULL);
#endif
}
static void
@@ -696,6 +718,13 @@ gtk_file_chooser_entry_do_insert_text (GtkEditable *editable,
add_completion_idle (GTK_FILE_CHOOSER_ENTRY (editable));
}
static void
gtk_file_chooser_entry_grab_focus (GtkWidget *widget)
{
GTK_WIDGET_CLASS (_gtk_file_chooser_entry_parent_class)->grab_focus (widget);
_gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (widget));
}
static gboolean
gtk_file_chooser_entry_focus (GtkWidget *widget,
GtkDirectionType direction)
@@ -867,6 +896,70 @@ clear_completion_callback (GtkFileChooserEntry *chooser_entry,
}
}
#ifdef G_OS_WIN32
static gint
insert_text_callback (GtkFileChooserEntry *chooser_entry,
const gchar *new_text,
gint new_text_length,
gint *position,
gpointer user_data)
{
const gchar *colon = memchr (new_text, ':', new_text_length);
gint i;
/* Disallow these characters altogether */
for (i = 0; i < new_text_length; i++)
{
if (new_text[i] == '<' ||
new_text[i] == '>' ||
new_text[i] == '"' ||
new_text[i] == '|' ||
new_text[i] == '*' ||
new_text[i] == '?')
break;
}
if (i < new_text_length ||
/* Disallow entering text that would cause a colon to be anywhere except
* after a drive letter.
*/
(colon != NULL &&
*position + (colon - new_text) != 1) ||
(new_text_length > 0 &&
*position <= 1 &&
GTK_ENTRY (chooser_entry)->text_length >= 2 &&
gtk_entry_get_text (GTK_ENTRY (chooser_entry))[1] == ':'))
{
gtk_widget_error_bell (GTK_WIDGET (chooser_entry));
g_signal_stop_emission_by_name (chooser_entry, "insert_text");
return FALSE;
}
return TRUE;
}
static void
delete_text_callback (GtkFileChooserEntry *chooser_entry,
gint start_pos,
gint end_pos,
gpointer user_data)
{
/* If deleting a drive letter, delete the colon, too */
if (start_pos == 0 && end_pos == 1 &&
GTK_ENTRY (chooser_entry)->text_length >= 2 &&
gtk_entry_get_text (GTK_ENTRY (chooser_entry))[1] == ':')
{
g_signal_handlers_block_by_func (chooser_entry,
G_CALLBACK (delete_text_callback),
user_data);
gtk_editable_delete_text (GTK_EDITABLE (chooser_entry), 0, 1);
g_signal_handlers_unblock_by_func (chooser_entry,
G_CALLBACK (delete_text_callback),
user_data);
}
}
#endif
/**
* _gtk_file_chooser_entry_new:
* @eat_tabs: If %FALSE, allow focus navigation with the tab key.
@@ -929,7 +1022,7 @@ _gtk_file_chooser_entry_set_base_folder (GtkFileChooserEntry *chooser_entry,
chooser_entry->base_folder = gtk_file_path_copy (path);
gtk_file_chooser_entry_changed (GTK_EDITABLE (chooser_entry));
gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, -1);
_gtk_file_chooser_entry_select_filename (chooser_entry);
}
/**
@@ -1074,3 +1167,29 @@ _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
return retval;
}
/*
* _gtk_file_chooser_entry_select_filename:
* @chooser_entry: a #GtkFileChooserEntry
*
* Selects the filename (without the extension) for user edition.
*/
void
_gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry)
{
const gchar *str, *ext;
glong len = -1;
if (chooser_entry->action == GTK_FILE_CHOOSER_ACTION_SAVE)
{
str = gtk_entry_get_text (GTK_ENTRY (chooser_entry));
ext = g_strrstr (str, ".");
if (ext)
len = g_utf8_pointer_to_offset (str, ext);
}
gtk_editable_select_region (GTK_EDITABLE (chooser_entry), 0, (gint) len);
}
+1
View File
@@ -48,6 +48,7 @@ const GtkFilePath *_gtk_file_chooser_entry_get_current_folder (GtkFileChooserEnt
const gchar * _gtk_file_chooser_entry_get_file_part (GtkFileChooserEntry *chooser_entry);
gboolean _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
const GtkFilePath *path);
void _gtk_file_chooser_entry_select_filename (GtkFileChooserEntry *chooser_entry);
G_END_DECLS
+1
View File
@@ -914,6 +914,7 @@ gtk_file_system_unix_get_folder (GtkFileSystem *file_system,
folder_unix->have_mime_type = FALSE;
folder_unix->have_stat = FALSE;
folder_unix->have_hidden = FALSE;
folder_unix->is_finished_loading = FALSE;
set_asof = TRUE;
}
+66 -6
View File
@@ -50,6 +50,7 @@
#undef STRICT
#include <shlobj.h>
#include <shellapi.h>
#include <winreg.h>
#define BOOKMARKS_FILENAME ".gtk-bookmarks"
@@ -330,6 +331,65 @@ gtk_file_system_win32_iface_init (GtkFileSystemIface *iface)
iface->set_bookmark_label = gtk_file_system_win32_set_bookmark_label;
}
/**
* get_viewable_logical_drives:
*
* Returns the list of logical and viewable drives as defined by
* GetLogicalDrives() and the registry keys
* Software\Microsoft\Windows\CurrentVersion\Policies\Explorer under
* HKLM or HKCU. If neither key exists the result of
* GetLogicalDrives() is returned.
*
* Return value: bitmask with same meaning as returned by GetLogicalDrives()
**/
static guint32
get_viewable_logical_drives (void)
{
guint viewable_drives = GetLogicalDrives ();
HKEY key;
DWORD var_type = REG_DWORD; //the value's a REG_DWORD type
DWORD no_drives_size = 4;
DWORD no_drives;
gboolean hklm_present = FALSE;
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\"
"CurrentVersion\\Policies\\Explorer",
0, KEY_READ, &key) == ERROR_SUCCESS)
{
if (RegQueryValueEx (key, "NoDrives", NULL, &var_type,
(LPBYTE) &no_drives, &no_drives_size) == ERROR_SUCCESS)
{
/* We need the bits that are set in viewable_drives, and
* unset in no_drives.
*/
viewable_drives = viewable_drives & ~no_drives;
hklm_present = TRUE;
}
RegCloseKey (key);
}
/* If the key is present in HKLM then the one in HKCU should be ignored */
if (!hklm_present)
{
if (RegOpenKeyEx (HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\"
"CurrentVersion\\Policies\\Explorer",
0, KEY_READ, &key) == ERROR_SUCCESS)
{
if (RegQueryValueEx (key, "NoDrives", NULL, &var_type,
(LPBYTE) &no_drives, &no_drives_size) == ERROR_SUCCESS)
{
viewable_drives = viewable_drives & ~no_drives;
}
RegCloseKey (key);
}
}
return viewable_drives;
}
static gboolean
check_volumes (gpointer data)
{
@@ -337,10 +397,10 @@ check_volumes (gpointer data)
g_return_val_if_fail (system_win32, FALSE);
if (system_win32->drives != GetLogicalDrives())
{
g_signal_emit_by_name (system_win32, "volumes-changed", 0);
}
if (system_win32->drives != get_viewable_logical_drives ())
{
g_signal_emit_by_name (system_win32, "volumes-changed", 0);
}
return TRUE;
}
@@ -527,11 +587,11 @@ gtk_file_system_win32_list_volumes (GtkFileSystem *file_system)
GSList *list = NULL;
GtkFileSystemWin32 *system_win32 = (GtkFileSystemWin32 *)file_system;
drives = GetLogicalDrives();
drives = get_viewable_logical_drives ();
system_win32->drives = drives;
if (!drives)
g_warning ("GetLogicalDrives failed.");
g_warning ("get_viewable_logical_drives failed.");
while (drives && drive[0] <= 'Z')
{
+54 -11
View File
@@ -396,6 +396,8 @@ static void gtk_icon_view_item_activate_cell (GtkIco
GtkIconViewItem *item,
GtkIconViewCellInfo *cell_info,
GdkEvent *event);
static void gtk_icon_view_item_selected_changed (GtkIconView *icon_view,
GtkIconViewItem *item);
static void gtk_icon_view_put (GtkIconView *icon_view,
GtkWidget *widget,
GtkIconViewItem *item,
@@ -870,9 +872,13 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
"unselect_all", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
"toggle_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
"toggle_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"activate_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
"activate_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate_cursor_item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
@@ -1669,6 +1675,25 @@ gtk_icon_view_item_activate_cell (GtkIconView *icon_view,
}
}
static void
gtk_icon_view_item_selected_changed (GtkIconView *icon_view,
GtkIconViewItem *item)
{
AtkObject *obj;
AtkObject *item_obj;
obj = gtk_widget_get_accessible (GTK_WIDGET (icon_view));
if (obj != NULL)
{
item_obj = atk_object_ref_accessible_child (obj, item->index);
if (item_obj != NULL)
{
atk_object_notify_state_change (item_obj, ATK_STATE_SELECTED, item->selected);
g_object_unref (item_obj);
}
}
}
static void
gtk_icon_view_put (GtkIconView *icon_view,
GtkWidget *widget,
@@ -2323,6 +2348,7 @@ gtk_icon_view_unselect_all_internal (GtkIconView *icon_view)
item->selected = FALSE;
dirty = TRUE;
gtk_icon_view_queue_draw_item (icon_view, item);
gtk_icon_view_item_selected_changed (icon_view, item);
}
}
@@ -2471,6 +2497,7 @@ gtk_icon_view_real_toggle_cursor_item (GtkIconView *icon_view)
icon_view->priv->cursor_item->selected = !icon_view->priv->cursor_item->selected;
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
gtk_icon_view_item_selected_changed (icon_view, icon_view->priv->cursor_item);
gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
break;
}
@@ -3215,14 +3242,23 @@ gtk_icon_view_set_cursor_item (GtkIconView *icon_view,
{
AtkObject *obj;
AtkObject *item_obj;
AtkObject *cursor_item_obj;
if (icon_view->priv->cursor_item == item &&
(cursor_cell < 0 || cursor_cell == icon_view->priv->cursor_cell))
return;
obj = gtk_widget_get_accessible (GTK_WIDGET (icon_view));
if (icon_view->priv->cursor_item != NULL)
gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
{
gtk_icon_view_queue_draw_item (icon_view, icon_view->priv->cursor_item);
if (obj != NULL)
{
cursor_item_obj = atk_object_ref_accessible_child (obj, icon_view->priv->cursor_item->index);
if (cursor_item_obj != NULL)
atk_object_notify_state_change (cursor_item_obj, ATK_STATE_FOCUSED, FALSE);
}
}
icon_view->priv->cursor_item = item;
if (cursor_cell >= 0)
icon_view->priv->cursor_cell = cursor_cell;
@@ -3230,12 +3266,12 @@ gtk_icon_view_set_cursor_item (GtkIconView *icon_view,
gtk_icon_view_queue_draw_item (icon_view, item);
/* Notify that accessible focus object has changed */
obj = gtk_widget_get_accessible (GTK_WIDGET (icon_view));
item_obj = atk_object_ref_accessible_child (obj, item->index);
if (item_obj != NULL)
{
atk_focus_tracker_notify (item_obj);
atk_object_notify_state_change (item_obj, ATK_STATE_FOCUSED, TRUE);
g_object_unref (item_obj);
}
}
@@ -3342,9 +3378,10 @@ gtk_icon_view_select_item (GtkIconView *icon_view,
item->selected = TRUE;
gtk_icon_view_queue_draw_item (icon_view, item);
gtk_icon_view_item_selected_changed (icon_view, item);
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
gtk_icon_view_queue_draw_item (icon_view, item);
}
@@ -3364,6 +3401,7 @@ gtk_icon_view_unselect_item (GtkIconView *icon_view,
item->selected = FALSE;
gtk_icon_view_item_selected_changed (icon_view, item);
g_signal_emit (icon_view, icon_view_signals[SELECTION_CHANGED], 0);
gtk_icon_view_queue_draw_item (icon_view, item);
@@ -3861,10 +3899,11 @@ gtk_icon_view_select_all_between (GtkIconView *icon_view,
col1 <= item->col && item->col <= col2)
{
if (!item->selected)
dirty = TRUE;
item->selected = TRUE;
{
dirty = TRUE;
item->selected = TRUE;
gtk_icon_view_item_selected_changed (icon_view, item);
}
gtk_icon_view_queue_draw_item (icon_view, item);
}
}
@@ -4484,8 +4523,8 @@ gtk_icon_view_cell_layout_reorder (GtkCellLayout *layout,
g_return_if_fail (link != NULL);
icon_view->priv->cell_list = g_list_remove_link (icon_view->priv->cell_list,
link);
icon_view->priv->cell_list = g_list_delete_link (icon_view->priv->cell_list,
link);
icon_view->priv->cell_list = g_list_insert (icon_view->priv->cell_list,
info, position);
@@ -8493,6 +8532,10 @@ gtk_icon_view_item_accessible_ref_state_set (AtkObject *obj)
atk_state_set_add_state (item->state_set, ATK_STATE_FOCUSED);
else
atk_state_set_remove_state (item->state_set, ATK_STATE_FOCUSED);
if (item->item->selected)
atk_state_set_add_state (item->state_set, ATK_STATE_SELECTED);
else
atk_state_set_remove_state (item->state_set, ATK_STATE_SELECTED);
return g_object_ref (item->state_set);
}
+10 -8
View File
@@ -1342,6 +1342,7 @@ static gint
animation_timeout (gpointer data)
{
GtkImage *image;
int delay;
image = GTK_IMAGE (data);
@@ -1349,16 +1350,17 @@ animation_timeout (gpointer data)
gdk_pixbuf_animation_iter_advance (image->data.anim.iter, NULL);
if (gdk_pixbuf_animation_iter_get_delay_time (image->data.anim.iter) >= 0)
image->data.anim.frame_timeout =
gdk_threads_add_timeout (gdk_pixbuf_animation_iter_get_delay_time (image->data.anim.iter),
animation_timeout,
image);
delay = gdk_pixbuf_animation_iter_get_delay_time (image->data.anim.iter);
if (delay >= 0)
{
image->data.anim.frame_timeout =
gdk_threads_add_timeout (delay, animation_timeout, image);
gtk_widget_queue_draw (GTK_WIDGET (image));
gtk_widget_queue_draw (GTK_WIDGET (image));
if (GTK_WIDGET_DRAWABLE (image))
gdk_window_process_updates (GTK_WIDGET (image)->window, TRUE);
if (GTK_WIDGET_DRAWABLE (image))
gdk_window_process_updates (GTK_WIDGET (image)->window, TRUE);
}
return FALSE;
}
+42 -24
View File
@@ -67,12 +67,52 @@
#include "gtkwidget.h"
#include "gtkwindow.h"
#include "gtktooltip.h"
#include "gtkprivate.h"
#include "gtkdebug.h"
#include "gtkalias.h"
#include "gdk/gdkprivate.h" /* for GDK_WINDOW_DESTROYED */
#ifdef G_OS_WIN32
G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
/* This here before inclusion of gtkprivate.h so that it sees the
* original GTK_LOCALEDIR definition. Yeah, this is a bit sucky.
*/
const gchar *
_gtk_get_localedir (void)
{
static char *gtk_localedir = NULL;
if (gtk_localedir == NULL)
{
const gchar *p;
gchar *temp;
/* GTK_LOCALEDIR ends in either /lib/locale or
* /share/locale. Scan for that slash.
*/
p = GTK_LOCALEDIR + strlen (GTK_LOCALEDIR);
while (*--p != '/')
;
while (*--p != '/')
;
temp = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, p);
/* gtk_localedir is passed to bindtextdomain() which isn't
* UTF-8-aware.
*/
gtk_localedir = g_win32_locale_filename_from_utf8 (temp);
g_free (temp);
}
return gtk_localedir;
}
#endif
#include "gtkprivate.h"
/* Private type definitions
*/
typedef struct _GtkInitFunction GtkInitFunction;
@@ -268,8 +308,6 @@ check_setugid (void)
#ifdef G_OS_WIN32
G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
const gchar *
_gtk_get_datadir (void)
{
@@ -292,26 +330,6 @@ _gtk_get_libdir (void)
return gtk_libdir;
}
const gchar *
_gtk_get_localedir (void)
{
static char *gtk_localedir = NULL;
if (gtk_localedir == NULL)
{
gchar *temp;
temp = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
/* gtk_localedir is passed to bindtextdomain() which isn't
* UTF-8-aware.
*/
gtk_localedir = g_win32_locale_filename_from_utf8 (temp);
g_free (temp);
}
return gtk_localedir;
}
const gchar *
_gtk_get_sysconfdir (void)
{
@@ -731,7 +749,7 @@ post_parse_hook (GOptionContext *context,
* with g_option_context_add_group(), if you are using
* g_option_context_parse() to parse your commandline arguments.
*
* Returns a #GOptionGroup for the commandline arguments recognized
* Returns: a #GOptionGroup for the commandline arguments recognized
* by GTK+
*
* Since: 2.6
+5
View File
@@ -324,6 +324,11 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
"activate_current", 1,
G_TYPE_BOOLEAN,
TRUE);
gtk_binding_entry_add_signal (binding_set,
GDK_ISO_Enter, 0,
"activate_current", 1,
G_TYPE_BOOLEAN,
TRUE);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Enter, 0,
"activate_current", 1,
+31 -14
View File
@@ -212,6 +212,8 @@ static void gtk_notebook_move_focus_out (GtkNotebook *notebook,
static gboolean gtk_notebook_reorder_tab (GtkNotebook *notebook,
GtkDirectionType direction_type,
gboolean move_to_last);
static void gtk_notebook_remove_tab_label (GtkNotebook *notebook,
GtkNotebookPage *page);
/*** GtkObject Methods ***/
static void gtk_notebook_destroy (GtkObject *object);
@@ -350,6 +352,8 @@ static GList * gtk_notebook_search_page (GtkNotebook *notebook,
GList *list,
gint direction,
gboolean find_visible);
static void gtk_notebook_child_reordered (GtkNotebook *notebook,
GtkNotebookPage *page);
/*** GtkNotebook Drawing Functions ***/
static void gtk_notebook_paint (GtkWidget *widget,
@@ -1453,7 +1457,7 @@ gtk_notebook_destroy (GtkObject *object)
{
GtkNotebook *notebook = GTK_NOTEBOOK (object);
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
if (notebook->menu)
gtk_notebook_popup_disable (notebook);
@@ -2748,7 +2752,7 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
else
page = notebook->cur_page;
if (!page)
if (!page || !page->tab_label)
return;
priv->pressed_button = -1;
@@ -2763,7 +2767,8 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
element = get_drop_position (notebook, page->pack);
old_page_num = g_list_position (notebook->children, notebook->focus_tab);
page_num = reorder_tab (notebook, element, notebook->focus_tab);
gtk_notebook_child_reordered (notebook, page);
if (priv->has_scrolled || old_page_num != page_num)
g_signal_emit (notebook,
notebook_signals[PAGE_REORDERED], 0,
@@ -4311,6 +4316,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
GtkNotebookPage *page;
GList * next_list;
gint need_resize = FALSE;
GtkWidget *tab_label;
gboolean destroying;
@@ -4345,8 +4351,16 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
gtk_widget_unparent (page->child);
gtk_notebook_remove_tab_label (notebook, page);
tab_label = page->tab_label;
if (tab_label)
{
g_object_ref (tab_label);
gtk_notebook_remove_tab_label (notebook, page);
if (destroying)
gtk_widget_destroy (tab_label);
g_object_unref (tab_label);
}
if (notebook->menu)
{
gtk_container_remove (GTK_CONTAINER (notebook->menu),
@@ -4380,6 +4394,9 @@ gtk_notebook_update_labels (GtkNotebook *notebook)
gchar string[32];
gint page_num = 1;
if (!notebook->show_tabs && !notebook->menu)
return;
for (list = gtk_notebook_search_page (notebook, NULL, STEP_NEXT, FALSE);
list;
list = gtk_notebook_search_page (notebook, list, STEP_NEXT, FALSE))
@@ -6947,10 +6964,10 @@ gtk_notebook_set_tab_label_text (GtkNotebook *notebook,
* Retrieves the text of the tab label for the page containing
* @child.
*
* Returns value: the text of the tab label, or %NULL if the
* tab label widget is not a #GtkLabel. The
* string is owned by the widget and must not
* be freed.
* Return value: the text of the tab label, or %NULL if the
* tab label widget is not a #GtkLabel. The
* string is owned by the widget and must not
* be freed.
**/
G_CONST_RETURN gchar *
gtk_notebook_get_tab_label_text (GtkNotebook *notebook,
@@ -7081,11 +7098,11 @@ gtk_notebook_set_menu_label_text (GtkNotebook *notebook,
* Retrieves the text of the menu label for the page containing
* @child.
*
* Returns value: the text of the tab label, or %NULL if the
* widget does not have a menu label other than
* the default menu label, or the menu label widget
* is not a #GtkLabel. The string is owned by
* the widget and must not be freed.
* Return value: the text of the tab label, or %NULL if the
* widget does not have a menu label other than
* the default menu label, or the menu label widget
* is not a #GtkLabel. The string is owned by
* the widget and must not be freed.
**/
G_CONST_RETURN gchar *
gtk_notebook_get_menu_label_text (GtkNotebook *notebook,
+12 -1
View File
@@ -478,6 +478,9 @@ gtk_paned_class_init (GtkPanedClass *class)
gtk_binding_entry_add_signal (binding_set,
GDK_Return, 0,
"accept_position", 0);
gtk_binding_entry_add_signal (binding_set,
GDK_ISO_Enter, 0,
"accept_position", 0);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Enter, 0,
"accept_position", 0);
@@ -1232,6 +1235,14 @@ gtk_paned_set_position (GtkPaned *paned,
g_object_thaw_notify (object);
gtk_widget_queue_resize (GTK_WIDGET (paned));
#ifdef G_OS_WIN32
/* Hacky work-around for bug #144269 */
if (paned->child2 != NULL)
{
gtk_widget_queue_draw (paned->child2);
}
#endif
}
/**
@@ -1595,7 +1606,7 @@ get_child_panes (GtkWidget *widget,
}
else if (GTK_IS_CONTAINER (widget))
{
gtk_container_foreach (GTK_CONTAINER (widget),
gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback)get_child_panes, panes);
}
}
+1 -1
View File
@@ -525,7 +525,7 @@ gtk_paper_size_get_display_name (GtkPaperSize *size)
g_assert (size->info != NULL);
display_name = paper_names + size->info->display_name;
return g_strip_context (display_name, gettext (display_name));
return g_strip_context (display_name, _(display_name));
}
/**
+113 -15
View File
@@ -80,9 +80,12 @@ G_DEFINE_TYPE (GtkPathBar, gtk_path_bar, GTK_TYPE_CONTAINER)
static void gtk_path_bar_finalize (GObject *object);
static void gtk_path_bar_dispose (GObject *object);
static void gtk_path_bar_realize (GtkWidget *widget);
static void gtk_path_bar_unrealize (GtkWidget *widget);
static void gtk_path_bar_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_path_bar_unmap (GtkWidget *widget);
static void gtk_path_bar_map (GtkWidget *widget);
static void gtk_path_bar_unmap (GtkWidget *widget);
static void gtk_path_bar_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_path_bar_add (GtkContainer *container,
@@ -93,10 +96,10 @@ static void gtk_path_bar_forall (GtkContainer *container,
gboolean include_internals,
GtkCallback callback,
gpointer callback_data);
static void gtk_path_bar_scroll_up (GtkWidget *button,
GtkPathBar *path_bar);
static void gtk_path_bar_scroll_down (GtkWidget *button,
GtkPathBar *path_bar);
static gboolean gtk_path_bar_scroll (GtkWidget *widget,
GdkEventScroll *event);
static void gtk_path_bar_scroll_up (GtkPathBar *path_bar);
static void gtk_path_bar_scroll_down (GtkPathBar *path_bar);
static void gtk_path_bar_stop_scrolling (GtkPathBar *path_bar);
static gboolean gtk_path_bar_slider_up_defocus (GtkWidget *widget,
GdkEventButton *event,
@@ -175,8 +178,8 @@ gtk_path_bar_init (GtkPathBar *path_bar)
path_bar->down_slider_button = get_slider_button (path_bar, GTK_ARROW_RIGHT);
path_bar->icon_size = FALLBACK_ICON_SIZE;
g_signal_connect (path_bar->up_slider_button, "clicked", G_CALLBACK (gtk_path_bar_scroll_up), path_bar);
g_signal_connect (path_bar->down_slider_button, "clicked", G_CALLBACK (gtk_path_bar_scroll_down), path_bar);
g_signal_connect_swapped (path_bar->up_slider_button, "clicked", G_CALLBACK (gtk_path_bar_scroll_up), path_bar);
g_signal_connect_swapped (path_bar->down_slider_button, "clicked", G_CALLBACK (gtk_path_bar_scroll_down), path_bar);
g_signal_connect (path_bar->up_slider_button, "focus_out_event", G_CALLBACK (gtk_path_bar_slider_up_defocus), path_bar);
g_signal_connect (path_bar->down_slider_button, "focus_out_event", G_CALLBACK (gtk_path_bar_slider_down_defocus), path_bar);
@@ -204,12 +207,16 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
gobject_class->dispose = gtk_path_bar_dispose;
widget_class->size_request = gtk_path_bar_size_request;
widget_class->realize = gtk_path_bar_realize;
widget_class->unrealize = gtk_path_bar_unrealize;
widget_class->map = gtk_path_bar_map;
widget_class->unmap = gtk_path_bar_unmap;
widget_class->size_allocate = gtk_path_bar_size_allocate;
widget_class->style_set = gtk_path_bar_style_set;
widget_class->screen_changed = gtk_path_bar_screen_changed;
widget_class->grab_notify = gtk_path_bar_grab_notify;
widget_class->state_changed = gtk_path_bar_state_changed;
widget_class->scroll_event = gtk_path_bar_scroll;
container_class->add = gtk_path_bar_add;
container_class->forall = gtk_path_bar_forall;
@@ -362,14 +369,67 @@ gtk_path_bar_update_slider_buttons (GtkPathBar *path_bar)
}
}
static void
gtk_path_bar_map (GtkWidget *widget)
{
gdk_window_show (GTK_PATH_BAR (widget)->event_window);
GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->map (widget);
}
static void
gtk_path_bar_unmap (GtkWidget *widget)
{
gtk_path_bar_stop_scrolling (GTK_PATH_BAR (widget));
gdk_window_hide (GTK_PATH_BAR (widget)->event_window);
GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->unmap (widget);
}
static void
gtk_path_bar_realize (GtkWidget *widget)
{
GtkPathBar *path_bar;
GdkWindowAttr attributes;
gint attributes_mask;
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
path_bar = GTK_PATH_BAR (widget);
widget->window = gtk_widget_get_parent_window (widget);
g_object_ref (widget->window);
attributes.window_type = GDK_WINDOW_CHILD;
attributes.x = widget->allocation.x;
attributes.y = widget->allocation.y;
attributes.width = widget->allocation.width;
attributes.height = widget->allocation.height;
attributes.wclass = GDK_INPUT_ONLY;
attributes.event_mask = gtk_widget_get_events (widget);
attributes.event_mask |= GDK_SCROLL_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y;
path_bar->event_window = gdk_window_new (gtk_widget_get_parent_window (widget),
&attributes, attributes_mask);
gdk_window_set_user_data (path_bar->event_window, widget);
widget->style = gtk_style_attach (widget->style, widget->window);
}
static void
gtk_path_bar_unrealize (GtkWidget *widget)
{
GtkPathBar *path_bar;
path_bar = GTK_PATH_BAR (widget);
gdk_window_set_user_data (path_bar->event_window, NULL);
gdk_window_destroy (path_bar->event_window);
path_bar->event_window = NULL;
(* GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->unrealize) (widget);
}
/* This is a tad complicated
*/
static void
@@ -390,6 +450,11 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
if (GTK_WIDGET_REALIZED (widget))
gdk_window_move_resize (path_bar->event_window,
allocation->x, allocation->y,
allocation->width, allocation->height);
/* No path is set; we don't have to allocate anything. */
if (path_bar->button_list == NULL)
return;
@@ -594,6 +659,25 @@ gtk_path_bar_screen_changed (GtkWidget *widget,
gtk_path_bar_check_icon_theme (GTK_PATH_BAR (widget));
}
static gboolean
gtk_path_bar_scroll (GtkWidget *widget,
GdkEventScroll *event)
{
switch (event->direction)
{
case GDK_SCROLL_RIGHT:
case GDK_SCROLL_DOWN:
gtk_path_bar_scroll_down (GTK_PATH_BAR (widget));
break;
case GDK_SCROLL_LEFT:
case GDK_SCROLL_UP:
gtk_path_bar_scroll_up (GTK_PATH_BAR (widget));
break;
}
return TRUE;
}
static void
gtk_path_bar_add (GtkContainer *container,
GtkWidget *widget)
@@ -679,7 +763,7 @@ gtk_path_bar_forall (GtkContainer *container,
}
static void
gtk_path_bar_scroll_down (GtkWidget *button, GtkPathBar *path_bar)
gtk_path_bar_scroll_down (GtkPathBar *path_bar)
{
GList *list;
GList *down_button = NULL;
@@ -695,11 +779,17 @@ gtk_path_bar_scroll_down (GtkWidget *button, GtkPathBar *path_bar)
return;
}
if (gtk_widget_get_child_visible (BUTTON_DATA (path_bar->button_list->data)->button))
{
/* Return if the last button is already visible */
return;
}
gtk_widget_queue_resize (GTK_WIDGET (path_bar));
border_width = GTK_CONTAINER (path_bar)->border_width;
direction = gtk_widget_get_direction (GTK_WIDGET (path_bar));
/* We find the button at the 'down' end that we have to make
* visible */
for (list = path_bar->button_list; list; list = list->next)
@@ -745,7 +835,7 @@ gtk_path_bar_scroll_down (GtkWidget *button, GtkPathBar *path_bar)
}
static void
gtk_path_bar_scroll_up (GtkWidget *button, GtkPathBar *path_bar)
gtk_path_bar_scroll_up (GtkPathBar *path_bar)
{
GList *list;
@@ -755,9 +845,17 @@ gtk_path_bar_scroll_up (GtkWidget *button, GtkPathBar *path_bar)
return;
}
list = g_list_last (path_bar->button_list);
if (gtk_widget_get_child_visible (BUTTON_DATA (list->data)->button))
{
/* Return if the first button is already visible */
return;
}
gtk_widget_queue_resize (GTK_WIDGET (path_bar));
for (list = g_list_last (path_bar->button_list); list; list = list->prev)
for ( ; list; list = list->prev)
{
if (list->prev && gtk_widget_get_child_visible (BUTTON_DATA (list->prev->data)->button))
{
@@ -777,9 +875,9 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
if (path_bar->timer)
{
if (path_bar->scrolling_up)
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
gtk_path_bar_scroll_up (path_bar);
else if (path_bar->scrolling_down)
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
gtk_path_bar_scroll_down (path_bar);
if (path_bar->need_timer)
{
@@ -882,13 +980,13 @@ gtk_path_bar_slider_button_press (GtkWidget *widget,
{
path_bar->scrolling_down = FALSE;
path_bar->scrolling_up = TRUE;
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
gtk_path_bar_scroll_up (path_bar);
}
else if (widget == path_bar->down_slider_button)
{
path_bar->scrolling_up = FALSE;
path_bar->scrolling_down = TRUE;
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
gtk_path_bar_scroll_down (path_bar);
}
if (!path_bar->timer)
+2
View File
@@ -51,6 +51,8 @@ struct _GtkPathBar
GdkPixbuf *home_icon;
GdkPixbuf *desktop_icon;
GdkWindow *event_window;
GList *button_list;
GList *first_scrolled_button;
GList *fake_root;
+9 -9
View File
@@ -36,7 +36,7 @@ void _gtk_plug_handle_modality_off (GtkPlug *plug);
/* In backend-specific file: */
/**
/*
* _gtk_plug_windowing_get_id:
*
* @plug: a #GtkPlug
@@ -45,7 +45,7 @@ void _gtk_plug_handle_modality_off (GtkPlug *plug);
*/
GdkNativeWindow _gtk_plug_windowing_get_id (GtkPlug *plug);
/**
/*
* _gtk_plug_windowing_realize_toplevel:
*
* @plug_window: a #GtkPlug's #GdkWindow
@@ -55,7 +55,7 @@ GdkNativeWindow _gtk_plug_windowing_get_id (GtkPlug *plug);
*/
void _gtk_plug_windowing_realize_toplevel (GtkPlug *plug);
/**
/*
* _gtk_plug_windowing_map_toplevel:
*
* @plug: a #GtkPlug
@@ -65,7 +65,7 @@ void _gtk_plug_windowing_realize_toplevel (GtkPlug *plug);
*/
void _gtk_plug_windowing_map_toplevel (GtkPlug *plug);
/**
/*
* _gtk_plug_windowing_map_toplevel:
*
* @plug: a #GtkPlug
@@ -75,7 +75,7 @@ void _gtk_plug_windowing_map_toplevel (GtkPlug *plug);
*/
void _gtk_plug_windowing_unmap_toplevel (GtkPlug *plug);
/**
/*
* _gtk_plug_windowing_set_focus:
*
* @plug: a #GtkPlug
@@ -85,7 +85,7 @@ void _gtk_plug_windowing_unmap_toplevel (GtkPlug *plug);
*/
void _gtk_plug_windowing_set_focus (GtkPlug *plug);
/**
/*
* _gtk_plug_windowing_add_grabbed_key:
*
* @plug: a #GtkPlug
@@ -99,7 +99,7 @@ void _gtk_plug_windowing_add_grabbed_key (GtkPlug *plug,
guint accelerator_key,
GdkModifierType accelerator_mods);
/**
/*
* _gtk_plug_windowing_remove_grabbed_key:
*
* @plug: a #GtkPlug
@@ -113,7 +113,7 @@ void _gtk_plug_windowing_remove_grabbed_key (GtkPlug *plug,
guint accelerator_key,
GdkModifierType accelerator_mods);
/**
/*
* _gtk_plug_windowing_focus_to_parent:
*
* @plug: a #GtkPlug
@@ -125,7 +125,7 @@ void _gtk_plug_windowing_remove_grabbed_key (GtkPlug *plug,
void _gtk_plug_windowing_focus_to_parent (GtkPlug *plug,
GtkDirectionType direction);
/**
/*
* _gtk_plug_windowing_filter_func:
*
* @gdk_xevent: a windowing system native event
+1 -2
View File
@@ -1517,8 +1517,7 @@ _gtk_print_operation_set_status (GtkPrintOperation *op,
status = GTK_PRINT_STATUS_FINISHED_ABORTED;
if (string == NULL)
string = g_strip_context (status_strs[status],
gettext (status_strs[status]));
string = g_strip_context (status_strs[status], _(status_strs[status]));
if (priv->status == status &&
strcmp (string, priv->status_string) == 0)
-2
View File
@@ -1283,8 +1283,6 @@ gtk_print_settings_get_page_ranges (GtkPrintSettings *settings,
{
str++;
end = (gint)strtol (str, NULL, 10);
if (end < start)
end = start;
}
ranges[i].start = start;
+6 -4
View File
@@ -1,6 +1,7 @@
/* GtkPrintUnixDialog
* Copyright (C) 2006 John (J5) Palmieri <johnp@redhat.com>
* Copyright (C) 2006 Alexander Larsson <alexl@redhat.com>
* Copyright © 2006, 2007 Christian Persch
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -589,7 +590,7 @@ gtk_print_unix_dialog_get_property (GObject *object,
g_value_set_int (value, priv->current_page);
break;
case PROP_PRINT_SETTINGS:
g_value_set_object (value, gtk_print_unix_dialog_get_settings (dialog));
g_value_take_object (value, gtk_print_unix_dialog_get_settings (dialog));
break;
case PROP_SELECTED_PRINTER:
g_value_set_object (value, priv->current_printer);
@@ -733,7 +734,7 @@ wrap_in_frame (const gchar *label,
GtkWidget *frame, *alignment, *label_widget;
gchar *bold_text;
label_widget = gtk_label_new ("");
label_widget = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5);
gtk_widget_show (label_widget);
@@ -1728,7 +1729,7 @@ dialog_set_page_ranges (GtkPrintUnixDialog *dialog,
{
GtkPrintUnixDialogPrivate *priv = dialog->priv;
gint i;
GString *s = g_string_new ("");
GString *s = g_string_new (NULL);
for (i = 0; i < n_ranges; i++)
{
@@ -1994,7 +1995,8 @@ draw_page_cb (GtkWidget *widget,
cairo_restore (cr);
}
}
g_object_unref (layout);
cairo_destroy (cr);
return TRUE;
+10 -8
View File
@@ -220,7 +220,7 @@ _gtk_quartz_get_selection_data_from_pasteboard (NSPasteboard *pasteboard,
NSURL *url = [NSURL URLFromPasteboard:pasteboard];
selection_data->target = gdk_atom_intern_static_string ("text/uri-list");
uris[0] = (gchar *) [[url description] UTF8String];
uris[1] = NULL;
gtk_selection_data_set_uris (selection_data, uris);
@@ -295,14 +295,16 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard,
&list);
if (count > 0)
result = g_uri_list_extract_uris (list[0]);
{
result = g_uri_list_extract_uris (list[0]);
url = [NSURL URLWithString:[NSString stringWithUTF8String:result[0]]];
[url writeToPasteboard:pasteboard];
g_strfreev (result);
}
g_strfreev (list);
url = [NSURL URLWithString:[NSString stringWithUTF8String:result[0]]];
[url writeToPasteboard:pasteboard];
g_strfreev (result);
}
else
[pasteboard setData:[NSData dataWithBytesNoCopy:selection_data->data
+2
View File
@@ -350,6 +350,7 @@ gtk_recent_action_connect_proxy (GtkAction *action,
"limit", priv->limit,
"sort-type", priv->sort_type,
"filter", priv->current_filter,
"local-only", priv->local_only,
NULL);
if (priv->sort_func)
@@ -404,6 +405,7 @@ gtk_recent_action_create_menu (GtkAction *action)
"sort-type", priv->sort_type,
"recent-manager", priv->manager,
"filter", priv->current_filter,
"local-only", priv->local_only,
NULL);
if (priv->sort_func)
+1 -1
View File
@@ -177,7 +177,7 @@ gtk_recent_chooser_class_init (gpointer g_iface)
g_param_spec_boolean ("show-not-found",
P_("Show Not Found"),
P_("Whether the items pointing to unavailable resources should be displayed"),
FALSE,
TRUE,
GTK_PARAM_READWRITE));
/**
* GtkRecentChooser:select-multiple:
+1 -1
View File
@@ -345,7 +345,7 @@ _gtk_recent_chooser_default_init (GtkRecentChooserDefault *impl)
impl->show_icons = TRUE;
impl->show_private = FALSE;
impl->show_not_found = TRUE;
impl->show_tips = TRUE;
impl->show_tips = FALSE;
impl->select_multiple = FALSE;
impl->local_only = TRUE;
+14 -9
View File
@@ -324,6 +324,7 @@ gtk_recent_chooser_menu_constructor (GType type,
GINT_TO_POINTER (TRUE));
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), priv->placeholder, 0);
gtk_widget_set_no_show_all (priv->placeholder, TRUE);
gtk_widget_show (priv->placeholder);
/* (re)populate the menu */
@@ -926,8 +927,6 @@ idle_populate_func (gpointer data)
pdata = (MenuPopulateData *) data;
priv = pdata->menu->priv;
priv->populate_id = 0;
if (!pdata->items)
{
pdata->items = gtk_recent_chooser_get_items (GTK_RECENT_CHOOSER (pdata->menu));
@@ -936,6 +935,7 @@ idle_populate_func (gpointer data)
/* show the placeholder here */
gtk_widget_show (pdata->placeholder);
pdata->displayed_items = 1;
priv->populate_id = 0;
return FALSE;
}
@@ -977,6 +977,7 @@ check_and_return:
{
g_list_foreach (pdata->items, (GFunc) gtk_recent_info_unref, NULL);
g_list_free (pdata->items);
priv->populate_id = 0;
retval = FALSE;
}
@@ -991,14 +992,18 @@ idle_populate_clean_up (gpointer data)
{
MenuPopulateData *pdata = data;
/* show the placeholder in case no item survived
* the filtering process in the idle loop
*/
if (!pdata->displayed_items)
gtk_widget_show (pdata->placeholder);
g_object_unref (pdata->placeholder);
if (pdata->menu->priv->populate_id == 0)
{
/* show the placeholder in case no item survived
* the filtering process in the idle loop
*/
if (!pdata->displayed_items)
gtk_widget_show (pdata->placeholder);
g_slice_free (MenuPopulateData, data);
g_object_unref (pdata->placeholder);
g_slice_free (MenuPopulateData, data);
}
}
static void
+2 -2
View File
@@ -302,7 +302,7 @@ sort_recent_items_mru (GtkRecentInfo *a,
{
g_assert (a != NULL && b != NULL);
return (gtk_recent_info_get_modified (a) < gtk_recent_info_get_modified (b));
return (gtk_recent_info_get_modified (b) - gtk_recent_info_get_modified (a));
}
static gint
@@ -312,7 +312,7 @@ sort_recent_items_lru (GtkRecentInfo *a,
{
g_assert (a != NULL && b != NULL);
return (gtk_recent_info_get_modified (a) > gtk_recent_info_get_modified (b));
return -1 * (gtk_recent_info_get_modified (b) > gtk_recent_info_get_modified (a));
}
typedef struct
+2
View File
@@ -297,6 +297,8 @@ gtk_scale_button_class_init (GtkScaleButtonClass *klass)
gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_ISO_Enter, 0,
+11 -7
View File
@@ -69,8 +69,6 @@ static GSList *(*beagle_hits_subtracted_response_get_uris) (BeagleHitsSubtracted
static BeagleQuery *(*beagle_query_new) (void) = NULL;
static void (*beagle_query_add_text) (BeagleQuery *query,
const char *str) = NULL;
static void (*beagle_query_add_hit_type) (BeagleQuery *query,
const char *hit_type) = NULL;
static void (*beagle_query_set_max_hits) (BeagleQuery *query,
gint max_hits) = NULL;
static BeagleQueryPartProperty *(*beagle_query_part_property_new) (void) = NULL;
@@ -102,7 +100,6 @@ static struct BeagleDlMapping
MAP (beagle_hits_subtracted_response_get_uris),
MAP (beagle_query_new),
MAP (beagle_query_add_text),
MAP (beagle_query_add_hit_type),
MAP (beagle_query_set_max_hits),
MAP (beagle_query_part_property_new),
MAP (beagle_query_part_set_logic),
@@ -129,7 +126,10 @@ open_libbeagle (void)
done = TRUE;
beagle = g_module_open ("libbeagle.so.0", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
beagle = g_module_open ("libbeagle.so.1", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (!beagle)
beagle = g_module_open ("libbeagle.so.0", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (!beagle)
return;
@@ -274,6 +274,7 @@ gtk_search_engine_beagle_start (GtkSearchEngine *engine)
GtkSearchEngineBeagle *beagle;
GError *error;
gchar *text;
gchar *query;
error = NULL;
beagle = GTK_SEARCH_ENGINE_BEAGLE (engine);
@@ -295,11 +296,13 @@ gtk_search_engine_beagle_start (GtkSearchEngine *engine)
"error", G_CALLBACK (beagle_error), engine);
/* We only want files */
beagle_query_add_hit_type (beagle->priv->current_query, "File");
beagle_query_set_max_hits (beagle->priv->current_query, 1000);
text = _gtk_query_get_text (beagle->priv->query);
beagle_query_add_text (beagle->priv->current_query, text);
query = g_strconcat (text, " type:File", NULL);
beagle_query_set_max_hits (beagle->priv->current_query, 1000);
beagle_query_add_text (beagle->priv->current_query, query);
beagle->priv->current_query_uri_prefix = _gtk_query_get_location (beagle->priv->query);
@@ -312,6 +315,7 @@ gtk_search_engine_beagle_start (GtkSearchEngine *engine)
/* These must live during the lifetime of the query */
g_free (text);
g_free (query);
}
static void
+4 -4
View File
@@ -48,13 +48,13 @@ G_BEGIN_DECLS
#define gtk_signal_emit_stop(object,signal_id) \
g_signal_stop_emission ((object), (signal_id), 0)
#define gtk_signal_connect(object,name,func,func_data) \
gtk_signal_connect_full ((object), (name), (func), 0, (func_data), 0, 0, 0)
gtk_signal_connect_full ((object), (name), (func), NULL, (func_data), NULL, 0, 0)
#define gtk_signal_connect_after(object,name,func,func_data) \
gtk_signal_connect_full ((object), (name), (func), 0, (func_data), 0, 0, 1)
gtk_signal_connect_full ((object), (name), (func), NULL, (func_data), NULL, 0, 1)
#define gtk_signal_connect_object(object,name,func,slot_object) \
gtk_signal_connect_full ((object), (name), (func), 0, (slot_object), 0, 1, 0)
gtk_signal_connect_full ((object), (name), (func), NULL, (slot_object), NULL, 1, 0)
#define gtk_signal_connect_object_after(object,name,func,slot_object) \
gtk_signal_connect_full ((object), (name), (func), 0, (slot_object), 0, 1, 1)
gtk_signal_connect_full ((object), (name), (func), NULL, (slot_object), NULL, 1, 1)
#define gtk_signal_disconnect(object,handler_id) \
g_signal_handler_disconnect ((object), (handler_id))
#define gtk_signal_handler_block(object,handler_id) \
+1 -1
View File
@@ -84,7 +84,7 @@ enum {
static guint socket_signals[LAST_SIGNAL] = { 0 };
/**
/*
* _gtk_socket_get_private:
*
* @socket: a #GtkSocket
+16 -16
View File
@@ -56,7 +56,7 @@ void _gtk_socket_advance_toplevel_focus (GtkSocket *socket,
/* In backend-specific file: */
/**
/*
* _gtk_socket_windowing_get_id:
*
* @socket: a #GtkSocket
@@ -65,25 +65,25 @@ void _gtk_socket_advance_toplevel_focus (GtkSocket *socket,
*/
GdkNativeWindow _gtk_socket_windowing_get_id (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_realize_window:
*
*/
void _gtk_socket_windowing_realize_window (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_end_embedding_toplevel:
*
*/
void _gtk_socket_windowing_end_embedding_toplevel (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_size_request:
*
*/
void _gtk_socket_windowing_size_request (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_send_key_event:
*
*/
@@ -91,41 +91,41 @@ void _gtk_socket_windowing_send_key_event (GtkSocket *socket,
GdkEvent *gdk_event,
gboolean mask_key_presses);
/**
/*
* _gtk_socket_windowing_focus_change:
*
*/
void _gtk_socket_windowing_focus_change (GtkSocket *socket,
gboolean focus_in);
/**
/*
* _gtk_socket_windowing_update_active:
*
*/
void _gtk_socket_windowing_update_active (GtkSocket *socket,
gboolean active);
/**
/*
* _gtk_socket_windowing_update_modality:
*
*/
void _gtk_socket_windowing_update_modality (GtkSocket *socket,
gboolean modality);
/**
/*
* _gtk_socket_windowing_focus:
*
*/
void _gtk_socket_windowing_focus (GtkSocket *socket,
GtkDirectionType direction);
/**
/*
* _gtk_socket_windowing_send_configure_event:
*
*/
void _gtk_socket_windowing_send_configure_event (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_select_plug_window_input:
*
* Asks the windowing system to send necessary events related to the
@@ -134,7 +134,7 @@ void _gtk_socket_windowing_send_configure_event (GtkSocket *socket);
*/
void _gtk_socket_windowing_select_plug_window_input (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_embed_get_info:
*
* Gets whatever information necessary about an out-of-process plug
@@ -142,25 +142,25 @@ void _gtk_socket_windowing_select_plug_window_input (GtkSocket *socket);
*/
void _gtk_socket_windowing_embed_get_info (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_embed_notify:
*
*/
void _gtk_socket_windowing_embed_notify (GtkSocket *socket);
/**
/*
* _gtk_socket_windowing_embed_get_focus_wrapped:
*
*/
gboolean _gtk_socket_windowing_embed_get_focus_wrapped (void);
/**
/*
* _gtk_socket_windowing_embed_set_focus_wrapped:
*
*/
void _gtk_socket_windowing_embed_set_focus_wrapped (void);
/**
/*
* _gtk_socket_windowing_filter_func:
*
*/
+39
View File
@@ -53,6 +53,9 @@
#include "gtklabel.h"
#endif
#include "gtkmain.h"
#include "gdkkeysyms.h"
#include "gtkalias.h"
#define BLINK_TIMEOUT 500
@@ -150,6 +153,9 @@ static void gtk_status_icon_embedded_changed (GtkStatusIcon *status_icon);
static void gtk_status_icon_orientation_changed (GtkStatusIcon *status_icon);
#endif
static gboolean gtk_status_icon_key_press (GtkStatusIcon *status_icon,
GdkEventKey *event);
static void gtk_status_icon_popup_menu (GtkStatusIcon *status_icon);
static gboolean gtk_status_icon_button_press (GtkStatusIcon *status_icon,
GdkEventButton *event);
static void gtk_status_icon_disable_blinking (GtkStatusIcon *status_icon);
@@ -488,6 +494,10 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
gtk_widget_add_events (GTK_WIDGET (priv->tray_icon),
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
g_signal_connect_swapped (priv->tray_icon, "key-press-event",
G_CALLBACK (gtk_status_icon_key_press), status_icon);
g_signal_connect_swapped (priv->tray_icon, "popup-menu",
G_CALLBACK (gtk_status_icon_popup_menu), status_icon);
g_signal_connect_swapped (priv->tray_icon, "notify::embedded",
G_CALLBACK (gtk_status_icon_embedded_changed), status_icon);
g_signal_connect_swapped (priv->tray_icon, "notify::orientation",
@@ -497,6 +507,7 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
g_signal_connect_swapped (priv->tray_icon, "screen-changed",
G_CALLBACK (gtk_status_icon_screen_changed), status_icon);
priv->image = gtk_image_new ();
GTK_WIDGET_SET_FLAGS (priv->image, GTK_CAN_FOCUS);
gtk_container_add (GTK_CONTAINER (priv->tray_icon), priv->image);
gtk_widget_show (priv->image);
@@ -1200,6 +1211,34 @@ gtk_status_icon_orientation_changed (GtkStatusIcon *status_icon)
#endif
static gboolean
gtk_status_icon_key_press (GtkStatusIcon *status_icon,
GdkEventKey *event)
{
guint state, keyval;
state = event->state & gtk_accelerator_get_default_mod_mask ();
keyval = event->keyval;
if (state == 0 &&
(keyval == GDK_Return ||
keyval == GDK_KP_Enter ||
keyval == GDK_ISO_Enter ||
keyval == GDK_space ||
keyval == GDK_KP_Space))
{
emit_activate_signal (status_icon);
return TRUE;
}
return FALSE;
}
static void
gtk_status_icon_popup_menu (GtkStatusIcon *status_icon)
{
emit_popup_menu_signal (status_icon, 0, gtk_get_current_event_time ());
}
static gboolean
gtk_status_icon_button_press (GtkStatusIcon *status_icon,
GdkEventButton *event)
+2 -2
View File
@@ -714,7 +714,7 @@ gtk_table_set_row_spacings (GtkTable *table,
* the spacing that will be used for newly added rows.
* (See gtk_table_set_row_spacings())
*
* Returns value: the default row spacing
* Return value: the default row spacing
**/
guint
gtk_table_get_default_row_spacing (GtkTable *table)
@@ -750,7 +750,7 @@ gtk_table_set_col_spacings (GtkTable *table,
* the spacing that will be used for newly added columns.
* (See gtk_table_set_col_spacings())
*
* Returns value: the default column spacing
* Return value: the default column spacing
**/
guint
gtk_table_get_default_col_spacing (GtkTable *table)
+2
View File
@@ -1909,6 +1909,7 @@ gtk_text_key_press (GtkWidget *widget,
case GDK_KP_Down:
case GDK_Down: scroll_int (text, +KEY_SCROLL_PIXELS); break;
case GDK_Return:
case GDK_ISO_Enter:
case GDK_KP_Enter:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
@@ -2028,6 +2029,7 @@ gtk_text_key_press (GtkWidget *widget,
gtk_editable_insert_text (GTK_EDITABLE (old_editable), "\t", 1, &position);
break;
case GDK_KP_Enter:
case GDK_ISO_Enter:
case GDK_Return:
if (event->state & GDK_CONTROL_MASK)
gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
-9
View File
@@ -1625,17 +1625,8 @@ text_span_free (TextSpan *span)
static void
parse_info_free (ParseInfo *info)
{
GSList *slist;
GList *list;
slist = info->tag_stack;
while (slist)
{
g_free (slist->data);
slist = slist->next;
}
g_slist_free (info->tag_stack);
g_slist_free (info->states);
+1 -1
View File
@@ -38,7 +38,7 @@
typedef struct _GtkTextRealIter GtkTextRealIter;
struct _GtkTextRealIter
struct G_GNUC_MAY_ALIAS _GtkTextRealIter
{
/* Always-valid information */
GtkTextBTree *tree;
+1
View File
@@ -4094,6 +4094,7 @@ gtk_text_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
/* use overall editability not can_insert, more predictable for users */
else if (text_view->editable &&
(event->keyval == GDK_Return ||
event->keyval == GDK_ISO_Enter ||
event->keyval == GDK_KP_Enter))
{
/* this won't actually insert the newline if the cursor isn't
+2 -2
View File
@@ -484,7 +484,7 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
P_("Toolbar Style"),
P_("How to draw the toolbar"),
GTK_TYPE_TOOLBAR_STYLE,
GTK_TOOLBAR_ICONS,
DEFAULT_TOOLBAR_STYLE,
GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_SHOW_ARROW,
@@ -3877,7 +3877,7 @@ struct _ToolbarContent
GtkAllocation goal_allocation;
guint is_placeholder : 1;
guint disappearing : 1;
TriState has_menu : 2;
guint has_menu : 2;
} tool_item;
struct
+21 -2
View File
@@ -92,6 +92,8 @@ static void gtk_tooltip_window_hide (GtkWidget *widget,
static void gtk_tooltip_display_closed (GdkDisplay *display,
gboolean was_error,
GtkTooltip *tooltip);
static void gtk_tooltip_set_last_window (GtkTooltip *tooltip,
GdkWindow *window);
G_DEFINE_TYPE (GtkTooltip, gtk_tooltip, G_TYPE_OBJECT);
@@ -179,6 +181,8 @@ gtk_tooltip_finalize (GObject *object)
tooltip->browse_mode_timeout_id = 0;
}
gtk_tooltip_set_last_window (tooltip, NULL);
if (tooltip->window)
{
GdkDisplay *display;
@@ -707,6 +711,21 @@ gtk_tooltip_display_closed (GdkDisplay *display,
g_object_set_data (G_OBJECT (display), "gdk-display-current-tooltip", NULL);
}
static void
gtk_tooltip_set_last_window (GtkTooltip *tooltip,
GdkWindow *window)
{
if (tooltip->last_window)
g_object_remove_weak_pointer (G_OBJECT (tooltip->last_window),
(gpointer *) &tooltip->last_window);
tooltip->last_window = window;
if (window)
g_object_add_weak_pointer (G_OBJECT (tooltip->last_window),
(gpointer *) &tooltip->last_window);
}
static gboolean
gtk_tooltip_run_requery (GtkWidget **widget,
GtkTooltip *tooltip,
@@ -1163,7 +1182,7 @@ _gtk_tooltip_handle_event (GdkEvent *event)
if (current_tooltip)
{
current_tooltip->last_window = event->any.window;
gtk_tooltip_set_last_window (current_tooltip, event->any.window);
gdk_event_get_root_coords (event,
&current_tooltip->last_x,
&current_tooltip->last_y);
@@ -1271,7 +1290,7 @@ _gtk_tooltip_handle_event (GdkEvent *event)
G_CALLBACK (gtk_tooltip_display_closed),
current_tooltip);
current_tooltip->last_window = event->any.window;
gtk_tooltip_set_last_window (current_tooltip, event->any.window);
gdk_event_get_root_coords (event,
&current_tooltip->last_x,
&current_tooltip->last_y);
+19 -3
View File
@@ -139,13 +139,29 @@ static gboolean
gtk_tray_icon_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkWidget *focus_child;
gint border_width, x, y, width, height;
gboolean retval = FALSE;
gdk_window_clear_area (widget->window, event->area.x, event->area.y,
event->area.width, event->area.height);
if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event)
return GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event (widget, event);
if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event)
retval = GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->expose_event (widget, event);
return FALSE;
focus_child = GTK_CONTAINER (widget)->focus_child;
if (focus_child && GTK_WIDGET_HAS_FOCUS (focus_child))
{
width = widget->allocation.width;
height = widget->allocation.height;
gtk_paint_focus (widget->style, widget->window,
GTK_WIDGET_STATE (widget),
&event->area, widget, "tray_icon",
x, y, width, height);
}
return retval;
}
static void

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