Compare commits

...

450 Commits

Author SHA1 Message Date
Matthias Clasen 804989eb14 2.8.13 2006-02-25 04:44:43 +00:00
Matthias Clasen 074333942b Bump version 2006-02-25 02:09:17 +00:00
Inaki Larranaga 0e7f4d589c Updated Basque translation.
2006-02-23  Inaki Larranaga  <dooteo@euskalgnu.org>

	* eu.po:  Updated Basque translation.
2006-02-23 10:49:10 +00:00
Clytie Siddall 0ffe14c6f1 ka.po: Added Georgian translation. 2006-02-23 06:40:39 +00:00
Matthias Clasen 64c823eea4 Fix the build 2006-02-22 19:46:15 +00:00
Matthias Clasen f603303de0 Minor optimizations. (#332059, Arnaud Charlet)
2006-02-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c:
	* gtk/gtktextiter.c: Minor optimizations.  (#332059, Arnaud Charlet)
2006-02-22 17:53:43 +00:00
Matthias Clasen c2259c7d17 Emit notify::active here, when changing the value of this property.
2006-02-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkradiobutton.c (gtk_radio_button_clicked): Emit notify::active
	here, when changing the value of this property.  (#331651)
2006-02-22 17:31:40 +00:00
Matthias Clasen cba2d34927 Make the tab popup menu keynavigatable 2006-02-22 16:33:25 +00:00
Matthias Clasen f9a9726691 Change Close buttons to GTK_RESPONSE_CANCEL so Escape works. (#331940,
2006-02-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.c: Change Close buttons to GTK_RESPONSE_CANCEL
	so Escape works. (#331940, Daniel Drake)
2006-02-22 16:26:46 +00:00
Inaki Larranaga 17a389280a Updated Basque translation.
2006-02-21  Inaki Larranaga  <dooteo@euskalgnu.org>

	* eu.po: Updated Basque translation.
2006-02-21 13:15:10 +00:00
Matthias Clasen 418d1f8fe8 Properly update internal state when child visibility changes. (#331785,
2006-02-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtknotebook.c: Properly update internal state
        when child visibility changes.  (#331785, Sebastien Bacher)
2006-02-20 23:13:43 +00:00
Matthias Clasen b7657627a2 Obtain the background color from the gc when it is needed. (#331820)
2006-02-20  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (_gdk_gc_update_context): Obtain the
	background color from the gc when it is needed.  (#331820)

2006-02-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (_gdk_gc_update_context): Add a gc_changed
	argument, and avoid setting the clip region if the gc
	has not changed.

	* gdk/gdkgc.c: Update all callers.

	* gdk/gdkpango.c (get_cairo_context): Avoid updating the
	context if nothing changed.
2006-02-20 18:00:36 +00:00
Kostas Papadimas ec838304c6 Updated Greek translation 2006-02-20 11:09:10 +00:00
Tor Lillqvist c8d48a9df4 New function. Factor out code from gdk_window_shape_combine_mask().
2006-02-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (do_shape_combine_region): New
	function. Factor out code from gdk_window_shape_combine_mask().
	(gdk_window_shape_combine_region): Actually do something. Convert
	region to a HRGN and call do_shape_combine_region().
2006-02-20 10:22:34 +00:00
Benoît Dejean 312b36609a Updated French translation.
* fr.po: Updated French translation.
2006-02-18 12:50:43 +00:00
Matthias Clasen bdccc3fd1b Robustness fix 2006-02-17 15:36:03 +00:00
Federico Mena Quintero 4d31b716d5 Merged from HEAD:
2006-02-16  Federico Mena Quintero  <federico@novell.com>

	Merged from HEAD:

	* gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_map): Call
	::initial_focus() on the child before calling ::map() on our
	parent class.  This will prevent the shortcuts treeview from
	highlighting its first row as a result of getting assigned focus
	by gtk_dialog_map().
2006-02-16 18:35:47 +00:00
Maxim Dziumanenko d9b1d820db Updated Ukrainian translation.
2006-02-16  Maxim Dziumanenko <mvd@mylinux.ua>

	* Updated Ukrainian translation.
2006-02-16 14:39:49 +00:00
Matthias Clasen 8af4ae1969 Remove redundant check. Pointed out by Bodo-Merle Sandor.
2006-02-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_send_expose): Remove redundant
	check.  Pointed out by Bodo-Merle Sandor.
2006-02-14 14:34:08 +00:00
Matthias Clasen 2a3810c3c5 Add this to match realize. This fixes moving color buttons between
2006-02-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorbutton.c (gtk_color_button_unrealize): Add this
	to match realize. This fixes moving color buttons between
	screens.  (#331097, Oana Serb)
2006-02-14 13:47:39 +00:00
Miloslav Trmac 7657870ba2 Updated Czech translation.
2006-02-13  Miloslav Trmac  <mitr@volny.cz>

	* cs.po: Updated Czech translation.
2006-02-13 05:05:31 +00:00
Matthias Clasen b4e6e8fe52 Give working examples in the docs. (#330944, John Spray)
2006-02-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (gtk_icon_theme_list_icons): Give working
	examples in the docs.  (#330944, John Spray)
2006-02-13 02:33:31 +00:00
Matthias Clasen 8734bf8bc1 Fix row_spacing/column_spacing confusion. (#330732, Donald Straney)
2006-02-10  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkiconview.c (gtk_icon_view_get_item_at_coords): Fix
        row_spacing/column_spacing confusion.  (#330732, Donald Straney)
2006-02-11 23:28:13 +00:00
Matthias Clasen 019a24adbe Corrections 2006-02-11 18:32:01 +00:00
Matthias Clasen 9a9dd1b5eb Bump version, add forgotten NEWS 2006-02-11 18:06:45 +00:00
Matthias Clasen 98689ebb90 2.8.12 2006-02-11 17:43:23 +00:00
Matthias Clasen b7fe6a8932 Add some docs 2006-02-10 19:44:31 +00:00
Matthias Clasen f0187a9fe8 Add a section about atomicity of insertions. (#329831, Milosz Derezynski)
2006-02-10  Matthias Clasen  <mclasen@redhat.com>

        * gtk/tmpl/gtkliststore.sgml: Add a section about
        atomicity of insertions. (#329831, Milosz Derezynski)
2006-02-10 19:35:10 +00:00
Matthias Clasen 81ef262dff Guard against NULL. (#330177, Raphael Slinckx)
2006-02-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected):
	Guard against NULL.  (#330177, Raphael Slinckx)
2006-02-10 19:21:58 +00:00
Matthias Clasen 82fd3665ff Always check for NULL when using callbacks. (#330563, Benjamin Otte)
2006-02-10  Matthias Clasen  <mclasen@redhat.com>

        * io-jpeg.c:
        * io-png.c:
        * io-pnm.c:
        * io-tiff.c:
        * io-xbm.c:
        * io-xpm.c: Always check for NULL when using callbacks.
        (#330563, Benjamin Otte)
2006-02-10 19:01:02 +00:00
Matthias Clasen 567eb53e2c Improve combobox docs 2006-02-10 18:57:31 +00:00
Ross Burton 846082d7e9 Merged from HEAD:
2006-02-09  Ross Burton  <ross@burtonini.com>

	Merged from HEAD:

	* gtk/gtkfontbutton.c:
	Work out the font size in floating point, and display the font
	size with %g instead of %d (#317590)
2006-02-09 17:55:21 +00:00
Ross Burton e13264939d Doc fixes 2006-02-09 15:51:21 +00:00
Tor Lillqvist 8dee85c78f If we don't know where we went, and have generated a leave event, set
2006-02-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSELEAVE>: If we don't know where we went, and have
	generated a leave event, set current_window to the root
	window. This assures we will generate proper enter and leave
	events for popup windows. (#325521)
2006-02-09 05:47:53 +00:00
John Ehresman 22f85debbe gdk/win32/gdkevents-win32.c (gdk_event_translate) <WM_MOUSEACTIVATE> Call
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate)
	<WM_MOUSEACTIVATE>
	* gdk/win32/gdkwindow-win32.c (show_window_internal)
	(gdk_window_raise): Call SetWindowPos() instead of
	SetForegroundWindow() or BringWindowToTop() if the window
	shouldn't accept focus. (#327375)
2006-02-09 03:19:19 +00:00
John Ehresman 75d186d622 Let gdk_window_set_decorations() take precedence over anything derived
2006-02-08  John Ehresman  <jpe@wingware.com>

	* gdk/win32/gdkwindow-win32.c: Let gdk_window_set_decorations()
	take precedence over anything derived from hints. Restructure
	related code and logic, add some new helper functions. (#327217)
2006-02-09 02:42:53 +00:00
Matthias Clasen 957c5f0271 Don't put relevant callss in g_assert(). (#329876, Kristian Rietveld)
2006-02-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c: Don't put relevant callss
	in g_assert().  (#329876, Kristian Rietveld)
2006-02-08 19:32:38 +00:00
Žygimantas Beručka f8cf7a3da8 Updated Lithuanian translation.
2006-02-08  Žygimantas Beručka  <zygis@gnome.org>

        * lt.po: Updated Lithuanian translation.
2006-02-08 19:23:59 +00:00
Tor Lillqvist 70c468374f Consistenly use assign_object() when assigning GdkWindow pointers so that
2006-02-08  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab)
	(gdk_display_pointer_ungrab, gdk_keyboard_grab)
	(gdk_display_keyboard_ungrab): Consistenly use assign_object()
	when assigning GdkWindow pointers so that the ref counting doesn't
	get off whack.

	(gdk_event_translate) <WM_MOUSEMOVE>: When the pointer is grabbed
	with owner_events FALSE, generate enter and leave events only for
	the grab window. (#321054)
2006-02-08 17:26:59 +00:00
Matthias Clasen 86bf974f5e Copy the display_key as well. (#330389, Markku Vire)
2006-02-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystem.c (gtk_file_info_copy): Copy the display_key
	as well.  (#330389, Markku Vire)
2006-02-08 15:17:44 +00:00
Tor Lillqvist db673f0601 Drop the timestamp from the zipfile names.
2006-02-08  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: Drop the timestamp from the zipfile names.
2006-02-07 22:57:06 +00:00
Dom Lachowicz 6fbe064c50 Bug #330022 Wrong pixel values are computed when color = 0xFF and alpha =
* gdk/gdkcairo.c (gdk_cairo_set_source_pixbuf): Bug #330022
	Wrong pixel values are computed when color = 0xFF and alpha = 0xFF
2006-02-05 20:38:17 +00:00
Federico Mena Quintero ab34c90bc8 Merged from HEAD:
2006-02-03  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Work around https://bugs.freedesktop.org/show_bug.cgi?id=4320,
	which used to be our own
	http://bugzilla.gnome.org/show_bug.cgi?id=314616.  If one uses a
	pixmap for a pattern in Cairo, and sets the pattern to
	CAIRO_EXTEND_REPEAT; and if the destination surface is also a
	pixmap, Cairo does a slow copy instead of using XCopyArea().  So,
	we use the same code that we used in GTK+ 2.6 (pre-cairo), by
	filling the double-buffer pixmap with a tiled GC and
	XFillRectangle().

	* gdk/gdkwindow.c (BackingRectMethod): New structure with a
	cairo_t and a GdkGC field.  Depending on which of these fields
	gets filled in, we'll use Cairo or GDK to clear the double-buffer
	pixmap when painting a window.
	(setup_backing_rect_method): Fill a BackingRectMethod as
	appropriate, depending on the window's configuration and our
	knowledge of whether Cairo is fast or slow when doing repeating
	patterns.
	(gdk_window_clear_backing_rect): Call
	setup_backing_rect_method().  Depending on what it returns, use
	Cairo to clear the double-buffer pixmap, or plain GDK.
2006-02-03 21:20:06 +00:00
Rhys Jones ae109b239e Updated Welsh translation.
2006-02-03  Rhys Jones  <rhys@sucs.org>

	* cy.po: Updated Welsh translation.
2006-02-03 19:48:40 +00:00
Matthias Clasen 80b7f28196 Fix label padding 2006-02-03 05:39:08 +00:00
Matthias Clasen 3f9ea3ca8d Make drops on the root window work again. (#145243, Andrew S. Dixon)
2006-02-02  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display):
	Make drops on the root window work again.  (#145243, Andrew S. Dixon)
2006-02-02 20:55:17 +00:00
Leonid Kanter 6eda42cf2c Updated Russian translation 2006-02-02 16:36:07 +00:00
Vincent van Adrighem 32beb41ee3 Translation updated by Tino Meinen.
2006-02-02  Vincent van Adrighem  <adrighem@gnome.org>

	* nl.po: Translation updated by Tino Meinen.
2006-02-02 01:17:01 +00:00
Slobodan D. Sredojevic ed50efa126 Updated Serbian translation
2006-02-01  Slobodan D. Sredojevic  <slobo@akrep.be>

        * sr.po, sr@Latn.po: Updated Serbian translation
2006-02-01 00:20:58 +00:00
Matthias Clasen 77b3ba3efe Touch README and INSTALL here to pacify automake. (#329124, Kjartan
2006-01-31  Matthias Clasen  <mclasen@redhat.com>

	* autogen.sh: Touch README and INSTALL here to pacify
	automake.  (#329124, Kjartan Maraas, Tim Janik)
2006-01-31 17:36:50 +00:00
Leonid Kanter 95287bcaba Updated Russian translation 2006-01-31 15:47:39 +00:00
Matthias Clasen 544eea3561 Make sure the tree view is realized, since we grab the focus to it.
2006-01-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
	Make sure the tree view is realized, since we grab the
	focus to it.  (#329144, Wouter Bolsterlee)
2006-01-30 18:26:08 +00:00
Matthias Clasen 3d05b7c76b Use the setter for active. (#329208, Guillaume Cottenceau)
2006-01-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_set_property):
	Use the setter for active.  (#329208, Guillaume Cottenceau)
2006-01-30 15:28:52 +00:00
Laurent Dhima 6349d10ea2 Updated Albanian translation.
2006-01-30  Laurent Dhima  <laurenti@alblinux.net>

	* sq.po: Updated Albanian translation.
2006-01-30 10:22:47 +00:00
Dom Lachowicz d0d686eec3 Re-sync with gtk-wimp Ditto
* modules/engines/ms-windows/msw-style.c: Re-sync with gtk-wimp
	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Ditto
2006-01-29 03:27:14 +00:00
Duarte Loreto 6c2be9244b Updated Portuguese translation.
2006-01-28  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Updated Portuguese translation.
2006-01-28 12:39:20 +00:00
Nguyen Thai Ngoc Duy 6298981815 Removed redundant colons 2006-01-28 12:10:41 +00:00
Nguyen Thai Ngoc Duy 57259b1a82 Updated Vietnamese translation 2006-01-28 06:58:02 +00:00
Behdad Esfahbod a3482bfc4c Fix misalignment of RTL text in ellipsized GtkLabel: use layout width if
2006-01-27  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtklabel.c (get_layout_location): Fix misalignment of RTL
        text in ellipsized GtkLabel: use layout width if set, otherwise
        fallback to logical extents width. (#322042, merged from HEAD)
2006-01-27 18:58:42 +00:00
Changwoo Ryu 7ee9b7cec7 Updated Korean translation.
2006-01-28  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.
2006-01-27 18:17:12 +00:00
Matthias Clasen 31c60854a8 Bump version 2006-01-27 17:47:04 +00:00
Matthias Clasen 304cec307a 2.8.11 2006-01-27 17:37:11 +00:00
Federico Mena Quintero 566e1f38b1 Merged from HEAD:
2006-01-27  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Fixes bug #328820:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_class_init): Make GDK_KP_Divide pop up
	the location dialog populated to "/".
	(tree_view_keybinding_cb): Likewise.
	(trap_activate_cb): Likewise.
2006-01-27 17:25:12 +00:00
Matthias Clasen 85b61ac092 2.8.11 2006-01-27 17:15:23 +00:00
Evandro Fernandes Giovanini 17b077c6c3 Updated Brazilian Portuguese translation.
2006-01-27  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation.
2006-01-27 08:46:03 +00:00
Matthias Clasen 49bd646225 Be more careful when blocking signals.
2006-01-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c:
	* gtk/gtkentry.c: Be more careful when blocking signals.
2006-01-25 18:30:58 +00:00
Alexander Shopov 31a41ccf27 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2006-01-22  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>
2006-01-22 18:42:44 +00:00
Gabor Kelemen c7f548984c Hungarian translation updated.
2006-01-22  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Hungarian translation updated.
2006-01-22 18:29:05 +00:00
Francisco Javier F. Serrador e7be150752 Updated Spanish translation.
2006-01-21  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* es.po: Updated Spanish translation.
2006-01-21 20:01:49 +00:00
Josep Puigdemont i Casamajó 9bdf99b219 Updated Catalan translation. 2006-01-21 17:14:33 +00:00
Funda Wang acc3f3afdb Updated gtk+-properties translation. 2006-01-21 14:34:01 +00:00
Matthias Clasen 0f762f13c0 Don't crash if layout is NULL. (#327934, Christian Kirbach)
2006-01-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_set_virtual_cursor_pos): Don't
	crash if layout is NULL.  (#327934, Christian Kirbach)
2006-01-21 04:01:32 +00:00
Dan Winship a1cb4e7d81 On "unix", pop up the "Open Location" window on "~" as well as "/".
* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_class_init,
	tree_view_keybinding_cb, trap_activate_cb): On "unix", pop up the
	"Open Location" window on "~" as well as "/". #153213
	(location_entry_create): Fix this so autocompletion still works
	correctly in that case.
(ok'ed by federico)
2006-01-20 19:11:31 +00:00
Matthias Clasen d8711720a3 Explicitly link against Xrender. (#327538, Christophe Belle)
2006-01-19  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Explicitly link against Xrender.
	(#327538, Christophe Belle)
2006-01-20 04:58:37 +00:00
Matthias Clasen fed4bafdbd Fix attribution 2006-01-20 04:40:18 +00:00
Matthias Clasen c9473ebd35 Use an unused high bit in the XID to mark fonts in the global xid hash
2006-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkprivate-x11.h (XID_FONT_BIT):
	* gdk/x11/gdkfont-x11.c:
	* gdk/x11/gdkxid.c: Use an unused high bit in the
	XID to mark fonts in the global xid hash table.

	* gdk/x11/gdkcursor-x11.c (update_cursor): Skip fonts
	when iterating over the xid hash table, since calling
	GDK_IS_WINDOW () on an GdkFont can cause a segfault.
	(#327751, Ryan Lortie)
2006-01-20 04:39:43 +00:00
Ankitkumar Rameshchandra Patel d8a5439f4d Updated Gujarati Translations 2006-01-19 07:14:52 +00:00
Matthias Clasen 7a83f3cf44 Remove ang from ALL_LINGUAS 2006-01-18 14:32:12 +00:00
Erdal Ronahi d8123eed06 Added initial Kurdish translations. 2006-01-17 22:53:51 +00:00
Ignacio Casal Quinteiro 3d5a0db24b *** empty log message *** 2006-01-17 20:31:00 +00:00
Matthias Clasen c123513ba8 If the src positions for gradients are nonsensical, don't render anything,
2006-01-17  Matthias Clasen  <mclasen@redhat.com>

	* pixbuf-render.c: If the src positions for gradients
	are nonsensical, don't render anything, rather than
	read out of bounds.
2006-01-17 20:04:12 +00:00
Takeshi AIHANA 85af879562 Updated Japanese translation for HEAD.
2006-01-17  Takeshi AIHANA <takeshi.aihana@gmail.com>

	* ja.po: Updated Japanese translation for HEAD.
2006-01-17 15:15:58 +00:00
Kwok-Koon Cheung c5d32ae04c New Chinese (Hong Kong) translation
* zh_HK.po: New Chinese (Hong Kong) translation
2006-01-17 00:07:44 +00:00
Abel Cheung 2e3c08765a Added "ang" "zh_HK" to ALL_LINGUAS.
2006-01-16  Abel Cheung  <maddog@linuxhall.org>

	* configure.in: Added "ang" "zh_HK" to ALL_LINGUAS.
2006-01-17 00:01:34 +00:00
Kwok-Koon Cheung 42b0e4460d New Chinese (Hong Kong) translation Updated Chinese (Taiwan) translation
* zh_HK.po: New Chinese (Hong Kong) translation
	* zh_TW.po: Updated Chinese (Taiwan) translation
2006-01-16 23:48:44 +00:00
Ilkka Tuohela 2b0a6009af Updated Finnish translation 2006-01-16 18:07:34 +00:00
Matthias Clasen cadbf07d53 Silence the compiler.
2006-01-16  Matthias Clasen  <mclasen@redhat.com>

	* pixbuf-draw.c (draw_gap_image): Silence the
	compiler.
2006-01-16 13:19:34 +00:00
Amanpreet Singh Alam e14a4cd0c1 update for changes in file for Punjabi Language 2006-01-16 00:48:34 +00:00
Vincent van Adrighem 43be0bb532 Translation updated by Tino Meinen.
2006-01-15  Vincent van Adrighem  <adrighem@gnome.org>

	* nl.po: Translation updated by Tino Meinen.
2006-01-15 17:06:51 +00:00
Matthias Clasen 7b428f0215 Fix a crash with combo boxes in RESIZE_IMMEDIATE containers. (#326806,
2006-01-14  Matthias Clasen  <mclasen@redhat.com>

	Fix a crash with combo boxes in RESIZE_IMMEDIATE
	containers.  (#326806, Sebastian Bacher)

	* gtk/gtkcombobox.c (gtk_combo_box_size_allocate)
	(gtk_combo_box_size_request): Don't call
	gtk_combo_box_check_appearance() from here, as that
	can lead to recursion.
	(gtk_combo_box_init): Instead, call it here.
2006-01-15 04:09:50 +00:00
Christian Rose ed07d77d56 Updated Swedish translation.
2006-01-14  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2006-01-14 11:33:17 +00:00
Matthias Clasen 0cb610fbee Make this work on more platforms.
2006-01-13  Matthias Clasen  <mclasen@redhat.com>

	* */abicheck.sh: Make this work on more platforms.
2006-01-14 04:46:50 +00:00
Clytie Siddall d66efae8e0 vi.po: Updated Vietnamese translation. 2006-01-14 04:10:16 +00:00
Francisco Javier F. Serrador fdf0afc1c2 Updated Spanish translation.
2006-01-14  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* es.po: Updated Spanish translation.
2006-01-14 00:59:59 +00:00
Kjartan Maraas 1bae6cdf3d Updated Norwegian bokmål translation. Same.
2006-01-13  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.
	* no.po: Same.
2006-01-13 10:13:44 +00:00
Matthias Clasen 07887a259d Reset the virtual cursor position. (#326003, Evert Verhellen)
2006-01-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_commit_text)
	(gtk_text_view_delete_from_cursor, gtk_text_view_backspace):
	Reset the virtual cursor position.  (#326003, Evert Verhellen)
2006-01-12 21:15:30 +00:00
Federico Mena Quintero a05c0e2985 Merged from HEAD:
2006-01-12  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gdk-pixbuf-util.c (gdk_pixbuf_saturate_and_pixelate): Clarify
	the docs ("darkened/brightened" is not "saturation").
2006-01-12 20:20:18 +00:00
Matthias Clasen 6f2ece32ae Bump version 2006-01-11 21:49:07 +00:00
Matthias Clasen 8f34c4566a 2.8.10 2006-01-11 21:45:49 +00:00
Matthias Clasen 1694f20422 2.8.10 2006-01-11 20:45:49 +00:00
Matthias Clasen 610e9628e0 Forgotten log 2006-01-11 18:17:51 +00:00
Adam Weinberger 9bddf4d83b Updated Canadian English translation.
2006-01-11  Adam Weinberger  <adamw@gnome.org>

	* en_CA.po: Updated Canadian English translation.
2006-01-11 17:35:32 +00:00
Matthias Clasen 90c910e244 Add some notify batching, always emit notify after setting the new value.
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c: Add some notify batching, always
	emit notify after setting the new value.
2006-01-11 16:14:10 +00:00
Matthias Clasen 7aeb1bb515 Clean up properly if the grab fails. (finish_drag): Don't leak a reference
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (create_moveresize_window): Clean
	up properly if the grab fails.
	(finish_drag): Don't leak a reference to moveresize_window
	here.
2006-01-11 14:56:11 +00:00
Matthias Clasen 98179253db Allow falling back to another icon theme before hicolor. (#325546, Rodney
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	Allow falling back to another icon theme before
	hicolor.   (#325546, Rodney Dawes)

	* gtk/gtksettings.c: Add a gtk-fallback-icon-theme setting.

	* gdk/x11/gdkevents-x11.c: Map it to the XSetting Net/FallbackIconTheme.

	* gtk/gtkicontheme.c: Consult the fallback icon theme before
	looking in hicolor.
2006-01-11 06:30:38 +00:00
Matthias Clasen 1583ef9c21 Queue a draw when losing the focus. (#326064, Andrew Conkling)
2006-01-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_focus_out): Queue a draw
	when losing the focus.  (#326064, Andrew Conkling)
2006-01-11 03:49:28 +00:00
Matthias Clasen 445bee04e3 Remove duplicate include. (#326429, Benoît Carpentier)
2006-01-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.h: Remove duplicate include.  (#326429,
	Benoît Carpentier)
2006-01-10 19:51:54 +00:00
Matthias Clasen 4a784ff2f9 Make GtkEntryCompletion complete on pastes at the end. (#165714, Christian
2006-01-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (paste_received): Make GtkEntryCompletion
	complete on pastes at the end.  (#165714, Christian Neumair)
2006-01-10 04:11:40 +00:00
Matthias Clasen cc346bfdb4 Prevent the first row being focused on map. (#137351, Niklas Knutsson)
2006-01-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup):
	Prevent the first row being focused on map.  (#137351,
	Niklas Knutsson)
2006-01-09 19:24:32 +00:00
Matthias Clasen a3e8e32299 Don't translate empty strings. (#326200, Christian Stimming)
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkactiongroup.c (dgettext_swapped): Don't translate
        empty strings.  (#326200, Christian Stimming)
2006-01-08 23:26:34 +00:00
Changwoo Ryu 9ddec60c3a Updated Korean translation.
2006-01-08  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.
2006-01-08 13:28:38 +00:00
Matthias Clasen 42edcf8a77 Fix label alignment when width-chars is set. (#326098, Benjamin Otte)
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (get_layout_location): Fix label alignment
	when width-chars is set.  (#326098, Benjamin Otte)
2006-01-08 06:45:57 +00:00
Matthias Clasen a9be5ddf14 Add missing property change notification.
2006-01-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkactiongroup.c (gtk_action_group_set_sensitive)
	(gtk_action_group_set_visible): Add missing property change
	notification.
2006-01-07 04:23:33 +00:00
Matthias Clasen 826ee8cf39 Just use the directory name for the home dir. (#325817, Federico Mena
2006-01-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c (model_add_special): Just use the
	directory name for the home dir.  (#325817, Federico Mena Quintero)
2006-01-06 21:54:46 +00:00
Matthias Clasen 1a51d66459 Initialize editable to TRUE. (gtk_text_tag_class_init): The default value
2006-01-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttag.c (gtk_text_attributes_new): Initialize editable
	to TRUE.
	(gtk_text_tag_class_init): The default value for the direction
	property is GTK_TEXT_DIR_NONE. Add notes about the initial values
	of the font and language properties.
2006-01-06 17:55:01 +00:00
Matthias Clasen 01cc3a42ca Make clicked an action signal. (#325782, Martyn Russell)
2006-01-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbutton.c (gtk_tool_button_class_init): Make clicked
	an action signal.  (#325782, Martyn Russell)
2006-01-06 15:17:20 +00:00
Matthias Clasen a0ae4d95fd Disconnect from the old adjustments signals. (#325869, Jorn Baayen)
2006-01-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkviewport.c (viewport_set_adjustment): Disconnect from
	the old adjustments signals.  (#325869, Jorn Baayen)
2006-01-06 14:05:17 +00:00
Josep Puigdemont i Casamajó de25ca5ebc Updated Catalan translation. 2006-01-06 12:50:27 +00:00
Matthias Clasen 11a1ada618 Updates 2006-01-06 06:25:53 +00:00
Rajesh Ranjan 91c83ea4f0 updated hindi 2006-01-06 06:07:11 +00:00
Rajesh Ranjan fdbf1f36a5 updated hindi 2006-01-06 05:19:31 +00:00
Johan Dahlin 41b718b24d Set minimum for activity-step property to 0 instead of -G_MAXUINT.
* gtk/gtkprogressbar.c: Set minimum for activity-step property to 0
    instead of -G_MAXUINT.
2006-01-05 20:07:38 +00:00
Matthias Clasen 01c32828f0 Don't return a list of NULLs. (#325723, Steve Chaplin)
2006-01-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c (gtk_ui_manager_get_toplevels): Don't return
	a list of NULLs.  (#325723, Steve Chaplin)
2006-01-04 15:35:08 +00:00
Matthias Clasen aa79f10539 Make it build 2006-01-04 12:44:56 +00:00
Tor Lillqvist 5acd528ee6 Include also the gtk20-properties message catalogs.
2006-01-04  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: Include also the gtk20-properties message catalogs.
2006-01-04 01:42:38 +00:00
Francisco Javier F. Serrador e1e6c7ddf1 Updated Spanish translation.
2006-01-03  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* es.po: Updated Spanish translation.
2006-01-03 22:04:48 +00:00
Matthias Clasen 7a33528133 Call gtk_drag_update for non-motion events. (#325443, Peter Harvey)
2006-01-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_begin_internal): Call gtk_drag_update
	for non-motion events.  (#325443, Peter Harvey)

2
2006-01-03 13:51:44 +00:00
Matthias Clasen 5a3c267b79 When deleting words, delete preceding whitespace as well. (#325358, Akkana
2006-01-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_delete_from_cursor): When deleting
	words, delete preceding whitespace as well.  (#325358, Akkana Peck)
2006-01-03 03:58:19 +00:00
Tor Lillqvist dad73781b7 Make identical to the X11 implementation. (#322264, John Ehresman)
2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_impl_win32_get_visible_region): Make identical to the
	X11 implementation. (#322264, John Ehresman)
2006-01-02 09:29:42 +00:00
Tor Lillqvist 3750d5da6b Get the invalidated region from ScrollWindowEx() instead of an incorrect
2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
	invalidated region from ScrollWindowEx() instead of an incorrect
	attempt to calculate it ourselves. Fix by John Ehresman. (#323666)

	* gdkevents-win32.c: Make _gdk_win32_hrgn_to_region() non-static.

	* gdkprivate-win32.h: Declare it.
2006-01-02 00:32:12 +00:00
Clytie Siddall 280769a542 vi.po: Updated Vietnamese translation. 2006-01-01 04:39:21 +00:00
Matthias Clasen bd3c206d76 Add deprecation note to gtk_exit() (#325199, Ævar Arnfjörð Bjarmason)
2005-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/tmpl/gtkmain.sgml: Add deprecation note to
	gtk_exit()  (#325199, Ævar Arnfjörð Bjarmason)
2005-12-30 05:01:14 +00:00
Gustavo Noronha Silva 147d53a883 translation update by Claudio André <claudio.andre@correios.net.br> 2005-12-29 21:52:05 +00:00
Clytie Siddall 05abc38a5c vi.po: Updated Vietnamese translation. 2005-12-29 07:34:46 +00:00
Nikos Charonitakis 38a4720d7a Updated Greek translation 2005-12-28 23:55:43 +00:00
Federico Mena Quintero 29f78aaaa2 Merged from HEAD:
2005-12-27  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gtk/gtkfilefilter.c (gtk_file_filter_filter): In the case for
	FILTER_RULE_PIXBUF_FORMATS, check that filter_info->mime_type is
	not NULL.  Fixes bug #317687.
2005-12-27 18:34:28 +00:00
Matthias Clasen cd7dee798b Clarify docs. (#324996)
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimcontext.c (gtk_im_context_filter_keypress): Clarify
	docs.  (#324996)
2005-12-27 00:13:15 +00:00
Tim Janik 80732f59bf derive GtkObject from GUnowned if possible. gtk_object_class_init():
Thu Dec 22 17:30:59 2005  Tim Janik  <timj@gtk.org>

        * gtk/gtkobject.c: derive GtkObject from GUnowned if possible.
        gtk_object_class_init(): install a floating flag handler with
        libgobject, so for GtkObjects the flag is stored as GTK_FLOATING
        in the ->flags member.

        * configure.in: depend on GLib-2.8.5.
2005-12-22 16:46:51 +00:00
Matthias Clasen ea7f2b23d0 Adjust the wrap-width also if an explicit item width is set. (#322475,
2005-12-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (adjust_wrap_width): Adjust the
	wrap-width also if an explicit item width is set.
	(#322475, Alex Graveley)
2005-12-21 18:15:52 +00:00
Nikos Charonitakis 4bdac8d5fb Updated Greek translation 2005-12-21 15:33:12 +00:00
Matthias Clasen 5176fa307f Reset pressed_button to -1 after handling a double click, so that motion
2005-12-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_button_press): Reset
	pressed_button to -1 after handling a double click, so that
	motion events occurring between here and the release event
	don't trigger DND.  (#324588, Dave Andreoli)
2005-12-20 18:20:04 +00:00
Francisco Javier F. Serrador b0b106dbe0 Updated Spanish translation.
2005-12-18  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* es.po: Updated Spanish translation.
2005-12-18 21:58:46 +00:00
Christophe Merlet 0979f16b36 Updated French translation. 2005-12-14 22:09:17 +00:00
Matthias Clasen 0de720551c Skip unrealized children when doing focus sorting. (#323995, Dan Winship)
2005-12-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcontainer.c (_gtk_container_focus_sort): Skip unrealized
	children when doing focus sorting.  (#323995, Dan Winship)
2005-12-14 19:42:47 +00:00
Rodney Dawes 8c877d6688 Default to "drive-harddisk" and then fall back to gnome-dev-harddisk
2005-12-14  Rodney Dawes  <dobey@novell.com>

	* gtk/gtkfilesystemunix.c (gtk_file_system_unix_volume_render_icon):
	Default to "drive-harddisk" and then fall back to gnome-dev-harddisk
	(get_icon_for_mime_type): Look up the mime type icons according to the
	Icon Naming Specification and then fall back to the gnome-mime- prefix
	for the mime type icons

	Fixes #323655
2005-12-14 19:32:04 +00:00
Matthias Clasen 2d5b575ea0 Warn if the icon cannot be loaded. (#323504, Kjartan Maraas)
2005-12-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon
	cannot be loaded.  (#323504, Kjartan Maraas)
2005-12-14 19:12:37 +00:00
Matthias Clasen 5cfa6eece0 Add docs for the row-activated signal. (#324044, Davyd Madeley)
2005-12-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_class_init): Add docs
	for the row-activated signal.  (#324044, Davyd Madeley)
2005-12-14 18:14:45 +00:00
Michael Natterer 077d0fe81f Move stuff to correct ChangeLog. 2005-12-14 16:39:07 +00:00
Michael Natterer d564a49fc2 Merged from HEAD:
2005-12-14  Michael Natterer  <mitch@imendio.com>

	Merged from HEAD:

	* gdk-pixbuf/io-jpeg.c: applied patch from maemo-gtk which avoids
	the allocation of an intermediate buffer for non-progressive
	jpegs. Fixed bug #305894.

	* tests/test-images/valid_jpeg_progressive_test: new test image so
	we can test both loading code paths in io-jpeg.c
2005-12-14 14:58:59 +00:00
Sunil Mohan Adapa da3d56fc1a Updated Telugu translations done by Prajasakti Localisation Team <localisation@prajasakti.com>. 2005-12-14 07:37:30 +00:00
Matthias Clasen 928a0da8d2 Speed this function up, using the fact that visibility is constant across
2005-12-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_set_visible_line_index):
	Speed this function up, using the fact that visibility is
	constant across segments. (#321548, Paolo Borelli)
2005-12-12 19:35:35 +00:00
Matthias Clasen 4e40304798 Only broadcast _GTK_LOAD_ICONTHEMES if we detect a real theme change, not
2005-12-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (ensure_valid_themes): Only broadcast
	_GTK_LOAD_ICONTHEMES if we detect a real theme change, not
	upon initial theme load.  (#323876, Peter Lund)
2005-12-12 17:41:54 +00:00
Matthias Clasen 2da547c535 Don't fall thru to the wrong window types. (#323843)
2005-12-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_get_border_window_size): Don't
	fall thru to the wrong window types.  (#323843)
2005-12-12 17:04:55 +00:00
Christophe Merlet 7881702108 Updated French Translation. 2005-12-11 21:37:43 +00:00
Alessio Frusciante 31fe7a4f10 Updated Italian translation. 2005-12-11 18:52:37 +00:00
Matthias Clasen 5a6c501d30 Bump version 2005-12-09 23:47:14 +00:00
Matthias Clasen 5b8d9bfc84 2.8.9 2005-12-09 23:35:05 +00:00
Žygimantas Beručka fc5a193edf Updated Lithuanian translation.
2005-12-09  Žygimantas Beručka  <zygis@gnome.org>

        * lt.po: Updated Lithuanian translation.
2005-12-09 16:43:35 +00:00
Matthias Clasen ee9f3aed90 Updates 2005-12-09 16:37:30 +00:00
Matthias Clasen e0e19dd998 Don't leak list[0]. (#323629, Markku Vire)
2005-12-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkselection.c (gtk_selection_data_get_uris): Don't
        leak list[0].  (#323629, Markku Vire)
2005-12-09 16:24:48 +00:00
Matthias Clasen 9eb8b2af91 Unref the buffer when freeing the RequestData. (#323577)
2005-12-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextbuffer.c (paste_from_buffer): Unref the buffer
        when freeing the RequestData.  (#323577)
2005-12-09 16:08:09 +00:00
Matthias Clasen e0ee2c256f Updates 2005-12-08 05:23:39 +00:00
Matthias Clasen c3624ad401 Don't leak text.
2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* demos/gtk-demo/iconview_edit.c (set_cell_color): Don't
	leak text.
2005-12-07 20:05:11 +00:00
Matthias Clasen dca0fb1fa2 Fix a variable name clash. (#323475, Ross Burton)
2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbutton.c (clone_image_menu_size): Fix a
	variable name clash.  (#323475, Ross Burton)
2005-12-07 18:02:19 +00:00
Matthias Clasen d70a7476cd Use the correct window when synthesizing the key event. (#323077, Sadrul
2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Use the correct
	window when synthesizing the key event.  (#323077,
	Sadrul Habib Chowdhury)

	(gtk_tree_view_search_key_press_event): Also listen for
	GDK_ISO_Left_Tab.  (#323077, Sadrul Habib Chowdhury)
2005-12-07 17:11:53 +00:00
Ross Burton f1e45e5fc2 If the toolbar mode is ICONS and there is no icon set then show the label, and vice versa (#322019) 2005-12-07 17:07:42 +00:00
Matthias Clasen 05c3415a5b Only scroll if we have focus. (#316310, Paolo Borelli)
2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c (gtk_text_view_preedit_changed_handler):
	Only scroll if we have focus.  (#316310, Paolo Borelli)
2005-12-07 15:28:18 +00:00
Matthias Clasen 0aebad6b4b Fix a C99ism, spotted by Crispin Flowerday.
2005-12-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (cb_fill_in_mime_type): Fix a
	C99ism, spotted by Crispin Flowerday.
2005-12-07 14:02:18 +00:00
Behdad Esfahbod 37fd53219d Turn metrics hinting on (part of #307196)
2005-12-06  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtksettings.c (settings_update_font_options): Turn metrics
        hinting on (part of #307196)
2005-12-07 02:49:15 +00:00
Matthias Clasen 869351ad8a Fix refcounting issues with new_event and its window.
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Fix refcounting
	issues with new_event and its window.
2005-12-06 18:02:18 +00:00
Matthias Clasen 0ba88e0fb0 Accept NULL as a detach func. (#323386, Jorn Baayen)
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Accept NULL
	as a detach func.  (#323386, Jorn Baayen)
2005-12-06 17:27:42 +00:00
Matthias Clasen 61b892d23e Avoid conflict with win32 headers in the libdate routines. (#323045,
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c: Avoid conflict with win32 headers in
	the libdate routines.  (#323045, Kazuki Iwamoto)
2005-12-06 17:06:57 +00:00
Matthias Clasen 3584677939 Don't ignore errors from g_option_context_parse().
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c (gdk_parse_args):
	* gtk/gtkmain.c (gtk_parse_args): Don't ignore errors
	from g_option_context_parse().
2005-12-06 16:14:31 +00:00
Matthias Clasen b7b750b05b Make it compile against GLib 2.9:
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	Make it compile against GLib 2.9:

	* gtk/gtkclist.h:
	* gtk/gtkstatusbar.h: Replace uses of GMemChunk* in public
	headers by gpointer.

	* gtk/gtkclist.c:
	* gtk/gtkctree.c:
	* gtk/gtkstatusbar.c: Add GMemChunk* casts as necessary.
2005-12-06 14:25:35 +00:00
Federico Mena Quintero e6a5410fb5 Merged from HEAD:
2005-12-05  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gtk/gtkfilechooserdefault.c (trap_activate_cb): "event->state &
	modifiers", not "event->state && modifiers".  Patch by Sadrul
	Habib Chowdhury <imadil@gmail.com>.  Fixes bug #323073.
2005-12-06 03:11:51 +00:00
Matthias Clasen 241fd6dda6 Free new_event after sending it to the search entry. (#323209, Crispin
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Free new_event
	after sending it to the search entry.  (#323209, Crispin Flowerday)
2005-12-05 20:16:03 +00:00
Takeshi AIHANA 34e5c8510c Fixed translation of "Widget" and "Index" reported by kano@na.rim.or.jp.
2005-12-04  Takeshi AIHANA <aihana@gnome.gr.jp>

	* ja.po: Fixed translation of "Widget" and "Index" reported by kano@na.rim.or.jp.
2005-12-03 17:03:43 +00:00
Matthias Clasen 3fac9f99fc Don't leak a pixbuf. (#323024, Paolo Borelli)
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktoolbutton.c (clone_image_menu_size): Don't leak
        a pixbuf.  (#323024, Paolo Borelli)
2005-12-02 20:54:20 +00:00
Matthias Clasen 7b799ca14d Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
	if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)
2005-12-02 19:59:20 +00:00
Matthias Clasen fb3555ebd6 Adapt to xdg API changes 2005-12-02 03:33:42 +00:00
Matthias Clasen be436ea53f Merge upstream changes to handle duplicate glob patterns.
2005-12-01  Matthias Clasen  <mclasen@redhat.com>

        * Merge upstream changes to handle duplicate glob
        patterns.
2005-12-01 19:32:04 +00:00
Matthias Clasen afd5ed8095 Properly handle model changes in GtkTreeSelection: (#322569, Milosz
2005-11-29  Matthias Clasen  <mclasen@redhat.com>

	Properly handle model changes in GtkTreeSelection: (#322569,
	Milosz Derezynski)

	* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach):
	Get a reference to the model, and stop the iteration if the model
	of the treeview is changed on the way.

	* gtk/gtktreeprivate.h:
	* gtk/gtktreeselection.c (_gtk_tree_selection_emit_changed): New
	private function to emit the GtkTreeSelection::changed signal.

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Call
	_gtk_tree_selection_emit_changed() when the model changes.
2005-11-29 19:32:40 +00:00
Federico Mena Quintero 13ed5fef8d Merged from HEAD:
2005-11-28  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Fixes the critical warnings from bug #317999, thus fixing the bug
	completely:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_paths): In SELECT_FOLDER mode,
	use _gtk_file_chooser_get_current_folder_path() instead of fetching the
	impl->current_folder directly.  The latter may be null if we are
	in RELOAD_NONE state.
2005-11-29 01:16:37 +00:00
Federico Mena Quintero 0d4a99ded5 Merged from HEAD:
2005-11-28  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Fix bug #321560, based on a patch by Bogdan Nicula (bogdanni@hotmail.com):

	* gtk/gtkfilechooserdefault.c (up_folder_handler): Don't add the
	current_folder to the pending select paths here; the path bar will
	give it to us now.
	(path_bar_clicked): Add the child_path to the pending select paths
	here.
	(show_and_select_paths): Don't filter out folders.
	(show_and_select_paths): Don't take separate arguments for
	only_one_path and multiple paths.

	* tests/autotestfilechooser.c (test_folder_switch_and_filters):
	New test about preserving the filters when we change folders.
2005-11-28 22:30:48 +00:00
Matthias Clasen 02cadc9196 2.8.8 2005-11-28 18:00:27 +00:00
Matthias Clasen e608c86f0e Insert an LRM, to prevent -20 to come out as 20- in RTL locales. (#322571,
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkscale.c (_gtk_scale_format_value): Insert an LRM, to prevent
	-20 to come out as 20- in RTL locales.  (#322571, Tze'ela Hebron)
2005-11-28 15:58:26 +00:00
Matthias Clasen bca63a5d33 Buttons use the label property for stock ids. (#322565, Milosz Derezynski)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaction.c (gtk_action_sync_button_stock_id)
	(connect_proxy): Buttons use the label property for stock ids.  (#322565,
	Milosz Derezynski)
2005-11-28 15:40:08 +00:00
Matthias Clasen 7207dfbc0b Correctly handle the cell list and indices into it. (#321856)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (update_text_cell, update_pixbuf_cell): Correctly
	handle the cell list and indices into it.  (#321856)
2005-11-28 15:29:02 +00:00
Matthias Clasen de18baa285 Set timer_tag to 0 when the timeout is done. (#322291, Jean-Yves Lefort)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktooltips.c (gtk_tooltips_timeout): Set timer_tag to 0 when
	the timeout is done.  (#322291, Jean-Yves Lefort)
2005-11-28 14:15:54 +00:00
Matthias Clasen 431a722cb4 Make F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch by
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
	F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
	by Paolo Borelli)
2005-11-28 14:01:08 +00:00
Tor Lillqvist f335d53a02 Look up FlashWindowEx() at run-time from user32.dll. If not found, fall
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint): Look
	up FlashWindowEx() at run-time from user32.dll. If not found, fall
	back to FlashWindow(). Makes it work on NT4, too. (#318077) Make
	sure it compiles with older MSVC compilers, too.
2005-11-28 08:31:36 +00:00
Tor Lillqvist d302080656 Use GetLocaleInfo() on Windows to get the localized weekday and month
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Use GetLocaleInfo() on
	Windows to get the localized weekday and month names. strftime()
	in the Microsoft C library returns strings in the default codepage
	for the locale of the process, not the system codepage. Thus
	g_locale_to_utf8() isn't useable on the return value from
	strftime(). (#322603)
2005-11-28 01:42:45 +00:00
Matthias Clasen baa523023c Fix an example. (#322493, Elie De Brauwer)
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmessagedialog.c (gtk_message_dialog_new_with_markup):
	Fix an example.  (#322493, Elie De Brauwer)
2005-11-27 20:52:35 +00:00
Matthias Clasen 0c0fdf8b28 Fix two memory handling problems in GtkTreeView: (#322350, Søren
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	Fix two memory handling problems in GtkTreeView: (#322350,
	Søren Sandmann)

	* gtk/gtktreeview.c (gtk_tree_view_destroy)
	(gtk_tree_view_set_model): Remove all references to nodes in
	the old model.
	(gtk_tree_view_real_collapse_row): Unmark expanded_collapsed_node
	before removing the children.
2005-11-27 20:37:49 +00:00
Matthias Clasen 5aeb56f131 Don't leak a PangoLayout here. (#322505, Paolo Borelli)
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorbutton.c (gtk_color_button_init): Don't leak a
	PangoLayout here.  (#322505, Paolo Borelli)
2005-11-27 20:21:04 +00:00
Tor Lillqvist b8d74ef097 Don't lie, in fact the changes did not make the #322516 sample program work
as expected, sigh.
2005-11-27 02:32:31 +00:00
Tor Lillqvist f30b10304b Mention Win32... 2005-11-27 02:13:56 +00:00
Tor Lillqvist a37fe60d98 Once again rework window decoration code. Should fix #322516 and not break
2005-11-27  Tor Lillqvist  <tml@novell.com>

	Once again rework window decoration code. Should fix #322516 and
	not break #104514. The dialogs in gtk-demo now have the same
	decorations and behaviour as on X11.

	* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32): Keep
	the type hint tucked away here.

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. Each call to gdk_window_set_decorations()
	which calls this function is supposed to affect all decorations.

	(decorate_based_on_hints): New function, looks at both geometry
	hints and type hint and sets window decorations based on
	that. Consolidate code from gdk_window_set_geometry_hints() and
	gdk_window_set_type_hint() here.

	(gdk_window_set_geometry_hints, gdk_window_set_type_hint): Call
	decorate_based_on_hints().
2005-11-27 02:07:55 +00:00
Tor Lillqvist b4ad37ae12 Revert to the correct semantics. (#322516)
2005-11-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. (#322516)
	(gdk_window_set_geometry_hints): Adjust call correspondingly.
2005-11-27 00:12:10 +00:00
Dom Lachowicz 4722decd6e Merge with gtk-wimp's CVS. Includes improved menu icon spacing, [+]/[-]
2005-11-25  Dom Lachowicz <cinamod@hotmail.com>

	* modules/engines/ms-windows/*.[ch]: Merge with gtk-wimp's CVS.
	Includes improved menu icon spacing, [+]/[-] expander drawing,
	status-bar gippie drawing, and notebook tab drawing.
2005-11-25 23:48:42 +00:00
Michael Natterer 6eda5e1af1 Merged from HEAD:
2005-11-24  Michael Natterer  <mitch@imendio.com>

	Merged from HEAD:

	* gtk/gtktoolbar.h (struct _GtkToolbar): changed two private guint
	that used to hold signal handler IDs to two guint of padding.

	* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): added them as
	gulong here.

	(gtk_toolbar_screen_changed): changed accordingly.
2005-11-24 16:55:48 +00:00
Matthias Clasen 902c39b5f0 Include gtkimcontextsimple.h (#322235, Kazuki IWAMOTO)
2005-11-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c: Include gtkimcontextsimple.h  (#322235,
	Kazuki IWAMOTO)
2005-11-23 14:29:33 +00:00
Michael Natterer 8e09a1bb42 Merged from HEAD:
2005-11-23  Michael Natterer  <mitch@imendio.com>

	Merged from HEAD:

	* gtk/gtkrc.c (gtk_rc_reset_widgets): don't leak all toplevel
	windows on other screens (correctly remove all temporary
	references).
2005-11-23 14:24:51 +00:00
Gabor Kelemen 774619c619 Hungarian translation updated.
2005-11-22  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Hungarian translation updated.
2005-11-21 23:29:53 +00:00
Pablo Saratxaga 6808084c98 updated Walloon file; changed my email address 2005-11-21 22:23:07 +00:00
Ales Nyakhaychyk 0f99673e3c Updated Belarusian Translation 2005-11-21 15:58:32 +00:00
Matthias Clasen fda53249fb Fix for bug #321542, Benedikt Meurer:
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	Fix for bug #321542, Benedikt Meurer:

	* gtk/gtkcombobox.c (gtk_combo_box_set_active_internal):
	Emit notify::active.
2005-11-21 14:37:40 +00:00
Ales Nyakhaychyk 2ee022a9b8 Updated Belarusian Translation 2005-11-21 08:24:46 +00:00
Theppitak Karoonboonyanan 1d12b20ec0 Adjusted wording.
2005-11-20  Theppitak Karoonboonyanan  <thep@linux.thai.net>

	* th.po: Adjusted wording.
2005-11-20 08:44:37 +00:00
Theppitak Karoonboonyanan 5f53d6068b Fixed typo.
2005-11-19  Theppitak Karoonboonyanan  <thep@linux.thai.net>

	* th.po: Fixed typo.
2005-11-19 05:35:48 +00:00
Matthias Clasen e5f4c9cb68 Fix crashes in connection with pathbar scrolling (#321560, Bogdan Nicula)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	Fix crashes in connection with pathbar scrolling (#321560,
	Bogdan Nicula)

	* gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons):
	Stop scrolling when desensitising slider buttons.
	(gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press):
	And use it here.

	* gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
	scrolling_down flag.
2005-11-19 03:35:29 +00:00
Matthias Clasen f692b06467 Fix a C99ism. (#321777, Jens Granseuer)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.c (button_clicked_cb): Fix a C99ism.
	(#321777, Jens Granseuer)
2005-11-18 19:55:24 +00:00
Matthias Clasen b2d939f980 Disconnect the sync callback for the visibility property. (#321761, Philip
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaction.c (disconnect_proxy): Disconnect the
	sync callback for the visibility property.  (#321761,
	Philip Langdale)
2005-11-18 19:46:53 +00:00
Matthias Clasen 12064bf08a Turn off input methods in invisible entries, since they are confusing.
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	Turn off input methods in invisible entries, since
	they are confusing.  (#317002, James Su)

	* gtk/gtkentry.c (gtk_entry_set_visibility): Toggle input
	methods if visibility changes.
	(popup_targets_received): Don't show the input method
	menu if the entry is invisible.
2005-11-18 19:30:41 +00:00
Ales Nyakhaychyk b46e6f72c2 Updated Belarusian translation.
Updated Belarusian translation.
2005-11-18 11:56:00 +00:00
Matthias Clasen e2c897c6b2 const correctness fixes
found by Arjan van de Ven and gcc.
2005-11-17 14:31:48 +00:00
Ales Nyakhaychyk 34e15cf5e4 Updated Belarusian Translation 2005-11-17 11:04:06 +00:00
Marcel Telka e74d5138da Updated Slovak translation.
2005-11-16  Marcel Telka  <marcel@telka.sk>

	* sk.po: Updated Slovak translation.
2005-11-16 06:11:53 +00:00
Matthias Clasen f03ee0eae7 Bump version 2005-11-15 18:05:53 +00:00
Matthias Clasen 21b6ed0024 2.8.7 2005-11-15 18:00:32 +00:00
Matthias Clasen f0470f324f Updates
2005-11-15  Matthias Clasen  <mclasen@redhat.com>

	* NEWS: Updates

	* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
	leak.  (#321032, Peter Zelezny)
2005-11-15 15:37:44 +00:00
Kjartan Maraas a513619a93 Updated Norwegian bokmål translation. Same.
2005-11-15  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.
	* no.po: Same.
2005-11-15 11:27:30 +00:00
Matthias Clasen a7c6f4b12f Plug a leak 2005-11-15 04:57:18 +00:00
Matthias Clasen cb6fc02331 Avoid a crash 2005-11-14 18:46:29 +00:00
Matthias Clasen b12b6a1c0c Documentation improvements. (#321338)
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcolor.c (gdk_color_parse): Documentation
	improvements.  (#321338)
2005-11-14 04:35:06 +00:00
Matthias Clasen 35f2ae1b04 Make limit an inclusive boundary. (#321299)
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_forward_search): Make
	limit an inclusive boundary.  (#321299)
2005-11-14 04:24:02 +00:00
Matthias Clasen caf17bae51 Updates
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* NEWS: Updates
2005-11-14 03:17:59 +00:00
Matthias Clasen 4e83fe3789 Fix the build 2005-11-12 19:46:06 +00:00
Dom Lachowicz e25fac892f Bug #313627. Make win32 theme's handling of toolbars, handleboxes, and
* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
	theme's handling of toolbars, handleboxes, and menubars more in-line
	with Microsoft's IE style.
	* modules/engines/ms-windows/*.c: Indentation cleanups
2005-11-12 14:22:04 +00:00
Matthias Clasen d3558f7ed0 Make builtin icons work in gtk_window_set_icon_name() (#321046, Maxim
2005-11-12  Matthias Clasen  <mclasen@redhat.com>

	Make builtin icons work in gtk_window_set_icon_name()
	(#321046, Maxim Udushlivy)

	* gtk/gtkicontheme.c (gtk_icon_theme_get_icon_sizes):
	Also check builtin icons.
2005-11-12 07:03:17 +00:00
Tor Lillqvist 03928c314d Don't hide dotfiles, no such convention on Win32. Just hide files with the
2005-11-12  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilesystemwin32.c (filename_get_info): Don't hide
	dotfiles, no such convention on Win32. Just hide files with the
	hidden attribute. (#314627)
2005-11-12 01:15:22 +00:00
Federico Mena Quintero 0c1868687b Merged from HEAD:
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
	the base path of the volume if it is mounted.
2005-11-11 19:50:21 +00:00
Matthias Clasen dfe3abc6bb Remove another erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_motion_resize_column): Remove
	another erroneous semicolon.
2005-11-10 17:54:59 +00:00
Matthias Clasen 592d066f47 Remove an erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get): Remove an erroneous
	semicolon.
2005-11-10 17:42:09 +00:00
Matthias Clasen 96469e5c58 Don't corrupt odd keymaps (#316638, Kean Johnston)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Don't corrupt odd keymaps (#316638, Kean Johnston)

	* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
	handle frobbing keymaps with odd numbers of syms/code.

	* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
	frob the keymap.
2005-11-10 17:38:34 +00:00
Matthias Clasen a60f34aa64 Improve navigation to parent folders. (#318444, Andrei Yurkevich)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Improve navigation to parent folders.  (#318444, Andrei Yurkevich)

	* gtk/gtkpathbar.[hc]: Add a child_path argument to
	the path_clicked signal.
	* gtk/gtkfilechooserdefault.c (path_bar_clicked): Select the
	child_path, if it is provided.
	* gtk/marshalers.list (path_bar_clicked): Add the necessary
	glue.
2005-11-10 15:14:16 +00:00
Matthias Clasen 7c559c84bd Implement a getter for headers-clickable. (#163851, Richard Hult)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c: Implement a getter for headers-clickable.
	(#163851, Richard Hult)
2005-11-10 14:05:17 +00:00
Tor Lillqvist 6659bc7689 Remove this two-line function which was used only in one place.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(_gdk_win32_get_adjusted_client_rect): Remove this two-line
	function which was used only in one place.

	(get_outer_rect): Use _gdk_win32_adjust_client_rect().

	(gdk_window_set_geometry_hints): If we have identical minimum and
	maximum size hints, remove the resize and maximize
	decorations/functions. (#104514)

	If we have a maximum size hint, remove the maximize
	decoration/function but ensure the resize decoration/function is
	available. Otherwise ensure both resize and maximize
	decorations/functions are there.

	(set_or_clear_style_bits): Factored out common code from
	gdk_window_set_decorations() and gdk_window_set_functions().

	Hack the window style setting once more: Only touch the window
	style bits corresponding to the GdkWMDecoration or GdkWMFunction
	parameter bitmasks. Hopefully this finally is the correct thing to
	do. We used to clear all other bits than those that were being
	set, or set all other bits than those that were being cleared.

	Take into account that adding or removing decorations leaves the
	window's outer size unchanged, i.e., the client area's size and
	position change. This is apparently not what we want, so change
	also the window's (outer) position and size appropriately so that
	the client area's position and size stay constant.

	gtk-demo's color selector dialog is now non-resizable like on X11
	(I tested with metacity in GNOME). Torn off menus are shrinkable
	vertically but have a maximum size, and are not maximizable or
	minimizable, like on X11.

	(gdk_window_set_decorations, gdk_window_set_functions): Let
	set_or_clear_decorations() do most of the job.

	* gdk/win32/gdkprivate-win32.h: Remove declaration of
	_gdk_win32_get_adjusted_client_rect().
2005-11-09 13:00:45 +00:00
Tor Lillqvist 856280b3a2 Remove unnecessary includes. (gdk_window_set_geometry_hints): Remove code
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.
	(gdk_window_set_geometry_hints): Remove code that has been
	permanently ifdeffed out for two years.
2005-11-09 12:52:00 +00:00
Matthias Clasen 9ea1a43096 Unref tile and stipple when finalizing a gc. (#320789, Nickolay V.
2005-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (gdk_gc_finalize): Unref tile and stipple when
	finalizing a gc.  (#320789, Nickolay V. Shmyrev)
2005-11-08 21:48:48 +00:00
Matthias Clasen 4b2738a1f9 Ignore icons if they would make the request large enough to cause Xlib to
2005-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Ignore
	icons if they would make the request large enough to cause
	Xlib to loose the connection.  (#320909, Claudio Saavedra)
2005-11-08 18:27:41 +00:00
Norayr Chilingaryan 76f0399c32 fixing, fixing, fixing ;) 2005-11-08 14:00:15 +00:00
Norayr Chilingaryan 35da76eb76 fixeing bugs ;) 2005-11-08 13:17:01 +00:00
Matthias Clasen e2db438a36 Don't looks the bookmark label when reordering. (#320720, Jeremy Cook)
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_reorder): Don't
	looks the bookmark label when reordering.  (#320720, Jeremy Cook)
2005-11-07 20:30:17 +00:00
Matthias Clasen b3a1c4cdb7 Set focus-on-click to FALSE for all buttons. Don't grab focus when a
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.[hc]: Set focus-on-click to FALSE for all buttons.
	Don't grab focus when a slider button is pressed, instead, use
	a bit in the pathbar struct to determine whether to scroll up
	or down.  (#314486, Carlos Garnacho)
2005-11-07 20:02:18 +00:00
Matthias Clasen fa490ed236 Forgotten file 2005-11-07 19:54:47 +00:00
Matthias Clasen 828f8f1790 Don't popup the completions if the focus has already been moved somewhere
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup):
	Don't popup the completions if the focus has already been
	moved somewhere else.  (#319914, Christian Persch)
2005-11-07 17:27:37 +00:00
Matthias Clasen 9e33d2fdb2 Don't popup the completions if the focus has already been moved somewhere
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup):
	Don't popup the completions if the focus has already been
	moved somewhere else.  (#319914, Christian Persch)
2005-11-07 17:27:16 +00:00
Matthias Clasen 9a48d49800 Raise the drag_window after reconfiguring the toolbar. (#320803, Christian
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolitem.c (_gtk_tool_item_toolbar_reconfigured):
	Raise the drag_window after reconfiguring the
	toolbar.  (#320803, Christian Persch)
2005-11-07 16:39:29 +00:00
Tor Lillqvist ef3d6268cb Fix also the other place where maskstride is calculated. 2005-11-07 12:06:20 +00:00
Tor Lillqvist 18c9a83f6a Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
	Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07 08:18:34 +00:00
Theppitak Karoonboonyanan 6c34731239 Updated Thai translation.
2005-11-06  Theppitak Karoonboonyanan  <thep@linux.thai.net>

	* th.po: Updated Thai translation.
2005-11-06 14:14:13 +00:00
Tor Lillqvist a30defcfb7 Use separate header for logically separate entries. 2005-11-06 05:33:16 +00:00
Tor Lillqvist 1cc736c580 Rename the variables for the color bitmap to have "color" in their name,
2005-11-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
	Rename the variables for the color bitmap to have "color" in
	their name, for similarity with pixbuf_to_hbitmaps_normal().
	Create an 1-bit mask bitmap (DIB section) using create_color_bitmap(),
	not CreateBitmap(). Initialize the mask bitmap with ones for
	those pixels in the color bitmap where the alpha is zero,
	zeros for other pixels. Although the docs claim otherwise,
	using an unitialized bitmap for the mask together with a color
	bitmap that has alpha did not work if the color bitmap had
	zero alpha everywhere, like the blank icon used in
	gtktrayicon.c.
2005-11-06 05:18:28 +00:00
Tor Lillqvist a7b56ed43a Check G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
2005-11-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c
	(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
	G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x
	by setting the G_WIN32_PRETEND_WIN9X environment variable.
2005-11-06 05:01:43 +00:00
Tor Lillqvist 0c5a240d95 As there is only one GdkDisplay in the Win32 backend, check that
2005-11-06  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
	the Win32 backend, check that GdkDisplay* parameters are equal to
	_gdk_display instead of using the unnecessarily general
	GDK_IS_DISPLAY().
2005-11-06 04:54:59 +00:00
Tor Lillqvist 7bff1ab7f1 Make icon masks work on Win98 (#320152, Peter Zelezny)
2005-11-06  Tor Lillqvist  <tml@novell.com>

	Make icon masks work on Win98 (#320152, Peter Zelezny)

	* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
	parameter for the depth of the bitmap, so that this function can
	be used to create 1-bit bitmaps, too.
	(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
	and initialize it properly.
2005-11-06 04:51:10 +00:00
Matthias Clasen 5e70dc2195 Prevent a segfault.
2005-11-04  Matthias Clasen  <mclasen@redhat.com>

        * xdgmime.c (xdg_mime_list_mime_parents): Prevent
        a segfault.
2005-11-04 15:58:25 +00:00
Michael Natterer d4dd35cc91 Merged from HEAD:
2005-11-04  Michael Natterer  <mitch@imendio.com>

	Merged from HEAD:

	* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): applied patch
	from maemo-gtk that changes the mtime check for rc files from
	'>' to '!=', otherwise theme changes go unnoticed when turning
	back the clock (Tommi Komulainen).
2005-11-04 12:25:17 +00:00
Miloslav Trmac a0dd1f6422 Updated Czech translation.
2005-11-02  Miloslav Trmac  <mitr@volny.cz>

	* cs.po: Updated Czech translation.
2005-11-02 22:58:32 +00:00
Tor Lillqvist d25d08df51 Cosmetics. 2005-11-02 10:37:58 +00:00
Tor Lillqvist 60a234502d gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 10:24:19 +00:00
Matthias Clasen 4aebc900bf Remove some g_return_if_fail() from static functions, replace some others
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c: Remove some g_return_if_fail() from
	static functions, replace some others by g_assert().

	* gtk/gtktextview.c (selection_motion_event_handler)
	(gtk_text_view_start_selection_drag): Keep track of the original
	selection boundaries during a drag selection, in order to correctly
	decide when to extend or shrink the selection.  (#320167,
	reported by Arvind S N, patch by Paolo Borelli)
2005-11-02 06:30:22 +00:00
Matthias Clasen a57007f3dc Replace manual offset calculations by g_utf8_offset_to_pointer().
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
	* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Replace
	manual offset calculations by g_utf8_offset_to_pointer().
	(#320360, Paolo Borelli)
2005-11-02 05:11:13 +00:00
Tor Lillqvist 3e2b7e6e73 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Add more
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
	pre-interned GdkAtoms and pre-registered clipboard formats. Sort
	their declarations, definitions and assignments into a more
	logical and consistent order.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
	CF_ prefix for the predefined clipboard format names. Put quotes
	around registered format names to distinguish them.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
	immediately with a warning if the property type is STRING, TEXT,
	COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
	should never pretend to handle on Win32. Handle only UTF8_STRING
	here, other formats with delayed rendering. Use \uc1 instead of
	\uc0 when generating Rich Text Format for easier testability on
	XP, where WordPad misinterprets \uc0 encoded characters. Add more
	GDK_NOTE debugging output for Clipboard operations.

	* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
	(gdk_selection_convert): Don't pretent to handle STRING, just
	UTF8_STRING. Streamline error handling, don't unnecessarily have a
	GError which then isn't used for anything anyway if it gets set.
	(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
	COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
2005-11-01 15:06:27 +00:00
Tor Lillqvist 1e5c150247 Don't look for X_PACKAGES unless building for x11. (#313986, John
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* configure.in: Don't look for X_PACKAGES unless building for
	x11. (#313986, John Ehresman)
2005-11-01 09:20:45 +00:00
Amanpreet Singh Alam 29a894798f update for Punjabi 2005-11-01 02:46:10 +00:00
Matthias Clasen fe44a57d85 Add the popup window to the toplevels window group. (#319912, Christian
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Add the popup
	window to the toplevels window group.  (#319912, Christian Persch)
2005-10-28 20:40:02 +00:00
Matthias Clasen 8fbbb83346 Fix the anchor of the default drag cursors. (#319200, Federico Mena Quintero) 2005-10-28 17:08:05 +00:00
Laurent Dhima 16ce403888 Updated Albanian translation.
2005-10-28  Laurent Dhima  <laurenti@alblinux.net>

	* sq.po: Updated Albanian translation.
2005-10-28 15:29:07 +00:00
Matthias Clasen 458838db34 Make it compile 2005-10-28 15:04:30 +00:00
Matthias Clasen d3600de92b Add the little stars. (#319985, Bastien Nocera)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.c (gtk_about_dialog_init): Add the little
	stars.  (#319985, Bastien Nocera)
2005-10-28 14:09:15 +00:00
Matthias Clasen 4e8c9fd5f8 Return FALSE, so we don't flush repeatedly. (#319151, Alexander Larsson)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): Return
	FALSE, so we don't flush repeatedly.  (#319151, Alexander Larsson)
2005-10-28 13:55:17 +00:00
Ankitkumar Rameshchandra Patel b57b98d90a Updated Gujarati Translations 2005-10-28 09:30:31 +00:00
Norayr Chilingaryan 93e373f0b4 update of po-properties hy.po files 2005-10-28 06:28:58 +00:00
Dan Damian 38cdac231c Updated Romanian translation by Misu Moldovan. 2005-10-27 19:37:44 +00:00
Vincent van Adrighem 14355e7c80 Translation updated by Tino Meinen.
2005-10-27  Vincent van Adrighem  <adrighem@gnome.org>

	* nl.po: Translation updated by Tino Meinen.
2005-10-27 19:08:50 +00:00
Michael Natterer 012d8d6db4 fix typo (G_MODUE_BIND_LAZY -> G_MODULE_BIND_LAZY).
2005-10-27  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkthemes.c (gtk_theme_engine_load): fix typo
	(G_MODUE_BIND_LAZY -> G_MODULE_BIND_LAZY).
2005-10-27 13:35:12 +00:00
Michael Natterer 1df7de983e Merged from HEAD:
2005-10-26  Michael Natterer  <mitch@imendio.com>

	Merged from HEAD:

	Fix bug #319974:

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
	make sure that setting any of pixbuf/stock-id/icon-name resets the
	others because they are mutually exclusive, and that unsetting any
	of them only resets the pixbuf and nothing else. Also added
	some missing g_object_notify().

	(gtk_cell_renderer_pixbuf_get_property): simplified calls to
	g_value_set_object().

	(gtk_cell_renderer_pixbuf_create_stock_pixbuf)
	(gtk_cell_renderer_pixbuf_create_named_icon_pixbuf): added
	g_object_notify ("pixbuf").
2005-10-27 13:20:32 +00:00
Norayr Chilingaryan 141e5c5822 ----------------------------------------------------------------------------
fixing errors
2005-10-27 12:59:42 +00:00
Matthias Clasen a74a80316c Be more careful about initializing cell_area. (#319382, Tommi Komulainen)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
	careful about initializing cell_area.  (#319382, Tommi
	Komulainen)
2005-10-27 04:48:55 +00:00
Matthias Clasen 3c1fc24f61 Don't eat Ctrl-PageUp/PageDown. (#318670, Christian Neumair)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
	Ctrl-PageUp/PageDown.  (#318670, Christian Neumair)
2005-10-27 04:40:04 +00:00
Matthias Clasen 72ccf58edd Only set the text if it is not NULL. (#319930, Thomas Klausner)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* demos/gtk-demo/clipboard.c (paste_received): Only set the
	text if it is not NULL.  (#319930, Thomas Klausner)

	* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
	loader before trying to get the pixbuf.  (#319930, Thomas Klausner)
2005-10-27 04:32:52 +00:00
Matthias Clasen e127a96aec Use G_MODULE_BIND_LAZY when dlopening modules. (#319557, Laszlo Peter)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystem.c (gtk_file_system_module_load):
	* gtk/gtkthemes.c (gtk_theme_engine_load):
	* gtk/gtkimmodule.c (gtk_im_module_load): Use G_MODULE_BIND_LAZY
	when dlopening modules.  (#319557, Laszlo Peter)
2005-10-27 03:19:26 +00:00
Francisco Javier F. Serrador ea9d754c98 Updated Spanish translation.
2005-10-26  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* es.po: Updated Spanish translation.
2005-10-26 21:59:34 +00:00
Matthias Clasen 0e041a4ec8 Only use text segments when determining text direction. (#319065, Tommi
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text
	segments when determining text direction.  (#319065, Tommi Komulainen)
2005-10-26 20:47:39 +00:00
Matthias Clasen 08575ff7da Don't crash on duplicate destroy. (#318953, Gustavo Carneiro)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't crash
	on duplicate destroy.  (#318953, Gustavo Carneiro)
2005-10-26 19:50:43 +00:00
Matthias Clasen 82e6e840eb Broken commit 2005-10-26 19:42:36 +00:00
Matthias Clasen e71e55d9a4 Point out that destroy-with-parent is a bad idea for the dialog passed to
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_new_with_dialog):
	Point out that destroy-with-parent is a bad idea for the dialog
	passed to this function.  (#318943, Christian Persch)

	* gtk/gtkfilechooserbutton.c (open_dialog): Add the dialog to the
	window group, if necessary (#318943, Christian Persch)
2005-10-26 19:32:11 +00:00
Matthias Clasen 0f7f6be8e9 Broken commit 2005-10-26 18:13:22 +00:00
Matthias Clasen 0339de7d61 use $(GLIB_MKENUMS) instead of glib-mkenums. (#318582, Damien Carbery)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * */Makefile.am: use $(GLIB_MKENUMS) instead of
        glib-mkenums.  (#318582, Damien Carbery)
2005-10-26 18:02:28 +00:00
Matthias Clasen 24fec1aa10 Clarify docs 2005-10-26 14:32:10 +00:00
Takeshi AIHANA b4f7784a84 Also updated Japanese translation.
2005-10-26  Takeshi AIHANA <aihana@gnome.gr.jp>

	* ja.po: Also updated Japanese translation.
2005-10-26 14:16:53 +00:00
Takeshi AIHANA ea93a69ab0 Fixed typos reported by kano@na.rim.or.jp.
2005-10-26  Takeshi AIHANA <aihana@gnome.gr.jp>

	* ja.po: Fixed typos reported by kano@na.rim.or.jp.
2005-10-26 14:08:29 +00:00
Matthias Clasen b9200e9fc5 Remove an extra const which doesn't seem to affect the placement of the
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkdnd-x11.c: Remove an extra const which doesn't
        seem to affect the placement of the data in the readonly
        section, and causes problems with some compilers.  (#317844)
2005-10-26 13:49:58 +00:00
Matthias Clasen 6562773a5a Fix some issues with background drawing in RTL. (#318781, Eric Cazeaux)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        Fix some issues with background drawing in RTL.  (#318781,
        Eric Cazeaux)
2005-10-26 04:30:19 +00:00
Priit Laes f5562e56e0 Translation updated by Ivar Smolin.
2005-10-25  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Ivar Smolin.
2005-10-25 18:42:51 +00:00
Matthias Clasen 5480e6df2f Add some more docs. (#319722, Paolo Borelli)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Add some
	more docs.  (#319722, Paolo Borelli)
2005-10-25 18:27:08 +00:00
Matthias Clasen e34eab22da Make the initialization of screen_x11->xft_rgba more explicit. (#319627,
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkxftdefaults.c (init_xft_settings): Make the
	initialization of screen_x11->xft_rgba more explicit.  (#319627,
	Bogdan Nicula)
2005-10-25 18:10:59 +00:00
Funda Wang 1caa77bff2 Updated Simplified Chinese translation 2005-10-25 13:13:41 +00:00
Yair Hershkovitz f6acde711b Updated Hebrew translation.
2005-10-24  Yair Hershkovitz  <yairhr@gmail.com>

	* he.po: Updated Hebrew translation.
2005-10-25 00:05:30 +00:00
Ignacio Casal Quinteiro ad8b4aa0a3 *** empty log message *** 2005-10-24 11:22:43 +00:00
Adam Weinberger 1cd1200389 Updated Canadian English translation.
2005-10-23  Adam Weinberger  <adamw@gnome.org>

	* en_CA.po: Updated Canadian English translation.
2005-10-23 06:27:40 +00:00
Ilkka Tuohela 52d4111e05 Updated Finnish translation 2005-10-23 06:14:33 +00:00
Michael Natterer 029c0c57fb Merged from HEAD:
2005-10-22  Michael Natterer  <mitch@imendio.com>

	Merged from HEAD:

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
	widget being realized, in addition to being visible, to avoid
	running into precondition check in gtk_tree_view_get_cell_area().
	(approved by Kris).
2005-10-22 21:11:05 +00:00
Dom Lachowicz b14bb6fab7 Experimentally, scrollbar steppers can shrink to 8 pixels on Win32.
* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style):
	Experimentally, scrollbar steppers can shrink to 8 pixels on
	Win32. Reflect that in the theme.
	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Experimentally,
	there is a 1-pixel border between a scrollbar and its child
	in ScrolledWindows on Win32. Reflect that in the theme.
2005-10-22 16:05:10 +00:00
Alexander Shopov 2765a5dc29 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2005-10-21  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>
2005-10-21 08:17:47 +00:00
Matthias Clasen 69f8c2e191 Define GTK_STOCK_[DIS]CONNECT 2005-10-21 04:59:55 +00:00
Matthias Clasen fdf7779855 Apply a patch from Ross Burton to fix compiler warnings. (#318762)
2005-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c: Apply a patch from Ross Burton
	to fix compiler warnings.  (#318762)
2005-10-20 20:14:17 +00:00
Federico Mena Quintero 8336011a85 Merged from HEAD:
2005-10-19  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Fixes bug #317999:

	* tests/autotestfilechooser.c
	(test_button_folder_states_for_action): Test that we have either
	$cwd or the explicitly-set folder.
	(test_reload_sequence): Likewise.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_current_folder): If our reload_state
	is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
2005-10-19 17:02:10 +00:00
Matthias Clasen 5c99c4191d Make magic comparisons work correctly in the cache.
2005-10-18  Matthias Clasen  <mclasen@redhat.com>

        * xdgmimecache.c: Make magic comparisons work correctly
        in the cache.
2005-10-18 20:35:44 +00:00
Arangel Angov af408222c8 Updated Macedonian translation <arangela@cvs.gnome.org> 2005-10-17 23:55:10 +00:00
Priit Laes d4cc6b28e3 Translation updated by Ivar Smolin.
2005-10-17  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Ivar Smolin.
2005-10-17 12:37:01 +00:00
Martin Willemoes Hansen 3b055b39f2 Updated Danish translation.
* da.po: Updated Danish translation.
2005-10-17 12:25:50 +00:00
Martin Willemoes Hansen 3c7e718b50 Updated Danish translation.
* da.po: Updated Danish translation.
2005-10-17 10:26:10 +00:00
Arangel Angov 61d98323eb Updated mk translation <arangela@cvs.gnome.org> 2005-10-15 14:03:33 +00:00
Tor Lillqvist f681b064bf Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:03:42 +00:00
Priit Laes 85b1a31c26 Translation updated by Ivar Smolin.
2005-10-13  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Ivar Smolin.
2005-10-13 20:08:21 +00:00
Tor Lillqvist 1f8e9d3940 Don't treat Alt-Enter specially. It does not have any special meaning and
2005-10-13  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
	Alt-Enter specially. It does not have any special meaning and
	should be passed on to the application. (#318378, Tim Evans)
2005-10-13 07:18:59 +00:00
Tor Lillqvist 8bca0c3613 Set visual depth to 24 for 32 bits-per-pixel devices on Win32. This allows
2005-10-13  Tor Lillqvist  <tml@novell.com>

	Set visual depth to 24 for 32 bits-per-pixel devices on
	Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
	optimized composite_0888() function rather than the slower image
	dithering functions to draw pixbufs (#313993, John Ehresman)

	* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	GdkImage::bits_per_pixel.
	(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	BITMAPINFOHEADER::biBitCount.

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
	GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
	32.
2005-10-13 07:02:32 +00:00
Matthias Clasen 38ed5b667b Only call gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589,
2005-10-12  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call
	gdk_pixbuf_loader_eat_header_write() when count > 0.  (#318589,
	Bogdan Nicula)
2005-10-12 13:50:13 +00:00
Stefan Kost cd718e6e36 use PACKAGE_VERSION,bump year (#318654)
* demos/gtk-demo/appwindow.c: (about_cb):
use PACKAGE_VERSION,bump year (#318654)
2005-10-12 13:23:06 +00:00
Matthias Clasen f1585b7a71 Try to match an off toggle here with the matching on toggle if it
2005-10-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_btree_delete): Try to match an off
	toggle here with the matching on toggle if it immediately follows.
	This is a common case, and handling it here prevents quadratic blowup
	in cleanup_line() below.  (#317125)

	* gtk/gtktextsegment.h:
	* gtk/gtktextsegment.c (_gtk_char_segment_new_from_two_strings): Pass
	the character counts into this function instead of computing them
	again.
2005-10-11 14:40:45 +00:00
Alessio Frusciante 49cbd0eed8 Updated Italian translation. 2005-10-09 16:15:39 +00:00
Federico Mena Quintero f6fbddcfe9 Merged from HEAD:
2005-10-07  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Fixes bug #317999:

	* gtk/gtkfilechooser.c (gtk_file_chooser_get_current_folder):
	Clarify the documentation on when this can return NULL.
	(gtk_file_chooser_get_current_folder_uri): Likewise.

	* gtk/gtkfilechooserbutton.c (struct
	_GtkFileChooserButtonPrivate): Added a folder_has_been_set flag;
	we use it to keep track of whether a folder has been set.
	(gtk_file_chooser_button_map):  Implement.  If no folder has been
	loaded before, we at least try to load $cwd here.
	(gtk_file_chooser_button_constructor): If the construct-time
	dialog already has a folder set, turn on our folder_has_been_set
	flag.
	(dialog_current_folder_changed_cb): Turn on our
	folder_has_been_set flag.
2005-10-07 20:24:22 +00:00
Matthias Clasen 2c3c209251 Use g_return_val_if_fail(), not g_return_if_fail(). (#318412, Kazuki
2005-10-07   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktexttag.c (gtk_text_attributes_ref): Use
        g_return_val_if_fail(), not g_return_if_fail().  (#318412,
        Kazuki Iwamoto)
2005-10-07 15:56:36 +00:00
Matthias Clasen 298c435472 Require gmodule-no-export-2.0 instead of gmodule-2.0
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf-xlib-2.0.pc.in (Requires): Require
	gmodule-no-export-2.0 instead of gmodule-2.0
2005-10-05 14:41:45 +00:00
Nguyen Thai Ngoc Duy 730f0f6f3c Updated Vietnamese translation 2005-10-05 13:14:31 +00:00
Federico Mena Quintero 4fc5f91b8b Merged from HEAD:
2005-10-04  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gtk/gtkpathbar.c (get_dir_name): Don't special-case Home and
	Desktop; just use their real names on the file system for the
	user-visible names.

	* gtk/gtkfilechooserdefault.c
	(shortcuts_append_home): Don't special-case the name of "Home";
	just use the folder name.
2005-10-04 20:12:05 +00:00
Tor Lillqvist 61a352d098 Make it compile without HAVE__NL_TIME_FIRST_WEEKDAY. (#317910, Mathias
2005-10-04  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Make it compile without
	HAVE__NL_TIME_FIRST_WEEKDAY. (#317910, Mathias Hasselmann)
2005-10-04 13:38:18 +00:00
Matthias Clasen 283bfba565 Bump version 2005-10-04 06:31:50 +00:00
Matthias Clasen 45029c6757 2.8.6 2005-10-04 06:20:25 +00:00
Matthias Clasen 3dac77f834 Revert the change from yesterday, since it leads to assertion failures.
2005-10-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_clear_realized_style): Revert the change
	from yesterday, since it leads to assertion failures.  (#317879,
	Sebastian Bacher)
2005-10-04 04:18:53 +00:00
Matthias Clasen 4f17bf78b3 Apply a patch to remove context from translations. (#317867, Duarte
2005-10-03  Matthias Clasen <mclasen@redhat.com>

	* pt.po: Apply a patch to remove context from
	translations.  (#317867, Duarte Henriques)
2005-10-04 03:37:52 +00:00
Matthias Clasen d11badd3e7 Call calendar_compute_days() after setting priv->week_start.
2005-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Call
	calendar_compute_days() after setting priv->week_start.
2005-10-04 03:24:16 +00:00
Federico Mena Quintero 55a7c31665 Merged from HEAD:
2005-10-03  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Don't reload the current folder unnecessarily on ::map().

	* gtk/gtkfilechooserprivate.h (ReloadState): New enum to represent
	the reloading state.
	(struct _GtkFileChooserDefault): Added a "reload_state" field.

	* gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init):
	Initialize impl->reload_state.
	(gtk_file_chooser_default_map): Check the impl->reload_state; load
	a default folder if no folder has been set, or reload the current
	one only if we had been unmapped first.
	(gtk_file_chooser_default_update_current_folder): Set the
	reload_state to RELOAD_HAS_FOLDER.
	(gtk_file_chooser_default_unmap): Implement, and set the
	reload_state to RELOAD_WAS_UNMAPPED.
	(shortcuts_model_create): Don't call shortcuts_add_bookmarks()
	here; they'll get (re)loaded on ::map() anyway.

	* gtk/gtkfilechooserwidget.c
	(gtk_file_chooser_widget_constructor): Don't set a default folder here.

	* tests/autotestfilechooser.c (test_action_widgets): Don't take in
	a dialog; build it ourselves.
	(test_reload): New test to ensure that we don't load the default
	folder more than once, and that we reload it when
	unmapping/remapping.
	(get_impl_from_dialog): New utility function.
	(test_widgets_for_current_action): Use get_impl_from_dialog().
2005-10-03 20:27:52 +00:00
Matthias Clasen 8d0574f9cf Bump version 2005-10-03 19:57:03 +00:00
Matthias Clasen 2216c39e7b 2.8.4 2005-10-03 19:29:59 +00:00
Matthias Clasen d28b8f4088 Unref the style when removing it from the hash table. (#314696, Benjamin
2005-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkrc.c (gtk_rc_clear_realized_style): Unref the style when
	removing it from the hash table.  (#314696, Benjamin Berg)
2005-10-03 16:37:49 +00:00
Matthias Clasen fd5394784a Use a 1k buffer for sniffing image formats, instead of 128 or 256 bytes.
2005-10-03  Matthias Clasen  <mclasen@redhat.com>

	* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
	* gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats,
	instead of 128 or 256 bytes.  (#317225, Sebastien Bacher,
	Dom Lachowicz)
2005-10-03 15:11:49 +00:00
Tor Lillqvist eed718e4e6 In case BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
2005-10-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap): In case
	BitBlt() fails with ERROR_INVALID_HANDLE, the most probable cause
	is that the the desktop isn't visible because the session has been
	switched, the screen is locked, or a terminal server session
	disconnected, so no error message necessary. (#137796)

	It is of course remotely possible that BitBlt() failing with
	ERROR_INVALID_HANDLE might also be caused by some other
	problem. We could strive for perfection and track whether the
	desktop is visible by using WTSRegisterSessionNotification() and
	handling WM_WTSESSION_CHANGE. I think that's overdoing it just for
	this issue, though. If we would track desktop visibility, we
	should then avoid even trying to update the display at all while
	the desktop isn't visible.
2005-09-30 23:51:49 +00:00
Matthias Clasen db1593b8be Another attempt to correct the calculations for the first week day. We may
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Another attempt
	to correct the calculations for the first week day. We may
	just have to remove this code if too many locales turn out
	to have broken data.
2005-09-30 17:55:37 +00:00
Matthias Clasen 9f3677418b Don't leak pixbuf in some cases. (#317611, Tommi Komulainen)
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkimage.c (gtk_image_expose): Don't leak pixbuf in
	some cases.  (#317611, Tommi Komulainen)
2005-09-30 15:43:08 +00:00
Matthias Clasen 9c4dd6ae2d Prevent overflow when storing size hints in an unsigned short variable.
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
        Prevent overflow when storing size hints in an unsigned
        short variable. Tracked down by Ray Strode and Søren Sandmann.
2005-09-30 14:53:06 +00:00
Matthias Clasen 46136af6dc Check arguments. (#317491, Paolo Borelli)
2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
	Paolo Borelli)
2005-09-29 13:41:07 +00:00
Matthias Clasen 96d8e1a1bf Stop drags when being grab shadowed. (#317332)
2005-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpaned.c (gtk_paned_grab_notify): Stop drags when being
	grab shadowed.  (#317332)
2005-09-29 13:38:09 +00:00
Tor Lillqvist 68e7f35d09 DLLs are always in bin nowadays, no need to test.
2005-09-29  Tor Lillqvist  <tml@novell.com>

	* gtk-zip.sh.in: DLLs are always in bin nowadays, no need to test.
2005-09-29 07:42:40 +00:00
Tor Lillqvist e85e700956 The locale directory is passed to bindtextdomain() which isn't
2005-09-29  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkmain.c (_gtk_get_localedir): The locale directory is
	passed to bindtextdomain() which isn't UTF-8-aware, so convert to
	system codepage using g_win32_locale_filename_from_utf8().
	(#317457, Kazuki Iwamoto)
2005-09-28 23:41:27 +00:00
Matthias Clasen 115784bb38 Free mult_atoms here. (#317039, Paolo Borelli)
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkselection.c (_gtk_selection_request): Free mult_atoms
	here. (#317039, Paolo Borelli)
2005-09-28 20:43:28 +00:00
Matthias Clasen d097228c65 Return the attributes to make this function work as boxed copy function.
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttag.h:
	* gtk/gtktexttag.c (gtk_text_attributes_ref): Return the attributes
	to make this function work as boxed copy function.  (#317455,
	Gustavo Carneiro)
2005-09-28 20:31:40 +00:00
Matthias Clasen e5a2f7918b Don't unref NULL. (#316828, Tor Lillqvist)
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkclipboard.c (request_image_received_func): Don't unref
	NULL.  (#316828, Tor Lillqvist)
2005-09-28 20:08:24 +00:00
Tor Lillqvist 75732772a8 Include <config.h>. (#317444, Kazuki Iwamoto)
2005-09-28  Tor Lillqvist  <tml@novell.com>

	* modules/input/imime.c: Include <config.h>. (#317444, Kazuki
	Iwamoto)
2005-09-28 16:00:10 +00:00
Federico Mena Quintero baace30f74 Merged from HEAD:
2005-09-27  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	Do not create the save mode-specific widgets in the open modes, so
	that we don't carry their baggage around.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_constructor): Don't create the
	save_widgets here.
	(save_widgets_create): Set the impl->save_widgets directly here,
	instead of passing the widgets back to the caller.  Also, pack
	them into the impl's box.
	(update_appearance): Create or destroy the save widgets as
	appropriate.  Set the action of the save_file_name_entry here.
	(shortcuts_add_current_folder): Set the active item in the
	save_folder_combo only if it exists.
	(gtk_file_chooser_default_set_property): Don't set the action of
	the save_file_name_entry here.
	(gtk_file_chooser_default_update_current_folder): Set the base
	folder of the save_file_name_entry only if the entry exists.
	(shortcuts_drag_data_received_cb): Cast the selection_data->data
	to (const char *) since that's what shortcuts_drop_uris() expects.
	(file_list_drag_data_received_cb): Likewise, for
	g_uri_list_extract_uris().
2005-09-27 22:03:45 +00:00
Federico Mena Quintero ab468d6f14 Merged from HEAD:
2005-09-27  Federico Mena Quintero  <federico@ximian.com>

	Merged from HEAD:

	* gtk/gtkfilechooserdefault.c (update_chooser_entry): If the
	selection is empty, clear the file name entry only if we are in
	CREATE_FOLDER mode.  In SAVE mode, nothing will be selected when
	the user starts typeahead in the treeview, and we don't want to
	clear the file name entry in that case --- the user could be
	typing-ahead to look for a folder name.  Fixes bug #308332, patch
	by Jürg Billeter.
2005-09-27 21:31:44 +00:00
Matthias Clasen 25715c3e29 Bump version 2005-09-27 15:55:56 +00:00
Matthias Clasen 88de2b3ec7 2.8.4 2005-09-27 14:35:33 +00:00
Tor Lillqvist ca488d49a1 Set the shaped flag here, too. (#316871)
2005-09-26  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set
	the shaped flag here, too. (#316871)
	(gdk_window_shape_combine_region): Currently unimplemented, so
	don't do anything to the shaped flag here.
2005-09-26 20:54:29 +00:00
Matthias Clasen a7f47a40cf Fix #316871, reported by Dan Winship:
2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	Fix #316871, reported by Dan Winship:

	* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
	(gdk_window_shape_combine_region): Set it here.

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
	remove the child area for shaped windows.
2005-09-26 20:28:35 +00:00
Alessio Frusciante e735139d68 Updated Italian translation. 2005-09-26 19:50:59 +00:00
Christian Rose b3aa6a8cac Updated Swedish translation.
2005-09-25  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2005-09-24 22:47:57 +00:00
Priit Laes 8fb41e93d3 Translation updated by Ivar Smolin.
2005-09-24  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Ivar Smolin.
2005-09-24 20:42:48 +00:00
Matthias Clasen 1b7d3176f5 Don't leak expander pixbufs. (#316946, Tommi Komulainen)
2005-09-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_finalize):
	Don't leak expander pixbufs.  (#316946, Tommi Komulainen)
2005-09-23 16:36:30 +00:00
Matthias Clasen 596dbc3ce8 Fix the documentation for the grab-broken-event signal, noticed by Damon
2005-09-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_class_init): Fix the documentation
	for the grab-broken-event signal, noticed by Damon Chaplin.
2005-09-22 14:48:10 +00:00
Tor Lillqvist cd90db1183 Don't need to call g_free() on a value known to be NULL.
2005-09-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c
	(_gdk_win32_selection_convert_to_dib): Don't need to call
	g_free() on a value known to be NULL.
2005-09-20 23:04:57 +00:00
Tor Lillqvist 897cf3b056 Free return value from gdk_atom_name().
2005-09-21  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c (gdk_selection_convert,
	gdk_text_property_to_text_list_for_display,
	gdk_text_property_to_utf8_list_for_display,
	gdk_win32_selection_add_targets,
	_gdk_win32_selection_convert_to_dib): Free return value from
	gdk_atom_name().
	(gdk_text_property_to_text_list_for_display): Drop GError variable
	that isn't actually used after being set.
2005-09-20 22:58:58 +00:00
Tor Lillqvist 099eec9a9f Do return the correct owner for CLIPBOARD (i.e., the owner of the Windows
2005-09-20  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkselection-win32.c
	(gdk_selection_owner_get_for_display): Do return the correct owner
	for CLIPBOARD (i.e., the owner of the Windows Clipboard, if it is
	a window GDK knows about). The reason to return NULL seems to have
	gone when in the fix for bug #163702 the artificial
	GDK_SELECTION_CLEAR event generation was removed from
	gdk_selection_send_notify_for_display(). Fixes bug #316552.
2005-09-20 07:51:22 +00:00
Matthias Clasen 834e201312 More typo fixes 2005-09-19 18:57:53 +00:00
Matthias Clasen 3504894d6e Fix a typo in the docs. (#316419, Guillaume Cottenceau)
2005-09-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_scroll_to_path): Fix a typo in the docs.  (#316419,
	Guillaume Cottenceau)
2005-09-19 18:53:40 +00:00
Matthias Clasen 0d74b72f3e Use g_list_nth_data() instead of g_list_nth()->data in multiple places to
2005-09-19  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c: Use g_list_nth_data() instead of g_list_nth()->data
	in multiple places to avoid segfaults if the index is out of range.
	(#316422, Guillaume Cottenceau)
2005-09-19 18:40:18 +00:00
Tim Janik 8ef635d70f fix bug #316180. gtk_window_map_event(): new function to work around lost
Fri Sep 16 14:00:20 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkwindow.c: fix bug #316180.
        gtk_window_map_event(): new function to work around lost unmap requests.
2005-09-16 12:00:42 +00:00
Tor Lillqvist 1cfa260e5f Check whether the widget actually is a GtkNotebook before treating it as
2005-09-16  Tor Lillqvist  <tml@novell.com>

	* modules/engines/ms-windows/msw_style.c (draw_extension,
	draw_box_gap): Check whether the widget actually is a GtkNotebook
	before treating it as such. Drop some unneeded local variables,
	use parameter with same information instead. (#316412)
2005-09-15 22:10:20 +00:00
Federico Mena Quintero 9fe8aa7720 List all the default key bindings. Fix the documentation for the
2005-09-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/tmpl/gtkfilechooser.sgml: List all the default key bindings.
	Fix the documentation for the "location-popup" binding signal; its
	"path" argument was not listed.  Mention a tip to have a crude
	form of bookmarks accessible through key bindings.
2005-09-15 17:16:45 +00:00
Žygimantas Beručka 2a0d8d75d6 Updated Lithuanian translation.
2005-09-15  Žygimantas Beručka  <zygis@gnome.org>

        * lt.po: Updated Lithuanian translation.
2005-09-15 11:59:11 +00:00
Runa Bhattacharjee 77ddd7a36c Added Entry for Bengali (bn) Translation updation:14/09 2005-09-14 14:44:16 +00:00
Runa Bhattacharjee 10e0f1987d Updated Bengali (bn) Translation:14/09 2005-09-14 14:44:00 +00:00
Matthias Clasen 8c4c96adc7 Fix a use-after-free bug. (#316256, Alexander Nedotsukov)
2005-09-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/updateiconcache.c (foreach_remove_func): Fix
	a use-after-free bug.  (#316256, Alexander Nedotsukov)
2005-09-14 03:13:24 +00:00
Federico Mena Quintero 61011d78f4 Turn off profiling for the stable branch (#undef PROFILE_FILE_CHOOSER).
2005-09-13  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c: Turn off profiling for the stable
	branch (#undef PROFILE_FILE_CHOOSER).
2005-09-13 20:13:48 +00:00
Matthias Clasen 59bfd418f8 Fix typos in the docs. (#316008, #316027, #316121, Guillaume Cottenceau)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_class_init):
	(gtk_icon_view_get_dest_item_at_pos):  Fix typos in the
	docs.  (#316008, #316027, #316121, Guillaume Cottenceau)
2005-09-13 17:53:06 +00:00
Matthias Clasen 76759f3410 Add some docs. (#316001, Guillaume Cottenceau)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Add some docs.
	(#316001, Guillaume Cottenceau)
2005-09-13 17:34:00 +00:00
Matthias Clasen 74da02e12e Fix a copy-and-paste mistake in the docs. (#315993, Guillaume Cottenceau)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_set_icon_name): Fix a copy-and-paste
	mistake in the docs.  (#315993, Guillaume Cottenceau)
2005-09-13 17:19:06 +00:00
Matthias Clasen e4c92bc39d Add some strings containing multibyte characters.
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* tests/testentrycompletion.c (create_simple_completion_model): Add
	some strings containing multibyte characters.

	* gtk/gtkentrycompletion.c (gtk_entry_completion_real_insert_prefix):
	Fix prefix insertion for multibyte characters.  (#316095,
	Tommi Komulainen)
2005-09-13 15:11:43 +00:00
Matthias Clasen bd3c57680e Clarify docs for ::insert-text signal. (#316094, Tommi Komulainen)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/tmpl/gtkeditable.sgml: Clarify docs
	for ::insert-text signal.  (#316094, Tommi
	Komulainen)
2005-09-13 14:26:04 +00:00
Matthias Clasen e02da6db6e Silently return NULL if the widget is not realized. (#316023, Guillaume
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_create_row_drag_icon):
	* gtk/gtkiconview.c (gtk_icon_view_create_drag_icon): Silently
	return NULL if the widget is not realized.  (#316023,
	Guillaume Cottenceau)
2005-09-13 13:40:45 +00:00
Amanpreet Singh Alam 18f28738c3 update by amanpreetalam@yahoo.com for Punjabi 2005-09-13 07:43:43 +00:00
Rajesh Ranjan 44a2993b28 updated by rajeshkajha@yahoo.com 2005-09-13 07:37:32 +00:00
Nguyen Thai Ngoc Duy d479089f90 Updated Vietnamese translation 2005-09-11 12:26:40 +00:00
Matthias Clasen 6648dc472c Make drag reordering work properly for columns other than the first.
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_button_event):
	Make drag reordering work properly for columns other than the
	first.  (#315054, Dan Winship)
2005-09-09 21:43:01 +00:00
Matthias Clasen 22ee9e6c58 Handle invalid fontnames better. (#315187, Ed Catmur)
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfontbutton.c (gtk_font_button_update_font_info): Handle
	invalid fontnames better.  (#315187, Ed Catmur)
2005-09-09 20:03:32 +00:00
Matthias Clasen d18a438c0c Handle invalid fontnames better. (#136926, Michael R. Walton)
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfontsel.c (gtk_font_selection_set_font_name): Handle
	invalid fontnames better. (#136926, Michael R. Walton)
2005-09-09 19:03:03 +00:00
Matthias Clasen 878c63a65f Use connect_after to connect to the focus_out event. This ensures that the
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_start_editing):
	Use connect_after to connect to the focus_out event. This
	ensures that the entry has already stopped blinking by the time
	we emit the edited signal.  (#315229, Thomas Leonard)
2005-09-09 18:39:52 +00:00
Matthias Clasen 51c6946dfb Don't set unsigned ints to -1. (#315481, Kjartan Maraas)
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwindow.c (gtk_window_parse_geometry): Don't set
	unsigned ints to -1.  (#315481, Kjartan Maraas)
2005-09-09 17:49:16 +00:00
Matthias Clasen bd327b904e first_weekday is relative to week_1stday, not to Sunday. Gotta love the
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): first_weekday is relative
	to week_1stday, not to Sunday. Gotta love the ISO 14652 guys...
	(#314473, Stanislav Brabec)
2005-09-09 16:30:09 +00:00
Matthias Clasen 922f4b758d Document memory handling. (#314975, Torsten Schoenfeld)
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_get_visible_range): Document
	memory handling.  (#314975, Torsten Schoenfeld)
2005-09-09 16:27:19 +00:00
Clytie Siddall 10b0e1f552 vi.po: Updated Vietnamese translation. 2005-09-09 06:49:23 +00:00
Tor Lillqvist 477dc904aa Typo. 2005-09-08 23:48:35 +00:00
Tor Lillqvist afb3753cee Cache the display name. There is only one GdkDisplay on Win32, and
2005-09-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c (gdk_display_get_name): Cache the
	display name. There is only one GdkDisplay on Win32, and
	constructing the display name isn't entirely trivial, so cacheing
	is probably worth it. For instance GIMP calls this function a lot.
	(gdk_display_open): Call gdk_display_get_name() to prime the
	cached name.
	(gdk_display_get_n_screens, gdk_display_get_screen,
	gdk_display_get_default_screen): Verify parameter correctness like
	the X11 backend does.

	* gdk/win32/gdkscreen-win32.c (gdk_screen_make_display_name):
	Return a freshly allocated string, as the API specifies. Fixes a
	heap corruption problem that caused random errors and crashes in
	GIMP, for instance.
2005-09-08 22:37:57 +00:00
Christophe Merlet 2220844829 Updated French translation. 2005-09-07 22:23:59 +00:00
Christophe Merlet b308f4bb7f Updated French translation. 2005-09-07 20:59:12 +00:00
Christophe Merlet dd82bb711d Updated French translation. 2005-09-07 20:53:19 +00:00
Clytie Siddall 8e4ed16d9d vi.po: Updated Vietnamese translation. 2005-09-07 04:27:44 +00:00
Matthias Clasen 7d5a80c6e6 Tell xgettext about all the printf-like functions we use. 2005-09-06 16:13:59 +00:00
Alexander Shopov 3ddd8080e4 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2005-09-06  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>
2005-09-06 13:31:14 +00:00
Inaki Larranaga 18f9b50665 Updated Basque translation.
2005-09-05  Inaki Larranaga  <dooteo@euskalgnu.org>

	* eu.po: Updated Basque translation.
2005-09-06 06:53:49 +00:00
Baris Cicek b3549a7813 Updated Turkish Translation 2005-09-05 18:55:48 +00:00
Matthias Clasen 73060c73fa Set the label of a button if it has no child. (#315253, John Finlay)
2005-09-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaction.c (connect_proxy): Set the label of a button
	if it has no child.  (#315253, John Finlay)
2005-09-05 18:45:33 +00:00
Matthias Clasen 3500552ac9 Fix some typos. (#315208, Vincent Untz)
2005-09-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/tmpl/gtkpaned.sgml: Fix some typos.
	(#315208, Vincent Untz)
2005-09-05 18:25:15 +00:00
Baris Cicek 4e0391e73f Updated turkish translation 2005-09-05 17:20:57 +00:00
Raphael Higino e2573ade4f Updated pt_BR translation 2005-09-04 22:24:10 +00:00
Priit Laes 01635ceb4b Translation updated by Ivar Smolin.
2005-09-04  Priit Laes  <plaes@cvs.gnome.org>

	* et.po: Translation updated by Ivar Smolin.
2005-09-04 20:33:32 +00:00
Ignacio Casal Quinteiro d64ae9b682 *** empty log message *** 2005-09-04 18:05:12 +00:00
Danilo Šegan b45279ee5b Updated Serbian translation. 2005-09-03 19:00:52 +00:00
Chao-Hsiung Liao b199e7e7de Updated Traditional Chinese translation.
2005-09-03  Chao-Hsiung Liao  <j_h_liau@yahoo.com.tw>

	* zh_TW.po: Updated Traditional Chinese translation.
2005-09-03 07:06:58 +00:00
Matthias Clasen 38aec4a63e Disconnect idle handlers on destroy to avoid problems when they are called
2005-09-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_destroy): Disconnect idle handlers
	on destroy to avoid problems when they are called on a destroyed
	widget.  (#315135, John Cupitt)
2005-09-02 19:51:06 +00:00
Matthias Clasen 9dfc161c87 If the window is destroyed, we still need to deliver the destroy event.
2005-09-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmain.c (gtk_get_event_widget): If the window is destroyed,
	we still need to deliver the destroy event.  (#314980, Chris Lahey)
2005-09-02 17:31:53 +00:00
Alexander Larsson 1c705dd477 Handle base_path being null in the rest of the cases (#310270)
2005-09-02  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfilechooserdefault.c: (shortcuts_add_volumes),
	(shortcuts_activate_volume):
	Handle base_path being null in the rest of the cases (#310270)
2005-09-02 13:31:45 +00:00
Jordi Mallach c9e6506fa0 Added empty file to fix GTK+ build.
2005-09-02  Jordi Mallach  <jordi@sindominio.net>

	* ku.po: Added empty file to fix GTK+ build.
2005-09-02 09:04:28 +00:00
Rajesh Ranjan be1977f4ea udted by rranjan 2005-09-02 08:18:20 +00:00
Tor Lillqvist 7e6a27464a Keep track of cursor position also in root window coordinates. Prune out
2005-09-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Keep track of
	cursor position also in root window coordinates. Prune out
	superfluous WM_MOUSEMOVE events even earlier, based on root window
	coordinates. Windows sends WM_MOUSEMOVE messages after a new
	window has ben mapped below the cursor even if the mouse doesn't
	move. We used to generate GDK_MOTION_NOTIFY in these cases. This
	confused at least gtk_menu_motion_notify(). (#314995)

	* gtk/gtkintl.h: No need to include config.h here. It caused
	warnings about GTK_LOCALEDIR being redefined on Win32 when
	compiling files where gtkintl.h is included after gtkprivate.h
	(which #undefines and re-#defines GTK_LOCALEDIR on Win32).
2005-09-02 01:11:57 +00:00
Rajesh Ranjan fd065333eb udt by rranjan@redhat.com 2005-09-01 14:43:14 +00:00
Matthias Clasen 3d74f1d64b Fix doc typo. (#314921, Guillaume Cottenceau)
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaction.c (gtk_action_get_accel_closure): Fix doc
	typo.  (#314921, Guillaume Cottenceau)
2005-09-01 13:12:03 +00:00
Leonid Kanter 17267663ad Update Russian translation 2005-09-01 10:48:38 +00:00
Baris Cicek 48817f35e3 Added ku to ALL_LINGUAS 2005-08-31 14:22:33 +00:00
Baris Cicek 6823afb03d Added ku.po 2005-08-31 14:19:40 +00:00
Leonid Kanter 3d52e58cdd Updated Russian translation 2005-08-31 10:54:08 +00:00
Kjartan Maraas f16215fd66 Updated Norwegian bokmål translation. Same
2005-08-31  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.
	* no.po: Same
2005-08-31 08:04:49 +00:00
Alexander Shopov 1d1b02b9a4 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2005-08-31  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>
2005-08-31 05:09:10 +00:00
Matthias Clasen 9d6836145a Bump version 2005-08-29 18:38:35 +00:00
Matthias Clasen 3ed761f3ba 2.8.3 2005-08-29 18:29:12 +00:00
Matthias Clasen 20816d91eb Only cancel if the menu was active. (#314298, Christian Persch, analysis
2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_grab_notify): Only cancel if the menu
	was active.  (#314298, Christian Persch, analysis by Mark McLoughlin)
2005-08-29 14:51:17 +00:00
Matthias Clasen 47daaa2e88 Remove an accidentally leftover duplicate pixbuf creation. (#314700,
2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconcache.c (_gtk_icon_cache_get_icon): Remove an
	accidentally leftover duplicate pixbuf creation.  (#314700,
	Kjartan Maraas)
2005-08-29 05:05:13 +00:00
Matthias Clasen bd60a8f839 Don't leak the cursor theme name. (#314693, Kjartan Maraas)
2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksettings.c (settings_update_cursor_theme): Don't
	leak the cursor theme name.  (#314693, Kjartan Maraas)
2005-08-29 04:47:20 +00:00
Matthias Clasen 767cd6abd9 Free state.children in all cases. (#313862, Kjartan Maraas)
2005-08-29  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkasync.c (_gdk_x11_get_window_child_info): Free
	state.children in all cases.  (#313862, Kjartan Maraas)
2005-08-29 04:37:11 +00:00
Jordi Mallach 045b188be0 Updated Catalan translation from HEAD. 2005-08-29 00:04:41 +00:00
Evandro Fernandes Giovanini 84db15f503 Updated Brazilian Portuguese translation.
2005-08-28  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

	* pt_BR.po: Updated Brazilian Portuguese translation.
2005-08-28 23:17:18 +00:00
Francisco Javier F. Serrador 2feb926544 Updated Spanish translation
005-08-28  Francisco Javier F. Serrador  <serrador@cvs.gnome.org>

	* es.po: Updated Spanish translation
2005-08-28 18:25:13 +00:00
Jordi Mallach a915d5b34d Updated Catalan translation by Xavier Conde. 2005-08-27 12:11:14 +00:00
Christophe Merlet 017eceaad2 Updated French translation. 2005-08-27 12:09:53 +00:00
Christophe Merlet 15a7fbbb12 Updated French translation. 2005-08-27 12:08:22 +00:00
Matthias Clasen b9e87239a8 Fix the default value of the ui property.
2005-08-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c (gtk_ui_manager_class_init): Fix the default
	value of the ui property.
2005-08-27 04:29:46 +00:00
Matthias Clasen a37a5febe8 Don't warn when G_MAXLONG is passed as length.
2005-08-27  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkproperty-x11.c (gdk_property_get): Don't warn
	when G_MAXLONG is passed as length.
2005-08-27 04:23:04 +00:00
Matthias Clasen 50221cc0ea Updates.
2005-08-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk-update-icon-cache.xml:
	* gtk/gtk-update-icon-cache.1: Updates.
2005-08-26 19:03:25 +00:00
Matthias Clasen c8c087e2fe Avoid an uninitialized variable warning, pointed out by Colin Walters.
2005-08-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkicontheme.c (theme_lookup_icon): Avoid an uninitialized
	variable warning, pointed out by Colin Walters. (#314585)
2005-08-26 16:32:07 +00:00
Tor Lillqvist 4586870479 Remove some ifdeffed out debugging printouts.
2005-08-26  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilesystemwin32.c: Remove some ifdeffed out debugging
	printouts.
	(gtk_file_system_win32_parse): Don't mishandle UNC paths. (#314519)
2005-08-26 13:47:57 +00:00
Matthias Clasen 1dd674cfbb Fix the calculation of week_start. (#314473, JP Rosevaar)
2005-08-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Fix the calculation
	of week_start.  (#314473, JP Rosevaar)
2005-08-26 06:27:11 +00:00
Thomas Fitzsimmons 86c3f0ed56 Acquire GDK lock. (#314533, Thomas Fitzsimmons)
2005-08-25  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gtk/gtkfilesystemmodel.c (idle_finished_loading_cb): Acquire GDK
	lock.  (#314533, Thomas Fitzsimmons)
2005-08-26 03:53:29 +00:00
Matthias Clasen b33b49d6fb Handle NULL gracefully. (#314523, Ed Catmur)
2005-08-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Handle
	NULL gracefully.  (#314523, Ed Catmur)
2005-08-26 03:05:14 +00:00
Owen Taylor 3c0ca31948 Handle theme == NULL.
2005-08-25  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
        Handle theme == NULL.
2005-08-25 19:22:20 +00:00
Matthias Clasen 70bce53b8e Take widget y offset into account when positioning the popup. (#314470,
2005-08-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenutoolbutton.c (menu_position_func): Take widget
	y offset into account when positioning the popup.  (#314470,
	Christian Persch)
2005-08-25 18:12:07 +00:00
Owen Taylor ebc47dba8d Add missing bug number 2005-08-25 18:01:01 +00:00
Owen Taylor 1cfd18662b Use gdk_screen_init as instance_init, not base_init! (Fix from Frederic
2005-08-25  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkscreen.c (gdk_screen_get_type): Use gdk_screen_init
        as instance_init, not base_init! (Fix from Frederic Crozat,
        reported by Joe Marcus Clarke). Trivial cleanup: use -1.
        rather than -1 for a negative flag value.
2005-08-25 17:53:03 +00:00
370 changed files with 104008 additions and 66171 deletions
+1810
View File
File diff suppressed because it is too large Load Diff
+1810
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -18,8 +18,8 @@ GTK+ requires the following packages:
Simple install procedure
========================
% gzip -cd gtk+-2.8.2.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.8.2 # change to the toplevel directory
% gzip -cd gtk+-2.8.13.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.8.13 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]
+342
View File
@@ -1,3 +1,345 @@
Overview of Changes from GTK+ 2.8.12 to GTK+ 2.8.13
===================================================
* Bugs fixed:
330732 Can't select some items in GtkIconView [Donald Straney]
330944 gtk_icon_theme_list_icons: example contexts don't work
[John Spray]
331097 gnopernicus crashes on changing display screen source
for magnifier [Oana Serb]
331467 evince crashes in gdk_region_union_with_rect [Benjamin Berg]
331820 Small error in _gdk_gc_update_context [Matthias]
331785 gtk.Notebook.get_current_page() returns incorrect page
number when pages hidden [Sebastien Bacher]
331940 GtkAboutDialog not responsive to Escape key [Daniel Drake]
331440 GtkNotebook popup menu not keynavigatable [Paolo Borelli]
331651 GtkRadioButton does not issue notify::active
332059 Make more use of G_DISABLE_ASSERT in TextView code
[Arnaud Charlet]
* Updated translations (eu,ka,uk)
Overview of Changes from GTK+ 2.8.11 to GTK+ 2.8.12
===================================================
* The font picker button can now display fractional
font sizes [Ross Burton]
* Updates for the windows theme [Dom Lachowicz]
* Workaround for cairo hitting a slow path in the
X server [Federico Mena Quintero]
* Bugs fixed:
145243 root window drag FROM testdnd not working [Andrew S. Dixon]
321054 Pointer grabs misbehave on Win32 [Tor Lillqvist]
322042 Buggy RTL support in ellipsized labels [Behdad Esfahbod]
325521 enter_notify_event are not received on popup
window in Win32 [Tor Lillqvist]
327217 set_decorations() is overridden by window type
hint [John Ehresman]
327375 accept_focus isn't respected [John Ehresman]
328820 they keypad '/' key should open the "open location"
dialog [Federico Mena Quintero]
329144 critical in gtk_widget_event [Wouter Bolsterlee]
329124 distclean removes README [Kjartan Maraas, Tim Janik]
329208 unsetting the "active" property of GtkToggleToolButton
doesn't work properly [Guillaume Cottenceau]
329876 Crash in gtktreemodelfilter.c when using gtk-demo
with file picker [Kristian Rietveld]
329099 gtk_misc_set_padding fails with labels in RTL
locales [Hooman Mesgary]
330022 Wrong pixel values in rsvg_cairo_render_image [Dom Lachowicz]
330177 gtk_entry_completion_match_selected generates a critical
warning when completion model is empty [Raphael Slinckx]
330389 gtk_file_info_copy corrupts memory [Markku Vire]
330563 image loaders don't check callbacks for NULL [Benjamin Otte]
* Documentation improvements [Ross Burton, Murray Cumming,
Mart Raudsepp, Federico Mena Quintero, Milosz Derezynski]
* Translation updates (cy,lt,nl,pt,ru,sr,sr@Latn,vi)
Overview of Changes from GTK+ 2.8.10 to GTK+ 2.8.11
===================================================
* Avoid memory overruns in the pixbuf theme engine
with nonsensical gradient specifications. [Matthias]
* Bugs fixed:
326003 Cursor doesn't move as expected [Evert Verhellen]
326806 Segfault from combination of gtk_container_set_resize_mode()
and GtkComboBox [Sebastien Bacher]
327751 segfault in update_cursor on amd64 [Ryan Lovett]
327538 eog crashes at launch under AIX [Christophe Belle]
153213 "~" should bring up the location dialog [Dan Winship]
327934 gtk_text_layout_get_cursor_locations() chokes on
layout=0x0 [Christian Kirbach]
* Documentation improvements [Federico Mena Quintero]
* Translation updates (es,pt_BR,zh_HK,zh_TW)
Overview of Changes from GTK+ 2.8.9 to GTK+ 2.8.10
==================================================
* Derive GtkObject from GInitiallyUnowned instead of
GObject, if possible. Note that this change is known
to break versions of the GTK+ Perl bindings older
than GTK+ Perl 2.13.4. [Tim Janik]
* Add a setting to allow falling back to another icon
theme before trying hicolor. [Rodney Dawes]
* Require GLib 2.8.5
* Updated translations (ca,el,es,fr,hi,it,ko,pt_BR,vi)
* Bugs fixed:
137351 GtkEntryCompletion sometimes selects first completion item
[Niklas Knutsson]
165714 GtkEntryCompletion doesn't complete on paste [Christian Neumair]
317687 gnome-panel crash by clicking on settings
321548 speed up gtk_text_iter_set_visible_line_index [Paolo
Borelli]
323843 Garbage in gtk_text_view_get_border_window_size()
323876 Broadcasting _GTK_LOAD_ICONTHEMES is a performance
bug [Peter Lund]
324044 Documentation entry for GtkTreeView::row-activated
[Davyd Madeley]
323504 Gtk-CRITICAL when dragging a launcher from the menu
to the top panel [Kjartan Maraas]
323655 Improved support for Icon Naming Spec in unix filesystem
backend [Rodney Dawes]
323995 hidden widgets distort the left/right/up/down focus
order [Dan Winship]
324588 icon_view auto dnd and the item-activated signal
[Dave Andreoli]
322475 icon view's horizontal layout doesn't respect
item_width [Alex Graveley]
324815 Typo in gtkwindow.c [Ross Burton]
324996 Description about gtk_im_context_filter_keypress on API
reference
323666 gdk_window_scroll doesn't invalidate if another top-level
is above window [John Ehresman]
322264 gdk_drawable_get_visible_region win32 / x11 inconsistency
[John Ehresman]
325358 word erase in text fields considers space as a separate
word [Akkana Peck]
325443 gtk_drag_begin doesn't work unless given a motion event
[Peter Harvey]
325723 gtk_ui_manager_get_toplevels does not return an empty
list [Steve Chaplin]
305894 excessive memory use in gdk_pixbuf_new_from_file_XXX
functions [Denis Vlasenko, Michael Natterer]
325199 The API reference for gtk_exit() states that it's
deprecated but doesn't state the replacement function,
if any [Ævar Arnfjörð Bjarmason]
325869 GtkViewPort not releasing signal handlers on destruction
[Jorn Baayen]
325782 GtkToolButton ::clicked signal should set G_SIGNAL_ACTION
[Martyn Russell]
325817 FileChooserButton uses "Home" instead of directory name
[Federico Mena Quintero]
326098 label alignment is wrong when width-chars is set [Benjamin Otte]
326200 translations in GtkActionGroup erroneously translated
[Christian Stimming]
326429 in gtk.h, twice the same lines [Benoît Carpentier]
326064 Artifacts on some widgets [Andrew Conkling]
Overview of Changes from GTK+ 2.8.8 to GTK+ 2.8.9
=================================================
* Bugs fixed:
321560 File chooser filter behaves weird [Bogdan Nicula,
Federico Mena Quintero]
317999 2.8.4 to 2.8.6: sound-juicer crash, fileselector
assertions [Sebastian Bacher]
322569 On unsetting the Model, GtkTreeView does not clear
it's associated TreeSelection [Milosz Derezynski]
322998 Crash on selecting a file of null mime-type [Sadrul
Habib Chowdhury]
323024 gtktoolbutton leaks a pixbuf [Paolo Borelli]
323209 GdkEvent leaked in gtktreeview.c /
gtk_tree_view_key_press [Crispin Flowerday]
323073 Typo in trap_activate_cb() [Sadrul Habib Chowdhury]
323045 gtkcalendar.c: The identifier is already declared.
[Kazuki Iwamoto]
323386 gtk_menu_attach_to_widget() does not take NULL
detacher [Jorn Baayen]
307196 Unhinted fonts are measured incorrectly and drawing
problems occur as a result [Alex Jones, Behdad Esfahbod]
316310 unwanted scrolling in recent gtk [Paolo Borelli]
322019 Toolbars without icons are invisible in icon-only
mode [Ross Burton]
323077 Search-entry in the TreeView not working properly
[Sadrul Habib Chowdhury]
323475 gtktoolbutton.c:562: warning: 'image' is used
uninitialized in this function [Ross Burton]
323577 reference count of textbuffer increases with each
paste
323629 gtk_selection_data_get_uris leaks memory
[Markku Vire]
* Other changes
- Remove GMemChunk from public header files to
support building against GLib 2.10 [Matthias Clasen]
- Report errors in option parsing [Matthias]
- Merge upstream xdgmime changes to handle duplicate
glob patterns [Matthias]
Overview of Changes from GTK+ 2.8.7 to GTK+ 2.8.8
=================================================
* GtkFileChooser
- Make F2 work for renaming bookmarks [Jaap A. Haitsma,
Paolo Borelli]
* GtkEntry
- Turn off input methods in password entries [James Su]
* Win32 changes
- Various visual improvements to the ms-windows
theme [Dom Lachowicz]
- Rework window decoration handling [Tor Lillqvist]
- Fix localized weekday and month names in GtkCalendar [Tor]
- Make urgency hint work on NT4 [Tor]
* Other fixes [Arjan van de Ven, Philip Langdale, Jens
Granseuer, Bogdan Nicula, Benedikt Meurer, Michael
Natterer, Kazuki Iwamoto, Paolo Borelli, Søren Sandmann,
Jean-Yves Lefort, Milosz Derezynski, Tze'ela Hebron]
* Documentation improvements [Elie De Brauwer]
* Updated translations (be,hu,sk,th,wa)
Overview of Changes from GTK+ 2.8.6 to GTK+ 2.8.7
=================================================
* GtkFileChooser
- Don't special-case the names of Home and Desktop
[Federico Mena Quintero]
- Avoid loading more than one directory initially.
[Federico]
- Make the file chooser work better with window
groups [Christian Persch]
- Improve keynav in the pathbar [Carlos Garnacho,
Andrei Yurkevich]
- Don't access unmounted volumes [Federico]
* GtkTextView
- Avoid quadratic blowup when deleting text with
lots of tags [Matthias Clasen]
- Fix drag-selection corner cases [Arvind S N,
Paolo Borelli]
* GtkEntry
- Add the entry completion popup to the window
group [Christian Persch]
* GtkTreeView
- Fix background drawing in RTL locales [Eric Cazeaux]
- Handle Shift-G for going back in typeahead
search [Christian Neumair]
* GtkComboBox
- Leave Ctrl-PageUp/PageDown to applications
[Christian Neumair]
* Fix compilation problems with gtkcalendar.c
[Matthias Hasselmann]
* Add labels for GTK_STOCK_CONNECT and
GTK_STOCK_DISCONNECT items [Richard Hult]
* Resolve symbols in dlopened modules lazily [Laszlo
Peter]
* GDK
- Don't try to set overlarge window icons [Claudio
Saavedra]
- Improve handling of odd keymaps [Kean Johnston]
* Win32 changes
- Speed up compositing [John Ehresman]
- Improve handling of clipboard [Tor Lillqvist]
- Improve visuals of scrollbars, toolbars, handleboxes
and menubars in the ms-windows theme [Dom Lachowicz]
- Make icon masks work on Win98 [Peter Zelezny]
- Hide resize and maximize buttons on non-resizable
windows [Tor]
- Don't hide dotfiles [Tor]
* Bug fixes [Kazuki Iwamoto, Ross Burton, Michael
Natterer, Bogdan Nicula, Damien Carbery, Gustavo
Carneiro, Tommi Komulainen, Thomas Klausner,
Alexander Larsson, Bastien Nocera, Federico
Mena Quintero, John Ehresman, Paolo Borelli,
Antonio Sacchi, Christian Persch, Carlos
Garnacho, Jeremy Cook, Nickolay V. Shmyrev,
Richard Hult, Maxim Udushlivy, Peter Zelezny]
* Documentation improvements [Paolo Borelli,
Christian Neumair, Christian Persch
Overview of Changes from GTK+ 2.8.5 to GTK+ 2.8.6
=================================================
* GtkFileChooser
- Don't reload the current folder unnecessarily on map [Federico
Mena Quintero]
* Revert a change from 2.8.5 that could lead to assertion
failures when finalizing GtkStyles [Matthias Clasen]
* Remove context prefixes from Portugese translations [Duarte
Henriques]
Overview of Changes from GTK+ 2.8.4 to GTK+ 2.8.5
=================================================
* GtkFileChooser
- Don't clear the file name entry too often when
in SAVE mode. [Jürg Billeter]
- Reduce the startup time in OPEN mode [Federico
Mena Quintero]
* Stop drag in GtkPaned when grab shadowed [Matthias Clasen]
* Correct the calculation for the first weekday
in GtkCalendar [Matthias Clasen]
* Use a larger buffer when determining the image
format in gdk-pixbuf [Sebastian Bacher, Dom Lachowicz]
* Win32 bug fixes [Kazuki Iwamoto, Tor Lillqvist]
* Other bug fixes [Tor Lillqvist, Gustavo Carneiro,
Paolo Borelli, Ray Strode, Søren Sandmann, Tommi Komulainen,
Benjamin Berg]
Overview of Changes from GTK+ 2.8.3 to GTK+ 2.8.4
=================================================
* GtkFileChooser
- Turn off the profiling code [Federico Mena Quintero]
* GtkEntryCompletion
- Make completion work with multibyte characters
[Tommi Komulainen]
- Improve positioning of large popups [Tommi Komulainen]
* GtkTreeView
- Make column reordering by DND work better [Dan
Winship]
* GtkCalendar
- Correctly determine the first weekday from
nl_langinfo() [Stanislav Brabec]
* GtkFontSel, GtkFontButton
- Handle invalid font names better [Michael R. Walton,
Ed Catmur]
* Deliver destroy events [Chris Lahey]
* Fix redrawing of widgets in the the presence
of shaped child windows [Dan Winship]
* Win32 changes
- Prune unnecessary mouse events [Tor Lillqvist]
- Fix memory corruption when using display
names [Tor Lillqvist]
* Other bug fixes [Alexander Larsson, John Cupitt,
John Finlay, Kjartan Maraas, Thomas Leonard,
Guillaume Cottenceau, Alexander Nedotsukov, Tim Janik,
Tor Lillqvist, Tommi Komulainen
* Documentation improvements [Guillaume Cottenceau,
Torsten Schoenfeld, Damon Chaplin, Vincent Untz,
Tommi Komulainen, Federico Mena Quintero
* New and updated translations (bg,bn,et,eu,fr,gl,hi,it,
ku,ru,sr,sv,tr,vi)
Overview of Changes from GTK+ 2.8.2 to GTK+ 2.8.3
=================================================
* Fix problems with the handling of initial settings
for font options and cursor themes [Frederic Crozat,
Joe Markus Clarke, Owen Taylor, Kjartan Maraas]
* Add a --ignore-theme-index option to
gtk-update-icon-cache [JP Rosevaar]
* Other bug fixes [Christian Persch, Owen Taylor,
Ed Catmur, Thomas Fitzsimmons, JP Rosevaar, Tor
Lillqvist, Colin Walters, Yong Wang, Matthias,
Kjartan Maraas, Christian Persch, Mark McLoughlin]
* Updated translations (ca,es,fr,pt_BR)
Overview of Changes from GTK+ 2.8.1 to GTK+ 2.8.2
=================================================
* Fix a crash with custom icon themes, which affected
+1 -1
View File
@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 2.8.2. GTK+ is a multi-platform toolkit for
This is GTK+ version 2.8.13. 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.
+5
View File
@@ -93,6 +93,11 @@ fi
rm -rf autom4te.cache
# README and INSTALL are required by automake, but may be deleted by clean
# up rules. to get automake to work, simply touch these here, they will be
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL
$ACLOCAL $ACLOCAL_FLAGS || exit $?
libtoolize --force || exit $?
+16 -11
View File
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [8])
m4_define([gtk_micro_version], [2])
m4_define([gtk_micro_version], [13])
m4_define([gtk_version],
[gtk_major_version.gtk_minor_version.gtk_micro_version])
m4_define([gtk_interface_age], [2])
m4_define([gtk_interface_age], [13])
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
@@ -31,7 +31,7 @@ m4_define([gtk_api_version], [2.0])
m4_define([gtk_binary_version], [2.4.0])
# required versions of other packages
m4_define([glib_required_version], [2.7.1])
m4_define([glib_required_version], [2.8.5])
m4_define([pango_required_version], [1.9.0])
m4_define([atk_required_version], [1.0.1])
m4_define([cairo_required_version], [0.9.2])
@@ -433,7 +433,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 ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta te th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ko ku li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr uk uz uz@Latn 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*)
@@ -1045,10 +1045,10 @@ if test "x$gdktarget" = "xx11"; then
#
# Check for basic X packages; we use pkg-config if available
#
if $PKG_CONFIG --exists x11 xext; then
if $PKG_CONFIG --exists x11 xext xrender; then
have_base_x_pc=true
X_PACKAGES="$X_PACKAGES x11 xext"
x_libs="`pkg-config --libs x11 xext`"
X_PACKAGES="$X_PACKAGES x11 xext xrender"
x_libs="`pkg-config --libs x11 xext xrender`"
# Strip out any .la files that pkg-config might give us (this happens
# with -uninstalled.pc files)
@@ -1070,11 +1070,11 @@ if test "x$gdktarget" = "xx11"; then
fi
x_cflags="$X_CFLAGS"
x_libs_for_checks="$X_LIBS -lXext -lX11 $X_EXTRA_LIBS"
x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 -lXrender $X_EXTRA_LIBS"
fi
# Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
@@ -1093,6 +1093,8 @@ if test "x$gdktarget" = "xx11"; then
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
AC_CHECK_FUNC(XRenderQueryExtension, :,
AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
# Check for xReply
@@ -1388,9 +1390,12 @@ fi
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
GDK_PACKAGES="$PANGO_PACKAGES $X_PACKAGES"
GDK_PACKAGES="$PANGO_PACKAGES"
if test "x$gdktarget" = "xx11"; then
GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES"
fi
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $X_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
#
# If we aren't writing explicit dependencies, then don't put the extra libraries we need
+55
View File
@@ -1,3 +1,58 @@
2006-02-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.13 ===
2006-02-11 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.12 ===
2006-01-25 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.11 ===
2006-01-11 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.10 ===
2005-12-09 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.9 ===
2005-11-28 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.8 ===
2005-11-17 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-xlib-drawable.c:
* gdk-pixbuf-xlibrgb.c: const correctness fixes
found by Arjan van de Ven and gcc.
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.7 ===
2005-10-05 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-xlib-2.0.pc.in (Requires): Require
gmodule-no-export-2.0 instead of gmodule-2.0
2005-10-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.6 ===
2005-10-03 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.5 ===
2005-09-27 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.4 ===
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.3 ===
2005-08-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.2 ===
@@ -6,6 +6,6 @@ includedir=@includedir@
Name: GdkPixbuf Xlib
Description: GdkPixbuf rendering for Xlib
Version: @VERSION@
Requires: gobject-2.0,gmodule-2.0,gdk-pixbuf-2.0
Requires: gobject-2.0,gmodule-no-export-2.0,gdk-pixbuf-2.0
Libs: -L${libdir} -lgdk_pixbuf_xlib-@GTK_API_VERSION@
Cflags: -I${includedir}
@@ -41,7 +41,7 @@
static guint32 mask_table[] = {
static const guint32 mask_table[] = {
0x00000000, 0x00000001, 0x00000003, 0x00000007,
0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f,
0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff,
@@ -1058,7 +1058,7 @@ convert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *
typedef void (* cfunc) (XImage *image, guchar *pixels, int rowstride, xlib_colormap *cmap);
static cfunc convert_map[] = {
static const cfunc convert_map[] = {
rgb1,rgb1,rgb1a,rgb1a,
rgb8,rgb8,rgb8a,rgb8a,
rgb555lsb,rgb555msb,rgb555alsb,rgb555amsb,
+1 -1
View File
@@ -516,7 +516,7 @@ static guint32
xlib_rgb_score_visual (XVisualInfo *visual)
{
guint32 quality, speed, pseudo, sys;
static const char* visual_names[] =
static const char * const visual_names[] =
{
"static gray",
"grayscale",
+3 -2
View File
@@ -4,6 +4,7 @@
*/
#include <gtk/gtk.h>
#include "config.h"
#include "demo-common.h"
static GtkWidget *window = NULL;
@@ -132,8 +133,8 @@ about_cb (GtkAction *action,
gtk_about_dialog_set_url_hook (activate_url, NULL, NULL);
gtk_show_about_dialog (GTK_WINDOW (window),
"name", "GTK+ Code Demos",
"version", "2.4.3",
"copyright", "(C) 1997-2004 The GTK+ Team",
"version", PACKAGE_VERSION,
"copyright", "(C) 1997-2005 The GTK+ Team",
"license", license,
"website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK+ functions.",
+2 -1
View File
@@ -41,7 +41,8 @@ paste_received (GtkClipboard *clipboard,
entry = GTK_WIDGET (user_data);
/* Set the entry text */
gtk_entry_set_text (GTK_ENTRY (entry), text);
if(text)
gtk_entry_set_text (GTK_ENTRY (entry), text);
}
void
+1
View File
@@ -63,6 +63,7 @@ set_cell_color (GtkCellLayout *cell_layout,
(color.red >> 8) << 24 |
(color.green >> 8) << 16 |
(color.blue >> 8) << 8;
g_free (text);
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 24, 24);
gdk_pixbuf_fill (pixbuf, pixel);
-392
View File
@@ -1,392 +0,0 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <demos.h>
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static gchar *current_file = NULL;
enum {
TITLE_COLUMN,
FILENAME_COLUMN,
FUNC_COLUMN,
ITALIC_COLUMN,
NUM_COLUMNS
};
gboolean
read_line (FILE *stream, GString *str)
{
int n_read = 0;
flockfile (stream);
g_string_truncate (str, 0);
while (1)
{
int c;
c = getc_unlocked (stream);
if (c == EOF)
goto done;
else
n_read++;
switch (c)
{
case '\r':
case '\n':
{
int next_c = getc_unlocked (stream);
if (!(next_c == EOF ||
(c == '\r' && next_c == '\n') ||
(c == '\n' && next_c == '\r')))
ungetc (next_c, stream);
goto done;
}
default:
g_string_append_c (str, c);
}
}
done:
funlockfile (stream);
return n_read > 0;
}
void
load_file (const gchar *filename)
{
FILE *file;
GtkTextIter start, end;
GString *buffer = g_string_new (NULL);
int state = 0;
gboolean in_para = 0;
if (current_file && !strcmp (current_file, filename))
return;
g_free (current_file);
current_file = g_strdup (filename);
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
gtk_text_buffer_delete (info_buffer, &start, &end);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_delete (source_buffer, &start, &end);
file = fopen (filename, "r");
if (!file)
{
g_warning ("Cannot open %s: %s\n", filename, g_strerror (errno));
return;
}
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
while (read_line (file, buffer))
{
gchar *p = buffer->str;
gchar *q;
switch (state)
{
case 0:
/* Reading title */
while (*p == '/' || *p == '*' || isspace (*p))
p++;
q = p + strlen (p);
while (q > p && isspace (*(q - 1)))
q--;
if (q > p)
{
int len_chars = g_utf8_pointer_to_offset (p, q);
end = start;
g_assert (strlen (p) >= q - p);
gtk_text_buffer_insert (info_buffer, &end, p, q - p);
start = end;
gtk_text_iter_backward_chars (&start, len_chars);
gtk_text_buffer_apply_tag_by_name (info_buffer, "title", &start, &end);
start = end;
state++;
}
break;
case 1:
/* Reading body of info section */
while (isspace (*p))
p++;
if (*p == '*' && *(p + 1) == '/')
{
gtk_text_buffer_get_iter_at_offset (source_buffer, &start, 0);
state++;
}
else
{
int len;
while (*p == '*' || isspace (*p))
p++;
len = strlen (p);
while (isspace (*(p + len - 1)))
len--;
if (len > 0)
{
if (in_para)
gtk_text_buffer_insert (info_buffer, &start, " ", 1);
g_assert (strlen (p) >= len);
gtk_text_buffer_insert (info_buffer, &start, p, len);
in_para = 1;
}
else
{
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
in_para = 0;
}
}
break;
case 2:
/* Skipping blank lines */
while (isspace (*p))
p++;
if (*p)
{
p = buffer->str;
state++;
/* Fall through */
}
else
break;
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
break;
}
}
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
}
gboolean
button_press_event_cb (GtkTreeView *tree_view,
GdkEventButton *event,
GtkTreeModel *model)
{
if (event->type == GDK_2BUTTON_PRESS)
{
GtkTreePath *path = NULL;
gtk_tree_view_get_path_at_pos (tree_view,
event->window,
event->x,
event->y,
&path,
NULL);
if (path)
{
GtkTreeIter iter;
gboolean italic;
GVoidFunc func;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_store_get (GTK_TREE_STORE (model),
&iter,
FUNC_COLUMN, &func,
ITALIC_COLUMN, &italic,
-1);
(func) ();
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
ITALIC_COLUMN, !italic,
-1);
gtk_tree_path_free (path);
}
gtk_signal_emit_stop_by_name (GTK_OBJECT (tree_view),
"button_press_event");
return TRUE;
}
return FALSE;
}
static void
selection_cb (GtkTreeSelection *selection,
GtkTreeModel *model)
{
GtkTreeIter iter;
GValue value = {0, };
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
gtk_tree_model_get_value (model, &iter,
FILENAME_COLUMN,
&value);
load_file (g_value_get_string (&value));
g_value_unset (&value);
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
PangoFontDescription *font_desc;
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
text_view = gtk_text_view_new ();
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
*buffer = gtk_text_buffer_new (NULL);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
if (is_source)
{
font_desc = pango_font_description_from_string ("Courier 10");
gtk_widget_modify_font (text_view, font_desc);
pango_font_description_free (font_desc);
}
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), !is_source);
return scrolled_window;
}
/* Technically a list, but if we do go to 80 demos, we may want to move to a tree */
static GtkWidget *
create_tree (void)
{
GtkTreeSelection *selection;
GtkCellRenderer *cell;
GtkWidget *tree_view;
GtkTreeViewColumn *column;
GtkTreeStore *model;
GtkTreeIter iter;
gint i;
model = gtk_tree_store_new_with_types (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
gtk_tree_selection_set_type (GTK_TREE_SELECTION (selection),
GTK_TREE_SELECTION_SINGLE);
gtk_widget_set_usize (tree_view, 200, -1);
for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++)
{
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
TITLE_COLUMN, testgtk_demos[i].title,
FILENAME_COLUMN, testgtk_demos[i].filename,
FUNC_COLUMN, testgtk_demos[i].func,
ITALIC_COLUMN, FALSE,
-1);
}
cell = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Widget",
cell,
"text", TITLE_COLUMN,
"italic", ITALIC_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
GTK_TREE_VIEW_COLUMN (column));
gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", selection_cb, model);
gtk_signal_connect (GTK_OBJECT (tree_view), "button_press_event", GTK_SIGNAL_FUNC (button_press_event_cb), model);
return tree_view;
}
int
main (int argc, char **argv)
{
GtkWidget *window;
GtkWidget *notebook;
GtkWidget *hbox;
GtkWidget *tree;
GtkTextTag *tag;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();
gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
notebook = gtk_notebook_new ();
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&info_buffer, FALSE),
gtk_label_new ("Info"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&source_buffer, TRUE),
gtk_label_new ("Source"));
tag = gtk_text_buffer_create_tag (info_buffer, "title");
gtk_object_set (GTK_OBJECT (tag),
"font", "Sans 18",
NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
gtk_object_set (GTK_OBJECT (tag),
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
load_file (testgtk_demos[0].filename);
gtk_main ();
return 0;
}
+84
View File
@@ -1,3 +1,87 @@
2006-02-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.13 ===
2006-02-11 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.12 ===
2006-02-10 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkliststore.sgml: Add a section about
atomicity of insertions. (#329831, Milosz Derezynski)
2006-01-27 Federico Mena Quintero <federico@ximian.com>
Merged from HEAD:
* gtk/tmpl/gtkfilechooser.sgml: Mention that ~ is also a default
key binding.
2006-01-25 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.11 ===
2006-01-11 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.10 ===
2005-12-30 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkmain.sgml: Add deprecation note to
gtk_exit() (#325199, Ævar Arnfjörð Bjarmason)
2005-12-09 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.9 ===
2005-11-28 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.8 ===
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.7 ===
2005-10-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.6 ===
2005-10-03 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.5 ===
2005-09-27 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.4 ===
2005-09-15 Federico Mena Quintero <federico@ximian.com>
* gtk/tmpl/gtkfilechooser.sgml: List all the default key bindings.
Fix the documentation for the "location-popup" binding signal; its
"path" argument was not listed. Mention a tip to have a crude
form of bookmarks accessible through key bindings.
2005-09-13 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkeditable.sgml: Clarify docs
for ::insert-text signal. (#316094, Tommi
Komulainen)
2005-09-05 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkpaned.sgml: Fix some typos.
(#315208, Vincent Untz)
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.3 ===
2005-08-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-update-icon-cache.xml:
* gtk/gtk-update-icon-cache.1: Updates.
2005-08-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.2 ===
+7 -2
View File
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/23/2005" "" ""
.TH "GTK\-UPDATE\-ICON\-CACH" "1" "08/26/2005" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -11,7 +11,7 @@
gtk\-update\-icon\-cache \- Icon theme caching utility
.SH "SYNOPSIS"
.HP 22
\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-quiet] {iconpath}
\fBgtk\-update\-icon\-cache\fR [\-\-force] [\-\-index\-only] [\-\-ignore\-theme\-index] [\-\-quiet] {iconpath}
.SH "DESCRIPTION"
.PP
\fBgtk\-update\-icon\-cache\fR
@@ -31,6 +31,11 @@ to avoid a lot of system call and disk seek overhead when the application starts
\-\-force, \-f
Overwrite an existing cache file even if it appears to be uptodate.
.TP
\-\-ignore\-theme\-index, \-t
Don't check for the existence of 'index.theme' in the icon theme directory. Without this option,
\fBgtk\-update\-icon\-cache\fR
refuses to create an icon cache in a directory which does not appear to be the toplevel directory of an icon theme.
.TP
\-\-index\-only, \-i
Don't include image data in the cache.
.TP
@@ -15,6 +15,7 @@
<command>gtk-update-icon-cache</command>
<arg choice="opt">--force</arg>
<arg choice="opt">--index-only</arg>
<arg choice="opt">--ignore-theme-index</arg>
<arg choice="opt">--quiet</arg>
<arg choice="req">iconpath</arg>
</cmdsynopsis>
@@ -47,6 +48,16 @@ multiple applications, the overall memory consumption is reduced as well.
</para></listitem>
</varlistentry>
<varlistentry>
<term>--ignore-theme-index</term>
<term>-t</term>
<listitem><para>Don't check for the existence of 'index.theme' in the icon theme
directory. Without this option, <command>gtk-update-icon-cache</command> refuses
to create an icon cache in a directory which does not appear to be the toplevel
directory of an icon theme.
</para></listitem>
</varlistentry>
<varlistentry>
<term>--index-only</term>
<term>-i</term>
@@ -19,6 +19,15 @@ and the entry will show the content of the text column in the selected row. To
get the text from the entry, use gtk_combo_box_get_active_text().
</para>
<para>The changed signal will be emitted while typing into a GtkComboBoxEntry,
as well as when selecting an item from the GtkComboBoxEntry's list. Use
gtk_combo_box_get_active() or gtk_combo_box_get_active_iter() to discover
whether an item was actually selected from the list.
</para>
<para>Connect to the activate signal of the GtkEntry (use gtk_bin_get_child()) to
detect when the user actually finishes entering text.</para>
<para>
The convenience API to construct simple text-only #GtkComboBox<!-- -->es can
also be used with #GtkComboBoxEntry<!-- -->s which have been constructed
+6 -5
View File
@@ -125,11 +125,12 @@ it from being inserted entirely.
@editable: the object which received the signal.
@new_text: the new text to insert.
@new_text_length: the length of the new text.
@position: the position at which to insert the new text.
this is an in-out paramter. After the signal
emission is finished, it should point after
the newly inserted text.
@new_text_length: the length of the new text, in bytes,
or -1 if new_text is nul-terminated
@position: the position, in characters, at which to insert
the new text. this is an in-out parameter.
After the signal emission is finished, it should
point after the newly inserted text.
<!-- ##### FUNCTION gtk_editable_select_region ##### -->
<para>
+3 -1
View File
@@ -410,7 +410,9 @@ Indicates the direction a sub-menu will appear.
<para>
Used to customize the appearance of a #GtkToolbar. Note that
setting the toolbar style overrides the user's preferences
for the default toolbar style.
for the default toolbar style. Note that if the button has only
a label set and GTK_TOOLBAR_ICONS is used, the label will be
visible, and vice versa.
</para>
@GTK_TOOLBAR_ICONS: Buttons display only icons in the toolbar.
+77 -16
View File
@@ -204,15 +204,33 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
<tbody>
<row>
<entry>Signal name</entry>
<entry>Key</entry>
<entry>Default key combinations</entry>
</row>
<row>
<entry>location-popup</entry>
<entry><keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo></entry>
<entry>
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo> (empty path);
<keycap>/</keycap> (path of "/")<footnote>
<para>
Both the individual <keycap>/</keycap> key and the
numeric keypad's "divide" key are supported.
</para>
</footnote>;
<keycap>~</keycap> (path of "~")
</entry>
</row>
<row>
<entry>up-folder</entry>
<entry><keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo></entry>
<entry>
<keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo><footnote>
<para>
Both the individual Up key and the numeric
keypad's Up key are supported.
</para>
</footnote>
;
<keycap>Backspace</keycap>
</entry>
</row>
<row>
<entry>down-folder</entry>
@@ -227,16 +245,14 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
</informaltable>
<para>
To change these defaults to something else, you could
include the following fragment in your
<filename>.gtkrc-2.0</filename> file:
You can change these defaults to something else. For
example, to add a <keycap>Shift</keycap> modifier to a few
of the default bindings, you can include the following
fragment in your <filename>.gtkrc-2.0</filename> file:
</para>
<programlisting>
binding "my-own-gtkfilechooser-bindings" {
bind "&lt;Alt&gt;&lt;Shift&gt;l" {
"location-popup" ()
}
bind "&lt;Alt&gt;&lt;Shift&gt;Up" {
"up-folder" ()
}
@@ -244,7 +260,7 @@ binding "my-own-gtkfilechooser-bindings" {
"down-folder" ()
}
bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
"home-folder-folder" ()
"home-folder" ()
}
}
@@ -257,14 +273,24 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
<programlisting>
void user_function (GtkFileChooserDefault *chooser,
const char *path,
<link linkend="gpointer">gpointer</link> user_data);
</programlisting>
<para>
This is used to make the file chooser show a "Location"
dialog which the user can use to manually type the name of
the file he wishes to select. By default this is bound to
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>.
the file he wishes to select. The
<parameter>path</parameter> argument is a string that gets
put in the text entry for the file name. By default this is bound to
<keycombo><keycap>Control</keycap><keycap>L</keycap></keycombo>
with a <parameter>path</parameter> string of "" (the empty
string). It is also bound to <keycap>/</keycap> with a
<parameter>path</parameter> string of "<literal>/</literal>"
(a slash): this lets you type <keycap>/</keycap> and
immediately type a path name. On Unix systems, this is bound to
<keycap>~</keycap> (tilde) with a <parameter>path</parameter> string
of "~" itself for access to home directories.
</para>
<variablelist role="params">
@@ -276,6 +302,14 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>path</parameter>&nbsp;:</term>
<listitem>
<simpara>
default contents for the text entry for the file name
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_data</parameter>&nbsp;:</term>
<listitem>
@@ -285,6 +319,30 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
</listitem>
</varlistentry>
</variablelist>
<tip>
<para>
You can create your own bindings for the
<symbol>location-popup</symbol> signal with custom
<parameter>path</parameter> strings, and have a crude form
of easily-to-type bookmarks. For example, say you access
the path <filename>/home/username/misc</filename> very
frequently. You could then create an <keycombo>
<keycap>Alt</keycap> <keycap>M</keycap> </keycombo>
shortcut by including the following in your
<filename>.gtkrc-2.0</filename>:
</para>
<programlisting>
binding "misc-shortcut" {
bind "&lt;Alt&gt;M" {
"location-popup" ("/home/username/misc")
}
}
class "GtkFileChooserDefault" binding "misc-shortcut"
</programlisting>
</tip>
</refsect3>
<refsect3 id="GtkFileChooserDefault-up-folder">
@@ -298,8 +356,9 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
<para>
This is used to make the file chooser go to the parent of
the current folder in the file hierarchy. By default this
is bound to
<keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>.
is bound to <keycap>Backspace</keycap> and
<keycombo><keycap>Alt</keycap><keycap>Up</keycap></keycombo>
(the Up key in the numeric keypad also works).
</para>
<variablelist role="params">
@@ -338,7 +397,8 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
"/foo/<emphasis>bar/</emphasis>baz", then this will cause
the file chooser to switch to the "baz" subfolder. By
default this is bound to
<keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>.
<keycombo><keycap>Alt</keycap><keycap>Down</keycap></keycombo>
(the Down key in the numeric keypad also works).
</para>
<variablelist role="params">
@@ -372,7 +432,8 @@ class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
<para>
This is used to make the file chooser show the user's home
folder in the file list. By default this is bound to
<keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>.
<keycombo><keycap>Alt</keycap><keycap>Home</keycap></keycombo>
(the Home key in the numeric keypad also works).
</para>
<variablelist role="params">
+13
View File
@@ -91,6 +91,19 @@ that #GtkTreeIter<!-- -->s can be cached while the row exists. Thus, if
access to a particular row is needed often and your code is expected to
run on older versions of GTK+, it is worth keeping the iter around.
</para>
<title>Atomic Operations</title>
<para>
It is important to note that only the methods @gtk_list_store_insert_with_values and
@gtk_list_store_insert_with_valuesv are atomic, in the sense that the row is being appended
to the store and the values filled in in a single operation with regard to #GtkTreeModel signaling.
In contrast, using e.g. @gtk_list_store_append and then @gtk_list_store_set will first create a row,
which triggers the "row_inserted" #GtkTreeModel signal on #GtkListStore. The row, however, is still
empty, and any signal handler connecting to "row_inserted" on this particular store should be prepared
for the situation that the row might be empty.
This is especially important if you are wrapping the #GtkListStore inside a #GtkTreeModelFilter and are
using a #GtkTreeModelFilterVisibleFunc. Using any of the non-atomic operations to append rows to the #GtkListStore
will cause the #GtkTreeModelFilterVisibleFunc to be visited with an empty row first; the function must be prepared for that.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
+2 -2
View File
@@ -170,8 +170,8 @@ for GTK+.
</para>
@error_code: Return value to pass to the caller. This is dependend on the
target system but at least on Unix systems %0 means
success.
target system but at least on Unix systems %0 means success.
@Deprecated: Use the standard exit() function instead.
<!-- ##### FUNCTION gtk_events_pending ##### -->
+1 -1
View File
@@ -345,7 +345,7 @@ be invoked when the menu calls gtk_menu_detach() during its destruction.
@menu: a #GtkMenu.
@attach_widget: the #GtkWidget that the menu will be attached to.
@detacher: the user supplied callback function that will be called when
the menu calls gtk_menu_detach().
the menu calls gtk_menu_detach(), or %NULL
<!-- ##### FUNCTION gtk_menu_detach ##### -->
+2 -2
View File
@@ -201,7 +201,7 @@ Adds a child to the top or left pane.
@paned: a paned widget
@child: the child to add
@resize: should this child expand when the paned widget is resized.
@shrink: can this child be made smaller than its requsition.
@shrink: can this child be made smaller than its requisition.
<!-- ##### FUNCTION gtk_paned_pack2 ##### -->
@@ -212,7 +212,7 @@ Adds a child to the bottom or right pane.
@paned: a paned widget
@child: the child to add
@resize: should this child expand when the paned widget is resized.
@shrink: can this child be made smaller than its requsition.
@shrink: can this child be made smaller than its requisition.
<!-- ##### FUNCTION gtk_paned_get_child1 ##### -->
+5
View File
@@ -83,6 +83,11 @@ Sharing settings between applications
</para>
<!-- ##### ARG GtkSettings:gtk-fallback-icon-theme ##### -->
<para>
</para>
<!-- ##### ARG GtkSettings:gtk-font-name ##### -->
<para>
+1
View File
@@ -510,5 +510,6 @@ modified directly.
</para>
@values:
@Returns:
+88
View File
@@ -1,3 +1,91 @@
2006-02-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.13 ===
2006-02-11 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.12 ===
2006-02-10 Matthias Clasen <mclasen@redhat.com>
* io-jpeg.c:
* io-png.c:
* io-pnm.c:
* io-tiff.c:
* io-xbm.c:
* io-xpm.c: Always check for NULL when using callbacks.
(#330563, Benjamin Otte)
2006-01-25 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.11 ===
2006-01-12 Federico Mena Quintero <federico@ximian.com>
Merged from HEAD:
* gdk-pixbuf-util.c (gdk_pixbuf_saturate_and_pixelate): Clarify
the docs ("darkened/brightened" is not "saturation").
2006-01-11 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.10 ===
2005-12-14 Michael Natterer <mitch@imendio.com>
Merged from HEAD:
* io-jpeg.c: applied patch from maemo-gtk which avoids the
allocation of an intermediate buffer for non-progressive
jpegs. Fixed bug #305894.
2005-12-09 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.9 ===
2005-11-28 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.8 ===
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.7 ===
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* io-xpm.c: Fix several integer overflows which have been
reported as CVE-2005-3186 and CVE-2005-2975.
2005-10-12 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Only call
gdk_pixbuf_loader_eat_header_write() when count > 0. (#318589,
Bogdan Nicula)
2005-10-04 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.6 ===
2005-10-03 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.5 ===
2005-10-03 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
* gdk-pixbuf-loader.c: Use a 1k buffer for sniffing image formats,
instead of 128 or 256 bytes. (#317225, Sebastien Bacher,
Dom Lachowicz)
2005-09-27 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.4 ===
2005-08-29 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.3 ===
2005-08-24 Matthias Clasen <mclasen@redhat.com>
* === Released 2.8.2 ===
+2 -2
View File
@@ -370,7 +370,7 @@ gdk-pixbuf-enum-types.h: s-enum-types-h
@true
s-enum-types-h: @REBUILD@ $(gdk_pixbuf_headers) Makefile
( cd $(srcdir) && glib-mkenums \
( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#ifndef __GDK_PIXBUF_ENUM_TYPES_H__\n#define __GDK_PIXBUF_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
@@ -387,7 +387,7 @@ MAINTAINERCLEANFILES += s-enum-types-h
# gdk-pixbuf-enum-types.c
#
gdk-pixbuf-enum-types.c: @REBUILD@ $(gdk_pixbuf_headers) Makefile
(cd $(srcdir) && glib-mkenums \
(cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#include <gdk-pixbuf/gdk-pixbuf.h>\n#include \"gdk-pixbuf-alias.h\"\n" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--ftail "\n#define __GDK_PIXBUF_ENUM_TYPES_C__\n#include \"gdk-pixbuf-aliasdef.c\"" \
+1 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh
cpp -DINCLUDE_VARIABLES -P -DALL_FILES ${srcdir:-.}/gdk-pixbuf.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
nm -D .libs/libgdk_pixbuf-2.0.so | grep " [BDTR] " | cut -d ' ' -f 3 | sort > actual-abi
nm -D -g --defined-only .libs/libgdk_pixbuf-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
diff -u expected-abi actual-abi && rm expected-abi actual-abi
+1 -1
View File
@@ -136,7 +136,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
GdkPixbufAnimation *animation;
int size;
FILE *f;
guchar buffer [128];
guchar buffer [1024];
GdkPixbufModule *image_module;
gchar *display_name;
gboolean locked = FALSE;
+1 -1
View File
@@ -839,7 +839,7 @@ gdk_pixbuf_new_from_file (const char *filename,
GdkPixbuf *pixbuf;
int size;
FILE *f;
guchar buffer[256];
guchar buffer[1024];
GdkPixbufModule *image_module;
gchar *display_name;
+5 -3
View File
@@ -52,7 +52,7 @@ static guint pixbuf_loader_signals[LAST_SIGNAL] = { 0 };
/* Internal data */
#define LOADER_HEADER_SIZE 128
#define LOADER_HEADER_SIZE 1024
typedef struct
{
@@ -485,7 +485,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
/* we expect it's not to be closed */
g_return_val_if_fail (priv->closed == FALSE, FALSE);
if (priv->image_module == NULL)
if (count > 0 && priv->image_module == NULL)
{
gint eaten;
@@ -727,7 +727,9 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
/* we expect it's not closed */
g_return_val_if_fail (priv->closed == FALSE, TRUE);
/* We have less the 128 bytes in the image. Flush it, and keep going. */
/* We have less the LOADER_HEADER_SIZE bytes in the image.
* Flush it, and keep going.
*/
if (priv->image_module == NULL)
{
GError *tmp = NULL;
+8 -8
View File
@@ -159,14 +159,14 @@ gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf,
* @saturation: saturation factor
* @pixelate: whether to pixelate
*
* Modifies saturation and optionally pixelates @src, placing the
* result in @dest. @src and @dest may be the same pixbuf with no ill
* effects. If @saturation is 1.0 then saturation is not changed. If
* it's less than 1.0, saturation is reduced (the image is darkened);
* if greater than 1.0, saturation is increased (the image is
* brightened). If @pixelate is %TRUE, then pixels are faded in a
* checkerboard pattern to create a pixelated image. @src and @dest
* must have the same image format, size, and rowstride.
* Modifies saturation and optionally pixelates @src, placing the result in
* @dest. @src and @dest may be the same pixbuf with no ill effects. If
* @saturation is 1.0 then saturation is not changed. If it's less than 1.0,
* saturation is reduced (the image turns toward grayscale); if greater than
* 1.0, saturation is increased (the image gets more vivid colors). If @pixelate
* is %TRUE, then pixels are faded in a checkerboard pattern to create a
* pixelated image. @src and @dest must have the same image format, size, and
* rowstride.
*
**/
void
+83 -54
View File
@@ -546,6 +546,66 @@ gdk_pixbuf__jpeg_image_stop_load (gpointer data, GError **error)
}
static gboolean
gdk_pixbuf__jpeg_image_load_lines (JpegProgContext *context,
GError **error)
{
struct jpeg_decompress_struct *cinfo = &context->cinfo;
guchar *lines[4];
guchar **lptr;
guchar *rowptr;
gint nlines, i;
/* keep going until we've done all scanlines */
while (cinfo->output_scanline < cinfo->output_height) {
lptr = lines;
rowptr = context->dptr;
for (i=0; i < cinfo->rec_outbuf_height; i++) {
*lptr++ = rowptr;
rowptr += context->pixbuf->rowstride;
}
nlines = jpeg_read_scanlines (cinfo, lines,
cinfo->rec_outbuf_height);
if (nlines == 0)
break;
switch (cinfo->out_color_space) {
case JCS_GRAYSCALE:
explode_gray_into_buf (cinfo, lines);
break;
case JCS_RGB:
/* do nothing */
break;
case JCS_CMYK:
convert_cmyk_to_rgb (cinfo, lines);
break;
default:
if (error && *error == NULL) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("Unsupported JPEG color space (%s)"),
colorspace_name (cinfo->out_color_space));
}
return FALSE;
}
context->dptr += nlines * context->pixbuf->rowstride;
/* send updated signal */
if (context->updated_func)
(* context->updated_func) (context->pixbuf,
0,
cinfo->output_scanline - 1,
cinfo->image_width,
nlines,
context->user_data);
}
return TRUE;
}
/*
@@ -686,15 +746,16 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
context->dptr = context->pixbuf->pixels;
/* Notify the client that we are ready to go */
(* context->prepared_func) (context->pixbuf,
NULL,
context->user_data);
if (context->prepared_func)
(* context->prepared_func) (context->pixbuf,
NULL,
context->user_data);
} else if (!context->did_prescan) {
int rc;
/* start decompression */
cinfo->buffered_image = TRUE;
cinfo->buffered_image = cinfo->progressive_mode;
rc = jpeg_start_decompress (cinfo);
cinfo->do_fancy_upsampling = FALSE;
cinfo->do_block_smoothing = FALSE;
@@ -703,12 +764,20 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
continue;
context->did_prescan = TRUE;
} else if (!cinfo->buffered_image) {
/* we're decompressing unbuffered so
* simply get scanline by scanline from jpeg lib
*/
if (! gdk_pixbuf__jpeg_image_load_lines (context,
error))
return FALSE;
if (cinfo->output_scanline >= cinfo->output_height)
return TRUE;
} else {
/* we're decompressing so feed jpeg lib scanlines */
guchar *lines[4];
guchar **lptr;
guchar *rowptr;
gint nlines, i;
/* we're decompressing buffered (progressive)
* so feed jpeg lib scanlines
*/
/* keep going until we've done all passes */
while (!jpeg_input_complete (cinfo)) {
@@ -720,53 +789,13 @@ gdk_pixbuf__jpeg_image_load_increment (gpointer data,
else
break;
}
/* keep going until we've done all scanlines */
while (cinfo->output_scanline < cinfo->output_height) {
lptr = lines;
rowptr = context->dptr;
for (i=0; i < cinfo->rec_outbuf_height; i++) {
*lptr++ = rowptr;
rowptr += context->pixbuf->rowstride;
}
nlines = jpeg_read_scanlines (cinfo, lines,
cinfo->rec_outbuf_height);
if (nlines == 0)
break;
switch (cinfo->out_color_space) {
case JCS_GRAYSCALE:
explode_gray_into_buf (cinfo, lines);
break;
case JCS_RGB:
/* do nothing */
break;
case JCS_CMYK:
convert_cmyk_to_rgb (cinfo, lines);
break;
default:
if (error && *error == NULL) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("Unsupported JPEG color space (%s)"),
colorspace_name (cinfo->out_color_space));
}
return FALSE;
}
/* get scanlines from jpeg lib */
if (! gdk_pixbuf__jpeg_image_load_lines (context,
error))
return FALSE;
context->dptr += nlines * context->pixbuf->rowstride;
/* send updated signal */
(* context->updated_func) (context->pixbuf,
0,
cinfo->output_scanline-1,
cinfo->image_width,
nlines,
context->user_data);
}
if (cinfo->output_scanline >= cinfo->output_height &&
if (cinfo->output_scanline >= cinfo->output_height &&
jpeg_finish_output (cinfo))
context->in_output = FALSE;
else
+1 -1
View File
@@ -517,7 +517,7 @@ gdk_pixbuf__png_image_load_increment(gpointer context,
lc->error = NULL;
return FALSE;
} else {
if (lc->first_row_seen_in_chunk >= 0) {
if (lc->first_row_seen_in_chunk >= 0 && lc->update_func) {
/* We saw at least one row */
gint pass_diff = lc->last_pass_seen_in_chunk - lc->first_pass_seen_in_chunk;
+5 -4
View File
@@ -1015,9 +1015,10 @@ gdk_pixbuf__pnm_image_load_increment (gpointer data,
context->rowstride = context->pixbuf->rowstride;
/* Notify the client that we are ready to go */
(* context->prepared_func) (context->pixbuf,
NULL,
context->user_data);
if (context->prepared_func)
(* context->prepared_func) (context->pixbuf,
NULL,
context->user_data);
}
/* if we got here we're reading image data */
@@ -1028,7 +1029,7 @@ gdk_pixbuf__pnm_image_load_increment (gpointer data,
break;
} else if (retval == PNM_FATAL_ERR) {
return FALSE;
} else if (retval == PNM_OK) {
} else if (retval == PNM_OK && context->updated_func) {
/* send updated signal */
(* context->updated_func) (context->pixbuf,
0,
+2 -2
View File
@@ -238,7 +238,7 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
return NULL;
}
if (context)
if (context && context->prepare_func)
(* context->prepare_func) (pixbuf, NULL, context->user_data);
#if TIFFLIB_VERSION >= 20031226
@@ -324,7 +324,7 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
_TIFFfree (rast);
}
if (context)
if (context && context->update_func)
(* context->update_func) (pixbuf, 0, 0, width, height, context->user_data);
return pixbuf;
+3 -2
View File
@@ -309,7 +309,7 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
pixels = gdk_pixbuf_get_pixels (pixbuf);
row_stride = gdk_pixbuf_get_rowstride (pixbuf);
if (context)
if (context && context->prepare_func)
(* context->prepare_func) (pixbuf, NULL, context->user_data);
@@ -338,7 +338,8 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
g_free (data);
if (context) {
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
if (context->update_func)
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
g_object_unref (pixbuf);
pixbuf = NULL;
}
+11 -6
View File
@@ -405,7 +405,8 @@ file_buffer (enum buf_op op, gpointer handle)
/* Fall through to the xpm_read_string. */
case op_body:
xpm_read_string (h->infile, &h->buffer, &h->buffer_size);
if(!xpm_read_string (h->infile, &h->buffer, &h->buffer_size))
return NULL;
return h->buffer;
default:
@@ -500,7 +501,9 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
_("XPM has invalid number of chars per pixel"));
return NULL;
}
if (n_col <= 0 || n_col >= G_MAXINT / (cpp + 1)) {
if (n_col <= 0 ||
n_col >= G_MAXINT / (cpp + 1) ||
n_col >= G_MAXINT / sizeof (XPMColor)) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
@@ -735,10 +738,12 @@ gdk_pixbuf__xpm_image_stop_load (gpointer data,
pixbuf = gdk_pixbuf__xpm_image_load (context->file, error);
if (pixbuf != NULL) {
(* context->prepare_func) (pixbuf,
NULL,
context->user_data);
(* context->update_func) (pixbuf, 0, 0, pixbuf->width, pixbuf->height, context->user_data);
if (context->prepare_func)
(* context->prepare_func) (pixbuf,
NULL,
context->user_data);
if (context->update_func)
(* context->update_func) (pixbuf, 0, 0, pixbuf->width, pixbuf->height, context->user_data);
g_object_unref (pixbuf);
retval = TRUE;
+2 -2
View File
@@ -234,7 +234,7 @@ BUILT_SOURCES = \
gdkenumtypes.h: stamp-gdkenumtypes.h
@true
stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#ifndef __GDK_ENUM_TYPES_H__\n#define __GDK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
@@ -244,7 +244,7 @@ stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
&& rm -f xgen-geth \
&& echo timestamp > $(@F)
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#define GDK_ENABLE_BROKEN\n#include \"gdk.h\"\n#include \"gdkalias.h\"\n" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--ftail "\n#define __GDK_ENUM_TYPES_C__\n#include \"gdkaliasdef.c\"\n" \
+1 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh
cpp -DINCLUDE_VARIABLES -P -DALL_FILES -DGDK_ENABLE_BROKEN -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
nm -D .libs/libgdk-x11-2.0.so | grep " [BDTR] " | cut -d ' ' -f 3 | sort > actual-abi
nm -D -g --defined-only .libs/libgdk-x11-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
diff -u expected-abi actual-abi && rm expected-abi actual-abi
+7 -1
View File
@@ -200,6 +200,7 @@ gdk_parse_args (int *argc,
{
GOptionContext *option_context;
GOptionGroup *option_group;
GError *error = NULL;
if (gdk_initialized)
return;
@@ -215,7 +216,12 @@ gdk_parse_args (int *argc,
g_option_group_add_entries (option_group, gdk_args);
g_option_group_add_entries (option_group, _gdk_windowing_args);
g_option_context_parse (option_context, argc, argv, NULL);
if (!g_option_context_parse (option_context, argc, argv, &error))
{
g_warning ("%s", error->message);
g_error_free (error);
}
g_option_context_free (option_context);
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
+1 -1
View File
@@ -193,7 +193,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
guchar *end = p + 4 * width;
guint t1,t2,t3;
#define MULT(d,c,a,t) G_STMT_START { t = c * a; d = ((t >> 8) + t) >> 8; } G_STMT_END
#define MULT(d,c,a,t) G_STMT_START { t = c * a + 0x7f; d = ((t >> 8) + t) >> 8; } G_STMT_END
while (p < end)
{
+1 -1
View File
@@ -335,7 +335,7 @@ gdk_color_get_type (void)
* by <function>XParseColor</function>; these include
* name for a color from <filename>rgb.txt</filename>, such as
* <literal>DarkSlateGray</literal>, or a hex specification
* such as <literal>305050</literal>.
* such as <literal>&num;3050b2</literal> or <literal>&num;35b</literal>.
*
* Return value: %TRUE if the parsing succeeded.
**/
+2 -2
View File
@@ -881,7 +881,7 @@ real_draw_glyphs (GdkDrawable *drawable,
cairo_t *cr;
cr = gdk_cairo_create (drawable);
_gdk_gc_update_context (gc, cr, NULL, NULL);
_gdk_gc_update_context (gc, cr, NULL, NULL, TRUE);
if (matrix)
{
@@ -1005,7 +1005,7 @@ gdk_draw_trapezoids (GdkDrawable *drawable,
g_return_if_fail (n_trapezoids == 0 || trapezoids != NULL);
cr = gdk_cairo_create (drawable);
_gdk_gc_update_context (gc, cr, NULL, NULL);
_gdk_gc_update_context (gc, cr, NULL, NULL, TRUE);
for (i = 0; i < n_trapezoids; i++)
{
+13 -7
View File
@@ -188,6 +188,10 @@ gdk_gc_finalize (GObject *object)
gdk_region_destroy (priv->clip_region);
if (gc->colormap)
g_object_unref (gc->colormap);
if (priv->tile)
g_object_unref (priv->tile);
if (priv->stipple)
g_object_unref (priv->stipple);
G_OBJECT_CLASS (gdk_gc_parent_class)->finalize (object);
}
@@ -1108,6 +1112,8 @@ gc_get_background (GdkGC *gc,
* stipple from the GC. If this is present and the fill mode
* of the GC isn't %GDK_STIPPLED or %GDK_OPAQUE_STIPPLED
* the fill mode will be forced to %GDK_STIPPLED
* @gc_changed: pass %FALSE if the @gc has not changed since the
* last call to this function
*
* Set the attributes of a cairo context to match those of a #GdkGC
* as far as possible. Some aspects of a #GdkGC, such as clip masks
@@ -1117,7 +1123,8 @@ void
_gdk_gc_update_context (GdkGC *gc,
cairo_t *cr,
GdkColor *override_foreground,
GdkBitmap *override_stipple)
GdkBitmap *override_stipple,
gboolean gc_changed)
{
GdkGCPrivate *priv;
GdkFill fill;
@@ -1145,12 +1152,7 @@ _gdk_gc_update_context (GdkGC *gc,
}
if (fill == GDK_OPAQUE_STIPPLED)
{
if (override_foreground)
foreground = *override_foreground;
else
gc_get_background (gc, &background);
}
gc_get_background (gc, &background);
switch (fill)
{
@@ -1222,6 +1224,9 @@ _gdk_gc_update_context (GdkGC *gc,
cairo_pattern_destroy (pattern);
}
if (!gc_changed)
return;
cairo_reset_clip (cr);
if (priv->clip_region)
{
@@ -1239,5 +1244,6 @@ _gdk_gc_update_context (GdkGC *gc,
}
}
#define __GDK_GC_C__
#include "gdkaliasdef.c"
+2 -1
View File
@@ -219,7 +219,8 @@ GdkGC *_gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
void _gdk_gc_update_context (GdkGC *gc,
cairo_t *cr,
GdkColor *override_foreground,
GdkBitmap *override_stipple);
GdkBitmap *override_stipple,
gboolean gc_changed);
/*************************************
* Interfaces used by windowing code *
+53 -15
View File
@@ -58,6 +58,8 @@ struct _GdkPangoRendererPrivate
/* Current target */
GdkDrawable *drawable;
GdkGC *base_gc;
gboolean gc_changed;
};
static PangoAttrType gdk_pango_attr_stipple_type;
@@ -131,6 +133,21 @@ emboss_context (cairo_t *cr)
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
}
static gboolean
color_equal (PangoColor *c1, PangoColor *c2)
{
if (!c1 && !c2)
return TRUE;
if (c1 && c2 &&
c1->red == c2->red &&
c1->green == c2->green &&
c1->blue == c2->blue)
return TRUE;
return FALSE;
}
static cairo_t *
get_cairo_context (GdkPangoRenderer *gdk_renderer,
PangoRenderPart part)
@@ -156,28 +173,46 @@ get_cairo_context (GdkPangoRenderer *gdk_renderer,
cairo_set_matrix (priv->cr, &cairo_matrix);
}
}
priv->last_part = (PangoRenderPart)-1;
if (part != priv->last_part)
{
PangoColor *pango_color = pango_renderer_get_color (renderer,
part);
GdkColor *color = NULL;
PangoColor *pango_color;
GdkColor *color;
GdkColor tmp_color;
if (pango_color)
gboolean changed;
pango_color = pango_renderer_get_color (renderer, part);
if (priv->last_part != -1)
changed = priv->gc_changed ||
priv->stipple[priv->last_part] != priv->stipple[part] ||
!color_equal (pango_color,
pango_renderer_get_color (renderer, priv->last_part));
else
changed = TRUE;
if (changed)
{
tmp_color.red = pango_color->red;
tmp_color.green = pango_color->green;
tmp_color.blue = pango_color->blue;
color = &tmp_color;
if (pango_color)
{
tmp_color.red = pango_color->red;
tmp_color.green = pango_color->green;
tmp_color.blue = pango_color->blue;
color = &tmp_color;
}
else
color = NULL;
_gdk_gc_update_context (priv->base_gc,
priv->cr,
color,
priv->stipple[part],
priv->gc_changed);
}
_gdk_gc_update_context (priv->base_gc,
priv->cr,
color,
priv->stipple[part]);
priv->last_part = part;
priv->gc_changed = FALSE;
}
return priv->cr;
@@ -482,6 +517,7 @@ gdk_pango_renderer_init (GdkPangoRenderer *renderer)
GdkPangoRendererPrivate);
renderer->priv->last_part = (PangoRenderPart)-1;
renderer->priv->gc_changed = TRUE;
}
static void
@@ -650,6 +686,8 @@ gdk_pango_renderer_set_gc (GdkPangoRenderer *gdk_renderer,
priv->base_gc = gc;
if (priv->base_gc)
g_object_ref (priv->base_gc);
priv->gc_changed = TRUE;
}
}
+1 -1
View File
@@ -249,7 +249,7 @@ gdk_region_union_with_rect (GdkRegion *region,
g_return_if_fail (region != NULL);
g_return_if_fail (rect != NULL);
if (!rect->width || !rect->height)
if (rect->width <= 0 || rect->height <= 0)
return;
tmp_region.rects = &tmp_region.extents;
+5 -5
View File
@@ -53,14 +53,14 @@ gdk_screen_get_type (void)
static const GTypeInfo object_info =
{
sizeof (GdkScreenClass),
(GBaseInitFunc) gdk_screen_init,
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gdk_screen_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkScreen),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
(GInstanceInitFunc) gdk_screen_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
@@ -103,7 +103,7 @@ gdk_screen_class_init (GdkScreenClass *klass)
static void
gdk_screen_init (GdkScreen *screen)
{
screen->resolution = -1;
screen->resolution = -1.;
}
static void
@@ -407,7 +407,7 @@ gdk_screen_set_resolution_libgtk_only (GdkScreen *screen,
if (dpi >= 0)
screen->resolution = dpi;
else
screen->resolution = -1;
screen->resolution = -1.;
}
/**
@@ -423,7 +423,7 @@ gdk_screen_set_resolution_libgtk_only (GdkScreen *screen,
gdouble
gdk_screen_get_resolution_libgtk_only (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1);
g_return_val_if_fail (GDK_IS_SCREEN (screen), -1.);
return screen->resolution;
}
+101 -24
View File
@@ -1725,43 +1725,86 @@ gdk_window_draw_glyphs_transformed (GdkDrawable *drawable,
RESTORE_GC (gc);
}
typedef struct {
cairo_t *cr; /* if non-null, it means use this cairo context */
GdkGC *gc; /* if non-null, it means use this GC instead */
} BackingRectMethod;
static void
gdk_window_set_bg_pattern (GdkWindow *window,
cairo_t *cr,
int x_offset,
int y_offset)
setup_backing_rect_method (BackingRectMethod *method, GdkWindow *window, GdkWindowPaint *paint, int x_offset_cairo, int y_offset_cairo)
{
GdkWindowObject *private = (GdkWindowObject *)window;
if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG && private->parent)
{
x_offset += private->x;
y_offset += private->y;
gdk_window_set_bg_pattern (GDK_WINDOW (private->parent), cr,
x_offset, y_offset);
GdkWindowPaint tmp_paint;
tmp_paint = *paint;
tmp_paint.x_offset += private->x;
tmp_paint.y_offset += private->y;
x_offset_cairo += private->x;
y_offset_cairo += private->y;
setup_backing_rect_method (method, GDK_WINDOW (private->parent), &tmp_paint, x_offset_cairo, y_offset_cairo);
}
else if (private->bg_pixmap &&
private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
private->bg_pixmap != GDK_NO_BG)
else if (private->bg_pixmap &&
private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
private->bg_pixmap != GDK_NO_BG)
{
/* This is a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=4320.
* In it, using a pixmap as a repeating pattern in Cairo, and painting it to a
* pixmap destination surface, can be very slow (on the order of seconds for a
* whole-screen copy). The workaround is to use pretty much the same code that
* we used in GTK+ 2.6 (pre-Cairo), which clears the double-buffer pixmap with
* a tiled GC XFillRectangle().
*/
/* Actually computing this flag is left as an exercise for the reader */
#if defined (G_OS_UNIX)
# define GDK_CAIRO_REPEAT_IS_FAST 0
#else
# define GDK_CAIRO_REPEAT_IS_FAST 1
#endif
#if GDK_CAIRO_REPEAT_IS_FAST
cairo_surface_t *surface = _gdk_drawable_ref_cairo_surface (private->bg_pixmap);
cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface);
cairo_surface_destroy (surface);
if (x_offset != 0 || y_offset != 0)
if (x_offset_cairo != 0 || y_offset_cairo != 0)
{
cairo_matrix_t matrix;
cairo_matrix_init_translate (&matrix, x_offset, y_offset);
cairo_matrix_init_translate (&matrix, x_offset_cairo, y_offset_cairo);
cairo_pattern_set_matrix (pattern, &matrix);
}
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
cairo_set_source (cr, pattern);
method->cr = cairo_create (paint->surface);
method->gc = NULL;
cairo_set_source (method->cr, pattern);
cairo_pattern_destroy (pattern);
#else
guint gc_mask;
GdkGCValues gc_values;
gc_values.fill = GDK_TILED;
gc_values.tile = private->bg_pixmap;
gc_values.ts_x_origin = -x_offset_cairo;
gc_values.ts_y_origin = -y_offset_cairo;
gc_mask = GDK_GC_FILL | GDK_GC_TILE | GDK_GC_TS_X_ORIGIN | GDK_GC_TS_Y_ORIGIN;
method->gc = gdk_gc_new_with_values (paint->pixmap, &gc_values, gc_mask);
#endif
}
else
{
gdk_cairo_set_source_color (cr, &private->bg_color);
method->cr = cairo_create (paint->surface);
gdk_cairo_set_source_color (method->cr, &private->bg_color);
}
}
@@ -1774,22 +1817,56 @@ gdk_window_clear_backing_rect (GdkWindow *window,
{
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindowPaint *paint = private->paint_stack->data;
cairo_t *cr;
BackingRectMethod method;
#if 0
GTimer *timer;
double elapsed;
#endif
if (GDK_WINDOW_DESTROYED (window))
return;
cr = cairo_create (paint->surface);
#if 0
timer = g_timer_new ();
#endif
gdk_window_set_bg_pattern (window, cr, 0, 0);
method.cr = NULL;
method.gc = NULL;
setup_backing_rect_method (&method, window, paint, 0, 0);
cairo_rectangle (cr, x, y, width, height);
cairo_clip (cr);
if (method.cr)
{
g_assert (method.gc == NULL);
gdk_cairo_region (cr, paint->region);
cairo_fill (cr);
cairo_rectangle (method.cr, x, y, width, height);
cairo_clip (method.cr);
cairo_destroy (cr);
gdk_cairo_region (method.cr, paint->region);
cairo_fill (method.cr);
cairo_destroy (method.cr);
#if 0
elapsed = g_timer_elapsed (timer, NULL);
g_print ("Draw the background with Cairo: %fs\n", elapsed);
#endif
}
else
{
g_assert (method.gc != NULL);
gdk_gc_set_clip_region (method.gc, paint->region);
gdk_draw_rectangle (window, method.gc, TRUE, x, y, width, height);
g_object_unref (method.gc);
#if 0
elapsed = g_timer_elapsed (timer, NULL);
g_print ("Draw the background with GDK: %fs\n", elapsed);
#endif
}
#if 0
g_timer_destroy (timer);
#endif
}
/**
@@ -2450,7 +2527,7 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
child_region = gdk_region_rectangle (&child_rect);
/* remove child area from the invalid area of the parent */
if (GDK_WINDOW_IS_MAPPED (child))
if (GDK_WINDOW_IS_MAPPED (child) && !child->shaped)
gdk_region_subtract (visible_region, child_region);
if (child_func && (*child_func) ((GdkWindow *)child, user_data))
+1
View File
@@ -287,6 +287,7 @@ struct _GdkWindowObject
guint accept_focus : 1;
guint focus_on_map : 1;
guint shaped : 1;
GdkEventMask event_mask;
};
+7 -4
View File
@@ -599,6 +599,8 @@ gdk_screen_get_system_colormap (GdkScreen *screen)
static GdkColormap *colormap = NULL;
GdkColormapPrivateWin32 *private;
g_return_val_if_fail (screen == _gdk_screen, NULL);
if (!colormap)
{
colormap = g_object_new (gdk_colormap_get_type (), NULL);
@@ -652,7 +654,7 @@ gdk_colormap_change (GdkColormap *colormap,
PALETTEENTRY *pe;
int i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (GDK_IS_COLORMAP (colormap));
cmapp = GDK_WIN32_COLORMAP_DATA (colormap);
@@ -694,7 +696,7 @@ gdk_colors_alloc (GdkColormap *colormap,
gint return_val;
gint i;
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), 0);
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), FALSE);
private = GDK_WIN32_COLORMAP_DATA (colormap);
@@ -1143,6 +1145,7 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
g_return_val_if_fail (GDK_IS_COLORMAP (colormap), FALSE);
g_return_val_if_fail (colors != NULL, FALSE);
g_return_val_if_fail (success != NULL, ncolors);
private = GDK_WIN32_COLORMAP_DATA (colormap);
@@ -1301,8 +1304,8 @@ gdk_colormap_match_color (GdkColormap *cmap,
GdkScreen*
gdk_colormap_get_screen (GdkColormap *cmap)
{
g_return_val_if_fail (cmap != NULL, NULL);
g_return_val_if_fail (GDK_IS_COLORMAP (cmap), NULL);
return gdk_screen_get_default ();
return _gdk_screen;
}
+91 -46
View File
@@ -136,7 +136,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
{
HCURSOR hcursor;
g_return_val_if_fail (display == gdk_display_get_default (), NULL);
g_return_val_if_fail (display == _gdk_display, NULL);
hcursor = _gdk_win32_data_to_wcursor (cursor_type);
@@ -365,7 +365,7 @@ gdk_cursor_new_from_name (GdkDisplay *display,
HCURSOR hcursor = NULL;
int i;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (display == _gdk_display, NULL);
for (i = 0; i < G_N_ELEMENTS(_default_cursors); i++)
{
@@ -520,7 +520,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
{
HCURSOR hcursor;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (display == _gdk_display, NULL);
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
g_return_val_if_fail (0 <= x && x < gdk_pixbuf_get_width (pixbuf), NULL);
g_return_val_if_fail (0 <= y && y < gdk_pixbuf_get_height (pixbuf), NULL);
@@ -534,7 +534,7 @@ gdk_cursor_new_from_pixbuf (GdkDisplay *display,
gboolean
gdk_display_supports_cursor_alpha (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
g_return_val_if_fail (display == _gdk_display, FALSE);
return _gdk_win32_pixbuf_to_hicon_supports_alpha ();
}
@@ -542,7 +542,7 @@ gdk_display_supports_cursor_alpha (GdkDisplay *display)
gboolean
gdk_display_supports_cursor_color (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
g_return_val_if_fail (display == _gdk_display, FALSE);
return TRUE;
}
@@ -550,7 +550,7 @@ gdk_display_supports_cursor_color (GdkDisplay *display)
guint
gdk_display_get_default_cursor_size (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
g_return_val_if_fail (display == _gdk_display, 0);
return MIN (GetSystemMetrics (SM_CXCURSOR), GetSystemMetrics (SM_CYCURSOR));
}
@@ -560,7 +560,7 @@ gdk_display_get_maximal_cursor_size (GdkDisplay *display,
guint *width,
guint *height)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
g_return_if_fail (display == _gdk_display);
if (width)
*width = GetSystemMetrics (SM_CXCURSOR);
@@ -613,19 +613,32 @@ create_alpha_bitmap (gint width, gint height, guchar **outdata)
}
static HBITMAP
create_color_bitmap (gint width, gint height, guchar **outdata)
create_color_bitmap (gint width,
gint height,
guchar **outdata,
gint bits)
{
BITMAPV4HEADER bi;
struct {
BITMAPV4HEADER bmiHeader;
RGBQUAD bmiColors[2];
} bmi;
HDC hdc;
HBITMAP hBitmap;
ZeroMemory (&bi, sizeof (BITMAPV4HEADER));
bi.bV4Size = sizeof (BITMAPV4HEADER);
bi.bV4Width = width;
bi.bV4Height = height;
bi.bV4Planes = 1;
bi.bV4BitCount = 24;
bi.bV4V4Compression = BI_RGB;
ZeroMemory (&bmi, sizeof (bmi));
bmi.bmiHeader.bV4Size = sizeof (BITMAPV4HEADER);
bmi.bmiHeader.bV4Width = width;
bmi.bmiHeader.bV4Height = height;
bmi.bmiHeader.bV4Planes = 1;
bmi.bmiHeader.bV4BitCount = bits;
bmi.bmiHeader.bV4V4Compression = BI_RGB;
/* when bits is 1, these will be used.
* bmiColors[0] already zeroed from ZeroMemory()
*/
bmi.bmiColors[1].rgbBlue = 0xFF;
bmi.bmiColors[1].rgbGreen = 0xFF;
bmi.bmiColors[1].rgbRed = 0xFF;
hdc = GetDC (NULL);
if (!hdc)
@@ -633,7 +646,7 @@ create_color_bitmap (gint width, gint height, guchar **outdata)
WIN32_GDI_FAILED ("GetDC");
return NULL;
}
hBitmap = CreateDIBSection (hdc, (BITMAPINFO *)&bi, DIB_RGB_COLORS,
hBitmap = CreateDIBSection (hdc, (BITMAPINFO *)&bmi, DIB_RGB_COLORS,
(PVOID *) outdata, NULL, (DWORD)0);
if (hBitmap == NULL)
WIN32_GDI_FAILED ("CreateDIBSection");
@@ -652,40 +665,55 @@ pixbuf_to_hbitmaps_alpha_winxp (GdkPixbuf *pixbuf,
*/
HBITMAP hColorBitmap, hMaskBitmap;
guchar *indata, *inrow;
guchar *outdata, *outrow;
guchar *colordata, *colorrow, *maskdata, *maskbyte;
gint width, height, i, j, rowstride;
guint maskstride, mask_bit;
width = gdk_pixbuf_get_width (pixbuf); /* width of icon */
height = gdk_pixbuf_get_height (pixbuf); /* height of icon */
hColorBitmap = create_alpha_bitmap (width, height, &outdata);
hColorBitmap = create_alpha_bitmap (width, height, &colordata);
if (!hColorBitmap)
return FALSE;
hMaskBitmap = CreateBitmap (width, height, 1, 1, NULL);
hMaskBitmap = create_color_bitmap (width, height, &maskdata, 1);
if (!hMaskBitmap)
{
DeleteObject (hColorBitmap);
return FALSE;
}
/* rows are always aligned on 4-byte boundarys, but here our pixels are always 4 bytes */
/* MSDN says mask rows are aligned to "LONG" boundaries */
maskstride = (((width + 31) & ~31) >> 3);
indata = gdk_pixbuf_get_pixels (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
for (j=0; j<height; j++)
{
outrow = outdata + 4*j*width;
inrow = indata + (height-j-1)*rowstride;
colorrow = colordata + 4*j*width;
maskbyte = maskdata + j*maskstride;
mask_bit = 0x80;
inrow = indata + (height-j-1)*rowstride;
for (i=0; i<width; i++)
{
outrow[4*i+0] = inrow[4*i+2];
outrow[4*i+1] = inrow[4*i+1];
outrow[4*i+2] = inrow[4*i+0];
outrow[4*i+3] = inrow[4*i+3];
colorrow[4*i+0] = inrow[4*i+2];
colorrow[4*i+1] = inrow[4*i+1];
colorrow[4*i+2] = inrow[4*i+0];
colorrow[4*i+3] = inrow[4*i+3];
if (inrow[4*i+3] == 0)
maskbyte[0] |= mask_bit; /* turn ON bit */
else
maskbyte[0] &= ~mask_bit; /* turn OFF bit */
mask_bit >>= 1;
if (mask_bit == 0)
{
mask_bit = 0x80;
maskbyte++;
}
}
}
if (color) *color = hColorBitmap;
if (mask) *mask = hMaskBitmap;
*color = hColorBitmap;
*mask = hMaskBitmap;
return TRUE;
}
@@ -700,17 +728,18 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
*/
HBITMAP hColorBitmap, hMaskBitmap;
guchar *indata, *inrow;
guchar *colordata, *colorrow, *maskdata, *maskrow;
guchar *colordata, *colorrow, *maskdata, *maskbyte;
gint width, height, i, j, rowstride, nc, bmstride;
gboolean has_alpha;
guint maskstride, mask_bit;
width = gdk_pixbuf_get_width (pixbuf); /* width of icon */
height = gdk_pixbuf_get_height (pixbuf); /* height of icon */
hColorBitmap = create_color_bitmap (width, height, &colordata);
hColorBitmap = create_color_bitmap (width, height, &colordata, 24);
if (!hColorBitmap)
return FALSE;
hMaskBitmap = create_color_bitmap (width, height, &maskdata);
hMaskBitmap = create_color_bitmap (width, height, &maskdata, 1);
if (!hMaskBitmap)
{
DeleteObject (hColorBitmap);
@@ -722,6 +751,9 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
if (bmstride % 4 != 0)
bmstride += 4 - (bmstride % 4);
/* MSDN says mask rows are aligned to "LONG" boundaries */
maskstride = (((width + 31) & ~31) >> 3);
indata = gdk_pixbuf_get_pixels (pixbuf);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
nc = gdk_pixbuf_get_n_channels (pixbuf);
@@ -730,27 +762,34 @@ pixbuf_to_hbitmaps_normal (GdkPixbuf *pixbuf,
for (j=0; j<height; j++)
{
colorrow = colordata + j*bmstride;
maskrow = maskdata + j*bmstride;
inrow = indata + (height-j-1)*rowstride;
maskbyte = maskdata + j*maskstride;
mask_bit = 0x80;
inrow = indata + (height-j-1)*rowstride;
for (i=0; i<width; i++)
{
if (has_alpha && inrow[nc*i+3] < 128)
{
colorrow[3*i+0] = colorrow[3*i+1] = colorrow[3*i+2] = 0;
maskrow[3*i+0] = maskrow[3*i+1] = maskrow[3*i+2] = 255;
maskbyte[0] |= mask_bit; /* turn ON bit */
}
else
{
colorrow[3*i+0] = inrow[nc*i+2];
colorrow[3*i+1] = inrow[nc*i+1];
colorrow[3*i+2] = inrow[nc*i+0];
maskrow[3*i+0] = maskrow[3*i+1] = maskrow[3*i+2] = 0;
maskbyte[0] &= ~mask_bit; /* turn OFF bit */
}
mask_bit >>= 1;
if (mask_bit == 0)
{
mask_bit = 0x80;
maskbyte++;
}
}
}
if (color) *color = hColorBitmap;
if (mask) *mask = hMaskBitmap;
*color = hColorBitmap;
*mask = hMaskBitmap;
return TRUE;
}
@@ -806,15 +845,21 @@ _gdk_win32_pixbuf_to_hicon_supports_alpha (void)
if (!is_win_xp_checked)
{
OSVERSIONINFO version;
is_win_xp_checked = TRUE;
memset (&version, 0, sizeof (version));
version.dwOSVersionInfoSize = sizeof (version);
is_win_xp = GetVersionEx (&version)
&& version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& (version.dwMajorVersion > 5
|| (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
if (!G_WIN32_IS_NT_BASED ())
is_win_xp = FALSE;
else
{
OSVERSIONINFO version;
memset (&version, 0, sizeof (version));
version.dwOSVersionInfoSize = sizeof (version);
is_win_xp = GetVersionEx (&version)
&& version.dwPlatformId == VER_PLATFORM_WIN32_NT
&& (version.dwMajorVersion > 5
|| (version.dwMajorVersion == 5 && version.dwMinorVersion >= 1));
}
}
return is_win_xp;
}
+22 -129
View File
@@ -236,6 +236,9 @@ gdk_display_open (const gchar *display_name)
_gdk_input_init (_gdk_display);
_gdk_dnd_init ();
/* Precalculate display name */
(void) gdk_display_get_name (_gdk_display);
g_signal_emit_by_name (gdk_display_manager_get (),
"display_opened", _gdk_display);
@@ -253,9 +256,13 @@ gdk_display_get_name (GdkDisplay *display)
HWINSTA hwinsta = GetProcessWindowStation ();
char *window_station_name;
DWORD n;
DWORD session_id;
char *display_name;
const char *retval;
static const char *display_name_cache = NULL;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
if (display_name_cache != NULL)
return display_name_cache;
n = 0;
GetUserObjectInformation (hdesk, UOI_NAME, &dummy, 0, &n);
@@ -285,22 +292,22 @@ gdk_display_get_name (GdkDisplay *display)
window_station_name = "WinSta0";
}
display_name = g_strdup_printf ("%ld\\%s\\%s",
display_name = g_strdup_printf ("%d\\%s\\%s",
get_session_id (), window_station_name,
desktop_name);
retval = g_quark_to_string (g_quark_from_string (display_name));
GDK_NOTE (MISC, g_print ("gdk_display_get_name: %s\n", display_name));
g_free (display_name);
display_name_cache = display_name;
GDK_NOTE (MISC, g_print ("gdk_display_get_name: %s\n", retval));
return retval;
return display_name_cache;
}
gint
gdk_display_get_n_screens (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), 0);
return 1;
}
@@ -308,12 +315,17 @@ GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
gint screen_num)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (screen_num == 0, NULL);
return _gdk_screen;
}
GdkScreen *
gdk_display_get_default_screen (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return _gdk_screen;
}
@@ -332,133 +344,15 @@ gdk_display_supports_selection_notification (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), FALSE);
return TRUE;
return FALSE;
}
static HWND _hwnd_next_viewer = NULL;
/*
* maybe this should be integrated with the default message loop - or maybe not ;-)
*/
static LRESULT CALLBACK
_win32_on_clipboard_change (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
switch (message)
{
case WM_DESTROY : /* remove us from chain */
{
ChangeClipboardChain (hwnd, _hwnd_next_viewer);
return 0;
}
case WM_CHANGECBCHAIN :
{
HWND hwndRemove = (HWND) wparam; /* handle of window being removed */
HWND hwndNext = (HWND) lparam; /* handle of next window in chain */
if (hwndRemove == _hwnd_next_viewer)
_hwnd_next_viewer = hwndNext == hwnd ? NULL : hwndNext;
return 0;
}
case WM_DRAWCLIPBOARD :
{
/* Create the appropriate gdk events */
#ifdef G_ENABLE_DEBUG
if ((_gdk_debug_flags & GDK_DEBUG_DND) &&
OpenClipboard (hwnd))
{
HWND hwndOwner = GetClipboardOwner ();
UINT nFormat = 0;
g_print ("WM_DRAWCLIPBOARD: owner:%p formats: ", hwndOwner);
for (; 0 != (nFormat = EnumClipboardFormats (nFormat));)
{
g_print ("%s ", _gdk_win32_cf_to_string (nFormat));
}
g_print ("\n");
CloseClipboard ();
}
#endif
/* XXX: generate the apropriate GdkEventOwnerChange ... */
/* don't break the chain */
return PostMessage (_hwnd_next_viewer, message, wparam, lparam);
}
default :
return DefWindowProc (hwnd, message, wparam, lparam);
}
}
/*
* Creates a hidden window and adds it to the clipboard chain
*/
HWND
_gdk_win32_register_clipboard_notification (void)
{
WNDCLASS wclass;
HWND hwnd;
ATOM klass;
memset (&wclass, 0, sizeof(WNDCLASS));
wclass.lpszClassName = "GdkClipboardNotification";
wclass.lpfnWndProc = _win32_on_clipboard_change;
wclass.hInstance = _gdk_app_hmodule;
klass = RegisterClass (&wclass);
if (!klass)
return NULL;
hwnd = CreateWindow (MAKEINTRESOURCE(klass),
NULL, WS_POPUP,
0, 0, 0, 0, NULL, NULL,
_gdk_app_hmodule, NULL);
if (!hwnd)
{
UnregisterClass (MAKEINTRESOURCE(klass), _gdk_app_hmodule);
return NULL;
}
_hwnd_next_viewer = SetClipboardViewer (hwnd);
return hwnd;
}
/*
* The whole function would only make sense if the gdk/win32 clipboard
* model is rewritten to do delayed rendering. Currently this is only
* testcode and as noted in
* http://mail.gnome.org/archives/gtk-devel-list/2004-May/msg00113.html
* probably not worth bothering ;)
*/
gboolean
gdk_display_request_selection_notification (GdkDisplay *display,
GdkAtom selection)
{
static HWND hwndViewer = NULL;
gboolean ret = FALSE;
GDK_NOTE (DND,
g_print ("gdk_display_request_selection_notification (..., %s)",
gdk_atom_name (selection)));
if (GDK_SELECTION_CLIPBOARD == selection)
{
if (!hwndViewer)
{
hwndViewer = _gdk_win32_register_clipboard_notification ();
GDK_NOTE (DND, g_print (" registered"));
}
ret = (hwndViewer != NULL);
}
else if (GDK_SELECTION_PRIMARY == selection)
{
/* seems to work by default ? */
GDK_NOTE (DND, g_print (" by default"));
ret = TRUE;
}
GDK_NOTE (DND, g_print (" -> %s\n", ret ? "TRUE" : "FALSE"));
return ret;
return FALSE;
}
gboolean
@@ -474,5 +368,4 @@ gdk_display_store_clipboard (GdkDisplay *display,
GdkAtom *targets,
gint n_targets)
{
/* XXX: implement it (or maybe not as long as we don't support delayed rendering?) */
}
+4 -2
View File
@@ -1592,8 +1592,10 @@ blit_from_pixmap (gboolean use_fg_bg,
}
if (ok)
GDI_CALL (BitBlt, (hdc, xdest, ydest, width, height,
srcdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2)));
if (!BitBlt (hdc, xdest, ydest, width, height,
srcdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2)) &&
GetLastError () != ERROR_INVALID_HANDLE)
WIN32_GDI_FAILED ("BitBlt");
/* Restore source's color table if necessary */
if (ok && newtable_size > 0 && oldtable_size > 0)
+40 -21
View File
@@ -140,6 +140,7 @@ GPollFD event_poll_fd;
static GdkWindow *current_window = NULL;
static gint current_x, current_y;
static gint current_root_x, current_root_y;
static UINT msh_mousewheel;
static UINT client_message;
@@ -584,7 +585,7 @@ gdk_pointer_grab (GdkWindow *window,
if (p_grab_window != NULL && p_grab_window != window)
generate_grab_broken_event (p_grab_window, FALSE, window);
p_grab_window = window;
assign_object (&p_grab_window, window);
if (p_grab_cursor != NULL)
{
@@ -641,7 +642,7 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
/* FIXME: Generate GDK_CROSSING_UNGRAB events */
p_grab_window = NULL;
assign_object (&p_grab_window, NULL);
if (p_grab_cursor != NULL)
{
if (GetCursor () == p_grab_cursor)
@@ -758,7 +759,7 @@ gdk_keyboard_grab (GdkWindow *window,
if (k_grab_window != NULL && k_grab_window != window)
generate_grab_broken_event (k_grab_window, TRUE, window);
k_grab_window = window;
assign_object (&k_grab_window, window);
if (!k_grab_owner_events)
{
@@ -823,7 +824,7 @@ gdk_display_keyboard_ungrab (GdkDisplay *display,
}
}
k_grab_window = NULL;
assign_object (&k_grab_window, NULL);
}
gboolean
@@ -1972,7 +1973,7 @@ erase_background (GdkWindow *window,
}
}
static GdkRegion *
GdkRegion *
_gdk_win32_hrgn_to_region (HRGN hrgn)
{
RGNDATA *rgndata;
@@ -2420,13 +2421,12 @@ gdk_event_translate (MSG *msg,
!(HIWORD (msg->lParam) & KF_ALTDOWN))
break;
/* Let the system handle Alt-Tab, Alt-Space, Alt-Enter and
* Alt-F4 unless the keyboard is grabbed.
/* Let the system handle Alt-Tab, Alt-Space and Alt-F4 unless
* the keyboard is grabbed.
*/
if (k_grab_window == NULL &&
(msg->wParam == VK_TAB ||
msg->wParam == VK_SPACE ||
msg->wParam == VK_RETURN ||
msg->wParam == VK_F4))
break;
@@ -2731,6 +2731,17 @@ gdk_event_translate (MSG *msg,
msg->wParam,
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
/* If we haven't moved, don't create any GDK event. Windows
* sends WM_MOUSEMOVE messages after a new window is shows under
* the mouse, even if the mouse hasn't moved. This disturbs gtk.
*/
if (msg->pt.x + _gdk_offset_x == current_root_x &&
msg->pt.y + _gdk_offset_y == current_root_y)
break;
current_root_x = msg->pt.x + _gdk_offset_x;
current_root_y = msg->pt.y + _gdk_offset_y;
assign_object (&window, find_window_for_mouse_event (window, msg));
if (p_grab_window != NULL)
@@ -2738,7 +2749,22 @@ gdk_event_translate (MSG *msg,
GdkWindow *real_window = find_real_window_for_grabbed_mouse_event (window, msg);
if (real_window != current_window)
synthesize_crossing_events (real_window, GDK_CROSSING_NORMAL, msg);
{
if (p_grab_owner_events)
{
synthesize_crossing_events (real_window, GDK_CROSSING_NORMAL, msg);
}
else if (current_window == p_grab_window)
{
synthesize_leave_event (p_grab_window, msg, GDK_CROSSING_NORMAL, GDK_NOTIFY_ANCESTOR);
assign_object (&current_window, _gdk_root);
}
else if (real_window == p_grab_window)
{
synthesize_enter_event (p_grab_window, msg, GDK_CROSSING_NORMAL, GDK_NOTIFY_ANCESTOR);
assign_object (&current_window, p_grab_window);
}
}
}
else
{
@@ -2757,15 +2783,6 @@ gdk_event_translate (MSG *msg,
if (window != orig_window)
translate_mouse_coords (orig_window, window, msg);
/* If we haven't moved, don't create any event.
* Windows sends WM_MOUSEMOVE messages after button presses
* even if the mouse doesn't move. This disturbs gtk.
*/
if (window == current_window &&
GET_X_LPARAM (msg->lParam) == current_x &&
GET_Y_LPARAM (msg->lParam) == current_y)
break;
event = gdk_event_new (GDK_MOTION_NOTIFY);
event->motion.window = window;
event->motion.time = _gdk_win32_get_next_tick (msg->time);
@@ -2774,8 +2791,8 @@ gdk_event_translate (MSG *msg,
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
event->motion.x += xoffset;
event->motion.y += yoffset;
event->motion.x_root = msg->pt.x + _gdk_offset_x;
event->motion.y_root = msg->pt.y + _gdk_offset_y;
event->motion.x_root = current_root_x;
event->motion.y_root = current_root_y;
event->motion.axes = NULL;
event->motion.state = build_pointer_event_state (msg);
event->motion.is_hint = FALSE;
@@ -2815,6 +2832,7 @@ gdk_event_translate (MSG *msg,
synthesize_enter_or_leave_event (current_window, msg,
GDK_LEAVE_NOTIFY, GDK_CROSSING_NORMAL, detail,
current_x, current_y);
assign_object (&current_window, _gdk_root);
}
else
{
@@ -2904,7 +2922,8 @@ gdk_event_translate (MSG *msg,
break;
case WM_MOUSEACTIVATE:
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP)
if (gdk_window_get_window_type (window) == GDK_WINDOW_TEMP
|| !((GdkWindowObject *)window)->accept_focus)
{
*ret_valp = MA_NOACTIVATE;
return_val = TRUE;
+17 -23
View File
@@ -108,9 +108,9 @@ gdk_window_scroll (GdkWindow *window,
GdkRegion *invalidate_region;
GdkWindowImplWin32 *impl;
GdkWindowObject *obj;
GdkRectangle dest_rect;
GList *tmp_list;
GdkWindowParentPos parent_pos;
HRGN native_invalidate_region;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -130,22 +130,6 @@ gdk_window_scroll (GdkWindow *window,
if (obj->update_area)
gdk_region_offset (obj->update_area, dx, dy);
invalidate_region = gdk_region_rectangle (&impl->position_info.clip_rect);
dest_rect = impl->position_info.clip_rect;
dest_rect.x += dx;
dest_rect.y += dy;
gdk_rectangle_intersect (&dest_rect, &impl->position_info.clip_rect, &dest_rect);
if (dest_rect.width > 0 && dest_rect.height > 0)
{
GdkRegion *tmp_region;
tmp_region = gdk_region_rectangle (&dest_rect);
gdk_region_subtract (invalidate_region, tmp_region);
gdk_region_destroy (tmp_region);
}
gdk_window_compute_parent_pos (impl, &parent_pos);
parent_pos.x += obj->x;
@@ -156,10 +140,13 @@ gdk_window_scroll (GdkWindow *window,
gdk_window_tmp_unset_bg (window);
if (!ScrollWindowEx (GDK_WINDOW_HWND (window),
dx, dy, NULL, NULL,
NULL, NULL, SW_SCROLLCHILDREN))
WIN32_API_FAILED ("ScrollWindowEx");
native_invalidate_region = CreateRectRgn (0, 0, 0, 0);
if (native_invalidate_region == NULL)
WIN32_API_FAILED ("CreateRectRgn");
API_CALL (ScrollWindowEx, (GDK_WINDOW_HWND (window),
dx, dy, NULL, NULL,
native_invalidate_region, NULL, SW_SCROLLCHILDREN));
if (impl->position_info.no_bg)
gdk_window_tmp_reset_bg (window);
@@ -173,8 +160,15 @@ gdk_window_scroll (GdkWindow *window,
tmp_list = tmp_list->next;
}
gdk_window_invalidate_region (window, invalidate_region, TRUE);
gdk_region_destroy (invalidate_region);
if (native_invalidate_region != NULL)
{
invalidate_region = _gdk_win32_hrgn_to_region (native_invalidate_region);
gdk_region_offset (invalidate_region, impl->position_info.x_offset,
impl->position_info.y_offset);
gdk_window_invalidate_region (window, invalidate_region, TRUE);
gdk_region_destroy (invalidate_region);
GDI_CALL (DeleteObject, (native_invalidate_region));
}
}
void
+7 -6
View File
@@ -48,10 +48,15 @@ UINT _gdk_input_codepage;
WORD _cf_rtf;
WORD _cf_utf8_string;
WORD _cf_image_bmp;
GdkAtom _utf8_string;
GdkAtom _gdk_selection_property;
GdkAtom _wm_transient_for;
GdkAtom _targets;
GdkAtom _save_targets;
GdkAtom _utf8_string;
GdkAtom _text;
GdkAtom _compound_text;
GdkAtom _text_uri_list;
GdkAtom _image_bmp;
@@ -59,10 +64,6 @@ GdkAtom _local_dnd;
GdkAtom _gdk_win32_dropfiles;
GdkAtom _gdk_ole2_dnd;
GdkAtom _gdk_selection_property;
GdkAtom _wm_transient_for;
gint _gdk_input_ignore_wintab = FALSE;
gint _gdk_max_colors = 0;
+2 -4
View File
@@ -127,6 +127,7 @@ _gdk_win32_new_image (GdkVisual *visual,
image->width = width;
image->height = height;
image->depth = depth;
image->bits_per_pixel = _gdk_windowing_get_bits_for_depth (gdk_display_get_default (), depth);
switch (depth)
{
case 1:
@@ -142,7 +143,7 @@ _gdk_win32_new_image (GdkVisual *visual,
image->bpp = 2;
break;
case 24:
image->bpp = 3;
image->bpp = image->bits_per_pixel / 8;
break;
case 32:
image->bpp = 4;
@@ -157,7 +158,6 @@ _gdk_win32_new_image (GdkVisual *visual,
image->bpl = ((width - 1)/8 + 1)*4;
else
image->bpl = ((width*image->bpp - 1)/4 + 1)*4;
image->bits_per_pixel = image->depth;
image->mem = bits;
return image;
@@ -423,8 +423,6 @@ _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
return 16;
case 24:
return 24;
case 32:
return 32;
}
+9 -8
View File
@@ -110,10 +110,15 @@ _gdk_windowing_init (void)
_cf_rtf = RegisterClipboardFormat ("Rich Text Format");
_cf_utf8_string = RegisterClipboardFormat ("UTF8_STRING");
_cf_image_bmp = RegisterClipboardFormat ("image/bmp");
_utf8_string = gdk_atom_intern ("UTF8_STRING", FALSE);
_gdk_selection_property = gdk_atom_intern ("GDK_SELECTION", FALSE);
_wm_transient_for = gdk_atom_intern ("WM_TRANSIENT_FOR", FALSE);
_targets = gdk_atom_intern ("TARGETS", FALSE);
_save_targets = gdk_atom_intern ("SAVE_TARGETS", FALSE);
_utf8_string = gdk_atom_intern ("UTF8_STRING", FALSE);
_text = gdk_atom_intern ("TEXT", FALSE);
_compound_text = gdk_atom_intern ("COMPOUND_TEXT", FALSE);
_text_uri_list = gdk_atom_intern ("text/uri-list", FALSE);
_image_bmp = gdk_atom_intern ("image/bmp", FALSE);
@@ -121,10 +126,6 @@ _gdk_windowing_init (void)
_gdk_win32_dropfiles = gdk_atom_intern ("DROPFILES_DND", FALSE);
_gdk_ole2_dnd = gdk_atom_intern ("OLE2_DND", FALSE);
_gdk_selection_property = gdk_atom_intern ("GDK_SELECTION", FALSE);
_wm_transient_for = gdk_atom_intern ("WM_TRANSIENT_FOR", FALSE);
_gdk_win32_selection_init ();
}
@@ -932,7 +933,7 @@ _gdk_win32_cf_to_string (UINT format)
switch (format)
{
#define CASE(x) case CF_##x: return #x
#define CASE(x) case CF_##x: return "CF_" #x
CASE (BITMAP);
CASE (DIB);
#ifdef CF_DIBV5
@@ -965,7 +966,7 @@ _gdk_win32_cf_to_string (UINT format)
format <= CF_PRIVATELAST)
return static_printf ("CF_PRIVATE%d", format - CF_PRIVATEFIRST);
if (GetClipboardFormatName (format, buf, sizeof (buf)))
return static_printf ("%s", buf);
return static_printf ("'%s'", buf);
else
return static_printf ("unk-%#lx", format);
}
+1 -1
View File
@@ -209,7 +209,7 @@ gdk_pixmap_new (GdkDrawable *drawable,
case 1:
case 24:
case 32:
bmi.bmiHeader.biBitCount = depth;
bmi.bmiHeader.biBitCount = _gdk_windowing_get_bits_for_depth (gdk_display_get_default (), depth);
break;
case 4:
+10 -10
View File
@@ -353,12 +353,11 @@ HRGN _gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
gint x_origin,
gint y_origin);
GdkRegion *_gdk_win32_hrgn_to_region (HRGN hrgn);
void _gdk_win32_adjust_client_rect (GdkWindow *window,
RECT *RECT);
void _gdk_win32_get_adjusted_client_rect (GdkWindow *window,
RECT *RECT);
void _gdk_selection_property_delete (GdkWindow *);
void _gdk_dropfiles_store (gchar *data);
@@ -472,11 +471,16 @@ extern guint _scancode_rshift;
/* Registered clipboard formats */
extern WORD _cf_rtf;
extern WORD _cf_utf8_string;
extern WORD _cf_image_bmp;
/* GdkAtoms: targets */
extern GdkAtom _utf8_string;
/* GdkAtoms: properties, targets and types */
extern GdkAtom _gdk_selection_property;
extern GdkAtom _wm_transient_for;
extern GdkAtom _targets;
extern GdkAtom _save_targets;
extern GdkAtom _utf8_string;
extern GdkAtom _text;
extern GdkAtom _compound_text;
extern GdkAtom _text_uri_list;
extern GdkAtom _image_bmp;
@@ -485,10 +489,6 @@ extern GdkAtom _local_dnd;
extern GdkAtom _gdk_win32_dropfiles;
extern GdkAtom _gdk_ole2_dnd;
extern GdkAtom _gdk_selection_property;
extern GdkAtom _wm_transient_for;
/* Options */
extern gboolean _gdk_input_ignore_wintab;
extern gint _gdk_max_colors;
+36 -28
View File
@@ -278,12 +278,17 @@ gdk_property_change (GdkWindow *window,
g_free (prop_name),
g_free (type_name)));
/* We should never come here for these types */
g_return_if_fail (type != GDK_TARGET_STRING);
g_return_if_fail (type != _text);
g_return_if_fail (type != _compound_text);
g_return_if_fail (type != _save_targets);
if (property == _gdk_selection_property
&& format == 8
&& mode == GDK_PROP_MODE_REPLACE)
{
if ((type == GDK_TARGET_STRING && GetACP () == 1252) ||
type == _utf8_string)
if (type == _utf8_string)
{
if (!OpenClipboard (GDK_WINDOW_HWND (window)))
{
@@ -291,29 +296,17 @@ gdk_property_change (GdkWindow *window,
return;
}
if (type == _utf8_string)
{
/* Check if only ASCII */
for (i = 0; i < nelements; i++)
if (data[i] >= 0200)
break;
}
else /* if (type == GDK_TARGET_STRING) */
{
/* Check that no 0200..0240 chars present, as they
* differ between ISO-8859-1 and CP1252.
*/
for (i = 0; i < nelements; i++)
if (data[i] >= 0200 && data[i] < 0240)
break;
}
nchars = g_utf8_strlen (data, nelements);
/* Check if only ASCII */
for (i = 0; i < nelements; i++)
if (data[i] >= 0200)
break;
if (i == nelements)
{
/* If UTF-8 and only ASCII, or if STRING (ISO-8859-1)
* and system codepage is CP1252, use CF_TEXT and the
* data as such.
/* If UTF-8 and only ASCII, use CF_TEXT and the data as
* such.
*/
method = SYSTEM_CODEPAGE;
size = nelements;
@@ -351,8 +344,16 @@ gdk_property_change (GdkWindow *window,
const guchar *p = data;
/* WordPad on XP, at least, doesn't seem to grok \uc0
* -encoded Unicode characters. Oh well, use \uc1 then,
* with a question mark as the "ANSI" stand-in for each
* non-ASCII Unicode character. (WordPad for XP? This
* code path is for Win9x! Yes, but I don't have Win9x,
* so I use XP to test, using the G_WIN32_PRETEND_WIN9X
* environment variable.)
*/
method = RICH_TEXT;
rtf = g_string_new ("{\\rtf1\\uc0 ");
rtf = g_string_new ("{\\rtf1\\uc1 ");
while (p < data + nelements)
{
@@ -374,11 +375,11 @@ gdk_property_change (GdkWindow *window,
guchar *q;
gint n;
rtf = g_string_append (rtf, "\\uNNNNN ");
rtf->len -= 6; /* five digits and a space */
rtf = g_string_append (rtf, "\\uNNNNN ?");
rtf->len -= 7; /* five digits a space and a question mark */
q = rtf->str + rtf->len;
n = g_sprintf (q, "%d ", g_utf8_get_char (p));
g_assert (n <= 6);
n = g_sprintf (q, "%d ?", g_utf8_get_char (p));
g_assert (n <= 7);
rtf->len += n;
p = g_utf8_next_char (p);
@@ -435,8 +436,10 @@ gdk_property_change (GdkWindow *window,
lcidptr = GlobalLock (hlcid);
*lcidptr = lcid;
GlobalUnlock (hlcid);
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_LOCALE,%p)\n",
hlcid));
if (!SetClipboardData (CF_LOCALE, hlcid))
WIN32_API_FAILED ("SetClipboardData (CF_LOCALE)"), ok = FALSE;
WIN32_API_FAILED ("SetClipboardData(CF_LOCALE)"), ok = FALSE;
}
break;
@@ -455,8 +458,10 @@ gdk_property_change (GdkWindow *window,
guchar *utf8ptr = GlobalLock (hutf8);
memmove (utf8ptr, data, nelements);
GlobalUnlock (hutf8);
GDK_NOTE (DND, g_print ("... SetClipboardData('UTF8_STRING',%p)\n",
hutf8));
if (!SetClipboardData (_cf_utf8_string, hutf8))
WIN32_API_FAILED ("SetClipboardData (UTF8_STRING)");
WIN32_API_FAILED ("SetClipboardData('UTF8_STRING')");
}
break;
@@ -465,6 +470,8 @@ gdk_property_change (GdkWindow *window,
}
GlobalUnlock (hdata);
GDK_NOTE (DND, g_print ("... SetClipboardData(%s,%p)\n",
_gdk_win32_cf_to_string (cf), hdata));
if (ok && !SetClipboardData (cf, hdata))
WIN32_API_FAILED ("SetClipboardData"), ok = FALSE;
@@ -473,6 +480,7 @@ gdk_property_change (GdkWindow *window,
}
else
{
GDK_NOTE (DND, g_print ("... delayed rendering\n"));
/* Delayed Rendering. We can't assign hdata to the clipboard
* here as type may be "image/png", "image/jpg", etc. In
* this case there's a further conversion afterwards.
+7 -7
View File
@@ -47,7 +47,7 @@ gdk_screen_set_default_colormap (GdkScreen *screen,
{
GdkColormap *old_colormap;
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (screen == _gdk_screen);
g_return_if_fail (GDK_IS_COLORMAP (colormap));
old_colormap = default_colormap;
@@ -61,7 +61,7 @@ gdk_screen_set_default_colormap (GdkScreen *screen,
gint
gdk_screen_get_n_monitors (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
g_return_val_if_fail (screen == _gdk_screen, 0);
return _gdk_num_monitors;
}
@@ -71,7 +71,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
gint num_monitor,
GdkRectangle *dest)
{
g_return_if_fail (GDK_IS_SCREEN (screen));
g_return_if_fail (screen == _gdk_screen);
g_return_if_fail (num_monitor < _gdk_num_monitors);
g_return_if_fail (num_monitor >= 0);
@@ -81,7 +81,7 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen,
GdkColormap *
gdk_screen_get_rgba_colormap (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
g_return_val_if_fail (screen == _gdk_screen, NULL);
return NULL;
}
@@ -89,7 +89,7 @@ gdk_screen_get_rgba_colormap (GdkScreen *screen)
GdkVisual *
gdk_screen_get_rgba_visual (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
g_return_val_if_fail (screen == _gdk_screen, NULL);
return NULL;
}
@@ -97,7 +97,7 @@ gdk_screen_get_rgba_visual (GdkScreen *screen)
gint
gdk_screen_get_number (GdkScreen *screen)
{
g_return_val_if_fail (GDK_IS_SCREEN (screen), 0);
g_return_val_if_fail (screen == _gdk_screen, 0);
return 0;
}
@@ -115,5 +115,5 @@ _gdk_windowing_substitute_screen_number (const gchar *display_name,
gchar *
gdk_screen_make_display_name (GdkScreen *screen)
{
return gdk_display_get_name (_gdk_display);
return g_strdup (gdk_display_get_name (_gdk_display));
}
+160 -98
View File
@@ -201,17 +201,22 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
{
HWND hwnd;
GdkEvent tmp_event;
gchar *sel_name;
g_return_val_if_fail (display == _gdk_display, FALSE);
g_return_val_if_fail (selection != GDK_NONE, FALSE);
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
g_print ("gdk_selection_owner_set: %p %#x (%s)\n",
(owner ? GDK_WINDOW_HWND (owner) : NULL),
(guint) selection, sel_name),
g_free (sel_name)));
#ifdef G_ENABLE_DEBUG
{
gchar *sel_name;
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
g_print ("gdk_selection_owner_set_for_display: %p %#x (%s)\n",
(owner ? GDK_WINDOW_HWND (owner) : NULL),
(guint) selection, sel_name),
g_free (sel_name)));
}
#endif
if (selection != GDK_SELECTION_CLIPBOARD)
{
@@ -237,6 +242,7 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
return FALSE;
_ignore_destroy_clipboard = TRUE;
GDK_NOTE (DND, g_print ("... EmptyClipboard()\n"));
if (!API_CALL (EmptyClipboard, ()))
{
_ignore_destroy_clipboard = FALSE;
@@ -275,28 +281,34 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
GdkAtom selection)
{
GdkWindow *window;
gchar *sel_name;
g_return_val_if_fail (display == _gdk_display, NULL);
g_return_val_if_fail (selection != GDK_NONE, NULL);
/* Return NULL for CLIPBOARD, because otherwise cut&paste inside the
* same application doesn't work. We must pretend to gtk that we
* don't have the selection, so that we always fetch it from the
* Windows clipboard. See also comments in
* gdk_selection_send_notify().
*/
if (selection == GDK_SELECTION_CLIPBOARD)
return NULL;
{
HWND owner = GetClipboardOwner ();
if (owner == NULL)
return NULL;
return gdk_win32_handle_table_lookup ((GdkNativeWindow) owner);
}
window = gdk_window_lookup ((GdkNativeWindow) g_hash_table_lookup (sel_owner_table, selection));
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
g_print ("gdk_selection_owner_get: %#x (%s) = %p\n",
(guint) selection, sel_name,
(window ? GDK_WINDOW_HWND (window) : NULL)),
g_free (sel_name)));
#ifdef G_ENABLE_DEBUG
{
gchar *sel_name;
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
g_print ("gdk_selection_owner_get: %#x (%s) = %p\n",
(guint) selection, sel_name,
(window ? GDK_WINDOW_HWND (window) : NULL)),
g_free (sel_name)));
}
#endif
return window;
}
@@ -330,8 +342,6 @@ gdk_selection_convert (GdkWindow *requestor,
{
HGLOBAL hdata;
GdkAtom property = _gdk_selection_property;
gchar *sel_name, *tgt_name;
GError *error = NULL;
g_return_if_fail (selection != GDK_NONE);
g_return_if_fail (requestor != NULL);
@@ -339,15 +349,21 @@ gdk_selection_convert (GdkWindow *requestor,
if (GDK_WINDOW_DESTROYED (requestor))
return;
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
tgt_name = gdk_atom_name (target),
g_print ("gdk_selection_convert: %p %#x (%s) %#x (%s)\n",
GDK_WINDOW_HWND (requestor),
(guint) selection, sel_name,
(guint) target, tgt_name),
g_free (sel_name),
g_free (tgt_name)));
#ifdef G_ENABLE_DEBUG
{
gchar *sel_name, *tgt_name;
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
tgt_name = gdk_atom_name (target),
g_print ("gdk_selection_convert: %p %#x (%s) %#x (%s)\n",
GDK_WINDOW_HWND (requestor),
(guint) selection, sel_name,
(guint) target, tgt_name),
g_free (sel_name),
g_free (tgt_name)));
}
#endif
if (selection == GDK_SELECTION_CLIPBOARD && target == _targets)
{
@@ -400,16 +416,14 @@ gdk_selection_convert (GdkWindow *requestor,
data[i++] = _image_bmp;
if (i > 0)
_gdk_selection_property_store (requestor, GDK_SELECTION_TYPE_ATOM,
32, (guchar *) data, i * sizeof (GdkAtom));
_gdk_selection_property_store (requestor, GDK_SELECTION_TYPE_ATOM,
32, (guchar *) data, i * sizeof (GdkAtom));
else
property = GDK_NONE;
API_CALL (CloseClipboard, ());
}
else if (selection == GDK_SELECTION_CLIPBOARD &&
(target == GDK_TARGET_STRING ||
target == _utf8_string))
else if (selection == GDK_SELECTION_CLIPBOARD && target == _utf8_string)
{
/* Converting the CLIPBOARD selection means he wants the
* contents of the clipboard. Get the clipboard data, and store
@@ -447,14 +461,10 @@ gdk_selection_convert (GdkWindow *requestor,
p++;
}
data = g_utf16_to_utf8 (wcs, wclen, NULL, NULL, &error);
data = g_utf16_to_utf8 (wcs, wclen, NULL, NULL, NULL);
g_free (wcs);
if (!data)
{
g_error_free (error);
}
else
if (data)
_gdk_selection_property_store (requestor, target, 8,
data, strlen (data) + 1);
GlobalUnlock (hdata);
@@ -531,12 +541,10 @@ gdk_selection_convert (GdkWindow *requestor,
}
g_free (wcs);
data = g_utf16_to_utf8 (wcs2, wclen2, NULL, &length, &error);
data = g_utf16_to_utf8 (wcs2, wclen2, NULL, &length, NULL);
g_free (wcs2);
if (!data)
g_error_free (error);
else
if (data)
_gdk_selection_property_store (requestor, target, 8,
data, length + 1);
GlobalUnlock (hdata);
@@ -547,14 +555,13 @@ gdk_selection_convert (GdkWindow *requestor,
API_CALL (CloseClipboard, ());
}
else if (selection == GDK_SELECTION_CLIPBOARD &&
target == _image_bmp)
else if (selection == GDK_SELECTION_CLIPBOARD && target == _image_bmp)
{
guchar *data;
if (!API_CALL (OpenClipboard, (GDK_WINDOW_HWND (requestor))))
return;
if ((hdata = GetClipboardData (RegisterClipboardFormat ("image/bmp"))) != NULL)
if ((hdata = GetClipboardData (_cf_image_bmp)) != NULL)
{
/* "image/bmp" is the first choice. */
guchar *ptr;
@@ -613,11 +620,14 @@ gdk_selection_convert (GdkWindow *requestor,
}
else if (selection == GDK_SELECTION_CLIPBOARD)
{
const char *targetname = gdk_atom_name (target);
char *target_name;
UINT fmt = 0;
if (!API_CALL (OpenClipboard, (GDK_WINDOW_HWND (requestor))))
return;
target_name = gdk_atom_name (target);
/* Check if it's available. In fact, we can simply call
* GetClipboardData (RegisterClipboardFormat (targetname)), but
* the global custom format ID space is limited,
@@ -629,7 +639,7 @@ gdk_selection_convert (GdkWindow *requestor,
char sFormat[80];
if (GetClipboardFormatName (fmt, sFormat, 80) > 0 &&
strcmp (sFormat, targetname) == 0)
strcmp (sFormat, target_name) == 0)
{
if ((hdata = GetClipboardData (fmt)) != NULL)
{
@@ -641,7 +651,7 @@ gdk_selection_convert (GdkWindow *requestor,
{
length = GlobalSize (hdata);
GDK_NOTE (DND, g_print ("... %s: %d bytes\n", targetname, length));
GDK_NOTE (DND, g_print ("... %s: %d bytes\n", target_name, length));
_gdk_selection_property_store (requestor, target, 8,
g_memdup (ptr, length), length);
@@ -651,6 +661,7 @@ gdk_selection_convert (GdkWindow *requestor,
}
}
}
g_free (target_name);
API_CALL (CloseClipboard, ());
}
else if (selection == _gdk_win32_dropfiles)
@@ -746,22 +757,26 @@ gdk_selection_send_notify_for_display (GdkDisplay *display,
GdkAtom property,
guint32 time)
{
gchar *sel_name, *tgt_name, *prop_name;
g_return_if_fail (display == _gdk_display);
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
tgt_name = gdk_atom_name (target),
prop_name = gdk_atom_name (property),
g_print ("gdk_selection_send_notify: %#x %#x (%s) %#x (%s) %#x (%s)\n",
requestor,
(guint) selection, sel_name,
(guint) target, tgt_name,
(guint) property, prop_name),
g_free (sel_name),
g_free (tgt_name),
g_free (prop_name)));
#ifdef G_ENABLE_DEBUG
{
gchar *sel_name, *tgt_name, *prop_name;
GDK_NOTE (DND,
(sel_name = gdk_atom_name (selection),
tgt_name = gdk_atom_name (target),
prop_name = gdk_atom_name (property),
g_print ("gdk_selection_send_notify_for_display: %p %#x (%s) %#x (%s) %#x (%s)\n",
(gpointer) requestor,
(guint) selection, sel_name,
(guint) target, tgt_name,
(guint) property, prop_name),
g_free (sel_name),
g_free (tgt_name),
g_free (prop_name)));
}
#endif
}
/* It's hard to say whether implementing this actually is of any use
@@ -776,38 +791,41 @@ gdk_text_property_to_text_list_for_display (GdkDisplay *display,
gint length,
gchar ***list)
{
GError *error = NULL;
gchar *enc_name;
gchar *result;
const gchar *charset;
const gchar *source_charset = NULL;
gchar *source_charset;
g_return_val_if_fail (display == _gdk_display, 0);
GDK_NOTE (DND, (enc_name = gdk_atom_name (encoding),
g_print ("gdk_text_property_to_text_list: %s %d %.20s %d\n",
enc_name, format, text, length),
g_free (enc_name)));
#ifdef G_ENABLE_DEBUG
{
gchar *enc_name;
GDK_NOTE (DND, (enc_name = gdk_atom_name (encoding),
g_print ("gdk_text_property_to_text_list_for_display: %s %d %.20s %d\n",
enc_name, format, text, length),
g_free (enc_name)));
}
#endif
if (!list)
return 0;
if (encoding == GDK_TARGET_STRING)
source_charset = "ISO-8859-1";
source_charset = g_strdup ("ISO-8859-1");
else if (encoding == _utf8_string)
source_charset = "UTF-8";
source_charset = g_strdup ("UTF-8");
else
source_charset = gdk_atom_name (encoding);
g_get_charset (&charset);
result = g_convert (text, length, charset, source_charset,
NULL, NULL, &error);
NULL, NULL, NULL);
g_free (source_charset);
if (!result)
{
g_error_free (error);
return 0;
}
return 0;
*list = g_new (gchar *, 1);
**list = result;
@@ -915,7 +933,10 @@ gdk_text_property_to_utf8_list_for_display (GdkDisplay *display,
}
else
{
g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", gdk_atom_name (encoding));
gchar *enc_name = gdk_atom_name (encoding);
g_warning ("gdk_text_property_to_utf8_list_for_display: encoding %s not handled\n", enc_name);
g_free (enc_name);
if (list)
*list = NULL;
@@ -1008,12 +1029,32 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
GdkAtom *targets)
{
HWND hwnd;
const gchar *target_name;
guint formatid;
gint i;
GSList *convertable_formats, *format;
gboolean has_set_dib = FALSE, has_real_dib = FALSE;
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_DND)
{
gchar *sel_name = gdk_atom_name (selection);
g_print ("gdk_win32_selection_add_targets: %p: %s: ",
owner ? GDK_WINDOW_HWND (owner) : NULL,
sel_name);
g_free (sel_name);
for (i = 0; i < n_targets; i++)
{
gchar *tgt_name = gdk_atom_name (targets[i]);
g_print ("%s ", tgt_name);
g_free (tgt_name);
}
g_print ("\n");
}
#endif
if (selection != GDK_SELECTION_CLIPBOARD)
return;
@@ -1030,16 +1071,28 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
convertable_formats = gdk_pixbuf_get_formats ();
for (i = 0; i < n_targets; ++i)
{
if (targets[i] == _utf8_string)
gchar *target_name;
if (targets[i] == _utf8_string ||
targets[i] == GDK_TARGET_STRING ||
targets[i] == _text ||
targets[i] == _compound_text ||
targets[i] == _save_targets)
continue;
target_name = gdk_atom_name (targets[i]);
if (!(formatid = RegisterClipboardFormat (target_name))) {
WIN32_API_FAILED ("RegisterClipboardFormat");
API_CALL (CloseClipboard, ());
return;
}
if (!(formatid = RegisterClipboardFormat (target_name)))
{
WIN32_API_FAILED ("RegisterClipboardFormat");
API_CALL (CloseClipboard, ());
g_free (target_name);
return;
}
g_hash_table_replace (_format_atom_table, GINT_TO_POINTER (formatid), targets[i]);
GDK_NOTE (DND, g_print ("... SetClipboardData(%s,NULL)\n",
_gdk_win32_cf_to_string (formatid)));
SetClipboardData (formatid, NULL);
/* We should replace the previous image format associated with
@@ -1054,11 +1107,14 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
g_hash_table_replace (_format_atom_table,
GINT_TO_POINTER (CF_DIB),
targets[i]);
if (!has_set_dib) {
SetClipboardData (CF_DIB, NULL);
has_set_dib = TRUE;
}
if (!has_set_dib)
{
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_DIB,NULL)\n"));
SetClipboardData (CF_DIB, NULL);
has_set_dib = TRUE;
}
has_real_dib = TRUE;
g_free (target_name);
continue;
}
@@ -1074,12 +1130,14 @@ gdk_win32_selection_add_targets (GdkWindow *owner,
g_hash_table_replace (_format_atom_table,
GINT_TO_POINTER (CF_DIB),
targets[i]);
GDK_NOTE (DND, g_print ("... SetClipboardData(CF_DIB,NULL)\n"));
SetClipboardData (CF_DIB, NULL);
has_set_dib = TRUE;
break;
}
}
}
g_free (target_name);
}
g_slist_free (convertable_formats);
@@ -1096,7 +1154,7 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
{
GdkPixbufLoader *loader;
GdkPixbuf *pixbuf;
const gchar *target_name;
gchar *target_name;
guchar *ptr;
gchar *bmp_buf;
gsize size;
@@ -1115,14 +1173,16 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
/* No conversion is needed, just strip the BITMAPFILEHEADER */
HGLOBAL hdatanew;
g_free (target_name);
size = GlobalSize (hdata) - 1 - sizeof (BITMAPFILEHEADER);
ptr = GlobalLock (hdata);
memmove (ptr, ptr + sizeof (BITMAPFILEHEADER), size);
GlobalUnlock (hdata);
if (!(hdatanew = GlobalReAlloc (hdata, size, 0))) {
WIN32_API_FAILED ("GlobalReAlloc");
GlobalFree (hdata); /* the old hdata is not freed if error */
}
if (!(hdatanew = GlobalReAlloc (hdata, size, 0)))
{
WIN32_API_FAILED ("GlobalReAlloc");
GlobalFree (hdata); /* the old hdata is not freed if error */
}
return hdatanew;
}
@@ -1133,8 +1193,10 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
if (!(loader = gdk_pixbuf_loader_new_with_mime_type (target_name, NULL)))
{
GlobalFree (hdata);
g_free (target_name);
return NULL;
}
g_free (target_name);
ptr = GlobalLock (hdata);
ok = gdk_pixbuf_loader_write (loader, ptr, GlobalSize (hdata) - 1, NULL) &&
+1
View File
@@ -246,6 +246,7 @@ _gdk_visual_init (void)
}
else if (bitspixel == 24 || bitspixel == 32)
{
bitspixel = 24;
system_visual->type = GDK_VISUAL_TRUE_COLOR;
system_visual->red_mask = 0x00FF0000;
system_visual->green_mask = 0x0000FF00;
File diff suppressed because it is too large Load Diff
+2
View File
@@ -84,6 +84,8 @@ struct _GdkWindowImplWin32
GdkGeometry hints;
gboolean extension_events_selected;
GdkWindowTypeHint type_hint;
};
struct _GdkWindowImplWin32Class
+8 -1
View File
@@ -626,6 +626,9 @@ _gdk_x11_get_window_child_info (GdkDisplay *display,
else
wm_state_atom = None;
state.children = NULL;
state.nchildren = 0;
gdk_error_trap_push ();
result = list_children_and_wm_state (dpy, window,
win_has_wm_state ? wm_state_atom : None,
@@ -633,12 +636,16 @@ _gdk_x11_get_window_child_info (GdkDisplay *display,
&state.children, &state.nchildren);
gdk_error_trap_pop ();
if (!result)
return FALSE;
{
g_free (state.children);
return FALSE;
}
if (has_wm_state)
{
if (win_has_wm_state)
*win_has_wm_state = TRUE;
g_free (state.children);
return TRUE;
}
else
+1 -1
View File
@@ -1371,7 +1371,7 @@ gdkx_colormap_get (Colormap xcolormap)
GdkColormap *colormap;
if (xcolormap == DefaultColormap (GDK_SCREEN_XDISPLAY (screen),
GDK_SCREEN_XNUMBER (screen)));
GDK_SCREEN_XNUMBER (screen)))
return g_object_ref (gdk_screen_get_system_colormap (screen));
colormap = gdk_colormap_lookup (screen, xcolormap);
+9 -3
View File
@@ -430,8 +430,12 @@ update_cursor (gpointer key,
gpointer value,
gpointer data)
{
XID *xid = key;
GdkCursor *cursor;
if (*xid & XID_FONT_BIT)
return;
if (!GDK_IS_WINDOW (value))
return;
@@ -446,7 +450,8 @@ update_cursor (gpointer key,
/**
* gdk_x11_display_set_cursor_theme:
* @display: a #GdkDisplay
* @theme: the name of the cursor theme to use
* @theme: the name of the cursor theme to use, or %NULL to unset
* a previously set value
* @size: the cursor size to use
*
* Sets the cursor theme from which the images for cursor
@@ -481,8 +486,9 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
old_theme = XcursorGetTheme (xdisplay);
old_size = XcursorGetDefaultSize (xdisplay);
if (old_size == size &&
old_theme && strcmp (old_theme, theme) == 0)
if (old_size == size &&
(old_theme == theme ||
(old_theme && theme && strcmp (old_theme, theme) == 0)))
return;
theme_serial++;
+10 -3
View File
@@ -136,7 +136,7 @@ static GList *contexts;
const static struct {
const char *atom_name;
GdkFilterFunc func;
} const xdnd_filters[] = {
} xdnd_filters[] = {
{ "XdndEnter", xdnd_enter_filter },
{ "XdndLeave", xdnd_leave_filter },
{ "XdndPosition", xdnd_position_filter },
@@ -3035,8 +3035,14 @@ _gdk_drag_get_protocol_for_display (GdkDisplay *display,
GDK_NOTE (DND, g_message ("Entering local Xdnd window %#x\n", xid));
return xid;
}
else
return None;
else if (_gdk_x11_display_is_root_window (display, (Window) xid))
{
*protocol = GDK_DRAG_PROTO_ROOTWIN;
GDK_NOTE (DND, g_message ("Entering root window\n"));
return xid;
}
return None;
}
if ((retval = xdnd_check_dest (display, xid, version)))
@@ -3104,6 +3110,7 @@ _gdk_drag_get_protocol_for_display (GdkDisplay *display,
if (rootwin)
{
*protocol = GDK_DRAG_PROTO_ROOTWIN;
GDK_NOTE (DND, g_message ("Entering root window\n"));
return xid;
}
}
+1
View File
@@ -2807,6 +2807,7 @@ static const struct
{ "Xft/HintStyle", "gtk-xft-hintstyle" },
{ "Xft/RGBA", "gtk-xft-rgba" },
{ "Xft/DPI", "gtk-xft-dpi" },
{ "Net/FallbackIconTheme", "gtk-fallback-icon-theme" }
};
static void
+3 -1
View File
@@ -50,6 +50,7 @@ struct _GdkFontPrivateX
GdkDisplay *display;
GSList *names;
XID xid;
};
static GHashTable *
@@ -214,13 +215,14 @@ gdk_font_load_for_display (GdkDisplay *display,
private->xfont = xfont;
private->base.ref_count = 1;
private->names = NULL;
private->xid = xfont->fid | XID_FONT_BIT;
font = (GdkFont*) private;
font->type = GDK_FONT_FONT;
font->ascent = xfont->ascent;
font->descent = xfont->descent;
_gdk_xid_table_insert (display, &xfont->fid, font);
_gdk_xid_table_insert (display, &private->xid, font);
}
gdk_font_hash_insert (GDK_FONT_FONT, font, font_name);
+21 -5
View File
@@ -244,12 +244,28 @@ get_symbol (const KeySym *syms,
gint index;
index = KEYSYM_INDEX(keymap_x11, group, level);
if (index > keymap_x11->keysyms_per_keycode)
if (index >= keymap_x11->keysyms_per_keycode)
return NoSymbol;
return syms[index];
}
static void
set_symbol (KeySym *syms,
GdkKeymapX11 *keymap_x11,
gint group,
gint level,
KeySym sym)
{
gint index;
index = KEYSYM_INDEX(keymap_x11, group, level);
if (index >= keymap_x11->keysyms_per_keycode)
return;
syms[index] = sym;
}
static void
update_keymaps (GdkKeymapX11 *keymap_x11)
{
@@ -295,7 +311,7 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
for (i = 0 ; i < 2 ; i++)
{
if (get_symbol (syms, keymap_x11, i, 0) == GDK_Tab)
syms[KEYSYM_INDEX (keymap_x11, i, 1)] = GDK_ISO_Left_Tab;
set_symbol (syms, keymap_x11, i, 1, GDK_ISO_Left_Tab);
}
/*
@@ -310,8 +326,8 @@ update_keymaps (GdkKeymapX11 *keymap_x11)
gdk_keyval_convert_case (get_symbol (syms, keymap_x11, 0, 0), &lower, &upper);
if (lower != upper)
{
syms[KEYSYM_INDEX (keymap_x11, 0, 0)] = lower;
syms[KEYSYM_INDEX (keymap_x11, 0, 1)] = upper;
set_symbol (syms, keymap_x11, 0, 0, lower);
set_symbol (syms, keymap_x11, 0, 1, upper);
}
}
@@ -1103,7 +1119,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
/* ---- End stuff GDK adds to the original Xlib version ---- */
return (syms[col]!=NoSymbol);
return (syms[col] != NoSymbol);
}
#endif /* HAVE_XKB */
+2
View File
@@ -86,6 +86,8 @@ struct _GdkVisualPrivate
GdkScreen *screen;
};
#define XID_FONT_BIT (1<<31)
void _gdk_xid_table_insert (GdkDisplay *display,
XID *xid,
gpointer data);
+2 -5
View File
@@ -530,11 +530,8 @@ gdk_property_get (GdkWindow *window,
*/
get_length = length + 3;
if (get_length > G_MAXLONG)
{
g_warning ("gdk_property_get(): length value has wrapped in calculation "
"(did you pass G_MAXLONG?)");
get_length = G_MAXLONG;
}
get_length = G_MAXLONG;
/* To fail, either the user passed 0 or G_MAXULONG */
get_length = get_length / 4;
if (get_length == 0)
+30 -6
View File
@@ -3685,6 +3685,7 @@ gdk_window_shape_combine_mask (GdkWindow *window,
GdkBitmap *mask,
gint x, gint y)
{
GdkWindowObject *private = (GdkWindowObject *)window;
Pixmap pixmap;
gint xoffset, yoffset;
@@ -3707,12 +3708,16 @@ gdk_window_shape_combine_mask (GdkWindow *window,
if (mask)
{
pixmap = GDK_PIXMAP_XID (mask);
private->shaped = TRUE;
}
else
{
x = 0;
y = 0;
pixmap = None;
private->shaped = FALSE;
}
XShapeCombineMask (GDK_WINDOW_XDISPLAY (window),
@@ -3754,7 +3759,8 @@ gdk_window_shape_combine_region (GdkWindow *window,
GdkRegion *shape_region,
gint offset_x,
gint offset_y)
{
{
GdkWindowObject *private = (GdkWindowObject *)window;
gint xoffset, yoffset;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -3783,6 +3789,8 @@ gdk_window_shape_combine_region (GdkWindow *window,
gint n_rects = 0;
XRectangle *xrects = NULL;
private->shaped = TRUE;
_gdk_region_get_xrectangles (shape_region,
0, 0,
&xrects, &n_rects);
@@ -3959,6 +3967,12 @@ gdk_x11_window_set_user_time (GdkWindow *window,
toplevel->user_time = timestamp_long;
}
#define GDK_SELECTION_MAX_SIZE(display) \
MIN(262144, \
XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) == 0 \
? XMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100 \
: XExtendedMaxRequestSize (GDK_DISPLAY_XDISPLAY (display)) - 100)
/**
* gdk_window_set_icon_list:
* @window: The #GdkWindow toplevel window to set the icon of.
@@ -3987,6 +4001,7 @@ gdk_window_set_icon_list (GdkWindow *window,
gint x, y;
gint n_channels;
GdkDisplay *display;
gint n;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -3997,7 +4012,7 @@ gdk_window_set_icon_list (GdkWindow *window,
l = pixbufs;
size = 0;
n = 0;
while (l)
{
pixbuf = l->data;
@@ -4006,8 +4021,16 @@ gdk_window_set_icon_list (GdkWindow *window,
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);
/* silently ignore overlarge icons */
if (size + 2 + width * height > GDK_SELECTION_MAX_SIZE(display))
{
g_warning ("gdk_window_set_icon_list: icons too large");
break;
}
n++;
size += 2 + width * height;
l = g_list_next (l);
}
@@ -4015,7 +4038,7 @@ gdk_window_set_icon_list (GdkWindow *window,
l = pixbufs;
p = data;
while (l)
while (l && n > 0)
{
pixbuf = l->data;
@@ -4048,6 +4071,7 @@ gdk_window_set_icon_list (GdkWindow *window,
}
l = g_list_next (l);
n--;
}
if (size > 0)
@@ -5541,6 +5565,7 @@ finish_drag (MoveResizeData *mv_resize)
{
gdk_window_destroy (mv_resize->moveresize_emulation_window);
mv_resize->moveresize_emulation_window = NULL;
g_object_unref (mv_resize->moveresize_window);
mv_resize->moveresize_window = NULL;
if (mv_resize->moveresize_pending_event)
@@ -5720,8 +5745,7 @@ create_moveresize_window (MoveResizeData *mv_resize,
/* If this fails, some other client has grabbed the window
* already.
*/
gdk_window_destroy (mv_resize->moveresize_emulation_window);
mv_resize->moveresize_emulation_window = NULL;
finish_drag (mv_resize);
}
mv_resize->moveresize_process_time = 0;
+1 -1
View File
@@ -201,9 +201,9 @@ init_xft_settings (GdkScreen *screen)
break;
}
}
#endif
screen_x11->xft_rgba = subpixel;
#endif
}
if (!get_double_default (xdisplay, "dpi", &dpi_double))
+1 -1
View File
@@ -123,7 +123,7 @@ static gboolean
gdk_xid_equal (XID *a,
XID *b)
{
return (*a == *b);
return ((*a & ~XID_FONT_BIT) == (*b & ~XID_FONT_BIT));
}
#define __GDK_XID_C__
+7 -9
View File
@@ -2,22 +2,19 @@
# Build zipfiles for GTK on Win32
ZIP=/tmp/gtk+-@GTK_VERSION@-`date +%Y%m%d`.zip
DEVZIP=/tmp/gtk+-dev-@GTK_VERSION@-`date +%Y%m%d`.zip
ZIP=/tmp/gtk+-@GTK_VERSION@.zip
DEVZIP=/tmp/gtk+-dev-@GTK_VERSION@.zip
cd @prefix@
rm $ZIP
DLLDIR=lib
[ -f bin/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll ] && DLLDIR=bin
zip $ZIP -@ <<EOF
COPYING.LIB-2
etc/gtk-2.0/gdk-pixbuf.loaders
etc/gtk-2.0/gtkrc
etc/gtk-2.0/gtk.immodules
$DLLDIR/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
$DLLDIR/libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
$DLLDIR/libgtk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgtk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
EOF
zip $ZIP lib/gtk-2.0/@GTK_BINARY_VERSION@/loaders/*.dll lib/gtk-2.0/@GTK_BINARY_VERSION@/immodules/*.dll lib/gtk-2.0/@GTK_BINARY_VERSION@/engines/*.dll
@@ -27,7 +24,8 @@ 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 -r $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
zip $ZIP lib/locale/*/LC_MESSAGES/gtk20.mo
zip $ZIP lib/locale/*/LC_MESSAGES/gtk20-properties.mo
rm $DEVZIP
zip -r $DEVZIP -@ <<EOF
+2 -2
View File
@@ -636,7 +636,7 @@ gtkmarshal.c: @REBUILD@ gtkmarshal.list
gtktypebuiltins.h: stamp-gtktypebuiltins.h
@true
stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#ifndef __GTK_TYPE_BUILTINS_H__\n#define __GTK_TYPE_BUILTINS_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define GTK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
@@ -646,7 +646,7 @@ stamp-gtktypebuiltins.h: @REBUILD@ $(gtk_public_h_sources) Makefile
&& rm -f xgen-gtbh \
&& echo timestamp > $(@F)
gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
( cd $(srcdir) && $(GLIB_MKENUMS) \
--fhead "#undef GTK_DISABLE_DEPRECATED\n#define GTK_ENABLE_BROKEN\n#include \"gtk.h\"\n#include \"gtkprivate.h\"\n#include \"gtkalias.h\"\n" \
--ftail "#define __GTK_TYPE_BUILTINS_C__\n#include \"gtkaliasdef.c\"\n" \
--fprod "\n/* enumerations from \"@filename@\" */" \
+1 -1
View File
@@ -1,5 +1,5 @@
#! /bin/sh
cpp -DINCLUDE_VARIABLES -P -DG_OS_UNIX -DGTK_WINDOWING_X11 -DALL_FILES ${srcdir:-.}/gtk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' | sort > expected-abi
nm -D .libs/libgtk-x11-2.0.so | grep " [BDTR] " | cut -d ' ' -f 3 | sort > actual-abi
nm -D -g --defined-only .libs/libgtk-x11-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
diff -u expected-abi actual-abi && rm expected-abi actual-abi
-1
View File
@@ -162,7 +162,6 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtktoggletoolbutton.h>
#include <gtk/gtktoolbar.h>
#include <gtk/gtktoolbar.h>
#include <gtk/gtktoolbutton.h>
#include <gtk/gtktoolitem.h>
#include <gtk/gtktooltips.h>
+10 -8
View File
@@ -438,7 +438,7 @@ static void
gtk_about_dialog_init (GtkAboutDialog *about)
{
GtkAboutDialogPrivate *priv;
GtkWidget *vbox, *hbox, *button;
GtkWidget *vbox, *hbox, *button, *image;
/* Data */
priv = GTK_ABOUT_DIALOG_GET_PRIVATE (about);
@@ -502,11 +502,13 @@ gtk_about_dialog_init (GtkAboutDialog *about)
gtk_widget_show (hbox);
/* Add the OK button */
gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CLOSE);
gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL);
gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CANCEL);
/* Add the credits button */
button = gtk_button_new_from_stock (_("C_redits"));
button = gtk_button_new_with_mnemonic (_("C_redits"));
image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), image);
gtk_widget_set_no_show_all (button, TRUE);
gtk_box_pack_end (GTK_BOX (GTK_DIALOG (about)->action_area),
button, FALSE, TRUE, 0);
@@ -2031,13 +2033,13 @@ display_credits_dialog (GtkWidget *button,
dialog = gtk_dialog_new_with_buttons (_("Credits"),
GTK_WINDOW (about),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
NULL);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
priv->credits_dialog = dialog;
gtk_window_set_default_size (GTK_WINDOW (dialog), 360, 260);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
gtk_window_set_modal (GTK_WINDOW (dialog),
gtk_window_get_modal (GTK_WINDOW (about)));
@@ -2103,12 +2105,12 @@ display_license_dialog (GtkWidget *button,
dialog = gtk_dialog_new_with_buttons (_("License"),
GTK_WINDOW (about),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL,
NULL);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
priv->license_dialog = dialog;
gtk_window_set_default_size (GTK_WINDOW (dialog), 420, 320);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
gtk_window_set_modal (GTK_WINDOW (dialog),
gtk_window_get_modal (GTK_WINDOW (about)));
+8 -4
View File
@@ -745,7 +745,7 @@ gtk_action_sync_button_stock_id (GtkAction *action,
GtkWidget *proxy)
{
g_object_set (G_OBJECT (proxy),
"stock-id",
"label",
action->private_data->stock_id,
NULL);
}
@@ -949,13 +949,14 @@ connect_proxy (GtkAction *action,
{
/* synchronise stock-id */
g_object_set (proxy,
"stock-id", action->private_data->stock_id,
"label", action->private_data->stock_id,
NULL);
g_signal_connect_object (action, "notify::stock-id",
G_CALLBACK (gtk_action_sync_button_stock_id),
proxy, 0);
}
else if (GTK_IS_LABEL(GTK_BIN(proxy)->child))
else if (GTK_BIN (proxy)->child == NULL ||
GTK_IS_LABEL (GTK_BIN (proxy)->child))
{
/* synchronise the label */
g_object_set (proxy,
@@ -999,6 +1000,9 @@ disconnect_proxy (GtkAction *action,
g_signal_handlers_disconnect_by_func (action,
G_CALLBACK (gtk_action_sync_sensitivity),
proxy);
g_signal_handlers_disconnect_by_func (action,
G_CALLBACK (gtk_action_sync_visible),
proxy);
g_signal_handlers_disconnect_by_func (action,
G_CALLBACK (gtk_action_sync_property),
proxy);
@@ -1500,7 +1504,7 @@ gtk_action_get_accel_path (GtkAction *action)
* Since: 2.8
*
* Returns: the accel closure for this action. The returned closure is
* owned by GTK+ must and not be unrefed or modified.
* owned by GTK+ and must not be unreffed or modified.
*/
GClosure *
gtk_action_get_accel_closure (GtkAction *action)
+30 -14
View File
@@ -417,7 +417,8 @@ gtk_action_group_get_sensitive (GtkActionGroup *action_group)
}
static void
cb_set_action_sensitivity (const gchar *name, GtkAction *action)
cb_set_action_sensitivity (const gchar *name,
GtkAction *action)
{
/* Minor optimization, the action_groups state only affects actions that are
* themselves sensitive */
@@ -435,15 +436,20 @@ cb_set_action_sensitivity (const gchar *name, GtkAction *action)
* Since: 2.4
*/
void
gtk_action_group_set_sensitive (GtkActionGroup *action_group, gboolean sensitive)
gtk_action_group_set_sensitive (GtkActionGroup *action_group,
gboolean sensitive)
{
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
if (action_group->private_data->sensitive ^ sensitive)
sensitive = sensitive != FALSE;
if (action_group->private_data->sensitive != sensitive)
{
action_group->private_data->sensitive = sensitive;
g_hash_table_foreach (action_group->private_data->actions,
(GHFunc) cb_set_action_sensitivity, NULL);
g_object_notify (G_OBJECT (action_group), "sensitive");
}
}
@@ -469,7 +475,8 @@ gtk_action_group_get_visible (GtkActionGroup *action_group)
}
static void
cb_set_action_visiblity (const gchar *name, GtkAction *action)
cb_set_action_visiblity (const gchar *name,
GtkAction *action)
{
/* Minor optimization, the action_groups state only affects actions that are
* themselves sensitive */
@@ -487,15 +494,20 @@ cb_set_action_visiblity (const gchar *name, GtkAction *action)
* Since: 2.4
*/
void
gtk_action_group_set_visible (GtkActionGroup *action_group, gboolean visible)
gtk_action_group_set_visible (GtkActionGroup *action_group,
gboolean visible)
{
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
if (action_group->private_data->visible ^ visible)
visible = visible != FALSE;
if (action_group->private_data->visible != visible)
{
action_group->private_data->visible = visible;
g_hash_table_foreach (action_group->private_data->actions,
(GHFunc) cb_set_action_visiblity, NULL);
g_object_notify (G_OBJECT (action_group), "visible");
}
}
@@ -569,8 +581,8 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
*/
void
gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
GtkAction *action,
const gchar *accelerator)
GtkAction *action,
const gchar *accelerator)
{
gchar *accel_path;
guint accel_key = 0;
@@ -1006,10 +1018,10 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group
* Since: 2.4
**/
void
gtk_action_group_set_translate_func (GtkActionGroup *action_group,
GtkTranslateFunc func,
gpointer data,
GtkDestroyNotify notify)
gtk_action_group_set_translate_func (GtkActionGroup *action_group,
GtkTranslateFunc func,
gpointer data,
GtkDestroyNotify notify)
{
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
@@ -1025,7 +1037,11 @@ static gchar *
dgettext_swapped (const gchar *msgid,
const gchar *domainname)
{
return dgettext (domainname, msgid);
/* Pass through dgettext if and only if msgid is nonempty. */
if (msgid && *msgid)
return dgettext (domainname, msgid);
else
return (gchar*) msgid;
}
/**
@@ -1116,7 +1132,7 @@ _gtk_action_group_emit_pre_activate (GtkActionGroup *action_group,
void
_gtk_action_group_emit_post_activate (GtkActionGroup *action_group,
GtkAction *action)
GtkAction *action)
{
g_signal_emit (action_group, action_group_signals[POST_ACTIVATE], 0, action);
}
+6 -1
View File
@@ -1845,8 +1845,13 @@ void
gtk_button_set_image (GtkButton *button,
GtkWidget *image)
{
GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (button);
GtkButtonPrivate *priv;
g_return_if_fail (GTK_IS_BUTTON (button));
g_return_if_fail (image == NULL || GTK_IS_WIDGET (image));
priv = GTK_BUTTON_GET_PRIVATE (button);
priv->image = image;
priv->image_is_stock = (image == NULL);
+119 -56
View File
@@ -40,6 +40,13 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <glib.h>
#ifdef G_OS_WIN32
#include <windows.h>
#endif
#include <glib/gprintf.h>
#undef GTK_DISABLE_DEPRECATED
@@ -56,46 +63,39 @@
#include "gtkalias.h"
/***************************************************************************/
/* The following date routines are taken from the lib_date package. Keep
* them separate in case we want to update them if a newer lib_date comes
* out with fixes. */
/* The following date routines are taken from the lib_date package.
* They have been minimally edited to avoid conflict with types defined
* in win32 headers.
*/
typedef unsigned int N_int;
typedef unsigned long N_long;
typedef signed long Z_long;
typedef enum { false = FALSE , true = TRUE } boolean;
#define and && /* logical (boolean) operators: lower case */
#define or ||
static const N_int month_length[2][13] =
static const guint month_length[2][13] =
{
{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
static const N_int days_in_months[2][14] =
static const guint days_in_months[2][14] =
{
{ 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
{ 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
};
static Z_long calc_days(N_int year, N_int mm, N_int dd);
static N_int day_of_week(N_int year, N_int mm, N_int dd);
static Z_long dates_difference(N_int year1, N_int mm1, N_int dd1,
N_int year2, N_int mm2, N_int dd2);
static N_int weeks_in_year(N_int year);
static glong calc_days(guint year, guint mm, guint dd);
static guint day_of_week(guint year, guint mm, guint dd);
static glong dates_difference(guint year1, guint mm1, guint dd1,
guint year2, guint mm2, guint dd2);
static guint weeks_in_year(guint year);
static boolean
leap(N_int year)
static gboolean
leap (guint year)
{
return((((year % 4) == 0) and ((year % 100) != 0)) or ((year % 400) == 0));
return((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0));
}
static N_int
day_of_week(N_int year, N_int mm, N_int dd)
static guint
day_of_week (guint year, guint mm, guint dd)
{
Z_long days;
glong days;
days = calc_days(year, mm, dd);
if (days > 0L)
@@ -104,53 +104,53 @@ day_of_week(N_int year, N_int mm, N_int dd)
days %= 7L;
days++;
}
return( (N_int) days );
return( (guint) days );
}
static N_int weeks_in_year(N_int year)
static guint weeks_in_year(guint year)
{
return(52 + ((day_of_week(year,1,1)==4) or (day_of_week(year,12,31)==4)));
return(52 + ((day_of_week(year,1,1)==4) || (day_of_week(year,12,31)==4)));
}
static boolean
check_date(N_int year, N_int mm, N_int dd)
static gboolean
check_date(guint year, guint mm, guint dd)
{
if (year < 1) return(false);
if ((mm < 1) or (mm > 12)) return(false);
if ((dd < 1) or (dd > month_length[leap(year)][mm])) return(false);
return(true);
if (year < 1) return FALSE;
if ((mm < 1) || (mm > 12)) return FALSE;
if ((dd < 1) || (dd > month_length[leap(year)][mm])) return FALSE;
return TRUE;
}
static N_int
week_number(N_int year, N_int mm, N_int dd)
static guint
week_number(guint year, guint mm, guint dd)
{
N_int first;
guint first;
first = day_of_week(year,1,1) - 1;
return( (N_int) ( (dates_difference(year,1,1, year,mm,dd) + first) / 7L ) +
return( (guint) ( (dates_difference(year,1,1, year,mm,dd) + first) / 7L ) +
(first < 4) );
}
static Z_long
year_to_days(N_int year)
static glong
year_to_days(guint year)
{
return( year * 365L + (year / 4) - (year / 100) + (year / 400) );
}
static Z_long
calc_days(N_int year, N_int mm, N_int dd)
static glong
calc_days(guint year, guint mm, guint dd)
{
boolean lp;
gboolean lp;
if (year < 1) return(0L);
if ((mm < 1) or (mm > 12)) return(0L);
if ((dd < 1) or (dd > month_length[(lp = leap(year))][mm])) return(0L);
if ((mm < 1) || (mm > 12)) return(0L);
if ((dd < 1) || (dd > month_length[(lp = leap(year))][mm])) return(0L);
return( year_to_days(--year) + days_in_months[lp][mm] + dd );
}
static boolean
week_of_year(N_int *week, N_int *year, N_int mm, N_int dd)
static gboolean
week_of_year(guint *week, guint *year, guint mm, guint dd)
{
if (check_date(*year,mm,dd))
{
@@ -162,14 +162,14 @@ week_of_year(N_int *week, N_int *year, N_int mm, N_int dd)
*week = 1;
(*year)++;
}
return(true);
return TRUE;
}
return(false);
return FALSE;
}
static Z_long
dates_difference(N_int year1, N_int mm1, N_int dd1,
N_int year2, N_int mm2, N_int dd2)
static glong
dates_difference(guint year1, guint mm1, guint dd1,
guint year2, guint mm2, guint dd2)
{
return( calc_days(year2, mm2, dd2) - calc_days(year1, mm1, dd1) );
}
@@ -562,11 +562,22 @@ gtk_calendar_init (GtkCalendar *calendar)
struct tm *tm;
gint i;
char buffer[255];
#ifdef G_OS_WIN32
wchar_t wbuffer[100];
#else
time_t tmp_time;
#endif
GtkCalendarPrivate *priv;
gchar *year_before;
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
gchar *langinfo;
gint week_1stday = 0;
gint first_weekday = 1;
guint week_origin;
#else
gchar *week_start;
#endif
priv = calendar->priv = G_TYPE_INSTANCE_GET_PRIVATE (calendar,
GTK_TYPE_CALENDAR,
GtkCalendarPrivate);
@@ -576,17 +587,57 @@ gtk_calendar_init (GtkCalendar *calendar)
if (!default_abbreviated_dayname[0])
for (i=0; i<7; i++)
{
#ifndef G_OS_WIN32
tmp_time= (i+3)*86400;
strftime ( buffer, sizeof (buffer), "%a", gmtime (&tmp_time));
default_abbreviated_dayname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
#else
if (G_WIN32_HAVE_WIDECHAR_API ())
{
if (!GetLocaleInfoW (GetThreadLocale (), LOCALE_SABBREVDAYNAME1 + (i+6)%7,
wbuffer, G_N_ELEMENTS (wbuffer)))
default_abbreviated_dayname[i] = g_strdup_printf ("(%d)", i);
else
default_abbreviated_dayname[i] = g_utf16_to_utf8 (wbuffer, -1, NULL, NULL, NULL);
}
else
{
if (!GetLocaleInfoA (GetThreadLocale (),
(LOCALE_SABBREVDAYNAME1 + (i+6)%7) | LOCALE_USE_CP_ACP,
buffer, G_N_ELEMENTS (buffer)))
default_abbreviated_dayname[i] = g_strdup_printf ("(%d)", i);
else
default_abbreviated_dayname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
}
#endif
}
if (!default_monthname[0])
for (i=0; i<12; i++)
{
#ifndef G_OS_WIN32
tmp_time=i*2764800;
strftime ( buffer, sizeof (buffer), "%B", gmtime (&tmp_time));
default_monthname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
#else
if (G_WIN32_HAVE_WIDECHAR_API ())
{
if (!GetLocaleInfoW (GetThreadLocale (), LOCALE_SMONTHNAME1 + i,
wbuffer, G_N_ELEMENTS (wbuffer)))
default_monthname[i] = g_strdup_printf ("(%d)", i);
else
default_monthname[i] = g_utf16_to_utf8 (wbuffer, -1, NULL, NULL, NULL);
}
else
{
if (!GetLocaleInfoA (GetThreadLocale (),
(LOCALE_SMONTHNAME1 + i) | LOCALE_USE_CP_ACP,
buffer, G_N_ELEMENTS (buffer)))
default_monthname[i] = g_strdup_printf ("(%d)", i);
else
default_monthname[i] = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
}
#endif
}
/* Set defaults */
@@ -595,8 +646,6 @@ gtk_calendar_init (GtkCalendar *calendar)
calendar->month = tm->tm_mon;
calendar->year = 1900 + tm->tm_year;
calendar_compute_days (calendar);
for (i=0;i<31;i++)
calendar->marked_date[i] = FALSE;
calendar->num_marked_dates = 0;
@@ -651,8 +700,18 @@ gtk_calendar_init (GtkCalendar *calendar)
g_warning ("Whoever translated calendar:MY did so wrongly.\n");
#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
week_start = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
priv->week_start = *((unsigned char *) week_start) % 7 - 1;
langinfo = nl_langinfo (_NL_TIME_FIRST_WEEKDAY);
first_weekday = langinfo[0];
langinfo = nl_langinfo (_NL_TIME_WEEK_1STDAY);
week_origin = GPOINTER_TO_INT (langinfo);
if (week_origin == 19971130) /* Sunday */
week_1stday = 0;
else if (week_origin == 19971201) /* Monday */
week_1stday = 1;
else
g_warning ("Unknown value of _NL_TIME_WEEK_1STDAY.\n");
priv->week_start = (week_1stday + first_weekday - 1) % 7;
#else
/* Translate to calendar:week_start:0 if you want Sunday to be the
* first day of the week to calendar:week_start:1 if you want Monday
@@ -671,6 +730,8 @@ gtk_calendar_init (GtkCalendar *calendar)
priv->week_start = 0;
}
#endif
calendar_compute_days (calendar);
}
@@ -2846,6 +2907,8 @@ gtk_calendar_focus_out (GtkWidget *widget,
{
GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (widget);
gtk_widget_queue_draw (widget);
calendar_stop_spinning (GTK_CALENDAR (widget));
priv->in_drag = 0;
+64 -31
View File
@@ -238,6 +238,10 @@ gtk_cell_renderer_pixbuf_finalize (GObject *object)
if (cellpixbuf->pixbuf)
g_object_unref (cellpixbuf->pixbuf);
if (cellpixbuf->pixbuf_expander_open)
g_object_unref (cellpixbuf->pixbuf_expander_open);
if (cellpixbuf->pixbuf_expander_closed)
g_object_unref (cellpixbuf->pixbuf_expander_closed);
g_free (priv->stock_id);
g_free (priv->stock_detail);
@@ -260,16 +264,13 @@ gtk_cell_renderer_pixbuf_get_property (GObject *object,
switch (param_id)
{
case PROP_PIXBUF:
g_value_set_object (value,
cellpixbuf->pixbuf ? G_OBJECT (cellpixbuf->pixbuf) : NULL);
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf));
break;
case PROP_PIXBUF_EXPANDER_OPEN:
g_value_set_object (value,
cellpixbuf->pixbuf_expander_open ? G_OBJECT (cellpixbuf->pixbuf_expander_open) : NULL);
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf_expander_open));
break;
case PROP_PIXBUF_EXPANDER_CLOSED:
g_value_set_object (value,
cellpixbuf->pixbuf_expander_closed ? G_OBJECT (cellpixbuf->pixbuf_expander_closed) : NULL);
g_value_set_object (value, G_OBJECT (cellpixbuf->pixbuf_expander_closed));
break;
case PROP_STOCK_ID:
g_value_set_string (value, priv->stock_id);
@@ -299,7 +300,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GdkPixbuf *pixbuf;
GtkCellRendererPixbuf *cellpixbuf = GTK_CELL_RENDERER_PIXBUF (object);
GtkCellRendererPixbufPrivate *priv;
@@ -308,28 +308,34 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
switch (param_id)
{
case PROP_PIXBUF:
pixbuf = (GdkPixbuf*) g_value_get_object (value);
if (pixbuf)
g_object_ref (pixbuf);
if (cellpixbuf->pixbuf)
g_object_unref (cellpixbuf->pixbuf);
cellpixbuf->pixbuf = pixbuf;
cellpixbuf->pixbuf = (GdkPixbuf*) g_value_dup_object (value);
if (cellpixbuf->pixbuf)
{
if (priv->stock_id)
{
g_free (priv->stock_id);
priv->stock_id = NULL;
g_object_notify (object, "stock-id");
}
if (priv->icon_name)
{
g_free (priv->icon_name);
priv->icon_name = NULL;
g_object_notify (object, "icon-name");
}
}
break;
case PROP_PIXBUF_EXPANDER_OPEN:
pixbuf = (GdkPixbuf*) g_value_get_object (value);
if (pixbuf)
g_object_ref (pixbuf);
if (cellpixbuf->pixbuf_expander_open)
g_object_unref (cellpixbuf->pixbuf_expander_open);
cellpixbuf->pixbuf_expander_open = pixbuf;
cellpixbuf->pixbuf_expander_open = (GdkPixbuf*) g_value_dup_object (value);
break;
case PROP_PIXBUF_EXPANDER_CLOSED:
pixbuf = (GdkPixbuf*) g_value_get_object (value);
if (pixbuf)
g_object_ref (pixbuf);
if (cellpixbuf->pixbuf_expander_closed)
g_object_unref (cellpixbuf->pixbuf_expander_closed);
cellpixbuf->pixbuf_expander_closed = pixbuf;
cellpixbuf->pixbuf_expander_closed = (GdkPixbuf*) g_value_dup_object (value);
break;
case PROP_STOCK_ID:
if (priv->stock_id)
@@ -338,12 +344,26 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
{
g_object_unref (cellpixbuf->pixbuf);
cellpixbuf->pixbuf = NULL;
g_object_notify (object, "pixbuf");
}
g_free (priv->stock_id);
g_free (priv->icon_name);
priv->icon_name = NULL;
}
priv->stock_id = g_strdup (g_value_get_string (value));
priv->stock_id = g_value_dup_string (value);
if (priv->stock_id)
{
if (cellpixbuf->pixbuf)
{
g_object_unref (cellpixbuf->pixbuf);
cellpixbuf->pixbuf = NULL;
g_object_notify (object, "pixbuf");
}
if (priv->icon_name)
{
g_free (priv->icon_name);
priv->icon_name = NULL;
g_object_notify (object, "icon-name");
}
}
break;
case PROP_STOCK_SIZE:
priv->stock_size = g_value_get_uint (value);
@@ -351,7 +371,7 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
case PROP_STOCK_DETAIL:
if (priv->stock_detail)
g_free (priv->stock_detail);
priv->stock_detail = g_strdup (g_value_get_string (value));
priv->stock_detail = g_value_dup_string (value);
break;
case PROP_ICON_NAME:
if (priv->icon_name)
@@ -360,11 +380,26 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
{
g_object_unref (cellpixbuf->pixbuf);
cellpixbuf->pixbuf = NULL;
g_object_notify (object, "pixbuf");
}
g_free (priv->stock_id);
g_free (priv->icon_name);
}
priv->icon_name = g_strdup (g_value_get_string (value));
priv->icon_name = g_value_dup_string (value);
if (priv->icon_name)
{
if (cellpixbuf->pixbuf)
{
g_object_unref (cellpixbuf->pixbuf);
cellpixbuf->pixbuf = NULL;
g_object_notify (object, "pixbuf");
}
if (priv->stock_id)
{
g_free (priv->stock_id);
priv->stock_id = NULL;
g_object_notify (object, "stock-id");
}
}
break;
case PROP_FOLLOW_STATE:
priv->follow_state = g_value_get_boolean (value);
@@ -373,12 +408,6 @@ gtk_cell_renderer_pixbuf_set_property (GObject *object,
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
break;
}
if (cellpixbuf->pixbuf && priv->stock_id)
{
g_object_unref (cellpixbuf->pixbuf);
cellpixbuf->pixbuf = NULL;
}
}
/**
@@ -415,6 +444,8 @@ gtk_cell_renderer_pixbuf_create_stock_pixbuf (GtkCellRendererPixbuf *cellpixbuf,
priv->stock_id,
priv->stock_size,
priv->stock_detail);
g_object_notify (G_OBJECT (cellpixbuf), "pixbuf");
}
static void
@@ -454,6 +485,8 @@ gtk_cell_renderer_pixbuf_create_named_icon_pixbuf (GtkCellRendererPixbuf *cellpi
g_warning ("could not load image: %s\n", error->message);
g_error_free (error);
}
g_object_notify (G_OBJECT (cellpixbuf), "pixbuf");
}
static GdkPixbuf *
+3 -3
View File
@@ -1822,9 +1822,9 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
"editing_done",
G_CALLBACK (gtk_cell_renderer_text_editing_done),
celltext);
priv->focus_out_id = g_signal_connect (priv->entry, "focus_out_event",
G_CALLBACK (gtk_cell_renderer_text_focus_out_event),
celltext);
priv->focus_out_id = g_signal_connect_after (priv->entry, "focus_out_event",
G_CALLBACK (gtk_cell_renderer_text_focus_out_event),
celltext);
priv->populate_popup_id =
g_signal_connect (priv->entry, "populate_popup",
G_CALLBACK (gtk_cell_renderer_text_populate_popup),
+2 -1
View File
@@ -1032,7 +1032,8 @@ request_image_received_func (GtkClipboard *clipboard,
info->callback (clipboard, result, info->user_data);
g_free (info);
g_object_unref (result);
if (result)
g_object_unref (result);
}
/**
+6 -6
View File
@@ -4439,8 +4439,8 @@ gtk_clist_finalize (GObject *object)
columns_delete (clist);
g_mem_chunk_destroy (clist->cell_mem_chunk);
g_mem_chunk_destroy (clist->row_mem_chunk);
g_mem_chunk_destroy ((GMemChunk *)clist->cell_mem_chunk);
g_mem_chunk_destroy ((GMemChunk *)clist->row_mem_chunk);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -6375,8 +6375,8 @@ row_new (GtkCList *clist)
int i;
GtkCListRow *clist_row;
clist_row = g_chunk_new (GtkCListRow, clist->row_mem_chunk);
clist_row->cell = g_chunk_new (GtkCell, clist->cell_mem_chunk);
clist_row = g_chunk_new (GtkCListRow, (GMemChunk *)clist->row_mem_chunk);
clist_row->cell = g_chunk_new (GtkCell, (GMemChunk *)clist->cell_mem_chunk);
for (i = 0; i < clist->columns; i++)
{
@@ -6425,8 +6425,8 @@ row_delete (GtkCList *clist,
if (clist_row->destroy)
clist_row->destroy (clist_row->data);
g_mem_chunk_free (clist->cell_mem_chunk, clist_row->cell);
g_mem_chunk_free (clist->row_mem_chunk, clist_row);
g_mem_chunk_free ((GMemChunk *)clist->cell_mem_chunk, clist_row->cell);
g_mem_chunk_free ((GMemChunk *)clist->row_mem_chunk, clist_row);
}
/* FOCUS FUNCTIONS
+2 -2
View File
@@ -152,8 +152,8 @@ struct _GtkCList
guint16 flags;
/* mem chunks */
GMemChunk *row_mem_chunk;
GMemChunk *cell_mem_chunk;
gpointer row_mem_chunk;
gpointer cell_mem_chunk;
guint freeze_count;
+17 -2
View File
@@ -103,6 +103,7 @@ static void gtk_color_button_get_property (GObject *object,
/* gtkwidget signals */
static void gtk_color_button_realize (GtkWidget *widget);
static void gtk_color_button_unrealize (GtkWidget *widget);
static void gtk_color_button_state_changed (GtkWidget *widget,
GtkStateType previous_state);
static void gtk_color_button_style_set (GtkWidget *widget,
@@ -186,6 +187,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
gobject_class->finalize = gtk_color_button_finalize;
widget_class->state_changed = gtk_color_button_state_changed;
widget_class->realize = gtk_color_button_realize;
widget_class->unrealize = gtk_color_button_unrealize;
widget_class->style_set = gtk_color_button_style_set;
button_class->clicked = gtk_color_button_clicked;
klass->color_set = NULL;
@@ -408,12 +410,23 @@ gtk_color_button_realize (GtkWidget *widget)
GTK_WIDGET_CLASS (parent_class)->realize (widget);
if (color_button->priv->gc == NULL)
color_button->priv->gc = gdk_gc_new (widget->window);
color_button->priv->gc = gdk_gc_new (widget->window);
render (color_button);
}
static void
gtk_color_button_unrealize (GtkWidget *widget)
{
GtkColorButton *color_button = GTK_COLOR_BUTTON (widget);
g_object_unref (color_button->priv->gc);
color_button->priv->gc = NULL;
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
static void
gtk_color_button_style_set (GtkWidget *widget,
GtkStyle *previous_style)
@@ -567,6 +580,8 @@ gtk_color_button_init (GtkColorButton *color_button)
layout = gtk_widget_create_pango_layout (GTK_WIDGET (color_button), "Black");
pango_layout_get_pixel_extents (layout, NULL, &rect);
g_object_unref (layout);
gtk_widget_set_size_request (color_button->priv->draw_area, rect.width - 2, rect.height - 2);
g_signal_connect (color_button->priv->draw_area, "expose-event",
G_CALLBACK (expose_event), color_button);
+11 -7
View File
@@ -525,10 +525,12 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
* GtkComboBox::changed:
* @widget: the object which received the signal
*
* The changed signal gets emitted when the active
* The changed signal is emitted when the active
* item is changed. The can be due to the user selecting
* a different item from the list, or due to a
* call to gtk_combo_box_set_active_iter().
* It will also be emitted while typing into a GtkComboBoxEntry,
* as well as when selecting an item from the GtkComboBoxEntry's list.
*
* Since: 2.4
*/
@@ -736,6 +738,8 @@ gtk_combo_box_init (GtkComboBox *combo_box)
combo_box->priv->editing_canceled = FALSE;
combo_box->priv->auto_scroll = FALSE;
combo_box->priv->focus_on_click = TRUE;
gtk_combo_box_check_appearance (combo_box);
}
static void
@@ -1777,9 +1781,7 @@ gtk_combo_box_size_request (GtkWidget *widget,
GtkRequisition bin_req;
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
gtk_combo_box_check_appearance (combo_box);
/* common */
gtk_widget_size_request (GTK_BIN (widget)->child, &bin_req);
gtk_combo_box_remeasure (combo_box);
@@ -1872,8 +1874,6 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
GtkRequisition req;
gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
gtk_combo_box_check_appearance (combo_box);
widget->allocation = *allocation;
gtk_widget_style_get (GTK_WIDGET (widget),
@@ -3495,6 +3495,9 @@ gtk_combo_box_key_press (GtkWidget *widget,
return TRUE;
}
if (state != 0)
return FALSE;
switch (event->keyval)
{
case GDK_Down:
@@ -4457,7 +4460,8 @@ gtk_combo_box_set_active_internal (GtkComboBox *combo_box,
path);
}
g_signal_emit_by_name (combo_box, "changed", NULL, NULL);
g_signal_emit (combo_box, combo_box_signals[CHANGED], 0);
g_object_notify (G_OBJECT (combo_box), "active");
}
+15 -12
View File
@@ -1710,10 +1710,8 @@ up_down_compare (gconstpointer a,
CompareInfo *compare = data;
gint y1, y2;
if (!get_allocation_coords (compare->container, (GtkWidget *)a, &allocation1))
return 0;
if (!get_allocation_coords (compare->container, (GtkWidget *)b, &allocation2))
return 0;
get_allocation_coords (compare->container, (GtkWidget *)a, &allocation1);
get_allocation_coords (compare->container, (GtkWidget *)b, &allocation2);
y1 = allocation1.y + allocation1.height / 2;
y2 = allocation2.y + allocation2.height / 2;
@@ -1839,10 +1837,8 @@ left_right_compare (gconstpointer a,
CompareInfo *compare = data;
gint x1, x2;
if (!get_allocation_coords (compare->container, (GtkWidget *)a, &allocation1))
return 0;
if (!get_allocation_coords (compare->container, (GtkWidget *)b, &allocation2))
return 0;
get_allocation_coords (compare->container, (GtkWidget *)a, &allocation1);
get_allocation_coords (compare->container, (GtkWidget *)b, &allocation2);
x1 = allocation1.x + allocation1.width / 2;
x2 = allocation2.x + allocation2.width / 2;
@@ -1983,19 +1979,26 @@ _gtk_container_focus_sort (GtkContainer *container,
GtkDirectionType direction,
GtkWidget *old_focus)
{
children = g_list_copy (children);
GList *visible_children = NULL;
while (children)
{
if (GTK_WIDGET_REALIZED (children->data))
visible_children = g_list_prepend (visible_children, children->data);
children = children->next;
}
switch (direction)
{
case GTK_DIR_TAB_FORWARD:
case GTK_DIR_TAB_BACKWARD:
return gtk_container_focus_sort_tab (container, children, direction, old_focus);
return gtk_container_focus_sort_tab (container, visible_children, direction, old_focus);
case GTK_DIR_UP:
case GTK_DIR_DOWN:
return gtk_container_focus_sort_up_down (container, children, direction, old_focus);
return gtk_container_focus_sort_up_down (container, visible_children, direction, old_focus);
case GTK_DIR_LEFT:
case GTK_DIR_RIGHT:
return gtk_container_focus_sort_left_right (container, children, direction, old_focus);
return gtk_container_focus_sort_left_right (container, visible_children, direction, old_focus);
}
g_assert_not_reached ();

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