Compare commits

...

256 Commits

Author SHA1 Message Date
Owen Taylor 749a1639cc Released 2.0.6
Wed Jul 31 16:42:03 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 2.0.6

        * configure.in: 2.0.6, binary, interface age 6.
        Require GLib version 2.0.6.

        * NEWS: Updated
2002-07-31 22:19:53 +00:00
Sven Neumann cec2b23e6b Fix wrong number of parameters in call to escape_string().
2002-07-31  Sven Neumann  <sven@gimp.org>

	* gtk/queryimmodules.c (print_escaped): Fix wrong number of
	parameters in call to escape_string().
2002-07-31 18:40:23 +00:00
Owen Taylor f361d10ca1 Avoid using g_strescape(), since it mangles UTF-8, (#89479, Yao Zhang.)
Wed Jul 31 12:50:51 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/queryimmodules.c: Avoid using g_strescape(),
        since it mangles UTF-8, (#89479, Yao Zhang.)
2002-07-31 16:55:28 +00:00
Sven Neumann ff76a7c353 free the result of gdk_pixdata_serialize() (bug #89411).
2002-07-31  Sven Neumann  <sven@gimp.org>

	* gdk-pixdata.c (gdk_pixdata_to_csource): free the result of
	gdk_pixdata_serialize() (bug #89411).
2002-07-31 08:14:55 +00:00
Owen Taylor 5582c1f311 Handle inverted ranges correctly (#85436, fix from Norihiro UMEDA)
Tue Jul 30 19:09:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrange.c (gtk_range_scroll_event): Handle
        inverted ranges correctly (#85436, fix from
        Norihiro UMEDA)
2002-07-30 23:18:04 +00:00
Owen Taylor 37a25985d1 Fix bug in the selection mode option menus which were setting the wrong
Tue Jul 30 16:36:53 2002  Owen Taylor  <otaylor@redhat.com>

        * tests/testgtk.c: Fix bug in the selection mode option
        menus which were setting the wrong values.
        (#85763, Manuel Op de Coul)
2002-07-30 20:43:25 +00:00
Owen Taylor 82b355f5a8 Honor GDK_PIXBUF_CSOURCE from configure.in when cross-compiling. (#87099,
Tue Jul 30 15:39:06 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/Makefile.am: Honor GDK_PIXBUF_CSOURCE from
        configure.in when cross-compiling. (#87099,
        J. Ali Harlow)
2002-07-30 20:00:28 +00:00
Owen Taylor c5e483055c Fix some warnings by adding casts to PixopsInterpType. (#85839, David L.
Mon Jul 29 23:06:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk-pixbuf-scale.c: Fix some warnings by adding
        casts to PixopsInterpType. (#85839, David L. Cooper, II.)
2002-07-30 03:09:04 +00:00
Owen Taylor b0f8c022a3 Fix up the example program a bit. (#88814, Johnson Wong)
Mon Jul 29 22:36:06 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/tmpl/gtkfilesel.sgml: Fix up the example program
        a bit. (#88814, Johnson Wong)
2002-07-30 02:40:07 +00:00
Owen Taylor f29f8665fd Unset gtk-im-surrounding-info object data again. (Fix from Yao Zhang,
Mon Jul 29 16:42:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontext.c (gtk_im_context_real_get_surrounding):
        Unset gtk-im-surrounding-info object data again.
        (Fix from Yao Zhang, #86811)
2002-07-29 21:04:29 +00:00
Owen Taylor 071ba60b6e Replace uses of grep \(A\|B\) ... with egrep (A|B). (#84872, Arnaud
Fri Jul 26 17:59:06 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Replace uses of grep \(A\|B\) ... with
        egrep (A|B). (#84872, Arnaud Charlet)
2002-07-26 22:19:17 +00:00
Kristian Rietveld d9d3beb099 return FALSE, (gtk_tree_store_finalize): use g_node_traverse instead of
Fri Jul 26 21:39:21 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (node_free): return FALSE,
        (gtk_tree_store_finalize): use g_node_traverse instead of
        g_node_children_foreach, so the whole tree will be freed (#88854,
        patch from Emmanuel Briot).
2002-07-26 19:37:53 +00:00
Kristian Rietveld f85c1d6f26 fix some memleaks, (#84426, patch from Matthias Clasen).
Fri Jul 26 21:24:03 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_button_press): fix some memleaks,
        (#84426, patch from Matthias Clasen).
2002-07-26 19:16:49 +00:00
Kristian Rietveld e71cac0e1a _iter_children check shouldn't be in g_return_return_val_if_fail (pointed
Fri Jul 26 17:11:25 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_unref_tree_helper): _iter_children
        check shouldn't be in g_return_return_val_if_fail (pointed out by
        Josh Green, #88997),
        (gtk_tree_view_set_model): call _gtk_tree_view_column_unset_model
        for each column when we unset the model (part of #82484),
        (gtk_tree_view_get_cell_area): return if we ran out of tree or
        if we got an invalid path (#82376).

        * gtk/gtktreeprivate.h: add _gtk_tree_view_column_unset_model.

        * gtk/gtktreeviewcolumn.c: implement _gtk_tree_view_column_unset_model
        which disconnects the sort_column_changed_signal (part of #82484).

        * gtk/gtkliststore.c (gtk_list_store_insert): append row if the
        given postion is off the end of the tree (#85813).

        * gtk/gtkentry.c (gtk_cell_editable_key_press_event): let's use
        2-space indent, commit changes if up/down keys has been pressed,
        this overrides the focus key foo so the user won't be surprised
        (#84665).
2002-07-26 18:12:28 +00:00
Changwoo Ryu 28235d58b4 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-07-26 18:10:22 +00:00
Matthias Clasen 0bc92be1c2 Use gdk_rgb_convert_4, not gdk_rgb_convert_8 for depth 4, bpp 8,
* gdk/gdkrgb.c (gdk_rgb_select_conv): Use gdk_rgb_convert_4,
	not gdk_rgb_convert_8 for depth 4, bpp 8, PseudoColor visuals.
	(#88697)
2002-07-25 20:30:00 +00:00
Owen Taylor 398405fdac When a menubar is up, use F10 to cycle menubars, not Control-Tab (#87159,
Thu Jul 25 14:14:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.c: When a menubar is up, use F10 to cycle
        menubars, not Control-Tab (#87159, Calum Benson. Patch from
        Padraig O'Briain.)

        * gtk/gtkmenubar.c: When cycling menu bars, cancel
        after the last instead of wrapping around.
2002-07-25 18:18:37 +00:00
Owen Taylor 658c98d77a [ Patch from Padraig O'Briain, #87904 ]
Thu Jul 25 11:57:57 2002  Owen Taylor  <otaylor@redhat.com>

        [ Patch from Padraig O'Briain, #87904 ]

        * gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
        use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
        g_signal new.

        * gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
        Always focus the widget, even when we are activating
        as well.
2002-07-25 16:09:26 +00:00
Dmitry Mastrukov a672bb715a ru.po: Updated Russian translation with help from SUN G11n <gnome_int_l10n@ireland.sun.com>. 2002-07-25 04:45:48 +00:00
Owen Taylor 2042a08ab0 ed Jul 24 16:43:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c docs/references/tmpl/gtkrc.sgml: Don't use
        GTK_RC_FILES, since it causes problems with what KDE (etc.)
        does to customize GTK+ themes, use GTK2_RC_FILES instead. (#88987)
2002-07-24 20:52:22 +00:00
Stanislav Visnovsky 9e38c2e5ec Updated Slovak translation.
2002-07-24  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-07-24 12:59:22 +00:00
Yanko Kaneti dd0f5b6567 Updated Bulgarian translation.
2002-07-23  Yanko Kaneti <yaneti@declera.com>

        * bg.po: Updated Bulgarian translation.
2002-07-23 11:56:09 +00:00
Jordi Mallach 69c615fcb1 Updated Catalan translation. 2002-07-22 11:02:31 +00:00
Changwoo Ryu 643006f533 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-07-21 12:33:50 +00:00
Christophe Merlet f2bfc7d2c7 Updated French translation. 2002-07-21 10:02:54 +00:00
Kjartan Maraas 7904d1d663 Update slightly 2002-07-20 23:16:36 +00:00
Ole Laursen 25dc1c37fe Updated Danish translation.
2002-07-19  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-07-19 21:25:39 +00:00
Takayuki KUSANO fbbc6bb79b Updated Japanese translation.
* ja.po: Updated Japanese translation.
2002-07-19 14:55:43 +00:00
Chyla Zbigniew ca4cc77b50 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-07-19 14:03:25 +00:00
Dmitry Mastrukov b096092530 ru.po: Updated Russian translation. 2002-07-18 17:39:09 +00:00
Christian Rose 09ffe845d9 Updated Swedish translation.
2002-07-17  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-07-17 08:42:09 +00:00
Matthias Clasen 57c4adc842 Support for compressed ras images (#84994):
* io-ras.c (RAS2State): Error on unsupported ras variations.
	(OneLine8): Fix colormap indexing.
	(OneLine): Call updated_func with proper region.
	(DoCompressed): New function, handles compressed ras data.
	(gdk_pixbuf__ras_image_load_increment): Handle compressed ras
	images.
2002-07-16 17:31:23 +00:00
Sven Neumann e7fd4ff587 fixed the example code (return TRUE from the expose_event handler).
2002-07-16  Sven Neumann  <sven@gimp.org>

	* gdk/tmpl/rgb.sgml: fixed the example code (return TRUE from the
	expose_event handler).
2002-07-16 17:21:02 +00:00
Federico Mena Quintero 5b6c1d4f92 Fixed the LSB -> MSB case. Fixes #79463.
2002-07-16  Federico Mena Quintero  <federico@ximian.com>

	* gdk/gdkpixbuf-drawable.c (rgb565lsb): Fixed the LSB -> MSB case.
	Fixes #79463.
2002-07-16 17:14:26 +00:00
Ole Laursen 73ffaf1b0d Updated Danish translation.
2002-07-13  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-07-13 12:49:44 +00:00
Pablo Saratxaga 31a101fb95 updated Vietnamese file 2002-07-12 14:59:00 +00:00
Peteris Krisjanis 58f1891795 *configure.in - (ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
*configure.in - (ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11 05:30:01 +00:00
Peteris Krisjanis f4d3373525 (ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
(ALL_LINGUAS) Added Latvian (lv) language support.
2002-07-11 05:29:38 +00:00
Peteris Krisjanis 3b8378fb2f lv.po (added) - Added Latvian translation.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
* lv.po (added) - Added Latvian translation.
2002-07-11 05:28:28 +00:00
Peteris Krisjanis 1b44a18767 Added Latvian translation.
2002-07-11  Peteris Krisjanis <pecisk@inbox.lv>
Added Latvian translation.
2002-07-11 05:27:37 +00:00
jacob berkman 8cfb7a3a7f activate the menu item so old apps work properly
2002-07-10  jacob berkman  <jacob@ximian.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_scroll_event): activate the
	menu item so old apps work properly
2002-07-10 18:46:34 +00:00
Owen Taylor 2c67a17bc5 Fix some cases where signal connection IDs where being assigned to guint
Wed Jul 10 14:27:14 2002  Owen Taylor  <otaylor@redhat.com>

        * modules/input/gtkimcontextxim.c gtk/gtkcolorsel.c
        gtk/gtkdialog.c gtk/gtktextbtree.c: Fix some cases
        where signal connection IDs where being assigned to
        guint rather than gulong. (part of #87281, Shivram U)
2002-07-10 18:30:41 +00:00
Jordi Mallach c1dc8eed15 Updated Catalan translation. 2002-07-10 16:49:31 +00:00
Kjartan Maraas f1e4445bce Updated Norwegian (bokml) translation.
2002-07-10  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-07-10 10:48:03 +00:00
Dmitry Mastrukov c4f5ad3a0f ru.po: Updated Russian translation. 2002-07-10 04:41:25 +00:00
Changwoo Ryu e067c2a9c4 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-07-09 10:56:49 +00:00
Chyla Zbigniew 609b29d2a8 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-07-08 10:30:30 +00:00
Christophe Fergeau 45664bc0f6 Updated French translation 2002-07-07 12:10:01 +00:00
Matthias Clasen 6ee45ace1b Correct computation of image height. (OneLine): Correct update
* io-ico.c (DecodeHeader): Correct computation of image height.
	(OneLine): Correct update notification.
2002-07-06 23:55:47 +00:00
Christian Rose 5f425b9f27 Updated Swedish translation.
2002-07-06  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-07-06 19:50:19 +00:00
Christophe Fergeau 2fe21816cc Updated French translation 2002-07-06 11:39:41 +00:00
Matthias Clasen adc808729b Handle global_error == NULL better. (tiff_image_parse): Don't trust
* io-tiff.c (tiff_set_error): Handle global_error == NULL
	better.
	(tiff_image_parse): Don't trust TIFFRGBAImageBegin to set
	the "put" routine.  (Fixes #87384)
	(gdk_pixbuf__tiff_image_stop_load): Don't call TIFFClose too
	early.
2002-07-06 08:55:20 +00:00
Owen Taylor 94946ec0e4 Add an extra parameter to _gtk_menu_item_select_first() to allow us to
Fri Jul  5 20:18:23 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.[ch] gtk/gtkmenubar.c gtk/gtkmenuitem.c
        gtk/gtkentry.c gtk/gtktextview.c: Add an extra parameter
        to _gtk_menu_item_select_first() to allow us to choose
        whether we want to select the first item predictably
        or to select the first sensitive item. Fixes problem
        with insensitive menu items and keynav. (#85796,
        reported by Bill Haneman and others.)
2002-07-06 00:24:28 +00:00
Jonathan Blandford b8c0aff312 fix warning. (gtk_tree_view_search_iter): fix warning, #85884
Fri Jul  5 02:50:24 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_collapse_all): fix warning.
	(gtk_tree_view_search_iter): fix warning, #85884

	* gtk/gtktreestore.c (gtk_tree_store_get_flags): change return
	value to GtkTreeModelFlags to fix compiler warning, #85883

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_get_flags): change
	return value to GtkTreeModelFlags to fix compiler warning, #85882

	* gtk/gtktreemodel.c (gtk_tree_path_prepend_index): fix compiler
	warning, #85881
2002-07-05 06:56:08 +00:00
Kristian Rietveld bf033cc8e6 also update ->tail after sorting.
Thu Jul  4 19:49:08 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkliststore.c (gtk_list_store_sort): also update ->tail after
        sorting.
2002-07-04 17:39:57 +00:00
Matthias Clasen 81ecb7e80a New function to avoid crashes on unchecked reallocs. (DecodeHeader,
* io-bmp.c (grow_buffer): New function to avoid crashes
	on unchecked reallocs.
	(DecodeHeader, DecodeColormap, decode_bitmasks,
	DoCompressed): Use grow_buffer instead of g_realloc
	throughout. Change signatures where necessary to pass the
	errors up.  (#85448)
	(OneLine16): Fix loading of 16bpp BI_RGB bmps.  (#86286)
2002-07-02 17:51:27 +00:00
Stanislav Visnovsky 87943c865c Updated Slovak translation.
2002-07-02  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-07-02 15:05:50 +00:00
Jonathan Blandford 582a76843a only validate the visible area if we've ever been requisitioned.
Tue Jul  2 00:33:26 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (validate_visible_area): only validate the
	visible area if we've ever been requisitioned.
2002-07-02 04:34:48 +00:00
Jonathan Blandford e44ece4e36 sync up white space/variable names to match tree_store equiv.
Mon Jul  1 17:04:09 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkliststore.c (gtk_list_store_real_set_value): sync up
	white space/variable names to match tree_store equiv.

	* gtk/gtktreestore.c (gtk_tree_store_real_set_value): sort if we
	set the value.
2002-07-01 21:15:26 +00:00
Bill Haneman 60baed1179 Fix for gdk_pixbuf_xlib_get_from_drawable, to handle root window drawable. 2002-07-01 13:42:07 +00:00
Pablo Saratxaga 1457497c10 updated Vietnamese file 2002-06-30 22:09:24 +00:00
Sven Neumann 3a259d847d converted a Tab to spaces.
2002-06-28  Sven Neumann  <sven@gimp.org>

	* gdk-pixbuf-csource.c (print_blurb): converted a Tab to spaces.
2002-06-28 14:15:43 +00:00
Changwoo Ryu 9aff7ba8e5 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-06-21 06:59:20 +00:00
Yanko Kaneti 0d37ee8e59 Added Bulgarian (bg).
2002-06-18  Yanko Kaneti <yaneti@declera.com>

   * configure.in: (ALL_LINGUAS) Added Bulgarian (bg).

po/

   * bg.po (added): Bulgarian translation by
   Borislav Aleksandrov <B.Aleksandrov@cnsys.bg>.
2002-06-18 20:20:20 +00:00
Pablo Saratxaga ab237e4a09 updated Vietnamese file 2002-06-18 13:59:26 +00:00
Ole Laursen 549ed2d785 Updated Danish translation.
2002-06-17  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-06-17 21:20:19 +00:00
Vincent van Adrighem 09065c7696 Dutch translation updated by Tino Meinen.
2002-06-16 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
        * nl.po: Dutch translation updated by Tino Meinen.
2002-06-16 22:42:34 +00:00
Kjartan Maraas 39c59caa9d Update 2002-06-16 18:56:53 +00:00
Owen Taylor f7d4be45ff fix bugzilla references 2002-06-16 13:48:28 +00:00
Carlos Perello Marin f84c758861 Updated Spanish translation.
2002-06-16  Carlos Perello Marin <carlos@gnome-db.org>

	* es.po: Updated Spanish translation.
2002-06-16 13:03:21 +00:00
Owen Taylor 9af4e2c2c1 at Jun 15 23:21:24 2002 Owen Taylor <otaylor@redhat.com>
* Released 2.0.5

        * configure.in: Version 2.0.5, binary, interface age 5.

        * NEWS: Updated.
2002-06-16 05:37:12 +00:00
Owen Taylor 387cbde678 Remove conflict indicators 2002-06-16 03:59:29 +00:00
Owen Taylor 9e783527b3 Actually use the UTF-8 filename, so we actually fix #83386.
Sat Jun 15 23:53:03 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (gtk_file_selection_set_filename):
        Actually use the UTF-8 filename, so we actually
        fix #83386.

        * tests/testgtk.c: Remember the directory as a
        test of gtk_file_selection_set_filename().
2002-06-16 03:59:06 +00:00
Owen Taylor 472348534f at Jun 15 23:05:19 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (gtk_file_selection_set_filename):
        Fix backwards asssertion. (#85434)
2002-06-16 03:12:36 +00:00
Duarte Loreto 35fbd14600 Updated Portuguese translation.
2002-06-16  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2002-06-16 00:49:19 +00:00
James M. Cape a66732b586 Notify about "background-full-height-set", not "bg_full_height_set".
Sat Jun 15 16:10:00 2002  James M. Cape <jcape@ignore-your.tv>

	* gtk/gtktexttag.c (gtk_text_tag_set_property):
	Notify about "background-full-height-set", not
	"bg_full_height_set".
2002-06-15 21:10:59 +00:00
Andraz Tori cf694bc246 Updated Slovenian translation 2002-06-15 15:56:23 +00:00
Owen Taylor e3585dacce Released 2.0.4.
Fri Jun 14 12:50:21 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 2.0.4.

        * configure.in: 2.0.3, interface, binary age 4.

        * gtk/gtktreeselection.c gtk/gtktreeview.c gtk/gtkwindow.c
          gtk/gtkrc.c: Some doc SGML fixes.
2002-06-14 21:07:12 +00:00
Jonathan Blandford 2696fbc98f Fix bug #84268, where validate_rows sometimes didn't remove itself
Fri Jun 14 15:41:50 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c: Fix bug #84268, where validate_rows sometimes
	didn't remove itself correctly.  Thanks to Dave Camp for the fix.
2002-06-14 19:43:16 +00:00
Jonathan Blandford 1dc1b2c93f disconnect_by_func instead of disconnect_by_data. Someone else could use
Fri Jun 14 15:09:11 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_set_adjustments):
	disconnect_by_func instead of disconnect_by_data.  Someone else
	could use the same data as us.

	* gtk/gtktreeview.c (do_validate_rows): update the adjustment
	immediately after we update the size.  Fixes some scroll_to bugs.
	(validate_visible_area): ditto
2002-06-14 19:20:32 +00:00
Takayuki KUSANO 1d7f1372d0 Updated 2002-06-14 18:54:48 +00:00
Takayuki KUSANO ec0e05525f Updated Japanese translation.
* ja.po: Updated Japanese translation.
2002-06-14 17:13:50 +00:00
Owen Taylor 9c8d313f38 Ignore state change events for windows that aren't our toplevels. (#84482,
Fri Jun 14 10:31:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed):
        Ignore state change events for windows that aren't
        our toplevels. (#84482, Thomas Leonard)
2002-06-14 14:34:22 +00:00
Owen Taylor bf4292b24c Add missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). (Report of
Fri Jun 14 10:00:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkwindow.c (gdk_window_update_idle): Add
        missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE().
        (Report of non-thread-safety from Nicholas Allen)

        * gtk/gtkmain.c (rewrite_events_translate): Fix sign
        problem with coordinate translation. (Fix from
        Robin Lu, #85229)
2002-06-14 14:15:32 +00:00
Chyla Zbigniew ceea5ef8fe Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-06-14 08:24:47 +00:00
Owen Taylor 56bc856b71 Fix type names for GtkIconSet, GtkIconSource, GtkSelectionData, GtkBorder,
Thu Jun 13 19:41:56 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkiconfactory.c gtk/gtkselection.c gtk/gtkstyle.c
        gtk/gtktextiter.c gtk/gtktexttag.c gtk/gtktreemodel.c
        gtk/gtkwidget.c: Fix type names for GtkIconSet,
        GtkIconSource, GtkSelectionData, GtkBorder, GtkTextIter,
        GtkTextAttributes, GtkTreePath, GtkTreeIter,
        GtkRequisition, which were all registered as GtkType*.
        (#84634, James Henstridge; patch from Jonathan Blandford.)

        * NEWS: Updates.
2002-06-13 23:45:32 +00:00
Owen Taylor 31be1165be hu Jun 13 18:48:14 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c: Make work
        gdk_colormap_sync() work for DirectColor visuals
        as well. Fill in the ->colors array in
        gdk_screen_get_system_colormap () for DirectColor visuals.
        (#81954, Based on a patch from shivaram.upadhyayula@wipro.com)
2002-06-13 22:53:08 +00:00
Owen Taylor 36446419a3 Fix problem where when no alpha was involved, we scaled rather than
Thu Jun 13 18:11:11 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Fix problem where when no alpha was
        involved, we scaled rather than composited, but then
        went ahead and composited anyways. (#76958, Patch
        from Matthias Clasen) Needs to be merged to GNOME
        1.4 gdk-pixbuf.
2002-06-13 22:11:41 +00:00
Owen Taylor dafcd60b6c Add the obsolete CUA cut/copy/paste bindings. (#79078)
Thu Jun 13 17:50:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c gtk/gtkentry.c: Add the obsolete
        CUA cut/copy/paste bindings. (#79078)

        * gtk/gtktextview.c gtk/gtkentry.c: Make <Shift>BackSpace
        a synonym for for Backspace. (#80302, Jeff Waugh)
2002-06-13 22:06:17 +00:00
Owen Taylor 0c27054e73 Ignore all client events that were sent to a window that we don't know
Thu Jun 13 15:02:49 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c: Ignore all client events that
        were sent to a window that we don't know about or
        to a foreign window. (#81543, Young-Ho, Cha)
2002-06-13 19:36:14 +00:00
Jordi Mallach 8c5d2437f7 Updated Catalan translation. 2002-06-13 17:30:58 +00:00
Christian Rose 57fbd241ff Remove po/desk.pl and po/update.pl.
2002-06-13  Christian Rose  <menthos@menthos.com>

	* Makefile.am (EXTRA_DIST): Remove po/desk.pl and
	po/update.pl.
2002-06-13 16:35:30 +00:00
Owen Taylor 610a91de25 Fix so that the encoding of the filename is handled properly in the case
Thu Jun 13 12:24:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfilesel.c (gtk_file_selection_set_filename):
        Fix so that the encoding of the filename is handled
        properly in the case of non-UTF-8 filesystems;
        document the encoding. (#83386, Sebastian Ritau)

        * gtk/gtkfilesel.c (filenames_drag_get): Remove
        debug printf. Fix UTF-8 / filename encoding
        confusion.
2002-06-13 16:32:45 +00:00
Owen Taylor 138d13b2a4 Don't return a positive status unless there is a text target in the drag.
Thu Jun 13 12:01:36 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c (gtk_entry_drag_motion): Don't return
        a positive status unless there is a text target in
        the drag. (#83386, Thomas Leonard.)
2002-06-13 16:04:10 +00:00
jacob berkman 4d8116d641 remove po/README.tools
2002-06-13  jacob berkman  <jacob@ximian.com>

	* Makefile.am (EXTRA_DIST): remove po/README.tools
2002-06-13 15:58:26 +00:00
Owen Taylor 432d618f51 Save the initial grab time, use that when changing the pointer. (#83052,
Thu Jun 13 11:36:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Save
        the initial grab time, use that when changing the
        pointer. (#83052, help from Dave Camp tracking it down.)
2002-06-13 15:56:35 +00:00
Kristian Rietveld ca8c78aecf traverse all nodes, not just the leafs (pointed out by Josh Parsons)
Thu Jun 13 16:36:40 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (gtk_tree_store_finalize): traverse all nodes,
        not just the leafs (pointed out by Josh Parsons)
2002-06-13 14:28:04 +00:00
Christian Rose 5fc9179fce Removed. These are obsoleted by intltool. Updated Swedish translation.
2002-06-13  Christian Rose  <menthos@menthos.com>

	* desk.pl, update.pl, update.sh, README.tools: Removed. These are
	obsoleted by intltool.
	* sv.po: Updated Swedish translation.
2002-06-13 07:04:44 +00:00
Havoc Pennington 7e9215c616 check that pango has Xft2 support, instead of checking whether Xft2
2002-06-12  Havoc Pennington  <hp@redhat.com>

	* configure.in: check that pango has Xft2 support, instead of
	checking whether Xft2 exists.
2002-06-12 22:29:10 +00:00
Owen Taylor 51d3f7330c Add an informative g_warning() when the entry has lost a focus-out-event.
Wed Jun 12 17:46:53 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkentry.c (blink_cb): Add an informative
        g_warning() when the entry has lost a focus-out-event.
        (#78305, Michel Selten)
2002-06-12 21:47:59 +00:00
Owen Taylor dfbb9d64b5 Check to see if the menu item is selectable before setting
Wed Jun 12 17:31:15 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenushell.c (gtk_menu_shell_real_select_item):
        Check to see if the menu item is selectable before
        setting menu_shell->active_menu_item. This hopefully
        will keep gail from getting confused.
        (#84115, Remus Draica)
2002-06-12 21:32:12 +00:00
Owen Taylor f0032274a8 Fix bug where if CENTER_ON_PARENT was set, but there was no parent,
Wed Jun 12 17:13:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_move_resize): Fix bug
        where if CENTER_ON_PARENT was set, but there was
        no parent, GDK_HINT_POS would be set, resulting
        in a dialog at 0,0. (#83479, Havoc Pennington)
2002-06-12 21:19:13 +00:00
Owen Taylor f7b6505060 When fetching the menubars for the window for F10 handling, only add
Wed Jun 12 16:34:13 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmenubar.c: When fetching the menubars for
        the window for F10 handling, only add viewable menu
        bars. (Apparently, people sometimes put menu bars
        in notebook pages!) (Tim Janik, #82627)
2002-06-12 20:42:23 +00:00
Owen Taylor e4d9682836 Clamp size of child to at least 1x1. (#82431, Boris Shingarov.)
Wed Jun 12 16:21:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate):
        Clamp size of child to at least 1x1. (#82431,
        Boris Shingarov.)
2002-06-12 20:23:21 +00:00
Owen Taylor c994d518a8 Handle 0 increment, to fix division-by-zero problem. (#82816, George
Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
        0 increment, to fix division-by-zero problem.
        (#82816, George Lebl.)
2002-06-12 19:42:36 +00:00
Owen Taylor a8ebb5a029 ed Jun 12 15:38:01 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
        Fix memory leak. (Patch from Matthias Clasen, #84926)

        * gtk/gtkrange.c (gtk_range_init): Initialize
        mouse_x, mouse_y to -1,-1. (#84871, Garrett Lesage)
2002-06-12 19:37:29 +00:00
Owen Taylor bd67c09866 Allow NULL for widget path or class path as documented. (#83150, Sergey
Wed Jun 12 15:08:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrc.c (gtk_rc_get_style_by_paths): Allow
        NULL for widget path or class path as documented.
        (#83150, Sergey Kuzminov)
2002-06-12 19:08:46 +00:00
Owen Taylor cac66b0176 Fix ZWJ => ZWN typo. (#83092, Tino Meinen)
Wed Jun 12 15:02:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextutil.c: Fix ZWJ => ZWN typo.
        (#83092, Tino Meinen)
2002-06-12 19:01:46 +00:00
Owen Taylor 18d5d86346 Fix some problems with case statements for checking for omitted deps.
Wed Jun 12 14:41:43 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Fix some problems with case statements
        for checking for omitted deps. (#84202, Jacob Berkman.)

        * configure.in: Remove USE_X11R6_XIM checks since we
        no longer use them.
2002-06-12 18:48:27 +00:00
Owen Taylor 8ed5317593 ed Jun 12 14:18:45 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimcontextsimple.c: Add compose sequences
        of dead_acute + c/C => C WITH CEDDILLA.
        (Nano Golveia, #83492)
2002-06-12 18:22:12 +00:00
Federico Mena Quintero f2167ac6fe New functions to fetch 32 or 16-bit little-endian values starting at a
2002-06-07  Federico Mena Quintero  <federico@ximian.com>

	* io-bmp.c (lsb_32):
	(lsb_16): New functions to fetch 32 or 16-bit little-endian values
	starting at a specific memory location.  We do this instead of
	GINT32_FROM_LE() as the latter is simply dereferences a cast,
	which doesn't work on platforms with alignment requirements.
	Fixes #84083.
2002-06-10 16:56:42 +00:00
Daniel Elstner 09d622339a Remove duplicated message. Although it was commented, my gettext (0.11.2)
2002-06-10  Daniel Elstner  <daniel.elstner@gmx.net>

* pt_BR.po: Remove duplicated message.  Although it was commented, my gettext (0.11.2) didn't like it.
2002-06-10 13:53:04 +00:00
Gustavo Noronha Silva d922c751d5 updating translation... I used pt.po to "bootstrap" the missing
messages and reviewed most of them
2002-06-10 03:27:37 +00:00
Matthias Clasen 529b689a35 Don't leak child_anchor_table. (#84425)
* gtk/gtktextbtree.c (_gtk_text_btree_unref): Don't leak
	child_anchor_table.  (#84425)

	* gtk/gtktextlayout.c (gtk_text_layout_finalize): Don't leak
	one_display_cache.  (#84424)
2002-06-09 20:37:18 +00:00
Andraz Tori 50ad2bb2e7 Updated Slovenian translation 2002-06-09 19:49:01 +00:00
Christophe Merlet 70b686742c Updated French translation. 2002-06-08 17:34:08 +00:00
Jonathan Blandford 0c0f6961cb Fix sizing bug.
Fri Jun  7 23:11:42 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreeview.c (gtk_tree_view_real_expand_row): Fix sizing
	bug.

	* docs/reference/gtk/tmpl/gtkbutton.sgml: Remove ^M's.
2002-06-08 06:14:59 +00:00
Matthias Clasen 55fcbecc93 New function, split off from gtk_tree_view_column_clear_attributes.
* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_clear_attributes_by_info): New function,
	split off from gtk_tree_view_column_clear_attributes.
	(gtk_tree_view_column_clear_attributes):
	(gtk_tree_view_column_finalize):  Call the new function, avoid
	recalculating the info from the renderer.  (#84413)

	* gtk/gtktextview.c (text_view_child_new_anchored): Initialize
	vc->type in order to avoid a later UMR.  (#84415)
2002-06-07 21:59:55 +00:00
Andraz Tori 8dedc77abd Updated Slovenian translation 2002-06-07 19:50:36 +00:00
Matthias Clasen 45fe0becc7 Set hardware_keycode for KeyRelease events. (#84305)
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Set
	hardware_keycode for KeyRelease events.  (#84305)
2002-06-06 21:01:34 +00:00
Tivo Leedjrv 5530d73ca0 Fixed previous error.
2002-06-06  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Fixed previous error.
2002-06-06 19:19:27 +00:00
jacob berkman e80f1861d0 revert previous commit as it yields "invalid multibyte sequence" errors
2002-06-06  jacob berkman  <jacob@ximian.com>

	* et.po: revert previous commit as it yields "invalid multibyte
	sequence" errors
2002-06-06 18:38:01 +00:00
Owen Taylor c7fab5a23d Don't redraw when the area is completely above the visible area.
Thu May 23 15:44:30 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c (changed_handler): Don't redraw
        when the area is completely above the visible area.
2002-06-06 15:45:02 +00:00
Kristian Rietveld 8aea6870a7 don't leak the GArray (figured out by Matthias Clasen, fixes #82026).
Thu Jun  6 17:34:00 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkrbtree.c (_gtk_rbtree_reorder): don't leak the GArray
        (figured out by Matthias Clasen, fixes #82026).
2002-06-06 15:25:33 +00:00
Tivo Leedjrv f677652d7d Fix.
2002-06-06  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Fix.
2002-06-06 15:09:57 +00:00
Dmitry Mastrukov a27ca7142b ru.po: Updated Russian translation. 2002-06-06 03:53:40 +00:00
Vincent van Adrighem 8ee4f373fe Dutch translation updated.
2002-06-04 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Dutch translation updated.
2002-06-04 21:57:49 +00:00
Owen Taylor 1a53f723c4 If we have xft .pc file, use that when checking for Xft/Xrender. (Still
Tue Jun  4 17:39:34 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: If we have xft .pc file, use that
        when checking for Xft/Xrender. (Still need to separate
        out HAVE_XFT, HAVE_RENDER)

        * configure.in: Make sure Xft cflags come before X cflags.
2002-06-04 21:53:22 +00:00
Hasbullah Bin Pit 6c1036e9e9 Updated Malay Translation.
2002-06-04  Hasbullah Bin Pit <sebol@ikhlas.com>

* ms.po: Updated Malay Translation.
2002-06-04 20:25:56 +00:00
Tivo Leedjrv bfa5cea589 Updated Estonian translation.
2002-06-04  Tivo Leedjrv  <toivo@linux.ee>

        * et.po: Updated Estonian translation.
2002-06-04 17:29:23 +00:00
Chyla Zbigniew 2d3fabf22f Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-06-04 17:15:22 +00:00
Daniel Elstner 9d432c2f96 Really fix #83796: Revert jrb's last patch, and move the second if-clause
2002-06-04  Daniel Elstner  <daniel.elstner@gmx.net>

* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render): Really fix #83796: Revert jrb's last patch, and move the second if-clause into the fist one's else-branch.  This is also what the other cell renderers do.
2002-06-04 16:06:39 +00:00
George Lebl cd20b58e1b update
Mon Jun 03 16:41:45 2002  George Lebl <jirka@5z.com>

	* cs.po: update
2002-06-03 23:31:36 +00:00
Federico Mena Quintero 057bccc78e Fix the MSB -> MSB case. Fixes #79190.
2002-06-03  Federico Mena Quintero  <federico@ximian.com>

	* gdk/gdkpixbuf-drawable.c (rgb565msb): Fix the MSB -> MSB case.
	Fixes #79190.
2002-06-03 17:38:49 +00:00
Jordi Mallach 62f50bfa0e Minor Catalan updates. 2002-06-03 01:23:43 +00:00
Christian Rose 028d675264 Updated Catalan translation by Jordi Mallach <jordi@sindominio.net>.
2002-06-02  Christian Rose  <menthos@menthos.com>

	* ca.po: Updated Catalan translation by
	Jordi Mallach <jordi@sindominio.net>.
2002-06-02 22:12:56 +00:00
Carlos Perell Marn adccef1bd0 Updated Spanish translation by Juan Manuel Garca Molina
2002-06-01  Carlos Perell Marn <carlos@gnome-db.org>

	* es.po: Updated Spanish translation by Juan Manuel Garca Molina
	<juanma_gm@wanadoo.es>
2002-06-01 22:08:23 +00:00
Jonathan Blandford eacffc9508 add missing flag, #83796
Sat Jun  1 10:38:24 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	add missing flag, #83796
2002-06-01 15:04:57 +00:00
Matthias Clasen d89fd19f87 Accept xbms starting with a C comment - those seem to be not uncommon,
* gdk-pixbuf-io.c (pixbuf_check_xbm): Accept xbms starting
	with a C comment - those seem to be not uncommon, e.g. the Gimp
	produces them.  (#82706)

	* io-xbm.c (read_bitmap_file_data): Don't leak memory on certain
	invalid inputs.
	(gdk_pixbuf__xbm_image_load_real): Don't leak memory on valid inputs.
2002-05-31 23:43:04 +00:00
Isam Bayazidi 78dc4e83a2 adding a no accelerator PO 2002-05-31 20:41:45 +00:00
Michael Meeks 5cb0f9b3a5 destroy the transfer window if the grab fails so we don't get events on
2002-05-30  Michael Meeks  <michael@ximian.com>

	* gtk/gtkmenu.c (gtk_menu_popup): destroy the transfer
	window if the grab fails so we don't get events on this
	window after the menu is finalized with a duff GtkWidget
	pointer: #82366
2002-05-31 16:36:39 +00:00
Shivram U 85bb7d41e1 Check if the owner got is of type GDK_WINDOW_FOREIGN. If so the owner is
Mon May 28 13:28:10  Shivram U  <shivaram.upadhyayula@wipro.com>

	* gtk/gtktextbuffer.c (selection_data_get_buffer): Check if the owner
	got is of type GDK_WINDOW_FOREIGN. If so the owner is not in-process,
	and so return NULL.
2002-05-30 09:41:45 +00:00
Michael Meeks 66dd5d22e6 don't leak the paths.
2002-05-24  Michael Meeks  <michael@ximian.com>

	* gtk/gtkmain.c (_gtk_find_module): don't leak the paths.
2002-05-30 09:27:54 +00:00
Soeren Sandmann a367726d57 revert accidentally committed changes
Thu May 30 07:27:05 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gdk/gdkwindow.c: revert accidentally committed changes
2002-05-30 05:24:20 +00:00
Soeren Sandmann 0a474992c2 add gtk_menu_style_set(). Fixes #79345.
Thu May 30 07:12:02 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_style_set): add
	gtk_menu_style_set(). Fixes #79345.
2002-05-30 05:12:30 +00:00
Tor Lillqvist 05f883f5b6 Use the "logical dpi" to calculate (pseudo) physical sizes. Similar to the
2002-05-30  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkmain-win32.c (gdk_screen_width_mm,
	gdk_screen_height_mm): Use the "logical dpi" to calculate
	(pseudo) physical sizes. Similar to the use of "logical dpi" in
	Pango as suggested by Joaquin Cuenca Abela.

	Two fixes by Florent Duguet:

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_cursor): Correct
	semantics for setting cursor to NULL (should use cursor of parent
	window).

	* gdk/win32/gdkgc-win32.c (gdk_win32_hdc_get): Plug memory
	leak.
2002-05-29 22:21:59 +00:00
Dave Camp 08cc81743b Disconnect from keypress events.
2002-05-29  Dave Camp  <dave@ximian.com>

	* gtk/gtkdnd.c (gtk_drag_end): Disconnect from keypress events.
2002-05-29 19:22:51 +00:00
Chyla Zbigniew c6e0fe3855 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-29 15:42:58 +00:00
Ole Laursen 46f5b022e5 Changed translation of redo.
2002-05-29  Ole Laursen  <olau@hardworking.dk>

	* da.po: Changed translation of redo.
2002-05-29 10:58:41 +00:00
Vincent van Adrighem 301e78d7db Minor changes to the translation (Tino Meinen).
2002-05-28 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Minor changes to the translation (Tino Meinen).
2002-05-28 09:46:16 +00:00
Duarte Loreto de549ecdd3 Updated Portuguese translation.
2002-05-28  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2002-05-28 01:31:31 +00:00
Daniel Elstner d8880ebb77 Fixes for #83190
2002-05-27  Daniel Elstner  <daniel.elstner@gmx.net>

Fixes for #83190

* gtk/gtktreedatalist.h (_GtkTreeDataList::data): Add missing fields to anonymous union: glong, gulong, gint64 and guint64.  This is an internal header file, so it should not affect ABI or API compatibility.

* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value): Implement missing support for glong, gulong, gint64 and guint64 fundamental types.  Use data.v_uint instead of data.v_int for G_TYPE_FLAGS, as GValue does.
(_gtk_tree_data_list_value_to_node): ditto
(_gtk_tree_data_list_node_copy): Add case labels for missing fundamental types, and reorder them to match the other functions.
(gtk_tree_data_list_compare_func): Implement comparison for glong, gulong, gint64 and guint64.  Use g_value_get_enum() for G_TYPE_ENUM and g_value_get_flags() for G_TYPE_FLAGS, rather than accessing them as gint/guint.  The G_VALUE_HOLDS() check probably won't like this.
2002-05-27 22:33:17 +00:00
Vincent van Adrighem 383ddaa39e Dutch translation updated by Tino Meinen.
2002-05-27 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
	* nl.po: Dutch translation updated by Tino Meinen.
2002-05-27 15:35:24 +00:00
Isam Bayazidi ebb80c587e adding Arabic file 2002-05-26 22:56:38 +00:00
Carlos Perello Marin c50b3669ee Updated by Gustavo Noronha Silva <kov@debian.org> && converted into UTF-8
2002-05-26  Carlos Perello Marin <carlos@gnome-db.org>

	* pt_BR.po: Updated by Gustavo Noronha Silva <kov@debian.org> &&
	converted into UTF-8
2002-05-26 19:15:02 +00:00
Isam Bayazidi 2a0c24e934 -fixing Arabic view 2002-05-24 23:11:39 +00:00
Isam Bayazidi 44bb96f2c8 - adding Arabic translation file 2002-05-24 22:15:41 +00:00
Dave Camp 8a846eb737 Built an iter directly instead of using
2002-05-24  Dave Camp  <dave@ximian.com>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted):
	Built an iter directly instead of using
	gtk_tree_model_sort_elt_get_path(), since that returns a path for
	the child model.
2002-05-24 18:37:28 +00:00
Dave Camp 1209ae2cc8 oops, fixed typo in the last commit 2002-05-24 16:50:53 +00:00
Dave Camp ce69e17c53 Use indices[i] >= level->array->len rather than level->array->len >
2002-05-24  Dave Camp  <dave@ximian.com>

	* gtk/gtktreemodelsort.c: Use indices[i] >= level->array->len
	rather than level->array->len > indices[i] in the bounds check.
2002-05-24 15:52:30 +00:00
Owen Taylor c577abf769 Released 2.0.3.
Thu May 23 17:19:16 2002  Owen Taylor  <otaylor@redhat.com>

        * Released 2.0.3.

        * gtk/gtktooltips.c (gtk_tooltips_event_handler): Disable
        tooltips for menu items with submenus .. they still
        don't really work properly.

        * gtk/gtkwindow.c (gtk_window_move_resize): Clear
        initial_pos_set even if it only causes a move, not
        a resize as well.

        * configure.in: GTK+-2.0.3, interface age, binary age 3.

        * NEWS: Updated.
2002-05-23 22:01:51 +00:00
Jonathan Blandford 4794f2b309 revert last change until I am more sure of it 2002-05-23 15:31:41 +00:00
Jonathan Blandford 6fe89cc83a Check the parentage of a newly inserted node.
Thu May 23 11:08:09 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_row_inserted): Check the
	parentage of a newly inserted node.
2002-05-23 15:15:37 +00:00
Kjartan Maraas edf587b5d0 Update 2002-05-23 10:28:01 +00:00
Tor Lillqvist cef800524a Use correct path to the loaders and immodules directories
2002-05-23  Tor Lillqvist  <tml@iki.fi>

	* gtk-zip.sh.in: Use correct path to the loaders and immodules
	directories (GTK_BINARY_VERSION, not GTK_VERSION).
2002-05-22 21:01:18 +00:00
Federico Mena Quintero 44fb34e048 Make the top of the ChangeLog match the one in HEAD - Federico 2002-05-22 20:35:00 +00:00
Federico Mena Quintero fa5b3494ce Ahem, take the rowstride into account!!! Fixes #82515.
2002-05-22  Federico Mena Quintero  <federico@ximian.com>

	* io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
	account!!!  Fixes #82515.

	[This bug is not present in the GNOME 1.4 branch as its XPM loader
	does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
	no row padding and then uses gdk_pixbuf_new_from_data() on it.]

	[IMPORTANT: The comment above is to make my life easier when
	merging stuff across branches.  If you make changes to gdk-pixbuf
	in either branch, please include a comment in the ChangeLog that
	indicates whether this should be merged into the other branch.
	Thanks!]
2002-05-22 20:31:50 +00:00
Federico Mena Quintero 980b21ed3a Ahem, take the rowstride into account!!! Fixes #82515.
2002-05-22  Federico Mena Quintero  <federico@ximian.com>

        * io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
        account!!!  Fixes #82515.

        [This bug is not present in the GNOME 1.4 branch as its XPM loader
        does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
        no row padding and then uses gdk_pixbuf_new_from_data() on it.]

        [IMPORTANT: The comment above is to make my life easier when
        merging stuff across branches.  If you make changes to gdk-pixbuf
        in either branch, please include a comment in the ChangeLog that
        indicates whether this should be merged into the other branch.
        Thanks!]
2002-05-22 20:28:15 +00:00
Owen Taylor 565c6e3ba5 Require autoconf-2.52 explicitely, since otherwise Debian will process it
Wed May 22 16:12:38 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in: Require autoconf-2.52 explicitely,
        since otherwise Debian will process it with 2.13 (ugh!).
2002-05-22 20:16:48 +00:00
Tor Lillqvist de4153065e Use GTK_BINARY_VERSION (and not GTK_VERSION) in the path to the loaders on
2002-05-22  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf-io.c (get_libdir): Use GTK_BINARY_VERSION (and not
	GTK_VERSION) in the path to the loaders on Win32, too.

	* Makefile.am: Pass GTK_BINARY_VERSION.
2002-05-22 19:34:03 +00:00
Jonathan Blandford a7cef089a8 remove GTK_RESIZE_QUEUE setting.
Wed May 22 12:29:20 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_init): remove
	GTK_RESIZE_QUEUE setting.
2002-05-22 16:34:49 +00:00
Owen Taylor c2a0b5322c Fix missing dereference. (HideToshi Tajima)
Tue May 21 16:46:15 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkmain-x11.c (gdk_internal_connection_watch):
        Fix missing dereference. (HideToshi Tajima)
2002-05-21 20:51:30 +00:00
Owen Taylor 1b4ae4ff25 Conditionalize GTK_IS_PLUG() check on GDK_WINDOWING_X11. (Problem reported
Tue May 21 15:33:32 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_show): Conditionalize
        GTK_IS_PLUG() check on GDK_WINDOWING_X11. (Problem
        reported by Sven Neumann)
2002-05-21 19:33:10 +00:00
George Lebl 0d4e66328c update a few strings, that is at least the ones I see the most so that
Tue May 21 10:13:27 2002  George Lebl <jirka@5z.com>

	* cs.po: update a few strings, that is at least the ones I see
	  the most so that things speak at least somewhat czech to me
2002-05-21 17:03:47 +00:00
Owen Taylor 91ba6c2dc6 Patch from HideToshi Tajima to handle Xlib internal connections. (#76681)
Mon May 20 15:02:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdisplay-x11.c: Patch from HideToshi Tajima
        to handle Xlib internal connections. (#76681)
2002-05-20 19:04:24 +00:00
Owen Taylor a57801b074 on May 20 12:59:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c: Set the private LEAVE_PENDING
        flag to fix problem where with menu items with
        submenus, tooltips were getting stuck. (Effectively
        disables tooltips for menu items with submenus.)
        (Bug #75961, Soeren Sandmann)

        * tests/testgtk.c: Set a tooltip on a menu item
        with a submenu.
2002-05-20 17:06:59 +00:00
Owen Taylor c1b5a2d0ef Undo an accidental revert of fixes of May 16. (Caught by Padraig O'Briain)
Mon May 20 11:47:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c: Undo an accidental revert of
        fixes of May 16. (Caught by Padraig O'Briain)
2002-05-20 15:52:08 +00:00
Owen Taylor 785183c7fb Fix bug where size request for text cells was being overwritten. (#82264,
Mon May 20 11:38:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkctree.c (cell_size_request): Fix bug where
        size request for text cells was being overwritten.
        (#82264, Graham Swallow.)
2002-05-20 15:42:43 +00:00
Chyla Zbigniew c2929809ff Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-19 09:03:35 +00:00
Vlad Harchev 840d2ef409 ru.po: updated russian translation from Dmitry G. Mastrukov 2002-05-19 03:57:52 +00:00
Christian Rose a9274b2f0c Updated Swedish translation.
2002-05-19  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-05-19 02:39:42 +00:00
Matthias Clasen 32931e7d08 Check for endianness.
* configure.in: Check for endianness.

	* io-tiff.c (tiff_image_parse): fix packing order on bigendian
	systems.  (#81702)
2002-05-18 14:54:37 +00:00
Owen Taylor 410b70f907 Only optimize out the full configure handling if we got a gratuitous
Thu May 16 19:49:24 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_configure_event): Only
        optimize out the full configure handling if we got
        a gratuitous configure event(configure_request_count == 0)
        and the size didn't change.

        * gtk/gtkwindow.c (gtk_window_move_resize): Use
        g_message(), not g_print() for debug spew.

        * gtk/gtkwindow.c (gtk_window_real_set_focus): Ref
        the old and new focus widgets for the scope of
        the function.

        * gtk/gtksocket.c gtkplug.c: Remove various #if 0'd
        bits of old code.

        * gtk/gtksocket.c gtk/gtkplug.c: Enhance debug messages.
2002-05-17 21:44:37 +00:00
Owen Taylor 0aa1bd5e97 Protect against reentrancy problems by emitting ::preedit_changed at the
Fri May 17 14:40:24 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimmulticontext.c (gtk_im_multicontext_set_slave):
        Protect against reentrancy problems by emitting
        ::preedit_changed at the end, fixing input context
        leak. (Yao Zhang)

        * modules/input/gtkimcontextxim.c (status_window_free):
        Patch from Federico Mena Quintero to fix problem where
        references to IMContextXIM were kept around after
        module was unloaded.

        * gtk/gtkdnd.c (gtk_drag_dest_set): NULL initialize
        proxy window.
2002-05-17 19:28:35 +00:00
Kjartan Maraas d7542b9af8 Update 2002-05-17 19:25:37 +00:00
Owen Taylor 859145de52 Fix a missing unref in the local/passive case. (#82067, Michael Meeks)
Fri May 17 13:56:23 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.c (gtk_plug_filter_func): Fix a missing
        unref in the local/passive case. (#82067, Michael
        Meeks)

        * gtk/gtkplug.c (_gtk_plug_remove_from_socket): Fix
        reference leak on the plug window.

        * tests/testsocket.c (add_child): Fix memory leak.

        * gtk/gtkdnd.c (gtk_drag_dest_site_destroy): Unref
        the proxy window.
2002-05-17 18:15:19 +00:00
Pablo Saratxaga 5d2db8f012 Updated Catalan, Vietnamese and Walloon file 2002-05-17 10:07:22 +00:00
Owen Taylor 1fa83a74f5 Thu May 16 18:47:29 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_show): Disable the focus-some-one code for GtkPlug descendants. * gtk/gtkplug.c (gtk_plug_focus_event): Eat focus-in/out events since they can be generated by keyboard grabs, but are spurious for an embeddded widget. (#79196, Padraig O'Briain) * gtk/gtksocket.c (gtk_socket_size_request): Only pay attention to the minimum size hints, and changes to that ... ignore the default size. * gtk/gtksocket.c (gtk_socket_send_configure_event): Pass in root-window relative coordinates as per the ICCCM. * gtk/gtksocket.c (gtk_socket_size_allocate): Send as many synthetic configures as necessary to make up for ConfigureRequest events we got. (#78799, Dave Camp.) 2002-05-16 23:37:30 +00:00
Kristian Rietveld cb9aff42c7 set the prev of the next node correctly, so we don't corrupt the list and
Thu May 16 23:59:56 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreestore.c (gtk_tree_store_sort_iter_changed): set the prev
        of the next node correctly, so we don't corrupt the list and cause
        bad things. (fixes #71374)
2002-05-16 22:15:30 +00:00
Jonathan Blandford 1124ea7c72 include missing #ifdef G_ENABLE_DEBUG
Thu May 16 17:29:08 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkrbtree.c (_gtk_rbtree_remove): include missing #ifdef G_ENABLE_DEBUG
2002-05-16 21:35:58 +00:00
Owen Taylor ec80b47977 Fix typo in earlier patch.
Thu May 16 15:44:15 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/gtk-demo/editable_cells.c (cell_edited): Fix
	typo in	earlier	patch.
2002-05-16 19:44:17 +00:00
Owen Taylor 1fd687f7c2 Don't filter control-shift+[non-hex]. (#80252, reported by Nalin
Tue May  7 15:50:51 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
        Don't filter control-shift+[non-hex].
        (#80252, reported by Nalin Dahyabhai)
2002-05-16 19:41:09 +00:00
Owen Taylor f1fa35441e Patch from Matthias Clasen to fix some typos (#77246)
Thu May 16 15:17:30 2002  Owen Taylor  <otaylor@redhat.com>

        * pixops/pixops.c: Patch from Matthias Clasen to fix some typos
        (#77246)
2002-05-16 19:18:14 +00:00
Owen Taylor d7b7242847 Fixes for #78258
Thu May 16 14:51:14 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for #78258

        * gtk/gtkrbtree.c demos/gtk-demo/editable-cells.c:
        Fix some 64-bit warning problems. (Patch from Matthias
        Clasen.)

        * gtk/gtkrbtree.c (_gtk_rbtree_debug_spew_helper): Surround
        a bunch of debug code with G_ENABLE_DEBUG.

        * configure.in demos/gtk-demo/main.c: Replace
        #ifndef G_OS_WIN32 with proper #ifdef HAVE_FLOCKFILE.
2002-05-16 19:12:01 +00:00
Owen Taylor a2e485757c Fix a missed check for division by zero. (#77820, Gareth Pearce)
Thu May 16 12:56:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrange.c (gtk_range_calc_layout): Fix a missed
        check for division by zero. (#77820, Gareth Pearce)
2002-05-16 16:57:07 +00:00
Owen Taylor 2c79e71d98 gdk_event_put() copies the event and setting name, so we don't have to
Thu May 16 12:50:13 2002  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkevents-x11.c (gdk_xsettings_notify_cb):
	gdk_event_put() copies the event and setting name,
	so we don't have to strdup() it here. (Fix from
	Michael Meeks, #81953)
2002-05-16 16:53:37 +00:00
Ettore Perazzoli c2d9124553 If the menu is scrolled down or up, and some of the widget area is empty,
* gtk/gtkmenu.c (gtk_menu_paint): If the menu is scrolled down or
up, and some of the widget area is empty, don't fill it in with
GTK_SHADOW_IN rectangles that make it looks strange.  Fixes
#72695.
2002-05-16 13:49:04 +00:00
Owen Taylor 806bb88530 Don't call gdk_pointer_grab() to change the cursor if we've already
Wed May 15 18:15:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdnd.c (_gtk_drag_source_handle_event): Don't
        call gdk_pointer_grab() to change the cursor if we've
        already ungrabbed on button release / escape.
        (#80420, Dave Camp)
2002-05-15 22:26:45 +00:00
Owen Taylor ea696a2362 Special case menu items to pop down on motion. (#75961)
Wed May 15 17:12:50 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktooltips.c: Special case menu items to
        pop down on motion. (#75961)

        * tests/testgtk.c (create_item_factory): Add tooltips
        to the File menu.

        * gtk/gtkentry.c (update_im_cursor_location): Fix
        cursor locations passed to the IM context.
        (#80027, Yao Zhang)
2002-05-15 21:47:08 +00:00
Owen Taylor 87234fd57b Update from contents of size entry on focus out. (#76493, Lauris
Wed May 15 16:52:57 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkfontsel.c: Update from contents of size entry
        on focus out. (#76493, Lauris Kaplinski)

        * gtk/gtkclipboard.c (selection_get_cb): Fix backwads
        info/time arguments. (#80226)
2002-05-15 20:54:42 +00:00
Owen Taylor 31ec94faa5 If not building libpng, don't rebuild gtkstockpixbufs.h (#81819, Bill
Wed May 15 11:13:19 2002  Owen Taylor  <otaylor@redhat.com>

        * configure.in gtk/stock-icons/Makefile.am: If not
        building libpng, don't rebuild gtkstockpixbufs.h
        (#81819, Bill Janssen)
2002-05-15 15:31:53 +00:00
Jacob Berkman 2dcfebc67f run perl on the file, since it's not executable
2002-05-15  Jacob Berkman  <jacob@ximian.com>

	* demos/gtk-demo/Makefile.am: run perl on the file, since it's not
	executable
2002-05-15 04:18:06 +00:00
Owen Taylor d81b18a210 Subsitute in @PERL@ instead of hardcoded /usr/bin/perl. (#78355, Gareth
Tue May 14 19:53:15 2002  Owen Taylor  <otaylor@redhat.com>

        * demos/gtk-demo/geninclude.pl.in configure.in:
        Subsitute in @PERL@ instead of hardcoded
        /usr/bin/perl. (#78355, Gareth Pearce. Fix based
        on patch from Matthias Clasen)

        * gdk/Makefile.am: Patch from Daniel Elstner to use glib-mkenums
        instead of makeenums.pl.

        * gdk/{x11,linux-fb,win32}/Makefile.am: Hack to
        get gdkenumtypes.h built first.
2002-05-14 23:57:23 +00:00
Owen Taylor 185087e553 Remove the result file on error. (#79929, David Highley)
Tue May 14 18:41:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/stock-icons/Makefile.am (gtkstockpixbufs.h):
        Remove the result file on error. (#79929, David
        Highley)

        * gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu):
        If the menu is currently active, cancel it before
        setting the new menu. (#79162, Jonathan Blandford.)
2002-05-14 22:44:30 +00:00
Owen Taylor 26f74e40f6 Fix prepending at the start of the list. (#56349, Thomas Leonard.)
Tue May 14 18:13:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkdnd-x11.c (gdk_window_cache_filter): Fix
        prepending at the start of the list. (#56349,
        Thomas Leonard.)

        * gtk/gtksignal.h (gtk_signal_disconnect_by_func): Add
        explicit casts to GSignalMatchType for C++ compatibility.
        (#77601)
2002-05-14 22:16:01 +00:00
Owen Taylor ff76bf8ba7 Fix frame_right/frame_top screwup. (Detlef Reichl, #78111)
Tue May 14 18:02:37 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_realize): Fix
        frame_right/frame_top screwup. (Detlef Reichl,
        #78111)

        * gtk/Makefile.am (install-data-local): Use
        $(INSTALL_DATA) not $(INSTALL) when installing
        theme files. (#77094, Ben Liblit)
2002-05-14 22:04:22 +00:00
Owen Taylor 099100a9d3 Fix format of selection data to be 8 rather than GTK_TYPE_POINTER.
Tue May 14 17:30:57 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkctree.c gtk/gtkclist.c: Fix format of
        selection data to be 8 rather than GTK_TYPE_POINTER.
        (#79751, James Henstridge)

        * gtk/gtkmenu.c (gtk_menu_key_press): Call
        gtk_accelerator_valid() with cleaned up
        accel_key/accel_mods, not the raw values from
        the event. (#80513, Havoc Pennington.)

        * gtk/gtkmenu.c (gtk_menu_set_tearoff_state): Remove
        some dead code that set the tearoff window not
        resizable and removed decorations. (#80235)
2002-05-14 21:36:16 +00:00
Owen Taylor 94d05dfaf8 Set the width of the layout to the actual wrap width (our requisition) not
Tue May 14 16:44:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_ensure_layout): Set
        the width of the layout to the actual wrap width
        (our requisition) not the width we set when calculating
        the width. This results in the lines being justified
        within the correct area. (#79157, Anders Carlsson)

        * gtk/gtkaccelgroup.c gtk/gtkmarshelers.list: Corrected
        registered parameter types of "accel_activate" and
        "accel_changed" signals. (Patch from Murray Cumming, #78798)

        * gtk/gtkrc.c (gtk_rc_make_default_dir): Switch
        binary-version and type to correspond to the
        current ordering in _gtk_get_module_path.
        (#78746, Sergey Kuzminov)

        * gtk/gtkrc.c (gtk_rc_get_module_dir): Add docs
        pointing to the GTK_PATH documentation.

        * gtk/Makefile.am (uninstall-local): Delete
        key themes as well. (#81286, Kristian Rietveld.)
2002-05-14 20:52:59 +00:00
Pauli Virtanen f10a6beefc Updated Finnish translation.
2002-05-14  Pauli Virtanen <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2002-05-14 20:51:07 +00:00
Owen Taylor fa7fc23f44 Try adding a #ifndef/#define for XkbKeySymEntry to make up for OSF broken
Tue May 14 15:09:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
        for XkbKeySymEntry to make up for OSF broken
        XKB extension. (#77819, Gareth Pearce)

        * gtk/gtklayout.c: Clamp the upper values in response
        to ::size-allocate if necessary. (#81290, Christophe Saout)

        * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
        combo being destroyed before idle fires.
        (#81396, Timo Sirainen)
2002-05-14 19:12:51 +00:00
Kristian Rietveld f34a1f4807 PACK_END cells support CELL_ACTION_EVENT too now ...
Mon May 13 23:19:20 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        PACK_END cells support CELL_ACTION_EVENT too now ...
2002-05-13 21:18:31 +00:00
Stanislav Visnovsky 8b4829abab Updated Slovak translation.
2002-05-11  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2002-05-11 14:18:43 +00:00
Ole Laursen f21dfb358d Updated Danish translation.
2002-05-11  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-05-11 11:02:47 +00:00
Daniel Elstner 5a1a08f160 #define INITIALIZE_TREE_ITER(), which zeroes out all GtkTreeIter fields.
2002-05-10  Daniel Elstner  <daniel.elstner@gmx.net>

* gtk/gtktreemodel.c: #define INITIALIZE_TREE_ITER(), which zeroes out all GtkTreeIter fields. (#81380)
(gtk_tree_model_get_iter): Use it.
(gtk_tree_model_iter_children): ditto
(gtk_tree_model_iter_nth_child): ditto
(gtk_tree_model_iter_parent): ditto
2002-05-10 21:48:20 +00:00
Chyla Zbigniew 0cc2d916f1 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-10 12:39:30 +00:00
Kristian Rietveld dbe2343a7d fixup comment, so it doesn't screw the docs.
Thu May  9 23:33:32 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_stop_editing): fixup comment,
        so it doesn't screw the docs.
2002-05-09 21:27:18 +00:00
Michael Natterer bd118b7212 fixed yesterdays fix for cross compiling: simply check the variable
2002-05-08  Michael Natterer  <mitch@gimp.org>

	* configure.in: fixed yesterdays fix for cross compiling: simply
	check the variable "cross_compiling" which gets set by autoconf.
2002-05-08 15:29:10 +00:00
Owen Taylor 175116ac7d Check for selection_atom, not property name atom.
Tue May  7 18:36:03 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/xsettings-client.c (xsettings_client_process_event):
        Check for selection_atom, not property name atom.
2002-05-07 22:45:28 +00:00
Michael Natterer 12cf52e468 added a new conditional CROSS_COMPILING which indicates ($build != $host).
2002-05-07  Michael Natterer  <mitch@gimp.org>

	* configure.in: added a new conditional CROSS_COMPILING which
	indicates ($build != $host). If it is set, look for
	gdk-pixbuf-csource in PATH. Error out if it was not found.

	* gtk/stock-icons/Makefile.am: use the gdk-pixbuf-csource found at
	configure time if CROSS_COMPILING is set, use the one which was
	just built otherwise.
2002-05-07 15:57:51 +00:00
Anders Carlsson c5162fa6e8 Only process manager events with the correct atom.
2002-05-07  Anders Carlsson  <andersca@gnu.org>

	* gdk/x11/xsettings-client.c (xsettings_client_process_event):
	Only process manager events with the correct atom.
2002-05-07 14:51:18 +00:00
Michael Natterer 8aa2e2453e build the static pixbuf loaders conditionally like the dynamic ones so
2002-05-07  Michael Natterer  <mitch@gimp.org>

	* gdk-pixbuf/Makefile.am: build the static pixbuf loaders
	conditionally like the dynamic ones so --without-lib<foo> is
	honored when building with --disable-modules. (#66867)
2002-05-07 12:59:01 +00:00
Kjartan Maraas 2488bbf9fc Updated Norwegian (bokml) translation.
2002-05-07  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-05-07 10:38:24 +00:00
Kristian Rietveld 4dd906e7a7 Merge TreeView fixes from HEAD:
Tue May  7 00:50:20 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD:

        (May  6):
        * gtk/gtktreeview.c (gtk_tree_view_map_expanded_rows_helper): call
        func on current node before the child nodes.

        * gtk/gtktreeview.c (gtk_tree_view_motion_draw_column_motion_arrow):
        unset user_data before destroying the window. (fixes #80065).
2002-05-06 22:44:15 +00:00
Kristian Rietveld 4e3c34eab6 add neighbor size hack to align editable widget.
Tue May  7 00:18:45 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeview.c (gtk_tree_view_start_editing): add neighbor
        size hack to align editable widget.

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_pack_end): use g_new0
        here instead of g_new (this triggered some bad crash),
        (gtk_tree_view_column_cell_is_visible): add missing assert
2002-05-06 22:32:24 +00:00
Matthias Clasen 2083f3e262 Always select for property notify for maintaining window state.
* gdk/x11/gdkwindow-x11.c (gdk_window_new):
	(gdk_window_set_events): Always select for property notify for
	maintaining window state.

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Only propagate
	property notifys if they were selected by gdk_window_set_events.
2002-05-06 22:06:10 +00:00
Owen Taylor c400e38f98 Add ChangeLog.pre-2-0 (#78641)
Mon May  6 11:48:08 2002  Owen Taylor  <otaylor@redhat.com>

        * Makefile.am (EXTRA_DIST): Add ChangeLog.pre-2-0 (#78641)

        * m4macros/gtk-2.0.m4: save CFLAGS/LIBS properly when
        compiling "what went wrong" test case. (#79329)

        * m4macros/gtk-2.0.m4: Remove reference to editing
        pkg-config script. (From Jim Gettys)
2002-05-06 18:06:11 +00:00
Changwoo Ryu b2e2fe6ea3 Updated Korean translation.
* ko.po: Updated Korean translation.
2002-05-06 14:26:47 +00:00
Christophe Fergeau 115418d968 Fixed 2 strings 2002-05-04 23:36:01 +00:00
Tuomas Kuosmanen 64fb36c3d8 These have a proper alpha channel thus they dont look jaggy. /tig 2002-05-03 08:46:59 +00:00
Matthias Clasen 2255a7225d Typo fix.
* gtk/gtknotebook.c (gtk_notebook_set_show_border): Typo fix.
2002-05-02 19:16:25 +00:00
Matthias Clasen f4dc453e09 Correct the composite_child blurb.
* gtk/gtkwidget.c (gtk_widget_class_init): Correct the
	composite_child blurb.

	* gtk/gtknotebook.c (gtk_notebook_set_show_border): Clarify docs.  (#73093)
2002-05-02 19:09:34 +00:00
Vincent van Adrighem a8749b2614 Added a few lines about how to use gettext to convert betweeen encodings.
2002-05-02 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* README.translators: Added a few lines about how to use
	gettext to convert betweeen encodings.
2002-05-02 07:32:05 +00:00
Vincent van Adrighem 1c92d4b28d Updated Dutch translation (Tino Meinen).
2002-05-02 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Updated Dutch translation (Tino Meinen).
2002-05-02 07:22:25 +00:00
Chyla Zbigniew 15c38b93e2 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-05-01 10:42:29 +00:00
Havoc Pennington 1fc3556064 use gtk_text_layout_invalidate_cache instead of cut-and-paste
2002-04-30  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
	gtk_text_layout_invalidate_cache instead of cut-and-paste
	(gtk_text_layout_real_invalidate): always invalidate cache, even
	if the line has no stored line data. #78573

	* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
	gtk_text_view_ensure_layout, #77388
	(gtk_text_view_get_iter_at_location): ditto
	(gtk_text_view_get_line_yrange): ditto
	(gtk_text_view_get_line_at_y): ditto
2002-04-30 20:51:26 +00:00
Havoc Pennington 31b514d831 assign something to "prev" so that removing tag info succeeds. Part of
2002-04-30  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
	something to "prev" so that removing tag info succeeds.
	Part of #77301

	* gtk/gtktextbtree.c (_gtk_text_btree_unref): reorder so that it
	unrefs the tag table first, so that the btree is in a consistent
	state when we're removing tags from it.

	* gtk/gtktexttagtable.c (_gtk_text_tag_table_remove_buffer): strip
	all tags in the tag table out of the buffer. #77301
2002-04-30 15:53:54 +00:00
Alex Larsson 752742d044 Use tmp also if foreground is set.
2002-04-29  Alex Larsson  <alexl@redhat.com>

	* gdk/gdkpango.c (gdk_draw_layout_line_with_colors):
	Use tmp also if foreground is set.
2002-04-29 23:34:08 +00:00
Andraz Tori e49d754fdc Updated Slovenian translation 2002-04-29 23:32:06 +00:00
Kjartan Maraas 22f7b3ee23 Updated Norwegian (bokml) translation.
2002-04-29  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-04-29 13:31:26 +00:00
Jonathan Blandford a704364549 Fix so that you can set a new sort func.
Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 03:02:56 +00:00
Matthias Clasen 21c7e08b21 Avoid a possible division by zero. (#77820)
* gtk/gtkrange.c (gtk_range_calc_layout): Avoid a possible
	division by zero.  (#77820)
2002-04-27 22:31:47 +00:00
Kristian Rietveld 2d509b1d84 Merge TreeView fixes from HEAD:
Sat Apr 27 15:48:49 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD:

        (Apr 26):
        * gtk/gtktreemodel.c (gtk_tree_row_ref_deleted_callback): if the
        deleted node was "below" this path, then do not unref all nodes
        between the deleted parent and the node this rowref is pointing too
        (see added comment in gtk_tree_row_ref_deleted_callback),
        (fixes #77977)
2002-04-27 13:43:44 +00:00
Simos Xenitellis 5ef9c5a5bf Updated Greek translation 2002-04-27 13:24:58 +00:00
Sven Neumann 77d170539a tests/testtreecolumns.c quit the main loop when the window is destroyed.
2002-04-26  Sven Neumann  <sven@gimp.org>

	* tests/testtreecolumns.c
	* tests/testtreeview.c: quit the main loop when the window is
	destroyed. Removed compiler warnings about wrong format in printf().
2002-04-26 16:59:00 +00:00
Kristian Rietveld 9255c12c87 Merge TreeView fixes from HEAD up to Apr 26:
Fri Apr 26 00:00:00 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD up to Apr 26:

        (Apr 25):
        * gtk/gtktreemodelsort.c (gtk_tree_model_sort_reset_default_sort_func):
        resort if we're already in 'unsorted' state, and update the docs

        * gtk/gtktreeview.c (gtk_tree_view_search_iter): make the search
        dialog not scroll horizontally (prolly fixes #74806).

        (Also from Apr 25, fixes #74206):
        * gtk/gtktreeprivate.h: add _gtk_tree_view_column_count_special_cells

        * gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_has_editable_cell),
        (_gtk_tree_view_column_get_editable_cell): remove a space which made
        the code look ugly
        (_gtk_tree_view_column_count_special_cells): new function,
        (gtk_tree_view_column_cell_process_action): if there's only one
        activatable cell, the whole column will activate that renderer.

        (Apr 24):
        * gtk/gtktreeview.c (gtk_tree_view_stop_editing): temporarily set
        ->priv->edited_column to NULL. Pleas read the comment in this
        function for an explanation (fixes #79632).
2002-04-25 22:00:07 +00:00
Soeren Sandmann f2b3c6e6a3 use the child's requisition.height, not allocation.height, as width of
Thu Apr 25 20:24:37 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): use the child's
	requisition.height, not allocation.height, as width of submenu
	indicator. (#75948)
2002-04-25 18:24:42 +00:00
Matthias Clasen f6238492bc Merged documentation fixes from HEAD. 2002-04-24 22:09:24 +00:00
Anders Carlsson fab341df09 Update ChangeLog 2002-04-22 20:56:12 +00:00
Anders Carlsson e11dcc5426 Use gtk_entry_get_public_chars. Fixes #79532.
2002-04-22  Anders Carlsson  <andersca@gnu.org>

	* gtk/gtkentry.c (gtk_entry_drag_data_get): Use
	gtk_entry_get_public_chars. Fixes #79532.
2002-04-22 20:54:32 +00:00
Kwok-Koon Cheung bee067608a Updated traditional Chinese translation. 2002-04-21 22:15:35 +00:00
Alexander Larsson 9eea275ed7 Merged from HEAD:
2002-04-21  Alexander Larsson  <alla@lysator.liu.se>

	Merged from HEAD:

	* gdk/x11/gdkwindow-x11.c (gdk_window_reparent):
	Save x and y in window_private.

	* gtk/gtkplug.c (_gtk_plug_add_to_socket):
	Move plug window outside the visible area to avoid flashing until
	the first size_allocate.
2002-04-21 19:26:53 +00:00
Kristian Rietveld 39e60a0564 replace GDK_IS_WINDOW with GDK_IS_DRAWABLE in the assert, only check
Sat Apr 20 16:49:26 2002  Kristian Rietveld  <kris@gtk.org>

        * gdk/x11/gdkpixmap-x11.c (gdk_pixmap_new): replace GDK_IS_WINDOW
        with GDK_IS_DRAWABLE in the assert, only check GDK_WINDOW_DESTROYED
        if window is a GdkWindow,
        (gdk_bitmap_create_from_data): ditto,
        (gdk_pixmap_create_from_data): ditto
2002-04-20 14:47:25 +00:00
Kristian Rietveld ac5905d0db Merge TreeView fixes from HEAD up to Apr 20 2002:
Sat Apr 20 01:54:59 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD up to Apr 20 2002:

        (All from Apr 19):
        * gtk/gtktreeview.c (gtk_tree_view_size_allocate): subtract
        TREE_VIEW_HEADER_HEIGHT from allocation->height to get the real
        size for the tree (fixes #72729),
        (gtk_tree_view_real_start_editing): correct cell_area->y for
        scrolling due to gtk_tree_view_real_set_cursor (fixes #75687)

        * gtk/gtktreeview.c (gtk_tree_view_row_changed): cancel editing
        if tree_view->priv->edited_column != NULL (fixes #76066)

        (This patch fixes #50310):
        * gtk/gtktreeprivate.h: add _gtk_tree_view_column_autosize

        * gtk/gtktreeview.c: privately export _gtk_tree_view_column_autosize,
        and add a small note about that function,
        (gtk_tree_view_button_press): check for double click and
        "not having an autosize" column before autosizing the column,

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_min_width):
        call _gtk_tree_view_column_autosize to update autosized column width
        (gtk_tree_view_column_set_max_width): ditto
2002-04-19 23:54:42 +00:00
Kristian Rietveld c962023b0d Merge TreeView fixes from HEAD up to Apr 19 2002:
Fri Apr 19 16:49:01 2002  Kristian Rietveld  <kris@gtk.org>

        Merge TreeView fixes from HEAD up to Apr 19 2002:

        (From Apr 16):
        * gtk/gtktreeview.c (gtk_tree_view_real_collapse_row): check
        ->priv->cursor and ->priv->anchor rowrefs before removing
        node->children from the rbtree. Also check the
        ->priv->last_single_clicked and ->priv->last_single_clicked_2 rowrefs
        (I think I really need to rename those two someday).

        (From Apr 17):
        * gtk/gtktreestore.c (gtk_tree_store_insert_before): fix docs

        (From Apr 18):
        * gtk/gtktreemodelsort.c
        (gtk_tree_model_sort_convert_path_to_child_path): so this function
        was completely broken. Fix it and improve readability.

        (From Apr 19):
        * gtk/gtktreeprivate.h, gtk/gtktreeview.c: rename
        last_single_clicked{,_2} to last_button_press{,_2}, as the latter
        is a more sane name.

        * gtk/gtktreeview.c (gtk_tree_view_button_press): use ->priv->anchor
        instead of ->priv->cursor, check for the anchor at another place, as
        you can go in edit mode without having an anchor.
2002-04-19 15:46:13 +00:00
Tor Lillqvist a9d9b8581b gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) Fix typo, thanks to
2002-04-18  Tor Lillqvist  <tml@iki.fi>

	* gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib)
	* gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo,
	thanks to David Sterba for noticing.

	* gtk/gtkmain.h
	* gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In
	GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on
	Win32 whether compiled with -fnative-struct or not. Unfortunately
	this wan't noticed until now. So, from now on, check some other
	struct, too, for which the use of -fnative-struct still
	matters. GtkBox is one such.
2002-04-18 11:25:23 +00:00
Jonathan Blandford 78bd6b2844 include internal children when doing focus.
Mon Apr 15 15:41:56 2002  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkcontainer.c (gtk_container_focus): include internal
	children when doing focus.
	(gtk_container_get_all_children): new static function to include
	internal children when making a list of them.
2002-04-15 22:22:40 +00:00
217 changed files with 47147 additions and 29678 deletions
+1186
View File
File diff suppressed because it is too large Load Diff
+1186
View File
File diff suppressed because it is too large Load Diff
+1186
View File
File diff suppressed because it is too large Load Diff
+1186
View File
File diff suppressed because it is too large Load Diff
+1186
View File
File diff suppressed because it is too large Load Diff
+1186
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -20,8 +20,8 @@ GTK+ requires the following packages:
Simple install procedure
========================
% gzip -cd gtk+-2.0.2.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.0.2 # change to the toplevel directory
% gzip -cd gtk+-2.0.6.tar.gz | tar xvf - # unpack the sources
% cd gtk+-2.0.6 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]
+1 -3
View File
@@ -13,17 +13,15 @@ EXTRA_DIST = \
NEWS.pre-1-0 \
ChangeLog.pre-1-0 \
ChangeLog.pre-1-2 \
ChangeLog.pre-2-0 \
README.cvs-commits \
README.win32 \
README.nanox \
config.h.win32 \
gtk-zip.sh \
sanitize-la.sh \
po/README.tools \
po/README.translators \
po/desk.pl \
po/makefile.mingw \
po/update.pl \
po/po2tbl.sed.in \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
+78
View File
@@ -1,3 +1,81 @@
Overview of Changes in GTK+ 2.0.6
=================================
* GtkTreeView bug fixes [Jonathan Blandford, Kristian Rietveld,
Josh Green, Matthias Clasen]
* Fix problem with keynav and insensitive menu items [Owen Taylor]
* Fix pixbuf_from_drawable() for LSB -> MSB [Federico Mena Quintero]
* Use GTK2_RC_FILES envvar instead of GTK_RC_FILES [Owen]
* Focus check/radio buttons when activating with a mnemonic [Padraig O'Briain]
* Cycle between multiple menubars with F10, not control-tab
[Calum Benson, Padraig]
* Misc bug fixes [Jacob Berkman, Matthias Clasen, Manuel Op de Coul,
Bill Haneman, Norihiro UMEDA, Shivaram Upadhyayula, Yao Zhang]
* Build fixes for cross-compiling and portability [Arnaud Charlet,
J. Ali Harlow]
* Updated translations (bg,ca,da,fr,ja,ko,lv,no,pl,ru,sk,sv,vi)
Overview of Changes in GTK+ 2.0.5
=================================
* Fix a wrong assertion that broke gtk_file_selection_set_filename();
also another fix from testing this function with non-UTF-8 filenames.
* Fix incorrect property notification in GtkTextView. [James M. Cape]
Overview of Changes in GTK+ 2.0.4
=================================
* Fix a number of types which were registered with the
type system with the wrong names [James Henstridge, Jonathan Blandford]
* Support missing data types in GtkList/TreeStore [Daniel Elstner]
* Misc GtkTreeView bug fixes [Dave Camp, Jonathan, Daniel Elstner,
Josh Parsons]
* Drag and drop fixes, including a stuck grab. [Dave, Thomas Leonard,
Owen Taylor]
* Calculate screen size on win32 from the "logical DPI"
[Joaquin Cuenca Abela, Tor Lillqvist]
* Misc Win32 bug fixes. [Florent Duguet, Torn]
* Fix theme changes for GtkMenu [Soeren Sandmann]
* Fix gdk_pixbuf_from_drawable() for big endian. [Federico Mena Quintero]
* Fix encoding handling for gtk_file_selection_set_filename()
[Sebastian Ritau, Owen]
* Fix crash with DND, Qt and Metacity [Cha Young-Ho, Havoc, Owen]
* Fixes for DirectColor visuals [Shivaram Upadhyayula]
* Memory leak and UMR fixes [Michael Meeks, Matthias Clasen, Valgrind]
* Misc bug fixes
* Updated translations (ca,cs,da,es,et,fr,ms,nl,pl,pt,pt_BR,ru,sv)
Other contributors: Nicholas Allen, Jacob Berkman, Remus Draica,
Nano Golveia, Tim Janik, Sergey Kuzminov, George Lebl, Garrett Lesage,
Robin Lu, Timo Meinen, Michel Selten, Boris Shingarov, Jeff Waugh
Overview of Changes in GTK+ 2.0.3
=================================
* GtkTreeView fixes (Jonathan Blandford, Kristian Rietveld, Daniel Elstner)
* Improve GdkRGB support for low color depths (Tor Lillqvist).
* Tweak F10 behavior to focus GtkMenuBar. (Owen Taylor)
* Include internal children when focusing. (Jonathan)
* Win32 fixes (Tor Lillqvist, David Sterba)
* Allow use of a pixmap as the drawable in gdk_pixmap_new(). (Kristian)
* GdkPixbuf fixes (Matthias Clasen, Michael Natterer, Federico Mena Quintero)
* GtkMenu fixes. (Soeren Sandmann)
* Find gdk-pixbuf-csource when cross-compiling. (Michael Natterer)
* Misc input-method related fixes (Yao Zhang, Federico)
* Fix stuck grab during DND. (Dave Camp, Owen)
* Remove in-bevel from scrolled-offscreen menus. (Ettore Perazzoli)
* Various plug/socket fixes (Owen, Padraig O'Briain, Dave Camp,
Michael Meeks)
* Handle Xlib internal connections (HideToshi Tajima)
* Many miscellaneous bug fixes.
Other contributors: Jacob Berkman, Abigail Brady, Rich Burridge,
Anders Carlsson, Murray Cumming, Nalin Dahyabhai, James Henstridge,
David Highley, Ben Liblitt, Tim Janik, Bill Jannsen, Lauris Kaplinski,
Sergey Kuzminov, Alex Larsson, Sven Neumann, Havoc Pennington, Gareth Pearce,
Simon Floery, Thomas Leonard, Detlef Reichl, Martin Schulze, Christophe Saout,
Timo Sirainen, Graham Swallow.
Overview of Changes in GTK+ 2.0.2
=================================
+1 -1
View File
@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 2.0.2. GTK+ is a multi-platform toolkit for
This is GTK+ version 2.0.6. 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.
-3
View File
@@ -45,9 +45,6 @@
#undef USE_GMODULE
#undef USE_MMX
/* Define to use X11R6 additions to XIM */
#undef USE_X11R6_XIM
/* Define to use XKB extension */
#undef HAVE_XKB
+56 -51
View File
@@ -1,3 +1,6 @@
# require autoconf 2.52
AC_PREREQ(2.52)
# Process this file with autoconf to produce a configure script.
AC_INIT(gdk/gdktypes.h)
@@ -29,9 +32,9 @@ GLIB_AC_DIVERT_BEFORE_HELP([
#
GTK_MAJOR_VERSION=2
GTK_MINOR_VERSION=0
GTK_MICRO_VERSION=2
GTK_INTERFACE_AGE=2
GTK_BINARY_AGE=2
GTK_MICRO_VERSION=6
GTK_INTERFACE_AGE=6
GTK_BINARY_AGE=6
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
@@ -77,7 +80,7 @@ AC_SUBST(GDK_PIXBUF_MICRO)
AC_SUBST(GDK_PIXBUF_VERSION)
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.0.1
GLIB_REQUIRED_VERSION=2.0.6
PANGO_REQUIRED_VERSION=1.0.1
ATK_REQUIRED_VERSION=1.0.1
@@ -169,8 +172,6 @@ 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(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
, enable_xim_inst="maybe")
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)
@@ -310,7 +311,7 @@ AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
AC_CHECK_PROGS(PERL, perl5 perl)
AC_PATH_PROGS(PERL, perl5 perl)
# We would like indent, but don't require it.
AC_CHECK_PROG(INDENT, indent, indent)
@@ -323,7 +324,7 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
AC_CHECK_FUNCS(lstat mkstemp)
AC_CHECK_FUNCS(lstat mkstemp flockfile)
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
@@ -352,7 +353,7 @@ AC_SUBST(STRIP_BEGIN)
AC_SUBST(STRIP_END)
# i18n stuff
ALL_LINGUAS="az ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt 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="ar az bg ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he 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"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
@@ -500,6 +501,8 @@ AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
# check for bytesex stuff
AC_C_BIGENDIAN
# Checks for header files.
AC_HEADER_STDC
@@ -736,6 +739,12 @@ 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)
@@ -774,7 +783,7 @@ INCLUDED_LOADER_DEFINE=
IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
for loader in $included_loaders; do
if echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
:
else
AC_MSG_ERROR([the specified loader $loader does not exist])
@@ -797,13 +806,13 @@ AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
if $dynworks ; then
STATIC_LIB_DEPS=
if echo "$included_loaders" | grep "\(^\|\,\)tiff\(\$\|\,\)" > /dev/null; then
if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
fi
if echo "$included_loaders" | grep "\(^\|\,\)jpeg\(\$\|\,\)" > /dev/null; then
if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
fi
if echo "$included_loaders" | grep "\(^\|\,\)png\(\$\|\,\)" > /dev/null; then
if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
fi
else
@@ -850,6 +859,16 @@ fi
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
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)
fi
fi
GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
@@ -940,7 +959,7 @@ if test "x$gdktarget" = "xx11"; then
# then we need to repeat the checks.
#
x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
case x_libs in
case "$x_libs" in
*-lX11*) pango_omitted_x_deps=no ;;
*) pango_omitted_x_deps=yes ;;
esac
@@ -960,24 +979,32 @@ if test "x$gdktarget" = "xx11"; then
#
# Checks for Xft/XRender
#
XFT_LIBS=""
XFT_CFLAGS=""
if test $have_xft = true ; then
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
have_xft=false
AC_CHECK_LIB(Xrender, XRenderFindFormat,
[AC_CHECK_LIB(Xft, XftFontOpen,
[AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
have_xft=true,:)],
:,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
,:,-lXext $x_libs)
if pkg-config --exists pangoxft '>=' 1.1.0 ; then
x_libs="`pkg-config --libs xft` -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
have_xft=true
else
gtk_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $x_cflags"
AC_CHECK_LIB(Xrender, XRenderFindFormat,
[AC_CHECK_LIB(Xft, XftFontOpen,
[AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
have_xft=true,:)],
:,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
,:,-lXext $x_libs)
if $have_xft ; then
x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
fi
CPPFLAGS="$gtk_save_cppflags"
CPPFLAGS="$gtk_save_cppflags"
fi
if $have_xft ; then
x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
:
else
AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
fi
@@ -1038,31 +1065,8 @@ if test "x$gdktarget" = "xx11"; then
# Check for XIM support.
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
: ,
enable_xim_inst="no",
$x_libs_for_checks)
# On Solaris, calling XRegisterIMInstantiateCallback seems to
# cause an immediate segfault, so we disable it, unless
# the user specifically forces it to be on.
if test x$enable_xim_inst = xmaybe ; then
case host in
*-*-solaris*)
enable_xim_inst="no"
;;
*)
enable_xim_inst="yes"
;;
esac
fi
if test "x$enable_xim" = "xyes"; then
GTK_XIM_FLAGS="-DUSE_XIM"
if test "x$enable_xim_inst" = "xyes"; then
AC_DEFINE(USE_X11R6_XIM)
fi
fi
# Check for XKB support.
@@ -1177,7 +1181,7 @@ if test "x$gdktarget" = "xlinux-fb"; then
fi
ft2_libs="`$PKG_CONFIG --libs pangoft2`"
case ft2_libs in
case "$ft2_libs" in
*-lfreetype*) pango_omitted_ft2_deps=no ;;
*) pango_omitted_ft2_deps=yes ;;
esac
@@ -1212,7 +1216,7 @@ fi
if test "x$gdktarget" = "xx11"; then
if $have_xft = true ; then
PANGO_PACKAGES="pangox pangoxft"
PANGO_PACKAGES="pangoxft pangox"
else
PANGO_PACKAGES=pangox
fi
@@ -1474,6 +1478,7 @@ build/win32/Makefile
build/win32/dirent/Makefile
demos/Makefile
demos/gtk-demo/Makefile
demos/gtk-demo/geninclude.pl
tests/Makefile
docs/Makefile
docs/reference/Makefile
@@ -1145,7 +1145,7 @@ xlib_window_is_viewable (Window w)
if (nchildren > 0)
XFree (children);
if (parent == root)
if ((parent == root) || (w == root))
return TRUE;
w = parent;
+8 -3
View File
@@ -32,11 +32,16 @@ noinst_PROGRAMS = \
testpixbuf-scale \
pixbuf-demo
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource$(EXEEXT) apple-red.png gnome-foot.png
if CROSS_COMPILING
pixbuf_csource=$(GDK_PIXBUF_CSOURCE)
else
pixbuf_csource=GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs $$topdir/gdk-pixbuf/gdk-pixbuf-csource
endif
test-inline-pixbufs.h: $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource apple-red.png gnome-foot.png
(topdir=`cd $(top_builddir) && pwd` ; curdir=`pwd` ; \
cd $(srcdir) && \
GDK_PIXBUF_MODULEDIR=$$topdir/gdk-pixbuf/.libs \
$$topdir/gdk-pixbuf/gdk-pixbuf-csource --build-list \
$(pixbuf_csource) --build-list \
apple_red apple-red.png gnome_foot gnome-foot.png >$$curdir/test-inline-pixbufs.h)
testpixbuf_DEPENDENCIES = $(DEPS)
+1 -1
View File
@@ -55,7 +55,7 @@ EXTRA_DIST = \
$(IMAGEFILES)
demos.h: $(demos) geninclude.pl
(cd $(srcdir) && ./geninclude.pl $(demos) > demos.h)
(cd $(srcdir) && $(PERL) ./geninclude.pl $(demos) > demos.h)
gtk_demo_SOURCES = \
$(demos) \
+1 -1
View File
@@ -158,7 +158,7 @@ cell_edited (GtkCellRendererText *cell,
gtk_tree_model_get_iter (model, &iter, path);
switch ((gint) column)
switch (GPOINTER_TO_INT (column))
{
case COLUMN_NUMBER:
{
-163
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;
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/perl -w
#!@PERL@ -w
print <<EOT;
typedef GtkWidget *(*GDoDemoFunc) (void);
+3 -3
View File
@@ -86,7 +86,7 @@ read_line (FILE *stream, GString *str)
{
int n_read = 0;
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
flockfile (stream);
#endif
@@ -112,7 +112,7 @@ read_line (FILE *stream, GString *str)
case '\r':
case '\n':
{
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
int next_c = getc_unlocked (stream);
#else
int next_c = getc (stream);
@@ -132,7 +132,7 @@ read_line (FILE *stream, GString *str)
done:
#ifndef G_OS_WIN32
#ifdef HAVE_FLOCKFILE
funlockfile (stream);
#endif
-392
View File
@@ -1,392 +0,0 @@
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <gtk/gtk.h>
#include <demos.h>
static GtkTextBuffer *info_buffer;
static GtkTextBuffer *source_buffer;
static gchar *current_file = NULL;
enum {
TITLE_COLUMN,
FILENAME_COLUMN,
FUNC_COLUMN,
ITALIC_COLUMN,
NUM_COLUMNS
};
gboolean
read_line (FILE *stream, GString *str)
{
int n_read = 0;
flockfile (stream);
g_string_truncate (str, 0);
while (1)
{
int c;
c = getc_unlocked (stream);
if (c == EOF)
goto done;
else
n_read++;
switch (c)
{
case '\r':
case '\n':
{
int next_c = getc_unlocked (stream);
if (!(next_c == EOF ||
(c == '\r' && next_c == '\n') ||
(c == '\n' && next_c == '\r')))
ungetc (next_c, stream);
goto done;
}
default:
g_string_append_c (str, c);
}
}
done:
funlockfile (stream);
return n_read > 0;
}
void
load_file (const gchar *filename)
{
FILE *file;
GtkTextIter start, end;
GString *buffer = g_string_new (NULL);
int state = 0;
gboolean in_para = 0;
if (current_file && !strcmp (current_file, filename))
return;
g_free (current_file);
current_file = g_strdup (filename);
gtk_text_buffer_get_bounds (info_buffer, &start, &end);
gtk_text_buffer_delete (info_buffer, &start, &end);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_delete (source_buffer, &start, &end);
file = fopen (filename, "r");
if (!file)
{
g_warning ("Cannot open %s: %s\n", filename, g_strerror (errno));
return;
}
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
while (read_line (file, buffer))
{
gchar *p = buffer->str;
gchar *q;
switch (state)
{
case 0:
/* Reading title */
while (*p == '/' || *p == '*' || isspace (*p))
p++;
q = p + strlen (p);
while (q > p && isspace (*(q - 1)))
q--;
if (q > p)
{
int len_chars = g_utf8_pointer_to_offset (p, q);
end = start;
g_assert (strlen (p) >= q - p);
gtk_text_buffer_insert (info_buffer, &end, p, q - p);
start = end;
gtk_text_iter_backward_chars (&start, len_chars);
gtk_text_buffer_apply_tag_by_name (info_buffer, "title", &start, &end);
start = end;
state++;
}
break;
case 1:
/* Reading body of info section */
while (isspace (*p))
p++;
if (*p == '*' && *(p + 1) == '/')
{
gtk_text_buffer_get_iter_at_offset (source_buffer, &start, 0);
state++;
}
else
{
int len;
while (*p == '*' || isspace (*p))
p++;
len = strlen (p);
while (isspace (*(p + len - 1)))
len--;
if (len > 0)
{
if (in_para)
gtk_text_buffer_insert (info_buffer, &start, " ", 1);
g_assert (strlen (p) >= len);
gtk_text_buffer_insert (info_buffer, &start, p, len);
in_para = 1;
}
else
{
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
in_para = 0;
}
}
break;
case 2:
/* Skipping blank lines */
while (isspace (*p))
p++;
if (*p)
{
p = buffer->str;
state++;
/* Fall through */
}
else
break;
case 3:
/* Reading program body */
gtk_text_buffer_insert (source_buffer, &start, p, -1);
gtk_text_buffer_insert (info_buffer, &start, "\n", 1);
break;
}
}
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
gtk_text_buffer_apply_tag_by_name (info_buffer, "source", &start, &end);
}
gboolean
button_press_event_cb (GtkTreeView *tree_view,
GdkEventButton *event,
GtkTreeModel *model)
{
if (event->type == GDK_2BUTTON_PRESS)
{
GtkTreePath *path = NULL;
gtk_tree_view_get_path_at_pos (tree_view,
event->window,
event->x,
event->y,
&path,
NULL);
if (path)
{
GtkTreeIter iter;
gboolean italic;
GVoidFunc func;
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_store_get (GTK_TREE_STORE (model),
&iter,
FUNC_COLUMN, &func,
ITALIC_COLUMN, &italic,
-1);
(func) ();
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
ITALIC_COLUMN, !italic,
-1);
gtk_tree_path_free (path);
}
gtk_signal_emit_stop_by_name (GTK_OBJECT (tree_view),
"button_press_event");
return TRUE;
}
return FALSE;
}
static void
selection_cb (GtkTreeSelection *selection,
GtkTreeModel *model)
{
GtkTreeIter iter;
GValue value = {0, };
if (! gtk_tree_selection_get_selected (selection, NULL, &iter))
return;
gtk_tree_model_get_value (model, &iter,
FILENAME_COLUMN,
&value);
load_file (g_value_get_string (&value));
g_value_unset (&value);
}
static GtkWidget *
create_text (GtkTextBuffer **buffer,
gboolean is_source)
{
GtkWidget *scrolled_window;
GtkWidget *text_view;
PangoFontDescription *font_desc;
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_SHADOW_IN);
text_view = gtk_text_view_new ();
gtk_container_add (GTK_CONTAINER (scrolled_window), text_view);
*buffer = gtk_text_buffer_new (NULL);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (text_view), *buffer);
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_view), FALSE);
gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (text_view), FALSE);
if (is_source)
{
font_desc = pango_font_description_from_string ("Courier 10");
gtk_widget_modify_font (text_view, font_desc);
pango_font_description_free (font_desc);
}
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view), !is_source);
return scrolled_window;
}
/* Technically a list, but if we do go to 80 demos, we may want to move to a tree */
static GtkWidget *
create_tree (void)
{
GtkTreeSelection *selection;
GtkCellRenderer *cell;
GtkWidget *tree_view;
GtkTreeViewColumn *column;
GtkTreeStore *model;
GtkTreeIter iter;
gint i;
model = gtk_tree_store_new_with_types (NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN);
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
gtk_tree_selection_set_type (GTK_TREE_SELECTION (selection),
GTK_TREE_SELECTION_SINGLE);
gtk_widget_set_usize (tree_view, 200, -1);
for (i=0; i < G_N_ELEMENTS (testgtk_demos); i++)
{
gtk_tree_store_append (GTK_TREE_STORE (model), &iter, NULL);
gtk_tree_store_set (GTK_TREE_STORE (model),
&iter,
TITLE_COLUMN, testgtk_demos[i].title,
FILENAME_COLUMN, testgtk_demos[i].filename,
FUNC_COLUMN, testgtk_demos[i].func,
ITALIC_COLUMN, FALSE,
-1);
}
cell = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Widget",
cell,
"text", TITLE_COLUMN,
"italic", ITALIC_COLUMN,
NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view),
GTK_TREE_VIEW_COLUMN (column));
gtk_signal_connect (GTK_OBJECT (selection), "selection_changed", selection_cb, model);
gtk_signal_connect (GTK_OBJECT (tree_view), "button_press_event", GTK_SIGNAL_FUNC (button_press_event_cb), model);
return tree_view;
}
int
main (int argc, char **argv)
{
GtkWidget *window;
GtkWidget *notebook;
GtkWidget *hbox;
GtkWidget *tree;
GtkTextTag *tag;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
hbox = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), hbox);
tree = create_tree ();
gtk_box_pack_start (GTK_BOX (hbox), tree, FALSE, FALSE, 0);
notebook = gtk_notebook_new ();
gtk_box_pack_start (GTK_BOX (hbox), notebook, TRUE, TRUE, 0);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&info_buffer, FALSE),
gtk_label_new ("Info"));
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
create_text (&source_buffer, TRUE),
gtk_label_new ("Source"));
tag = gtk_text_buffer_create_tag (info_buffer, "title");
gtk_object_set (GTK_OBJECT (tag),
"font", "Sans 18",
NULL);
tag = gtk_text_buffer_create_tag (info_buffer, "source");
gtk_object_set (GTK_OBJECT (tag),
"font", "Courier 10",
"pixels_above_lines", 0,
"pixels_below_lines", 0,
NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
gtk_widget_show_all (window);
load_file (testgtk_demos[0].filename);
gtk_main ();
return 0;
}
+27
View File
@@ -1,3 +1,30 @@
Mon Jul 29 22:36:06 2002 Owen Taylor <otaylor@redhat.com>
* gtk/tmpl/gtkfilesel.sgml: Fix up the example program
a bit. (#88814, Johnson Wong)
2002-07-16 Sven Neumann <sven@gimp.org>
* gdk/tmpl/rgb.sgml: fixed the example code (return TRUE from the
expose_event handler).
2002-04-24 Matthias Clasen <maclas@gmx.de>
Merged from HEAD:
* gtk/tmpl/gtksocket.sgml:
* gtk/tmpl/gtkdrawingarea.sgml:
* gtk/tmpl/gtktreemodel.sgml:
* gtk/tmpl/gtkradiomenuitem.sgml:
* gtk/tmpl/gtkwidget.sgml:
* gtk/tmpl/gtkdialog.sgml:
* gdk-pixbuf/tmpl/gdk-pixbuf-loader.sgml:
* gtk/text_widget.sgml:
* gtk/tree_widget.sgml:
* gtk/gtk-sections.txt:
* gdk/tmpl/properties.sgml: Documentation fixes. (#79001, #67818,
#79080, #78661, #78392, #75588, #72312, #74439)
Tue Mar 26 15:41:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/building.sgml: Add a mention of running ldconfig.
@@ -10,7 +10,8 @@ Application-driven progressive image loading.
process of loading an image, by letting them send the image data
directly to the loader instead of having the loader read the data
from a file. Applications can use this functionality instead of
gdk_pixbuf_new_from_file() when they need to parse image data in
gdk_pixbuf_new_from_file() or gdk_pixbuf_animation_new_from_file()
when they need to parse image data in
small chunks. For example, it should be used when reading an
image from a (potentially) slow network connection, or when
loading an extremely large file.
@@ -47,31 +48,18 @@ Application-driven progressive image loading.
<title>Loading an animation</title>
<para>
Loading an animation is a little more complex then loading an
image. In addition to the above signals, there is also a "<link
linkend="GdkPixbufLoader-frame-done">frame_done</link>" signal,
as well as an "<link
linkend="GdkPixbufLoader-animation-done">animation_done</link>"
signal. The first lets the application know that it is dealing
with an animation, instead of a static image. It also passes a
#GdkPixbufFrame in the signal. As before, if you want to keep
the frame, you need to ref it. Once the first "<link
linkend="GdkPixbufLoader-frame-done">frame_done</link>" signal
Loading an animation is almost as easy as loading an
image. Once the first "<link
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" signal
has been emitted, you can call gdk_pixbuf_loader_get_animation()
to get the #GdkPixbufAnimation struct. Each subsequent frame
goes through a similar lifecycle. For example "<link
linkend="GdkPixbufLoader-area-prepared">area_prepared</link>" is
re-emitted. Then "<link
linkend="GdkPixbufLoader-area-updated">area_updated</link>" is
emitted as many times as necessary. Finally, "<link
linkend="GdkPixbufLoader-animation-done">animation_done</link>"
is emitted as soon as all frames are done.
to get the #GdkPixbufAnimation struct and gdk_pixbuf_animation_get_iter()
to get an #GdkPixbufAnimationIter for displaying it.
</para>
</refsect2>
<!-- ##### SECTION See_Also ##### -->
<para>
gdk_pixbuf_new_from_file()
gdk_pixbuf_new_from_file(), gdk_pixbuf_animation_new_from_file()
</para>
<!-- ##### FUNCTION gdk_pixbuf_loader_new ##### -->
+2 -2
View File
@@ -244,10 +244,10 @@ Changes the contents of a property on a window.
@window: a #GdkWindow.
@property: the property to change.
@type: the new type for the property. If @mode is
%GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
must match the existing type or an error will occur.
@format: the new format for the property. If @mode is
%GDK_PROP_MODE_REPLACE or %GDK_PROP_MODE_APPEND, then this
%GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this
must match the existing format or an error will occur.
@mode: a value describing how the new data is to be combined
with the current data.
+2
View File
@@ -90,6 +90,8 @@ on_darea_expose (GtkWidget *widget,
gdk_draw_rgb_image (widget->window, widget->style->fg_gc[GTK_STATE_NORMAL],
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
GDK_RGB_DITHER_MAX, rgbbuf, IMAGE_WIDTH * 3);
return TRUE;
}
</programlisting>
</example>
+1 -1
View File
@@ -1690,7 +1690,6 @@ GTK_OBJECT_TYPE_NAME
GtkObjectFlags
GTK_OBJECT_FLAGS
GTK_OBJECT_FLOATING
GTK_OBJECT_CONNECTED
GtkArgFlags
gtk_object_new
gtk_object_sink
@@ -3447,6 +3446,7 @@ gtk_vseparator_get_type
<FILE>gtkwidget</FILE>
<TITLE>GtkWidget</TITLE>
GtkWidget
GtkWidgetClass
GtkWidgetFlags
GTK_WIDGET_TYPE
GTK_WIDGET_STATE
+3 -2
View File
@@ -162,7 +162,7 @@ font and foreground color &mdash use standard
functions such as
<link linkend="gtk-widget-modify-font">gtk_widget_modify_font()</link>
or
<link linkend="gtk-widget-modify-fg">gtk_widget_modify_fg()</link>.
<link linkend="gtk-widget-modify-fg">gtk_widget_modify_text()</link>.
For other attributes there are dedicated methods on
<link linkend="GtkTextView">GtkTextView</link> such as
<link linkend="gtk-text-view-set-tabs">gtk_text_view_set_tabs()</link>.
@@ -170,6 +170,7 @@ For other attributes there are dedicated methods on
<informalexample><programlisting>
GtkWidget *view;
GtkTextBuffer *buffer;
GtkTextIter start, end;
PangoFontDescription *font_desc;
GdkColor color;
GtkTextTag *tag;
@@ -187,7 +188,7 @@ For other attributes there are dedicated methods on
/* Change default color throughout the widget */
gdk_color_parse ("green", &amp;color);
gtk_widget_modify_fg (view, GTK_STATE_NORMAL, &amp;color);
gtk_widget_modify_text (view, GTK_STATE_NORMAL, &amp;color);
/* Change left margin throughout the widget */
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 30);
+144
View File
@@ -585,6 +585,42 @@ Define a function pointer. Deprecated.
@arg:
@arg_id:
<!-- ##### ARG GtkBox:expand ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:fill ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:pack-type ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:padding ##### -->
<para>
</para>
<!-- ##### ARG GtkBox:position ##### -->
<para>
</para>
<!-- ##### ARG GtkButtonBox:secondary ##### -->
<para>
</para>
<!-- ##### STRUCT GtkCellRendererTextPixbuf ##### -->
<para>
@@ -817,6 +853,18 @@ You may not attach these to signals created with the
</para>
<!-- ##### ARG GtkFixed:x ##### -->
<para>
</para>
<!-- ##### ARG GtkFixed:y ##### -->
<para>
</para>
<!-- ##### ENUM GtkFontFilterType ##### -->
<para>
A set of bit flags used to specify the filter being set
@@ -877,6 +925,18 @@ a RC file.
</para>
<!-- ##### ARG GtkLayout:x ##### -->
<para>
</para>
<!-- ##### ARG GtkLayout:y ##### -->
<para>
</para>
<!-- ##### SIGNAL GtkMenuBar::cycle-focus ##### -->
<para>
@@ -885,6 +945,42 @@ a RC file.
@menubar: the object which received the signal.
@arg1:
<!-- ##### ARG GtkNotebook:menu-label ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:position ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-expand ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-fill ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-label ##### -->
<para>
</para>
<!-- ##### ARG GtkNotebook:tab-pack ##### -->
<para>
</para>
<!-- ##### ARG GtkObject:object-signal ##### -->
<para>
Setting this with a GtkType of GTK_TYPE_SIGNAL connects
@@ -1190,6 +1286,54 @@ Holds the data for a statusbar message. <structfield>text</structfield> holds th
@_gtk_reserved11:
@_gtk_reserved12:
<!-- ##### ARG GtkTable:bottom-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:left-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:right-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:top-attach ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:x-options ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:x-padding ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:y-options ##### -->
<para>
</para>
<!-- ##### ARG GtkTable:y-padding ##### -->
<para>
</para>
<!-- ##### STRUCT GtkTextBTreeNode ##### -->
<para>
+54 -54
View File
@@ -5,40 +5,40 @@ GtkButton
A widget that creates a signal when clicked on.
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkButton widget is generally used to attach a function to that
is called when the button is pressed. The various signals and how to use
them are outlined below.
</para>
<para>
The #GtkButton widget can hold any valid child widget. That is it can
hold most any other standard #GtkWidget. The most commonly used child is
the #GtkLabel.
<para>
The #GtkButton widget is generally used to attach a function to that
is called when the button is pressed. The various signals and how to use
them are outlined below.
</para>
<para>
The #GtkButton widget can hold any valid child widget. That is it can
hold most any other standard #GtkWidget. The most commonly used child is
the #GtkLabel.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
<para>
</para>
<!-- ##### STRUCT GtkButton ##### -->
<para>
This should not be accessed directly. Use the accessor functions below.
<para>
This should not be accessed directly. Use the accessor functions below.
</para>
<!-- ##### FUNCTION gtk_button_new ##### -->
<para>
Creates a new #GtkButton widget.
<para>
Creates a new #GtkButton widget.
</para>
@Returns: The newly created #GtkButton widget.
<!-- ##### FUNCTION gtk_button_new_with_label ##### -->
<para>
Creates a #GtkButton widget with a #GtkLabel child containing the given
text.
<para>
Creates a #GtkButton widget with a #GtkLabel child containing the given
text.
</para>
@label: The text you want the #GtkLabel to hold.
@@ -64,52 +64,52 @@ text.
<!-- ##### FUNCTION gtk_button_pressed ##### -->
<para>
Emits a #GtkButton::pressed signal to the given #GtkButton.
<para>
Emits a #GtkButton::pressed signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_released ##### -->
<para>
Emits a #GtkButton::released signal to the given #GtkButton.
<para>
Emits a #GtkButton::released signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_clicked ##### -->
<para>
Emits a #GtkButton::clicked signal to the given #GtkButton.
<para>
Emits a #GtkButton::clicked signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_enter ##### -->
<para>
Emits a #GtkButton::enter signal to the given #GtkButton.
<para>
Emits a #GtkButton::enter signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_leave ##### -->
<para>
Emits a #GtkButton::leave signal to the given #GtkButton.
<para>
Emits a #GtkButton::leave signal to the given #GtkButton.
</para>
@button: The #GtkButton you want to send the signal to.
<!-- ##### FUNCTION gtk_button_set_relief ##### -->
<para>
Sets the relief style of the edges of the given #GtkButton widget.
Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
The default style is, as one can guess, GTK_RELIEF_NORMAL.
<!-- FIXME: put pictures of each style -->
<para>
Sets the relief style of the edges of the given #GtkButton widget.
Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
The default style is, as one can guess, GTK_RELIEF_NORMAL.
<!-- FIXME: put pictures of each style -->
</para>
@button: The #GtkButton you want to set relief styles of.
@@ -117,8 +117,8 @@ The default style is, as one can guess, GTK_RELIEF_NORMAL.
<!-- ##### FUNCTION gtk_button_get_relief ##### -->
<para>
Returns the current relief style of the given #GtkButton.
<para>
Returns the current relief style of the given #GtkButton.
</para>
@button: The #GtkButton you want the #GtkReliefStyle from.
@@ -191,52 +191,52 @@ Returns the current relief style of the given #GtkButton.
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::clicked ##### -->
<para>
Emitted when a button clicked on by the mouse and the cursor stays on the
button. If the cursor is not on the button when the mouse button is released,
the signal is not emitted.
<para>
Emitted when a button clicked on by the mouse and the cursor stays on the
button. If the cursor is not on the button when the mouse button is released,
the signal is not emitted.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::enter ##### -->
<para>
Emitted when the mouse cursor enters the region of the button.
<para>
Emitted when the mouse cursor enters the region of the button.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::leave ##### -->
<para>
Emitted when the mouse cursor leaves the region of the button.
<para>
Emitted when the mouse cursor leaves the region of the button.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::pressed ##### -->
<para>
Emitted when the button is initially pressed.
<para>
Emitted when the button is initially pressed.
</para>
@button: the object which received the signal.
<!-- ##### SIGNAL GtkButton::released ##### -->
<para>
Emitted when a button which is pressed is released, no matter where the
mouse cursor is.
<para>
Emitted when a button which is pressed is released, no matter where the
mouse cursor is.
</para>
@button: the object which received the signal.
<!-- ##### ARG GtkButton:label ##### -->
<para>
The text within the child #GtkLabel of the #GtkButton. Only useful if
there is actually a #GtkLabel inside of the #GtkButton.
<para>
The text within the child #GtkLabel of the #GtkButton. Only useful if
there is actually a #GtkLabel inside of the #GtkButton.
</para>
<!-- ##### ARG GtkButton:relief ##### -->
<para>
The #GtkReliefStyle as outlined in gtk_button_set_relief().
<para>
The #GtkReliefStyle as outlined in gtk_button_set_relief().
</para>
<!-- ##### ARG GtkButton:use-underline ##### -->
+1 -1
View File
@@ -82,7 +82,7 @@ void quick_message (gchar *message) {
dialog = gtk_dialog_new_with_buttons ("Message",
main_application_window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_BUTTON_OK,
GTK_STOCK_OK,
GTK_RESPONSE_NONE,
NULL);
label = gtk_label_new (message);
+2 -2
View File
@@ -53,7 +53,7 @@ that drawing is implicitly clipped to the exposed area.
<title>Simple <structname>GtkDrawingArea</structname> usage.</title>
<programlisting>
gboolean
expose_event_callback (GdkWidget *widget, GdkEventExpose *event, gpointer data)
expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
gdk_draw_arc (widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
@@ -64,7 +64,7 @@ expose_event_callback (GdkWidget *widget, GdkEventExpose *event, gpointer data)
return TRUE;
}
[...]
GtkWidget *drawing_area = gtk_drawing_area_new (<!>);
GtkWidget *drawing_area = gtk_drawing_area_new (<!-- -->);
gtk_widget_set_size_request (drawing_area, 100, 100);
g_signal_connect (G_OBJECT (drawing_area), "expose_event",
G_CALLBACK (expose_event_callback), NULL);
+7 -7
View File
@@ -34,15 +34,17 @@ Simple file operations; create directory, delete file, and rename file, are avai
/* The file selection widget and the string to store the chosen filename */
GtkWidget *file_selector;
gchar *selected_filename;
void store_filename (GtkFileSelection *file_selector, gpointer user_data) {
const gchar *selected_filename;
void store_filename (GtkFileSelection *selector, gpointer user_data) {
selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
g_print ("Selected filename: %s\n", selected_filename);
}
void create_file_selection (void) {
GtkWidget *file_selector;
/* Create the selector */
file_selector = gtk_file_selection_new ("Please select a file for editing.");
@@ -133,12 +135,10 @@ Creates a new file selection dialog box. By default it will contain a #GtkCList
<!-- ##### FUNCTION gtk_file_selection_set_filename ##### -->
<para>
Sets a default path for the file requestor. If @filename includes a directory path, then the requestor will open with that path as its current working directory.
</para>
@filesel: a #GtkFileSelection.
@filename: a string to set as the default file name.
@filesel:
@filename:
<!-- ##### FUNCTION gtk_file_selection_get_filename ##### -->
@@ -38,7 +38,7 @@ for(i = 0; i < 5; i++)
<listitem><para>because a radio menu item is a menu item.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkCheckItem</term>
<term>#GtkCheckMenuItem</term>
<listitem><para>to know how to handle the check.</para></listitem>
</varlistentry>
</variablelist>
+2 -4
View File
@@ -29,7 +29,7 @@ The set of these <firstterm>default</firstterm> files
can be retrieved with gtk_rc_get_default_files()
and modified with gtk_rc_add_default_file() and
gtk_rc_set_default_files().
Additionally, the <envar>GTK_RC_FILES</envar> environment variable
Additionally, the <envar>GTK2_RC_FILES</envar> environment variable
can be set to a #G_SEARCHPATH_SEPARATOR_S-separated list of files
in order to overwrite the set of default files at runtime.
</para>
@@ -792,11 +792,9 @@ otherwise %NULL.
<!-- ##### FUNCTION gtk_rc_get_module_dir ##### -->
<para>
Returns the directory in which GTK+ will look for
theme engines.
</para>
@Returns: The directory. (Must be freed with g_free())
@Returns:
<!-- ##### FUNCTION gtk_rc_get_im_module_path ##### -->
+13 -1
View File
@@ -25,7 +25,7 @@ have been added to its parent.
<example>
<title>Obtaining the window ID of a socket.</title>
<programlisting>
GtkWidget *socket = gtk_socket_new (<!>);
GtkWidget *socket = gtk_socket_new (<!-- -->);
gtk_widget_show (socket);
gtk_container_add (GTK_CONTAINER (parent), socket);
@@ -62,6 +62,13 @@ to be destroyed at any time when the main event loop
is running.
</para>
<para>
The communication between a #GtkSocket and a #GtkPlug follows the
<ulink url="http://www.freedesktop.org/standards/xembed.html">XEmbed</ulink>
protocol. This protocol has also been implemented in other toolkits, e.g.
<application>Qt</application>, allowing the same level of integration
when embedding a <application>Qt</application> widget in GTK or vice versa.</para>
<para>
A socket can also be used to swallow arbitrary
pre-existing top-level windows using gtk_socket_steal(),
@@ -77,6 +84,11 @@ as between a #GtkPlug and a #GtkSocket.</para>
<listitem><para>the widget that plugs into a #GtkSocket.</para></listitem>
</varlistentry>
<varlistentry>
<term><ulink url="http://www.freedesktop.org/standards/xembed.html">XEmbed</ulink></term>
<listitem><para>the XEmbed Protocol Specification.</para></listitem>
</varlistentry>
</variablelist>
</para>
+2 -2
View File
@@ -168,7 +168,7 @@ enum
gchar *str_data;
gint int_data;
/* Make sure you terminate calls to gtk_tree_model_get(<!>)
/* Make sure you terminate calls to gtk_tree_model_get(<!-- -->)
* with a '-1' value
*/
gtk_tree_model_get (list_store, &amp;iter,
@@ -190,7 +190,7 @@ enum
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkTreeView, #GtkTreeStore, #GtkListStore, #GtkTreeDnd, #GtkTreeSortable
#GtkTreeView, #GtkTreeStore, #GtkListStore, <link linkend="gtk-GtkTreeView-drag-and-drop">GtkTreeDnd</link>, #GtkTreeSortable
</para>
<!-- ##### STRUCT GtkTreeModel ##### -->
+14 -3
View File
@@ -20,14 +20,20 @@ GtkWidget
</para>
<!-- ##### STRUCT GtkWidgetClass ##### -->
<para>
</para>
<!-- ##### ENUM GtkWidgetFlags ##### -->
<para>
Tells about certain properties of the widget.
</para>
@GTK_TOPLEVEL:
widgets without a real parent, as there are #GtkWindow<!>s and
#GtkMenu<!>s have this flag set throughout their lifetime.
widgets without a real parent, as there are #GtkWindow<!-- -->s and
#GtkMenu<!-- -->s have this flag set throughout their lifetime.
Toplevel widgets always contain their own #GdkWindow.
@GTK_NO_WINDOW:
Indicative for a widget that does not provide its own #GdkWindow.
@@ -929,7 +935,12 @@ Equivalent to <literal>gtk_widget_set_style (widget, NULL)</literal>.
<!-- ##### FUNCTION gtk_widget_reset_rc_styles ##### -->
<para>
Calls gtk_widget_set_rc_style() recursively on all descendants.
Reset the styles of @widget and all descendents, so when
they are looked up again, they get the correct values
for the currently loaded RC file settings.
</para>
<para>
This function is not useful for applications.
</para>
@widget: a #GtkWidget.
+1 -1
View File
@@ -287,7 +287,7 @@ setup_tree (void)
populate_tree_model (store);
/* Create a view */
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
/* The view now holds a reference. We can get rid of our own
* reference */
+119
View File
@@ -1,3 +1,122 @@
2002-07-31 Sven Neumann <sven@gimp.org>
* gdk-pixdata.c (gdk_pixdata_to_csource): free the result of
gdk_pixdata_serialize() (bug #89411).
Mon Jul 29 23:06:10 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf-scale.c: Fix some warnings by adding
casts to PixopsInterpType. (#85839, David L. Cooper, II.)
2002-07-16 Matthias Clasen <maclas@gmx.de>
Support for compressed ras images (#84994):
* io-ras.c (RAS2State): Error on unsupported ras variations.
(OneLine8): Fix colormap indexing.
(OneLine): Call updated_func with proper region.
(DoCompressed): New function, handles compressed ras data.
(gdk_pixbuf__ras_image_load_increment): Handle compressed ras
images.
2002-07-07 Matthias Clasen <maclas@gmx.de>
* io-ico.c (DecodeHeader): Correct computation of image height.
(OneLine): Correct update notification.
2002-07-06 Matthias Clasen <maclas@gmx.de>
* io-tiff.c (tiff_set_error): Handle global_error == NULL
better.
(tiff_image_parse): Don't trust TIFFRGBAImageBegin to set
the "put" routine. (Fixes #87384)
(gdk_pixbuf__tiff_image_stop_load): Don't call TIFFClose too
early.
2002-07-02 Matthias Clasen <maclas@gmx.de>
* io-bmp.c (grow_buffer): New function to avoid crashes
on unchecked reallocs.
(DecodeHeader, DecodeColormap, decode_bitmasks,
DoCompressed): Use grow_buffer instead of g_realloc
throughout. Change signatures where necessary to pass the
errors up. (#85448)
(OneLine16): Fix loading of 16bpp BI_RGB bmps. (#86286)
2002-06-28 Sven Neumann <sven@gimp.org>
* gdk-pixbuf-csource.c (print_blurb): converted a Tab to spaces.
Thu Jun 13 18:11:11 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Fix problem where when no alpha was
involved, we scaled rather than composited, but then
went ahead and composited anyways. (#76958, Patch
from Matthias Clasen) Needs to be merged to GNOME
1.4 gdk-pixbuf.
2002-06-07 Federico Mena Quintero <federico@ximian.com>
* io-bmp.c (lsb_32):
(lsb_16): New functions to fetch 32 or 16-bit little-endian values
starting at a specific memory location. We do this instead of
GINT32_FROM_LE() as the latter is simply dereferences a cast,
which doesn't work on platforms with alignment requirements.
Fixes #84083.
2002-06-01 Matthias Clasen <maclas@gmx.de>
* gdk-pixbuf-io.c (pixbuf_check_xbm): Accept xbms starting
with a C comment - those seem to be not uncommon, e.g. the Gimp
produces them. (#82706)
* io-xbm.c (read_bitmap_file_data): Don't leak memory on certain
invalid inputs.
(gdk_pixbuf__xbm_image_load_real): Don't leak memory on valid inputs.
2002-05-22 Federico Mena Quintero <federico@ximian.com>
* io-xpm.c (pixbuf_create_from_xpm): Ahem, take the rowstride into
account!!! Fixes #82515.
[This bug is not present in the GNOME 1.4 branch as its XPM loader
does not use gdk_pixbuf_new(); rather it malloc()s a buffer with
no row padding and then uses gdk_pixbuf_new_from_data() on it.]
[IMPORTANT: The comment above is to make my life easier when
merging stuff across branches. If you make changes to gdk-pixbuf
in either branch, please include a comment in the ChangeLog that
indicates whether this should be merged into the other branch.
Thanks!]
2002-05-22 Tor Lillqvist <tml@iki.fi>
* gdk-pixbuf-io.c (get_libdir): Use GTK_BINARY_VERSION (and not
GTK_VERSION) in the path to the loaders on Win32, too.
* Makefile.am: Pass GTK_BINARY_VERSION.
2002-05-18 Matthias Clasen <maclas@gmx.de>
* io-tiff.c (tiff_image_parse): fix packing order on bigendian
systems. (#81702)
Thu May 16 15:17:30 2002 Owen Taylor <otaylor@redhat.com>
* pixops/pixops.c: Patch from Matthias Clasen to fix some typos
(#77246)
Thu May 16 15:02:46 2002 Owen Taylor <otaylor@redhat.com>
* gdk-pixdata.c (gdk_pixdata_to_csource): Fix 64-bit warning.
(#78258)
2002-05-07 Michael Natterer <mitch@gimp.org>
* gdk-pixbuf/Makefile.am: build the static pixbuf loaders
conditionally like the dynamic ones so --without-lib<foo> is
honored when building with --disable-modules. (#66867)
2002-04-11 Matthias Clasen <maclas@gmx.de>
More fixes for #77807:
+27 -14
View File
@@ -17,7 +17,7 @@ gdk_pixbuf-win32res.lo : gdk_pixbuf.rc
install-libtool-import-lib:
$(INSTALL) .libs/libgdk_pixbuf-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libdk_pixbuf-$(GTK_API_VERSION).dll.a
-rm $(DESTDIR)$(libdir)/libgdk_pixbuf-$(GTK_API_VERSION).dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
@@ -144,33 +144,45 @@ libpixbufloader_tga_la_LIBADD = $(module_libs)
if HAVE_PNG
PNG_LIB = libpixbufloader-png.la
STATIC_PNG_LIB = libpixbufloader-static-png.la
endif
if HAVE_JPEG
JPEG_LIB = libpixbufloader-jpeg.la
STATIC_JPEG_LIB = libpixbufloader-static-jpeg.la
endif
GIF_LIB = libpixbufloader-gif.la
STATIC_GIF_LIB = libpixbufloader-static-gif.la
ICO_LIB = libpixbufloader-ico.la
STATIC_ICO_LIB = libpixbufloader-static-ico.la
RAS_LIB = libpixbufloader-ras.la
STATIC_RAS_LIB = libpixbufloader-static-ras.la
if HAVE_TIFF
TIFF_LIB = libpixbufloader-tiff.la
STATIC_TIFF_LIB = libpixbufloader-static-tiff.la
endif
XPM_LIB = libpixbufloader-xpm.la
STATIC_XPM_LIB = libpixbufloader-static-xpm.la
PNM_LIB = libpixbufloader-pnm.la
STATIC_PNM_LIB = libpixbufloader-static-pnm.la
BMP_LIB = libpixbufloader-bmp.la
STATIC_BMP_LIB = libpixbufloader-static-bmp.la
WBMP_LIB = libpixbufloader-wbmp.la
STATIC_WBMP_LIB = libpixbufloader-static-wbmp.la
XBM_LIB = libpixbufloader-xbm.la
STATIC_XBM_LIB = libpixbufloader-static-xbm.la
TGA_LIB = libpixbufloader-tga.la
STATIC_TGA_LIB = libpixbufloader-static-tga.la
if BUILD_DYNAMIC_MODULES
@@ -194,19 +206,19 @@ builtin_objs =
else
loader_LTLIBRARIES =
noinst_LTLIBRARIES = \
libpixbufloader-static-png.la \
libpixbufloader-static-jpeg.la \
libpixbufloader-static-gif.la \
libpixbufloader-static-ico.la \
libpixbufloader-static-ras.la \
libpixbufloader-static-tiff.la \
libpixbufloader-static-xpm.la \
libpixbufloader-static-pnm.la \
libpixbufloader-static-bmp.la \
libpixbufloader-static-wbmp.la \
libpixbufloader-static-xbm.la \
libpixbufloader-static-tga.la
noinst_LTLIBRARIES = \
$(STATIC_PNG_LIB) \
$(STATIC_JPEG_LIB) \
$(STATIC_GIF_LIB) \
$(STATIC_ICO_LIB) \
$(STATIC_RAS_LIB) \
$(STATIC_XPM_LIB) \
$(STATIC_TIFF_LIB) \
$(STATIC_PNM_LIB) \
$(STATIC_BMP_LIB) \
$(STATIC_WBMP_LIB) \
$(STATIC_XBM_LIB) \
$(STATIC_TGA_LIB)
builtin_objs = @INCLUDED_LOADER_OBJ@
@@ -219,6 +231,7 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir)/gdk-pixbuf \
-I$(top_builddir)/gdk-pixbuf \
-DGTK_VERSION=\"@GTK_VERSION@\" \
-DGTK_BINARY_VERSION=\"@GTK_BINARY_VERSION@\" \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
@INCLUDED_LOADER_DEFINE@ \
+1 -1
View File
@@ -277,7 +277,7 @@ print_blurb (FILE *bout,
fprintf (bout, " --static generate static symbols\n");
fprintf (bout, " --decoder provide rle decoder\n");
fprintf (bout, " --name=identifier C macro/variable name\n");
fprintf (bout, " --build-list parse (name, image) pairs\n");
fprintf (bout, " --build-list parse (name, image) pairs\n");
fprintf (bout, " -h, --help show this help message\n");
fprintf (bout, " -v, --version print version informations\n");
fprintf (bout, " --g-fatal-warnings make warnings fatal (abort)\n");
+14 -10
View File
@@ -193,17 +193,21 @@ pixbuf_check_xbm (guchar *buffer, int size)
if (size < 20)
return FALSE;
if (buffer [0] != '#'
|| buffer [1] != 'd'
|| buffer [2] != 'e'
|| buffer [3] != 'f'
|| buffer [4] != 'i'
|| buffer [5] != 'n'
|| buffer [6] != 'e'
|| buffer [7] != ' ')
return FALSE;
if (buffer [0] == '#'
&& buffer [1] == 'd'
&& buffer [2] == 'e'
&& buffer [3] == 'f'
&& buffer [4] == 'i'
&& buffer [5] == 'n'
&& buffer [6] == 'e'
&& buffer [7] == ' ')
return TRUE;
if (buffer [0] == '/'
&& buffer [1] != '*')
return TRUE;
return FALSE;
}
static gboolean
@@ -269,7 +273,7 @@ get_libdir (void)
if (libdir == NULL)
libdir = g_win32_get_package_installation_subdirectory
(GETTEXT_PACKAGE, dll_name, "lib\\gtk-2.0\\" GTK_VERSION "\\loaders");
(GETTEXT_PACKAGE, dll_name, "lib\\gtk-2.0\\" GTK_BINARY_VERSION "\\loaders");
return libdir;
}
+3 -3
View File
@@ -78,7 +78,7 @@ gdk_pixbuf_scale (const GdkPixbuf *src,
dest->rowstride, dest->n_channels, dest->has_alpha,
src->pixels, src->width, src->height,
src->rowstride, src->n_channels, src->has_alpha,
scale_x, scale_y, interp_type);
scale_x, scale_y, (PixopsInterpType)interp_type);
}
/**
@@ -129,7 +129,7 @@ gdk_pixbuf_composite (const GdkPixbuf *src,
dest->rowstride, dest->n_channels, dest->has_alpha,
src->pixels, src->width, src->height,
src->rowstride, src->n_channels, src->has_alpha,
scale_x, scale_y, interp_type, overall_alpha);
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha);
}
/**
@@ -197,7 +197,7 @@ gdk_pixbuf_composite_color (const GdkPixbuf *src,
dest->rowstride, dest->n_channels, dest->has_alpha,
src->pixels, src->width, src->height,
src->rowstride, src->n_channels, src->has_alpha,
scale_x, scale_y, interp_type, overall_alpha, check_x, check_y,
scale_x, scale_y, (PixopsInterpType)interp_type, overall_alpha, check_x, check_y,
check_size, color1, color2);
}
+18 -17
View File
@@ -594,7 +594,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
guint bpp, width, height, rowstride;
gboolean rle_encoded;
gchar *macro_name;
guint8 *img_buffer, *img_buffer_end, *stream;
guint8 *img_buffer, *img_buffer_end, *stream = NULL;
guint stream_length;
GString *gstring;
@@ -707,9 +707,9 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
cdata.static_prefix, cdata.const_prefix, name);
APPEND (gstring, " 0x%x, /* Pixbuf magic: 'GdkP' */\n",
GDK_PIXBUF_MAGIC_NUMBER);
APPEND (gstring, " %u + %u, /* header length + pixel_data length */\n",
APPEND (gstring, " %u + %lu, /* header length + pixel_data length */\n",
GDK_PIXDATA_HEADER_LENGTH,
rle_encoded ? img_buffer_end - img_buffer : rowstride * height);
rle_encoded ? (glong)(img_buffer_end - img_buffer) : (glong)rowstride * height);
APPEND (gstring, " 0x%x, /* pixdata_type */\n",
pixdata->pixdata_type);
APPEND (gstring, " %u, /* rowstride */\n",
@@ -725,6 +725,7 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
guint pix_length = img_buffer_end - img_buffer;
stream = gdk_pixdata_serialize (pixdata, &stream_length);
img_buffer = stream;
img_buffer_end = stream + stream_length;
APPEND (gstring, "%s%s%s %s[] = \n",
@@ -734,34 +735,33 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
APPEND (gstring, "{ \"\"\n /* Pixbuf magic (0x%x) */\n \"",
GDK_PIXBUF_MAGIC_NUMBER);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* length: header (%u) + pixel_data (%u) */\n \"",
GDK_PIXDATA_HEADER_LENGTH,
rle_encoded ? pix_length : rowstride * height);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* pixdata_type (0x%x) */\n \"",
pixdata->pixdata_type);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* rowstride (%u) */\n \"",
rowstride);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* width (%u) */\n \"", width);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* height (%u) */\n \"", height);
cdata.pos = 3;
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *stream++); save_uchar (&cdata, *stream++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
save_uchar (&cdata, *img_buffer++); save_uchar (&cdata, *img_buffer++);
APPEND (gstring, "\"\n /* pixel_data: */\n");
img_buffer = stream;
}
/* pixel_data intro
@@ -812,8 +812,9 @@ gdk_pixdata_to_csource (GdkPixdata *pixdata,
/* cleanup
*/
g_free (stream);
g_free (macro_name);
return gstring;
}
+80 -30
View File
@@ -233,14 +233,26 @@ static GdkPixbuf *gdk_pixbuf__bmp_image_load(FILE * f, GError **error)
return pb;
}
static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
struct bmp_progressive_state *State,
/* Picks up a 32-bit little-endian integer starting at the specified location.
* Does it by hand instead of dereferencing a simple (gint *) cast due to
* alignment constraints many platforms.
*/
static int
lsb_32 (guchar *src)
{
return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24);
}
/* Same as above, but for 16-bit little-endian integers. */
static short
lsb_16 (guchar *src)
{
return src[0] | (src[1] << 8);
}
static gboolean grow_buffer (struct bmp_progressive_state *State,
GError **error)
{
/* FIXME this is totally unrobust against bogus image data. */
if (State->BufferSize < GUINT32_FROM_LE (* (guint32 *) &BIH[0]) + 14) {
State->BufferSize = GUINT32_FROM_LE (* (guint32 *) &BIH[0]) + 14;
State->buff = g_try_realloc (State->buff, State->BufferSize);
if (State->buff == NULL) {
g_set_error (error,
@@ -251,22 +263,35 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
return FALSE;
}
return TRUE;
}
static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
struct bmp_progressive_state *State,
GError **error)
{
/* FIXME this is totally unrobust against bogus image data. */
if (State->BufferSize < lsb_32 (&BIH[0]) + 14) {
State->BufferSize = lsb_32 (&BIH[0]) + 14;
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
#if DUMPBIH
DumpBIH(BIH);
#endif
State->Header.size = GUINT32_FROM_LE (* (guint32 *) &BIH[0]);
State->Header.size = lsb_32 (&BIH[0]);
if (State->Header.size == 40) {
State->Header.width = GINT32_FROM_LE (* (gint32 *) &BIH[4]);
State->Header.height = GINT32_FROM_LE (* (gint32 *) &BIH[8]);
State->Header.depth = GUINT16_FROM_LE (* (guint16 *) &BIH[14]);
State->Compressed = GUINT32_FROM_LE (* (guint32 *) &BIH[16]);
State->Header.width = lsb_32 (&BIH[4]);
State->Header.height = lsb_32 (&BIH[8]);
State->Header.depth = lsb_16 (&BIH[14]);
State->Compressed = lsb_32 (&BIH[16]);
} else if (State->Header.size == 12) {
State->Header.width = GUINT16_FROM_LE (* (guint16 *) &BIH[4]);
State->Header.height = GUINT16_FROM_LE (* (guint16 *) &BIH[6]);
State->Header.depth = GUINT16_FROM_LE (* (guint16 *) &BIH[10]);
State->Header.width = lsb_16 (&BIH[4]);
State->Header.height = lsb_16 (&BIH[6]);
State->Header.depth = lsb_16 (&BIH[10]);
State->Compressed = BI_RGB;
} else {
g_set_error (error,
@@ -367,8 +392,10 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
State->BufferDone = 0;
if (State->Type <= 8) {
int biClrUsed = lsb_32 (&BIH[32]);
int n_colors = (biClrUsed ? biClrUsed : (1 << State->Header.depth));
State->read_state = READ_STATE_PALETTE;
State->BufferSize = GUINT32_FROM_LE (* (guint32 *) &BFH[10]) - 14 - State->Header.size;
State->BufferSize = lsb_32 (&BFH[10]) - 14 - State->Header.size;
} else if (State->Compressed == BI_RGB) {
State->read_state = READ_STATE_DATA;
State->BufferSize = State->LineWidth;
@@ -384,12 +411,13 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
return FALSE;
}
State->buff = g_realloc (State->buff, State->BufferSize);
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
static void DecodeColormap (guchar *buff,
static gboolean DecodeColormap (guchar *buff,
struct bmp_progressive_state *State,
GError **error)
{
@@ -404,6 +432,12 @@ static void DecodeColormap (guchar *buff,
State->Colormap[i][0] = buff[i * (State->Header.size == 12 ? 3 : 4)];
State->Colormap[i][1] = buff[i * (State->Header.size == 12 ? 3 : 4) + 1];
State->Colormap[i][2] = buff[i * (State->Header.size == 12 ? 3 : 4) + 2];
#ifdef DUMPCMAP
g_print ("color %d %x %x %x\n", i,
State->Colormap[i][0],
State->Colormap[i][1],
State->Colormap[i][2]);
#endif
}
State->read_state = READ_STATE_DATA;
@@ -414,7 +448,10 @@ static void DecodeColormap (guchar *buff,
else
State->BufferSize = State->LineWidth;
State->buff = g_realloc (State->buff, State->BufferSize);
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
/* Finds the lowest set bit and the number of set bits */
@@ -433,8 +470,10 @@ find_bits (int n, int *lowest, int *n_set)
}
/* Decodes the 3 shorts that follow for the bitmasks for BI_BITFIELDS coding */
static void
decode_bitmasks (struct bmp_progressive_state *State, guchar *buf)
static gboolean
decode_bitmasks (guchar *buf,
struct bmp_progressive_state *State,
GError **error)
{
State->r_mask = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
buf += 4;
@@ -462,7 +501,10 @@ decode_bitmasks (struct bmp_progressive_state *State, guchar *buf)
State->read_state = READ_STATE_DATA;
State->BufferDone = 0;
State->BufferSize = State->LineWidth;
State->buff = g_realloc (State->buff, State->BufferSize);
if (!grow_buffer (State, error))
return FALSE;
return TRUE;
}
/*
@@ -677,6 +719,8 @@ static void OneLine16(struct bmp_progressive_state *context)
*pixels++ = (r << 3) | (r >> 2);
*pixels++ = (g << 3) | (g >> 2);
*pixels++ = (b << 3) | (b >> 2);
src += 2;
}
}
@@ -801,14 +845,14 @@ static void OneLine(struct bmp_progressive_state *context)
0,
context->Lines,
context->Header.width,
1,
2,
context->user_data);
}
}
static void
DoCompressed(struct bmp_progressive_state *context)
static gboolean
DoCompressed(struct bmp_progressive_state *context, GError **error)
{
gint count, pos;
switch (context->compr.phase) {
@@ -881,7 +925,8 @@ DoCompressed(struct bmp_progressive_state *context)
if (context->Type == 8)
context->compr.RunCount *= 2;
context->BufferSize = (context->compr.RunCount + 3) / 4 * 2;
context->buff = g_realloc (context->buff, context->BufferSize);
if (!grow_buffer (context, error))
return FALSE;
}
}
context->BufferDone = 0;
@@ -927,13 +972,16 @@ DoCompressed(struct bmp_progressive_state *context)
}
context->compr.phase = 0;
context->BufferSize = 2;
context->buff = g_realloc (context->buff, context->BufferSize);
if (!grow_buffer (context, error))
return FALSE;
context->BufferDone = 0;
break;
case 2:
context->BufferDone = 0;
break;
}
return TRUE;
}
/*
@@ -988,18 +1036,20 @@ gdk_pixbuf__bmp_image_load_increment(gpointer data,
break;
case READ_STATE_PALETTE:
DecodeColormap (context->buff, context, error);
if (!DecodeColormap (context->buff, context, error))
return FALSE;
break;
case READ_STATE_BITMASKS:
decode_bitmasks (context, context->buff);
if (!decode_bitmasks (context->buff, context, error))
return FALSE;
break;
case READ_STATE_DATA:
if (context->Compressed == BI_RGB || context->Compressed == BI_BITFIELDS)
OneLine (context);
else
DoCompressed (context);
else if (!DoCompressed (context, error))
return FALSE;
break;
+3 -3
View File
@@ -341,7 +341,7 @@ static void DecodeHeader(guchar *Data, gint Bytes,
return;
}
State->Header.height =
(int)(BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8])/2;
(int)((BIH[11] << 24) + (BIH[10] << 16) + (BIH[9] << 8) + (BIH[8]))/2;
/* /2 because the BIH height includes the transparency mask */
if (State->Header.height == 0) {
g_set_error (error,
@@ -795,9 +795,9 @@ static void OneLine(struct ico_progressive_state *context)
if (context->updated_func != NULL) {
(*context->updated_func) (context->pixbuf,
0,
context->Lines,
context->Lines % context->Header.height,
context->Header.width,
context->Header.height,
1,
context->user_data);
}
+58 -7
View File
@@ -85,7 +85,7 @@ struct ras_progressive_state {
8 = 8 bit colormapped
1 = 1 bit bitonal
*/
gint DecoderState;
struct rasterfile Header; /* Decoded (BE->CPU) header */
@@ -181,6 +181,14 @@ static gboolean RAS2State(struct rasterfile *RAS,
return FALSE;
}
if (State->Header.type > 2 || State->Header.maptype > 1) {
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
_("unsupported RAS image variation"));
return FALSE;
}
/* Now pad the line to be a multiple of 16 bits */
if ((State->LineWidth & 1) != 0)
State->LineWidth++;
@@ -266,7 +274,8 @@ gdk_pixbuf__ras_image_begin_load(ModulePreparedNotifyFunc prepared_func,
context->Lines = 0;
context->RasType = 0;
context->DecoderState = 0;
memset(&context->Header, 0, sizeof(struct rasterfile));
@@ -349,6 +358,7 @@ static void OneLine8(struct ras_progressive_state *context)
{
gint X;
guchar *Pixels;
int offset = context->Header.maplength / 3;
X = 0;
Pixels = context->pixbuf->pixels + context->pixbuf->rowstride * context->Lines;
@@ -357,9 +367,9 @@ static void OneLine8(struct ras_progressive_state *context)
Pixels[X * 3 + 0] =
context->HeaderBuf[context->LineBuf[X] + 32];
Pixels[X * 3 + 1] =
context->HeaderBuf[context->LineBuf[X] + 256 + 32];
context->HeaderBuf[context->LineBuf[X] + offset + 32];
Pixels[X * 3 + 2] =
context->HeaderBuf[context->LineBuf[X] + 512 + 32];
context->HeaderBuf[context->LineBuf[X] + 2*offset + 32];
X++;
}
}
@@ -410,12 +420,48 @@ static void OneLine(struct ras_progressive_state *context)
0,
context->Lines,
context->Header.width,
context->Header.height,
1,
context->user_data);
}
}
static gboolean
DoCompressed (struct ras_progressive_state *context,
const guchar * buf, guint size,
GError **error)
{
int i;
for (i = 0; i < size; i++) {
switch (context->DecoderState) {
case 0:
if (buf[i] == 0x80)
context->DecoderState = 1;
else
context->LineBuf[context->LineDone++] = buf[i];
break;
case 1:
if (buf[i] == 0) {
context->LineBuf[context->LineDone++] = 0x80;
context->DecoderState = 0;
}
else
context->DecoderState = buf[i] + 1;
break;
default:
for (; context->DecoderState; context->DecoderState--) {
context->LineBuf[context->LineDone++] = buf[i];
if ((context->LineDone >= context->LineWidth) && (context->LineWidth > 0))
OneLine(context);
}
}
if ((context->LineDone >= context->LineWidth) && (context->LineWidth > 0))
OneLine(context);
}
return TRUE;
}
/*
* context - from image_begin_load
* buf - new image data
@@ -448,8 +494,13 @@ gdk_pixbuf__ras_image_load_increment(gpointer data,
buf += BytesToCopy;
context->HeaderDone += BytesToCopy;
} else {
/* Pixeldata only */
} else if (context->Header.type == 2) {
if (!DoCompressed (context, buf, size, error)) {
return FALSE;
}
size = 0;
}
else {
BytesToCopy =
context->LineWidth - context->LineDone;
if (BytesToCopy > size)
+35 -4
View File
@@ -119,16 +119,20 @@ tiff_set_error (GError **error,
/* Take the error message from libtiff and merge it with
* some context we provide.
*/
if (global_error) {
g_set_error (error,
GDK_PIXBUF_ERROR,
error_code,
"%s%s%s",
msg, global_error ? ": " : "", global_error);
"%s%s%s", msg, ": ", global_error);
if (global_error) {
g_free (global_error);
global_error = NULL;
}
else {
g_set_error (error,
GDK_PIXBUF_ERROR,
error_code, msg);
}
}
@@ -256,6 +260,14 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
return NULL;
}
if (img.put.any == NULL) {
tiff_set_error (error,
GDK_PIXBUF_ERROR_FAILED,
_("Unsupported TIFF variant"));
g_object_unref (pixbuf);
return NULL;
}
if (img.isContig) {
tiff_put_contig = img.put.contig;
img.put.contig = put_contig;
@@ -268,6 +280,21 @@ tiff_image_parse (TIFF *tiff, TiffContext *context, GError **error)
TIFFRGBAImageGet (&img, (uint32 *)pixels, width, height);
TIFFRGBAImageEnd (&img);
#ifdef WORDS_BIGENDIAN
/* Turns out that the packing used by TIFFRGBAImage depends on the host byte order... */
while (pixels < pixbuf->pixels + bytes) {
uint32 pixel = *(uint32 *)pixels;
int r = TIFFGetR(pixel);
int g = TIFFGetG(pixel);
int b = TIFFGetB(pixel);
int a = TIFFGetA(pixel);
*pixels++ = r;
*pixels++ = g;
*pixels++ = b;
*pixels++ = a;
}
#endif
G_UNLOCK (tiff_loader);
if (context)
(* context->update_func) (pixbuf, 0, 0, width, height, context->user_data);
@@ -461,16 +488,20 @@ gdk_pixbuf__tiff_image_stop_load (gpointer data,
if (pixbuf)
g_object_unref (pixbuf);
retval = pixbuf != NULL;
TIFFClose (tiff);
if (global_error)
{
tiff_set_error (error,
GDK_PIXBUF_ERROR_FAILED,
_("Failed to load TIFF image"));
tiff_pop_handlers ();
retval = FALSE;
}
}
if (tiff)
TIFFClose (tiff);
g_assert (!global_error);
g_free (context->buffer);
+2
View File
@@ -244,6 +244,7 @@ read_bitmap_file_data (FILE *fstream,
*ptr=value;
}
}
break;
}
if (!bits)
@@ -323,6 +324,7 @@ gdk_pixbuf__xbm_image_load_real (FILE *f, XBMData *context, GError **error)
}
pixels += row_stride;
}
g_free (data);
if (context) {
(* context->update_func) (pixbuf, 0, 0, w, h, context->user_data);
+3 -3
View File
@@ -1209,7 +1209,7 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
GError **error)
{
gint w, h, n_col, cpp;
gint cnt, xcnt, ycnt, wbytes, n, ns;
gint cnt, xcnt, ycnt, wbytes, n;
gint is_trans = FALSE;
const gchar *buffer;
gchar *name_buf;
@@ -1322,9 +1322,10 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
}
wbytes = w * cpp;
pixtmp = pixbuf->pixels;
for (ycnt = 0; ycnt < h; ycnt++) {
pixtmp = pixbuf->pixels + ycnt * pixbuf->rowstride;
buffer = (*get_buf) (op_body, handle);
if ((!buffer) || (strlen (buffer) < wbytes))
continue;
@@ -1332,7 +1333,6 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
for (n = 0, cnt = 0, xcnt = 0; n < wbytes; n += cpp, xcnt++) {
strncpy (pixel_str, &buffer[n], cpp);
pixel_str[cpp] = 0;
ns = 0;
color = g_hash_table_lookup (color_hash, pixel_str);
+15 -10
View File
@@ -493,13 +493,13 @@ composite_line_22_4a4 (int *weights, int n_x, int n_y,
b += ta * q0[6];
a += ta;
ta = w3 * q0[3];
r += ta * q0[0];
g += ta * q0[1];
b += ta * q0[2];
ta = w3 * q1[3];
r += ta * q1[0];
g += ta * q1[1];
b += ta * q1[2];
a += ta;
ta += w4 * q1[7];
ta = w4 * q1[7];
r += ta * q1[4];
g += ta * q1[5];
b += ta * q1[6];
@@ -881,16 +881,15 @@ scale_line_22_33 (int *weights, int n_x, int n_y,
g += w3 * q1[1];
b += w3 * q1[2];
r += w4 * q1[4];
g += w4 * q1[5];
b += w4 * q1[6];
r += w4 * q1[3];
g += w4 * q1[4];
b += w4 * q1[5];
dest[0] = (r + 0x8000) >> 16;
dest[1] = (g + 0x8000) >> 16;
dest[2] = (b + 0x8000) >> 16;
dest += 3;
x += x_step;
}
@@ -1430,10 +1429,13 @@ pixops_composite_color (guchar *dest_buf,
return;
if (!src_has_alpha && overall_alpha == 255)
{
pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels,
src_has_alpha, scale_x, scale_y, interp_type);
return;
}
switch (interp_type)
{
@@ -1481,7 +1483,7 @@ pixops_composite_color (guchar *dest_buf,
* @render_x0: x0 of region of scaled source to store into @dest_buf
* @render_y0: y0 of region of scaled source to store into @dest_buf
* @render_x1: x1 of region of scaled source to store into @dest_buf
* @render_y1: x1 of region of scaled source to store into @dest_buf
* @render_y1: y1 of region of scaled source to store into @dest_buf
* @dest_rowstride: rowstride of @dest_buf
* @dest_channels: number of channels in @dest_buf
* @dest_has_alpha: whether @dest_buf has alpha
@@ -1533,10 +1535,13 @@ pixops_composite (guchar *dest_buf,
return;
if (!src_has_alpha && overall_alpha == 255)
{
pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
dest_rowstride, dest_channels, dest_has_alpha,
src_buf, src_width, src_height, src_rowstride, src_channels,
src_has_alpha, scale_x, scale_y, interp_type);
return;
}
switch (interp_type)
{
+1
View File
@@ -11,3 +11,4 @@ gdkenumtypes.[ch]
libgdk.la
gdkconfig.h
stamp-gc-h
stamp-gdkenumtypes.h
+27 -9
View File
@@ -42,7 +42,7 @@ gdk_win32_symbols = -export-symbols gdk.def
install-libtool-import-lib:
$(INSTALL) .libs/libgdk-win32-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir)
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libdk-win32-$(GTK_API_VERSION).dll.a
-rm $(DESTDIR)$(libdir)/libgdk-win32-$(GTK_API_VERSION).dll.a
else
install-libtool-import-lib:
uninstall-libtool-import-lib:
@@ -164,7 +164,7 @@ lib_LTLIBRARIES = $(gdktargetlib)
EXTRA_LTLIBRARIES = libgdk-x11-2.0.la libgdk-linux-fb-2.0.la libgdk-win32-2.0.la
MAINTAINERCLEANFILES =
MAINTAINERCLEANFILES = gdkenumtypes.h stamp-gdkenumtypes.h
EXTRA_HEADERS =
#
@@ -185,15 +185,33 @@ if DISABLE_EXPLICIT_DEPS
endif
#note: not gdkconfig.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.c gdkenumtypes.h
BUILT_SOURCES = stamp-gc-h @REBUILD@ gdkenumtypes.h
gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
cd $(srcdir) \
&& $(PERL) ./makeenums.pl include $(gdk_public_h_sources) > gdkenumtypes.h
# Generate built header without using automake-1.4 BUILT_SOURCES
$(libgdk_x11_2_0_la_OBJECTS) $(libgdk_linux_fb_2_0_la_OBJECTS) $(libgdk_win32_2_0_la_OBJECTS): gdkenumtypes.h
gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) $(srcdir)/makeenums.pl
cd $(srcdir) \
&& $(PERL) ./makeenums.pl cfile $(gdk_public_h_sources) > gdkenumtypes.c
$(srcdir)/gdkenumtypes.h: stamp-gdkenumtypes.h
@true
stamp-gdkenumtypes.h: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#ifndef __GDK_ENUM_TYPES_H__\n#define __GDK_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define GDK_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __GDK_ENUM_TYPES_H__ */" \
$(gdk_public_h_sources) ) >> xgen-geth \
&& (cmp -s xgen-geth $(srcdir)/gdkenumtypes.h || cp xgen-geth $(srcdir)/gdkenumtypes.h ) \
&& rm -f xgen-geth \
&& echo timestamp > $(@F)
$(srcdir)/gdkenumtypes.c: @REBUILD@ $(gdk_public_h_sources) Makefile
( cd $(srcdir) && glib-mkenums \
--fhead "#define GDK_ENABLE_BROKEN\n#include \"gdk.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
$(gdk_public_h_sources) ) > xgen-getc \
&& cp xgen-getc $(srcdir)/gdkenumtypes.c \
&& rm -f xgen-getc
gdkconfig.h: stamp-gc-h
@if test -f gdkconfig.h; then :; \
+1 -1
View File
@@ -275,7 +275,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
tmp.green = foreground->green;
}
fg_gc = gdk_pango_get_gc (drawable, context, fg_set ? &tmp : NULL,
fg_gc = gdk_pango_get_gc (drawable, context, (fg_set || foreground) ? &tmp : NULL,
stipple, gc);
}
else
+14 -13
View File
@@ -437,14 +437,15 @@ rgb565lsb (GdkImage *image,
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
/* swap endianness first */
data = s[1] | s[0] << 8 | s[3] << 16 | s[2] << 24;
data = s[1] << 24 | s[0] << 16 | s[3] << 8 | s[2];
s += 4;
*o++ = (data & 0xf800) | (data & 0xe000) >> 5
| (data & 0x7e0) >> 3 | (data & 0x600) >> 9;
*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
| (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;
*o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17
| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
*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 */
@@ -544,12 +545,12 @@ rgb565msb (GdkImage *image,
| (data & 0x1f0000) >> 5 | (data & 0x1c0000) >> 10;
#else
data = *s++;
*o++ = (data & 0xf800) | (data & 0xe000) >> 5
| (data & 0x7e0) >> 3 | (data & 0x600) >> 9;
*o++ = (data & 0x1f) << 11 | (data & 0x1c) << 6
| (data & 0xf8000000) >> 24 | (data & 0xe0000000) >> 29;
*o++ = (data & 0x7e00000) >> 11 | (data & 0x6000000) >> 17
| (data & 0x1f0000) >> 13 | (data & 0x1c0000) >> 18;
*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 */
+1
View File
@@ -2991,6 +2991,7 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
}
else if (bpp == 8 &&
depth <= 8 &&
depth > 4 &&
(vtype == GDK_VISUAL_PSEUDO_COLOR
#ifdef ENABLE_GRAYSCALE
|| vtype == GDK_VISUAL_GRAYSCALE
+2
View File
@@ -2148,7 +2148,9 @@ gdk_window_process_all_updates (void)
static gboolean
gdk_window_update_idle (gpointer data)
{
GDK_THREADS_ENTER ();
gdk_window_process_all_updates ();
GDK_THREADS_LEAVE ();
return FALSE;
}
+2
View File
@@ -1011,6 +1011,8 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
if ((hrgn = ExtCreateRegion (NULL, nbytes, rgndata)) == NULL)
WIN32_API_FAILED ("ExtCreateRegion"), ok = FALSE;
g_free (rgndata);
/*
* XXX: combine the fillmode-stipple with the clip region possibly
* this needs to be done with the hcliprgn below as well, but
+2 -2
View File
@@ -219,7 +219,7 @@ gdk_screen_height (void)
gint
gdk_screen_width_mm (void)
{
return GetDeviceCaps (gdk_display_hdc, HORZSIZE);
return (double) GetDeviceCaps (gdk_display_hdc, HORZRES) / GetDeviceCaps (gdk_display_hdc, LOGPIXELSX) * 25.4;
}
/*
@@ -240,7 +240,7 @@ gdk_screen_width_mm (void)
gint
gdk_screen_height_mm (void)
{
return GetDeviceCaps (gdk_display_hdc, VERTSIZE);
return (double) GetDeviceCaps (gdk_display_hdc, VERTRES) / GetDeviceCaps (gdk_display_hdc, LOGPIXELSY) * 25.4;
}
void
+23 -3
View File
@@ -1594,6 +1594,7 @@ gdk_window_set_cursor (GdkWindow *window,
{
GdkWindowImplWin32 *impl;
GdkCursorPrivate *cursor_private;
GdkWindowObject *parent_window;
HCURSOR hcursor;
HCURSOR hprevcursor;
@@ -1637,9 +1638,10 @@ gdk_window_set_cursor (GdkWindow *window,
hcursor, impl->hcursor));
}
/* Set new cursor in all cases if we're over our window */
/* If the pointer is over our window, set new cursor if given */
if (gdk_window_get_pointer(window, NULL, NULL, NULL) == window)
SetCursor (impl->hcursor);
if (impl->hcursor != NULL)
SetCursor (impl->hcursor);
/* Destroy the previous cursor: Need to make sure it's no longer in
* use before we destroy it, in case we're not over our window but
@@ -1648,7 +1650,25 @@ gdk_window_set_cursor (GdkWindow *window,
if (hprevcursor != NULL)
{
if (GetCursor() == hprevcursor)
SetCursor (NULL);
{
/* Look for a suitable cursor to use instead */
hcursor = NULL;
parent_window = GDK_WINDOW_OBJECT (window)->parent;
while (hcursor == NULL)
{
if (parent_window)
{
impl = GDK_WINDOW_IMPL_WIN32 (parent_window->impl);
hcursor = impl->hcursor;
parent_window = parent_window->parent;
}
else
{
hcursor = LoadCursor (NULL, IDC_ARROW);
}
}
SetCursor (hcursor);
}
GDK_NOTE (MISC, g_print ("...DestroyCursor (%p)\n",
hprevcursor));
+56 -14
View File
@@ -248,25 +248,13 @@ gdk_colormap_new (GdkVisual *visual,
return colormap;
}
#define MIN_SYNC_TIME 2
static void
gdk_colormap_sync (GdkColormap *colormap,
gboolean force)
gdk_colormap_sync_palette (GdkColormap *colormap)
{
time_t current_time;
GdkColormapPrivateX11 *private = GDK_COLORMAP_PRIVATE_DATA (colormap);
XColor *xpalette;
gint nlookup;
gint i;
g_return_if_fail (GDK_IS_COLORMAP (colormap));
current_time = time (NULL);
if (!force && ((current_time - private->last_sync_time) < MIN_SYNC_TIME))
return;
private->last_sync_time = current_time;
nlookup = 0;
xpalette = g_new (XColor, colormap->size);
@@ -296,6 +284,60 @@ gdk_colormap_sync (GdkColormap *colormap,
g_free (xpalette);
}
static void
gdk_colormap_sync_direct_color (GdkColormap *colormap)
{
GdkColormapPrivateX11 *private = GDK_COLORMAP_PRIVATE_DATA (colormap);
GdkVisual *visual = colormap->visual;
XColor *xpalette;
gint i;
xpalette = g_new (XColor, colormap->size);
for (i = 0; i < colormap->size; i++)
{
xpalette[i].pixel =
(((i << visual->red_shift) & visual->red_mask) |
((i << visual->green_shift) & visual->green_mask) |
((i << visual->blue_shift) & visual->blue_mask));
}
XQueryColors (gdk_display, private->xcolormap, xpalette, colormap->size);
for (i = 0; i < colormap->size; i++)
{
colormap->colors[i].pixel = xpalette[i].pixel;
colormap->colors[i].red = xpalette[i].red;
colormap->colors[i].green = xpalette[i].green;
colormap->colors[i].blue = xpalette[i].blue;
}
g_free (xpalette);
}
#define MIN_SYNC_TIME 2
static void
gdk_colormap_sync (GdkColormap *colormap,
gboolean force)
{
time_t current_time;
GdkColormapPrivateX11 *private = GDK_COLORMAP_PRIVATE_DATA (colormap);
g_return_if_fail (GDK_IS_COLORMAP (colormap));
current_time = time (NULL);
if (!force && ((current_time - private->last_sync_time) < MIN_SYNC_TIME))
return;
private->last_sync_time = current_time;
if (colormap->visual->type == GDK_VISUAL_DIRECT_COLOR)
gdk_colormap_sync_direct_color (colormap);
else
gdk_colormap_sync_palette (colormap);
}
GdkColormap*
@@ -331,10 +373,10 @@ gdk_colormap_get_system (void)
/* Fall through */
case GDK_VISUAL_STATIC_GRAY:
case GDK_VISUAL_STATIC_COLOR:
case GDK_VISUAL_DIRECT_COLOR:
colormap->colors = g_new (GdkColor, colormap->size);
gdk_colormap_sync (colormap, TRUE);
case GDK_VISUAL_DIRECT_COLOR:
case GDK_VISUAL_TRUE_COLOR:
break;
}
+37 -3
View File
@@ -335,6 +335,8 @@ gdk_window_cache_filter (GdkXEvent *xev,
node->prev = above_node->prev;
if (node->prev)
node->prev->next = node;
else
cache->children = node;
node->next = above_node;
above_node->prev = node;
}
@@ -1740,6 +1742,10 @@ motif_dnd_filter (GdkXEvent *xev,
Atom atom;
gint16 x_root, y_root;
gboolean is_reply;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
/* First read some fields common to all Motif DND messages */
@@ -1878,6 +1884,10 @@ xdnd_status_filter (GdkXEvent *xev,
guint32 flags = xevent->xclient.data.l[1];
Atom action = xevent->xclient.data.l[4];
GdkDragContext *context;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndStatus: dest_window: %#x action: %ld",
@@ -1920,6 +1930,10 @@ xdnd_finished_filter (GdkXEvent *xev,
XEvent *xevent = (XEvent *)xev;
guint32 dest_window = xevent->xclient.data.l[0];
GdkDragContext *context;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndFinished: dest_window: %#x", dest_window));
@@ -2371,9 +2385,17 @@ xdnd_enter_filter (GdkXEvent *xev,
gulong nitems, after;
Atom *data;
guint32 source_window = xevent->xclient.data.l[0];
gboolean get_types = ((xevent->xclient.data.l[1] & 1) != 0);
gint version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
guint32 source_window;
gboolean get_types;
gint version;
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
source_window = xevent->xclient.data.l[0];
get_types = ((xevent->xclient.data.l[1] & 1) != 0);
version = (xevent->xclient.data.l[1] & 0xff000000) >> 24;
GDK_NOTE (DND,
g_message ("XdndEnter: source_window: %#x, version: %#x",
@@ -2472,6 +2494,10 @@ xdnd_leave_filter (GdkXEvent *xev,
g_message ("XdndLeave: source_window: %#x",
source_window));
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
if ((current_dest_drag != NULL) &&
(current_dest_drag->protocol == GDK_DRAG_PROTO_XDND) &&
(GDK_DRAWABLE_XID (current_dest_drag->source_window) == source_window))
@@ -2499,6 +2525,10 @@ xdnd_position_filter (GdkXEvent *xev,
gint16 y_root = xevent->xclient.data.l[2] & 0xffff;
guint32 time = xevent->xclient.data.l[3];
Atom action = xevent->xclient.data.l[4];
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndPosition: source_window: %#x position: (%d, %d) time: %d action: %ld",
@@ -2539,6 +2569,10 @@ xdnd_drop_filter (GdkXEvent *xev,
XEvent *xevent = (XEvent *)xev;
guint32 source_window = xevent->xclient.data.l[0];
guint32 time = xevent->xclient.data.l[2];
if (!event->any.window ||
gdk_window_get_window_type (event->any.window) == GDK_WINDOW_FOREIGN)
return GDK_FILTER_CONTINUE; /* Not for us */
GDK_NOTE (DND,
g_message ("XdndDrop: source_window: %#x time: %d",
+21 -10
View File
@@ -304,7 +304,8 @@ gdk_check_wm_state_changed (GdkWindow *window)
gboolean found_sticky, found_maxvert, found_maxhorz;
GdkWindowState old_state;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_WINDOW_DESTROYED (window) ||
gdk_window_get_window_type (window) != GDK_WINDOW_TOPLEVEL)
return;
if (wm_state_atom == 0)
@@ -665,6 +666,7 @@ gdk_event_translate (GdkEvent *event,
charcount = XLookupString (&xevent->xkey, buf, 16,
&keysym, &compose);
event->key.keyval = keysym;
event->key.hardware_keycode = xevent->xkey.keycode;
GDK_NOTE (EVENTS,
g_message ("key release:\t\twindow: %ld key: %12s %d",
@@ -1311,13 +1313,17 @@ gdk_event_translate (GdkEvent *event,
? " (discarding)"
: GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD
? " (discarding child)"
: xevent->xconfigure.event != xevent->xconfigure.window
? " (discarding substructure)"
: ""));
if (window &&
xevent->xconfigure.event == xevent->xconfigure.window &&
!GDK_WINDOW_DESTROYED (window) &&
(window_private->extension_events != 0))
_gdk_input_configure_event (&xevent->xconfigure, window);
if (!window ||
xevent->xconfigure.event != xevent->xconfigure.window ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_CHILD ||
GDK_WINDOW_TYPE (window) == GDK_WINDOW_ROOT)
return_val = FALSE;
@@ -1387,12 +1393,6 @@ gdk_event_translate (GdkEvent *event,
break;
}
event->property.type = GDK_PROPERTY_NOTIFY;
event->property.window = window;
event->property.atom = gdk_x11_xatom_to_atom (xevent->xproperty.atom);
event->property.time = xevent->xproperty.time;
event->property.state = xevent->xproperty.state;
if (wm_state_atom == 0)
wm_state_atom = gdk_x11_get_xatom_by_name ("_NET_WM_STATE");
@@ -1403,9 +1403,20 @@ gdk_event_translate (GdkEvent *event,
xevent->xproperty.atom == wm_desktop_atom)
{
/* If window state changed, then synthesize those events. */
gdk_check_wm_state_changed (event->property.window);
gdk_check_wm_state_changed (window);
}
if (window_private->event_mask & GDK_PROPERTY_CHANGE_MASK)
{
event->property.type = GDK_PROPERTY_NOTIFY;
event->property.window = window;
event->property.atom = gdk_x11_xatom_to_atom (xevent->xproperty.atom);
event->property.time = xevent->xproperty.time;
event->property.state = xevent->xproperty.state;
}
else
return_val = FALSE;
break;
case SelectionClear:
@@ -2076,7 +2087,7 @@ gdk_xsettings_notify_cb (const char *name,
for (i = 0; i < G_N_ELEMENTS (settings_map) ; i++)
if (strcmp (settings_map[i].xsettings_name, name) == 0)
{
new_event.setting.name = g_strdup (settings_map[i].gdk_name);
new_event.setting.name = settings_map[i].gdk_name;
break;
}
+7
View File
@@ -54,6 +54,13 @@ update_keyrange (void)
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
/* OSF-4.0 is apparently missing this macro
*/
#ifndef XkbKeySymEntry
#define XkbKeySymEntry(d,k,sl,g) \
(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
#endif
gboolean _gdk_use_xkb = FALSE;
gint _gdk_xkb_event_type;
static XkbDescPtr xkb_desc = NULL;
+74
View File
@@ -112,6 +112,78 @@ GdkArgDesc _gdk_windowing_args[] = {
{ NULL }
};
/*
* XLib internal connection handling
*/
typedef struct _GdkInternalConnection GdkInternalConnection;
struct _GdkInternalConnection
{
gint fd;
GSource *source;
Display *display;
};
static gboolean
process_internal_connection (GIOChannel *gioc,
GIOCondition cond,
gpointer data)
{
GdkInternalConnection *connection = (GdkInternalConnection *)data;
GDK_THREADS_ENTER ();
XProcessInternalConnection ((Display*)connection->display, connection->fd);
GDK_THREADS_LEAVE ();
return TRUE;
}
static GdkInternalConnection *
gdk_add_connection_handler (Display *display,
guint fd)
{
GIOChannel *io_channel;
GdkInternalConnection *connection;
connection = g_new (GdkInternalConnection, 1);
connection->fd = fd;
connection->display = display;
io_channel = g_io_channel_unix_new (fd);
connection->source = g_io_create_watch (io_channel, G_IO_IN);
g_source_set_callback (connection->source,
(GSourceFunc)process_internal_connection, connection, NULL);
g_source_attach (connection->source, NULL);
g_io_channel_unref (io_channel);
return connection;
}
static void
gdk_remove_connection_handler (GdkInternalConnection *connection)
{
g_source_destroy (connection->source);
g_free (connection);
}
static void
gdk_internal_connection_watch (Display *display,
XPointer arg,
gint fd,
gboolean opening,
XPointer *watch_data)
{
if (opening)
*watch_data = (XPointer)gdk_add_connection_handler (display, fd);
else
gdk_remove_connection_handler ((GdkInternalConnection *)*watch_data);
}
gboolean
_gdk_windowing_init_check (int argc, char **argv)
{
@@ -127,6 +199,8 @@ _gdk_windowing_init_check (int argc, char **argv)
gdk_display = XOpenDisplay (_gdk_display_name);
if (!gdk_display)
return FALSE;
XAddConnectionWatch (gdk_display, gdk_internal_connection_watch, NULL);
if (gdk_synchronize)
XSynchronize (gdk_display, True);
+6 -6
View File
@@ -162,14 +162,14 @@ gdk_pixmap_new (GdkWindow *window,
GdkColormap *cmap;
gint window_depth;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
window_depth = gdk_drawable_get_depth (GDK_DRAWABLE (window));
@@ -215,12 +215,12 @@ gdk_bitmap_create_from_data (GdkWindow *window,
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
pixmap = g_object_new (gdk_pixmap_get_type (), NULL);
@@ -256,7 +256,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
GdkDrawableImplX11 *draw_impl;
GdkPixmapImplX11 *pix_impl;
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail (window == NULL || GDK_IS_DRAWABLE (window), NULL);
g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (fg != NULL, NULL);
g_return_val_if_fail (bg != NULL, NULL);
@@ -266,7 +266,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
if (!window)
window = _gdk_parent_root;
if (GDK_WINDOW_DESTROYED (window))
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
return NULL;
if (depth == -1)
+5 -2
View File
@@ -410,7 +410,7 @@ gdk_window_new (GdkWindow *parent,
visual = gdk_visual_get_system ();
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
xattributes.event_mask = StructureNotifyMask;
xattributes.event_mask = StructureNotifyMask | PropertyChangeMask;
for (i = 0; i < _gdk_nenvent_masks; i++)
{
if (attributes->event_mask & (1 << (i + 1)))
@@ -1251,6 +1251,9 @@ gdk_window_reparent (GdkWindow *window,
GDK_WINDOW_XID (new_parent),
x, y);
window_private->x = x;
window_private->y = y;
/* From here on, we treat parents of type GDK_WINDOW_FOREIGN like
* the root window
*/
@@ -2521,7 +2524,7 @@ gdk_window_set_events (GdkWindow *window,
if (!GDK_WINDOW_DESTROYED (window))
{
GDK_WINDOW_OBJECT (window)->event_mask = event_mask;
xevent_mask = StructureNotifyMask;
xevent_mask = StructureNotifyMask | PropertyChangeMask;
for (i = 0; i < _gdk_nenvent_masks; i++)
{
if (event_mask & (1 << (i + 1)))
+2 -1
View File
@@ -511,7 +511,8 @@ xsettings_client_process_event (XSettingsClient *client,
if (xev->xany.window == RootWindow (client->display, client->screen))
{
if (xev->xany.type == ClientMessage &&
xev->xclient.message_type == client->manager_atom)
xev->xclient.message_type == client->manager_atom &&
xev->xclient.data.l[1] == client->selection_atom)
{
check_manager_window (client);
return True;
+1 -1
View File
@@ -15,7 +15,7 @@ lib/libgdk-win32-@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.
lib/libgtk-win32-@GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
EOF
zip $ZIP lib/gtk-2.0/@GTK_VERSION@/loaders/*.dll lib/gtk-2.0/immodules/@GTK_VERSION@/*.dll
zip $ZIP lib/gtk-2.0/@GTK_BINARY_VERSION@/loaders/*.dll lib/gtk-2.0/@GTK_BINARY_VERSION@/immodules/*.dll
zip $ZIP share/themes/*/gtk-2.0/gtkrc share/themes/*/gtk-2.0-key/gtkrc
+5 -3
View File
@@ -565,14 +565,16 @@ endif
# Install a RC file for the default GTK+ theme, and key themes
install-data-local: install-ms-lib install-libtool-import-lib
$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0
$(INSTALL) $(srcdir)/gtkrc.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
$(INSTALL_DATA) $(srcdir)/gtkrc.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key
$(INSTALL) $(srcdir)/gtkrc.key.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
$(INSTALL_DATA) $(srcdir)/gtkrc.key.default $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key
$(INSTALL) $(srcdir)/gtkrc.key.emacs $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
$(INSTALL_DATA) $(srcdir)/gtkrc.key.emacs $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
uninstall-local: uninstall-ms-lib uninstall-libtool-import-lib
rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0/gtkrc
rm -f $(DESTDIR)$(datadir)/themes/Default/gtk-2.0-key/gtkrc
rm -f $(DESTDIR)$(datadir)/themes/Emacs/gtk-2.0-key/gtkrc
DEPS = $(gtktargetlib) $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la $(top_builddir)/gdk/$(gdktargetlib)
+4 -4
View File
@@ -119,15 +119,15 @@ gtk_accel_group_class_init (GtkAccelGroupClass *class)
G_SIGNAL_DETAILED,
0,
accel_activate_accumulator, NULL,
_gtk_marshal_BOOLEAN__OBJECT_UINT_UINT,
G_TYPE_BOOLEAN, 3, G_TYPE_OBJECT, G_TYPE_UINT, G_TYPE_UINT);
_gtk_marshal_BOOLEAN__OBJECT_UINT_FLAGS,
G_TYPE_BOOLEAN, 3, G_TYPE_OBJECT, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE);
signal_accel_changed = g_signal_new ("accel_changed",
G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,
G_STRUCT_OFFSET (GtkAccelGroupClass, accel_changed),
NULL, NULL,
_gtk_marshal_VOID__UINT_UINT_BOXED,
G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_CLOSURE);
_gtk_marshal_VOID__UINT_FLAGS_BOXED,
G_TYPE_NONE, 3, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE, G_TYPE_CLOSURE);
}
static void
+4 -5
View File
@@ -304,13 +304,12 @@ gtk_cell_renderer_toggle_render (GtkCellRenderer *cell,
else
state = GTK_STATE_ACTIVE;
}
if (celltoggle->activatable)
{
state = GTK_STATE_NORMAL;
}
else
{
state = GTK_STATE_INSENSITIVE;
if (celltoggle->activatable)
state = GTK_STATE_NORMAL;
else
state = GTK_STATE_INSENSITIVE;
}
if (celltoggle->radio)
+3
View File
@@ -301,9 +301,12 @@ gtk_check_button_size_allocate (GtkWidget *widget,
allocation->width -
((border_width + focus_width + focus_pad) * 2
+ indicator_size + indicator_spacing * 3));
child_allocation.width = MAX (child_allocation.width, 1);
child_allocation.height = MIN (child_requisition.height,
allocation->height - (border_width + focus_width + focus_pad) * 2);
child_allocation.height = MAX (child_allocation.height, 1);
child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 +
widget->allocation.x + focus_width + focus_pad);
child_allocation.y = widget->allocation.y +
+2 -2
View File
@@ -152,8 +152,8 @@ gtk_clipboard_get (GdkAtom selection)
static void
selection_get_cb (GtkWidget *widget,
GtkSelectionData *selection_data,
guint time,
guint info)
guint info,
guint time)
{
GtkClipboard *clipboard = gtk_clipboard_get (selection_data->selection);
+2 -5
View File
@@ -7669,7 +7669,7 @@ gtk_clist_drag_data_received (GtkWidget *widget,
gtk_drag_get_source_widget (context) == widget &&
selection_data->target ==
gdk_atom_intern ("gtk-clist-drag-reorder", FALSE) &&
selection_data->format == GTK_TYPE_POINTER &&
selection_data->format == 8 &&
selection_data->length == sizeof (GtkCListCellInfo))
{
GtkCListCellInfo *source_info;
@@ -7719,12 +7719,9 @@ gtk_clist_drag_data_get (GtkWidget *widget,
ret_info.column = info->column;
gtk_selection_data_set (selection_data, selection_data->target,
GTK_TYPE_POINTER, (guchar *) &ret_info,
8, (guchar *) &ret_info,
sizeof (GtkCListCellInfo));
}
else
gtk_selection_data_set (selection_data, selection_data->target,
GTK_TYPE_POINTER, NULL, 0);
}
}
+1 -1
View File
@@ -136,7 +136,7 @@ struct _ColorSelectionPrivate
GtkWidget *dropper_grab_widget;
/* Connection to settings */
guint settings_connection;
gulong settings_connection;
};
+8 -1
View File
@@ -378,6 +378,8 @@ gtk_combo_entry_focus_out (GtkEntry * entry, GdkEventFocus * event, GtkCombo * c
if (combo->value_in_list && !gtk_combo_find (combo))
{
GSource *focus_idle;
/* gdk_beep(); *//* this can be annoying */
if (combo->ok_if_empty && !strcmp (gtk_entry_get_text (entry), ""))
return FALSE;
@@ -390,7 +392,12 @@ gtk_combo_entry_focus_out (GtkEntry * entry, GdkEventFocus * event, GtkCombo * c
so the focus can be lost anyway...
the signal_emit_stop doesn't seem to work either...
*/
gtk_idle_add ((GtkFunction) gtk_combo_focus_idle, combo);
focus_idle = g_idle_source_new ();
g_source_set_closure (focus_idle,
g_cclosure_new_object (G_CALLBACK (gtk_combo_focus_idle),
G_OBJECT (combo)));
g_source_attach (focus_idle, NULL);
/*gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "focus_out_event"); */
return TRUE;
}
+15 -1
View File
@@ -1389,6 +1389,20 @@ get_focus_chain (GtkContainer *container)
return g_object_get_data (G_OBJECT (container), "gtk-container-focus-chain");
}
/* same as gtk_container_get_children, except it includes internals
*/
static GList *
gtk_container_get_all_children (GtkContainer *container)
{
GList *children = NULL;
gtk_container_forall (container,
gtk_container_children_callback,
&children);
return children;
}
static gboolean
gtk_container_focus (GtkWidget *widget,
GtkDirectionType direction)
@@ -1420,7 +1434,7 @@ gtk_container_focus (GtkWidget *widget,
if (container->has_focus_chain)
children = g_list_copy (get_focus_chain (container));
else
children = gtk_container_get_children (container);
children = gtk_container_get_all_children (container);
if (container->has_focus_chain &&
(direction == GTK_DIR_TAB_FORWARD ||
+1 -3
View File
@@ -2904,8 +2904,6 @@ cell_size_request (GtkCList *clist,
requisition->height = MAX (requisition->height, height);
break;
default:
requisition->width = 0;
requisition->height = 0;
break;
}
@@ -6050,7 +6048,7 @@ gtk_ctree_drag_data_received (GtkWidget *widget,
gtk_drag_get_source_widget (context) == widget &&
selection_data->target ==
gdk_atom_intern ("gtk-clist-drag-reorder", FALSE) &&
selection_data->format == GTK_TYPE_POINTER &&
selection_data->format == 8 &&
selection_data->length == sizeof (GtkCListCellInfo))
{
GtkCListCellInfo *source_info;
+4 -4
View File
@@ -912,10 +912,10 @@ gtk_dialog_run (GtkDialog *dialog)
{
RunInfo ri = { NULL, GTK_RESPONSE_NONE, NULL };
gboolean was_modal;
guint response_handler;
guint unmap_handler;
guint destroy_handler;
guint delete_handler;
gulong response_handler;
gulong unmap_handler;
gulong destroy_handler;
gulong delete_handler;
g_return_val_if_fail (GTK_IS_DIALOG (dialog), -1);
+17 -3
View File
@@ -95,6 +95,7 @@ struct _GtkDragSourceInfo
gint start_x, start_y; /* Initial position */
gint cur_x, cur_y; /* Current Position */
guint32 grab_time; /* timestamp for initial grab */
GList *selections; /* selections we've claimed */
GtkDragDestInfo *proxy_dest; /* Set if this is a proxy drag */
@@ -102,6 +103,8 @@ struct _GtkDragSourceInfo
guint drop_timeout; /* Timeout for aborting drop */
guint destroy_icon : 1; /* If true, destroy icon_window
*/
guint have_grab : 1; /* Do we still have the pointer grab
*/
};
struct _GtkDragDestSite
@@ -844,9 +847,9 @@ gtk_drag_dest_set (GtkWidget *widget,
site->target_list = gtk_target_list_new (targets, n_targets);
else
site->target_list = NULL;
site->actions = actions;
site->do_proxy = FALSE;
site->proxy_window = NULL;
gtk_drag_dest_set_internal (widget, site);
}
@@ -1488,6 +1491,9 @@ gtk_drag_dest_site_destroy (gpointer data)
{
GtkDragDestSite *site = data;
if (site->proxy_window)
g_object_unref (site->proxy_window);
if (site->target_list)
gtk_target_list_unref (site->target_list);
@@ -1879,6 +1885,9 @@ gtk_drag_begin (GtkWidget *widget,
}
}
info->have_grab = TRUE;
info->grab_time = time;
return info->context;
}
@@ -2431,7 +2440,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
}
}
}
else
else if (info->have_grab)
{
cursor = gtk_drag_get_cursor (event->dnd.context->action);
if (info->cursor != cursor)
@@ -2441,7 +2450,7 @@ _gtk_drag_source_handle_event (GtkWidget *widget,
GDK_POINTER_MOTION_HINT_MASK |
GDK_BUTTON_RELEASE_MASK,
NULL,
cursor, event->dnd.time);
cursor, info->grab_time);
info->cursor = cursor;
}
@@ -2989,6 +2998,8 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
GdkEvent send_event;
GtkWidget *source_widget = info->widget;
info->have_grab = FALSE;
gdk_pointer_ungrab (time);
gdk_keyboard_ungrab (time);
@@ -3000,6 +3011,9 @@ gtk_drag_end (GtkDragSourceInfo *info, guint32 time)
gtk_signal_disconnect_by_func (GTK_OBJECT (info->ipc_widget),
GTK_SIGNAL_FUNC (gtk_drag_motion_cb),
info);
gtk_signal_disconnect_by_func (GTK_OBJECT (info->ipc_widget),
GTK_SIGNAL_FUNC (gtk_drag_key_cb),
info);
/* Send on a release pair to the the original
* widget to convince it to release its grab. We need to
+47 -19
View File
@@ -692,6 +692,12 @@ gtk_entry_class_init (GtkEntryClass *class)
GTK_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, -1);
/* Make this do the same as Backspace, to help with mis-typing */
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_SHIFT_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, -1);
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_CONTROL_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
@@ -711,13 +717,18 @@ gtk_entry_class_init (GtkEntryClass *class)
gtk_binding_entry_add_signal (binding_set, GDK_x, GDK_CONTROL_MASK,
"cut_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_c, GDK_CONTROL_MASK,
"copy_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_v, GDK_CONTROL_MASK,
"paste_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_SHIFT_MASK,
"cut_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Insert, GDK_CONTROL_MASK,
"copy_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_Insert, GDK_SHIFT_MASK,
"paste_clipboard", 0);
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
"toggle_overwrite", 0);
@@ -1800,16 +1811,25 @@ gtk_cell_editable_key_press_event (GtkEntry *entry,
GdkEventKey *key_event,
gpointer data)
{
if (key_event->keyval == GDK_Escape)
{
entry->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
if (key_event->keyval == GDK_Escape)
{
entry->editing_canceled = TRUE;
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
return TRUE;
}
return TRUE;
}
return FALSE;
/* override focus */
if (key_event->keyval == GDK_Up || key_event->keyval == GDK_Down)
{
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
return TRUE;
}
return FALSE;
}
static void
@@ -2358,11 +2378,11 @@ update_im_cursor_location (GtkEntry *entry)
GdkRectangle area;
gint strong_x;
gint strong_xoffset;
gint x, y, area_width, area_height;
gint area_width, area_height;
gtk_entry_get_cursor_locations (entry, CURSOR_STANDARD, &strong_x, NULL)
;
get_text_area_size (entry, &x, &y, &area_width, &area_height);
get_text_area_size (entry, NULL, NULL, &area_width, &area_height);
strong_xoffset = strong_x - entry->scroll_offset;
if (strong_xoffset < 0)
@@ -2373,9 +2393,9 @@ update_im_cursor_location (GtkEntry *entry)
{
strong_xoffset = area_width;
}
area.x = x + strong_xoffset;
area.y = y + area_height;
area.width = area_width;
area.x = strong_xoffset;
area.y = 0;
area.width = 0;
area.height = area_height;
gtk_im_context_set_cursor_location (entry->im_context, &area);
@@ -3894,7 +3914,7 @@ popup_targets_received (GtkClipboard *clipboard,
gtk_menu_popup (GTK_MENU (entry->popup_menu), NULL, NULL,
popup_position_func, entry,
info->button, info->time);
_gtk_menu_shell_select_first (GTK_MENU_SHELL (entry->popup_menu));
_gtk_menu_shell_select_first (GTK_MENU_SHELL (entry->popup_menu), FALSE);
}
}
@@ -3989,7 +4009,8 @@ gtk_entry_drag_motion (GtkWidget *widget,
old_position = entry->dnd_position;
new_position = gtk_entry_find_position (entry, x + entry->scroll_offset);
if (entry->editable)
if (entry->editable &&
gtk_drag_dest_find_target (widget, context, NULL) != GDK_NONE)
{
source_widget = gtk_drag_get_source_widget (context);
suggested_action = context->suggested_action;
@@ -4018,7 +4039,7 @@ gtk_entry_drag_motion (GtkWidget *widget,
}
else
{
/* Entry not editable */
/* Entry not editable, or no text */
suggested_action = 0;
entry->dnd_position = -1;
}
@@ -4088,7 +4109,7 @@ gtk_entry_drag_data_get (GtkWidget *widget,
if (gtk_editable_get_selection_bounds (editable, &sel_start, &sel_end))
{
gchar *str = gtk_editable_get_chars (editable, sel_start, sel_end);
gchar *str = gtk_entry_get_public_chars (GTK_ENTRY (widget), sel_start, sel_end);
gtk_selection_data_set_text (selection_data, str, -1);
@@ -4182,6 +4203,13 @@ blink_cb (gpointer data)
GDK_THREADS_ENTER ();
entry = GTK_ENTRY (data);
if (!GTK_WIDGET_HAS_FOCUS (entry))
{
g_warning ("GtkEntry - did not receive focus-out-event. If you\n"
"connect a handler to this signal, it must return\n"
"FALSE so the entry gets the event as well");
}
g_assert (GTK_WIDGET_HAS_FOCUS (entry));
g_assert (entry->selection_bound == entry->current_pos);
+37 -9
View File
@@ -938,13 +938,21 @@ filenames_dropped (GtkWidget *widget,
else
{
GtkWidget *dialog;
gchar *filename_utf8;
/* Conversion back to UTF-8 should always succeed for the result
* of g_filename_from_uri()
*/
filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
g_assert (filename_utf8);
dialog = gtk_message_dialog_new (GTK_WINDOW (widget),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
_("The file \"%s\" resides on another machine (called %s) and may not be available to this program.\n"
"Are you sure that you want to select it?"), filename, hostname);
"Are you sure that you want to select it?"), filename_utf8, hostname);
g_free (filename_utf8);
g_object_set_data_full (G_OBJECT (dialog), "gtk-fs-dnd-filename", g_strdup (filename), g_free);
@@ -1008,8 +1016,10 @@ filenames_drag_get (GtkWidget *widget,
}
else
{
g_print ("Setting text: '%s'\n", file);
gtk_selection_data_set_text (selection_data, file, -1);
gchar *filename_utf8 = g_filename_to_utf8 (file, -1, NULL, NULL, NULL);
g_assert (filename_utf8);
gtk_selection_data_set_text (selection_data, filename_utf8, -1);
g_free (filename_utf8);
}
}
}
@@ -1134,27 +1144,43 @@ gtk_file_selection_hide_fileop_buttons (GtkFileSelection *filesel)
/**
* gtk_file_selection_set_filename:
* @filesel: a #GtkFileSelection.
* @filename: a string to set as the default file name.
*
* Sets a default path for the file requestor. If @filename includes a
* directory path, then the requestor will open with that path as its
* current working directory.
*
* The encoding of @filename is the on-disk encoding, which
* may not be UTF-8. See g_filename_from_utf8().
**/
void
gtk_file_selection_set_filename (GtkFileSelection *filesel,
const gchar *filename)
{
gchar *buf;
const char *name, *last_slash;
char *filename_utf8;
g_return_if_fail (GTK_IS_FILE_SELECTION (filesel));
g_return_if_fail (filename != NULL);
last_slash = strrchr (filename, G_DIR_SEPARATOR);
filename_utf8 = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
g_return_if_fail (filename_utf8 != NULL);
last_slash = strrchr (filename_utf8, G_DIR_SEPARATOR);
if (!last_slash)
{
buf = g_strdup ("");
name = filename;
name = filename_utf8;
}
else
{
buf = g_strdup (filename);
buf[last_slash - filename + 1] = 0;
buf = g_strdup (filename_utf8);
buf[last_slash - filename_utf8 + 1] = 0;
name = last_slash + 1;
}
@@ -1164,14 +1190,16 @@ gtk_file_selection_set_filename (GtkFileSelection *filesel,
gtk_entry_set_text (GTK_ENTRY (filesel->selection_entry), name);
g_free (buf);
g_object_notify (G_OBJECT (filesel), "filename");
g_free (filename_utf8);
}
/**
* gtk_file_selection_get_filename:
* @filesel: a #GtkFileSelection
*
* This function returns the selected filename in encoding of
* g_filename_from_utf8(), which may or may not be the same as that
* This function returns the selected filename in the on-disk encoding
* (see g_filename_from_utf8()), which may or may not be the same as that
* used by GTK+ (UTF-8). To convert to UTF-8, call g_filename_to_utf8().
* The returned string points to a statically allocated buffer and
* should be copied if you plan to keep it around.
+17 -1
View File
@@ -136,6 +136,9 @@ static void gtk_font_selection_show_available_sizes (GtkFontSelection *fs,
gboolean first_time);
static void gtk_font_selection_size_activate (GtkWidget *w,
gpointer data);
static gboolean gtk_font_selection_size_focus_out (GtkWidget *w,
GdkEventFocus *event,
gpointer data);
static void gtk_font_selection_select_size (GtkTreeSelection *selection,
gpointer data);
@@ -317,6 +320,9 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
gtk_signal_connect (GTK_OBJECT (fontsel->size_entry), "activate",
(GtkSignalFunc) gtk_font_selection_size_activate,
fontsel);
gtk_signal_connect_after (GTK_OBJECT (fontsel->size_entry), "focus_out_event",
(GtkSignalFunc) gtk_font_selection_size_focus_out,
fontsel);
font_label = gtk_label_new_with_mnemonic (_("_Family:"));
gtk_misc_set_alignment (GTK_MISC (font_label), 0.0, 0.5);
@@ -616,7 +622,7 @@ cmp_families (const void *a, const void *b)
const char *a_name = pango_font_family_get_name (*(PangoFontFamily **)a);
const char *b_name = pango_font_family_get_name (*(PangoFontFamily **)b);
return strcmp (a_name, b_name);
return g_utf8_collate (a_name, b_name);
}
static void
@@ -941,6 +947,16 @@ gtk_font_selection_size_activate (GtkWidget *w,
gtk_font_selection_set_size (fontsel, new_size);
}
static gboolean
gtk_font_selection_size_focus_out (GtkWidget *w,
GdkEventFocus *event,
gpointer data)
{
gtk_font_selection_size_activate (w, data);
return TRUE;
}
/* This is called when a size is selected in the list. */
static void
gtk_font_selection_select_size (GtkTreeSelection *selection,
+2 -2
View File
@@ -1211,7 +1211,7 @@ gtk_icon_set_get_type (void)
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static ("GtkTypeIconSet",
our_type = g_boxed_type_register_static ("GtkIconSet",
(GBoxedCopyFunc) gtk_icon_set_ref,
(GBoxedFreeFunc) gtk_icon_set_unref);
@@ -1694,7 +1694,7 @@ gtk_icon_source_get_type (void)
static GType our_type = 0;
if (our_type == 0)
our_type = g_boxed_type_register_static ("GtkTypeIconSource",
our_type = g_boxed_type_register_static ("GtkIconSource",
(GBoxedCopyFunc) gtk_icon_source_copy,
(GBoxedFreeFunc) gtk_icon_source_free);
+4 -1
View File
@@ -227,7 +227,10 @@ gtk_im_context_real_get_surrounding (GtkIMContext *context,
}
if (info_is_local)
g_free (info->text);
{
g_free (info->text);
g_object_set_data (G_OBJECT (context), "gtk-im-surrounding-info", NULL);
}
return result;
}
+18 -14
View File
@@ -71,12 +71,14 @@ static guint16 gtk_compose_seqs[] = {
GDK_dead_acute, GDK_space, 0, 0, 0, 0x0027, /* APOSTROPHE */
GDK_dead_acute, GDK_apostrophe, 0, 0, 0, 0x00B4, /* ACUTE_ACCENT */
GDK_dead_acute, GDK_A, 0, 0, 0, 0x00C1, /* LATIN_CAPITAL_LETTER_A_WITH_ACUTE */
GDK_dead_acute, GDK_C, 0, 0, 0, 0x00C7, /* LATIN_CAPITAL_LETTER_C_WITH_CEDILLA */
GDK_dead_acute, GDK_E, 0, 0, 0, 0x00C9, /* LATIN_CAPITAL_LETTER_E_WITH_ACUTE */
GDK_dead_acute, GDK_I, 0, 0, 0, 0x00CD, /* LATIN_CAPITAL_LETTER_I_WITH_ACUTE */
GDK_dead_acute, GDK_O, 0, 0, 0, 0x00D3, /* LATIN_CAPITAL_LETTER_O_WITH_ACUTE */
GDK_dead_acute, GDK_U, 0, 0, 0, 0x00DA, /* LATIN_CAPITAL_LETTER_U_WITH_ACUTE */
GDK_dead_acute, GDK_Y, 0, 0, 0, 0x00DD, /* LATIN_CAPITAL_LETTER_Y_WITH_ACUTE */
GDK_dead_acute, GDK_a, 0, 0, 0, 0x00E1, /* LATIN_SMALL_LETTER_A_WITH_ACUTE */
GDK_dead_acute, GDK_c, 0, 0, 0, 0x00E7, /* LATIN_SMALL_LETTER_C_WITH_CEDILLA */
GDK_dead_acute, GDK_e, 0, 0, 0, 0x00E9, /* LATIN_SMALL_LETTER_E_WITH_ACUTE */
GDK_dead_acute, GDK_i, 0, 0, 0, 0x00ED, /* LATIN_SMALL_LETTER_I_WITH_ACUTE */
GDK_dead_acute, GDK_o, 0, 0, 0, 0x00F3, /* LATIN_SMALL_LETTER_O_WITH_ACUTE */
@@ -1101,10 +1103,9 @@ canonical_hex_keyval (GdkEventKey *event)
if (keyval)
return keyval;
else
/* just return the keyval unchanged, we couldn't figure
* out a way to make it a hex digit
/* No way to make it a hex digit
*/
return event->keyval;
return 0;
}
static gboolean
@@ -1114,6 +1115,8 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
GtkIMContextSimple *context_simple = GTK_IM_CONTEXT_SIMPLE (context);
GSList *tmp_list;
int n_compose = 0;
gboolean have_hex_mods;
guint hex_keyval;
int i;
if (event->type == GDK_KEY_RELEASE)
@@ -1142,30 +1145,31 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
if (event->keyval == gtk_compose_ignore[i])
return FALSE;
have_hex_mods = (event->state & (ISO_14755_MOD_MASK)) == ISO_14755_MOD_MASK;
hex_keyval = canonical_hex_keyval (event);
while (context_simple->compose_buffer[n_compose] != 0)
n_compose++;
/* First key in sequence; decide if it's a 14755 hex sequence */
if (n_compose == 0)
context_simple->in_hex_sequence =
((event->state & (ISO_14755_MOD_MASK)) == ISO_14755_MOD_MASK);
/* If we are already in a non-hex sequence, or
* the 14755 modifiers are not held down, filter all
* this keystroke is not 14755 modifiers + hex digit, don't filter
* key events with accelerator modifiers held down.
*/
if (!context_simple->in_hex_sequence ||
((event->state & (ISO_14755_MOD_MASK)) != ISO_14755_MOD_MASK))
if ((n_compose > 0 && !context_simple->in_hex_sequence) || !have_hex_mods || !hex_keyval)
{
if (event->state &
(gtk_accelerator_get_default_mod_mask () & ~GDK_SHIFT_MASK))
return FALSE;
}
/* First key in sequence; decide if it's a 14755 hex sequence */
if (n_compose == 0)
context_simple->in_hex_sequence = have_hex_mods;
/* Then, check for compose sequences
*/
if (context_simple->in_hex_sequence)
context_simple->compose_buffer[n_compose++] = canonical_hex_keyval (event);
context_simple->compose_buffer[n_compose++] = hex_keyval ? hex_keyval : event->keyval;
else
context_simple->compose_buffer[n_compose++] = event->keyval;
@@ -1174,7 +1178,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
if (context_simple->in_hex_sequence)
{
/* If the modifiers are still held down, consider the sequence again */
if ((event->state & (ISO_14755_MOD_MASK)) == ISO_14755_MOD_MASK)
if (have_hex_mods)
{
/* space ends the sequence, and we eat the space */
if (n_compose > 1 &&
@@ -1226,7 +1230,7 @@ gtk_im_context_simple_get_preedit_string (GtkIMContext *context,
PangoAttrList **attrs,
gint *cursor_pos)
{
char outbuf[25]; /* up to 4 hex digits */
char outbuf[37]; /* up to 6 hex digits */
int len = 0;
GtkIMContextSimple *context_simple = GTK_IM_CONTEXT_SIMPLE (context);
+8 -1
View File
@@ -157,6 +157,8 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext,
GtkIMContext *slave,
gboolean finalizing)
{
gboolean need_preedit_changed = FALSE;
if (multicontext->slave)
{
if (!finalizing)
@@ -179,7 +181,7 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext,
multicontext->slave = NULL;
if (!finalizing)
g_signal_emit_by_name (multicontext, "preedit_changed");
need_preedit_changed = TRUE;
}
multicontext->slave = slave;
@@ -210,6 +212,9 @@ gtk_im_multicontext_set_slave (GtkIMMulticontext *multicontext,
if (multicontext->client_window)
gtk_im_context_set_client_window (slave, multicontext->client_window);
}
if (need_preedit_changed)
g_signal_emit_by_name (multicontext, "preedit_changed");
}
static GtkIMContext *
@@ -494,5 +499,7 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
gtk_widget_show (menuitem);
gtk_menu_shell_append (menushell, menuitem);
}
g_free (contexts);
}
+3 -2
View File
@@ -1443,6 +1443,7 @@ gtk_label_ensure_layout (GtkLabel *label)
pango_layout_set_width (label->layout, width);
pango_layout_get_extents (label->layout, NULL, &logical_rect);
width = logical_rect.width;
height = logical_rect.height;
/* Unfortunately, the above may leave us with a very unbalanced looking paragraph,
@@ -1461,7 +1462,7 @@ gtk_label_ensure_layout (GtkLabel *label)
pango_layout_get_extents (label->layout, NULL, &logical_rect);
if (logical_rect.height <= height)
width = perfect_width;
width = logical_rect.width;
else
{
gint mid_width = (perfect_width + width) / 2;
@@ -1472,7 +1473,7 @@ gtk_label_ensure_layout (GtkLabel *label)
pango_layout_get_extents (label->layout, NULL, &logical_rect);
if (logical_rect.height <= height)
width = mid_width;
width = logical_rect.width;
}
}
}
+28 -22
View File
@@ -108,7 +108,8 @@ static void gtk_layout_style_set (GtkWidget *widget,
GtkStyle *old_style);
static void gtk_layout_set_adjustment_upper (GtkAdjustment *adj,
gdouble upper);
gdouble upper,
gboolean always_emit_changed);
static GtkWidgetClass *parent_class = NULL;
@@ -222,7 +223,7 @@ gtk_layout_set_adjustments (GtkLayout *layout,
layout->hadjustment = hadj;
gtk_object_ref (GTK_OBJECT (layout->hadjustment));
gtk_object_sink (GTK_OBJECT (layout->hadjustment));
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width);
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width, FALSE);
gtk_signal_connect (GTK_OBJECT (layout->hadjustment), "value_changed",
(GtkSignalFunc) gtk_layout_adjustment_changed,
@@ -235,7 +236,7 @@ gtk_layout_set_adjustments (GtkLayout *layout,
layout->vadjustment = vadj;
gtk_object_ref (GTK_OBJECT (layout->vadjustment));
gtk_object_sink (GTK_OBJECT (layout->vadjustment));
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height);
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height, FALSE);
gtk_signal_connect (GTK_OBJECT (layout->vadjustment), "value_changed",
(GtkSignalFunc) gtk_layout_adjustment_changed,
@@ -420,25 +421,30 @@ gtk_layout_move (GtkLayout *layout,
static void
gtk_layout_set_adjustment_upper (GtkAdjustment *adj,
gdouble upper)
gdouble upper,
gboolean always_emit_changed)
{
gboolean changed = FALSE;
gboolean value_changed = FALSE;
gdouble min = MAX (0., upper - adj->page_size);
if (upper != adj->upper)
{
gdouble min = MAX (0., upper - adj->page_size);
gboolean value_changed = FALSE;
adj->upper = upper;
if (adj->value > min)
{
adj->value = min;
value_changed = TRUE;
}
gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
if (value_changed)
gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed");
changed = TRUE;
}
if (adj->value > min)
{
adj->value = min;
value_changed = TRUE;
}
if (changed || always_emit_changed)
gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
if (value_changed)
gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed");
}
/**
@@ -475,9 +481,9 @@ gtk_layout_set_size (GtkLayout *layout,
g_object_thaw_notify (G_OBJECT (layout));
if (layout->hadjustment)
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width);
gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width, FALSE);
if (layout->vadjustment)
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height);
gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height, FALSE);
if (GTK_WIDGET_REALIZED (layout))
{
@@ -1002,14 +1008,14 @@ gtk_layout_size_allocate (GtkWidget *widget,
layout->hadjustment->page_size = allocation->width;
layout->hadjustment->page_increment = allocation->width * 0.9;
layout->hadjustment->lower = 0;
layout->hadjustment->upper = MAX (allocation->width, layout->width);
gtk_signal_emit_by_name (GTK_OBJECT (layout->hadjustment), "changed");
/* set_adjustment_upper() emits ::changed */
gtk_layout_set_adjustment_upper (layout->hadjustment, MAX (allocation->width, layout->width), TRUE);
layout->vadjustment->page_size = allocation->height;
layout->vadjustment->page_increment = allocation->height * 0.9;
layout->vadjustment->lower = 0;
layout->vadjustment->upper = MAX (allocation->height, layout->height);
gtk_signal_emit_by_name (GTK_OBJECT (layout->vadjustment), "changed");
gtk_layout_set_adjustment_upper (layout->vadjustment, MAX (allocation->height, layout->height), TRUE);
}
static gint
+7 -4
View File
@@ -659,9 +659,9 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
{
GtkTreeDataList *list;
GtkTreeDataList *prev;
gint old_column = column;
GValue real_value = {0, };
gboolean converted = FALSE;
gint orig_column = column;
gboolean retval = FALSE;
g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), FALSE);
@@ -736,12 +736,13 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
_gtk_tree_data_list_value_to_node (list, &real_value);
else
_gtk_tree_data_list_value_to_node (list, value);
retval = TRUE;
if (converted)
g_value_unset (&real_value);
if (sort && GTK_LIST_STORE_IS_SORTED (list_store))
gtk_list_store_sort_iter_changed (list_store, iter, orig_column);
gtk_list_store_sort_iter_changed (list_store, iter, old_column);
return retval;
}
@@ -1070,7 +1071,9 @@ gtk_list_store_insert (GtkListStore *list_store,
if (list == NULL)
{
g_warning ("%s: position %d is off the end of the list\n", G_STRLOC, position);
/* position if off the end of the list, append it */
gtk_list_store_append (list_store, iter);
return;
}
@@ -1644,6 +1647,7 @@ gtk_list_store_sort (GtkListStore *list_store)
g_array_index (sort_array, SortTuple, i + 1).el;
g_array_index (sort_array, SortTuple, list_store->length - 1).el->next = NULL;
list_store->root = g_array_index (sort_array, SortTuple, 0).el;
list_store->tail = g_array_index (sort_array, SortTuple, list_store->length - 1).el;
/* Let the world know about our new order */
new_order = g_new (gint, list_store->length);
@@ -1732,7 +1736,6 @@ gtk_list_store_sort_iter_changed (GtkListStore *list_store,
cmp_b = (* func) (GTK_TREE_MODEL (list_store), iter, &tmp_iter, data);
}
if (list_store->order == GTK_SORT_DESCENDING)
{
if (cmp_a < 0)
+32 -8
View File
@@ -49,6 +49,7 @@
#include <pango/pango-utils.h> /* For pango_split_file_list */
#include "gtkaccelmap.h"
#include "gtkbox.h"
#include "gtkdnd.h"
#include "gtkversion.h"
#include "gtkmain.h"
@@ -183,8 +184,6 @@ gtk_check_version (guint required_major,
return NULL;
}
#undef gtk_init_check
/* This checks to see if the process is running suid or sgid
* at the current time. If so, we don't allow GTK+ to be initialized.
* This is meant to be a mild check - we only error out if we
@@ -446,9 +445,9 @@ _gtk_find_module (const gchar *name,
g_free(tmp_name);
}
g_strfreev (paths);
found:
g_strfreev (paths);
return module_name;
}
@@ -551,6 +550,8 @@ gtk_disable_setlocale (void)
do_setlocale = FALSE;
}
#undef gtk_init_check
gboolean
gtk_init_check (int *argc,
char ***argv)
@@ -790,23 +791,46 @@ check_sizeof_GtkWindow (size_t sizeof_GtkWindow)
"The code using GTK+ thinks GtkWindow is of different\n"
"size than it actually is in this build of GTK+.\n"
"On Windows, this probably means that you have compiled\n"
"your code with gcc without the -fnative-struct switch.");
"your code with gcc without the -fnative-struct switch,\n"
"or that you are using an unsupported compiler.");
}
/* In GTK+ 2.0 the GtkWindow struct actually is the same size in
* gcc-compiled code on Win32 whether compiled with -fnative-struct or
* not. Unfortunately this wan't noticed until after GTK+ 2.0.1. So,
* from GTK+ 2.0.2 on, check some other struct, too, where the use of
* -fnative-struct still matters. GtkBox is one such.
*/
static void
check_sizeof_GtkBox (size_t sizeof_GtkBox)
{
if (sizeof_GtkBox != sizeof (GtkBox))
g_error ("Incompatible build!\n"
"The code using GTK+ thinks GtkBox is of different\n"
"size than it actually is in this build of GTK+.\n"
"On Windows, this probably means that you have compiled\n"
"your code with gcc without the -fnative-struct switch,\n"
"or that you are using an unsupported compiler.");
}
/* These two functions might get more checks added later, thus pass
* in the number of extra args.
*/
void
gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow)
gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
{
check_sizeof_GtkWindow (sizeof_GtkWindow);
if (num_checks >= 2)
check_sizeof_GtkBox (sizeof_GtkBox);
gtk_init (argc, argv);
}
gboolean
gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow)
gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox)
{
check_sizeof_GtkWindow (sizeof_GtkWindow);
if (num_checks >= 2)
check_sizeof_GtkBox (sizeof_GtkBox);
return gtk_init_check (argc, argv);
}
@@ -1029,8 +1053,8 @@ rewrite_events_translate (GdkWindow *old_window,
gdk_window_get_origin (old_window, &old_origin_x, &old_origin_y);
gdk_window_get_origin (new_window, &new_origin_x, &new_origin_y);
*x += new_origin_x - old_origin_x;
*y += new_origin_y - old_origin_y;
*x += old_origin_x - new_origin_x;
*y += old_origin_y - new_origin_y;
}
static GdkEvent *
+6 -4
View File
@@ -98,14 +98,16 @@ gboolean gtk_init_check (int *argc,
void gtk_init_abi_check (int *argc,
char ***argv,
int num_checks,
size_t sizeof_GtkWindow);
size_t sizeof_GtkWindow,
size_t sizeof_GtkBox);
gboolean gtk_init_check_abi_check (int *argc,
char ***argv,
int num_checks,
size_t sizeof_GtkWindow);
size_t sizeof_GtkWindow,
size_t sizeof_GtkBox);
#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 1, sizeof (GtkWindow))
#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 1, sizeof (GtkWindow))
#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox))
#endif
+2 -2
View File
@@ -25,7 +25,7 @@ BOOLEAN:BOXED
BOOLEAN:BOXED,BOXED
BOOLEAN:ENUM
BOOLEAN:ENUM,INT
BOOLEAN:OBJECT,UINT,UINT
BOOLEAN:OBJECT,UINT,FLAGS
BOOLEAN:OBJECT,INT,INT,UINT
BOOLEAN:OBJECT,STRING,STRING,BOXED
BOOLEAN:OBJECT,BOXED,BOXED
@@ -81,8 +81,8 @@ VOID:POINTER,UINT
VOID:STRING
VOID:STRING,STRING
VOID:STRING,INT,POINTER
VOID:UINT,FLAGS,BOXED
VOID:UINT,UINT
VOID:UINT,UINT,BOXED
VOID:UINT,STRING
VOID:UINT,BOXED,UINT,FLAGS,FLAGS
VOID:UINT,OBJECT,UINT,FLAGS,FLAGS
+20 -37
View File
@@ -113,6 +113,9 @@ static void gtk_menu_handle_scrolling (GtkMenu *menu,
gboolean enter);
static void gtk_menu_set_tearoff_hints (GtkMenu *menu,
gint width);
static void gtk_menu_style_set (GtkWidget *widget,
GtkStyle *previous_style);
static void gtk_menu_stop_navigating_submenu (GtkMenu *menu);
static gboolean gtk_menu_stop_navigating_submenu_cb (gpointer user_data);
@@ -206,6 +209,7 @@ gtk_menu_class_init (GtkMenuClass *class)
widget_class->hide_all = gtk_menu_hide_all;
widget_class->enter_notify_event = gtk_menu_enter_notify;
widget_class->leave_notify_event = gtk_menu_leave_notify;
widget_class->style_set = gtk_menu_style_set;
container_class->remove = gtk_menu_remove;
@@ -709,6 +713,7 @@ gtk_menu_popup (GtkMenu *menu,
* try again.
*/
menu_shell->parent_menu_shell = NULL;
menu_grab_transfer_window_destroy (menu);
return;
}
@@ -1112,13 +1117,6 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
gtk_widget_realize (menu->tearoff_window);
gdk_window_set_decorations (menu->tearoff_window->window,
GDK_DECOR_ALL |
GDK_DECOR_RESIZEH |
GDK_DECOR_MINIMIZE |
GDK_DECOR_MAXIMIZE);
gtk_window_set_resizable (GTK_WINDOW (menu->tearoff_window), FALSE);
menu->tearoff_hbox = gtk_hbox_new (FALSE, FALSE);
gtk_container_add (GTK_CONTAINER (menu->tearoff_window), menu->tearoff_hbox);
@@ -1248,6 +1246,20 @@ gtk_menu_reorder_child (GtkMenu *menu,
}
}
static void
gtk_menu_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
if (GTK_WIDGET_REALIZED (widget))
{
GtkMenu *menu = GTK_MENU (widget);
gtk_style_set_background (widget->style, menu->bin_window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, menu->view_window, GTK_STATE_NORMAL);
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
}
}
static void
gtk_menu_realize (GtkWidget *widget)
{
@@ -1667,35 +1679,6 @@ gtk_menu_paint (GtkWidget *widget,
MENU_SCROLL_ARROW_HEIGHT - 2 * border_y - 2);
}
}
else if (event->window == menu->view_window)
{
gint menu_height;
gint top_pos;
if (menu->scroll_offset < 0)
gtk_paint_box (widget->style,
menu->view_window,
GTK_STATE_ACTIVE,
GTK_SHADOW_IN,
NULL, widget, "menu",
0, 0,
-1,
-menu->scroll_offset);
menu_height = widget->requisition.height - 2*border_y;
top_pos = height - 2*border_y - (menu->upper_arrow_visible ? MENU_SCROLL_ARROW_HEIGHT : 0);
if (menu_height - menu->scroll_offset < top_pos)
gtk_paint_box (widget->style,
menu->view_window,
GTK_STATE_ACTIVE,
GTK_SHADOW_IN,
NULL, widget, "menu",
0,
menu_height - menu->scroll_offset,
-1,
top_pos - (menu_height - menu->scroll_offset));
}
}
static gboolean
@@ -1814,7 +1797,7 @@ gtk_menu_key_press (GtkWidget *widget,
menu_shell->active_menu_item &&
GTK_BIN (menu_shell->active_menu_item)->child && /* no seperators */
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu == NULL && /* no submenus */
(delete || gtk_accelerator_valid (event->keyval, event->state)))
(delete || gtk_accelerator_valid (accel_key, accel_mods)))
{
GtkWidget *menu_item = menu_shell->active_menu_item;
gboolean replace_accels = TRUE;
+48 -19
View File
@@ -372,6 +372,34 @@ get_menu_bars (GtkWindow *window)
return g_object_get_data (G_OBJECT (window), "gtk-menu-bar-list");
}
static GList *
get_viewable_menu_bars (GtkWindow *window)
{
GList *menu_bars;
GList *viewable_menu_bars = NULL;
for (menu_bars = get_menu_bars (window);
menu_bars;
menu_bars = menu_bars->next)
{
GtkWidget *widget = menu_bars->data;
gboolean viewable = TRUE;
while (widget)
{
if (!GTK_WIDGET_MAPPED (widget))
viewable = FALSE;
widget = widget->parent;
}
if (viewable)
viewable_menu_bars = g_list_prepend (viewable_menu_bars, menu_bars->data);
}
return g_list_reverse (viewable_menu_bars);
}
static void
set_menu_bars (GtkWindow *window,
GList *menubars)
@@ -410,16 +438,19 @@ window_key_press_handler (GtkWidget *widget,
((event->state & gtk_accelerator_get_default_mod_mask ()) ==
(mods & gtk_accelerator_get_default_mod_mask ())))
{
GList *menubars = get_menu_bars (GTK_WINDOW (widget));
GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (widget));
GList *menubars;
menubars = _gtk_container_focus_sort (GTK_CONTAINER (widget), menubars,
menubars = _gtk_container_focus_sort (GTK_CONTAINER (widget), tmp_menubars,
GTK_DIR_TAB_FORWARD, NULL);
g_list_free (tmp_menubars);
if (menubars)
{
GtkMenuShell *menu_shell = GTK_MENU_SHELL (menubars->data);
_gtk_menu_shell_activate (menu_shell);
_gtk_menu_shell_select_first (menu_shell);
_gtk_menu_shell_select_first (menu_shell, FALSE);
g_list_free (menubars);
@@ -501,39 +532,37 @@ _gtk_menu_bar_cycle_focus (GtkMenuBar *menubar,
GtkDirectionType dir)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (menubar));
GtkMenuItem *to_activate = NULL;
if (GTK_WIDGET_TOPLEVEL (toplevel))
{
GList *menubars = get_menu_bars (GTK_WINDOW (toplevel));
GList *tmp_menubars = get_viewable_menu_bars (GTK_WINDOW (toplevel));
GList *menubars;
GList *current;
GtkMenuBar *new;
menubars = _gtk_container_focus_sort (GTK_CONTAINER (toplevel), menubars,
menubars = _gtk_container_focus_sort (GTK_CONTAINER (toplevel), tmp_menubars,
dir, GTK_WIDGET (menubar));
g_list_free (tmp_menubars);
if (menubars)
{
current = g_list_find (menubars, menubar);
if (current && current->next)
new = current->next->data;
else
new = menubars->data;
if (new != menubar)
{
GtkMenuShell *new_menushell = GTK_MENU_SHELL (new);
if (current && current->next)
{
GtkMenuShell *new_menushell = GTK_MENU_SHELL (current->next->data);
if (new_menushell->children)
{
g_signal_emit_by_name (menubar, "cancel", 0);
gtk_signal_emit_by_name (GTK_OBJECT (new_menushell->children->data),
"activate_item");
}
to_activate = new_menushell->children->data;
}
}
g_list_free (menubars);
}
g_signal_emit_by_name (menubar, "cancel", 0);
if (to_activate)
g_signal_emit_by_name (to_activate, "activate_item");
}
static GtkShadowType
+9 -3
View File
@@ -488,6 +488,8 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
if (bin->child)
{
GtkRequisition child_requisition;
child_allocation.x = (GTK_CONTAINER (widget)->border_width +
widget->style->xthickness +
BORDER_SPACING);
@@ -499,9 +501,13 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size;
child_allocation.x += widget->allocation.x;
child_allocation.y += widget->allocation.y;
gtk_widget_get_child_requisition (bin->child, &child_requisition);
if (menu_item->submenu && menu_item->show_submenu_indicator)
child_allocation.width -= child_allocation.height;
child_allocation.width -= child_requisition.height;
if (child_allocation.width < 1)
child_allocation.width = 1;
gtk_widget_size_allocate (bin->child, &child_allocation);
}
@@ -784,7 +790,7 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item)
gtk_menu_shell_select_item (GTK_MENU_SHELL (widget->parent), widget);
gtk_menu_item_popup_submenu (widget);
_gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu));
_gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu), FALSE);
submenu = GTK_MENU_SHELL (menu_item->submenu);
}
}
+47 -17
View File
@@ -320,19 +320,11 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
GTK_TYPE_BOOL,
FALSE);
gtk_binding_entry_add_signal (binding_set,
GDK_Tab, GDK_CONTROL_MASK,
GDK_F10, 0,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Tab, GDK_CONTROL_MASK,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
gtk_binding_entry_add_signal (binding_set,
GDK_Tab, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
gtk_binding_entry_add_signal (binding_set,
GDK_KP_Tab, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
GDK_F10, GDK_SHIFT_MASK,
"cycle_focus", 1,
GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
}
@@ -872,6 +864,9 @@ gtk_menu_shell_real_select_item (GtkMenuShell *menu_shell,
{
gtk_menu_shell_deselect (menu_shell);
if (!_gtk_menu_item_is_selectable (menu_item))
return;
menu_shell->active_menu_item = menu_item;
_gtk_menu_item_set_placement (GTK_MENU_ITEM (menu_shell->active_menu_item),
GTK_MENU_SHELL_GET_CLASS (menu_shell)->submenu_placement);
@@ -989,12 +984,19 @@ gtk_menu_shell_move_selected (GtkMenuShell *menu_shell,
/**
* _gtk_menu_shell_select_first:
* @menu_shell: a #GtkMenuShell
* @search_sensitive: if %TRUE, search for the first selectable
* menu item, otherwise select nothing if
* the first item isn't sensitive. This
* should be %FALSE if the menu is being
* popped up initially.
*
* Select the first visible child of the menu shell, unless
* it's a tearoff item.
* Select the first visible or selectable child of the menu shell;
* don't select tearoff items unless the only item is a tearoff
* item.
**/
void
_gtk_menu_shell_select_first (GtkMenuShell *menu_shell)
_gtk_menu_shell_select_first (GtkMenuShell *menu_shell,
gboolean search_sensitive)
{
GtkWidget *to_select = NULL;
GList *tmp_list;
@@ -1004,7 +1006,8 @@ _gtk_menu_shell_select_first (GtkMenuShell *menu_shell)
{
GtkWidget *child = tmp_list->data;
if (GTK_WIDGET_VISIBLE (child))
if ((!search_sensitive && GTK_WIDGET_VISIBLE (child)) ||
_gtk_menu_item_is_selectable (child))
{
to_select = child;
if (!GTK_IS_TEAROFF_MENU_ITEM (child))
@@ -1018,6 +1021,33 @@ _gtk_menu_shell_select_first (GtkMenuShell *menu_shell)
gtk_menu_shell_select_item (menu_shell, to_select);
}
static void
gtk_menu_shell_select_last (GtkMenuShell *menu_shell,
gboolean search_sensitive)
{
GtkWidget *to_select = NULL;
GList *tmp_list;
tmp_list = g_list_last (menu_shell->children);
while (tmp_list)
{
GtkWidget *child = tmp_list->data;
if ((!search_sensitive && GTK_WIDGET_VISIBLE (child)) ||
_gtk_menu_item_is_selectable (child))
{
to_select = child;
if (!GTK_IS_TEAROFF_MENU_ITEM (child))
break;
}
tmp_list = tmp_list->prev;
}
if (to_select)
gtk_menu_shell_select_item (menu_shell, to_select);
}
static void
gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell)
{
@@ -1026,7 +1056,7 @@ gtk_menu_shell_select_submenu_first (GtkMenuShell *menu_shell)
menu_item = GTK_MENU_ITEM (menu_shell->active_menu_item);
if (menu_item->submenu)
_gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu));
_gtk_menu_shell_select_first (GTK_MENU_SHELL (menu_item->submenu), TRUE);
}
static void
@@ -1092,14 +1122,14 @@ gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
if (!had_selection &&
!menu_shell->active_menu_item &&
menu_shell->children)
gtk_menu_shell_select_item (menu_shell, g_list_last (menu_shell->children)->data);
gtk_menu_shell_select_last (menu_shell, TRUE);
break;
case GTK_MENU_DIR_NEXT:
gtk_menu_shell_move_selected (menu_shell, 1);
if (!had_selection &&
!menu_shell->active_menu_item &&
menu_shell->children)
gtk_menu_shell_select_item (menu_shell, menu_shell->children->data);
_gtk_menu_shell_select_first (menu_shell, TRUE);
break;
}
+2 -1
View File
@@ -111,7 +111,8 @@ void gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item,
gboolean force_deactivate);
void _gtk_menu_shell_select_first (GtkMenuShell *menu_shell);
void _gtk_menu_shell_select_first (GtkMenuShell *menu_shell,
gboolean search_sensitive);
void _gtk_menu_shell_activate (GtkMenuShell *menu_shell);
#ifdef __cplusplus
+1 -1
View File
@@ -4252,7 +4252,7 @@ gtk_notebook_prev_page (GtkNotebook *notebook)
* @show_border: %TRUE if a bevel should be drawn around the notebook.
*
* Sets whether a bevel will be drawn around the notebook pages.
* This is only has an effect when the tabs are not shown.
* This only has a visual effect when the tabs are not shown.
* See gtk_notebook_set_show_tabs().
**/
void
+7 -1
View File
@@ -295,7 +295,12 @@ gtk_option_menu_remove_menu (GtkOptionMenu *option_menu)
g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
if (option_menu->menu)
gtk_menu_detach (GTK_MENU (option_menu->menu));
{
if (GTK_MENU_SHELL (option_menu->menu)->active)
g_signal_emit_by_name (option_menu->menu, "cancel", 0);
gtk_menu_detach (GTK_MENU (option_menu->menu));
}
}
void
@@ -1016,6 +1021,7 @@ gtk_option_menu_scroll_event (GtkWidget *widget,
if (GTK_WIDGET_VISIBLE (item) && GTK_WIDGET_IS_SENSITIVE (item))
{
gtk_option_menu_set_history (option_menu, index);
gtk_menu_item_activate (GTK_MENU_ITEM (item));
break;
}

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