Compare commits

...

514 Commits

Author SHA1 Message Date
Owen Taylor
e90d1cdb52 === Released 2.2.3 ===
Tue Aug 26 10:01:18 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.2.3 ===
2003-08-26 18:27:37 +00:00
Guntupalli Karunakar
c3eea233c3 Updated Hindi translation 2003-08-26 16:10:01 +00:00
Owen Taylor
38d974d6a1 Fix variable declaration not at start of block. (#120371, Damien Carbery)
Tue Aug 26 09:57:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c (update_keymaps): Fix variable
        declaration not at start of block. (#120371, Damien Carbery)

        * NEWS: Bunch of typo fixes from Kristian.
2003-08-26 14:11:15 +00:00
Dafydd Harries
f6646427bb Updated Welsh translation. 2003-08-26 13:11:39 +00:00
Frédéric Crozat
7bf4c0ba2e My firstname is Frederic, not Federico :) 2003-08-26 07:46:06 +00:00
Owen Taylor
0d61cf7cf0 === Released 2.2.3 ===
Mon Aug 25 21:48:34 2003  Owen Taylor  <otaylor@redhat.com>

        * === Released 2.2.3 ===

        * configure.in: Version 2.2.3, interface age 3

        * NEWS: Updated

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        SGML markup fixes.
2003-08-26 04:15:23 +00:00
Owen Taylor
e86529966a Since we add one to the layout's reported width to account for the cursor,
Mon Aug 25 19:55:55 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c (gtk_text_view_update_layout_width):
        Since we add one to the layout's reported width to
        account for the cursor, we need to subtract one when
        setting the wrap width for the layout. (Fixes infinite
        loop (#120325, Federico Crozat)

        * gtk/gtktextlayout.c (gtk_text_layout_get_line_display):
        Be a bit more careful about rounding when converting
        wrapped width from Pango units to pixels.
2003-08-26 00:06:09 +00:00
Owen Taylor
4b01f3de88 Send the focus on to the parent when there was no focus widget before and
Wed Aug 20 21:26:49 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c (gtk_plug_focus): Send the focus on
        to the parent when there was no focus widget before
        and no focus widget after - that is, when there are
        no focusable widgets. (#108678, help tracking it
        down from Padraig O'Briain, Federico Mena Quintero, )

        * gtk/gtkxembed.[ch]: Move various shared utilities
        for the XEMBED protocol eused by GtkPlug and GtkSocket
        here.

        * gtk/gtkxembed.[ch] gtkplug.c gtksocket.c: Implement
        a flag bit that is sent with focus mesages to indicate
        that the focus has wrapped around on the toplevel;
        use this bit to catch infinite loops when there is no
        focusable widget at ll in the entire toplevel.

        * tests/testsocket.c (child_read_watch): Remove an
        extraneous unref.

        * gtk/gtkplug.c gtk/gtksocket.c gtk/gtkxembed.h:
        Up XEMBED protocol version to 1, add logic for
        sending the right version in XEMBED_EMBEDDED_NOTIFY.

        * gtk/gtksocket.c (gtk_socket_add_window): Send
        the embedder window in the XEMBED_EMBEDDED_NOTIFY
        as the spec requires.
2003-08-25 21:46:24 +00:00
Owen Taylor
89b3194a02 Don't include page->menu_label - causes various problems, including
Mon Aug 25 17:28:04 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.c (gtk_notebook_forall): Don't
        include page->menu_label - causes various problems,
        including #12047.
2003-08-25 21:34:37 +00:00
Kristian Rietveld
aa43d03026 Fixes #115871, reported by Michael Natterer.
Mon Aug 25 23:21:43 2003  Kristian Rietveld  <kris@gtk.org>

	Fixes #115871, reported by Michael Natterer.

	* gtk/gtktreeprivate.h: added GtkTreeSelectMode enum,
	added ctrl_pressed and shift_pressed bitfields,
	(_gtk_tree_selection_internal_select_node): replace GdkModifierType
	arg with GtkTreeSelectMode.

	* gtk/gtktreeselection.c (gtk_tree_selection_set_mode),
	(gtk_tree_selection_select_path), (gtk_tree_selection_unselect_path),
	(_gtk_tree_selection_internal_select_node): all updated for
	GdkModifierType -> GtkTreeSelectMode move.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): set ctrl_pressed
	and shift_pressed around selection handling block,
	(gtk_tree_view_real_select_cursor_row),
	(gtk_tree_view_real_toggle_cursor_row),
	(gtk_tree_view_real_selection_cursor_parent),
	(gtk_tree_view_real_set_cursor): use ctrl_pressed and shift_pressed,
	instead of checking the event state. And also updates for the
	GdkModifierType -> GtkTreeSelectMode move.
2003-08-25 21:25:52 +00:00
Owen Taylor
29a2f31f23 Send the focus on to the parent when there was no focus widget before and
Wed Aug 20 21:26:49 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c (gtk_plug_focus): Send the focus on
        to the parent when there was no focus widget before
        and no focus widget after - that is, when there are
        no focusable widgets. (#108678, help tracking it
        down from Padraig O'Briain, Federico Mena Quintero, )

        * gtk/gtkxembed.[ch]: Move various shared utilities
        for the XEMBED protocol eused by GtkPlug and GtkSocket
        here.

        * gtk/gtkxembed.[ch] gtkplug.c gtksocket.c: Implement
        a flag bit that is sent with focus mesages to indicate
        that the focus has wrapped around on the toplevel;
        use this bit to catch infinite loops when there is no
        focusable widget at ll in the entire toplevel.

        * tests/testsocket.c (child_read_watch): Remove an
        extraneous unref.

        * gtk/gtkplug.c gtk/gtksocket.c gtk/gtkxembed.h:
        Up XEMBED protocol version to 1, add logic for
        sending the right version in XEMBED_EMBEDDED_NOTIFY.

        * gtk/gtksocket.c (gtk_socket_add_window): Send
        the embedder window in the XEMBED_EMBEDDED_NOTIFY
        as the spec requires.
2003-08-25 21:14:20 +00:00
Owen Taylor
eee5fc14c2 Fix up CapsLock and NumLock handling for non-XKB. Add a special case hack
Mon Aug 25 16:15:41 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Fix up CapsLock and
        NumLock handling for non-XKB. Add a special case
        hack for NumLock on Sun servers. (Patch from
        Robert Basch, #115819)
2003-08-25 20:20:25 +00:00
Richard Allen
ff9cbaa98a *** empty log message *** 2003-08-25 13:02:30 +00:00
Owen Taylor
2094238a33 Fix some missing initializations of rc_file->directory.
Sun Aug 24 17:00:03 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c: Fix some missing initializations of
        rc_file->directory.
2003-08-24 21:01:54 +00:00
Owen Taylor
2da6e732ac Fix problem where rc_file->directory wasn't always getting set. (#120549,
Sat Aug 23 21:40:18 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c (gtk_rc_context_parse_one_file): Fix
        problem where rc_file->directory wasn't always getting
        set. (#120549, Luis Villa)
2003-08-24 02:31:13 +00:00
Andraz Tori
048c7d2076 Updated Slovenian translation 2003-08-23 17:45:39 +00:00
Metin Amiroff
870fcf659e Updated Azerbaijani translation.
2003-08-23  Metin Amiroff <metin@karegen.com>

	* az.po: Updated Azerbaijani translation.
2003-08-23 08:42:48 +00:00
Stanislav Visnovsky
0a8b3b9b9f Updated Slovak translation.
2003-08-22  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

        * sk.po: Updated Slovak translation.
2003-08-22 16:58:00 +00:00
Changwoo Ryu
50e7636b99 Updated Korean translation.
* ko.po: Updated Korean translation.
2003-08-22 13:47:27 +00:00
Samel Jn Gunnarsson
d821f519de Updated Icelandic translation and added "is" to ALL_LINGUAS.
2003-08-22  Samel Jn Gunnarsson  <sammi@techattack.nu>

	* is.po: Updated Icelandic translation and added
	"is" to ALL_LINGUAS.
2003-08-22 11:21:29 +00:00
Christian Rose
50083c8640 Added "ne" to ALL_LINGUAS. Added Nepali translation by Pawan Chitrakar
2003-08-22  Christian Rose  <menthos@menthos.com>

	* configure.in: Added "ne" to ALL_LINGUAS.
	* po/ne.po: Added Nepali translation by
	Pawan Chitrakar <pawan@nplinux.org>.
2003-08-22 11:09:47 +00:00
Owen Taylor
810d86396d Keep a list of current GtkRcFiles being parsed, not just the directories
Thu Aug 21 16:00:36 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c: Keep a list of current GtkRcFiles
        being parsed, not just the directories for those
        files. Use that to catch recursion. (Part of
        #114988)
2003-08-21 20:08:17 +00:00
Kristian Rietveld
fe2d7cb957 Fix option menu scrolling (#119821, Owen Taylor).
Thu Aug 21 21:27:45 2003  Kristian Rietveld  <kris@gtk.org>

	Fix option menu scrolling (#119821, Owen Taylor).

	* gtk/gtkmenu.c (gtk_menu_scroll_to): remove logic introduced
	by #80484 and the CLAMP,
	(get_menu_height): new function,
	(gtk_menu_real_move_scroll): sort of moved the CLAMP here to correct
	new_offset to handle page up/down right.
2003-08-21 19:37:09 +00:00
Owen Taylor
6fc502b1c0 Change the interpretation of consumed_modifiers so that it contains: -
Thu Aug 21 15:17:42 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Change the interpretation
        of consumed_modifiers so that it contains:
         - Modifiers combinations actually found in
           state.
         - Single modifier modifier combinations.
        But not multi-modifier combinations that aren't
        in event->state. Document. (#100439)
2003-08-21 19:23:54 +00:00
Kristian Rietveld
630ec8d2c7 Merge from HEAD.
Thu Aug 21 20:53:46 2003  Kristian Rietveld  <kris@gtk.org>

	Merge from HEAD.

	Slightly modified patch from Yann Rouillard to improve selection
	behavior with the mouse. Fixes #120187.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): only
	select/deselect items on the first button press of button 1,
	expand checks for row_activated to include triple clicks.
2003-08-21 19:06:45 +00:00
Richard Allen
0fd6188b1c *** empty log message *** 2003-08-21 13:31:42 +00:00
Kristian Rietveld
a16bbd60f7 always round approximate digit widths up, to avoid truncation, convert to
Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
	approximate digit widths up, to avoid truncation, convert to
	pango pixels when we have the full string width instead of converting
	the approx digit width to pango pixels, take inner border and
	interior focus into account correctly. (Fixes #116368, patch from
	Morten Welinder).
2003-08-20 23:44:16 +00:00
Noah Levitt
c567c77741 Don't look at the same directory twice (in simple cases). (#120342)
2003-08-20  Noah Levitt  <nlevitt@columbia.edu>

	* gtk/queryimmodules.c: Don't look at the same directory twice (in
	simple cases). (#120342)
2003-08-20 22:13:16 +00:00
Kristian Rietveld
23ee4993bc change the type of step to gdouble, since it gets it's data from a gdouble
Wed Aug 20 22:03:25 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkspinbutton.c (start_spinning): change the type of step
	to gdouble, since it gets it's data from a gdouble (Fixes #113547).
2003-08-20 20:18:30 +00:00
Vincent van Adrighem
d46d14b7b4 Dutch translation updated.
2003-08-20  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated.
2003-08-20 18:19:17 +00:00
Kjartan Maraas
0eeba3331a Update Norwegian translation.
2003-08-20  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Update Norwegian translation.
2003-08-20 11:06:35 +00:00
Dmitry Mastrukov
6731a077b4 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-08-20 09:38:37 +00:00
Owen Taylor
27173a3c33 Substantially rework the handling of status windows:
Mon Aug 18 17:19:12 2003  Owen Taylor  <otaylor@redhat.com>

        * modules/input/gtkimcontextxim.[ch]: Substantially
        rework the handling of status windows:

         - Store the current StatusWindow in the
           GtkIMContextXIM structure and vice-versa, so we
           don't have to hunt the window hierarchy on
           cleanup.
         - Use the Gtkidget hierarchy instead of/or as well
           as the GdkWindow hierarchy when finding the toplevel;
           this helps for things like GtkHandlebox
         - Watch GtkWidget::hierarchy_changed to catch
           changes in the toplevel without changes in the
           GdkWindow (reparenting)
         - Never create the GtkWindow for the status window
           unless we have text to display.
         - Various cleanups, add lots of comments.

        (#115077, much help from Takuro Ashie and Hidetoshi
        Tajima in tracking this down and figuring out a fix.)

        * modules/input/gtkimcontextxim.c (gtk_im_context_xim_focus_in):

        * modules/input/gtkimcontextxim.c: Track the current
        screen for each toplevel so that we show the status
        window on the right screen. (#116340, James Su)

        * modules/input/gtkimcontextxim.c: If create a new IC
        when we currently have the focus, call XSetICFocus()
        on it.

        * modules/input/gtkimcontextxim.c (get_im): Fix bug
        with multiple open screens.
2003-08-19 21:17:31 +00:00
Owen Taylor
8ae6e8e755 Replace client_window field with 'priv' pointer, retaining binary
Tue Aug 19 14:37:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimmulticontext.[ch] (struct _GtkIMMulticontext):
        Replace client_window field with 'priv' pointer,
        retaining binary compatibility.

        * gtk/gtkimmulticontext.c (gtk_im_multicontext_set_slave):
        save use_preedit/cursor_location/focus status and set
        up the new slave appropriately. (#118651, Botond Botyanszki)
2003-08-19 19:24:50 +00:00
Owen Taylor
214a6e2cc4 Don't use impl->position_info.clip_rect for toplevels. (#107068, reported
Tue Aug 19 13:58:50 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkgeometry-x11.c (gdk_window_scroll):
        Don't use impl->position_info.clip_rect for toplevels.
        (#107068, reported by Thomas Mirlacher)
2003-08-19 18:32:42 +00:00
Richard Allen
b79e367d73 *** empty log message *** 2003-08-19 15:38:41 +00:00
Richard Allen
c996a1fe24 Updating is.po 2003-08-19 13:55:50 +00:00
Miloslav Trmac
ee96e9c5d8 Update Czech translation 2003-08-19 12:55:38 +00:00
Dafydd Harries
d8cefed261 Updated Welsh translation. 2003-08-19 05:08:09 +00:00
Kwok-Koon Cheung
86936714ce Updated traditional Chinese translation.
* zh_TW.po: Updated traditional Chinese translation.
2003-08-18 22:38:37 +00:00
Owen Taylor
3e74e28178 Add a fallback for unaligned source data for FORMAT_ARGB_MASK. (#117217)
Mon Aug 18 11:48:51 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (convert_to_format):
        Add a fallback for unaligned source data for
        FORMAT_ARGB_MASK. (#117217)
2003-08-18 16:02:39 +00:00
Owen Taylor
f17bdf3c87 Rework handling of REBUILD_PNGS, so that we also don't try to REBUILD_PNGS
Mon Aug 18 10:51:57 2003  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Rework handling of REBUILD_PNGS,
        so that we also don't try to REBUILD_PNGS when
        cross-compiling and there is no gdk-pixbuf-csource.
        But give an error if gtk/stock-icons/gtkstockpixbufs.h
        is not in the source tree. (Note that REBUILDS_PNG
        was set backwards before, which is why you always
        had to manually recreate gtkstockpixbufs.h!)

        * gtk/stock-icons/Makefile.am: Don't make
        gtkstockpixbufs.h depend on newly built gdk-pixbuf-csource
        when cross-compiling. (Was already in HEAD branch)
2003-08-18 15:21:11 +00:00
Owen Taylor
c7a71edba6 Add the correct alignment magic for Sun compiler and for GCC to get the
Mon Aug 18 10:25:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixdata.c (gdk_pixdata_to_csource): Add the correct
        alignment magic for Sun compiler and for GCC to get
        the strings aligned. (Patch from Brian Cameron, #117217)
2003-08-18 15:17:28 +00:00
Owen Taylor
5e575f2326 Add a missing gtk/ in the path to libgtk.la. (#120080, Benedikt Spranger)
Mon Aug 18 10:19:55 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk+-2.0-uninstalled.pc.in: Add a missing gtk/ in the
        path to libgtk.la. (#120080, Benedikt Spranger)
2003-08-18 14:23:24 +00:00
Richard Allen
ae1ecbdf7f *** empty log message *** 2003-08-18 12:58:17 +00:00
Metin Amiroff
2e214dacdf Updated Azerbaijani translation.
2003-08-18  Metin Amiroff <metin@karegen.com>

	* az.po: Updated Azerbaijani translation.
2003-08-18 10:11:09 +00:00
Sanlig Badral
dc2d6f8123 Updated MN translation 2003-08-17 20:41:46 +00:00
Evandro Fernandes Giovanini
c64d6ea25e Updated Brazilian Portuguese translation.
2003-08-17  Evandro Fernandes Giovanini  <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation.
2003-08-17 04:08:17 +00:00
Duarte Loreto
df3ba742ae Updated Portuguese translation.
2003-08-16  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Updated Portuguese translation.
2003-08-16 22:27:32 +00:00
Pauli Virtanen
19429f6089 Updated Finnish translation.
2003-08-16  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2003-08-16 16:52:06 +00:00
Owen Taylor
bceb2d7556 Make the list of default languages more comprehensive. (Suggestion of Fco.
Sat Aug 16 10:34:49 2003  Owen Taylor  <otaylor@redhat.com>

        * modules/input/imcedilla.c: Make the list of default
        languages more comprehensive. (Suggestion of
        Fco. Javier F. Serrador)

Sat Aug  9 12:47:11 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_arg_context_parse): Fix broken
        parentheses when skipping args.
2003-08-16 14:41:09 +00:00
Danilo Šegan
0dd6cabee7 Updated Belarusian translation by Ales Nyakhaychyk <nab@mail.by>.
2003-08-16  Danilo Šegan  <dsegan@gmx.net>

	* be.po: Updated Belarusian translation by Ales Nyakhaychyk
	<nab@mail.by>.
2003-08-16 09:47:55 +00:00
Christophe Merlet
9483fb4580 Updated French translation. 2003-08-16 07:35:12 +00:00
Danilo Šegan
7b60e68252 Updated Serbian translation.
2003-08-16  Danilo Šegan  <dsegan@gmx.net>

	* sr.po, sr@Latn.po: Updated Serbian translation.
2003-08-15 23:50:48 +00:00
Artur Flinta
d26d035c09 Updated Polish translation.
2003-08-16  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation.
2003-08-15 22:47:06 +00:00
Christian Rose
f57ecb8e58 Updated Swedish translation.
2003-08-16  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2003-08-15 22:35:37 +00:00
Owen Taylor
fceee37166 Improve Cedilla handling - based on a patch from Gustavo De Nardin,
Fri Aug 15 16:54:39 2003  Owen Taylor  <otaylor@redhat.com>

        Improve Cedilla handling - based on a patch from Gustavo
        De Nardin, #111334

        * modules/input/imcedilla.c po/POTFILES.in: Input method that
        produces C_WITH_CEDILLA rather than C_WITH_ACUTE for
        dead_acute+c combinations. Make this the default for
        fr and pt.

        * gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave):
        Use LC_CTYPE instead of LC_MESSAGES to pick the default
        input method.

Fri Aug 15 17:00:19 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontextsimple.c: Fix missing compose sequence
        for Multi_key+c+apostrophe.
2003-08-15 21:29:52 +00:00
Kristian Rietveld
f25de682d4 stop editing on vertical scrolling. (#108035, reported by Tim Janik).
Fri Aug 15 21:57:34 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_adjustment_changed): stop editing
	on vertical scrolling. (#108035, reported by Tim Janik).
2003-08-15 20:05:18 +00:00
Kristian Rietveld
7c5c24853f fix off-by-one error. (#109292 continued, patch from Yann Rouillard).
Fri Aug 15 20:06:42 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_model_sort_row_changed),
	(gtk_tree_model_sort_level_find_insert),
	(gtk_tree_model_sort_insert_value): fix off-by-one error.
	(#109292 continued, patch from Yann Rouillard).
2003-08-15 18:12:54 +00:00
Kristian Rietveld
46d888d5eb Also support the up, down, left, right, home, end, page up and page down
Fri Aug 15 19:04:00 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_class_init),
	(gtk_tree_view_key_press), (gtk_tree_view_search_key_press_event):
	Also support the up, down, left, right, home, end, page up and
	page down keys on the numpad. (#119419, reported by Alex Larsson).
2003-08-15 17:09:43 +00:00
Owen Taylor
f7be88be29 Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):
Fri Aug 15 12:34:04 2003  Owen Taylor  <otaylor@redhat.com>

        Fixes for X/Cygwin builds of GTK+ (#107623, Masahiro Sakai):

        * configure.in (GDK_DEP_LIBS_FOR_X): Make sure that
        we link libgtk against X explicitely, since we
        make GTK+ calls for plug/socket.

        * gtk/queryimmodules.c: Use USE_LA_MODULES and
        G_MODULE_SUFFIX here.

        * gdk/x11/gdkdrawable-x11.c (gdk_x11_draw_image): Protect
        XShmPutImage with #ifdef USE_SHM.
2003-08-15 16:58:18 +00:00
Owen Taylor
c7c5b16de9 Don't reposition the cursor when we aren't trying to complete. (Fixes
Thu Aug 14 18:25:39 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (gtk_file_selection_populate):
        Don't reposition the cursor when we aren't trying
        to complete. (Fixes problems with selection on
        startup, #108433, reported by Mark Finlay.)

        * gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
        code that tried to position the cursor after the common
        prefix when there was one, it wasn't working, and
        would be hard to fix. Just always put the cursor
        at the end when completing.
2003-08-14 22:30:36 +00:00
Owen Taylor
36b9b4f9b6 If getting the current directory fails because of encoding conversion
Thu Aug 14 17:58:23 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (get_current_dir_utf8): If getting
        the current directory fails because of encoding
        conversion problems, walk up textually to parent
        directories until we can convert. (#113627)
2003-08-14 22:00:39 +00:00
Richard Allen
da92bd8a08 *** empty log message *** 2003-08-14 20:01:59 +00:00
Richard Allen
b9f11a98c2 Added Icelandic translation. Much work remains 2003-08-14 19:22:21 +00:00
Matthias Clasen
1ac08122ff Improve doc comment wording. (#119754, Doug Quale)
2003-08-14  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixdata.c (gdk_pixdata_to_csource): Improve doc comment
	wording.  (#119754, Doug Quale)
2003-08-13 22:15:20 +00:00
Owen Taylor
accfa25c03 Remove usage of menu_shell->ignore leave which was to deal with stray
Wed Aug 13 17:01:49 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.[ch] (gtk_menu_shell_enter_notify):
        Remove usage of menu_shell->ignore leave which was
        to deal with stray events we no longer get because
        we do grabbing differently. Comment it as unused in
        the header. (#115837, Keith Bissett)
2003-08-13 21:14:27 +00:00
Owen Taylor
2773340992 Fix some places that weren't properly Xinerama-ified.
Wed Aug 13 16:32:43 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenu.c (gtk_menu_position, gtk_menu_window_size_request):
        Fix some places that weren't properly Xinerama-ified.

        * gtk/gtkmenu.c: Fix problem with windows that scroll
        at the top of the screen.
2003-08-13 20:45:59 +00:00
Owen Taylor
e1ad4246e6 connect_after() to key-press-event on the entry, so input methods get
Wed Aug 13 11:34:53 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcombo.c (gtk_combo_init): connect_after() to
        key-press-event on the entry, so input methods get access to
        key presses before GtkCombo customization.
        (#115451, Botond Botyanszki)
2003-08-13 15:41:03 +00:00
Owen Taylor
629f2635f0 Protect against reentrancy from ::focus-out handlers. (#118129, Felipe
Tue Aug 12 15:00:15 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_real_set_focus): Protect
        against reentrancy from ::focus-out handlers.
        (#118129, Felipe Heidrich)
2003-08-12 19:15:34 +00:00
Owen Taylor
b8946315a6 Remove GDK_LOCK_MASK before calling gdk_keymap_translate_keyboard_state so
Tue Aug 12 14:27:42 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Remove
        GDK_LOCK_MASK before calling
        gdk_keymap_translate_keyboard_state so bindings
        and accelerators are independent of the Caps-lock
        key. (#115384, reported by Toni Willberg)
2003-08-12 18:38:31 +00:00
Owen Taylor
eef0d8f74e Add missing break statements (#119494, Soeren Sandmann)
Mon Aug 11 12:07:14 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (get_real_window): Add missing
        break statements (#119494, Soeren Sandmann)
2003-08-11 16:08:21 +00:00
Owen Taylor
0a7b22a072 Mark parent public as well; it's extensively accessed in existing code, so
Mon Aug 11 11:10:07 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.h: Mark parent public as well; it's
        extensively accessed in existing code, so there is
        no advantage in making people use get_parent().
        (Tweak to #119463 fix)
2003-08-11 15:18:16 +00:00
Matthias Clasen
1dcb5791cd Mark some members as public. (#119463)
2003-08-10  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwidget.h (struct _GtkWidget): Mark some members as public.  (#119463)
2003-08-10 22:03:42 +00:00
Wang Jian
3c837134fc *** empty log message *** 2003-08-09 11:24:08 +00:00
Noah Levitt
33555599be Elaborate a bit more in the docs on GdkFilterFunc and GdkFilterReturn.
2003-08-09  Noah Levitt  <nlevitt@columbia.edu>

	* gdk/gdkevents.h:
	* docs/reference/gdk/tmpl/windows.sgml: Elaborate a bit more in the
	docs on GdkFilterFunc and GdkFilterReturn.
2003-08-09 06:24:22 +00:00
Matthias Clasen
66ec9b11f9 Fix a segfault. (#115284, Jan Kratochvil)
2003-08-08  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkregion-generic.c (gdk_region_spans_intersect_foreach): Fix a segfault.  (#115284,
	Jan Kratochvil)
2003-08-08 21:40:00 +00:00
Matthias Clasen
ef280dd878 Add indices.
2003-08-08  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtk-docs.sgml:
	* gdk-pixbuf/gdk-pixbuf.sgml:
	* gdk/gdk-docs.sgml: Add indices.

	* gdk-pixbuf/gdk-pixbuf-sections.txt: Add GdkPixbufLoaderClass.

	* gdk/gdk-sections.txt: Add GdkScreenClass and GdkDisplayClass.
2003-08-08 20:41:20 +00:00
Tor Lillqvist
4ca00eb0be Print also the root coordinates for events that have such. Print
2003-08-08  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (print_event): Print also the root
	coordinates for events that have such. Print coordinates for enter
	and leave events.

	(gdk_event_translate): Don't use event uninitialixed in the
	return_exposes branch of the WM_PAINT handler.

	* gdk/win32/gdkwindow-win32.c (gdk_window_new,
	_gdk_windowing_window_get_pointer, _gdk_windowing_window_at_pointer):
	Must offset top-level window coordinates here, too.
2003-08-08 07:12:13 +00:00
Tor Lillqvist
ae4dda7ed5 Fix previous ChangeLog entry. 2003-08-07 22:15:23 +00:00
Tor Lillqvist
7e3ec40e11 gdk/win32/gdkinput-win32.h Drop the GdkEvent* parameter, it wasn't used.
2003-08-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkinput-win32.h
	* gdk/win32/gdkinput-win32.c (_gdk_input_configure_event,
	_gdk_input_enter_event): Drop the GdkEvent* parameter, it wasn't
	used.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Adapt caller
	accordingly, in fact an uninitialised variable was dereferenced.


	[Win32] Add support for multiple monitors.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New global variables for
	multiple-monitor info: _gdk_num_monitors, _gdk_monitors, and
	_gdk_offset_x and _gdk_offset_y.

	* gdk/win32/gdkdisplay-win32.c (count_monitor, enum_monitor): New
	functions, enumeration functions passed to
	EnumDisplayMonitors().

	(gdk_display_open): If the EnumDisplayMonitors() and
	GetMonitorInfo() API is present (on Win98, Win2000 and newer), use
	if to find out monitor info.

	Calculate the offset between Win32 coordinates (relative to the
	primary monitor's origin (and thus negative on monitors to the
	left of or above it), and GDK's
	(visible coordinates should be non-negative).

	* gdk/win32/gdkscreen-win32 (gdk_screen_get_n_monitors,
	gdk_screen_get_monitor_geometry): Use information collected above.

	(gdk_window_move, gdk_window_move_resize_window_get_geometry): Subtract
	_gdk_offset_{x,y} from GDK root window coordinates.

	(gdk_window_get_geometry, gdk_window_get_origin,
	gdk_window_get_frame_extents): For top-level windows, add
	_gdk_offset_{x,y} to GDK root window coordinates

	Still need to handle multiple monitors in
	gdk_window_fullscreen(). Probably should make the window
	fullscreen on the monitor where the cursor is?

	* gdk/win32/gdkevents-win32.c: Add _gdk_offset_{x,y} to all GDK
	root window coordinates in GdkEvents.


	[Win32] Fix geometry hint handling. Add support for resize
	increment and base size, and aspect ratio geometry hints. The
	"gridded geometry" test in testgtk now works beautifully.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Turns out this function shouldn't actually ever modify the
	window's size, just store the hints. (Old code kept for a while
	inside #if 0.)

	(gdk_window_set_hints): Remove presumably broken code that handles
	the position hints, this function is obsolete anyway.

	* gdk/win32/gdkevents-win32.c: Drop the current_{x,y}_root
	variables, not used.

	(adjust_drag): New function, used to implement resize increment
	hints.

	(gdk_event_translate): Handle WM_SIZING, implement resize
	increment and base size, and aspect ratio geometry hints here. The
	WM_GETMINMAXINFO handler takes care of the minimum and maximum
	size hints as before. Fix the WM_GETMINMAXINFO handler to take
	into account window decorations. No need to modify the
	ptMaxPosition and ptMaxTrackSize fields in the MINMAXINFO struct,
	the defaults are fine.

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkwindow-win32.c (_gdk_win32_adjust_client_rect,
	_gdk_win32_get_adjusted_client_rect): New helper functions.


	Merge from HEAD: 2003-08-07 Hans Breuer <hans@breuer.org>

	* gdk/win32/gdkevents-win32.c : finally use TrackMouseEvent
	(only if the new window not known to Gdk) to get proper
	leave notification, and get rid of the wrong placed
	tooltips, bug #102283

	(gdk_event_translate) : small code reordering to not get
	GDK_MOTION_NOTIFY for still mouse and get back tooltips on
	menus, bug #117367
2003-08-07 21:59:34 +00:00
Owen Taylor
1b50bc7a31 Fix a bug where on theme change, resize/redraw wasn't properly getting
Thu Aug  7 16:49:29 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_set_style_internal):
        Fix a bug where on theme change, resize/redraw wasn't
        properly getting queued on toplevel windows. (#116346,
        Rajkumar Siva)

        * gtk/gtkwidget.c (gtk_widget_invalidate_widget_windows):
        Fix bug where wrong coordinates were used for toplevel
        window.
2003-08-07 21:03:10 +00:00
Matthias Clasen
d8004f46e5 Use g_strtod() to cope with C libraries with crippled locale support.
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (gtk_spin_button_default_input): Use g_strtod() to cope with C libraries with
	crippled locale support.  (#115293)
2003-08-07 18:58:08 +00:00
Pablo Gonzalo del Campo
dbbdd05829 Revision of Spanish translation by Francisco Javier F. Serrador
2003-08-07  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Revision of Spanish translation by
                 Francisco Javier F. Serrador <serrador@arrakis.es>.
2003-08-07 13:32:40 +00:00
Tor Lillqvist
b6759d3c65 2003-08-07 Tor Lillqvist <tml@iki.fi
* gdk/gdk.def
	* gdk/win32/gdkfont-win32.c (gdk_fontset_load_for_display): Add
	missing function, trivially implement.

	Merge from HEAD: 2003-08-06  Hans Breuer <hans@breuer.org>

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new) :
	initialize bits to 0 (probably default on NT)

	* gdk/win32/gdkwindow-win32.c(gdk_window_set_modal_hint) :
	set HWND_NOTOPMOST for modal==FALSE, fixes bug #118435

	* gdk/win32/gdkwindow-win32.c : implement gdk_window_[un]fullscreen
	(gdk_window_{move,resize,move_rezize})) : noop if FULLSCREEN

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon) :
	against all expectations it is basically ony a call with WM_SETICON
	needed (the visual effect is there, though colors or mask are
	still somewhat wrong).

	* gdk/win32/gdkwindow-win32.h : place to store the HICON

	* gdk/win32/gdkdrawabke.win32.c : readded the conditional end
	pixel drawing as it was fixed at 1999-08-23
2003-08-07 03:35:23 +00:00
Matthias Clasen
4e5aa197dd Don't cut descenders when rendering. (#118646, Charles Kerr)
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkctree.c (draw_row): Don't cut descenders when rendering.  (#118646, Charles Kerr)
2003-08-06 22:57:09 +00:00
Matthias Clasen
de559c3738 Add bug number. 2003-08-05 18:26:51 +00:00
Owen Taylor
58008637f7 Add a missing break. (#119156, Callum McKenzie)
Tue Aug  5 10:07:08 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmessagedialog.c (gtk_message_dialog_get_property):
        Add a missing break. (#119156, Callum McKenzie)
2003-08-05 14:08:00 +00:00
Owen Taylor
48dc9f70e6 Fix problem where use_xshm was getting set wrong if MIT_SHM wasn't found.
Mon Aug  4 14:53:46 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init):
        Fix problem where use_xshm was getting set wrong if
        MIT_SHM wasn't found. (George Lebel)
2003-08-04 18:58:35 +00:00
Pauli Virtanen
6050d92c52 Fix duplicate mnemonics in GtkFontSelection.
2003-08-04  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Fix duplicate mnemonics in GtkFontSelection.
2003-08-04 17:24:59 +00:00
Tor Lillqvist
eab1d2cc80 2003-08-04 Tor Lillqvist <tml@iki.fi
* gdk/win32/gdkevents-win32.c (apply_filters): Fix braino:
	actually use the passed-in filter list. The function also needs a
	GdkWindow parameter, as filter functions expect
	GdkEvent::any.window to be valid. (#119034, Hans Breuer)
2003-08-04 15:23:38 +00:00
Matthias Clasen
e44247efc3 Clarify misleading explanation of rowstride. (#119000)
2003-08-03  Matthias Clasen  <maclas@gmx.de>

	* gdk-pixbuf.c (gdk_pixbuf_get_rowstride):
	* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Clarify misleading explanation of
	rowstride.  (#119000)
2003-08-03 21:51:43 +00:00
Matthias Clasen
31a2c5e719 Improve wording of the docs, avoid the term "virtual screen". (#119030,
2003-08-03  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkscreen-x11.c (gdk_screen_get_n_monitors):
	(gdk_screen_get_monitor_geometry): Improve wording of the docs, avoid the
	term "virtual screen".  (#119030, Tor Lillquist)
2003-08-03 20:51:40 +00:00
Christophe Merlet
a494c4c9aa Updated French translation. 2003-08-03 08:56:53 +00:00
Matthias Clasen
0a1b69bdc3 Accept drops with the wrong format, since the KDE color chooser
2003-08-02  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (color_sample_drop_handle)
	(palette_drop_handle): Accept drops with the
	wrong format, since the KDE color chooser incorrectly drops application/x-color with
	format 8.
2003-08-02 09:22:54 +00:00
Tor Lillqvist
392d3fc73c Fix gdk/win32 window geometry handling again. The window position in a
2003-08-02  Tor Lillqvist  <tml@iki.fi>

	Fix gdk/win32 window geometry handling again. The window position
	in a GDK_CONFIGURE event should be that of the client area, not of
	the window decorations. (I was confused by the term "window
	border" in X11. It does *not* mean the window manager
	decorations. There are no X11-style window borders in Win32.)
	Also, this time do take the geometry hints into account
	appropriately when moving windows. Now testgtk's gravity test's
	move buttons work OK. There are stil problems with taking gravity
	into account when showing a hidden window.

	* gdk/win32/gdkwindow-win32.h: Keep a whole GdkGeometry as hints
	instead of separate fields.

	* gdk/win32/gdkevents-win32.c (handle_configure_event): Don't
	adjust for decorations.

	* gdk/win32/gdkwindow-win32.c (get_outer_rect,
	adjust_for_gravity_hints): New functions.
	(gdk_window_move, gdk_window_resize, gdk_window_move_resize): Use
	above functions, take geometry hints into account.
	(gdk_window_set_geometry_hints): Size hints specicy client area,
	not including decorations.
2003-08-02 01:54:44 +00:00
Owen Taylor
3b2ead388f Always return an absolute path (#115590), fix a problem where you could
Fri Aug  1 17:10:22 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (cmpl_completion_fullname): Always
        return an absolute path (#115590), fix a problem where
        you could crash the file selector with a looong name
        by returning a newly allocated buffer
2003-08-01 21:21:25 +00:00
Owen Taylor
16e5a5bf38 Fix obvious reallocation bug in rarely or never hit code path (#118071,
Fri Aug  1 16:44:51 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (update_cmpl): Fix obvious reallocation
        bug in rarely or never hit code path (#118071,
        Tor Lillqvist)
2003-08-01 20:46:36 +00:00
Owen Taylor
52f1b7d8da If the check for missing depths, try actually creating pixmaps of the
Fri Aug  1 16:30:13 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdrawable-x11.c (_gdk_x11_have_render):
        If the check for missing depths, try actually creating pixmaps
        of the depths to deal with Xinerama not reporting
        all the depths it should. (#115822)
2003-08-01 20:37:45 +00:00
Owen Taylor
1366647ef5 Patch from Denis Mikhalkin to forward KeyRelease events as well as
Fri Aug  1 15:33:59 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksocket.c: Patch from Denis Mikhalkin to
        forward KeyRelease events as well as KeyPress events.
        (#115597)
2003-08-01 19:51:30 +00:00
Owen Taylor
e5a631523d g_set_prgname("<unknown>") if argc is 0 as well, instead of leaving it
Fri Aug  1 15:06:25 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_parse_args): g_set_prgname("<unknown>")
        if argc is 0 as well, instead of leaving it unset.
        (#116023, Michael Meeks)
2003-08-01 19:28:10 +00:00
Tor Lillqvist
53efbc7dcf Fix for #108007, #112402, #117042: There was confusion in gdk/win32 at
2003-07-29  Tor Lillqvist  <tml@iki.fi>

	Fix for #108007, #112402, #117042: There was confusion in
	gdk/win32 at various places whether a window position refers to
	the decoration position or the client area position. Also whether
	window size includes decorations or not.

	The correct interpretation apparently is that in GDK (like in
	X11), a top-level window position means the decoration's position,
	but size means the window's inner size (client area size). In the
	Win32 API, the window size usually includes the decorations,
	though.

	* gdk/win32/gdkevents-win32.c (decode_key_lparam): Move inside
	#ifdef G_ENABLE_DEBUG.
	(handle_configure_event): New function, generates GDK_CONFIGURE
	events from WM_SIZE and WM_MOVE messages. Even if no event is
	generated because of the event mask, still set the private
	position and size fields. Calculate position and size correctly.
	(gdk_event_translate): Call handle_configure_event().

	* gdk/win32/gdkgeometry-win32.c: Cosmetics.

	* gdk/win32/gdkwindow-win32.c: Use GDI_CALL() and API_CALL()
	macros. Cosmetic debugging output changes.
	(SafeAdjustWindowRectEx): Remove. If an application wants to
	locate a window outside of the screen, it's not GDK's business to
	prevent it. And anyway, with multiple monitors, negative
	coordinates are perfectly normal.
	(gdk_window_new): Adjust the window size for decorations after
	_gdk_window_init_position() has done its job. (But the big window
	code currently is presumably broken on Win32 anyway.)
	(gdk_window_move): The position passed in is supposed to be that
	of the window border, so don't need to adjust for decorations.
	(gdk_window_resize, gdk_window_move_resize): Simplify somewhat.
2003-07-29 23:28:19 +00:00
Christian Neumair
6320c153b9 Updated German translation. 2003-07-29 15:18:31 +00:00
Sven Neumann
091b2f3e27 Resurrected documentation that got lost when the window parameter was
2003-07-29  Sven Neumann  <sven@gimp.org>

	* gdk/tmpl/pixmaps.sgml: Resurrected documentation that got lost
	when the window parameter was renamed to drawable.
2003-07-29 09:08:47 +00:00
Christian Neumair
3c27d7123f Updated German translation. Thanks to Bernhard Walle for reporting a
2003-07-29  Christian Neumair  <chris@gnome-de.org>

	* de.po: Updated German translation. Thanks to Bernhard Walle for
	reporting a stylistic issue (#118488).
2003-07-29 08:11:35 +00:00
Tor Lillqvist
e62ab37a57 On Win9x, the keyboard state returned by GetKeyboardState() doesn't
2003-07-27  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (build_key_event_state): On Win9x,
	the keyboard state returned by GetKeyboardState() doesn't
	distinguish between the left and right Control and Alt keys. Thus
	we cannot detect AltGr (which is supposed to be left Control +
	right Alt) the same way as on NT-based systems, but have to accept
	either Control + either Alt as AltGr.
2003-07-27 21:51:01 +00:00
Matthias Clasen
bd4752f2e2 Fix function name in warning message. (#118156, Tim-Philipp Müller)
2003-07-27  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach): Fix function name in
	warning message.  (#118156, Tim-Philipp Müller)
2003-07-27 21:43:19 +00:00
Matthias Clasen
293baedf04 is-expander and is-expanded are boolean properties, not ints. (#118359,
2003-07-27  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_get_property): is-expander and is-expanded are
	boolean properties, not ints.  (#118359, Josh Parsons)
2003-07-27 21:35:50 +00:00
Tor Lillqvist
9388838e76 gdk/win32/gdkprivate-win32.h New flags _gdk_input_locale_is_ime and
2003-07-25  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c: New flags _gdk_input_locale_is_ime
	and _gdk_keyboard_has_altgr.

	* gdk/win32/gdkevents-win32.c: Lots of changes. Most important
	ones detailled here.

	Code that has been ifdeffed out for a long time removed. Remove
	some really old doc comments that were left behind for some public
	functions, the official ones are in the X11 backend anyway. Change
	GDK_WINDOW_OBJECT() calls to GdkWindowObject casts. Reformat
	multi-line boolean expressions to have the operators at ends of
	lines.

	As mouse capture with SetCapture() indeed seems to work OK, no
	need to have the correspoinding macro USE_SETCAPTURE and ifdefs.

	Ifdef out the gdk-ping-msg stuff. I don't remember why it was
	needed at some time, and things seem to work fine now without
	(knock on wood).

	Ifdef out the search for some Latin locale keyboard layout being
	loaded. Not used currently, but might be needed after all, if we
	decide that we want to be able to generate ASCII control character
	events with a non-Latin keyboard.

	(assign_object): New helper function, handles the g_object_ref()
	and unref() calls when assigning GObject pointers.

	(generate_crossing_events): Also generate the GDK_NOTIFY_INTERIOR
	enter event when the pointer has moved to an ancestor window. Was
	left out by mistake.

	(gdk_window_is_ancestor): Renamed from gdk_window_is_child().

	(gdk_pointer_grab, gdk_pointer_ungrab): Implement the confine_to
	functionality, using ClipCursor().

	(find_window_for_mouse_event): Splice part of code into new
	function find_real_window_for_grabbed_mouse_event().

	(fixup_event, append_event, apply_filters): New functions, code
	refactored out from elsewhere.

	(synthesize_enter_or_leave_event, synthesize_leave_event,
	synthesize_enter_event,
	synthesize_leave_events,synthesize_enter_events): Also take a
	GdkCrossingMode parameter, in preparation to generating
	GDK_CROSSING_GRAB and GDK_CROSSING_UNGRAB events.

	(fixup_event, append_event, fill_key_event_string): New functions,
	code refactoring.

	(vk_from_char, build_keypress_event, build_keyrelease_event):
	Removed as part of dropping WM_CHAR handling.

	(build_key_event_state,gdk_event_translate): Call
	GetKeyboardState(), once, for each keyboard message, instead of
	several calls to GetKeyState() here and there.

	(gdk_event_translate): Fix bugs #104516, #104662, #115902. While
	at it, do some major refactoring, and some fixes for potential
	problems noticed while going through the code.

	Don't handle WM_CHAR at all. Only handle WM_KEYDOWN and
	WM_KEYUP. Don't need the state variables related to whether to
	wait for WM_CHAR or not, and whether the current key is
	AltGr. Remove lots of complexity. Thus don't need the
	use_ime_composition flag.

	Not handling WM_CHAR means dead key handling will have to be taken
	care of by GTK, but that seems to work fine, so no worry.

	Another side-effect is that Alt+keypad digits don't work any
	longer, but it's better to learn to use GTK's ISO14755 support is
	anyway.

	Be more careful in checking whether AltGr is involved. Only
	attempt to handle it if the keyboard actually has it. And
	explicitly check for *left* Control plus *right* Alt being
	pressed. Still, allow (left) Alt and/or (right) Control with AltGr
	chars.

	Handle keys using similar code as in the X11 backend. As we have
	built a keymap in gdkkeys-win32.c anyway, use it by calling
	gdk_keymap_translate_keyboard_state() to look up the keysym from
	the virtual key code and keyboard state. Build the key event
	string in exactly the same way as the X11 backend.

	If an IME is being used, don't generate GDK events for keys
	between receiving WM_IME_STARTCOMPOSITION and
	WM_IME_ENDCOMPOSITION, as those keys are for the IME.

	For WM_IME_COMPOSITION, handle all the Unicode chars returned from
	the IME, not just the first one.

	gdk_event_translate() is still quite complex, could split the
	message handler cases out into separate functions.

	On mouse events, when the mouse is grabbed, use
	find_real_window_for_grabbed_mouse_event() in order to be able to
	generate correct crossing events.

	No longer take a pre-allocated GdkEvent as parameter. Instead,
	allocate events as needed and append them to the queue. (This is
	different from how gdk_event_translate() in the X11 backend
	works.) This change made the code much clearer, especially in the
	cases where we have to generate several GDK events for one Windows
	message.  Return FALSE if DefWindowProc() should be called, TRUE
	if not. If DefWindowProc() should not be called, also return the
	value to be returned from the window procedure.

	(Previously, the interaction with gdk_event_translate()'s caller
	was much more complex, when we had to indicate whether the
	already-queued event should be left in the queue or removed, and
	in addition also had to indicate whether to call DefWindowProc()
	or not, and what value to return from the window procedure if
	not.)

	Don't use a separate "private" variable required to be pointing to
	the GdkWindowObject of the "window" variable at all times. Just
	use casts, even if looks a bit uglier.

	Notice destroyed windows as early as possible, and break out of
	the messsage switch.

	Use _gdk_pointer_root as current_window when the pointer is
	outside GDK's top-level windows.

	On WM_INPUTLANGCHANGE, set _gdk_input_locale_is_ime as
	appropriate, based on ImmIsIME().

	(gdk_event_translate, gdk_event_send_client_message_for_display,
	gdk_screen_broadcast_client_message): Implement client messages.
	Use a registered Windows message to pass GDK client messages. Note
	that the amount of user data is restricted to four bytes, as it is
	carried in the LPARAM. (The WPARAM is used for the message type
	"atom".)

	(real_window_procedure): Adapt for new gdk_event_translate()
	interface.

	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Set
	_gdk_input_locale_is_ime initially.

	* gdk/win32/gdkwindow-win32.c: Use g_object_ref()/unref() instead
	of g_colormap_ref()/unref().

	(gdk_window_new): Made code a bit more like the X11 one, pretend
	to handle screens (although we just have one for now).

	* gdk/x11/gdkevents-x11.c
	(gdk_event_send_client_message_for_display,
	gdk_screen_broadcast_client_message): Document the user data
	limitation on Win32.

	* gdk/win32/gdkevents-win32.c (print_event): More complete enter
	and leave notify detail output.

	* gdk/win32/gdkkeys-win32.c (update_keymap): Make dead keys
	visible to GDK and GTK. Store the corresponding GDK_dead_* keysym
	for those, so that the GtkIMContextCimple compose tables will
	work. Deduce if the keyboard layout has the AltGr key, and set the
	above flag accordingly.
2003-07-26 01:43:35 +00:00
Matthias Clasen
a6d3979dcd Mention Xnest as a way to debug GTK+ apps.
* docs/faq/gtk-faq.sgml: Mention Xnest as a way to debug GTK+ apps.
2003-07-23 19:04:12 +00:00
Pablo Saratxaga
a2276ce34a fixed syntax error 2003-07-23 13:12:13 +00:00
Matthias Clasen
8e031aa1b1 Fix example. (#117972, Akira Tagoh)
2003-07-21  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtktreemodel.sgml: Fix example.  (#117972, Akira Tagoh)
2003-07-21 21:41:01 +00:00
Matthias Clasen
2feefda667 It is GTK_DEST_DEFAULT_DROP, not GTK_DRAG_DEFAULT_DROP. (#117917,
2003-07-21  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtkdnd.sgml: It is GTK_DEST_DEFAULT_DROP, not GTK_DRAG_DEFAULT_DROP. (#117917,
	Tim-Philipp Müller)
2003-07-21 21:37:48 +00:00
Christophe Merlet
dcce877c0c Updated French translation. 2003-07-20 17:54:15 +00:00
Matthias Clasen
f44d05681e Split correction into multiple pieces if no single weight is large enough
2003-07-18  Matthias Clasen  <maclas@gmx.de>

	* pixops/pixops.c (correct_total): Split correction into multiple pieces if no single weight is large
	enough to apply the unsplit correction.  (#117431, problem reported by Tomas Ögren)
2003-07-17 22:46:48 +00:00
Kristian Rietveld
646dc07acc Fixes issues pointed out by Morten Welinder in #115140.
Thu Jul 17 19:24:51 2003  Kristian Rietveld  <kris@gtk.org>

	Fixes issues pointed out by Morten Welinder in #115140.

	* gtk/gtktreeview.c (gtk_tree_view_size_request): fix comment,
	(do_validate_rows): update validated_area with a logic OR instead
	of a bitwise OR,
	(validate_rows_handler): make the if statement match the one in
	validate_rows(), so we don't leak the timeout.
2003-07-17 17:30:44 +00:00
Kristian Rietveld
eea77710d0 the treeview should only grab focus back if the "cell_editable" widget
Thu Jul 17 19:12:02 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_remove_widget): the treeview
	should only grab focus back if the "cell_editable" widget still
	has focus. (Fixes #110104, testcase provided by Marco Pesenti
	Gritti).
2003-07-17 17:14:58 +00:00
Kristian Rietveld
9931a13807 Don't set attr.event_mask twice, those things were meant to be ORred.
Thu Jul 17 19:06:34 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_realize_button):
	Don't set attr.event_mask twice, those things were meant to be
	ORred. (#115139, pointed out by Morten Welinder).
2003-07-17 17:09:15 +00:00
Vincent van Adrighem
d7ac77bfaf Dutch translation updated.
2003-07-17  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated.
2003-07-17 16:20:40 +00:00
Kristian Rietveld
1d5fde03d6 stop editing if needed. (Fixes #115869, reported by Michael Natterer).
Thu Jul 17 16:11:21 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_rows_reordered): stop editing
	if needed. (Fixes #115869, reported by Michael Natterer).
2003-07-17 14:14:24 +00:00
BST 2003 Tony Gale
9f20a359a5 copy current versions over from HEAD (#82550)
Wed Jul 16 19:31:19 BST 2003  Tony Gale <gale@gtk.org>

        * docs/tutorial/gtk-tut.sgml docss/faq/gtk-faq.sgml:
        copy current versions over from HEAD (#82550)
2003-07-16 18:34:06 +00:00
Danilo Šegan
0542ed1007 Updated Serbian translation by Serbian team (Prevod.org).
2003-07-14  Danilo Šegan  <dsegan@gmx.net>

	* sr.po, sr@Latn.po: Updated Serbian translation by Serbian team
	(Prevod.org).
2003-07-14 04:31:05 +00:00
Kristian Rietveld
4ad7e949a4 special case drags to "0", scroll to the top after dropping. (Fixes
Sat Jul 12 16:16:04 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_drag_data_received): special
	case drags to "0", scroll to the top after dropping. (Fixes #94968,
	reported by Alp Toker).
2003-07-12 14:25:00 +00:00
Kristian Rietveld
5d39f00c26 fixup bad code (#115784, Owen Taylor).
Sat Jul 12 16:08:32 2003  Kristian Rietveld  <kris@gtk.org>

	* demos/gtk-demo/editable_cells.c (cell_edited): fixup bad
	code (#115784, Owen Taylor).
2003-07-12 14:09:35 +00:00
Kristian Rietveld
87ddd3a19f free the old text and extra_attrs *after* we parsed the new markup string.
Sat Jul 12 16:01:03 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_set_property):
	free the old text and extra_attrs *after* we parsed the new
	markup string. (Fixes #114485, reported by Owen Taylor).
2003-07-12 14:03:56 +00:00
Kristian Rietveld
fe3913dfeb Fixes #113904, testcase provided by Rene Seindal.
Sat Jul 12 15:51:33 2003  Kristian Rietveld  <kris@gtk.org>

	Fixes #113904, testcase provided by Rene Seindal.

	* gtk/gtktreeview.c (gtk_tree_view_button_press): set
	pressed_button to -1 when a row has been activated,
	(gtk_tree_view_motion_bin_window): only start a drag if there's
	a button being pressed.
2003-07-12 13:56:42 +00:00
Kristian Rietveld
2ded88af08 use gdk_window_get_pointer instead of gdk_display_get_window_at_pointer to
Sat Jul 12 15:51:18 2003  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): use
	gdk_window_get_pointer instead of gdk_display_get_window_at_pointer
	to avoid a roundtrip (#110272, Owen Taylor).
2003-07-12 13:43:09 +00:00
Kristian Rietveld
58bad83bdd This patch really really fixes scrolling. Related bugs: #81627, testcase
Sat Jul 12 15:28:26 2003  Kristian Rietveld  <kris@gtk.org>

	This patch really really fixes scrolling. Related bugs: #81627,
	testcase provided by Timo Sirainen, #111500, testcase provided by
	manu, #113241, reported by Pedro Gimeno/Michael Natterer.

	*  gtk/gtktreeview.c (validate_visible_area): scrolling to a dy
	which is equal to the lower border of the window means scrolling
	to an invisible row, always update the dy when scrolling to an
	invisible row, corrected area_above/below calculations for
	invisible rows, when walking the tree correct the size
	subtracted for invalidated rows, fix wrong logic in comment.
2003-07-12 13:29:46 +00:00
Kristian Rietveld
841a146aba Hey! Owen broke my ChangeLog entry. 2003-07-12 13:15:14 +00:00
Matthias Clasen
5b55bd3049 Handle absolute filenames properly. (#117170, Jens Elkner)
2003-07-11  Matthias Clasen  <maclas@gmx.de>

	* queryloaders.c (query_module): Handle absolute filenames properly. (#117170, Jens Elkner)
2003-07-11 20:38:18 +00:00
Owen Taylor
cc7efbd9b9 gdk/x11/gdkevents-x11.c (get_real_window) gdk/x11/gdkinput-x11.c
Tue Jul  8 20:11:04 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (get_real_window)
        gdk/x11/gdkinput-x11.c (_gdk_input_common_init)
        gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init)
        gdk/x11/gdkprivate-x11.h (_gdk_windowing_image_init)
        Don't assume that all events start with XEventAny - Xkb events
        don't! (#105745). So, only do that for core events, and for
        non-core events, add a system for registering event types
        that start with XEventAny.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate):
        Check to see if the result of gdk_window_lookup_for_display()
        is actually a window.
2003-07-11 19:57:46 +00:00
Kristian Rietveld
b77795d2c9 don't directly return from ->window_at_pointer, but set win_x and win_y
Wed Jul  9 19:25:15 2003  Kristian Rietveld  <kris@gtk.org>

	* gdk/gdkdisplay.c (gdk_display_get_window_at_pointer): don't
	directly return from ->window_at_pointer, but set win_x and win_y
	first if needed. (Fixes #110166, reported by Arno Charlet).

	* gdk/gdkwindow.c (gdk_window_get_composite_drawable): change
	function to accept GdkDrawables and not just GdkWindows. This was
	already done in some other functions a while back, but this patch
	got lost for some reason.
2003-07-09 17:42:44 +00:00
Matthias Clasen
dd2137f2ed Fix the example. (#116575)
2003-07-08  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtkfilesel.sgml: Fix the example.  (#116575)
2003-07-08 21:53:05 +00:00
Matthias Clasen
531a062dbe Doc addition. (#116501, Doug Quale)
2003-07-08  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcontainer.c (gtk_container_remove): Doc addition. (#116501, Doug Quale)
2003-07-08 21:35:05 +00:00
Andras Timar
66985cacdb Updated Hungarian Translation.
2003-07-10  Andras Timar  <timar@gnome.hu>

        * hu.po : Updated Hungarian Translation.
2003-07-07 21:10:34 +00:00
Pablo Saratxaga
0a48879baf updated Walloon file 2003-07-07 21:10:34 +00:00
Vincent van Adrighem
a2078f22ae Dutch translation updated.
2003-07-07  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated.
2003-07-07 15:32:42 +00:00
Evandro Fernandes Giovanini
4f82fe1099 Updated Brazilian Portuguese translation from Alexandre Folle de Menezes
2003-07-06  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation
        from Alexandre Folle de Menezes <afmenez@terra.com.br>.
2003-07-07 01:58:14 +00:00
Owen Taylor
ec70ae2787 Somehow, a WM_STATE => _NET_WM_STATE change hand been made here.
Sat Jul  5 09:55:38 2003  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_event_send_client_message_to_all_recurse):
        Somehow, a WM_STATE => _NET_WM_STATE change hand been made here.

        * tests/testdnd.c (target_drag_motion): Make the trashcan
        open again. (Got lost in deprecation cleanup.)

        * gtk/gtkiconfactory.c (ensure_cache_up_to_date): Actually
        update the icon cache serial so we don't continually
        think we are out-of-date.
2003-07-05 15:01:16 +00:00
Tor Lillqvist
13addcbb8d We can calculate the width and height of the bounding rectangle only after
2003-07-04  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_polygon,
	gdk_win32_draw_segments, gdk_win32_draw_lines): We can calculate
	the width and height of the bounding rectangle only after the
	minumum x and y have been found, and need a separate loop for
	it. Thanks to Bruce Hochstetler for providing a sample program
	exhibiting the bug.
2003-07-04 00:21:05 +00:00
Tor Lillqvist
07ca5f46e8 Add gdk_string_to_compound_text_for_display. (#116537, Peter Zelezny)
2003-07-03  Tor Lillqvist  <tml@iki.fi>

	* gdk/gdk.def: Add gdk_string_to_compound_text_for_display.
	(#116537, Peter Zelezny)
2003-07-03 23:14:57 +00:00
Artur Flinta
aaec534ee1 Updated Polish translation.
2003-07-03  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation.
2003-07-03 16:58:00 +00:00
Artur Flinta
4a0eef051b Updated Polish translation.
2003-07-02  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation.
2003-07-02 00:08:59 +00:00
Matthias Clasen
f4aa453807 Improve docs. (116364, Morten Welinder)
2003-07-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (gtk_spin_button_set_digits): Improve docs.  (116364, Morten Welinder)
2003-07-01 20:54:46 +00:00
Tor Lillqvist
0152c8a683 WindowFromPoint() wants screen coordinates (#115422, Tim Evans).
2003-07-01  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (_gdk_windowing_window_get_pointer):
	WindowFromPoint() wants screen coordinates (#115422, Tim Evans).
2003-07-01 11:09:53 +00:00
Tor Lillqvist
c8efaf5080 New function, callback proc for EnumWindows().
2003-06-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkdnd-win32.c (find_window_enum_proc): New function,
	callback proc for EnumWindows().
	(gdk_drag_find_window_for_screen): Actually take the drag_window
	argument into account: Instead of using WindowFromPoint(), use
	EnumWindows(), to be able to skip the drag_window. (#116320, Tony
	M Brown, Herman Bloggs)

	* gdk/win32/*.c: Replace gdk_drawable_ref()/unref() and
	gdk_window_ref()/unref() calls with g_object_ref()/unref().
	Consistently use %p format in debugging output of pointers and
	HANDLEs.
2003-06-30 21:46:05 +00:00
Mohammad DAMT
623c0df59a Updated Indonesian translation
2003-06-30  Mohammad DAMT  <mdamt@bisnisweb.com>

	* id.po: Updated Indonesian translation
2003-06-30 03:42:32 +00:00
Pablo Saratxaga
ed0e281458 updated Walloon file 2003-06-29 09:51:15 +00:00
Matthias Clasen
0036dbe074 Stop discriminating against 32bpp ICOs a): Use the byte size of the image
2003-06-28  Matthias Clasen  <maclas@gmx.de>

	* io-ico.c (DecodeHeader): Stop discriminating against 32bpp ICOs a): Use the byte
	size of the image as a heuristic when selecting the bitmap  to load - this lets us
	select 32bpp bitmaps which come after a 8bpp bitmap.
	(OneLineTransp): Stop discriminating against 32bpp ICOs b): Don't overwrite the
	alpha channel of 32bpp ICOs.
	(gdk_pixbuf__ico_image_load_increment): Stop decoding the header unnecessarily.
2003-06-28 20:04:59 +00:00
Artur Flinta
f57f8754dc Updated Polish translation.
2003-06-28  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation.
2003-06-28 07:46:11 +00:00
Tor Lillqvist
cf50cd6f05 Fix for #111028, thanks to J. Ali Harlow, who writes: I found that the
2003-06-28  Tor Lillqvist  <tml@iki.fi>

	Fix for #111028, thanks to J. Ali Harlow, who writes:
	I found that the GdkPixmap->GdkImage reference really isn't
	important. It's only really there to have somewhere convenient to
	store the location of the pixel data in the pixmap and as an easy
	way of accessing the dimensions of that data. I have therefore put
	together a fix which removes this reference entirely which seems
	to solve the problem.

	* gdk/win32/gdkpixmap-win32.h (struct _GdkPixmapImplWin32):
	Instead of a pointer to a GdkImage, keep a pointer to the pixels
	directly.

	* gdk/win32/gdkimage-win32.c (_gdk_win32_setup_pixmap_image): Remove.
	(_gdk_win32_new_image): New function, replacing the above. Creates
	a GdkImage without any associated GdkPixmap.
	(gdk_image_new_bitmap, _gdk_image_new_for_depth): Use it instead.

	* gdk/win32/gdkprivate-win32.h: Remove from here, too.

	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap)
	* gdk/win32/gdkdrawable-win32.c (blit_from_pixmap)
	* gdk/win32/gdkgc-win32.c (_gdk_win32_bitmap_to_hrgn)
	* gdk/win32/gdkmain-win32.c (_gdk_win32_drawable_description):
	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize,
	gdk_pixmap_new, gdk_bitmap_create_from_data, gdk_pixmap_foreign_new)
	Corresponding changes.
2003-06-28 01:03:10 +00:00
Arafat Medini
be52e56056 Updated Arabic translation by Arabeyes.org
2003-06-27  Arafat Medini  <lumina@silverpen.de>

	* ar.po: Updated Arabic translation by Arabeyes.org
2003-06-27 08:12:20 +00:00
Fatih Demir
45309925bf Updated ta.po 2003-06-25 01:46:25 +00:00
Mohammad DAMT
8b87d5d2cc Updated Indonesian translation
2003-06-24  Mohammad DAMT  <mdamt@bisnisweb.com>

	* id.po: Updated Indonesian translation
2003-06-24 04:47:07 +00:00
Matthias Clasen
483030a00a Remove the pointless refusal to load images with dubious disposal mode on
2003-06-23  Matthias Clasen  <maclas@gmx.de>

	* io-gif.c (gif_get_frame_info): Remove the pointless refusal to load images with dubious
	disposal mode on the first frame. Just ignore it, as everybody else does.
2003-06-23 20:20:41 +00:00
Sanlig Badral
76b486a693 Mongolian translation updated 2003-06-23 14:38:07 +00:00
Vincent van Adrighem
2a6a7264ea Dutch translation updated.
2003-06-23  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated.
2003-06-22 23:00:36 +00:00
Matthias Clasen
52ae247d3b Typo fix. 2003-06-22 19:41:15 +00:00
Matthias Clasen
48c7f012a6 Reset block_count to 0 for all application extensions, otherwise the data
2003-06-22  Matthias Clasen  <matthias@localhost.localdomain>

	* io-gif.c (gif_get_extension): Reset block_count to 0 for all application extensions, otherwise the data blocks
	of unknown extensions are not propertly skipped.
2003-06-22 17:52:01 +00:00
Metin Amiroff
ba73a942d5 Updated Azerbaijani translation.
2003-06-22  Metin Amiroff <metin@karegen.com>

	* az.po: Updated Azerbaijani translation.
2003-06-22 14:32:42 +00:00
Tor Lillqvist
0adc2163cf Mention numbers of duplicated bugs, too. 2003-06-22 00:55:56 +00:00
Tor Lillqvist
6ec2e6900c When emulating X11's automatic grab on button down, pass owner_events as
2003-06-21  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): When
	emulating X11's automatic grab on button down, pass owner_events
	as FALSE. According to the XLib spec, automatic grabs use True for
	owner_events when OwnerGrabButtonMask is selected, and I don't see
	the X11 backend doing that. (#110271)
	(find_window_for_pointer_event): Improve debugging output.
2003-06-22 00:13:51 +00:00
Gil Osher
e894766438 Updated Hebrew translation.
* he.po: Updated Hebrew translation.
2003-06-21 08:42:14 +00:00
Gil Osher
9d31483838 Updated Hebrew translation 2003-06-21 08:41:10 +00:00
Matthias Clasen
83bda553c0 Don't stop on empty frames. (gif_get_lzw): Handle empty frames as 1x1
2003-06-21  Matthias Clasen  <maclas@gmx.de>

	* io-gif.c (gif_get_frame_info): Don't stop on empty frames.
	(gif_get_lzw): Handle empty frames as 1x1 transparent
	pixbufs.  (#106962, Federico Mena Quintero)
2003-06-21 00:35:24 +00:00
Matthias Clasen
e881862b46 Correct the calls to update_func() to consistently specify
2003-06-21  Matthias Clasen  <maclas@gmx.de>

	* io-gif.c (gif_get_lzw): Correct the calls to update_func() to
	consistently specify animation-relative data.
	(gif_get_frame_info): When debugging, also dump whether the
	frame is interlaced.
2003-06-21 00:31:54 +00:00
Alessio Frusciante
d095c0adf8 Updated Italian translation by Alessio Dessi`. 2003-06-19 21:12:39 +00:00
Matthias Clasen
6fc20daf55 Another question. 2003-06-18 22:40:36 +00:00
Matthias Clasen
12a6a3a71d Add a question about changing fonts. (#114747)
2003-06-19  Matthias Clasen  <maclas@gmx.de>

	* gtk/question_index.sgml: Add a question about changing fonts.
	(#114747)
2003-06-18 22:11:02 +00:00
Tor Lillqvist
87eb5ee053 Look for DLLs also in the bin subdirectory, where libtool 1.5 installs
2003-06-17  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in (DLLDIR): Look for DLLs also in the bin
	subdirectory, where libtool 1.5 installs them.

	* README.win32: Point to FSF's binary Win32 distribution of
	gettext-runtime.
2003-06-17 23:45:51 +00:00
Dmitry Mastrukov
6f61f5b224 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-06-17 09:26:20 +00:00
Andraz Tori
a6dbe33829 Updated Slovenian translation 2003-06-16 13:35:19 +00:00
Arafat Medini
35620befe6 Added Arabic translation by arabeyes.org
2003-06-15  Arafat Medini  <lumina@silverpen.de>

	* ar.po: Added Arabic translation by arabeyes.org
2003-06-15 11:03:21 +00:00
Andraz Tori
19b9ecbb61 Updated Slovenian translation 2003-06-15 09:06:42 +00:00
Pablo Gonzalo del Campo
83f40bace7 Updated Spanish translation by Francisco Javier F. Serrador
2003-06-12  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Updated Spanish translation by
                 Francisco Javier F. Serrador <serrador@arrakis.es>.
2003-06-12 21:58:04 +00:00
Anders Carlsson
49dfeb8e2d Special case pixmaps. (#114880)
2003-06-12  Anders Carlsson  <andersca@codefactory.se>

	* gtk/gtkwidget.c: (event_window_is_still_viewable):
	Special case pixmaps. (#114880)
2003-06-12 20:51:08 +00:00
Guntupalli Karunakar
7bba376dd0 Updated Malayalam translation 2003-06-12 15:32:32 +00:00
Matthias Clasen
e0e39b1cc8 Fix some typos.
2003-06-11  Matthias Clasen  <maclas@gmx.de>

	* gtk/tmpl/gtkdnd.sgml: Fix some typos.
2003-06-11 23:11:57 +00:00
Matthias Clasen
d1f64a8efa Document child-notify and drag-data-received signals. Owen, we need to
2003-06-12  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkwidget.c: Document child-notify and drag-data-received
	signals. Owen, we need to figure out where the best place for
	these comments in the source is. I currently put them in front of
	the signals enum.
2003-06-11 23:08:04 +00:00
Dmitry Mastrukov
68a294d37d ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-06-11 09:32:25 +00:00
Pablo Gonzalo del Campo
0b92a0ff5e Updated Spanish translation by Juan Manuel García Molina
2003-03-24  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Updated Spanish translation by
          Juan Manuel García Molina <juanma_gm@wanadoo.es>.
2003-06-10 19:08:08 +00:00
Hidetoshi Tajima
ec45f056d0 New function for XIM instantiate callback. New function where call to
* modules/input/gtkimcontextxim.c (xim_instantiate_callback): New
	function for XIM instantiate callback.
	* modules/input/gtkimcontextxim.c (xim_info_try_im): New function
	where call to XOpenIM() or XRegisterIMInstantiateCallback() is
	actually made.
	* modules/input/gtkimcontextxim.c (xim_destroy_callback): New function
	for XIM's destroy callback.
	* modules/input/gtkimcontextxim.c (get_im): add a check if info->im
	is set or not - if it's not set, call xim_info_try_im() to try to
	initiaize it.
	* modules/input/gtkimcontextxim.c (reinitialize_ic): reset
	filter_key_release flag of the context.
	* modules/input/gtkimcontextxim.c (get_ic_real): removed
	* modules/input/gtkimcontextxim.c (gtk_im_context_xim_get_ic): move
	code from the removed get_ic_real().

	For XIM instantiation, destruction and re-instantiation. With
	this, Gtk+ apps will be able to connect or reconnect to the XIM,
	when it starts after the apps, or when the XIM gets lost and recover.
	(#113099, #107782).
2003-06-10 18:25:25 +00:00
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
337 changed files with 97779 additions and 52340 deletions

2686
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.3.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.2.3 # 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

175
NEWS
View File

@@ -1,3 +1,178 @@
Overview of Changes in GTK+ 2.2.3
=================================
* GdkPixbuf [Matthias Clasen]
- Fix some problems with overflows when scaling down [Tomas Ögren]
- Many GIF bug fixes [Matthias, Federico Mena Quintero]
- Prefer 32-bpp ICOs, fix bugs with them
- Fix problem with absolute filenames and gdk-pixbuf-query-loaders
[Jens Elker]
- Make gdk-pixbuf-csource include alignment magic [Brian Cameron]
* Win32 [Tor Lillqvist]
- Add multiple monitor support
- Major event and key handling rewrite, including IME fixes
- Fix handling of toplevel window positions
- Add support for all window geometry hints (gridded geometry, etc.)
- Fix DND to ignore drag window [Tony M Brown, Herman Bloggs]
- Fix GdkImage memory leak [J. Ali Harlow]
- Remove leftover OwnerGrabButtonMask emulation (fixes lots)
- Misc bug fixes [Many from Hans Breuer, Tim Evans]
- Build fixes and improvements [Peter Zelezny]
* X11
- Fix extremely common crash where we interpreted the timestamp
field of a XKB event as a window ID and found a pixmap that matched.
[Owen Taylor, with essential backtrace from Kjartan Maraas]
- Fix CapsLock and NumLock for non-XKB [Robert Basch]
- Fix problems with, eg. Ctrl-Alt-Backspace hiding Cntrl-Backspace [Owen]
- Workaround Xinerama servers reporting wrong depths [Owen]
* GtkTreeView [Kristian Rietveld]
- Fix scrolling once more [Pedro Gimeno, Michael Natterer, Timo Sirainen]
- Don't get confused by the Control key when handling selection
from an accelerator like <Control>B [Michael Natterer]
- Many misc fixes [Matthias, Marco Pesenti Gritti, Tim Janik, Alex Larsson,
Tim-Philipp Müller, Michael Natterer, Josh Parsons, Yann Rouillard,
Rene Seindel, Owen Taylor, Alp Toker, Morten Welinder]
* Input methods
- Handle input methods exiting and starting while the
app is running [Hidetoshi Tajima]
- Fix infinite loop when closing input methods [Owen,
Takuro Ashie, Hidetoshi]
- Add a 'cedilla' input method with c+acute => cedilla and use
as the default for languages that use cedilla. [Gustavo De Nardin,
Owen, Fco. Javier F. Serrador]
- Fix status window for multihead [Owen, James Su]
- Remember imcontext attributes when switching methods [Owen,
Botond Botyanszki]
* GtkFileSelection [Owen]
- Fix selection of "UntitledN" on initial map [Mark Finlay]
- Fix an annoying bug with cursor positioning on failed completion
- Misc Fixes [Owen, Tor]
* Other widgets
- Fix problem with GtkOptionMenus coming up in the wrong place [Kristian]
- Fix problem with spinbuttons not getting enough space [Morten Welinder,
Kristian]
- Fix an infinite loop when resizing GtkTextView [Owen, Frederic Crozat]
- Don't include menu labels in gtk_notebook_forall [Owen]
- Fix problem with XEMBED (GtkPlug) clients that don't take focus stealing
focus [Owen]
- Accept color drops with wrong format from KDE [Matthias]
* Fix problem from gnome-theme-manager playing tricks and
making event->window a pixmap. [Anders Carlsson]
* Ignore Caps-lock when matching accelerators
* Fix 5-year-old bug where toplevels didn't fully refresh properly
on theme change [Owen, Rajkumar Siva]
* Don't require precompiled gdk-pixbuf-csource when cross-compiling
from a tarball [Owen]
* Documentation improvements [Matthias, Noah Levitt, Tor, Doug Quale,
Morten Welinder]
* Misc bug fixes [Keith Bissett, Botond Botyanszki, Damien Carbery,
Arno Charlet, Felipe Heidrich, Charles Kerr, George Lebl, Noah, Tor,
Callum McKenzie, Michael Meeks, Denis Mikhalkin, Thomas Mirlacher,
Kristian, Masahiro Sakai, Soeren Sandmann, Benedikt Spranger, Owen,
Luis Villa]
* New and updated translations (ar,az,cs,cy,be,de,es,fi,fr,he,hi,hu,id,is,it,
ko,lt,ml,mn,nl,ne,no,pl,pt,pt_BR,ru,sk,sr,sr@Latn,ta,wa,zh_TW,zh_CN)
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 Harlow, 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.3. 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
===================
@@ -72,13 +67,22 @@ references to the wntab32x library from the makefile before building.
Libintl
=======
GTK wants to be built with the GNU "intl" library for
internationalisation (i18n). Get the version ported to Win32 (not a
very big deal) from the web site mentioned above. The "intl" library
as gets built as a DLL called libintl-1.dll. If you don't want any
i18n stuff, undefine ENABLE_NLS, HAVE_GETTEXT and HAVE_LIBINTL in the
config.h.win32 file, and remove references to the intl library from
the makefiles.
Before building GTK+ you must also have GNU gettext. Get prebuilt
binaries of gettext-runtime (0.12.1 or newer) from your nearest GNU
ftp mirror. If you use gcc, you will also have to edit the libintl.h
file from gettext a tiny bit: Change the
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
line to
# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && (defined __STDC__ || defined __cplusplus)
around line 102.
If you use libtool, you will also have to copy intl.lib to libintl.a
so that libtool will find them. Alternatively, use pexports and
dlltool to generate a gcc import library.
ActiveIMM
=========

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], [3])
m4_define([gtk_interface_age], [3])
# 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 ar 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 is it ja ko lt lv mk ml mn ms ne 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)
@@ -782,12 +779,6 @@ dnl Test for libpng
*** from CVS.])
fi
REBUILD_PNGS=\#
if test -z "$LIBPNG"; then
REBUILD_PNGS=
fi
AC_SUBST(REBUILD_PNGS)
AC_SUBST(LIBTIFF)
AC_SUBST(LIBJPEG)
AC_SUBST(LIBPNG)
@@ -902,6 +893,11 @@ fi
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
REBUILD_PNGS=
if test -z "$LIBPNG"; then
REBUILD_PNGS=#
fi
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
@@ -909,10 +905,20 @@ AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
if test $cross_compiling = yes; then
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
if test x$GDK_PIXBUF_CSOURCE = xno; then
AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
REBUILD_PNGS=#
fi
fi
if test ! -f $srcdir/gtk/stock-icons/gtkstockpixbufs.h &&
test "x$REBUILD_PNGS" = "x#" ; then
AC_MSG_ERROR([
*** gtkstockpixbufs.h is not in the tree, and cannot be built
*** because you don't have libpng, or (when cross-compiling) you
*** don't have a prebuilt gdk-pixbuf-csource on the host system.])
fi
AC_SUBST(REBUILD_PNGS)
GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
GDK_PIXBUF_EXTRA_CFLAGS=
@@ -932,6 +938,7 @@ AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
GDK_EXTRA_LIBS=$GDK_WLIBS
GDK_EXTRA_CFLAGS=
GTK_DEP_LIBS_FOR_X=
FREETYPE_LIBS=
FREETYPE_CFLAGS=
@@ -997,8 +1004,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
#
@@ -1016,13 +1025,12 @@ if test "x$gdktarget" = "xx11"; then
x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`"
x_extra_libs=
AC_PATH_XTRA
if test x$no_x = xyes ; then
AC_MSG_ERROR([X development libraries not found])
fi
if test $pango_omitted_x_deps = yes ; then
AC_PATH_XTRA
if test x$no_x = xyes ; then
AC_MSG_ERROR([X development libraries not found])
fi
x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
#
@@ -1095,6 +1103,11 @@ if test "x$gdktarget" = "xx11"; then
# Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs $x_libs"
# GTK+ uses some X calls, so needs to link against X directly
if test $enable_explicit_deps != yes ; then
GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
fi
# Check for Xinerama extension (Solaris impl or Xfree impl)
gtk_save_cppflags="$CPPFLAGS"
@@ -1155,11 +1168,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 +1209,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 +1268,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
@@ -1371,7 +1394,7 @@ GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PAC
#
# If we aren't writing explicit dependencies, then don't put the extra libraries we need
# into the pkg-config files
a# into the pkg-config files
#
if test $enable_explicit_deps != yes ; then
GDK_EXTRA_LIBS=
@@ -1416,7 +1439,7 @@ fi
GTK_PACKAGES=atk
GTK_EXTRA_LIBS=
GTK_EXTRA_CFLAGS=
GTK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
AC_SUBST(GTK_PACKAGES)
@@ -1581,7 +1604,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 +1631,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

@@ -152,13 +152,11 @@ cell_edited (GtkCellRendererText *cell,
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
GtkTreeIter iter;
gint *column;
column = g_object_get_data (G_OBJECT (cell), "column");
gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
gtk_tree_model_get_iter (model, &iter, path);
switch (GPOINTER_TO_INT (column))
switch (column)
{
case COLUMN_NUMBER:
{

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

@@ -2,7 +2,7 @@
<book>
<bookinfo>
<date>October 27th 2002</date>
<date>June 25th 2003</date>
<title>GTK+ FAQ</title>
<authorgroup>
<author>
@@ -22,6 +22,8 @@
<para> This document is intended to answer questions that are
likely to be frequently asked by programmers using GTK+ or
people who are just looking at using GTK+. </para>
<para><emphasis>Note: </emphasis> This FAQ mainly covers GTK+ 1.2.
Where the text covers GTK+ 2.x this will be indicated</para>
</abstract>
</bookinfo>
@@ -33,6 +35,16 @@
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>Note: This FAQ mainly covers GTK+ 1.2</title>
<para>This FAQ mainly covers GTK+ 1.2.
Where the text covers GTK+ 2.x this will be indicated by prefixing the
text with: <emphasis>[GTK+ 2.x]</emphasis>
</para>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>Before anything else: the greetings</title>
<para>The FAQ authors want to thank:</para>
@@ -142,7 +154,7 @@ oriented features.</quote></para>
<para>GTK+ == Gimp Toolkit</para>
<para>GDK == GTK+ Drawing Kit</para>
<para>GLib == G Libray</para>
<para>GLib == G Library</para>
</sect1>
@@ -444,26 +456,24 @@ generated Makefiles.</para>
<sect1>
<title>I've compiled and installed GTK+, but I can't get any
programs to link with it!</title>
programs to link with it! <emphasis>[GTK 2.x]</emphasis></title>
<para>This problem is most often encountered when the GTK+
libraries can't be found or are the wrong version. Generally,
the compiler will complain about an 'unresolved symbol'.
There are two things you need to check:</para>
the compiler will complain about an 'unresolved symbol'.</para>
<itemizedlist>
<listitem><simpara>Make sure that the libraries can be
<para>Make sure that the libraries can be
found. You want to edit <filename>/etc/ld.so.conf</filename> to
include the directories which contain the GTK libraries,
so it looks something like:</simpara>
so it looks something like:</para>
<para><literallayout><literal>/usr/X11R6/lib</literal>
<literal>/usr/local/lib</literal></literallayout></para>
<para>Then you need to run /sbin/ldconfig as root. You can
find what directory GTK is in using</para>
find what libraries GTK requires using</para>
<para><literallayout><literal>gtk-config --libs</literal>
<para><literallayout><literal>pkg-config gtk+-2.0 --libs</literal>
</literallayout></para>
<para>If your system doesn't use ld.so to find libraries
@@ -482,91 +492,29 @@ your GTK libraries are in /usr/local/lib):</para>
<literal>setenv LD_LIBRARY_PATH /usr/local/lib</literal>
</literallayout></para>
</listitem>
<listitem><simpara>Make sure the linker is finding the
correct set of libraries. If you have a Linux distribution that
installs GTK+ (e.g. RedHat 5.0) then this older version may be
used. Now (assuming you have a RedHat system), issue the
command</simpara>
<para><literallayout>
<literal>rpm -e gtk gtk-devel</literal>
</literallayout></para>
<para>You may also want to remove the packages that depend
on gtk (rpm will tell you which ones they are). If you don't have a
RedHat Linux system, check to make sure that neither
<filename>/usr/lib</filename> or <filename>/usr/local/lib</filename>
contain any of the libraries libgtk, libgdk, libglib, or libgck. If
they do exist, remove them (and any gtk include files, such as
<filename>/usr/include/gtk</filename> and
<filename>/usr/include/gdk</filename>) and reinstall gtk+.</para>
</listitem>
</itemizedlist>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>When compiling programs with GTK+, I get compiler error
messages about not being able to find
<literal>glibconfig.h</literal>.</title>
<para>The header file "glibconfig.h" was moved to the
directory $exec_prefix/lib/glib/include/. $exec_prefix is the
directory that was specified by giving the --exec-prefix flags
to ./configure when compiling GTK+. It defaults to $prefix,
(specified with --prefix), which in turn defaults to /usr/local/.</para>
<para>This was done because "glibconfig.h" includes
architecture dependent information, and the rest of the
include files are put in $prefix/include, which can be shared
between different architectures.</para>
<para>GTK+ includes a shell script, <literal>/gtk-config/</literal>,
that makes it easy to find out the correct include paths. The GTK+
Tutorial includes an example of using <literal>/gtk-config/</literal>
for simple compilation from the command line. For information about more
complicated configuration, see the file docs/gtk-config.txt in the GTK+
distribution.</para>
<para>If you are trying to compile an old program, you may be
able to work around the problem by configuring it with a
command line like:</para>
<para><literallayout>
<literal>setenv CPPFLAGS "-I/usr/local/include/glib/include"</literal>
<literal>./configure</literal>
</literallayout></para>
<para>(Substitute the appropriate value of $exec_prefix for
/usr/local.)</para>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>When installing a GTK+ application, configure reports
that it can't find GTK.</title>
that it can't find GTK. <emphasis>[GTK 2.x]</emphasis></title>
<para>There are several common reasons for this:</para>
<itemizedlist>
<listitem><simpara>You have an old version of GTK installed
somewhere. RedHat 5.0, for example, installs an older copy of GTK that
may not work with the latest applications. You should remove this old
copy, but note that in the case of RedHat 5.0 this will
break the <literal>control-panel</literal> applications.</simpara>
somewhere. You should remove this old copy, but note that
this may break applications that have been compiled against
the old version.</simpara>
</listitem>
<listitem><simpara><literal>gtk-config</literal> (or another
<listitem><simpara><literal>pkg-config</literal> (or another
component of GTK) isn't in your path, or there is an old
version on your system. Type:</simpara>
<para><literallayout>
<literal>gtk-config --version</literal>
<literal>pkg-config gtk+-2.0 --version</literal>
</literallayout></para>
<para>to check for both of these. If it returns a value
@@ -747,25 +695,23 @@ presents a list of GTK+ bindings.</para>
<listitem><simpara>There are several C++ wrappers for GTK+.</simpara>
<itemizedlist>
<listitem><simpara>the gtk-- package, which is a very small wrapper for
<listitem><simpara>the gtkmm package, which is a wrapper for
GTK+. You can find the home page at <ulink
url="http://www.cs.tut.fi/~p150650/gtk/gtk--.html">
http://www.cs.tut.fi/~p150650/gtk/gtk--.html</ulink>. The FTP site is
<ulink url="ftp://ftp.gtk.org/pub/gtk/gtk--">
ftp://ftp.gtk.org/pub/gtk/gtk--</ulink>.</simpara>
url="http://www.gtkmm.org">
http://www.gtkmm.org/</ulink>.</simpara>
</listitem>
<listitem><simpara>the VDK package, which was built as
the base package of a GTK+ application Borland-like
builder. The home page can be found at <ulink
url="http://www.guest.net/homepages/mmotta/VDKHome">
http://www.guest.net/homepages/mmotta/VDKHome</ulink>.</simpara>
url="http://vdkbuilder.sourceforge.net/">
http://vdkbuilder.sourceforge.net/</ulink>.</simpara>
</listitem>
<listitem><simpara>The wxWindows/Gtk package, a free C++ library for
cross-platform GUI development. The home page of this package is
<ulink url="http://www.freiburg.linux.de/~wxxt/">
http://www.freiburg.linux.de/~wxxt/</ulink>.</simpara>
<ulink url="http://www.wxwindows.org/">
http://www.wxwindows.org/</ulink>.</simpara>
</listitem>
</itemizedlist>
@@ -883,6 +829,32 @@ grounding on what the widgets can do.</para>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>How do I use the Glade GUI builder with GTK+? <emphasis>[GTK 2.x]</emphasis></title>
<para>There are two ways to use Glade. The first way is to use
Glade's facilities for generating code; the second
way is to use the libglade library which directly loads
the XML user interface description files that Glade
generates into a running program.</para>
Experienced GTK+ programmers generally strongly recommend
using libglade; you don't have to worry about the interaction
between Glade generating the source and you editing it,
and its been shown to be a method that works better
for large projects, so there is a lot of example code
out there you can look at.</para>
<para>An introduction to using libglade can be found in the
libglade API docs
(<ulink url="http://developer.gnome.org/doc/API/2.0/libglade/libglade-notes.html#libglade-basics">
http://developer.gnome.org/doc/API/2.0/libglade/libglade-notes.html#libglade-basics</ulink>)
.</para>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>How do I write security sensitive/SUID/SGID programs with GTK+?
Is GTK+ secure? What's this GTK_MODULES security hole I heard about?</title>
@@ -900,26 +872,26 @@ url="http://www.gtk.org/setuid.html">http://www.gtk.org/setuid.html</ulink>.</pa
<sect1>
<title>I tried to compile a small <command>Hello World</command> of mine,
but it failed. Any clue?</title>
but it failed. Any clue? <emphasis>[GTK 2.x]</emphasis></title>
<para>Since you are good at coding, we will not deal with
compile time error here :)</para>
<para>The classic command line to compile a GTK+ based program is</para>
<para><literallayout>
<literal>gcc -o myprog [c files] `gtk-config --cflags --libs`</literal>
<literal>gcc -o myprog [c files] `pkg-config gtk+-2.0 --cflags --libs`</literal>
</literallayout></para>
<para>You should notice the backquote character which is used
in this command line. A common mistake when you start a GTK+
based development is to use quote instead of backquotes. If
you do so, the compiler will complain about an unknown file
called <filename>gtk-config --cflags --libs</filename>. The
called <filename>pkg-config gtk+-2.0 --cflags --libs</filename>. The
text in backquotes is an instruction to your shell to
substitute the output of executing this text into the
substitute the output of executing this command into the
commandline.</para>
<para>The command line above ensure that:</para>
<para>The command line above ensures that:</para>
<itemizedlist>
<listitem><simpara>the correct C compiler flags will be used
@@ -938,7 +910,7 @@ needed libraries.</simpara>
<sect1>
<title>What about using the <command>make</command>
utility?</title>
utility? <emphasis>[GTK 2.x]</emphasis></title>
<para>This is a sample makefile which compile a GTK+ based
program:</para>
@@ -947,8 +919,8 @@ program:</para>
# basic GTK+ app makefile
SOURCES = myprg.c foo.c bar.c
OBJS = ${SOURCES:.c=.o}
CFLAGS = `gtk-config --cflags`
LDADD = `gtk-config --libs`
CFLAGS = `pkg-config gtk+-2.0 --cflags`
LDADD = `pkg-config gtk+-2.0 --libs`
CC = gcc
PACKAGE = myprg
@@ -1089,6 +1061,17 @@ port is also great for debugging X programs. Old vt100/vt220
terminals are dirt cheap but a bit hard to get (here in The
Netherlands, YMMV).</quote></para>
<para>
Another option is to run your application on Xnest. Xnest is an X server
which displays its root window in a regular window of another X server.
A pointer grab on the Xnest display will not affect the GUI of your debugger
running on your regular X server.
<programlisting>
Xnest :1
twm -display :1
myapp --display=:1
</programlisting>
</para>
</sect1>
</chapter>
@@ -1192,7 +1175,7 @@ Netherlands, YMMV).</quote></para>
<sect1>
<title>Is GTK+ thread safe? How do I write multi-threaded GTK+
applications?</title>
applications? <emphasis>[GTK 2.x]</emphasis></title>
<para>The GLib library can be used in a thread-safe mode by
calling g_thread_init() before making any other GLib
@@ -1204,11 +1187,12 @@ simultaneously. If two different threads need to access the
same hash table, the application is responsible for locking
itself.</para>
<para>When GLib is intialized to be thread-safe, GTK+ is
<emphasis>thread aware</emphasis>. There is a single global
<para>In order to make GDK thread aware, you also need to
call gdk_threads_init() in conjunction with the above call.
There is a single global
lock that you must acquire with gdk_threads_enter() before
making any GDK calls, and release with gdk_threads_leave()
afterwards.</para>
afterwards throughout your code.</para>
<para>A minimal main program for a threaded GTK+ application
looks like:</para>
@@ -1219,7 +1203,11 @@ main (int argc, char *argv[])
{
GtkWidget *window;
/* init threads */
g_thread_init(NULL);
gdk_threads_init();
/* init gtk */
gtk_init(&amp;argc, &amp;argv);
window = create_window();
@@ -1229,7 +1217,7 @@ main (int argc, char *argv[])
gtk_main();
gdk_threads_leave();
return(0);
return 0;
}
</programlisting>
@@ -1246,36 +1234,30 @@ illustrate how to use threads within GTK+ programs.</para>
<programlisting role="C">
/*-------------------------------------------------------------------------
* Filename: gtk-thread.c
* Version: 0.99.1
* Version: 1.99.1
* Copyright: Copyright (C) 1999, Erik Mouw
* Author: Erik Mouw &lt;J.A.K.Mouw@its.tudelft.nl&gt;
* Description: GTK threads example.
* Description: GTK threads example.
* Created at: Sun Oct 17 21:27:09 1999
* Modified by: Erik Mouw &lt;J.A.K.Mouw@its.tudelft.nl&gt;
* Modified at: Sun Oct 24 17:21:41 1999
* Modified by: Owen Taylor &lt;otaylor@gtk.org&gt;
* Modified at: Wed May 28 10:43:00 2003
*-----------------------------------------------------------------------*/
/*
* Compile with:
*
* cc -o gtk-thread gtk-thread.c `gtk-config --cflags --libs gthread`
* cc -o gtk-thread gtk-thread.c `pkg-config --cflags --libs gtk+-2.0 gthread`
*
* Thanks to Sebastian Wilhelmi and Owen Taylor for pointing out some
* bugs.
* Thanks to Sebastian Wilhelmi for pointing out some bugs in earlier versions.
*
*/
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;unistd.h&gt;
#include &lt;time.h&gt;
#include &lt;gtk/gtk.h&gt;
#include &lt;glib.h&gt;
#include &lt;pthread.h&gt;
#define YES_IT_IS (1)
#define NO_IT_IS_NOT (0)
typedef struct
typedef struct
{
GtkWidget *label;
int what;
@@ -1297,7 +1279,7 @@ void *argument_thread(void *args)
for(;;)
{
/* sleep a while */
sleep(rand() / (RAND_MAX / 3) + 1);
sleep(g_random_int_range (1, 4));
/* lock the yes_or_no_variable */
G_LOCK(yes_or_no);
@@ -1325,42 +1307,46 @@ void *argument_thread(void *args)
else
gtk_label_set_text(GTK_LABEL(data->label), "O no, it isn't!");
/* Make sure all X commands are sent to the X server; not strictly
* necessary here, but always a good idea when you do anything
* from a thread other than the one where the main loop is running.
*/
gdk_flush ();
/* release GTK thread lock */
gdk_threads_leave();
}
}
return(NULL);
return NULL;
}
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *label;
GError *error = NULL;
yes_or_no_args yes_args, no_args;
pthread_t no_tid, yes_tid;
/* init threads */
g_thread_init(NULL);
gdk_threads_init();
/* init gtk */
gtk_init(&amp;argc, &amp;argv);
/* init random number generator */
srand((unsigned int)time(NULL));
/* create a window */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(destroy), NULL);
g_signal_connect(window, "destroy",
G_CALLBACK(destroy), NULL);
gtk_container_set_border_width(GTK_CONTAINER (window), 10);
/* create a label */
label = gtk_label_new("And now for something completely different ...");
gtk_container_add(GTK_CONTAINER(window), label);
/* show everything */
gtk_widget_show(label);
gtk_widget_show (window);
@@ -1368,24 +1354,100 @@ int main(int argc, char *argv[])
/* create the threads */
yes_args.label = label;
yes_args.what = YES_IT_IS;
pthread_create(&amp;yes_tid, NULL, argument_thread, &amp;yes_args);
if (!g_thread_create(argument_thread, &amp;yes_args, FALSE, &amp;error))
{
g_printerr ("Failed to create YES thread: %s\n", error->message);
return 1;
}
no_args.label = label;
no_args.what = NO_IT_IS_NOT;
pthread_create(&amp;no_tid, NULL, argument_thread, &amp;no_args);
if (!g_thread_create(argument_thread, &amp;no_args, FALSE, &amp;error))
{
g_printerr ("Failed to create NO thread: %s\n", error->message);
return 1;
}
/* enter the GTK main loop */
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
return(0);
return 0;
}
</programlisting>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>I'm doing some stuff with GTK+ in a separate thread, and
properly locking with gdk_threads_enter/gdk_threads_leave()
but the display doesn't update properly. <emphasis>[GTK 2.x]</emphasis>
</title>
<para>For efficiency, the X window system batches up commands
and sends them to the X server in batches instead of sending
out immediately.</para>
<para>In a non-multithreaded program, you don't have to worry about
this, since the first thing that happens when control returns
to the main loop is that any outstanding X requests are
sent to the X server.</para>
<para>However, if you are making GTK+ calls from a thread other
than the main loop, then GTK+ doesn't know when to send batched
commands out. For that reason, after making GTK+ calls
in a separate thread, it is usually a good idea to call
gdk_flush() before gdk_thread_leave().</para>
<para>Actually, gdk_flush() is more expensive than is necessary here,
since it waits for the X server to finish outstanding commands
as well; if performance is an issue, you may want to call
XFlush() directly:</para>
<programlisting role="C">
#include &lt;gdk/gdkx.h&gt;
void my_flush_commands (void)
{
GdkDisplay *display = gdk_display_get_default ();
XFlush (GDK_DISPLAY_XDISPLAY (display);
}
</programlisting>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>What's an easy way to run a function in the thread with
the main loop? <emphasis>[GTK 2.x]</emphasis></title>
<para>Sometimes the simplest way to set up a threaded program
is to make all the GTK+ calls in a single thread. In such
a program, you should still call g_threads_init(), but
don't need to call gdk_threads_init(), gkd_threads_enter(),
and gdk_threads_leave().</para>
<para>If you set your program up this way, how then do you get
the thread making GTK+ calls and running the main loop
to do something in response to another thread?</para>
<para>An easy way to do it is to take advantage of the fact that
the GLib main loop functions are all thread safe, and can
be called from any thread by adding an idle function
with g_idle_add(). The function provided will be called
at the next opportunity by the main thread. If you want
your function to take priority over event handling and
drawing, you can instead use g_idle_add_full() and pass
in a priority of G_PRIORITY_HIGH.</para>
</sect1>
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>Why does this strange 'x io error' occur when I
<literal>fork()</literal> in my GTK+ app?</title>
@@ -1420,7 +1482,7 @@ illustrate handling fork() and exit().</para>
/*
* Compile with:
*
* cc -o gtk-fork gtk-fork.c `gtk-config --cflags --libs`
* cc -o gtk-fork gtk-fork.c `pkg-config gtk+-2.0 --cflags --libs`
*
*/
@@ -1612,7 +1674,7 @@ ancestor?</title>
<para>There are a couple of ways to find the top level parent
of a widget. The easier way is to call the
<literal>gtk_widget_top_level()</literal> function that
<literal>gtk_widget_get_toplevel()</literal> function that
returns pointer to a GtkWidget that is the top level
window.</para>
@@ -1923,7 +1985,8 @@ and high priority idle functions, then return immediately
<!-- ----------------------------------------------------------------- -->
<sect1>
<title>How do I attach data to some GTK+ object/widget?</title>
<title>How do I attach data to some GTK+ object/widget?
<emphasis>[GTK 2.x]</emphasis></title>
<para>First of all, the attached data is stored in the
object_data field of a GtkObject. The type of this field is
@@ -1932,15 +1995,15 @@ gdataset.c file in your glib source directory very
carefully.</para>
<para>There are two (easy) ways to attach some data to a gtk
object. Using <literal>gtk_object_set_data()</literal> and
<literal>gtk_object_get_data()</literal> seems to be the most
object. Using <literal>g_object_set_data()</literal> and
<literal>g_object_get_data()</literal> seems to be the most
common way to do this, as it provides a powerful interface to
connect objects and data.</para>
<programlisting role="C">
void gtk_object_set_data(GtkObject *object, const gchar *key, gpointer data);
void g_object_set_data(GObject *object, const gchar *key, gpointer data);
gpointer gtk_object_get_data(GtkObject *object, const gchar *key);
gpointer g_object_get_data(GObject *object, const gchar *key);
</programlisting>
<para>Since a short example is better than any lengthy speech:</para>
@@ -1949,10 +2012,10 @@ gpointer gtk_object_get_data(GtkObject *object, const gchar *key);
struct my_struct p1,p2,*result;
GtkWidget *w;
gtk_object_set_data(GTK_OBJECT(w),"p1 data",(gpointer)&amp;p1);
gtk_object_set_data(GTK_OBJECT(w),"p2 data",(gpointer)&amp;p2);
g_object_set_data(G_OBJECT(w),"p1 data",(gpointer)&amp;p1);
g_object_set_data(G_OBJECT(w),"p2 data",(gpointer)&amp;p2);
result = gtk_object_get_data(GTK_OBJECT(w),"p1 data");
result = g_object_get_data(G_OBJECT(w),"p1 data");
</programlisting>
<para>The <literal>gtk_object_set_user_data()</literal> and
@@ -2075,62 +2138,24 @@ windows.</para>
<sect1>
<title>How do I set the size of a widget/window? How do I
prevent the user resizing my window?</title>
prevent the user resizing my window? <emphasis>[GTK 2.x]</emphasis></title>
<para>The <literal>gtk_widget_set_uposition()</literal>
function is used to set the position of any widget.</para>
<para>The <literal>gtk_widget_set_size_request()</literal> function
is used to set the size of a widget to a specific size.
<para>The <literal>gtk_widget_set_usize()</literal> function
is used to set the size of a widget. In order to use all the
features that are provided by this function when it acts on a
window, you may want to use the
<literal>gtk_window_set_policy</literal> function. The
The function
<literal>gtk_window_set_resizable()</literal> function sets whether
the user can resize a window, which they can by default. The
definition of these functions are:</para>
<programlisting role="C">
void gtk_widget_set_usize (GtkWidget *widget,
gint width,
gint height);
void gtk_widget_set_size_request (GtkWidget *widget,
gint width,
gint height);
void gtk_window_set_policy (GtkWindow *window,
gint allow_shrink,
gint allow_grow,
gint auto_shrink);
</programlisting>
void gtk_window_set_resizable (GtkWindow *window,
gboolean resizable);
<para><literal>auto_shrink</literal> will automatically shrink
the window when the requested size of the child widgets goes
below the current size of the
window. <literal>allow_shrink</literal> will give the user the
authorisation to make the window smaller that it should
normally be. <literal>allow_grow</literal> gives the user
the ability to make the window bigger. The default
values for these parameters are:</para>
<programlisting role="C">
allow_shrink = FALSE
allow_grow = TRUE
auto_shrink = FALSE
</programlisting>
<para>The <literal>gtk_widget_set_usize()</literal> functions
is not the easiest way to set a window size since you cannot
decrease this window size with another call to this function
unless you call it twice, as in:</para>
<programlisting role="C">
gtk_widget_set_usize(your_widget, -1, -1);
gtk_widget_set_usize(your_widget, new_x_size, new_y_size);
</programlisting>
<para>Another way to set the size of and/or move a window is to use
the <literal>gdk_window_move_resize()</literal> function which
uses to work fine both to grow or to shrink the window:</para>
<programlisting role="C">
gdk_window_move_resize(window->window,
x_pos, y_pos,
x_size, y_size);
</programlisting>
</sect1>

View File

@@ -1,3 +1,124 @@
2003-08-11 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkwidget.sgml: Document public GtkWidget members. (#119463)
2003-08-08 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-docs.sgml:
* gdk-pixbuf/gdk-pixbuf.sgml:
* gdk/gdk-docs.sgml: Add indices.
* gdk-pixbuf/gdk-pixbuf-sections.txt: Add GdkPixbufLoaderClass.
* gdk/gdk-sections.txt: Add GdkScreenClass and GdkDisplayClass.
2003-08-03 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf/tmpl/gdk-pixbuf.sgml: Clarify misleading explanation of rowstride. (#119000)
2003-07-29 Sven Neumann <sven@gimp.org>
* gdk/tmpl/pixmaps.sgml: Resurrected documentation that got lost
when the window parameter was renamed to drawable.
2003-07-21 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtktreemodel.sgml: Fix example. (#117972, Akira Tagoh)
* gtk/tmpl/gtkdnd.sgml: It is GTK_DEST_DEFAULT_DROP, not
GTK_DRAG_DEFAULT_DROP. (#117917, Tim-Philipp M<>ller)
2003-07-08 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkfilesel.sgml: Fix the example. (#116575)
2003-06-22 Matthias Clasen <matthias@localhost.localdomain>
* gdk-pixbuf/tmpl/gdk-pixbuf.sgml: Fix a typo.
2003-06-19 Matthias Clasen <maclas@gmx.de>
* gtk/question_index.sgml: Add a question about changing
fonts. And one about "Getting Started". (#114747, #108015)
2003-06-11 Matthias Clasen <maclas@gmx.de>
* gtk/tmpl/gtkdnd.sgml: Fix some typos.
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,17 @@
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
deprecated
html
xml
*.stamp
*.lo
.libs

View File

@@ -164,6 +164,7 @@ GDK_IS_PIXBUF_LOADER
GDK_PIXBUF_LOADER_CLASS
GDK_IS_PIXBUF_LOADER_CLASS
<SUBSECTION Private>
GdkPixbufLoaderClass
gdk_pixbuf_loader_get_type
</SECTION>

View File

@@ -113,6 +113,8 @@
&gdk-pixbuf-gdk-pixbuf-xlib-from-drawables;
&gdk-pixbuf-gdk-pixbuf-xlib-rgb;
</reference>
<index/>
&Porting-From-Imlib;

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>
@@ -51,7 +51,7 @@ information on error domains and error codes.
<para>
These values can be passed to
gdk_pixbuf_render_to_drawable_alpha() to control how the alpha
chanel of an image should be handled. This function can create a
channel of an image should be handled. This function can create a
bilevel clipping mask (black and white) and use it while painting
the image. In the future, when the X Window System gets an alpha
channel extension, it will be possible to do full alpha
@@ -71,7 +71,8 @@ In the future it will do full alpha compositing.
This is the main structure in the &gdk-pixbuf; library. It is
used to represent images. It contains information about the
image's pixel data, its color space, bits per sample, width and
height, and the rowstride or number of bytes between rows.
height, and the rowstride (the number of bytes between the start of
one row and the start of the next).
</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,17 @@
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
deprecated
html
xml
*.stamp
*.lo
.libs

View File

@@ -84,4 +84,7 @@
&gdk-X-Window-System-Interaction;
</reference>
<index/>
</book>

View File

@@ -149,6 +149,7 @@ GDK_IS_DISPLAY_CLASS
GDK_DISPLAY_GET_CLASS
<SUBSECTION Private>
GdkDisplayClass
gdk_display_open_default_libgtk_only
</SECTION>
@@ -203,10 +204,13 @@ gdk_screen_get_setting
GDK_SCREEN
GDK_IS_SCREEN
GDK_TYPE_SCREEN
gdk_screen_get_type
GDK_SCREEN_CLASS
GDK_IS_SCREEN_CLASS
GDK_SCREEN_GET_CLASS
<SUBSECTION Private>
GdkScreenClass
gdk_screen_get_type
</SECTION>
<SECTION>

View File

@@ -33,16 +33,14 @@ these types.
Create a new pixmap with a given size and depth.
</para>
@drawable:
@drawable: A #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL if @depth is specified,
@width: The width of the new pixmap in pixels.
@height: The height of the new pixmap in pixels.
@depth: The depth (number of bits per pixel) of the new pixmap.
If -1, and @window is not %NULL, the depth of the new
pixmap will be equal to that of @window.
If -1, and @drawable is not %NULL, the depth of the new
pixmap will be equal to that of @drawable.
@Returns: the #GdkPixmap
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap. Can be %NULL if @depth is specified,
<!-- ##### FUNCTION gdk_bitmap_create_from_data ##### -->
@@ -50,15 +48,13 @@ Create a new pixmap with a given size and depth.
Creates a new bitmap from data in XBM format.
</para>
@drawable:
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL, in which case the root
window is used.
@data: a pointer to the XBM data.
@width: the width of the new pixmap in pixels.
@height: the height of the new pixmap in pixels.
@Returns: the #GdkBitmap
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap. Can be %NULL, in which case the root window is
used.
<!-- ##### FUNCTION gdk_pixmap_create_from_data ##### -->
@@ -66,7 +62,8 @@ Creates a new bitmap from data in XBM format.
Create a two-color pixmap from data in XBM data.
</para>
@drawable:
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL, if the depth is given.
@data: a pointer to the data.
@width: the width of the new pixmap in pixels.
@height: the height of the new pixmap in pixels.
@@ -74,9 +71,6 @@ Create a two-color pixmap from data in XBM data.
@fg: the foreground color.
@bg: the background color.
@Returns: the #GdkPixmap
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap. Can be %NULL, if the depth is given.
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm ##### -->
@@ -84,7 +78,8 @@ Create a two-color pixmap from data in XBM data.
Create a pixmap from a XPM file.
</para>
@drawable:
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap.
@mask: a pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be %NULL,
in which case transparency will be ignored.
@@ -93,9 +88,6 @@ that are transparent in the input file. Can be %NULL,
in which case a default color will be used.
@filename: the filename of a file containing XPM data.
@Returns: the #GdkPixmap
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap.
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm ##### -->
@@ -103,7 +95,8 @@ in which case a default color will be used.
Create a pixmap from a XPM file using a particular colormap.
</para>
@drawable:
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL if @colormap is given.
@colormap: the #GdkColormap that the new pixmap will be use.
If omitted, the colormap for @window will be used.
@mask: a pointer to a place to store a bitmap representing
@@ -114,9 +107,6 @@ that are transparent in the input file. Can be %NULL,
in which case a default color will be used.
@filename: the filename of a file containing XPM data.
@Returns: the #GdkPixmap.
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap. Can be %NULL if @colormap is given.
<!-- ##### FUNCTION gdk_pixmap_create_from_xpm_d ##### -->
@@ -124,7 +114,8 @@ in which case a default color will be used.
Create a pixmap from data in XPM format.
</para>
@drawable:
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap.
@mask: Pointer to a place to store a bitmap representing
the transparency mask of the XPM file. Can be %NULL,
in which case transparency will be ignored.
@@ -133,9 +124,6 @@ that are transparent in the input file. Can be %NULL
in which case a default color will be used.
@data: Pointer to a string containing the XPM data.
@Returns: the #GdkPixmap
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap.
<!-- ##### FUNCTION gdk_pixmap_colormap_create_from_xpm_d ##### -->
@@ -144,7 +132,8 @@ Create a pixmap from data in XPM format using a particular
colormap.
</para>
@drawable:
@drawable: a #GdkDrawable, used to determine default values
for the new pixmap. Can be %NULL if @colormap is given.
@colormap: the #GdkColormap that the new pixmap will be use.
If omitted, the colormap for @window will be used.
@mask: a pointer to a place to store a bitmap representing
@@ -155,9 +144,6 @@ that are transparent in the input file. Can be %NULL,
in which case a default color will be used.
@data: Pointer to a string containing the XPM data.
@Returns: the #GdkPixmap.
<!-- # Unused Parameters # -->
@window: a #GdkWindow, used to determine default values for the
new pixmap. Can be %NULL if @colormap is given.
<!-- ##### MACRO gdk_pixmap_ref ##### -->
@@ -166,8 +152,6 @@ Deprecated equivalent of g_object_ref().
</para>
@Returns: @pixmap
<!-- # Unused Parameters # -->
@pixmap: a #GdkPixmap
<!-- ##### MACRO gdk_pixmap_unref ##### -->
@@ -175,8 +159,6 @@ Deprecated equivalent of g_object_ref().
Deprecated equivalent of g_object_unref().
</para>
<!-- # Unused Parameters # -->
@pixmap: a #GdkPixmap
<!-- ##### STRUCT GdkBitmap ##### -->
@@ -195,8 +177,6 @@ Deprecated equivalent of g_object_ref().
</para>
@Returns: @pixmap
<!-- # Unused Parameters # -->
@pixmap: a #GdkBitmap
<!-- ##### MACRO gdk_bitmap_unref ##### -->
@@ -204,7 +184,5 @@ Deprecated equivalent of g_object_ref().
Deprecated equivalent of g_object_unref().
</para>
<!-- # Unused Parameters # -->
@pixmap: a #GdkBitmap

View File

@@ -746,8 +746,15 @@ Registers a window as a potential drop destination.
<!-- ##### USER_FUNCTION GdkFilterFunc ##### -->
<para>
Specifies the type of function used to filter native events before they are
converted to GDK events. A filter may translate the native event to a GDK
event or handle it without translation.
converted to GDK events.
</para>
<para>
When a filter is called, @event is unpopulated, except for
<literal>event-&gt;window</literal>. The filter may translate the native
event to a GDK event and store the result in @event, or handle it without
translation. If the filter translates the event and processing should
continue, it should return <literal>GDK_FILTER_TRANSLATE</literal>.
</para>
@xevent: the native event to filter.
@@ -762,7 +769,8 @@ Specifies the result of applying a #GdkFilterFunc to a native event.
</para>
@GDK_FILTER_CONTINUE: event not handled, continue processing.
@GDK_FILTER_TRANSLATE: translated event stored.
@GDK_FILTER_TRANSLATE: native event translated into a GDK event and stored
in the <literal>event</literal> structure that was passed in.
@GDK_FILTER_REMOVE: event handled, terminate processing.
<!-- ##### TYPEDEF GdkXEvent ##### -->

View File

@@ -1,16 +1,18 @@
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
deprecated
html
xml
*.stamp
*.lo
.libs

View File

@@ -49,6 +49,7 @@ IGNORE_HFILES= \
gtktexttypes.h \
gtktextutil.h \
gtktypebuiltins.h \
gtkxembed.h \
xembed.h
# Images to copy into HTML directory
@@ -73,7 +74,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 +109,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 +297,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>
@@ -477,4 +477,6 @@ that is, GUI components such as #GtkButton or #GtkTextView.
</part>
<index/>
</book>

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

@@ -25,6 +25,22 @@ the question you have, this list is a good place to start.
<qandadiv><title>General</title>
<qandaentry>
<question><para>
How do I get started with GTK+?
</para></question>
<answer><para>
The GTK+ <ulink url="http://www.gtk.org">website</ulink> offers a
<ulink url="http://www.gtk.org/tutorial">tutorial</ulink> and a
<ulink url="http://www.gtk.org/faq">FAQ</ulink>. More documentation ranging
from whitepapers to online books can be found at the
<ulink url="http://developer.gnome.org/doc">GNOME developer's site</ulink>.
After studying these materials you should be well prepared to come back to
this reference manual for details.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Where can I get help with GTK+, submit a bug report, or make a feature
@@ -197,6 +213,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 +414,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 +547,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>
@@ -415,6 +631,48 @@ background of the event box.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
How do I change the font of a widget?
</para></question>
<answer><para>
This has several possible answers, depending on what exactly you want to
achieve. One option is <link
linkend="gtk-widget-modify-font">gtk_widget_modify_font()</link>. Note that this function can be used to change only the font size, as in the following example:
<programlisting>
PangoFontDesc *font_desc = pango_font_description_new ();
pango_font_description_set_size (font_desc, 40);
gtk_widget_modify_font (widget, font);
pango_font_description_free (font_desc);
</programlisting>
</para>
<para>
If you want to make the text of a label larger, you can use <link
linkend="gtk-label-set-markup">gtk_label_set_markup()</link>:
<programlisting>
gtk_label_set_markup (label, "&lt;big&gt;big text&lt;/big&gt;");
</programlisting>
This is preferred for many apps because it's a relative size to the
user's chosen font size. See <link
linkend="g-markup-escape-text">g_markup_escape_text()</link>
if you are constructing such strings on the fly.
</para>
<para>
You can also change the font of a widget by putting
<programlisting>
gtk-font-name = "Sans 30"
</programlisting>
in a resource file and parsing it with <link
linkend="gtk-rc-add-default-file">gtk_rc_add_default_file()</link>.
The advantage of a resource file is that users can then override the
font you've chosen. See
<link linkend="gtk-Resource-Files">GTK+ resource files</link> for more
discussion.
</para>
</answer>
</qandaentry>
<qandaentry>
<question><para>
How do I disable/ghost/desensitize a widget?
@@ -460,6 +718,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 +757,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 +816,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

@@ -35,7 +35,7 @@ of the user for a drag destination site.
If set for a widget, GTK+, during a drag over this
widget will check if the drag matches this widget's
list of possible targets and actions.
GTK+ will then call gtk_drag_status() as appropriate.
GTK+ will then call gdk_drag_status() as appropriate.
@GTK_DEST_DEFAULT_HIGHLIGHT:
If set for a widget, GTK+ will draw a highlight on
this widget as long as a drag is over this widget
@@ -44,7 +44,7 @@ of the user for a drag destination site.
If set for a widget, when a drop occurs, GTK+ will
will check if the drag matches this widget's
list of possible targets and actions. If so,
GTK+ will call gtk_drag_data_get() on behalf
GTK+ will call gtk_drag_get_data() on behalf
of the widget. Whether or not the drop is successful,
GTK+ will call gtk_drag_finish(). If the action
was a move, then if the drag was successful, then
@@ -63,10 +63,9 @@ constraints on an entry in a #GtkTargetTable.
@GTK_TARGET_SAME_APP:
If this is set, the target will only be selected
for drags within a single application.
@GTK_TARGET_SAME_WIDGET:
@GTK_TARGET_SAME_WIDGET:
If this is set, the target will only be selected
for drags within a single widget.
@GTK_TARGET_SAME_WIDGET:
<!-- ##### FUNCTION gtk_drag_dest_set ##### -->
<para>
@@ -94,7 +93,7 @@ Sets this widget as a proxy for drops to another window.
@proxy_window: the window to which to forward drag events
@protocol: the drag protocol which the @proxy_window accepts
(You can use gdk_drag_get_protocol() to determine this)
@use_coordinates: If true, send the same coordinates to the
@use_coordinates: If %TRUE, send the same coordinates to the
destination, because it is an embedded
subwindow.
@@ -158,7 +157,7 @@ is received or the retrieval fails, GTK+ will emit a
"drag_data_received" signal. Failure of the retrieval
is indicated by the length field of the @selection_data
signal parameter being negative. However, when gtk_drag_get_data()
is called implicitely because the %GTK_DRAG_DEFAULT_DROP was set,
is called implicitely because the %GTK_DEST_DEFAULT_DROP was set,
then the widget will not receive notification of failed
drops.
</para>

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,12 @@ 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 *widget, gpointer user_data) {
GtkWidget *file_selector = (GtkWidget *)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) {
@@ -52,7 +53,7 @@ void create_file_selection (void) {
g_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
"clicked",
G_CALLBACK (store_filename),
NULL);
(gpointer) file_selector);
/* Ensure that the dialog box is destroyed when the user clicks a button. */
@@ -118,6 +119,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

@@ -180,8 +180,8 @@ enum
g_print ("Row &percnt;d: (&percnt;s,&percnt;d)\n", row_count, str_data, int_data);
g_free (str_data);
row_count ++;
valid = gtk_tree_model_iter_next (model, &amp;iter))
row_count++;
valid = gtk_tree_model_iter_next (model, &amp;iter);
}
}
</programlisting>
@@ -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

@@ -32,6 +32,14 @@ gtk_widget_style_get_valist() to obtain the value of a style property.
</para>
@style: The style for the widget. The style contains the colors the widget should be
drawn in for each state along with graphics contexts used to draw with and the font
to use for text.
@requisition: The widgets desired size.
@allocation: The widgets allocated size.
@window: The widgets window or its parent window if it does not have a window. (Which
will be indicated by the #GTK_NO_WINDOW flag being set).
@parent:
<!-- ##### STRUCT GtkWidgetClass ##### -->
<para>
@@ -49,6 +57,7 @@ handles the emission.
Implementation of this signal is optional.
</para>
@parent_class:
@activate_signal:
@set_scroll_adjustments_signal:

File diff suppressed because it is too large Load Diff

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,194 @@
Mon Aug 18 10:25:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_to_csource): Add the correct
alignment magic for Sun compiler and for GCC to get
the strings aligned. (Patch from Brian Cameron, #117217)
2003-08-14 Matthias Clasen <maclas@gmx.de>
* gdk-pixdata.c (gdk_pixdata_to_csource): Improve doc comment
wording. (#119754, Doug Quale)
2003-08-03 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf.c (gdk_pixbuf_get_rowstride):
* gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Clarify misleading explanation of
rowstride. (#119000)
2003-07-18 Matthias Clasen <maclas@gmx.de>
* pixops/pixops.c (correct_total): Split correction into multiple pieces if no single weight is large
enough to apply the unsplit correction. (#117431, problem reported by Tomas <20>gren)
2003-07-11 Matthias Clasen <maclas@gmx.de>
* queryloaders.c (query_module): Handle absolute filenames properly. (#117170, Jens Elkner)
2003-06-28 Matthias Clasen <maclas@gmx.de>
* io-ico.c (DecodeHeader): Stop discriminating against 32bpp ICOs a): Use the byte
size of the image as a heuristic when selecting the bitmap to load - this lets us
select 32bpp bitmaps which come after a 8bpp bitmap.
(OneLineTransp): Stop discriminating against 32bpp ICOs b): Don't overwrite the
alpha channel of 32bpp ICOs.
(gdk_pixbuf__ico_image_load_increment): Stop decoding the header unnecessarily.
2003-06-23 Matthias Clasen <maclas@gmx.de>
* io-gif.c (gif_get_frame_info): Remove the pointless refusal to load images with dubious
disposal mode on the first frame. Just ignore it, as everybody else does.
2003-06-22 Matthias Clasen <maclas@gmx.de>
* io-gif.c (gif_get_extension): Reset block_count to 0 for all application extensions, otherwise the data blocks
of unknown extensions are not propertly skipped.
2003-06-21 Matthias Clasen <maclas@gmx.de>
* io-gif.c (gif_get_frame_info): Don't stop on empty frames.
(gif_get_lzw): Handle empty frames as 1x1 transparent
pixbufs. (#106962, Federico Mena Quintero)
2003-06-21 Matthias Clasen <maclas@gmx.de>
* io-gif.c (gif_get_lzw): Correct the calls to update_func() to
consistently specify animation-relative data.
(gif_get_frame_info): When debugging, also dump whether the
frame is interlaced.
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

@@ -36,7 +36,7 @@
* @bits_per_sample: Number of bits per sample.
* @width: Width of the image in pixels.
* @height: Height of the image in pixels.
* @rowstride: Distance in bytes between rows.
* @rowstride: Distance in bytes between row starts.
* @destroy_fn: Function used to free the data when the pixbuf's reference count
* drops to zero, or %NULL if the data should not be freed.
* @destroy_fn_data: Closure data to pass to the destroy notification function.

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;
}
@@ -395,9 +395,10 @@ gdk_pixbuf_get_height (const GdkPixbuf *pixbuf)
* gdk_pixbuf_get_rowstride:
* @pixbuf: A pixbuf.
*
* Queries the rowstride of a pixbuf, which is the number of bytes between rows.
* Queries the rowstride of a pixbuf, which is the number of bytes between the start of a row
* and the start of the next row.
*
* Return value: Number of bytes between rows.
* Return value: Distance between row starts.
**/
int
gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf)

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);
@@ -578,7 +578,7 @@ save_rle_decoder (GString *gstring,
* into programs.
*
* GTK+ ships with a program called <command>gdk-pixbuf-csource</command>
* which offers a cmdline interface to this functions.
* which offers a command line interface to this function.
*
* Returns: a newly-allocated string containing the C source form
* of @pixdata.
@@ -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)
@@ -727,10 +727,22 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
img_buffer = stream;
img_buffer_end = stream + stream_length;
APPEND (gstring, "#ifdef __SUNPRO_C\n");
APPEND (gstring, "#pragma align 4 (%s)\n", name);
APPEND (gstring, "#endif\n");
APPEND (gstring, "#ifdef __GNUC__\n");
APPEND (gstring, "%s%s%s %s[] __attribute__ ((__aligned__ (4))) = \n",
cdata.static_prefix, cdata.const_prefix,
cdata.dump_gtypes ? "guint8" : "unsigned char",
name);
APPEND (gstring, "#else\n");
APPEND (gstring, "%s%s%s %s[] = \n",
cdata.static_prefix, cdata.const_prefix,
cdata.dump_gtypes ? "guint8" : "unsigned char",
name);
APPEND (gstring, "#endif\n");
APPEND (gstring, "{ \"\"\n /* Pixbuf magic (0x%x) */\n \"",
GDK_PIXBUF_MAGIC_NUMBER);
cdata.pos = 3;
@@ -819,7 +831,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 +860,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

@@ -63,7 +63,8 @@
#undef DUMP_IMAGE_DETAILS
#undef DUMP_IMAGE_DETAILS
#undef IO_GIFDEBUG
#define MAXCOLORMAPSIZE 256
#define MAX_LZW_BITS 12
@@ -250,7 +251,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 */
@@ -409,8 +410,8 @@ gif_get_extension (GifContext *context)
if (!strncmp (context->block_buf, "NETSCAPE2.0", 11) ||
!strncmp (context->block_buf, "ANIMEXTS1.0", 11)) {
context->in_loop_extension = TRUE;
context->block_count = 0;
}
context->block_count = 0;
}
if (context->in_loop_extension) {
do {
@@ -792,12 +793,31 @@ gif_get_lzw (GifContext *context)
context->frame->composited = NULL;
context->frame->revert = NULL;
context->frame->pixbuf =
gdk_pixbuf_new (GDK_COLORSPACE_RGB,
TRUE,
8,
context->frame_len,
context->frame_height);
if (context->frame_len == 0 || context->frame_height == 0) {
/* An empty frame, we just output a single transparent
* pixel at (0, 0).
*/
context->x_offset = 0;
context->y_offset = 0;
context->frame_len = 1;
context->frame_height = 1;
context->frame->pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
if (context->frame->pixbuf) {
guchar *pixels;
pixels = gdk_pixbuf_get_pixels (context->frame->pixbuf);
pixels[0] = 0;
pixels[1] = 0;
pixels[2] = 0;
pixels[3] = 0;
}
} else
context->frame->pixbuf =
gdk_pixbuf_new (GDK_COLORSPACE_RGB,
TRUE,
8,
context->frame_len,
context->frame_height);
if (!context->frame->pixbuf) {
g_free (context->frame);
g_set_error (context->error,
@@ -987,7 +1007,8 @@ gif_get_lzw (GifContext *context)
if (lower_bound <= upper_bound && first_pass == context->draw_pass) {
(* context->update_func)
(context->frame->pixbuf,
0, lower_bound,
context->frame->x_offset,
context->frame->y_offset + lower_bound,
gdk_pixbuf_get_width (context->frame->pixbuf),
upper_bound - lower_bound,
context->user_data);
@@ -1011,9 +1032,9 @@ gif_get_lzw (GifContext *context)
(* context->update_func)
(context->frame->pixbuf,
context->frame->x_offset,
lower_bound + context->frame->y_offset,
context->frame->y_offset + lower_bound,
gdk_pixbuf_get_width (context->frame->pixbuf),
gdk_pixbuf_get_height (context->frame->pixbuf),
gdk_pixbuf_get_height (context->frame->pixbuf) - lower_bound,
context->user_data);
}
}
@@ -1179,17 +1200,6 @@ gif_get_frame_info (GifContext *context)
context->x_offset = LM_to_uint (buf[0], buf[1]);
context->y_offset = LM_to_uint (buf[2], buf[3]);
if ((context->frame_height == 0) || (context->frame_len == 0)) {
context->state = GIF_DONE;
g_set_error (context->error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("GIF image contained a frame with height or width 0."));
return -2;
}
if (((context->frame_height + context->y_offset) > context->height) ||
((context->frame_len + context->x_offset) > context->width)) {
/* All frames must fit in the image bounds */
@@ -1206,26 +1216,19 @@ gif_get_frame_info (GifContext *context)
if (context->animation->frames == NULL &&
context->gif89.disposal == 3) {
/* First frame can't have "revert to previous" as its
* dispose mode.
* dispose mode. Silently use "retain" instead.
*/
context->state = GIF_DONE;
g_set_error (context->error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("First frame of GIF image had 'revert to previous' as its disposal mode."));
return -2;
context->gif89.disposal = 0;
}
context->frame_interlace = BitSet (buf[8], INTERLACE);
#ifdef DUMP_IMAGE_DETAILS
g_print (">width: %d height: %d xoffset: %d yoffset: %d disposal: %d delay: %d transparent: %d\n",
g_print (">width: %d height: %d xoffset: %d yoffset: %d disposal: %d delay: %d transparent: %d interlace: %d\n",
context->frame_len, context->frame_height, context->x_offset, context->y_offset,
context->gif89.disposal, context->gif89.delay_time, context->gif89.transparent);
context->gif89.disposal, context->gif89.delay_time, context->gif89.transparent, context->frame_interlace);
#endif
context->frame_interlace = BitSet (buf[8], INTERLACE);
if (BitSet (buf[8], LOCALCOLORMAP)) {
#ifdef DUMP_IMAGE_DETAILS

View File

@@ -191,9 +191,8 @@ static void DecodeHeader(guchar *Data, gint Bytes,
GError **error)
{
/* For ICO's we have to be very clever. There are multiple images possible
in an .ICO. For now, we select (in order of priority):
1) The one with the highest number of colors
2) The largest one
in an .ICO. As a simple heuristic, we select the image which occupies the
largest number of bytes.
*/
gint IconCount = 0; /* The number of icon-versions in the file */
@@ -231,18 +230,11 @@ static void DecodeHeader(guchar *Data, gint Bytes,
State->DIBoffset = 0;
Ptr = Data + 6;
for (I=0;I<IconCount;I++) {
int ThisWidth, ThisHeight,ThisColors;
int ThisScore;
ThisWidth = Ptr[0];
ThisHeight = Ptr[1];
ThisColors = (Ptr[2]);
if (ThisColors==0)
ThisColors=256; /* Yes, this is in the spec, ugh */
ThisScore = ThisColors*1024+ThisWidth*ThisHeight;
ThisScore = (Ptr[11] << 24) + (Ptr[10] << 16) + (Ptr[9] << 8) + (Ptr[8]);
if (ThisScore>State->ImageScore) {
if (ThisScore>=State->ImageScore) {
State->ImageScore = ThisScore;
State->x_hot = (Ptr[5] << 8) + Ptr[4];
State->y_hot = (Ptr[7] << 8) + Ptr[6];
@@ -370,7 +362,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 +483,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;
@@ -690,6 +683,10 @@ static void OneLineTransp(struct ico_progressive_state *context)
gint X;
guchar *Pixels;
/* Ignore the XOR mask for XP style 32-bpp icons with alpha */
if (context->Header.depth == 32)
return;
X = 0;
if (context->Header.Negative == 0)
Pixels = (context->pixbuf->pixels +
@@ -826,7 +823,7 @@ gdk_pixbuf__ico_image_load_increment(gpointer data,
}
if (context->HeaderDone >= 6) {
if (context->HeaderDone >= 6 && context->pixbuf == NULL) {
GError *decode_err = NULL;
DecodeHeader(context->HeaderBuf,
context->HeaderDone, context, &decode_err);

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

@@ -1078,22 +1078,29 @@ pixops_process (guchar *dest_buf,
static void
correct_total (int *weights,
int n_x,
int n_y,
int total,
double overall_alpha)
int n_x,
int n_y,
int total,
double overall_alpha)
{
int correction = (int)(0.5 + 65536 * overall_alpha) - total;
int i;
for (i = n_x * n_y - 1; i >= 0; i--)
int remaining, c, d, i;
if (correction != 0)
{
if (*(weights + i) + correction >= 0)
{
*(weights + i) += correction;
break;
}
remaining = correction;
for (d = 1, c = correction; c != 0 && remaining != 0; d++, c = correction / d)
for (i = n_x * n_y - 1; i >= 0 && c != 0 && remaining != 0; i--)
if (*(weights + i) + c >= 0)
{
*(weights + i) += c;
remaining -= c;
if ((0 < remaining && remaining < c) ||
(0 > remaining && remaining > c))
c = remaining;
}
}
}
}
static void
tile_make_weights (PixopsFilter *filter, double x_scale, double y_scale, double overall_alpha)

View File

@@ -64,20 +64,29 @@ query_module (const char *dir, const char *file)
char **ext;
const GdkPixbufModulePattern *pattern;
if (g_path_is_absolute (dir))
if (g_path_is_absolute (file))
path = g_strdup (file);
else
path = g_build_filename (dir, file, NULL);
else {
char *cwd = g_get_current_dir ();
path = g_build_filename (cwd, dir, file, NULL);
g_free (cwd);
}
module = g_module_open (path, 0);
if (module &&
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 +110,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

@@ -103,14 +103,13 @@ gdk_arg_context_parse (GdkArgContext *context, gint *argc, gchar ***argv)
{
int i, j, k;
/* Save a copy of the original argc and argv */
if (argc && argv)
{
for (i = 1; i < *argc; i++)
{
char *arg;
if (!(*argv)[i][0] == '-' && (*argv)[i][1] == '-')
if (!((*argv)[i][0] == '-' && (*argv)[i][1] == '-'))
continue;
arg = (*argv)[i] + 2;
@@ -294,6 +293,7 @@ gdk_parse_args (int *argc,
gdk_initialized = TRUE;
/* Save a copy of the original argc and argv */
if (argc && argv)
{
gdk_argc = *argc;
@@ -302,17 +302,17 @@ gdk_parse_args (int *argc,
for (i = 0; i < gdk_argc; i++)
gdk_argv[i] = g_strdup ((*argv)[i]);
gdk_argv[gdk_argc] = NULL;
}
if (*argc > 0)
{
gchar *d;
d = strrchr((*argv)[0], G_DIR_SEPARATOR);
if (d != NULL)
g_set_prgname (d + 1);
else
g_set_prgname ((*argv)[0]);
}
if (argc && argv && *argc > 0)
{
gchar *d;
d = strrchr((*argv)[0], G_DIR_SEPARATOR);
if (d != NULL)
g_set_prgname (d + 1);
else
g_set_prgname ((*argv)[0]);
}
else
{

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
@@ -175,6 +186,7 @@ EXPORTS
gdk_font_type_get_type
gdk_font_unref
gdk_fontset_load
gdk_fontset_load_for_display
gdk_free_compound_text
gdk_free_text_list
gdk_function_get_type
@@ -287,6 +299,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 +351,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 +367,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
@@ -380,6 +402,7 @@ EXPORTS
gdk_string_height
gdk_string_measure
gdk_string_to_compound_text
gdk_string_to_compound_text_for_display
gdk_string_width
gdk_subwindow_mode_get_type
gdk_synthesize_window_state
@@ -521,4 +544,3 @@ EXPORTS
gdk_window_withdraw
gdk_wm_decoration_get_type
gdk_wm_function_get_type

View File

@@ -494,15 +494,18 @@ gdk_display_get_window_at_pointer (GdkDisplay *display,
gint *win_y)
{
gint tmp_x, tmp_y;
GdkWindow *window;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return display->pointer_hooks->window_at_pointer (display, &tmp_x, &tmp_y);
window = display->pointer_hooks->window_at_pointer (display, &tmp_x, &tmp_y);
if (win_x)
*win_x = tmp_x;
if (win_y)
*win_y = tmp_y;
return window;
}
/**

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

@@ -48,7 +48,9 @@ typedef void GdkXEvent; /* Can be cast to window system specific
typedef enum {
GDK_FILTER_CONTINUE, /* Event not handled, continue processesing */
GDK_FILTER_TRANSLATE, /* Translated event stored */
GDK_FILTER_TRANSLATE, /* Native event translated into a GDK event and
stored in the "event" structure that was
passed in */
GDK_FILTER_REMOVE /* Terminate processing, removing event */
} GdkFilterReturn;

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

@@ -1715,10 +1715,6 @@ gdk_region_spans_intersect_foreach (GdkRegion *region,
if ((!region->numRects) || (n_spans == 0))
return;
y = span->y;
left = span->x;
right = span->x + span->width; /* right is not in the span! */
/* The main method here is to step along the
* sorted rectangles and spans in lock step, and
* clipping the spans that are in the current

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