Compare commits

...

332 Commits

Author SHA1 Message Date
Owen Taylor
0b4349a1bf === Released 2.2.2 ===
Mon Jun  9 16:29:51 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.2.2 ===

        * demos/gtk-demo/Makefile.am (demos.h): srcdir != builddir fix.
2003-06-09 21:59:58 +00:00
Andras Timar
fc2068e314 Updated Hungarian Translation.
2003-07-10  Andras Timar  <timar@gnome.hu>

        * hu.po : Updated Hungarian Translation.
2003-06-09 21:59:19 +00:00
Owen Taylor
4867aedf79 === Released 2.2.2 ===
Mon Jun  9 16:29:51 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.2.2 ===

        * demos/gtk-demo/Makefile.am (demos.h): srcdir != builddir fix.
2003-06-09 21:59:19 +00:00
Owen Taylor
5c0c274d81 Back out event->window test - it wasn't needed because of the call to
Mon Jun  9 16:18:11 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_button_press): Back
        out event->window test - it wasn't needed because
        of the call to get_widget_coordinates().

        * gtk/gtknotebook.c (gtk_notebook_button_press): Remove
        call to gtk_widget_grab_focus() when not clicking on
        any tabs. (Real fix for #114534)
2003-06-09 20:29:21 +00:00
Kristian Rietveld
02c32756ef check if width is !null, not *width. Doh.
Mon Jun  9 21:25:13 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_get_size):
	check if width is !null, not *width. Doh.
2003-06-09 19:26:32 +00:00
Kristian Rietveld
7ac4f264a7 Remove the weird dx logic, get all cell_area and background_area
Mon Jun  9 21:01:16 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	Remove the weird dx logic, get all cell_area and background_area
	calculations right. Not sure what was up with it before. (Fixes
	#110989, testcase from Vasco Alexandre da Silva Costa).

	* NEWS: Updated for this bug.
2003-06-09 19:04:47 +00:00
Dmitry Mastrukov
378a7488fb be.po: Updated Belarusian translation from Belarusian team <i18n@mova.org>. 2003-06-09 04:29:15 +00:00
Owen Taylor
500bca8af3 Updated.
Sun Jun  8 23:43:47 2003  Owen Taylor  <otaylor@redhat.com>

        * NEWS: Updated.

        * configure.in: Version to 2.2.2, interface age 2.
2003-06-09 04:24:51 +00:00
Owen Taylor
f1bcb52ccb Use application/x-rootwindow-drop for root window drops. (#108670, Alex
Sun Jun  8 22:03:09 2003  Owen Taylor  <otaylor@redhat.com>

        * tests/testdnd.c: Use application/x-rootwindow-drop for
        root window drops. (#108670, Alex Larsson)

        * gdk/x11/gdkdnd-x11.c (gdk_drag_motion) gtk/gtkdnd.c (gtk_drag_drop):
        Accept either application/x-rootwin-drop (what GTK+ has always used)
        or application/x-rootwindow-drop (what the XDND standard specifies).
2003-06-09 02:13:06 +00:00
Owen Taylor
6a422f88bc NULL out private->parent, since after destruction it might not be valid
* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
        NULL out private->parent, since after destruction
        it might not be valid any more.

        * gdk/gdkwindow.c (gdk_window_is_viewable): Fix some
        accesses before g_return_val_if_fail(). Treat
        DESTROYED windows as unmapped.
2003-06-09 02:12:11 +00:00
Owen Taylor
995098e65e Before delivering an event to a widget, check that (if relevant), the
Fri Jun  6 11:07:33 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (event_window_still_viewable):
        Before delivering an event to a widget, check that
        (if relevant), the event's window is still viewable.
        (#105642, Dennis Björklund)

        * gdk/gdkwindow.c (_gdk_window_destroy_hierarchy):
        NULL out private->parent, since after destruction
        it might not be valid any more.

        * gdk/gdkwindow.c (gdk_window_is_viewable): Fix some
        accesses before g_return_val_if_fail(). Treat
        DESTROYED windows as unmapped.
2003-06-09 01:54:48 +00:00
Soeren Sandmann
afa7fb3730 swap G and B. Fixes (#114669)
Sun Jun  8 18:59:01 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/gdkpixbuf-drawable.c (G8fromRGB565): swap G and B.
	Fixes (#114669)
2003-06-08 16:45:07 +00:00
Owen Taylor
9ec02189ad Recompute unconditionally in gtk_entry_style_set, and in a new
Thu Jun  5 09:28:03 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c: Recompute unconditionally in
        gtk_entry_style_set, and in a new gtk_label_screen_changed().
        Protect the guts of recompute_idle_func() with
        gtk_widget_has_screen(). (#114040, Morten Welinder)
        Fix FALSE/0 confusion.
2003-06-08 16:18:02 +00:00
Owen Taylor
58877f347b Fix bug with set_adjustment (viewport, NULL);
Sun Jun  8 11:27:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkviewport.c (viewport_set_adjustment): Fix bug with
        set_adjustment (viewport, NULL);
2003-06-08 15:33:16 +00:00
Owen Taylor
f1ac2debf5 Many fixes, along with extensive cleanups and refactoring of code to
Fri Jun  6 16:25:44 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkviewport.c: Many fixes, along with extensive cleanups and
        refactoring of code to reduce duplication; fixes include:

        - gtk_viewport_realize(): Position the window correct from adjustment
        values. (#110737, Michael Natterer)

        - Remove some division-by-zero checks in places where there is no
        longer division. (#110737)

        - gtk_viewport_class_init: Make the hadjustment/vadjustment properties
        G_PARAM_CONSTRUCT, so that there will always be adjustments, even
        if gtk_viewport_new isn't used (#101135, Thomas Leonard).

        - Switch over to encapsulated lazy-creation for hadjustment/
        vadjustment; even with the CONSTRUCT property, we need this after
        destroy.

        - When updating the adjustment, immediate set their values to
        match the the current range of the viewport, and update the
        viewport position to match the value of the new adjustments.
        (Part of #1165)
2003-06-06 23:08:27 +00:00
Tor Lillqvist
108ab31b50 Fix typo.
2003-06-06  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h: Fix typo.
2003-06-06 22:58:52 +00:00
Tor Lillqvist
cd47f2bcef Set graphics_exposures and subwindow_mode, too, even if they aren't
2003-06-06  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Set
	graphics_exposures and subwindow_mode, too, even if they aren't
	currently used.
2003-06-06 22:48:22 +00:00
Kristian Rietveld
8af31223af made expand_collapse_timeout a wrapper with locks around
Fri Jun  6 23:38:23 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (do_expand_collapse),
	(expand_collapse_timeout), (cancel_arrow_animation): made
	expand_collapse_timeout a wrapper with locks around
	do_expand_collapse, made cancel_arrow_animation use
	do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from
	Peter Bloomfield).
2003-06-06 21:41:18 +00:00
Hidetoshi Tajima
81cde9d6cb Add a 'finalizing' flag to keep preedit-[start,changed,end] signals from
Fri Jun  6 11:05:45 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

	* modules/input/gtkimcontextxim.h (struct _GtkIMContextXIM):
	* modules/input/gtkimcontextxim.c (preedit_start_callback,
	preedit_draw_callback, preedit_done_callback): Add a 'finalizing' flag
	to keep preedit-[start,changed,end] signals from being called during
	finalization (#111861).
2003-06-06 19:42:38 +00:00
Noah Levitt
5213be07e0 Ignore button presses that are not on the tab (#114534).
2003-06-05  Noah Levitt  <nlevitt@columbia.edu>

	* gtk/gtknotebook.c (gtk_notebook_button_press): Ignore button
	presses that are not on the tab (#114534).
2003-06-06 01:57:08 +00:00
Owen Taylor
7db52619ba Conditionalize deendencies for gdk-pixbuf-csource on cross-compilation
Thu Jun  5 20:35:40 2003  Owen Taylor  <otaylor@redhat.com>

        * demos/Makefile.am: Conditionalize deendencies for
        gdk-pixbuf-csource on cross-compilation (#112391, J. Ali Harlowe).
2003-06-06 00:52:59 +00:00
Owen Taylor
69881e62ca Handle gtk_window_get_geometry_info() returning NULL. (#107311, John
Thu Jun  5 20:12:51 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_get_default_size): Handle
        gtk_window_get_geometry_info() returning NULL.
        (#107311, John Finlay)
2003-06-06 00:17:59 +00:00
Owen Taylor
ee4333f91e Subtract off twice the border width from the width/height, not 1x the
Thu Jun  5 19:24:33 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktoolbar.c (gtk_toolbar_expose): Subtract off
        twice the border width from the width/height, not
        1x the border width. (#106336, Rodney Dawes)
2003-06-05 23:38:07 +00:00
Owen Taylor
5ee5ee3f6a If at the end of the buffer, move to the end iter - parallels behavior of
Thu Jun  5 15:33:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_move_iter_to_next_line):
        If at the end of the buffer, move to the end iter -
        parallels behavior of move_iter_to_previous_line.
        (#81960, Padraig O'Briain)
2003-06-05 23:08:57 +00:00
Owen Taylor
03d2e8be66 #80023, Yao Zhang, TOKUNAGA Hiroyuki
Thu Jun  5 16:12:54 2003  Owen Taylor  <otaylor@redhat.com>

        #80023, Yao Zhang, TOKUNAGA Hiroyuki

        * gtk/gtktextlayout.c (gtk_text_layout_get_cursor_locations):
        Account for the preedit cursor offset if the iter passed
        in is at the same place as the insertion cursor.

        * gtk/gtktextview.c (gtk_text_view_get_cursor_location):
        Encapsulate getting the insertion cursor location.

        * gtk/gtktextview.c (gtk_text_view_update_im_spot_location):
        Pass the real y/height to the IM context. Take
        text_view->x/yoffset into account.
2003-06-05 23:04:36 +00:00
Owen Taylor
3bb07953e6 Never scroll on focus in (#81893, Patch from Paolo Maggi)
Thu Jun  5 16:52:54 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.[ch]: Never scroll on focus in
        (#81893, Patch from Paolo Maggi)

        * gtk/gtktextview.c (gtk_text_view_scroll_[h]pages):
        Scroll to the current cursor location before handling
        the action, in case the user just tabbed in
        and the cursor is offscreen.
2003-06-05 22:59:23 +00:00
Owen Taylor
b07b60261c #107883, Gustavo Giráldez
Thu Jun  5 17:20:40 2003  Owen Taylor  <otaylor@redhat.com>

         #107883, Gustavo Giráldez

        * gtk/gtktextlayout.c (gtk_text_layout_emit_changed):
        Split out the case where we know we changed, and
        already dealt with our cached line being invalidated
        from external calls to gtk_text_layout_changed.

        * gtk/gtktextlayout.c (gtk_text_layout_changed):
        Check if the invalidate yrange intersects our
        cached line, and clear it if necessary.
2003-06-05 22:34:43 +00:00
Tor Lillqvist
2866fc45f4 Handle global filters.
2003-06-05  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Handle global
	filters.
2003-06-05 21:50:18 +00:00
Matthias Clasen
ba6e0c4c63 Fix for #84668, reported by Torbjrn Andersson:
2003-06-05  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c: Fix for #84668, reported by Torbjrn Andersson:
	(gtk_text_view_grab_notify):
	(gtk_text_view_state_changed): Implement these
	to unobscure cursor when grab shadowed or insensitised.
	(gtk_text_view_unobscure_mouse_cursor): New function to undo the
	effect of gtk_text_view_obscure_mouse_cursor(). Code lifted from
	gtk_text_view_motion_event().
	(gtk_text_view_motion_event): Use gtk_text_view_obscure_mouse_cursor().
2003-06-05 19:32:52 +00:00
Matthias Clasen
83202df4d2 Fix a compiler warning caused by the previous commit. 2003-06-05 19:22:22 +00:00
Matthias Clasen
90b8285dda New keybinding signal for (un)selecting the whole buffer. Bound to
2003-06-05  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c (select_all): New keybinding signal for
	(un)selecting the whole buffer. Bound to C-a/C-\.  (see #107889)
2003-06-05 19:12:52 +00:00
Vincent van Adrighem
7f93523dd5 Dutch translation updated.
2003-06-05  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated.
2003-06-05 19:05:42 +00:00
Matthias Clasen
f5397b4d79 Add some questions. 2003-06-05 00:49:30 +00:00
Matthias Clasen
d55fe6c466 Document restriction on types.
2003-06-05  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreestore.c (gtk_tree_store_new):
	* gtk/gtkliststore.c (gtk_list_store_new): Document restriction on
	types.
2003-06-04 23:51:46 +00:00
Owen Taylor
4e93f24b89 When drawing underlines, join up adjacent runs where possible, so we don't
Wed Jun  4 19:42:17 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
        When drawing underlines, join up adjacent runs
        where possible, so we don't get changes in
        shaper/font/etc. breaking underlines. (#103662,
        Kang Jeong-Hee)
2003-06-04 23:46:46 +00:00
Jonathan Blandford
f856e7a5a2 Slightly modified patch from Owen Taylor <otaylor@redhat.com> to improve
Wed Jun  4 19:22:58 2003  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_level_find_insert):
        Slightly modified patch from Owen Taylor <otaylor@redhat.com> to
        improve the speed of inserting rows into an already sorted list,
        #109292
2003-06-04 23:45:56 +00:00
Owen Taylor
03baed131e Keep track of when we have a clip mask set for the GC, and when we unset
Wed Jun  4 19:24:28 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Keep
        track of when we have a clip mask set for the GC,
        and when we unset it, or switch to a clip region,
        immediately call XSetClipMask (..., None) to avoid
        Xlib caching stale data. (#111806)

        * gtk/gtktextdisplay.c: Don't set a clip mask
        when drawing alpha pixmaps; it isn't necessary any more.
        (#111806)
2003-06-04 23:26:39 +00:00
Owen Taylor
62f6e1b8c0 gtk/gtkradiobutton.c (gtk_radio_button_draw_indicator): Use
Wed Jun  4 18:27:44 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcheckbutton.c (gtk_real_check_button_draw_indicator):
        gtk/gtkradiobutton.c (gtk_radio_button_draw_indicator):
        Use GTK_WIDGET_IS_SENSITIVE(), not GTK_WIDGET_SENSITIVE
        (#92548, Tim Evans)

        * gtk/gtkcheckmenuitem.c (gtk_real_check_menu_item_draw_indicator)
        gtk/gtkradiomenuitem.c (gtk_radio_menu_item_draw_indicator): If
        Use state_type = STATE_INSENSITIVE for insensitive menu items.
2003-06-04 22:44:31 +00:00
Kristian Rietveld
c5f5550f3c use a silent assert for get_info. (reported by Michael Natterer),
Wed Jun  4 21:18:55 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_drag_begin): use a silent
	assert for get_info. (reported by Michael Natterer),
	(gtk_tree_view_expand_all_emission_helper),
	(gtk_tree_view_expand_all_helper): emit row_expanded for all
	expanded rows during an _expand_all operation. (Fixes #111280,
	reported by Benjamin Bayart).
2003-06-04 19:22:03 +00:00
Owen Taylor
c42aa348c1 Don't respond to pings on a root window; prevents infinite loops if we are
Tue Jun  3 18:32:30 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Don't
        respond to pings on a root window; prevents infinite
        loops if we are selecting for SubstructureNotify on the
        root window. (#111945, Sergey V. Udaltsov)
2003-06-03 22:44:26 +00:00
Owen Taylor
0fb6bcbf96 #71597, reported by Morten Welinder
Tue Jun  3 17:39:16 2003  Owen Taylor  <otaylor@redhat.com>

        #71597, reported by Morten Welinder

        * gdk/gdkpixbuf-drawable.c (rgb888amsb): Fix and simplify
        (Patch from Christian Petig)

        * gdk/gdkpixbuf-drawable.c (rgb{555,565}{a,}{msb,lsb}):
        Major rewrite of 555 and 565 conversion routines:

        - Move all the bit shifting into a small block of macros,
          eliminating much duplication of complicated arithmetic.
        - Get rid of 2-pixels at a time code, which was buggy,
          hard to maintain, caused unaligned accesses, and
          probably didn't actually perform any better.
        - Simplify cases where different data types were
          used for the little and big endian cases, use
          GUINT16_SWAP_LE_BE() where appropriate.
2003-06-03 22:09:28 +00:00
Owen Taylor
6520b9b607 Remove bad optimization for src_rowstride == dest_stride. (Didn't consider
Tue Jun  3 15:05:47 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (convert_to_format): Remove
        bad optimization for src_rowstride == dest_stride.
        (Didn't consider the case where we were copying only
        partial widths of a wider source buffer)
        (#113034, reported by Hans Petter Jansson)
2003-06-03 19:12:46 +00:00
Michael Natterer
c311d5092e reenabled button_release events for xinput devices. (#113948)
2003-06-03  Michael Natterer  <mitch@gimp.org>

	* gdk/x11/gdkinput-x11.c (_gdk_input_common_find_events):
	reenabled button_release events for xinput devices. (#113948)
2003-06-03 18:47:37 +00:00
Dafydd Harries
541c59df2b Complete (if rough) Welsh translation. 2003-06-03 15:51:43 +00:00
Christian Rose
f79c3a2434 Updated Limburgish translation by Mathieu van Woerkom
2003-06-03  Christian Rose  <menthos@menthos.com>

	* li.po: Updated Limburgish translation by
	Mathieu van Woerkom <mathieu.brabants.org>.
2003-06-03 12:58:58 +00:00
Dafydd Harries
6e260ca284 More Welsh. 2003-06-02 23:24:42 +00:00
Owen Taylor
16e1a7e5f0 Don't map the event window if the notebook isn't mapped. (#113980, Richard
Mon Jun  2 18:58:54 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_size_allocate): Don't
        map the event window if the notebook isn't mapped. (#113980,
        Richard Reich)
2003-06-02 23:06:21 +00:00
Matthias Clasen
8cbf4cec97 Document data_length == -1, add an example. (#97290)
2003-06-03  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixdata.c (gdk_pixbuf_new_from_inline): Document
	data_length == -1, add an example.  (#97290)
2003-06-02 22:46:00 +00:00
Noah Levitt
8bc79c100d Converted from broken-TSCII to UTF-8.
2003-06-02  Noah Levitt  <nlevitt@columbia.edu>

	* ta.po: Converted from broken-TSCII to UTF-8.
2003-06-02 22:15:20 +00:00
Sven Neumann
ce3fc77ad8 added a missing cast.
2003-06-02  Sven Neumann  <sven@gimp.org>

	* gtk/gtkprogress.c (gtk_progress_changed): added a missing cast.

	* gdk/gdkrgb.c (gdk_rgb_try_colormap): removed an unused variable.
2003-06-02 14:15:03 +00:00
Dafydd Harries
7e1a54df8b More Welsh. 2003-06-02 01:02:11 +00:00
Pauli Virtanen
edf71ecbfe Updated Finnish translation.
2003-06-01  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2003-06-01 17:44:14 +00:00
Ole Laursen
9108c09a0c Updated Danish translation.
2003-06-01  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2003-06-01 16:51:58 +00:00
Changwoo Ryu
d87e3afe12 Updated Korean translation.
2003-06-02  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.
2003-06-01 15:23:35 +00:00
Duarte Loreto
892034a7c0 Updated Portuguese translation.
2003-06-01  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2003-06-01 14:26:21 +00:00
Dafydd Harries
5087bb771a More Welsh. 2003-06-01 00:25:40 +00:00
Matthias Clasen
ff585a1bbe Fix misleading documentation of rowstride. (#113924, Noah Levitt)
2003-06-01  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixdata.h (struct _GdkPixdata): Fix misleading documentation
	of rowstride.  (#113924, Noah Levitt)
2003-05-31 23:51:17 +00:00
Matthias Clasen
5614108365 Add some hints and an example to the docs. (#98427)
2003-06-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwindow.c (gtk_window_parse_geometry): Add some hints and
	an example to the docs.  (#98427)
2003-05-31 23:30:42 +00:00
Matthias Clasen
52cf94a376 Remove manually inserted anchors, gtk-doc emits anchors for all objects
2003-06-01  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf/tmpl/gdk-pixbuf.sgml:
	* gdk-pixbuf/tmpl/animation.sgml: Remove manually inserted
	anchors, gtk-doc emits anchors for all objects since Dec 2002.
2003-05-31 22:37:50 +00:00
Kjartan Maraas
d8be69ef4c Update this
2003-05-31  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Update this
2003-05-31 15:32:52 +00:00
Dafydd Harries
00dfe44873 Big update for GTK+ Welsh translation. (My first checkin! Hwre^!) 2003-05-31 14:49:51 +00:00
Christophe Merlet
39fc17f19a Updated French translation. 2003-05-31 10:52:58 +00:00
Christian Neumair
3932f96618 Updated German translation. 2003-05-31 10:08:25 +00:00
Christian Rose
1eb3a99535 Updated Swedish translation.
2003-05-31  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2003-05-31 00:40:46 +00:00
Miloslav Trmac
e9598560eb Update Czech translation, adjust terminology 2003-05-30 23:44:13 +00:00
Owen Taylor
ba3dec7e39 Rework debug_default handling to work with autoconf-2.5x. (#106348)
Fri May 30 15:58:33 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Rework debug_default handling to work
        with autoconf-2.5x. (#106348)
2003-05-30 20:15:43 +00:00
Owen Taylor
60bada5f3a Add a missing name 2003-05-30 20:11:17 +00:00
Kristian Rietveld
e6a5873929 Committing for kenneth:
Fri May 30 20:24:11 2003  Kristian Rietveld  <kris@gtk.org>

	* configure.in: added "li" to ALL_LINGUAS
	* po/li.po: added Limburgish translation from Mathieu van Woerkom
	<mathieu@brabants.org>
2003-05-30 18:32:45 +00:00
Hidetoshi Tajima
ca973340c0 use GETTEXT_PACKAGE to get a translation for "ipa"(#113850).
Thu May 29 18:30:55 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

	* modules/input/imipa.c:
	use GETTEXT_PACKAGE to get a translation for "ipa"(#113850).
2003-05-30 01:32:42 +00:00
Hidetoshi Tajima
b4046f7c40 use GETTEXT_PACKAGE to get a translation for "Default"(#113850).
Thu May 29 18:09:57 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

	* gtk/gtkimmodule.c (_gtk_im_module_list):
	use GETTEXT_PACKAGE to get a translation for "Default"(#113850).
2003-05-30 01:10:50 +00:00
Hidetoshi Tajima
a0c3fd29df make "Default" label of default input method localizable. use translations
Thu May 29 09:34:05 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

        * gtk/gtkimmodule.c (_gtk_im_module_list): make "Default"
        label of default input method localizable.
        * gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
        use translations of input method context names
        * modules/input/imam-et.c, modules/input/imcyrillic-translit.c,
          modules/input/iminuktitut.c, modules/input/imthai-broken.c,
          modules/input/imti-er.c, modules/input/imti-et.c
          modules/input/imviqr.c, modules/input/imxim.c
        use GETTEXT_PACKAGE instead of "gtk+" for domain name.
        (#113850).
2003-05-30 00:34:25 +00:00
Kristian Rietveld
d4a787f2e1 put the focus grab separate, the user might clear the tree in the focus-in
Thu May 29 18:23:01 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): put the focus
	grab separate, the user might clear the tree in the focus-in
	callback. (Fixes #113086, testcase from Felipe Heidrich).
2003-05-29 16:27:16 +00:00
Kristian Rietveld
2ab81b8093 reset a bunch of row reference when we unset the model. Also reset dy and
Thu May 29 18:06:26 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_model_set_model): reset a bunch
	of row reference when we unset the model. Also reset
	dy and top_row_dy. (Fixes #109289, patch from Owen Taylor).
2003-05-29 16:09:11 +00:00
Kristian Rietveld
4dfc635844 cancel the current editing, if it exists. (Fixes #108956, reported by
Thu May 29 17:12:19 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_set_cursor_on_cell): cancel
	the current editing, if it exists. (Fixes #108956, reported by
	Michael Natterer).
2003-05-29 15:14:19 +00:00
Kristian Rietveld
6a60f3a6b8 new function, (gtk_tree_view_row_deleted): traverse the tree from the
Thu May 29 17:06:09 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (check_selection_helper): new function,
	(gtk_tree_view_row_deleted): traverse the tree from the
	deleted node to see whether the selection changed, instead of
	just checking this node. (Fixes #107400, reported by 'Duncan').
2003-05-29 15:09:03 +00:00
Kristian Rietveld
8d97bc30c9 set the DnD icon in _drag_begin instead of _maybe_begin_dragging_row, so
Thu May 29 16:31:34 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_maybe_begin_dragging_row),
	(gtk_tree_view_drag_begin): set the DnD icon in _drag_begin
	instead of _maybe_begin_dragging_row, so the icon can be
	overridden by apps. (Fixes #104374, patch from Daniel Elstner).
2003-05-29 14:34:19 +00:00
Kristian Rietveld
0ed62104fe correct cell_area x/width for the expander if needed. (Fixes #101748,
Thu May 29 16:14:04 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_start_editing): correct
	cell_area x/width for the expander if needed. (Fixes #101748,
	reported by Dave Cook and Mariano Suarez-Alvarez).
2003-05-29 14:20:10 +00:00
Kristian Rietveld
1a866a56a4 check if tree/node are still the same after _internal_select_node. (Fixes
Thu May 29 16:01:38 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_set_cursor): check
	if tree/node are still the same after _internal_select_node.
	(Fixes #92256, reported by edscott).
2003-05-29 14:05:03 +00:00
Kristian Rietveld
bec6497cca Fixes #75745, reported by Richard Hult.
Thu May 29 15:38:30 2003  Kristian Rietveld  <kris@gtk.org>

	Fixes #75745, reported by Richard Hult.

	* gtk/gtktreeview.c (gtk_tree_view_bin_expose): set/unset
	GTK_CELL_RENDERER_FOCUSED flag whether the current node is the
	cursor or not.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	if we are rendering a cursor row, and the cell the be
	processed has focus, then set the GTK_CELL_RENDERER_FOCUSED
	flag (else we unset it).
2003-05-29 13:41:16 +00:00
Matthias Clasen
321c717741 Remove dubious bitfields of unspecified signedness. (#112919, Morten
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* io-wbmp.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)gdk-p

	* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
	of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)

	* gtk/gtkwindow-decorate.c:
	* gtk/gtktreeprivate.h:
	* gtk/gtkdnd.c:
	* gdk/win32/gdkwindow-win32.h:
	* gdk/linux-fb/gdkprivate-fb.h:
	* gdk/linux-fb/gdkkeyboard-fb.c: Remove dubious bitfields of
	unspecified signedness.  (#112919, Morten Welinder)

	* gtk/queryimmodules.c (escape_string):
	* gtk/gtktextbtree.c (_gtk_text_btree_get_text):
	* gtk/gtksettings.c (_gtk_settings_parse_convert):
	* gtk/gtkrc.c (gtk_rc_parse_assignment):
	* gtk/gtkinputdialog.c (gtk_input_dialog_set_key):
	* gdk/x11/gdkdisplay-x11.c (escape_for_xmessage): Replace all
	occurances of g_string_new ("") by g_string_new (NULL). (#106975,
	Morten Welinder)
2003-05-27 21:10:23 +00:00
Tor Lillqvist
8169f009fe Only include the Default and Emacs themes' gtkrc files. Include
2003-05-27  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Only include the Default and Emacs themes' gtkrc
	files. Include share/gtk-doc/{gdk-pixbuf,gdk,gtk}.

	* gdk/Makefile.am: libgdk-win32-2.0.la depends on
	win32/libgdk-win32.la.

	* gtk/gtk.def: Add gtk_tree_view_column_cell_get_position.
2003-05-27 18:31:36 +00:00
Matthias Clasen
9579817d6d Document allowed values for adjustments which are used in scrollbars.
* gtk/tmpl/gtkadjustment.sgml: Document allowed values for
	adjustments which are used in scrollbars.  (#108448, Ernst Lippe)
2003-05-26 22:58:08 +00:00
Matthias Clasen
539579842d Fix example. (#113604, Julien Moutte)
2003-05-27  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtkradiomenuitem.sgml: Fix example.  (#113604,
	Julien Moutte)
2003-05-26 22:34:05 +00:00
Vincent van Adrighem
0df1bbcddf Dutch translation updated by Vincent van Adrighem.
2003-05-26  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Vincent van Adrighem.
2003-05-26 12:05:13 +00:00
Matthias Clasen
cc02e55884 Update color on focus out of hex_entry. (#112665) (hex_focus_out): New
2003-05-23  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (gtk_color_selection_init): Update color on
	focus out of hex_entry.  (#112665)
	(hex_focus_out): New signal handler for focus out of hex entry.
2003-05-22 22:23:53 +00:00
Matthias Clasen
3d5517fe1d (gtk_file_selection_set_filename): Add a hint about opening
directories.  (#113175)
2003-05-22 00:24:17 +00:00
Matthias Clasen
8770b66c61 Some keynav improvements for the "Rename File" and "Create Directory"
2003-05-22  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkfilesel.c (gtk_file_selection_create_dir):
	(gtk_file_selection_rename_file): Some keynav improvements for the
	"Rename File" and "Create Directory" subdialogs: Enter in entry
	activates default, default is "Create"/"Rename", Escape cancels
	dialog.  (#113110)
2003-05-21 22:53:01 +00:00
Owen Taylor
9c8be35b4d Always queue a resize ... we rely on the size-allocate to do the update,
Wed May 21 15:53:14 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkprogress.c (gtk_progress_set_format_string,
        gtk_progress_set_show_text): Always queue a resize ...
        we rely on the size-allocate to do the update, plus a
        different format can actually change our size requisition.
        (#111052)

        * gtk/gtkprogress.c (gtk_progress_changed): Track
        ::changed as well as ::value_changed, and queue a
        resize on ::changed when necessary.

        * gtk/gtkprogress.c (gtk_progress_set_adjustment):
        Call gtk_progress_changed() here to update or
        queue a resize as necessary.
2003-05-21 21:23:50 +00:00
Hidetoshi Tajima
019bac19a9 added composing rules of Greek acceted letters, patch by Vasilis Vasaitis
Wed May 21 14:06:13 2003  Hidetoshi Tajima  <hidetoshi.tajima@sun.com>

	* gtk/gtkimcontextsimple.c: added composing rules of
	Greek acceted letters, patch by Vasilis Vasaitis (#107507)
2003-05-21 21:10:31 +00:00
Hidetoshi Tajima
f3af493c21 code that can check the compose table for ascending order, by Vasilis
* gtk/gtkimcontextsimple.c:
	code that can check the compose table for ascending order,
	by Vasilis Vasaitis (#104862).
2003-05-21 19:17:07 +00:00
Owen Taylor
b0ed6224db We need to pass the unmasked state to
Wed May 21 12:52:01 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
        to pass the unmasked state to gdk_keymap_translate_keyboard_state()
        to handle the case where a modifier not in the mask
        (like Num_Lock) changes the key value, so replace
        the masked state with a state/mask pair. (#106913,
        Olivier Ripoll)

        * gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
        in state/mask pair to _gtk_key_hash_lookup()
2003-05-21 17:50:11 +00:00
Hidetoshi Tajima
f576f5c347 fix a memory leak, free input context list (#113259).
* modules/input/gtkimcontextxim.c (xim_info_display_closed):
	fix a memory leak, free input context list (#113259).
2003-05-21 05:00:47 +00:00
Owen Taylor
5f3ce6afb8 Silently accept a missing gtk.immodules file, some people want to run
Tue May 20 17:27:24 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimmodule.c (gtk_im_module_init): Silently
        accept a missing gtk.immodules file, some people
        want to run without one. (#112406, patch from
        Arnaud Charlet)
2003-05-20 21:29:19 +00:00
Owen Taylor
2775064ab9 Fix height/width confusion (#113370, Xan Lopez)
Tue May 20 17:05:31 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_compute_hints): Fix
        height/width confusion (#113370, Xan Lopez)
2003-05-20 21:14:21 +00:00
Owen Taylor
43bb83247c Comprehensively zero all unused parts of client messages (Mainly Motif DND
Tue May 20 15:09:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c gdk/x11/gdkwindow-x11.c: Comprehensively
        zero all unused parts of client messages (Mainly Motif DND
        and EWMH). Also, fix a couple places where we were putting
        contents into Motif DND messages that didn't belong.
        (#113361, EWMH problem reported by Lubos Lunak)

        * gtk/gtkselection.c (_gtk_selection_request): Handle the
        case where the property type for the multiple atoms is
        ATOM_PAIR by doing the conversions ourselve. This is
        needed for Xt inter-operation.
2003-05-20 21:00:54 +00:00
Matthias Clasen
6fcc8afa85 Improve progressive loading from slow sources: (#107368)
2003-05-19  Matthias Clasen  <maclas@gmx.de>

	Improve progressive loading from slow sources:  (#107368)

	* io-gif-animation.c (gdk_pixbuf_gif_anim_get_iter): Initialize
	first_loop_slowness.
	(gdk_pixbuf_gif_anim_iter_advance): Don't wrap during loading if
	the datasource falls behind the speed of the display.

	* io-gif-animation.h: Add a loading flag to GdkPixbufGifAnim and
	first_loop_slowness to GdkPixbufGifAnimIter.
2003-05-19 21:44:18 +00:00
Matthias Clasen
26c2ef7525 Add gtk_tree_row_reference_get_type.
2003-05-17  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtk-sections.txt: Add gtk_tree_row_reference_get_type.
2003-05-16 23:46:00 +00:00
Owen Taylor
e2fd1e2e12 Add a (gint32 *) => (guint32 *) cast. (#108615, Rick Jones)
Wed May 14 18:24:50 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixdata.c (gdk_pixdata_deserialize): Add a
        (gint32 *) => (guint32 *) cast. (#108615, Rick Jones)
2003-05-14 22:26:56 +00:00
Owen Taylor
02c952be3b Fix some typos. (#108381, Morten Welinder.)
Wed May 14 18:12:45 2003  Owen Taylor  <otaylor@redhat.com>

        * autogen.sh (have_libtool): Fix some typos. (#108381,
        Morten Welinder.)
2003-05-14 22:14:43 +00:00
Owen Taylor
726ab80ef8 Patch from Charles Schmidt to add missing notify (#108305)
Wed May 14 16:40:09 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkframe.c (gtk_frame_set_label_widget): Patch
        from Charles Schmidt to add missing notify (#108305)
2003-05-14 21:28:12 +00:00
Owen Taylor
2bd2eb857a Remove unecessary g_return_if_fail(). (#105500, Morten Welinder.)
Wed May 14 16:00:51 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgc-x11.c: Remove unecessary g_return_if_fail().
        (#105500, Morten Welinder.)
2003-05-14 20:02:43 +00:00
Hidetoshi Tajima
7c1ea2572d use type of guint32 instead of gumake for XNFilterEvents event
* modules/input/gtkimcontextxim.c (get_ic_real): use type of guint32
	instead of gumake for XNFilterEvents event mask(#110493).
2003-05-14 16:09:03 +00:00
Sven Neumann
a0c6c59e99 fixed parameter name in inline docs.
2003-05-13  Sven Neumann  <sven@gimp.org>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_get_position):
	fixed parameter name in inline docs.
2003-05-13 15:48:46 +00:00
Anders Carlsson
4482f32ba3 Don't cast a gchar to a GObject. (#112762)
2003-05-11  Anders Carlsson  <andersca@codefactory.se>

	* gtk/gtkdnd.c (gtk_drag_source_unset_icon): Don't cast a gchar to
	a GObject. (#112762)
2003-05-11 12:40:04 +00:00
Kwok-Koon Cheung
29dd4ce719 Updated traditional Chinese translation.
* zh_TW.po: Updated traditional Chinese translation.
2003-05-10 22:49:50 +00:00
Jordi Mallach
5ff77be3b8 Updated Catalan translation. 2003-05-10 00:37:07 +00:00
Christophe Merlet
69c9e13238 Updated French translation. 2003-05-08 23:31:34 +00:00
Sven Neumann
a5a4baf9f2 set the HAVE_X11R6 automake conditional to false if not compiling for X11.
2003-05-08  Sven Neumann  <sven@gimp.org>

	* configure.in: set the HAVE_X11R6 automake conditional to false
	if not compiling for X11.
2003-05-08 18:21:33 +00:00
Kwok-Koon Cheung
1b5ca9a190 Updated traditional Chinese translation.
* zh_TW.po: Updated traditional Chinese translation.
2003-05-07 09:38:19 +00:00
Tor Lillqvist
1d2bf8a0c2 Fix for #110165 (thanks to Arnaud Charlet):
2003-05-06  Tor Lillqvist  <tml@iki.fi>

	Fix for #110165 (thanks to Arnaud Charlet):

	* gdk/win32/gdkevents-win32.c (build_keypress_event,
	build_keyrelease_event): For unshifted control char, use
	lowercase ASCII keyval.
	(gdk_event_translate): Similarily, when handling WM_SYSKEYDOWN and
	UP (i.e. Alt-something), if it's an unshifted ASCII letter, use
	lowercase keyval. Use build_key_event_state() here, too, instead
	of minor code duplication.
2003-05-06 21:42:02 +00:00
Matthias Clasen
b86a2d2081 Don't include strings.h, it's not needed anymore. (#112388)
2003-05-06  Matthias Clasen  <maclas@gmx.de>

	* tests/testmultidisplay.c: Don't include strings.h, it's not
	needed anymore.  (#112388)

	* examples/menu/itemfactory.c:
	* docs/tutorial/gtk-tut.sgml: Remove an unneeded include from the
	itemfactory example.
2003-05-06 21:33:58 +00:00
Simos Xenitellis
a2581917fe Updated Greek translation 2003-05-06 20:35:55 +00:00
Alessio Frusciante
efddc90261 Updated Italian translation by Alessio Dessi. 2003-05-06 19:41:03 +00:00
Matthias Clasen
c71076d867 Improve the docs about cross-process embedding a bit. (#112101, #112006)
2003-05-05  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtk-docs.sgml:
	* gtk/tmpl/gtksocket.sgml: Improve the docs about cross-process
	embedding a bit.  (#112101, #112006)
2003-05-05 18:16:06 +00:00
Matthias Clasen
03410cd372 Actually set the icon type to the stock icon type. (#111735, Dave
2003-05-05  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkdnd.c (gtk_drag_source_set_icon_stock):  Actually set the
	icon type to the stock icon type.  (#111735, Dave Bordoley)
2003-05-05 18:04:02 +00:00
Christian Rose
11a1a8a9fa Added sr and sr@Latn to ALL_LINGUAS. Removed sp, it's replaced by sr@Latn.
2003-05-05  Christian Rose  <menthos@menthos.com>

	* configure.in: Added sr and sr@Latn to ALL_LINGUAS.
	Removed sp, it's replaced by sr@Latn.
	* po/sr.po, po/sr@Latn.po: Added Serbian translation by
        Danilo Šegan <dsegan@gmx.net>.
	* po/sp.po: Removed, it's replaced by po/sr@Latn.po.
2003-05-05 09:05:14 +00:00
Dmitry Mastrukov
de7ab66507 be.po: Updated Belarusian translation from Belarusian team <i18n@mova.org>. 2003-05-05 04:41:13 +00:00
Hasbullah Bin Pit
980dfbd7f7 Updated Malay translation.
2003-04-30  Hasbullah Bin Pit <sebol@ikhlas.com>

        * ms.po: Updated Malay translation.
2003-04-30 23:09:39 +00:00
Jonathan Blandford
1c8652ca31 destroy the search data iff the destroy func isn't NULL.
Mon Apr 28 17:54:39 2003  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): destroy the search
	data iff the destroy func isn't NULL.
2003-04-28 21:54:55 +00:00
Owen Taylor
b607f4bfc2 Accept libtool-1.5. (#111480)
Thu Apr 24 19:12:05 2003  Owen Taylor  <otaylor@redhat.com>

        * autogen.sh (have_libtool): Accept libtool-1.5. (#111480)
2003-04-24 23:54:20 +00:00
Matthias Clasen
fdade41dc6 Add sanity checks for GError handling. (#108345) 2003-04-24 18:50:48 +00:00
Owen Taylor
a6e7fe0e89 Fix mispelled name 2003-04-22 19:21:48 +00:00
Owen Taylor
b398a85b23 Only check for XFT2 if we found pango-xft (#105692, John Nall)
Tue Apr 22 15:17:25 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Only check for XFT2 if we found pango-xft
        (#105692, John Nall)
2003-04-22 19:21:06 +00:00
Owen Taylor
4542e6540b Fix PROP_HAS_FOCUS/ PROP_IS_FOCUS confusion. (#111333, Jody Goldberg)
Tue Apr 22 15:12:19 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_class_init): Fix PROP_HAS_FOCUS/
        PROP_IS_FOCUS confusion. (#111333, Jody Goldberg)
2003-04-22 19:15:08 +00:00
Owen Taylor
3f4dbc8e4e Fix prototype for activate_key. (#108927, Jason D. Hildebrand)
Mon Apr 21 19:02:16 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksocket.c (activate_key): Fix prototype for
        activate_key. (#108927, Jason D. Hildebrand)
2003-04-22 18:37:16 +00:00
Sanlig Badral
784ce6172a *** empty log message *** 2003-04-22 12:57:50 +00:00
Owen Taylor
ceb0100826 Remove geninclude.pl from CVS and don't dist it either, it is generated.
Mon Apr 21 18:42:51 2003  Owen Taylor  <otaylor@redhat.com>

        * demos/gtk-demo/Makefile.am demos/gtk-demo/geninclude.pl:
        Remove geninclude.pl from CVS and don't dist it either,
        it is generated. (#108970, Rich Kinder)
2003-04-21 22:49:51 +00:00
Owen Taylor
88fab9d287 Remove a couple of obsolete comments, fix another comment. (#109737,
Mon Apr 21 18:35:48 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkobject.h: Remove a couple of obsolete comments,
        fix another comment. (#109737, Britton Kerin)
2003-04-21 22:39:53 +00:00
Owen Taylor
99746d0055 Free the source list, not just it's contents (Patch from Charles Kerr,
Mon Apr 21 18:29:03 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkiconfactory.c (gtk_icon_set_unref): Free
        the source list, not just it's contents (Patch
        from Charles Kerr, #108243)
2003-04-21 22:32:56 +00:00
Owen Taylor
bb527c2735 Patch from Alex Larsson fixing problem with restacking during DND.
Mon Apr 21 18:13:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_cache_filter): Patch
        from Alex Larsson fixing problem with restacking during
        DND. (#108671)
2003-04-21 22:18:15 +00:00
Owen Taylor
2bd7e4fc18 Calling XFlush() after ungrabbing, to avoid problems if the app
Mon Apr 21 15:07:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_display_keyboard/pointer_ungrab):
        Calling XFlush() after ungrabbing, to avoid problems if
        the app subsequently blocks on a long-running operation.
        (#106520, reported by Rajkumar Siva)
2003-04-21 19:11:53 +00:00
Owen Taylor
a5e86bd040 Add SKIP_TASKBAR/SKIP_PAGER to set of properties we might set on map.
Fri Apr 18 17:42:45 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_initial_hints): Add
        SKIP_TASKBAR/SKIP_PAGER to set of properties we
        might set on map. (#110019, problem reported
        by Loban Rahman)
2003-04-21 19:06:15 +00:00
Owen Taylor
93436df139 Remove accidentally committed entry 2003-04-21 01:11:16 +00:00
Owen Taylor
ace5e01e0b Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and use
Fri Apr 18 16:31:49 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in gdk/x11/gdkdisplay-x11.c modules/input/Makefile.am:
        Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and
        use of XAddConnectionWatch. Remove --enable-xim config option.
        Should fix building on X11R6 (#110523, Albert Chin)
2003-04-21 01:09:15 +00:00
Owen Taylor
51d83aa47a Fix for the case when gdk_event_copy() is called on a non-allocated event.
Fri Apr 18 17:14:33 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkevents.c (gdk_event_copy): Fix for the
        case when gdk_event_copy() is called on a non-allocated
        event. (#109716, reported by Rich Burridge)
2003-04-18 21:24:27 +00:00
Owen Taylor
3958a82a34 Fix pointer arithmetic on 'void *'. (#108322)
Fri Apr 18 16:57:44 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (draw_with_images/pixmaps):
        Fix pointer arithmetic on 'void *'. (#108322)
2003-04-18 20:59:33 +00:00
Owen Taylor
42b4c8eb25 Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and use
Fri Apr 18 16:31:49 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in gdk/x11/gdkdisplay-x11.c modules/input/Makefile.am:
        Check for XAddConnectionWatch()/X11R6, and if found, disable XIM and
        use of XAddConnectionWatch. Remove --enable-xim config option.
        Should fix building on X11R6 (#110523, Albert Chin
2003-04-18 20:53:49 +00:00
Owen Taylor
5c3af4861b Patch from Morten Welinder to catch Sun servers with a broken
Fri Apr 18 15:56:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.[ch] gdk/x11/gdkdrawable-x11.[ch]:
        Patch from Morten Welinder to catch Sun servers with a
        broken implementation of the RENDER extension. (#108309)
2003-04-18 20:22:50 +00:00
Owen Taylor
93ccf6b68d Use gdk_free_compound_text(), not g_free(). (#107643, Michael Zucchi)
Fri Apr 18 15:30:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_text_property): Use
        gdk_free_compound_text(), not g_free(). (#107643,
        Michael Zucchi)
2003-04-18 19:33:53 +00:00
Owen Taylor
dc7b32f61d Fix wrong use of base_finalize. (#105126, Sven Neumann)
Fri Apr 18 15:11:50 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (_gdk_display_x11_get_type)
        gdk/x11/gdkscreen-x11.c (_gdk_screen_x11_get_type): Fix
        wrong use of base_finalize. (#105126, Sven Neumann)
2003-04-18 19:20:53 +00:00
Owen Taylor
9ad8ce84a8 Fix '/' vs. '*' problem in aspect ration computations. (#108237)
Fri Apr 18 15:06:00 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkwindow.c (gdk_window_constrain_size): Fix
        '/' vs. '*' problem in aspect ration computations. (#108237)
2003-04-18 19:09:19 +00:00
Owen Taylor
2ad38a256d You don't get a XkbMapNotify event if you get a XkbNewKeyboardNotify
Fri Apr 18 14:15:09 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_display_open):
        * gdk/x11/gdkevents-x11.c (gdk_event_translate): You
        don't get a XkbMapNotify event if you get a XkbNewKeyboardNotify
        event, so select for both. (#108406, Egmont Koblinger)
2003-04-18 18:54:05 +00:00
Jonathan Blandford
c3f1c61dbe remove infinite loop caused by not clearing the scroll_to_path.
Thu Apr 17 09:57:44 2003  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtktreeview.c (validate_visible_area): remove
         infinite loop caused by not clearing the scroll_to_path.
2003-04-17 14:07:16 +00:00
Michael Natterer
227089828d added checks to ensure that the iter is not reordered to its own position.
2003-04-14  Michael Natterer  <mitch@gimp.org>

	* gtk/gtkliststore.c (gtk_list_store_move): added checks to ensure
	that the iter is not reordered to its own position. Prevents model
	corruption for the case that the store contains only a single item
	(fixes bug #108387).

	Unrelated:

	* gtk/gtkliststore.c (gtk_list_store_insert): g_list_alloc() the
	new list element later so we don't leak it if we decide to return
	early.

	* gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
	set selection->tree_view->priv->anchor to NULL after freeing it.
2003-04-14 12:03:26 +00:00
Pauli Virtanen
ae9279670d Fixes to the Finnish translation.
2003-04-13  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Fixes to the Finnish translation.
2003-04-13 20:43:24 +00:00
Matthias Clasen
d2e38059ae Add docs. 2003-04-12 22:27:15 +00:00
Owen Taylor
674abdaffc Flush after ungrabbing the server.
Mon Apr  7 19:43:15 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c (gdk_x11_display_ungrab): Flush
        after ungrabbing the server.

        * gdk/x11/gdkimage-x11.c: Remove some no-longer-needed
        calls to XFlush().

        * gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_at_pointer):
        Use gdk_x11_display_grab/ungrab.
2003-04-07 23:46:45 +00:00
Matthias Clasen
b200136fcc Fix numerous misspellings of possessive "its". (#110027, Doug Quale) 2003-04-07 00:18:16 +00:00
Metin Amiroff
d17502a3e6 Updated Azerbaijani translaion.
2003-04-04  Metin Amiroff <metin@karegen.com>

	* az.po: Updated Azerbaijani translaion.
2003-04-04 15:20:01 +00:00
Matthias Clasen
c5a4f595a3 Only use files from the current directory if it looks like the srcdir.
2003-04-03  Matthias Clasen  <maclas@gmx.de>

	* demos/gtk-demo/main.c (demo_find_file): Only use files from the
	current directory if it looks like the srcdir.  (#109357)
2003-04-02 23:02:27 +00:00
Matthias Clasen
6b92fe3b91 Return 0 if lower == upper. (#109155)
2003-04-02  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkprogress.c (gtk_progress_get_percentage_from_value):
	Return 0 if lower == upper.  (#109155)
	(gtk_progress_get_current_percentage): Use
	gtk_progress_get_percentage_from_value().
2003-04-02 21:01:44 +00:00
Dmitry Mastrukov
ff0cfb41aa be.po: Updated Belarusian translation from Belarusian team <i18n@mova.org>. 2003-04-02 04:05:38 +00:00
Matthias Clasen
04e870ec3e Fix formatting of examples.
* gtk/tmpl/gtkmessagedialog.sgml: Fix formatting of examples.
2003-03-31 22:43:04 +00:00
Matthias Clasen
8dbab57eea Fix docs. (#109510, Noah Levitt)
2003-04-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkimcontext.c (gtk_im_context_focus_in): Fix docs.
	(#109510, Noah Levitt)
2003-03-31 22:34:55 +00:00
Matthias Clasen
fb6020965e Fix the example. (#109563)
2003-04-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtkfilesel.sgml: Fix the example.  (#109563)
2003-03-31 22:29:26 +00:00
Raphael Finkel
6e75060586 Updated Yiddish translation by Raphael Finkel <raphael@cs.uky.edu>.
2003-03-31  Raphael Finkel <raphael@cs.uky.edu>

	* yi.po: Updated Yiddish translation by
	Raphael Finkel <raphael@cs.uky.edu>.
2003-03-31 21:14:21 +00:00
Jonathan Blandford
3799561d29 null initialize reorder's members so Purify won't complain.
Mon Mar 31 13:52:13 2003  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkrbtree.c (_gtk_rbtree_reorder): null initialize reorder's
	  members so Purify won't complain.

	* gtk/gtkliststore.c (gtk_list_store_sort): ditto.
2003-03-31 19:50:09 +00:00
Jonathan Blandford
bdf8146460 null initialize reorder's members so Purify won't complain.
Mon Mar 31 13:52:13 2003  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkrbtree.c (_gtk_rbtree_reorder): null initialize reorder's
	members so Purify won't complain.
2003-03-31 19:43:52 +00:00
Jonathan Blandford
ad2398fdb1 fix crash. Patch from Markus Lausser <sgop@users.sourceforge.net>
Sun Mar 30 03:57:42 2003  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeselection.c (gtk_tree_selection_get_selected_rows):
	fix crash.  Patch from Markus Lausser <sgop@users.sourceforge.net>
2003-03-30 09:23:24 +00:00
Matthias Clasen
1ca748d939 Set state of labels back to normal before reparenting back. (#102387)
2003-03-29  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Set state
	of labels back to normal before reparenting back.  (#102387)
2003-03-29 00:48:46 +00:00
Matthias Clasen
6cdff52aea Fixes for bug #56248:
2003-03-29  Matthias Clasen  <maclas@gmx.de>

        Fixes for bug #56248:

	* gtk/gtknotebook.c (stop_scrolling): New function to remove the
	timer and queue a redraw.
	(gtk_notebook_grab_notify):
	(gtk_notebook_state_changed): New functions to call stop_scrolling()
	if necessary.
	(gtk_notebook_button_release): Use stop_scrolling().
	(gtk_notebook_draw_arrow): Fix drawing of insensitive arrows.

	* gtk/gtkrange.c (stop_scrolling): New function to remove the
	grab, remove the timer and queue a redraw.
	(gtk_range_grab_notify):
	(gtk_range_state_changed): New functions to call stop_scrolling()
	if necessary.
	(gtk_range_button_release): Use stop_scrolling().

	* gtk/gtkspinbutton.c (gtk_spin_button_grab_notify):
	(gtk_spin_button_state_changed): Redraw after stop_spinning.
	(gtk_spin_button_stop_spinning): Reset click_child to correct the
	drawing of the arrows.
	(gtk_spin_button_button_release): Use a local copy of click_child,
	since stop_spinning() resets it.
2003-03-29 00:20:41 +00:00
Matthias Clasen
abf0c05b30 Add C-A-PgUp and C-A-PgDown as alternatives to the A-less variants.
2003-03-29  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtknotebook.c (gtk_notebook_class_init): Add C-A-PgUp and
	C-A-PgDown as alternatives to the A-less variants.  (#97860)
2003-03-28 23:44:55 +00:00
Christian Rose
4e3be2565d Updated Yiddish translation by Raphael Finkel <raphael@cs.uky.edu>.
2003-03-26  Christian Rose  <menthos@menthos.com>

	* yi.po: Updated Yiddish translation by
	Raphael Finkel <raphael@cs.uky.edu>.
2003-03-26 21:33:55 +00:00
Sven Neumann
336912e2d4 rewrote the function that does node and arrow prelighting, queue all
2003-03-26  Sven Neumann  <sven@gimp.org>

	* gtk/gtktreeview.c: rewrote the function that does node and arrow
	prelighting, queue all redraws from here (Fixes bug #108792).
2003-03-26 13:37:36 +00:00
Pablo Gonzalo del Campo
2ce2e1ae81 Updated Spanish translation by Carlos Perelló Marín
2003-03-24  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Updated Spanish translation by
          Carlos Perelló Marín <carlos@gnome-db.org>.
2003-03-24 13:39:05 +00:00
Christian Rose
a44b4fc401 Updated Yiddish translation by Raphael Finkel <raphael@cs.uky.edu>.
2003-03-23  Christian Rose  <menthos@menthos.com>

	* yi.po: Updated Yiddish translation by
	Raphael Finkel <raphael@cs.uky.edu>.
2003-03-23 02:21:27 +00:00
Michael Natterer
1ac718dc29 copy stock_color_picker_25.png, don't copy stock_save_24.png twice.
2003-03-22  Michael Natterer  <mitch@gimp.org>

	* gtk/Makefile.am: copy stock_color_picker_25.png, don't copy
	stock_save_24.png twice.

	* gtk/tmpl/gtkstock.sgml: use it for GTK_STOCK_COLOR_PICKER
	instead of stock_colorselector_24.png.
2003-03-22 19:10:07 +00:00
Matthias Clasen
49ec780bf6 Add missing static. (#108614)
2003-03-21  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf-animation.c (gdk_pixbuf_non_anim_get_type): Add
	missing static.  (#108614)
2003-03-21 00:34:43 +00:00
Matthias Clasen
1dfc733639 Add missing static qualifiers apparently causing problems on some
2003-03-21  Matthias Clasen  <maclas@gmx.de>

	* io-jpeg.c (gdk_pixbuf__jpeg_image_begin_load):
	* io-ico.c (gdk_pixbuf__ico_image_stop_load): Add missing static
	qualifiers apparently causing problems on some platforms. (#108617)
2003-03-21 00:14:33 +00:00
Guntupalli Karunakar
2470cdfb9e Added Malayalam translation 2003-03-20 16:21:33 +00:00
Metin Amiroff
b28585cdc3 updated Azerbaijani translation.
2003-03-20  Metin Amiroff  <metin@karegen.com>

	* az.po: updated Azerbaijani translation.
2003-03-20 11:00:55 +00:00
Chyla Zbigniew
298f6d6b26 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2003-03-16 13:55:39 +00:00
Manish Singh
04f4e45e3e use GTK_DISABLE_DEPRECATED instead of G_DISABLE_DEPRECATED.
Sat Mar 15 18:46:46 2003  Manish Singh  <yosh@gimp.org>

        * gtk/gtkradiomenuitem.h: use GTK_DISABLE_DEPRECATED instead of
        G_DISABLE_DEPRECATED.
2003-03-16 02:48:41 +00:00
Tor Lillqvist
b4ee5eb756 Use the signed GET_X_LPARAM() and GET_Y_LPARAM() to extract x and y
2003-03-14  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c: Use the signed GET_X_LPARAM() and
	GET_Y_LPARAM() to extract x and y coordinates from an LPARAM or
	DWORD, and not the unsigned HIWORD() and LOWORD(). Systems with
	multiple monitors can have negative coordinates on some of the
	monitors. (partial fix for #99496, Arnaud Charlet)
2003-03-14 23:53:44 +00:00
Sven Neumann
abb203785f removed redundant calls to g_object_notify().
2003-03-13  Sven Neumann  <sven@gimp.org>

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
	removed redundant calls to g_object_notify().
	(gtk_cell_renderer_pixbuf_get_size): removed redundant casts, see
	bug #108236.

	* gtk/gtktextiter.c (_gtk_text_iter_get_segment_char)
	(_gtk_text_iter_get_segment_byte): return 0, not NULL (these
	functions return an integer value).
2003-03-13 12:26:31 +00:00
Tor Lillqvist
1c874acf8e On WM_MOUSEMOVE, the test whether we have actually moved (and thus
2003-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_MOUSEMOVE, the test whether we have actually moved (and thus
	shouldn't generate an GDK event) moved after the call to
	propagate() and translate_mouse_coords(). Otherwise we were
	testing wrong values. (#108115, Allin Cottrell)
	(gdk_event_translate): On WM_?BUTTONUP, set current_{x,y} the same
	way as in WM_?BUTTONDOWN and WM_MOUSEMOVE.
2003-03-13 01:42:31 +00:00
Tor Lillqvist
22d5e6810a if a grab cursor is used, must copy the HCURSOR with CopyCursor(), as it
2003-03-13  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): if a grab cursor
	is used, must copy the HCURSOR with CopyCursor(), as it is OK to
	destroy the GdkCursor after calling gdk_pointer_grab(). Set the
	cursor right away with SetCursor(), as we won't get any
	WM_SETCURSOR messages while the mouse is captured.
	(gdk_display_pointer_ungrab): Correspondingly, destroy the copy
	with DestroyCursor() when no longer used. (#108114, Allin Cottrell)

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): On
	WM_SYSCHAR, return FALSE from the window procedure to prevent the
	DefWindowProc from being called. Otherwise Windows would beep,
	thinking you are tring to access a (nonexistent) menu when you
	press Alt-something. Don't do this for Alt-Space,
	though. (#107454, Martyn Russell)

	* gdk/win32/gdkcursor-win32.c: Minor spacing and debug print fixes.
2003-03-13 00:52:32 +00:00
Matthias Clasen
0f05a797f7 Calculate LineWidth for 16bpp from width, like for the other depths.
2003-03-11  Matthias Clasen  <maclas@gmx.de>

	* io-ico.c (DecodeHeader): Calculate LineWidth for 16bpp from
	width, like for the other depths.  (noticed by Marijn Ros)
2003-03-11 23:02:23 +00:00
Yuri Syrota
c16d0688db Updated Ukrainian translation 2003-03-10 15:53:22 +00:00
Tor Lillqvist
fe57bdd25b Don't try to compensate for LineTo() not drawing the end pixel. It causes
2003-03-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (draw_segments): Don't try to
	compensate for LineTo() not drawing the end pixel. It causes more
	harm than benefits, see bug #81895.
2003-03-09 16:13:55 +00:00
Matthias Clasen
0b4b76ccef Bug #107664 continued:
2003-03-08  Matthias Clasen  <maclas@gmx.de>

	Bug #107664 continued:

	* gdk/x11/gdkinputprivate.h:
	* gdk/x11/gdkinput-none.c (_gdk_input_window_none_event): Remove.
	(_gdk_input_other_event): Return gboolean.
	* gdk/x11/gdkinput-xfree.c (_gdk_input_window_none_event): Remove.
	(_gdk_input_other_event): Return gboolean.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_other_event): Return gboolean.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Make return_val
	gboolean, remove pointless call to _gdk_input_window_none_event.

	* gdk/win32/gdkinput-win32.[hc] (_gdk_input_other_event): Return gboolean.
	(_gdk_input_window_none_event): Remove.

	* gtk/gtktextiter.c (_gtk_text_iter_get_indexable_segment):
	(_gtk_text_iter_get_any_segment):
	(_gtk_text_iter_get_segment_byte):
	(_gtk_text_iter_get_segment_char):
	(_gtk_text_iter_get_text_line):
	(_gtk_text_iter_get_btree): Fix 0/NULL confusion.
	* gdk/x11/gdkdnd-x11.c (motif_target_table_check): Return gint.
	* gdk/win32/gdkfont-win32.c (gdk_font_equal):
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_get_deskrelative_origin):
	(gdk_window_get_origin):
	* gdk/linux-fb/gdkcolor-fb.c (gdk_colors_alloc): Fix 0/FALSE confusion.
2003-03-08 21:11:19 +00:00
Matthias Clasen
6308577b27 Trivial cleanups (bug #107664) 2003-03-08 20:49:58 +00:00
Sven Neumann
e4639db608 shut up CVS 2003-03-07 14:11:08 +00:00
Matthias Clasen
9a03f0a699 Return gboolean, not gint. (#107664, Morten Welinder)
2003-03-06  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkrgb.c (gdk_rgb_try_colormap): Return gboolean, not gint.
	(#107664, Morten Welinder)

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_deskrelative_origin):
	* gdk/x11/gdkfont-x11.c (gdk_font_equal):
	* gdk/x11/gdkdnd-x11.c (gdk_drag_get_protocol_for_display):
	Fix TRUE/1 and FALSE/0 confusion.  (#107664, Morten Welinder)

	* io-gif.c (gif_read): Fix 0/FALSE confusion (#107664, Morten Welinder)
2003-03-06 20:17:56 +00:00
Matthias Clasen
3c0467684a Fix NULL/FALSE confusion (#107648, Morten Welinder)
2003-03-06  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextmark.c (gtk_text_mark_get_buffer):
	* gtk/gtkeditable.c (gtk_editable_get_chars):
	* gtk/gtkctree.c (gtk_ctree_find_node_ptr):
	* demos/gtk-demo/main.c (demo_find_file): Fix NULL/FALSE confusion
	(#107648, Morten Welinder)
2003-03-06 19:55:52 +00:00
Metin Amiroff
bac86f2f41 minor changes on Azerbaijani translation.
2003-03-06  Metin Amiroff  <metin@karegen.com>

	* az.po: minor changes on Azerbaijani translation.
2003-03-06 19:26:44 +00:00
Tor Lillqvist
1a887b84e1 Add a bunch of missing entries. Noticed by Cedric Gustin.
2003-03-02  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtk.def: Add a bunch of missing entries. Noticed by Cedric
	Gustin.
2003-03-02 20:35:31 +00:00
Tor Lillqvist
1a3e754aee Add a bunch of missing entries. Noticed by Cedric Gustin.
2003-03-02  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add a bunch of missing entries. Noticed by Cedric
	Gustin.
2003-03-02 19:44:48 +00:00
Yuri Syrota
8193e914cd Updated Ukrainian translation 2003-02-28 20:12:27 +00:00
Yuri Syrota
101169bbba Updated Ukrainian translation 2003-02-28 19:58:44 +00:00
Yuri Syrota
1f6aa5cea0 Updated Ukrainian translation 2003-02-28 19:09:36 +00:00
Yuri Syrota
e4ca8e5c7c Updated Ukrainian translation 2003-02-28 18:43:08 +00:00
Yuri Syrota
2c15776323 Updated Ukrainian translation 2003-02-28 18:31:57 +00:00
Yuri Syrota
c6b0234335 Updated Ukrainian translation 2003-02-28 17:01:23 +00:00
Yuri Syrota
dce4d33e87 Updated Ukrainian translation 2003-02-28 11:50:00 +00:00
Manish Singh
f939818579 reverted stray changes from last commit 2003-02-28 02:07:25 +00:00
Manish Singh
07a15aa307 demos/gtk-demo/main.c demos/gtk-demo/tree_store.c gdk/x11/gdkscreen-x11.c
Thu Feb 27 18:03:49 2003  Manish Singh  <yosh@gimp.org>

        * demos/gtk-demo/main.c
        * demos/gtk-demo/tree_store.c
        * gdk/x11/gdkscreen-x11.c
        * gtk/gtkcellrenderertoggle.c
        * gtk/gtkcolorsel.c
        * gtk/gtkdnd.c
        * gtk/gtkeditable.c
        * gtk/gtkentry.c
        * gtk/gtkmenu.c
        * gtk/gtkmenubar.c
        * gtk/gtkmenuitem.c
        * gtk/gtkmenushell.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktextbuffer.c
        * gtk/gtktextview.c
        * gtk/gtktreeviewcolumn.c
        * tests/testgtk.c
        * tests/testtext.c
        * tests/testtreeedit.c
        * tests/testtreefocus.c
        * tests/testtreeview.c: remove unnecessary G_OBJECT() casts.
2003-02-28 02:05:30 +00:00
Jonathan Blandford
77e7300a4e account for RTL code.
Tue Feb 25 21:55:17 2003  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL
	code.
2003-02-26 19:46:20 +00:00
Miloslav Trmac
a4a82906b9 Update Czech translation 2003-02-26 01:19:01 +00:00
Christian Rose
8b0a09438f Updated Yiddish translation by Raphael Finkel <raphael@cs.uky.edu>.
2003-02-25  Christian Rose  <menthos@menthos.com>

	* yi.po: Updated Yiddish translation by
	Raphael Finkel <raphael@cs.uky.edu>.
2003-02-25 14:33:31 +00:00
Yuri Syrota
26dfa43f87 Updated Ukrainian translation 2003-02-25 09:54:36 +00:00
Sven Neumann
5fbdd480c0 fixed documentation.
2003-02-24  Sven Neumann  <sven@gimp.org>

        * gtk/gtkmain.c (gtk_get_default_language): fixed documentation.
2003-02-24 20:29:39 +00:00
Matthias Clasen
2f44686915 Fix self-referential documenation of gtk_tree_model_get_iter_root().
2003-02-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtktreemodel.sgml: Fix self-referential documenation of
	gtk_tree_model_get_iter_root().  (#106720, Keith Sharp)
2003-02-24 19:13:35 +00:00
Roozbeh Pournader
01059ca925 Updated Persian translation.
2003-02-24  Roozbeh Pournader  <roozbeh@sharif.edu>

	* fa.po: Updated Persian translation.
2003-02-24 10:30:41 +00:00
Jordi Mallach
1de5e09f78 Typo. 2003-02-22 22:55:29 +00:00
Jordi Mallach
c6ba891676 Catalan fixes. 2003-02-22 22:48:30 +00:00
Matthias Clasen
62fbfc2f50 Check if line_ancestor_parent is NULL. (#102711, Manuel Clos)
2003-02-20  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbtree.c (_gtk_text_line_previous_could_contain_tag):
	Check if line_ancestor_parent is NULL.  (#102711, Manuel Clos)

	* gtk/gtktextview.c (gtk_text_view_scroll_to_iter):
	(gtk_text_view_update_adjustments): Make sure cursor stays visible
	during horizontal scrolling.  (#75270)
2003-02-20 19:49:51 +00:00
Yuri Syrota
6a02a78342 Updated Ukrainian translation 2003-02-20 13:44:02 +00:00
Matthias Clasen
c43bf5f692 Always clear the initial frame and "disposed" areas with transparent
2003-02-20  Matthias Clasen  <maclas@gmx.de>

	* io-gif-animation.c (gdk_pixbuf_gif_anim_frame_composite):
	Always clear the initial frame and "disposed" areas with
	transparent pixels, no matter whether the frame has transparency
	or not.  (#55502)
2003-02-19 23:01:47 +00:00
Yuri Syrota
79d52607b2 Updated Ukrainian translation 2003-02-19 20:22:27 +00:00
Yuri Syrota
18fb6bc786 Updated Ukrainian translation 2003-02-19 20:06:42 +00:00
Yuri Syrota
4be242e03c Updated Ukrainian translation 2003-02-19 19:49:05 +00:00
Matthias Clasen
629b9c3241 Associate the keys_changed virtual function with the keys_changed signal.
2003-02-19  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkkeys.c (gdk_keymap_class_init): Associate the
	keys_changed virtual function with the keys_changed signal.
	(#106512, Jeff Franks)
2003-02-19 19:35:44 +00:00
Yuri Syrota
cc82e4fb09 Updated Ukrainian translation 2003-02-19 18:33:23 +00:00
Pablo Gonzalo del Campo
85953f9bf9 Fixed a hotkey mistake.
2003-02-19  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Fixed a hotkey mistake.
2003-02-19 18:13:40 +00:00
Larry Ewing
45b99c1223 copy the event axes as well.
2003-02-15  Larry Ewing  <lewing@ximian.com>

        * gdk/gdkevents.c (gdk_event_copy): copy the event axes as well.
2003-02-18 20:12:44 +00:00
Pablo Saratxaga
af76072dbd small fix 2003-02-18 00:55:19 +00:00
Mohammad DAMT
3b7ca9fdba Added Indonesian translation Added "id" to ALL_LINGUAS
2003-02-17  Mohammad DAMT  <mdamt@bisnisweb.com>

	* po/id.po: Added Indonesian translation
	* configure.in: Added "id" to ALL_LINGUAS
2003-02-17 07:44:25 +00:00
Christophe Merlet
2e58f2eb4b Updated French translation. 2003-02-16 23:30:58 +00:00
Matthias Clasen
ea243d2ea9 Remove bogus GTK_OBJECT cast. Hopefully got it right now...
2003-02-14  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c (popup_targets_received): Remove bogus
	GTK_OBJECT cast. Hopefully got it right now...
	(gtk_text_view_move_cursor_internal): Add a default: to avoid
	compiler warnings.
2003-02-14 16:34:38 +00:00
Glynn Foster
4cd9b035c7 Use g_signal_connect instead of gtk_signal_connect.
2003-02-14  Glynn Foster  <glynn.foster@sun.com>

	* gtk/gtktextview.c: (popup_targets_received): Use g_signal_connect
	instead of gtk_signal_connect.
2003-02-14 13:27:45 +00:00
Dmitry Mastrukov
a9773cd5f6 be.po: Updated Belarusian translation from Belarusian team <i18n@mova.org>. 2003-02-14 12:07:02 +00:00
Matthias Clasen
bb0a15ea85 Actually reject images with origin not in the upper-left corner. (#105912)
2003-02-14  Matthias Clasen  <maclas@gmx.de>

	* io-tga.c (try_preload):
	(gdk_pixbuf__tga_load): Actually reject images with origin
	not in the upper-left corner.  (#105912)
2003-02-13 23:50:57 +00:00
Yuri Syrota
a5fce9f76b Updated Ukrainian translation 2003-02-13 18:23:29 +00:00
Christian Rose
09d376434e Added "yi" to ALL_LINGUAS. Added Yiddish translation by Raphael Finkel
2003-02-12  Christian Rose  <menthos@menthos.com>

	* configure.in: Added "yi" to ALL_LINGUAS.
	* yi.po: Added Yiddish translation by
	Raphael Finkel <raphael@cs.uky.edu>.
2003-02-12 12:49:21 +00:00
Matthias Clasen
6351823847 Fix for #78216:
2003-02-12  Matthias Clasen  <maclas@gmx.de>

	Fix for #78216:

	* gtk/gtktextview.c (delete_cb):
	(select_all_cb): New callbacks for context menu items.
	(popup_targets_received): Add "Delete" and "Select All" to context
	menu.

	* gtk/gtkentry.c (gtk_entry_delete_cb): New callback for "Delete"
	context menu item.
	(popup_targets_received): Add "Delete" to context menu.
2003-02-11 23:36:09 +00:00
Matthias Clasen
d76994c16c Document that font and fontset declarations are ignored.
2003-02-11  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtkrc.sgml: Document that font and fontset declarations
	are ignored.
2003-02-11 00:32:45 +00:00
Yuri Syrota
693d39cf9c Updated Ukrainian translation 2003-02-10 15:29:18 +00:00
Yuri Syrota
52e625e6a8 Updated Ukrainian translation 2003-02-10 11:20:46 +00:00
Yuri Syrota
6ddca5edab Updated Ukrainian translation 2003-02-10 10:18:45 +00:00
Tor Lillqvist
0babe29777 Use GetDriveType() to recognize removable drives (in order to avoid
2003-02-09  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkfilesel.c (win32_gtk_add_drives_to_dir_list): Use
	GetDriveType() to recognize removable drives (in order to avoid
	hanging if trying to access an empty floppy drive), instead of
	hardcoding A: and B: (#105654).
2003-02-09 21:48:24 +00:00
Christian Rose
fcf6f344bb Removed "en@IPA" from ALL_LINGUAS. Removed. It doesn't contain
2003-02-09  Christian Rose  <menthos@menthos.com>

	* configure.in: Removed "en@IPA" from ALL_LINGUAS.
	* po/en@IPA.po: Removed. It doesn't contain translations anyway.
2003-02-09 13:28:56 +00:00
Pablo Gonzalo del Campo
f71d4457e0 Updated Spanish translation.
2003-02-08  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2003-02-09 02:28:10 +00:00
Christian Neumair
3698534cb6 Updated German translation. 2003-02-08 11:15:35 +00:00
Miloslav Trmac
6ee90b280f Fix error sin Czech translation 2003-02-07 20:59:50 +00:00
Matthias Clasen
d71067c57a Better error message if module_open() fails. (#105349, Tim Mooney)
2003-02-06  Matthias Clasen  <maclas@gmx.de>

	* queryloaders.c (query_module): Better error message if
	module_open() fails.  (#105349, Tim Mooney)
2003-02-06 19:32:52 +00:00
Matthias Clasen
f2955b204a Return a GdkVisual *, not a GdkVisual **. (#105243)
2003-02-06  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkvisual-x11.c (gdk_visual_get_best_with_depth): Return
	a GdkVisual *, not a GdkVisual **.  (#105243)
2003-02-06 19:19:26 +00:00
Christian Rose
0eca9ef242 Some fixes for problems catched in translation review.
2003-02-05  Christian Rose  <menthos@menthos.com>

	* sv.po: Some fixes for problems catched in translation review.
2003-02-05 11:20:21 +00:00
Yuri Syrota
f15893e1bd Updated Ukrainian translation 2003-02-04 18:42:28 +00:00
Yuri Syrota
ba55a05b73 Updated Ukrainian translation 2003-02-04 18:22:39 +00:00
Yuri Syrota
c687d2c7a4 Updated Ukrainian translation 2003-02-04 10:51:05 +00:00
Yuri Syrota
f117e39e0d Updated Ukrainian translation 2003-02-04 10:04:17 +00:00
Yuri Syrota
e4e126ce70 Updated Ukrainian translation 2003-02-04 08:27:04 +00:00
Abel Cheung
5054c1cab4 Updated traditional Chinese translation.
2003-02-04  Abel Cheung  <maddog@linux.org.hk>

	* zh_TW.po: Updated traditional Chinese translation.
2003-02-04 03:28:07 +00:00
Daniel Yacob
bb27defe19 Updating Amharic translation. 2003-02-03 17:46:30 +00:00
Owen Taylor
ad891783f2 === Released 2.2.1 ===
Sun Feb  2 10:03:24 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.2.1 ===

        * configure.in: Version 2.2.1, Binary age 201, interface age 1.

        * NEWS: More updates.
2003-02-02 15:51:04 +00:00
Duarte Loreto
bd8e4ec9c7 Updated Portuguese translation.
2003-02-01  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2003-02-02 14:18:27 +00:00
Tor Lillqvist
56bf242952 Add gdk_screen_get_system_visual. Noticed by Ed Woods.
2003-02-01  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add gdk_screen_get_system_visual. Noticed by Ed
	Woods.
2003-02-01 20:56:06 +00:00
Christian Neumair
b05973ad54 Updated German translation. 2003-02-01 17:37:25 +00:00
Manish Singh
eb6822c2ca demos/pixbuf-demo.c demos/testpixbuf.c demos/gtk-demo/pixbufs.c sync with
Fri Jan 31 17:48:53 2003  Manish Singh  <yosh@gimp.org>

        * demos/pixbuf-demo.c
        * demos/testpixbuf.c
        * demos/gtk-demo/pixbufs.c
        * tests/testtext.c: sync with HEAD (removed gtk_timeout_* usage)
2003-02-01 01:49:25 +00:00
Manish Singh
69e5d23af7 set_state on the tab_label before unparenting it, in case the unparent
Fri Jan 31 17:23:59 2003  Manish Singh  <yosh@gimp.org>

        * gtk/gtknotebook.c (gtk_notebook_remove_tab_label): set_state
        on the tab_label before unparenting it, in case the unparent
        drops the refcount to 0.
2003-02-01 01:27:00 +00:00
Owen Taylor
94d641664a Updates.
Thu Jan 30 23:44:52 2003  Owen Taylor  <otaylor@redhat.com>

        * NEWS: Updates.
2003-01-31 04:45:11 +00:00
Kristian Rietveld
b11de91341 beginning of NEWS for 2.2.1.
Fri Jan 31 00:28:18 2003  Kristian Rietveld  <kris@gtk.org>

        * NEWS: beginning of NEWS for 2.2.1.
2003-01-30 23:15:34 +00:00
Kristian Rietveld
f1a895f5cf Fix bug number. 2003-01-30 22:45:45 +00:00
Kristian Rietveld
d7fc46eb8a Merge from HEAD.
Thu Jan 30 23:48:30 2003  Kristian Rietveld  <kris@gtk.org>

        Merge from HEAD.

        * gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_count_special_cell):
        only count the special cell if it is also visible,
        (_gtk_tree_view_column_get_neighbor_sizes): only take the width into
        account from visible cells,
        (gtk_tree_view_column_cell_get_position): likewise, (Reported and
        testcase provided by Vasco Alexandre da Silva Costa, via IRC,
        tracking bug was #104563).

Thu Jan 30 23:46:15 2003  Kristian Rietveld  <kris@gtk.org>

        Merge from HEAD.

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        subtract expander space and focus line space from the extra space
        we are about the allocate. (Fixes #104635).

Thu Jan 30 23:42:03 2003  Kristian Rietveld  <kris@gtk.org>

        Merge from HEAD.

        * gtk/gtkstyle.c (apply_affine_on_point): fix rouding error
        (Fixes #96252, patch from Soeren Sandmann).
2003-01-30 22:43:30 +00:00
Kristian Rietveld
b5ebedc782 Merge from HEAD: I found out that we live in 2003 already. 2003-01-30 22:25:54 +00:00
Owen Taylor
c012d1fe9e Patch from Soeren Sandmann to update the states of the tab label child
Thu Jan 30 16:54:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.c: Patch from Soeren Sandmann
        to update the states of the tab label child
        widgets to match the state of the tabs.
        (#93389, Reported by Tommi Komulainen)
2003-01-30 21:57:25 +00:00
Daniel Elstner
b92af6e16b Merge from HEAD.
2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>

	Merge from HEAD.

	* gtk/gtktoolbar.c (set_child_packing_and_visibility): New helper
	function that sets the icon's and label's packing options and
	visibility based on toolbar->style.

	(gtk_toolbar_internal_insert_element):
	(gtk_real_toolbar_style_changed): Make use of
	set_child_packing_and_visibility() to clean up the code and get
	the packing right for icon-only/text-only toolbars. (#104679)

	(get_first_child): Remove, and use gtk_bin_get_child() instead.
2003-01-30 21:48:07 +00:00
Owen Taylor
43de9ea350 Remove gtk+.spec.in from EXTRA_DIST, and from dist rules. (#102231)
Thu Jan 30 16:30:54 2003  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (EXTRA_DIST): Remove gtk+.spec.in from
        EXTRA_DIST, and from dist rules. (#102231)
2003-01-30 21:40:35 +00:00
Owen Taylor
9bc1460bca Remove the attempt-to-allocate then free code. To handle multiple people
Thu Jan 30 16:01:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
        attempt-to-allocate then free code. To handle multiple
        people allocating colors at the same time, we need
        to just go ahead and try. (#102213, Shivram U)
2003-01-30 21:18:48 +00:00
Daniel Elstner
acd43b3ee6 Merge from HEAD.
2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>

	Merge from HEAD.

	* gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
	rectangle using the background color rather than relying on
	gdk_window_clear_area(), so that the palette works properly with
	pixmap themes.

	* demos/gtk-demo/colorsel.c: Install an "expose_event" handler
	to fill the drawing area in the background color.
2003-01-30 20:08:24 +00:00
Matthias Clasen
0745fd5c6c s/overwrite/override/g (#104627, Brian Cameron)
2003-01-30  Matthias Clasen  <maclas@gmx.de>

	* gtk/running.sgml: s/overwrite/override/g  (#104627, Brian Cameron)
2003-01-30 00:07:02 +00:00
Hidetoshi Tajima
592df75970 fix a memory initialization error for selecting input style (#103549).
* modules/input/gtkimcontextxim.c (choose_better_style): fix a memory
	initialization error for selecting input style (#103549).
2003-01-29 22:44:58 +00:00
Owen Taylor
545ef43527 Make the translation of GDK_KP_Decimal dependent on LC_NUMERIC. (#101225)
Wed Jan 29 17:02:41 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkkeyuni.c (get_decimal_char): Make the
        translation of GDK_KP_Decimal dependent on LC_NUMERIC.
        (#101225)
2003-01-29 22:24:49 +00:00
Owen Taylor
fee332c6dc Make up from the menu bar go to the end of the submenu. (#96114, Ian
Wed Jan 29 15:43:56 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.c (gtk_real_menu_shell_move_current):
        Make up from the menu bar go to the end of the submenu.
        (#96114, Ian Peters.)

        * gtk/gtkmenuitem.c (gtk_menu_item_mnemonic_activate):
        Only do the select-but-not-activate stuff if the
        menu is already active. Otherwise, just activate.
        (#101690, Arvind Samptur)
2003-01-29 21:01:29 +00:00
Christian Neumair
6ab8762032 Updated German translation. 2003-01-29 16:27:58 +00:00
Tivo Leedjrv
704fd74f2b Updated Estonian translation.
2003-01-28  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Updated Estonian translation.
2003-01-28 20:40:26 +00:00
Owen Taylor
d23d7f9916 Fix version in complaint message about automake. (#104366, Rich Burridge)
Tue Jan 28 15:18:24 2003  Owen Taylor  <otaylor@redhat.com>

	* autogen.sh (have_automake): Fix version in complaint
	message about automake. (#104366, Rich Burridge)
2003-01-28 20:31:18 +00:00
Owen Taylor
f1f9bf8a38 Remove SOEXT stuff; it doesn't work portably.
Mon Jan 27 16:38:13 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Remove SOEXT stuff; it doesn't work portably.
2003-01-27 23:22:14 +00:00
Owen Taylor
b0e495309d Rewrite to run on the .la files rather than looking for .so files.
Mon Jan 27 17:10:30 2003  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (gdk-pixbuf.loaders): Rewrite to run
        on the .la files rather than looking for .so files.
        (#102142, Martin Gansser)

        * Makefile.am: Don't build gdk-pixbuf.loaders when
        cross-compiling.
2003-01-27 23:19:07 +00:00
Kristian Rietveld
1e11759ffd Merges from HEAD.
ChangeLog too long to mention here. Bugs fixed: #100973, #83195, #87556,
#99803, #100458. And a couple of non-bugzilla'd bugs. (yes, I prolly
misspelled "bugzilla'd").
2003-01-27 21:47:35 +00:00
Owen Taylor
30a9e56179 event->any.window might be NULL. Use gtk_widget_get_display (widget)
Mon Jan 27 16:19:59 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksocket.c (gtk_socket_filter_func): event->any.window
        might be NULL. Use gtk_widget_get_display (widget)
        (#102860, Thomas Leonard)
2003-01-27 21:22:00 +00:00
Owen Taylor
a3883873ce Fix --without-modules/--disable-modules confusion that was causing
Mon Jan 27 15:58:31 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Fix --without-modules/--disable-modules
        confusion that was causing --disable-modules not to work.
        (#102865, Akira Tagoh)

        * configure.in: Fix problem with plain --with-xinput
        (#104266, Akira Tagoh)
2003-01-27 21:14:48 +00:00
He Qiangqiang
9c99f64bda Updated Simplified Chinese translation by Funda Wang
2003-01-26  He Qiangqiang  <carton@linux.net.cn>

        * zh_CN.po: Updated Simplified Chinese translation by
        Funda Wang <fundawang@en2china.com>.
2003-01-26 13:12:26 +00:00
Kang Jeong-Hee
d87fb4cab8 ko.po updated 2003-01-26 12:11:14 +00:00
Chyla Zbigniew
1f1e466e88 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2003-01-24 22:22:11 +00:00
Christian Neumair
715f735051 Updated German translation. 2003-01-24 15:20:14 +00:00
Matthias Clasen
4184031fab Make move bindings viewport-based when the cursor is invisible. (#78669)
2003-01-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Make
	move bindings viewport-based when the cursor is invisible.  (#78669)
2003-01-24 00:54:41 +00:00
Daniel Elstner
9ef77ef39c Merge from HEAD.
2003-01-23  Daniel Elstner  <daniel.elstner@gmx.net>

Merge from HEAD.

* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
in addition to show_all in order to keep them symmetric. (#102201)
2003-01-23 20:04:16 +00:00
Yuri Syrota
7e12070078 Updated Ukrainian translation 2003-01-23 19:12:22 +00:00
Yuri Syrota
a5c0d28e10 Updated Ukrainian translation 2003-01-23 18:47:45 +00:00
Tor Lillqvist
e0c849739d Add bug number. 2003-01-22 23:17:07 +00:00
Tor Lillqvist
a0f421f6eb Implement.
2003-01-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_foreign_new_for_display,
	gdk_pixmap_lookup, gdk_pixmap_lookup_for_display): Implement.

	* gdk/gdk.def: Export the above.
2003-01-22 23:15:52 +00:00
Pablo Gonzalo del Campo
d703d86055 Fixed bug #103087.
2003-01-22  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Fixed bug #103087.
2003-01-22 22:25:37 +00:00
Manish Singh
58ee037434 add a "return" at the end of the function, so there is a statement
Wed Jan 22 14:23:23 2003  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkevents-x11.c (translate_key_event): add a "return" at
        the end of the function, so there is a statement following the "out"
        label in all cases (fixes #101961)
2003-01-22 22:15:43 +00:00
Christian Rose
6d006849aa Added "mn" to ALL_LINGUAS. Added Mongolian translation by Sanlig Badral
2003-01-22  Christian Rose  <menthos@menthos.com>

	* configure.in: Added "mn" to ALL_LINGUAS.
	* po/mn.po: Added Mongolian translation by
	Sanlig Badral <badral@chinggis.com>.
2003-01-22 01:51:50 +00:00
Owen Taylor
8fcedda777 Fix off-by-one error on the backward iteration loop, that was causing the
Wed Jan 15 17:02:18 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
        Fix off-by-one error on the backward iteration loop,
        that was causing the wrong range to be redrawn.
        (at least part of #72734)
2003-01-21 22:48:52 +00:00
Matthias Clasen
45e801df00 Adjust the vadjustment value after changing its bounds. (fixes #101963 and
2003-01-21  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c (gtk_text_view_size_allocate): Adjust the
	vadjustment value after changing its bounds.  (fixes #101963 and
	#73562)
2003-01-21 22:33:14 +00:00
Matthias Clasen
02dbda7fac Merge from HEAD.
2003-01-21  Matthias Clasen  <maclas@gmx.de>

	Merge from HEAD.

	* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
	unnecessary roundtrip failures.  (#93500)
2003-01-21 00:00:48 +00:00
Pablo Saratxaga
15f799d645 updated Vietnamese file;
Added missing langs to ALL_LINGUAS
2003-01-20 18:28:05 +00:00
Gustavo Noronha Silva
365bd26d3c changed a mnemonic 2003-01-20 14:35:54 +00:00
Andraz Tori
e344b9e864 Updated Slovenian translation 2003-01-19 13:45:14 +00:00
Jordi Mallach
a4f1d8e6ea Partially updated Catalan translation. 2003-01-19 03:06:11 +00:00
Tor Lillqvist
1657870198 Fix for #103614 and some other problems with GtkFileSelection on Windows:
2003-01-19  Tor Lillqvist  <tml@iki.fi>

	Fix for #103614 and some other problems with GtkFileSelection on
	Windows:

	* gtk/fnmatch.c (get_char): Need to use g_unichar_tolower(), not
	g_ascii_tolower(). Windows file names are case-insensitive for all
	Unicode letters.

	* gtk/gtkfilesel.c: Instead of checking for G_OS_WIN32 or
	G_WITH_CYGWIN, check G_PLATFORM_WIN32. Move inclusion of gtkintl.h
	earlier, as it includes config.h unconditionally, and gtkprivate.h
	redefines GTK_LOCALEDIR.
	(struct _CompletionDirSent): Ifdef out the fields not used on
	Windows.
	(compare_utf8_filenames, compare_sys_filenames): Need different
	comparison implementation for UTF-8 file names and system locale
	file names on Win32. Cannot simply use g_ascii_strcasecmp(), but
	need to casefold all Unicode letters.
	(cmpl_completion_matches, open_dir, correct_parent): Ifdef out
	variables not used on Win32 to avoid warnings about unused
	variables.
	(open_ref_dir): Use g_path_skip_root() to skip past potential
	drive letter in front of the leading (back)slash.
	(open_new_dir): Ifdef out use of CompletionDirSent fields not
	there on Win32.
	(correct_parent): Bypass inode check also on Cygwin.
2003-01-19 01:20:27 +00:00
Andraz Tori
d90f3e1479 Updated Slovenian translation 2003-01-16 15:50:03 +00:00
Daniel Yacob
32caaf841d Updating Amharic translation, in right branch. 2003-01-16 13:24:05 +00:00
German Poo-Caaman~o
c84b10e5bb Updated Spanish translation
2003-01-16  German Poo-Caaman~o <gpoo@ubiobio.cl>

	* es.po: Updated Spanish translation
2003-01-16 12:31:50 +00:00
Gustavo Noronha Silva
f4504ac5a2 translation update 2003-01-16 01:39:07 +00:00
Tor Lillqvist
e578482657 Fix bug noticed by Alex Shaduri: Tooltips and other GDK_WINDOW_TEMP
2003-01-15  Tor Lillqvist  <tml@iki.fi>

	Fix bug noticed by Alex Shaduri: Tooltips and other
	GDK_WINDOW_TEMP windows were activated. This looked very odd, and
	was a regression from earlier versions.

	* gdk/win32/gdkwindow-win32.c (show_window_internal): Fine-tune
	behaviour. Don't ever activate GDK_WINDOW_TEMP windows.
	(gdk_window_move, gdk_window_resize): Add debug logging.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): When we get a
	WM_SIZE message for a non-visible (withdrawn) window, don't clear
	the GDK_WINDOW_STATE_WITHDRAWN bit. The window is still withdrawn
	even if its size changes.
2003-01-15 23:54:30 +00:00
Abel Cheung
d941e11496 Updated traditional Chinese translation.
2003-01-16  Abel Cheung  <maddog@linux.org.hk>

	* zh_TW.po: Updated traditional Chinese translation.
2003-01-15 23:33:34 +00:00
Owen Taylor
2db9f4acbe Set the double click speed from XSETTINGS when creating a new GtkSettings
Wed Jan 15 15:55:47 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksettings.c: Set the double click speed from
        XSETTINGS when creating a new GtkSettings object
        as well as when getting a notify. (#103601, reported
        by Louis Garcia)
2003-01-15 21:01:45 +00:00
Owen Taylor
4a9a6598f0 Show/hide the notebook event window as necessary, we weren't previously
Wed Jan 15 14:56:09 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_size_allocate):
        Show/hide the notebook event window as necessary,
        we weren't previously keeping the visibility updated
        properly.  (#103599)
2003-01-15 20:31:39 +00:00
Pablo Gonzalo del Campo
2ec3761ee7 Fixed another couple of strings in Spanish translation.
2003-01-15  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Fixed another couple of strings in Spanish translation.
2003-01-15 20:04:18 +00:00
Pablo Gonzalo del Campo
ad7a7fac4b Fixed a couple of strings in Spanish translation.
2003-01-15  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Fixed a couple of strings in Spanish translation.
2003-01-15 18:26:00 +00:00
Dmitry Mastrukov
2b09353851 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-01-15 06:07:59 +00:00
Murray Cumming
7710e3111d Fixes #102168. Merge from HEAD.
2002-12-29  Murray Cumming  <murrayc@usa.net>

	Fixes #102168. Merge from HEAD.

	* gtk/gtkliststore.c, gtktreednd.c, gtktreestore.c:
	Actually implement the GtkTreeDragSource::row_draggable virtual
	function in GtkListStore and GtkTreeStore instead of just checking
	whether it's implemented at all. This means that DnD isn't broken by
	gtkmm's virtual function wrappers. The alternative would be to
	hard-code the TRUE return value into gtkmm's wrappers, but that's
	part of GTK+'s implementation, not it's API.
2003-01-14 22:58:54 +00:00
Kristian Rietveld
0a35750777 Merge from HEAD.
Tue Jan 14 23:54:06 2002  Kristian Rietveld  <kris@gtk.org>

	Merge from HEAD.

	* gtk/gtktreeview.c: fix compiler warning.
2003-01-14 22:45:10 +00:00
Kristian Rietveld
6b6dfd7fe6 Merges from HEAD.
The full changelog for this commit is too long to paste here, so to avoid
annoying everybody I will write a short summary here.

Fixes for: #102890, #103198, #102618, #93629, #100172, #101235, #96650,
#102379.

Other than that also a ListStore fix and a TreeView scrolling fix.

Those interested in the hairy details can checkout gtk+/ChangeLog.
2003-01-14 22:42:54 +00:00
Pauli Virtanen
2a5cb4e974 Updated Finnish translation.
2003-01-13  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2003-01-13 22:19:35 +00:00
Christian Neumair
2159b143c4 Updated German translation. 2003-01-13 15:20:40 +00:00
Tor Lillqvist
df954de178 Move inclusion of config.h and gtkintl.h earlier, as gtkprivate.h
2003-01-12  Tor Lillqvist  <tml@iki.fi>

	* gtk/gtkmain.c: Move inclusion of config.h and gtkintl.h earlier,
	as gtkprivate.h redefines GTK_LOCALEDIR on Win32, for run-time
	lookup.
2003-01-12 04:19:09 +00:00
Tor Lillqvist
cbf87cfed9 Depend on gdk.def.
2003-01-12  Tor Lillqvist  <tml@iki.fi>

	* gdk/Makefile.am (libgdk_win32_2_0_la_DEPENDENCIES): Depend on
	gdk.def.

	* gdk/gdk.def
	* gtk/gtk.def: Add some missing entries. Thanks to Kenichi SUTO.
2003-01-12 01:56:27 +00:00
Tor Lillqvist
c50b328eb9 Add some missing entries. Thanks to Kenichi SUTO.
2003-01-12  Tor Lillqvist  <tml@iki.fi>

	* gdk_pixbuf.def: Add some missing entries. Thanks to Kenichi SUTO.
2003-01-12 01:22:37 +00:00
Tor Lillqvist
2183d21b12 Implement by setting or clearing the WS_EX_TOOLWINDOW extended window
2003-01-09  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_skip_taskbar_hint):
	Implement by setting or clearing the WS_EX_TOOLWINDOW extended
	window style.
	(gdk_window_set_type_hint): Add all cases to the switch (not all
	do anything, though). Handle GDK_WINDOW_TYPE_HINT_TOOLBAR by
	calling gdk_window_set_skip_taskbar_hint(). This means that GTK
	won't know that the skip_taskbar hint is on for the window, is
	this bad?
2003-01-09 03:59:34 +00:00
Tor Lillqvist
ca8a6763ea Changes for run-time lookup of installation location on Win32:
2003-01-09  Tor Lillqvist  <tml@iki.fi>

	Changes for run-time lookup of installation location on Win32:

	* Makefile.am (INCLUDES): Define PREFIX as $(prefix).

	* gdk-pixbuf-io.c (get_sysconfdir): New function, look up
	installation location at runtime and deduce GTK_SYSCONFDIR
	from it.
	(get_toplevel): Similar, for the top-level installation directory.
	(correct_prefix): Replace compile-time prefix with run-time
	prefix.
	(get_libdir): Remove, not used any longer.
	(gdk_pixbuf_io_init): Call correct_prefix().
2003-01-09 03:11:06 +00:00
Manish Singh
c2d9c765ab #include <stdlib.h> for putenv, <string.h> for strlen.
Wed Jan  8 18:44:21 2003  Manish Singh  <yosh@gimp.org>

        * gdk/x11/gdkdisplay-x11.c: #include <stdlib.h> for putenv,
        <string.h> for strlen.

        * gdk/x11/gdkscreen-x11.c: #include <stdlib.h> for getenv,
        <string.h> for strrchr.

        * tests/testgtk.c (create_saved_position): "x" and "y" properties
        for widgets no longer exist, use gtk_window_move instead.

        * test/testtextbuffer.c (check_get_set_text): cast strlen to
        int for g_error.
2003-01-09 02:39:18 +00:00
Pablo Gonzalo del Campo
95c4b5228d Fixed translation bug #102758.
2003-01-07  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Fixed translation bug #102758.
2003-01-07 17:54:01 +00:00
Christian Neumair
b60c0b2967 Updated German translation, added "missing" to .cvsignore. 2003-01-06 16:13:37 +00:00
Tor Lillqvist
6ea8fe462a Actually remove the makefile.mingw from EXTRA_DIST which I thought
I did yesterday.
2003-01-05 20:06:04 +00:00
Tor Lillqvist
a329c83c0a Add bin/{gdk-pixbuf-query-loaders, gtk-query-immodules-2.0,gtk-demo}.exe
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in (DEVZIP): Add bin/{gdk-pixbuf-query-loaders,
	gtk-query-immodules-2.0,gtk-demo}.exe and share/gtk-2.0.
2003-01-05 18:55:29 +00:00
Tor Lillqvist
41210aa925 [Win32] Change backslahses into slashes in path.
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* queryloaders.c (query_module): [Win32] Change backslahses into
	slashes in path.
2003-01-05 03:23:03 +00:00
Tor Lillqvist
c1b968cf65 Updates. Don't mention the now removed makefile.mingw files.
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* README.win32: Updates. Don't mention the now removed
	makefile.mingw files.
2003-01-05 02:31:41 +00:00
Tor Lillqvist
9efbd84d74 Mention gtk/gtk.def change. 2003-01-05 02:21:01 +00:00
Tor Lillqvist
261cd8ea9b Use correct DLL and import library names, with GTK_API_VERSION in name,
2003-01-05  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Use correct DLL and import library names, with
	GTK_API_VERSION in name, not GTK_MAJOR_VERSION.GTK_MINOR_VERSION.
	(DEVZIP): Add gdk-pixbuf-query-loaders.exe.

	* configure.in: Improve check for dimm.h.

	* configure.in: Set SOEXT to 'so' on Unix, 'dll' on Win32. Used in
	gdk-pixbuf/Makefile.am.

	* gdk-pixbuf/makefile.mingw.in
	* gdk-pixbuf/pixops/makefile.mingw.in
	* gdk/makefile.mingw.in
	* gdk/win32/makefile.mingw.in
	* gtk/makefile.mingw.in: Remove. Not maintained anyway.

	* gdk-pixbuf/Makefile.am
	* gdk-pixbuf/pixops/Makefile.am
	* gdk/Makefile.am
	* gdk/win32/Makefile.am
	* gtk/Makefile.am
	* configure.in: Remove makefile.mingw{,.in} from here, too.

	* README.win32: Updates. Don't mention the now removed
	makefile.mingw files.

	* gdk/gdk.def: Add a couple of missing entries.

	* gdk/gdkkeynames.c: Include <string.h> for strcmp() and memcpy().

	* gdk/win32/gdkevents-win32.c: Move dimm.h header clash workaround
	earlier.

	* gdk/win32/rc/Makefile.am: Add hack to help
	build/win32/lt-compile-resource decide which kind of libtool
	object file to produce.

2003-01-04  Tor Lillqvist  <tml@iki.fi>

	* Makefile.am (gdk-pixbuf.loaders): Use @SOEXT@ in the find command.

	* gdk_pixbuf.def: Add gdk_pixbuf_loader_set_size.
2003-01-05 02:00:44 +00:00
Matthias Clasen
5261ce807f Make C-Down step through the sequence of paragraph ends (old behaviour
2003-01-05  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): Make
	C-Down step through the sequence of paragraph ends (old behaviour
	included paragraph starts).  (#80340, patch by Narayana Pattipati)

	* gtk/gtktextiter.c (_gtk_text_btree_get_iter_at_first_toggle):
 	Check for a tag toggle at the start iterator before calling
 	gtk_text_iter_forward_to_tag_toggle().  (#102090, patch by Daniel
	Elstner)
2003-01-04 23:27:38 +00:00
Matthias Clasen
c1bc2621fa Add /*< public >*/ and /*< private >*/ as appropriate. (#97211)
2003-01-04  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkfilesel.h (struct _GtkFileSelection): Add /*< public >*/
	and /*< private >*/ as appropriate.  (#97211)
2003-01-04 20:44:43 +00:00
Tor Lillqvist
9e291b8477 Don't distribute gtk-zip.sh, but do distribute gtk-zip.sh.in.
2003-01-04  Tor Lillqvist  <tml@iki.fi>

	* Makefile.am (EXTRA_DIST): Don't distribute gtk-zip.sh, but do
	distribute gtk-zip.sh.in.
2003-01-04 17:32:05 +00:00
Tor Lillqvist
ff619c2925 Typo. 2003-01-04 03:16:36 +00:00
Tor Lillqvist
1f99d840af Add gdk-pixbuf-source.exe and .1.
2003-01-04  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in (DEVZIP): Add gdk-pixbuf-source.exe and .1.
2003-01-04 03:15:03 +00:00
Matthias Clasen
e8c775e330 Don't crash if gdk-pixbuf.loaders file is missing. (#102222)
2003-01-03  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Don't crash if
	gdk-pixbuf.loaders file is missing.  (#102222)
2003-01-02 23:14:01 +00:00
Matthias Clasen
631b0ab956 Document that it may return NULL. (#102069)
2003-01-02  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwindow.c (gtk_window_get_focus): Document that it may
	return NULL.  (#102069)
2003-01-02 22:00:36 +00:00
Matthias Clasen
f3779ad3bd #ifdef away testcases. 2002-12-31 23:20:26 +00:00
292 changed files with 67206 additions and 42879 deletions

1579
ChangeLog

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -22,8 +22,8 @@ GTK+ requires the following packages:
Simple install procedure
========================
% gzip -cd gtk+-2.2.0.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.2.0 # change to the toplevel directory
% gzip -cd gtk+-2.2.2.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.2.2 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]

View File

@@ -8,7 +8,6 @@ AUTOMAKE_OPTIONS = 1.4
EXTRA_DIST = \
HACKING \
gtk+.spec.in \
makecopyright \
NEWS.pre-1-0 \
ChangeLog.pre-1-0 \
@@ -17,7 +16,7 @@ EXTRA_DIST = \
README.cvs-commits \
README.win32 \
config.h.win32 \
gtk-zip.sh \
gtk-zip.sh.in \
sanitize-la.sh \
po/README.translators \
po/makefile.mingw \
@@ -149,14 +148,13 @@ install-data-hook:
rm -f gdk-2.0.pc && cp -f gdk-$(GDKTARGET)-2.0.pc gdk-2.0.pc && \
rm -f gtk+-2.0.pc && cp -f gtk+-$(GDKTARGET)-2.0.pc gtk+-2.0.pc)
dist-hook: gtk+.spec
dist-hook:
if test -f $(srcdir)/INSTALL.in && test -f $(srcdir)/README.in ; then \
CONFIG_FILES="INSTALL:$(srcdir)/INSTALL.in README:$(srcdir)/README.in" \
CONFIG_HEADERS= \
$(SHELL) config.status \
&& cp INSTALL README $(distdir) ; \
fi \
&& cp gtk+.spec $(distdir)
fi
.PHONY: files release sanity snapshot

101
NEWS
View File

@@ -1,3 +1,104 @@
Overview of Changes in GTK+ 2.2.2
=================================
* GdkPixbuf [Matthias Clasen]
- Fix animation of slow-loading progressive GIFS
- Fix long-standing animated GIF display bug with transparency
- Misc bug and portability fixes [Rick Jones, Tim Mooney, Marijn Ross]
* GDK [Owen Taylor]
- Draw continuous underlines between Pango layout runs when
possible [Kang Jeong-Hee]
- Fix gdk_pixbuf_from_drawable() for big endian [Christian Petig]
Major rewrite of 16-bit handling for pixbuf_from_drawable()
* X11 backend [Owen]
- Fix build on X11R5 [Albert Chin]
- Fix switching keyboard layouts while running [Egmont Koblinger]
- Work around RENDER extension bugs on certain Sun X servers [Morten Welinder]
- Zero unused fields in client messages we send Lubos Lunak]
- Fix occasional segfault when drawing pixbufs [Hans Petter Jansson]
- Fix wrong initializaiton that was keeping XShm from being used.
* Win32 backend [Tor Lillqvist]
- Tweak line drawing
- Mouse/cursor fixes [Allin Cottrell]
- Better handling of floppy drives in GtkFileSelection
- Misc fixes [Arnaud Charlet, Cedric Gustin, Martyn Russell]
* Input methods [Hidetoshi Tajima]
- Add rules for Greek accents to GtkIMContextSimple [Vasilis Vasaitis]
- Fix sorting of rules in GtkIMContextSimple [Vasilis]
- Miscellaneous GtkIMContextXIM fixes
- Fix translation of input context names
* Fix keyboard accelerators/bindings on Numeric Keypad [Owen, Olivier Ripoll]
* Add Delete to GtkEntry context menu, Delete/Select All
to GtkTextView context menu [Matthias]
* Keynav tweaks in GtkFileSelection, GtkColorSel [Matthias]
* Add C-A-PgUp/Down as alternative notebook page switching keys [Matthias]
* GtkTextView
- Fix redrawing on color-only changes [Owen, Gustavo Giráldez]
- Don't scroll to cursor on focus in [Paolo Maggi]
- Fix spot location reported to input method [Owen, TOKUNAGA Hiroyuki,
Yao Zhang]
- Miscellaneous bug fixes [Torbjörn Andersson, Matthias, Manual Clos,
Padraig O'Briain, Owen]
* GtkTreeView [Kristian Rietveld]
- Fix prelighting [Sven Neumann]
- Set drag cursor earlier to allow apps to override [Daniel Elstner]
- Speed up insertions into GtkTreeModelSort [Owen, Jonathan Blandford]
- Get background/cell area handling right in GtkTreeViewColumn [Vasco
Alexandre da Silva Costa]
- Bug fixes [Benjamin Bayart, Jonathan Blandford, Peter Bloomfield,
Dave Cook, Felipe Heidrich, Richard Hult, Markus Lausser, Michael Natterer,
Mariano Suarez-Alvarez, Owen]
* Fix handling of border width for GtkToolbar [Rodney Dawes]
* Rewrite adjustment handling of GtkViewport, fixing many bugs
[Owen, Thomas Leonard, Michael]
* Misc bug fixes [Dennis Björklund, Jonathan, Dave Bordoley, Rich Burridge,
Anders Carlsson, Arnaud, Matthias, Vasco Alexandre da Silva Costa,
Tim Evans, Larry Ewing, John Finlay, Jeff Franks, Jody Goldberg,
Jason D. Hildebrand, Charles Kerr, Alex Larsson, Noah Levitt, Xan Lopez,
Loban Rahman, Richard Reich, Soeren Sandmann, Charles Schmidt,
Rajkumar Siva, Owen, Sergey V. Udaltsov, Morten Welinder, Michael Zucchi]
* Code cleanups [Matthias, Glynn Foster, Britton Kerin, Sven Neumann,
Doug Quale, Manish Singh, Morten Welinder]
* Switch to using libtool-1.5
* Build fixes [Matthias, J. Ali Harlowe, Rich Kinder, Jon Nall, Sven,
Christian Rose]
* Documentation improvements [Matthias, Noah Levitt, Sven Neumann]
* New and updated translations (am,az,be,ca,cs,cy,da,de,el,es,fa,fi,fr,id,
it,ko,li,ml,mn,ms,nl,no,pl,pt,sr,sr@Latn,sv,ta,uk,yi,zh_TW)
Overview of Changes in GTK+ 2.2.1
=================================
* Win32 [Tor Lillqvist]
- Improve setting of window position / decorations
- Implement gdk_pixmap_foreign_new() [Naofumi Yasufuku]
- Fix various file selection bugs
- Improve scheme for locating pixbuf loader modules
- Miscellaneous fixes [Alex Shaduri, Kenichi SUTO, Ed Woods]
* GtkTreeView [Kristian Rietveld]
- made GtkTreeSortable work as the documentation advertises [Jarek Dukat]
- fixed gtk_tree_view_set_sort_column_id so you can disable sorting [Soeren
Sandmann, Jarek Dukat]
- TreeView search now works on all values transformable by GValue and not
just strings [Muktha Narayan]
- _move/_swap fixage in the Stores [Matthew Tuck, Paolo Maggi]
- a lot of misc bug fixes [Alex Duggan, Carlos Garnacho Parro, Hans Petter
Jansson, Kjartan Maraas, Soeren, Dave Camp, Murray Cumming, Dave Cook,
Gaël Le Mignot, Vasco Alexandre da Silva Costa]
* GtkTextView [Matthias Clasen]
- Fix keynav with invisible cursor
- Fix misdrawing of cursor [Owen Taylor] and selection
- Many miscellaneous fixes [Narayana Pattipati, Daniel Elstner]
* Fix problem with accidental inclusion of a main() [Matthias]
* Documentation improvements [Matthias, Havoc Pennington]
* Fix problem with GtkColorsel and pixmap themes [Daniel]
* Fix race condition with GdkRGB in PseudoColor [Shivaram Upadhyayula]
* Warning fixes [Manish Singh]
* configure fixes [Akira Tagoh]
* New and updated translations (ca,de,es,et,ko,mn,pl,pt,vi,zh_CN)
* Miscellaneous bug fixes [Matthias, Daniel, Martin Gansser, Louis Garcia,
Tommi Komulainen, Thomas Leonard, Ian Peters, Arvind Samptur,
Soeren Sandmann, Hidetoshi Tajima, Owen]
Overview of Changes in GTK+ 2.2.0
=================================
* Fix problem with the DND code and event filters [Bolian Yin, Owen Taylor]

2
README
View File

@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 2.2.0. GTK+ is a multi-platform toolkit for
This is GTK+ version 2.2.2. 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.

View File

@@ -33,16 +33,11 @@ Alternative 1 also generates Microsoft import libraries (.lib), if you
have lib.exe available. It might also work for cross-compilation from
Unix.
There are hand-written makefiles for mingw (look for makefile.mingw in
various directories), but those haven't been kept up-to-date, and
probably won't work without editing. Sorry. If you make them work
again, by all means do submit patches.
Note that I use method 1 myself. Hans Breuer has been taking care of
the MSVC makefiles. At times, we disagree a bit about various issues,
and the makefile.msc files might not produce identically named DLLs
and import libraries as the "autoconfiscated" makefiles and libtool
do.
and for instance the makefile.msc files will not produce identically
named DLLs and import libraries as the "autoconfiscated" makefiles and
libtool do. If this bothers you, you will have to fix the makefiles.
Using GTK+ on Win32
===================

View File

@@ -13,10 +13,10 @@ FILE=gdk
DIE=0
have_libtool=false
if libtool --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`libtoolize --version | libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
if libtoolize --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9.][0-9.]*\).*/\1/'`
case $libtool_version in
1.4*)
1.4*|1.5*)
have_libtool=true
;;
esac
@@ -50,8 +50,8 @@ if automake-1.4 --version < /dev/null > /dev/null 2>&1 ; then
fi
if $have_automake ; then : ; else
echo
echo "You must have automake 1.4-p1 installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
echo "You must have automake 1.4-p6 installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p6.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
fi
@@ -109,4 +109,4 @@ if test -z "$AUTOGEN_SUBDIR_MODE"; then
echo
echo "Now type 'make' to compile $PROJECT."
fi
fi

View File

@@ -20,7 +20,6 @@ cflags_set=${CFLAGS+set}
dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
dnl are available for $ac_help expansion (don't we all *love* autoconf?)
GLIB_AC_DIVERT_BEFORE_HELP([
#
# Making releases:
# GTK_MICRO_VERSION += 1;
@@ -30,15 +29,29 @@ GLIB_AC_DIVERT_BEFORE_HELP([
# if backwards compatibility has been broken,
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
#
GTK_MAJOR_VERSION=2
GTK_MINOR_VERSION=2
GTK_MICRO_VERSION=0
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=200
m4_define([gtk_major_version], [2])
m4_define([gtk_minor_version], [2])
m4_define([gtk_micro_version], [2])
m4_define([gtk_interface_age], [2])
# if the minor version number is odd, then we want debugging. Otherwise
# we only want minimal debugging support.
m4_define([gtk_debug_default],
[m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum])])dnl
GTK_MAJOR_VERSION=gtk_major_version
GTK_MINOR_VERSION=gtk_minor_version
GTK_MICRO_VERSION=gtk_micro_version
GTK_INTERFACE_AGE=gtk_interface_age
GTK_BINARY_AGE=`expr 100 '*' $GTK_MINOR_VERSION + $GTK_MICRO_VERSION`
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
dnl This is the X.Y used in -lgtk-FOO-X.Y
GTK_API_VERSION=2.0
])dnl
# if the minor version number is odd, then we want debugging. Otherwise
# we only want minimal debugging support.
m4_define([glib_debug_default],
[m4_if(m4_eval(glib_minor_version % 2), [1], [yes], [minimum])])dnl
AC_SUBST(GTK_MAJOR_VERSION)
AC_SUBST(GTK_MINOR_VERSION)
@@ -162,24 +175,12 @@ if test "$os_win32" = "yes"; then
fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
dnl figure debugging default, prior to $ac_help setup
dnl
GLIB_AC_DIVERT_BEFORE_HELP([
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
debug_default=yes
else
debug_default=minimum
fi
])dnl
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging @<:@default=gtk_debug_default@:>@],,enable_debug=gtk_debug_default)
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
echo $enable_shm, enable_shm="yes")
AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
, enable_ansi=no)
AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
, enable_xim="yes")
AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
, enable_xkb="maybe")
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
@@ -389,7 +390,7 @@ AC_SUBST(STRIP_BEGIN)
AC_SUBST(STRIP_END)
# i18n stuff
ALL_LINGUAS="az be bg ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hi hr hu ia it ja ko lt lv ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
ALL_LINGUAS="am az be bg ca cs cy da de el en_GB es et eu fa fi fr ga gl he hi hr hu ia id it ja ko lt lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sr sr@Latn sv ta tr uk vi wa yi zh_TW zh_CN"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
@@ -470,13 +471,15 @@ if test "${with_ie55+set}" = set && test $with_ie55 != no; then
AC_MSG_CHECKING([for dimm.h])
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -idirafter $with_ie55/Include"
AC_TRY_COMPILE([#include <windows.h>
#include <objbase.h>
AC_TRY_COMPILE([/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
#ifdef __GNUC__
/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
#define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
#define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
#endif
#include <windows.h>
#include <objbase.h>
#include <imm.h>
#ifdef __GNUC__
#undef IMEMENUITEMINFOA
#undef IMEMENUITEMINFOW
#endif
@@ -632,17 +635,11 @@ fi
AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
AC_ARG_ENABLE(modules, [ --disable-modules disable dynamic module loading],[
if test x$withval = xyes; then
with_modules=yes
else
with_modules=no
fi
])
AC_ARG_ENABLE(modules, [ --disable-modules disable dynamic module loading])
dynworks=false
deps=
if test x$with_modules = xno; then
if test x$enable_modules = xno; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
@@ -997,8 +994,10 @@ if test "x$gdktarget" = "xx11"; then
AM_CONDITIONAL(HAVE_XFT, $have_xft)
if $PKG_CONFIG --exists xft ; then
AC_DEFINE(HAVE_XFT2, 1, [Define if we have Xft, version 2])
if $have_xft; then
if $PKG_CONFIG --exists xft ; then
AC_DEFINE(HAVE_XFT2, 1, [Define if we have Xft, version 2])
fi
fi
#
@@ -1155,11 +1154,20 @@ if test "x$gdktarget" = "xx11"; then
,
$x_libs_for_checks)
# Check for XIM support.
# Generic X11R6 check needed for XIM support; we could
# probably use this to replace the above, but we'll
# leave the separate XConvertCase check for clarity
if test "x$enable_xim" = "xyes"; then
GTK_XIM_FLAGS="-DUSE_XIM"
have_x11r6=false
AC_CHECK_LIB(X11, XAddConnectionWatch,
have_x11r6=true,
,
$x_libs_for_checks)
if $have_x11r6; then
AC_DEFINE(HAVE_X11R6,1,[Define if we have X11R6])
fi
AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
# Check for XKB support.
@@ -1187,7 +1195,7 @@ if test "x$gdktarget" = "xx11"; then
AC_DEFINE(XINPUT_NONE)
fi
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
# Check for the RANDR extension
@@ -1246,6 +1254,7 @@ else
AM_CONDITIONAL(HAVE_XFT, false)
AM_CONDITIONAL(XINPUT_XFREE, false)
AM_CONDITIONAL(USE_X11, false)
AM_CONDITIONAL(HAVE_X11R6, false)
fi
if test "x$gdktarget" = "xwin32"; then
@@ -1581,7 +1590,6 @@ AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
AC_OUTPUT([
config.h.win32
gtk-zip.sh
gtk+.spec
Makefile
gdk-pixbuf-2.0.pc
gdk-2.0.pc
@@ -1609,21 +1617,16 @@ docs/reference/gtk/version.xml
docs/faq/Makefile
docs/tutorial/Makefile
gdk-pixbuf/Makefile
gdk-pixbuf/makefile.mingw
gdk-pixbuf/gdk_pixbuf.rc
gdk-pixbuf/gdk-pixbuf-features.h
gdk-pixbuf/pixops/Makefile
gdk-pixbuf/pixops/makefile.mingw
gdk/Makefile
gdk/makefile.mingw
gdk/x11/Makefile
gdk/win32/Makefile
gdk/win32/makefile.mingw
gdk/win32/rc/Makefile
gdk/win32/rc/gdk.rc
gdk/linux-fb/Makefile
gtk/Makefile
gtk/makefile.mingw
gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc

View File

@@ -34,11 +34,13 @@ noinst_PROGRAMS = \
if CROSS_COMPILING
pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
pixbuf_csource_deps=
else
pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$$topdir/gdk-pixbuf/gdk-pixbuf.loaders $$topdir/gdk-pixbuf/gdk-pixbuf-csource
pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders
endif
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders apple-red.png gnome-foot.png
test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png
(topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
cd $(srcdir) && \
$(pixbuf_csource) --build-list \

View File

@@ -52,11 +52,10 @@ bin_PROGRAMS = gtk-demo
BUILT_SOURCES = demos.h
EXTRA_DIST = \
geninclude.pl \
$(IMAGEFILES)
demos.h: $(demos) geninclude.pl
(cd $(srcdir) && $(PERL) ./geninclude.pl $(demos) > demos.h)
(cwd=`pwd` && cd $(srcdir) && $(PERL) $$cwd/geninclude.pl $(demos) > demos.h)
gtk_demo_SOURCES = \
$(demos) \

View File

@@ -12,6 +12,27 @@ static GtkWidget *da;
static GdkColor color;
static GtkWidget *frame;
/* Expose callback for the drawing area
*/
static gboolean
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
if (widget->window)
{
GtkStyle *style;
style = gtk_widget_get_style (widget);
gdk_draw_rectangle (widget->window,
style->bg_gc[GTK_STATE_NORMAL],
TRUE,
event->area.x, event->area.y,
event->area.width, event->area.height);
}
return TRUE;
}
static void
change_color_callback (GtkWidget *button,
gpointer data)
@@ -76,8 +97,12 @@ do_colorsel (void)
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
da = gtk_drawing_area_new ();
g_signal_connect (da, "expose_event",
G_CALLBACK (expose_event_callback), NULL);
/* set a minimum size */
gtk_widget_set_size_request (da, 200, 200);
/* set the color */

View File

@@ -1,163 +0,0 @@
#!/usr/bin/perl -w
print <<EOT;
typedef GtkWidget *(*GDoDemoFunc) (void);
typedef struct _Demo Demo;
struct _Demo
{
gchar *title;
gchar *filename;
GDoDemoFunc func;
Demo *children;
};
EOT
for $file (@ARGV) {
my %demo;
($basename = $file) =~ s/\.c$//;
open INFO_FILE, $file or die "Cannot open '$file'\n";
$title = <INFO_FILE>;
$title =~ s@^\s*/\*\s*@@;
$title =~ s@\s*$@@;
close INFO_FILE;
print "GtkWidget *do_$basename (void);\n";
push @demos, {"title" => $title, "file" => $file,
"func" => "do_$basename"};
}
# generate a list of 'parent names'
foreach $href (@demos) {
if ($href->{"title"} =~ m|^([\w\s]+)/[\w\s]+$|) {
my $parent_name = $1;
my $do_next = 0;
# parent detected
if (defined @parents) {
foreach $foo (@parents) {
if ($foo eq $parent_name) {
$do_next = 1;
}
}
if ($do_next) {
next;
}
}
push @parents, $parent_name;
$tmp = (defined @child_arrays)?($#child_arrays + 1):0;
push @child_arrays, "child$tmp";
push @demos, {"title" => $parent_name, "file" => "NULL",
"func" => "NULL"};
}
}
if (defined @parents) {
$i = 0;
for ($i = 0; $i <= $#parents; $i++) {
$first = 1;
print "\nDemo ", $child_arrays[$i], "[] = {\n";
$j = 0;
for ($j = 0; $j <= $#demos; $j++) {
$href = $demos[$j];
if (!defined $demos[$j]) {
next;
}
if ($demos[$j]{"title"} =~ m|^$parents[$i]/([\w\s]+)$|) {
if ($first) {
$first = 0;
} else {
print ",\n";
}
print qq ( { "$1", "$demos[$j]{file}", $demos[$j]{func}, NULL });
# hack ... ugly
$demos[$j]{"title"} = "foo";
}
}
print ",\n";
print qq ( { NULL } );
print "\n};\n";
}
}
# sort @demos
@demos_old = @demos;
@demos = sort {
$a->{"title"} cmp $b->{"title"};
} @demos_old;
# sort the child arrays
if (defined @child_arrays) {
for ($i = 0; $i <= $#child_arrays; $i++) {
@foo_old = @{$child_arrays[$i]};
@{$child_arrays[$i]} = sort {
$a->{"title"} cmp $b->{"title"};
} @foo_old;
}
}
# toplevel
print "\nDemo testgtk_demos[] = {\n";
$first = 1;
foreach $href (@demos) {
$handled = 0;
# ugly evil hack
if ($href->{title} eq "foo") {
next;
}
if ($first) {
$first = 0;
} else {
print ", \n";
}
if (defined @parents) {
for ($i = 0; $i <= $#parents; $i++) {
if ($parents[$i] eq $href->{title}) {
if ($href->{file} eq 'NULL') {
print qq ( { "$href->{title}", NULL, $href->{func}, $child_arrays[$i] });
} else {
print qq ( { "$href->{title}", "$href->{file}", $href->{func}, $child_arrays[$i] });
}
$handled = 1;
last;
}
}
}
if ($handled) {
next;
}
print qq ( { "$href->{title}", "$href->{file}", $href->{func}, NULL });
}
print ",\n";
print qq ( { NULL } );
print "\n};\n";
exit 0;

View File

@@ -43,9 +43,10 @@ gchar *
demo_find_file (const char *base,
GError **err)
{
g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
g_return_val_if_fail (err == NULL || *err == NULL, NULL);
if (g_file_test (base, G_FILE_TEST_EXISTS))
if (g_file_test ("gtk-logo-rgb.gif", G_FILE_TEST_EXISTS) &&
g_file_test (base, G_FILE_TEST_EXISTS))
return g_strdup (base);
else
{
@@ -722,7 +723,7 @@ create_tree (void)
cell = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (cell),
g_object_set (cell,
"style", PANGO_STYLE_ITALIC,
NULL);

View File

@@ -252,7 +252,7 @@ do_pixbufs (void)
gtk_container_add (GTK_CONTAINER (window), da);
timeout_id = gtk_timeout_add (FRAME_DELAY, timeout, NULL);
timeout_id = g_timeout_add (FRAME_DELAY, timeout, NULL);
}
}

View File

@@ -261,7 +261,7 @@ add_columns (GtkTreeView *treeview)
/* column for holiday names */
renderer = gtk_cell_renderer_text_new ();
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
g_object_set (renderer, "xalign", 0.0, NULL);
col_offset = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
-1, "Holiday",
@@ -273,7 +273,7 @@ add_columns (GtkTreeView *treeview)
/* alex column */
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
g_object_set (renderer, "xalign", 0.0, NULL);
g_object_set_data (G_OBJECT (renderer), "column", (gint *)ALEX_COLUMN);
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
@@ -296,7 +296,7 @@ add_columns (GtkTreeView *treeview)
/* havoc column */
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
g_object_set (renderer, "xalign", 0.0, NULL);
g_object_set_data (G_OBJECT (renderer), "column", (gint *)HAVOC_COLUMN);
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
@@ -318,7 +318,7 @@ add_columns (GtkTreeView *treeview)
/* tim column */
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
g_object_set (renderer, "xalign", 0.0, NULL);
g_object_set_data (G_OBJECT (renderer), "column", (gint *)TIM_COLUMN);
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
@@ -341,7 +341,7 @@ add_columns (GtkTreeView *treeview)
/* owen column */
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
g_object_set (renderer, "xalign", 0.0, NULL);
g_object_set_data (G_OBJECT (renderer), "column", (gint *)OWEN_COLUMN);
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
@@ -363,7 +363,7 @@ add_columns (GtkTreeView *treeview)
/* dave column */
renderer = gtk_cell_renderer_toggle_new ();
g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
g_object_set (renderer, "xalign", 0.0, NULL);
g_object_set_data (G_OBJECT (renderer), "column", (gint *)DAVE_COLUMN);
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);

View File

@@ -187,7 +187,7 @@ static guint timeout_id;
static void
destroy_cb (GtkObject *object, gpointer data)
{
gtk_timeout_remove (timeout_id);
g_source_remove (timeout_id);
timeout_id = 0;
gtk_main_quit ();
@@ -225,7 +225,7 @@ main (int argc, char **argv)
gtk_container_add (GTK_CONTAINER (window), da);
timeout_id = gtk_timeout_add (FRAME_DELAY, timeout, NULL);
timeout_id = g_timeout_add (FRAME_DELAY, timeout, NULL);
gtk_widget_show_all (window);
gtk_main ();

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;
}

View File

@@ -626,7 +626,7 @@ main (int argc, char **argv)
status.readlen = readlen;
status.timeout = gtk_timeout_add (100, update_timeout, &status);
status.timeout = g_timeout_add (100, update_timeout, &status);
}
#endif
}

View File

@@ -1,3 +1,77 @@
2003-06-05 Matthias Clasen <maclas@gmx.de>
* gtk/question_index.sgml: Add a couple of questions.
2003-06-01 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf/tmpl/gdk-pixbuf.sgml:
* gdk-pixbuf/tmpl/animation.sgml: Remove manually inserted
anchors, gtk-doc emits anchors for all objects since Dec 2002.
2003-05-27 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkadjustment.sgml: Document allowed values for
adjustments which are used in scrollbars. (#108448, Ernst Lippe)
* gtk/tmpl/gtkradiomenuitem.sgml: Fix example. (#113604,
Julien Moutte)
2003-05-19 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf/gdk-pixbuf-sections.txt:
* gdk/gdk-sections.txt: Add some unused symbols to private sections.
2003-05-17 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_tree_row_reference_get_type.
2003-05-05 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-docs.sgml:
* gtk/tmpl/gtksocket.sgml: Improve the docs about cross-process
embedding a bit. (#112101, #112006)
2003-04-13 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_tree_view_column_cell_get_position().
2003-04-07 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkenums.sgml, gtk/tmpl/gtkmain.sgml,
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
gtk/tmpl/gtkspinbutton.sgml, gtk/tmpl/gtkstatusbar.sgml,
gtk/tmpl/gtktext.sgml, gtk/tmpl/gtktogglebuttons.sgml,
gtk/tmpl/gtktreeviewcolumn.sgml, gtk/tmpl/gtktypeutils.sgml: Fix
numerous misspellings of possessive "its". (#110027, Doug Quale)
2003-04-01 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkmessagedialog.sgml: Fix formatting of examples.
* gtk/tmpl/gtkfilesel.sgml: Fix the example. (#109563)
2003-03-22 Michael Natterer <mitch@gimp.org>
* gtk/Makefile.am: copy stock_color_picker_25.png, don't copy
stock_save_24.png twice.
* gtk/tmpl/gtkstock.sgml: use it for GTK_STOCK_COLOR_PICKER
instead of stock_colorselector_24.png.
2003-02-24 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtktreemodel.sgml: Fix self-referential documenation of
gtk_tree_model_get_iter_root(). (#106720, Keith Sharp)
2003-02-11 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkrc.sgml: Document that font and fontset declarations
are ignored.
2003-01-30 Matthias Clasen <maclas@gmx.de>
* gtk/running.sgml: s/overwrite/override/g (#104627, Brian Cameron)
Fri Dec 20 13:10:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/building.sgml: Update directories in download

View File

@@ -1,14 +1,16 @@
Makefile
Makefile.in
html
sgml
gdk-pixbuf.args
gdk-pixbuf.hierarchy
gdk-pixbuf.signals
gdk-pixbuf-decl.txt
gdk-pixbuf-decl-list.txt
gdk-pixbuf-decl.txt
gdk-pixbuf-undocumented.txt
gdk-pixbuf-unused.txt
gdk-pixbuf.args
gdk-pixbuf.hierarchy
gdk-pixbuf.interfaces
gdk-pixbuf.prerequisites
gdk-pixbuf.signals
html
xml
*.stamp
*.lo
.libs

View File

@@ -5,7 +5,7 @@ Animations
Animated images.
<!-- ##### SECTION Long_Description ##### -->
<para><anchor id="GdkPixbufAnimation"/>
<para>
The &gdk-pixbuf; library provides a simple mechanism to load and represent
animations. An animation is conceptually a series of frames to be displayed
over time. Each frame is the same size. The animation may not be represented

View File

@@ -6,7 +6,7 @@ Information that describes an image.
<!-- ##### SECTION Long_Description ##### -->
<para><anchor id="GdkPixbuf"/>
<para>
The <structname>GdkPixbuf</structname> structure contains
information that describes an image in memory.
</para>

View File

@@ -284,6 +284,7 @@ Modules supporting animations must derive a type from
virtual functions.
</para>
@parent_class:
@is_static_image: returns whether the given animation is just a static image.
@get_static_image: returns a static image representing the given animation.
@get_size: fills @width and @height with the frame size of the animation.
@@ -296,6 +297,7 @@ Modules supporting animations must derive a type from
virtual functions.
</para>
@parent_class:
@get_delay_time: returns the time in milliseconds that the current frame
should be shown.
@get_pixbuf: returns the current frame.

View File

@@ -1,14 +1,16 @@
Makefile
Makefile.in
sgml
html
gdk.args
gdk.signals
gdk.hierarchy
gdk-decl.txt
gdk-decl-list.txt
gdk-decl.txt
gdk-undocumented.txt
gdk-unused.txt
gdk.args
gdk.hierarchy
gdk.interfaces
gdk.prerequisites
gdk.signals
html
xml
*.stamp
*.lo
.libs

View File

@@ -1,16 +1,17 @@
Makefile
Makefile.in
sgml
html
.libs
gtk.args
gtk.hierarchy
gtk.signals
gtk-decl.txt
gtk-decl-list.txt
gtk-decl.txt
gtk-scan.lo
gtk-undocumented.txt
gtk-unused.txt
gtk-scan.lo
gtk.args
gtk.hierarchy
gtk.interfaces
gtk.prerequisites
gtk.signals
html
xml
*.stamp
*.lo
.libs

View File

@@ -73,7 +73,6 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/stock_exec_24.png \
$(top_srcdir)/gtk/stock-icons/stock_search_24.png \
$(top_srcdir)/gtk/stock-icons/stock_search_replace_24.png \
$(top_srcdir)/gtk/stock-icons/stock_save_24.png \
$(top_srcdir)/gtk/stock-icons/stock_bottom_24.png \
$(top_srcdir)/gtk/stock-icons/stock_first_24.png \
$(top_srcdir)/gtk/stock-icons/stock_last_24.png \
@@ -109,6 +108,7 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/stock_save_24.png \
$(top_srcdir)/gtk/stock-icons/stock_save_as_24.png \
$(top_srcdir)/gtk/stock-icons/stock_colorselector_24.png \
$(top_srcdir)/gtk/stock-icons/stock_color_picker_25.png \
$(top_srcdir)/gtk/stock-icons/stock_font_24.png \
$(top_srcdir)/gtk/stock-icons/stock_sort_ascending_24.png \
$(top_srcdir)/gtk/stock-icons/stock_sort_descending_24.png \
@@ -296,12 +296,3 @@ dist-hook: dist-check-gtkdoc dist-hook-local
-cp $(srcdir)/html/* $(distdir)/html
.PHONY : dist-hook-local

View File

@@ -294,7 +294,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
&GtkDialog;
&GtkInvisible;
&GtkMessageDialog;
&GtkPlug;
&GtkWindow;
&GtkWindowGroup;
</chapter>
@@ -447,6 +446,7 @@ that is, GUI components such as #GtkButton or #GtkTextView.
<chapter id="PlugSocket">
<title>Cross-process Embedding</title>
&GtkPlug;
&GtkSocket;
</chapter>

View File

@@ -2896,6 +2896,7 @@ GTK_TYPE_TREE_ROW_REFERENCE
gtk_tree_model_get_type
gtk_tree_iter_get_type
gtk_tree_path_get_type
gtk_tree_row_reference_get_type
</SECTION>
<SECTION>
@@ -3093,6 +3094,7 @@ gtk_tree_view_column_set_sort_order
gtk_tree_view_column_get_sort_order
gtk_tree_view_column_cell_set_cell_data
gtk_tree_view_column_cell_get_size
gtk_tree_view_column_cell_get_position
gtk_tree_view_column_cell_is_visible
gtk_tree_view_column_focus_cell
<SUBSECTION Standard>

View File

@@ -197,6 +197,114 @@ can be defined as:
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
How do I use non-ASCII characters in GTK+ programs ?
</para>
</question>
<answer>
<para>
GTK+ uses <ulink url="http://www.unicode.org">Unicode</ulink> (more exactly
UTF-8) for all text. UTF-8 encodes each Unicode codepoint as a
sequence of one to six bytes and has a number of nice
properties which make it a good choice for working with Unicode
text in C programs:
<itemizedlist>
<listitem><para>
ASCII characters are encoded by their familiar ASCII codepoints.
</para></listitem>
<listitem><para>
ASCII characters never appear as part of any other character.
</para></listitem>
<listitem><para>
The zero byte doesn't occur as part of a character, so that UTF-8 strings can
be manipulated with the usual C library functions for
handling zero-terminated strings.
</para></listitem>
</itemizedlist>
More information about Unicode and UTF-8 can be found in the
<ulink url="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode FAQ for Unix/Linux</ulink>.
GLib provides functions for converting strings between UTF-8 and other
encodings, see
<link linkend="g-locale-to-utf8">g_locale_to_utf8()</link> and <link
linkend="g-convert">g_convert()</link>.
</para>
<para>
Text coming from external sources (e.g. files or user input), has to be
converted to UTF-8 before being handed over to GTK+. The
following example writes the content of a IS0-8859-1 encoded text
file to <literal>stdout</literal>:
<informalexample><programlisting>
gchar *text, *utf8_text;
gsize length;
GError *error = NULL;
if (g_file_get_contents (filename, &amp;text, &amp;length, NULL))
{
utf8_text = g_convert (text, length, "UTF-8", "ISO-8859-1",
NULL, NULL, &amp;error);
if (error != NULL)
{
fprintf ("Couldn't convert file &percnt;s to UTF-8\n", filename);
g_error_free (error);
}
else
g_print (utf8_text);
}
else
fprintf (stderr, "Unable to read file &percnt;s\n", filename);
</programlisting></informalexample>
</para>
<para>
For string literals in the source code, there are several alternatives for
handling non-ASCII content:
<variablelist>
<varlistentry><term>direct UTF-8</term>
<listitem><para>
If your editor and compiler are capable of handling UTF-8 encoded sources,
it is very convenient to simply use UTF-8 for string literals, since it allows
you to edit the strings in "wysiwyg". Note that choosing this option may
reduce the portability of your code.
</para></listitem>
</varlistentry>
<varlistentry><term>escaped UTF-8</term>
<listitem><para>
Even if your toolchain can't handle UTF-8 directly, you can still encode string
literals in UTF-8 by using octal or hexadecimal escapes like
<literal>\212</literal> or <literal>\xa8</literal> to
encode each byte. This is portable, but modifying the escaped strings is not
very convenient. Be careful when mixing hexadecimal escapes with ordinary text;
<literal>"\xa8abcd"</literal> is a string of length 1 !
</para></listitem>
</varlistentry>
<varlistentry><term>runtime conversion</term>
<listitem><para>
If the string literals can be represented in an encoding which your toolchain
can handle (e.g. IS0-8859-1), you can write your source files in that encoding
and use <link linkend="g-convert">g_convert()</link> to convert the strings to
UTF-8 at runtime. Note that this has some runtime overhead, so you may want to
move the conversion out of inner loops.
</para></listitem>
</varlistentry>
</variablelist>
Here is an example showing the three approaches using the copyright sign
&copy; which has Unicode and ISO-8859-1 codepoint 169 and is represented in
UTF-8 by the two bytes 194, 169:
<informalexample><programlisting>
g_print ("direct UTF-8: &copy;");
g_print ("escaped UTF-8: \302\251");
text = g_convert ("runtime conversion: &copy;", -1, "ISO-8859-1", "UTF-8", NULL, NULL, NULL);
g_print(text);
g_free (text);
</programlisting></informalexample>
</para>
</answer>
</qandaentry>
<qandaentry>
<question><para>
How do I use GTK+ with C++?
@@ -290,7 +398,100 @@ To load an image or animation file asynchronously (without blocking), use
</qandaentry>
<qandaentry>
<question><para>
How do I draw text ?
</para></question>
<answer>
<para>
To draw a piece of text, use a Pango layout and
<link linkend="gdk-draw-layout">gdk_draw_layout()</link>,
using code like the following:
<informalexample>
<programlisting>
layout = gtk_widget_create_pango_layout (widget, text);
fontdesc = pango_font_description_from_string ("Luxi Mono 12");
pango_layout_set_font_description (layout, fontdesc);
gdk_draw_layout (..., layout);
pango_font_description_free (fontdesc);
g_object_unref (layout);
</programlisting>
</informalexample>
Do not use the deprecated <link linkend="GdkFont">GdkFont</link> and <link linkend="gdk-draw-text">gdk_draw_text()</link>.
</para>
<para>
See also the "Text Handling in GTK 2" section of
<ulink url="http://developer.gnome.org/dotplan/porting/">Porting applications
to the GNOME 2.0 platform</ulink>.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
How do I measure the size of a piece of text ?
</para>
</question>
<answer>
<para>
To obtain the size of a piece of text, use a Pango layout and
<link
linkend="pango-layout-get-pixel-size">pango_layout_get_pixel_size()</link>,
using code like the following:
<informalexample>
<programlisting>
layout = gtk_widget_create_pango_layout (widget, text);
fontdesc = pango_font_description_from_string ("Luxi Mono 12");
pango_layout_set_font_description (layout, fontdesc);
pango_layout_get_pixel_size (layout, &amp;width, &amp;height);
pango_font_description_free (fontdesc);
g_object_unref (layout);
</programlisting>
</informalexample>
Do not use the deprecated function <link linkend="gdk-text-width">gdk_text_width()</link>.
</para>
<para>
See also the "Text Handling in GTK 2" section of
<ulink url="http://developer.gnome.org/dotplan/porting/">Porting applications
to the GNOME 2.0 platform</ulink>.
</para>
</answer>
</qandaentry>
<qandaentry>
<question>
<para>
How do I make a text view scroll to the end of the buffer automatically ?
</para>
</question>
<answer>
<para>
The "insert" <link linkend="GtkTextMark">mark</link> marks the insertion point
where <link linkend="gtk-text-buffer-insert">gtk_text_buffer_insert()</link>
inserts new text into the buffer. The text is inserted
<emphasis>before</emphasis> the "insert" mark, so that it generally stays
at the end of the buffer. If it gets explicitly moved to some other position,
e.g. when the user selects some text,
use <link linkend="gtk-text-buffer-move-mark">gtk_text_buffer_move_mark()</link>
to set it to the desired location before inserting more text.
The "insert" mark of a buffer can be obtained with <link
linkend="gtk-text-buffer-get-insert">gtk_text_buffer_get_insert()</link>.
</para>
<para>
To ensure that the end of the buffer remains visible, use
<link
linkend="gtk-text-view-scroll-to-mark">gtk_text_view_scroll_to_mark()</link> to scroll to the "insert" mark after inserting new text.
</para>
</answer>
</qandaentry>
</qandadiv>
<qandadiv><title>Which widget should I use...</title>
@@ -330,8 +531,7 @@ number of problems that are best avoided.
<para>
If you only have a small amount of text, <link
linkend="GtkLabel">GtkLabel</link> may also be appropriate of course.
It can be made selectable with <link
linkend="gtk-label-set-selectable">
It can be made selectable with <link linkend="gtk-label-set-selectable">
gtk_label_set_selectable()</link>. For a single-line text entry,
see <link linkend="GtkEntry">GtkEntry</link>.
</para>
@@ -460,6 +660,20 @@ or <link
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
How do I make a text widget display its complete contents in a specific font?
</para></question>
<answer><para>
If you use <link
linkend="gtk-text-buffer-insert-with-tags">gtk_text_buffer_insert_with_tags()</link> with appropriate tags to select the font, the inserted text will have the desired appearance, but text typed in by the user before or after the tagged block will appear in the default style.
</para>
<para>
To ensure that all text has the desired appearance, use <link
linkend="gtk-widget-modify-font">gtk_widget_modify_font()</link> to change the default font for the widget.
</para></answer>
</qandaentry>
</qandadiv>
@@ -485,15 +699,16 @@ See the <link linkend="TreeWidget">tree widget overview</link>.
<qandaentry>
<question><para>
What's the #GtkTreeView equivalent of gtk_clist_find_row_from_data()?
What's the <link linkend="GtkTreeView">GtkTreeView</link> equivalent of
<link linkend="gtk-clist-find-row-from-data">gtk_clist_find_row_from_data()</link>?
</para></question>
<answer>
<para>
As there is no separate data column in the #GtkTreeModel, there's no
As there is no separate data column in the <link linkend="GtkTreeModel">GtkTreeModel</link>, there's no
built in function to find the iter from data. You can write a custom
searching function to walk the tree and find the data, or use
gtk_tree_model_foreach().
<link linkend="gtk-tree-model-foreach">gtk_tree_model_foreach()</link>.
</para>
</answer>
</qandaentry>
@@ -543,6 +758,88 @@ linkend="gtk-tree-model-get">gtk_tree_model_get()</link>.
</answer>
</qandaentry>
<qandaentry>
<question><para>
How do I change the way that numbers are formatted by <link linkend="GtkTreeView">GtkTreeView</link>?
</para></question>
<answer><para>
Use <link linkend="gtk-tree-view-insert-column-with-data-func">gtk_tree_view_insert_column_with_data_func()</link>
or <link linkend="gtk-tree-view-column-set-cell-data-func">gtk_tree_view_column_set_cell_data_func()</link>
and do the conversion from number to string yourself (with, say,
<link linkend="g-strdup-printf">g_strdup_printf()</link>).
</para>
<para>
The following example demonstrates this:
<informalexample><programlisting>
enum
{
DOUBLE_COLUMN,
N_COLUMNS
};
GtkListStore *mycolumns;
GtkTreeView *treeview;
void
my_cell_double_to_text (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *tree_model,
GtkTreeIter *iter,
gpointer data)
{
GtkCellRendererText *cell_text = (GtkCellRendererText *)cell;
gdouble d;
gchar *text;
/* Get the double value from the model. */
gtk_tree_model_get (tree_model, iter, (gint)data, &amp;d, -1);
/* Now we can format the value ourselves. */
text = g_strdup_printf ("&percnt;.2f", d);
g_object_set (cell, "text", text, NULL);
g_free (text);
}
void
set_up_new_columns (GtkTreeView *myview)
{
GtkCellRendererText *renderer;
GtkTreeViewColumn *column;
GtkListStore *mycolumns;
/* Create the data model and associate it with the given TreeView */
mycolumns = gtk_list_store_new (N_COLUMNS, G_TYPE_DOUBLE);
gtk_tree_view_set_model (myview, GTK_TREE_MODEL (mycolumns));
/* Create a GtkCellRendererText */
renderer = gtk_cell_renderer_text_new ();
/* Create a new column that has a title ("Example column"),
* uses the above created renderer that will render the double
* value into text from the associated model's rows.
*/
column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (column, "Example column");
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (column, renderer, TRUE);
/* Append the new column after the GtkTreeView's previous columns. */
gtk_tree_view_append_column (GTK_TREE_VIEW (myview), column);
/* Since we created the column by hand, we can set it up for our
* needs, e.g. set its minimum and maximum width, etc.
*/
/* Set up a custom function that will be called when the column content
* is rendered. We use the func_data pointer as an index into our
* model. This is convenient when using multi column lists.
*/
gtk_tree_view_column_set_cell_data_func (column, renderer,
my_cell_double_to_text,
(gpointer)DOUBLE_COLUMN, NULL);
}
</programlisting></informalexample>
</para></answer>
</qandaentry>
</qandadiv>

View File

@@ -156,7 +156,7 @@ This option is only available if GTK+ has been configured with
<title><systemitem>--gxid-host <replaceable>host</replaceable></systemitem></title>
<para>
The host to contact the <application>gxid</application> daemon on; overwrites
The host to contact the <application>gxid</application> daemon on; overrides
the <link linkend="GXID"><envar>GXID_HOST</envar></link> environment variable.
This option is only available if GTK+ has been configured with
<option>--gdk-target=x11</option>.
@@ -167,7 +167,7 @@ This option is only available if GTK+ has been configured with
<title><systemitem>--gxid-port <replaceable>port</replaceable></systemitem></title>
<para>
The port for the connection to <application>gxid</application>; overwrites
The port for the connection to <application>gxid</application>; overrides
the <link linkend="GXID"><envar>GXID_PORT</envar></link> environment variable.
This option is only available if GTK+ has been configured with
<option>--gdk-target=x11</option>.
@@ -276,8 +276,8 @@ or <envar>DISPLAY</envar>; mostly to determine paths to look for certain files.
<para>
Specifies the file listing the IM modules to load. This environment
variable overwrites the <literal>im_module_file</literal> specified in
the RC files, which in turn overwrites the default value
variable overrides the <literal>im_module_file</literal> specified in
the RC files, which in turn overrides the default value
<filename><replaceable>sysconfdir</replaceable>/gtk-2.0/gtk.immodules</filename>
(<replaceable>sysconfdir</replaceable> is the sysconfdir specified when GTK+ was configured,
usually <filename>/usr/local/etc</filename>.)
@@ -322,7 +322,7 @@ nevertheless.
<para>
Specifies the file listing the GdkPixbuf loader modules to load.
This environment variable overwrites the default value
This environment variable overrides the default value
<filename><replaceable>sysconfdir</replaceable>/gtk-2.0/gdk-pixbuf.loaders</filename>
(<replaceable>sysconfdir</replaceable> is the sysconfdir specified when
GTK+ was configured, usually <filename>/usr/local/etc</filename>.)

View File

@@ -104,7 +104,14 @@ Creates a new #GtkAdjustment.
<!-- ##### FUNCTION gtk_adjustment_set_value ##### -->
<para>
Sets the #GtkAdjustment value.
Sets the #GtkAdjustment value. The value is clamped to lie between
<literal>adjustment-&gt;lower</literal> and
<literal>adjustment-&gt;upper</literal>.
</para>
<para>
Note that for adjustments which are used in a #GtkScrollbar, the effective
range of allowed values goes from <literal>adjustment-&gt;lower</literal> to
<literal>adjustment-&gt;upper - adjustment-&gt;page_size</literal>.
</para>
@adjustment: a #GtkAdjustment.

View File

@@ -58,7 +58,7 @@ Used to indicate the direction in which a #GtkArrow should point.
<!-- ##### ENUM GtkAttachOptions ##### -->
<para>
Denotes the expansion properties that a widget will have when it (or it's
Denotes the expansion properties that a widget will have when it (or its
parent) is resized.
</para>

View File

@@ -34,11 +34,11 @@ Simple file operations; create directory, delete file, and rename file, are avai
/* The file selection widget and the string to store the chosen filename */
void store_filename (GtkFileSelection *file_selector, gpointer user_data) {
void store_filename (GtkWidget *file_selector, gpointer user_data) {
const gchar *selected_filename;
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
g_print ("Selected filename: %s\n", selected_filename);
g_print ("Selected filename: &percnt;s\n", selected_filename);
}
void create_file_selection (void) {
@@ -118,6 +118,26 @@ The #GtkFileSelection struct contains the following #GtkWidget fields:
</para>
@dir_list:
@file_list:
@selection_entry:
@selection_text:
@main_vbox:
@ok_button:
@cancel_button:
@help_button:
@history_pulldown:
@history_menu:
@history_list:
@fileop_dialog:
@fileop_entry:
@fileop_file:
@cmpl_state:
@fileop_c_dir:
@fileop_del_file:
@fileop_ren_file:
@button_area:
@action_area:
<!-- ##### FUNCTION gtk_file_selection_new ##### -->
<para>

View File

@@ -428,7 +428,7 @@ used by GTK+ wrappers for languages other than C.
<!-- ##### FUNCTION gtk_quit_remove ##### -->
<para>
Removes a quit handler by it's identifier.
Removes a quit handler by its identifier.
</para>
@quit_handler_id: Identifier for the handler returned when installing it.
@@ -436,7 +436,7 @@ Removes a quit handler by it's identifier.
<!-- ##### FUNCTION gtk_quit_remove_by_data ##### -->
<para>
Removes a quit handler identified by it's @data field.
Removes a quit handler identified by its @data field.
</para>
@data: The pointer passed as @data to gtk_quit_add() or gtk_quit_add_full().

View File

@@ -25,7 +25,7 @@ returns when any dialog button is clicked.
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error loading file '%s': %s",
"Error loading file '&percnt;s': &percnt;s",
filename, g_strerror (errno));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -42,7 +42,7 @@ You might do a non-modal #GtkMessageDialog as follows:
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error loading file '%s': %s",
"Error loading file '&percnt;s': &percnt;s",
filename, g_strerror (errno));
/* Destroy the dialog when the user responds to it (e.g. clicks a button) */

View File

@@ -32,7 +32,7 @@ Each child has two options that can be set,
#GtkPaned is resized, that child will expand
or shrink along with the paned widget. If @shrink
is true, then when that child can be made smaller
than it's requisition by the user. Setting @shrink
than its requisition by the user. Setting @shrink
to %FALSE allows the application to set a minimum
size. If @resize is false for both children, then
this is treated as if @resize is true for both

View File

@@ -7,7 +7,7 @@ A choice from multiple check buttons.
<!-- ##### SECTION Long_Description ##### -->
<para>
A single radio button performs the same basic function as a #GtkCheckButton,
as it's position in the object hierarchy reflects. It is only when multiple
as its position in the object hierarchy reflects. It is only when multiple
radio buttons are grouped together that they become a different user
interface component in their own right.</para>
<para>

View File

@@ -20,7 +20,7 @@ this:
<example>
<title>How to create a group of radio menu items.</title>
<programlisting>
GList *group = NULL;
GSList *group = NULL;
GtkWidget *item;
gint i;

View File

@@ -258,9 +258,8 @@ elements are:
<term><literal>font = <replaceable>font</replaceable></literal></term>
<listitem>
<para>
Sets the font for a widget. <replaceable>font</replaceable> must be
a XLFD font description, e.g.
<literal>"-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*"</literal>.
Starting with GTK+ 2.0, the "font" and "fontset"
declarations are ignored; use "font_name" declarations instead.
</para>
</listitem>
</varlistentry>
@@ -268,13 +267,8 @@ elements are:
<term><literal>fontset = <replaceable>font</replaceable></literal></term>
<listitem>
<para>
Sets the fontset for a widget. Overrides any
<literal>font</literal> declarations. <replaceable>font</replaceable>
must be a comma-separated list of XLFD font descriptions, e.g.
<literal>"-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240,
-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120,
-GB-Fixed-Medium-R-Normal--26-180-100-100-C-240,
-Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150"</literal>.
Starting with GTK+ 2.0, the "font" and "fontset"
declarations are ignored; use "font_name" declarations instead.
</para>
</listitem>
</varlistentry>
@@ -282,10 +276,10 @@ elements are:
<term><literal>font_name = <replaceable>font</replaceable></literal></term>
<listitem>
<para>
Sets the font for a widget. Overrides any
<literal>font</literal> or <literal>fontset</literal> declarations.
<replaceable>font</replaceable> must be a Pango font name, e.g.
<literal>"Sans Italic 10"</literal>.
Sets the font for a widget. <replaceable>font</replaceable> must be
a Pango font name, e.g. <literal>"Sans Italic 10"</literal>.
For details about Pango font names, see
pango_font_description_from_string().
</para>
</listitem>
</varlistentry>

View File

@@ -137,7 +137,8 @@ never be set by an application.)
<!-- ##### SIGNAL GtkSocket::plug-added ##### -->
<para>
This signal is emitted when a client is successfully
added to the socket.
</para>
@socket: the object which received the signal.
@@ -146,7 +147,9 @@ never be set by an application.)
<!-- ##### SIGNAL GtkSocket::plug-removed ##### -->
<para>
This signal is emitted when a client is removed from the socket. The
default action is to destroy the #GtkSocket widget, so if you want to
reuse it you must add a signal handler that returns %TRUE.
</para>
@socket: the object which received the signal.

View File

@@ -140,7 +140,7 @@ GTK_SPIN_PAGE_BACKWARD</entry>
<row>
<entry>GTK_SPIN_HOME,
GTK_SPIN_END</entry>
<entry>These set the spin button's value to the minimum or maxmimum possible values, (set by it's #GtkAdjustment), respectively.</entry>
<entry>These set the spin button's value to the minimum or maxmimum possible values, (set by its #GtkAdjustment), respectively.</entry>
</row>
<row>
<entry>GTK_SPIN_USER_DEFINED</entry>

View File

@@ -33,7 +33,7 @@ Status bars are created using gtk_statusbar_new().
Messages are added to the bar's stack with gtk_statusbar_push().
</para>
<para>
The message at the top of the stack can be removed using gtk_statusbar_pop(). A message can be removed from anywhere in the stack if it's message_id was recorded at the time it was added. This is done using gtk_statusbar_remove().
The message at the top of the stack can be removed using gtk_statusbar_pop(). A message can be removed from anywhere in the stack if its message_id was recorded at the time it was added. This is done using gtk_statusbar_remove().
</para>
<!-- ##### SECTION See_Also ##### -->

View File

@@ -154,7 +154,7 @@ The "Close" item.
<!-- ##### MACRO GTK_STOCK_COLOR_PICKER ##### -->
<para>
The "Color Picker" item.
<inlinegraphic fileref="stock_colorselector_24.png" format="PNG"></inlinegraphic>
<inlinegraphic fileref="stock_color_picker_25.png" format="PNG"></inlinegraphic>
</para>
@Since: 2.2

View File

@@ -52,7 +52,7 @@ Internal #GtkText data type. Should not be accessed directly.
Creates a new #GtkText widget, initialized with the given pointers to
#GtkAdjustments. These pointers can be used to track the viewing position
of the #GtkText widget. Passing %NULL to either or both of them will make
the #GtkText create it's own. You can set these later with the function
the #GtkText create its own. You can set these later with the function
gtk_text_set_adjustment().
</para>
@@ -213,7 +213,7 @@ Returns the character at the given index within the #GtkText widget.
<!-- ##### ARG GtkText:hadjustment ##### -->
<para>
Used by the #GtkText widget to keep track of the size of it's horizontal
Used by the #GtkText widget to keep track of the size of its horizontal
text.
</para>
@@ -224,7 +224,7 @@ Boolean value indicating whether line wrap is enabled or not.
<!-- ##### ARG GtkText:vadjustment ##### -->
<para>
Used by the #GtkText widget to keep track of the size of it's vertical
Used by the #GtkText widget to keep track of the size of its vertical
text.
</para>

View File

@@ -669,6 +669,14 @@ in an idle job in the background.
@textview: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkTextView::select-all ##### -->
<para>
</para>
@textview: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkTextView::set-anchor ##### -->
<para>

View File

@@ -7,7 +7,7 @@ create buttons which retain their state.
<!-- ##### SECTION Long_Description ##### -->
<para>
A #GtkToggleButton is a #GtkButton which will remain 'pressed-in' when
clicked. Clicking again will cause the toggle button to return to it's
clicked. Clicking again will cause the toggle button to return to its
normal state.
</para>
<para>
@@ -141,7 +141,7 @@ application ever to call this function.
<!-- ##### FUNCTION gtk_toggle_button_get_active ##### -->
<para>
Queries a #GtkToggleButton and returns it's current state. Returns %TRUE if
Queries a #GtkToggleButton and returns its current state. Returns %TRUE if
the toggle button is pressed in and %FALSE if it is raised.
</para>

View File

@@ -609,7 +609,7 @@ versions of GTK+.
<!-- ##### MACRO gtk_tree_model_get_iter_root ##### -->
<para>
A alternate name for gtk_tree_model_get_iter_root() provided for
A alternate name for gtk_tree_model_get_iter_first() provided for
compatibility reasons; this macro will be deprecated in future
versions of GTK+.
</para>

View File

@@ -18,7 +18,7 @@ widget. It determines the geometry, type
<!-- ##### ENUM GtkTreeViewColumnSizing ##### -->
<para>
The sizing method the column uses to determine it's width. Please note
The sizing method the column uses to determine its width. Please note
that @GTK_TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large views, and
can make columns appear choppy.
</para>
@@ -462,6 +462,18 @@ calling gtk_tree_view_column_set_cell_data_func()
@height:
<!-- ##### FUNCTION gtk_tree_view_column_cell_get_position ##### -->
<para>
</para>
@tree_column:
@cell_renderer:
@start_pos:
@width:
@Returns:
<!-- ##### FUNCTION gtk_tree_view_column_cell_is_visible ##### -->
<para>

View File

@@ -496,7 +496,7 @@ The base structure for a GTK+ type. Every type inherits this as a base structure
<!-- ##### TYPEDEF GtkEnumValue ##### -->
<para>
A structure which contains a single enum value, and its name, and it's
A structure which contains a single enum value, and its name, and its
nickname.
</para>

View File

@@ -49,6 +49,7 @@ handles the emission.
Implementation of this signal is optional.
</para>
@parent_class:
@activate_signal:
@set_scroll_adjustments_signal:

View File

@@ -8930,7 +8930,6 @@ section.</para>
<!-- example-start menu itemfactory.c -->
#include &lt;gtk/gtk.h&gt;
#include &lt;strings.h&gt;
/* Obligatory basic callback */
static void print_hello( GtkWidget *w,

View File

@@ -1,6 +1,5 @@
#include <gtk/gtk.h>
#include <strings.h>
/* Obligatory basic callback */
static void print_hello( GtkWidget *w,

View File

@@ -1,3 +1,136 @@
2003-06-03 Matthias Clasen <maclas@gmx.de>
* gdk-pixdata.c (gdk_pixbuf_new_from_inline): Document
data_length == -1, add an example. (#97290)
2003-06-01 Matthias Clasen <maclas@gmx.de>
* gdk-pixdata.h (struct _GdkPixdata): Fix misleading documentation
of rowstride. (#113924, Noah Levitt)
2003-05-27 Matthias Clasen <maclas@gmx.de>
* io-wbmp.c: Remove dubious bitfields of
unspecified signedness. (#112919, Morten Welinder)
* gdk-pixdata.c (gdk_pixdata_to_csource): Replace all occurances
of g_string_new ("") by g_string_new (NULL). (#106975, Morten Welinder)
2003-05-19 Matthias Clasen <maclas@gmx.de>
Improve progressive loading from slow sources: (#107368)
* io-gif-animation.c (gdk_pixbuf_gif_anim_get_iter): Initialize
first_loop_slowness.
(gdk_pixbuf_gif_anim_iter_advance): Don't wrap during loading if
the datasource falls behind the speed of the display.
* io-gif-animation.h: Add a loading flag to GdkPixbufGifAnim and
first_loop_slowness to GdkPixbufGifAnimIter.
Wed May 14 18:24:50 2003 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_deserialize): Add a
(gint32 *) => (guint32 *) cast. (#108615, Rick Jones)
2003-04-24 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write):
(gdk_pixbuf_loader_new_with_type):
(gdk_pixbuf_loader_close):
* gdk-pixbuf-io.c (gdk_pixbuf_new_from_file):
(gdk_pixbuf_save):
(gdk_pixbuf_savev):
* gdk-pixbuf-animation.c (gdk_pixbuf_animation_new_from_file):
Add sanity checks for GError handling. (#108345)
2003-03-21 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-animation.c (gdk_pixbuf_non_anim_get_type): Add
missing static. (#108614)
* io-jpeg.c (gdk_pixbuf__jpeg_image_begin_load):
* io-ico.c (gdk_pixbuf__ico_image_stop_load): Add missing static
qualifiers apparently causing problems on some platforms. (#108617)
2003-03-12 Matthias Clasen <maclas@gmx.de>
* io-ico.c (DecodeHeader): Calculate LineWidth for 16bpp from
width, like for the other depths. (noticed by Marijn Ros)
2003-03-08 Matthias Clasen <maclas@gmx.de>
Bug #107664 continued:
* io-xpm.c (find_color): Fix 0/FALSE confusion
* gdk-pixbuf.c (gdk_pixbuf_get_has_alpha): Fix -1/gboolean confusion.
2003-03-06 Matthias Clasen <maclas@gmx.de>
* io-gif.c (gif_read): Fix 0/FALSE confusion (#107664, Morten Welinder)
2003-02-20 Matthias Clasen <maclas@gmx.de>
* io-gif-animation.c (gdk_pixbuf_gif_anim_frame_composite):
Always clear the initial frame and "disposed" areas with
transparent pixels, no matter whether the frame has transparency
or not. (#55502)
2003-02-14 Matthias Clasen <maclas@gmx.de>
* io-tga.c (try_preload):
(gdk_pixbuf__tga_load): Actually reject images with origin
not in the upper-left corner. (#105912)
2003-02-06 Matthias Clasen <maclas@gmx.de>
* queryloaders.c (query_module): Better error message if
module_open() fails. (#105349, Tim Mooney)
Mon Jan 27 17:10:30 2003 Owen Taylor <otaylor@redhat.com>
* Makefile.am (gdk-pixbuf.loaders): Rewrite to run
on the .la files rather than looking for .so files.
(#102142, Martin Gansser)
* Makefile.am: Don't build gdk-pixbuf.loaders when
cross-compiling.
2003-01-12 Tor Lillqvist <tml@iki.fi>
* gdk_pixbuf.def: Add some missing entries. Thanks to Kenichi SUTO.
2003-01-09 Tor Lillqvist <tml@iki.fi>
Changes for run-time lookup of installation location on Win32:
* Makefile.am (INCLUDES): Define PREFIX as $(prefix).
* gdk-pixbuf-io.c (get_sysconfdir): New function, look up
installation location at runtime and deduce GTK_SYSCONFDIR
from it.
(get_toplevel): Similar, for the top-level installation directory.
(correct_prefix): Replace compile-time prefix with run-time
prefix.
(get_libdir): Remove, not used any longer.
(gdk_pixbuf_io_init): Call correct_prefix().
2003-01-05 Tor Lillqvist <tml@iki.fi>
* queryloaders.c (query_module): [Win32] Change backslahses into
slashes in path.
2003-01-04 Tor Lillqvist <tml@iki.fi>
* Makefile.am (gdk-pixbuf.loaders): Use @SOEXT@ in the find command.
* gdk_pixbuf.def: Add gdk_pixbuf_loader_set_size.
2003-01-03 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-io.c (gdk_pixbuf_new_from_xpm_data): Don't crash if
gdk-pixbuf.loaders file is missing. (#102222)
2002-12-08 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-animation.h:

View File

@@ -248,6 +248,7 @@ INCLUDES = @STRIP_BEGIN@ \
-DGTK_BINARY_VERSION=\"@GTK_BINARY_VERSION@\" \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DPREFIX=\"$(prefix)\" \
@INCLUDED_LOADER_DEFINE@ \
@GTK_DEBUG_FLAGS@ \
@GDK_PIXBUF_DEP_CFLAGS@ \
@@ -393,8 +394,6 @@ CLEANFILES += xgen-gmc
EXTRA_DIST = \
gdk-pixbuf-csource.1 \
makefile.mingw \
makefile.mingw.in \
makefile.msc \
gdk_pixbuf.def \
gdk_pixbuf.rc \
@@ -435,12 +434,16 @@ install-data-local: install-ms-lib install-libtool-import-lib
echo "***" ; \
fi
if CROSS_COMPILING
else
all-local: gdk-pixbuf.loaders
endif
gdk-pixbuf.loaders: $(loader_LTLIBRARIES) gdk-pixbuf-query-loaders
if find . -name 'libpixbufloader-*.so' | grep 'so' > /dev/null ; then \
LOADERS=`echo libpixbufloader-*.la` ; \
if test "x$$LOADERS" != 'xlibpixbufloader-*.la' ; then \
echo "Writing a gdk-pixbuf.loader file to use when running examples before installing gdk-pixbuf."; \
GDK_PIXBUF_MODULEDIR=.libs $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders > ./gdk-pixbuf.loaders ;\
$(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders $$LOADERS > ./gdk-pixbuf.loaders ;\
else \
echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
touch gdk-pixbuf.loaders; \

View File

@@ -137,6 +137,7 @@ gdk_pixbuf_animation_new_from_file (const char *filename,
GdkPixbufModule *image_module;
g_return_val_if_fail (filename != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
f = fopen (filename, "rb");
if (!f) {
@@ -563,7 +564,7 @@ static GdkPixbufAnimationIter* gdk_pixbuf_non_anim_get_iter (GdkPixbufAn
static gpointer non_parent_class;
GType
static GType
gdk_pixbuf_non_anim_get_type (void)
{
static GType object_type = 0;

View File

@@ -165,6 +165,59 @@ skip_space (const char **pos)
return !(*p == '\0');
}
#ifdef G_OS_WIN32
/* DllMain function needed to tuck away the gdk-pixbuf DLL name */
G_WIN32_DLLMAIN_FOR_DLL_NAME (static, dll_name)
static char *
get_toplevel (void)
{
static char *toplevel = NULL;
if (toplevel == NULL)
toplevel = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "");
return toplevel;
}
static char *
get_sysconfdir (void)
{
static char *sysconfdir = NULL;
if (sysconfdir == NULL)
sysconfdir = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "etc");
return sysconfdir;
}
#undef GTK_SYSCONFDIR
#define GTK_SYSCONFDIR get_sysconfdir()
static void
correct_prefix (gchar **path)
{
if (strncmp (*path, PREFIX "/", strlen (PREFIX "/")) == 0 ||
strncmp (*path, PREFIX "\\", strlen (PREFIX "\\")) == 0)
{
/* This is an entry put there by gdk-pixbuf-query-loaders on the
* packager's system. On Windows a prebuilt GTK+ package can be
* installed in a random location. The gdk-pixbuf.loaders file
* distributed in such a package contains paths from the package
* builder's machine. Replace the build-time prefix with the
* installation prefix on this machine.
*/
gchar *tem = *path;
*path = g_strconcat (get_toplevel (), tem + strlen (PREFIX), NULL);
g_free (tem);
}
}
#endif
static gchar *
gdk_pixbuf_get_module_file (void)
{
@@ -209,6 +262,9 @@ gdk_pixbuf_io_init ()
/* Blank line marking the end of a module
*/
if (module && *p != '#') {
#ifdef G_OS_WIN32
correct_prefix (&module->module_path);
#endif
file_formats = g_slist_prepend (file_formats, module);
module = NULL;
}
@@ -331,29 +387,6 @@ gdk_pixbuf_io_init ()
g_free (filename);
}
#ifdef G_OS_WIN32
/* DllMain function needed to tuck away the gdk-pixbuf DLL name */
G_WIN32_DLLMAIN_FOR_DLL_NAME (static, dll_name)
static char *
get_libdir (void)
{
static char *libdir = NULL;
if (libdir == NULL)
libdir = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "lib\\gtk-2.0\\" GTK_BINARY_VERSION "\\loaders");
return libdir;
}
#undef PIXBUF_LIBDIR
#define PIXBUF_LIBDIR get_libdir ()
#endif
/* actually load the image handler - gdk_pixbuf_get_module only get a */
/* reference to the module to load, it doesn't actually load it */
/* perhaps these actions should be combined in one function */
@@ -694,6 +727,7 @@ gdk_pixbuf_new_from_file (const char *filename,
GdkPixbufModule *image_module;
g_return_val_if_fail (filename != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
f = fopen (filename, "rb");
if (!f) {
@@ -779,20 +813,22 @@ gdk_pixbuf_new_from_xpm_data (const char **data)
GdkPixbuf *(* load_xpm_data) (const char **data);
GdkPixbuf *pixbuf;
GError *error = NULL;
GdkPixbufModule *xpm_module = _gdk_pixbuf_get_named_module ("xpm", NULL);
GdkPixbufModule *xpm_module = _gdk_pixbuf_get_named_module ("xpm", &error);
if (xpm_module == NULL) {
g_warning ("Error loading XPM image loader: %s", error->message);
g_error_free (error);
return NULL;
}
if (xpm_module->module == NULL) {
if (!_gdk_pixbuf_load_module (xpm_module, &error)) {
g_warning ("Error loading XPM image loader: %s", error->message);
g_error_free (error);
return FALSE;
return NULL;
}
}
if (xpm_module->module == NULL) {
g_warning ("Can't find gdk-pixbuf module for parsing inline XPM data");
return NULL;
} else if (xpm_module->load_xpm_data == NULL) {
if (xpm_module->load_xpm_data == NULL) {
g_warning ("gdk-pixbuf XPM module lacks XPM data capability");
return NULL;
} else
@@ -913,6 +949,8 @@ gdk_pixbuf_save (GdkPixbuf *pixbuf,
va_list args;
gboolean result;
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
va_start (args, error);
collect_save_options (args, &keys, &values);
@@ -959,6 +997,7 @@ gdk_pixbuf_savev (GdkPixbuf *pixbuf,
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (type != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
f = fopen (filename, "wb");

View File

@@ -423,6 +423,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
g_return_val_if_fail (buf != NULL, FALSE);
g_return_val_if_fail (count >= 0, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
priv = loader->priv;
@@ -499,11 +500,12 @@ gdk_pixbuf_loader_new_with_type (const char *image_type,
{
GdkPixbufLoader *retval;
GError *tmp;
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
retval = g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL);
tmp = NULL;
gdk_pixbuf_loader_load_module(retval, image_type, &tmp);
gdk_pixbuf_loader_load_module (retval, image_type, &tmp);
if (tmp != NULL)
{
g_propagate_error (error, tmp);
@@ -602,6 +604,7 @@ gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
g_return_val_if_fail (loader != NULL, TRUE);
g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), TRUE);
g_return_val_if_fail (error == NULL || *error == NULL, TRUE);
priv = loader->priv;

View File

@@ -322,7 +322,7 @@ gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf)
gboolean
gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf)
{
g_return_val_if_fail (pixbuf != NULL, -1);
g_return_val_if_fail (pixbuf != NULL, FALSE);
return pixbuf->has_alpha ? TRUE : FALSE;
}

View File

@@ -197,7 +197,7 @@ gdk_pixdata_deserialize (GdkPixdata *pixdata,
/* deserialize header */
stream = get_uint32 (stream, &pixdata->magic);
stream = get_uint32 (stream, &pixdata->length);
stream = get_uint32 (stream, (guint32 *)&pixdata->length);
if (pixdata->magic != GDK_PIXBUF_MAGIC_NUMBER || pixdata->length < GDK_PIXDATA_HEADER_LENGTH)
return_header_corrupt (error);
stream = get_uint32 (stream, &pixdata->pixdata_type);
@@ -635,7 +635,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
cdata.dump_rle_decoder = (dump_type & GDK_PIXDATA_DUMP_RLE_DECODER) > 0;
cdata.static_prefix = (dump_type & GDK_PIXDATA_DUMP_STATIC) ? "static " : "";
cdata.const_prefix = (dump_type & GDK_PIXDATA_DUMP_CONST) ? "const " : "";
gstring = g_string_new ("");
gstring = g_string_new (NULL);
cdata.gstring = gstring;
if (!cdata.dump_macros && cdata.dump_gtypes)
@@ -819,7 +819,8 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
/**
* gdk_pixbuf_new_from_inline:
* @data_length: Length in bytes of the @data argument
* @data_length: Length in bytes of the @data argument or -1 to
* disable length checks
* @data: Byte data containing a serialized #GdkPixdata structure
* @copy_pixels: Whether to copy the pixel data, or use direct pointers
* @data for the resulting pixbuf
@@ -847,13 +848,18 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
* generally a bad idea.)
*
* If you create a pixbuf from const inline data compiled into your
* program, it's probably safe to ignore errors, since things will
* always succeed. For non-const inline data, you could get out of
* memory. For untrusted inline data located at runtime, you could
* have corrupt inline data in addition.
* program, it's probably safe to ignore errors and disable length checks,
* since things will always succeed:
* <informalexample><programlisting>
* pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, NULL);
* </programlisting></informalexample>
*
* For non-const inline data, you could get out of memory. For untrusted
* inline data located at runtime, you could have corrupt inline data in
* addition.
*
* Return value: A newly-created #GdkPixbuf structure with a reference,
* count of 1, or %NULL if error is set.
* count of 1, or %NULL if an error occurred.
**/
GdkPixbuf*
gdk_pixbuf_new_from_inline (gint data_length,

View File

@@ -73,9 +73,9 @@ typedef enum
* #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data.
* @pixdata_type: information about colorspace, sample width and
* encoding, in a #GdkPixdataType.
* @rowstride: padding used in @pixel_data or 0 to indicate no padding.
* @width: the width.
* @height: the height.
* @rowstride: Distance in bytes between rows.
* @width: Width of the image in pixels.
* @height: Height of the image in pixels.
* @pixel_data: @width x @height pixels, encoded according to @pixdata_type
* and @rowstride.
*
@@ -90,7 +90,7 @@ struct _GdkPixdata
* GDK_PIXDATA_HEADER_LENGTH + pixel_data length
*/
guint32 pixdata_type; /* GdkPixdataType */
guint32 rowstride; /* maybe 0 to indicate non-padded data */
guint32 rowstride;
guint32 width;
guint32 height;
guint8 *pixel_data;

View File

@@ -25,9 +25,15 @@ EXPORTS
gdk_pixbuf_error_get_type
gdk_pixbuf_error_quark
gdk_pixbuf_fill
gdk_pixbuf_format_get_description
gdk_pixbuf_format_get_extensions
gdk_pixbuf_format_get_mime_types
gdk_pixbuf_format_get_name
gdk_pixbuf_format_is_writable
gdk_pixbuf_from_pixdata
gdk_pixbuf_get_bits_per_sample
gdk_pixbuf_get_colorspace
gdk_pixbuf_get_formats
gdk_pixbuf_get_has_alpha
gdk_pixbuf_get_height
gdk_pixbuf_get_n_channels
@@ -38,10 +44,12 @@ EXPORTS
gdk_pixbuf_get_width
gdk_pixbuf_loader_close
gdk_pixbuf_loader_get_animation
gdk_pixbuf_loader_get_format
gdk_pixbuf_loader_get_pixbuf
gdk_pixbuf_loader_get_type
gdk_pixbuf_loader_new
gdk_pixbuf_loader_new_with_type
gdk_pixbuf_loader_set_size
gdk_pixbuf_loader_write
gdk_pixbuf_new
gdk_pixbuf_new_from_data

View File

@@ -180,6 +180,7 @@ gdk_pixbuf_gif_anim_get_iter (GdkPixbufAnimation *anim,
iter->start_time = *start_time;
iter->current_time = *start_time;
iter->first_loop_slowness = 0;
return GDK_PIXBUF_ANIMATION_ITER (iter);
}
@@ -287,8 +288,21 @@ gdk_pixbuf_gif_anim_iter_advance (GdkPixbufAnimationIter *anim_iter,
* and subtract time for that.
*/
loop = elapsed / iter->gif_anim->total_time;
elapsed = elapsed % iter->gif_anim->total_time;
if (iter->gif_anim->loading)
loop = 0;
else {
/* If current_frame is NULL at this point, we have loaded the
* animation from a source which fell behind the speed of the
* display. We remember how much slower the first loop was due
* to this and correct the position calculation in order to not
* jump in the middle of the second loop.
*/
if (iter->current_frame == NULL)
iter->first_loop_slowness = MAX(0, elapsed - iter->gif_anim->total_time);
loop = (elapsed - iter->first_loop_slowness) / iter->gif_anim->total_time;
elapsed = (elapsed - iter->first_loop_slowness) % iter->gif_anim->total_time;
}
iter->position = elapsed;
@@ -334,9 +348,8 @@ gdk_pixbuf_gif_anim_iter_get_delay_time (GdkPixbufAnimationIter *anim_iter)
#endif
return frame->delay_time - (iter->position - frame->elapsed);
} else {
} else
return -1; /* show last frame forever */
}
}
void
@@ -404,8 +417,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
gdk_pixbuf_fill (f->composited,
(gif_anim->bg_red << 24) |
(gif_anim->bg_green << 16) |
(gif_anim->bg_blue << 8) |
(f->bg_transparent ? 0 : 255));
(gif_anim->bg_blue << 8));
gdk_pixbuf_composite (f->pixbuf,
f->composited,
@@ -459,8 +471,7 @@ gdk_pixbuf_gif_anim_frame_composite (GdkPixbufGifAnim *gif_anim,
gdk_pixbuf_fill (area,
(gif_anim->bg_red << 24) |
(gif_anim->bg_green << 16) |
(gif_anim->bg_blue << 8) |
prev_frame->bg_transparent ? 0 : 255);
(gif_anim->bg_blue << 8));
g_object_unref (area);

View File

@@ -78,6 +78,7 @@ struct _GdkPixbufGifAnim {
guchar bg_blue;
int loop;
gboolean loading;
};
struct _GdkPixbufGifAnimClass {
@@ -113,6 +114,8 @@ struct _GdkPixbufGifAnimIter {
gint position;
GList *current_frame;
gint first_loop_slowness;
};
struct _GdkPixbufGifAnimIterClass {

View File

@@ -250,7 +250,7 @@ gif_read (GifContext *context, guchar *buffer, size_t len)
}
context->amount_needed = len - (context->size - context->ptr);
}
return 0;
return FALSE;
}
/* Changes the stage to be GIF_GET_COLORMAP */

View File

@@ -370,7 +370,7 @@ static void DecodeHeader(guchar *Data, gint Bytes,
else if (State->Type == 24)
State->LineWidth = State->Header.width * 3;
else if (State->Type == 16)
State->LineWidth = State->Header.height * 2;
State->LineWidth = State->Header.width * 2;
else if (State->Type == 8)
State->LineWidth = State->Header.width * 1;
else if (State->Type == 4)
@@ -491,8 +491,9 @@ gdk_pixbuf__ico_image_begin_load(GdkPixbufModuleSizeFunc size_func,
*
* free context, unref gdk_pixbuf
*/
gboolean gdk_pixbuf__ico_image_stop_load(gpointer data,
GError **error)
static gboolean
gdk_pixbuf__ico_image_stop_load (gpointer data,
GError **error)
{
struct ico_progressive_state *context =
(struct ico_progressive_state *) data;

View File

@@ -449,7 +449,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
* return context (opaque to user)
*/
gpointer
static gpointer
gdk_pixbuf__jpeg_image_begin_load (GdkPixbufModuleSizeFunc size_func,
GdkPixbufModulePreparedFunc prepared_func,
GdkPixbufModuleUpdatedFunc updated_func,

View File

@@ -50,9 +50,7 @@
#define TGA_INTERLEAVE_4WAY 0x80
#define TGA_ORIGIN_MASK 0x30
#define TGA_ORIGIN_LEFT 0x00
#define TGA_ORIGIN_RIGHT 0x10
#define TGA_ORIGIN_LOWER 0x00
#define TGA_ORIGIN_UPPER 0x20
enum {
@@ -727,8 +725,8 @@ static gboolean try_preload(TGAContext *ctx, GError **err)
}
if ((ctx->hdr->flags & TGA_INTERLEAVE_MASK) !=
TGA_INTERLEAVE_NONE ||
ctx->hdr->flags & TGA_ORIGIN_RIGHT ||
ctx->hdr->flags & TGA_ORIGIN_LOWER) {
(ctx->hdr->flags & TGA_ORIGIN_RIGHT) ||
!(ctx->hdr->flags & TGA_ORIGIN_UPPER)) {
g_set_error(err, GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("TGA image type not supported"));
@@ -1289,7 +1287,7 @@ static GdkPixbuf *gdk_pixbuf__tga_load(FILE *f, GError **err)
if (!hdr)
return NULL;
if ((hdr->flags & TGA_INTERLEAVE_MASK) != TGA_INTERLEAVE_NONE ||
hdr->flags & TGA_ORIGIN_RIGHT || hdr->flags & TGA_ORIGIN_LOWER) {
(hdr->flags & TGA_ORIGIN_RIGHT) || !(hdr->flags & TGA_ORIGIN_UPPER)) {
g_set_error(err, GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
_("Unsupported TGA image type"));

View File

@@ -47,12 +47,12 @@ struct wbmp_progressive_state {
GdkPixbufModuleUpdatedFunc updated_func;
gpointer user_data;
gboolean need_type : 1;
gboolean need_header : 1;
gboolean need_width : 1;
gboolean need_height : 1;
gboolean needmore : 1;
gboolean call_progressive_updates : 1;
guint need_type : 1;
guint need_header : 1;
guint need_width : 1;
guint need_height : 1;
guint needmore : 1;
guint call_progressive_updates : 1;
guchar last_buf[16]; /* Just needs to be big enough to hold the largest datum requestable via 'getin' */
guint last_len;

View File

@@ -911,7 +911,7 @@ find_color(const char *name,
found = bsearch (name, xColors, numXColors, sizeof (XPMColorEntry),
compare_xcolor_entries);
if (found == NULL)
return 0;
return FALSE;
colorPtr->red = (found->red * 65535) / 255;
colorPtr->green = (found->green * 65535) / 255;

View File

@@ -1,130 +0,0 @@
####
#### Out of order! Use autoconfiscation.
####
## Makefile for building the gdk_pixbuf DLL with gcc on Win32
## Use: make -f makefile.mingw
TOP = ../..
include ../build/win32/make.mingw
# Possibly override GTK+ version from build/win32/module.defs
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
OPTIMIZE = -g
INCLUDES = -I . -I ..
DEPCFLAGS = $(GLIB_CFLAGS) $(INTL_CFLAGS)
all : \
../config.h \
gdk_pixbuf-$(GDK_PIXBUF_VER).dll \
pixbufloader-bmp.dll \
pixbufloader-gif.dll \
pixbufloader-ico.dll \
pixbufloader-jpeg.dll \
pixbufloader-png.dll \
pixbufloader-pnm.dll \
pixbufloader-ras.dll \
pixbufloader-tiff.dll \
pixbufloader-wbmp.dll \
pixbufloader-xpm.dll \
make-inline-pixbuf.exe \
test-gdk-pixbuf.exe
gdk_pixbuf_OBJECTS = \
gdk-pixbuf.o \
gdk-pixbuf-animation.o \
gdk-pixbuf-data.o \
gdk-pixbuf-io.o \
gdk-pixbuf-scale.o \
gdk-pixbuf-util.o \
pixops/libpixops.a
../config.h : ../config.h.win32
cp $< $@
gdk_pixbuf-$(GDK_PIXBUF_VER).dll : $(gdk_pixbuf_OBJECTS) gdk_pixbuf.def
$(GLIB)/build-dll gdk_pixbuf $(GDK_PIXBUF_VER) gdk_pixbuf.def $(gdk_pixbuf_OBJECTS) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(INTL_LIBS)
gdk-pixbuf.o:: gdk-pixbuf-marshal.c
gdk-pixbuf-marshal.c :
$(GLIB_GENMARSHAL) --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >$@
pixops/libpixops.a :
cd pixops && $(MAKE) -f makefile.mingw libpixops.a
pixbufloader_bmp_OBJECTS = io-bmp.o
pixbufloader-bmp.dll : $(pixbufloader_bmp_OBJECTS) pixbufloader_bmp.def
$(GLIB)/build-dll pixbufloader-bmp - pixbufloader_bmp.def $(pixbufloader_bmp_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
pixbufloader_gif_OBJECTS = io-gif.o
pixbufloader-gif.dll : $(pixbufloader_gif_OBJECTS) pixbufloader_gif.def
$(GLIB)/build-dll pixbufloader-gif - pixbufloader_gif.def $(pixbufloader_gif_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
pixbufloader_ico_OBJECTS = io-ico.o
pixbufloader-ico.dll : $(pixbufloader_ico_OBJECTS) pixbufloader_ico.def
$(GLIB)/build-dll pixbufloader-ico - pixbufloader_ico.def $(pixbufloader_ico_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
pixbufloader_jpeg_OBJECTS = io-jpeg.o
io-jpeg.o : io-jpeg.c
$(CC) $(CFLAGS) $(JPEG_CFLAGS) -c $<
pixbufloader-jpeg.dll : $(pixbufloader_jpeg_OBJECTS) pixbufloader_jpeg.def
$(GLIB)/build-dll pixbufloader-jpeg - pixbufloader_jpeg.def $(pixbufloader_jpeg_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(JPEG_LIBS) $(INTL_LIBS)
pixbufloader_png_OBJECTS = io-png.o
io-png.o : io-png.c
$(CC) $(CFLAGS) $(PNG_CFLAGS) -c $<
pixbufloader-png.dll : $(pixbufloader_png_OBJECTS) pixbufloader_png.def
$(GLIB)/build-dll pixbufloader-png - pixbufloader_png.def $(pixbufloader_png_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(PNG_LIBS) $(INTL_LIBS)
pixbufloader_pnm_OBJECTS = io-pnm.o
pixbufloader-pnm.dll : $(pixbufloader_pnm_OBJECTS) pixbufloader_pnm.def
$(GLIB)/build-dll pixbufloader-pnm - pixbufloader_pnm.def $(pixbufloader_pnm_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
pixbufloader_ras_OBJECTS = io-ras.o
pixbufloader-ras.dll : $(pixbufloader_ras_OBJECTS) pixbufloader_ras.def
$(GLIB)/build-dll pixbufloader-ras - pixbufloader_ras.def $(pixbufloader_ras_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
pixbufloader_tiff_OBJECTS = io-tiff.o
pixbufloader-tiff.dll : $(pixbufloader_tiff_OBJECTS) pixbufloader_tiff.def
$(GLIB)/build-dll pixbufloader-tiff - pixbufloader_tiff.def $(pixbufloader_tiff_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS) $(INTL_LIBS)
io-tiff.o : io-tiff.c
$(CC) $(CFLAGS) $(TIFF_CFLAGS) -c $<
pixbufloader_wbmp_OBJECTS = io-wbmp.o
pixbufloader-wbmp.dll : $(pixbufloader_wbmp_OBJECTS) pixbufloader_wbmp.def
$(GLIB)/build-dll pixbufloader-wbmp - pixbufloader_wbmp.def $(pixbufloader_wbmp_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
pixbufloader_xpm_OBJECTS = io-xpm.o
pixbufloader-xpm.dll : $(pixbufloader_xpm_OBJECTS) pixbufloader_xpm.def
$(GLIB)/build-dll pixbufloader-xpm - pixbufloader_xpm.def $(pixbufloader_xpm_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(INTL_LIBS)
make-inline-pixbuf.exe : make-inline-pixbuf.o gdk_pixbuf-$(GDK_PIXBUF_VER).dll
$(CC) $(CFLAGS) -o $@ make-inline-pixbuf.o -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
test-gdk-pixbuf.exe : test-gdk-pixbuf.o gdk_pixbuf-$(GDK_PIXBUF_VER).dll
$(CC) $(CFLAGS) -o $@ test-gdk-pixbuf.o -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GTK_LIBS) $(GLIB_LIBS)
ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
# Hack to get an updated makefile.mingw automatically after updating
# makefile.mingw.in. Only for developer use.
makefile.mingw: makefile.mingw.in
sed -e 's,@GDK_PIXBUF[_]MAJOR@,@GDK_PIXBUF_MAJOR@,' \
-e 's,@GDK_PIXBUF[_]MINOR@,@GDK_PIXBUF_MINOR@,' <$< >$@
endif

View File

@@ -29,6 +29,4 @@ libpixops_la_SOURCES = \
EXTRA_DIST = \
DETAILS \
makefile.mingw \
makefile.mingw.in \
makefile.msc

View File

@@ -1,40 +0,0 @@
## Makefile for building libpixops.a with gcc on Win32
## Use: make -f makefile.mingw
TOP = ../../..
include $(TOP)/build/win32/make.mingw
# Possibly override GTK+ version from build/win32/module.defs
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
OPTIMIZE = -g
INCLUDES = -I .. -I ../..
DEPCFLAGS = $(GLIB_CFLAGS) $(PNG_CFLAGS) $(ZLIB_CFLAGS) $(JPEG_CLFAGS) $(TIFF_CFLAGS)
all : \
../../config.h \
libpixops.a \
timescale.exe
libpixops_OBJECTS = \
pixops.o \
have_mmx.o \
scale_line_22_33_mmx.o \
composite_line_22_4a4_mmx.o \
composite_line_color_22_4a4_mmx.o
../../config.h : ../../config.h.win32
cp $< $@
libpixops.a : $(libpixops_OBJECTS)
ar rv $@ $?
timescale.exe : timescale.o libpixops.a
$(CC) $(CFLAGS) -o $@ timescale.o libpixops.a $(GLIB_LIBS)
makefile.mingw: makefile.mingw.in
sed -e 's,@GTK_MAJOR[_]VERSION@,@GTK_MAJOR_VERSION@,' \
-e 's,@GTK_MINOR[_]VERSION@,@GTK_MINOR_VERSION@,' <$< >$@

View File

@@ -78,6 +78,19 @@ query_module (const char *dir, const char *file)
g_module_symbol (module, "fill_info", (gpointer *) &fill_info) &&
g_module_symbol (module, "fill_vtable", (gpointer *) &fill_vtable)) {
GdkPixbufFormat *info;
#ifdef G_OS_WIN32
/* Replace backslashes in path with forward slashes, so that
* it reads in without problems.
*/
{
char *p = path;
while (*p) {
if (*p == '\\')
*p = '/';
p++;
}
}
#endif
g_printf("\"%s\"\n", path);
info = g_new0 (GdkPixbufFormat, 1);
(*fill_info) (info);
@@ -101,7 +114,11 @@ query_module (const char *dir, const char *file)
g_free (info);
}
else {
g_fprintf (stderr, "Cannot load loader %s\n", path);
if (module == NULL)
g_fprintf (stderr, "g_module_open() failed for %s: %s\n", path,
g_module_error());
else
g_fprintf (stderr, "Cannot load loader %s\n", path);
}
if (module)
g_module_close (module);

View File

@@ -7,8 +7,6 @@ EXTRA_DIST = \
gdkconfig.h.win32 \
gdk.def \
gdkmarshalers.list \
makefile.mingw \
makefile.mingw.in \
makeenums.pl \
makefile.msc
@@ -181,6 +179,7 @@ libgdk_linux_fb_2_0_la_LIBADD = linux-fb/libgdk-linux-fb.la @GDK_DEP_LIBS@
libgdk_win32_2_0_la_LIBADD = \
win32/libgdk-win32.la $(wintab_lib) $(ie55uuid_lib) \
@GDK_DEP_LIBS@
libgdk_win32_2_0_la_DEPENDENCIES = win32/libgdk-win32.la gdk.def
lib_LTLIBRARIES = $(gdktargetlib)

View File

@@ -59,11 +59,13 @@ EXPORTS
gdk_devices_list
gdk_display_add_client_message_filter
gdk_display_beep
gdk_display_close
gdk_display_get_core_pointer
gdk_display_get_default
gdk_display_get_default_screen
gdk_display_get_name
gdk_display_get_event
gdk_display_get_n_screens
gdk_display_get_name
gdk_display_get_pointer
gdk_display_get_screen
gdk_display_get_type
@@ -71,11 +73,18 @@ EXPORTS
gdk_display_keyboard_ungrab
gdk_display_list_devices
gdk_display_manager_get
gdk_display_manager_get_type
gdk_display_manager_get_default_display
gdk_display_manager_list_displays
gdk_display_manager_set_default_display
gdk_display_open
gdk_display_open_default_libgtk_only
gdk_display_peek_event
gdk_display_pointer_is_grabbed
gdk_display_pointer_ungrab
gdk_display_put_event
gdk_display_set_double_click_time
gdk_display_set_pointer_hooks
gdk_display_sync
gdk_drag_abort
gdk_drag_action_get_type
@@ -88,6 +97,7 @@ EXPORTS
gdk_drag_find_window
gdk_drag_find_window_for_screen
gdk_drag_get_protocol
gdk_drag_get_protocol_for_display
gdk_drag_get_selection
gdk_drag_motion
gdk_drag_protocol_get_type
@@ -156,6 +166,7 @@ EXPORTS
gdk_event_send_client_message
gdk_event_send_client_message_for_display
gdk_event_send_clientmessage_toall
gdk_event_set_screen
gdk_event_type_get_type
gdk_events_pending
gdk_exit
@@ -287,6 +298,9 @@ EXPORTS
gdk_pixmap_create_from_xpm_d
gdk_pixmap_foreign_new
gdk_pixmap_get_type
gdk_pixmap_foreign_new_for_display
gdk_pixmap_lookup
gdk_pixmap_lookup_for_display
gdk_pixmap_new
gdk_pointer_grab
gdk_pointer_grab_info_libgtk_only
@@ -336,10 +350,12 @@ EXPORTS
gdk_rgb_set_min_colors
gdk_rgb_set_verbose
gdk_rgb_xpixel_from_rgb
gdk_screen_broadcast_client_message
gdk_screen_get_default
gdk_screen_get_default_colormap
gdk_screen_get_display
gdk_screen_get_height
gdk_screen_get_height_mm
gdk_screen_get_monitor_at_point
gdk_screen_get_monitor_at_window
gdk_screen_get_monitor_geometry
@@ -350,10 +366,15 @@ EXPORTS
gdk_screen_get_root_window
gdk_screen_get_setting
gdk_screen_get_system_colormap
gdk_screen_get_system_visual
gdk_screen_get_toplevel_windows
gdk_screen_get_type
gdk_screen_get_width
gdk_screen_get_width_mm
gdk_screen_height
gdk_screen_height_mm
gdk_screen_list_visuals
gdk_screen_make_display_name
gdk_screen_set_default_colormap
gdk_screen_width
gdk_screen_width_mm
@@ -521,4 +542,3 @@ EXPORTS
gdk_window_withdraw
gdk_wm_decoration_get_type
gdk_wm_function_get_type

View File

@@ -363,7 +363,6 @@ gdk_event_is_allocated (GdkEvent *event)
GdkEvent*
gdk_event_copy (GdkEvent *event)
{
GdkEventPrivate *private;
GdkEventPrivate *new_private;
GdkEvent *new_event;
@@ -372,13 +371,16 @@ gdk_event_copy (GdkEvent *event)
new_event = gdk_event_new (GDK_NOTHING);
new_private = (GdkEventPrivate *)new_event;
private = (GdkEventPrivate *)event;
*new_event = *event;
if (new_event->any.window)
g_object_ref (new_event->any.window);
new_private->screen = private->screen;
if (gdk_event_is_allocated (event))
{
GdkEventPrivate *private = (GdkEventPrivate *)event;
new_private->screen = private->screen;
}
switch (event->any.type)
{
@@ -410,6 +412,20 @@ gdk_event_copy (GdkEvent *event)
case GDK_SETTING:
new_event->setting.name = g_strdup (new_event->setting.name);
break;
case GDK_BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
if (event->button.axes)
new_event->button.axes = g_memdup (event->button.axes,
sizeof (gdouble) * event->button.device->num_axes);
break;
case GDK_MOTION_NOTIFY:
if (event->motion.axes)
new_event->motion.axes = g_memdup (event->motion.axes,
sizeof (gdouble) * event->motion.device->num_axes);
break;
default:
break;

View File

@@ -26,6 +26,7 @@
#include <glib/gprintf.h>
#include <stdlib.h>
#include <string.h>
#include "gdkkeysyms.h"
#include "gdkinternals.h"

View File

@@ -85,7 +85,7 @@ gdk_keymap_class_init (GdkKeymapClass *klass)
g_signal_new ("keys_changed",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GdkKeymapClass, direction_changed),
G_STRUCT_OFFSET (GdkKeymapClass, keys_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,

View File

@@ -1,4 +1,7 @@
#include <locale.h>
#include "gdk.h"
#include "gdkkeysyms.h"
/* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode
* mapping functions, from the xterm sources.
@@ -823,6 +826,25 @@ static struct {
/* End numeric keypad */
};
static gunichar
get_decimal_char (void)
{
struct lconv *locale_data;
gunichar result = '.';
gchar *utf8;
locale_data = localeconv ();
utf8 = g_locale_to_utf8 (locale_data->decimal_point, -1, NULL, NULL, NULL);
if (utf8)
{
if (g_utf8_strlen (utf8, -1) == 1)
result = g_utf8_get_char (utf8);
g_free (utf8);
}
return result;
}
/**
* gdk_keyval_to_unicode:
* @keyval: a GDK key symbol
@@ -850,6 +872,11 @@ gdk_keyval_to_unicode (guint keyval)
if ((keyval & 0xff000000) == 0x01000000)
return keyval & 0x00ffffff;
/* Translation of KP_Decimal depends on locale.
*/
if (keyval == GDK_KP_Decimal)
return get_decimal_char ();
/* binary search in table */
while (max >= min) {
mid = (min + max) / 2;

View File

@@ -163,6 +163,37 @@ gdk_pango_context_set_colormap (PangoContext *context,
}
}
static void
draw_underline (GdkDrawable *drawable,
GdkGC *gc,
PangoUnderline uline,
int baseline_y,
int low_y,
int start_x,
int end_x)
{
switch (uline)
{
case PANGO_UNDERLINE_NONE:
break;
case PANGO_UNDERLINE_DOUBLE:
gdk_draw_line (drawable, gc,
start_x, baseline_y + 3,
end_x, baseline_y + 3);
/* Fall through */
case PANGO_UNDERLINE_SINGLE:
gdk_draw_line (drawable, gc,
start_x, baseline_y + 1,
end_x, baseline_y + 1);
break;
case PANGO_UNDERLINE_LOW:
gdk_draw_line (drawable, gc,
start_x, low_y + 1,
end_x, low_y + 1);
break;
}
}
/**
* gdk_draw_layout_line_with_colors:
* @drawable: the drawable on which to draw the line
@@ -195,6 +226,15 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
gint rise = 0;
gboolean embossed;
GdkBitmap *stipple;
PangoUnderline last_uline = PANGO_UNDERLINE_NONE;
gint uline_start_x = 0;
gint uline_end_x = 0;
gint uline_end_x_extended = 0;
gint last_risen_y = 0;
gint low_y = G_MININT;
GdkGC *last_fg_gc = NULL;
gboolean last_fg_set = FALSE;
PangoColor last_fg_color;
g_return_if_fail (GDK_IS_DRAWABLE (drawable));
g_return_if_fail (GDK_IS_GC (gc));
@@ -206,7 +246,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
while (tmp_list)
{
PangoUnderline uline = PANGO_UNDERLINE_NONE;
PangoUnderline this_uline = PANGO_UNDERLINE_NONE;
PangoLayoutRun *run = tmp_list->data;
PangoColor fg_color, bg_color;
gboolean strike, fg_set, bg_set, shape_set;
@@ -215,7 +255,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
tmp_list = tmp_list->next;
gdk_pango_get_item_properties (run->item, &uline,
gdk_pango_get_item_properties (run->item, &this_uline,
&strike,
&rise,
&fg_color, &fg_set,
@@ -231,7 +271,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
if (!shape_set)
{
if (uline == PANGO_UNDERLINE_NONE)
if (this_uline == PANGO_UNDERLINE_NONE)
pango_glyph_string_extents (run->glyphs, run->item->analysis.font,
NULL, &logical_rect);
else
@@ -281,7 +321,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
}
else
fg_gc = gc;
if (!shape_set)
{
gint gx, gy;
@@ -304,36 +344,58 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
gx, gy,
run->glyphs);
}
switch (uline)
if (this_uline != last_uline ||
risen_y != last_risen_y ||
fg_set != last_fg_set ||
(fg_set && (last_fg_color.red != fg_color.red ||
last_fg_color.green != fg_color.green ||
last_fg_color.blue != fg_color.blue)))
{
case PANGO_UNDERLINE_NONE:
break;
case PANGO_UNDERLINE_DOUBLE:
gdk_draw_line (drawable, fg_gc,
x + (x_off + ink_rect.x) / PANGO_SCALE - 1,
risen_y + 3,
x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE,
risen_y + 3);
/* Fall through */
case PANGO_UNDERLINE_SINGLE:
gdk_draw_line (drawable, fg_gc,
x + (x_off + ink_rect.x) / PANGO_SCALE - 1,
risen_y + 1,
x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE,
risen_y + 1);
break;
case PANGO_UNDERLINE_LOW:
gdk_draw_line (drawable, fg_gc,
x + (x_off + ink_rect.x) / PANGO_SCALE - 1,
risen_y + (ink_rect.y + ink_rect.height) / PANGO_SCALE + 1,
x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE,
risen_y + (ink_rect.y + ink_rect.height) / PANGO_SCALE + 1);
break;
/* If only color changes, the underlines extend to the edge
* of the logical rectangle so they join up; otherwise they
* go 1 pixel beyond the ink rectangle. This doesn't work
* for low underlines (they will be at a different y anyways),
* so they follow the normal path.
*/
gboolean extend_uline = (this_uline == last_uline &&
this_uline != PANGO_UNDERLINE_LOW &&
risen_y == last_risen_y);
/* Starting a new underline run
*/
if (last_uline != PANGO_UNDERLINE_NONE)
{
draw_underline (drawable, last_fg_gc, last_uline,
last_risen_y, low_y,
uline_start_x,
extend_uline ? uline_end_x_extended : uline_end_x);
}
if (this_uline != PANGO_UNDERLINE_NONE)
{
if (extend_uline)
uline_start_x = x + x_off / PANGO_SCALE;
else
uline_start_x = x + (x_off + ink_rect.x) / PANGO_SCALE - 1;
low_y = G_MININT;
}
}
/* Update current underline segment information
*/
if (this_uline != PANGO_UNDERLINE_NONE)
{
uline_end_x = x + (x_off + ink_rect.x + ink_rect.width) / PANGO_SCALE;
uline_end_x_extended = x + (x_off + logical_rect.x + logical_rect.width) / PANGO_SCALE - 1;
}
if (this_uline == PANGO_UNDERLINE_LOW)
low_y = MAX (low_y, risen_y + (ink_rect.y + ink_rect.height) / PANGO_SCALE);
if (strike)
{
{
int centerline = logical_rect.y + logical_rect.height / 2;
gdk_draw_line (drawable, fg_gc,
@@ -341,13 +403,29 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
risen_y + centerline / PANGO_SCALE,
x + (x_off + logical_rect.x + logical_rect.width) / PANGO_SCALE + 1,
risen_y + centerline / PANGO_SCALE);
}
if (fg_gc != gc)
gdk_pango_free_gc (context, fg_gc);
}
if (last_fg_gc != gc && last_fg_gc)
gdk_pango_free_gc (context, last_fg_gc);
last_risen_y = risen_y;
last_uline = this_uline;
last_fg_gc = fg_gc;
last_fg_set = fg_set;
if (fg_set)
last_fg_color = fg_color;
x_off += logical_rect.width;
}
/* Finish off any remaining underlines
*/
if (last_uline != PANGO_UNDERLINE_NONE)
draw_underline (drawable, last_fg_gc, last_uline, last_risen_y, low_y,
uline_start_x, uline_end_x);
if (last_fg_gc != gc && last_fg_gc)
gdk_pango_free_gc (context, last_fg_gc);
}
/**

View File

@@ -34,11 +34,19 @@
#include "gdk-pixbuf-private.h"
#include "gdkinternals.h"
/* Some convenient names
*/
#if (G_BYTE_ORDER == G_LITTLE_ENDIAN)
#define LITTLE
#undef BIG
#else
#define BIG
#undef LITTLE
#endif
#define d(x)
#define SWAP16(d) GUINT16_SWAP_LE_BE(d)
static guint32 mask_table[] = {
@@ -363,6 +371,39 @@ rgb8a (GdkImage *image,
}
}
/* Bit shifting for 565 and 555 conversion routines
*
* RGB565 == rrrr rggg gggb bbbb, 16 bit native endian
* RGB555 == xrrr rrgg gggb bbbb
* ABGR8888: ARGB, 32-bit native endian
* RGBA8888: RGBA, 32-bit native endian
*/
#define R8fromRGB565(d) ((((d) >> 8) & 0xf8) | (((d) >> 13) & 0x7))
#define G8fromRGB565(d) ((((d) >> 3) & 0xfc) | (((d) >> 9) & 0x3))
#define B8fromRGB565(d) ((((d) << 3) & 0xf8) | (((d) >> 2) & 0x7))
#define ABGR8888fromRGB565(d) ( ((d) & 0xf800) >> 8 | ((d) & 0xe000) >> 13 \
| ((d) & 0x07e0) << 5 | ((d) & 0x0600) >> 1 \
| ((d) & 0x001f) << 19 | ((d) & 0x001c) << 14 \
| 0xff000000)
#define RGBA8888fromRGB565(d) ( ((d) & 0xf800) << 16 | ((d) & 0xe000) << 11 \
| ((d) & 0x07e0) << 13 | ((d) & 0x0600) << 7 \
| ((d) & 0x001f) << 11 | ((d) & 0x001c) << 6 \
| 0xff)
#define R8fromRGB555(d) (((d) & 0x7c00) >> 7 | ((d) & 0x7000) >> 12)
#define G8fromRGB555(d) (((d) & 0x03e0) >> 2 | ((d) & 0x0380) >> 7)
#define B8fromRGB555(d) (((d) & 0x001f) << 3 | ((d) & 0x001c) >> 2)
#define ABGR8888fromRGB555(d) ( ((d) & 0x7c00) >> 7 | ((d) & 0x7000) >> 12 \
| ((d) & 0x03e0) << 6 | ((d) & 0x0380) << 1 \
| ((d) & 0x001f) << 19 | ((d) & 0x001c) << 14 \
| 0xff000000)
#define RGBA8888fromRGB555(d) ( ((d) & 0x7c00) << 17 | ((d) & 0x7000) << 12 \
| ((d) & 0x03e0) << 14 | ((d) & 0x0380) << 9 \
| ((d) & 0x001f) << 11 | ((d) & 0x001c) << 6 \
| 0xff)
/*
* convert 16 bits/pixel data
* no alpha
@@ -372,95 +413,35 @@ static void
rgb565lsb (GdkImage *image,
guchar *pixels,
int rowstride,
int x1,
int y1,
int x2,
int y2,
int x1,
int y1,
int x2,
int y2,
GdkColormap *colormap)
{
int xx, yy;
int bpl;
#ifdef LITTLE
register guint32 *s; /* read 2 pixels at once */
#else
register guint8 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
register guint16 *s;
register guint8 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
bpl = image->bpl;
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = (guint32 *) srow;
#else
s = srow;
#endif
o = (guint16 *) orow;
/* check for first pixel odd */
xx = x1;
if (xx & 1)
s = (guint16 *) srow;
o = (guint8 *) orow;
for (xx = x1; xx < x2; xx ++)
{
register guint16 data;
#ifdef LITTLE
data = *((short *) s);
#else
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#endif
((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);
((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);
((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);
o = (guint16 *) (((char *) o) + 3);
++xx;
}
g_assert (!(xx & 1));
/* if x2 is even, then the -1 does nothing to number of
* loop iterations, if x2 is odd then the -1 reduces
* iterations by one
*/
for (; xx < (x2 - 1); xx += 2)
{
register guint32 data;
#ifdef LITTLE
data = *s++;
*o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
| (data & 0x7e0) << 5 | (data & 0x600) >> 1;
*o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
| (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21;
*o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
/* swap endianness first */
data = s[1] << 24 | s[0] << 16 | s[3] << 8 | s[2];
s += 4;
*o++ = (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21
| (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25;
*o++ = (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10
| (data & 0xf800) >> 8 | (data & 0xe000) >> 13;
*o++ = (data & 0x7e0) << 5 | (data & 0x600) >> 1
| (data & 0x1f) << 3 | (data & 0x1c) >> 2;
#endif
}
/* check for last remaining pixel */
if (x2 & 1)
{
register guint16 data;
#ifdef LITTLE
data = *((short *) s);
#else
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#endif
((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);
((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);
((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);
register guint32 data = *s++;
#ifdef BIG
data = SWAP16 (data);
#endif
*o++ = R8fromRGB565 (data);
*o++ = G8fromRGB565 (data);
*o++ = B8fromRGB565 (data);
}
srow += bpl;
orow += rowstride;
@@ -485,87 +466,26 @@ rgb565msb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint8 *s; /* need to swap data order */
#else
register guint32 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
register guint16 *s;
register guint8 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
bpl = image->bpl;
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = srow;
#else
s = (guint32 *) srow;
#endif
o = (guint16 *) orow;
xx = x1;
/* check for first pixel odd */
if (xx & 1)
s = (guint16 *) srow;
o = (guint8 *) orow;
for (xx = x1; xx < x2; xx ++)
{
register guint16 data;
register guint32 data = *s++;
#ifdef LITTLE
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#else
data = *((short *) s);
#endif
((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);
((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);
((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);
o = (guint16 *) (((char *) o) + 3);
++xx;
}
g_assert (!(xx & 1));
/* if x2 is even, then the -1 does nothing to number of
* loop iterations, if x2 is odd then the -1 reduces
* iterations by one
*/
for (; xx < (x2 - 1); xx += 2)
{
register guint32 data;
#ifdef LITTLE
/* swap endianness first */
data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;
s += 4;
*o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
| (data & 0x7e0) << 5 | (data & 0x600) >> 1;
*o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
| (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21;
*o++ = (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
data = *s++;
*o++ = (data & 0xf8000000) >> 16 | (data & 0xe0000000) >> 21
| (data & 0x7e00000) >> 19 | (data & 0x6000000) >> 25;
*o++ = (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10
| (data & 0xf800) >> 8 | (data & 0xe000) >> 13;
*o++ = (data & 0x7e0) << 5 | (data & 0x600) >> 1
| (data & 0x1f) << 3 | (data & 0x1c) >> 2;
#endif
}
/* check for last remaining pixel */
if (x2 & 1)
{
register guint16 data;
#ifdef LITTLE
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#else
data = *((short *) s);
#endif
((char *) o)[0] = ((data >> 8) & 0xf8) | ((data >> 13) & 0x7);
((char *) o)[1] = ((data >> 3) & 0xfc) | ((data >> 9) & 0x3);
((char *) o)[2] = ((data << 3) & 0xf8) | ((data >> 2) & 0x7);
data = SWAP16 (data);
#endif
*o++ = R8fromRGB565 (data);
*o++ = G8fromRGB565 (data);
*o++ = B8fromRGB565 (data);
}
srow += bpl;
orow += rowstride;
@@ -590,11 +510,7 @@ rgb565alsb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint16 *s; /* read 1 pixels at once */
#else
register guint8 *s;
#endif
register guint16 *s;
register guint32 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
@@ -603,31 +519,16 @@ rgb565alsb (GdkImage *image,
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = (guint16 *) srow;
#else
s = (guint8 *) srow;
#endif
o = (guint32 *) orow;
for (xx = x1; xx < x2; xx ++)
{
register guint32 data;
/* rrrrrggg gggbbbbb -> rrrrrRRR ggggggGG bbbbbBBB aaaaaaaa */
/* little endian: aaaaaaaa bbbbbBBB ggggggGG rrrrrRRR */
register guint32 data = *s++;
#ifdef LITTLE
data = *s++;
*o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
| (data & 0x7e0) << 5 | (data & 0x600) >> 1
| (data & 0x1f) << 19 | (data & 0x1c) << 14
| 0xff000000;
*o++ = ABGR8888fromRGB565 (data);
#else
/* swap endianness first */
data = s[0] | s[1] << 8;
s += 2;
*o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11
| (data & 0x7e0) << 13 | (data & 0x600) << 7
| (data & 0x1f) << 11 | (data & 0x1c) << 6
| 0xff;
data = SWAP16 (data);
*o++ = RGBA8888fromRGB565 (data);
#endif
}
srow += bpl;
@@ -653,11 +554,7 @@ rgb565amsb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint8 *s;
#else
register guint16 *s; /* read 1 pixels at once */
#endif
register guint16 *s;
register guint32 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
@@ -666,27 +563,16 @@ rgb565amsb (GdkImage *image,
for (yy = y1; yy < y2; yy++)
{
s = srow;
s = (guint16 *) srow;
o = (guint32 *) orow;
for (xx = x1; xx < x2; xx ++)
{
register guint32 data;
/* rrrrrggg gggbbbbb -> rrrrrRRR gggggg00 bbbbbBBB aaaaaaaa */
/* little endian: aaaaaaaa bbbbbBBB gggggg00 rrrrrRRR */
register guint32 data = *s++;
#ifdef LITTLE
/* swap endianness first */
data = s[0] | s[1] << 8;
s += 2;
*o++ = (data & 0xf800) >> 8 | (data & 0xe000) >> 13
| (data & 0x7e0) << 5 | (data & 0x600) >> 1
| (data & 0x1f) << 19 | (data & 0x1c) << 14
| 0xff000000;
data = SWAP16 (data);
*o++ = ABGR8888fromRGB565 (data);
#else
data = *s++;
*o++ = (data & 0xf800) << 16 | (data & 0xe000) << 11
| (data & 0x7e0) << 13 | (data & 0x600) << 7
| (data & 0x1f) << 11 | (data & 0x1c) << 6
| 0xff;
*o++ = RGBA8888fromRGB565 (data);
#endif
}
srow += bpl;
@@ -712,86 +598,26 @@ rgb555lsb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint32 *s; /* read 2 pixels at once */
#else
register guint8 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
register guint16 *s;
register guint8 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
bpl = image->bpl;
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = (guint32 *) srow;
#else
s = srow;
#endif
o = (guint16 *) orow;
xx = x1;
/* check for first odd pixel */
if (xx & 1)
s = (guint16 *) srow;
o = (guint8 *) orow;
for (xx = x1; xx < x2; xx ++)
{
register guint16 data;
#ifdef LITTLE
data = *((short *) s);
#else
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#endif
((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12;
((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2;
o = (guint16 *) (((char *) o) + 3);
++xx;
}
g_assert (!(xx & 1));
/* if x2 is even, then the -1 does nothing to number of
* loop iterations, if x2 is odd then the -1 reduces
* iterations by one
*/
for (; xx < (x2 - 1); xx += 2)
{
register guint32 data;
#ifdef LITTLE
data = *s++;
*o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
| (data & 0x3e0) << 6 | (data & 0x380) << 1;
*o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
| (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20;
*o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
/* swap endianness first */
data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;
s += 4;
*o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4
| (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
| (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28;
*o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15
| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
#endif
}
/* check for last remaining pixel */
if (x2 & 1)
{
register guint16 data;
#ifdef LITTLE
data = *((short *) s);
#else
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#endif
((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12;
((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2;
register guint32 data = *s++;
#ifdef BIG
data = SWAP16 (data);
#endif
*o++ = R8fromRGB555 (data);
*o++ = G8fromRGB555 (data);
*o++ = B8fromRGB555 (data);
}
srow += bpl;
orow += rowstride;
@@ -816,82 +642,26 @@ rgb555msb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint8 *s; /* read 2 pixels at once */
#else
register guint32 *s; /* read 2 pixels at once */
#endif
register guint16 *o;
register guint16 *s;
register guint8 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
bpl = image->bpl;
for (yy = y1; yy < y2; yy++)
{
s = srow;
o = (guint16 *) orow;
xx = x1;
/* See if first pixel is odd */
if (xx & 1)
s = (guint16 *) srow;
o = (guint8 *) orow;
for (xx = x1; xx < x2; xx ++)
{
register guint16 data;
register guint32 data = *s++;
#ifdef LITTLE
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#else
data = *((short *) s);
#endif
((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12;
((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2;
o = (guint16 *) (((char *) o) + 3);
++xx;
}
g_assert (!(xx & 1));
/* if x2 is even, then the -1 does nothing to number of
* loop iterations, if x2 is odd then the -1 reduces
* iterations by one
*/
for (; xx < (x2 - 1); xx += 2)
{
register guint32 data;
#ifdef LITTLE
/* swap endianness first */
data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;
s += 4;
*o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
| (data & 0x3e0) << 6 | (data & 0x380) << 1;
*o++ = (data & 0x1f) << 3 | (data & 0x1c) >> 2
| (data & 0x7c000000) >> 15 | (data & 0x70000000) >> 20;
*o++ = (data & 0x3e00000) >> 18 | (data & 0x3800000) >> 23
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
data = *s++;
*o++ = (data & 0x7c00) << 1 | (data & 0x7000) >> 4
| (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
| (data & 0x7c000000) >> 23 | (data & 0x70000000) >> 28;
*o++ = (data & 0x3e00000) >> 10 | (data & 0x3800000) >> 15
| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
#endif
}
/* check for last remaining pixel */
if (x2 & 1)
{
register guint16 data;
#ifdef LITTLE
data = *((short *) s);
data = ((data >> 8) & 0xff) | ((data & 0xff) << 8);
#else
data = *((short *) s);
#endif
((char *) o)[0] = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12;
((char *) o)[1] = (data & 0x3e0) >> 2 | (data & 0x380) >> 7;
((char *) o)[2] = (data & 0x1f) << 3 | (data & 0x1c) >> 2;
data = SWAP16 (data);
#endif
*o++ = R8fromRGB555 (data);
*o++ = G8fromRGB555 (data);
*o++ = B8fromRGB555 (data);
}
srow += bpl;
orow += rowstride;
@@ -916,11 +686,7 @@ rgb555alsb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint16 *s; /* read 1 pixels at once */
#else
register guint8 *s;
#endif
register guint32 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
@@ -929,31 +695,16 @@ rgb555alsb (GdkImage *image,
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = (guint16 *) srow;
#else
s = srow;
#endif
o = (guint32 *) orow;
for (xx = x1; xx < x2; xx++)
{
register guint32 data;
/* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */
/* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */
register guint32 data = *s++;
#ifdef LITTLE
data = *s++;
*o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
| (data & 0x3e0) << 6 | (data & 0x380) << 1
| (data & 0x1f) << 19 | (data & 0x1c) << 14
| 0xff000000;
*o++ = ABGR8888fromRGB555 (data);
#else
/* swap endianness first */
data = s[0] | s[1] << 8;
s += 2;
*o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12
| (data & 0x3e0) << 14 | (data & 0x380) << 9
| (data & 0x1f) << 11 | (data & 0x1c) << 6
| 0xff;
data = SWAP16 (data);
*o++ = RGBA8888fromRGB555 (data);
#endif
}
srow += bpl;
@@ -979,11 +730,7 @@ rgb555amsb (GdkImage *image,
int xx, yy;
int bpl;
#ifdef LITTLE
register guint16 *s; /* read 1 pixels at once */
#else
register guint8 *s;
#endif
register guint16 *s;
register guint32 *o;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
@@ -992,31 +739,16 @@ rgb555amsb (GdkImage *image,
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = (guint16 *) srow;
#else
s = srow;
#endif
o = (guint32 *) orow;
for (xx = x1; xx < x2; xx++)
{
register guint32 data;
/* rrrrrggg gggbbbbb -> rrrrrRRR gggggGGG bbbbbBBB aaaaaaaa */
/* little endian: aaaaaaaa bbbbbBBB gggggGGG rrrrrRRR */
register guint32 data = *s++;
#ifdef LITTLE
/* swap endianness first */
data = s[0] | s[1] << 8;
s += 2;
*o++ = (data & 0x7c00) >> 7 | (data & 0x7000) >> 12
| (data & 0x3e0) << 6 | (data & 0x380) << 1
| (data & 0x1f) << 19 | (data & 0x1c) << 14
| 0xff000000;
data = SWAP16 (data);
*o++ = ABGR8888fromRGB555 (data);
#else
data = *s++;
*o++ = (data & 0x7c00) << 17 | (data & 0x7000) << 12
| (data & 0x3e0) << 14 | (data & 0x380) << 9
| (data & 0x1f) << 11 | (data & 0x1c) << 6
| 0xff;
*o++ = RGBA8888fromRGB555 (data);
#endif
}
srow += bpl;
@@ -1114,13 +846,8 @@ rgb888amsb (GdkImage *image,
int bpl;
guint8 *srow = (guint8*)image->mem + y1 * image->bpl + x1 * image->bpp, *orow = pixels;
#ifdef LITTLE
guint32 *o;
guint32 *s;
#else
guint8 *s; /* for byte order swapping */
guint8 *o;
#endif
d (printf ("32 bit, msb, with alpha\n"));
@@ -1129,24 +856,14 @@ rgb888amsb (GdkImage *image,
/* msb data */
for (yy = y1; yy < y2; yy++)
{
#ifdef LITTLE
s = (guint32 *) srow;
o = (guint32 *) orow;
#else
s = srow;
o = orow;
#endif
for (xx = x1; xx < x2; xx++)
{
#ifdef LITTLE
*o++ = s[1];
*o++ = s[2];
*o++ = s[3];
*o++ = 0xff;
s += 4;
*o++ = (*s++ >> 8) | 0xff000000;
#else
*o++ = (*s << 8) | 0xff; /* untested */
s++;
*o++ = (*s++ << 8) | 0xff;
#endif
}
srow += bpl;

View File

@@ -207,7 +207,7 @@ gdk_rgb_make_colorcube_d (GdkRgbInfo *image_info, gulong *pixels,
/* Try installing a color cube of the specified size.
Make the colorcube and return TRUE on success */
static gint
static gboolean
gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force,
gint nr, gint ng, gint nb)
{
@@ -217,7 +217,6 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force,
GdkColormap *cmap;
GdkColor color;
gulong pixels[256];
gulong junk[256];
gint i;
gint d2;
gint colors_needed;
@@ -277,22 +276,6 @@ gdk_rgb_try_colormap (GdkRgbInfo *image_info, gboolean force,
}
#endif
if (colors_needed &&
image_info->visual->type != GDK_VISUAL_STATIC_COLOR)
{
if (!gdk_colors_alloc (cmap, 0, NULL, 0, junk, colors_needed))
{
char tmp_str[80];
g_snprintf (tmp_str, 80,
"%d %d %d colormap failed (in gdk_colors_alloc)\n",
nr, ng, nb);
return gdk_rgb_cmap_fail (tmp_str, cmap, pixels);
}
gdk_colors_free (cmap, junk, colors_needed, 0);
}
for (r = 0, i = 0; r < nr; r++)
for (g = 0; g < ng; g++)
for (b = 0; b < nb; b++, i++)

View File

@@ -354,6 +354,7 @@ _gdk_window_destroy_hierarchy (GdkWindow *window,
}
_gdk_windowing_window_destroy (window, recursing, foreign_destroy);
private->parent = NULL;
private->destroyed = TRUE;
if (private->filters)
@@ -780,17 +781,20 @@ gboolean
gdk_window_is_viewable (GdkWindow *window)
{
GdkWindowObject *private = (GdkWindowObject *)window;
GdkScreen *screen = gdk_drawable_get_screen (window);
GdkWindow *root_window = gdk_screen_get_root_window (screen);
GdkScreen *screen;
GdkWindow *root_window;
g_return_val_if_fail (window != NULL, FALSE);
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
screen = gdk_drawable_get_screen (window);
root_window = gdk_screen_get_root_window (screen);
while (private &&
(private != (GdkWindowObject *)root_window) &&
(GDK_WINDOW_TYPE (private) != GDK_WINDOW_FOREIGN))
{
if (!GDK_WINDOW_IS_MAPPED (window))
if (GDK_WINDOW_DESTROYED (window) || !GDK_WINDOW_IS_MAPPED (window))
return FALSE;
private = (GdkWindowObject *)private->parent;
@@ -2661,7 +2665,7 @@ gdk_window_constrain_size (GdkGeometry *geometry,
if (geometry->min_aspect * height > width)
{
delta = FLOOR (height - width * geometry->min_aspect, yinc);
delta = FLOOR (height - width / geometry->min_aspect, yinc);
if (height - delta >= min_height)
height -= delta;
else

View File

@@ -40,7 +40,7 @@ struct _GdkFBKeyboard {
gint io_tag;
guint modifier_state;
gboolean caps_lock : 1;
guint caps_lock : 1;
gint group;
gint level;

View File

@@ -119,7 +119,7 @@ struct _GdkWindowFBData
GdkRegion *shape; /* Can also be GDK_FB_USE_CHILD_SHAPE */
gboolean realized : 1;
guint realized : 1;
};
typedef struct {
@@ -338,9 +338,9 @@ struct _GdkFBDrawingContext {
guint rowstride, clip_rowstride;
int clipxoff, clipyoff;
gboolean draw_bg : 1;
gboolean copy_region : 1;
gboolean handle_cursor : 1;
guint draw_bg : 1;
guint copy_region : 1;
guint handle_cursor : 1;
};
void gdk_fb_drawing_context_init (GdkFBDrawingContext *dc,

View File

@@ -1551,7 +1551,7 @@ gdk_window_get_origin (GdkWindow *window,
gint *x,
gint *y)
{
g_return_val_if_fail (window != NULL, 0);
g_return_val_if_fail (window != NULL, FALSE);
if (x)
*x = GDK_DRAWABLE_IMPL_FBDATA (window)->abs_x;

View File

@@ -1,82 +0,0 @@
####
#### Out of order! Use autoconfiscation.
####
## Makefile for building the GDK DLL with gcc on Win32
## Use: make -f makefile.mingw
## There is no install target, you have to decide where and
## how to install for yourself.
TOP = ../..
include ../build/win32/make.mingw
# Possibly override versions from build/win32/module.defs
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
GDK_PIXBUF_LIBS = -L ../gdk-pixbuf -lgdk_pixbuf-$(GDK_PIXBUF_VER)
OPTIMIZE = -g
INCLUDES = -I . -I .. -I ../gdk-pixbuf
DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\" -DGDK_COMPILATION
all: \
../config.h \
gdkconfig.h \
win32/libgdk-win32.a \
win32/gdk-win32res.o \
gdk-win32-$(GTK_VER).dll
gdk_OBJECTS = \
gdk.o \
gdkcolor.o \
gdkcursor.o \
gdkdraw.o \
gdkevents.o \
gdkfont.o \
gdkgc.o \
gdkglobals.o \
gdkimage.o \
gdkkeys.o \
gdkkeyuni.o \
gdkpango.o \
gdkpixbuf-drawable.o \
gdkpixbuf-render.o \
gdkpixmap.o \
gdkpolyreg-generic.o \
gdkrgb.o \
gdkrectangle.o \
gdkregion-generic.o \
gdkwindow.o
../config.h : ../config.h.win32
cp $< $@
gdkconfig.h : gdkconfig.h.win32
cp $< $@
win32/libgdk-win32.a : FRC
cd win32 && $(MAKE) -f makefile.mingw libgdk-win32.a
win32/gdk-win32res.o : FRC
cd win32 && $(MAKE) -f makefile.mingw gdk-win32res.o
gdk-win32-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32/libgdk-win32.a win32/gdk-win32res.o win32/libwntab32x.a
$(GLIB)/build-dll gdk-win32 $(GTK_VER) gdk.def $(gdk_OBJECTS) win32/libgdk-win32.a win32/libwntab32x.a $(GDK_PIXBUF_LIBS) $(GLIB_LIBS) $(PANGOWIN32_LIBS) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o
win32/libwntab32x.a : FRC
cd win32 && $(MAKE) -f makefile.mingw libwntab32x.a
# Hack to get an updated makefile.mingw automatically after updating
# makefile.mingw.in. Only for developer use.
makefile.mingw: makefile.mingw.in
sed -e 's,@GTK_MAJOR[_]VERSION@,@GTK_MAJOR_VERSION@,' \
-e 's,@GTK_MINOR[_]VERSION@,@GTK_MINOR_VERSION@,' \
-e 's,@GDK_PIXBUF[_]MAJOR@,@GDK_PIXBUF_MAJOR@,' \
-e 's,@GDK_PIXBUF[_]MINOR@,@GDK_PIXBUF_MINOR@,' <$< >$@
.PHONY: FRC

View File

@@ -40,7 +40,6 @@ SUBDIRS=rc
EXTRA_DIST = \
bdfcursor.c \
makefile.mingw \
makefile.msc \
libie55uuid.la \
libwntab32x.la

View File

@@ -96,10 +96,10 @@ gdk_cursor_new_for_display (GdkDisplay *display,
hcursor = _gdk_win32_data_to_wcursor (cursor_type);
if (hcursor == NULL)
g_warning ("gdk_cursor_new: no cursor %d found", cursor_type);
g_warning ("gdk_cursor_new_for_display: no cursor %d found", cursor_type);
else
GDK_NOTE (MISC, g_print ("gdk_cursor_new: %d: %#x\n",
cursor_type, (guint) hcursor));
GDK_NOTE (MISC, g_print ("gdk_cursor_new_for_display: %d: %p\n",
cursor_type, hcursor));
private = g_new (GdkCursorPrivate, 1);
private->hcursor = hcursor;
@@ -268,12 +268,12 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
and_mask, xor_mask);
GDK_NOTE (MISC, g_print ("gdk_cursor_new_from_pixmap: "
"%#x (%dx%d) %#x (%dx%d) = %#x (%dx%d)\n",
(guint) GDK_PIXMAP_HBITMAP (source),
"%p (%dx%d) %p (%dx%d) = %p (%dx%d)\n",
GDK_PIXMAP_HBITMAP (source),
source_impl->width, source_impl->height,
(guint) GDK_PIXMAP_HBITMAP (mask),
GDK_PIXMAP_HBITMAP (mask),
mask_impl->width, mask_impl->height,
(guint) hcursor, cursor_width, cursor_height));
hcursor, cursor_width, cursor_height));
g_free (xor_mask);
g_free (and_mask);
@@ -295,11 +295,11 @@ _gdk_cursor_destroy (GdkCursor *cursor)
g_return_if_fail (cursor != NULL);
private = (GdkCursorPrivate *) cursor;
GDK_NOTE (MISC, g_print ("_gdk_cursor_destroy: %#x\n",
(cursor->type == GDK_CURSOR_IS_PIXMAP) ? (guint) private->hcursor : 0));
GDK_NOTE (MISC, g_print ("_gdk_cursor_destroy: %p\n",
(cursor->type == GDK_CURSOR_IS_PIXMAP) ? private->hcursor : 0));
if (GetCursor() == private->hcursor)
SetCursor(NULL);
if (GetCursor () == private->hcursor)
SetCursor (NULL);
if (!DestroyCursor (private->hcursor))
WIN32_API_FAILED ("DestroyCursor");

View File

@@ -1214,18 +1214,14 @@ draw_segments (GdkGCWin32 *gcwin32,
}
else
GDI_CALL (MoveToEx, (hdc, segs[i].x1, segs[i].y1, NULL)) &&
GDI_CALL (LineTo, (hdc, segs[i].x2, segs[i].y2)) &&
(gcwin32->pen_width <= 1 &&
GDI_CALL (LineTo, (hdc, segs[i].x2 + 1, segs[i].y2 + 1)));
GDI_CALL (LineTo, (hdc, segs[i].x2, segs[i].y2));
}
}
else
{
for (i = 0; i < nsegs; i++)
GDI_CALL (MoveToEx, (hdc, segs[i].x1, segs[i].y1, NULL)) &&
GDI_CALL (LineTo, (hdc, segs[i].x2, segs[i].y2)) &&
(gcwin32->pen_width <= 1 &&
GDI_CALL (LineTo, (hdc, segs[i].x2 + 1, segs[i].y2 + 1)));
GDI_CALL (LineTo, (hdc, segs[i].x2, segs[i].y2));
}
}

View File

@@ -36,13 +36,23 @@
/* Do use SetCapture, it works now. Thanks to jpe@archaeopteryx.com */
#define USE_SETCAPTURE 1
#include "config.h"
#include <glib/gprintf.h>
#if defined (__GNUC__) && defined (HAVE_DIMM_H)
/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
# define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
# define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
#endif
#include "gdk.h"
#include "gdkprivate-win32.h"
#include "gdkinput-win32.h"
#include "gdkkeysyms.h"
#include <windowsx.h>
#ifdef G_WITH_CYGWIN
#include <fcntl.h>
#include <errno.h>
@@ -50,12 +60,6 @@
#include <objbase.h>
#if defined (__GNUC__) && defined (HAVE_DIMM_H)
/* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
# define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
# define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
#endif
#include <imm.h>
#if defined (__GNUC__) && defined (HAVE_DIMM_H)
@@ -169,8 +173,8 @@ real_window_procedure (HWND hwnd,
msg.lParam = lparam;
msg.time = _gdk_win32_get_next_tick (0);
pos = GetMessagePos ();
msg.pt.x = LOWORD (pos);
msg.pt.y = HIWORD (pos);
msg.pt.x = GET_X_LPARAM (pos);
msg.pt.y = GET_Y_LPARAM (pos);
event = gdk_event_new (GDK_NOTHING);
((GdkEventPrivate *)event)->flags |= GDK_EVENT_PENDING;
@@ -199,6 +203,7 @@ real_window_procedure (HWND hwnd,
return ret_val;
else
{
GDK_NOTE (EVENTS, g_print("calling DefWindowProc\n"));
#ifndef HAVE_DIMM_H
return DefWindowProc (hwnd, message, wparam, lparam);
#else
@@ -527,8 +532,8 @@ gdk_pointer_grab (GdkWindow *window,
if (!cursor)
hcursor = NULL;
else
hcursor = cursor_private->hcursor;
else if ((hcursor = CopyCursor (cursor_private->hcursor)) == NULL)
WIN32_API_FAILED ("CopyCursor");
#if 0
return_val = _gdk_input_grab_pointer (window,
owner_events,
@@ -562,6 +567,9 @@ gdk_pointer_grab (GdkWindow *window,
{
p_grab_window = window;
p_grab_cursor = hcursor;
if (p_grab_cursor != NULL)
SetCursor (p_grab_cursor);
}
return return_val;
@@ -584,6 +592,13 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
#endif
p_grab_window = NULL;
if (p_grab_cursor != NULL)
{
if (GetCursor () == p_grab_cursor)
SetCursor (NULL);
DestroyCursor (p_grab_cursor);
p_grab_cursor = NULL;
}
}
/*
@@ -879,6 +894,8 @@ build_keypress_event (GdkEvent *event,
event->key.group = 0; /* ??? */
event->key.keyval = GDK_VoidSymbol;
build_key_event_state (event);
if (msg->message == WM_IME_COMPOSITION)
{
himc = ImmGetContext (msg->hwnd);
@@ -902,7 +919,11 @@ build_keypress_event (GdkEvent *event,
/* For ASCII control chars, the keyval should be the
* corresponding ASCII character.
*/
event->key.keyval = msg->wParam + '@';
if ((event->key.state & GDK_SHIFT_MASK) == 0)
event->key.keyval = msg->wParam + '`';
else
event->key.keyval = msg->wParam + '@';
/* This is needed in case of Alt+nnn or Alt+0nnn (on the numpad)
* where nnn<32
*/
@@ -936,8 +957,6 @@ build_keypress_event (GdkEvent *event,
wbuf, G_N_ELEMENTS (wbuf));
}
build_key_event_state (event);
/* Build UTF-8 string */
if (ucount > 0)
{
@@ -970,12 +989,18 @@ build_keyrelease_event (GdkEvent *event,
event->key.state = 0;
event->key.group = 0; /* ??? */
build_key_event_state (event);
if (msg->message == WM_CHAR || msg->message == WM_SYSCHAR)
{
event->key.hardware_keycode = vk_from_char (msg->wParam);
if (msg->wParam < ' ')
{
event->key.keyval = msg->wParam + '@';
if ((event->key.state & GDK_SHIFT_MASK) == 0)
event->key.keyval = msg->wParam + '`';
else
event->key.keyval = msg->wParam + '@';
event->key.state |= GDK_CONTROL_MASK;
}
else
@@ -992,7 +1017,7 @@ build_keyrelease_event (GdkEvent *event,
event->key.keyval = GDK_VoidSymbol;
event->key.hardware_keycode = 0; /* ??? */
}
build_key_event_state (event);
event->key.string = NULL;
event->key.length = 0;
}
@@ -1218,11 +1243,11 @@ synthesize_enter_event (GdkWindow *window,
if (!(GDK_WINDOW_OBJECT (window)->event_mask & GDK_ENTER_NOTIFY_MASK))
return;
/* Enter events are at LOWORD (msg->lParam), HIWORD
/* Enter events are at GET_X_LPARAM (msg->lParam), GET_Y_LPARAM
* (msg->lParam) in msg->hwnd */
pt.x = LOWORD (msg->lParam);
pt.y = HIWORD (msg->lParam);
pt.x = GET_X_LPARAM (msg->lParam);
pt.y = GET_Y_LPARAM (msg->lParam);
if (msg->hwnd != GDK_WINDOW_HWND (window))
{
ClientToScreen (msg->hwnd, &pt);
@@ -1462,11 +1487,12 @@ translate_mouse_coords (GdkWindow *window1,
{
POINT pt;
pt.x = LOWORD (msg->lParam);
pt.y = HIWORD (msg->lParam);
pt.x = GET_X_LPARAM (msg->lParam);
pt.y = GET_Y_LPARAM (msg->lParam);
ClientToScreen (GDK_WINDOW_HWND (window1), &pt);
ScreenToClient (GDK_WINDOW_HWND (window2), &pt);
msg->lParam = MAKELPARAM (pt.x, pt.y);
GDK_NOTE (EVENTS, g_print ("...new coords are (%ld,%ld)\n", pt.x, pt.y));
}
@@ -1875,6 +1901,23 @@ gdk_event_translate (GdkDisplay *display,
if (ret_val_flagp)
*ret_val_flagp = FALSE;
/* init these, since the done: block uses them */
ASSIGN_WINDOW (NULL);
event->any.window = NULL;
if (_gdk_default_filters)
{
/* Apply global filters */
GdkFilterReturn result;
result = gdk_event_apply_filters (msg, event, _gdk_default_filters);
if (result != GDK_FILTER_CONTINUE)
{
return_val = (result == GDK_FILTER_TRANSLATE) ? TRUE : FALSE;
goto done;
}
}
ASSIGN_WINDOW (gdk_win32_handle_table_lookup ((GdkNativeWindow) msg->hwnd));
orig_window = window;
@@ -1969,8 +2012,8 @@ gdk_event_translate (GdkDisplay *display,
* around that. Also, the position is in screen coordinates, not
* client coordinates as with the button messages.
*/
pt.x = LOWORD (msg->lParam);
pt.y = HIWORD (msg->lParam);
pt.x = GET_X_LPARAM (msg->lParam);
pt.y = GET_Y_LPARAM (msg->lParam);
if ((hwnd = WindowFromPoint (pt)) == NULL)
goto done;
@@ -2008,8 +2051,8 @@ gdk_event_translate (GdkDisplay *display,
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
event->scroll.x = (gint16) pt.x + xoffset;
event->scroll.y = (gint16) pt.y + yoffset;
event->scroll.x_root = (gint16) LOWORD (msg->lParam);
event->scroll.y_root = (gint16) HIWORD (msg->lParam);
event->scroll.x_root = (gint16) GET_X_LPARAM (msg->lParam);
event->scroll.y_root = (gint16) GET_Y_LPARAM (msg->lParam);
event->scroll.state = 0; /* No state information with MSH_MOUSEWHEEL */
event->scroll.device = display->core_pointer;
return_val = !GDK_WINDOW_DESTROYED (window);
@@ -2361,7 +2404,20 @@ gdk_event_translate (GdkDisplay *display,
break;
default:
if (msg->message == WM_SYSKEYDOWN || msg->message == WM_SYSKEYUP)
event->key.keyval = msg->wParam;
{
if (msg->wParam >= 'A' && msg->wParam <= 'Z')
{
/* If Alt-unshifted ASCII letter, lowercase */
if (GetKeyState (VK_SHIFT) < 0)
event->key.keyval = msg->wParam;
else
event->key.keyval = msg->wParam + 0x20;
}
else
{
event->key.keyval = msg->wParam;
}
}
else
ignore_wm_char = FALSE;
break;
@@ -2382,14 +2438,10 @@ gdk_event_translate (GdkDisplay *display,
GDK_KEY_PRESS : GDK_KEY_RELEASE);
event->key.time = _gdk_win32_get_next_tick (msg->time);
event->key.state = 0;
if (GetKeyState (VK_SHIFT) < 0)
event->key.state |= GDK_SHIFT_MASK;
if (GetKeyState (VK_CAPITAL) & 0x1)
event->key.state |= GDK_LOCK_MASK;
if (GetKeyState (VK_CONTROL) < 0)
event->key.state |= GDK_CONTROL_MASK;
if (msg->wParam != VK_MENU && GetKeyState (VK_MENU) < 0)
event->key.state |= GDK_MOD1_MASK;
build_key_event_state (event);
/* Reset MOD1_MASK if it is the Alt key itself */
if (msg->wParam == VK_MENU)
event->key.state &= ~GDK_MOD1_MASK;
event->key.hardware_keycode = msg->wParam;
event->key.group = 0;
event->key.string = NULL;
@@ -2425,6 +2477,13 @@ gdk_event_translate (GdkDisplay *display,
if (ignore_wm_char)
{
ignore_wm_char = FALSE;
if (msg->wParam != VK_SPACE && ret_val_flagp)
{
*ret_val_flagp = TRUE;
*ret_valp = FALSE;
}
break;
}
@@ -2488,7 +2547,7 @@ gdk_event_translate (GdkDisplay *display,
g_print ("WM_%cBUTTONDOWN: %p (%d,%d)\n",
" LMR"[button],
msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
if (GDK_WINDOW_OBJECT (window)->extension_events != 0
&& _gdk_input_ignore_core)
@@ -2528,10 +2587,10 @@ gdk_event_translate (GdkDisplay *display,
event->button.time = _gdk_win32_get_next_tick (msg->time);
if (window != orig_window)
translate_mouse_coords (orig_window, window, msg);
event->button.x = current_x = (gint16) LOWORD (msg->lParam);
event->button.y = current_y = (gint16) HIWORD (msg->lParam);
event->button.x = current_x = (gint16) GET_X_LPARAM (msg->lParam);
event->button.y = current_y = (gint16) GET_Y_LPARAM (msg->lParam);
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
event->button.x += xoffset; /* XXX translate current_x, y too? */
event->button.x += xoffset;
event->button.y += yoffset;
event->button.x_root = current_x_root = msg->pt.x;
event->button.y_root = current_y_root = msg->pt.y;
@@ -2557,7 +2616,7 @@ gdk_event_translate (GdkDisplay *display,
g_print ("WM_%cBUTTONUP: %p (%d,%d)\n",
" LMR"[button],
msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
ASSIGN_WINDOW (find_window_for_pointer_event (window, msg));
@@ -2585,9 +2644,11 @@ gdk_event_translate (GdkDisplay *display,
event->button.time = _gdk_win32_get_next_tick (msg->time);
if (window != orig_window)
translate_mouse_coords (orig_window, window, msg);
event->button.x = current_x = (gint16) GET_X_LPARAM (msg->lParam);
event->button.y = current_y = (gint16) GET_Y_LPARAM (msg->lParam);
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
event->button.x = (gint16) LOWORD (msg->lParam) + xoffset;
event->button.y = (gint16) HIWORD (msg->lParam) + yoffset;
event->button.x += xoffset;
event->button.y += yoffset;
event->button.x_root = current_x_root = msg->pt.x;
event->button.y_root = current_y_root = msg->pt.y;
event->button.axes = NULL;
@@ -2608,19 +2669,10 @@ gdk_event_translate (GdkDisplay *display,
GDK_NOTE (EVENTS,
g_print ("WM_MOUSEMOVE: %p %#x (%d,%d)\n",
msg->hwnd, msg->wParam,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
ASSIGN_WINDOW (find_window_for_pointer_event (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
&& LOWORD (msg->lParam) == current_x
&& HIWORD (msg->lParam) == current_y)
break;
/* HB: only process mouse move messages if we own the active window. */
GetWindowThreadProcessId (GetActiveWindow (), &pidActWin);
GetWindowThreadProcessId (msg->hwnd, &pidThis);
@@ -2648,8 +2700,18 @@ gdk_event_translate (GdkDisplay *display,
event->motion.time = _gdk_win32_get_next_tick (msg->time);
if (window != orig_window)
translate_mouse_coords (orig_window, window, msg);
event->motion.x = current_x = (gint16) LOWORD (msg->lParam);
event->motion.y = current_y = (gint16) HIWORD (msg->lParam);
/* 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->motion.x = current_x = (gint16) GET_X_LPARAM (msg->lParam);
event->motion.y = current_y = (gint16) GET_Y_LPARAM (msg->lParam);
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
event->motion.x += xoffset;
event->motion.y += yoffset;
@@ -2665,9 +2727,9 @@ gdk_event_translate (GdkDisplay *display,
case WM_NCMOUSEMOVE:
GDK_NOTE (EVENTS,
g_print ("WM_NCMOUSEMOVE: %p x,y: %d %d\n",
g_print ("WM_NCMOUSEMOVE: %p (%d,%d)\n",
msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
if (current_window != NULL
&& (GDK_WINDOW_OBJECT (current_window)->event_mask & GDK_LEAVE_NOTIFY_MASK))
{
@@ -2709,8 +2771,8 @@ gdk_event_translate (GdkDisplay *display,
* coordinates as with the button messages. I love the
* consistency of Windows.
*/
pt.x = LOWORD (msg->lParam);
pt.y = HIWORD (msg->lParam);
pt.x = GET_X_LPARAM (msg->lParam);
pt.y = GET_Y_LPARAM (msg->lParam);
if ((hwnd = WindowFromPoint (pt)) == NULL)
break;
@@ -2748,8 +2810,8 @@ gdk_event_translate (GdkDisplay *display,
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
event->scroll.x = (gint16) pt.x + xoffset;
event->scroll.y = (gint16) pt.y + yoffset;
event->scroll.x_root = (gint16) LOWORD (msg->lParam);
event->scroll.y_root = (gint16) HIWORD (msg->lParam);
event->scroll.x_root = (gint16) GET_X_LPARAM (msg->lParam);
event->scroll.y_root = (gint16) GET_Y_LPARAM (msg->lParam);
event->scroll.state = build_pointer_event_state (msg);
event->scroll.device = display->core_pointer;
return_val = !GDK_WINDOW_DESTROYED (window);
@@ -2996,6 +3058,9 @@ gdk_event_translate (GdkDisplay *display,
#endif
)
{
GdkWindowState withdrawn_bit =
IsWindowVisible (msg->hwnd) ? GDK_WINDOW_STATE_WITHDRAWN : 0;
if (!(private->event_mask & GDK_STRUCTURE_MASK))
break;
@@ -3017,12 +3082,12 @@ gdk_event_translate (GdkDisplay *display,
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED |
GDK_WINDOW_STATE_MAXIMIZED |
GDK_WINDOW_STATE_WITHDRAWN,
withdrawn_bit,
0);
else if (msg->wParam == SIZE_MAXIMIZED)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED |
GDK_WINDOW_STATE_WITHDRAWN,
withdrawn_bit,
GDK_WINDOW_STATE_MAXIMIZED);
if (private->resize_count > 1)
@@ -3100,7 +3165,7 @@ gdk_event_translate (GdkDisplay *display,
case WM_MOVE:
GDK_NOTE (EVENTS, g_print ("WM_MOVE: %p (%d,%d)\n",
msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
if (!(private->event_mask & GDK_STRUCTURE_MASK))
break;
@@ -3111,8 +3176,8 @@ gdk_event_translate (GdkDisplay *display,
{
event->configure.type = GDK_CONFIGURE;
event->configure.window = window;
event->configure.x = LOWORD (msg->lParam);
event->configure.y = HIWORD (msg->lParam);
event->configure.x = GET_X_LPARAM (msg->lParam);
event->configure.y = GET_Y_LPARAM (msg->lParam);
GetClientRect (msg->hwnd, &rect);
event->configure.width = rect.right;
event->configure.height = rect.bottom;

View File

@@ -1418,17 +1418,17 @@ gdk_font_equal (const GdkFont *fonta,
{
if (((GdkWin32SingleFont *) lista->data)->hfont
!= ((GdkWin32SingleFont *) listb->data)->hfont)
return 0;
return FALSE;
lista = lista->next;
listb = listb->next;
}
if (lista || listb)
return 0;
return FALSE;
else
return 1;
return TRUE;
}
else
return 0;
return FALSE;
}
/* Return the Unicode Subset bitfield number for a Unicode character */

View File

@@ -454,8 +454,10 @@ _gdk_win32_gc_new (GdkDrawable *drawable,
win32_gc->fill_style = GDK_SOLID;
win32_gc->tile = NULL;
win32_gc->stipple = NULL;
win32_gc->pen_style = PS_GEOMETRIC|PS_ENDCAP_FLAT|PS_JOIN_MITER;
win32_gc->subwindow_mode = GDK_CLIP_BY_CHILDREN;
win32_gc->graphics_exposures = TRUE;
win32_gc->pen_width = 0;
win32_gc->pen_style = PS_GEOMETRIC|PS_ENDCAP_FLAT|PS_JOIN_MITER;
win32_gc->pen_dashes = NULL;
win32_gc->pen_num_dashes = 0;

View File

@@ -687,7 +687,7 @@ _gdk_input_enter_event (GdkEventCrossing *event,
input_window->root_y = root_y;
}
gint
gboolean
_gdk_input_other_event (GdkEvent *event,
MSG *msg,
GdkWindow *window)
@@ -956,7 +956,7 @@ _gdk_input_other_event (GdkEvent *event,
return TRUE;
}
#endif
return -1;
return FALSE;
}
gboolean
@@ -1114,13 +1114,6 @@ _gdk_input_ungrab_pointer (guint32 time)
#endif
}
gint
_gdk_input_window_none_event (GdkEvent *event,
MSG *msg)
{
return -1;
}
gboolean
_gdk_device_get_history (GdkDevice *device,
GdkWindow *window,

View File

@@ -137,13 +137,11 @@ GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
/* The following functions are provided by each implementation
* (just wintab for now)
*/
gint _gdk_input_window_none_event(GdkEvent *event,
MSG *msg);
void _gdk_input_configure_event (GdkEventConfigure *event,
GdkWindow *window);
void _gdk_input_enter_event (GdkEventCrossing *event,
GdkWindow *window);
gint _gdk_input_other_event (GdkEvent *event,
gboolean _gdk_input_other_event (GdkEvent *event,
MSG *msg,
GdkWindow *window);

View File

@@ -30,6 +30,8 @@
#include <string.h>
#include "gdkpixmap.h"
#include "gdkdisplay.h"
#include "gdkprivate-win32.h"
static void gdk_pixmap_impl_win32_get_size (GdkDrawable *drawable,
@@ -440,6 +442,16 @@ gdk_pixmap_create_from_data (GdkDrawable *drawable,
return result;
}
GdkPixmap *
gdk_pixmap_foreign_new_for_display (GdkDisplay *display,
GdkNativeWindow anid)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (display == _gdk_display, NULL);
return gdk_pixmap_foreign_new (anid);
}
GdkPixmap*
gdk_pixmap_foreign_new (GdkNativeWindow anid)
{
@@ -479,3 +491,18 @@ gdk_pixmap_foreign_new (GdkNativeWindow anid)
return pixmap;
}
GdkPixmap*
gdk_pixmap_lookup (GdkNativeWindow anid)
{
return (GdkPixmap*) gdk_win32_handle_table_lookup (anid);
}
GdkPixmap*
gdk_pixmap_lookup_for_display (GdkDisplay *display, GdkNativeWindow anid)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (display == _gdk_display, NULL);
return gdk_pixmap_lookup (anid);
}

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