Compare commits

...

266 Commits

Author SHA1 Message Date
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
304 changed files with 64416 additions and 44935 deletions
+1126
View File
File diff suppressed because it is too large Load Diff
+1126
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.8.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.8.8 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]
+151
View File
@@ -1,3 +1,154 @@
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.8. 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.
+8 -5
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], [8])
m4_define([gtk_version],
[gtk_major_version.gtk_minor_version.gtk_micro_version])
m4_define([gtk_interface_age], [2])
m4_define([gtk_interface_age], [8])
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
@@ -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@ije sr@Latn sv ta te th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
@@ -1388,9 +1388,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
+35
View File
@@ -1,3 +1,38 @@
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
-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;
}
+47
View File
@@ -1,3 +1,50 @@
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>
+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>
+69 -16
View File
@@ -204,15 +204,27 @@ 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>;
<keycap>/</keycap>
</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 +239,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 +254,7 @@ binding "my-own-gtkfilechooser-bindings" {
"down-folder" ()
}
bind "&lt;Alt&gt;&lt;Shift&gt;Home" {
"home-folder-folder" ()
"home-folder" ()
}
}
@@ -257,14 +267,22 @@ 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.
</para>
<variablelist role="params">
@@ -276,6 +294,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 +311,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 +348,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 +389,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 +424,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">
+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 ##### -->
+1
View File
@@ -510,5 +510,6 @@ modified directly.
</para>
@values:
@Returns:
+43
View File
@@ -1,3 +1,46 @@
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
@@ -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;
+5 -2
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,
+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
@@ -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.
**/
+4
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);
}
+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;
}
+1 -1
View File
@@ -2450,7 +2450,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)
+16 -14
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;
@@ -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)
@@ -2757,15 +2768,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 +2776,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;
+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:
+8 -10
View File
@@ -356,9 +356,6 @@ HRGN _gdk_win32_gdkregion_to_hrgn (GdkRegion *region,
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 +469,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 +487,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);
+5 -3
View File
@@ -446,7 +446,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 +482,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++;
+1 -1
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 },
+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 -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)
+28 -4
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)
+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))
+3 -6
View File
@@ -7,17 +7,14 @@ DEVZIP=/tmp/gtk+-dev-@GTK_VERSION@-`date +%Y%m%d`.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
+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@\" */" \
+4 -2
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);
@@ -506,7 +506,9 @@ gtk_about_dialog_init (GtkAboutDialog *about)
gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CLOSE);
/* 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);
+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)
+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);
+73 -5
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
@@ -562,11 +569,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 +594,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 +653,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 +707,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 +737,8 @@ gtk_calendar_init (GtkCalendar *calendar)
priv->week_start = 0;
}
#endif
calendar_compute_days (calendar);
}
+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);
}
/**
+2
View File
@@ -567,6 +567,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);
+5 -1
View File
@@ -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");
}
+2 -2
View File
@@ -609,7 +609,7 @@ gtk_drag_get_cursor (GdkDisplay *display,
if (!cursor_pixbuf)
{
cursor_pixbuf = g_object_ref (drag_cursors[i].pixbuf);
icon_anchor = GTK_ANCHOR_NORTH;
icon_anchor = GTK_ANCHOR_NORTH_WEST;
icon_x = icon_y = -2;
}
else
@@ -3011,7 +3011,7 @@ gtk_drag_set_icon_pixmap (GdkDragContext *context,
* @hot_x: the X offset of the hotspot within the icon
* @hot_y: the Y offset of the hotspot within the icon
*
* Sets the icon for the window from a named themed icon. See
* Sets the icon for a given drag from a named themed icon. See
* the docs for #GtkIconTheme for more details. Note that the
* size of the icon depends on the icon theme (the icon is
* loaded at the symbolic size #GTK_ICON_SIZE_DND), thus
+57 -13
View File
@@ -37,6 +37,7 @@
#include "gtkdnd.h"
#include "gtkentry.h"
#include "gtkimagemenuitem.h"
#include "gtkimcontextsimple.h"
#include "gtkimmulticontext.h"
#include "gtkintl.h"
#include "gtkmain.h"
@@ -1049,6 +1050,18 @@ gtk_entry_destroy (GtkObject *object)
gtk_entry_reset_im_context (entry);
gtk_entry_reset_layout (entry);
if (entry->blink_timeout)
{
g_source_remove (entry->blink_timeout);
entry->blink_timeout = 0;
}
if (entry->recompute_idle)
{
g_source_remove (entry->recompute_idle);
entry->recompute_idle = 0;
}
if (!entry->visible)
{
/* We want to trash the text here because the entry might be leaked. */
@@ -3938,9 +3951,37 @@ gtk_entry_set_visibility (GtkEntry *entry,
{
g_return_if_fail (GTK_IS_ENTRY (entry));
entry->visible = visible ? TRUE : FALSE;
g_object_notify (G_OBJECT (entry), "visibility");
gtk_entry_recompute (entry);
visible = visible != FALSE;
if (entry->visible != visible)
{
if (GTK_WIDGET_HAS_FOCUS (entry) && !visible)
gtk_im_context_focus_out (entry->im_context);
g_object_unref (entry->im_context);
if (visible)
entry->im_context = gtk_im_multicontext_new ();
else
entry->im_context = gtk_im_context_simple_new ();
g_signal_connect (entry->im_context, "commit",
G_CALLBACK (gtk_entry_commit_cb), entry);
g_signal_connect (entry->im_context, "preedit_changed",
G_CALLBACK (gtk_entry_preedit_changed_cb), entry);
g_signal_connect (entry->im_context, "retrieve_surrounding",
G_CALLBACK (gtk_entry_retrieve_surrounding_cb), entry);
g_signal_connect (entry->im_context, "delete_surrounding",
G_CALLBACK (gtk_entry_delete_surrounding_cb), entry);
if (GTK_WIDGET_HAS_FOCUS (entry) && visible)
gtk_im_context_focus_in (entry->im_context);
entry->visible = visible;
g_object_notify (G_OBJECT (entry), "visibility");
gtk_entry_recompute (entry);
}
}
/**
@@ -4566,18 +4607,21 @@ popup_targets_received (GtkClipboard *clipboard,
menuitem = gtk_separator_menu_item_new ();
gtk_widget_show (menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
if (entry->visible)
{
menuitem = gtk_menu_item_new_with_mnemonic (_("Input _Methods"));
gtk_widget_set_sensitive (menuitem, entry->editable);
gtk_widget_show (menuitem);
submenu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
menuitem = gtk_menu_item_new_with_mnemonic (_("Input _Methods"));
gtk_widget_set_sensitive (menuitem, entry->editable);
gtk_widget_show (menuitem);
submenu = gtk_menu_new ();
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
gtk_im_multicontext_append_menuitems (GTK_IM_MULTICONTEXT (entry->im_context),
GTK_MENU_SHELL (submenu));
gtk_menu_shell_append (GTK_MENU_SHELL (entry->popup_menu), menuitem);
gtk_im_multicontext_append_menuitems (GTK_IM_MULTICONTEXT (entry->im_context),
GTK_MENU_SHELL (submenu));
}
menuitem = gtk_menu_item_new_with_mnemonic (_("_Insert Unicode Control Character"));
gtk_widget_show (menuitem);
+12 -2
View File
@@ -1387,7 +1387,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
else if (x + popup_req.width > monitor.x + monitor.width)
x = monitor.x + monitor.width - popup_req.width;
if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height)
if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height ||
y - monitor.y < (monitor.y + monitor.height) - (y + entry_req.height))
{
y += entry_req.height;
above = FALSE;
@@ -1416,6 +1417,7 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
{
GtkTreeViewColumn *column;
GList *renderers;
GtkWidget *toplevel;
if (GTK_WIDGET_MAPPED (completion->priv->popup_window))
return;
@@ -1423,6 +1425,9 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
if (!GTK_WIDGET_MAPPED (completion->priv->entry))
return;
if (!GTK_WIDGET_HAS_FOCUS (completion->priv->entry))
return;
completion->priv->ignore_enter = TRUE;
column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0);
@@ -1437,6 +1442,11 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion)
_gtk_entry_completion_resize_popup (completion);
toplevel = gtk_widget_get_toplevel (completion->priv->entry);
if (GTK_IS_WINDOW (toplevel))
gtk_window_group_add_window (_gtk_window_get_group (GTK_WINDOW (toplevel)),
GTK_WINDOW (completion->priv->popup_window));
gtk_widget_show (completion->priv->popup_window);
gtk_grab_add (completion->priv->popup_window);
@@ -1552,7 +1562,7 @@ gtk_entry_completion_real_insert_prefix (GtkEntryCompletion *completion,
gint pos = prefix_len;
gtk_editable_insert_text (GTK_EDITABLE (completion->priv->entry),
prefix + key_len, -1, &pos);
prefix + strlen (key), -1, &pos);
gtk_editable_select_region (GTK_EDITABLE (completion->priv->entry),
key_len, prefix_len);
+19 -6
View File
@@ -260,7 +260,16 @@ gtk_file_chooser_class_init (gpointer g_iface)
P_("Whether the hidden files and folders should be displayed"),
FALSE,
GTK_PARAM_READWRITE));
/**
* GtkFileChooser:do-overwrite-confirmation:
*
* Whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE
* will present an overwrite confirmation dialog if the user
* selects a file name that already exists.
*
* Since: 2.8
*/
g_object_interface_install_property (g_iface,
g_param_spec_boolean ("do-overwrite-confirmation",
P_("Do overwrite confirmation"),
@@ -691,9 +700,11 @@ gtk_file_chooser_set_current_folder (GtkFileChooser *chooser,
* Gets the current folder of @chooser as a local filename.
* See gtk_file_chooser_set_current_folder().
*
* Return value: the full path of the current folder, or %NULL
* if the current path cannot be represented as a local filename.
* Free with g_free().
* Return value: the full path of the current folder, or %NULL if the current
* path cannot be represented as a local filename. Free with g_free(). This
* function will also return %NULL if the file chooser was unable to load the
* last folder that was requested from it; for example, as would be for calling
* gtk_file_chooser_set_current_folder() on a nonexistent folder.
*
* Since: 2.4
**/
@@ -1010,8 +1021,10 @@ gtk_file_chooser_set_current_folder_uri (GtkFileChooser *chooser,
* Gets the current folder of @chooser as an URI.
* See gtk_file_chooser_set_current_folder_uri().
*
* Return value: the URI for the current folder.
* Free with g_free().
* Return value: the URI for the current folder. Free with g_free(). This
* function will also return %NULL if the file chooser was unable to load the
* last folder that was requested from it; for example, as would be for calling
* gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
*
* Since: 2.4
*/
+59 -5
View File
@@ -155,6 +155,9 @@ struct _GtkFileChooserButtonPrivate
/* Used for hiding/showing the dialog when the button is hidden */
guint8 active : 1;
/* Used to track whether we need to set a default current folder on ::map() */
guint8 folder_has_been_set : 1;
};
@@ -211,6 +214,7 @@ static void gtk_file_chooser_button_show_all (GtkWidget *wi
static void gtk_file_chooser_button_hide_all (GtkWidget *widget);
static void gtk_file_chooser_button_show (GtkWidget *widget);
static void gtk_file_chooser_button_hide (GtkWidget *widget);
static void gtk_file_chooser_button_map (GtkWidget *widget);
static gboolean gtk_file_chooser_button_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
static void gtk_file_chooser_button_style_set (GtkWidget *widget,
@@ -322,6 +326,7 @@ gtk_file_chooser_button_class_init (GtkFileChooserButtonClass * class)
widget_class->hide_all = gtk_file_chooser_button_hide_all;
widget_class->show = gtk_file_chooser_button_show;
widget_class->hide = gtk_file_chooser_button_hide;
widget_class->map = gtk_file_chooser_button_map;
widget_class->style_set = gtk_file_chooser_button_style_set;
widget_class->screen_changed = gtk_file_chooser_button_screen_changed;
widget_class->mnemonic_activate = gtk_file_chooser_button_mnemonic_activate;
@@ -593,6 +598,7 @@ gtk_file_chooser_button_constructor (GType type,
GObject *object;
GtkFileChooserButtonPrivate *priv;
GSList *list;
char *current_folder;
object = (*G_OBJECT_CLASS (gtk_file_chooser_button_parent_class)->constructor) (type,
n_params,
@@ -627,6 +633,13 @@ gtk_file_chooser_button_constructor (GType type,
-1);
}
current_folder = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (priv->dialog));
if (current_folder != NULL)
{
priv->folder_has_been_set = TRUE;
g_free (current_folder);
}
g_free (priv->backend);
priv->backend = NULL;
@@ -1013,6 +1026,28 @@ gtk_file_chooser_button_hide (GtkWidget *widget)
(*GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->hide) (widget);
}
static void
gtk_file_chooser_button_map (GtkWidget *widget)
{
GtkFileChooserButtonPrivate *priv;
priv = GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE (widget);
if (!priv->folder_has_been_set)
{
char *current_working_dir;
current_working_dir = g_get_current_dir ();
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (widget), current_working_dir);
g_free (current_working_dir);
priv->folder_has_been_set = TRUE;
}
if (GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map)
(*GTK_WIDGET_CLASS (gtk_file_chooser_button_parent_class)->map) (widget);
}
static gboolean
gtk_file_chooser_button_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling)
@@ -1959,10 +1994,21 @@ open_dialog (GtkFileChooserButton *button)
if (GTK_WIDGET_TOPLEVEL (toplevel) && GTK_IS_WINDOW (toplevel))
{
if (GTK_WINDOW (toplevel) != gtk_window_get_transient_for (GTK_WINDOW (priv->dialog)))
gtk_window_set_transient_for (GTK_WINDOW (priv->dialog),
GTK_WINDOW (toplevel));
GtkWindow *transient_parent = gtk_window_get_transient_for (GTK_WINDOW (priv->dialog));
if (GTK_WINDOW (toplevel) != transient_parent)
{
if (transient_parent && transient_parent->group)
gtk_window_group_remove_window (transient_parent->group,
GTK_WINDOW (priv->dialog));
gtk_window_set_transient_for (GTK_WINDOW (priv->dialog),
GTK_WINDOW (toplevel));
if (GTK_WINDOW (toplevel)->group)
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
GTK_WINDOW (priv->dialog));
}
gtk_window_set_modal (GTK_WINDOW (priv->dialog),
gtk_window_get_modal (GTK_WINDOW (toplevel)));
}
@@ -2064,7 +2110,15 @@ static void
dialog_current_folder_changed_cb (GtkFileChooser *dialog,
gpointer user_data)
{
g_signal_emit_by_name (user_data, "current-folder-changed");
GtkFileChooserButton *button;
GtkFileChooserButtonPrivate *priv;
button = GTK_FILE_CHOOSER_BUTTON (user_data);
priv = GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE (button);
priv->folder_has_been_set = TRUE;
g_signal_emit_by_name (button, "current-folder-changed");
}
static void
@@ -2267,7 +2321,7 @@ gtk_file_chooser_button_new_with_backend (const gchar *title,
*
* Creates a #GtkFileChooserButton widget which uses @dialog as it's
* file-picking window. Note that @dialog must be a #GtkFileChooserDialog (or
* subclass).
* subclass) and must not have %GTK_DIALOG_DESTROY_WITH_PARENT set.
*
* Returns: a new button widget.
*
+164 -34
View File
@@ -83,7 +83,7 @@
/* Profiling stuff */
#define PROFILE_FILE_CHOOSER
#undef PROFILE_FILE_CHOOSER
#ifdef PROFILE_FILE_CHOOSER
#ifdef HAVE_UNISTD_H
@@ -152,6 +152,12 @@ typedef enum {
LOAD_FINISHED /* Model is fully loaded and inserted into the tree */
} LoadState;
typedef enum {
RELOAD_EMPTY, /* No folder has been set */
RELOAD_HAS_FOLDER, /* We have a folder, although it may not be completely loaded yet; no need to reload */
RELOAD_WAS_UNMAPPED /* We had a folder but got unmapped; reload is needed */
} ReloadState;
#define MAX_LOADING_TIME 500
struct _GtkFileChooserDefaultClass
@@ -206,6 +212,7 @@ struct _GtkFileChooserDefault
GtkTreeModelSort *sort_model;
LoadState load_state;
ReloadState reload_state;
guint load_timeout_id;
GSList *pending_select_paths;
@@ -373,6 +380,7 @@ static void gtk_file_chooser_default_get_property (GObject *ob
static void gtk_file_chooser_default_dispose (GObject *object);
static void gtk_file_chooser_default_show_all (GtkWidget *widget);
static void gtk_file_chooser_default_map (GtkWidget *widget);
static void gtk_file_chooser_default_unmap (GtkWidget *widget);
static void gtk_file_chooser_default_hierarchy_changed (GtkWidget *widget,
GtkWidget *previous_toplevel);
static void gtk_file_chooser_default_style_set (GtkWidget *widget,
@@ -480,6 +488,7 @@ static void select_func (GtkFileSystemModel *model,
static void path_bar_clicked (GtkPathBar *path_bar,
GtkFilePath *file_path,
GtkFilePath *child_path,
gboolean child_is_hidden,
GtkFileChooserDefault *impl);
@@ -615,6 +624,7 @@ gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
widget_class->show_all = gtk_file_chooser_default_show_all;
widget_class->map = gtk_file_chooser_default_map;
widget_class->unmap = gtk_file_chooser_default_unmap;
widget_class->hierarchy_changed = gtk_file_chooser_default_hierarchy_changed;
widget_class->style_set = gtk_file_chooser_default_style_set;
widget_class->screen_changed = gtk_file_chooser_default_screen_changed;
@@ -745,6 +755,7 @@ gtk_file_chooser_default_init (GtkFileChooserDefault *impl)
impl->show_hidden = FALSE;
impl->icon_size = FALLBACK_ICON_SIZE;
impl->load_state = LOAD_EMPTY;
impl->reload_state = RELOAD_EMPTY;
impl->pending_select_paths = NULL;
gtk_box_set_spacing (GTK_BOX (impl), 12);
@@ -1420,7 +1431,7 @@ shortcuts_append_home (GtkFileChooserDefault *impl)
home_path = gtk_file_system_filename_to_path (impl->file_system, home);
error = NULL;
impl->has_home = shortcuts_insert_path (impl, -1, FALSE, NULL, home_path, _("Home"), FALSE, &error);
impl->has_home = shortcuts_insert_path (impl, -1, FALSE, NULL, home_path, NULL, FALSE, &error);
if (!impl->has_home)
error_getting_info_dialog (impl, home_path, error);
@@ -1616,14 +1627,22 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
if (impl->local_only)
{
GtkFilePath *base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
gtk_file_path_free (base_path);
if (!is_local)
if (gtk_file_system_volume_get_is_mounted (impl->file_system, volume))
{
gtk_file_system_volume_free (impl->file_system, volume);
continue;
GtkFilePath *base_path;
base_path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
if (base_path != NULL)
{
gboolean is_local = gtk_file_system_path_is_local (impl->file_system, base_path);
gtk_file_path_free (base_path);
if (!is_local)
{
gtk_file_system_volume_free (impl->file_system, volume);
continue;
}
}
}
}
@@ -1798,7 +1817,7 @@ shortcuts_add_current_folder (GtkFileChooserDefault *impl)
impl->shortcuts_current_folder_active = success;
}
if (success)
if (success && impl->save_folder_combo != NULL)
gtk_combo_box_set_active (GTK_COMBO_BOX (impl->save_folder_combo), pos);
}
@@ -1859,7 +1878,6 @@ shortcuts_model_create (GtkFileChooserDefault *impl)
shortcuts_append_home (impl);
shortcuts_append_desktop (impl);
shortcuts_add_volumes (impl);
shortcuts_add_bookmarks (impl);
}
impl->shortcuts_filter_model = shortcuts_model_filter_new (impl,
@@ -2888,6 +2906,7 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
const GtkFilePath *file_path;
GtkFilePath *file_path_copy;
GError *error;
gchar *name;
/* Get the selected path */
@@ -2903,12 +2922,13 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
g_assert (old_position >= 0 && old_position < impl->num_bookmarks);
gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), &iter,
SHORTCUTS_COL_NAME, &name,
SHORTCUTS_COL_DATA, &col_data,
SHORTCUTS_COL_IS_VOLUME, &is_volume,
-1);
g_assert (col_data != NULL);
g_assert (!is_volume);
file_path = col_data;
file_path_copy = gtk_file_path_copy (file_path); /* removal below will free file_path, so we need a copy */
@@ -2922,7 +2942,10 @@ shortcuts_reorder (GtkFileChooserDefault *impl,
error = NULL;
if (gtk_file_system_remove_bookmark (impl->file_system, file_path_copy, &error))
shortcuts_add_bookmark_from_path (impl, file_path_copy, new_position);
{
shortcuts_add_bookmark_from_path (impl, file_path_copy, new_position);
gtk_file_system_set_bookmark_label (impl->file_system, file_path_copy, name);
}
else
error_adding_bookmark_dialog (impl, file_path_copy, error);
@@ -3041,9 +3064,9 @@ remove_shortcut_cb (GtkMenuItem *item,
remove_selected_bookmarks (impl);
}
/* Rename the selected bookmark */
static void
rename_shortcut_cb (GtkMenuItem *item,
GtkFileChooserDefault *impl)
rename_selected_bookmark (GtkFileChooserDefault *impl)
{
GtkTreeIter iter;
GtkTreePath *path;
@@ -3065,6 +3088,13 @@ rename_shortcut_cb (GtkMenuItem *item,
}
}
static void
rename_shortcut_cb (GtkMenuItem *item,
GtkFileChooserDefault *impl)
{
rename_selected_bookmark (impl);
}
/* Constructs the popup menu for the file list if needed */
static void
shortcuts_build_popup_menu (GtkFileChooserDefault *impl)
@@ -3905,6 +3935,7 @@ file_pane_create (GtkFileChooserDefault *impl,
return vbox;
}
/* Callback used when the "Browse for more folders" expander is toggled */
static void
expander_changed_cb (GtkExpander *expander,
@@ -3968,7 +3999,7 @@ save_folder_combo_create (GtkFileChooserDefault *impl)
}
/* Creates the widgets specific to Save mode */
static GtkWidget *
static void
save_widgets_create (GtkFileChooserDefault *impl)
{
GtkWidget *vbox;
@@ -3976,6 +4007,9 @@ save_widgets_create (GtkFileChooserDefault *impl)
GtkWidget *widget;
GtkWidget *alignment;
if (impl->save_widgets != NULL)
return;
vbox = gtk_vbox_new (FALSE, 12);
table = gtk_table_new (2, 2, FALSE);
@@ -4033,7 +4067,25 @@ save_widgets_create (GtkFileChooserDefault *impl)
impl);
gtk_widget_show_all (alignment);
return vbox;
impl->save_widgets = vbox;
gtk_box_pack_start (GTK_BOX (impl), impl->save_widgets, FALSE, FALSE, 0);
gtk_box_reorder_child (GTK_BOX (impl), impl->save_widgets, 0);
gtk_widget_show (impl->save_widgets);
}
/* Destroys the widgets specific to Save mode */
static void
save_widgets_destroy (GtkFileChooserDefault *impl)
{
if (impl->save_widgets == NULL)
return;
gtk_widget_destroy (impl->save_widgets);
impl->save_widgets = NULL;
impl->save_file_name_entry = NULL;
impl->save_folder_label = NULL;
impl->save_folder_combo = NULL;
impl->save_expander = NULL;
}
/* Creates the main hpaned with the widgets shared by Open and Save mode */
@@ -4086,10 +4138,6 @@ gtk_file_chooser_default_constructor (GType type,
shortcuts_model_create (impl);
/* Widgets for Save mode */
impl->save_widgets = save_widgets_create (impl);
gtk_box_pack_start (GTK_BOX (impl), impl->save_widgets, FALSE, FALSE, 0);
/* The browse widgets */
impl->browse_widgets = browse_widgets_create (impl);
gtk_box_pack_start (GTK_BOX (impl), impl->browse_widgets, TRUE, TRUE, 0);
@@ -4278,7 +4326,7 @@ update_appearance (GtkFileChooserDefault *impl)
{
const char *text;
gtk_widget_show (impl->save_widgets);
save_widgets_create (impl);
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
text = _("Save in _folder:");
@@ -4287,6 +4335,8 @@ update_appearance (GtkFileChooserDefault *impl)
gtk_label_set_text_with_mnemonic (GTK_LABEL (impl->save_folder_label), text);
_gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), impl->action);
if (gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
{
gtk_widget_set_sensitive (impl->save_folder_label, FALSE);
@@ -4312,7 +4362,7 @@ update_appearance (GtkFileChooserDefault *impl)
else if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
gtk_widget_hide (impl->save_widgets);
save_widgets_destroy (impl);
gtk_widget_show (impl->browse_widgets);
}
@@ -4321,6 +4371,9 @@ update_appearance (GtkFileChooserDefault *impl)
else
gtk_widget_show (impl->browse_new_folder_button);
/* This *is* needed; we need to redraw the file list because the "sensitivity"
* of files may change depending whether we are in a file or folder-only mode.
*/
gtk_widget_queue_draw (impl->browse_files_tree_view);
g_signal_emit_by_name (impl, "default-size-changed");
@@ -4356,10 +4409,6 @@ gtk_file_chooser_default_set_property (GObject *object,
impl->action = action;
update_appearance (impl);
}
if (impl->save_file_name_entry)
_gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry),
action);
}
break;
@@ -4724,6 +4773,7 @@ static void
gtk_file_chooser_default_map (GtkWidget *widget)
{
GtkFileChooserDefault *impl;
char *current_working_dir;
profile_start ("start", NULL);
@@ -4731,10 +4781,29 @@ gtk_file_chooser_default_map (GtkWidget *widget)
GTK_WIDGET_CLASS (parent_class)->map (widget);
if (impl->current_folder)
switch (impl->reload_state)
{
case RELOAD_EMPTY:
/* The user didn't explicitly give us a folder to display, so we'll use the cwd */
current_working_dir = g_get_current_dir ();
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (impl), current_working_dir);
g_free (current_working_dir);
break;
case RELOAD_HAS_FOLDER:
/* Nothing; we are already loading or loaded, so we don't need to reload */
break;
case RELOAD_WAS_UNMAPPED:
/* Just reload the current folder */
g_assert (impl->current_folder != NULL);
pending_select_paths_store_selection (impl);
change_folder_and_display_error (impl, impl->current_folder);
break;
default:
g_assert_not_reached ();
}
bookmarks_changed_cb (impl->file_system, impl);
@@ -4742,6 +4811,19 @@ gtk_file_chooser_default_map (GtkWidget *widget)
profile_end ("end", NULL);
}
/* GtkWidget::unmap method */
static void
gtk_file_chooser_default_unmap (GtkWidget *widget)
{
GtkFileChooserDefault *impl;
impl = GTK_FILE_CHOOSER_DEFAULT (widget);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
impl->reload_state = RELOAD_WAS_UNMAPPED;
}
static gboolean
list_model_filter_func (GtkFileSystemModel *model,
GtkFilePath *path,
@@ -5268,7 +5350,14 @@ update_chooser_entry (GtkFileChooserDefault *impl)
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
{
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), "");
/* If nothing is selected, we only reset the file name entry 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. See http://bugzilla.gnome.org/show_bug.cgi?id=308332
*/
if (impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry), "");
return;
}
@@ -5340,6 +5429,8 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
gtk_file_path_free (impl->current_folder);
impl->current_folder = gtk_file_path_copy (path);
impl->reload_state = RELOAD_HAS_FOLDER;
}
/* Update the widgets that may trigger a folder change themselves. */
@@ -5355,8 +5446,9 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
/* Set the folder on the save entry */
_gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry),
impl->current_folder);
if (impl->save_file_name_entry)
_gtk_file_chooser_entry_set_base_folder (GTK_FILE_CHOOSER_ENTRY (impl->save_file_name_entry),
impl->current_folder);
/* Create a new list model. This is slightly evil; we store the result value
* but perform more actions rather than returning immediately even if it
@@ -5384,6 +5476,21 @@ gtk_file_chooser_default_get_current_folder (GtkFileChooser *chooser)
{
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
if (impl->reload_state == RELOAD_EMPTY)
{
char *current_working_dir;
GtkFilePath *path;
/* We are unmapped, or we had an error while loading the last folder. We'll return
* the $cwd since once we get (re)mapped, we'll load $cwd anyway unless the caller
* explicitly calls set_current_folder() on us.
*/
current_working_dir = g_get_current_dir ();
path = gtk_file_system_filename_to_path (impl->file_system, current_working_dir);
g_free (current_working_dir);
return path;
}
return gtk_file_path_copy (impl->current_folder);
}
@@ -6335,7 +6442,7 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
g_assert_not_reached ();
}
}
else if (current_focus == impl->save_file_name_entry)
else if ((impl->save_file_name_entry != NULL) && (current_focus == impl->save_file_name_entry))
{
GtkFilePath *path;
gboolean is_well_formed, is_empty, is_file_part_empty;
@@ -6645,8 +6752,11 @@ shortcuts_activate_volume (GtkFileChooserDefault *impl,
}
path = gtk_file_system_volume_get_base_path (impl->file_system, volume);
change_folder_and_display_error (impl, path);
gtk_file_path_free (path);
if (path != NULL)
{
change_folder_and_display_error (impl, path);
gtk_file_path_free (path);
}
out:
@@ -6726,6 +6836,13 @@ shortcuts_key_press_event_cb (GtkWidget *widget,
return TRUE;
}
if ((event->keyval == GDK_F2)
&& (event->state & modifiers) == 0)
{
rename_selected_bookmark (impl);
return TRUE;
}
return FALSE;
}
@@ -6832,6 +6949,7 @@ list_row_activated (GtkTreeView *tree_view,
static void
path_bar_clicked (GtkPathBar *path_bar,
GtkFilePath *file_path,
GtkFilePath *child_path,
gboolean child_is_hidden,
GtkFileChooserDefault *impl)
{
@@ -6844,6 +6962,18 @@ path_bar_clicked (GtkPathBar *path_bar,
*/
if (child_is_hidden)
g_object_set (impl, "show-hidden", TRUE, NULL);
/* Say we have "/foo/bar/baz" and the user clicks on "bar". We should then
* focus the "baz" entry in the files list - the reason for this is that
* if user furst changed to /foo/bar/baz from /foo/bar unintentionally instead
* of /foo/bar/baz1, it will take quite some time to scroll to baz1 in the file
* list, especially if this directory contains lots of folders
*/
if (child_path != NULL)
{
gtk_file_chooser_default_select_path (impl, child_path, NULL);
browse_files_center_selected_row (impl);
}
}
static const GtkFileInfo *
-5
View File
@@ -144,7 +144,6 @@ gtk_file_chooser_widget_constructor (GType type,
{
GtkFileChooserWidgetPrivate *priv;
GObject *object;
gchar *current_folder;
object = parent_class->constructor (type,
n_construct_properties,
@@ -158,10 +157,6 @@ gtk_file_chooser_widget_constructor (GType type,
gtk_box_pack_start (GTK_BOX (object), priv->impl, TRUE, TRUE, 0);
gtk_widget_show (priv->impl);
current_folder = g_get_current_dir ();
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (priv->impl), current_folder);
g_free (current_folder);
_gtk_file_chooser_set_delegate (GTK_FILE_CHOOSER (object),
GTK_FILE_CHOOSER (priv->impl));
+1 -1
View File
@@ -1074,7 +1074,7 @@ gtk_file_system_module_load (GTypeModule *module)
{
GtkFileSystemModule *fs_module = GTK_FILE_SYSTEM_MODULE (module);
fs_module->library = g_module_open (fs_module->path, 0);
fs_module->library = g_module_open (fs_module->path, G_MODULE_BIND_LAZY);
if (!fs_module->library)
{
g_warning (g_module_error());
+4
View File
@@ -685,11 +685,15 @@ root_folder_finished_loading_cb (GtkFileFolder *folder,
static gboolean
idle_finished_loading_cb (GtkFileSystemModel *model)
{
GDK_THREADS_ENTER ();
g_signal_emit (model, file_system_model_signals[FINISHED_LOADING], 0);
g_source_destroy (model->idle_finished_loading_source);
model->idle_finished_loading_source = NULL;
GDK_THREADS_LEAVE ();
return FALSE;
}
+35 -34
View File
@@ -291,9 +291,6 @@ check_volumes (gpointer data)
g_return_val_if_fail (system_win32, FALSE);
#if 0
printf("check_volumes: system_win32=%p\n", system_win32);
#endif
if (system_win32->drives != GetLogicalDrives())
g_signal_emit_by_name (system_win32, "volumes-changed", 0);
@@ -303,10 +300,6 @@ check_volumes (gpointer data)
static void
gtk_file_system_win32_init (GtkFileSystemWin32 *system_win32)
{
#if 0
printf("gtk_file_system_win32_init: %p\n", system_win32);
#endif
/* set up an idle handler for volume changes, every second should be enough */
system_win32->timeout = g_timeout_add_full (0, 1000, check_volumes, system_win32, NULL);
@@ -320,10 +313,6 @@ gtk_file_system_win32_finalize (GObject *object)
system_win32 = GTK_FILE_SYSTEM_WIN32 (object);
#if 0
printf("gtk_file_system_win32_finalize: %p\n", system_win32);
#endif
g_source_remove (system_win32->timeout);
/* FIXME: assert that the hash is empty? */
@@ -726,7 +715,9 @@ gtk_file_system_win32_get_parent (GtkFileSystem *file_system,
*parent = filename_to_path (parent_filename);
g_free (parent_filename);
}
#if DEBUGGING_OUTPUT
printf ("%s: %s => %s\n", __FUNCTION__, (char*)path, (*parent)?(char*)*parent:"NULL"), fflush(stdout);
#endif
return TRUE;
}
@@ -762,8 +753,8 @@ canonicalize_filename (gchar *filename)
gchar *past_root;
gboolean last_was_slash = FALSE;
#if 0
printf("canonicalize_filename: %s ", filename);
#if DEBUGGING_OUTPUT
printf("%s: %s ", __FUNCTION__, filename), fflush (stdout);
#endif
past_root = (gchar *) g_path_skip_root (filename);
@@ -775,7 +766,7 @@ canonicalize_filename (gchar *filename)
if (G_IS_DIR_SEPARATOR (*p))
{
if (!last_was_slash)
*q++ = G_DIR_SEPARATOR;
*q++ = '\\';
last_was_slash = TRUE;
}
@@ -828,8 +819,9 @@ canonicalize_filename (gchar *filename)
q--;
*q = '\0';
#if 0
printf(" => %s\n", filename);
#if DEBUGGING_OUTPUT
printf(" => %s\n", filename), fflush (stdout);
#endif
}
@@ -845,15 +837,15 @@ gtk_file_system_win32_parse (GtkFileSystem *file_system,
gchar *last_backslash, *last_slash;
gboolean result = FALSE;
#if 0
printf("gtk_file_system_win32_parse: base_path=%s str=%s\n",(char*)base_path,str);
#if DEBUGGING_OUTPUT
printf("%s: base_path=%s str=%s\n",__FUNCTION__,(char*)base_path,str),fflush(stdout);
#endif
base_filename = gtk_file_path_get_string (base_path);
g_return_val_if_fail (base_filename != NULL, FALSE);
g_return_val_if_fail (g_path_is_absolute (base_filename), FALSE);
last_backslash = strrchr (str, G_DIR_SEPARATOR);
last_backslash = strrchr (str, '\\');
last_slash = strrchr (str, '/');
if (last_slash == NULL ||
(last_backslash != NULL && last_backslash > last_slash))
@@ -874,18 +866,25 @@ gtk_file_system_win32_parse (GtkFileSystem *file_system,
{
if (g_ascii_isalpha (base_filename[0]) &&
base_filename[1] == ':')
folder_part = g_strdup_printf ("%c:" G_DIR_SEPARATOR_S, base_filename[0]);
folder_part = g_strdup_printf ("%c:\\", base_filename[0]);
else
folder_part = g_strdup (G_DIR_SEPARATOR_S);
folder_part = g_strdup ("\\");
}
else if (g_ascii_isalpha (str[0]) &&
str[1] == ':' &&
G_IS_DIR_SEPARATOR (str[2]))
last_slash == str + 2)
folder_part = g_strndup (str, last_slash - str + 1);
#if 0
/* Hmm, what the heck was this case supposed to do? It splits up
* \\server\share\foo\bar into folder_part
* \\server\share\foo\bar and file_path bar. Not good. As far as
* I can see, this isn't needed.
*/
else if (G_IS_DIR_SEPARATOR (str[0]) &&
G_IS_DIR_SEPARATOR (str[1]) &&
(!str[2] || !G_IS_DIR_SEPARATOR (str[2])))
folder_part = g_strdup (str);
#endif
else
folder_part = g_strndup (str, last_slash - str);
@@ -909,8 +908,8 @@ gtk_file_system_win32_parse (GtkFileSystem *file_system,
result = TRUE;
}
#if 0
printf("gtk_file_system_win32_parse:returning folder=%s file_part=%s\n",(*folder?(char*)*folder:"NULL"),*file_part);
#if DEBUGGING_OUTPUT
printf ("%s:returning folder=%s file_part=%s\n", __FUNCTION__, (*folder?(char*)*folder:"NULL"), *file_part), fflush(stdout);
#endif
return result;
@@ -936,6 +935,11 @@ gtk_file_system_win32_uri_to_path (GtkFileSystem *file_system,
{
GtkFilePath *path = NULL;
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
#if DEBUGGING_OUTPUT
printf ("%s: %s -> %s\n", __FUNCTION__, uri, filename?filename:"NULL"), fflush (stdout);
#endif
if (filename)
{
path = filename_to_path (filename);
@@ -1422,6 +1426,11 @@ gtk_file_folder_win32_list_children (GtkFileFolder *folder,
*children = NULL;
dir = g_dir_open (folder_win32->filename, 0, error);
#if DEBUGGING_OUTPUT
printf ("%s: %s: %s\n", __FUNCTION__, folder_win32->filename, dir?"OK":"FAIL"), fflush (stdout);
#endif
if (!dir)
return FALSE;
@@ -1516,9 +1525,7 @@ filename_get_info (const gchar *filename,
if (types & GTK_FILE_INFO_IS_HIDDEN)
{
/* Unix dot convention or the Windows hidden attribute */
gboolean is_hidden = basename[0] == '.' ||
!!(wfad.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN);
gboolean is_hidden = !!(wfad.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN);
gtk_file_info_set_is_hidden (info, is_hidden);
}
@@ -1654,14 +1661,8 @@ filename_is_server_share (const char *filename)
static gboolean
filename_is_some_root (const char *filename)
{
#if 0
return ((G_IS_DIR_SEPARATOR (filename[0]) && filename[1] == '\0') ||
filename_is_server_share (filename) ||
filename_is_drive_root (filename));
#else
return (g_path_is_absolute (filename) &&
*(g_path_skip_root (filename)) == '\0');
#endif
}
int
+1 -1
View File
@@ -869,7 +869,7 @@ gtk_font_button_update_font_info (GtkFontButton *font_button)
#endif
style = NULL;
if (font_button->priv->show_style)
if (font_button->priv->show_style && family)
{
PangoFontFamily **families;
PangoFontFace **faces;
+7 -2
View File
@@ -1198,13 +1198,18 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
GtkTreeIter iter;
GtkTreeIter match_iter;
gboolean valid;
const gchar *new_family_name;
g_return_val_if_fail (GTK_IS_FONT_SELECTION (fontsel), FALSE);
new_desc = pango_font_description_from_string (fontname);
/* Check to make sure that this is in the list of allowed fonts */
new_family_name = pango_font_description_get_family (new_desc);
if (!new_family_name)
return FALSE;
/* Check to make sure that this is in the list of allowed fonts
*/
model = gtk_tree_view_get_model (GTK_TREE_VIEW (fontsel->family_list));
for (valid = gtk_tree_model_get_iter_first (model, &iter);
valid;
@@ -1215,7 +1220,7 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
gtk_tree_model_get (model, &iter, FAMILY_COLUMN, &family, -1);
if (g_ascii_strcasecmp (pango_font_family_get_name (family),
pango_font_description_get_family (new_desc)) == 0)
new_family_name) == 0)
new_family = family;
g_object_unref (family);
-2
View File
@@ -378,8 +378,6 @@ _gtk_icon_cache_get_icon (GtkIconCache *cache,
return NULL;
}
pixbuf = gdk_pixbuf_from_pixdata (&pixdata, FALSE, &error);
pixbuf = gdk_pixbuf_new_from_data (pixdata.pixel_data, GDK_COLORSPACE_RGB,
(pixdata.pixdata_type & GDK_PIXDATA_COLOR_TYPE_MASK) == GDK_PIXDATA_COLOR_TYPE_RGBA,
8, pixdata.width, pixdata.height, pixdata.rowstride,
+16 -1
View File
@@ -1484,6 +1484,21 @@ gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme,
}
}
if (icon_theme_builtin_icons)
{
GList *icons;
icons = g_hash_table_lookup (icon_theme_builtin_icons, icon_name);
while (icons)
{
BuiltinIcon *icon = icons->data;
g_hash_table_insert (sizes, GINT_TO_POINTER (icon->size), NULL);
icons = icons->next;
}
}
r = result = g_new0 (gint, g_hash_table_size (sizes) + 1);
g_hash_table_foreach (sizes, add_size, &r);
@@ -1893,7 +1908,7 @@ theme_lookup_icon (IconTheme *theme,
if (min_dir)
{
GtkIconInfo *icon_info = icon_info_new ();
gboolean has_icon_file;
gboolean has_icon_file = FALSE;
suffix = theme_dir_get_icon_suffix (min_dir, icon_name, &has_icon_file);
suffix = best_suffix (suffix, allow_svg);
+41 -30
View File
@@ -697,10 +697,10 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
GTK_PARAM_READWRITE));
/**
* GtkIconView:orientation:
* GtkIconView:reorderable:
*
* The reorderable property specifies if the items can be reordered
* by DND.
* by drag-and-drop.
*
* Since: 2.8
*/
@@ -1734,7 +1734,7 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
GtkCellRenderer *cell,
gboolean start_editing)
{
GtkIconViewItem *item;
GtkIconViewItem *item = NULL;
GtkIconViewCellInfo *info = NULL;
GList *l;
gint i, cell_pos;
@@ -1746,8 +1746,8 @@ gtk_icon_view_set_cursor (GtkIconView *icon_view,
gtk_icon_view_stop_editing (icon_view, TRUE);
if (gtk_tree_path_get_depth (path) == 1)
item = g_list_nth (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0])->data;
item = g_list_nth_data (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0]);
if (!item)
return;
@@ -3930,7 +3930,7 @@ gtk_icon_view_move_cursor_start_end (GtkIconView *icon_view,
* @path: The path of the item to move to.
* @use_align: whether to use alignment arguments, or %FALSE.
* @row_align: The vertical alignment of the item specified by @path.
* @col_align: The horizontal alignment of the item specified by @column.
* @col_align: The horizontal alignment of the item specified by @path.
*
* Moves the alignments of @icon_view to the position specified by @path.
* @row_align determines where the row is placed, and @col_align determines where
@@ -3988,7 +3988,7 @@ gtk_icon_view_scroll_to_path (GtkIconView *icon_view,
if (use_align)
{
gint x, y, width, height;
gint x, y;
gint focus_width;
gfloat offset, value;
@@ -4457,7 +4457,6 @@ gtk_icon_view_get_visible_range (GtkIconView *icon_view,
{
gint start_index = -1;
gint end_index = -1;
GtkIconViewItem *item;
GList *icons;
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
@@ -4720,10 +4719,13 @@ update_text_cell (GtkIconView *icon_view)
{
if (icon_view->priv->text_cell != -1)
{
if (icon_view->priv->pixbuf_cell > icon_view->priv->text_cell)
icon_view->priv->pixbuf_cell--;
info = g_list_nth_data (icon_view->priv->cell_list,
icon_view->priv->text_cell);
g_list_remove (icon_view->priv->cell_list, info);
icon_view->priv->cell_list = g_list_remove (icon_view->priv->cell_list, info);
free_cell_info (info);
@@ -4790,10 +4792,13 @@ update_pixbuf_cell (GtkIconView *icon_view)
{
if (icon_view->priv->pixbuf_cell != -1)
{
if (icon_view->priv->text_cell > icon_view->priv->pixbuf_cell)
icon_view->priv->text_cell--;
info = g_list_nth_data (icon_view->priv->cell_list,
icon_view->priv->pixbuf_cell);
g_list_remove (icon_view->priv->cell_list, info);
icon_view->priv->cell_list = g_list_remove (icon_view->priv->cell_list, info);
free_cell_info (info);
@@ -5074,8 +5079,8 @@ gtk_icon_view_unselect_path (GtkIconView *icon_view,
g_return_if_fail (icon_view->priv->model != NULL);
g_return_if_fail (path != NULL);
item = g_list_nth (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0])->data;
item = g_list_nth_data (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0]);
if (!item)
return;
@@ -5207,8 +5212,8 @@ gtk_icon_view_path_is_selected (GtkIconView *icon_view,
g_return_val_if_fail (icon_view->priv->model != NULL, FALSE);
g_return_val_if_fail (path != NULL, FALSE);
item = g_list_nth (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0])->data;
item = g_list_nth_data (icon_view->priv->items,
gtk_tree_path_get_indices(path)[0]);
if (!item)
return FALSE;
@@ -6480,7 +6485,7 @@ gtk_icon_view_unset_model_drag_dest (GtkIconView *icon_view)
* gtk_icon_view_set_drag_dest_item:
* @icon_view: a #GtkIconView
* @path: The path of the item to highlight, or %NULL.
* @pos: Specifies whether to drop, relative to the item
* @pos: Specifies where to drop, relative to the item
*
* Sets the item that is highlighted for feedback.
*
@@ -6569,7 +6574,7 @@ gtk_icon_view_get_drag_dest_item (GtkIconView *icon_view,
* @icon_view: a #GtkIconView
* @drag_x: the position to determine the destination item for
* @drag_y: the position to determine the destination item for
* @path: Return location for the path of the highlighted item, or %NULL.
* @path: Return location for the path of the item, or %NULL.
* @pos: Return location for the drop position, or %NULL
*
* Determines the destination item for a given position.
@@ -6651,8 +6656,14 @@ gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
gint index;
GdkRectangle area;
g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), NULL);
g_return_val_if_fail (path != NULL, NULL);
widget = GTK_WIDGET (icon_view);
if (!GTK_WIDGET_REALIZED (widget))
return NULL;
index = gtk_tree_path_get_indices (path)[0];
for (l = icon_view->priv->items; l; l = l->next)
@@ -7135,6 +7146,7 @@ gtk_icon_view_item_accessible_text_get_character_at_offset (AtkText *text,
return unichar;
}
#if 0
static void
get_pango_text_offsets (PangoLayout *layout,
GtkTextBuffer *buffer,
@@ -7257,6 +7269,7 @@ get_pango_text_offsets (PangoLayout *layout,
gtk_text_buffer_get_iter_at_offset (buffer, start_iter, *start_offset);
gtk_text_buffer_get_iter_at_offset (buffer, end_iter, *end_offset);
}
#endif
static gchar*
gtk_icon_view_item_accessible_text_get_text_before_offset (AtkText *text,
@@ -7612,9 +7625,11 @@ gtk_icon_view_item_accessible_text_get_character_extents (AtkText *text,
{
GtkIconViewItemAccessible *item;
GtkIconView *icon_view;
#if 0
PangoRectangle char_rect;
const gchar *item_text;
gint index;
#endif
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
@@ -7650,10 +7665,12 @@ gtk_icon_view_item_accessible_text_get_offset_at_point (AtkText *text,
{
GtkIconViewItemAccessible *item;
GtkIconView *icon_view;
gint offset = -1;
#if 0
const gchar *item_text;
gint index;
gint offset;
gint l_x, l_y;
#endif
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (text);
@@ -8469,7 +8486,6 @@ gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model,
GtkIconView *icon_view;
GtkIconViewItemAccessible *item;
GList *items;
GList *tmp_list;
AtkObject *atk_obj;
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (user_data));
@@ -8478,14 +8494,12 @@ gtk_icon_view_accessible_model_rows_reordered (GtkTreeModel *tree_model,
priv = gtk_icon_view_accessible_get_priv (atk_obj);
items = priv->items;
tmp_list = NULL;
while (items)
{
info = items->data;
item = GTK_ICON_VIEW_ITEM_ACCESSIBLE (info->item);
info->index = new_order[info->index];
tmp_list = g_list_nth (icon_view->priv->items, info->index);
item->item = tmp_list->data;
item->item = g_list_nth_data (icon_view->priv->items, info->index);
items = items->next;
}
priv->items = g_list_sort (priv->items,
@@ -8752,7 +8766,6 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
GtkWidget *widget;
GtkIconView *icon_view;
GtkIconViewItem *item;
GList *l;
widget = GTK_ACCESSIBLE (selection)->widget;
if (widget == NULL)
@@ -8760,11 +8773,11 @@ gtk_icon_view_accessible_add_selection (AtkSelection *selection,
icon_view = GTK_ICON_VIEW (widget);
l = g_list_nth (icon_view->priv->items, i);
if (!l)
item = g_list_nth_data (icon_view->priv->items, i);
if (!item)
return FALSE;
item = l->data;
gtk_icon_view_select_item (icon_view, item);
return TRUE;
@@ -8855,18 +8868,16 @@ gtk_icon_view_accessible_is_child_selected (AtkSelection *selection,
GtkWidget *widget;
GtkIconView *icon_view;
GtkIconViewItem *item;
GList *l;
widget = GTK_ACCESSIBLE (selection)->widget;
if (widget == NULL)
return FALSE;
icon_view = GTK_ICON_VIEW (widget);
l = g_list_nth (icon_view->priv->items, i);
if (!l)
return FALSE;
item = l->data;
item = g_list_nth_data (icon_view->priv->items, i);
if (!item)
return FALSE;
return item->selected;
}
+14 -16
View File
@@ -1774,22 +1774,17 @@ gtk_image_expose (GtkWidget *widget,
}
if (pixbuf)
{
gdk_draw_pixbuf (widget->window,
widget->style->black_gc,
pixbuf,
image_bound.x - x,
image_bound.y - y,
image_bound.x,
image_bound.y,
image_bound.width,
image_bound.height,
GDK_RGB_DITHER_NORMAL,
0, 0);
g_object_unref (pixbuf);
pixbuf = NULL;
}
gdk_draw_pixbuf (widget->window,
widget->style->black_gc,
pixbuf,
image_bound.x - x,
image_bound.y - y,
image_bound.x,
image_bound.y,
image_bound.width,
image_bound.height,
GDK_RGB_DITHER_NORMAL,
0, 0);
}
else
{
@@ -1830,6 +1825,9 @@ gtk_image_expose (GtkWidget *widget,
gdk_gc_set_clip_mask (widget->style->black_gc, NULL);
gdk_gc_set_clip_origin (widget->style->black_gc, 0, 0);
}
if (pixbuf)
g_object_unref (pixbuf);
} /* if widget is drawable */
+1 -1
View File
@@ -95,7 +95,7 @@ gtk_im_module_load (GTypeModule *module)
{
GtkIMModule *im_module = GTK_IM_MODULE (module);
im_module->library = g_module_open (im_module->path, 0);
im_module->library = g_module_open (im_module->path, G_MODULE_BIND_LAZY);
if (!im_module->library)
{
g_warning (g_module_error());
-1
View File
@@ -1,7 +1,6 @@
#ifndef __GTKINTL_H__
#define __GTKINTL_H__
#include "config.h"
#include <glib/gi18n-lib.h>
#ifdef ENABLE_NLS
+13 -4
View File
@@ -297,9 +297,18 @@ _gtk_get_localedir (void)
{
static char *gtk_localedir = NULL;
if (gtk_localedir == NULL)
gtk_localedir = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
{
gchar *temp;
temp = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "lib\\locale");
/* gtk_localedir is passed to bindtextdomain() which isn't
* UTF-8-aware.
*/
gtk_localedir = g_win32_locale_filename_from_utf8 (temp);
g_free (temp);
}
return gtk_localedir;
}
@@ -1256,7 +1265,7 @@ gtk_main_do_event (GdkEvent *event)
* in the user_data field of GdkWindow's.
* Ignore the event if we don't have a widget for it, except
* for GDK_PROPERTY_NOTIFY events which are handled specialy.
* Though this happens rarely, bogus events can occour
* Though this happens rarely, bogus events can occur
* for e.g. destroyed GdkWindows.
*/
event_widget = gtk_get_event_widget (event);
@@ -2044,7 +2053,7 @@ gtk_get_event_widget (GdkEvent *event)
widget = NULL;
if (event && event->any.window &&
!GDK_WINDOW_DESTROYED (event->any.window))
(event->type == GDK_DESTROY || !GDK_WINDOW_DESTROYED (event->any.window)))
gdk_window_get_user_data (event->any.window, (void**) &widget);
return widget;
+1
View File
@@ -88,6 +88,7 @@ VOID:OBJECT,STRING
VOID:POINTER
VOID:POINTER,INT
VOID:POINTER,BOOLEAN
VOID:POINTER,POINTER,BOOLEAN
VOID:POINTER,POINTER,POINTER
VOID:POINTER,UINT
VOID:STRING
+1 -1
View File
@@ -4419,7 +4419,7 @@ gtk_menu_grab_notify (GtkWidget *widget,
if (!was_grabbed)
{
if (!GTK_IS_MENU_SHELL (grab))
if (GTK_MENU_SHELL (widget)->active && !GTK_IS_MENU_SHELL (grab))
gtk_menu_shell_cancel (GTK_MENU_SHELL (widget));
}
}
+1
View File
@@ -307,6 +307,7 @@ menu_position_func (GtkMenu *menu,
{
gdk_window_get_origin (widget->window, x, y);
*x += widget->allocation.x;
*y += widget->allocation.y;
if (direction == GTK_TEXT_DIR_LTR)
*x += MAX (widget->allocation.width - menu_req.width, 0);
+1 -1
View File
@@ -472,7 +472,7 @@ gtk_message_dialog_new (GtkWindow *parent,
* dialog = gtk_message_dialog_new (main_application_window,
* GTK_DIALOG_DESTROY_WITH_PARENT,
* GTK_MESSAGE_ERROR,
* GTK_BUTTON_CLOSE,
* GTK_BUTTONS_CLOSE,
* NULL);
* gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
* markup);
+25 -5
View File
@@ -130,6 +130,8 @@ static gboolean gtk_paned_cancel_position (GtkPaned *paned);
static gboolean gtk_paned_toggle_handle_focus (GtkPaned *paned);
static GType gtk_paned_child_type (GtkContainer *container);
static void gtk_paned_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static GtkContainerClass *parent_class = NULL;
@@ -223,6 +225,7 @@ gtk_paned_class_init (GtkPanedClass *class)
widget_class->button_release_event = gtk_paned_button_release;
widget_class->motion_notify_event = gtk_paned_motion;
widget_class->grab_broken_event = gtk_paned_grab_broken;
widget_class->grab_notify = gtk_paned_grab_notify;
container_class->add = gtk_paned_add;
container_class->remove = gtk_paned_remove;
@@ -925,6 +928,26 @@ gtk_paned_grab_broken (GtkWidget *widget,
return TRUE;
}
static void
stop_drag (GtkPaned *paned)
{
paned->in_drag = FALSE;
paned->drag_pos = -1;
paned->position_set = TRUE;
gdk_display_pointer_ungrab (gtk_widget_get_display (GTK_WIDGET (paned)),
paned->priv->grab_time);
}
static void
gtk_paned_grab_notify (GtkWidget *widget,
gboolean was_grabbed)
{
GtkPaned *paned = GTK_PANED (widget);
if (!was_grabbed && paned->in_drag)
stop_drag (paned);
}
static gboolean
gtk_paned_button_release (GtkWidget *widget,
GdkEventButton *event)
@@ -933,11 +956,8 @@ gtk_paned_button_release (GtkWidget *widget,
if (paned->in_drag && (event->button == 1))
{
paned->in_drag = FALSE;
paned->drag_pos = -1;
paned->position_set = TRUE;
gdk_display_pointer_ungrab (gtk_widget_get_display (widget),
paned->priv->grab_time);
stop_drag (paned);
return TRUE;
}
+36 -22
View File
@@ -127,6 +127,7 @@ get_slider_button (GtkPathBar *path_bar,
gtk_widget_push_composite_child ();
button = gtk_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
gtk_container_add (GTK_CONTAINER (button), gtk_arrow_new (arrow_type, GTK_SHADOW_OUT));
gtk_container_add (GTK_CONTAINER (path_bar), button);
gtk_widget_show_all (button);
@@ -192,8 +193,9 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkPathBarClass, path_clicked),
NULL, NULL,
_gtk_marshal_VOID__POINTER_BOOLEAN,
G_TYPE_NONE, 2,
_gtk_marshal_VOID__POINTER_POINTER_BOOLEAN,
G_TYPE_NONE, 3,
G_TYPE_POINTER,
G_TYPE_POINTER,
G_TYPE_BOOLEAN);
}
@@ -307,13 +309,19 @@ gtk_path_bar_update_slider_buttons (GtkPathBar *path_bar)
button = BUTTON_DATA (path_bar->button_list->data)->button;
if (gtk_widget_get_child_visible (button))
gtk_widget_set_sensitive (path_bar->down_slider_button, FALSE);
{
gtk_path_bar_stop_scrolling (path_bar);
gtk_widget_set_sensitive (path_bar->down_slider_button, FALSE);
}
else
gtk_widget_set_sensitive (path_bar->down_slider_button, TRUE);
button = BUTTON_DATA (g_list_last (path_bar->button_list)->data)->button;
if (gtk_widget_get_child_visible (button))
gtk_widget_set_sensitive (path_bar->up_slider_button, FALSE);
{
gtk_path_bar_stop_scrolling (path_bar);
gtk_widget_set_sensitive (path_bar->up_slider_button, FALSE);
}
else
gtk_widget_set_sensitive (path_bar->up_slider_button, TRUE);
}
@@ -732,9 +740,9 @@ gtk_path_bar_scroll_timeout (GtkPathBar *path_bar)
if (path_bar->timer)
{
if (GTK_WIDGET_HAS_FOCUS (path_bar->up_slider_button))
if (path_bar->scrolling_up)
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
else if (GTK_WIDGET_HAS_FOCUS (path_bar->down_slider_button))
else if (path_bar->scrolling_down)
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
if (path_bar->need_timer)
@@ -772,18 +780,23 @@ gtk_path_bar_slider_button_press (GtkWidget *widget,
GdkEventButton *event,
GtkPathBar *path_bar)
{
if (!GTK_WIDGET_HAS_FOCUS (widget))
gtk_widget_grab_focus (widget);
if (event->type != GDK_BUTTON_PRESS || event->button != 1)
return FALSE;
path_bar->ignore_click = FALSE;
if (widget == path_bar->up_slider_button)
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
else if (widget == path_bar->down_slider_button)
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
{
path_bar->scrolling_down = FALSE;
path_bar->scrolling_up = TRUE;
gtk_path_bar_scroll_up (path_bar->up_slider_button, path_bar);
}
else if (widget == path_bar->down_slider_button)
{
path_bar->scrolling_up = FALSE;
path_bar->scrolling_down = TRUE;
gtk_path_bar_scroll_down (path_bar->down_slider_button, path_bar);
}
if (!path_bar->timer)
{
@@ -928,6 +941,7 @@ button_clicked_cb (GtkWidget *button,
GtkPathBar *path_bar;
GList *button_list;
gboolean child_is_hidden;
GtkFilePath *child_path;
button_data = BUTTON_DATA (data);
if (button_data->ignore_changes)
@@ -945,12 +959,17 @@ button_clicked_cb (GtkWidget *button,
ButtonData *child_data;
child_data = BUTTON_DATA (button_list->prev->data);
child_path = child_data->path;
child_is_hidden = child_data->file_is_hidden;
}
else
child_is_hidden = FALSE;
{
child_path = NULL;
child_is_hidden = FALSE;
}
g_signal_emit (path_bar, path_bar_signals [PATH_CLICKED], 0, button_data->path, child_is_hidden);
g_signal_emit (path_bar, path_bar_signals [PATH_CLICKED], 0,
button_data->path, child_path, child_is_hidden);
}
static GdkPixbuf *
@@ -1016,13 +1035,7 @@ button_data_free (ButtonData *button_data)
static const char *
get_dir_name (ButtonData *button_data)
{
if (button_data->type == HOME_BUTTON)
return _("Home");
else if (button_data->type == DESKTOP_BUTTON)
return _("Desktop");
else
return button_data->dir_name;
return button_data->dir_name;
}
/* We always want to request the same size for the label, whether
@@ -1129,7 +1142,7 @@ button_drag_data_get_cb (GtkWidget *widget,
gtk_selection_data_set (selection_data,
selection_data->target,
8,
uri_list,
(guchar *)uri_list,
strlen (uri_list));
g_free (uri_list);
}
@@ -1155,6 +1168,7 @@ make_directory_button (GtkPathBar *path_bar,
button_data->type = find_button_type (path_bar, path);
button_data->button = gtk_toggle_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (button_data->button), FALSE);
switch (button_data->type)
{
+5 -2
View File
@@ -61,8 +61,10 @@ struct _GtkPathBar
gint16 button_offset;
guint timer;
guint slider_visible : 1;
guint need_timer : 1;
guint ignore_click : 1;
guint need_timer : 1;
guint ignore_click : 1;
guint scrolling_up : 1;
guint scrolling_down : 1;
};
struct _GtkPathBarClass
@@ -71,6 +73,7 @@ struct _GtkPathBarClass
void (* path_clicked) (GtkPathBar *path_bar,
GtkFilePath *file_path,
GtkFilePath *child_path,
gboolean child_is_hidden);
};
+1 -1
View File
@@ -259,7 +259,7 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
/**
* _gtk_plug_send_delete_event:
* widget: a #GtkWidget
* @widget: a #GtkWidget
*
* Send a GDK_DELETE event to the @widget and destroy it if
* necessary. Internal GTK function, called from this file or the
+1 -1
View File
@@ -472,7 +472,7 @@ _gtk_rbtree_free (GtkRBTree *tree)
if (tree->parent_node &&
tree->parent_node->children == tree)
tree->parent_node->children = NULL;
_gtk_rbnode_free (tree->nil);
g_free (tree->nil);
g_free (tree);
}
+3 -2
View File
@@ -1324,8 +1324,9 @@ gtk_rc_reset_widgets (GtkSettings *settings)
if (gtk_widget_get_screen (list->data) == settings->screen)
{
gtk_widget_reset_rc_styles (list->data);
g_object_unref (list->data);
}
g_object_unref (list->data);
}
g_list_free (toplevels);
}
@@ -1464,7 +1465,7 @@ gtk_rc_reparse_all_for_settings (GtkSettings *settings,
if (!rc_file->is_string)
{
if (!g_lstat (rc_file->name, &statbuf) &&
(statbuf.st_mtime > rc_file->mtime))
(statbuf.st_mtime != rc_file->mtime))
{
mtime_modified = TRUE;
break;
+2 -2
View File
@@ -646,8 +646,8 @@ _gtk_scale_format_value (GtkScale *scale,
if (fmt)
return fmt;
else
return g_strdup_printf ("%0.*f", scale->digits,
value);
/* insert a LRM, to prevent -20 to come out as 20- in RTL locales */
return g_strdup_printf ("\342\200\216%0.*f", scale->digits, value);
}
static void
+10 -6
View File
@@ -1415,16 +1415,16 @@ gtk_selection_data_get_pixbuf (GtkSelectionData *selection_data)
{
loader = gdk_pixbuf_loader_new ();
if (gdk_pixbuf_loader_write (loader,
selection_data->data,
selection_data->length,
NULL))
result = gdk_pixbuf_loader_get_pixbuf (loader);
gdk_pixbuf_loader_write (loader,
selection_data->data,
selection_data->length,
NULL);
gdk_pixbuf_loader_close (loader, NULL);
result = gdk_pixbuf_loader_get_pixbuf (loader);
if (result)
g_object_ref (result);
gdk_pixbuf_loader_close (loader, NULL);
g_object_unref (loader);
}
@@ -1475,6 +1475,8 @@ gtk_selection_data_set_uris (GtkSelectionData *selection_data,
gtk_selection_data_set (selection_data,
text_uri_list_atom,
8, (guchar *)result, length);
g_free (result);
return TRUE;
}
@@ -1831,6 +1833,8 @@ _gtk_selection_request (GtkWidget *widget,
info->conversions[i].property = gdk_x11_xatom_to_atom_for_display (display,
((glong *)mult_atoms)[2*i + 1]);
}
g_free (mult_atoms);
}
else
#endif
+2
View File
@@ -1371,6 +1371,8 @@ settings_update_cursor_theme (GtkSettings *settings)
NULL);
gdk_x11_display_set_cursor_theme (display, theme, size);
g_free (theme);
}
static void
+4 -4
View File
@@ -97,13 +97,13 @@ _gtk_socket_windowing_size_request (GtkSocket *socket)
{
if (hints.flags & PMinSize)
{
socket->request_width = hints.min_width;
socket->request_height = hints.min_height;
socket->request_width = MAX (hints.min_width, 1);
socket->request_height = MAX (hints.min_height, 1);
}
else if (hints.flags & PBaseSize)
{
socket->request_width = hints.base_width;
socket->request_height = hints.base_height;
socket->request_width = MAX (hints.base_width, 1);
socket->request_height = MAX (hints.base_height, 1);
}
}
socket->have_size = TRUE;

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