Compare commits

...

74 Commits

Author SHA1 Message Date
CDT 1999 Shawn T. Amundson 0ef2295c53 GTK+ is as easy as 1.2.3...
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>

        * GTK+ is as easy as 1.2.3...
1999-05-11 04:50:54 +00:00
Tim Janik 519fed9991 propagate ::selection-done emissions up to the topmost menu shell.
Mon May 10 04:20:41 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
        ::selection-done emissions up to the topmost menu shell.
1999-05-11 02:19:37 +00:00
Owen Taylor 5e52b31fd7 Unset the user data on the window before destroying it.
Fri May  7 10:15:14 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
	the user data on the window before destroying it.

	* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
	unrealize handler to take care of destroying
	notebook->panel properly.
	(Bug #1198 - Morten Welinder <terra@diku.dk>)

	* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
	of g_new and g_realloc to stop memory leak. (Actually,
	we could just use g_realloc(), but I'm not 100% sure
	that is portable).
	(Bug #1196 - Morten Welinder <terra@diku.dk>)
1999-05-07 14:29:04 +00:00
Owen Taylor bbe8b7ba61 Removed stray GtkPlugButton declaration.
Wed Apr 21 00:42:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.

	* gdk/gdkfont.c (gdk_text_measure): Fix the return value
        for fontsets.

	* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
	with bin/button confusion.
1999-05-06 03:13:41 +00:00
Owen Taylor f187c3bb24 Change G_MAXINT to 2^16 to alleviate overflow problems in various window
Wed May  5 22:24:21 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
	G_MAXINT to 2^16 to alleviate overflow problems in
	various window managers.
1999-05-06 03:12:08 +00:00
Owen Taylor 6227a115be Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
Wed May  5 22:51:06 1999  Owen Taylor  <otaylor@redhat.com>

        Patch from Sung-Hyun Nam <namsh@lgic.co.kr>

	* gdk/gdkim.c: Fix cut-and-paste errors for
	x/y and PreeditAttributes/StatusAttributes.
1999-05-06 03:11:38 +00:00
Tim Janik 2f80acc28e in the ItemFactory test, link radio items together, and show how
Thu May  6 04:53:26 1999  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c: in the ItemFactory test, link radio items together,
        and show how preselection of radio items is done.

Sun May  2 13:31:14 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
        * gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
        * gtk/gtktoolbar.c (gtk_toolbar_insert_element):
        * gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
        * gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
        * gtk/gtktable.c (gtk_table_attach):
        * gtk/gtklist.c (gtk_list_insert_items):
        * gtk/gtkmenushell.c (gtk_menu_shell_insert):
        * gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
        * gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
        * gtk/gtkbin.c (gtk_bin_add):
        * gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
        * gtk/gtkfixed.c (gtk_fixed_put):
        * gtk/gtklayout.c (gtk_layout_put):
        general fixups to container_add logic. always realize child if
        child->parent is realized, only map the child and queue a resize
        if child and child->parent are both visible.

Fri Apr 30 09:02:28 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
        instead of gtk_container_foreach to walk and unrealize children, so
        composite children get also unrealized.
        (gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
        (gtk_widget_map): assert that the widget is visible (basic constrain).
        (gtk_widget_real_map): assert that the widget is realized (basic
        constrain).

Fri Apr 29 00:53:20 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
1999-05-06 02:59:18 +00:00
Owen Taylor 30d6a30b01 Initialize size_hints.x and size_hints.y because kwm brokenly pays
Wed May  5 12:42:01 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
	Initialize size_hints.x and size_hints.y because kwm
	brokenly pays attention to them.
	(Bug #1181 -  Lars Heete <hel@admin.de>)
1999-05-05 16:46:28 +00:00
Owen Taylor 7f9cb3548b Free the return value of gdk_list_visuals(). (Bug #1193 - Morten Welinder
Wed May  5 11:38:56 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
	return value of gdk_list_visuals().
	(Bug #1193 - Morten Welinder <terra@diku.dk>)
1999-05-05 15:38:48 +00:00
Owen Taylor 17c8d9cd74 Add $INTLLIBS into $LIBS directly, rather than repeating the checks for
Wed May  5 10:47:54 1999  Owen Taylor  <otaylor@redhat.com>

	* configure.in (LIBS): Add $INTLLIBS into $LIBS
	directly, rather than repeating the checks for
	gettext.

	* INSTALL: Added information about gettext and
	NLS support.

	* acinclude.m4 (LIBM): Check for dgettext, not
	just gettext. This should hopefully fix things wrt
	systems with old versions of GNU gettext installed.
1999-05-05 15:11:36 +00:00
Manish Singh 197950e184 cast the return value of XSetIMValues to (void *) when comparing to NULL,
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.

-Yosh
1999-05-04 18:18:06 +00:00
Owen Taylor bbf7b3a60f Use width,height = 0, 0 to mean - here to edge of window, instead of -1,
Tue May  4 08:44:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
	width,height = 0, 0 to mean - here to edge of window,
	instead of -1, -1, since the former is all we support.

Tue May  4 08:34:43 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmain.c (gtk_main): Correctly free list nodes
	when removing from quit_functions list.

Mon Apr 19 10:11:12 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
	for pseudocolor where colormap->colors was double
	allocated.

	* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
	color value in the hash table with the pixel filled
	in so when we do later hash table lookups, the color
	value is correct.
1999-05-04 15:00:07 +00:00
Owen Taylor 498b5eca13 Add a gtkrc file for iso-8859-2 locales.
Tue May  4 09:32:08 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
	file for iso-8859-2 locales.

	* configure.in (ALL_LINGUAS): ALL_LINGUAS update.

Tue Apr 27 16:38:32 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
	 (Pointed out by andy@rz.uni-karlsruhe.de and others).
	 Remove some suspicious and useless lines.
1999-05-04 13:53:19 +00:00
Owen Taylor 658f736af1 Backmerge from HEAD sk.po sl.po zh_TW.Big5.po: New additions
Tue May  4 09:09:52 1999  Owen Taylor  <otaylor@redhat.com>

	* fi.wa wa.po ca.po: Backmerge from HEAD
	  sk.po sl.po zh_TW.Big5.po: New additions

	* pl.po: Backported updates from HEAD
1999-05-04 13:52:23 +00:00
Manish Singh edf4aa4bcd check private->destroyed before making the call
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call

-Yosh
1999-05-02 22:34:49 +00:00
Manish Singh 3046ab9f0f libtool 1.3 upgrade
-Yosh
1999-05-01 18:06:06 +00:00
Tim Janik a654f96831 remove unused variable.
Tue Apr 27 14:17:16 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
1999-04-29 00:21:01 +00:00
Owen Taylor ff01cccfb9 Fix leak pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 11:17:35 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
	pointed out by Morten Welinder <terra@diku.dk>.
1999-04-27 22:34:00 +00:00
Owen Taylor 0c177d15d1 When redrawing characters on non-visible entry, use appropriate '*'
Tue Apr 27 18:23:35 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
	 When redrawing characters on non-visible entry, use appropriate
	 '*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
1999-04-27 22:33:02 +00:00
Lars Hamann be0f11a4d2 compute destination cell from drag coordinates.
Tue Apr 27 01:31:40 1999  Lars Hamann  <lars@gtk.org>

        * gtk/gtkclist.c (drag_dest_cell): compute destination cell
        from drag coordinates.
        (gtk_clist_drag_data_received) (gtk_clist_drag_motion):
        use drag_dest_cell.

        * gtk/gtktree (drag_dest_cell)
        (gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
        (Bug #1129)
1999-04-26 23:57:45 +00:00
Changwoo Ryu ed0db4cd4f Updated.
1999-04-24  Changwoo Ryu  <cwryu@adam.kaist.ac.kr>

	* ko.po: Updated.
1999-04-24 14:42:49 +00:00
Tim Janik 1cc01ceb59 fix (and foxy ;) 1999-04-22 16:05:14 +00:00
Tim Janik caf95cd161 properly initialize translate_* fields. (gtk_item_factory_finalize):
Wed Apr 21 21:26:11 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
        translate_* fields.
        (gtk_item_factory_finalize): invoke translate_notify independant from
        translate_data.
        (gtk_item_factory_set_translate_func): likewise.
        (gtk_item_factory_destroy): only ifactory pointer from those widgets
        that belong to us (stupid me).
1999-04-21 22:25:48 +00:00
George Lebl 83c4021614 correctly remove the default filter from the list
Wed Apr 21 14:20:22 1999  George Lebl  <jirka@5z.com>

        * gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
          default filter from the list
1999-04-21 21:26:46 +00:00
Owen Taylor fdb8efb35a Fixed leak of rc_style list when lookup succeeeds.
Mon Apr 19 12:05:31 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
	rc_style list when lookup succeeeds.
1999-04-21 17:12:43 +00:00
Drazen Kacar 9ad66ac6e8 Merged Croatian locale from HEAD. 1999-04-19 01:16:07 +00:00
Tomas Ogren 3834ea83c0 Add a / before the directory name to keep directory names from eachother.
1999-04-18  Tomas Ogren  <stric@ing.umu.se>

        * gtk/gtkrc.c: Add a / before the directory name to keep directory
        names from eachother. (Already fixed in 1.3.x)
1999-04-18 18:21:19 +00:00
Manish Singh e3b8c8ba92 #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines

* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately

-Yosh
1999-04-17 03:49:50 +00:00
Lars Hamann e6828ec4e4 fixed undo_selection bug. fixed resync_selection bug.
Thu Apr 15 01:11:24 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkctree.c (resync_selection):
	* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
	* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
 	bug.
1999-04-14 23:33:07 +00:00
CDT 1999 Shawn T. Amundson 7ee4ba7781 Released GTK+ 1.2.2
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.2.2
1999-04-13 23:09:16 +00:00
Owen Taylor 3a03678080 removed some silly #ifdef HAVE_CONFIG that we don't do in many other
Tue Apr 13 02:49:33 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
	that we don't do in many other places. (Fixing duplicate
	#include of config.h)

	* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
	Otherwise, #ifndef XINPUT_NONE check in the latter
	doesn't work. (Bug #546)
1999-04-13 06:55:55 +00:00
Tim Janik badd841246 bumped version number to Gtk+ 1.2.2, interface 0, binary 2.
Sun Apr 11 15:08:27 1999  Tim Janik  <timj@gtk.org>

        * configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
        binary 2.

        * NEWS: updates.

Sun Apr 11 14:38:03 1999  Tim Janik  <timj@gtk.org>

        * gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
        "None" case insensitive.
1999-04-11 15:01:30 +00:00
Owen Taylor ffafb164d9 Add some missing GDK_THREADS_ENTER()/LEAVE around timeouts. (Patches from
Fri Apr  9 19:22:19 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
        Add some missing GDK_THREADS_ENTER()/LEAVE around
        timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
1999-04-09 23:34:05 +00:00
Tim Janik 8286bd2493 use gtk_widget_activate() rather than emit_by_name.
Thu Apr  8 20:10:33 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
        rather than emit_by_name.

        * gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
        on the widget across multiple signal emissions.
        (gtk_editable_delete_text): same here.
        (gtk_editable_class_init): set widget_class->activate_signal after
        editable_signals[ACTIVATE] has been created.
1999-04-08 20:11:42 +00:00
Owen Taylor ceb0f66e51 Don't clamp position here prematurely -- we might not have the right
Wed Apr  7 22:59:47 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
	position here prematurely -- we might not have the
	right ->min_position and ->max_position yet.
1999-04-08 03:06:03 +00:00
Owen Taylor 3de957405f Add error traps so if the other end of the connection dies, we survive.
Tue Apr  6 16:38:51 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
	Add error traps so if the other end of the connection
	dies, we survive.

	* gtk/gtkselection.c (gtk_selection_notify): Clean
	up properly when selection property retrieval fails.

	* gtk/gtkselection.c (gtk_selection_request): Correctly
	reject SelectionRequest notifies where the handler
	returns no data.
1999-04-06 21:00:45 +00:00
Owen Taylor 4361369939 Only unhighlight when we've previously highlighted.
Tue Apr  6 12:24:21 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
	when we've previously highlighted.

	* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
	emit two "drag_leave" signals for Motif drops.

	* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
	back the correct status messages when dropping from
	Motif onto a proxy window that is rejecting the
	drop.

	* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
	dest_xid field into two fields - one for the window
	to send in messages, one to indicate the last looked
	up window for caching purposes. This is needed, so
	that Leave messages get the correct window.
1999-04-06 18:50:38 +00:00
Owen Taylor 0d353949e2 Check explicitly for the string "None" - it is in the XPM spec and some
Mon Apr  5 17:11:57 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
	explicitly for the string "None" - it is in the XPM
	spec and some servers treat unknown colors in odd ways
	(like asking the user!)
1999-04-05 21:14:25 +00:00
Owen Taylor 80c5ac85d4 Fix warning created by people mucking around with the gsource API.
Mon Apr  5 13:21:30 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
	Fix warning created by people mucking around
	with the gsource API.

	* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
	Change mapping between GIOCondition and GdkInputCondition
	to match the way the Linux kernel does it. This should
	fix problems where closed pipes were no longer signalling
	GDK_INPUT_READ on systems with a native poll().
1999-04-05 17:24:41 +00:00
Manish Singh b44c5d0f0c made "->" into a "." of previous change so it compiles
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles

* gtk/gtkfontsel.c: added braces enclosing an if-else construct

* autogen.sh: add --enable-maintainer-mode

* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

-Yosh
1999-04-02 01:17:12 +00:00
Federico Mena Quintero 7ac92e74e8 Set the window field of the event structure before calling user filters.
Thu Apr  1 18:41:25 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkevents.c (gdk_compress_exposures): Set the
	window field of the event structure before calling
	user filters.

1999-03-31  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdk/gdk.c (gdk_init_check): Use False as the last argument to
	XInternAtom() here.  This is a particularly Old And Nasty(tm) bug.
1999-04-01 23:38:43 +00:00
Federico Mena Quintero eaa98e5cfc Use False as the last argument to XInternAtom() here. This is a
1999-03-31  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gdk/gdk.c (gdk_init_check): Use False as the last argument to
	XInternAtom() here.  This is a particularly Old And Nasty(tm) bug.
1999-04-01 10:42:06 +00:00
Tim Janik db496116d9 added functions from GLE, gtk_arg_reset() to free the value and reset type
Sat Mar 27 23:32:13 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
        the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
        to compare two argument values. added gtk_arg_to_valueloc() to set a
        variable from an arg through its location (pointer).

        * gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
        gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
        as gfloat*, uchars are collected as guchar*, ints are collected as
        gint*, etc...
1999-03-30 18:28:38 +00:00
Owen Taylor d32d93cc3c Include <string.h> instead of <strings.h>.
Mon Mar 29 17:45:47 1999  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
	Include <string.h> instead of <strings.h>.

	* gtk/gtkstyle.c: Fix double include of gtkthemes.h
	(actually, a lot more duplicate includes occur if
	 you trace through the sequence of #include's)
	gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
1999-03-29 23:44:33 +00:00
Owen Taylor da74d5d843 Free the value of the intermediate text property - prevents major memory
Mon Mar 29 17:31:52 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
	intermediate text property - prevents major memory
        leak when gdk_use_mb.
	gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
1999-03-29 22:38:18 +00:00
Owen Taylor 44dd4a430d Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
Mon Mar 29 17:02:58 1999  Owen Taylor  <otaylor@redhat.com>

        Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
	gtk-a-higuti-990322-[0-3]

	* gdk/gdkfont.c (gdk_text_extents_wc): Make  work when
	sizeof(wchar_t) != sizeof (GdkWChar)

	* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
	that was causing -DX_LOCALE not	to work.

	* gtk/gtkrc.c (gtk_rc_init):
	X_LOCALE will never have LC_MESSAGES defined

	* gdk/gdk.c (gdk_init_check):
	Remove --xim-preedit and --xim-status from argv properly.

	* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
	that the client window is present on the X server
	before we pass it to the input method.
1999-03-29 22:20:41 +00:00
Owen Taylor fcc38c19d8 Fix bug where if --display is specified on the command line, than the drag
Tue Mar  9 10:46:49 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
	if --display is specified on the command line, than
	the drag window will not be created on that display.

Tue Mar  9 10:38:24 1999  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
	lookups with only_if_exists == TRUE were inserting
	bogus values into the atom cache.
1999-03-29 20:40:47 +00:00
Manish Singh 737580cc57 Shut up CVS
-Yosh
1999-03-28 01:07:21 +00:00
Kjartan Maraas db025ebfb0 updated translation
1999-03-27  Kjartan Maraas  <kmaraas@online.no>

		* no.po: updated translation
1999-03-26 23:11:18 +00:00
Tim Janik 0ae73a09dd get $HOME from g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
Thu Mar 25 12:38:31 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
        g_get_home_dir() (gtk-pmc-990123-0.patch.gz).

        * gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
        left/right as well (gtk-michael-980726-0.patch.gz).

        * gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
        for pointer values, use gchar instead of char. fixed uline allocation
        leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
        chunks instead of G_ALLOC_ONLY.
        (gtk_label_size_request): always alter requisition as passed and leave
        widget->requisition alone.
        (gtk_label_set_text): allow NULL strings.
        (gtk_label_new): likewise.
1999-03-25 13:39:54 +00:00
CST 1999 Shawn T. Amundson 2c659472e2 Released GTK+ 1.2.1
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.2.1

        * INSTALL:
          README:
          sanity_check: Updated.

        * docs/gtk-config.1.in:
          docs/Makefile.am:
          configure.in: gtk-config is now generated.

        * docs/gtk-config.1: Removed, now generated.
1999-03-25 05:55:03 +00:00
Tim Janik 0720955e17 type/macro fixups.
Wed Mar 24 09:24:03 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkdrawingarea.[hc]: type/macro fixups.
1999-03-24 15:01:55 +00:00
Stefan Jeske 0c90498103 Added missing "%" to "prefix" 1999-03-24 09:43:05 +00:00
Kjartan Maraas bab8d95583 1112: add missing . after @xref
1999-03-22  Kjartan Maraas  <kmaraas@online.no>

		* gtk.texi:1112: add missing . after @xref
1999-03-22 20:47:19 +00:00
Tim Janik 3f2cd052fd grrr, stupid cvs, try grasp the meaning of "abort"!
Mon Mar 22 05:51:34 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
        *and* mapped (i.e. drawable).
        (gtk_bin_expose): only send exposes to drawable children.

        * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
        (gtk_box_expose): only send exposes to drawable children.

        * gtk/gtkhscale.c (gtk_hscale_draw):
        * gtk/gtkvscale.c (gtk_vscale_draw):
        hm, this is an ugly one. we first compute the size of our trough area
        here (window relative) and then check intersection with the draw_area
        which is parent relative because we're a NO_WINDOW widget, so we need
        to offset the trough area by allocation.x and allocation.y before the
        check. (this must not be done for the background area though, since
        that's already computed parent relative).
1999-03-22 06:46:16 +00:00
Tim Janik 0362058f6e only redraw children that are visible *and* mapped (i.e. drawable).
Mon Mar 22 05:51:34 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
        *and* mapped (i.e. drawable).
        (gtk_bin_expose): only send exposes to drawable children.

        * gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
        (gtk_box_expose): only send exposes to drawable children.

        * gtk/gtkhscale.c (gtk_hscale_draw):
        * gtk/gtkvscale.c (gtk_vscale_draw):
        hm, this is an ugly one. we first compute the size of our trough area
        here (window relative) and then check intersection with the draw_area
        which is widget relative, so we need to offset the trough area by
        allocation.x and allocation.y before the check. (this must not be done
        for the background area though, sicne that's already computed parent
        relative).
1999-03-22 06:35:54 +00:00
Lars Hamann b59eefd649 unmap clist if neccessary, unrealize title buttons.
Mon Mar 22 00:41:39 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
	unrealize title buttons.
1999-03-21 23:57:07 +00:00
Manish Singh 287624f406 shut up cvs
-Yosh
1999-03-21 02:19:44 +00:00
Manish Singh d4ecce94c8 acinclude.m4 config.guess config.sub ltconfig upgrade to libtool 1.2f
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f

* autogen.sh: libtool is not required to autogen gtk+

* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly needed)

-Yosh
1999-03-20 00:48:13 +00:00
Lars Hamann 536673ad38 only connect/disconnect to GtkWidgetClass::event to block mouse events.
Fri Mar 19 00:00:22 1999  Lars Hamann  <lars@gtk.org>

	* gtk/gtkclist.c (gtk_clist_column_title_passive)
	(gtk_clist_column_title_active):
	only connect/disconnect to GtkWidgetClass::event to block mouse events.

	* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
	zero initialize event, removed superfluous gdk_window_get_pointer call

	* gtk/gtklist.c (gtk_list_vertical_timeout)
	(gtk_list_horizontal_timeout): removed superfluous
 	gdk_window_get_pointer call
1999-03-19 12:36:22 +00:00
Tim Janik 8b424288ba plugging problems reported by "Bruce Mitchener, Jr." <bruce@puremagic.com>
Wed Mar 17 09:00:00 1999  Tim Janik  <timj@gtk.org>

        * plugging problems reported by "Bruce Mitchener, Jr."
        <bruce@puremagic.com> due to a purify session.

        * gtk/gtkstyle.c:
        (gtk_style_ref):
        (gtk_style_unref): assert ref_count to be > 0.

        * gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
        the requisition.
        (gtk_clist_set_shift): likewise.

        * gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
        adjustments.

        * gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
        then reset it to NULL.

        * gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
        event before sending it and set send_event to TRUE (which needs to
        be done for *all* synthesized events).
        (gtk_list_vertical_timeout): likewise.

        * gdk/gdkcolor.c:
        (gdk_colors_free):
        (gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
        key for g_hash_table_remove() in both functions, this prevents us
        from accessing possibly uninitialized portions of a GdkColor structure
        where we are only interested in its pixel value.

        * gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
        leaks.

        * gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
        to TRUE when synthesizing events.
1999-03-17 10:32:33 +00:00
Stuart Parmenter f880eba7cd make sure gtk_style_copy copies theme information 1999-03-17 03:32:11 +00:00
Tim Janik ac8d845b3d updates.
* NEWS: updates.
1999-03-17 02:38:38 +00:00
Tim Janik b691a88e07 bumped version number to Gtk+1.2.1, interface 0, binary 1.
Wed Mar 17 00:44:23 1999  Tim Janik  <timj@gtk.org>

        * configure.in: bumped version number to Gtk+1.2.1, interface 0,
        binary 1.

        * gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
        macro to test for specific gtk versions, e.g.
        #if GTK_CHECK_VERSION (1,2,1)
            gtk_menu_ensure_uline_accel_group (menu);
        #endif /* Gtk+1.2.1 */
        this macro will return whether the Gtk+ header files are from version
        major.minor.micro or _newer_, as opposed to gtk_check_version() which
        requires an exact match for binary compatibility.
1999-03-17 00:03:10 +00:00
Tim Janik af138bc287 ensure the item factory class has been created.
Tue Mar 16 17:43:33 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
	item factory class has been created.
	(gtk_item_factory_parse_rc): likewise.

	* gtk/gtkmenu.c:
	keep proper references for old_active_menu_item.
	(gtk_menu_reparent): unset the usize of the new parent,
	so the menu can sanely be size requested and we don't get nasty screen
	artefacts upon next reparentation.
	(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
	enter notify. only synthesize enter notifies if the pointer really is
	inside the event window.
	(gtk_menu_popdown): use gtk_menu_shell_deselect().
	(gtk_menu_popup): move the background setting stuff into
	gtk_menu_tearoff_bg_copy() so it can be called from other places as well.

	* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
	gtk_menu_shell_select_item() to select the new item.
	(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
	do the right thing for deselection as well.

Sat Mar 15 20:10:33 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.[hc]:
	(gtk_widget_accelerators_locked): return whether a widget's accelerators
	are locked.

        * gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
	existing accelerators if the widget's accelerators are locked.

Sat Mar 14 19:44:05 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.

	* gtk/gtkmenu.c: truely forward key press and key release events to
	the menu widget from the toplevel or tearoff window. we can't simply
	connect to that, we need to stop further processing of the events as
	well.

Sat Mar 13 13:14:17 1999  Tim Janik  <timj@gtk.org>

	* gtk/gtkmenu.c:
	(gtk_menu_key_press): pass event->keyval, event->state to
	gtk_accelerator_valid, instead of event->keyval twice.
	refuse to install single letter accelerators for menus that use
	single letter shortcuts.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
	gtk_menu_ensure_uline_accel_group().

	* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
	which will always return an uline accel group, made
	gtk_menu_get_uline_accel_group() return NULL if the group isn't
	yet created.
1999-03-16 22:37:32 +00:00
Lars Hamann 29ce61fcf3 added button_passive flag.
Mon Mar 15 01:03:27 1999  Lars Hamann  <lars@gtk.org>

        * gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.

        * gtk/gtkclist.c (gtk_clist_column_title_passive):
        Leave button sensitive, trap  button_press, button_release,
        motion_notify, enter_notify and leave_notify events instead.
        (gtk_clist_column_title_active): disconnect event handler.
        (gtk_clist_drag_data_get): fixed memory leak. Reported by
        Guillaume Laurent <glaurent@worldnet.fr>
1999-03-15 22:37:28 +00:00
George Lebl 69d2eba366 swap the gtk_drag_highlight_expose and gtk_drag_highlight_paint since it
Mon Mar 15 03:39:47 1999  George Lebl  <jirka@5z.com>

        * gtk/gtkdnd.c: (gtk_drag_highlight) swap the
          gtk_drag_highlight_expose and gtk_drag_highlight_paint since
          it was connecting a void function to expose_event and the int
          returning function to the draw signal
1999-03-15 11:40:27 +00:00
Lars Hamann efb837bdb6 fixed a few width/height mixups.
Wed Mar 10 23:49:55 1999  Lars Hamann  <lars@gtk.org>

        * gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
        width/height mixups.

        * gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
        if needed.
1999-03-10 23:20:10 +00:00
Federico Mena Quintero 5db63aaa6d Significantly reduced the number of calls to gdk_draw_point() (and thus to
Wed Mar 10 02:07:31 1999  Tim Janik  <timj@gtk.org>

        * merged from 1.3:
1999-03-09  Federico Mena Quintero  <federico@nuclecu.unam.mx>

        * gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
        the number of calls to gdk_draw_point() (and thus to X) by
        clipping the points by hand.

        * gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
        the clip parameter.
        (gtk_handle_box_paint): Only paint the handle if the expose area
        intersects it.
1999-03-10 01:14:38 +00:00
Tim Janik 7e8d27f327 unref the item factory after window's destruction.
Wed Mar 10 00:11:32 1999  Tim Janik  <timj@gtk.org>

        * gtk/testgtk.c (create_item_factory): unref the item factory after
        window's destruction.

        * gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
        count on the menu shell around the menu item's activation, since the
        signal emission may cause menu shell destruction.

        * gtk/gtkitemfactory.c:
        the previous code leaked one accel group per menu. we use
        gtk_menu_get_uline_accel_group() now to fix that, and with that
        also create the underline accelerator group of the menus only if
        required (i.e. an underline accelerator has been specified).
        (gtk_item_factory_construct):
        (gtk_item_factory_create_item): removed code that would create an
        extra accel group for the menu (and leak references).
        (gtk_item_factory_create_item): adapted the underline accelerator
        installation code to properly feature gtk_menu_get_uline_accel_group().

        * gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
        menu->accel_group, this may return NULL if the accelerator group
        hasn't been set yet.
        added gtk_menu_get_uline_accel_group() to retrive the underline
        accelerator group of the menu, this will be created on demand
        and proper care is taken about its reference count.

        * gtk/gtkitemfactory.h:
        * gtk/gtkitemfactory.c:
        dumped the approach of keeping a widgets by action list on the
        factory since the factory<->widget destroy negotiation didn't work
        and would be hard to get going at all. instead we keep a list of
        GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
        persistant throughout a program's life time).
        also, i removed the static const gchar *key_* variables, and made
        them inline strings (they weren't actually used anyways).
        (gtk_item_factory_add_item): update ifactory->items.
        (gtk_item_factory_destroy): destroy ifactory->items (and remove
        the item factory pointer from the remaining ifactory widgets).
        (gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
        list to find the widget.
        (gtk_item_factory_get_item): new function that works around
        gtk_item_factory_get_widget() limitations, this function will only
        return menu items, even for <Branch> entries.
1999-03-10 01:00:04 +00:00
Tim Janik 8556b64654 first lookup the xfont ID in our font hash table, if we have a
Tue Mar  9 01:01:28 1999  Tim Janik  <timj@gtk.org>

        * gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
        font hash table, if we have a GdkFontPrivate entry for this font
        already, simply increment its reference count, provided by Olaf Dietsche
        <olaf.dietsche+list.gtk@netcologne.de>.

        * gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
        provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
1999-03-09 00:21:31 +00:00
Tim Janik 12d38df79e before adding a child to a conatiner, make sure it is (default)
Sun Mar  7 06:13:29 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtkcontainer.c:
        (gtk_container_add_with_args):
        (gtk_container_addv):
        (gtk_container_add): before adding a child to a conatiner, make sure
        it is (default) constructed, this is neccessary because under certain
        circumstances the child will get relized and mapped immediatedly, in
        which case it has to be constructed already.
1999-03-07 06:09:53 +00:00
Tim Janik 7699e34d83 count object_signal values > 1 as TRUE also.
Mon Mar  1 17:58:21 1999  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
        values > 1 as TRUE also.
1999-03-01 18:51:07 +00:00
Tim Janik 14ff63b93d minor fix. 1999-02-27 00:35:08 +00:00
141 changed files with 14888 additions and 5639 deletions
+2
View File
@@ -13,3 +13,5 @@ gtk-config
config.cache
ABOUT-NLS
intl
stamp-h.in
gtk+.spec
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+722 -1
View File
@@ -1,3 +1,724 @@
Mon May 10 22:20:06 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* GTK+ is as easy as 1.2.3...
Mon May 10 04:20:41 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): propagate
::selection-done emissions up to the topmost menu shell.
Fri May 7 10:15:14 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_set_scrollable): Unset
the user data on the window before destroying it.
* gtk/gtknotebook.c (gtk_notebook_unrealize): Add an
unrealize handler to take care of destroying
notebook->panel properly.
(Bug #1198 - Morten Welinder <terra@diku.dk>)
* gtk/gtktext.c (expand_scratch_buffer): Fix reversal
of g_new and g_realloc to stop memory leak. (Actually,
we could just use g_realloc(), but I'm not 100% sure
that is portable).
(Bug #1196 - Morten Welinder <terra@diku.dk>)
Wed May 5 22:51:06 1999 Owen Taylor <otaylor@redhat.com>
Patch from Sung-Hyun Nam <namsh@lgic.co.kr>
* gdk/gdkim.c: Fix cut-and-paste errors for
x/y and PreeditAttributes/StatusAttributes.
Wed May 5 22:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints): Change
G_MAXINT to 2^16 to alleviate overflow problems in
various window managers.
Wed Apr 21 00:42:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkplug.h: Removed stray GtkPlugButton declaration.
* gdk/gdkfont.c (gdk_text_measure): Fix the return value
for fontsets.
* gtk/gtkbutton.c (gtkbutton_expose): Fix warning
with bin/button confusion.
Thu May 6 04:53:26 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: in the ItemFactory test, link radio items together,
and show how preselection of radio items is done.
Sun May 2 13:31:14 1999 Tim Janik <timj@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_set_subtree):
* gtk/gtktree.c (gtk_tree_add) (gtk_tree_insert):
* gtk/gtktoolbar.c (gtk_toolbar_insert_element):
* gtk/gtkpaned.c (gtk_paned_pack2) (gtk_paned_pack1):
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_add):
* gtk/gtktable.c (gtk_table_attach):
* gtk/gtklist.c (gtk_list_insert_items):
* gtk/gtkmenushell.c (gtk_menu_shell_insert):
* gtk/gtknotebook.c (gtk_notebook_insert_page_menu):
* gtk/gtkpacker.c (gtk_packer_add_defaults) (gtk_packer_add):
* gtk/gtkbin.c (gtk_bin_add):
* gtk/gtkbox.c (gtk_box_pack_start) (gtk_box_pack_end):
* gtk/gtkfixed.c (gtk_fixed_put):
* gtk/gtklayout.c (gtk_layout_put):
general fixups to container_add logic. always realize child if
child->parent is realized, only map the child and queue a resize
if child and child->parent are both visible.
Fri Apr 30 09:02:28 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_real_unrealize): use gtk_container_forall
instead of gtk_container_foreach to walk and unrealize children, so
composite children get also unrealized.
(gtk_widget_real_show): don't call gtk_widget_map() if we don't need to.
(gtk_widget_map): assert that the widget is visible (basic constrain).
(gtk_widget_real_map): assert that the widget is realized (basic
constrain).
Fri Apr 29 00:53:20 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbindings.c (gtk_pattern_spec_init): plugged a memory leak.
Wed May 5 12:42:01 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_set_geometry_hints):
Initialize size_hints.x and size_hints.y because kwm
brokenly pays attention to them.
(Bug #1181 - Lars Heete <hel@admin.de>)
Wed May 5 11:38:56 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_choose_visual): Free the
return value of gdk_list_visuals().
(Bug #1193 - Morten Welinder <terra@diku.dk>)
Wed May 5 10:47:54 1999 Owen Taylor <otaylor@redhat.com>
* configure.in (LIBS): Add $INTLLIBS into $LIBS
directly, rather than repeating the checks for
gettext.
* INSTALL: Added information about gettext and
NLS support.
* acinclude.m4 (LIBM): Check for dgettext, not
just gettext. This should hopefully fix things wrt
systems with old versions of GNU gettext installed.
Tue May 4 11:12:56 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkim.c (gdk_im_real_open): cast the return value of
XSetIMValues to (void *) when comparing to NULL, to workaround
the problem of some compilers barfing since older X headers don't
have the prototype for it.
Tue May 4 09:32:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am gtk/gtkrc.iso-8859-2: Add a gtkrc
file for iso-8859-2 locales.
* configure.in (ALL_LINGUAS): ALL_LINGUAS update.
Tue Apr 27 16:38:32 1999 Owen Taylor <otaylor@redhat.com>
* gtk/Makefile.am: Fix typo of static_sources for static_SOURCES.
(Pointed out by andy@rz.uni-karlsruhe.de and others).
Remove some suspicious and useless lines.
Tue May 4 08:44:08 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (gtk_clist_draw, draw_rows): Use
width,height = 0, 0 to mean - here to edge of window,
instead of -1, -1, since the former is all we support.
Tue May 4 08:34:43 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkmain.c (gtk_main): Correctly free list nodes
when removing from quit_functions list.
Mon Apr 19 10:11:12 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkcolor.c (gdk_colormap_new): Fix memory leak
for pseudocolor where colormap->colors was double
allocated.
* gdk/gdkcolor.c (gdk_colormap_alloc1): Store the
color value in the hash table with the pixel filled
in so when we do later hash table lookups, the color
value is correct.
Sun May 2 15:29:45 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkdraw.c (gdk_draw_lines): check private->destroyed before
making the call
Sat May 1 11:04:12 PDT 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.3
Tue Apr 27 14:17:16 1999 Tim Janik <timj@gtk.org>
* gtk/gtkpacker.c (gtk_packer_size_request): remove unused variable.
Tue Apr 27 18:23:35 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkentry.c (gtk_entry_draw_cursor_on_drawable):
When redrawing characters on non-visible entry, use appropriate
'*' character. (Bug #1130 - Jean-Marc Jacquet <jm@littleigloo.org>)
Tue Apr 27 11:17:35 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (xdnd_set_{targets,actions}): Fix leak
pointed out by Morten Welinder <terra@diku.dk>.
Tue Apr 27 01:31:40 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (drag_dest_cell): compute destination cell
from drag coordinates.
(gtk_clist_drag_data_received) (gtk_clist_drag_motion):
use drag_dest_cell.
* gtk/gtktree (drag_dest_cell)
(gtk_ctree_drag_data_received) (gtk_ctree_drag_motion): likewise.
(Bug #1129)
Wed Apr 21 21:26:11 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_init): properly initialize
translate_* fields.
(gtk_item_factory_finalize): invoke translate_notify independant from
translate_data.
(gtk_item_factory_set_translate_func): likewise.
(gtk_item_factory_destroy): only remove ifactory pointer from those
widgets that belong to us (stupid me).
Wed Apr 21 14:20:22 1999 George Lebl <jirka@5z.com>
* gdk/gdkwindow.c: (gdk_window_remove_filter) correctly remove the
default filter from the list
Mon Apr 19 12:05:31 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkrc.c (gtk_rc_style_init): Fixed leak of
rc_style list when lookup succeeeds.
1999-04-18 Tomas Ogren <stric@ing.umu.se>
* gtk/gtkrc.c: Add a / before the directory name to keep directory
names from eachother. (Already fixed in 1.3.x)
Fri Apr 16 20:41:43 PDT 1999 Manish Singh <yosh@gimp.org>
* gdk/gdk.c: #include "gdkkeysyms.h" for gdk_XConvertCase #defines
* gtk/gtkfontsel.c (gtk_font_selection_create_xlfd): use
g_strdup_printf instead of calcing the length separately
Thu Apr 15 01:11:24 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.c (resync_selection):
* gtk/gtkclist.c (resync_selection): fixed undo_selection bug.
* gtk/gtkclist.c (gtk_clist_button_release): fixed resync_selection
bug.
Tue Apr 13 17:14:28 CDT 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.2
Tue Apr 13 02:49:33 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c: removed some silly #ifdef HAVE_CONFIG
that we don't do in many other places. (Fixing duplicate
#include of config.h)
* gdk/gdkevents.c: include gdkinput.h _after_ config.h.
Otherwise, #ifndef XINPUT_NONE check in the latter
doesn't work. (Bug #546)
Sun Apr 11 15:08:27 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+ 1.2.2, interface 0,
binary 2.
* NEWS: updates.
Sun Apr 11 14:38:03 1999 Tim Janik <timj@gtk.org>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): check for color
"None" case insensitive.
Fri Apr 9 19:22:19 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcolorsel.c gtk/gtkdnd.c gtk/gtkmenuitem.c:
Add some missing GDK_THREADS_ENTER()/LEAVE around
timeouts. (Patches from Sebastian Wilhelmi <wilhelmi@ira.uka.de>)
Thu Apr 8 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkentry.c (gtk_entry_key_press): use gtk_widget_activate()
rather than emit_by_name.
* gtk/gtkeditable.c (gtk_editable_insert_text): keep a reference
on the widget across multiple signal emissions.
(gtk_editable_delete_text): same here.
(gtk_editable_class_init): set widget_class->activate_signal after
editable_signals[ACTIVATE] has been created.
Wed Apr 7 22:59:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkpaned.c (gtk_paned_set_position): Don't clamp
position here prematurely -- we might not have the
right ->min_position and ->max_position yet.
Tue Apr 6 16:38:51 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkselection.c gdk/gdkselection.c: (gtk_selection_request):
Add error traps so if the other end of the connection
dies, we survive.
* gtk/gtkselection.c (gtk_selection_notify): Clean
up properly when selection property retrieval fails.
* gtk/gtkselection.c (gtk_selection_request): Correctly
reject SelectionRequest notifies where the handler
returns no data.
Tue Apr 6 12:24:21 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_leave): Only unhighlight
when we've previously highlighted.
* gtk/gtkdnd.c (gtk_drag_dest_handle_event): Don't
emit two "drag_leave" signals for Motif drops.
* gtk/gtkdnd.c (gtk_drag_source_handle_event): Send
back the correct status messages when dropping from
Motif onto a proxy window that is rejecting the
drop.
* gdk/gdkdnd.c (gdk_drag_motion): Separate out the
dest_xid field into two fields - one for the window
to send in messages, one to indicate the last looked
up window for caching purposes. This is needed, so
that Leave messages get the correct window.
Mon Apr 5 17:11:57 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkpixmap.c (_gdk_pixmap_create_from_xpm): Check
explicitly for the string "None" - it is in the XPM
spec and some servers treat unknown colors in odd ways
(like asking the user!)
Mon Apr 5 13:21:30 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_event_check, gdk_event_prepare):
Fix warning created by people mucking around
with the gsource API.
* gdk/gdkevents.c (gdk_io_invoke, gdk_input_add_full):
Change mapping between GIOCondition and GdkInputCondition
to match the way the Linux kernel does it. This should
fix problems where closed pipes were no longer signalling
GDK_INPUT_READ on systems with a native poll().
Thu Apr 1 16:58:10 PST 1999 Manish Singh <yosh@gimp.org>
* gdk/gdkevents.c: made "->" into a "." of previous change so
it compiles
* gtk/gtkfontsel.c: added braces enclosing an if-else construct
* autogen.sh: add --enable-maintainer-mode
* configure.in: set ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
Thu Apr 1 18:41:25 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkevents.c (gdk_compress_exposures): Set the
window field of the event structure before calling
user filters.
1999-03-31 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdk/gdk.c (gdk_init_check): Use False as the last argument to
XInternAtom() here. This is a particularly Old And Nasty(tm) bug.
Sat Mar 27 23:32:13 1999 Tim Janik <timj@gtk.org>
* gtk/gtkarg.[hc]: added functions from GLE, gtk_arg_reset() to free
the value and reset type to GTK_TYPE_INVALID, and gtk_arg_values_equal()
to compare two argument values. added gtk_arg_to_valueloc() to set a
variable from an arg through its location (pointer).
* gtk/gtkobject.[hc]: implemented gtk_object_get() in terms of
gtk_object_arg_get() and gtk_arg_to_valueloc(), floats are collected
as gfloat*, uchars are collected as guchar*, ints are collected as
gint*, etc...
Mon Mar 29 17:45:47 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkaccelgroup.c gtk/gtkgtkbindings.c:
Include <string.h> instead of <strings.h>.
* gtk/gtkstyle.c: Fix double include of gtkthemes.h
(actually, a lot more duplicate includes occur if
you trace through the sequence of #include's)
gtk-jbb-990320-0: John Bley, jbb6@acpub.duke.edu
Mon Mar 29 17:31:52 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkim.c (gdk_mbstowcs): Free the value of the
intermediate text property - prevents major memory
leak when gdk_use_mb.
gtk-d3august-990311-0: Bj|rn Augustsson <d3august@dtek.chalmers.se>
Mon Mar 29 17:02:58 1999 Owen Taylor <otaylor@redhat.com>
Patches from Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
gtk-a-higuti-990322-[0-3]
* gdk/gdkfont.c (gdk_text_extents_wc): Make work when
sizeof(wchar_t) != sizeof (GdkWChar)
* configure.in: Fix confusion between GTK_LOCALE_[C]FLAGS
that was causing -DX_LOCALE not to work.
* gtk/gtkrc.c (gtk_rc_init):
X_LOCALE will never have LC_MESSAGES defined
* gdk/gdk.c (gdk_init_check):
Remove --xim-preedit and --xim-status from argv properly.
* gdk/gdkim.c (gdk_ic_real_new): Add a gdk_flush() so
that the client window is present on the X server
before we pass it to the input method.
Tue Mar 9 10:46:49 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkdnd.c (motif_find_drag_window): Fix bug where
if --display is specified on the command line, than
the drag window will not be created on that display.
Tue Mar 9 10:38:24 1999 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Fixed bug where
lookups with only_if_exists == TRUE were inserting
bogus values into the atom cache.
Thu Mar 25 12:38:31 1999 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_append_default_module_path): get $HOME from
g_get_home_dir() (gtk-pmc-990123-0.patch.gz).
* gtk/gtkwindow.c (gtk_window_key_press_event): feature keypad up/down/
left/right as well (gtk-michael-980726-0.patch.gz).
* gtk/gtklabel.[hc]: bunch of miscellaneous cleanups, such as s/0/NULL/
for pointer values, use gchar instead of char. fixed uline allocation
leaks, changed the allocation pattern so we use G_ALLOC_AND_FREE mem
chunks instead of G_ALLOC_ONLY.
(gtk_label_size_request): always alter requisition as passed and leave
widget->requisition alone.
(gtk_label_set_text): allow NULL strings.
(gtk_label_new): likewise.
Wed Mar 24 23:03:49 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.1
* INSTALL:
README:
sanity_check: Updated.
* docs/gtk-config.1.in:
docs/Makefile.am:
configure.in: gtk-config is now generated.
* docs/gtk-config.1: Removed, now generated.
Wed Mar 24 09:24:03 1999 Tim Janik <timj@gtk.org>
* gtk/gtkdrawingarea.[hc]: type/macro fixups.
Mon Mar 22 05:51:34 1999 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_draw): only redraw children that are visible
*and* mapped (i.e. drawable).
(gtk_bin_expose): only send exposes to drawable children.
* gtk/gtkbox.c (gtk_box_draw): only redraw children that are drawable.
(gtk_box_expose): only send exposes to drawable children.
* gtk/gtkhscale.c (gtk_hscale_draw):
* gtk/gtkvscale.c (gtk_vscale_draw):
hm, this is an ugly one. we first compute the size of our trough area
here (window relative) and then check intersection with the draw_area
which is parent relative because we're a NO_WINDOW widget, so we need
to offset the trough area by allocation.x and allocation.y before the
check. (this must not be done for the background area though, since
that's already computed parent relative).
Mon Mar 22 00:41:39 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_unrealize): unmap clist if neccessary,
unrealize title buttons.
Fri Mar 19 16:45:27 PST 1999 Manish Singh <yosh@gimp.org>
* acinclude.m4
* config.guess
* config.sub
* ltconfig
* ltmain.sh: upgrade to libtool 1.2f
* autogen.sh: libtool is not required to autogen gtk+
* acconfig.h: remove WITH_SYMBOL_UNDERSCORE (not explictly
needed)
Fri Mar 19 00:00:22 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.c (gtk_clist_column_title_passive)
(gtk_clist_column_title_active):
only connect/disconnect to GtkWidgetClass::event to block mouse events.
* gtk/gtkclist.c (vertical_timeout) (horizontal_timeout):
zero initialize event, removed superfluous gdk_window_get_pointer call
* gtk/gtklist.c (gtk_list_vertical_timeout)
(gtk_list_horizontal_timeout): removed superfluous
gdk_window_get_pointer call
Wed Mar 17 09:00:00 1999 Tim Janik <timj@gtk.org>
* plugging problems reported by "Bruce Mitchener, Jr."
<bruce@puremagic.com> due to a purify session.
* gtk/gtkstyle.c:
(gtk_style_ref):
(gtk_style_unref): assert ref_count to be > 0.
* gtk/gtkclist.c (gtk_clist_set_cell_style): { 0 } initilaize
the requisition.
(gtk_clist_set_shift): likewise.
* gtk/gtklayout.c: introduce gtk_layout_finalize() to unref the
adjustments.
* gdk/gdkselection.c (gdk_selection_property_get): first XFree(t),
then reset it to NULL.
* gtk/gtklist.c (gtk_list_horizontal_timeout): zero initialize the
event before sending it and set send_event to TRUE (which needs to
be done for *all* synthesized events).
(gtk_list_vertical_timeout): likewise.
* gdk/gdkcolor.c:
(gdk_colors_free):
(gdk_colormap_free_colors): use colormap->colors[in_pixels[i]] as the
key for g_hash_table_remove() in both functions, this prevents us
from accessing possibly uninitialized portions of a GdkColor structure
where we are only interested in its pixel value.
* gtk/gtktipsquery.c (gtk_tips_query_destroy): plug small memory
leaks.
* gtk/gtkdrawingarea.c (gtk_drawing_area_send_configure): set send_event
to TRUE when synthesizing events.
Wed Mar 17 00:44:23 1999 Tim Janik <timj@gtk.org>
* configure.in: bumped version number to Gtk+1.2.1, interface 0,
binary 1.
* NEWS: updates.
* gtk/gtkfeatures.h.in: added GTK_CHECK_VERSION(major,minor,micro)
macro to test for specific gtk versions, e.g.
#if GTK_CHECK_VERSION (1,2,1)
gtk_menu_ensure_uline_accel_group (menu);
#endif /* Gtk+1.2.1 */
this macro will return whether the Gtk+ header files are from version
major.minor.micro or _newer_, as opposed to gtk_check_version() which
requires an exact match for binary compatibility.
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Mon Mar 15 03:39:47 1999 George Lebl <jirka@5z.com>
* gtk/gtkdnd.c: (gtk_drag_highlight) swap the
gtk_drag_highlight_expose and gtk_drag_highlight_paint since
it was connecting a void function to expose_event and the int
returning function to the draw signal
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 02:07:31 1999 Tim Janik <timj@gtk.org>
* merged from 1.3:
1999-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkstyle.c (gtk_default_draw_handle): Significantly reduced
the number of calls to gdk_draw_point() (and thus to X) by
clipping the points by hand.
* gtk/gtkhandlebox.c (draw_textured_frame): Actually make use of
the clip parameter.
(gtk_handle_box_paint): Only paint the handle if the expose area
intersects it.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
Wed Feb 24 05:27:44 CST 1999 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.2.0
@@ -362,7 +1083,7 @@ Wed Feb 10 01:18:22 1999 Owen Taylor <otaylor@redhat.com>
* gtk/gtkhandlebox.c (gtk_handle_box_button_changed):
Add double-click reattachment.
* gtk/gtkhandlebox.c: Grab on widget->window,
v * gtk/gtkhandlebox.c: Grab on widget->window,
not on handlebox->bin_window. This means we don't
have to worry about ungrabbing while reparenting.
+32 -6
View File
@@ -7,8 +7,8 @@ you got this package.
Simple install procedure
========================
% gzip -cd gtk+-1.2.0.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.2.0 # change to the toplevel directory
% gzip -cd gtk+-1.2.3.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.2.3 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]
@@ -43,6 +43,13 @@ which form of support to use:
For more information, follow the link from http://www.gtk.org
* --disable-nls do not use Native Language Support
If this flag is not specified, GTK+ will try to find
and use the gettext() set of functions to provide translations
of the strings in the standard dialogs into the
user's native language.
* --enable-xim support XIM [default=yes]
Specifying --disable-xim will disable support for entering
@@ -50,7 +57,7 @@ internationalized text using X Input Methods. This will give some
slight savings in speed and memory use and might be necessary
with older versions of X.
* --with-locale=LOCALE locale name you want to use
* --with-locale=LOCALE locale name you want to use
The --with-locale options is used to determine if your operating
system has support for the locale you will be using. If not, X's
@@ -84,6 +91,25 @@ or,
setenv CFLAGS -O2 ; ./configure # csh and variants
Native-Language Support and gettext()
=====================================
To provide native-language support (NLS) GTK+ uses the
gettext() set of functions. These functions are found
in the C library on many systems, such as the Solaris
C library and the GNU C Library, version 2.
If your C library does not provide the necessary functionality,
you may wish to install the GNU gettext package. You'll
need version 0.10.35 or better. Version 0.10.35 is
available from ftp://alpha.gnu.org/pub/gnu
Generally, GTK+ will properly detect what is installed
on your system and enable or disable NLS as appropriate.
However, in rare cases, it may be necessary to disable
NLS manually to get GTK+ to compile. You can do this
by specifying the --disable-nls flag when configuring
GTK+.
Using an uninstalled copy of GLIB
=================================
@@ -92,7 +118,7 @@ You can compile GTK+ against a copy of GLIB that you have not
yet installed. To do this, give the --with-glib=DIR options
to ./configure. For instance:
./configure --with-glib=../glib-1.2.0
./configure --with-glib=../glib-1.2.3
This, however, will not work if you built GLIB with different
source and build directories.
@@ -126,7 +152,7 @@ For complete details, see the file docs/gtk-config.txt
Notes for using XIM support for Japanese input
==============================================
* There is a bug in older versions of kinput2 that will cause GTK
* There is a bug in older versions of kinput2 that will cause GTK+
to hang when destroying a text entry. The latest versions of
kinput is available from:
@@ -138,7 +164,7 @@ C library multibyte functions. Unless your C library has support
for Japanese locales, this is incorrect, and will cause problems
for GTK's internationalization.
(In particular, this occurs with GNU libc 2.0 and 2.1, in which
(In particular, this occurs with GNU libc 2.0 in which
the multibyte functions always translate to and from UTF-8; but
the problem may occur for other C libraries, and other operating
systems as well.)
+36
View File
@@ -1,3 +1,39 @@
Overview of Changes in GTK+ 1.2.3:
* Upgrade to libtool 1.3
* Check for dgettext (for systems with old versions of GNU Gettext)
* Many bug fixes (see ChangeLog for details)
Overview of Changes in GTK+ 1.2.2:
* Improved Dnd behaviour with Motif applications.
* Bug fixes for the Gtk selection code.
* Minor bug fixes to the Gdk Atom cache and Dnd code (with --display option).
* Bug fixes and leak plugs for the Gdk IM code.
* Added gtk_object_get() facility to retrive object arguments easily.
The var args list expects ("arg-name", &value) pairs.
* Fixed mapping for GdkInputCondition<->GIOCondition, this should fix
problems where closed pipes were no longer signalling GDK_INPUT_READ on
systems with a native poll().
* Some cleanups to GtkLabel's memory allocation code (shouldn't leak memory
anymore).
* We don't attempt to lookup xpm color "None" anymore, this should prevent
eXodus (commercial X windows server) from popping up a color dialog every
time a transparent pixmap is created.
* Fixed bug where Gtk timout/idle handlers would execute without the global
Gdk lock being held.
* Other minor bug fixes.
Overview of Changes in GTK+ 1.2.1:
* Many Bug fixes have been applied to the menu and accelerator code.
* GtkItemFactory can "adopt" foreign menu items now and manage their
accelerator installation. This is often required to get GtkItemFactory
like accelerator propagation between different windows with the same
menu heirarchy and for centralized parsing and saving of accelerators.
* GtkCList/GtkCTree buttons should always display correctly now.
* Miscellaneous other bug fixes.
What's New in GTK+ 1.2.0 (since 1.0.x):
* New widgets: GtkFontSelector, GtkPacker, GtkItemFactory, GtkCTree,
+4 -4
View File
@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 1.2.0. GTK+, which stands for the Gimp ToolKit,
This is GTK+ version 1.2.3. GTK+, which stands for the Gimp ToolKit,
is a library for creating graphical user interfaces for the X Window
System. It is designed to be small, efficient, and flexible. GTK+ is
written in C with a very object-oriented approach.
@@ -37,9 +37,9 @@ version number. This should be separated by a blank
line from the actual headers.
Package: gtk+
Version: 1.2.0
Version: 1.2.3
[ Please substitute 1.2.0 with the version of GTK+ that
[ Please substitute 1.2.3 with the version of GTK+ that
you have installed ]
Then describe the bug. Include:
@@ -82,7 +82,7 @@ From: yourname@your.address.org
Subject: handlebox test in testgtk is misnamed.
Package: gtk+
Version: 1.2.0
Version: 1.2.3
When I run gtk/testgtk, the button "handle box"
is misnamed. There are multiple handle boxes in
-2
View File
@@ -29,8 +29,6 @@
#undef HAVE_SYS_SELECT_H
#undef HAVE_XCONVERTCASE
#undef WITH_SYMBOL_UNDERSCORE
#undef NO_FD_SET
#undef RESOURCE_BASE
+212 -331
View File
@@ -1,6 +1,6 @@
## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
## Copyright (C) 1996-1998 Free Software Foundation, Inc.
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
## Copyright (C) 1996-1999 Free Software Foundation, Inc.
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@@ -21,31 +21,66 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 29 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
AC_REQUIRE([AM_ENABLE_STATIC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AM_PROG_LD])dnl
AC_REQUIRE([AM_PROG_NM])dnl
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
AC_REQUIRE([AM_SYS_SYMBOL_UNDERSCORE])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
# serial 39 AC_PROG_LIBTOOL
AC_DEFUN(AC_PROG_LIBTOOL,
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
# Save cache, so that ltconfig can load it
AC_CACHE_SAVE
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Reload cache, that may have been modified by ltconfig
AC_CACHE_LOAD
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
AC_DEFUN(AC_LIBTOOL_SETUP,
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_NM])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
dnl
# Check for any special flags to pass to ltconfig.
libtool_flags=
libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
[libtool_flags="$libtool_flags --enable-dlopen"])
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[libtool_flags="$libtool_flags --enable-win32-dll"])
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock avoid locking (might break parallel builds)])
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
@@ -81,46 +116,31 @@ case "$host" in
fi
;;
*-*-cygwin32*)
AM_SYS_LIBTOOL_CYGWIN32
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
[*-*-cygwin* | *-*-mingw*)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
])
esac
# enable the --disable-libtool-lock switch
AC_ARG_ENABLE(libtool-lock,
[ --disable-libtool-lock force libtool not to do file locking],
need_locks=$enableval,
need_locks=yes)
if test x"$need_locks" = xno; then
libtool_flags="$libtool_flags --disable-lock"
fi
# Actually configure libtool. ac_aux_dir is where install-sh is found.
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
DLLTOOL="$DLLTOOL" AS="$AS" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| AC_MSG_ERROR([libtool configure failed])
# Redirect the config.log output again, so that the ltconfig log is not
# clobbered by the next message.
exec 5>>./config.log
])
# AM_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AM_ENABLE_SHARED,
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_DEFUN(AC_ENABLE_SHARED, [dnl
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
@@ -138,26 +158,22 @@ no) enable_shared=no ;;
IFS="$ac_save_ifs"
;;
esac],
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN(AM_DISABLE_SHARED,
[AM_ENABLE_SHARED(no)])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AM_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN(AM_DISABLE_STATIC,
[AM_ENABLE_STATIC(no)])
# AM_ENABLE_STATIC - implement the --enable-static flag
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AM_ENABLE_STATIC,
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_DEFUN(AC_ENABLE_STATIC, [dnl
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
@@ -175,12 +191,49 @@ no) enable_static=no ;;
IFS="$ac_save_ifs"
;;
esac],
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
])
# AC_DISABLE_STATIC - set the default static flag to --disable-static
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
# AM_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AM_PROG_LD,
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(fast-install,
changequote(<<, >>)dnl
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
case "$enableval" in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
for pkg in $enableval; do
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$ac_save_ifs"
;;
esac],
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_PROG_LD - find the path to the GNU or non-GNU linker
AC_DEFUN(AC_PROG_LD,
[AC_ARG_WITH(gnu-ld,
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
@@ -195,47 +248,15 @@ if test "$ac_cv_prog_gcc" = yes; then
case "$ac_prog" in
# Accept absolute paths.
changequote(,)dnl
/* | [A-Za-z]:/*)
# Canonicalize the path of ld
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
sub_uncdrive='s%^\([A-Za-z]\):/%//\1/%'
changequote([,])dnl
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
case "$host_os" in
cygwin*)
# Convert to a UNC path for cygwin
test -z "$LD" && LD=`echo X$ac_prog | sed -e "1s/^X//" -e "$sub_uncdrive"`
;;
*)
test -z "$LD" && LD="$ac_prog"
;;
esac
;;
##
## FIXME: The code fails later on if we try to use an $LD with
## '\\' path separators.
##
changequote(,)dnl
[A-Za-z]:[\\]*)
# Canonicalize the path of ld
re_direlt='\\[^\\][^\\]*\\\.\.\(\\\)'
sub_uncdrive='s%^\([A-Za-z]\):\\%//\1/%'
changequote([,])dnl
sub_uncdir='s%\\%/%g'
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| sed "s%$re_direlt%\1%"`
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
done
case "$host_os" in
cygwin*)
# Convert to a UNC path for cygwin
test -z "$LD" && LD=`echo X$ac_prog | sed -e 's%^X%%' -e "$sub_uncdrive" -e "$sub_uncdir"`
;;
*)
test -z "$LD" && LD="$ac_prog"
;;
esac
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -253,10 +274,10 @@ else
fi
AC_CACHE_VAL(ac_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog"; then
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
ac_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
@@ -264,7 +285,7 @@ AC_CACHE_VAL(ac_cv_path_LD,
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
test "$with_gnu_ld" != no && break
else
test "$with_gnu_ld" != yes && break
test "$with_gnu_ld" != yes && break
fi
fi
done
@@ -280,10 +301,10 @@ else
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_SUBST(LD)
AM_PROG_LD_GNU
AC_PROG_LD_GNU
])
AC_DEFUN(AM_PROG_LD_GNU,
AC_DEFUN(AC_PROG_LD_GNU,
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -293,29 +314,31 @@ else
fi])
])
# AM_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN(AM_PROG_NM,
# AC_PROG_NM - find the path to a BSD-compatible name lister
AC_DEFUN(AC_PROG_NM,
[AC_MSG_CHECKING([for BSD-compatible nm])
AC_CACHE_VAL(ac_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
ac_cv_path_NM="$NM"
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/nm; then
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -B"
ac_cv_path_NM="$ac_dir/nm -B"
break
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
ac_cv_path_NM="$ac_dir/nm -p"
ac_cv_path_NM="$ac_dir/nm -p"
break
else
ac_cv_path_NM="$ac_dir/nm"
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
break
fi
done
IFS="$ac_save_ifs"
@@ -326,221 +349,79 @@ AC_MSG_RESULT([$NM])
AC_SUBST(NM)
])
# AM_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed
# by C symbol name from nm.
AC_DEFUN(AM_SYS_NM_PARSE,
# AC_CHECK_LIBM - check for math library
AC_DEFUN(AC_CHECK_LIBM,
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AM_PROG_NM])dnl
# Check for command to grab the raw symbol name followed by C symbol from nm.
AC_MSG_CHECKING([command to parse $NM output])
AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
[# These are sane defaults that work on at least a few old systems.
# {They come from Ultrix. What could be older than Ultrix?!! ;)}
changequote(,)dnl
# Character class describing NM global symbol codes.
ac_symcode='[BCDEGRSTU]'
# Regexp to match symbols that can be accessed directly from C.
ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
# Transform the above into a raw symbol and a C symbol.
ac_symxfrm='\1 \1'
# Define system-specific variables.
case "$host_os" in
aix*)
ac_symcode='[BCDTU]'
LIBM=
case "$host" in
*-*-beos* | *-*-cygwin*)
# These system don't have libm
;;
sunos* | cygwin32* | mingw32*)
ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
ac_symxfrm='_\1 \1'
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
;;
irix*)
# Cannot use undefined symbols on IRIX because inlined functions mess us up.
ac_symcode='[BCDEGRST]'
;;
solaris*)
ac_symcode='[BDTU]'
*)
AC_CHECK_LIB(m, main, LIBM="-lm")
;;
esac
])
# If we're using GNU nm, then use its standard symbol codes.
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
ac_symcode='[ABCDGISTUW]'
fi
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl convenience library, adds --enable-ltdl-convenience to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
case "$enable_ltdl_convenience" in
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
"") enable_ltdl_convenience=yes
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
esac
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
])
case "$host_os" in
cygwin32* | mingw32*)
# We do not want undefined symbols on cygwin32. The user must
# arrange to define them via -l arguments.
ac_symcode='[ABCDGISTW]'
;;
esac
changequote([,])dnl
# Write the raw and C identifiers.
ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* $ac_symcode $ac_sympat$/$ac_symxfrm/p'"
# Check to see that the pipe works correctly.
ac_pipe_works=no
cat > conftest.$ac_ext <<EOF
#ifdef __cplusplus
extern "C" {
#endif
char nm_test_var;
void nm_test_func(){}
#ifdef __cplusplus
}
#endif
int main(){nm_test_var='a';nm_test_func;return 0;}
EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
ac_nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
# Try sorting and uniquifying the output.
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
mv -f "$ac_nlist"T "$ac_nlist"
ac_wcout=`wc "$ac_nlist" 2>/dev/null`
changequote(,)dnl
ac_count=`echo "X$ac_wcout" | sed -e 's,^X,,' -e 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
changequote([,])dnl
(test "$ac_count" -ge 0) 2>/dev/null || ac_count=-1
else
rm -f "$ac_nlist"T
ac_count=-1
fi
# Make sure that we snagged all the symbols we need.
if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
cat <<EOF > conftest.c
#ifdef __cplusplus
extern "C" {
#endif
EOF
# Now generate the symbol file.
sed 's/^.* \(.*\)$/extern char \1;/' < "$ac_nlist" >> conftest.c
cat <<EOF >> conftest.c
#if defined (__STDC__) && __STDC__
# define __ptr_t void *
#else
# define __ptr_t char *
#endif
/* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
int dld_preloaded_symbol_count = $ac_count;
/* The mapping between symbol names and symbols. */
struct {
char *name;
__ptr_t address;
}
changequote(,)dnl
dld_preloaded_symbols[] =
changequote([,])dnl
{
EOF
sed 's/^\(.*\) \(.*\)$/ {"\1", (__ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
cat <<\EOF >> conftest.c
{0, (__ptr_t) 0}
};
#ifdef __cplusplus
}
#endif
EOF
# Now try linking the two files.
mv conftest.$ac_objext conftestm.$ac_objext
ac_save_LIBS="$LIBS"
ac_save_CFLAGS="$CFLAGS"
LIBS="conftestm.$ac_objext"
CFLAGS="$CFLAGS$no_builtin_flag"
if AC_TRY_EVAL(ac_link) && test -s conftest; then
ac_pipe_works=yes
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC
fi
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
else
echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
fi
else
echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
fi
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
# the libltdl installable library, and adds --enable-ltdl-install to
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
# '${top_builddir}/' (note the single quotes!) if your package is not
# flat, and, if you're not using automake, define top_builddir as
# appropriate in the Makefiles.
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_CHECK_LIB(ltdl, main,
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
[if test x"$enable_ltdl_install" = xno; then
AC_MSG_WARN([libltdl not installed, but installation disabled])
else
enable_ltdl_install=yes
fi
])
if test x"$enable_ltdl_install" = x"yes"; then
ac_configure_args="$ac_configure_args --enable-ltdl-install"
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
else
echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
LIBLTDL="-lltdl"
fi
else
echo "$progname: failed program was:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC
fi
rm -rf conftest*
# Do not use the global_symbol_pipe unless it works.
test "$ac_pipe_works" = yes || ac_cv_sys_global_symbol_pipe=
])
ac_result=yes
if test -z "$ac_cv_sys_global_symbol_pipe"; then
ac_result=no
fi
AC_MSG_RESULT($ac_result)
])
dnl old names
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
# AM_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN32,
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(AS, as, false)
])
# AM_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
# with an underscore?
AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE,
[AC_REQUIRE([AM_PROG_NM])dnl
AC_REQUIRE([AM_SYS_NM_PARSE])dnl
AC_MSG_CHECKING([for _ prefix in compiled symbols])
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
[ac_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<EOF
void nm_test_func(){}
int main(){nm_test_func;return 0;}
EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
ac_nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
# See whether the symbols have a leading underscore.
if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then
ac_cv_sys_symbol_underscore=yes
else
if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then
:
else
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
fi
fi
else
echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
fi
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC
fi
rm -rf conftest*
])
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
if test x$ac_cv_sys_symbol_underscore = xyes; then
AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,
[define if compiled symbols have a leading underscore])
fi
])
dnl This is just to quiet aclocal about the macro not being used
if(a,b,[AC_DISABLE_FAST_INSTALL])dnl
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
@@ -589,22 +470,22 @@ AC_DEFUN(AM_GTK_WITH_NLS,
CATOBJEXT=NONE
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
[AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")],
gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)])
if test "$gt_cv_func_gettext_libc" != "yes"; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CACHE_CHECK([for gettext in libintl],
[AC_CACHE_CHECK([for dgettext in libintl],
gt_cv_func_gettext_libintl,
[AC_CHECK_LIB(intl, gettext,
gt_cv_func_gettext_libintl=yes,
gt_cv_func_gettext_libintl=no)],
gt_cv_func_gettext_libintl=no)])
[AC_CHECK_LIB(intl, dgettext,
gt_cv_func_dgettext_libintl=yes,
gt_cv_func_dgettext_libintl=no)],
gt_cv_func_dgettext_libintl=no)])
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
if test "$gt_cv_func_dgettext_libc" = "yes" \
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT)
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
@@ -624,8 +505,8 @@ AC_DEFUN(AM_GTK_WITH_NLS,
fi
# Added by Martin Baulig 12/15/98 for libc5 systems
if test "$gt_cv_func_gettext_libc" != "yes" \
&& test "$gt_cv_func_gettext_libintl" = "yes"; then
if test "$gt_cv_func_dgettext_libc" != "yes" \
&& test "$gt_cv_func_dgettext_libintl" = "yes"; then
INTLLIBS=-lintl
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
fi
+1 -9
View File
@@ -20,14 +20,6 @@ DIE=0
DIE=1
}
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile $PROJECT."
echo "Get ftp://alpha.gnu.org/gnu/libtool-1.2b.tar.gz"
echo "(or a newer version if it is available)"
DIE=1
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $PROJECT."
@@ -88,7 +80,7 @@ automake -a $am_opt
autoconf
cd $ORIGDIR
$srcdir/configure "$@"
$srcdir/configure --enable-maintainer-mode "$@"
echo
echo "Now type 'make' to compile $PROJECT."
+145 -62
View File
@@ -23,6 +23,7 @@
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
# Please send patches to the Autoconf mailing list <autoconf@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -35,6 +36,20 @@
# (but try to keep the structure clean).
#
# Use $HOST_CC if defined. $CC may point to a cross-compiler
if test x"$CC_FOR_BUILD" = x; then
if test x"$HOST_CC" != x; then
CC_FOR_BUILD="$HOST_CC"
else
if test x"$CC" != x; then
CC_FOR_BUILD="$CC"
else
CC_FOR_BUILD=cc
fi
fi
fi
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
@@ -46,7 +61,8 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
@@ -59,7 +75,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
cat <<EOF >$dummy.s
.globl main
.ent main
main:
@@ -76,9 +92,9 @@ main:
ret \$31,(\$26),1
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
./$dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
@@ -97,7 +113,7 @@ EOF
;;
esac
fi
rm -f dummy.s dummy
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
exit 0 ;;
21064:Windows_NT:50:3)
@@ -150,7 +166,7 @@ EOF
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
@@ -201,6 +217,32 @@ EOF
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
@@ -234,12 +276,16 @@ EOF
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
2020:CLIX:*:*)
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -254,10 +300,10 @@ EOF
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@@ -309,7 +355,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
main()
@@ -320,8 +366,8 @@ EOF
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@@ -368,25 +414,25 @@ EOF
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
sed 's/^ //' << EOF >dummy.c
9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[136790] | 9000/892 )
sed 's/^ //' << EOF >$dummy.c
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
@@ -394,20 +440,20 @@ EOF
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
rm -f dummy.c dummy
($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
rm -f $dummy.c $dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
main ()
@@ -432,8 +478,8 @@ EOF
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@@ -442,6 +488,9 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
*9??*:MPE*:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
@@ -490,6 +539,9 @@ EOF
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
exit 0 ;;
CRAY*T3E:*:*:*)
echo t3e-cray-unicosmk${UNAME_RELEASE}
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
@@ -510,10 +562,19 @@ EOF
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
if test -x /usr/bin/objformat; then
if test "elf" = "`/usr/bin/objformat`"; then
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
exit 0
fi
fi
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
@@ -523,13 +584,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin32
echo ${UNAME_MACHINE}-pc-cygwin
exit 0 ;;
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
echo powerpcle-unknown-cygwin
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -541,12 +602,14 @@ EOF
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_help_string=`cd /; ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
@@ -563,7 +626,7 @@ EOF
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
sed 's/^ //' <<EOF >$dummy.s
.globl main
.ent main
main:
@@ -581,9 +644,9 @@ EOF
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
./$dummy
case "$?" in
7)
UNAME_MACHINE="alpha"
@@ -600,22 +663,23 @@ EOF
16)
UNAME_MACHINE="alphaev6"
;;
esac
esac
objdump --private-headers dummy | \
objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
fi
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
cat >$dummy.c <<EOF
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
@@ -625,8 +689,8 @@ main(argc, argv)
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
@@ -645,12 +709,13 @@ EOF
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
cat >$dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __cplusplus
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
@@ -667,8 +732,8 @@ main(argc, argv)
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
@@ -752,7 +817,7 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
@@ -764,6 +829,9 @@ EOF
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
@@ -794,7 +862,7 @@ EOF
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
@@ -810,12 +878,24 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit 0 ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
@@ -853,7 +933,10 @@ main ()
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
@@ -913,8 +996,8 @@ main ()
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
Vendored
+49 -11
View File
@@ -151,11 +151,12 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| 580 | i960 | h8300 \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \
| alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
@@ -175,14 +176,16 @@ case $basic_machine in
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| xmp-* | ymp-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67] \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
| f301-* | armv*-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -345,6 +348,14 @@ case $basic_machine in
hppa-next)
os=-nextstep3
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
os=-mpeix
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
os=-mpeix
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
@@ -412,6 +423,10 @@ case $basic_machine in
basic_machine=i486-ncr
os=-sysv4
;;
netwinder)
basic_machine=armv4l-corel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
@@ -616,6 +631,10 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
*mint | *MiNT)
basic_machine=m68k-atari
os=-mint
;;
none)
basic_machine=none-none
os=-none
@@ -713,8 +732,9 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \
| -openstep* | -mpeix* | -oskit*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
@@ -775,6 +795,9 @@ case $os in
-xenix)
os=-xenix
;;
-*mint | -*MiNT)
os=-mint
;;
-none)
;;
*)
@@ -800,6 +823,9 @@ case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-corel)
os=-linux
;;
arm*-semi)
os=-aout
;;
@@ -896,6 +922,9 @@ case $basic_machine in
f301-fujitsu)
os=-uxpv
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
@@ -920,6 +949,12 @@ case $basic_machine in
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
@@ -947,6 +982,9 @@ case $basic_machine in
-aux*)
vendor=apple
;;
-*mint | -*MiNT)
vendor=atari
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
+13 -11
View File
@@ -29,9 +29,9 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
#
GTK_MAJOR_VERSION=1
GTK_MINOR_VERSION=2
GTK_MICRO_VERSION=0
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0
GTK_MICRO_VERSION=3
GTK_INTERFACE_AGE=1
GTK_BINARY_AGE=3
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
dnl
AC_DIVERT_POP()dnl
@@ -143,6 +143,9 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
@@ -161,12 +164,10 @@ fi
AC_SUBST(REBUILD)
# i18n stuff
ALL_LINGUAS="cs de es fr hu it ja ko nl no pl pt ru sv"
ALL_LINGUAS="ca cs de es fi fr hr hu it ja ko nl no pl pt ru sl sk sv wa zh_TW.Big5"
AM_GTK_GNU_GETTEXT
AC_CHECK_FUNC(gettext,
,
AC_CHECK_LIB(intl, gettext)
)
LIBS="$LIBS $INTLLIBS"
# AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
# this is the directory where the *.{mo,gmo} files are installed
gtklocaledir='${prefix}/${DATADIRNAME}/locale'
@@ -214,9 +215,9 @@ fi
if test x$with_glib = x ; then
# Look for separately installed glib
AM_PATH_GLIB(1.2.0,,
AM_PATH_GLIB(1.2.3,,
AC_MSG_ERROR([
*** GLIB 1.2.0 or better is required. The latest version of GLIB
*** GLIB 1.2.3 or better is required. The latest version of GLIB
*** is always available from ftp://ftp.gtk.org/.]),
gmodule gthread)
@@ -416,7 +417,7 @@ need_x_locale=yes)
AC_MSG_RESULT($need_x_locale)
if test $need_x_locale = yes; then
GTK_LOCALE_CFLAGS="-DX_LOCALE"
GTK_LOCALE_FLAGS="-DX_LOCALE"
fi
# Checks for header files.
@@ -511,6 +512,7 @@ AC_SUBST(GTK_LOCALE_FLAGS)
AC_OUTPUT([
gtk+.spec
docs/gtk-config.1
Makefile
gtk-config
po/Makefile.in
+1
View File
@@ -18,3 +18,4 @@ Makefile.in
*.vrs
html
text
gtk-config.1
+1 -1
View File
@@ -102,7 +102,7 @@ FAQ_FILES=html/gtkfaq.html \
text/gtkfaq.txt
EXTRA_DIST = \
gtk-config.1 \
gtk-config.1.in \
texinfo.tex \
macros.texi \
gtkdocs_fix \
+1 -1
View File
@@ -1,4 +1,4 @@
.TH GTK+ 1 "25 October 1998" Version 1.2.0
.TH GTK+ 1 "25 October 1998" Version @VERSION@
.SH NAME
gtk-config - script to get information about the installed version of GTK+
.SH SYNOPSIS
+1 -1
View File
@@ -1109,7 +1109,7 @@ opaque.
All widget creation routines in GTK return pointers to GtkWidget
structures. In reality, all widget creation routines create structures
that can be viewed as equivalent to the GtkWidget structure, but often
have contain additional information. @xref{Object Implementation}
have contain additional information. @xref{Object Implementation}.
The widgets available for use are implemented in a hierarchy. Several
widgets exist solely as common bases for more specific widgets. For
+1 -1
View File
@@ -240,7 +240,7 @@ Taking care of proper referencing
---------------------------------
There are some cases where referencing of widgets from outside the toolkit
(on the application side is needed).
(on the application side) is needed.
Once the application performes an operation on a widget that will cause
its reference count to drop, if it wants to take further actions on the
widget, it needs to hold a reference to it.
View File
-22
View File
@@ -1,22 +0,0 @@
lib_LTLIBRARIES = \
libgdk-pixbuf.la \
libpixbuf-png.la
#
# The GdkPixBuf library
#
libgdk_pixbufincludedir = $(includedir)/gdk-pixbuf
libgdk_pixbuf_la_SOURCES = \
gdk-pixbuf.c \
gdk-pixbuf-io.c
libgdk_pixbufinclude_HEADERS = \
gdk-pixbuf.h
#
# The PNG plugin.
#
libpixbuf_png_la_SOURCES = \
io-png.c
-15
View File
@@ -1,15 +0,0 @@
#ifndef _GDK_PIXBUF_CACHE_H_
#define _GDK_PIXBUF_CACHE_H_
/* The optional cache interface */
typedef struct {
int dummy;
} GdkPixBufCache;
GdkPixBufCache *gdk_pixbuf_cache_new (long image_cache_limit,
long pixmap_bitmap_cache_limit);
void gdk_pixbuf_cache_destroy (GdkPixBufCache *cache);
GdkPixBuf *gdk_pixbuf_cache_load_image (GdkPixBufCache *cache,
const char *file);
#endif
-199
View File
@@ -1,199 +0,0 @@
/*
* gdk-pixbuf-io.c: Code to load images into GdkPixBufs
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include <stdio.h>
#include "gdk-pixbuf.h"
static gboolean
pixbuf_check_png (unsigned char *buffer, int size)
{
if (size < 28)
return FALSE;
if (buffer [0] != 0x89 ||
buffer [1] != 'P' ||
buffer [2] != 'N' ||
buffer [3] != 'G' ||
buffer [4] != 0x0d ||
buffer [5] != 0x0a ||
buffer [6] != 0x1a ||
buffer [7] != 0x0a)
return FALSE;
return TRUE;
}
static gboolean
pixbuf_check_jpeg (unsigned char *buffer, int size)
{
if (size < 10)
return FALSE;
if (buffer [0] != 0xff || buffer [1] != 0xd8)
return FALSE;
return TRUE;
}
static gboolean
pixbuf_check_tiff (unsigned char *buffer, int size)
{
if (size < 10)
return FALSE;
if (buffer [0] == 'M' && buffer [1] == 'M' && buffer [2] == 0 && buffer [3] == 0x2a)
return TRUE;
if (buffer [0] == 'I' && buffer [1] == 'I' && buffer [2] == 0x2a && buffer [3] == 0)
return TRUE;
return FALSE;
}
static gboolean
pixbuf_check_gif (unsigned char *buffer, int size)
{
if (size < 20)
return FALSE;
if (strncmp (buffer, "GIF8", 4) == 0)
return TRUE;
return FALSE;
}
static gboolean
pixbuf_check_xpm (unsigned char *buffer, int size)
{
if (size < 20)
return FALSE;
if (strncmp (buffer, "/* XPM */", 9) == 0)
return TRUE;
return FALSE;
}
static gboolean
pixbuf_check_bmp (unsigned char *buffer, int size)
{
if (size < 20)
return FALSE;
if (buffer [0] != 'B' || buffer [1] != 'M')
return FALSE;
return TRUE;
}
static gboolean
pixbuf_check_ppm (unsigned char *buffer, int size)
{
if (size < 20)
return FALSE;
if (buffer [0] == 'P'){
if (buffer [1] == '1' ||
buffer [1] == '2' ||
buffer [1] == '3' ||
buffer [1] == '4' ||
buffer [1] == '5' ||
buffer [1] == '6')
return TRUE;
}
return FALSE;
}
static struct {
char *module_name;
gboolean (*format_check)(unsigned char *buffer, int size);
GModule *module;
GdkPixBuf *(*load)(FILE *f)
int (*save)(char *filename, ...);
} file_formats [] = {
{ "png", pixbuf_check_png, NULL, NULL, NULL },
{ "jpeg", pixbuf_check_jpeg, NULL, NULL, NULL },
{ "tiff", pixbuf_check_tiff, NULL, NULL, NULL },
{ "gif", pixbuf_check_gif, NULL, NULL, NULL },
{ "xpm", pixbuf_check_xpm, NULL, NULL, NULL }
{ "bmp", pixbuf_check_bmp, NULL, NULL, NULL },
{ "ppm", pixbuf_check_ppm, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL, NULL },
};
static int
image_file_format (const char *file)
{
FILE *f = fopen (file);
if (!f)
return -1;
}
static void
image_handler_load (int idx)
{
char *module_name = g_strconcat ("pixbuf-", file_formats [idx].module_name, NULL);
char *path;
GModule *module;
void *load_sym, *save_sym;
path = g_module_build_path (PIXBUF_LIBDIR, module_name);
g_free (module_name);
module = g_module_open (path, G_MODULE_BIND_LAZY);
if (!module)
return;
file_formats [idx].module = module;
if (g_module_symbol (module, "image_load", &load_sym))
file_formats [idx].load = load_sym;
if (g_module_symbol (module, "image_save", &save_sym))
file_formats [idx].save = save_sym;
}
GdkPixBuf *
gdk_pixbuf_load_image (const char *file)
{
GdkPixBuf *pixbuf;
FormatLoader format_loader;
FILE *f;
char buffer [128];
f = fopen (file);
if (!f)
return NULL;
n = fread (&buffer, 1, sizeof (buffer), f);
if (n == 0){
fclose (f);
return NULL;
}
for (i = 0; file_formats [i].module_name; i++){
if ((*file_formats [i].format_check)(buffer, n)){
if (!file_formats [i].load)
image_handler_load (i);
if (!file_formats [i].load){
fclose (f);
return NULL;
}
rewind (f);
pixbuf = (*file_formats [i].load)(f);
fclose (f);
return pixbuf;
}
}
fclose (f);
return NULL;
}
-36
View File
@@ -1,36 +0,0 @@
/*
* gdk-pixbuf.c: Resource management.
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include "gdk-pixbuf.h"
static void
gdk_pixbuf_destroy (GdkPixBuf *pixbuf)
{
art_pixbuf_free (pixbuf->art_pixbuf);
g_free (pixbuf);
}
void
gdk_pixbuf_ref (GdkPixBuf *pixbuf)
{
g_return_if_fail (pixbuf != NULL);
pixbuf->ref_count++;
}
void
gdk_pixbuf_unref (GdkPixBuf *pixbuf)
{
g_return_if_fail (pixbuf != NULL);
g_return_if_fail (pixbuf->ref_count == 0);
pixbuf->ref_count--;
if (pixbuf->ref_count)
gdk_pixbuf_destroy (pixbuf);
}
-19
View File
@@ -1,19 +0,0 @@
#ifndef _GDK_PIXBUF_H_
#define _GDK_PIXBUF_H_
#include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_pixbuf.h>
typedef struct {
int ref_count;
ArtPixBuf *art_pixbuf;
void (*unref_func)(void *gdkpixbuf);
} GdkPixBuf;
GdkPixBuf *gdk_pixbuf_load_image (const char *file);
void gdk_pixbuf_save_image (const char *format_id, const char *file, ...);
void gdk_pixbuf_ref (GdkPixBuf *pixbuf);
void gdk_pixbuf_unref (GdkPixBuf *pixbuf);
GdkPixBuf gdk_pixbuf_duplicate (GdkPixBuf *pixbuf);
#endif /* _GDK_PIXBUF_H_ */
-90
View File
@@ -1,90 +0,0 @@
/*
* io-png.c: GdkPixBuf image loader for PNG files.
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*
*/
#include <config.h>
#include <stdio.h>
#include "gdk-pixbuf.h"
#include "gdk-pixbuf-io.h"
#include <png.h>
/* Shared library entry point */
GdkPixBuf *
image_load (FILE *f);
{
png_structp png;
png_infop info_ptr, end_info;
int width, height, depth, color_type, interlace_type;
int have_alpha, number_passes;
art_u8 *data;
g_return_val_if_fail (filename != NULL, NULL);
png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (png)
return NULL;
info_ptr = png_create_info_struct (png);
if (!info_ptr){
png_destroy_read_struct (&png, NULL, NULL);
return NULL;
}
end_info = png_create_info_struct (png);
if (!end_info){
png_destroy_read_struct (&png, &info_ptr, NULL);
return NULL:
}
if (setjmp (png->jmpbuf)){
png_destroy_read_struct (&png, &info_ptr, &end_info);
return NULL;
}
png_init_io (pngptr, f);
png_read_info (png, info_ptr);
png_get_IHDR (png, info_ptr, &width, &height, &depth, &color_type, &interlace_type, NULL, NULL);
if (color_type == color_type == PNG_COLOR_TYPE_PALETTE)
png_set_expand (png);
/*
* Strip 16 bit information to 8 bit
*/
png_set_strip_16 (png);
/*
* Extract multiple pixels with bit depths 1, 2 and 4 from a single
* byte into separate bytes
*/
png_set_packing (png);
/*
* Makes the PNG file to be rendered into RGB or RGBA
* modes (no matter of the bit depth nor the image
* mode
*/
png_set_expand (png);
/*
* Simplify loading by always having 4 bytes
*/
png_set_filler (png, 0xff, PNG_FILLER_AFTER);
if (color_type & PNG_COLOR_MASK_ALPHA)
have_alpha = 1
else
have_alpha = 0;
data = art_alloc (width * height * (3 + have_alpha));
if (!data){
png_destroy_read_struct (&png, &info_ptr, &end_info);
return NULL;
}
number_passes = png_set_interlace_handling (png);
}
-18
View File
@@ -1,18 +0,0 @@
#ifndef _GDK_PIXBUF_H_
#define _GDK_PIXBUF_H_
#include <libart_lgpl/art_pixbuf.h>
typedef struct {
int ref_count;
ArtPixBuf *pixbuf;
void (*unref_func)(void *gdkpixbuf);
} GdkPixBuf;
GdkPixBuf *gdk_pixbuf_load_image (const char *file);
void gdk_pixbuf_save_image (const char *format_id, const char *file, ...);
void gdk_pixbuf_ref (GdkPixBuf *pixbuf);
void gdk_pixbuf_unref (GdkPixBuf *pixbuf);
GdkPixBuf gdk_pixbuf_duplicate (GdkPixBuf *pixbuf);
#endif /* _GDK_PIXBUF_H_ */
+6 -3
View File
@@ -48,6 +48,7 @@
#include "gdkinput.h"
#include "gdkx.h"
#include "gdki18n.h"
#include "gdkkeysyms.h"
#ifndef X_GETTIMEOFDAY
#define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL)
@@ -333,6 +334,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
(*argv)[i] = NULL;
}
}
else if (strcmp ("--xim-status", (*argv)[i]) == 0)
@@ -348,6 +350,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_STATUS_AREA);
else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
(*argv)[i] = NULL;
}
}
#endif
@@ -406,9 +409,9 @@ gdk_init_check (int *argc,
g_free(argv_orig[i]);
g_free(argv_orig);
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True);
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True);
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True);
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False);
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False);
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False);
gdk_wm_window_protocols[0] = gdk_wm_delete_window;
gdk_wm_window_protocols[1] = gdk_wm_take_focus;
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
+101 -99
View File
@@ -70,7 +70,7 @@ gdk_colormap_new (GdkVisual *visual,
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
colormap->size = visual->colormap_size;
colormap->colors = g_new (GdkColor, colormap->size);
colormap->colors = NULL;
switch (visual->type)
{
@@ -117,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual,
private->private_val = TRUE;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
xvisual, AllocAll);
colormap->colors = g_new (GdkColor, colormap->size);
size = 1 << visual->red_prec;
for (i = 0; i < size; i++)
@@ -432,55 +433,6 @@ gdk_colors_alloc (GdkColormap *colormap,
return return_val;
}
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[in_pixels[i]]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
}
/*
*--------------------------------------------------------------
* gdk_color_copy
@@ -609,6 +561,104 @@ gdk_color_parse (const gchar *spec,
return return_val;
}
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
}
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
/********************
* Color allocation *
********************/
@@ -649,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
else
{
colormap->colors[ret->pixel] = *color;
colormap->colors[ret->pixel].pixel = ret->pixel;
private->info[ret->pixel].ref_count = 1;
g_hash_table_insert (private->hash,
@@ -1026,55 +1077,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap,
return success;
}
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colors[i]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
gboolean
gdk_color_alloc (GdkColormap *colormap,
GdkColor *color)
+25 -30
View File
@@ -31,8 +31,6 @@
#include "gdk/gdkprivate.h"
#include "gdk.h"
#define NEW_DRAGS
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
@@ -70,7 +68,8 @@ struct _GdkDragContextPrivate {
GdkDragAction old_actions; /* The last actions we sent to the source */
GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */
Window dest_xid;
Window dest_xid; /* The last window we looked up */
Window drop_xid; /* The (non-proxied) window that is receiving drops */
guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */
guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */
guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
@@ -196,8 +195,8 @@ gdk_drag_context_find (gboolean is_source,
private = (GdkDragContextPrivate *)context;
context_dest_xid = context->dest_window ?
(private->dest_xid ?
private->dest_xid :
(private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window)) :
None;
@@ -869,7 +868,7 @@ motif_find_drag_window (gboolean create)
Display *display;
XSetWindowAttributes attr;
display = XOpenDisplay (NULL);
display = XOpenDisplay (gdk_display_name);
XSetCloseDownMode (display, RetainPermanent);
XGrabServer (display);
@@ -2027,6 +2026,8 @@ xdnd_set_targets (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_targets_set = 1;
}
@@ -2073,6 +2074,8 @@ xdnd_set_actions (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_actions_set = 1;
private->xdnd_actions = context->actions;
}
@@ -2106,13 +2109,9 @@ xdnd_send_enter (GdkDragContext *context)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = (3 << 24); /* version */
xev.xclient.data.l[2] = 0;
@@ -2162,13 +2161,9 @@ xdnd_send_leave (GdkDragContext *context)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0;
@@ -2195,13 +2190,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = time;
@@ -2232,13 +2223,9 @@ xdnd_send_motion (GdkDragContext *context,
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = (x_root << 16) | y_root;
@@ -2859,6 +2846,12 @@ gdk_drag_find_window (GdkDragContext *context,
/* Check if new destination accepts drags, and which protocol */
/* There is some ugliness here. We actually need to pass
* _three_ pieces of information to drag_motion - dest_window,
* protocol, and the XID of the unproxied window. The first
* two are passed explicitely, the third implicitly through
* protocol->dest_xid.
*/
if ((recipient = gdk_drag_get_protocol (dest, protocol)))
{
*dest_window = gdk_window_lookup (recipient);
@@ -2917,6 +2910,7 @@ gdk_drag_motion (GdkDragContext *context,
if (dest_window)
{
context->dest_window = dest_window;
private->drop_xid = private->dest_xid;
gdk_window_ref (context->dest_window);
context->protocol = protocol;
@@ -2941,6 +2935,7 @@ gdk_drag_motion (GdkDragContext *context,
else
{
context->dest_window = NULL;
private->drop_xid = None;
context->action = 0;
}
+7 -5
View File
@@ -501,12 +501,14 @@ gdk_draw_lines (GdkDrawable *drawable,
g_return_if_fail (gc != NULL);
drawable_private = (GdkWindowPrivate*) drawable;
if (drawable_private->destroyed)
return;
gc_private = (GdkGCPrivate*) gc;
XDrawLines (drawable_private->xdisplay,
drawable_private->xwindow,
gc_private->xgc,
(XPoint *) points,
npoints,
CoordModeOrigin);
drawable_private->xwindow,
gc_private->xgc,
(XPoint *) points,
npoints,
CoordModeOrigin);
}
+23 -11
View File
@@ -27,7 +27,6 @@
#include "gdk.h"
#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include "gdkkeysyms.h"
#if HAVE_CONFIG_H
@@ -37,6 +36,7 @@
# endif
#endif
#include "gdkinput.h"
typedef struct _GdkIOClosure GdkIOClosure;
typedef struct _GdkEventPrivate GdkEventPrivate;
@@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void);
static gboolean gdk_event_prepare (gpointer source_data,
GTimeVal *current_time,
gint *timeout);
gint *timeout,
gpointer user_data);
static gboolean gdk_event_check (gpointer source_data,
GTimeVal *current_time);
GTimeVal *current_time,
gpointer user_data);
static gboolean gdk_event_dispatch (gpointer source_data,
GTimeVal *current_time,
gpointer user_data);
@@ -449,6 +451,8 @@ gdk_compress_exposures (XEvent *xevent,
&tmp_event,
expose_predicate,
(XPointer)&info);
event.any.window = window;
/* We apply filters here, and if it was filtered, completely
* ignore the return
@@ -849,6 +853,12 @@ gdk_io_destroy (gpointer data)
g_free (closure);
}
/* What do we do with G_IO_NVAL?
*/
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
#define EXCEPTION_CONDITION (G_IO_PRI)
static gboolean
gdk_io_invoke (GIOChannel *source,
GIOCondition condition,
@@ -857,11 +867,11 @@ gdk_io_invoke (GIOChannel *source,
GdkIOClosure *closure = data;
GdkInputCondition gdk_cond = 0;
if (condition & (G_IO_IN | G_IO_PRI))
if (condition & READ_CONDITION)
gdk_cond |= GDK_INPUT_READ;
if (condition & G_IO_OUT)
if (condition & WRITE_CONDITION)
gdk_cond |= GDK_INPUT_WRITE;
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
if (condition & EXCEPTION_CONDITION)
gdk_cond |= GDK_INPUT_EXCEPTION;
if (closure->condition & gdk_cond)
@@ -888,11 +898,11 @@ gdk_input_add_full (gint source,
closure->data = data;
if (condition & GDK_INPUT_READ)
cond |= (G_IO_IN | G_IO_PRI);
cond |= READ_CONDITION;
if (condition & GDK_INPUT_WRITE)
cond |= G_IO_OUT;
cond |= WRITE_CONDITION;
if (condition & GDK_INPUT_EXCEPTION)
cond |= G_IO_ERR|G_IO_HUP|G_IO_NVAL;
cond |= EXCEPTION_CONDITION;
channel = g_io_channel_unix_new (source);
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
@@ -2017,7 +2027,8 @@ gdk_events_queue (void)
static gboolean
gdk_event_prepare (gpointer source_data,
GTimeVal *current_time,
gint *timeout)
gint *timeout,
gpointer user_data)
{
gboolean retval;
@@ -2034,7 +2045,8 @@ gdk_event_prepare (gpointer source_data,
static gboolean
gdk_event_check (gpointer source_data,
GTimeVal *current_time)
GTimeVal *current_time,
gpointer user_data)
{
gboolean retval;
+38 -15
View File
@@ -34,27 +34,37 @@ gdk_font_load (const gchar *font_name)
{
GdkFont *font;
GdkFontPrivate *private;
XFontStruct *xfont;
private = g_new (GdkFontPrivate, 1);
font = (GdkFont*) private;
g_return_val_if_fail (font_name != NULL, NULL);
private->xdisplay = gdk_display;
private->xfont = XLoadQueryFont (private->xdisplay, font_name);
private->ref_count = 1;
xfont = XLoadQueryFont (gdk_display, font_name);
if (xfont == NULL)
return NULL;
if (!private->xfont)
font = gdk_font_lookup (xfont->fid);
if (font != NULL)
{
g_free (font);
return NULL;
private = (GdkFontPrivate *) font;
if (xfont != private->xfont)
XFreeFont (gdk_display, xfont);
gdk_font_ref (font);
}
else
{
font->type = GDK_FONT_FONT;
font->ascent = ((XFontStruct *) private->xfont)->ascent;
font->descent = ((XFontStruct *) private->xfont)->descent;
}
private = g_new (GdkFontPrivate, 1);
private->xdisplay = gdk_display;
private->xfont = xfont;
private->ref_count = 1;
gdk_xid_table_insert (&((XFontStruct *) private->xfont)->fid, font);
font = (GdkFont*) private;
font->type = GDK_FONT_FONT;
font->ascent = xfont->ascent;
font->descent = xfont->descent;
gdk_xid_table_insert (&xfont->fid, font);
}
return font;
}
@@ -568,7 +578,20 @@ gdk_text_extents_wc (GdkFont *font,
}
case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont;
XwcTextExtents (fontset, text, text_length, &ink, &logical);
if (sizeof(GdkWChar) == sizeof(wchar_t))
XwcTextExtents (fontset, (wchar_t *)text, text_length, &ink, &logical);
else
{
wchar_t *text_wchar;
gint i;
text_wchar = g_new (wchar_t, text_length);
for (i = 0; i < text_length; i++)
text_wchar[i] = text[i];
XwcTextExtents (fontset, text_wchar, text_length, &ink, &logical);
g_free (text_wchar);
}
if (lbearing)
*lbearing = ink.x;
if (rbearing)
@@ -642,7 +665,7 @@ gdk_text_measure (GdkFont *font,
case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont;
XmbTextExtents (fontset, text, text_length, &ink, &log);
width = log.width;
width = ink.x + ink.width;
break;
default:
width = 0;
+19 -11
View File
@@ -386,7 +386,7 @@ gdk_im_real_open (void)
destroy_cb.callback = gdk_im_destroy_cb;
destroy_cb.client_data = NULL;
if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
if (NULL != (void *) XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
#endif
@@ -469,7 +469,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_AREA_REQ;
preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height;
@@ -484,7 +484,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_POSITION_REQ;
preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height;
@@ -506,7 +506,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_STATUS_AREA_REQ;
status_area.x = attr->status_area.x;
status_area.y = attr->status_area.x;
status_area.y = attr->status_area.y;
status_area.width = attr->status_area.width;
status_area.height = attr->status_area.height;
@@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic)
break;
}
/* We have to ensure that the client window is actually created on
* the X server, or XCreateIC fails because the XIM server can't get
* information about the client window.
*/
gdk_flush();
if (preedit_attr != NULL && status_attr != NULL)
private->xic = XCreateIC (xim_im,
XNInputStyle,
@@ -871,7 +877,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNFontSet;
arg->value = (gpointer) GDK_FONT_XFONT(attr->status_fontset);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FONTSET;
}
@@ -887,7 +893,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea;
arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA;
}
@@ -903,7 +909,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea;
arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA_NEEDED;
else
private->mask &= ~GDK_IC_STATUS_AREA_NEEDED;
@@ -914,7 +920,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNForeground;
arg->value = (gpointer) attr->status_foreground.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FOREGROUND;
}
@@ -923,7 +929,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackground;
arg->value = (gpointer) attr->status_background.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_BACKGROUND;
}
@@ -932,7 +938,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackgroundPixmap;
arg->value = (gpointer) GDK_WINDOW_XWINDOW(attr->status_pixmap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_PIXMAP;
}
@@ -941,7 +947,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNColormap;
arg->value = (gpointer) GDK_COLORMAP_XCOLORMAP(attr->status_colormap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_COLORMAP;
}
@@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
!= Success)
{
/* InvalidChar */
XFree(tpr.value);
return -1;
}
XFree(tpr.value);
if (num_wstrs == 0)
return 0;
wstr_src = wstrs[0];
+1 -1
View File
@@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window,
color_name = gdk_pixmap_extract_color (buffer);
if (color_name == NULL ||
if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
gdk_color_parse (color_name, &color->color) == FALSE)
{
color->color = *transparent_color;
+4 -3
View File
@@ -45,9 +45,10 @@ gdk_atom_intern (const gchar *atom_name,
{
retval = XInternAtom (gdk_display, atom_name, only_if_exists);
g_hash_table_insert (atom_hash,
g_strdup (atom_name),
GUINT_TO_POINTER (retval));
if (retval != None || !only_if_exists)
g_hash_table_insert (atom_hash,
g_strdup (atom_name),
GUINT_TO_POINTER (retval));
}
return retval;
+9 -6
View File
@@ -482,27 +482,30 @@ gdk_rgb_score_visual (GdkVisual *visual)
static void
gdk_rgb_choose_visual (void)
{
GList *visuals;
GList *visuals, *tmp_list;
guint32 score, best_score;
GdkVisual *visual, *best_visual;
visuals = gdk_list_visuals ();
tmp_list = visuals;
best_visual = visuals->data;
best_visual = tmp_list->data;
best_score = gdk_rgb_score_visual (best_visual);
visuals = visuals->next;
while (visuals)
tmp_list = tmp_list->next;
while (tmp_list)
{
visual = visuals->data;
visual = tmp_list->data;
score = gdk_rgb_score_visual (visual);
if (score > best_score)
{
best_score = score;
best_visual = visual;
}
visuals = visuals->next;
tmp_list = tmp_list->next;
}
g_list_free (visuals);
image_info->visual = best_visual;
}
+4 -4
View File
@@ -105,7 +105,7 @@ gdk_selection_property_get (GdkWindow *requestor,
gulong length;
GdkAtom prop_type;
gint prop_format;
guchar *t;
guchar *t = NULL;
g_return_val_if_fail (requestor != NULL, 0);
@@ -133,11 +133,11 @@ gdk_selection_property_get (GdkWindow *requestor,
*data = NULL;
return 0;
}
if (t)
{
t = NULL;
XFree (t);
t = NULL;
}
/* Add on an extra byte to handle null termination. X guarantees
@@ -188,7 +188,7 @@ gdk_selection_send_notify (guint32 requestor,
xevent.property = property;
xevent.time = time;
XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent);
gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
}
gint
+21 -21
View File
@@ -34,17 +34,9 @@
#include "gdkprivate.h"
#include "MwmUtil.h"
#if HAVE_CONFIG_H
# include <config.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# endif
#else
# include <stdlib.h>
# include <stdio.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_SHAPE_EXT
@@ -1110,7 +1102,15 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags = 0;
if (geom_mask & GDK_HINT_POS)
size_hints.flags |= PPosition;
{
size_hints.flags |= PPosition;
/* We need to initialize the following obsolete fields because KWM
* apparently uses these fields if they are non-zero.
* #@#!#!$!.
*/
size_hints.x = 0;
size_hints.y = 0;
}
if (geom_mask & GDK_HINT_MIN_SIZE)
{
@@ -1145,23 +1145,23 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags |= PAspect;
if (geometry->min_aspect <= 1)
{
size_hints.min_aspect.x = G_MAXINT * geometry->min_aspect;
size_hints.min_aspect.y = G_MAXINT;
size_hints.min_aspect.x = 65536 * geometry->min_aspect;
size_hints.min_aspect.y = 65536;
}
else
{
size_hints.min_aspect.x = G_MAXINT;
size_hints.min_aspect.y = G_MAXINT / geometry->min_aspect;;
size_hints.min_aspect.x = 65536;
size_hints.min_aspect.y = 65536 / geometry->min_aspect;;
}
if (geometry->max_aspect <= 1)
{
size_hints.max_aspect.x = G_MAXINT * geometry->max_aspect;
size_hints.max_aspect.y = G_MAXINT;
size_hints.max_aspect.x = 65536 * geometry->max_aspect;
size_hints.max_aspect.y = 65536;
}
else
{
size_hints.max_aspect.x = G_MAXINT;
size_hints.max_aspect.y = G_MAXINT / geometry->max_aspect;;
size_hints.max_aspect.x = 65536;
size_hints.max_aspect.y = 65536 / geometry->max_aspect;;
}
}
@@ -1988,7 +1988,7 @@ gdk_window_remove_filter (GdkWindow *window,
if (private)
private->filters = g_list_remove_link (private->filters, node);
else
gdk_default_filters = g_list_remove_link (gdk_default_filters, tmp_list);
gdk_default_filters = g_list_remove_link (gdk_default_filters, node);
g_list_free_1 (node);
g_free (filter);
+101 -99
View File
@@ -70,7 +70,7 @@ gdk_colormap_new (GdkVisual *visual,
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
colormap->size = visual->colormap_size;
colormap->colors = g_new (GdkColor, colormap->size);
colormap->colors = NULL;
switch (visual->type)
{
@@ -117,6 +117,7 @@ gdk_colormap_new (GdkVisual *visual,
private->private_val = TRUE;
private->xcolormap = XCreateColormap (private->xdisplay, gdk_root_window,
xvisual, AllocAll);
colormap->colors = g_new (GdkColor, colormap->size);
size = 1 << visual->red_prec;
for (i = 0; i < size; i++)
@@ -432,55 +433,6 @@ gdk_colors_alloc (GdkColormap *colormap,
return return_val;
}
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[in_pixels[i]]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
}
/*
*--------------------------------------------------------------
* gdk_color_copy
@@ -609,6 +561,104 @@ gdk_color_parse (const gchar *spec,
return return_val;
}
/* This is almost identical to gdk_colormap_free_colors.
* Keep them in sync!
*/
void
gdk_colors_free (GdkColormap *colormap,
gulong *in_pixels,
gint in_npixels,
gulong planes)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (in_pixels != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, in_npixels);
for (i=0; i<in_npixels; i++)
{
gulong pixel = in_pixels[i];
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, planes);
g_free (pixels);
}
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colormap->colors[pixel]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
/********************
* Color allocation *
********************/
@@ -649,6 +699,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
else
{
colormap->colors[ret->pixel] = *color;
colormap->colors[ret->pixel].pixel = ret->pixel;
private->info[ret->pixel].ref_count = 1;
g_hash_table_insert (private->hash,
@@ -1026,55 +1077,6 @@ gdk_colormap_alloc_color (GdkColormap *colormap,
return success;
}
/* This is almost identical to gdk_colors_free.
* Keep them in sync!
*/
void
gdk_colormap_free_colors (GdkColormap *colormap,
GdkColor *colors,
gint ncolors)
{
GdkColormapPrivate *private;
gulong *pixels;
gint npixels = 0;
gint i;
g_return_if_fail (colormap != NULL);
g_return_if_fail (colors != NULL);
private = (GdkColormapPrivate*) colormap;
if ((private->visual->type != GDK_VISUAL_PSEUDO_COLOR) &&
(private->visual->type != GDK_VISUAL_GRAYSCALE))
return;
pixels = g_new (gulong, ncolors);
for (i=0; i<ncolors; i++)
{
gulong pixel = colors[i].pixel;
if (private->info[pixel].ref_count)
{
private->info[pixel].ref_count--;
if (private->info[pixel].ref_count == 0)
{
pixels[npixels++] = pixel;
if (!(private->info[pixel].flags & GDK_COLOR_WRITEABLE))
g_hash_table_remove (private->hash, &colors[i]);
private->info[pixel].flags = 0;
}
}
}
if (npixels)
XFreeColors (private->xdisplay, private->xcolormap,
pixels, npixels, 0);
g_free (pixels);
}
gboolean
gdk_color_alloc (GdkColormap *colormap,
GdkColor *color)
+25 -30
View File
@@ -31,8 +31,6 @@
#include "gdk/gdkprivate.h"
#include "gdk.h"
#define NEW_DRAGS
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
typedef enum {
@@ -70,7 +68,8 @@ struct _GdkDragContextPrivate {
GdkDragAction old_actions; /* The last actions we sent to the source */
GdkDragAction xdnd_actions; /* What is currently set in XdndActionList */
Window dest_xid;
Window dest_xid; /* The last window we looked up */
Window drop_xid; /* The (non-proxied) window that is receiving drops */
guint xdnd_targets_set : 1; /* Whether we've already set XdndTypeList */
guint xdnd_actions_set : 1; /* Whether we've already set XdndActionList */
guint xdnd_have_actions : 1; /* Whether an XdndActionList was provided */
@@ -196,8 +195,8 @@ gdk_drag_context_find (gboolean is_source,
private = (GdkDragContextPrivate *)context;
context_dest_xid = context->dest_window ?
(private->dest_xid ?
private->dest_xid :
(private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window)) :
None;
@@ -869,7 +868,7 @@ motif_find_drag_window (gboolean create)
Display *display;
XSetWindowAttributes attr;
display = XOpenDisplay (NULL);
display = XOpenDisplay (gdk_display_name);
XSetCloseDownMode (display, RetainPermanent);
XGrabServer (display);
@@ -2027,6 +2026,8 @@ xdnd_set_targets (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_targets_set = 1;
}
@@ -2073,6 +2074,8 @@ xdnd_set_actions (GdkDragContext *context)
XA_ATOM, 32, PropModeReplace,
(guchar *)atomlist, n_atoms);
g_free (atomlist);
private->xdnd_actions_set = 1;
private->xdnd_actions = context->actions;
}
@@ -2106,13 +2109,9 @@ xdnd_send_enter (GdkDragContext *context)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndEnter", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = (3 << 24); /* version */
xev.xclient.data.l[2] = 0;
@@ -2162,13 +2161,9 @@ xdnd_send_leave (GdkDragContext *context)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndLeave", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = 0;
@@ -2195,13 +2190,9 @@ xdnd_send_drop (GdkDragContext *context, guint32 time)
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndDrop", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = time;
@@ -2232,13 +2223,9 @@ xdnd_send_motion (GdkDragContext *context,
xev.xclient.type = ClientMessage;
xev.xclient.message_type = gdk_atom_intern ("XdndPosition", FALSE);
xev.xclient.format = 32;
#ifdef NEW_DRAGS
xev.xclient.window = private->dest_xid ?
private->dest_xid :
xev.xclient.window = private->drop_xid ?
private->drop_xid :
GDK_WINDOW_XWINDOW (context->dest_window);
#else
xev.xclient.window = GDK_WINDOW_XWINDOW (context->dest_window);
#endif
xev.xclient.data.l[0] = GDK_WINDOW_XWINDOW (context->source_window);
xev.xclient.data.l[1] = 0;
xev.xclient.data.l[2] = (x_root << 16) | y_root;
@@ -2859,6 +2846,12 @@ gdk_drag_find_window (GdkDragContext *context,
/* Check if new destination accepts drags, and which protocol */
/* There is some ugliness here. We actually need to pass
* _three_ pieces of information to drag_motion - dest_window,
* protocol, and the XID of the unproxied window. The first
* two are passed explicitely, the third implicitly through
* protocol->dest_xid.
*/
if ((recipient = gdk_drag_get_protocol (dest, protocol)))
{
*dest_window = gdk_window_lookup (recipient);
@@ -2917,6 +2910,7 @@ gdk_drag_motion (GdkDragContext *context,
if (dest_window)
{
context->dest_window = dest_window;
private->drop_xid = private->dest_xid;
gdk_window_ref (context->dest_window);
context->protocol = protocol;
@@ -2941,6 +2935,7 @@ gdk_drag_motion (GdkDragContext *context,
else
{
context->dest_window = NULL;
private->drop_xid = None;
context->action = 0;
}
+23 -11
View File
@@ -27,7 +27,6 @@
#include "gdk.h"
#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinput.h"
#include "gdkkeysyms.h"
#if HAVE_CONFIG_H
@@ -37,6 +36,7 @@
# endif
#endif
#include "gdkinput.h"
typedef struct _GdkIOClosure GdkIOClosure;
typedef struct _GdkEventPrivate GdkEventPrivate;
@@ -88,9 +88,11 @@ static GdkEvent* gdk_event_unqueue (void);
static gboolean gdk_event_prepare (gpointer source_data,
GTimeVal *current_time,
gint *timeout);
gint *timeout,
gpointer user_data);
static gboolean gdk_event_check (gpointer source_data,
GTimeVal *current_time);
GTimeVal *current_time,
gpointer user_data);
static gboolean gdk_event_dispatch (gpointer source_data,
GTimeVal *current_time,
gpointer user_data);
@@ -449,6 +451,8 @@ gdk_compress_exposures (XEvent *xevent,
&tmp_event,
expose_predicate,
(XPointer)&info);
event.any.window = window;
/* We apply filters here, and if it was filtered, completely
* ignore the return
@@ -849,6 +853,12 @@ gdk_io_destroy (gpointer data)
g_free (closure);
}
/* What do we do with G_IO_NVAL?
*/
#define READ_CONDITION (G_IO_IN | G_IO_HUP | G_IO_ERR)
#define WRITE_CONDITION (G_IO_OUT | G_IO_ERR)
#define EXCEPTION_CONDITION (G_IO_PRI)
static gboolean
gdk_io_invoke (GIOChannel *source,
GIOCondition condition,
@@ -857,11 +867,11 @@ gdk_io_invoke (GIOChannel *source,
GdkIOClosure *closure = data;
GdkInputCondition gdk_cond = 0;
if (condition & (G_IO_IN | G_IO_PRI))
if (condition & READ_CONDITION)
gdk_cond |= GDK_INPUT_READ;
if (condition & G_IO_OUT)
if (condition & WRITE_CONDITION)
gdk_cond |= GDK_INPUT_WRITE;
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
if (condition & EXCEPTION_CONDITION)
gdk_cond |= GDK_INPUT_EXCEPTION;
if (closure->condition & gdk_cond)
@@ -888,11 +898,11 @@ gdk_input_add_full (gint source,
closure->data = data;
if (condition & GDK_INPUT_READ)
cond |= (G_IO_IN | G_IO_PRI);
cond |= READ_CONDITION;
if (condition & GDK_INPUT_WRITE)
cond |= G_IO_OUT;
cond |= WRITE_CONDITION;
if (condition & GDK_INPUT_EXCEPTION)
cond |= G_IO_ERR|G_IO_HUP|G_IO_NVAL;
cond |= EXCEPTION_CONDITION;
channel = g_io_channel_unix_new (source);
result = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cond,
@@ -2017,7 +2027,8 @@ gdk_events_queue (void)
static gboolean
gdk_event_prepare (gpointer source_data,
GTimeVal *current_time,
gint *timeout)
gint *timeout,
gpointer user_data)
{
gboolean retval;
@@ -2034,7 +2045,8 @@ gdk_event_prepare (gpointer source_data,
static gboolean
gdk_event_check (gpointer source_data,
GTimeVal *current_time)
GTimeVal *current_time,
gpointer user_data)
{
gboolean retval;
+38 -15
View File
@@ -34,27 +34,37 @@ gdk_font_load (const gchar *font_name)
{
GdkFont *font;
GdkFontPrivate *private;
XFontStruct *xfont;
private = g_new (GdkFontPrivate, 1);
font = (GdkFont*) private;
g_return_val_if_fail (font_name != NULL, NULL);
private->xdisplay = gdk_display;
private->xfont = XLoadQueryFont (private->xdisplay, font_name);
private->ref_count = 1;
xfont = XLoadQueryFont (gdk_display, font_name);
if (xfont == NULL)
return NULL;
if (!private->xfont)
font = gdk_font_lookup (xfont->fid);
if (font != NULL)
{
g_free (font);
return NULL;
private = (GdkFontPrivate *) font;
if (xfont != private->xfont)
XFreeFont (gdk_display, xfont);
gdk_font_ref (font);
}
else
{
font->type = GDK_FONT_FONT;
font->ascent = ((XFontStruct *) private->xfont)->ascent;
font->descent = ((XFontStruct *) private->xfont)->descent;
}
private = g_new (GdkFontPrivate, 1);
private->xdisplay = gdk_display;
private->xfont = xfont;
private->ref_count = 1;
gdk_xid_table_insert (&((XFontStruct *) private->xfont)->fid, font);
font = (GdkFont*) private;
font->type = GDK_FONT_FONT;
font->ascent = xfont->ascent;
font->descent = xfont->descent;
gdk_xid_table_insert (&xfont->fid, font);
}
return font;
}
@@ -568,7 +578,20 @@ gdk_text_extents_wc (GdkFont *font,
}
case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont;
XwcTextExtents (fontset, text, text_length, &ink, &logical);
if (sizeof(GdkWChar) == sizeof(wchar_t))
XwcTextExtents (fontset, (wchar_t *)text, text_length, &ink, &logical);
else
{
wchar_t *text_wchar;
gint i;
text_wchar = g_new (wchar_t, text_length);
for (i = 0; i < text_length; i++)
text_wchar[i] = text[i];
XwcTextExtents (fontset, text_wchar, text_length, &ink, &logical);
g_free (text_wchar);
}
if (lbearing)
*lbearing = ink.x;
if (rbearing)
@@ -642,7 +665,7 @@ gdk_text_measure (GdkFont *font,
case GDK_FONT_FONTSET:
fontset = (XFontSet) private->xfont;
XmbTextExtents (fontset, text, text_length, &ink, &log);
width = log.width;
width = ink.x + ink.width;
break;
default:
width = 0;
+19 -11
View File
@@ -386,7 +386,7 @@ gdk_im_real_open (void)
destroy_cb.callback = gdk_im_destroy_cb;
destroy_cb.client_data = NULL;
if (NULL != XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
if (NULL != (void *) XSetIMValues (xim_im, XNDestroyCallback, &destroy_cb, NULL))
GDK_NOTE (XIM, g_warning ("Could not set destroy callback to IM. Be careful to not destroy your input method."));
#endif
@@ -469,7 +469,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_AREA_REQ;
preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height;
@@ -484,7 +484,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_PREEDIT_POSITION_REQ;
preedit_area.x = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.x;
preedit_area.y = attr->preedit_area.y;
preedit_area.width = attr->preedit_area.width;
preedit_area.height = attr->preedit_area.height;
@@ -506,7 +506,7 @@ gdk_ic_real_new (GdkIC *ic)
mask |= GDK_IC_STATUS_AREA_REQ;
status_area.x = attr->status_area.x;
status_area.y = attr->status_area.x;
status_area.y = attr->status_area.y;
status_area.width = attr->status_area.width;
status_area.height = attr->status_area.height;
@@ -518,6 +518,12 @@ gdk_ic_real_new (GdkIC *ic)
break;
}
/* We have to ensure that the client window is actually created on
* the X server, or XCreateIC fails because the XIM server can't get
* information about the client window.
*/
gdk_flush();
if (preedit_attr != NULL && status_attr != NULL)
private->xic = XCreateIC (xim_im,
XNInputStyle,
@@ -871,7 +877,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNFontSet;
arg->value = (gpointer) GDK_FONT_XFONT(attr->status_fontset);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FONTSET;
}
@@ -887,7 +893,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea;
arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA;
}
@@ -903,7 +909,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNArea;
arg->value = (gpointer) &rect;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_AREA_NEEDED;
else
private->mask &= ~GDK_IC_STATUS_AREA_NEEDED;
@@ -914,7 +920,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNForeground;
arg->value = (gpointer) attr->status_foreground.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_FOREGROUND;
}
@@ -923,7 +929,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackground;
arg->value = (gpointer) attr->status_background.pixel;
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_BACKGROUND;
}
@@ -932,7 +938,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNBackgroundPixmap;
arg->value = (gpointer) GDK_WINDOW_XWINDOW(attr->status_pixmap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_PIXMAP;
}
@@ -941,7 +947,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
arg->name = XNColormap;
arg->value = (gpointer) GDK_COLORMAP_XCOLORMAP(attr->status_colormap);
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
if (XSetICValues (xic, XNStatusAttributes, arg, NULL))
error |= GDK_IC_STATUS_COLORMAP;
}
@@ -1565,8 +1571,10 @@ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
!= Success)
{
/* InvalidChar */
XFree(tpr.value);
return -1;
}
XFree(tpr.value);
if (num_wstrs == 0)
return 0;
wstr_src = wstrs[0];
+6 -3
View File
@@ -48,6 +48,7 @@
#include "gdkinput.h"
#include "gdkx.h"
#include "gdki18n.h"
#include "gdkkeysyms.h"
#ifndef X_GETTIMEOFDAY
#define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL)
@@ -333,6 +334,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
(*argv)[i] = NULL;
}
}
else if (strcmp ("--xim-status", (*argv)[i]) == 0)
@@ -348,6 +350,7 @@ gdk_init_check (int *argc,
gdk_im_set_best_style (GDK_IM_STATUS_AREA);
else if (strcmp ("callbacks", (*argv)[i]) == 0)
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
(*argv)[i] = NULL;
}
}
#endif
@@ -406,9 +409,9 @@ gdk_init_check (int *argc,
g_free(argv_orig[i]);
g_free(argv_orig);
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True);
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True);
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True);
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", False);
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", False);
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", False);
gdk_wm_window_protocols[0] = gdk_wm_delete_window;
gdk_wm_window_protocols[1] = gdk_wm_take_focus;
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
+1 -1
View File
@@ -518,7 +518,7 @@ _gdk_pixmap_create_from_xpm (GdkWindow *window,
color_name = gdk_pixmap_extract_color (buffer);
if (color_name == NULL ||
if (color_name == NULL || g_strcasecmp (color_name, "None") == 0 ||
gdk_color_parse (color_name, &color->color) == FALSE)
{
color->color = *transparent_color;
+4 -3
View File
@@ -45,9 +45,10 @@ gdk_atom_intern (const gchar *atom_name,
{
retval = XInternAtom (gdk_display, atom_name, only_if_exists);
g_hash_table_insert (atom_hash,
g_strdup (atom_name),
GUINT_TO_POINTER (retval));
if (retval != None || !only_if_exists)
g_hash_table_insert (atom_hash,
g_strdup (atom_name),
GUINT_TO_POINTER (retval));
}
return retval;
+4 -4
View File
@@ -105,7 +105,7 @@ gdk_selection_property_get (GdkWindow *requestor,
gulong length;
GdkAtom prop_type;
gint prop_format;
guchar *t;
guchar *t = NULL;
g_return_val_if_fail (requestor != NULL, 0);
@@ -133,11 +133,11 @@ gdk_selection_property_get (GdkWindow *requestor,
*data = NULL;
return 0;
}
if (t)
{
t = NULL;
XFree (t);
t = NULL;
}
/* Add on an extra byte to handle null termination. X guarantees
@@ -188,7 +188,7 @@ gdk_selection_send_notify (guint32 requestor,
xevent.property = property;
xevent.time = time;
XSendEvent (gdk_display, requestor, False, NoEventMask, (XEvent*) &xevent);
gdk_send_xevent (requestor, False, NoEventMask, (XEvent*) &xevent);
}
gint
+21 -21
View File
@@ -34,17 +34,9 @@
#include "gdkprivate.h"
#include "MwmUtil.h"
#if HAVE_CONFIG_H
# include <config.h>
# if STDC_HEADERS
# include <stdlib.h>
# include <stdio.h>
# include <string.h>
# endif
#else
# include <stdlib.h>
# include <stdio.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_SHAPE_EXT
@@ -1110,7 +1102,15 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags = 0;
if (geom_mask & GDK_HINT_POS)
size_hints.flags |= PPosition;
{
size_hints.flags |= PPosition;
/* We need to initialize the following obsolete fields because KWM
* apparently uses these fields if they are non-zero.
* #@#!#!$!.
*/
size_hints.x = 0;
size_hints.y = 0;
}
if (geom_mask & GDK_HINT_MIN_SIZE)
{
@@ -1145,23 +1145,23 @@ gdk_window_set_geometry_hints (GdkWindow *window,
size_hints.flags |= PAspect;
if (geometry->min_aspect <= 1)
{
size_hints.min_aspect.x = G_MAXINT * geometry->min_aspect;
size_hints.min_aspect.y = G_MAXINT;
size_hints.min_aspect.x = 65536 * geometry->min_aspect;
size_hints.min_aspect.y = 65536;
}
else
{
size_hints.min_aspect.x = G_MAXINT;
size_hints.min_aspect.y = G_MAXINT / geometry->min_aspect;;
size_hints.min_aspect.x = 65536;
size_hints.min_aspect.y = 65536 / geometry->min_aspect;;
}
if (geometry->max_aspect <= 1)
{
size_hints.max_aspect.x = G_MAXINT * geometry->max_aspect;
size_hints.max_aspect.y = G_MAXINT;
size_hints.max_aspect.x = 65536 * geometry->max_aspect;
size_hints.max_aspect.y = 65536;
}
else
{
size_hints.max_aspect.x = G_MAXINT;
size_hints.max_aspect.y = G_MAXINT / geometry->max_aspect;;
size_hints.max_aspect.x = 65536;
size_hints.max_aspect.y = 65536 / geometry->max_aspect;;
}
}
@@ -1988,7 +1988,7 @@ gdk_window_remove_filter (GdkWindow *window,
if (private)
private->filters = g_list_remove_link (private->filters, node);
else
gdk_default_filters = g_list_remove_link (gdk_default_filters, tmp_list);
gdk_default_filters = g_list_remove_link (gdk_default_filters, node);
g_list_free_1 (node);
g_free (filter);
+5 -5
View File
@@ -1,6 +1,6 @@
# Note that this is NOT a relocatable package
%define ver @VERSION@
%define rel SNAP
%define rel 1
%define prefix /usr
Summary: The Gimp Toolkit
@@ -148,10 +148,10 @@ fi
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{prefix}/lib/libgtk-1.1.so.*
%{prefix}/lib/libgdk-1.1.so.*
{prefix}/share/themes/Default
+%{prefix}/share/locale/*/*/*
%{prefix}/lib/libgtk-1.2.so.*
%{prefix}/lib/libgdk-1.2.so.*
%{prefix}/share/themes/Default
%{prefix}/share/locale/*/*/*
%files devel
+8 -5
View File
@@ -243,7 +243,7 @@ BUILT_SOURCES = \
stamp-m
# cause the built sources to be rebuild when possible, even with --include-deps
$(static_sources): $(BUILT_SOURCES)
$(static_SOURCES): $(BUILT_SOURCES)
# More headers to use when autogenerating.
gdk_headers = \
@@ -312,17 +312,19 @@ libgtk_la_LDFLAGS = \
# $(top_builddir)/gdk/libgdk.la
gtkconfdir = $(sysconfdir)/gtk
gtkconf_DATA = gtkrc gtkrc.ja gtkrc.ko gtkrc.ru
gtkconf_DATA = gtkrc.ja gtkrc.ko gtkrc.ru gtkrc.iso-8859-2
gtkrc:
:
# We create a dummy theme for the default GTK+ theme
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(datadir)/themes/Default/gtk
echo "# Empty gtkrc for default theme" > \
$(DESTDIR)$(datadir)/themes/Default/gtk/gtkrc
$(mkinstalldirs) $(DESTDIR)$(gtkconfdir)
cd $(DESTDIR)$(gtkconfdir) && \
for i in cs hr hu pl sk sl ; do \
ln -s -f gtkrc.iso-8859-2 gtkrc.$$i ; \
done
uninstall-local:
rm -f $(DESTDIR)$(datadir)/themes/Default/gtkrc
@@ -358,6 +360,7 @@ EXTRA_DIST = \
tree_plus.xbm \
tree_minus.xbm \
circles.xbm \
gtkrc.iso-8859-2 \
gtkrc.ja \
gtkrc.ko \
gtkrc.ru
+1 -1
View File
@@ -28,7 +28,7 @@
*/
#include <ctype.h>
#include <strings.h>
#include <string.h>
#include "gtkaccelgroup.h"
#include "gdk/gdkkeysyms.h"
#include "gtksignal.h"
+220 -5
View File
@@ -422,17 +422,40 @@ gtk_arg_copy (GtkArg *src_arg,
}
void
gtk_arg_free (GtkArg *arg,
gboolean free_contents)
gtk_arg_free (GtkArg *arg,
gboolean free_contents)
{
g_return_if_fail (arg != NULL);
if (free_contents &&
GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING)
g_free (GTK_VALUE_STRING (*arg));
if (free_contents)
gtk_arg_reset (arg);
g_free (arg);
}
void
gtk_arg_reset (GtkArg *arg)
{
GtkType fundamental_type;
g_return_if_fail (arg != NULL);
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
{
fundamental_type = gtk_type_get_varargs_type (fundamental_type);
if (!fundamental_type)
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
}
if (fundamental_type == GTK_TYPE_STRING)
{
g_free (GTK_VALUE_STRING (*arg));
arg->type = GTK_TYPE_INVALID;
}
else if (arg->type != GTK_TYPE_INVALID)
arg->type = GTK_TYPE_INVALID;
}
gint
gtk_arg_info_equal (gconstpointer arg_info_1,
gconstpointer arg_info_2)
@@ -466,3 +489,195 @@ gtk_arg_info_hash (gconstpointer arg_info)
return h;
}
gboolean
gtk_arg_values_equal (const GtkArg *arg1,
const GtkArg *arg2)
{
GtkType fundamental_type;
gboolean equal;
g_return_val_if_fail (arg1 != NULL, FALSE);
g_return_val_if_fail (arg2 != NULL, FALSE);
g_return_val_if_fail (GTK_FUNDAMENTAL_TYPE (arg1->type) ==
GTK_FUNDAMENTAL_TYPE (arg2->type), FALSE);
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg1->type);
if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
{
fundamental_type = gtk_type_get_varargs_type (fundamental_type);
if (!fundamental_type)
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg1->type);
}
switch (fundamental_type)
{
case GTK_TYPE_INVALID:
equal = TRUE;
break;
case GTK_TYPE_CHAR:
equal = GTK_VALUE_CHAR (*arg1) == GTK_VALUE_CHAR (*arg2);
break;
case GTK_TYPE_BOOL:
equal = (GTK_VALUE_BOOL (*arg1) != FALSE) == (GTK_VALUE_BOOL (*arg2) != FALSE);
break;
case GTK_TYPE_INT:
equal = GTK_VALUE_INT (*arg1) == GTK_VALUE_INT (*arg2);
break;
case GTK_TYPE_UINT:
equal = GTK_VALUE_UINT (*arg1) == GTK_VALUE_UINT (*arg2);
break;
case GTK_TYPE_LONG:
equal = GTK_VALUE_LONG (*arg1) == GTK_VALUE_LONG (*arg2);
break;
case GTK_TYPE_ULONG:
equal = GTK_VALUE_ULONG (*arg1) == GTK_VALUE_ULONG (*arg2);
break;
case GTK_TYPE_FLOAT:
equal = GTK_VALUE_FLOAT (*arg1) == GTK_VALUE_FLOAT (*arg2);
break;
case GTK_TYPE_DOUBLE:
equal = GTK_VALUE_DOUBLE (*arg1) == GTK_VALUE_DOUBLE (*arg2);
break;
case GTK_TYPE_STRING:
if (!GTK_VALUE_STRING (*arg1) ||
!GTK_VALUE_STRING (*arg2))
equal = GTK_VALUE_STRING (*arg1) == GTK_VALUE_STRING (*arg2);
else
equal = g_str_equal (GTK_VALUE_STRING (*arg1), GTK_VALUE_STRING (*arg2));
break;
case GTK_TYPE_ENUM:
equal = GTK_VALUE_ENUM (*arg1) == GTK_VALUE_ENUM (*arg2);
break;
case GTK_TYPE_FLAGS:
equal = GTK_VALUE_FLAGS (*arg1) == GTK_VALUE_FLAGS (*arg2);
break;
case GTK_TYPE_BOXED:
equal = GTK_VALUE_BOXED (*arg1) == GTK_VALUE_BOXED (*arg2);
break;
case GTK_TYPE_FOREIGN:
equal = (GTK_VALUE_FOREIGN (*arg1).data == GTK_VALUE_FOREIGN (*arg2).data &&
GTK_VALUE_FOREIGN (*arg1).notify == GTK_VALUE_FOREIGN (*arg2).notify);
break;
case GTK_TYPE_CALLBACK:
equal = (GTK_VALUE_CALLBACK (*arg1).marshal == GTK_VALUE_CALLBACK (*arg2).marshal &&
GTK_VALUE_CALLBACK (*arg1).data == GTK_VALUE_CALLBACK (*arg2).data &&
GTK_VALUE_CALLBACK (*arg1).notify == GTK_VALUE_CALLBACK (*arg2).notify);
break;
case GTK_TYPE_ARGS:
equal = (GTK_VALUE_ARGS (*arg1).n_args == GTK_VALUE_ARGS (*arg2).n_args &&
GTK_VALUE_ARGS (*arg1).args == GTK_VALUE_ARGS (*arg2).args);
break;
case GTK_TYPE_OBJECT:
equal = GTK_VALUE_OBJECT (*arg1) == GTK_VALUE_OBJECT (*arg2);
break;
case GTK_TYPE_POINTER:
equal = GTK_VALUE_POINTER (*arg1) == GTK_VALUE_POINTER (*arg2);
break;
case GTK_TYPE_SIGNAL:
equal = (GTK_VALUE_SIGNAL (*arg1).f == GTK_VALUE_SIGNAL (*arg2).f &&
GTK_VALUE_SIGNAL (*arg1).d == GTK_VALUE_SIGNAL (*arg2).d);
break;
case GTK_TYPE_C_CALLBACK:
equal = (GTK_VALUE_C_CALLBACK (*arg1).func == GTK_VALUE_C_CALLBACK (*arg2).func &&
GTK_VALUE_C_CALLBACK (*arg1).func_data == GTK_VALUE_C_CALLBACK (*arg2).func_data);
break;
default:
g_warning ("gtk_arg_values_equal() used with unknown type `%s'", gtk_type_name (arg1->type));
equal = FALSE;
break;
}
return equal;
}
void
gtk_arg_to_valueloc (GtkArg *arg,
gpointer value_pointer)
{
GtkType fundamental_type;
g_return_if_fail (arg != NULL);
g_return_if_fail (value_pointer != NULL);
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
if (fundamental_type > GTK_TYPE_FUNDAMENTAL_LAST)
{
fundamental_type = gtk_type_get_varargs_type (fundamental_type);
if (!fundamental_type)
fundamental_type = GTK_FUNDAMENTAL_TYPE (arg->type);
}
switch (fundamental_type)
{
gchar *p_char;
guchar *p_uchar;
gboolean *p_boolean;
gint *p_int;
guint *p_uint;
glong *p_long;
gulong *p_ulong;
gfloat *p_float;
gdouble *p_double;
gpointer *p_pointer;
case GTK_TYPE_CHAR:
p_char = value_pointer;
*p_char = GTK_VALUE_CHAR (*arg);
break;
case GTK_TYPE_UCHAR:
p_uchar = value_pointer;
*p_uchar = GTK_VALUE_UCHAR (*arg);
break;
case GTK_TYPE_BOOL:
p_boolean = value_pointer;
*p_boolean = GTK_VALUE_BOOL (*arg);
break;
case GTK_TYPE_INT:
case GTK_TYPE_ENUM:
p_int = value_pointer;
*p_int = GTK_VALUE_INT (*arg);
break;
case GTK_TYPE_UINT:
case GTK_TYPE_FLAGS:
p_uint = value_pointer;
*p_uint = GTK_VALUE_UINT (*arg);
break;
case GTK_TYPE_LONG:
p_long = value_pointer;
*p_long = GTK_VALUE_LONG (*arg);
break;
case GTK_TYPE_ULONG:
p_ulong = value_pointer;
*p_ulong = GTK_VALUE_ULONG (*arg);
break;
case GTK_TYPE_FLOAT:
p_float = value_pointer;
*p_float = GTK_VALUE_FLOAT (*arg);
break;
case GTK_TYPE_DOUBLE:
p_double = value_pointer;
*p_double = GTK_VALUE_DOUBLE (*arg);
break;
case GTK_TYPE_STRING:
case GTK_TYPE_POINTER:
case GTK_TYPE_BOXED:
case GTK_TYPE_OBJECT:
p_pointer = value_pointer;
*p_pointer = GTK_VALUE_POINTER (*arg);
break;
case GTK_TYPE_SIGNAL:
case GTK_TYPE_ARGS:
case GTK_TYPE_FOREIGN:
case GTK_TYPE_CALLBACK:
case GTK_TYPE_C_CALLBACK:
case GTK_TYPE_NONE:
case GTK_TYPE_INVALID:
/* it doesn't make much sense to retrive these values,
* they either are always read-only args, or require
* multiple pointers.
*/
g_warning ("gtk_arg_fill_retloc(): unsupported argument type `%s'",
gtk_type_name (arg->type));
break;
}
}
+9 -4
View File
@@ -63,6 +63,9 @@ GtkArg* gtk_arg_copy (GtkArg *src_arg,
GtkArg *dest_arg);
void gtk_arg_free (GtkArg *arg,
gboolean free_contents);
void gtk_arg_reset (GtkArg *arg);
gboolean gtk_arg_values_equal (const GtkArg *arg1,
const GtkArg *arg2);
gchar* gtk_args_collect (GtkType object_type,
GHashTable *arg_info_hash_table,
GSList **arg_list_p,
@@ -87,10 +90,12 @@ GtkArg* gtk_args_query (GtkType class_type,
guint32 **arg_flags,
guint *n_args_p);
gchar* gtk_arg_name_strip_type (const gchar *arg_name);
gint gtk_arg_info_equal (gconstpointer arg_info_1,
gconstpointer arg_info_2);
guint gtk_arg_info_hash (gconstpointer arg_info);
gint gtk_arg_info_equal (gconstpointer arg_info_1,
gconstpointer arg_info_2);
guint gtk_arg_info_hash (gconstpointer arg_info);
void gtk_arg_to_valueloc (GtkArg *arg,
gpointer value_pointer);
+15 -15
View File
@@ -167,10 +167,13 @@ gtk_bin_draw (GtkWidget *widget,
g_return_if_fail (GTK_IS_BIN (widget));
bin = GTK_BIN (widget);
if (bin->child && GTK_WIDGET_VISIBLE (bin->child) &&
gtk_widget_intersect (bin->child, area, &child_area))
gtk_widget_draw (bin->child, &child_area);
if (GTK_WIDGET_DRAWABLE (bin))
{
if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
gtk_widget_intersect (bin->child, area, &child_area))
gtk_widget_draw (bin->child, &child_area);
}
}
static gint
@@ -189,7 +192,7 @@ gtk_bin_expose (GtkWidget *widget,
bin = GTK_BIN (widget);
child_event = *event;
if (bin->child &&
if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
GTK_WIDGET_NO_WINDOW (bin->child) &&
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
@@ -216,19 +219,16 @@ gtk_bin_add (GtkContainer *container,
gtk_widget_set_parent (child, GTK_WIDGET (bin));
bin->child = child;
if (GTK_WIDGET_VISIBLE (child->parent))
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_REALIZED (child->parent) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (child->parent) &&
!GTK_WIDGET_MAPPED (child))
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (child);
}
static void
+2 -1
View File
@@ -28,7 +28,7 @@
*/
#include <ctype.h>
#include <strings.h>
#include <string.h>
#include <stdarg.h>
#include "gtkbindings.h"
#include "gtksignal.h"
@@ -1136,6 +1136,7 @@ gtk_pattern_spec_init (GtkPatternSpec *pspec,
t = pspec->pattern_reversed;
pspec->pattern_reversed = g_strdup (p);
g_free (t);
g_free (pspec->pattern);
pspec->pattern = g_strdup (pspec->pattern_reversed);
g_strreverse (pspec->pattern);
pspec->pattern_length = strlen (pspec->pattern);
+18 -22
View File
@@ -341,20 +341,17 @@ gtk_box_pack_start (GtkBox *box,
box->children = g_list_append (box->children, child_info);
gtk_widget_set_parent (child, GTK_WIDGET (box));
if (GTK_WIDGET_REALIZED (box))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (box)))
if (GTK_WIDGET_VISIBLE (box) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_REALIZED (GTK_WIDGET (box)) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (GTK_WIDGET (box)) &&
!GTK_WIDGET_MAPPED (child))
if (GTK_WIDGET_MAPPED (box))
gtk_widget_map (child);
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
gtk_widget_queue_resize (child);
gtk_widget_queue_resize (child);
}
}
void
@@ -382,19 +379,16 @@ gtk_box_pack_end (GtkBox *box,
gtk_widget_set_parent (child, GTK_WIDGET (box));
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (box)))
if (GTK_WIDGET_REALIZED (box))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (box) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_REALIZED (GTK_WIDGET (box)) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (GTK_WIDGET (box)) &&
!GTK_WIDGET_MAPPED (child))
if (GTK_WIDGET_MAPPED (box))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
gtk_widget_queue_resize (child);
}
void
@@ -660,7 +654,8 @@ gtk_box_draw (GtkWidget *widget,
child = children->data;
children = children->next;
if (gtk_widget_intersect (child->widget, area, &child_area))
if (GTK_WIDGET_DRAWABLE (child->widget) &&
gtk_widget_intersect (child->widget, area, &child_area))
gtk_widget_draw (child->widget, &child_area);
}
}
@@ -691,7 +686,8 @@ gtk_box_expose (GtkWidget *widget,
child = children->data;
children = children->next;
if (GTK_WIDGET_NO_WINDOW (child->widget) &&
if (GTK_WIDGET_DRAWABLE (child->widget) &&
GTK_WIDGET_NO_WINDOW (child->widget) &&
gtk_widget_intersect (child->widget, &event->area, &child_event.area))
gtk_widget_event (child->widget, (GdkEvent*) &child_event);
}
+1 -1
View File
@@ -646,7 +646,7 @@ static gint
gtk_button_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkButton *bin;
GtkBin *bin;
GdkEventExpose child_event;
g_return_val_if_fail (widget != NULL, FALSE);
+274 -214
View File
@@ -39,7 +39,7 @@
#define MAX_BUTTON 5
/* the number rows memchunk expands at a time */
#define CLIST_OPTIMUM_SIZE 512
#define CLIST_OPTIMUM_SIZE 64
/* the width of the column resize windows */
#define DRAG_WIDTH 6
@@ -438,11 +438,18 @@ static GList *gtk_clist_mergesort (GtkCList *clist,
GList *list,
gint num);
/* Misc */
static gboolean title_focus (GtkCList *clist,
gint dir);
static void real_row_move (GtkCList *clist,
gint source_row,
gint dest_row);
static gboolean title_focus (GtkCList *clist,
gint dir);
static void real_row_move (GtkCList *clist,
gint source_row,
gint dest_row);
static gint column_title_passive_func (GtkWidget *widget,
GdkEvent *event,
gpointer data);
static void drag_dest_cell (GtkCList *clist,
gint x,
gint y,
GtkCListDestInfo *dest_info);
@@ -1296,39 +1303,49 @@ gtk_clist_column_title_active (GtkCList *clist,
if (column < 0 || column >= clist->columns)
return;
if (!clist->column[column].button)
if (!clist->column[column].button || !clist->column[column].button_passive)
return;
if (!GTK_WIDGET_SENSITIVE (clist->column[column].button) ||
!GTK_WIDGET_CAN_FOCUS (clist->column[column].button))
{
GTK_WIDGET_SET_FLAGS (clist->column[column].button,
GTK_SENSITIVE | GTK_CAN_FOCUS);
if (GTK_WIDGET_VISIBLE (clist))
gtk_widget_queue_draw (clist->column[column].button);
}
clist->column[column].button_passive = FALSE;
gtk_signal_disconnect_by_func (GTK_OBJECT (clist->column[column].button),
(GtkSignalFunc) column_title_passive_func,
NULL);
GTK_WIDGET_SET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
if (GTK_WIDGET_VISIBLE (clist))
gtk_widget_queue_draw (clist->column[column].button);
}
void
gtk_clist_column_title_passive (GtkCList *clist,
gint column)
{
GtkButton *button;
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
if (column < 0 || column >= clist->columns)
return;
if (!clist->column[column].button)
if (!clist->column[column].button || clist->column[column].button_passive)
return;
if (GTK_WIDGET_SENSITIVE (clist->column[column].button) ||
GTK_WIDGET_CAN_FOCUS (clist->column[column].button))
{
GTK_WIDGET_UNSET_FLAGS (clist->column[column].button,
GTK_SENSITIVE | GTK_CAN_FOCUS);
if (GTK_WIDGET_VISIBLE (clist))
gtk_widget_queue_draw (clist->column[column].button);
}
button = GTK_BUTTON (clist->column[column].button);
clist->column[column].button_passive = TRUE;
if (button->button_down)
gtk_button_released (button);
if (button->in_button)
gtk_button_leave (button);
gtk_signal_connect (GTK_OBJECT (clist->column[column].button), "event",
(GtkSignalFunc) column_title_passive_func, NULL);
GTK_WIDGET_UNSET_FLAGS (clist->column[column].button, GTK_CAN_FOCUS);
if (GTK_WIDGET_VISIBLE (clist))
gtk_widget_queue_draw (clist->column[column].button);
}
void
@@ -1764,6 +1781,7 @@ gtk_clist_set_column_max_width (GtkCList *clist,
* new_column_width
* column_button_create
* column_button_clicked
* column_title_passive_func
*/
static void
column_auto_resize (GtkCList *clist,
@@ -2079,7 +2097,6 @@ column_button_create (GtkCList *clist,
gtk_signal_connect (GTK_OBJECT (button), "clicked",
(GtkSignalFunc) column_button_clicked,
(gpointer) clist);
gtk_widget_show (button);
}
@@ -2103,84 +2120,29 @@ column_button_clicked (GtkWidget *widget,
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[CLICK_COLUMN], i);
}
void
gtk_clist_set_row_height (GtkCList *clist,
guint height)
static gint
column_title_passive_func (GtkWidget *widget,
GdkEvent *event,
gpointer data)
{
GtkWidget *widget;
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
widget = GTK_WIDGET (clist);
if (height > 0)
g_return_val_if_fail (event != NULL, FALSE);
switch (event->type)
{
clist->row_height = height;
GTK_CLIST_SET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
case GDK_MOTION_NOTIFY:
case GDK_BUTTON_PRESS:
case GDK_2BUTTON_PRESS:
case GDK_3BUTTON_PRESS:
case GDK_BUTTON_RELEASE:
case GDK_ENTER_NOTIFY:
case GDK_LEAVE_NOTIFY:
return TRUE;
default:
break;
}
else
{
GTK_CLIST_UNSET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
clist->row_height = 0;
}
if (GTK_WIDGET_REALIZED (clist))
{
if (!GTK_CLIST_ROW_HEIGHT_SET(clist))
{
clist->row_height = (widget->style->font->ascent +
widget->style->font->descent + 1);
clist->row_center_offset = widget->style->font->ascent + 1.5;
}
else
clist->row_center_offset = 1.5 + (clist->row_height +
widget->style->font->ascent -
widget->style->font->descent - 1) / 2;
}
CLIST_REFRESH (clist);
return FALSE;
}
void
gtk_clist_moveto (GtkCList *clist,
gint row,
gint column,
gfloat row_align,
gfloat col_align)
{
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
if (row < -1 || row >= clist->rows)
return;
if (column < -1 || column >= clist->columns)
return;
row_align = CLAMP (row_align, 0, 1);
col_align = CLAMP (col_align, 0, 1);
/* adjust horizontal scrollbar */
if (clist->hadjustment && column >= 0)
{
gint x;
x = (COLUMN_LEFT (clist, column) - CELL_SPACING - COLUMN_INSET -
(col_align * (clist->clist_window_width - 2 * COLUMN_INSET -
CELL_SPACING - clist->column[column].area.width)));
if (x < 0)
gtk_adjustment_set_value (clist->hadjustment, 0.0);
else if (x > LIST_WIDTH (clist) - clist->clist_window_width)
gtk_adjustment_set_value
(clist->hadjustment, LIST_WIDTH (clist) - clist->clist_window_width);
else
gtk_adjustment_set_value (clist->hadjustment, x);
}
/* adjust vertical scrollbar */
if (clist->vadjustment && row >= 0)
move_vertical (clist, row, row_align);
}
/* PUBLIC CELL FUNCTIONS
* gtk_clist_get_cell_type
@@ -2413,7 +2375,7 @@ gtk_clist_set_shift (GtkCList *clist,
gint vertical,
gint horizontal)
{
GtkRequisition requisition;
GtkRequisition requisition = { 0 };
GtkCListRow *clist_row;
g_return_if_fail (clist != NULL);
@@ -2934,6 +2896,8 @@ real_row_move (GtkCList *clist,
}
/* PUBLIC ROW FUNCTIONS
* gtk_clist_moveto
* gtk_clist_set_row_height
* gtk_clist_set_row_data
* gtk_clist_set_row_data_full
* gtk_clist_get_row_data
@@ -2944,6 +2908,85 @@ real_row_move (GtkCList *clist,
* gtk_clist_set_foreground
* gtk_clist_set_background
*/
void
gtk_clist_moveto (GtkCList *clist,
gint row,
gint column,
gfloat row_align,
gfloat col_align)
{
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
if (row < -1 || row >= clist->rows)
return;
if (column < -1 || column >= clist->columns)
return;
row_align = CLAMP (row_align, 0, 1);
col_align = CLAMP (col_align, 0, 1);
/* adjust horizontal scrollbar */
if (clist->hadjustment && column >= 0)
{
gint x;
x = (COLUMN_LEFT (clist, column) - CELL_SPACING - COLUMN_INSET -
(col_align * (clist->clist_window_width - 2 * COLUMN_INSET -
CELL_SPACING - clist->column[column].area.width)));
if (x < 0)
gtk_adjustment_set_value (clist->hadjustment, 0.0);
else if (x > LIST_WIDTH (clist) - clist->clist_window_width)
gtk_adjustment_set_value
(clist->hadjustment, LIST_WIDTH (clist) - clist->clist_window_width);
else
gtk_adjustment_set_value (clist->hadjustment, x);
}
/* adjust vertical scrollbar */
if (clist->vadjustment && row >= 0)
move_vertical (clist, row, row_align);
}
void
gtk_clist_set_row_height (GtkCList *clist,
guint height)
{
GtkWidget *widget;
g_return_if_fail (clist != NULL);
g_return_if_fail (GTK_IS_CLIST (clist));
widget = GTK_WIDGET (clist);
if (height > 0)
{
clist->row_height = height;
GTK_CLIST_SET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
}
else
{
GTK_CLIST_UNSET_FLAG (clist, CLIST_ROW_HEIGHT_SET);
clist->row_height = 0;
}
if (GTK_WIDGET_REALIZED (clist))
{
if (!GTK_CLIST_ROW_HEIGHT_SET(clist))
{
clist->row_height = (widget->style->font->ascent +
widget->style->font->descent + 1);
clist->row_center_offset = widget->style->font->ascent + 1.5;
}
else
clist->row_center_offset = 1.5 + (clist->row_height +
widget->style->font->ascent -
widget->style->font->descent - 1) / 2;
}
CLIST_REFRESH (clist);
}
void
gtk_clist_set_row_data (GtkCList *clist,
gint row,
@@ -3152,7 +3195,7 @@ gtk_clist_set_cell_style (GtkCList *clist,
gint column,
GtkStyle *style)
{
GtkRequisition requisition;
GtkRequisition requisition = { 0 };
GtkCListRow *clist_row;
g_return_if_fail (clist != NULL);
@@ -3827,8 +3870,11 @@ real_undo_selection (GtkCList *clist)
GPOINTER_TO_INT (work->data), -1, NULL);
for (work = clist->undo_unselection; work; work = work->next)
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNSELECT_ROW],
GPOINTER_TO_INT (work->data), -1, NULL);
{
g_print ("unselect %d\n",GPOINTER_TO_INT (work->data));
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNSELECT_ROW],
GPOINTER_TO_INT (work->data), -1, NULL);
}
if (GTK_WIDGET_HAS_FOCUS(clist) && clist->focus_row != clist->undo_anchor)
{
@@ -3984,9 +4030,9 @@ resync_selection (GtkCList *clist,
}
}
}
for (list = g_list_reverse (clist->undo_unselection); list;
list = list->next)
clist->undo_unselection = g_list_reverse (clist->undo_unselection);
for (list = clist->undo_unselection; list; list = list->next)
gtk_signal_emit (GTK_OBJECT (clist), clist_signals[SELECT_ROW],
GPOINTER_TO_INT (list->data), -1, event);
@@ -4517,8 +4563,12 @@ gtk_clist_unrealize (GtkWidget *widget)
/* freeze the list */
clist->freeze_count++;
/* detach optional row/cell styles */
if (GTK_WIDGET_MAPPED (widget))
gtk_clist_unmap (widget);
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
/* detach optional row/cell styles */
if (GTK_WIDGET_REALIZED (widget))
{
GtkCListRow *clist_row;
@@ -4545,12 +4595,16 @@ gtk_clist_unrealize (GtkWidget *widget)
gdk_gc_destroy (clist->bg_gc);
for (i = 0; i < clist->columns; i++)
if (clist->column[i].window)
{
gdk_window_set_user_data (clist->column[i].window, NULL);
gdk_window_destroy (clist->column[i].window);
clist->column[i].window = NULL;
}
{
if (clist->column[i].button)
gtk_widget_unrealize (clist->column[i].button);
if (clist->column[i].window)
{
gdk_window_set_user_data (clist->column[i].window, NULL);
gdk_window_destroy (clist->column[i].window);
clist->column[i].window = NULL;
}
}
gdk_window_set_user_data (clist->clist_window, NULL);
gdk_window_destroy (clist->clist_window);
@@ -4586,10 +4640,12 @@ gtk_clist_map (GtkWidget *widget)
/* map column buttons */
for (i = 0; i < clist->columns; i++)
if (clist->column[i].button &&
GTK_WIDGET_VISIBLE (clist->column[i].button) &&
!GTK_WIDGET_MAPPED (clist->column[i].button))
gtk_widget_map (clist->column[i].button);
{
if (clist->column[i].button &&
GTK_WIDGET_VISIBLE (clist->column[i].button) &&
!GTK_WIDGET_MAPPED (clist->column[i].button))
gtk_widget_map (clist->column[i].button);
}
for (i = 0; i < clist->columns; i++)
if (clist->column[i].window && clist->column[i].button)
@@ -4699,7 +4755,7 @@ gtk_clist_draw (GtkWidget *widget,
(2 * widget->style->klass->ythickness) +
clist->column_title_area.height);
gdk_window_clear_area (clist->clist_window, 0, 0, -1, -1);
gdk_window_clear_area (clist->clist_window, 0, 0, 0, 0);
draw_rows (clist, NULL);
for (i = 0; i < clist->columns; i++)
@@ -5107,6 +5163,7 @@ gtk_clist_button_release (GtkWidget *widget,
{
case GTK_SELECTION_EXTENDED:
if (!(event->state & GDK_SHIFT_MASK) ||
!GTK_WIDGET_CAN_FOCUS (widget) ||
event->x < 0 || event->x >= clist->clist_window_width ||
event->y < 0 || event->y >= clist->clist_window_height)
GTK_CLIST_CLASS_FW (clist)->resync_selection
@@ -5891,8 +5948,8 @@ draw_rows (GtkCList *clist,
}
if (!area)
gdk_window_clear_area (clist->clist_window,
0, ROW_TOP_YPIXEL (clist, i), -1, -1);
gdk_window_clear_area (clist->clist_window, 0,
ROW_TOP_YPIXEL (clist, i), 0, 0);
}
static void
@@ -6356,6 +6413,7 @@ columns_new (GtkCList *clist)
column[i].width_set = FALSE;
column[i].resizeable = TRUE;
column[i].auto_resize = FALSE;
column[i].button_passive = FALSE;
column[i].justification = GTK_JUSTIFY_LEFT;
}
@@ -7038,19 +7096,14 @@ move_vertical (GtkCList *clist,
static gint
horizontal_timeout (GtkCList *clist)
{
gint x, y;
GdkEventMotion event;
GdkModifierType mask;
GdkEventMotion event = { 0 };
GDK_THREADS_ENTER ();
clist->htimer = 0;
gdk_window_get_pointer (clist->clist_window, &x, &y, &mask);
event.is_hint = 0;
event.x = x;
event.y = y;
event.state = mask;
event.type = GDK_MOTION_NOTIFY;
event.send_event = TRUE;
gtk_clist_motion (GTK_WIDGET (clist), &event);
@@ -7062,19 +7115,14 @@ horizontal_timeout (GtkCList *clist)
static gint
vertical_timeout (GtkCList *clist)
{
gint x, y;
GdkEventMotion event;
GdkModifierType mask;
GdkEventMotion event = { 0 };
GDK_THREADS_ENTER ();
clist->vtimer = 0;
gdk_window_get_pointer (clist->clist_window, &x, &y, &mask);
event.is_hint = 0;
event.x = x;
event.y = y;
event.state = mask;
event.type = GDK_MOTION_NOTIFY;
event.send_event = TRUE;
gtk_clist_motion (GTK_WIDGET (clist), &event);
@@ -7369,6 +7417,62 @@ drag_dest_info_destroy (gpointer data)
g_free (info);
}
static void
drag_dest_cell (GtkCList *clist,
gint x,
gint y,
GtkCListDestInfo *dest_info)
{
GtkWidget *widget;
widget = GTK_WIDGET (clist);
dest_info->insert_pos = GTK_CLIST_DRAG_NONE;
y -= (GTK_CONTAINER (clist)->border_width +
widget->style->klass->ythickness +
clist->column_title_area.height);
dest_info->cell.row = ROW_FROM_YPIXEL (clist, y);
if (dest_info->cell.row >= clist->rows)
{
dest_info->cell.row = clist->rows - 1;
y = ROW_TOP_YPIXEL (clist, dest_info->cell.row) + clist->row_height;
}
if (dest_info->cell.row < -1)
dest_info->cell.row = -1;
x -= GTK_CONTAINER (widget)->border_width + widget->style->klass->xthickness;
dest_info->cell.column = COLUMN_FROM_XPIXEL (clist, x);
if (dest_info->cell.row >= 0)
{
gint y_delta;
gint h = 0;
y_delta = y - ROW_TOP_YPIXEL (clist, dest_info->cell.row);
if (GTK_CLIST_DRAW_DRAG_RECT(clist))
{
dest_info->insert_pos = GTK_CLIST_DRAG_INTO;
h = clist->row_height / 4;
}
else if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
dest_info->insert_pos = GTK_CLIST_DRAG_BEFORE;
h = clist->row_height / 2;
}
if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
if (y_delta < h)
dest_info->insert_pos = GTK_CLIST_DRAG_BEFORE;
else if (clist->row_height - y_delta < h)
dest_info->insert_pos = GTK_CLIST_DRAG_AFTER;
}
}
}
static void
gtk_clist_drag_begin (GtkWidget *widget,
GdkDragContext *context)
@@ -7486,56 +7590,14 @@ gtk_clist_drag_motion (GtkWidget *widget,
guint time)
{
GtkCList *clist;
gint row, column;
GtkCListDestInfo new_info;
GtkCListDestInfo *dest_info;
gint h = 0;
gint insert_pos = GTK_CLIST_DRAG_NONE;
gint y_delta;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_CLIST (widget), FALSE);
clist = GTK_CLIST (widget);
y -= (GTK_CONTAINER (widget)->border_width +
widget->style->klass->ythickness + clist->column_title_area.height);
row = ROW_FROM_YPIXEL (clist, y);
if (row >= clist->rows)
{
row = clist->rows - 1;
y = ROW_TOP_YPIXEL (clist, row) + clist->row_height;
}
if (row < -1)
row = -1;
x -= GTK_CONTAINER (widget)->border_width + widget->style->klass->xthickness;
column = COLUMN_FROM_XPIXEL (clist, x);
if (row >= 0)
{
y_delta = y - ROW_TOP_YPIXEL (clist, row);
if (GTK_CLIST_DRAW_DRAG_RECT(clist))
{
insert_pos = GTK_CLIST_DRAG_INTO;
h = clist->row_height / 4;
}
else if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
insert_pos = GTK_CLIST_DRAG_BEFORE;
h = clist->row_height / 2;
}
if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
if (y_delta < h)
insert_pos = GTK_CLIST_DRAG_BEFORE;
else if (clist->row_height - y_delta < h)
insert_pos = GTK_CLIST_DRAG_AFTER;
}
}
dest_info = g_dataset_get_data (context, "gtk-clist-drag-dest");
if (!dest_info)
@@ -7550,6 +7612,8 @@ gtk_clist_drag_motion (GtkWidget *widget,
drag_dest_info_destroy);
}
drag_dest_cell (clist, x, y, &new_info);
if (GTK_CLIST_REORDERABLE (clist))
{
GList *list;
@@ -7566,12 +7630,12 @@ gtk_clist_drag_motion (GtkWidget *widget,
if (list)
{
if (gtk_drag_get_source_widget (context) != widget ||
insert_pos == GTK_CLIST_DRAG_NONE ||
row == clist->click_cell.row ||
(row == clist->click_cell.row - 1 &&
insert_pos == GTK_CLIST_DRAG_AFTER) ||
(row == clist->click_cell.row + 1 &&
insert_pos == GTK_CLIST_DRAG_BEFORE))
new_info.insert_pos == GTK_CLIST_DRAG_NONE ||
new_info.cell.row == clist->click_cell.row ||
(new_info.cell.row == clist->click_cell.row - 1 &&
new_info.insert_pos == GTK_CLIST_DRAG_AFTER) ||
(new_info.cell.row == clist->click_cell.row + 1 &&
new_info.insert_pos == GTK_CLIST_DRAG_BEFORE))
{
if (dest_info->cell.row < 0)
{
@@ -7581,9 +7645,9 @@ gtk_clist_drag_motion (GtkWidget *widget,
return TRUE;
}
if (row != dest_info->cell.row ||
(row == dest_info->cell.row &&
dest_info->insert_pos != insert_pos))
if (new_info.cell.row != dest_info->cell.row ||
(new_info.cell.row == dest_info->cell.row &&
dest_info->insert_pos != new_info.insert_pos))
{
if (dest_info->cell.row >= 0)
GTK_CLIST_CLASS_FW (clist)->draw_drag_highlight
@@ -7591,9 +7655,9 @@ gtk_clist_drag_motion (GtkWidget *widget,
dest_info->cell.row)->data,
dest_info->cell.row, dest_info->insert_pos);
dest_info->insert_pos = insert_pos;
dest_info->cell.row = row;
dest_info->cell.column = column;
dest_info->insert_pos = new_info.insert_pos;
dest_info->cell.row = new_info.cell.row;
dest_info->cell.column = new_info.cell.column;
GTK_CLIST_CLASS_FW (clist)->draw_drag_highlight
(clist, g_list_nth (clist->row_list,
@@ -7606,9 +7670,9 @@ gtk_clist_drag_motion (GtkWidget *widget,
}
}
dest_info->insert_pos = insert_pos;
dest_info->cell.row = row;
dest_info->cell.column = column;
dest_info->insert_pos = new_info.insert_pos;
dest_info->cell.row = new_info.cell.row;
dest_info->cell.column = new_info.cell.column;
return TRUE;
}
@@ -7666,22 +7730,21 @@ gtk_clist_drag_data_received (GtkWidget *widget,
selection_data->length == sizeof (GtkCListCellInfo))
{
GtkCListCellInfo *source_info;
GtkCListDestInfo *dest_info;
source_info = (GtkCListCellInfo *)(selection_data->data);
dest_info = g_dataset_get_data (context, "gtk-clist-drag-dest");
if (dest_info && source_info)
if (source_info)
{
if (dest_info->insert_pos == GTK_CLIST_DRAG_AFTER)
dest_info->cell.row++;
if (source_info->row < dest_info->cell.row)
dest_info->cell.row--;
GtkCListDestInfo dest_info;
drag_dest_cell (clist, x, y, &dest_info);
if (dest_info.insert_pos == GTK_CLIST_DRAG_AFTER)
dest_info.cell.row++;
if (source_info->row < dest_info.cell.row)
dest_info.cell.row--;
if (dest_info.cell.row != source_info->row)
gtk_clist_row_move (clist, source_info->row, dest_info.cell.row);
if (dest_info->cell.row != source_info->row)
gtk_clist_row_move (GTK_CLIST (widget),
source_info->row,
dest_info->cell.row);
g_dataset_remove_data (context, "gtk-clist-drag-dest");
}
}
@@ -7708,21 +7771,18 @@ gtk_clist_drag_data_get (GtkWidget *widget,
if (info)
{
GtkCListCellInfo *ret_info;
GtkCListCellInfo ret_info;
ret_info = g_new (GtkCListCellInfo, 1);
ret_info->row = info->row;
ret_info->column = info->column;
ret_info.row = info->row;
ret_info.column = info->column;
gtk_selection_data_set (selection_data,
selection_data->target,
GTK_TYPE_POINTER,
(guchar *) ret_info,
gtk_selection_data_set (selection_data, selection_data->target,
GTK_TYPE_POINTER, (guchar *) &ret_info,
sizeof (GtkCListCellInfo));
}
else
gtk_selection_data_set (selection_data, selection_data->target,
GTK_TYPE_POINTER, NULL, 0);
GTK_TYPE_POINTER, NULL, 0);
}
}
+5 -4
View File
@@ -330,10 +330,11 @@ struct _GtkCListColumn
gint max_width;
GtkJustification justification;
guint visible : 1;
guint width_set : 1;
guint resizeable : 1;
guint auto_resize : 1;
guint visible : 1;
guint width_set : 1;
guint resizeable : 1;
guint auto_resize : 1;
guint button_passive : 1;
};
struct _GtkCListRow
+4
View File
@@ -1145,10 +1145,14 @@ gtk_color_selection_wheel_timeout (GtkColorSelection *colorsel)
{
gint x, y;
GDK_THREADS_ENTER ();
gdk_window_get_pointer (colorsel->wheel_area->window, &x, &y, NULL);
gtk_color_selection_update_wheel (colorsel, x, y);
gtk_color_selection_color_changed (colorsel);
GDK_THREADS_LEAVE ();
return (TRUE);
}
+6
View File
@@ -264,6 +264,8 @@ gtk_container_add_with_args (GtkContainer *container,
gtk_widget_ref (GTK_WIDGET (container));
gtk_widget_ref (widget);
if (!GTK_OBJECT_CONSTRUCTED (widget))
gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
if (widget->parent)
@@ -322,6 +324,8 @@ gtk_container_addv (GtkContainer *container,
gtk_widget_ref (GTK_WIDGET (container));
gtk_widget_ref (widget);
if (!GTK_OBJECT_CONSTRUCTED (widget))
gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
if (widget->parent)
@@ -703,6 +707,8 @@ gtk_container_add (GtkContainer *container,
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (widget->parent == NULL);
if (!GTK_OBJECT_CONSTRUCTED (widget))
gtk_object_default_construct (GTK_OBJECT (widget));
gtk_signal_emit (GTK_OBJECT (container), container_signals[ADD], widget);
}
+93 -84
View File
@@ -294,6 +294,10 @@ static void gtk_ctree_drag_data_received (GtkWidget *widget,
guint info,
guint32 time);
static void remove_grab (GtkCList *clist);
static void drag_dest_cell (GtkCList *clist,
gint x,
gint y,
GtkCListDestInfo *dest_info);
enum
@@ -3065,24 +3069,7 @@ tree_delete (GtkCTree *ctree,
GtkCTreeNode *node,
gpointer data)
{
GtkCList *clist;
clist = GTK_CLIST (ctree);
if (GTK_CTREE_ROW (node)->row.state == GTK_STATE_SELECTED)
{
GList *work;
work = g_list_find (clist->selection, node);
if (work)
{
if (clist->selection_end && clist->selection_end == work)
clist->selection_end = clist->selection_end->prev;
clist->selection = g_list_remove_link (clist->selection, work);
g_list_free_1 (work);
}
}
tree_unselect (ctree, node, NULL);
row_delete (ctree, GTK_CTREE_ROW (node));
g_list_free_1 ((GList *)node);
}
@@ -5729,8 +5716,8 @@ resync_selection (GtkCList *clist, GdkEvent *event)
}
}
for (list = g_list_reverse (clist->undo_unselection); list;
list = list->next)
clist->undo_unselection = g_list_reverse (clist->undo_unselection);
for (list = clist->undo_unselection; list; list = list->next)
gtk_ctree_select (ctree, list->data);
clist->anchor = -1;
@@ -5860,6 +5847,63 @@ drag_dest_info_destroy (gpointer data)
g_free (info);
}
static void
drag_dest_cell (GtkCList *clist,
gint x,
gint y,
GtkCListDestInfo *dest_info)
{
GtkWidget *widget;
widget = GTK_WIDGET (clist);
dest_info->insert_pos = GTK_CLIST_DRAG_NONE;
y -= (GTK_CONTAINER (widget)->border_width +
widget->style->klass->ythickness + clist->column_title_area.height);
dest_info->cell.row = ROW_FROM_YPIXEL (clist, y);
if (dest_info->cell.row >= clist->rows)
{
dest_info->cell.row = clist->rows - 1;
y = ROW_TOP_YPIXEL (clist, dest_info->cell.row) + clist->row_height;
}
if (dest_info->cell.row < -1)
dest_info->cell.row = -1;
x -= GTK_CONTAINER (widget)->border_width + widget->style->klass->xthickness;
dest_info->cell.column = COLUMN_FROM_XPIXEL (clist, x);
if (dest_info->cell.row >= 0)
{
gint y_delta;
gint h = 0;
y_delta = y - ROW_TOP_YPIXEL (clist, dest_info->cell.row);
if (GTK_CLIST_DRAW_DRAG_RECT(clist) &&
!GTK_CTREE_ROW (g_list_nth (clist->row_list,
dest_info->cell.row))->is_leaf)
{
dest_info->insert_pos = GTK_CLIST_DRAG_INTO;
h = clist->row_height / 4;
}
else if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
dest_info->insert_pos = GTK_CLIST_DRAG_BEFORE;
h = clist->row_height / 2;
}
if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
if (y_delta < h)
dest_info->insert_pos = GTK_CLIST_DRAG_BEFORE;
else if (clist->row_height - y_delta < h)
dest_info->insert_pos = GTK_CLIST_DRAG_AFTER;
}
}
}
static void
gtk_ctree_drag_begin (GtkWidget *widget,
GdkDragContext *context)
@@ -5915,11 +5959,8 @@ gtk_ctree_drag_motion (GtkWidget *widget,
{
GtkCList *clist;
GtkCTree *ctree;
gint row, column;
GtkCListDestInfo new_info;
GtkCListDestInfo *dest_info;
gint h = 0;
gint insert_pos = GTK_CLIST_DRAG_NONE;
gint y_delta;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_CTREE (widget), FALSE);
@@ -5927,45 +5968,6 @@ gtk_ctree_drag_motion (GtkWidget *widget,
clist = GTK_CLIST (widget);
ctree = GTK_CTREE (widget);
y -= (GTK_CONTAINER (widget)->border_width +
widget->style->klass->ythickness + clist->column_title_area.height);
row = ROW_FROM_YPIXEL (clist, y);
if (row >= clist->rows)
{
row = clist->rows - 1;
y = ROW_TOP_YPIXEL (clist, row) + clist->row_height;
}
if (row < -1)
row = -1;
x -= GTK_CONTAINER (widget)->border_width + widget->style->klass->xthickness;
column = COLUMN_FROM_XPIXEL (clist, x);
if (row >= 0)
{
y_delta = y - ROW_TOP_YPIXEL (clist, row);
if (GTK_CLIST_DRAW_DRAG_RECT(clist))
{
insert_pos = GTK_CLIST_DRAG_INTO;
h = clist->row_height / 4;
}
else if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
insert_pos = GTK_CLIST_DRAG_BEFORE;
h = clist->row_height / 2;
}
if (GTK_CLIST_DRAW_DRAG_LINE(clist))
{
if (y_delta < h)
insert_pos = GTK_CLIST_DRAG_BEFORE;
else if (clist->row_height - y_delta < h)
insert_pos = GTK_CLIST_DRAG_AFTER;
}
}
dest_info = g_dataset_get_data (context, "gtk-clist-drag-dest");
if (!dest_info)
@@ -5980,6 +5982,8 @@ gtk_ctree_drag_motion (GtkWidget *widget,
drag_dest_info_destroy);
}
drag_dest_cell (clist, x, y, &new_info);
if (GTK_CLIST_REORDERABLE (clist))
{
GList *list;
@@ -6000,10 +6004,12 @@ gtk_ctree_drag_motion (GtkWidget *widget,
drag_source = GTK_CTREE_NODE (g_list_nth (clist->row_list,
clist->click_cell.row));
drag_target = GTK_CTREE_NODE (g_list_nth (clist->row_list, row));
drag_target = GTK_CTREE_NODE (g_list_nth (clist->row_list,
new_info.cell.row));
if (gtk_drag_get_source_widget (context) != widget ||
!check_drag (ctree, drag_source, drag_target, insert_pos))
!check_drag (ctree, drag_source, drag_target,
new_info.insert_pos))
{
if (dest_info->cell.row < 0)
{
@@ -6013,9 +6019,9 @@ gtk_ctree_drag_motion (GtkWidget *widget,
return TRUE;
}
if (row != dest_info->cell.row ||
(row == dest_info->cell.row &&
dest_info->insert_pos != insert_pos))
if (new_info.cell.row != dest_info->cell.row ||
(new_info.cell.row == dest_info->cell.row &&
dest_info->insert_pos != new_info.insert_pos))
{
if (dest_info->cell.row >= 0)
GTK_CLIST_CLASS_FW (clist)->draw_drag_highlight
@@ -6023,9 +6029,9 @@ gtk_ctree_drag_motion (GtkWidget *widget,
g_list_nth (clist->row_list, dest_info->cell.row)->data,
dest_info->cell.row, dest_info->insert_pos);
dest_info->insert_pos = insert_pos;
dest_info->cell.row = row;
dest_info->cell.column = column;
dest_info->insert_pos = new_info.insert_pos;
dest_info->cell.row = new_info.cell.row;
dest_info->cell.column = new_info.cell.column;
GTK_CLIST_CLASS_FW (clist)->draw_drag_highlight
(clist,
@@ -6038,9 +6044,9 @@ gtk_ctree_drag_motion (GtkWidget *widget,
}
}
dest_info->insert_pos = insert_pos;
dest_info->cell.row = row;
dest_info->cell.column = column;
dest_info->insert_pos = new_info.insert_pos;
dest_info->cell.row = new_info.cell.row;
dest_info->cell.column = new_info.cell.column;
return TRUE;
}
@@ -6072,45 +6078,48 @@ gtk_ctree_drag_data_received (GtkWidget *widget,
selection_data->length == sizeof (GtkCListCellInfo))
{
GtkCListCellInfo *source_info;
GtkCListDestInfo *dest_info;
source_info = (GtkCListCellInfo *)(selection_data->data);
dest_info = g_dataset_get_data (context, "gtk-clist-drag-dest");
if (dest_info && source_info)
if (source_info)
{
GtkCListDestInfo dest_info;
GtkCTreeNode *source_node;
GtkCTreeNode *dest_node;
drag_dest_cell (clist, x, y, &dest_info);
source_node = GTK_CTREE_NODE (g_list_nth (clist->row_list,
source_info->row));
dest_node = GTK_CTREE_NODE (g_list_nth (clist->row_list,
dest_info->cell.row));
dest_info.cell.row));
if (!source_info || !dest_info)
if (!source_node || !dest_node)
return;
switch (dest_info->insert_pos)
switch (dest_info.insert_pos)
{
case GTK_CLIST_DRAG_NONE:
break;
case GTK_CLIST_DRAG_INTO:
g_print ("drag into\n");
if (check_drag (ctree, source_node, dest_node,
dest_info->insert_pos))
dest_info.insert_pos))
gtk_ctree_move (ctree, source_node, dest_node,
GTK_CTREE_ROW (dest_node)->children);
g_dataset_remove_data (context, "gtk-clist-drag-dest");
break;
case GTK_CLIST_DRAG_BEFORE:
g_print ("drag before\n");
if (check_drag (ctree, source_node, dest_node,
dest_info->insert_pos))
dest_info.insert_pos))
gtk_ctree_move (ctree, source_node,
GTK_CTREE_ROW (dest_node)->parent, dest_node);
g_dataset_remove_data (context, "gtk-clist-drag-dest");
break;
case GTK_CLIST_DRAG_AFTER:
g_print ("drag after\n");
if (check_drag (ctree, source_node, dest_node,
dest_info->insert_pos))
dest_info.insert_pos))
gtk_ctree_move (ctree, source_node,
GTK_CTREE_ROW (dest_node)->parent,
GTK_CTREE_ROW (dest_node)->sibling);
+27 -11
View File
@@ -744,10 +744,10 @@ void
gtk_drag_highlight (GtkWidget *widget)
{
gtk_signal_connect_after (GTK_OBJECT (widget), "draw",
GTK_SIGNAL_FUNC (gtk_drag_highlight_expose),
GTK_SIGNAL_FUNC (gtk_drag_highlight_paint),
NULL);
gtk_signal_connect (GTK_OBJECT (widget), "expose_event",
GTK_SIGNAL_FUNC (gtk_drag_highlight_paint),
GTK_SIGNAL_FUNC (gtk_drag_highlight_expose),
NULL);
gtk_widget_queue_draw (widget);
@@ -953,7 +953,17 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
gint tx, ty;
if (event->type == GDK_DROP_START)
info->dropped = TRUE;
{
info->dropped = TRUE;
/* We send a leave here so that the widget unhighlights
* properly.
*/
if (info->widget)
{
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
info->widget = NULL;
}
}
gdk_window_get_origin (toplevel->window, &tx, &ty);
@@ -969,11 +979,7 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
gtk_drag_find_widget (toplevel, &data);
/* We send a leave here so that the widget unhighlights
* properly
*/
if (info->widget &&
((event->type == GDK_DROP_START) || (!data.found)))
if (info->widget && !data.found)
{
gtk_drag_dest_leave (info->widget, context, event->dnd.time);
info->widget = NULL;
@@ -986,7 +992,7 @@ gtk_drag_dest_handle_event (GtkWidget *toplevel,
if (!data.found)
gdk_drag_status (context, 0, event->dnd.time);
}
else if (event->type == GDK_DROP_START)
else if (event->type == GDK_DROP_START && !info->proxy_source)
{
gdk_drop_reply (context, data.found, event->dnd.time);
if ((context->protocol == GDK_DRAG_PROTO_MOTIF) && !data.found)
@@ -1332,7 +1338,7 @@ gtk_drag_dest_leave (GtkWidget *widget,
}
else
{
if (site->flags & GTK_DEST_DEFAULT_HIGHLIGHT)
if ((site->flags & GTK_DEST_DEFAULT_HIGHLIGHT) && site->have_drag)
gtk_drag_unhighlight (widget);
if (!(site->flags & GTK_DEST_DEFAULT_MOTION) || site->have_drag)
@@ -2032,8 +2038,14 @@ gtk_drag_source_handle_event (GtkWidget *widget,
{
if (info->proxy_dest->proxy_drop_wait)
{
gboolean result = context->action != 0;
/* Aha - we can finally pass the MOTIF DROP on... */
gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
gdk_drop_reply (info->proxy_dest->context, result, info->proxy_dest->proxy_drop_time);
if (result)
gdk_drag_drop (info->context, info->proxy_dest->proxy_drop_time);
else
gtk_drag_finish (info->proxy_dest->context, FALSE, FALSE, info->proxy_dest->proxy_drop_time);
}
else
{
@@ -2654,11 +2666,15 @@ gtk_drag_abort_timeout (gpointer data)
GtkDragSourceInfo *info = data;
guint32 time = GDK_CURRENT_TIME;
GDK_THREADS_ENTER ();
if (info->proxy_dest)
time = info->proxy_dest->proxy_drop_time;
info->drop_timeout = 0;
gtk_drag_drop_finished (info, FALSE, time);
GDK_THREADS_LEAVE ();
return FALSE;
}
+5 -4
View File
@@ -35,10 +35,10 @@ static void gtk_drawing_area_size_allocate (GtkWidget *widget,
static void gtk_drawing_area_send_configure (GtkDrawingArea *darea);
guint
GtkType
gtk_drawing_area_get_type (void)
{
static guint drawing_area_type = 0;
static GtkType drawing_area_type = 0;
if (!drawing_area_type)
{
@@ -54,7 +54,7 @@ gtk_drawing_area_get_type (void)
(GtkClassInitFunc) NULL,
};
drawing_area_type = gtk_type_unique (gtk_widget_get_type (), &drawing_area_info);
drawing_area_type = gtk_type_unique (GTK_TYPE_WIDGET, &drawing_area_info);
}
return drawing_area_type;
@@ -65,7 +65,7 @@ gtk_drawing_area_class_init (GtkDrawingAreaClass *class)
{
GtkWidgetClass *widget_class;
widget_class = (GtkWidgetClass*) class;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->realize = gtk_drawing_area_realize;
widget_class->size_allocate = gtk_drawing_area_size_allocate;
@@ -160,6 +160,7 @@ gtk_drawing_area_send_configure (GtkDrawingArea *darea)
event.type = GDK_CONFIGURE;
event.window = widget->window;
event.send_event = TRUE;
event.x = widget->allocation.x;
event.y = widget->allocation.y;
event.width = widget->allocation.width;
+6 -4
View File
@@ -37,9 +37,11 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_DRAWING_AREA(obj) GTK_CHECK_CAST (obj, gtk_drawing_area_get_type (), GtkDrawingArea)
#define GTK_DRAWING_AREA_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_drawing_area_get_type (), GtkDrawingAreaClass)
#define GTK_IS_DRAWING_AREA(obj) GTK_CHECK_TYPE (obj, gtk_drawing_area_get_type ())
#define GTK_TYPE_DRAWING_AREA (gtk_drawing_area_get_type ())
#define GTK_DRAWING_AREA(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_DRAWING_AREA, GtkDrawingArea))
#define GTK_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_DRAWING_AREA, GtkDrawingAreaClass))
#define GTK_IS_DRAWING_AREA(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_DRAWING_AREA))
#define GTK_IS_DRAWING_AREA_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DRAWING_AREA))
typedef struct _GtkDrawingArea GtkDrawingArea;
@@ -58,7 +60,7 @@ struct _GtkDrawingAreaClass
};
guint gtk_drawing_area_get_type (void);
GtkType gtk_drawing_area_get_type (void);
GtkWidget* gtk_drawing_area_new (void);
void gtk_drawing_area_size (GtkDrawingArea *darea,
gint width,
+9 -1
View File
@@ -186,6 +186,7 @@ gtk_editable_class_init (GtkEditableClass *class)
GTK_SIGNAL_OFFSET (GtkEditableClass, activate),
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
widget_class->activate_signal = editable_signals[ACTIVATE];
editable_signals[SET_EDITABLE] =
gtk_signal_new ("set-editable",
@@ -416,13 +417,14 @@ gtk_editable_insert_text (GtkEditable *editable,
gint *position)
{
GtkEditableClass *klass;
gchar buf[64];
gchar *text;
g_return_if_fail (editable != NULL);
g_return_if_fail (GTK_IS_EDITABLE (editable));
gtk_widget_ref (GTK_WIDGET (editable));
klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
if (new_text_length <= 64)
@@ -437,6 +439,8 @@ gtk_editable_insert_text (GtkEditable *editable,
if (new_text_length > 64)
g_free (text);
gtk_widget_unref (GTK_WIDGET (editable));
}
void
@@ -449,10 +453,14 @@ gtk_editable_delete_text (GtkEditable *editable,
g_return_if_fail (editable != NULL);
g_return_if_fail (GTK_IS_EDITABLE (editable));
gtk_widget_ref (GTK_WIDGET (editable));
klass = GTK_EDITABLE_CLASS (GTK_OBJECT (editable)->klass);
gtk_signal_emit (GTK_OBJECT (editable), editable_signals[DELETE_TEXT], start_pos, end_pos);
gtk_signal_emit (GTK_OBJECT (editable), editable_signals[CHANGED]);
gtk_widget_unref (GTK_WIDGET (editable));
}
static void
+4 -1
View File
@@ -53,16 +53,19 @@ struct _GtkEditable
{
GtkWidget widget;
/*< public >*/
guint current_pos;
guint selection_start_pos;
guint selection_end_pos;
guint has_selection : 1;
/*< private >*/
guint editable : 1;
guint visible : 1;
GdkIC *ic;
GdkICAttr *ic_attr;
gchar *clipboard_text;
};
+10 -5
View File
@@ -1115,7 +1115,7 @@ gtk_entry_key_press (GtkWidget *widget,
break;
case GDK_Return:
return_val = TRUE;
gtk_signal_emit_by_name (GTK_OBJECT (entry), "activate");
gtk_widget_activate (widget);
break;
/* The next two keys should not be inserted literally. Any others ??? */
case GDK_Tab:
@@ -1477,10 +1477,15 @@ gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable)
*/
if ((editable->current_pos < entry->text_length) &&
(editable->selection_start_pos == editable->selection_end_pos))
gdk_draw_text_wc (drawable, widget->style->font,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
xoffset, yoffset,
entry->text + editable->current_pos, 1);
{
GdkWChar c = editable->visible ?
*(entry->text + editable->current_pos) :
'*';
gdk_draw_text_wc (drawable, widget->style->font,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
xoffset, yoffset, &c, 1);
}
}
+6
View File
@@ -32,6 +32,12 @@ extern "C" {
#define GTK_MICRO_VERSION (@GTK_MICRO_VERSION@)
#define GTK_BINARY_AGE (@GTK_BINARY_AGE@)
#define GTK_INTERFACE_AGE (@GTK_INTERFACE_AGE@)
#define GTK_CHECK_VERSION(major,minor,micro) \
(GTK_MAJOR_VERSION > (major) || \
(GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION > (minor)) || \
(GTK_MAJOR_VERSION == (major) && GTK_MINOR_VERSION == (minor) && \
GTK_MICRO_VERSION >= (micro)))
/* new gtk_container_set_focus_[hv]adjustment()
*/
+8 -6
View File
@@ -150,14 +150,16 @@ gtk_fixed_put (GtkFixed *fixed,
fixed->children = g_list_append (fixed->children, child_info);
if (GTK_WIDGET_REALIZED (fixed) && !GTK_WIDGET_REALIZED (widget))
if (GTK_WIDGET_REALIZED (fixed))
gtk_widget_realize (widget);
if (GTK_WIDGET_MAPPED (fixed) && !GTK_WIDGET_MAPPED (widget))
gtk_widget_map (widget);
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (fixed))
gtk_widget_queue_resize (GTK_WIDGET (fixed));
if (GTK_WIDGET_VISIBLE (fixed) && GTK_WIDGET_VISIBLE (widget))
{
if (GTK_WIDGET_MAPPED (fixed))
gtk_widget_map (widget);
gtk_widget_queue_resize (GTK_WIDGET (fixed));
}
}
void
+18 -26
View File
@@ -1440,19 +1440,21 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel)
can_match = TRUE;
if (nbitmapped_sizes)
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
{
if (*bitmapped_sizes % 10 != 0)
can_match = FALSE;
bitmap_size = *bitmapped_sizes / 10;
bitmap_size_float = *bitmapped_sizes / 10;
}
else
{
bitmap_size = *bitmapped_sizes;
bitmap_size_float = *bitmapped_sizes;
}
{
if (fontsel->metric == GTK_FONT_METRIC_POINTS)
{
if (*bitmapped_sizes % 10 != 0)
can_match = FALSE;
bitmap_size = *bitmapped_sizes / 10;
bitmap_size_float = *bitmapped_sizes / 10;
}
else
{
bitmap_size = *bitmapped_sizes;
bitmap_size_float = *bitmapped_sizes;
}
}
if (can_match && nstandard_sizes && nbitmapped_sizes
&& *standard_sizes == bitmap_size)
{
@@ -3373,7 +3375,6 @@ gtk_font_selection_create_xlfd (gint size,
{
gchar buffer[16];
gchar *pixel_size = "*", *point_size = "*", *fontname;
gint length;
if (size <= 0)
return NULL;
@@ -3384,18 +3385,9 @@ gtk_font_selection_create_xlfd (gint size,
else
point_size = buffer;
/* Note: be careful here - don't overrun the allocated memory. */
length = strlen(foundry) + strlen(family) + strlen(weight) + strlen(slant)
+ strlen(set_width) + strlen(pixel_size) + strlen(point_size)
+ strlen(spacing) + strlen(charset)
+ 1 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 3
+ 1 /* for the terminating '\0'. */;
fontname = g_new(gchar, length);
/* **NOTE**: If you change this string please change length above! */
sprintf(fontname, "-%s-%s-%s-%s-%s-*-%s-%s-*-*-%s-*-%s",
foundry, family, weight, slant, set_width, pixel_size,
point_size, spacing, charset);
fontname = g_strdup_printf("-%s-%s-%s-%s-%s-*-%s-%s-*-*-%s-*-%s",
foundry, family, weight, slant, set_width,
pixel_size, point_size, spacing, charset);
return fontname;
}
+6 -2
View File
@@ -690,7 +690,7 @@ draw_textured_frame (GtkWidget *widget, GdkWindow *window, GdkRectangle *rect, G
GdkRectangle *clip)
{
gtk_paint_handle(widget->style, window, GTK_STATE_NORMAL, shadow,
NULL, widget, "handlebox",
clip, widget, "handlebox",
rect->x, rect->y, rect->width, rect->height,
GTK_ORIENTATION_VERTICAL);
}
@@ -740,6 +740,7 @@ gtk_handle_box_paint (GtkWidget *widget,
guint width;
guint height;
GdkRectangle rect;
GdkRectangle dest;
bin = GTK_BIN (widget);
hb = GTK_HANDLE_BOX (widget);
@@ -797,7 +798,10 @@ gtk_handle_box_paint (GtkWidget *widget,
break;
}
draw_textured_frame (widget, hb->bin_window, &rect, GTK_SHADOW_OUT, event ? &event->area : area);
if (gdk_rectangle_intersect (event ? &event->area : area, &rect, &dest))
draw_textured_frame (widget, hb->bin_window, &rect,
GTK_SHADOW_OUT,
event ? &event->area : area);
if (bin->child && GTK_WIDGET_VISIBLE (bin->child))
{
+2 -2
View File
@@ -278,8 +278,8 @@ gtk_hscale_draw (GtkWidget *widget,
gtk_hscale_pos_trough (GTK_HSCALE (widget), &x, &y, &width, &height);
tmp_area.x = x;
tmp_area.y = y;
tmp_area.x = x + widget->allocation.x;
tmp_area.y = y + widget->allocation.y;
tmp_area.width = width;
tmp_area.height = height;
+270 -249
View File
@@ -53,7 +53,6 @@
/* --- structures --- */
typedef struct _GtkIFCBData GtkIFCBData;
typedef struct _GtkIFActionLink GtkIFActionLink;
typedef struct _GtkIFDumpData GtkIFDumpData;
struct _GtkIFCBData
{
@@ -62,11 +61,6 @@ struct _GtkIFCBData
gpointer func_data;
guint callback_action;
};
struct _GtkIFActionLink
{
GtkWidget *widget;
guint callback_action;
};
struct _GtkIFDumpData
{
GtkPrintFunc print_func;
@@ -89,31 +83,20 @@ static GtkObjectClass *parent_class = NULL;
static const gchar *item_factory_string = "Gtk-<ItemFactory>";
static GMemChunk *ifactory_item_chunks = NULL;
static GMemChunk *ifactory_cb_data_chunks = NULL;
static const gchar *key_popup_data = "GtkItemFactory-popup-data";
static GQuark quark_popup_data = 0;
static const gchar *key_if_menu_pos = "GtkItemFactory-menu-position";
static GQuark quark_if_menu_pos = 0;
static const gchar *key_item_factory = "GtkItemFactory";
static GQuark quark_item_factory = 0;
static const gchar *key_item_factory_path = "GtkItemFactory-path";
static GQuark quark_item_factory_path = 0;
static const gchar *key_type_item = "<Item>";
static GQuark quark_item_path = 0;
static GQuark quark_action = 0;
static GQuark quark_accel_group = 0;
static GQuark quark_type_item = 0;
static const gchar *key_type_title = "<Title>";
static GQuark quark_type_title = 0;
static const gchar *key_type_radio_item = "<RadioItem>";
static GQuark quark_type_radio_item = 0;
static const gchar *key_type_check_item = "<CheckItem>";
static GQuark quark_type_check_item = 0;
static const gchar *key_type_toggle_item = "<ToggleItem>";
static GQuark quark_type_toggle_item = 0;
static const gchar *key_type_tearoff_item = "<Tearoff>";
static GQuark quark_type_tearoff_item = 0;
static const gchar *key_type_separator_item = "<Separator>";
static GQuark quark_type_separator_item = 0;
static const gchar *key_type_branch = "<Branch>";
static GQuark quark_type_branch = 0;
static const gchar *key_type_last_branch = "<LastBranch>";
static GQuark quark_type_last_branch = 0;
static GScannerConfig ifactory_scanner_config =
{
@@ -201,6 +184,7 @@ gtk_item_factory_class_init (GtkItemFactoryClass *class)
class->cpair_comment_single = g_strdup (";\n");
class->item_ht = g_hash_table_new (g_str_hash, g_str_equal);
class->dummy = NULL;
ifactory_item_chunks =
g_mem_chunk_new ("GtkItemFactoryItem",
sizeof (GtkItemFactoryItem),
@@ -212,19 +196,21 @@ gtk_item_factory_class_init (GtkItemFactoryClass *class)
sizeof (GtkIFCBData) * ITEM_BLOCK_SIZE,
G_ALLOC_AND_FREE);
quark_popup_data = g_quark_from_static_string (key_popup_data);
quark_if_menu_pos = g_quark_from_static_string (key_if_menu_pos);
quark_item_factory = g_quark_from_static_string (key_item_factory);
quark_item_factory_path = g_quark_from_static_string (key_item_factory_path);
quark_type_item = g_quark_from_static_string (key_type_item);
quark_type_title = g_quark_from_static_string (key_type_title);
quark_type_radio_item = g_quark_from_static_string (key_type_radio_item);
quark_type_check_item = g_quark_from_static_string (key_type_check_item);
quark_type_toggle_item = g_quark_from_static_string (key_type_toggle_item);
quark_type_tearoff_item = g_quark_from_static_string (key_type_tearoff_item);
quark_type_separator_item = g_quark_from_static_string (key_type_separator_item);
quark_type_branch = g_quark_from_static_string (key_type_branch);
quark_type_last_branch = g_quark_from_static_string (key_type_last_branch);
quark_popup_data = g_quark_from_static_string ("GtkItemFactory-popup-data");
quark_if_menu_pos = g_quark_from_static_string ("GtkItemFactory-menu-position");
quark_item_factory = g_quark_from_static_string ("GtkItemFactory");
quark_item_path = g_quark_from_static_string ("GtkItemFactory-path");
quark_action = g_quark_from_static_string ("GtkItemFactory-action");
quark_accel_group = g_quark_from_static_string ("GtkAccelGroup");
quark_type_item = g_quark_from_static_string ("<Item>");
quark_type_title = g_quark_from_static_string ("<Title>");
quark_type_radio_item = g_quark_from_static_string ("<RadioItem>");
quark_type_check_item = g_quark_from_static_string ("<CheckItem>");
quark_type_toggle_item = g_quark_from_static_string ("<ToggleItem>");
quark_type_tearoff_item = g_quark_from_static_string ("<Tearoff>");
quark_type_separator_item = g_quark_from_static_string ("<Separator>");
quark_type_branch = g_quark_from_static_string ("<Branch>");
quark_type_last_branch = g_quark_from_static_string ("<LastBranch>");
}
static void
@@ -237,7 +223,10 @@ gtk_item_factory_init (GtkItemFactory *ifactory)
ifactory->path = NULL;
ifactory->accel_group = NULL;
ifactory->widget = NULL;
ifactory->widgets_by_action = NULL;
ifactory->items = NULL;
ifactory->translate_func = NULL;
ifactory->translate_data = NULL;
ifactory->translate_notify = NULL;
}
GtkItemFactory*
@@ -304,50 +293,48 @@ gtk_item_factory_propagate_accelerator (GtkItemFactoryItem *item,
for (slist = widget_list; slist; slist = slist->next)
{
GtkWidget *widget;
GtkItemFactory *ifactory;
GtkAccelGroup *accel_group;
guint signal_id;
widget = slist->data;
ifactory = gtk_item_factory_from_widget (widget);
accel_group = gtk_object_get_data_by_id (GTK_OBJECT (widget), quark_accel_group);
if (ifactory)
signal_id = gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (widget));
if (signal_id && accel_group)
{
guint signal_id;
signal_id = gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (widget));
if (signal_id)
if (item->accelerator_key)
gtk_widget_add_accelerator (widget,
"activate",
accel_group,
item->accelerator_key,
item->accelerator_mods,
GTK_ACCEL_VISIBLE);
else
{
if (item->accelerator_key)
gtk_widget_add_accelerator (widget,
"activate",
ifactory->accel_group,
item->accelerator_key,
item->accelerator_mods,
GTK_ACCEL_VISIBLE);
else
GSList *work;
work = gtk_accel_group_entries_from_object (GTK_OBJECT (widget));
while (work)
{
GSList *work;
GtkAccelEntry *ac_entry;
work = gtk_accel_group_entries_from_object (GTK_OBJECT (widget));
while (work)
{
GtkAccelEntry *ac_entry;
ac_entry = work->data;
work = work->next;
if (ac_entry->accel_flags & GTK_ACCEL_VISIBLE &&
ac_entry->accel_group == ifactory->accel_group &&
ac_entry->signal_id == signal_id)
gtk_widget_remove_accelerator (GTK_WIDGET (widget),
ac_entry->accel_group,
ac_entry->accelerator_key,
ac_entry->accelerator_mods);
}
ac_entry = work->data;
work = work->next;
if (ac_entry->accel_flags & GTK_ACCEL_VISIBLE &&
ac_entry->accel_group == accel_group &&
ac_entry->signal_id == signal_id)
gtk_widget_remove_accelerator (GTK_WIDGET (widget),
ac_entry->accel_group,
ac_entry->accelerator_key,
ac_entry->accelerator_mods);
}
}
}
gtk_widget_unref (widget);
}
g_slist_free (widget_list);
item->in_propagation = FALSE;
@@ -402,7 +389,90 @@ gtk_item_factory_item_remove_widget (GtkWidget *widget,
{
item->widgets = g_slist_remove (item->widgets, widget);
gtk_object_remove_data_by_id (GTK_OBJECT (widget), quark_item_factory);
gtk_object_remove_data_by_id (GTK_OBJECT (widget), quark_item_factory_path);
gtk_object_remove_data_by_id (GTK_OBJECT (widget), quark_item_path);
}
void
gtk_item_factory_add_foreign (GtkWidget *accel_widget,
const gchar *full_path,
GtkAccelGroup *accel_group,
guint keyval,
GdkModifierType modifiers)
{
GtkItemFactoryClass *class;
GtkItemFactoryItem *item;
g_return_if_fail (GTK_IS_WIDGET (accel_widget));
g_return_if_fail (full_path != NULL);
class = gtk_type_class (GTK_TYPE_ITEM_FACTORY);
keyval = keyval != GDK_VoidSymbol ? keyval : 0;
item = g_hash_table_lookup (class->item_ht, full_path);
if (!item)
{
item = g_chunk_new (GtkItemFactoryItem, ifactory_item_chunks);
item->path = g_strdup (full_path);
item->accelerator_key = keyval;
item->accelerator_mods = modifiers;
item->modified = FALSE;
item->in_propagation = FALSE;
item->dummy = NULL;
item->widgets = NULL;
g_hash_table_insert (class->item_ht, item->path, item);
}
item->widgets = g_slist_prepend (item->widgets, accel_widget);
gtk_signal_connect (GTK_OBJECT (accel_widget),
"destroy",
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_widget),
item);
/* set the item path for the widget
*/
gtk_object_set_data_by_id (GTK_OBJECT (accel_widget), quark_item_path, item->path);
gtk_widget_set_name (accel_widget, item->path);
if (accel_group)
{
gtk_accel_group_ref (accel_group);
gtk_object_set_data_by_id_full (GTK_OBJECT (accel_widget),
quark_accel_group,
accel_group,
(GtkDestroyNotify) gtk_accel_group_unref);
}
else
gtk_object_set_data_by_id (GTK_OBJECT (accel_widget), quark_accel_group, NULL);
/* install defined accelerators
*/
if (gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (accel_widget)))
{
if (item->accelerator_key && accel_group)
gtk_widget_add_accelerator (accel_widget,
"activate",
accel_group,
item->accelerator_key,
item->accelerator_mods,
GTK_ACCEL_VISIBLE);
else
gtk_widget_remove_accelerators (accel_widget,
"activate",
TRUE);
}
/* keep track of accelerator changes
*/
gtk_signal_connect_after (GTK_OBJECT (accel_widget),
"add-accelerator",
GTK_SIGNAL_FUNC (gtk_item_factory_item_add_accelerator),
item);
gtk_signal_connect_after (GTK_OBJECT (accel_widget),
"remove-accelerator",
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_accelerator),
item);
}
static void
@@ -425,112 +495,18 @@ gtk_item_factory_add_item (GtkItemFactory *ifactory,
GtkItemFactoryClass *class;
GtkItemFactoryItem *item;
gchar *fpath;
guint keyval, mods;
g_return_if_fail (widget != NULL);
g_return_if_fail (item_type != NULL);
class = GTK_ITEM_FACTORY_CLASS (GTK_OBJECT (ifactory)->klass);
fpath = g_strconcat (ifactory->path, path, NULL);
item = g_hash_table_lookup (class->item_ht, fpath);
/* link the widget into its item-entry
*/
if (!item)
{
guint keyval;
guint mods;
if (accelerator)
gtk_accelerator_parse (accelerator, &keyval, &mods);
else
{
keyval = 0;
mods = 0;
}
item = g_chunk_new (GtkItemFactoryItem, ifactory_item_chunks);
item->path = fpath;
fpath = NULL;
item->accelerator_key = keyval;
item->accelerator_mods = mods;
item->modified = FALSE;
item->in_propagation = FALSE;
item->item_type = NULL;
item->widgets = NULL;
g_hash_table_insert (class->item_ht, item->path, item);
}
g_free (fpath);
if (item->item_type == NULL)
{
g_assert (item->widgets == NULL);
if (item_type != ITEM_FACTORY_STRING)
item->item_type = g_strdup (item_type);
else
item->item_type = ITEM_FACTORY_STRING;
}
item->widgets = g_slist_prepend (item->widgets, widget);
gtk_signal_connect (GTK_OBJECT (widget),
"destroy",
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_widget),
item);
/* set back pointers for the widget
*/
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_item_factory, ifactory);
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_item_factory_path, item->path);
gtk_widget_set_name (widget, item->path);
/* set accelerator group on menu widgets
*/
if (GTK_IS_MENU (widget))
gtk_menu_set_accel_group ((GtkMenu*) widget, ifactory->accel_group);
/* install defined accelerators
*/
if (gtk_signal_lookup ("activate", GTK_OBJECT_TYPE (widget)))
{
if (item->accelerator_key)
gtk_widget_add_accelerator (widget,
"activate",
ifactory->accel_group,
item->accelerator_key,
item->accelerator_mods,
GTK_ACCEL_VISIBLE);
else
gtk_widget_remove_accelerators (widget,
"activate",
TRUE);
}
/* keep track of accelerator changes
*/
gtk_signal_connect_after (GTK_OBJECT (widget),
"add-accelerator",
GTK_SIGNAL_FUNC (gtk_item_factory_item_add_accelerator),
item);
gtk_signal_connect_after (GTK_OBJECT (widget),
"remove-accelerator",
GTK_SIGNAL_FUNC (gtk_item_factory_item_remove_accelerator),
item);
/* keep a per-action list of the widgets on the factory
*/
if (callback)
{
GtkIFActionLink *link;
link = g_new (GtkIFActionLink, 1);
link->widget = widget;
link->callback_action = callback_action;
ifactory->widgets_by_action = g_slist_prepend (ifactory->widgets_by_action, link);
}
/* connect callback if neccessary
*/
if (callback)
@@ -551,6 +527,28 @@ gtk_item_factory_add_item (GtkItemFactory *ifactory,
GTK_SIGNAL_FUNC (gtk_item_factory_callback_marshal),
data);
}
/* link the widget into its item-entry
* and keep back pointer on both the item factory and the widget
*/
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_action, GUINT_TO_POINTER (callback_action));
gtk_object_set_data_by_id (GTK_OBJECT (widget), quark_item_factory, ifactory);
if (accelerator)
gtk_accelerator_parse (accelerator, &keyval, &mods);
else
{
keyval = 0;
mods = 0;
}
fpath = g_strconcat (ifactory->path, path, NULL);
gtk_item_factory_add_foreign (widget, fpath, ifactory->accel_group, keyval, mods);
item = g_hash_table_lookup (class->item_ht, fpath);
g_free (fpath);
g_return_if_fail (item != NULL);
if (!g_slist_find (ifactory->items, item))
ifactory->items = g_slist_prepend (ifactory->items, item);
}
void
@@ -559,7 +557,6 @@ gtk_item_factory_construct (GtkItemFactory *ifactory,
const gchar *path,
GtkAccelGroup *accel_group)
{
GtkAccelGroup *menu_group;
guint len;
g_return_if_fail (ifactory != NULL);
@@ -593,15 +590,6 @@ gtk_item_factory_construct (GtkItemFactory *ifactory,
gtk_object_ref (GTK_OBJECT (ifactory));
gtk_object_sink (GTK_OBJECT (ifactory));
menu_group = gtk_accel_group_new ();
gtk_accel_group_attach (menu_group, GTK_OBJECT (ifactory->widget));
/*
gtk_signal_connect_object_while_alive (GTK_OBJECT (ifactory->widget),
"destroy",
GTK_SIGNAL_FUNC (gtk_object_destroy),
GTK_OBJECT (ifactory));
*/
gtk_item_factory_add_item (ifactory,
"", NULL,
NULL, 0, NULL, 0,
@@ -670,10 +658,17 @@ gtk_item_factory_destroy (GtkObject *object)
ifactory->widget = NULL;
}
for (slist = ifactory->widgets_by_action; slist; slist = slist->next)
g_free (slist->data);
g_slist_free (ifactory->widgets_by_action);
ifactory->widgets_by_action = NULL;
for (slist = ifactory->items; slist; slist = slist->next)
{
GtkItemFactoryItem *item = slist->data;
GSList *link;
for (link = item->widgets; link; link = link->next)
if (gtk_object_get_data_by_id (link->data, quark_item_factory) == ifactory)
gtk_object_remove_data_by_id (link->data, quark_item_factory);
}
g_slist_free (ifactory->items);
ifactory->items = NULL;
parent_class->destroy (object);
}
@@ -692,7 +687,7 @@ gtk_item_factory_finalize (GtkObject *object)
g_free (ifactory->path);
g_assert (ifactory->widget == NULL);
if (ifactory->translate_data && ifactory->translate_notify)
if (ifactory->translate_notify)
ifactory->translate_notify (ifactory->translate_data);
parent_class->finalize (object);
@@ -713,7 +708,7 @@ gtk_item_factory_path_from_widget (GtkWidget *widget)
g_return_val_if_fail (widget != NULL, NULL);
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
return gtk_object_get_data_by_id (GTK_OBJECT (widget), quark_item_factory_path);
return gtk_object_get_data_by_id (GTK_OBJECT (widget), quark_item_path);
}
static void
@@ -813,20 +808,20 @@ gtk_item_factory_dump_rc (const gchar *file_name,
}
void
gtk_item_factory_create_items (GtkItemFactory *ifactory,
guint n_entries,
GtkItemFactoryEntry *entries,
gpointer callback_data)
gtk_item_factory_create_items (GtkItemFactory *ifactory,
guint n_entries,
GtkItemFactoryEntry *entries,
gpointer callback_data)
{
gtk_item_factory_create_items_ac (ifactory, n_entries, entries, callback_data, 1);
}
void
gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
guint n_entries,
GtkItemFactoryEntry *entries,
gpointer callback_data,
guint callback_type)
gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
guint n_entries,
GtkItemFactoryEntry *entries,
gpointer callback_data,
guint callback_type)
{
guint i;
@@ -844,13 +839,12 @@ gtk_item_factory_create_items_ac (GtkItemFactory *ifactory,
}
GtkWidget*
gtk_item_factory_get_widget (GtkItemFactory *ifactory,
const gchar *path)
gtk_item_factory_get_widget (GtkItemFactory *ifactory,
const gchar *path)
{
GtkItemFactoryClass *class;
GtkItemFactoryItem *item;
g_return_val_if_fail (ifactory != NULL, NULL);
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
g_return_val_if_fail (path != NULL, NULL);
@@ -882,27 +876,60 @@ gtk_item_factory_get_widget (GtkItemFactory *ifactory,
}
GtkWidget*
gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory,
guint action)
gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory,
guint action)
{
GSList *slist;
g_return_val_if_fail (ifactory != NULL, NULL);
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
for (slist = ifactory->widgets_by_action; slist; slist = slist->next)
for (slist = ifactory->items; slist; slist = slist->next)
{
GtkIFActionLink *link;
GtkItemFactoryItem *item = slist->data;
GSList *link;
link = slist->data;
if (link->callback_action == action)
return link->widget;
for (link = item->widgets; link; link = link->next)
if (gtk_object_get_data_by_id (link->data, quark_item_factory) == ifactory &&
gtk_object_get_data_by_id (link->data, quark_action) == GUINT_TO_POINTER (action))
return link->data;
}
return NULL;
}
GtkWidget*
gtk_item_factory_get_item (GtkItemFactory *ifactory,
const gchar *path)
{
GtkWidget *widget;
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
g_return_val_if_fail (path != NULL, NULL);
widget = gtk_item_factory_get_widget (ifactory, path);
if (GTK_IS_MENU (widget))
widget = gtk_menu_get_attach_widget (GTK_MENU (widget));
return GTK_IS_ITEM (widget) ? widget : NULL;
}
GtkWidget*
gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory,
guint action)
{
GtkWidget *widget;
g_return_val_if_fail (GTK_IS_ITEM_FACTORY (ifactory), NULL);
widget = gtk_item_factory_get_widget_by_action (ifactory, action);
if (GTK_IS_MENU (widget))
widget = gtk_menu_get_attach_widget (GTK_MENU (widget));
return GTK_IS_ITEM (widget) ? widget : NULL;
}
static gboolean
gtk_item_factory_parse_path (GtkItemFactory *ifactory,
gchar *str,
@@ -964,8 +991,6 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
guint type_id;
GtkType type;
gchar *item_type_path;
GtkAccelGroup *parent_accel_group = NULL;
GSList *tmp_list;
g_return_if_fail (ifactory != NULL);
g_return_if_fail (GTK_IS_ITEM_FACTORY (ifactory));
@@ -977,7 +1002,7 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
if (!entry->item_type ||
entry->item_type[0] == 0)
{
item_type_path = (gpointer) key_type_item;
item_type_path = "<Item>";
type_id = quark_type_item;
}
else
@@ -1052,12 +1077,8 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
}
g_free (parent_path);
g_return_if_fail (parent != NULL);
g_return_if_fail (GTK_IS_CONTAINER (parent));
tmp_list = gtk_accel_groups_from_object (GTK_OBJECT (parent));
if (tmp_list)
parent_accel_group = tmp_list->data;
widget = gtk_widget_new (type,
"GtkWidget::visible", TRUE,
"GtkWidget::sensitive", (type_id != quark_type_separator_item &&
@@ -1069,64 +1090,58 @@ gtk_item_factory_create_item (GtkItemFactory *ifactory,
gtk_radio_menu_item_set_group (GTK_RADIO_MENU_ITEM (widget), radio_group);
if (GTK_IS_CHECK_MENU_ITEM (widget))
gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (widget), TRUE);
if ((type_id != quark_type_separator_item) &&
(type_id != quark_type_tearoff_item) &&
/* install underline accelerators for this item
*/
if (type_id != quark_type_separator_item &&
type_id != quark_type_tearoff_item &&
*name)
{
GtkWidget *label;
label =
gtk_widget_new (GTK_TYPE_ACCEL_LABEL,
"GtkWidget::visible", TRUE,
"GtkWidget::parent", widget,
"GtkAccelLabel::accel_widget", widget,
"GtkMisc::xalign", 0.0,
NULL);
label = gtk_widget_new (GTK_TYPE_ACCEL_LABEL,
"GtkWidget::visible", TRUE,
"GtkWidget::parent", widget,
"GtkAccelLabel::accel_widget", widget,
"GtkMisc::xalign", 0.0,
NULL);
accel_key = gtk_label_parse_uline (GTK_LABEL (label), name);
if ((accel_key != GDK_VoidSymbol) && GTK_IS_MENU_BAR (parent))
if (accel_key != GDK_VoidSymbol)
{
gtk_widget_add_accelerator (widget,
"activate_item",
ifactory->accel_group,
accel_key, GDK_MOD1_MASK,
GTK_ACCEL_LOCKED);
}
if (GTK_IS_MENU_BAR (parent))
gtk_widget_add_accelerator (widget,
"activate_item",
ifactory->accel_group,
accel_key, GDK_MOD1_MASK,
GTK_ACCEL_LOCKED);
if ((accel_key != GDK_VoidSymbol) && parent_accel_group)
{
gtk_widget_add_accelerator (widget,
"activate_item",
parent_accel_group,
accel_key, 0,
GTK_ACCEL_LOCKED);
if (GTK_IS_MENU (parent))
gtk_widget_add_accelerator (widget,
"activate_item",
gtk_menu_ensure_uline_accel_group (GTK_MENU (parent)),
accel_key, 0,
GTK_ACCEL_LOCKED);
}
}
g_free (name);
if (type_id == quark_type_branch ||
type_id == quark_type_last_branch)
{
GtkAccelGroup *menu_group;
if (entry->callback)
g_warning ("gtk_item_factory_create_item(): Can't specify a callback on a branch: \"%s\"",
entry->path);
menu_group = gtk_accel_group_new ();
if (type_id == quark_type_last_branch)
gtk_menu_item_right_justify (GTK_MENU_ITEM (widget));
parent = widget;
widget =
gtk_widget_new (GTK_TYPE_MENU,
NULL);
gtk_accel_group_attach (menu_group, GTK_OBJECT (widget));
parent = widget;
widget = gtk_widget_new (GTK_TYPE_MENU,
NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (parent), widget);
}
@@ -1188,7 +1203,7 @@ gtk_item_factory_create_menu_entries (guint n_entries,
entry.callback = entries[i].callback;
entry.callback_action = 0;
if (gtk_pattern_match_string (&pspec_separator, path))
entry.item_type = (gpointer) key_type_separator_item;
entry.item_type = "<Separator>";
else if (!gtk_pattern_match_string (&pspec_check, path))
entry.item_type = NULL;
else
@@ -1209,7 +1224,7 @@ gtk_item_factory_create_menu_entries (guint n_entries,
path++;
}
*c = 0;
entry.item_type = (gpointer) key_type_toggle_item;
entry.item_type = "<ToggleItem>";
entry.path = cpath;
}
@@ -1472,7 +1487,7 @@ gtk_item_factory_parse_menu_path (GScanner *scanner,
item->accelerator_mods = 0;
item->modified = TRUE;
item->in_propagation = FALSE;
item->item_type = NULL;
item->dummy = NULL;
item->widgets = NULL;
g_hash_table_insert (class->item_ht, item->path, item);
@@ -1559,6 +1574,9 @@ gtk_item_factory_parse_rc_string (const gchar *rc_string)
g_return_if_fail (rc_string != NULL);
if (!gtk_item_factory_class)
gtk_type_class (GTK_TYPE_ITEM_FACTORY);
ifactory_scanner_config.cpair_comment_single = gtk_item_factory_class->cpair_comment_single;
scanner = g_scanner_new (&ifactory_scanner_config);
@@ -1613,6 +1631,9 @@ gtk_item_factory_parse_rc (const gchar *file_name)
if (fd < 0)
return;
if (!gtk_item_factory_class)
gtk_type_class (GTK_TYPE_ITEM_FACTORY);
ifactory_scanner_config.cpair_comment_single = gtk_item_factory_class->cpair_comment_single;
scanner = g_scanner_new (&ifactory_scanner_config);
@@ -1633,7 +1654,7 @@ gtk_item_factory_set_translate_func (GtkItemFactory *ifactory,
{
g_return_if_fail (ifactory != NULL);
if (ifactory->translate_data && ifactory->translate_notify)
if (ifactory->translate_notify)
ifactory->translate_notify (ifactory->translate_data);
ifactory->translate_func = func;
+13 -4
View File
@@ -69,7 +69,7 @@ struct _GtkItemFactory
gchar *path;
GtkAccelGroup *accel_group;
GtkWidget *widget;
GSList *widgets_by_action;
GSList *items;
GtkTranslateFunc translate_func;
gpointer translate_data;
@@ -118,7 +118,7 @@ struct _GtkItemFactoryItem
guint accelerator_mods;
guint modified : 1;
guint in_propagation : 1;
gchar *item_type;
gchar *dummy;
GSList *widgets;
};
@@ -142,14 +142,23 @@ void gtk_item_factory_construct (GtkItemFactory *ifactory,
void gtk_item_factory_parse_rc (const gchar *file_name);
void gtk_item_factory_parse_rc_string (const gchar *rc_string);
void gtk_item_factory_parse_rc_scanner (GScanner *scanner);
void gtk_item_factory_add_foreign (GtkWidget *accel_widget,
const gchar *full_path,
GtkAccelGroup *accel_group,
guint keyval,
GdkModifierType modifiers);
GtkItemFactory* gtk_item_factory_from_widget (GtkWidget *widget);
gchar* gtk_item_factory_path_from_widget (GtkWidget *widget);
GtkWidget* gtk_item_factory_get_widget (GtkItemFactory *ifactory,
const gchar *path);
GtkWidget* gtk_item_factory_get_item (GtkItemFactory *ifactory,
const gchar *path);
GtkWidget* gtk_item_factory_get_widget (GtkItemFactory *ifactory,
const gchar *path);
GtkWidget* gtk_item_factory_get_widget_by_action (GtkItemFactory *ifactory,
guint action);
GtkWidget* gtk_item_factory_get_item_by_action (GtkItemFactory *ifactory,
guint action);
/* If `path_pspec' is passed as `NULL', this function will iterate over
* all hash entries. otherwise only those entries will be dumped for which
+139 -187
View File
@@ -81,21 +81,17 @@ static void gtk_label_style_set (GtkWidget *widget,
static gint gtk_label_expose (GtkWidget *widget,
GdkEventExpose *event);
static GtkLabelWord * gtk_label_word_alloc (void);
static GtkLabelULine * gtk_label_uline_alloc (void);
static void gtk_label_free_words (GtkLabel *label);
static void gtk_label_free_ulines (GtkLabelWord *word);
static gint gtk_label_split_text (GtkLabel * label);
static void gtk_label_finalize_lines (GtkLabel * label, gint line_width);
static void gtk_label_finalize_lines_wrap(GtkLabel * label, gint line_width);
static GtkLabelWord* gtk_label_word_alloc (void);
static GtkLabelULine* gtk_label_uline_alloc (void);
static void gtk_label_free_words (GtkLabel *label);
static void gtk_label_free_ulines (GtkLabelWord *word);
static gint gtk_label_split_text (GtkLabel *label);
static GtkMiscClass *parent_class = NULL;
static GMemChunk *word_chunk = 0;
static GtkLabelWord *free_words = 0;
static GMemChunk *uline_chunk = 0;
static GtkLabelULine *free_ulines = 0;
static GMemChunk *word_chunk = NULL;
static GMemChunk *uline_chunk = NULL;
GtkType
gtk_label_get_type (void)
@@ -116,7 +112,7 @@ gtk_label_get_type (void)
(GtkClassInitFunc) NULL,
};
label_type = gtk_type_unique (gtk_misc_get_type (), &label_info);
label_type = gtk_type_unique (GTK_TYPE_MISC, &label_info);
gtk_type_set_chunk_alloc (label_type, 32);
}
@@ -132,7 +128,7 @@ gtk_label_class_init (GtkLabelClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (gtk_misc_get_type ());
parent_class = gtk_type_class (GTK_TYPE_MISC);
gtk_object_add_arg_type ("GtkLabel::label", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_LABEL);
gtk_object_add_arg_type ("GtkLabel::pattern", GTK_TYPE_STRING, GTK_ARG_READWRITE, ARG_PATTERN);
@@ -159,7 +155,7 @@ gtk_label_set_arg (GtkObject *object,
switch (arg_id)
{
case ARG_LABEL:
gtk_label_set_text (label, GTK_VALUE_STRING (*arg) ? GTK_VALUE_STRING (*arg) : "");
gtk_label_set_text (label, GTK_VALUE_STRING (*arg));
break;
case ARG_PATTERN:
gtk_label_set_pattern (label, GTK_VALUE_STRING (*arg));
@@ -217,54 +213,48 @@ gtk_label_init (GtkLabel *label)
}
GtkWidget*
gtk_label_new (const char *str)
gtk_label_new (const gchar *str)
{
GtkLabel *label;
g_return_val_if_fail (str != NULL, NULL);
label = gtk_type_new (gtk_label_get_type ());
gtk_label_set_text (label, str);
label = gtk_type_new (GTK_TYPE_LABEL);
if (str && *str)
gtk_label_set_text (label, str);
return GTK_WIDGET (label);
}
static void
static inline void
gtk_label_set_text_internal (GtkLabel *label,
char *str,
gchar *str,
GdkWChar *str_wc)
{
if (label->label)
g_free (label->label);
if (label->label_wc)
g_free (label->label_wc);
g_free (label->label);
g_free (label->label_wc);
label->label = str;
label->label_wc = str_wc;
gtk_label_free_words (label);
if (GTK_WIDGET_VISIBLE (label))
{
if (GTK_WIDGET_MAPPED (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
if (GTK_WIDGET_DRAWABLE (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
gtk_widget_queue_resize (GTK_WIDGET (label));
}
gtk_widget_queue_resize (GTK_WIDGET (label));
}
void
gtk_label_set_text (GtkLabel *label,
const char *str)
gtk_label_set_text (GtkLabel *label,
const gchar *str)
{
GdkWChar *str_wc;
gint len;
gint wc_len;
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
g_return_if_fail (str != NULL);
if (!str)
str = "";
if (!label->label || strcmp (label->label, str))
{
@@ -286,68 +276,61 @@ void
gtk_label_set_pattern (GtkLabel *label,
const gchar *pattern)
{
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
if (label->pattern)
g_free (label->pattern);
g_free (label->pattern);
label->pattern = g_strdup (pattern);
if (GTK_WIDGET_VISIBLE (label))
if (GTK_WIDGET_DRAWABLE (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
gtk_widget_queue_resize (GTK_WIDGET (label));
}
void
gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype)
{
g_return_if_fail (GTK_IS_LABEL (label));
g_return_if_fail (jtype >= GTK_JUSTIFY_LEFT && jtype <= GTK_JUSTIFY_FILL);
if ((GtkJustification) label->jtype != jtype)
{
if (GTK_WIDGET_MAPPED (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
if (label->jtype == GTK_JUSTIFY_FILL ||
jtype == GTK_JUSTIFY_FILL)
gtk_label_free_words (label);
label->jtype = jtype;
if (GTK_WIDGET_DRAWABLE (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
gtk_widget_queue_resize (GTK_WIDGET (label));
}
}
void
gtk_label_set_justify (GtkLabel *label, GtkJustification jtype)
gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap)
{
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
if ((GtkJustification) label->jtype != jtype)
wrap = wrap != FALSE;
if (label->wrap != wrap)
{
if ((label->jtype == GTK_JUSTIFY_FILL) ||
(jtype == GTK_JUSTIFY_FILL))
/* FIXME: think about this a little */
gtk_label_free_words (label);
if (GTK_WIDGET_DRAWABLE (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
label->jtype = jtype;
gtk_widget_queue_resize (GTK_WIDGET (label));
if (GTK_WIDGET_VISIBLE (label))
{
if (GTK_WIDGET_MAPPED (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
gtk_widget_queue_resize (GTK_WIDGET (label));
}
label->wrap = wrap;
}
}
void
gtk_label_set_line_wrap (GtkLabel *label, gboolean wrap)
{
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
if (label->wrap != wrap) {
if (GTK_WIDGET_VISIBLE (label))
{
if (GTK_WIDGET_MAPPED (label))
gtk_widget_queue_clear (GTK_WIDGET (label));
gtk_widget_queue_resize (GTK_WIDGET (label));
}
label->wrap = wrap;
}
}
void
gtk_label_get (GtkLabel *label,
char **str)
gtk_label_get (GtkLabel *label,
gchar **str)
{
g_return_if_fail (label != NULL);
g_return_if_fail (GTK_IS_LABEL (label));
@@ -368,77 +351,22 @@ gtk_label_finalize (GtkObject *object)
g_free (label->label);
g_free (label->label_wc);
if (label->pattern)
g_free (label->pattern);
g_free (label->pattern);
gtk_label_free_words (label);
(* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
GTK_OBJECT_CLASS (parent_class)->finalize (object);
}
static GtkLabelWord*
gtk_label_word_alloc ()
{
GtkLabelWord * word;
if (!word_chunk)
{
word_chunk = g_mem_chunk_new ("GtkLabelWord chunk",
sizeof (GtkLabelWord),
32 * sizeof (GtkLabelWord),
G_ALLOC_ONLY);
}
if (free_words)
{
word = free_words;
free_words = word->next;
}
else
{
word = g_mem_chunk_alloc (word_chunk);
}
word->next = 0;
word->uline = 0;
return word;
}
static void
gtk_label_free_words (GtkLabel *label)
{
GtkLabelWord * last;
if (label->words)
{
for (last = label->words; last->next != 0; last = last->next)
gtk_label_free_ulines (label->words);
last->next = free_words;
free_words = label->words;
label->words = NULL;
}
}
static GtkLabelULine*
gtk_label_uline_alloc (void)
{
GtkLabelULine * uline;
GtkLabelULine *uline;
if (!uline_chunk)
{
uline_chunk = g_mem_chunk_new ("GtkLabelWord chunk",
sizeof (GtkLabelULine),
32 * sizeof (GtkLabelULine),
G_ALLOC_ONLY);
}
if (free_ulines)
{
uline = free_ulines;
free_ulines = uline->next;
}
else
{
uline = g_mem_chunk_alloc (uline_chunk);
}
uline_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE);
uline = g_chunk_new0 (GtkLabelULine, uline_chunk);
uline->next = NULL;
@@ -448,14 +376,44 @@ gtk_label_uline_alloc (void)
static void
gtk_label_free_ulines (GtkLabelWord *word)
{
GtkLabelULine *last;
if (word->uline)
while (word->uline)
{
for (last = word->uline; last->next != 0; last = last->next)
;
last->next = free_ulines;
free_ulines = word->uline;
word->uline = 0;
GtkLabelULine *uline = word->uline;
word->uline = uline->next;
g_chunk_free (uline, uline_chunk);
}
}
static GtkLabelWord*
gtk_label_word_alloc (void)
{
GtkLabelWord * word;
if (!word_chunk)
word_chunk = g_mem_chunk_create (GtkLabelWord, 32, G_ALLOC_AND_FREE);
word = g_chunk_new0 (GtkLabelWord, word_chunk);
word->beginning = NULL;
word->next = NULL;
word->uline = NULL;
return word;
}
static void
gtk_label_free_words (GtkLabel *label)
{
while (label->words)
{
GtkLabelWord *word = label->words;
label->words = word->next;
gtk_label_free_ulines (word);
g_chunk_free (word, word_chunk);
}
}
@@ -466,8 +424,6 @@ gtk_label_split_text (GtkLabel *label)
gint space_width, line_width, max_line_width;
GdkWChar *str, *p;
g_return_val_if_fail (GTK_WIDGET (label)->style->font != NULL, 0);
gtk_label_free_words (label);
if (label->label == NULL)
return 0;
@@ -530,7 +486,7 @@ gtk_label_split_text (GtkLabel *label)
/* Add an empty word to represent an empty line
*/
if ((str == label->label_wc) || (str[-1] == '\n'))
if (str == label->label_wc || str[-1] == '\n')
{
word = gtk_label_word_alloc ();
@@ -546,16 +502,14 @@ gtk_label_split_text (GtkLabel *label)
return MAX (line_width, max_line_width);
}
/* this needs to handle white space better. */
static gint
gtk_label_split_text_wrapped (GtkLabel *label)
{
/* this needs to handle white space better. */
GtkLabelWord *word, **tailp;
gint space_width, line_width, max_line_width;
GdkWChar *str, *p;
g_return_val_if_fail (GTK_WIDGET (label)->style->font != NULL, 0);
gtk_label_free_words (label);
if (label->label == NULL)
return 0;
@@ -668,8 +622,9 @@ gtk_label_pick_width (GtkLabel *label,
* use gtk_label_finalize_wrap instead.
*/
static void
gtk_label_finalize_lines (GtkLabel *label,
gint line_width)
gtk_label_finalize_lines (GtkLabel *label,
GtkRequisition *requisition,
gint max_line_width)
{
GtkLabelWord *line;
gint y, baseline_skip, y_max;
@@ -680,14 +635,15 @@ gtk_label_finalize_lines (GtkLabel *label,
ptrn = label->pattern;
y = 0;
baseline_skip = GTK_WIDGET (label)->style->font->ascent + GTK_WIDGET (label)->style->font->descent + 2;
baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
GTK_WIDGET (label)->style->font->descent + 2);
for (line = label->words; line; line = line->next)
{
if (label->jtype == GTK_JUSTIFY_CENTER)
line->x = (line_width - line->width) / 2;
line->x = (max_line_width - line->width) / 2;
else if (label->jtype == GTK_JUSTIFY_RIGHT)
line->x = line_width - line->width;
line->x = max_line_width - line->width;
else
line->x = 0;
@@ -748,15 +704,16 @@ gtk_label_finalize_lines (GtkLabel *label,
y += (baseline_skip + y_max);
}
label->max_width = line_width;
GTK_WIDGET (label)->requisition.width = line_width + 2 * label->misc.xpad;
GTK_WIDGET (label)->requisition.height = y + 2 * label->misc.ypad;
label->max_width = max_line_width;
requisition->width = max_line_width + 2 * label->misc.xpad;
requisition->height = y + 2 * label->misc.ypad;
}
/* this finalizes word-wrapped words */
static void
gtk_label_finalize_lines_wrap (GtkLabel *label,
gint line_width)
gtk_label_finalize_lines_wrap (GtkLabel *label,
GtkRequisition *requisition,
gint max_line_width)
{
GtkLabelWord *word, *line, *next_line;
GtkWidget *widget;
@@ -767,12 +724,13 @@ gtk_label_finalize_lines_wrap (GtkLabel *label,
ptrn = label->pattern;
y = 0;
baseline_skip = GTK_WIDGET (label)->style->font->ascent + GTK_WIDGET (label)->style->font->descent + 1;
baseline_skip = (GTK_WIDGET (label)->style->font->ascent +
GTK_WIDGET (label)->style->font->descent + 1);
for (line = label->words; line != 0; line = next_line)
{
space = 0;
extra_width = line_width - line->width;
extra_width = max_line_width - line->width;
for (next_line = line->next; next_line; next_line = next_line->next)
{
@@ -809,10 +767,10 @@ gtk_label_finalize_lines_wrap (GtkLabel *label,
y += (baseline_skip);
}
label->max_width = line_width;
label->max_width = max_line_width;
widget = GTK_WIDGET (label);
widget->requisition.width = line_width + 2 * label->misc.xpad;
widget->requisition.height = y + 2 * label->misc.ypad + 1;
requisition->width = max_line_width + 2 * label->misc.xpad;
requisition->height = y + 2 * label->misc.ypad + 1;
}
static void
@@ -821,12 +779,11 @@ gtk_label_size_request (GtkWidget *widget,
{
GtkLabel *label;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_LABEL (widget));
g_return_if_fail (requisition != NULL);
label = GTK_LABEL (widget);
/*
* There are a number of conditions which will necessitate re-filling
* our text:
@@ -858,7 +815,7 @@ gtk_label_size_request (GtkWidget *widget,
aux_info = gtk_object_get_data (GTK_OBJECT (widget), "gtk-aux-info");
if (aux_info && aux_info->width > 0)
{
label->max_width = MAX(aux_info->width - 2 * label->misc.xpad, 1);
label->max_width = MAX (aux_info->width - 2 * label->misc.xpad, 1);
gtk_label_split_text_wrapped (label);
}
else
@@ -878,33 +835,29 @@ gtk_label_size_request (GtkWidget *widget,
label->max_width);
}
}
gtk_label_finalize_lines_wrap (label, label->max_width);
gtk_label_finalize_lines_wrap (label, requisition, label->max_width);
}
else if (label->words == NULL)
else if (!label->words)
{
label->max_width = gtk_label_split_text (label);
gtk_label_finalize_lines (label, label->max_width);
gtk_label_finalize_lines (label, requisition, label->max_width);
}
if (requisition != &widget->requisition)
*requisition = widget->requisition;
}
static void
gtk_label_style_set (GtkWidget *widget,
GtkStyle *previous_style)
gtk_label_style_set (GtkWidget *widget,
GtkStyle *previous_style)
{
GtkLabel *label;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_LABEL (widget));
label = GTK_LABEL (widget);
/* Clear the list of words so that they are recomputed on
* size_request
*/
if (previous_style && label->words)
/* Clear the list of words so that they are recomputed on
* size_request
*/
gtk_label_free_words (label);
}
@@ -946,7 +899,6 @@ gtk_label_expose (GtkWidget *widget,
GtkLabelWord *word;
gint x, y;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_LABEL (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
@@ -999,7 +951,8 @@ gtk_label_parse_uline (GtkLabel *label,
gint length, wc_length;
gboolean underscore;
g_return_val_if_fail(string != NULL, GDK_VoidSymbol);
g_return_val_if_fail (GTK_IS_LABEL (label), GDK_VoidSymbol);
g_return_val_if_fail (string != NULL, GDK_VoidSymbol);
/* Convert text to wide characters */
length = strlen (string);
@@ -1058,4 +1011,3 @@ gtk_label_parse_uline (GtkLabel *label,
return accel_key;
}
+5 -6
View File
@@ -54,7 +54,7 @@ struct _GtkLabel
gchar *label;
GdkWChar *label_wc;
gchar *pattern;
gchar *pattern;
GtkLabelWord *words;
@@ -69,10 +69,10 @@ struct _GtkLabelClass
};
guint gtk_label_get_type (void);
GtkWidget* gtk_label_new (const char *str);
GtkType gtk_label_get_type (void);
GtkWidget* gtk_label_new (const gchar *str);
void gtk_label_set_text (GtkLabel *label,
const char *str);
const gchar *str);
void gtk_label_set_justify (GtkLabel *label,
GtkJustification jtype);
void gtk_label_set_pattern (GtkLabel *label,
@@ -80,13 +80,12 @@ void gtk_label_set_pattern (GtkLabel *label,
void gtk_label_set_line_wrap (GtkLabel *label,
gboolean wrap);
void gtk_label_get (GtkLabel *label,
char **str);
gchar **str);
/* Convenience function to set the name and pattern by parsing
* a string with embedded underscores, and return the appropriate
* key symbol for the accelerator.
*/
guint gtk_label_parse_uline (GtkLabel *label,
const gchar *string);
+29 -18
View File
@@ -53,6 +53,7 @@ struct _GtkLayoutChild {
static void gtk_layout_class_init (GtkLayoutClass *class);
static void gtk_layout_init (GtkLayout *layout);
static void gtk_layout_finalize (GtkObject *object);
static void gtk_layout_realize (GtkWidget *widget);
static void gtk_layout_unrealize (GtkWidget *widget);
static void gtk_layout_map (GtkWidget *widget);
@@ -198,6 +199,17 @@ gtk_layout_set_adjustments (GtkLayout *layout,
gtk_layout_adjustment_changed (NULL, layout);
}
static void
gtk_layout_finalize (GtkObject *object)
{
GtkLayout *layout = GTK_LAYOUT (object);
gtk_object_unref (GTK_OBJECT (layout->hadjustment));
gtk_object_unref (GTK_OBJECT (layout->vadjustment));
GTK_OBJECT_CLASS (parent_class)->finalize (object);
}
void
gtk_layout_set_hadjustment (GtkLayout *layout,
GtkAdjustment *adjustment)
@@ -248,19 +260,16 @@ gtk_layout_put (GtkLayout *layout,
if (!IS_ONSCREEN (x, y))
GTK_PRIVATE_SET_FLAG (child_widget, GTK_IS_OFFSCREEN);
if (GTK_WIDGET_VISIBLE (layout))
if (GTK_WIDGET_REALIZED (layout))
gtk_widget_realize (child_widget);
if (GTK_WIDGET_VISIBLE (layout) && GTK_WIDGET_VISIBLE (child_widget))
{
if (GTK_WIDGET_REALIZED (layout) &&
!GTK_WIDGET_REALIZED (child_widget))
gtk_widget_realize (child_widget);
if (GTK_WIDGET_MAPPED (layout) &&
!GTK_WIDGET_MAPPED (child_widget))
if (GTK_WIDGET_MAPPED (layout))
gtk_widget_map (child_widget);
}
if (GTK_WIDGET_VISIBLE (child_widget) && GTK_WIDGET_VISIBLE (layout))
gtk_widget_queue_resize (child_widget);
gtk_widget_queue_resize (child_widget);
}
}
void
@@ -374,6 +383,8 @@ gtk_layout_class_init (GtkLayoutClass *class)
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
object_class->finalize = gtk_layout_finalize;
widget_class->realize = gtk_layout_realize;
widget_class->unrealize = gtk_layout_unrealize;
widget_class->map = gtk_layout_map;
@@ -382,6 +393,11 @@ gtk_layout_class_init (GtkLayoutClass *class)
widget_class->draw = gtk_layout_draw;
widget_class->expose_event = gtk_layout_expose;
container_class->remove = gtk_layout_remove;
container_class->forall = gtk_layout_forall;
class->set_scroll_adjustments = gtk_layout_set_adjustments;
widget_class->set_scroll_adjustments_signal =
gtk_signal_new ("set_scroll_adjustments",
GTK_RUN_LAST,
@@ -389,11 +405,6 @@ gtk_layout_class_init (GtkLayoutClass *class)
GTK_SIGNAL_OFFSET (GtkLayoutClass, set_scroll_adjustments),
gtk_marshal_NONE__POINTER_POINTER,
GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
container_class->remove = gtk_layout_remove;
container_class->forall = gtk_layout_forall;
class->set_scroll_adjustments = gtk_layout_set_adjustments;
}
static void
@@ -1009,7 +1020,7 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
0,
MAX ((gint)widget->allocation.height - dy, 0),
widget->allocation.width,
MIN (dy, widget->allocation.width));
MIN (dy, widget->allocation.height));
}
else if (dy < 0)
{
@@ -1031,8 +1042,8 @@ gtk_layout_adjustment_changed (GtkAdjustment *adjustment,
gtk_layout_expose_area (layout,
0,
0,
widget->allocation.height,
MIN (-dy, (gint)widget->allocation.width));
widget->allocation.width,
MIN (-dy, (gint)widget->allocation.height));
}
gtk_layout_position_children (layout);
+14 -27
View File
@@ -1104,15 +1104,16 @@ gtk_list_insert_items (GtkList *list,
gtk_signal_connect (GTK_OBJECT (widget), "toggle",
GTK_SIGNAL_FUNC (gtk_list_signal_item_toggle),
list);
if (GTK_WIDGET_VISIBLE (widget->parent))
{
if (GTK_WIDGET_REALIZED (widget->parent) &&
!GTK_WIDGET_REALIZED (widget))
gtk_widget_realize (widget);
if (GTK_WIDGET_MAPPED (widget->parent) &&
!GTK_WIDGET_MAPPED (widget))
if (GTK_WIDGET_REALIZED (widget->parent))
gtk_widget_realize (widget);
if (GTK_WIDGET_VISIBLE (widget->parent) && GTK_WIDGET_VISIBLE (widget))
{
if (GTK_WIDGET_MAPPED (widget->parent))
gtk_widget_map (widget);
gtk_widget_queue_resize (widget);
}
}
@@ -1155,9 +1156,6 @@ gtk_list_insert_items (GtkList *list,
widget = list->children->data;
gtk_list_select_child (list, widget);
}
if (GTK_WIDGET_VISIBLE (list))
gtk_widget_queue_resize (GTK_WIDGET (list));
}
void
@@ -2409,19 +2407,14 @@ gtk_list_move_focus_child (GtkList *list,
static gint
gtk_list_horizontal_timeout (GtkWidget *list)
{
gint x, y;
GdkEventMotion event;
GdkModifierType mask;
GdkEventMotion event = { 0 };
GDK_THREADS_ENTER ();
GTK_LIST (list)->htimer = 0;
gdk_window_get_pointer (list->window, &x, &y, &mask);
event.is_hint = 0;
event.x = x;
event.y = y;
event.state = mask;
event.type = GDK_MOTION_NOTIFY;
event.send_event = TRUE;
gtk_list_motion_notify (list, &event);
@@ -2433,20 +2426,14 @@ gtk_list_horizontal_timeout (GtkWidget *list)
static gint
gtk_list_vertical_timeout (GtkWidget *list)
{
gint x;
gint y;
GdkEventMotion event;
GdkModifierType mask;
GdkEventMotion event = { 0 };
GDK_THREADS_ENTER ();
GTK_LIST (list)->vtimer = 0;
gdk_window_get_pointer (list->window, &x, &y, &mask);
event.is_hint = 0;
event.x = x;
event.y = y;
event.state = mask;
event.type = GDK_MOTION_NOTIFY;
event.send_event = TRUE;
gtk_list_motion_notify (list, &event);
+2 -1
View File
@@ -486,7 +486,9 @@ gtk_main (void)
{
quitf = quit_functions->data;
tmp_list = quit_functions;
quit_functions = g_list_remove_link (quit_functions, quit_functions);
g_list_free_1 (tmp_list);
if ((quitf->main_level && quitf->main_level != gtk_main_loop_level) ||
gtk_quit_invoke_function (quitf))
@@ -495,7 +497,6 @@ gtk_main (void)
}
else
{
g_list_free (tmp_list);
gtk_quit_destroy (quitf);
}
}
+202 -91
View File
@@ -73,7 +73,8 @@ static void gtk_menu_reparent (GtkMenu *menu,
gboolean unrealize);
static GtkMenuShellClass *parent_class = NULL;
static const gchar *attach_data_key = "gtk-menu-attach-data";
static const gchar *attach_data_key = "gtk-menu-attach-data";
static GQuark quark_uline_accel_group = 0;
GtkType
@@ -155,6 +156,33 @@ gtk_menu_class_init (GtkMenuClass *class)
GTK_MENU_DIR_CHILD);
}
static gint
gtk_menu_window_event (GtkWidget *window,
GdkEvent *event,
GtkWidget *menu)
{
gboolean handled = FALSE;
gtk_widget_ref (window);
gtk_widget_ref (menu);
switch (event->type)
{
case GDK_KEY_PRESS:
case GDK_KEY_RELEASE:
gtk_widget_event (menu, event);
handled = TRUE;
break;
default:
break;
}
gtk_widget_unref (window);
gtk_widget_unref (menu);
return handled;
}
static void
gtk_menu_init (GtkMenu *menu)
{
@@ -165,9 +193,10 @@ gtk_menu_init (GtkMenu *menu)
menu->position_func_data = NULL;
menu->toplevel = gtk_window_new (GTK_WINDOW_POPUP);
gtk_signal_connect_object (GTK_OBJECT (menu->toplevel), "key_press_event",
GTK_SIGNAL_FUNC (gtk_menu_key_press),
GTK_OBJECT (menu));
gtk_signal_connect (GTK_OBJECT (menu->toplevel),
"event",
GTK_SIGNAL_FUNC (gtk_menu_window_event),
GTK_OBJECT (menu));
gtk_window_set_policy (GTK_WINDOW (menu->toplevel),
FALSE, FALSE, TRUE);
@@ -203,6 +232,12 @@ gtk_menu_destroy (GtkObject *object)
gtk_menu_set_accel_group (menu, NULL);
if (menu->old_active_menu_item)
{
gtk_widget_unref (menu->old_active_menu_item);
menu->old_active_menu_item = NULL;
}
/* Add back the reference count for being a child */
gtk_object_ref (object);
@@ -327,6 +362,42 @@ gtk_menu_insert (GtkMenu *menu,
gtk_menu_shell_insert (GTK_MENU_SHELL (menu), child, position);
}
static void
gtk_menu_tearoff_bg_copy (GtkMenu *menu)
{
GtkWidget *widget;
widget = GTK_WIDGET (menu);
if (menu->torn_off)
{
GdkPixmap *pixmap;
GdkGC *gc;
GdkGCValues gc_values;
gc_values.subwindow_mode = GDK_INCLUDE_INFERIORS;
gc = gdk_gc_new_with_values (widget->window,
&gc_values, GDK_GC_SUBWINDOW);
pixmap = gdk_pixmap_new (widget->window,
widget->requisition.width,
widget->requisition.height,
-1);
gdk_draw_pixmap (pixmap, gc,
widget->window,
0, 0, 0, 0, -1, -1);
gdk_gc_unref (gc);
gtk_widget_set_usize (menu->tearoff_window,
widget->requisition.width,
widget->requisition.height);
gdk_window_set_back_pixmap (menu->tearoff_window->window, pixmap, FALSE);
gdk_pixmap_unref (pixmap);
}
}
void
gtk_menu_popup (GtkMenu *menu,
GtkWidget *parent_menu_shell,
@@ -363,35 +434,12 @@ gtk_menu_popup (GtkMenu *menu,
if ((current_event->type != GDK_BUTTON_PRESS) &&
(current_event->type != GDK_ENTER_NOTIFY))
menu_shell->ignore_enter = TRUE;
gdk_event_free(current_event);
gdk_event_free (current_event);
}
if (menu->torn_off)
{
GdkPixmap *pixmap;
GdkGC *gc;
GdkGCValues gc_values;
gc_values.subwindow_mode = GDK_INCLUDE_INFERIORS;
gc = gdk_gc_new_with_values (widget->window,
&gc_values, GDK_GC_SUBWINDOW);
pixmap = gdk_pixmap_new (widget->window,
widget->requisition.width,
widget->requisition.height,
-1);
gdk_draw_pixmap (pixmap, gc,
widget->window,
0, 0, 0, 0, -1, -1);
gdk_gc_unref(gc);
gtk_widget_set_usize (menu->tearoff_window,
widget->requisition.width,
widget->requisition.height);
gdk_window_set_back_pixmap (menu->tearoff_window->window, pixmap, FALSE);
gdk_pixmap_unref (pixmap);
gtk_menu_tearoff_bg_copy (menu);
/* We force an unrealize here so that we don't trigger redrawing/
* clearing code - we just want to reveal our backing pixmap.
@@ -479,10 +527,13 @@ gtk_menu_popdown (GtkMenu *menu)
if (menu_shell->active_menu_item)
{
if (menu->old_active_menu_item)
gtk_widget_unref (menu->old_active_menu_item);
menu->old_active_menu_item = menu_shell->active_menu_item;
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
menu_shell->active_menu_item = NULL;
gtk_widget_ref (menu->old_active_menu_item);
}
gtk_menu_shell_deselect (menu_shell);
/* The X Grab, if present, will automatically be removed when we hide
* the window */
@@ -538,6 +589,8 @@ gtk_menu_get_active (GtkMenu *menu)
}
menu->old_active_menu_item = child;
if (menu->old_active_menu_item)
gtk_widget_ref (menu->old_active_menu_item);
}
return menu->old_active_menu_item;
@@ -558,7 +611,12 @@ gtk_menu_set_active (GtkMenu *menu,
{
child = tmp_list->data;
if (GTK_BIN (child)->child)
menu->old_active_menu_item = child;
{
if (menu->old_active_menu_item)
gtk_widget_unref (menu->old_active_menu_item);
menu->old_active_menu_item = child;
gtk_widget_ref (menu->old_active_menu_item);
}
}
}
@@ -566,7 +624,6 @@ void
gtk_menu_set_accel_group (GtkMenu *menu,
GtkAccelGroup *accel_group)
{
g_return_if_fail (menu != NULL);
g_return_if_fail (GTK_IS_MENU (menu));
if (menu->accel_group != accel_group)
@@ -579,6 +636,45 @@ gtk_menu_set_accel_group (GtkMenu *menu,
}
}
GtkAccelGroup*
gtk_menu_get_accel_group (GtkMenu *menu)
{
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
return menu->accel_group;
}
GtkAccelGroup*
gtk_menu_ensure_uline_accel_group (GtkMenu *menu)
{
GtkAccelGroup *accel_group;
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
if (!quark_uline_accel_group)
quark_uline_accel_group = g_quark_from_static_string ("GtkMenu-uline-accel-group");
accel_group = gtk_object_get_data_by_id (GTK_OBJECT (menu), quark_uline_accel_group);
if (!accel_group)
{
accel_group = gtk_accel_group_new ();
gtk_accel_group_attach (accel_group, GTK_OBJECT (menu));
gtk_object_set_data_by_id_full (GTK_OBJECT (menu),
quark_uline_accel_group,
accel_group,
(GtkDestroyNotify) gtk_accel_group_unref);
}
return accel_group;
}
GtkAccelGroup*
gtk_menu_get_uline_accel_group (GtkMenu *menu)
{
g_return_val_if_fail (GTK_IS_MENU (menu), NULL);
return gtk_object_get_data_by_id (GTK_OBJECT (menu), quark_uline_accel_group);
}
void
gtk_menu_reposition (GtkMenu *menu)
@@ -614,10 +710,10 @@ gtk_menu_set_tearoff_state (GtkMenu *menu,
menu->tearoff_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_app_paintable (menu->tearoff_window, TRUE);
gtk_signal_connect_object (GTK_OBJECT (menu->tearoff_window),
"key_press_event",
GTK_SIGNAL_FUNC (gtk_menu_key_press),
GTK_OBJECT (menu));
gtk_signal_connect (GTK_OBJECT (menu->tearoff_window),
"event",
GTK_SIGNAL_FUNC (gtk_menu_window_event),
GTK_OBJECT (menu));
gtk_widget_realize (menu->tearoff_window);
title = gtk_object_get_data (GTK_OBJECT (menu), "gtk-menu-title");
@@ -888,16 +984,19 @@ gtk_menu_expose (GtkWidget *widget,
GtkWidget *child;
GdkEventExpose child_event;
GList *children;
GtkMenu *menu;
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
menu_shell = GTK_MENU_SHELL (widget);
menu = GTK_MENU (widget);
if (GTK_WIDGET_DRAWABLE (widget))
{
gtk_menu_paint (widget);
menu_shell = GTK_MENU_SHELL (widget);
child_event = *event;
children = menu_shell->children;
@@ -943,59 +1042,62 @@ gtk_menu_key_press (GtkWidget *widget,
}
/* Modify the accelerators */
if (delete || gtk_accelerator_valid (event->keyval, event->keyval))
if (menu_shell->active_menu_item &&
GTK_BIN (menu_shell->active_menu_item)->child &&
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu == NULL &&
!gtk_widget_accelerators_locked (menu_shell->active_menu_item) &&
(delete ||
(gtk_accelerator_valid (event->keyval, event->state) &&
(event->state ||
!gtk_menu_get_uline_accel_group (GTK_MENU (menu_shell)) ||
(event->keyval >= GDK_F1 && event->keyval <= GDK_F35)))))
{
if (menu_shell->active_menu_item &&
GTK_BIN (menu_shell->active_menu_item)->child &&
GTK_MENU_ITEM (menu_shell->active_menu_item)->submenu == NULL)
GtkMenuItem *menu_item;
GtkAccelGroup *accel_group;
menu_item = GTK_MENU_ITEM (menu_shell->active_menu_item);
if (!GTK_MENU (widget)->accel_group)
accel_group = gtk_accel_group_get_default ();
else
accel_group = GTK_MENU (widget)->accel_group;
gtk_widget_remove_accelerators (GTK_WIDGET (menu_item),
gtk_signal_name (menu_item->accelerator_signal),
TRUE);
if (!delete &&
0 == gtk_widget_accelerator_signal (GTK_WIDGET (menu_item),
accel_group,
event->keyval,
event->state))
{
GtkMenuItem *menu_item;
GtkAccelGroup *accel_group;
GSList *slist;
menu_item = GTK_MENU_ITEM (menu_shell->active_menu_item);
if (!GTK_MENU (widget)->accel_group)
accel_group = gtk_accel_group_get_default ();
else
accel_group = GTK_MENU (widget)->accel_group;
gtk_widget_remove_accelerators (GTK_WIDGET (menu_item),
gtk_signal_name (menu_item->accelerator_signal),
TRUE);
if (!delete &&
0 == gtk_widget_accelerator_signal (GTK_WIDGET (menu_item),
accel_group,
event->keyval,
event->state))
slist = gtk_accel_group_entries_from_object (GTK_OBJECT (menu_item));
while (slist)
{
GSList *slist;
GtkAccelEntry *ac_entry;
slist = gtk_accel_group_entries_from_object (GTK_OBJECT (menu_item));
while (slist)
{
GtkAccelEntry *ac_entry;
ac_entry = slist->data;
if (ac_entry->signal_id == menu_item->accelerator_signal)
break;
slist = slist->next;
}
if (!slist)
gtk_widget_add_accelerator (GTK_WIDGET (menu_item),
gtk_signal_name (menu_item->accelerator_signal),
accel_group,
event->keyval,
event->state,
GTK_ACCEL_VISIBLE);
ac_entry = slist->data;
if (ac_entry->signal_id == menu_item->accelerator_signal)
break;
slist = slist->next;
}
if (!slist)
gtk_widget_add_accelerator (GTK_WIDGET (menu_item),
gtk_signal_name (menu_item->accelerator_signal),
accel_group,
event->keyval,
event->state,
GTK_ACCEL_VISIBLE);
}
}
return FALSE;
return TRUE;
}
static gint
@@ -1004,20 +1106,28 @@ gtk_menu_motion_notify (GtkWidget *widget,
{
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
if (GTK_MENU_SHELL (widget)->ignore_enter)
GTK_MENU_SHELL (widget)->ignore_enter = FALSE;
else
else
{
GdkEvent send_event;
gint width, height;
send_event.crossing.type = GDK_ENTER_NOTIFY;
send_event.crossing.window = event->window;
send_event.crossing.time = event->time;
gtk_widget_event (widget, &send_event);
gdk_window_get_size (event->window, &width, &height);
if (event->x >= 0 && event->x < width &&
event->y >= 0 && event->y < height)
{
GdkEvent send_event;
send_event.crossing.type = GDK_ENTER_NOTIFY;
send_event.crossing.window = event->window;
send_event.crossing.time = event->time;
send_event.crossing.send_event = TRUE;
gtk_widget_event (widget, &send_event);
}
}
return FALSE;
}
@@ -1111,6 +1221,7 @@ gtk_menu_reparent (GtkMenu *menu,
}
else
gtk_widget_reparent (GTK_WIDGET (menu), new_parent);
gtk_widget_set_usize (new_parent, -1, -1);
if (was_floating)
GTK_OBJECT_SET_FLAGS (object, GTK_FLOATING);
+12 -1
View File
@@ -117,8 +117,19 @@ GtkWidget* gtk_menu_get_active (GtkMenu *menu);
void gtk_menu_set_active (GtkMenu *menu,
guint index);
void gtk_menu_set_accel_group (GtkMenu *menu,
/* set/get the acclerator group that holds global accelerators (should
* be added to the corresponding toplevel with gtk_window_add_accel_group().
*/
void gtk_menu_set_accel_group (GtkMenu *menu,
GtkAccelGroup *accel_group);
GtkAccelGroup* gtk_menu_get_accel_group (GtkMenu *menu);
/* get the accelerator group that is used internally by the menu for
* underline accelerators while the menu is popped up.
*/
GtkAccelGroup* gtk_menu_get_uline_accel_group (GtkMenu *menu);
GtkAccelGroup* gtk_menu_ensure_uline_accel_group (GtkMenu *menu);
/* A reference count is kept for a widget when it is attached to
* a particular widget. This is typically a menu item; it may also
+14 -7
View File
@@ -63,6 +63,7 @@ static void gtk_real_menu_item_select (GtkItem *item);
static void gtk_real_menu_item_deselect (GtkItem *item);
static void gtk_real_menu_item_activate_item (GtkMenuItem *item);
static gint gtk_menu_item_select_timeout (gpointer data);
static void gtk_menu_item_select_timeout_unlocked (gpointer data);
static void gtk_menu_item_position_menu (GtkMenu *menu,
gint *x,
gint *y,
@@ -552,7 +553,7 @@ gtk_real_menu_item_select (GtkItem *item)
gtk_menu_item_select_timeout,
menu_item);
else
gtk_menu_item_select_timeout (menu_item);
gtk_menu_item_select_timeout_unlocked (menu_item);
if(event) gdk_event_free(event);
}
@@ -628,10 +629,20 @@ gtk_real_menu_item_activate_item (GtkMenuItem *menu_item)
static gint
gtk_menu_item_select_timeout (gpointer data)
{
GtkMenuItem *menu_item;
GDK_THREADS_ENTER ();
gtk_menu_item_select_timeout_unlocked (data);
GDK_THREADS_LEAVE ();
return FALSE;
}
static void
gtk_menu_item_select_timeout_unlocked (gpointer data)
{
GtkMenuItem *menu_item;
menu_item = GTK_MENU_ITEM (data);
menu_item->timer = 0;
@@ -655,10 +666,6 @@ gtk_menu_item_select_timeout (gpointer data)
gtk_menu_shell_select_item (submenu, submenu->children->data);
}
}
GDK_THREADS_LEAVE ();
return FALSE;
}
static void
+50 -39
View File
@@ -137,7 +137,6 @@ static GtkWidget *gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
GdkEvent *event);
static GtkType gtk_menu_shell_child_type (GtkContainer *container);
static void gtk_menu_shell_deselect (GtkMenuShell *menu_shell);
static void gtk_real_menu_shell_move_current (GtkMenuShell *menu_shell,
GtkMenuDirectionType direction);
static void gtk_real_menu_shell_activate_current (GtkMenuShell *menu_shell,
@@ -309,23 +308,20 @@ gtk_menu_shell_insert (GtkMenuShell *menu_shell,
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_MENU_ITEM (child));
gtk_widget_set_parent (child, GTK_WIDGET (menu_shell));
if (GTK_WIDGET_VISIBLE (child->parent))
{
if (GTK_WIDGET_REALIZED (child->parent) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (child->parent) &&
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
}
menu_shell->children = g_list_insert (menu_shell->children, child, position);
if (GTK_WIDGET_VISIBLE (menu_shell))
gtk_widget_queue_resize (GTK_WIDGET (menu_shell));
gtk_widget_set_parent (child, GTK_WIDGET (menu_shell));
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
}
void
@@ -435,15 +431,7 @@ gtk_menu_shell_button_press (GtkWidget *widget,
{
if ((menu_item->parent == widget) &&
(menu_item != menu_shell->active_menu_item))
{
if (menu_shell->active_menu_item)
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
menu_shell->active_menu_item = menu_item;
gtk_menu_item_set_placement (GTK_MENU_ITEM (menu_shell->active_menu_item),
MENU_SHELL_CLASS (menu_shell)->submenu_placement);
gtk_menu_item_select (GTK_MENU_ITEM (menu_shell->active_menu_item));
}
gtk_menu_shell_select_item (menu_shell, menu_item);
}
}
else
@@ -755,7 +743,7 @@ gtk_menu_shell_is_item (GtkMenuShell *menu_shell,
return FALSE;
}
static GtkWidget *
static GtkWidget*
gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
GdkEvent *event)
{
@@ -775,16 +763,15 @@ gtk_menu_shell_get_item (GtkMenuShell *menu_shell,
/* Handlers for action signals */
void
gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item)
gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item)
{
g_return_if_fail (menu_shell != NULL);
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
g_return_if_fail (menu_item != NULL);
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
if (menu_shell->active_menu_item)
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
gtk_menu_shell_deselect (menu_shell);
menu_shell->active_menu_item = menu_item;
gtk_menu_item_set_placement (GTK_MENU_ITEM (menu_shell->active_menu_item),
@@ -798,11 +785,16 @@ gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
gtk_widget_activate (menu_shell->active_menu_item);
}
static void
gtk_menu_shell_deselect (GtkMenuShell *menu_shell)
void
gtk_menu_shell_deselect (GtkMenuShell *menu_shell)
{
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
menu_shell->active_menu_item = NULL;
g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell));
if (menu_shell->active_menu_item)
{
gtk_menu_item_deselect (GTK_MENU_ITEM (menu_shell->active_menu_item));
menu_shell->active_menu_item = NULL;
}
}
void
@@ -810,6 +802,7 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item,
gboolean force_deactivate)
{
GSList *slist, *shells = NULL;
gboolean deactivate = force_deactivate;
g_return_if_fail (menu_shell != NULL);
@@ -818,12 +811,23 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
g_return_if_fail (GTK_IS_MENU_ITEM (menu_item));
if (!deactivate)
{
deactivate = GTK_MENU_ITEM_CLASS (GTK_OBJECT (menu_item)->klass)->hide_on_activate;
}
deactivate = GTK_MENU_ITEM_CLASS (GTK_OBJECT (menu_item)->klass)->hide_on_activate;
gtk_widget_ref (GTK_WIDGET (menu_shell));
if (deactivate)
{
GtkMenuShell *parent_menu_shell = menu_shell;
do
{
gtk_widget_ref (GTK_WIDGET (parent_menu_shell));
shells = g_slist_prepend (shells, parent_menu_shell);
parent_menu_shell = (GtkMenuShell*) parent_menu_shell->parent_menu_shell;
}
while (parent_menu_shell);
shells = g_slist_reverse (shells);
gtk_menu_shell_deactivate (menu_shell);
/* flush the x-queue, so any grabs are removed and
@@ -831,10 +835,17 @@ gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
*/
gdk_flush ();
}
gtk_widget_activate (menu_item);
if (deactivate)
gtk_signal_emit (GTK_OBJECT (menu_shell), menu_shell_signals[SELECTION_DONE]);
for (slist = shells; slist; slist = slist->next)
{
gtk_signal_emit (slist->data, menu_shell_signals[SELECTION_DONE]);
gtk_widget_unref (slist->data);
}
g_slist_free (shells);
gtk_widget_unref (GTK_WIDGET (menu_shell));
}
/* Distance should be +/- 1 */
+1
View File
@@ -94,6 +94,7 @@ void gtk_menu_shell_insert (GtkMenuShell *menu_shell,
void gtk_menu_shell_deactivate (GtkMenuShell *menu_shell);
void gtk_menu_shell_select_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item);
void gtk_menu_shell_deselect (GtkMenuShell *menu_shell);
void gtk_menu_shell_activate_item (GtkMenuShell *menu_shell,
GtkWidget *menu_item,
gboolean force_deactivate);
+42 -14
View File
@@ -94,6 +94,7 @@ static void gtk_notebook_get_arg (GtkObject *object,
static void gtk_notebook_map (GtkWidget *widget);
static void gtk_notebook_unmap (GtkWidget *widget);
static void gtk_notebook_realize (GtkWidget *widget);
static void gtk_notebook_unrealize (GtkWidget *widget);
static void gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_notebook_size_allocate (GtkWidget *widget,
@@ -284,6 +285,7 @@ gtk_notebook_class_init (GtkNotebookClass *class)
widget_class->map = gtk_notebook_map;
widget_class->unmap = gtk_notebook_unmap;
widget_class->realize = gtk_notebook_realize;
widget_class->unrealize = gtk_notebook_unrealize;
widget_class->size_request = gtk_notebook_size_request;
widget_class->size_allocate = gtk_notebook_size_allocate;
widget_class->draw = gtk_notebook_draw;
@@ -564,6 +566,29 @@ gtk_notebook_realize (GtkWidget *widget)
gtk_notebook_panel_realize (notebook);
}
static void
gtk_notebook_unrealize (GtkWidget *widget)
{
GtkNotebook *notebook;
GdkWindowAttr attributes;
gint attributes_mask;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_NOTEBOOK (widget));
notebook = GTK_NOTEBOOK (widget);
if (notebook->panel)
{
gdk_window_set_user_data (notebook->panel, NULL);
gdk_window_destroy (notebook->panel);
notebook->panel = NULL;
}
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
(* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
static void
gtk_notebook_size_request (GtkWidget *widget,
GtkRequisition *requisition)
@@ -3620,15 +3645,20 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
gtk_notebook_switch_focus_tab (notebook, NULL);
}
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (notebook))
{
if (GTK_WIDGET_REALIZED (notebook) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (notebook) &&
!GTK_WIDGET_MAPPED (child) && notebook->cur_page == page)
gtk_widget_map (child);
if (GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_MAPPED (notebook) &&
!GTK_WIDGET_MAPPED (child) &&
notebook->cur_page == page)
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
if (tab_label)
{
@@ -3636,11 +3666,11 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
{
if (!GTK_WIDGET_VISIBLE (tab_label))
gtk_widget_show (tab_label);
if (GTK_WIDGET_REALIZED (notebook) &&
!GTK_WIDGET_REALIZED (tab_label))
gtk_widget_realize (tab_label);
if (GTK_WIDGET_MAPPED (notebook) &&
!GTK_WIDGET_MAPPED (tab_label))
gtk_widget_map (tab_label);
@@ -3649,9 +3679,6 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
gtk_widget_hide (tab_label);
}
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (notebook))
gtk_widget_queue_resize (child);
}
void
@@ -3659,10 +3686,10 @@ gtk_notebook_remove_page (GtkNotebook *notebook,
gint page_num)
{
GList *list;
g_return_if_fail (notebook != NULL);
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
if (page_num >= 0)
{
list = g_list_nth (notebook->children, page_num);
@@ -3967,6 +3994,7 @@ gtk_notebook_set_scrollable (GtkNotebook *notebook,
}
else if (notebook->panel)
{
gdk_window_set_user_data (notebook->panel, NULL);
gdk_window_destroy (notebook->panel);
notebook->panel = NULL;
}
+43
View File
@@ -670,6 +670,49 @@ gtk_object_getv (GtkObject *object,
gtk_object_arg_get (object, args, NULL);
}
void
gtk_object_get (GtkObject *object,
const gchar *first_arg_name,
...)
{
va_list var_args;
gchar *name;
g_return_if_fail (GTK_IS_OBJECT (object));
va_start (var_args, first_arg_name);
name = (gchar*) first_arg_name;
while (name)
{
gpointer value_pointer = va_arg (var_args, gpointer);
if (value_pointer)
{
GtkArgInfo *info;
gchar *error;
GtkArg arg;
error = gtk_arg_get_info (GTK_OBJECT_TYPE (object),
object_arg_info_ht,
name,
&info);
if (error)
{
g_warning ("gtk_object_get(): %s", error);
g_free (error);
return;
}
arg.name = name;
gtk_object_arg_get (object, &arg, info);
gtk_arg_to_valueloc (&arg, value_pointer);
}
name = va_arg (var_args, gchar*);
}
}
void
gtk_object_set (GtkObject *object,
const gchar *first_arg_name,
+8
View File
@@ -243,6 +243,14 @@ void gtk_object_destroy (GtkObject *object);
void gtk_object_getv (GtkObject *object,
guint n_args,
GtkArg *args);
/* gtk_object_get() sets the variable values pointed to by the adresses
* passed after the argument names according to the arguments value.
* if GTK_FUNDAMENTAL_TYPE (arg->type) == GTK_TYPE_STRING, it's
* the callers response to do a g_free (retrived_value);
*/
void gtk_object_get (GtkObject *object,
const gchar *first_arg_name,
...);
/* gtk_object_set() takes a variable argument list of the form:
* (..., gchar *arg_name, ARG_VALUES, [repeatedly name/value pairs,] NULL)
+17 -26
View File
@@ -636,20 +636,16 @@ gtk_packer_add_defaults (GtkPacker *packer,
gtk_widget_set_parent (child, GTK_WIDGET (packer));
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (packer)))
{
if (GTK_WIDGET_REALIZED (GTK_WIDGET (packer)) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (GTK_WIDGET (packer)) &&
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
}
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (packer))
gtk_widget_queue_resize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
}
void
@@ -690,20 +686,16 @@ gtk_packer_add (GtkPacker *packer,
gtk_widget_set_parent (child, GTK_WIDGET (packer));
if (GTK_WIDGET_VISIBLE (GTK_WIDGET (packer)))
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_REALIZED (GTK_WIDGET (packer)) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (GTK_WIDGET (packer)) &&
!GTK_WIDGET_MAPPED (child))
gtk_widget_map (child);
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (packer))
gtk_widget_queue_resize (child);
}
void
@@ -979,7 +971,6 @@ gtk_packer_size_request (GtkWidget *widget,
gint nvis_horz_children;
gint width, height;
gint maxWidth, maxHeight;
GtkRequisition child_requisition;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_PACKER (widget));
+48 -47
View File
@@ -308,69 +308,63 @@ gtk_paned_add2 (GtkPaned *paned,
void
gtk_paned_pack1 (GtkPaned *paned,
GtkWidget *widget,
GtkWidget *child,
gboolean resize,
gboolean shrink)
{
g_return_if_fail (paned != NULL);
g_return_if_fail (GTK_IS_PANED (paned));
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
if (!paned->child1)
{
gtk_widget_set_parent (widget, GTK_WIDGET (paned));
if (GTK_WIDGET_VISIBLE (widget->parent))
{
if (GTK_WIDGET_REALIZED (widget->parent) &&
!GTK_WIDGET_REALIZED (widget))
gtk_widget_realize (widget);
if (GTK_WIDGET_MAPPED (widget->parent) &&
!GTK_WIDGET_MAPPED (widget))
gtk_widget_map (widget);
}
paned->child1 = widget;
paned->child1 = child;
paned->child1_resize = resize;
paned->child1_shrink = shrink;
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (paned))
gtk_widget_queue_resize (widget);
gtk_widget_set_parent (child, GTK_WIDGET (paned));
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
}
}
void
gtk_paned_pack2 (GtkPaned *paned,
GtkWidget *widget,
GtkWidget *child,
gboolean resize,
gboolean shrink)
{
g_return_if_fail (paned != NULL);
g_return_if_fail (GTK_IS_PANED (paned));
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_WIDGET (child));
if (!paned->child2)
{
gtk_widget_set_parent (widget, GTK_WIDGET (paned));
if (GTK_WIDGET_VISIBLE (widget->parent))
{
if (GTK_WIDGET_REALIZED (widget->parent) &&
!GTK_WIDGET_REALIZED (widget))
gtk_widget_realize (widget);
if (GTK_WIDGET_MAPPED (widget->parent) &&
!GTK_WIDGET_MAPPED (widget))
gtk_widget_map (widget);
}
paned->child2 = widget;
paned->child2 = child;
paned->child2_resize = resize;
paned->child2_shrink = shrink;
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (paned))
gtk_widget_queue_resize (widget);
gtk_widget_set_parent (child, GTK_WIDGET (paned));
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
gtk_widget_queue_resize (child);
}
}
}
@@ -455,9 +449,13 @@ gtk_paned_set_position (GtkPaned *paned,
if (position >= 0)
{
paned->child1_size = CLAMP (position,
paned->min_position,
paned->max_position);
/* We don't clamp here - the assumption is that
* if the total allocation changes at the same time
* as the position, the position set is with reference
* to the new total size. If only the position changes,
* then clamping will occur in gtk_paned_compute_position()
*/
paned->child1_size = position;
paned->position_set = TRUE;
}
else
@@ -525,13 +523,16 @@ gtk_paned_compute_position (GtkPaned *paned,
}
else
{
if (paned->last_allocation < 0)
paned->last_allocation = allocation;
if (paned->child1_resize && !paned->child2_resize)
paned->child1_size += (allocation - paned->last_allocation);
else if (!(!paned->child1_resize && paned->child2_resize))
paned->child1_size = allocation * ((gdouble)paned->child1_size / (paned->last_allocation));
/* If the position was set before the initial allocation.
* (paned->last_allocation < 0) just clamp it and leave it.
*/
if (paned->last_allocation >= 0)
{
if (paned->child1_resize && !paned->child2_resize)
paned->child1_size += (allocation - paned->last_allocation);
else if (!(!paned->child1_resize && paned->child2_resize))
paned->child1_size = allocation * ((gdouble)paned->child1_size / (paned->last_allocation));
}
}
paned->child1_size = CLAMP (paned->child1_size,
-1
View File
@@ -43,7 +43,6 @@ extern "C" {
typedef struct _GtkPlug GtkPlug;
typedef struct _GtkPlugClass GtkPlugClass;
typedef struct _GtkPlugButton GtkPlugButton;
struct _GtkPlug
+5 -3
View File
@@ -288,9 +288,9 @@ gtk_rc_append_default_module_path(void)
module_path[n++] = g_strdup(path);
g_free(path);
var = getenv("HOME");
var = g_get_home_dir ();
if (var)
path = g_strdup_printf("%s%s", var, ".gtk/lib/themes/engines");
path = g_strdup_printf("%s%s", var, "/.gtk/lib/themes/engines");
module_path[n++] = g_strdup(path);
module_path[n] = NULL;
g_free(path);
@@ -388,7 +388,7 @@ gtk_rc_init (void)
gchar *locale_suffixes[3];
gint n_locale_suffixes = 0;
gint i, j;
#ifdef HAVE_LC_MESSAGES
#if defined (HAVE_LC_MESSAGES) && !defined (X_LOCALE)
char *locale = setlocale (LC_MESSAGES, NULL);
#else
char *locale = setlocale (LC_CTYPE, NULL);
@@ -1144,6 +1144,8 @@ gtk_rc_style_init (GSList *rc_styles)
g_hash_table_insert (realized_style_ht, rc_styles, style);
}
else
g_slist_free (rc_styles);
return style;
}
+8
View File
@@ -0,0 +1,8 @@
# RC file for locales using iso-8859-2
style "gtk-default-iso-8859-2" {
fontset = "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1,\
-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-2"
}
class "GtkWidget" style "gtk-default-iso-8859-2"
+8 -11
View File
@@ -900,8 +900,8 @@ gtk_scrolled_window_add (GtkContainer *container,
scrolled_window = GTK_SCROLLED_WINDOW (container);
gtk_widget_set_parent (child, GTK_WIDGET (bin));
bin->child = child;
gtk_widget_set_parent (child, GTK_WIDGET (bin));
/* this is a temporary message */
if (!gtk_widget_set_scroll_adjustments (child,
@@ -910,19 +910,16 @@ gtk_scrolled_window_add (GtkContainer *container,
g_warning ("gtk_scrolled_window_add(): cannot add non scrollable widget "
"use gtk_scrolled_window_add_with_viewport() instead");
if (GTK_WIDGET_VISIBLE (child->parent))
if (GTK_WIDGET_REALIZED (child->parent))
gtk_widget_realize (child);
if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
if (GTK_WIDGET_REALIZED (child->parent) &&
!GTK_WIDGET_REALIZED (child))
gtk_widget_realize (child);
if (GTK_WIDGET_MAPPED (child->parent) &&
!GTK_WIDGET_MAPPED (child))
if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
}
if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (container))
gtk_widget_queue_resize (child);
gtk_widget_queue_resize (child);
}
}
static void
+23 -9
View File
@@ -837,6 +837,8 @@ gtk_selection_request (GtkWidget *widget,
gint length;
mult_atoms = NULL;
gdk_error_trap_push();
if (!gdk_property_get (info->requestor, event->property, 0, /* AnyPropertyType */
0, GTK_SELECTION_MAX_SIZE, FALSE,
&type, &format, &length, &mult_atoms))
@@ -847,6 +849,7 @@ gtk_selection_request (GtkWidget *widget,
g_free (info);
return TRUE;
}
gdk_error_trap_pop();
info->num_conversions = length / (2*sizeof (GdkAtom));
info->conversions = g_new (GtkIncrConversion, info->num_conversions);
@@ -957,9 +960,19 @@ gtk_selection_request (GtkWidget *widget,
mult_atoms, 2*info->num_conversions);
g_free (mult_atoms);
}
gdk_selection_send_notify (event->requestor, event->selection, event->target,
event->property, event->time);
if (info->num_conversions == 1 &&
info->conversions[0].property == GDK_NONE)
{
/* Reject the entire conversion */
gdk_selection_send_notify (event->requestor, event->selection,
event->target, GDK_NONE, event->time);
}
else
{
gdk_selection_send_notify (event->requestor, event->selection,
event->target, event->property, event->time);
}
if (info->num_incrs == 0)
{
@@ -1162,7 +1175,7 @@ gtk_selection_notify (GtkWidget *widget,
{
GList *tmp_list;
GtkRetrievalInfo *info = NULL;
guchar *buffer;
guchar *buffer = NULL;
gint length;
GdkAtom type;
gint format;
@@ -1183,8 +1196,12 @@ gtk_selection_notify (GtkWidget *widget,
if (!tmp_list) /* no retrieval in progress */
return FALSE;
if (event->property == GDK_NONE)
if (event->property != GDK_NONE)
length = gdk_selection_property_get (widget->window, &buffer,
&type, &format);
if (event->property == GDK_NONE || buffer == NULL)
{
current_retrievals = g_list_remove_link (current_retrievals, tmp_list);
g_list_free (tmp_list);
@@ -1195,9 +1212,6 @@ gtk_selection_notify (GtkWidget *widget,
return TRUE;
}
length = gdk_selection_property_get (widget->window, &buffer,
&type, &format);
if (type == gtk_selection_atoms[INCR])
{
/* The remainder of the selection will come through PropertyNotify
+1 -1
View File
@@ -1768,7 +1768,7 @@ gtk_signal_connect_by_type (GtkObject *object,
handler = gtk_signal_handler_new ();
handler->id = gtk_handler_id++;
handler->signal_id = signal_id;
handler->object_signal = object_signal;
handler->object_signal = object_signal != FALSE;
handler->func = func;
handler->func_data = func_data;
handler->destroy_func = destroy_func;

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