Compare commits

...

428 Commits

Author SHA1 Message Date
Matthias Clasen dd96b0da26 2.12.12
svn path=/branches/gtk-2-12/; revision=21376
2008-09-13 03:09:50 +00:00
Matthias Clasen 6f59f4764a Correct a mismerge, spotted by Wouter Bolsterlee.
2008-09-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (browse_files_select_first_row): Correct
        a mismerge, spotted by Wouter Bolsterlee.


svn path=/branches/gtk-2-12/; revision=21375
2008-09-12 13:53:45 +00:00
Matthias Clasen 4dce1ced1c Updates
svn path=/branches/gtk-2-12/; revision=21373
2008-09-12 05:09:36 +00:00
Matthias Clasen 0d07382511 Plug a small memory leak
* gdk-pixbuf-io.c: Plug a small memory leak

        Bug 517233 - Calling gdk_pixbuf_loader_close causes "GError set over
        the top of a previous GError" warning

        * gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite
        errors. Reported by Andrey Tsyvarev


svn path=/branches/gtk-2-12/; revision=21372
2008-09-12 04:51:18 +00:00
Matthias Clasen 6f8e727617 Bug 549711 - Race condition when loading gdk-pixbuf image modules
* gdk-pixbuf-io.c: Fix a race condition in module loading,
        spotted by Chris Lord.


svn path=/branches/gtk-2-12/; revision=21371
2008-09-12 04:44:52 +00:00
Matthias Clasen a47f916553 Bug 532644 - TIFF loader need to exclude CR2 files
* io-tiff.c: Add a pattern to exclude CR2 files.
        Noticed by Hubert Figuire


svn path=/branches/gtk-2-12/; revision=21370
2008-09-12 04:28:21 +00:00
Matthias Clasen 273e09a0c8 Use gdk_pixbuf_copy_area() to copy between pixbufs. Reported by Andrey
* gdk-pixbuf-utils.c (gdk_pixbuf_saturate_and_pixelate):
        Use gdk_pixbuf_copy_area() to copy between pixbufs.
        Reported by Andrey Tsyvarev



svn path=/branches/gtk-2-12/; revision=21369
2008-09-12 04:26:04 +00:00
Matthias Clasen fd46b9d477 Bug 551378 - Print dialog: should try UDS when fetching PPD for
localhost

        * modules/printbackends/cups/gtkprintbackendcups.c: Add ability
        to get PPD file from CUPS through Unix domain socket.
        Patch by Marek Kasik


svn path=/branches/gtk-2-12/; revision=21368
2008-09-12 04:23:29 +00:00
Matthias Clasen 596bf1c6ad Bug 551567 – DND mark broken
* gtk/gtktextbtree.c (redisplay_mark): invalidate mark properly
        Patch by Yevgen Muntyan.


svn path=/branches/gtk-2-12/; revision=21367
2008-09-12 04:21:42 +00:00
Matthias Clasen 49dee1b663 Check that the [hv]scrollbar attributes are not-NULL before destroying and
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_destroy,
        gtk_scrolled_window_finalize): Check that the [hv]scrollbar
        attributes are not-NULL before destroying and unparenting them.
        Patch by Björn Lindqvist


svn path=/branches/gtk-2-12/; revision=21366
2008-09-12 04:18:33 +00:00
Matthias Clasen d17cb8ac8a sets the is_default parameter to the value given by caller. Patch by Marek
* gtk/gtkprinter.c: sets the is_default parameter to the value
        given by caller. Patch by Marek Kasik



svn path=/branches/gtk-2-12/; revision=21365
2008-09-12 04:14:04 +00:00
Matthias Clasen 9977fc50d7 Bug 319849 - gtkcalendar look in RTL locales
* gtk/gtkcalendar.c (calendar_realize_week_numbers), 
        (gtk_calendar_realize): added missing RTL code to handle week numbers
        from gtk_calendar_size_alloc. Patch by Yair Hershkovitz



svn path=/branches/gtk-2-12/; revision=21364
2008-09-12 04:11:20 +00:00
Matthias Clasen a01b78860c when extending the draw rectangle by the "draw-border" style property,
* gtk/gtkwidget.c (gtk_widget_get_draw_rectangle): when extending
        the draw rectangle by the "draw-border" style property, subtract
        "left" from "x" and "top" from "y", not the other way around.
        Noticed by Michael Natterer


svn path=/branches/gtk-2-12/; revision=21363
2008-09-12 04:07:34 +00:00
Matthias Clasen b1a004c1ba Bug 550528 - IconView DND interface does not work if only used as
source

        * gtk/gtkiconview.c: Make source-only DND work.  Found by Alex Simon



svn path=/branches/gtk-2-12/; revision=21362
2008-09-12 04:05:04 +00:00
Matthias Clasen 569f3321a5 Bug 549810 – Memory leaks in printing code
* gtk/gtkprintjob.c (gtk_print_job_set_property):
        * modules/printbackends/file/gtkprintbackendfile.c
        (output_file_from_settings):
        * modules/printbackends/test/gtkprintbackendtest.c
        (output_test_from_settings): free some temporary strings.
        Patch by Yevgen Muntyan.


svn path=/branches/gtk-2-12/; revision=21361
2008-09-12 04:02:27 +00:00
Matthias Clasen 527ea27a19 Bug 549354 – Crash trying to open a file on a remote folder
* gtk/gtkfilechooserdefault.c (error_message_with_parent): Handle
        the fact that parent may be NULL without crashing.



svn path=/branches/gtk-2-12/; revision=21360
2008-09-12 03:56:37 +00:00
Matthias Clasen 19d32714e9 Unset the color when setting it to NULL instead of displaying a warning.
* gtk/gtktexttag.c (gtk_text_tag_set_property): Unset the color when
        setting it to NULL instead of displaying a warning.
        Patch by Xavier Claessens

        * gtk/gtkassistant.c: Don't emit signals with extra parameters.
        Patch by Antti Kaijanmäki

        * gtk/gtksettings.c: When reconstructing the color hash, try
        harder to avoid unnecessary notification, since this can lead
        to infinite reloading of rc files in some situations.



svn path=/branches/gtk-2-12/; revision=21359
2008-09-12 03:55:04 +00:00
Matthias Clasen d61669e6d3 Bug 545875 – evo crashed when trying to print pages 6-7 of a 1 page
email

        * gtk/gtkprintoperation.c: Clamp page ranges to correct ranges.
        Patch by Marek Kasik


svn path=/branches/gtk-2-12/; revision=21358
2008-09-12 03:46:13 +00:00
Matthias Clasen 3083a903d1 Bug 542523 - GtkTextTag should handle setting properties to NULL
* gtk/gtktexttag.c (gtk_text_tag_set_property): Unset the color when
	setting it to NULL instead of displaying a warning.


svn path=/branches/gtk-2-12/; revision=21357
2008-09-12 03:16:46 +00:00
Matthias Clasen 1db39506ab Bug 479780 – Bookmarks in left pane of FileChooser cannot be renamed
* gtk/gtkfilechooserdefault.c (shortcuts_build_popup_menu):
        Call shortcuts_check_popup_sensitivity() every time the
        menu is popped up. Problem reported by Hong Jen Yee


svn path=/branches/gtk-2-12/; revision=21356
2008-09-12 03:14:48 +00:00
Matthias Clasen 779091175d Unset the image when the label is set to "(None)". Reported by Neil
* gtk/gtkfilechooserbutton.c (update_label_and_image): Unset
        the image when the label is set to "(None)". Reported by
        Neil Roberts


svn path=/branches/gtk-2-12/; revision=21355
2008-09-12 03:10:31 +00:00
Matthias Clasen 2146148b46 Skip update of accelerator child node if it has no associated action.
* gtk/gtkuimanager.c (update_node): Skip update of accelerator
        child node if it has no associated action. Fixes #541950.
        Patch by Christian Neumair


svn path=/branches/gtk-2-12/; revision=21354
2008-09-12 03:05:52 +00:00
Matthias Clasen 5981275a1f Bug 528845 – segv from GtkBuilder on attempting <accelerator> under
GtkCellView

        * gtk/gtkcellview.c: Don't blindly chain up in the buildable
        implementation.  Reported by Kevin Ryde.


svn path=/branches/gtk-2-12/; revision=21353
2008-09-12 03:02:01 +00:00
Matthias Clasen b626e5d50e Bug 541645 – gtkfilechooserdefault segfaults when bookmark does not
contain ://

        * gtk/gtkfilechooserdefault.c (_gtk_file_chooser_label_for_file):
        Be more robust. Reported by  Jelte van der Hoek


svn path=/branches/gtk-2-12/; revision=21352
2008-09-12 02:56:03 +00:00
Matthias Clasen 48251ab74e Bug 538863 – Fixes assertion on entering empty folder
* gtk/gtkfilechooserdefault.c (browse_files_select_first_row): Don't
        select the first row if the folder is empty.
        Patch by Olle Bergkvist.


svn path=/branches/gtk-2-12/; revision=21351
2008-09-12 02:33:15 +00:00
Petr Kovar 0220067376 Updated Czech translation.
2008-09-02  Petr Kovar  <pknbe@volny.cz>

	* cs.po: Updated Czech translation.

svn path=/branches/gtk-2-12/; revision=21258
2008-09-01 23:10:42 +00:00
Cody Russell 5f5b54ebbe Merged from trunk:
2008-08-27  Cody Russell  <bratsche@gnome.org>

        Merged from trunk:

        * gdk/win32/gdkevents-win32.c:
        * gdk/win32/gdkwindow-win32.c (show_window_recurse): Check if
        the window's state has GDK_WINDOW_STATE_MAXIMIZED set before
        calling ShowWindow (), and show using SW_SHOWMAXIMIZED or
        SW_RESTORE accordingly.  This fixes an issue where maximized
        windows that are iconified do not restore back to maximized
        when you click the taskbar. (#528975)


svn path=/branches/gtk-2-12/; revision=21219
2008-08-28 02:43:45 +00:00
Cody Russell f5b219d5ba Merged from trunk:
2008-08-21  Cody Russell  <bratsche@gnome.org>

        Merged from trunk:

        * gdk/win32/gdkevents-win32.c (doesnt_want_key): Remove the checks
        to see if the window is modally blocked.  This doesn't get us anything,
        and it confuses the search window in GtkTreeView (and potentially other
        utility windows in other apps).  (#520165)


svn path=/branches/gtk-2-12/; revision=21181
2008-08-22 00:31:59 +00:00
Inaki Larranaga Murgoitio e767d7e37d Updated Basque translation.
2008-08-12  Inaki Larranaga Murgoitio  <dooteo@euskalgnu.org>

	* eu.po: Updated Basque translation.


svn path=/branches/gtk-2-12/; revision=21084
2008-08-12 08:41:39 +00:00
Sven Neumann 2e8594e553 Merged from trunk:
2008-08-04  Sven Neumann  <sven@gimp.org>

        Merged from trunk:

        * gtk/gtklinkbutton.c (gtk_link_button_set_uri): update the link
        color when the "visited" state is changed.


svn path=/branches/gtk-2-12/; revision=20968
2008-08-04 14:22:36 +00:00
Tor Lillqvist 7b2b2987c2 Bug 538686 - gtkprintoperation-win32.c: devmode_from_settings
2008-08-02  Tor Lillqvist  <tml@novell.com>

	Bug 538686 - gtkprintoperation-win32.c: devmode_from_settings

	* gtk/gtkprintoperation-win32.c (devmode_from_settings): Plug
	potential leak. Thanks to Morten Welinder.


svn path=/branches/gtk-2-12/; revision=20945
2008-08-02 11:30:49 +00:00
Claudio Saavedra e2a76050f9 Bug 545931 – small documentation typos
2008-08-01  Claudio Saavedra  <csaavedra@igalia.com>

	Bug 545931 – small documentation typos

	* gtk/gtkcomboboxentry.c: Fix some typos in the documentation.


svn path=/branches/gtk-2-12/; revision=20928
2008-08-02 01:27:25 +00:00
Tor Lillqvist 31a5de9c85 Add an empty line.
svn path=/branches/gtk-2-12/; revision=20915
2008-07-30 09:51:21 +00:00
Tor Lillqvist 4094234b65 Fix problems in handling custom paper sizes. The DEVMODE::dmPaperWidth and
2008-07-30  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkprintoperation-win32.c: Fix problems in handling custom
	paper sizes. The DEVMODE::dmPaperWidth and dmPaperLength are in
	tenths of a millimeter, and the RECT passed to CreateEnhMetaFile()
	is in hundredths of a millimeter. Patch by Sven Neumann.


svn path=/branches/gtk-2-12/; revision=20914
2008-07-30 09:48:19 +00:00
Amitakhya Phukan 3e53866811 Updated assamese translations
svn path=/branches/gtk-2-12/; revision=20857
2008-07-17 06:41:02 +00:00
Luca Ferretti 5a2a96f3f8 Updated Italian translation.
2008-07-12  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.


svn path=/branches/gtk-2-12/; revision=20821
2008-07-12 13:19:42 +00:00
Murray Cumming 89679badf3 tooltip-text and tooltip-markup properties: Interpret an empty string as a
2008-07-03  Murray Cumming  <murrayc@murrayc.com>

* gtk/gtkwidget.c (gtk_widget_set_property):  tooltip-text and 
tooltip-markup properties: Interpret an empty string as a NULL 
string because an empty tooltip is silly. This will help 
language bindings that do not bother to have the two types of 
empty/null strings.
Bug #541399.

svn path=/branches/gtk-2-12/; revision=20815
2008-07-10 17:47:17 +00:00
Cody Russell aaaa0915d7 Merged from trunk:
2008-07-07  Cody Russell  <bratsche@gnome.org>

        Merged from trunk:

        Bug 541964 – [Win32] Setting modal hint to current value might confuse the stack

        * gdk/win32/gdkwindow-win32.c: Check if the value is the same as the
        existing modal hint value before setting it.


svn path=/branches/gtk-2-12/; revision=20810
2008-07-07 22:28:08 +00:00
Cody Russell fe66c311dd Bug 540994 – [Win32] Some windows don't appear at the top when created
2008-07-07  Cody Russell  <bratsche@gnome.org>

	Bug 540994 – [Win32] Some windows don't appear at the top when created

        * gdk/win32/gdkwindow-win32.c: Raise the window when setting it modal.


svn path=/branches/gtk-2-12/; revision=20807
2008-07-07 22:06:15 +00:00
Jorge Gonzalez Gonzalez 08f278c830 Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=20777
2008-07-05 11:36:05 +00:00
Nickolay V. Shmyrev d493b42c87 Updated Russian translation.
2008-07-05  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation.


svn path=/branches/gtk-2-12/; revision=20774
2008-07-05 07:57:26 +00:00
Tor Lillqvist f52c485e71 Bug 540861 - invalid UTF-8 in input device name
2008-07-04  Tor Lillqvist  <tml@novell.com>

	Bug 540861 - invalid UTF-8 in input device name

	* gdk/win32/gdkinput-win32.c: Fetch the device and cursor names in
	Unicode, and convert to UTF-8 for the GdkDevice's name field.


svn path=/branches/gtk-2-12/; revision=20753
2008-07-03 22:48:22 +00:00
Takeshi AIHANA 15d28319ff Updated Japanese translation.
2008-07-03  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/branches/gtk-2-12/; revision=20743
2008-07-03 13:02:34 +00:00
Cody Russell 65188481a2 Merged from trunk:
2008-07-01  Cody Russell  <bratsche@gnome.org>

	Merged from trunk:

        Bug 539164 – Windows' System Menu blocks main loop

        * gdk/win32/gdkevents-win32.c:	Use a modal timer proc in between
	receiving WM_ENTERMENULOOP and	WM_EXITMENULOOP	and pump	the
	GLib mainloop from there.


svn path=/branches/gtk-2-12/; revision=20727
2008-07-01 23:18:59 +00:00
Matthias Clasen 7a89ee2b31 Bump version
svn path=/branches/gtk-2-12/; revision=20722
2008-07-01 15:51:06 +00:00
Matthias Clasen d33b360c93 2.12.11
svn path=/branches/gtk-2-12/; revision=20720
2008-07-01 15:48:55 +00:00
Matthias Clasen 370c5d7bd8 Updates
svn path=/branches/gtk-2-12/; revision=20714
2008-07-01 05:32:44 +00:00
Matthias Clasen 56a0748b9e Add image/x-win-bitmap to the supported mimetypes, since that is what
2008-06-18  Matthias Clasen  <mclasen@redhat.com>

        * io-ico.c: Add image/x-win-bitmap to the supported mimetypes,
        since that is what shared-mime-info uses for .cur



svn path=/branches/gtk-2-12/; revision=20713
2008-07-01 05:23:32 +00:00
Matthias Clasen 322e7369a9 Fix life cycle to avoid crash. [#536966]
* gtk/gtkprintoperation-win32.c (gtk_print_run_page_setup_dialog) :
          Fix life cycle to avoid crash. [#536966]



svn path=/branches/gtk-2-12/; revision=20712
2008-07-01 05:20:08 +00:00
Matthias Clasen 5a3761d885 check surface status after ceating a pdf. Avoids crashing when the target
* gtk/gtkprintoperation.c : check surface status after ceating a pdf.
        Avoids crashing when the target can not be written, bug #537685



svn path=/branches/gtk-2-12/; revision=20711
2008-07-01 05:04:30 +00:00
Gabor Kelemen 5ad73998fd Translation updated.
2008-06-27  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated.

svn path=/branches/gtk-2-12/; revision=20694
2008-06-27 12:03:33 +00:00
Olle Bergkvist 4cd0ea5a14 bgo538784 - Don't change the filename entry in CREATE_FOLDER mode
2008-06-18  Olle Bergkvist <olle.bergkvist@yahoo.se>

	Merged from trunk:

	http://bugzilla.gnome.org/show_bug.cgi?id=538784 - Don't change
	the filename in the name entry in CREATE_FOLDER mode when changing
	folders, so that you can enter a new subfolder name, double-click on a
	folder to change to it, and close the dialog.

	* gtk/gtkfilechooserdefault.c (update_chooser_entry): Don't change
	the filename in the entry in CREATE_FOLDER mode, either.

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

svn path=/branches/gtk-2-12/; revision=20458
2008-06-18 22:37:35 +00:00
Olle Bergkvist ff03c02f25 bgo419737 - Don't clear filename entry in SAVE/CREATE_FOLDER modes
2008-06-18  Olle Bergkvist <olle.bergkvist@yahoo.se>

	    Merged from trunk:

	    http://bugzilla.gnome.org/show_bug.cgi?id=419737#c59 - The file
	    chooser clears the filename entry in SAVE/CREATE_FOLDER modes when
	    it shouldn't.

	    * gtk/gtkfilechooserdefault.c (shortcuts_activate_iter): Don't
	    clear the entry for CREATE_FOLDER either; this needs the same
	    behavior as SAVE mode.
	    (update_chooser_entry): Only clear the entry in OPEN/SELECT_FOLDER
	    modes.

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

svn path=/branches/gtk-2-12/; revision=20456
2008-06-18 22:27:29 +00:00
Matthias Clasen 8125ad9bf0 Protect against XKB being stupid. Reported by Pedro Villavicencio.
* gdk/x11/gdkkeys-x11.c (_gdk_keymap_key_is_modifier): Protect
        against XKB being stupid. Reported by Pedro Villavicencio.



svn path=/branches/gtk-2-12/; revision=20414
2008-06-17 02:13:46 +00:00
Matthias Clasen 936d877657 Backport fix for calendar strings
svn path=/branches/gtk-2-12/; revision=20412
2008-06-17 00:17:57 +00:00
Daniel Nylander f833f22e42 sv.po: Updated Swedish translation
svn path=/branches/gtk-2-12/; revision=20410
2008-06-16 20:53:32 +00:00
Tor Lillqvist d5b82b8c09 Typo.
svn path=/branches/gtk-2-12/; revision=20400
2008-06-16 13:43:22 +00:00
Leonardo Ferreira Fontenelle d7beeb09bc Updated Brazilian Portuguese translation by Henrique P. Machado.
2008-06-14  Leonardo Ferreira Fontenelle  <leonardof@gnome.org>

	* pt_BR.po: Updated Brazilian Portuguese translation by Henrique P.
	Machado.

svn path=/branches/gtk-2-12/; revision=20390
2008-06-15 01:10:00 +00:00
Cody Russell 65bfb383ff Merge from trunk:
2008-06-14  Cody Russell  <bratsche@gnome.org>

	Merge from trunk:

        * gdk/win32/gdkselection-win32.c (gdk_win32_selection_add_targets):

        Initialize hwnd to NULL.  This fixes OpenClipboard() failure and,
        according to MSDN docs, associates the open clipboard with the
        current task.  (#378158, reported by Andreas Köhler)


svn path=/branches/gtk-2-12/; revision=20389
2008-06-15 00:02:22 +00:00
Matthias Clasen c1afab7ace RH bug 248245 and 449379: cups client printing from gnome applications
2008-06-12  Matthias Clasen  <mclasen@redhat.com>

        RH bug 248245 and 449379: cups client printing from gnome
        applications fail

        * modules/printbackends/cups/gtkprintbackendcups.c: Really fix
        printer URI construction. Patch by Marek Kasik


svn path=/branches/gtk-2-12/; revision=20361
2008-06-12 13:07:43 +00:00
Kristian Rietveld 40d7aff8cf Merge from trunk:
2008-06-08  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_update_button):
	always determine what arrow to show if show_sort_indicator is true.
	(#352738, Chris Vine).


svn path=/branches/gtk-2-12/; revision=20338
2008-06-08 20:39:03 +00:00
Gil Forcada Codinachs f683bffca0 Updated Catalan translation
svn path=/branches/gtk-2-12/; revision=20337
2008-06-08 18:05:17 +00:00
Tor Lillqvist b8ab05b497 Bug 536990 - updateiconcache.c: 'close ()' is redundant
2008-06-07  Tor Lillqvist  <tml@novell.com>

	Bug 536990 - updateiconcache.c: 'close ()' is redundant

	* gtk/updateiconcache.c (build_cache): Drop redundant close()
	calls. fclose() on a fdopen()ed strema closes the underlying file
	descriptor.


svn path=/branches/gtk-2-12/; revision=20328
2008-06-07 04:20:35 +00:00
Matthias Clasen 933181a5ba Bug 536757 – regression: openoffice.org menus are placed at wrong
2008-06-06  Matthias Clasen  <mclasen@redhat.com>

        Bug 536757 – regression: openoffice.org menus are placed at wrong
        position since 2.12.10

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
        Return the right coordinates.

svn path=/branches/gtk-2-12/; revision=20326
2008-06-06 21:00:40 +00:00
Claude Paroz 3f11289039 Updated French translation.
2008-06-05  Claude Paroz  <claude@2xlibre.net>

	* fr.po: Updated French translation.

svn path=/branches/gtk-2-12/; revision=20320
2008-06-05 21:18:17 +00:00
Clytie Siddall 8bced4a6e2 Updated Vietnamese translation
svn path=/branches/gtk-2-12/; revision=20318
2008-06-05 09:40:39 +00:00
Tor Lillqvist 2c1c27920f Merge from trunk:
2008-06-05  Tor Lillqvist  <tml@novell.com>

	Merge from trunk:

	* modules/engines/ms-windows/msw_style.c (draw_box): Check that
	the widget is a GtkButton before casting.


svn path=/branches/gtk-2-12/; revision=20314
2008-06-04 21:52:46 +00:00
Matthias Clasen fee27db187 Bump version
svn path=/branches/gtk-2-12/; revision=20308
2008-06-03 22:37:02 +00:00
Matthias Clasen b6b8f84530 2.12.10
svn path=/branches/gtk-2-12/; revision=20306
2008-06-03 22:34:31 +00:00
Matthias Clasen e2fa935e17 Remove reverted bug
svn path=/branches/gtk-2-12/; revision=20299
2008-06-03 04:43:40 +00:00
Matthias Clasen 75c550f662 Forgotten file
svn path=/branches/gtk-2-12/; revision=20298
2008-06-03 04:39:44 +00:00
Matthias Clasen 15d107a2f1 Revert one problematic fix
svn path=/branches/gtk-2-12/; revision=20297
2008-06-03 04:39:12 +00:00
Matthias Clasen 27d8a1f312 Add missing includes
svn path=/branches/gtk-2-12/; revision=20296
2008-06-03 03:35:11 +00:00
Matthias Clasen dbb99cb02e Updates
svn path=/branches/gtk-2-12/; revision=20295
2008-06-03 03:29:18 +00:00
Matthias Clasen 4960c3c504 Revert a patch that introduced a gio dependency
svn path=/branches/gtk-2-12/; revision=20293
2008-06-03 02:38:10 +00:00
Claudio Saavedra cd0c47f00a Merge from trunk:
2008-06-02  Claudio Saavedra  <csaavedra@igalia.com>

	Merge from trunk:

        Bug 535862 – gtk_action_create_icon can't create icons from the
        icon themes

        * gtk/gtkaction.c: (gtk_action_create_icon): Look for the icon in
        the default factories as it's supposed.


svn path=/branches/gtk-2-12/; revision=20291
2008-06-03 00:42:39 +00:00
Matthias Clasen fb090c5816 Bug 535453 - gdk_pixbuf_format_get_license returns NULL for
any of the loaders

        * queryloaders.c (write_loader_info): Add the license info
        after the description.

        * gdk-pixbuf-io.c (gdk_pixbuf_io_init): Read the license info
        from the module file. Reported by Andrey Tsyvarev.


svn path=/branches/gtk-2-12/; revision=20288
2008-06-02 22:22:32 +00:00
Matthias Clasen 3611328d76 Bug 530146 - Setting non-string tooltip with
gtk_tree_view_set_tooltip_column() segfaults

        * gtk/gtktreeview.c (gtk_tree_view_set_tooltip_query_cb): use
        gtk_tree_model_get_value() and explicitly transform the value to a
        string before setting it as tooltip.


svn path=/branches/gtk-2-12/; revision=20287
2008-06-02 22:19:21 +00:00
Matthias Clasen 3e6b263ae7 Bug 56355 – GtkLabel - Not all changes propagate correctly
* gtk/gtklabel.c: (gtk_label_recalculate), (gtk_label_set_label),
        (gtk_label_set_markup_with_mnemonic), (gtk_label_parse_uline),
        (gtk_label_set_text_with_mnemonic), (gtk_label_set_use_underline):
        Call gtk_label_setup_mnemonic from gtk_label_recalculate. Add
        notifications of mnemonic-keyval changes.


svn path=/branches/gtk-2-12/; revision=20286
2008-06-02 22:14:41 +00:00
Matthias Clasen a70f23c605 Bug 511217 - potential memory corruption after refreshing a tree_view
* gtk/gtktreeview.c (cancel_arrow_animation): Reset
        expanded_collapsed_node when canceling the animation.
        Patch by Nicholas Setton.


svn path=/branches/gtk-2-12/; revision=20285
2008-06-02 22:10:51 +00:00
Matthias Clasen 09c2e41429 Bug 106574 - Inconsistent increment behavior for gtkspinbutton
* gtk/gtkspinbutton.c (gtk_spin_button_real_value_change):
        Commit the entry text before doing an increment. Patch by
        Björn Lindqvist.


svn path=/branches/gtk-2-12/; revision=20284
2008-06-02 22:07:23 +00:00
Matthias Clasen 1ed1d38dbd Bug 531008 – Crash in gtkprintunixdialog.c
* gtk/gtkprintunixdialog.c: Disconnect signal handlers when
        the dialog closes. Patch by Yevgen Muntyan.

svn path=/branches/gtk-2-12/; revision=20283
2008-06-02 22:05:21 +00:00
Matthias Clasen 8db4d1ee79 Bug 523562 - gtk-update-icon-cache core dumps when run concurrently and
when options are missing

        * gtk/updateiconcache.c: Open the cache file (O_CREAT | O_EXCL) so
        that other processes that try to open it will fail gracefully.  Also
        fix a crasher caused by lack of a NULL check.  Report and patch
        by Erwann Chenede.


svn path=/branches/gtk-2-12/; revision=20282
2008-06-02 22:02:45 +00:00
Matthias Clasen 94b7dfbb13 Bug 526635 - _gdk_window_get_toplevel handles FOREIGN windows
* gdk/x11/gdkwindow-x11.c (_gdk_window_get_toplevel): Check
        !WINDOW_IS_TOPLEVEL instead of checking for GDK_WINDOW_CHILD,
        so that we also take into account for foreign windows.
        Report and patch by Nathaniel Smith.


svn path=/branches/gtk-2-12/; revision=20281
2008-06-02 21:59:46 +00:00
Matthias Clasen 98f234e73a Bug 524110 - Gdk should not assume reparenting WMs when retrieving
window frame extents

        * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents):
        Use _NET_FRAME_EXTENTS, if available.  Patch by Danny Baumann.


svn path=/branches/gtk-2-12/; revision=20280
2008-06-02 21:57:51 +00:00
Matthias Clasen d88a3d3f7f Bug 522269 - Evince windows sometimes incorrectly unmaximized,
caused by missing flag initialization

        * gdk/x11/gdkwindow-x11.c (set_initial_hints): Initialize
        top-level private flags correctly.  Patch by Danny Baumann.


svn path=/branches/gtk-2-12/; revision=20279
2008-06-02 21:56:29 +00:00
Matthias Clasen d554f8b4ff Bug 534463 - non-editable GtkTextView should not call
gtk_im_context_focus_in in focus event

        * gtk/gtktextview.c: Add checks to see if the textview is
        editable.  Patch by Wang Diancheng.


svn path=/branches/gtk-2-12/; revision=20278
2008-06-02 21:52:48 +00:00
Matthias Clasen 1b07b921b3 Add GDK_ACTION_MOVE to the drag actions to allow trash (#137717).
* gtk/gtkfilechooserdefault.c: (create_file_list): Add GDK_ACTION_MOVE
        to the drag actions to allow trash (#137717).


svn path=/branches/gtk-2-12/; revision=20277
2008-06-02 21:49:26 +00:00
Matthias Clasen 3ed0663ea0 check that tracker is actually working before using it. Fixes bug #479197.
* gtk/gtksearchenginetracker.c: (_gtk_search_engine_tracker_new):
        check that tracker is actually working before using it. Fixes
        bug #479197.


svn path=/branches/gtk-2-12/; revision=20276
2008-06-02 21:45:59 +00:00
Matthias Clasen a5c7f5c708 Ignore G_IO_ERROR_FAILED_HANDLED errors (#532262).
* gtk/gtkfilechooserdefault.c:
        (shortcuts_activate_volume_mount_cb): Ignore G_IO_ERROR_FAILED_HANDLED
        errors (#532262).


svn path=/branches/gtk-2-12/; revision=20275
2008-06-02 21:38:18 +00:00
Matthias Clasen 699973f3c2 Don't try to toggle the visibility of the location entry field in search
* gtk/gtkfilechooserdefault.c: (location_toggle_popup_handler): Don't
        try to toggle the visibility of the location entry field in search and
        recent mode (#526422).


svn path=/branches/gtk-2-12/; revision=20274
2008-06-02 21:18:12 +00:00
Matthias Clasen f2288088c5 Bug 387972 – gtkassistant drawing problem
* gtk/gtkassistant.c (gtk_assistant_size_allocate): Make
        GtkAssistant work better in glade.


svn path=/branches/gtk-2-12/; revision=20273
2008-06-02 20:44:40 +00:00
Matthias Clasen 441c4ad480 Bug 529841 – incorrect position in directfb
* gdk/directfb/gdkwindow-directfb.c: fix y = abs_x


svn path=/branches/gtk-2-12/; revision=20272
2008-06-02 20:38:48 +00:00
Matthias Clasen b698461f2d no need to g_return_if_fail(tooltips != NULL);
* gtk/gtktooltips.c (gtk_tooltips_destroy): no need to
        g_return_if_fail(tooltips != NULL);



svn path=/branches/gtk-2-12/; revision=20271
2008-06-02 20:35:06 +00:00
Matthias Clasen bb1e1c5601 Guard against NULL pointer. (#467051, Gian Mario Tagliaretti)
* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Guard
        against NULL pointer. (#467051, Gian Mario Tagliaretti)


svn path=/branches/gtk-2-12/; revision=20270
2008-06-02 20:25:25 +00:00
Tor Lillqvist 07b2fd4cd5 Merge from trunk:
2008-03-20  Tor Lillqvist  <tml@novell.com>

	Merge from trunk:

	Bug 314084 - GTK+ dialogs should not be placed partially offscreen

	* gtk/gtkwindow.c (clamp): New function. Clamps a window position
	in one dimension, or centered in case it doesn't fit.
	(clamp_window_to_rectangle): Simplify. Call clamp() for x and y
	dimensions.


svn path=/branches/gtk-2-12/; revision=20268
2008-06-02 11:08:54 +00:00
Johan Dahlin 588158cefa Revert #529535, it broke the build
svn path=/branches/gtk-2-12/; revision=20260
2008-05-30 16:11:01 +00:00
Johan Dahlin 0f72cd6f8d Merge from trunk:
2008-05-25  Johan Dahlin  <johan@gnome.org>

    Merge from trunk:

    Bug 534694 – Col id in GtkListStore could be out of range

    * gtk/gtkliststore.c (list_store_start_element): Fix up error handling
    a bit. Pointed out by Jan Arne Petersen.


svn path=/branches/gtk-2-12/; revision=20253
2008-05-30 11:08:37 +00:00
Johan Dahlin 2f5d836635 Merge from trunk:
2008-05-25  Johan Dahlin  <johan@gnome.org>

    Merge from trunk:

    * gtk/gtkliststore.c: (list_store_text): Use type of the correct
    column (#529535).
    * tests/buildertest.c: (test_list_store): Add test.


svn path=/branches/gtk-2-12/; revision=20252
2008-05-30 11:04:30 +00:00
Tor Lillqvist 3b3bf93279 Bug 533108 - leak of GDI region in function 'handle_wm_paint'
2008-05-30  Tor Lillqvist  <tml@novell.com>

	Bug 533108 - leak of GDI region in function 'handle_wm_paint'

	* gdk/win32/gdkevents-win32.c (handle_wm_paint): Patch by Daniel
	Atallah.


svn path=/branches/gtk-2-12/; revision=20249
2008-05-30 07:15:51 +00:00
Kristian Rietveld 85dc52fcec Merge from trunk:
2008-05-28  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	Bug 449625 - crash in gtk_tree_view_real_move_cursor at
	gtktreeview.c:9641

	* gtk/gtktreeview.c (gtk_tree_view_move_cursor_page_up_down):
	cursor_offset *must* be larger than background height of the cursor
	node, not just equal otherwise there is no guarantee there is a next
	node.


svn path=/branches/gtk-2-12/; revision=20220
2008-05-28 14:49:00 +00:00
Kristian Rietveld 36d1dfff9b Merge from trunk:
2008-05-28  Kristian Rietveld  <kris@imendio.com>

	Merge from trunk:

	Bug 504087 - make gtk_tooltip_set_custom a no-op for setting the
	current widget again.

	* gtk/gtktooltip.c (gtk_tooltip_set_custom),
	(gtk_tooltip_reset), (gtk_tooltip_run_requery): use a
	custom_was_reset field to check if the custom widget is set again in
	the query-tooltip callback; if not, we set it to NULL.  Based on a
	patch by Xavier Claessens, insightful comments from Jean-Yves Lefort
	and Christian Persch.


svn path=/branches/gtk-2-12/; revision=20216
2008-05-28 14:00:42 +00:00
Federico Mena Quintero dda04e8b56 bgo533891 - disallow DnD from the file list into itself
2008-05-27  Federico Mena Quintero  <federico@novell.com>

	Merged from trunk:

	http://bugzilla.gnome.org/show_bug.cgi?id=533891 - Don't allow
	drag and drop from the file list into itself, as it doesn't make
	sense (it would just change the current folder).

	* gtk/gtkfilechooserdefault.c (file_list_dest_targets): Use
	GTK_TARGET_OTHER_WIDGET so we don't DnD from the file list into

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

svn path=/branches/gtk-2-12/; revision=20195
2008-05-27 20:41:44 +00:00
Priit Laes f9995755b7 Translation updated by Ivar Smolin
2008-05-25  Priit Laes  <plaes at svn dot gnome dot org>

	* et.po: Translation updated by Ivar Smolin

svn path=/branches/gtk-2-12/; revision=20155
2008-05-25 18:24:21 +00:00
Tor Lillqvist 9a677f24ac Style
svn path=/branches/gtk-2-12/; revision=20106
2008-05-13 08:50:56 +00:00
Tor Lillqvist d947b6b5dc Typo.
svn path=/branches/gtk-2-12/; revision=20103
2008-05-13 08:44:35 +00:00
Tor Lillqvist a797222ec2 Bug 496958 - Wacom Bamboo Doesn't Function with GTK apps in Win32
2008-05-13  Tor Lillqvist  <tml@novell.com>

	Bug 496958 - Wacom Bamboo Doesn't Function with GTK apps in Win32

	* gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Set
	the "packet rate" of devices to zero instead of 50. This is
	reported to help significantly with Wacom tablet behaviour in GIMP
	and Inkscape. Patch from Thomas Bleeker.


svn path=/branches/gtk-2-12/; revision=20102
2008-05-13 08:44:00 +00:00
Tor Lillqvist 31bd06846b Bug 532558 - Cannot build dll when using separate builddir
2008-05-12  Tor Lillqvist  <tml@novell.com>

	Bug 532558 - Cannot build dll when using separate builddir

	* gdk/Makefile.am
	* gtk/Makefile.am: .def file belongs in $(srcdir). Patch by Marko
	Lindqvist.


svn path=/branches/gtk-2-12/; revision=20099
2008-05-12 08:51:57 +00:00
Tor Lillqvist 038e15813a Bug 532558 - Cannot build dll when using separate builddir
2008-05-12  Tor Lillqvist  <tml@novell.com>

	Bug 532558 - Cannot build dll when using separate builddir

	* Makefile.am: .def file belongs in $(srcdir). Patch by Marko
	Lindqvist.


svn path=/branches/gtk-2-12/; revision=20098
2008-05-12 08:50:36 +00:00
Tor Lillqvist 24333b6835 Bug 532059 - Leak in win32 clipboard manipulation
2008-05-12  Tor Lillqvist  <tml@novell.com>

	Bug 532059 - Leak in win32 clipboard manipulation

	* gdk/win32/gdkselection-win32.c
	(gdk_win32_selection_add_targets): Plug memory leak. Patch by
	Daniel Atallah.


svn path=/branches/gtk-2-12/; revision=20094
2008-05-12 07:07:48 +00:00
Tor Lillqvist 25f6b3d71e Add more man pages to the dev zipfile.
2008-05-07  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: Add more man pages to the dev zipfile.


svn path=/branches/gtk-2-12/; revision=20093
2008-05-12 07:07:22 +00:00
Gabor Kelemen 94f3e4c6a2 Translation updated.
2008-05-09  Gabor Kelemen  <kelemeng@gnome.org>

	* hu.po: Translation updated.

svn path=/branches/gtk-2-12/; revision=20088
2008-05-09 21:46:40 +00:00
Tor Lillqvist d84ecfebe0 Add gtk-update-icon-cache.exe to the dev zipfile.
2008-05-07  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: Add gtk-update-icon-cache.exe to the dev zipfile.


svn path=/branches/gtk-2-12/; revision=20081
2008-05-07 08:55:39 +00:00
Richard Hult d15e6d1564 Revert this commit from 2008-05-01, as it requires more changes to work
2008-05-04  Richard Hult  <richard@imendio.com>

	Revert this commit from 2008-05-01, as it requires more changes to
	work completely:

	* gdk/quartz/gdkevents-quartz.c:
	(get_keyboard_modifiers_from_ns_event), (create_key_event): Map
	Alt to Alt and Cmd to Meta. This is not only more logical but also
	makes it easier to have Mac-like behavior.

svn path=/branches/gtk-2-12/; revision=20073
2008-05-04 20:14:22 +00:00
Richard Hult db3e94e7e5 Merged from trunk:
2008-05-04  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkkeys-quartz.c (maybe_update_keymap): Check if
	gdk_unicode_to_keyval() worked before using the result. Makes
	function keys work, bug #530156. Also add F16 to the function key
	map.

svn path=/branches/gtk-2-12/; revision=20072
2008-05-04 15:16:35 +00:00
Richard Hult c2b0b603a8 Merged from trunk:
2008-05-04  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkkeys-quartz.c (maybe_update_keymap): Remove stray
	semicolon after if statement. Fixes bug #530963, patch from Yevgen
	Muntyan.

svn path=/branches/gtk-2-12/; revision=20070
2008-05-04 15:09:20 +00:00
Richard Hult b0cd81b0be Merged from trunk:
2008-05-01  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gtk/gtkquartz.c (_gtk_quartz_set_selection_data_for_pasteboard):
	Prevent crash, fixes bug #530153. Patch from Yevgen Muntyan.

svn path=/branches/gtk-2-12/; revision=20065
2008-05-01 20:30:50 +00:00
Richard Hult b03345022a Merged from trunk:
2008-05-01  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c: (_gdk_events_queue): Don't send
	nsevents with the gdk lock held, fixes deadlock when doing manual
	window resizing with threading enabled.

svn path=/branches/gtk-2-12/; revision=20063
2008-05-01 19:14:18 +00:00
Richard Hult 03d6aa295c Merged from trunk:
2008-05-01  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c:
	(get_keyboard_modifiers_from_ns_event), (create_key_event): Map
	Alt to Alt and Cmd to Meta. This is not only more logical but also
	makes it easier to have Mac-like behavior.

svn path=/branches/gtk-2-12/; revision=20062
2008-05-01 19:12:48 +00:00
Matthias Clasen cec947fed4 Register the right translation domain.
* modules/imput/imthai.c: Register the right translation domain.


svn path=/branches/gtk-2-12/; revision=20061
2008-05-01 14:31:57 +00:00
Matthias Clasen 83feff9fb9 Bug 529386 – Printing options hidden by blacklisted option
* modules/printbackend/cups/gtkprintbackendcups.c
        (cups_printer_get_options): Fix the blacklist handling.
        Patch by Marek Kašík.



svn path=/branches/gtk-2-12/; revision=20059
2008-05-01 00:39:29 +00:00
Hans Breuer 2897be9c73 reverted unintentional commit from revision 19994
2008-04-20  Hans Breuer  <hans@breuer.org>

	* demos/gtk-demo/printing.c gtk/gtkprintoperation-win32.c
	  tests/simple.c : reverted unintentional commit from revision 19994

	* gdk/makefile.msc : define WTKIT if not done before

	* gtk/gtkfilechooserdefault.c : #include <locale.h> for LC_ALL


svn path=/branches/gtk-2-12/; revision=20030
2008-04-20 21:16:08 +00:00
Matthias Clasen 5e941b85e2 Sync xdgmime to the copy in gio.
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        * Sync xdgmime to the copy in gio.



svn path=/branches/gtk-2-12/; revision=20014
2008-04-17 00:07:58 +00:00
Matthias Clasen 1e5a8ff4b1 Partically revert the last commit after realizing that
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Partically revert the last commit after realizing that
        xdg_mime_media_type_equal doesn't have to init at all.

        * xdgmime.h:
        * xdgmime.c: Get rid of _xdg_mime_media_type_equal

        * xdgmimecache.c: Use xdg_mime_media_type_equal


svn path=/branches/gtk-2-12/; revision=20012
2008-04-16 17:26:01 +00:00
Matthias Clasen 6c5da8ef45 Avoid possible memory corruption in xdgmime, fd.o bug 12512, reported by
2008-04-16  Matthias Clasen  <mclasen@redhat.com>

        Avoid possible memory corruption in xdgmime, fd.o bug 12512,
        reported by Joe Shaw and Federico Mena Quintero.

        * xdgmime.c(_xdg_mime_media_type_equal): Implement.
        (xdg_mime_media_type_equal): Turn into a wrapper around the
        _-prefixed version.

        * xdgmimecache.c: Use the _-prefixed versions of
        comparison functions throughout.


svn path=/branches/gtk-2-12/; revision=20010
2008-04-16 17:00:59 +00:00
Carlos Garnacho c7fb1425a5 2008-04-11 Carlos Garnacho <carlos@imendio.com>D:ChangeLog
* gtk/gtkassistant.c (gtk_assistant_set_current_page): Add current
        page to visited page list instead of next current page. (#527466,
        patch by Marcus Brinkmann)


svn path=/branches/gtk-2-12/; revision=19997
2008-04-11 17:09:48 +00:00
Cody Russell 303ad1b982 Move my documentation changelog entries to the right changelog.
svn path=/branches/gtk-2-12/; revision=19994
2008-04-11 13:51:11 +00:00
Cody Russell e28b96327d Fix to say g_signal_connect_after rather than g_signal_register_after.
2008-04-10  Cody Russell  <bratsche@gnome.org>

        * docs/reference/gdk/tmpl/windows.sgml: Fix to say
        g_signal_connect_after rather than g_signal_register_after.
        (reported by Guillaume Cottenceau)


svn path=/branches/gtk-2-12/; revision=19992
2008-04-10 21:11:36 +00:00
Cody Russell 2570c46f89 Fix a typo in the markup. (reported by kraai -at- ftbfs.org)
2008-04-10  Cody Russell  <bratsche@gnome.org>

        * docs/reference/gtk/tmpl/gtktreeview.sgml: Fix a typo
        in the markup. (reported by kraai -at- ftbfs.org)


svn path=/branches/gtk-2-12/; revision=19990
2008-04-10 21:03:07 +00:00
Carlos Garnacho 12a70a1c88 Do not call gtk_widget_set_parent_window(), using widget->window instead
2008-04-10  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtknotebook.c (hide_drag_window): Do not call
        gtk_widget_set_parent_window(), using widget->window instead of NULL
        to unset is the wrong thing, and gtk_widget_unparent() will already 
        take care of this (#467698, patch by Sébastien Granjoux)


svn path=/branches/gtk-2-12/; revision=19988
2008-04-10 17:17:44 +00:00
Marcel Telka 11bcc14b56 Updated Slovak translation by Pavol Šimo.
2008-04-08  Marcel Telka  <marcel@telka.sk>

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

svn path=/branches/gtk-2-12/; revision=19986
2008-04-08 14:07:24 +00:00
Tor Lillqvist 36491a2d6b Mark these functions with G_MODULE_EXPORT.
2008-04-08  Tor Lillqvist  <tml@novell.com>

	* demos/gtk-demo/builder.c (quit_activate, about_activate): Mark
	these functions with G_MODULE_EXPORT.


svn path=/branches/gtk-2-12/; revision=19984
2008-04-08 14:01:46 +00:00
Tomas Bzatek ce627a575e Fix fallback icon rendering size
2008-04-08  Tomas Bzatek  <tbzatek@redhat.com> 

        * gtk/gtkfilesystem.c: (gtk_file_info_render_icon),
        (gtk_file_system_volume_render_icon):
        Fix fallback icon rendering size


svn path=/branches/gtk-2-12/; revision=19983
2008-04-08 13:59:47 +00:00
Alberto Ruiz d9cf92fe9d Merged from trunk:
2008-04-07  Alberto Ruiz  <aruiz@gnome.org>

	Merged from trunk:

	* gtk/gtkcombobox.c: (gtk_combo_box_size_allocate) The child is now aware of
	both the combobox and frame (if has-frame is set) thickness andd border.
	(bug #521442)


svn path=/branches/gtk-2-12/; revision=19980
2008-04-07 22:38:43 +00:00
Alberto Ruiz bf3cce478c Merged from trunk:
2008-04-07  Alberto Ruiz  <aruiz@gnome.org>

	Merged from trunk:

	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc:
	* modules/engines/ms-windows/msw_style.c (draw_box) (draw_arrow)
	(combo_box_draw_arrow) (setup_msw_rc_style): draw box does more intelligent
	separation for the xp theming engine and the classic theme while drawing the
	GtkComboBox button. combobox_draw_arrow is not used	anymore, commented.
	The style has been updated to fix border/thickness glitches in the combobox
	according to the fixes commited	regarding bug	#521442. (bug	#461805)


svn path=/branches/gtk-2-12/; revision=19979
2008-04-07 22:36:17 +00:00
Luca Ferretti 4f1acaaee6 Fixed minor typos.
2008-04-04  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Fixed minor typos.

svn path=/branches/gtk-2-12/; revision=19977
2008-04-04 20:01:01 +00:00
Tor Lillqvist 53e2422ee2 Bug 330743 - Up/down spinbuttons won't take zeros and exhibit very strange
2008-04-03  Tor Lillqvist  <tml@novell.com>

	Bug 330743 - Up/down spinbuttons won't take zeros and exhibit very
	strange behavior

	* gtk/gtkspinbutton.c (gtk_spin_button_insert_text) [Win32]: Add
	workaround for a specific kind of screwed up locale setting.


svn path=/branches/gtk-2-12/; revision=19973
2008-04-03 12:45:42 +00:00
Jordi Mallach ab22e08d0f Add Valencian-Catalan translation to gtk+-2.12 branch.
svn path=/branches/gtk-2-12/; revision=19971
2008-04-03 10:58:25 +00:00
Matthias Clasen f141c611fa Don't call XFreeColormap on foreign colormaps. Found by Daniel Berrange.
2008-04-02  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkcolor-x11.c: Don't call XFreeColormap on foreign
        colormaps.  Found by Daniel Berrange.



svn path=/branches/gtk-2-12/; revision=19970
2008-04-03 05:11:06 +00:00
Matej Urbančič d148bc6164 Updated Slovenian translation
svn path=/branches/gtk-2-12/; revision=19966
2008-04-02 16:56:17 +00:00
Matej Urbančič 3eee4bb63d Updated Slovenian translation
svn path=/branches/gtk-2-12/; revision=19965
2008-04-02 16:53:59 +00:00
Federico Mena Quintero 4107a925ce bgo492134 - fix tilde expansion in GtkFileSystemUnix
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/branches/gtk-2-12/; revision=19964
2008-04-02 16:53:07 +00:00
Matej Urbančič f045a8df05 Updated Slovenian translation
svn path=/branches/gtk-2-12/; revision=19963
2008-04-02 16:51:53 +00:00
Matej Urbančič 1901be48e7 Updated Slovenian translation
svn path=/branches/gtk-2-12/; revision=19961
2008-04-02 16:47:18 +00:00
Tor Lillqvist efd485faad Don't bother compiling gtksearchenginebeagle.c and
2008-04-02  Tor Lillqvist  <tml@novell.com>

	* gtk/Makefile.am: Don't bother compiling gtksearchenginebeagle.c
	and gtksearchenginetracker.c on Windows.

	* gtk/gtksearchengine.c: Don't define HAVE_BEAGLE and HAVE_TRACKER
	on Windows.


svn path=/branches/gtk-2-12/; revision=19960
2008-04-02 10:24:42 +00:00
Petr Kovář b7a7f4fb87 cs.po: Updated Czech translation.
svn path=/branches/gtk-2-12/; revision=19957
2008-04-02 00:01:22 +00:00
Richard Hult eedd9aca54 Merged from trunk:
2008-04-01  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c: (gdk_event_translate),
	(_gdk_quartz_events_trigger_crossing_events): Defer the generated
	event to the mainloop and don't generate one at all if the
	toplevel didn't change. Use the actual window and not the toplevel
	as event window. These changes make the generated crossing events
	match the X11 behavior and fixes issues with e.g. tooltips,
	comboboxes and menus.

	* gdk/quartz/GdkQuartzView.c: Don't update the tracking rect if
	the view has no window, it will be updated as soon as it's put
	inside a window.

	* gdk/quartz/gdkwindow-quartz.c:
	(_gdk_quartz_window_debug_highlight): Make it possible to track
	multiple windows with debug highlighting.
	(show_window_internal): Remove workaround for tooltips and popups
	that is no longer needed with the above changes.

svn path=/branches/gtk-2-12/; revision=19954
2008-04-01 11:20:25 +00:00
Cody Russell f45b12831b Merged from trunk:
2008-03-31  Cody Russell  <bratsche@gnome.org>

        Merged from trunk:

        * demos/gtk-demo/printing.c (draw_page): Move down each line in
        units of text_height rather than in units of data->font_size.
        (totally awesome catch by Dom Lachowicz)


svn path=/branches/gtk-2-12/; revision=19953
2008-03-31 21:47:57 +00:00
Tor Lillqvist a3a986f376 Bug 524862 - Using GTK_WIN_POS_CENTER_ALWAYS gives jerky window resizing
2008-03-30  Tor Lillqvist  <tml@novell.com>

	Bug 524862 - Using GTK_WIN_POS_CENTER_ALWAYS gives jerky window
	resizing in Win32

	* gtk/tmpl/gtkenums.sgml: Recommend that GTK_WIN_POS_CENTER_ALWAYS
	is not used.


svn path=/branches/gtk-2-12/; revision=19949
2008-03-30 02:32:06 +00:00
Jovan Naumovski a9a93701fe 2008-03-29 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/branches/gtk-2-12/; revision=19946
2008-03-29 21:08:03 +00:00
Hendrik Richter fc13cd5ca3 Updated German translation, fix #524115.
2008-03-29  Hendrik Richter  <hendrikr@gnome.org>

	* de.po: Updated German translation, fix #524115.

svn path=/branches/gtk-2-12/; revision=19945
2008-03-29 18:43:02 +00:00
Tor Lillqvist 112933a0a8 Bug 524422 - assertion when filechooser current name set to string
2008-03-28  Tor Lillqvist  <tml@novell.com>

	Bug 524422 - assertion when filechooser current name set to string
	containing disallowed characters

	* gtk/gtkfilechooserentry.c (check_completion_callback): Patch by
	Daniel Atallah.


svn path=/branches/gtk-2-12/; revision=19941
2008-03-28 16:26:35 +00:00
Nguyễn Thái Ngọc Duy 7c6054c8f6 Update Vietnamese translation
2008-03-27  Nguyễn Thái Ngọc Duy <pclouds@gmail.com>

	* vi.po: Update Vietnamese translation


svn path=/branches/gtk-2-12/; revision=19939
2008-03-27 13:32:49 +00:00
Richard Hult 1441b7ac88 Merged from trunk:
2008-03-25  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkevents-quartz.c:
	(_gdk_quartz_events_trigger_crossing_events): Bail out early if we
	can't find a matching window.

	* gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Add a
	comment, and only trigger an event for non-temp windows, fixes
	problems for tooltips caused by the workarounds for the
	problematic tracking rect API.

svn path=/branches/gtk-2-12/; revision=19936
2008-03-25 14:21:45 +00:00
Richard Hult 8978c69794 Merged from trunk:
2008-03-25  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c:
	(gdk_window_quartz_process_all_updates): Plug a leak and add a
	check that we have a toplevel before accessing it.

2008-03-25  Richard Hult  <richard@imendio.com>

	Merged from trunk:

	* gdk/quartz/gdkwindow-quartz.c:
	(gdk_window_quartz_process_all_updates): Patch from Paul Davis,
	only flush the toplevel once per update.

svn path=/branches/gtk-2-12/; revision=19935
2008-03-25 13:56:46 +00:00
Tor Lillqvist aff352be5a Bug 524151 - Dragging of 0-byte files results in an empty filename on
2008-03-24  Tor Lillqvist  <tml@novell.com>

	Bug 524151 - Dragging of 0-byte files results in an empty filename
	on Windows XP and above

	* gdk/win32/gdkdnd-win32.c (resolve_link): Check for the file
	being empty first. For some reason ISHellLink and IPersistFile
	succeeds in interpreting empty files as shortcuts, claiming the
	target of the shortcut is an empty path.

	Change the function to take the wide character file name that the
	caller already has anyway, to avoid a superfluous conversion from
	UTF-8 to UTF-16.


svn path=/branches/gtk-2-12/; revision=19932
2008-03-24 17:39:26 +00:00
Cody Russell da3eaddf31 Merged from trunk:
2008-03-23  Cody Russell  <bratsche@gnome.org>

	Merged from trunk:

        * gdk/win32/gdkevents-win32.c (show_window_recurse):
        Check window state for GDK_WINDOW_STATE_ICONIFIED before doing
        ShowWindow (SW_RESTORE).  This fixes a problem where tearing off
        menus from a maximized window would force the window to restore
        its size. (#518846)


svn path=/branches/gtk-2-12/; revision=19927
2008-03-23 15:38:50 +00:00
Johan Dahlin bfaa163449 Merged from trunk:
2008-03-23  Johan Dahlin  <johan@gnome.org>

        Merged from trunk:

        * gtk/gtk-builder-convert:
        Properly convert GtkImageMenuItems which use stock labels but don't
        have any children.
        (#523932, Brian Pepple)


svn path=/branches/gtk-2-12/; revision=19925
2008-03-23 08:22:14 +00:00
Tor Lillqvist 7689a9cd75 Bug 523782 - Leftover call to GDK_THREADS_LEAVE() in gtktoolbar.c
2008-03-22  Tor Lillqvist  <tml@novell.com>

	Bug 523782 - Leftover call to GDK_THREADS_LEAVE() in gtktoolbar.c

	* gtk/gtktoolbar.c (slide_idle_handler): Remove obviously wrong
	GDK_THREADS_LEAVE() call. Approved by mclasen.


svn path=/branches/gtk-2-12/; revision=19921
2008-03-22 09:02:40 +00:00
Duarte Loreto f4f85430d6 Updated Portuguese translation.
2008-03-21  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Updated Portuguese translation.

svn path=/branches/gtk-2-12/; revision=19919
2008-03-21 20:55:56 +00:00
Laurent Dhima 33133a94a6 Updated Albanian translation.
svn path=/branches/gtk-2-12/; revision=19912
2008-03-20 11:53:32 +00:00
Laurent Dhima 938a8ff8bc Updated Translation
svn path=/branches/gtk-2-12/; revision=19910
2008-03-20 11:01:13 +00:00
Vladimer Sichinava 614c41482e Updated Georgian translation
svn path=/branches/gtk-2-12/; revision=19906
2008-03-19 21:09:14 +00:00
Vladimer Sichinava 55b0c99e50 Updated Georgian translation
svn path=/branches/gtk-2-12/; revision=19904
2008-03-19 21:01:27 +00:00
Kostas Papadimas 1ea77f98ae Updated Greek translation
svn path=/branches/gtk-2-12/; revision=19901
2008-03-18 18:58:39 +00:00
Laurent Dhima 1b3d68b259 Updated Albanian translation.
svn path=/branches/gtk-2-12/; revision=19899
2008-03-18 15:34:29 +00:00
Yang Zhang e6e9857d5d Updated zh_CN translation
svn path=/branches/gtk-2-12/; revision=19891
2008-03-17 04:12:01 +00:00
Ihar Hrachyshka 635ae20cd8 Updated Belarusian Latin translation.
svn path=/branches/gtk-2-12/; revision=19889
2008-03-16 10:35:43 +00:00
Changwoo Ryu a74dfbde33 Updated Korean translation.
svn path=/branches/gtk-2-12/; revision=19882
2008-03-15 05:32:01 +00:00
Matthias Clasen 2941a61e2e Set window type hint on the search popup. (#522279, Danny Baumann)
2008-03-15  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_ensure_interactive_directory):
        Set window type hint on the search popup.  (#522279, Danny Baumann)



svn path=/branches/gtk-2-12/; revision=19881
2008-03-15 04:53:03 +00:00
Matthias Clasen c0073fe550 Emit preedit_start/_end as appropriate. (#521934, Huang Peng)
2008-03-15  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkimcontextsimple.c: Emit preedit_start/_end as
        appropriate.  (#521934, Huang Peng)



svn path=/branches/gtk-2-12/; revision=19879
2008-03-15 04:32:08 +00:00
Claude Paroz a008f1b30d Updated French translation.
2008-03-14  Claude Paroz  <claude@2xlibre.net>

	* fr.po: Updated French translation.

svn path=/branches/gtk-2-12/; revision=19873
2008-03-14 12:40:12 +00:00
Sven Neumann 80a96aca60 Merged from trunk:
2008-03-13  Sven Neumann  <sven@gimp.org>

	Merged from trunk:

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkprintunixdialog.c: set alternative button order for
	overwrite confirmation dialogs (bug #522191).

svn path=/branches/gtk-2-12/; revision=19867
2008-03-13 14:10:09 +00:00
Jonh Wendell S. Santana 17336bc839 minor update in pt_BR language
svn path=/branches/gtk-2-12/; revision=19865
2008-03-13 13:04:29 +00:00
Luca Ferretti 1397596de7 Updated Italian translation.
2008-03-13  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.


svn path=/branches/gtk-2-12/; revision=19864
2008-03-13 10:42:56 +00:00
Sven Neumann 48f6bb1a78 Merged from trunk:
2008-03-13  Sven Neumann  <sven@gimp.org>

	Merged from trunk:

	* gtk/gtkprintunixdialog.c (add_custom_button_to_dialog)
	(overwrite_confirmation_dialog): added some line-breaks for
	readability.

svn path=/branches/gtk-2-12/; revision=19863
2008-03-13 09:24:11 +00:00
Timo Jyrinki e855e03e46 fix fuzzy
svn path=/branches/gtk-2-12/; revision=19861
2008-03-13 05:38:50 +00:00
Gintautas Miliauskas 84536cf68e Updated Lithuanian translation.
2008-03-12  Gintautas Miliauskas  <gintas@akl.lt>

	* lt.po: Updated Lithuanian translation.


svn path=/branches/gtk-2-12/; revision=19797
2008-03-12 21:44:02 +00:00
Marcel Telka fc438198f0 Updated Slovak translation by Pavol Šimo.
2008-03-12  Marcel Telka  <marcel@telka.sk>

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

svn path=/branches/gtk-2-12/; revision=19796
2008-03-12 20:50:04 +00:00
Gil Forcada Codinachs 6381413650 Updated Catalan translation by David Planella
svn path=/branches/gtk-2-12/; revision=19794
2008-03-12 20:02:03 +00:00
Jens Granseuer be7d2921da Merged from trunk:
2008-03-12  Jens Granseuer  <jensgr@gmx.net>

	Merged from trunk:

        * modules/printbackends/cups/gtkprintbackendcups.c:
        (cups_printer_prepare_for_print): Don't define variables in the
        middle of a block. (#522067)

svn path=/branches/gtk-2-12/; revision=19790
2008-03-12 18:39:26 +00:00
Matthias Clasen 155f81666f Add an overwrite confirmation dialog for print-to-file. (#474302, Marek
2008-03-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintunixdialog.c: Add an overwrite confirmation
        dialog for print-to-file.  (#474302, Marek Kašík)


svn path=/branches/gtk-2-12/; revision=19788
2008-03-12 18:06:03 +00:00
Sebastian Dröge 02030f4f26 Merged from trunk: Include <glib/gstdio.h> for g_fopen().
Merged from trunk:
* modules/printbackends/cups/gtkprintbackendcups.c: Include
<glib/gstdio.h> for g_fopen().

svn path=/branches/gtk-2-12/; revision=19785
2008-03-12 17:52:32 +00:00
Daniel Nylander 41f1c60ee9 sv.po: Updated Swedish translation
svn path=/branches/gtk-2-12/; revision=19784
2008-03-12 17:04:12 +00:00
Matthias Clasen 269804ecbf Don't leak paper_size here. (#488820, Morten Welinder)
2008-03-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkpagesetup.c (gtk_page_setup_copy): Don't leak
        paper_size here.  (#488820, Morten Welinder)


svn path=/branches/gtk-2-12/; revision=19783
2008-03-12 16:40:51 +00:00
Wouter Bolsterlee d9be014869 Updated Dutch translation by Wouter Bolsterlee.
2008-03-12  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* nl.po: Updated Dutch translation by Wouter Bolsterlee.


svn path=/branches/gtk-2-12/; revision=19780
2008-03-12 14:56:56 +00:00
Takeshi AIHANA 63e0207772 Updated Japanese translation.
2008-03-12  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/branches/gtk-2-12/; revision=19778
2008-03-12 13:26:11 +00:00
Andre Klapper 2eaef04711 Updated German translation
2008-03-12  Andre Klapper  <a9016009@gmx.de>

	* de.po: Updated German translation


svn path=/branches/gtk-2-12/; revision=19777
2008-03-12 12:36:39 +00:00
Inaki Larranaga Murgoitio ae7c8f7f6f Updated Basque translation.
2008-03-12  Inaki Larranaga Murgoitio  <dooteo@euskalgnu.org>

	* eu.po: Updated Basque translation.


svn path=/branches/gtk-2-12/; revision=19776
2008-03-12 12:04:00 +00:00
Jorge Gonzalez Gonzalez d107e53764 Updated Spanish translation
svn path=/branches/gtk-2-12/; revision=19774
2008-03-12 10:37:05 +00:00
Tor Lillqvist c8bbc34461 Bug 520286 - Non-deletable window has no minimize / maximize buttons
2008-03-12  Tor Lillqvist  <tml@novell.com>

	Bug 520286 - Non-deletable window has no minimize / maximize buttons

	* gdk/win32/gdkmain-win32.c (_gdk_win32_window_style_to_string):
	New debugging output function that decodes a set of WS_* bits.

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

	* gdk/win32/gdkwindow-win32.c (update_single_system_menu_entry):
	New function that enables or disables one menu entry in the system
	menu of a top-level window. (The corresponding decoration will
	then also be enabled or disabled (grayed).)

	(update_style_bits): Do as the comment says and don't try to
	update the window style based on the GdkWMFunctions set for the
	window.
		   
	(update_system_menu): New function that enables or disables the
	system menu entries based on a window's stored set of
	GdkWMFunctions.

	(gdk_window_set_functions): Call update_system_menu() instead of
	update_style_bits().


svn path=/branches/gtk-2-12/; revision=19773
2008-03-12 10:32:31 +00:00
Ignacio Casal Quinteiro af6fbfc5f1 Updated Galician Translation.
svn path=/branches/gtk-2-12/; revision=19772
2008-03-12 09:55:27 +00:00
Sunil Mohan Adapa 46a24bfce6 Updated Telugu traslation done by Krishna Babu K <kkrothap@redhat.com>.
2008-03-12  Sunil Mohan Adapa  <sunilmohan@fsf.org.in>

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


svn path=/branches/gtk-2-12/; revision=19771
2008-03-12 08:33:12 +00:00
Philip Withnall 5da0096ce7 Updated British English translation.
2008-03-12  Philip Withnall  <pwithnall@svn.gnome.org>

	* en_GB.po: Updated British English translation.


svn path=/branches/gtk-2-12/; revision=19770
2008-03-12 07:38:39 +00:00
Matthias Clasen ebb2e413fb Bump version
svn path=/branches/gtk-2-12/; revision=19768
2008-03-12 06:12:10 +00:00
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
367 changed files with 103590 additions and 85491 deletions
+2297
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.12 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.12.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.12.12 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK+
[ Become root if necessary ]
+372
View File
@@ -1,3 +1,375 @@
Overview of Changes from GTK+ 2.12.11 to 2.12.12
================================================
* Bugs fixed:
539164 Windows' System Menu blocks main loop
540861 invalid UTF-8 in input device name
540994 Some windows don't appear at the top when created
541964 Setting modal hint to current value might confuse the stack
541399 Widget tooltips: treat "" same as NULL
520165 typeahead find (interactive search) only accepts one character
528975 Can not maximize the window
541950 Removing recently-added accelerator UI causes a wrong g_warning
545931 small documentation typos
538686 gtkprintoperation-win32.c: devmode_from_settings
538863 Fixes assertion on entering empty folder
541645 gtkfilechooserdefault segfaults when bookmark does not contain ://
528845 segv from GtkBuilder on attempting <accelerator> under GtkCellView
479780 Bookmarks in left pane of FileChooser cannot be renamed
542523 GtkTextTag should handle setting properties to NULL
543545 GtkAssistant crashes when gtk_widget_hide() is called inside...
545875 evo crashed when trying to print pages 6-7 of a 1 page email
549354 Crash trying to open a file on a remote folder
549810 Memory leaks in printing code
550528 IconView DND interface does not work if only used as source
319849 gtkcalendar look in RTL locales
551699 gtk_scrolled_window_destroy() is broken
551567 DND mark broken
551378 Print dialog: should try UDS when fetching PPD for localhost
532644 TIFF loader need to exclude CR2 files
549711 Race condition when loading gdk-pixbuf image modules
517233 Calling gdk_pixbuf_loader_close causes "GError set over the top...
* Updated translations:
Assamese (as)
Czech (cs)
Spanish (es)
Italian (it)
Japanese (ja)
Russian (ru)
Overview of Changes from GTK+ 2.12.10 to 2.12.11
================================================
* Bugs fixed:
536757 regression: openoffice.org menus are placed at wrong
position since 2.12.10
536990 updateiconcache.c: 'close ()' is redundant
508751 gnome-terminal crashed with SIGSEGV after keypress
419737 The file chooser clears the filename entry in SAVE/CREATE_FOLDER
modes when it shouldn't.
538784 Don't change the filename in the name entry in CREATE_FOLDER mode
when changing folders
536966 Paper selector crashes
352738 gtk_tree_view_column_set_sort_indicator() fails to show a...
378158 gdk_win32_selection_add_targets uses uninitialized hwnd v...
537685 print to file crashes when the target can not be written
* Updated translations:
Assamese (as)
Catalan (ca)
French (fr)
Hungarian (hu)
Brazilian Portugese (pt_BR)
Swedish (sv)
Vietnamese (vi)
Overview of Changes from GTK+ 2.12.9 to 2.12.10
===============================================
* Bugs fixed:
523782 Leftover call to GDK_THREADS_LEAVE() in gtktoolbar.c
524151 Dragging of 0-byte files results in an empty filename...
524422 assertion when filechooser current name set to string...
492134 The file chooser incorrectly substitutes and expands...
330743 Up/down spinbuttons won't take zeros and exhibit very...
529386 Printing options hidden by blacklisted option
532059 Leak in win32 clipboard manipulation
532558 Cannot build dll when using separate builddir
496958 Wacom Bamboo doesn't function with GTK apps in Win32
533891 Don't allow drag and drop from the file list into itself...
504087 make gtk_tooltip_set_custom a no-op for setting the...
449625 crash in gtk_tree_view_real_move_cursor
533108 leak of GDI region in function 'handle_wm_paint'
534694 Col id in GtkListStore could be out of range
314084 GTK+ dialogs should not be placed partially offscreen
529841 incorrect position in directfb
387972 gtkassistant drawing problem
534463 non-editable GtkTextView should not call gtk_im_context_focus_in...
522269 Evince windows sometimes incorrectly unmaximized...
524110 Gdk should not assume reparenting WMs...
523562 gtk-update-icon-cache core dumps when run concurrently...
531008 Crash in gtkprintunixdialog.c
106574 Inconsistent increment behavior for gtkspinbutton
511217 potential memory corruption after refreshing a tree_view
56355 GtkLabel - Not all changes propagate correctly
530146 Setting non-string tooltip with gtk_tree_view_set_tooltip_column...
535862 gtk_action_create_icon can't create icons from the icon themes...
536092 GtkEntryCompletion's popup window should set type hint
532558 Cannot build dll when using separate builddir
535453 gdk_pixbuf_format_get_license returns NULL for any loaders
524862 Using GTK_WIN_POS_CENTER_ALWAYS gives jerky window resizing
467698 crash because realizing a widget with NULL colormap
526422 Crash in location_toggle_popup_handler
474302 printing to an existing file overwrites without confirmation
137717 Gtk+ filechooser should allow drag-n-drop of files in the...
461805 The combo cell renderer is broken theme wise
479197 Tries to search with tracker while it is uninstalled
488820 gtk_page_setup_copy leaks
518846 Restore toplevel maximized window
520286 Non-deletable window has no minimize / maximize buttons.
521442 x/y thickness is being overriden by the combobox realize ...
521934 GtkIMSimpleContext does not send preedit_start and preedi...
522067 compile error
522191 overwrite-confirmation dialogs don't set alternative butt...
522279 GtkTreeView should set type hint for search dialog
523932 gtk-builder-convert failed on converting GLADE file
527466 gtk_assistant_set_current_page records wrong visited page
530153 Crash in _gtk_quartz_set_selection_data_for_pasteboard
530156 Function keys don't work
530963 Some suspicious code in gdkkeys-quartz.c
467051 gdk_pixbuf_new_from_xpm_data segfaults on NULL data
* Translation updates:
Belarusian Latin (be@latin)
Catalan (ca)
Valencian-Catalan (ca@valencia)
Czech (cs)
German (de)
Greek (el)
British English (en_GB)
Spanish (es)
Estonian (et)
Basque (eu)
French (fr)
Galician (gl)
Hungarian (hu)
Italian (it)
Japanese (ja)
Georgian (ka)
Korean (ko)
Lithuanian (lt)
Macedonian (mk)
Dutch (nl)
Portugese (pt)
Slovak (sk)
Albanian (sq)
Swedish (sv)
Telugu (te)
Vietnamese (vi)
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.12. 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], [12])
m4_define([gtk_version],
[gtk_major_version.gtk_minor_version.gtk_micro_version])
m4_define([gtk_interface_age], [2])
m4_define([gtk_interface_age], [12])
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 ca@valencia 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"
+44
View File
@@ -1,3 +1,47 @@
2008-09-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.12 ===
2008-07-01 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.11 ===
2008-06-03 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.10 ===
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 ===
+2 -2
View File
@@ -6,12 +6,12 @@
#include <gtk/gtk.h>
#include "demo-common.h"
void
G_MODULE_EXPORT void
quit_activate (GtkAction *action)
{
}
void
G_MODULE_EXPORT void
about_activate (GtkAction *action)
{
GtkWidget *about_dlg;
+2 -1
View File
@@ -49,6 +49,7 @@ begin_print (GtkPrintOperation *operation,
data->num_lines = i;
data->num_pages = (data->num_lines - 1) / data->lines_per_page + 1;
gtk_print_operation_set_n_pages (operation, data->num_pages);
}
@@ -122,7 +123,7 @@ draw_page (GtkPrintOperation *operation,
{
pango_layout_set_text (layout, data->lines[line], -1);
pango_cairo_show_layout (cr, layout);
cairo_rel_move_to (cr, 0, data->font_size);
cairo_rel_move_to (cr, 0, text_height);
line++;
}
+74
View File
@@ -1,3 +1,77 @@
2008-09-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.12 ===
2008-07-01 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.11 ===
2008-06-03 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.10 ===
2008-04-10 Cody Russell <bratsche@gnome.org>
* docs/reference/gdk/tmpl/windows.sgml: Fix to say
g_signal_connect_after rather than g_signal_register_after.
(reported by Guillaume Cottenceau)
2008-04-10 Cody Russell <bratsche@gnome.org>
* docs/reference/gtk/tmpl/gtktreeview.sgml: Fix a typo
in the markup. (reported by kraai -at- ftbfs.org)
2008-03-30 Tor Lillqvist <tml@novell.com>
Bug 524862 - Using GTK_WIN_POS_CENTER_ALWAYS gives jerky window
resizing in Win32
* gtk/tmpl/gtkenums.sgml: Recommend that GTK_WIN_POS_CENTER_ALWAYS
is not used.
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
+1 -1
View File
@@ -50,7 +50,7 @@ transparent_expose (GtkWidget *widget,
*
* In this case we do not want app-paintable to be set on the widget
* since we want it to draw its own (red) background. Because of this,
* however, we must ensure that we use g_signal_register_after so that
* however, we must ensure that we use g_signal_connect_after so that
* this handler is called after the red has been drawn. If it was
* called before then GTK would just blindly paint over our work.
*
+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.
+3 -1
View File
@@ -442,7 +442,9 @@ Used by #GtkCList and #GtkCTree to indicate whether a row is visible.
<!-- ##### ENUM GtkWindowPosition ##### -->
<para>
Window placement can be influenced using this enumeration.
Window placement can be influenced using this enumeration. Note that
using #GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea.
It won't necessarily work well with all window managers or on all windowing systems.
</para>
@GTK_WIN_POS_NONE: No influence is made on placement.
+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>
+1 -1
View File
@@ -58,7 +58,7 @@ GtkTreeViewColumn objects as &lt;child&gt; elements in UI definitions.
<property name="title">Test</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>"
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
+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 ##### -->
+154
View File
@@ -1,3 +1,157 @@
2008-09-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.12 ===
2008-09-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gdk-pixbuf-io.c: Plug a small memory leak
Bug 517233 - Calling gdk_pixbuf_loader_close causes "GError set over
the top of a previous GError" warning
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite
errors. Reported by Andrey Tsyvarev
2008-09-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 517233 - Calling gdk_pixbuf_loader_close causes "GError set over
the top of a previous GError" warning
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_close): Don't overwrite
errors. Reported by Andrey Tsyvarev
2008-09-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 549711 - Race condition when loading gdk-pixbuf image modules
* gdk-pixbuf-io.c: Fix a race condition in module loading,
spotted by Chris Lord.
2008-09-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 532644 - TIFF loader need to exclude CR2 files
* io-tiff.c: Add a pattern to exclude CR2 files.
Noticed by Hubert Figuire
2008-09-12 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gdk-pixbuf-utils.c (gdk_pixbuf_saturate_and_pixelate):
Use gdk_pixbuf_copy_area() to copy between pixbufs.
Reported by Andrey Tsyvarev
2008-07-01 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.11 ===
2008-06-18 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* io-ico.c: Add image/x-win-bitmap to the supported mimetypes,
since that is what shared-mime-info uses for .cur
2008-06-03 Matthias Clasen <mclasen@redhat.com>
* === Released 2.12.10 ===
2008-06-02 Matthias Clasen <mclasen@redhat.com>
Merge from trunk:
Bug 535453 - gdk_pixbuf_format_get_license returns NULL for
any of the loaders
* queryloaders.c (write_loader_info): Add the license info
after the description.
* gdk-pixbuf-io.c (gdk_pixbuf_io_init): Read the license info
from the module file. Reported by Andrey Tsyvarev.
2008-06-02 Matthias Clasen <mclasen@redhat.com>
Merge from trunk:
* gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Guard
against NULL pointer. (#467051, Gian Mario Tagliaretti)
2008-05-12 Tor Lillqvist <tml@novell.com>
Bug 532558 - Cannot build dll when using separate builddir
* Makefile.am: .def file belongs in $(srcdir). Patch by Marko
Lindqvist.
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
+5 -3
View File
@@ -7,7 +7,7 @@ endif
if OS_WIN32
gdk_pixbuf_def = gdk_pixbuf.def
gdk_pixbuf_symbols = -export-symbols gdk_pixbuf.def
gdk_pixbuf_symbols = -export-symbols $(srcdir)/gdk_pixbuf.def
gdk_pixbuf_win32_res = gdk_pixbuf-win32-res.o
gdk_pixbuf_win32_res_ldflag = -Wl,gdk_pixbuf-win32-res.o
@@ -16,7 +16,7 @@ gdk_pixbuf-win32-res.o : gdk_pixbuf.rc
$(WINDRES) gdk_pixbuf.rc $@
install-def-file:
$(INSTALL) gdk_pixbuf.def $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
$(INSTALL) $(srcdir)/gdk_pixbuf.def $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
uninstall-def-file:
-rm $(DESTDIR)$(libdir)/gdk_pixbuf-$(GTK_API_VERSION).def
else
@@ -40,8 +40,10 @@ install-ms-lib:
uninstall-ms-lib:
endif
# This places the generated .def file in srcdir, since it is expected to be there.
# (The one from a tarball is)
gdk_pixbuf.def: gdk-pixbuf.symbols
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gdk-pixbuf.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > gdk_pixbuf.def
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gdk-pixbuf.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk_pixbuf.def
gdk-pixbuf-alias.h: gdk-pixbuf.symbols
$(PERL) $(srcdir)/makegdkpixbufalias.pl < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-alias.h
+94 -83
View File
@@ -284,6 +284,11 @@ gdk_pixbuf_get_module_file (void)
#endif /* USE_GMODULE */
static gboolean
gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
GError **error);
static void
gdk_pixbuf_io_init (void)
{
@@ -305,7 +310,7 @@ gdk_pixbuf_io_init (void)
#define load_one_builtin_module(format) \
builtin_module = g_new0 (GdkPixbufModule, 1); \
builtin_module->module_name = #format; \
if (_gdk_pixbuf_load_module (builtin_module, NULL)) \
if (gdk_pixbuf_load_module_unlocked (builtin_module, NULL)) \
file_formats = g_slist_prepend (file_formats, builtin_module);\
else \
g_free (builtin_module)
@@ -362,6 +367,8 @@ gdk_pixbuf_io_init (void)
if (file_formats == NULL)
g_warning ("Cannot open pixbuf loader module file '%s': %s",
filename, error->message);
g_string_free (tmp_buf, TRUE);
g_free (filename);
return;
}
@@ -433,6 +440,10 @@ gdk_pixbuf_io_init (void)
have_error = TRUE;
}
module->info->description = g_strdup (tmp_buf->str);
if (scan_string (&p, tmp_buf)) {
module->info->license = g_strdup (tmp_buf->str);
}
}
else if (!module->info->mime_types) {
int n = 1;
@@ -502,50 +513,6 @@ gdk_pixbuf_io_init (void)
#endif
}
#ifdef USE_GMODULE
/* actually load the image handler - gdk_pixbuf_get_module only get a */
/* reference to the module to load, it doesn't actually load it */
/* perhaps these actions should be combined in one function */
static gboolean
_gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
GError **error)
{
char *path;
GModule *module;
gpointer sym;
g_return_val_if_fail (image_module->module == NULL, FALSE);
path = image_module->module_path;
module = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (!module) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Unable to load image-loading module: %s: %s"),
path, g_module_error ());
return FALSE;
}
image_module->module = module;
if (g_module_symbol (module, "fill_vtable", &sym)) {
GdkPixbufModuleFillVtableFunc func = (GdkPixbufModuleFillVtableFunc) sym;
(* func) (image_module);
return TRUE;
} else {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Image-loading module %s does not export the proper interface; perhaps it's from a different GTK version?"),
path);
return FALSE;
}
}
#endif /* !USE_GMODULE */
#define module(type) \
extern void _gdk_pixbuf__##type##_fill_info (GdkPixbufFormat *info); \
@@ -568,15 +535,19 @@ module (pcx);
#undef module
gboolean
_gdk_pixbuf_load_module (GdkPixbufModule *image_module,
GError **error)
/* actually load the image handler - gdk_pixbuf_get_module only get a */
/* reference to the module to load, it doesn't actually load it */
/* perhaps these actions should be combined in one function */
static gboolean
gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
GError **error)
{
gboolean ret;
gboolean locked = FALSE;
GdkPixbufModuleFillInfoFunc fill_info = NULL;
GdkPixbufModuleFillVtableFunc fill_vtable = NULL;
if (image_module->module != NULL)
return TRUE;
#define try_module(format) \
if (fill_info == NULL && \
strcmp (image_module->module_name, #format) == 0) { \
@@ -636,32 +607,72 @@ _gdk_pixbuf_load_module (GdkPixbufModule *image_module,
return TRUE;
}
else
#ifdef USE_GMODULE
/* be extra careful, maybe the module initializes
* the thread system
*/
if (g_threads_got_initialized)
{
G_LOCK (init_lock);
locked = TRUE;
}
ret = _gdk_pixbuf_load_module_unlocked (image_module, error);
if (locked)
G_UNLOCK (init_lock);
return ret;
char *path;
GModule *module;
gpointer sym;
path = image_module->module_path;
module = g_module_open (path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
if (!module) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Unable to load image-loading module: %s: %s"),
path, g_module_error ());
return FALSE;
}
image_module->module = module;
if (g_module_symbol (module, "fill_vtable", &sym)) {
fill_vtable = (GdkPixbufModuleFillVtableFunc) sym;
(* fill_vtable) (image_module);
return TRUE;
} else {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_FAILED,
_("Image-loading module %s does not export the proper interface; perhaps it's from a different GTK version?"),
path);
return FALSE;
}
}
#else
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("Image type '%s' is not supported"),
image_module->module_name);
return FALSE;
#endif /* !USE_GMODULE */
}
#endif
gboolean
_gdk_pixbuf_load_module (GdkPixbufModule *image_module,
GError **error)
{
gboolean ret;
gboolean locked = FALSE;
/* be extra careful, maybe the module initializes
* the thread system
*/
if (g_threads_got_initialized) {
G_LOCK (init_lock);
locked = TRUE;
}
ret = gdk_pixbuf_load_module_unlocked (image_module, error);
if (locked)
G_UNLOCK (init_lock);
return ret;
}
@@ -870,12 +881,11 @@ gdk_pixbuf_new_from_file (const char *filename,
return NULL;
}
if (image_module->module == NULL)
if (!_gdk_pixbuf_load_module (image_module, error)) {
g_free (display_name);
fclose (f);
return NULL;
}
if (!_gdk_pixbuf_load_module (image_module, error)) {
g_free (display_name);
fclose (f);
return NULL;
}
fseek (f, 0, SEEK_SET);
pixbuf = _gdk_pixbuf_generic_image_load (image_module, f, error);
@@ -975,6 +985,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);
}
@@ -1297,6 +1310,8 @@ gdk_pixbuf_new_from_xpm_data (const char **data)
GdkPixbufModule *xpm_module;
gboolean locked;
g_return_val_if_fail (data != NULL, NULL);
xpm_module = _gdk_pixbuf_get_named_module ("xpm", &error);
if (xpm_module == NULL) {
g_warning ("Error loading XPM image loader: %s", error->message);
@@ -1304,12 +1319,10 @@ gdk_pixbuf_new_from_xpm_data (const char **data)
return NULL;
}
if (xpm_module->module == NULL) {
if (!_gdk_pixbuf_load_module (xpm_module, &error)) {
g_warning ("Error loading XPM image loader: %s", error->message);
g_error_free (error);
return NULL;
}
if (!_gdk_pixbuf_load_module (xpm_module, &error)) {
g_warning ("Error loading XPM image loader: %s", error->message);
g_error_free (error);
return NULL;
}
locked = _gdk_pixbuf_lock (xpm_module);
@@ -1402,9 +1415,8 @@ gdk_pixbuf_real_save (GdkPixbuf *pixbuf,
if (image_module == NULL)
return FALSE;
if (image_module->module == NULL)
if (!_gdk_pixbuf_load_module (image_module, error))
return FALSE;
if (!_gdk_pixbuf_load_module (image_module, error))
return FALSE;
locked = _gdk_pixbuf_lock (image_module);
@@ -1533,9 +1545,8 @@ gdk_pixbuf_real_save_to_callback (GdkPixbuf *pixbuf,
if (image_module == NULL)
return FALSE;
if (image_module->module == NULL)
if (!_gdk_pixbuf_load_module (image_module, error))
return FALSE;
if (!_gdk_pixbuf_load_module (image_module, error))
return FALSE;
locked = _gdk_pixbuf_lock (image_module);
+8 -5
View File
@@ -356,9 +356,8 @@ gdk_pixbuf_loader_load_module (GdkPixbufLoader *loader,
if (priv->image_module == NULL)
return 0;
if (priv->image_module->module == NULL)
if (!_gdk_pixbuf_load_module (priv->image_module, error))
return 0;
if (!_gdk_pixbuf_load_module (priv->image_module, error))
return 0;
if (priv->image_module->module == NULL)
return 0;
@@ -727,8 +726,12 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
* here, since we might not get an error in the
* gdk_pixbuf_get_file_info() case
*/
if (tmp)
g_propagate_error (error, tmp);
if (tmp) {
if (error && *error == NULL)
g_propagate_error (error, tmp);
else
g_error_free (tmp);
}
retval = FALSE;
}
}
+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 *
+4 -3
View File
@@ -190,9 +190,10 @@ gdk_pixbuf_saturate_and_pixelate(const GdkPixbuf *src,
if (saturation == 1.0 && !pixelate) {
if (dest != src)
memcpy (gdk_pixbuf_get_pixels (dest),
gdk_pixbuf_get_pixels (src),
gdk_pixbuf_get_height (src) * gdk_pixbuf_get_rowstride (src));
gdk_pixbuf_copy_area (src, 0, 0,
gdk_pixbuf_get_width (src),
gdk_pixbuf_get_height (src),
dest, 0, 0);
} else {
int i, j, t;
int width, height, has_alpha, src_rowstride, dest_rowstride, bytes_per_pixel;
+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;
}
+1
View File
@@ -1210,6 +1210,7 @@ MODULE_ENTRY (ico, fill_info) (GdkPixbufFormat *info)
static gchar * mime_types[] = {
"image/x-icon",
"image/x-ico",
"image/x-win-bitmap",
NULL
};
static gchar * extensions[] = {
+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)
+1
View File
@@ -799,6 +799,7 @@ MODULE_ENTRY (tiff, fill_info) (GdkPixbufFormat *info)
static GdkPixbufModulePattern signature[] = {
{ "MM \x2a", " z ", 100 },
{ "II\x2a ", " z", 100 },
{ "II* \020 CR\002 ", " z zzz z", 0 },
{ NULL, NULL, 0 }
};
static gchar * mime_types[] = {
+5 -3
View File
@@ -161,11 +161,11 @@ libgdk_win32_2_0_la_SOURCES = $(common_sources) gdkkeynames.c
libgdk_win32_2_0_la_LIBADD = win32/libgdk-win32.la $(GDK_DEP_LIBS) \
$(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la
libgdk_win32_2_0_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
libgdk_win32_2_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols gdk.def $(LDADD)
libgdk_win32_2_0_la_LDFLAGS = -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def $(LDADD)
if OS_WIN32
install-def-file: gdk.def
$(INSTALL) gdk.def $(DESTDIR)$(libdir)/gdk-win32-2.0.def
$(INSTALL) $(srcdir)/gdk.def $(DESTDIR)$(libdir)/gdk-win32-2.0.def
uninstall-def-file:
-rm $(DESTDIR)$(libdir)/gdk-win32-2.0.def
else
@@ -189,8 +189,10 @@ install-ms-lib:
uninstall-ms-lib:
endif
# This places the generated .def file in srcdir, since it is expected to be there.
# (The one from a tarball is)
gdk.def: gdk.symbols
(echo -e EXPORTS; $(CPP) -P -DALL_FILES -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > gdk.def
(echo -e EXPORTS; $(CPP) -P -DALL_FILES -DGDK_WINDOWING_WIN32 -DINCLUDE_VARIABLES - <$(srcdir)/gdk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gdk.def
gdkalias.h: gdk.symbols
$(PERL) $(srcdir)/makegdkalias.pl < $(srcdir)/gdk.symbols > gdkalias.h
+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;
}
}
+5 -5
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);
}
/**
@@ -2514,7 +2514,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
impl = GDK_DRAWABLE_IMPL_DIRECTFB (private->impl);
rect->x = impl->abs_x;
rect->y = impl->abs_x;
rect->y = impl->abs_y;
rect->width = impl->width;
rect->height = impl->height;
}
+3 -1
View File
@@ -11,7 +11,9 @@ TOP = ..\..
# Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
# definition should possibly go to build/win32/module.def, too.
WTKIT = ..\..\wtkit126
!IFNDEF WTKIT
WTKIT = $(TOP)\wtkit126
!ENDIF
###############################################################
+26 -4
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,10 +176,12 @@
}
}
-(void)setBounds:(NSRect)bounds
-(void)setFrame:(NSRect)frame
{
[super setBounds:bounds];
[self updateTrackingRect];
[super setFrame:frame];
if ([self window])
[self updateTrackingRect];
}
@end
+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];
}
+120 -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,92 @@ 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 (gboolean defer_to_mainloop)
{
NSPoint point;
gint x, y;
gint x_toplevel, y_toplevel;
GdkWindow *mouse_window;
GdkWindow *toplevel;
GdkWindowImplQuartz *impl;
guint flags = 0;
NSTimeInterval timestamp = 0;
NSEvent *current_event;
NSEvent *nsevent;
if (defer_to_mainloop)
{
nsevent = [NSEvent otherEventWithType:NSApplicationDefined
location:NSZeroPoint
modifierFlags:0
timestamp:0
windowNumber:0
context:nil
subtype:GDK_QUARTZ_EVENT_SUBTYPE_FAKE_CROSSING
data1:0
data2:0];
[NSApp postEvent:nsevent atStart:NO];
return;
}
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 || mouse_window == _gdk_root)
return;
toplevel = gdk_window_get_toplevel (mouse_window);
/* We ignore crossing within the same toplevel since that is already
* handled elsewhere.
*/
if (toplevel == gdk_window_get_toplevel (current_mouse_window))
return;
get_converted_window_coordinates (_gdk_root,
x, y,
toplevel,
&x_toplevel, &y_toplevel);
get_converted_window_coordinates (_gdk_root,
x, y,
mouse_window,
&x, &y);
/* 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];
}
if (timestamp == 0)
timestamp = GetCurrentEventTime ();
impl = GDK_WINDOW_IMPL_QUARTZ (GDK_WINDOW_OBJECT (toplevel)->impl);
nsevent = [NSEvent otherEventWithType:NSApplicationDefined
location:NSMakePoint (x_toplevel, impl->height - y_toplevel)
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 +1258,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 +1267,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 +1525,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);
@@ -1629,6 +1720,14 @@ gdk_event_translate (NSEvent *nsevent)
}
}
/* Handle our generated "fake" crossing events. */
if ([nsevent type] == NSApplicationDefined &&
[nsevent subtype] == GDK_QUARTZ_EVENT_SUBTYPE_FAKE_CROSSING)
{
_gdk_quartz_events_trigger_crossing_events (FALSE);
return TRUE;
}
/* Keep track of button state, since we don't get that information
* for key events.
*/
@@ -1777,6 +1876,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 +1895,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 +1930,19 @@ 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))
{
GDK_THREADS_LEAVE ();
[NSApp sendEvent:event];
GDK_THREADS_ENTER ();
}
_gdk_quartz_event_loop_release_event (event);
}
}
+24 -7
View File
@@ -128,7 +128,8 @@ const static struct {
{ 111, GDK_F12, 0 },
{ 105, GDK_F13, 0 },
{ 107, GDK_F14, 0 },
{ 113, GDK_F15, 0 }
{ 113, GDK_F15, 0 },
{ 106, GDK_F16, 0 }
};
const static struct {
@@ -255,7 +256,15 @@ maybe_update_keymap (void)
p[j] = GDK_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
{
guint tmp;
tmp = gdk_unicode_to_keyval (uc);
if (tmp != (uc | 0x01000000))
p[j] = tmp;
else
p[j] = 0;
}
}
}
@@ -330,7 +339,15 @@ maybe_update_keymap (void)
p[j] = GDK_ISO_Left_Tab;
if (!found)
p[j] = gdk_unicode_to_keyval (uc);
{
guint tmp;
tmp = gdk_unicode_to_keyval (uc);
if (tmp != (uc | 0x01000000))
p[j] = tmp;
else
p[j] = 0;
}
}
}
@@ -364,8 +381,8 @@ maybe_update_keymap (void)
{
p = keyval_array + known_numeric_keys[i].keycode * KEYVALS_PER_KEYCODE;
if (p[0] == known_numeric_keys[i].normal_keyval);
p[0] = known_numeric_keys[i].keypad_keyval;
if (p[0] == known_numeric_keys[i].normal_keyval)
p[0] = known_numeric_keys[i].keypad_keyval;
}
if (current_layout)
@@ -543,8 +560,8 @@ translate_keysym (guint hardware_keycode,
if (state & GDK_LOCK_MASK)
{
guint upper = gdk_keyval_to_upper (tmp_keyval);
if (upper != tmp_keyval)
tmp_keyval = upper;
if (upper != tmp_keyval)
tmp_keyval = upper;
}
return tmp_keyval;
+11 -2
View File
@@ -144,8 +144,15 @@ 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,
gint number);
/* 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 +160,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(gboolean defer_to_mainloop);
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,
+259 -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
@@ -297,9 +319,11 @@ gdk_window_quartz_process_all_updates (void)
{
GSList *old_update_windows = update_windows;
GSList *tmp_list = update_windows;
GSList *nswindows;
update_idle = 0;
update_windows = NULL;
nswindows = NULL;
g_slist_foreach (old_update_windows, (GFunc) g_object_ref, NULL);
@@ -307,15 +331,49 @@ gdk_window_quartz_process_all_updates (void)
while (tmp_list)
{
GdkWindow *window = tmp_list->data;
GdkWindow *toplevel;
/* Only flush each toplevel at most once. */
toplevel = gdk_window_get_toplevel (window);
if (toplevel)
{
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
NSWindow *nswindow;
private = (GdkWindowObject *) toplevel;
impl = (GdkWindowImplQuartz *) private->impl;
nswindow = impl->toplevel;
if (nswindow && ![nswindow isFlushWindowDisabled])
{
[nswindow disableFlushWindow];
nswindows = g_slist_prepend (nswindows, nswindow);
}
}
gdk_window_quartz_process_updates_internal (tmp_list->data);
g_object_unref (tmp_list->data);
tmp_list = tmp_list->next;
}
tmp_list = nswindows;
while (tmp_list)
{
NSWindow *nswindow = tmp_list->data;
[nswindow enableFlushWindow];
[nswindow flushWindow];
tmp_list = tmp_list->next;
}
GDK_QUARTZ_RELEASE_POOL;
g_slist_free (old_update_windows);
g_slist_free (nswindows);
}
static gboolean
@@ -442,6 +500,115 @@ 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, gint number)
{
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[10];
static NSRect old_rect[10];
NSRect rect;
NSColor *color;
g_return_if_fail (number >= 0 && number <= 9);
if (window == _gdk_root)
return;
if (window == NULL)
{
if (debug_window[number])
[debug_window[number] close];
debug_window[number] = 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[number] && NSEqualRects (rect, old_rect[number]))
return;
old_rect[number] = rect;
if (debug_window[number])
[debug_window[number] close];
debug_window[number] = [[NSWindow alloc] initWithContentRect:rect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
switch (number)
{
case 0:
color = [NSColor redColor];
break;
case 1:
color = [NSColor blueColor];
break;
case 2:
color = [NSColor greenColor];
break;
case 3:
color = [NSColor yellowColor];
break;
case 4:
color = [NSColor brownColor];
break;
case 5:
color = [NSColor purpleColor];
break;
default:
color = [NSColor blackColor];
break;
}
[debug_window[number] setBackgroundColor:color];
[debug_window[number] setAlphaValue:0.4];
[debug_window[number] setOpaque:NO];
[debug_window[number] setReleasedWhenClosed:YES];
[debug_window[number] setIgnoresMouseEvents:YES];
[debug_window[number] setLevel:NSFloatingWindowLevel];
[debug_window[number] orderFront:nil];
}
gboolean
_gdk_quartz_window_is_ancestor (GdkWindow *ancestor,
GdkWindow *window)
@@ -824,6 +991,7 @@ _gdk_windowing_window_init (void)
{
GdkWindowObject *private;
GdkWindowImplQuartz *impl;
GdkDrawableImplQuartz *drawable_impl;
NSRect rect;
g_assert (_gdk_root == NULL);
@@ -841,6 +1009,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 +1025,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 +1053,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 +1119,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 +1151,12 @@ show_window_internal (GdkWindow *window,
if (impl->transient_for && !GDK_WINDOW_DESTROYED (impl->transient_for))
_gdk_quartz_window_attach_to_parent (window);
/* Create a crossing event for windows that pop up under the mouse. Part
* of the workarounds for problems with the tracking rect API.
*/
if (impl->toplevel)
_gdk_quartz_events_trigger_crossing_events (TRUE);
GDK_QUARTZ_RELEASE_POOL;
}
@@ -1016,6 +1180,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 +1202,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 +1231,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 +1254,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 +1262,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 +1303,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 +1357,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 +2369,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 +2678,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 +2877,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 +2894,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 +2932,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 +3042,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;
+13 -8
View File
@@ -851,15 +851,24 @@ enum_formats_new (void)
/* From MS Knowledge Base article Q130698 */
static HRESULT
static gboolean
resolve_link (HWND hWnd,
guchar *lpszLinkName,
wchar_t *link,
guchar **lpszPath)
{
WIN32_FILE_ATTRIBUTE_DATA wfad;
HRESULT hres;
IShellLinkW *pslW = NULL;
IPersistFile *ppf = NULL;
/* Check if the file is empty first because IShellLink::Resolve for
* some reason succeeds with an empty file and returns an empty
* "link target". (#524151)
*/
if (!GetFileAttributesExW (link, GetFileExInfoStandard, &wfad) ||
(wfad.nFileSizeHigh == 0 && wfad.nFileSizeLow == 0))
return FALSE;
/* Assume failure to start with: */
*lpszPath = 0;
@@ -887,12 +896,8 @@ resolve_link (HWND hWnd,
if (SUCCEEDED (hres))
{
/* Convert the given link name string to wide character string. */
wchar_t *wsz = g_utf8_to_utf16 (lpszLinkName, -1, NULL, NULL, NULL);
/* Load the file. */
hres = ppf->lpVtbl->Load (ppf, wsz, STGM_READ);
g_free (wsz);
hres = ppf->lpVtbl->Load (ppf, link, STGM_READ);
}
if (SUCCEEDED (hres))
@@ -977,7 +982,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
fileName = g_utf16_to_utf8 (wfn, -1, NULL, NULL, NULL);
/* Resolve shortcuts */
if (resolve_link (msg->hwnd, fileName, &linkedFile))
if (resolve_link (msg->hwnd, wfn, &linkedFile))
{
uri = g_filename_to_uri (linkedFile, NULL, NULL);
g_free (linkedFile);
+176 -69
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
*/
@@ -138,7 +139,7 @@ static HKL latin_locale = NULL;
#endif
static gboolean in_ime_composition = FALSE;
static UINT resize_timer;
static UINT modal_timer;
static int debug_indent = 0;
@@ -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,61 @@ 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)
{
if (GDK_WINDOW_OBJECT (window)->state & GDK_WINDOW_STATE_ICONIFIED)
{
if (GDK_WINDOW_OBJECT (window)->state & GDK_WINDOW_STATE_MAXIMIZED)
{
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWMAXIMIZED);
}
else
{
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
}
}
}
else
{
ShowWindow (GDK_WINDOW_HWND (window), SW_MINIMIZE);
}
}
impl->changing_state = FALSE;
}
}
static void
do_show_window (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. */
if (tmp_window != window)
{
show_window_recurse (tmp_window, hide_window);
}
}
}
static gboolean
gdk_window_is_ancestor (GdkWindow *ancestor,
GdkWindow *window)
@@ -1725,6 +1785,9 @@ 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);
return (((msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP) &&
!(mask & GDK_KEY_RELEASE_MASK)) ||
((msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN) &&
@@ -1884,6 +1947,7 @@ handle_wm_paint (MSG *msg,
if (GetUpdateRgn (msg->hwnd, hrgn, FALSE) == ERROR)
{
WIN32_GDI_FAILED ("GetUpdateRgn");
DeleteObject (hrgn);
return;
}
@@ -1956,6 +2020,7 @@ handle_wm_paint (MSG *msg,
}
}
DeleteObject (hrgn);
return;
}
@@ -1979,7 +2044,7 @@ handle_stuff_while_moving_or_resizing (void)
}
static VOID CALLBACK
resize_timer_proc (HWND hwnd,
modal_timer_proc (HWND hwnd,
UINT msg,
UINT id,
DWORD time)
@@ -2763,12 +2828,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 +2952,18 @@ gdk_event_translate (MSG *msg,
return_val = TRUE;
break;
case WM_SYSCOMMAND:
switch (msg->wParam)
{
case SC_MINIMIZE:
case SC_RESTORE:
do_show_window (window, msg->wParam == SC_MINIMIZE ? TRUE : FALSE);
break;
}
break;
case WM_SIZE:
GDK_NOTE (EVENTS,
g_print (" %s %dx%d",
@@ -2895,6 +2987,7 @@ gdk_event_translate (MSG *msg,
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_WITHDRAWN,
GDK_WINDOW_STATE_ICONIFIED);
do_show_window (window, TRUE);
}
else if ((msg->wParam == SIZE_RESTORED ||
msg->wParam == SIZE_MAXIMIZED) &&
@@ -2907,16 +3000,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))
{
do_show_window (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;
@@ -2930,12 +3032,22 @@ gdk_event_translate (MSG *msg,
case WM_ENTERSIZEMOVE:
_sizemove_in_progress = TRUE;
resize_timer = SetTimer (NULL, 0, 20, resize_timer_proc);
modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc);
break;
case WM_EXITSIZEMOVE:
_sizemove_in_progress = FALSE;
KillTimer (NULL, resize_timer);
KillTimer (NULL, modal_timer);
break;
case WM_ENTERMENULOOP:
_sizemove_in_progress = TRUE;
modal_timer = SetTimer (NULL, 0, 20, modal_timer_proc);
break;
case WM_EXITMENULOOP:
_sizemove_in_progress = FALSE;
KillTimer (NULL, modal_timer);
break;
case WM_WINDOWPOSCHANGED :
@@ -3172,6 +3284,7 @@ gdk_event_translate (MSG *msg,
break;
}
}
*ret_valp = TRUE;
return_val = TRUE;
GDK_NOTE (EVENTS, g_print (" (handled ASPECT: %s)",
@@ -3305,7 +3418,10 @@ gdk_event_translate (MSG *msg,
append_event (event);
}
else
return_val = TRUE;
{
return_val = TRUE;
}
break;
case WM_RENDERFORMAT:
@@ -3340,7 +3456,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 +3472,7 @@ gdk_event_translate (MSG *msg,
break;
}
}
/* The requestor is holding the clipboard, no
* OpenClipboard() is required/possible
*/
@@ -3363,47 +3482,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 +3504,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 +3531,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 +3594,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 +3640,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 +3654,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
+22 -10
View File
@@ -63,6 +63,7 @@ static GdkEventMask x_grab_mask;
static gboolean x_grab_owner_events;
typedef UINT (WINAPI *t_WTInfoA) (UINT a, UINT b, LPVOID c);
typedef UINT (WINAPI *t_WTInfoW) (UINT a, UINT b, LPVOID c);
typedef BOOL (WINAPI *t_WTEnable) (HCTX a, BOOL b);
typedef HCTX (WINAPI *t_WTOpenA) (HWND a, LPLOGCONTEXTA b, BOOL c);
typedef BOOL (WINAPI *t_WTOverlap) (HCTX a, BOOL b);
@@ -70,6 +71,7 @@ typedef BOOL (WINAPI *t_WTPacket) (HCTX a, UINT b, LPVOID c);
typedef int (WINAPI *t_WTQueueSizeSet) (HCTX a, int b);
static t_WTInfoA p_WTInfoA;
static t_WTInfoW p_WTInfoW;
static t_WTEnable p_WTEnable;
static t_WTOpenA p_WTOpenA;
static t_WTOverlap p_WTOverlap;
@@ -334,7 +336,8 @@ _gdk_input_wintab_init_check (void)
AXIS axis_x, axis_y, axis_npressure, axis_or[3];
int i, k;
int devix, cursorix;
char devname[100], csrname[100];
wchar_t devname[100], csrname[100];
gchar *devname_utf8, *csrname_utf8;
BOOL defcontext_done;
HMODULE wintab32;
@@ -353,6 +356,8 @@ _gdk_input_wintab_init_check (void)
if ((p_WTInfoA = (t_WTInfoA) GetProcAddress (wintab32, "WTInfoA")) == NULL)
return;
if ((p_WTInfoW = (t_WTInfoW) GetProcAddress (wintab32, "WTInfoW")) == NULL)
return;
if ((p_WTEnable = (t_WTEnable) GetProcAddress (wintab32, "WTEnable")) == NULL)
return;
if ((p_WTOpenA = (t_WTOpenA) GetProcAddress (wintab32, "WTOpenA")) == NULL)
@@ -395,13 +400,17 @@ _gdk_input_wintab_init_check (void)
{
LOGCONTEXT lc;
/* We open the Wintab device (hmm, what if there are several?) as a
* system pointing device, i.e. it controls the normal Windows
/* We open the Wintab device (hmm, what if there are several, or
* can there even be several, probably not?) as a system
* pointing device, i.e. it controls the normal Windows
* cursor. This seems much more natural.
*/
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_NAME, devname);
(*p_WTInfoW) (WTI_DEVICES + devix, DVC_NAME, devname);
devname_utf8 = g_utf16_to_utf8 (devname, -1, NULL, NULL, NULL);
#ifdef DEBUG_WINTAB
GDK_NOTE (INPUT, (g_print("Device %d: %s\n", devix, devname_utf8)));
#endif
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_NCSRTYPES, &ncsrtypes);
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_FIRSTCSR, &firstcsr);
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_HARDWARE, &hardware);
@@ -433,7 +442,7 @@ _gdk_input_wintab_init_check (void)
lc.lcOptions |= CXO_MESSAGES;
lc.lcStatus = 0;
lc.lcMsgBase = WT_DEFBASE;
lc.lcPktRate = 50;
lc.lcPktRate = 0;
lc.lcPktData = PACKETDATA;
lc.lcPktMode = PACKETMODE;
lc.lcMoveMask = PACKETDATA;
@@ -484,7 +493,7 @@ _gdk_input_wintab_init_check (void)
for (cursorix = firstcsr; cursorix < firstcsr + ncsrtypes; cursorix++)
{
#ifdef DEBUG_WINTAB
GDK_NOTE (INPUT, (g_print("Cursor %d:\n", cursorix), print_cursor (cursorix)));
GDK_NOTE (INPUT, (g_print("Cursor %d:\n", cursorix), print_cursor (cursorix)));
#endif
active = FALSE;
(*p_WTInfoA) (WTI_CURSORS + cursorix, CSR_ACTIVE, &active);
@@ -500,12 +509,14 @@ _gdk_input_wintab_init_check (void)
* at least for Wacom, skip cursors with physid zero.
*/
(*p_WTInfoA) (WTI_CURSORS + cursorix, CSR_PHYSID, &physid);
if (strcmp (devname, "WACOM Tablet") == 0 && physid == 0)
if (wcscmp (devname, L"WACOM Tablet") == 0 && physid == 0)
continue;
gdkdev = g_object_new (GDK_TYPE_DEVICE, NULL);
(*p_WTInfoA) (WTI_CURSORS + cursorix, CSR_NAME, csrname);
gdkdev->info.name = g_strconcat (devname, " ", csrname, NULL);
(*p_WTInfoW) (WTI_CURSORS + cursorix, CSR_NAME, csrname);
csrname_utf8 = g_utf16_to_utf8 (csrname, -1, NULL, NULL, NULL);
gdkdev->info.name = g_strconcat (devname_utf8, " ", csrname_utf8, NULL);
g_free (csrname_utf8);
gdkdev->info.source = GDK_SOURCE_PEN;
gdkdev->info.mode = GDK_MODE_SCREEN;
gdkdev->info.has_cursor = TRUE;
@@ -602,6 +613,7 @@ _gdk_input_wintab_init_check (void)
_gdk_input_devices = g_list_append (_gdk_input_devices,
gdkdev);
}
g_free (devname_utf8);
}
}
+42
View File
@@ -543,6 +543,48 @@ _gdk_win32_window_state_to_string (GdkWindowState state)
return static_printf ("%s", buf);
}
gchar *
_gdk_win32_window_style_to_string (LONG style)
{
gchar buf[1000];
gchar *bufp = buf;
gchar *s = "";
buf[0] = '\0';
#define BIT(x) \
if (style & WS_ ## x) \
(bufp += sprintf (bufp, "%s" #x, s), s = "|")
/* Note that many of the WS_* macros are in face several bits.
* Handle just the individual bits here. Sort as in w32api's
* winuser.h.
*/
BIT (BORDER);
BIT (CHILD);
BIT (CLIPCHILDREN);
BIT (CLIPSIBLINGS);
BIT (DISABLED);
BIT (DLGFRAME);
BIT (GROUP);
BIT (HSCROLL);
BIT (ICONIC);
BIT (MAXIMIZE);
BIT (MAXIMIZEBOX);
BIT (MINIMIZE);
BIT (MINIMIZEBOX);
BIT (POPUP);
BIT (SIZEBOX);
BIT (SYSMENU);
BIT (TABSTOP);
BIT (THICKFRAME);
BIT (VISIBLE);
BIT (VSCROLL);
#undef BIT
return static_printf ("%s", buf);
}
gchar *
_gdk_win32_rop2_to_string (int rop2)
{
+6
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,
@@ -291,6 +296,7 @@ gchar *_gdk_win32_join_style_to_string (GdkJoinStyle join_style);
gchar *_gdk_win32_line_style_to_string (GdkLineStyle line_style);
gchar *_gdk_win32_gcvalues_mask_to_string (GdkGCValuesMask mask);
gchar *_gdk_win32_window_state_to_string (GdkWindowState state);
gchar *_gdk_win32_window_style_to_string (LONG style);
gchar *_gdk_win32_drawable_description (GdkDrawable *d);
gchar *_gdk_win32_rop2_to_string (int rop2);
+5 -3
View File
@@ -1028,7 +1028,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
gint n_targets,
GdkAtom *targets)
{
HWND hwnd;
HWND hwnd = NULL;
guint formatid;
gint i;
GSList *convertable_formats, *format;
@@ -1121,10 +1121,11 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
{
gchar **mime_types =
gdk_pixbuf_format_get_mime_types ((GdkPixbufFormat *) format->data);
gchar **mime_type;
for (; *mime_types; ++mime_types)
for (mime_type = mime_types; *mime_type; ++mime_type)
{
if (!strcmp (target_name, *mime_types))
if (!strcmp (target_name, *mime_type))
{
g_hash_table_replace (_format_atom_table,
GINT_TO_POINTER (CF_DIB),
@@ -1135,6 +1136,7 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
break;
}
}
g_strfreev(mime_types);
}
g_free (target_name);
}
+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);
+194 -44
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)
@@ -1077,15 +1090,25 @@ show_window_internal (GdkWindow *window,
}
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
gdk_window_fullscreen (window);
{
gdk_window_fullscreen (window);
}
else if (private->state & GDK_WINDOW_STATE_MAXIMIZED)
ShowWindow (GDK_WINDOW_HWND (window), SW_MAXIMIZE);
{
ShowWindow (GDK_WINDOW_HWND (window), SW_MAXIMIZE);
}
else if (private->state & GDK_WINDOW_STATE_ICONIFIED)
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
{
ShowWindow (GDK_WINDOW_HWND (window), SW_RESTORE);
}
else if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || !focus_on_map)
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
{
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNOACTIVATE);
}
else
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
{
ShowWindow (GDK_WINDOW_HWND (window), SW_SHOWNORMAL);
}
if (raise)
{
@@ -1097,17 +1120,25 @@ show_window_internal (GdkWindow *window,
GDK_WINDOW_TYPE (window) == GDK_WINDOW_DIALOG)
{
if (focus_on_map && private->accept_focus)
SetForegroundWindow (GDK_WINDOW_HWND (window));
{
SetForegroundWindow (GDK_WINDOW_HWND (window));
}
else
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
{
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP,
0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
}
else
BringWindowToTop (GDK_WINDOW_HWND (window));
{
BringWindowToTop (GDK_WINDOW_HWND (window));
}
}
else if (old_active_window != GDK_WINDOW_HWND (window))
SetActiveWindow (old_active_window);
{
SetActiveWindow (old_active_window);
}
}
void
@@ -1775,7 +1806,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 +1816,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 +1836,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 +2026,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 +2036,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 +2053,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)
@@ -2792,14 +2885,15 @@ gdk_window_set_group (GdkWindow *window,
}
static void
update_single_bit (LONG *style,
BOOL all,
int gdk_bit,
int style_bit)
update_single_bit (LONG *style,
gboolean all,
int gdk_bit,
int style_bit)
{
/* all controls the interpretation of gdk_bit -- if all is true, gdk_bit
indicates whether style_bit is off; if all is false, gdk bit indicate whether
style_bit is on */
/* all controls the interpretation of gdk_bit -- if all is TRUE,
* gdk_bit indicates whether style_bit is off; if all is FALSE, gdk
* bit indicate whether style_bit is on
*/
if ((!all && gdk_bit) || (all && !gdk_bit))
*style |= style_bit;
else
@@ -2810,9 +2904,8 @@ static void
update_style_bits (GdkWindow *window)
{
GdkWMDecoration decorations;
GdkWMFunction functions;
LONG style, exstyle;
BOOL all;
gboolean all;
RECT rect, before, after;
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
@@ -2822,6 +2915,8 @@ update_style_bits (GdkWindow *window)
after = before;
AdjustWindowRectEx (&before, style, FALSE, exstyle);
GDK_NOTE (MISC, g_print ("update_style_bits: style: %s", _gdk_win32_window_style_to_string (style)));
if (get_effective_window_decorations (window, &decorations))
{
all = (decorations & GDK_DECOR_ALL);
@@ -2833,18 +2928,8 @@ update_style_bits (GdkWindow *window)
update_single_bit (&style, all, decorations & GDK_DECOR_MAXIMIZE, WS_MAXIMIZEBOX);
}
/* XXX this is actually incorrect. The menu entries should be added or removed
from the system menu without affecting the window style. */
if (_gdk_window_get_functions (window, &functions))
{
all = (functions & GDK_DECOR_ALL);
update_single_bit (&style, all, functions & GDK_FUNC_RESIZE, WS_THICKFRAME);
update_single_bit (&style, all, functions & GDK_FUNC_MOVE, WS_THICKFRAME | WS_SYSMENU);
update_single_bit (&style, all, functions & GDK_FUNC_MINIMIZE, WS_MINIMIZE);
update_single_bit (&style, all, functions & GDK_FUNC_MOVE, WS_MAXIMIZE);
update_single_bit (&style, all, functions & GDK_FUNC_CLOSE, WS_SYSMENU);
}
GDK_NOTE (MISC, g_print (" => %s\n", _gdk_win32_window_style_to_string (style)));
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
AdjustWindowRectEx (&after, style, FALSE, exstyle);
@@ -2862,6 +2947,41 @@ update_style_bits (GdkWindow *window)
SWP_NOREPOSITION | SWP_NOZORDER);
}
static void
update_single_system_menu_entry (HMENU hmenu,
gboolean all,
int gdk_bit,
int menu_entry)
{
/* all controls the interpretation of gdk_bit -- if all is TRUE,
* gdk_bit indicates whether menu entry is disabled; if all is
* FALSE, gdk bit indicate whether menu entry is enabled
*/
if ((!all && gdk_bit) || (all && !gdk_bit))
EnableMenuItem (hmenu, menu_entry, MF_BYCOMMAND | MF_ENABLED);
else
EnableMenuItem (hmenu, menu_entry, MF_BYCOMMAND | MF_GRAYED);
}
static void
update_system_menu (GdkWindow *window)
{
GdkWMFunction functions;
BOOL all;
if (_gdk_window_get_functions (window, &functions))
{
HMENU hmenu = GetSystemMenu (GDK_WINDOW_HWND (window), FALSE);
all = (functions & GDK_DECOR_ALL);
update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_RESIZE, SC_SIZE);
update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_MOVE, SC_MOVE);
update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_MINIMIZE, SC_MINIMIZE);
update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_MAXIMIZE, SC_MAXIMIZE);
update_single_system_menu_entry (hmenu, all, functions & GDK_FUNC_CLOSE, SC_CLOSE);
}
}
static GQuark
get_decorations_quark ()
{
@@ -2945,7 +3065,7 @@ gdk_window_set_functions (GdkWindow *window,
*functions_copy = functions;
g_object_set_qdata_full (G_OBJECT (window), get_functions_quark (), functions_copy, g_free);
update_style_bits (window);
update_system_menu (window);
}
gboolean
@@ -3313,9 +3433,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 +3449,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 +3475,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);
@@ -3449,15 +3584,30 @@ gdk_window_set_modal_hint (GdkWindow *window,
private = (GdkWindowObject*) window;
if (modal == private->modal_hint)
return;
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);
gdk_window_raise (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);
+3 -2
View File
@@ -46,7 +46,7 @@ struct _GdkColormapPrivateX11
GdkColorInfo *info;
time_t last_sync_time;
guint foreign : 1;
gboolean foreign;
};
#define GDK_COLORMAP_PRIVATE_DATA(cmap) ((GdkColormapPrivateX11 *) GDK_COLORMAP (cmap)->windowing_data)
@@ -107,7 +107,7 @@ gdk_colormap_finalize (GObject *object)
gdk_colormap_remove (colormap);
if (!private->screen->closed)
if (!private->screen->closed && !private->foreign)
XFreeColormap (GDK_SCREEN_XDISPLAY (private->screen), private->xcolormap);
if (private->hash)
@@ -1292,6 +1292,7 @@ gdk_x11_colormap_foreign_new (GdkVisual *visual,
private->screen = screen;
private->xcolormap = xcolormap;
private->private_val = FALSE;
private->foreign = TRUE;
colormap->size = visual->colormap_size;
+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;
+1 -1
View File
@@ -1661,7 +1661,7 @@ _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
{
XkbDescRec *xkb = get_xkb (keymap_x11);
if (xkb->map->modmap[keycode] != 0)
if (xkb->map->modmap && xkb->map->modmap[keycode] != 0)
return TRUE;
}
else
+61 -8
View File
@@ -1326,6 +1326,7 @@ set_initial_hints (GdkWindow *window)
atoms[i] = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_STATE_MAXIMIZED_HORZ");
++i;
toplevel->have_maxhorz = toplevel->have_maxvert = TRUE;
}
if (private->state & GDK_WINDOW_STATE_ABOVE)
@@ -1347,6 +1348,7 @@ set_initial_hints (GdkWindow *window)
atoms[i] = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_STATE_STICKY");
++i;
toplevel->have_sticky = TRUE;
}
if (private->state & GDK_WINDOW_STATE_FULLSCREEN)
@@ -1354,6 +1356,7 @@ set_initial_hints (GdkWindow *window)
atoms[i] = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_STATE_FULLSCREEN");
++i;
toplevel->have_fullscreen = TRUE;
}
if (private->modal_hint)
@@ -1400,6 +1403,7 @@ set_initial_hints (GdkWindow *window)
gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_DESKTOP"),
XA_CARDINAL, 32, PropModeReplace,
(guchar*) atoms, 1);
toplevel->on_all_desktops = TRUE;
}
else
{
@@ -3408,6 +3412,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
Window xwindow;
Window xparent;
Window root;
Window child;
Window *children;
guchar *data;
Window *vroots;
@@ -3420,6 +3425,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
gint i;
guint ww, wh, wb, wd;
gint wx, wy;
gboolean got_frame_extents = FALSE;
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (rect != NULL);
@@ -3445,15 +3451,62 @@ gdk_window_get_frame_extents (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (private))
return;
gdk_error_trap_push();
/* use NETWM_VIRTUAL_ROOTS if available */
display = gdk_drawable_get_display (window);
root = GDK_WINDOW_XROOTWIN (window);
nvroots = 0;
vroots = NULL;
gdk_error_trap_push();
display = gdk_drawable_get_display (window);
xwindow = GDK_WINDOW_XID (window);
/* first try: use _NET_FRAME_EXTENTS */
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_FRAME_EXTENTS"),
0, G_MAXLONG, False, XA_CARDINAL, &type_return,
&format_return, &nitems_return, &bytes_after_return,
&data)
== Success)
{
if ((type_return == XA_CARDINAL) && (format_return == 32) &&
(nitems_return == 4) && (data))
{
gulong *ldata = (gulong *) data;
got_frame_extents = TRUE;
/* try to get the real client window geometry */
if (XGetGeometry (GDK_DISPLAY_XDISPLAY (display), xwindow,
&root, &wx, &wy, &ww, &wh, &wb, &wd) &&
XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (display),
xwindow, root, 0, 0, &wx, &wy, &child))
{
rect->x = wx;
rect->y = wy;
rect->width = ww;
rect->height = wh;
}
/* _NET_FRAME_EXTENTS format is left, right, top, bottom */
rect->x -= ldata[0];
rect->y -= ldata[2];
rect->width += ldata[0] + ldata[1];
rect->height += ldata[2] + ldata[3];
}
if (data)
XFree (data);
}
if (got_frame_extents)
goto out;
/* no frame extents property available, which means we either have a WM that
is not EWMH compliant or is broken - try fallback and walk up the window
tree to get our window's parent which hopefully is the window frame */
/* use NETWM_VIRTUAL_ROOTS if available */
root = GDK_WINDOW_XROOTWIN (window);
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_VIRTUAL_ROOTS"),
@@ -3478,7 +3531,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
if (!XQueryTree (GDK_DISPLAY_XDISPLAY (display), xwindow,
&root, &xparent,
&children, &nchildren))
goto fail;
goto out;
if (children)
XFree (children);
@@ -3504,7 +3557,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
rect->height = wh;
}
fail:
out:
if (vroots)
XFree (vroots);
+21 -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,8 +53,14 @@ rm $DEVZIP
zip -r $DEVZIP -@ <<EOF
include/gtk-2.0
bin/gdk-pixbuf-csource.exe
bin/gtk-builder-convert
bin/gtk-demo.exe
bin/gtk-update-icon-cache.exe
man/man1/gdk-builder-convert.1
man/man1/gdk-pixbuf-csource.1
man/man1/gdk-update-icon-cache.1
man/man1/gtk-pixbuf-query-loaders.1
man/man1/gtk-query-immodules-2.0.1
lib/libgdk_pixbuf-@GTK_API_VERSION@.dll.a
lib/gdk_pixbuf-@GTK_API_VERSION@.lib
lib/libgdk-win32-@GTK_API_VERSION@.dll.a
+15 -9
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
@@ -47,7 +51,7 @@ endif
if OS_WIN32
gtk_def = gtk.def
gtk_win32_symbols = -export-symbols gtk.def
gtk_win32_symbols = -export-symbols $(srcdir)/gtk.def
gtk_win32_res = gtk-win32-res.o
gtk_win32_res_ldflag = -Wl,gtk-win32-res.o
@@ -56,7 +60,7 @@ gtk-win32-res.o : gtk-win32.rc
$(WINDRES) gtk-win32.rc $@
install-def-file: gtk.def
$(INSTALL) gtk.def $(DESTDIR)$(libdir)/gtk-win32-2.0.def
$(INSTALL) $(srcdir)/gtk.def $(DESTDIR)$(libdir)/gtk-win32-2.0.def
uninstall-def-file:
-rm $(DESTDIR)$(libdir)/gtk-win32-2.0.def
else
@@ -80,8 +84,10 @@ install-ms-lib:
uninstall-ms-lib:
endif
# This places the generated .def file in srcdir, since it is expected to be there.
# (The one from a tarball is)
gtk.def: gtk.symbols
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gtk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > gtk.def
(echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gtk.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > $(srcdir)/gtk.def
gtkalias.h: gtk.symbols
$(PERL) $(srcdir)/makegtkalias.pl < $(srcdir)/gtk.symbols > gtkalias.h
@@ -341,8 +347,6 @@ gtk_semi_private_h_sources = \
gtk_private_h_sources = \
gtkquery.h \
gtksearchengine.h \
gtksearchenginebeagle.h \
gtksearchenginetracker.h\
gtksearchenginesimple.h \
gtkdndcursors.h \
gtkentryprivate.h \
@@ -388,8 +392,6 @@ gtk_private_h_sources = \
gtk_base_c_sources = \
gtkquery.c \
gtksearchengine.c \
gtksearchenginebeagle.c \
gtksearchenginetracker.c\
gtksearchenginesimple.c \
fnmatch.c \
gtkaboutdialog.c \
@@ -626,7 +628,9 @@ gtk_os_unix_c_sources = \
gtkprintjob.c \
gtkprintoperation-unix.c \
gtkprintunixdialog.c \
gtkprintbackend.c
gtkprintbackend.c \
gtksearchenginebeagle.c \
gtksearchenginetracker.c
gtk_all_c_sources += $(gtk_os_unix_c_sources)
if OS_UNIX
gtk_private_h_sources += \
@@ -636,7 +640,9 @@ gtk_private_h_sources += \
gtkprinter-private.h \
gtkprinteroption.h \
gtkprinteroptionset.h \
gtkprinteroptionwidget.h
gtkprinteroptionwidget.h \
gtksearchenginebeagle.h \
gtksearchenginetracker.h
gtk_c_sources += $(gtk_os_unix_c_sources)
endif
+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'] = properties['label']
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,
+10 -4
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);
@@ -916,7 +921,8 @@ gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size)
{
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
if (action->private_data->stock_id)
if (action->private_data->stock_id &&
gtk_icon_factory_lookup_default (action->private_data->stock_id))
return gtk_image_new_from_stock (action->private_data->stock_id, icon_size);
else if (action->private_data->icon_name)
return gtk_image_new_from_icon_name (action->private_data->icon_name, icon_size);
+19 -15
View File
@@ -601,13 +601,13 @@ on_assistant_apply (GtkWidget *widget, GtkAssistant *assistant)
success = compute_next_step (assistant);
g_signal_emit (assistant, signals [APPLY], 0, priv->current_page->page);
g_signal_emit (assistant, signals [APPLY], 0);
/* if the assistant hasn't switched to another page, just emit
* the CLOSE signal, it't the last page in the assistant flow
*/
if (!success)
g_signal_emit (assistant, signals [CLOSE], 0, priv->current_page->page);
g_signal_emit (assistant, signals [CLOSE], 0);
}
static void
@@ -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
@@ -1110,16 +1113,16 @@ gtk_assistant_size_allocate (GtkWidget *widget,
/* Header */
gtk_widget_get_child_requisition (priv->header_image, &header_requisition);
header_allocation.x = allocation->x + GTK_CONTAINER (widget)->border_width + header_padding;
header_allocation.y = allocation->y + GTK_CONTAINER (widget)->border_width + header_padding;
header_allocation.x = GTK_CONTAINER (widget)->border_width + header_padding;
header_allocation.y = GTK_CONTAINER (widget)->border_width + header_padding;
header_allocation.width = allocation->width - 2 * GTK_CONTAINER (widget)->border_width - 2 * header_padding;
header_allocation.height = header_requisition.height;
gtk_widget_size_allocate (priv->header_image, &header_allocation);
/* Action area */
child_allocation.x = allocation->x + GTK_CONTAINER (widget)->border_width;
child_allocation.y = allocation->y + allocation->height -
child_allocation.x = GTK_CONTAINER (widget)->border_width;
child_allocation.y = allocation->height -
GTK_CONTAINER (widget)->border_width - priv->action_area->requisition.height;
child_allocation.width = allocation->width - 2 * GTK_CONTAINER (widget)->border_width;
child_allocation.height = priv->action_area->requisition.height;
@@ -1128,12 +1131,12 @@ gtk_assistant_size_allocate (GtkWidget *widget,
/* Sidebar */
if (rtl)
child_allocation.x = allocation->x + allocation->width -
child_allocation.x = allocation->width -
GTK_CONTAINER (widget)->border_width - priv->sidebar_image->requisition.width;
else
child_allocation.x = allocation->x + GTK_CONTAINER (widget)->border_width;
child_allocation.x = GTK_CONTAINER (widget)->border_width;
child_allocation.y = allocation->y + GTK_CONTAINER (widget)->border_width +
child_allocation.y = GTK_CONTAINER (widget)->border_width +
priv->header_image->allocation.height + 2 * header_padding;
child_allocation.width = priv->sidebar_image->requisition.width;
child_allocation.height = allocation->height - 2 * GTK_CONTAINER (widget)->border_width -
@@ -1142,8 +1145,8 @@ gtk_assistant_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (priv->sidebar_image, &child_allocation);
/* Pages */
child_allocation.x = allocation->x + GTK_CONTAINER (widget)->border_width + content_padding;
child_allocation.y = allocation->y + GTK_CONTAINER (widget)->border_width +
child_allocation.x = GTK_CONTAINER (widget)->border_width + content_padding;
child_allocation.y = GTK_CONTAINER (widget)->border_width +
priv->header_image->allocation.height + 2 * header_padding + content_padding;
child_allocation.width = allocation->width - 2 * GTK_CONTAINER (widget)->border_width - 2 * content_padding;
child_allocation.height = allocation->height - 2 * GTK_CONTAINER (widget)->border_width -
@@ -1519,7 +1522,8 @@ gtk_assistant_set_current_page (GtkAssistant *assistant,
* initial page is != to 0
*/
if (GTK_WIDGET_MAPPED (assistant))
priv->visited_pages = g_slist_prepend (priv->visited_pages, page);
priv->visited_pages = g_slist_prepend (priv->visited_pages,
priv->current_page);
set_current_page (assistant, page);
}
+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,
+14 -4
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)])
@@ -1417,7 +1417,10 @@ calendar_realize_week_numbers (GtkCalendar *calendar)
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
attributes.x = widget->style->xthickness + INNER_BORDER;
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
attributes.x = widget->style->xthickness + INNER_BORDER;
else
attributes.x = widget->allocation.width - priv->week_width - (widget->style->xthickness + INNER_BORDER);
attributes.y = (priv->header_h + priv->day_name_h
+ (widget->style->ythickness + INNER_BORDER));
attributes.width = priv->week_width;
@@ -1473,11 +1476,18 @@ gtk_calendar_realize (GtkWidget *widget)
| GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
| GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK);
attributes.x = priv->week_width + (widget->style->ythickness + INNER_BORDER);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
attributes.x = priv->week_width + (widget->style->ythickness + INNER_BORDER);
else
attributes.x = widget->style->ythickness + INNER_BORDER;
attributes.y = (priv->header_h + priv->day_name_h
+ (widget->style->ythickness + INNER_BORDER));
attributes.width = (widget->allocation.width - attributes.x
- (widget->style->xthickness + INNER_BORDER));
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
attributes.width -= priv->week_width;
attributes.height = priv->main_h;
priv->main_win = gdk_window_new (widget->window,
&attributes, attributes_mask);
+4 -3
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);
@@ -1105,7 +1105,8 @@ gtk_cell_view_buildable_custom_tag_start (GtkBuildable *buildable,
GMarkupParser *parser,
gpointer *data)
{
if (parent_buildable_iface->custom_tag_start (buildable, builder, child,
if (parent_buildable_iface->custom_tag_start &&
parent_buildable_iface->custom_tag_start (buildable, builder, child,
tagname, parser, data))
return TRUE;
@@ -1123,7 +1124,7 @@ gtk_cell_view_buildable_custom_tag_end (GtkBuildable *buildable,
if (strcmp (tagname, "attributes") == 0)
_gtk_cell_layout_buildable_custom_tag_end (buildable, builder, child, tagname,
data);
else
else if (parent_buildable_iface->custom_tag_end)
parent_buildable_iface->custom_tag_end (buildable, builder, child, tagname,
data);
}
+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);
+33 -19
View File
@@ -2273,6 +2273,10 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
{
/* list mode */
/* Combobox thickness + border-width */
int delta_x = shadow_width + GTK_CONTAINER (widget)->border_width;
int delta_y = shadow_height + GTK_CONTAINER (widget)->border_width;
/* button */
GTK_COMBO_BOX_SIZE_ALLOCATE_BUTTON
@@ -2281,36 +2285,44 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
child.x = allocation->x + req.width;
else
child.x = allocation->x;
child.y = allocation->y;
child.width = allocation->width - req.width;
child.height = allocation->height;
if (combo_box->priv->cell_view_frame)
{
child.width = MAX (1, child.width);
child.height = MAX (1, child.height);
child.x += delta_x;
child.y += delta_y;
child.width = MAX (1, child.width - delta_x * 2);
child.height = MAX (1, child.height - delta_y * 2);
gtk_widget_size_allocate (combo_box->priv->cell_view_frame, &child);
/* the sample */
if (combo_box->priv->has_frame)
{
child.x +=
GTK_CONTAINER (combo_box->priv->cell_view_frame)->border_width +
GTK_WIDGET (combo_box->priv->cell_view_frame)->style->xthickness;
child.y +=
GTK_CONTAINER (combo_box->priv->cell_view_frame)->border_width +
GTK_WIDGET (combo_box->priv->cell_view_frame)->style->ythickness;
child.width -= 2 * (
GTK_CONTAINER (combo_box->priv->cell_view_frame)->border_width +
GTK_WIDGET (combo_box->priv->cell_view_frame)->style->xthickness);
child.height -= 2 * (
GTK_CONTAINER (combo_box->priv->cell_view_frame)->border_width +
GTK_WIDGET (combo_box->priv->cell_view_frame)->style->ythickness);
}
if (combo_box->priv->has_frame)
{
delta_x = GTK_CONTAINER (combo_box->priv->cell_view_frame)->border_width +
GTK_WIDGET (combo_box->priv->cell_view_frame)->style->xthickness;
delta_y = GTK_CONTAINER (combo_box->priv->cell_view_frame)->border_width +
GTK_WIDGET (combo_box->priv->cell_view_frame)->style->ythickness;
child.x += delta_x;
child.y += delta_y;
child.width -= delta_x * 2;
child.height -= delta_y * 2;
}
}
else
{
child.x += delta_x;
child.y += delta_y;
child.width -= delta_x * 2;
child.height -= delta_y * 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 +3858,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 +5341,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));
+1 -1
View File
@@ -306,7 +306,7 @@ gtk_combo_box_entry_contents_changed (GtkEntry *entry,
*
* Creates a new #GtkComboBoxEntry which has a #GtkEntry as child. After
* construction, you should set a model using gtk_combo_box_set_model() and a
* text_column * using gtk_combo_box_entry_set_text_column().
* text column using gtk_combo_box_entry_set_text_column().
*
* Return value: A new #GtkComboBoxEntry.
*
+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);
+1
View File
@@ -504,6 +504,7 @@ gtk_entry_completion_init (GtkEntryCompletion *completion)
/* pack it all */
priv->popup_window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_resizable (GTK_WINDOW (priv->popup_window), FALSE);
gtk_window_set_type_hint(GTK_WINDOW(priv->popup_window), GDK_WINDOW_TYPE_HINT_COMBO);
g_signal_connect (priv->popup_window, "key_press_event",
G_CALLBACK (gtk_entry_completion_popup_key_event),
completion);
+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);
+15 -12
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
*/
@@ -2407,7 +2407,10 @@ out:
g_free (label_text);
}
else
gtk_label_set_text (GTK_LABEL (priv->label), _(FALLBACK_DISPLAY_NAME));
{
gtk_label_set_text (GTK_LABEL (priv->label), _(FALLBACK_DISPLAY_NAME));
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), NULL);
}
}
+156 -138
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
@@ -83,7 +84,7 @@
#include <time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <locale.h> /* LC_ALL */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -257,7 +258,7 @@ static const int num_file_list_source_targets = G_N_ELEMENTS (file_list_source_t
/* Target types for dropping into the file list */
static const GtkTargetEntry file_list_dest_targets[] = {
{ "text/uri-list", 0, TEXT_URI_LIST }
{ "text/uri-list", GTK_TARGET_OTHER_WIDGET, TEXT_URI_LIST }
};
static const int num_file_list_dest_targets = G_N_ELEMENTS (file_list_dest_targets);
@@ -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,
@@ -1040,7 +1037,7 @@ error_message_with_parent (GtkWindow *parent,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", detail);
if (parent->group)
if (parent && parent->group)
gtk_window_group_add_window (parent->group, GTK_WINDOW (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -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));
@@ -1700,38 +1691,44 @@ _gtk_file_chooser_label_for_uri (const gchar *uri)
gchar *host, *label;
start = strstr (uri, "://");
start += 3;
path = strchr (start, '/');
if (start)
{
start += 3;
path = strchr (start, '/');
if (path)
end = path;
else
{
end = uri + strlen (uri);
path = "/";
}
/* strip username */
p = strchr (start, '@');
if (p && p < end)
{
start = p + 1;
}
if (path)
end = path;
p = strchr (start, ':');
if (p && p < end)
end = p;
host = g_strndup (start, end - start);
/* Translators: the first string is a path and the second string
* is a hostname. Nautilus and the panel contain the same string
* to translate.
*/
label = g_strdup_printf (_("%1$s on %2$s"), path, host);
g_free (host);
}
else
{
end = uri + strlen (uri);
path = "/";
label = g_strdup (uri);
}
/* strip username */
p = strchr (start, '@');
if (p && p < end)
{
start = p + 1;
}
p = strchr (start, ':');
if (p && p < end)
end = p;
host = g_strndup (start, end - start);
/* Translators: the first string is a path and the second string
* is a hostname. Nautilus and the panel contain the same string
* to translate.
*/
label = g_strdup_printf (_("%1$s on %2$s"), path, host);
g_free (host);
return label;
}
@@ -2002,9 +1999,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 +2011,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 +2242,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 +3655,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
@@ -3777,14 +3789,13 @@ shortcuts_build_popup_menu (GtkFileChooserDefault *impl)
G_CALLBACK (rename_shortcut_cb), impl);
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (impl->browse_shortcuts_popup_menu), item);
shortcuts_check_popup_sensitivity (impl);
}
static void
shortcuts_update_popup_menu (GtkFileChooserDefault *impl)
{
shortcuts_build_popup_menu (impl);
shortcuts_check_popup_sensitivity (impl);
}
static void
@@ -3930,7 +3941,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 +3949,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 +4084,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))
@@ -4628,7 +4637,7 @@ create_file_list (GtkFileChooserDefault *impl)
GDK_BUTTON1_MASK,
file_list_source_targets,
num_file_list_source_targets,
GDK_ACTION_COPY);
GDK_ACTION_COPY | GDK_ACTION_MOVE);
g_signal_connect (selection, "changed",
G_CALLBACK (list_selection_changed), impl);
@@ -5144,6 +5153,14 @@ location_mode_set (GtkFileChooserDefault *impl,
static void
location_toggle_popup_handler (GtkFileChooserDefault *impl)
{
/* when in search or recent files mode, we are not showing the
* location_entry_box container, so there's no point in switching
* to it.
*/
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT)
return;
/* If the file entry is not visible, show it.
* If it is visible, turn it off only if it is focused. Otherwise, switch to the entry.
*/
@@ -6442,12 +6459,19 @@ static void
browse_files_select_first_row (GtkFileChooserDefault *impl)
{
GtkTreePath *path;
GtkTreeIter dummy_iter;
GtkTreeModel *tree_model;
if (!impl->sort_model)
return;
path = gtk_tree_path_new_from_indices (0, -1);
gtk_tree_view_set_cursor (GTK_TREE_VIEW (impl->browse_files_tree_view), path, NULL, FALSE);
tree_model = gtk_tree_view_get_model (GTK_TREE_VIEW (impl->browse_files_tree_view));
/* If the list is empty, do nothing. */
if (gtk_tree_model_get_iter (tree_model, &dummy_iter, path))
gtk_tree_view_set_cursor (GTK_TREE_VIEW (impl->browse_files_tree_view), path, NULL, FALSE);
gtk_tree_path_free (path);
}
@@ -6851,14 +6875,19 @@ update_chooser_entry (GtkFileChooserDefault *impl)
g_strdup (gtk_file_info_get_display_name (info));
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
change_entry = !gtk_file_info_get_is_folder (info); /* We don't want the name to change when clicking on a folder... */
else
change_entry = TRUE; /* ... unless we are in one of the folder modes */
change_entry = TRUE; /* ... unless we are in SELECT_FOLDER mode */
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;
}
@@ -6879,7 +6908,8 @@ update_chooser_entry (GtkFileChooserDefault *impl)
maybe_clear_entry:
if (impl->browse_files_last_selected_name)
if ((impl->action == GTK_FILE_CHOOSER_ACTION_OPEN || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
&& impl->browse_files_last_selected_name)
{
const char *entry_text;
int len;
@@ -8085,9 +8115,14 @@ confirm_dialog_should_accept_filename (GtkFileChooserDefault *impl,
folder_display_name);
gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"), GTK_STOCK_SAVE_AS, GTK_RESPONSE_ACCEPT);
add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"),
GTK_STOCK_SAVE_AS, GTK_RESPONSE_ACCEPT);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_ACCEPT,
GTK_RESPONSE_CANCEL,
-1);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
if (toplevel->group)
gtk_window_group_add_window (toplevel->group, GTK_WINDOW (dialog));
@@ -8193,23 +8228,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 +8622,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 +9866,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
@@ -10316,7 +10315,7 @@ shortcuts_activate_volume_mount_cb (GtkFileSystemHandle *handle,
char *msg;
msg = g_strdup_printf (_("Could not mount %s"),
gtk_file_system_volume_get_display_name (impl->file_system, volume));
gtk_file_system_volume_get_display_name (impl->file_system, volume));
error_message (impl, msg, error->message);
g_free (msg);
@@ -10327,8 +10326,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);
}
@@ -10407,14 +10404,11 @@ shortcuts_activate_get_info_cb (GtkFileSystemHandle *handle,
data->impl->shortcuts_activate_iter_handle = NULL;
if (cancelled)
if (cancelled || g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INTR))
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,
@@ -10435,7 +10429,9 @@ shortcuts_activate_iter (GtkFileChooserDefault *impl,
gpointer col_data;
ShortcutType shortcut_type;
if (impl->location_mode == LOCATION_MODE_FILENAME_ENTRY && impl->action != GTK_FILE_CHOOSER_ACTION_SAVE)
if (impl->location_mode == LOCATION_MODE_FILENAME_ENTRY
&& !(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), "");
gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), iter,
@@ -10482,25 +10478,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 +11003,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 +11126,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 +11298,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");
}
+121 -4
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
@@ -501,11 +523,9 @@ check_completion_callback (GtkFileChooserEntry *chooser_entry)
{
GDK_THREADS_ENTER ();
g_assert (chooser_entry->file_part);
chooser_entry->check_completion_idle = 0;
if (strcmp (chooser_entry->file_part, "") == 0)
if (chooser_entry->file_part == NULL || strcmp (chooser_entry->file_part, "") == 0)
goto done;
/* We only insert the common prefix without requiring the user to hit Tab in
@@ -696,6 +716,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 +894,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 +1020,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 +1165,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
+2 -2
View File
@@ -306,7 +306,7 @@ gtk_file_info_render_icon (const GtkFileInfo *info,
pixbuf = gtk_widget_render_icon (widget,
gtk_file_info_get_is_folder (info)
? GTK_STOCK_DIRECTORY : GTK_STOCK_FILE,
GTK_ICON_SIZE_SMALL_TOOLBAR,
GTK_ICON_SIZE_MENU,
NULL);
if (!pixbuf && error)
g_set_error (error,
@@ -670,7 +670,7 @@ gtk_file_system_volume_render_icon (GtkFileSystem *file_system,
if (!pixbuf)
pixbuf = gtk_widget_render_icon (widget,
GTK_STOCK_HARDDISK,
GTK_ICON_SIZE_SMALL_TOOLBAR,
GTK_ICON_SIZE_MENU,
NULL);
return pixbuf;
+3 -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;
}
@@ -1469,10 +1470,11 @@ expand_tilde (const char *filename)
home = passwd->pw_dir;
}
/* We put G_DIR_SEPARATOR_S so that empty basenames will make the resulting path end in a slash */
if (slash)
return g_build_filename (home, G_DIR_SEPARATOR_S, slash + 1, NULL);
else
return g_strdup (home);
return g_build_filename (home, G_DIR_SEPARATOR_S, NULL);
}
static gboolean
+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')
{
+56 -13
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);
@@ -6581,7 +6620,7 @@ gtk_icon_view_drag_data_get (GtkWidget *widget,
if (model == NULL)
return;
if (!icon_view->priv->dest_set)
if (!icon_view->priv->source_set)
return;
source_row = get_source_row (context);
@@ -6624,7 +6663,7 @@ gtk_icon_view_drag_data_delete (GtkWidget *widget,
if (!check_model_dnd (model, GTK_TYPE_TREE_DRAG_SOURCE, "drag_data_delete"))
return;
if (!icon_view->priv->dest_set)
if (!icon_view->priv->source_set)
return;
source_row = get_source_row (context);
@@ -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;
}
+11 -1
View File
@@ -1012,6 +1012,7 @@ gtk_im_context_simple_commit_char (GtkIMContext *context,
context_simple->tentative_match = 0;
context_simple->tentative_match_len = 0;
g_signal_emit_by_name (context_simple, "preedit_changed");
g_signal_emit_by_name (context_simple, "preedit_end");
}
g_signal_emit_by_name (context, "commit", &buf);
@@ -1355,6 +1356,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
context_simple->compose_buffer[0] = 0;
g_signal_emit_by_name (context_simple, "preedit_changed");
g_signal_emit_by_name (context_simple, "preedit_end");
}
return TRUE;
@@ -1364,7 +1366,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
}
/* Ignore modifier key presses */
for (i=0; i < G_N_ELEMENTS (gtk_compose_ignore); i++)
for (i = 0; i < G_N_ELEMENTS (gtk_compose_ignore); i++)
if (event->keyval == gtk_compose_ignore[i])
return FALSE;
@@ -1417,6 +1419,9 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
}
g_signal_emit_by_name (context_simple, "preedit_changed");
if (!context_simple->in_hex_sequence)
g_signal_emit_by_name (context_simple, "preedit_end");
return TRUE;
}
@@ -1450,6 +1455,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
context_simple->modifiers_dropped = FALSE;
context_simple->tentative_match = 0;
g_signal_emit_by_name (context_simple, "preedit_start");
g_signal_emit_by_name (context_simple, "preedit_changed");
return TRUE;
@@ -1508,6 +1514,9 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
g_signal_emit_by_name (context_simple, "preedit_changed");
if (!context_simple->in_hex_sequence)
g_signal_emit_by_name (context_simple, "preedit_end");
return TRUE;
}
}
@@ -1542,6 +1551,7 @@ gtk_im_context_simple_reset (GtkIMContext *context)
context_simple->tentative_match = 0;
context_simple->tentative_match_len = 0;
g_signal_emit_by_name (context_simple, "preedit_changed");
g_signal_emit_by_name (context_simple, "preedit_end");
}
}
+12 -24
View File
@@ -1213,6 +1213,8 @@ gtk_label_set_attributes_internal (GtkLabel *label,
static void
gtk_label_recalculate (GtkLabel *label)
{
guint keyval = label->mnemonic_keyval;
if (label->use_markup)
set_markup (label, label->label, label->use_underline);
else
@@ -1231,11 +1233,12 @@ gtk_label_recalculate (GtkLabel *label)
}
if (!label->use_underline)
{
guint keyval = label->mnemonic_keyval;
label->mnemonic_keyval = GDK_VoidSymbol;
label->mnemonic_keyval = GDK_VoidSymbol;
if (keyval != label->mnemonic_keyval)
{
gtk_label_setup_mnemonic (label, keyval);
g_object_notify (G_OBJECT (label), "mnemonic-keyval");
}
gtk_label_clear_layout (label);
@@ -1326,19 +1329,13 @@ void
gtk_label_set_label (GtkLabel *label,
const gchar *str)
{
guint last_keyval;
g_return_if_fail (GTK_IS_LABEL (label));
g_return_if_fail (str != NULL);
g_object_freeze_notify (G_OBJECT (label));
last_keyval = label->mnemonic_keyval;
gtk_label_set_label_internal (label, g_strdup (str));
gtk_label_recalculate (label);
if (last_keyval != label->mnemonic_keyval)
gtk_label_setup_mnemonic (label, last_keyval);
g_object_thaw_notify (G_OBJECT (label));
}
@@ -1454,18 +1451,15 @@ void
gtk_label_set_markup_with_mnemonic (GtkLabel *label,
const gchar *str)
{
guint last_keyval;
g_return_if_fail (GTK_IS_LABEL (label));
g_object_freeze_notify (G_OBJECT (label));
last_keyval = label->mnemonic_keyval;
gtk_label_set_label_internal (label, g_strdup (str ? str : ""));
gtk_label_set_use_markup_internal (label, TRUE);
gtk_label_set_use_underline_internal (label, TRUE);
gtk_label_recalculate (label);
gtk_label_setup_mnemonic (label, last_keyval);
g_object_thaw_notify (G_OBJECT (label));
}
@@ -2672,13 +2666,10 @@ gtk_label_parse_uline (GtkLabel *label,
const gchar *str)
{
guint keyval;
guint orig_keyval;
g_return_val_if_fail (GTK_IS_LABEL (label), GDK_VoidSymbol);
g_return_val_if_fail (str != NULL, GDK_VoidSymbol);
orig_keyval = label->mnemonic_keyval;
g_object_freeze_notify (G_OBJECT (label));
gtk_label_set_label_internal (label, g_strdup (str ? str : ""));
@@ -2688,9 +2679,12 @@ gtk_label_parse_uline (GtkLabel *label,
gtk_label_recalculate (label);
keyval = label->mnemonic_keyval;
label->mnemonic_keyval = GDK_VoidSymbol;
gtk_label_setup_mnemonic (label, orig_keyval);
if (keyval != GDK_VoidSymbol)
{
label->mnemonic_keyval = GDK_VoidSymbol;
gtk_label_setup_mnemonic (label, keyval);
g_object_notify (G_OBJECT (label), "mnemonic-keyval");
}
g_object_thaw_notify (G_OBJECT (label));
@@ -2717,8 +2711,6 @@ gtk_label_set_text_with_mnemonic (GtkLabel *label,
g_return_if_fail (GTK_IS_LABEL (label));
g_return_if_fail (str != NULL);
last_keyval = label->mnemonic_keyval;
g_object_freeze_notify (G_OBJECT (label));
gtk_label_set_label_internal (label, g_strdup (str ? str : ""));
@@ -2727,8 +2719,6 @@ gtk_label_set_text_with_mnemonic (GtkLabel *label,
gtk_label_recalculate (label);
gtk_label_setup_mnemonic (label, last_keyval);
g_object_thaw_notify (G_OBJECT (label));
}
@@ -3672,8 +3662,6 @@ gtk_label_set_use_underline (GtkLabel *label,
gtk_label_set_use_underline_internal (label, setting);
gtk_label_recalculate (label);
if (label->use_underline)
gtk_label_setup_mnemonic (label, label->mnemonic_keyval);
}
/**
+5 -1
View File
@@ -599,7 +599,11 @@ gtk_link_button_set_uri (GtkLinkButton *link_button,
link_button->priv->uri = g_strdup (uri);
g_free (tmp);
link_button->priv->visited = FALSE;
if (link_button->priv->visited)
{
link_button->priv->visited = FALSE;
set_link_color (link_button);
}
g_object_notify (G_OBJECT (link_button), "uri");
}
+23 -7
View File
@@ -2072,8 +2072,11 @@ list_store_start_element (GMarkupParseContext *context,
int i, id = -1;
if (data->row_column >= data->n_columns)
g_set_error (error, data->error_quark, 0,
"Too many columns, maximum is %d\n", data->n_columns - 1);
{
g_set_error (error, data->error_quark, 0,
"Too many columns, maximum is %d\n", data->n_columns - 1);
return;
}
for (i = 0; names[i]; i++)
if (strcmp (names[i], "id") == 0)
@@ -2081,13 +2084,26 @@ list_store_start_element (GMarkupParseContext *context,
errno = 0;
id = atoi (values[i]);
if (errno)
g_set_error (error, data->error_quark, 0,
"the id tag %s could not be converted to an integer", values[i]);
{
g_set_error (error, data->error_quark, 0,
"the id tag %s could not be converted to an integer",
values[i]);
return;
}
if (id < 0 || id >= data->n_columns)
{
g_set_error (error, data->error_quark, 0,
"id value %d out of range", id);
return;
}
}
if (id == -1)
g_set_error (error, data->error_quark, 0,
"<col> needs an id attribute");
{
g_set_error (error, data->error_quark, 0,
"<col> needs an id attribute");
return;
}
data->columns[data->row_column] = id;
data->row_column++;
@@ -2189,7 +2205,7 @@ list_store_text (GMarkupParseContext *context,
gint i;
GError *tmp_error = NULL;
gchar *string;
if (!data->is_data)
return;
+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 -15
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);
@@ -2725,7 +2729,6 @@ hide_drag_window (GtkNotebook *notebook,
else
gtk_widget_unparent (page->tab_label);
gtk_widget_set_parent_window (page->tab_label, widget->window);
gtk_widget_set_parent (page->tab_label, widget);
g_object_unref (page->tab_label);
}
@@ -2748,7 +2751,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 +2766,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 +4315,7 @@ gtk_notebook_real_remove (GtkNotebook *notebook,
GtkNotebookPage *page;
GList * next_list;
gint need_resize = FALSE;
GtkWidget *tab_label;
gboolean destroying;
@@ -4345,8 +4350,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 +4393,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 +6963,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 +7097,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,
+1
View File
@@ -113,6 +113,7 @@ gtk_page_setup_copy (GtkPageSetup *other)
copy = gtk_page_setup_new ();
copy->orientation = other->orientation;
gtk_paper_size_free (copy->paper_size);
copy->paper_size = gtk_paper_size_copy (other->paper_size);
copy->top_margin = other->top_margin;
copy->bottom_margin = other->bottom_margin;

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