Commit Graph

320 Commits

Author SHA1 Message Date
Tim Janik
518a8a9c4e reimplemented the signal storage system to use a linear array rather than
Wed May  6 02:16:34 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c: reimplemented the signal storage system to use a
        linear array rather than a hash table.
        be carefull *not* to keep any GtkSignal pointers across invokations
        of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
        general code cleanups, made all allocations through memchunks.
        (gtk_signal_lookup): we now do the lookup of signals through a key_id
        for the signal names to avoid multiple hashing of the signal name on
        lookups for the several hirarchy levels of an object.

Tue May  5 15:33:27 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
        checking for signal initialization in gtksignal.c.

        * gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
        a long debugging period ;)

Mon May  4 00:30:11 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
        gtk_type_is_a().
        * gtk/gtktypeutils.c: reimplemented the type storage system to use a
        linear array rather than a hash table. it actually speeded up testgtk
        for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
        pointers across invokations of gtk_type_node_next_and_invalidate() and
        therefore gtk_type_unique()!

        * gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
        inheritance of a class pointer.
        (GTK_OBJECT): modifications for speedups.
        (GTK_IS_OBJECT): likewise.
        (GTK_OBJECT_CLASS): likewise.
        (suggested by owen).

        * gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.

        * gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.

        * gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
        since its derivation changed 4 month ago ;(. showed up with the unique
        type name checking code in gtk_type_unique().

        * random guint->GtkType and macro fixups.
1998-05-06 01:43:56 +00:00
Owen Taylor
4851efe296 configure.in acheader.h gdk/gdkwindow.c Check for Shape extension both on
Sun May  3 13:38:22 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in acheader.h gdk/gdkwindow.c
	Check for Shape extension both on the client and server
	side. (And, more importantly, check for the shape extension
	so we may include -lXext even when compiling with --disable-xshm)

	Don't set override_redirect on all shaped windows. It isn't
	necessary.

	* gdk/gdkwindow.c: Set ->colormap to NULL for root
	and foreign windows. Use this to check if we
	need to get the colormap from X.

Fri May  1 22:32:47 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkbutton.c (gtk_button_paint): Draw the areas
	between the default and the button always in GTK_STATE_NORMAL.

	* gtk/gtkrange.c (gtk_range_style_set): Added a style_set
	callback.

Fri May  1 16:40:57 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkpixmap.c (gdk_pixmap_colormap_create_from_xpmp[_d]):
	  Fix a buffer overflow on pixmaps that claim to have
	  more than 31 characters per pixel.

	  (gdk_pixmap_read_string): Don't wrap around strings longer
 	  than half of address space ;-)

	* gtk/gtk[vh]ruler.c gtk/gtkinputdialog.c: Expand some buffers
	that were used for printing integers.

	* */* (almost):

	Style: All
	  int foo () { ... }
	changed to
	  int foo (void) { ... }

^^^^^^^ This is why some many files changed

	Even where there were proper prototypes elsewhere.

	* gdk/gxid.c (handle_claim_device): Some extra checks.
	It isn't safe against being fed bad X id's, but at
	least it should be safe against deleting all your
	files.
1998-05-03 22:41:32 +00:00
PDT 1998 Shawn T. Amundson
92006c8e78 Changed LGPL address for FSF in all .h and .c files
Sun Apr 12 18:54:29 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Changed LGPL address for FSF in all .h and .c files
1998-04-13 02:02:47 +00:00
Owen Taylor
1c77b5f926 Removed, because that's what a NULL comparison function means. And it
Tue Apr  7 19:36:48 1998  Owen Taylor  <owt1@cornell.edu>

	* gutils.c (g_direct_compare): Removed, because that's what
	a NULL comparison function means. And it wasn't 64 bit safe.

Tue Apr  7 19:14:03 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdkpixmap.c: Added maximum field widths to prevent
	possible '%s' scanf overflows. Replaced scanf("%c")
	with getc(), Don't interpret /*/ as a full comment. Use
	g_realloc/g_new.

	* gtk/gtkwidget.h gtk/gtkprivate.h: Changed all flag
	tests to check for ((GTK_WIDGET_FLAGS(widget) & FLAG) != 0)
	instead of (GTK_WIDGET_FLAGS(widget) & FLAG)

	* gtk/gtkfilesel.c: Use getwd() instead of getcwd() on
	SunOS, because getcwd() hangs up in a wait4().
	(Found by David Monniaux <monniaux@clipper.ens.fr>)

	- Check device/inode/mtime not just inode/mtime, when
	caching scanned directories.
	(From: scottk@ig.utexas.edu (Scott Kempf))

	* gdk/gdkpixmap.c: Check for 0 width/height when
	creating pixmaps.

	* gtk/*.c: Global substitution of recently introduced
	"MAX (0," for allocations to "MAX (1,", since
	creating a backing pixmap with a zero width or height
	fails.

	* gdk/gdkwindow.c (gdk_window_new): Don't set all the
	WM properties for child windows. Don't set the base
	size, since the value we set will be taken as a minimum
	size.
1998-04-07 23:59:25 +00:00
Elliot Lee
39a05c0b55 gtk_button_remove(): When removing a child widget from a button, we don't
gtk_button_remove():
	When removing a child widget from a button, we don't want to check
	the child's visibility after removal (for the purpose of knowing
	whether a queue_resize is needed), we want to check it *before*,
	because the child may be destroyed during the
	gtk_widget_unparent()

	The diff is clearer than this stupid log message. :)
1998-04-07 19:51:06 +00:00
Owen Taylor
0f9fe89727 Take border in account properly.
Mon Apr  6 08:05:23 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkbutton.c (gtk_button_paint): Take border in
	account properly.

	* gtk/gtktext.c (gtk_text_realize): Don't recompute
	geometry when creating with initial 1x1 geometry,
	since our calculations can't handle that. Leave
	text->line_start_cache NULL as sign we don't have
	a real geometry yet.

	* gtk/gtkentry.c (gtk_entry_motion_notify): Use the x
	value we get from gdk_window_get_pointer, not from
	event->x - since we always specify OwnerGrabButtonMask
	(why???), event->x can refer to another window.
1998-04-06 12:59:06 +00:00
Owen Taylor
20fee708a3 Fixed assignment of adjustment->value to negative values. Moved a few
Sun Apr  5 19:30:23 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkclist.c: Fixed assignment of adjustment->value
	to negative values. Moved a few other allocation type things
	around in ways that may or may matter. Fixed some allocation
	errors (scrollbars were overlapping main window).

	* gtk/gtkbutton.c (gtk_real_button_released): Small hack to keep
	button labels from vanishing when the invoked operation blocks.

	* gtk/gtkbox.c (gtk_box_remove): Assigning GTK_WIDGET_VISIBLE (widget)
	to a gboolean (char) is _bad_. GTK_VISIBLE == 256.
1998-04-05 23:30:26 +00:00
Owen Taylor
32cd050cfe More extensive debugging output
Fri Apr  3 17:14:55 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdk.c: More extensive debugging output

	* gtk/gtkalignment.c gtk/gtkbutton.c gtk/gtkcheckbutton.c
	  gtk/gtkclist.c gtk/gtkeventbox.c gtk/gtkhandlebox.c
	  gtk/gtk[hv]box.c gtk/gtk[hv]paned.c gtk/gtklist.c
	  gtk/gtkmenu.c gtk/gtkmenubar.c gtk/gtkmenuitem.c
	  gtk/gtknotebook.c gtk/gtktable.c gtk/gtktree.c
	  gtk/gtktreeitem.c gtk/gtkviewport.c

	Avoid assigning negative values to unsigned allocation.width and
	height

	* gtk/gtkwindow.c:

	Instead of realizing the widget, then size allocating, (resulting
	in XMoveResizeWindows for all children, do the size allocation
	first, then realize.

	In gtk_real_window_move_resize, combine move and resize
	into a single GDK/X call when possible.

	* gtk/gtkclist.c gtk/gtkdrawingarea.c:

	Remove assumption that the widget will be size allocated _after_
	it is realized.

	* gtk/gtklist.c (gtk_list_motion_notify): Removed useless
	debugging message.
1998-04-03 23:17:16 +00:00
Tim Janik
c2906f2bea always display the correct active state.
Thu Mar 26 21:37:57 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkradiobutton.c (gtk_radio_button_draw_indicator): always
                display the correct active state.

                        * gtk/gtkcheckbutton.c (gtk_real_check_button_draw_indicator): always
                                display the correct active state.

                                        * gtk/gtkwidget.c (gtk_widget_set_arg): CAN_FOCUS and CAN_DEFAULT flag
                                                changes need to queue a resize.

                                                        * gtk/gtkbutton.c (gtk_button_paint): take border_width into
                                                                consideration for restrict area.

                                                                        * gtk/gtktogglebutton.c (gtk_toggle_button_class_init): enable the
                                                                                draw_default member of GtkButton, otherwise the diplay is messed up
                                                                                        for CAN_DEFAULT toggles.
                                                                                                (gtk_toggle_button_draw_focus): always display whether the toggle button
                                                                                                        is active or not.

                                                                                                                * gtk/gtkwidget.c (gtk_widget_set_state):
                                                                                                                        (gtk_widget_set_sensitive):
                                                                                                                                (gtk_widget_set_parent):
                                                                                                                                        (gtk_widget_propagate_state): take into consideration, whether we really
                                                                                                                                                want to change childrens states, or just restauration of old states.
1998-03-26 21:57:45 +00:00
Owen Taylor
34e324ca70 /home/otaylor/commit 1998-03-24 01:43:21 +00:00
Tim Janik
d187183161 made the <widget>_signals[] arrays of type guint rather than gint. made
Mon Mar  9 15:48:10 1998  Tim Janik  <timj@gimp.org>

        * Signal signedness and naming corrections, plus GtkType fixes:

        * gtk/gtkadjustment.c:
        * gtk/gtkbutton.c:
        * gtk/gtkcheckmenuitem.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcontainer.c:
        * gtk/gtkcurve.c:
        * gtk/gtkdata.c:
        * gtk/gtkeditable.c:
        * gtk/gtkentry.c:
        * gtk/gtkhandlebox.c:
        * gtk/gtkinputdialog.c:
        * gtk/gtkitem.c:
        * gtk/gtklist.c:
        * gtk/gtkmenuitem.c:
        * gtk/gtkmenushell.c:
        * gtk/gtknotebook.c:
        * gtk/gtkstatusbar.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktree.c:
        * gtk/gtktreeitem.c:
        * gtk/gtkwidget.c:
        * gtk/gtktogglebutton.c:
        * gtk/gtkwindow.c:
        made the <widget>_signals[] arrays of type guint rather than gint.
        * gtk/gtkwidget.c (gtk_widget_get_ancestor): made widget_type a GtkType.

        * gtk/gtkcombo.h:
        handler ids need to be of type guint (entry_change_id, list_change_id).

        * gtk/gtkaccelerator.c:
        changed signal_num to signal_id and typed it guint.

        * gtk/gtkmain.c: made gtk_ndebug_keys a guint.

        * gtk/gtkmenu.h:
        * gtk/gtkmenu.c:
        (gtk_menu_popup): made button a guint.
        (gtk_menu_set_active): made index a guint.

        * gtk/gtkmenuitem.h:
        * gtk/gtkmenuitem.c:
        made accelerator_signal a guint.

        * gtk/gtkoptionmenu.h:
        * gtk/gtkoptionmenu.c:
        (gtk_option_menu_set_history): made index a guint.

        * gtk/gtksignal.h:
        * gtk/gtksignal.c:
        * gtk/gtkobject.h:
        * gtk/gtkobject.c: changed a bunch of prototypes to take guints rather
        than gints. also made some conversions from guint to GtkType, left over
        from when the fundamental-types system was introduced.

        * gtk/gtkobject.h:
        * gtk/gtkobject.c: made object_data_id_index and obj_count guints.
        made *signals and nsignals guints in GtkObjectClass.
1998-03-09 15:16:28 +00:00
Tim Janik
0ef453b82c present the argument access masks on their announcement.
Thu Feb 19 06:56:52 1998  Tim Janik  <timj@gimp.org>

        * gtkbox.c:
        * gtkbutton.c:
        * gtkcontainer.c:
        * gtkframe.c:
        * gtklabel.c:
        * gtkobject.c:
        * gtkwidget.c:
        * gtkwindow.c:
        present the argument access masks on their announcement.

        * gtk/gtkobject.h:
        * gtk/gtkobject.c:
        (gtk_object_add_arg_type): take an additional argument describing
        the access mask of the new arg. this can be of GTK_ARG_READABLE,
        GTK_ARG_WRITABLE or GTK_ARG_READWRITE (the latter is an alias for
        the two previous ones).
        (gtk_object_query_args): provide an access_mask array if desired.

        * gtk/gtkwidget.c (gtk_widget_real_realize):
        realized the assumtion that widget is a NO_WINDOW widget
        in actuall code.

        * gtkwindow.c:
        slight changes to gtk_window_configure_event that will make
        the resizing behaviour a little less odd.
        sigh, for some (buggy) reason, there are still container resizes
        triggered by manual resizing to very small window sizes.
        the cointainer resizes will cause gtk_real_window_move_resize to
        be invoked, which makes the app look like it wants to fight the users
        resizing action. ;(
1998-02-19 07:18:42 +00:00
Tim Janik
b45cd0430c attach/detach to menu widget via
Tue Feb  3 15:09:55 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkoptionmenu.h:
        * gtk/gtkoptionmenu.c: attach/detach to menu widget via

        * gtk/gtkmenu.h:
        * gtk/gtkmenu.c: new functions gtk_menu_attach_to_widget
          and gtk_menu_detach that correspond to the action of
          gtk_widget_set_parent and gtk_widget_unparent.

        * gtk/widget.c: few fixups.
1998-02-03 14:13:05 +00:00
Tim Janik
4af33fa24d hm, initital refcount revolution commit ;)
still some gnits left, but keep working on it ;)
-timj
1998-01-30 23:47:09 +00:00
Tim Janik
fb48f5a356 some gtk_*_set_arg fixes
-timj
1998-01-21 23:03:11 +00:00
Owen Taylor
11d37c5067 gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
Sun Jan 18 09:57:00 1998  Owen Taylor  <owt1@cornell.edu>
* gtkbutton.c gtkclist.c gtkdrawingarea.c gtkentry.c gtkeventbox.c
  gtkfixed.c gtkhandlebox.c gtkhscale.c gtkhscrollbar.c gtkitem.c
  gtklist.c gtkmenushell.c gtkmisc.c gtknotebook.c gtkpaned.c
  gtkpreview.c gtkprogressbar.c gtkruler.c gtktext.c gtktree.c
  gtkviewport.c gtkvscale.c gtkvscrollbar.c gtkwidget.{c,h}

  Added gtk_widget_set_parent and gtk_widget_get_parent. All
  widgets should use:

   gtk_widget_get_parent() instead of widget->parent->window.

  Any widget that wants to have children not in the parent window,
  should use gtk_widget_set_parent () in their realize() and
  add () routines.

  CList and Viewport widgets changed to do this. (Viewport
  widget using code from gtk-fortier-980117-0.patch.)
1998-01-18 15:09:10 +00:00
Tim Janik
97f11c694c implementation of gtk_widget_get()
-timj
1998-01-16 05:11:10 +00:00
Tim Janik
dd77b5db5a main part for GtkArgSetFunc/GtkArgGetFunc implementation.
-timj
1998-01-16 00:49:51 +00:00
Shawn Amundson
8eb36ebbd5 Several portability fixes from Michael Callahan <callahan@xmission.com>
* Several portability fixes from Michael Callahan
          <callahan@xmission.com> including adding in missing
          #includes and adding void in function prototypes.

-Shawn
1998-01-03 05:46:58 +00:00
Elliot Lee
9508b76bd2 Initial revision 1997-11-24 22:37:52 +00:00