2002-01-12 Tor Lillqvist <tml@iki.fi>
Fixes contributed by Archaeopteryx Software: This is a first small
part of their changes. Will commit more later.
* gdk/win32/*.c: Add some more checks for failed GDI calls. If a
call fails, don't use bogus values.
* gdk/win32/gdkcursor-win32.c (_gdk_win32_data_to_wcursor): Plug
memory leak: g_free() the AND and XOR bitmaps after use.
(_gdk_cursor_destroy): If we are destroying the current Windows
cursor, set the Windows cursor to none first.
* gdk/win32/gdkgc-win32.c (predraw_set_foreground): Delete the old
brush that was in the DC, like the win32-procution branch does. I
guess this plugs a resource leak? With the HDC cache, the old
brush might be something we created ourselves, and not a stock
brush. And it doesn't do any harm to call DeleteObject on stock
brushes.
* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_finalize): If
the window has a cursor which is the current Windows cursor,
before destroying it set the current Windows cursor to none.
(gdk_window_set_cursor): Also here, if destroying the current
Windows cursor, set the current Windows cursor to none first.
(gdk_window_get_pointer): Revamp logic.
Fri Jan 11 18:05:07 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Fix integer overflow for the values
passed to the pixel functions. (#55148)
Fri Jan 11 17:53:58 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c (pixops_scale_nearest): Remove meaningless
FIXME.
* pixops/pixops.c (pixops_process): Comment the computation
of run_end_index and fix some edge cases.
* pixops/{scale_line_22_33_mmx.S, composite_line_22_4a4_mmx.S:
composite_line_color_22_4a4_mmx.S}: Handle the case where
dest <= dest_end properly. (#52001)
* gdk/tmpl/general.sgml (gdk_set_program_class): Expand.
* gtk/running.sgml: New file.
* gtk/building.sgml: Document a few more configure options.
* gtk/Makefile.am (content_files): Add running.sgml.
* gtk/gtk-docs.sgml: Include running.sgml, sort H and V
variants of widgets to be next to each other.
Wed Jan 9 20:56:42 2002 Jonathan Blandford <jrb@redhat.com>
* gdk/x11/gdkkeys-x11.c (get_xkb): get the types as well as the
symbols because we need them in MyEnhancedXkbTranslateKeyCode.
2002-01-10 Tor Lillqvist <tml@iki.fi>
Apply the same fixes and improvements as to the
gtk-1-3-win32-production branch: Bug fixes and cleanup of
selection and DND functionality. Still doesn't work as well as the
win32-production branch, though, but getting closer.
After this, need to add Archaeopteryx Software's OLE2 DND support.
* gdk/win32/gdkselection-win32.c (gdk_selection_owner_set,
gdk_selection_send_notify, generate_selection_notify): Don't use
SendMessage() to generate events for the same app, instead use
gdk_event_put().
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkglobals-win32.c
* gdk/win32/gdkmain-win32.c
* gdk/win32/gdkevents-win32.c: Thus, remove declaration, definition,
initialisation and handling of gdk_selection_notify_msg,
gdk_selection_request_msg and gdk_selection_clear_msg.
* gdk/win32/gdkselection-win32.c (gdk_text_property_to_text_list,
gdk_free_text_list, gdk_string_to_compound_text,
gdk_free_compound_text): Implement trivially, witrh a text_list
always having a single element, and a compound text always
consisting of just a single (UTF-8!) string. Let's see how well
this works.
* gdk/win32/gdkselection-win32.c (gdk_selection_convert): Fix
non-ASCII paste from the clipboard: Try getting the same formats
from the Windows clipboard that gdk_property_change() puts there:
CF_UNICODETEXT, UTF8_STRING or CF_TEXT+CF_LOCALE.
* gdk/win32/gdkproperty-win32.c (gdk_property_change): When
storing text on the clipboard, handle non-ASCII text
correctly. The logic is as follows:
If we have only ASCII characters, use CF_TEXT.
Else, if we are on NT, use CF_UNICODETEXT.
Else (we are on Win9x), if all the characters are present in the
code page of some installed locale, use CF_TEXT and also set
CF_LOCALE to that locale.
Else (still on Win9x) store as RTF. We use a very simple RTF
string, just the text, no fonts or other crap, with the non-ASCII
characters as Unicode \uN keywords. Additionally, also store the
UTF-8 string as such, under the format "UTF8_STRING", so that GDK
can also paste from the Clipboard what it has copied there. (Thus
no need to implement any RTF parser.)
(find_common_locale): New function, implements the search for a
locale for case 3 above.
* gdk/win32/gdkglobals-win32.c: New global variables
compound_text, text_uri_list, utf8_string, cf_rtf and
cf_utf8_string.
* gdk/win32/gdkim-win32.c (_gdk_ucs2_to_utf8): New function,
converts from a wchar_t string to UTF-8.
(_gdk_utf8_to_ucs2): Rename from _gdk_win32_nmbstowchar_ts.
(_gdk_utf8_to_wcs): Rename from gdk_nmbstowchar_ts.
* gdk/win32/gdkevents-win32.c (build_keypress_event): Use
_gdk_ucs2_to_utf8().
* gdk/win32/gdkselection-win32.c: Remove some unnecessary logging.
* gdk/win32/gdkdnd-win32.c: Plug memory leaks, the
gdk_drag_context_ref() was called unnecessarily in a couple of
places, meaning drag contexts were never freed. The same memory
leaks seem to be present in gdk/linux-fb/gdkselection-fb.c, BTW.
(gdk_drop_reply): For WIN32_DROPFILES drops, free the temporarily
stored file list.
* gdk/win32/gdkselection-win32.c: Clarify the use of the
sel_prop_table. Now it is used only for storing the GDK_SELECTION
"properties".
The file names dropped with WM_DROPFILES -style DND is stored
temporarily (between the drop and the target picking them up) in a
separate place.
Have a separate hash table to map selection atoms to owner
windows. This used to be quite mixed up.
(_gdk_dropfiles_store): New function, to store the dropped file
list for the drop target to possibly fetch, and clear it
afterwards, from gdk_drop_reply().
(gdk_selection_owner_get): Much simplified now.
Wed Jan 9 19:10:07 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeselection.c
(_gtk_tree_selection_internal_select_node): Now we test we can
unselect nodes before selecting new ones.
(gtk_tree_selection_real_select_node): be careful comparing booleans.
Wed Jan 9 21:31:44 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_sort): pass NULL to
gtk_tree_model_rows_reordered and not an iter with user_data
set to NULL (which is an invalid liststore iter, so
iter_n_children failed, etc)
Wed Jan 9 11:29:44 2002 Owen Taylor <otaylor@redhat.com>
* Makefile.am (s-enum-types-h): Include glib-object.h,
Add G_BEGIN_DECLS/END_DECLS to gdk-pixbuf-enum-types.h. (#68325,
Mikael Hermansson)
* *.h: G_BEGIN_DECLS cleanups.
Wed Jan 9 11:13:12 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmenuitem.c (_gtk_menu_item_refresh_accel_path):
Fix problem with menus without accel groups, such as the
menus for option menus.
* gtk/gtkpaned.c (gtk_paned_expose): Only conditionalize
drawing of handle on whether both children are visible,
not the drawing of the other child!. (#68325, Diego Gonzalez)
Wed Jan 9 10:20:16 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkgc-c11.c: Check for
RENDER before trying to use it... XRenderFindFormat() prints
warnings if called when extension isn't present.
Wed Jan 9 13:20:14 2002 Tim Janik <timj@gtk.org>
* gtk/gtkviewport.c (gtk_viewport_size_allocate): small but important
fix to force vadjustments at size_alocate time from Xavier Ordoquy
<mcarkan@users.sourceforge.net>.
* gtk/gtkplug.c, gtk/gtksocket.c: Speak of window IDs rather
than XIDs in the docs.
* gtk/gtkclipboard.c (gtk_clipboard_clear): Fix docs.
* gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkplug.sgml: speak of
window IDs rather than XIDs.
Tue Jan 8 18:39:23 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): wow!
Am I a moron or what 0 < 1 is not equivalent to strcmp ("a", "b")
Tue Jan 8 15:53:28 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_find_widget): Fix coordinate
translations, once and for all.
* gtk/gtktextbuffer.c (paste_from_buffer): Free
the ClipboardRequest structure. (#66198, HideToshi
Tajima)
Tue Jan 8 14:51:19 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_expose): Don't draw
the handle if we aren't showing both children.
(#68135, Diego Gonzalez)
Tue Jan 8 14:45:43 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Fix
leak of result of gtk_container_get_children().
Tue Jan 8 14:42:19 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtktoolbar.c: Fix leaks of results of
gtk_container_get_children(). (#68199, Damon Chaplin)
Tue Jan 8 14:19:43 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
Fix problem where child->requisition was accessed
directly instead of calling get_child_requisition()
(#68199, Damon Chaplin)
Tue Jan 8 10:58:04 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf-util.c (gdk_pixbuf_saturate_and_pixelate):
- Massive cleanup, make actually legible.
- Fix some clamp-to-range bugs found by Jim Cape (#68231).
- Add a g_return_if_fail() if src and dest alpha don't match.
- Allow for src_rowstride != dest_rowstride.
Mon Jan 7 22:19:32 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (draw_with_pixmaps): Fix a
problem where were the offset into the image was passed
into convert_to_format() wrong.
* gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_pixbuf): Call
gdk_x11_drawable_update_picture_clip () before using
the picture; allow update_picture_clip() to take a NULL gc
to mean no clipping.
Mon Jan 7 08:48:23 2002 Tim Janik <timj@gtk.org>
* gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
the pointer by x/y_offset into the new window when we found
the drag destination.
* gtk/gtkaccelmap.c (internal_change_entry): fix return code
for simulation when the entry already contains the required
accel key and mod.
2002-01-06 Havoc Pennington <hp@pobox.com>
* gtk/gtk-docs.sgml: remove gtk- prefix from TreeView and a few
other entities, more consistent anyway (I thought this would make
links to "GtkTreeView" etc. go to the ref page, not the struct,
but it wasn't the problem, the issue is the way gtkdoc-mkdb
decides what's an object, see CheckIsObject() routine)
* gtk/changes-1.2.sgml: sgml fixes to get rid of warnings
* gtk/changes-2.0.sgml: ditto
* gtk/question_index.sgml: add some questions
2002-01-04 Hans Breuer <hans@breuer.org>
* gdk/gdkdraw.c gdk/gdkpixbuf-drawable.c :
need to cast image->mem away from void* to avoid
'error C2036: 'void *' : unknown size'. Doing pointer
arithmetics on void pointers is a GCCism afaik.
* gdk/gdkpixbuf-render.c : #include "gdkinternals.h" for
_gdk_draw_pixbuf ()
* gdk/makefile.msc gdk/win32/makefile.msc
gdk/gtk/makefile.msc.in : use -FI msvc_recommended_pragmas.h
* gdk/win32/gdkdrawable-win32.c : use _gkd_win32_copy_to_image
and take care of image->visual possibly NULL.
* gdk/win32/gdkimage-win32.c : implement _gdk_image_new_for_depth(),
_gdk_win32_copy_to_image() and _gdk_windowing_bits_for_depth().
Again take care of image->visual possibly NULL.
* gdk/win32/gdkprivate-win32.h : declare _gdk_win32_copy_to_image()
* gdk/win32/gdkevents-win32.c : use gdk_drawable_get_colormap
instead of private field access
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) : adapt
colormap setting to the gdk-X behaviour
2002-01-04 Havoc Pennington <hp@pobox.com>
* gtk/gtkwidget.c (gtk_widget_set_sensitive): tiny docs change
2002-01-04 Havoc Pennington <hp@pobox.com>
* gtk/question_index.sgml: add question to help people find
gtk_widget_set_sensitive() if they're used to another term for
that.