Commit Graph

79 Commits

Author SHA1 Message Date
Tim Janik
a7b3b116a9 added a function to perform a binary version check, returning a static
Fri Aug 21 02:31:26 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.h:
        * gtk/gtkmain.c (gtk_check_version): added a function to perform a
        binary version check, returning a static string for error descriptions,
        or NULL on success.
1998-08-21 02:22:06 +00:00
Tim Janik
38db8d1951 allow argument parsing in gtk without G_ENABLE_DEBUG being defined
Wed Aug 19 00:11:14 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): allow argument parsing in gtk without
        G_ENABLE_DEBUG being defined (specifically --gtk-module= and
        --g-fatal-warnings), noticed by miguel.
1998-08-18 22:22:22 +00:00
Tim Janik
49dfa78e74 use g_get_current_dir() instead of getcwd().
Tue Aug 18 17:54:40 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkrc.c (gtk_rc_parse_file): use g_get_current_dir() instead of
        getcwd().

        * gdk/gdkprivate.h:
        * gdk/gdkglobals.c:
        * gdk/gdkwindow.c:
        * gdk/gdk.c:
        * gtk/gtkwindow.c:
        * gtk/gtkitemfactory.c:
        dropped gdk_progname, use g_get_prgname()/g_set_prgname() instead.

        * gtk/gtkselection.c:
        * gtk/gtkpreview.c:
        * gtk/gtkobject.c:
        * gtk/gtkmain.c:
        * gtk/gtktypeutils.c: indentation fixes due to g_message() use.

        * gdk/gdkrgb.c: exchanged occourances of g_print with g_message.
1998-08-18 16:58:09 +00:00
Tim Janik
7f2909bbab restricted the --g*fatal-* arguments to --g-fatal-warnings again. this
Tue Aug 18 03:54:43 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): restricted the --g*fatal-* arguments
        to --g-fatal-warnings again. this option now causes log levels of
        WARNING and CRITICAL to abort().

        * gdk/gdk.c:
        * gdk/gdkdnd.c:
        * gdk/gdkcc.c:
        * gdk/gdkfont.c:
        * gdk/gdkwindow.c:
        * gdk/gdkvisual.c:
        * gtk/gtkwidget.c:
        * gtk/gtktypeutils.c:
        * gtk/gtktree.c:
        * gtk/gtkfontsel.c:
        * gtk/gtkmain.c:
        * gtk/gtkobject.c:
        * gtk/gtkpreview.c:
        * gtk/gtkselection.c:
        * gtk/gtktext.c:
        * gtk/gtktree.c:
        * gtk/gtktreeitem.c:
        did a global search&replace to substitute g_print() calls with
        g_message(). libraries shouldn't use printf(), g_print() or
        g_printerr() at all.
        a bunch of the replacements should probably be wrapped into the
        G{D|T}K_NOTE() macros, so they are special cased for debugging
        purposes in a sane way, avoiding all the nasty #ifdef DEBUG_MY_TEDDY
        things.

        * gdk/gdkrgb.c: left this out currently.

        * gdk/gdkdnd.c: added copyright notice.
1998-08-18 03:59:41 +00:00
Tim Janik
47215ba403 removed gtk_input_add_interp.
Mon Aug 17 15:31:38 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c: removed gtk_input_add_interp.

        * gtk/gtkeditable.c (gtk_editable_set_position): fixed bogus "return"
        keyword.
        (gtk_editable_get_event_time): fix default: case.

        * gtk/gtkclist.c (gtk_clist_swap_rows): fixes for lvalue casts.

        * gdk/gdkpixmap.c: made a bunch of unexported functions static.

        * gdk/gdkcolor.c:
        * gdk/gdkvisual.c: include "gdkx.h", since it exports prototypes
        of our functions.

        * various minor compilation cleanups, such as bogus commas in
        enums and similar things.

M
1998-08-17 14:48:51 +00:00
Tim Janik
d2716f8bfd NULL terminate the arg list to g_strconcat() (thanx raph).
Mon Aug 17 07:47:43 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): NULL terminate the arg list to g_strconcat()
        (thanx raph).
1998-08-17 05:49:13 +00:00
Tim Janik
fe63fe5da9 don't call module initializers multiple times. changed --gtk-with-module
Mon Aug 17 05:10:29 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): don't call module initializers multiple
        times. changed --gtk-with-module to --gtk-module at owen's request.
1998-08-17 03:12:10 +00:00
Tim Janik
2b7f8016b5 feature a new commandline option --gtk-with-module=<module> that allows
Mon Aug 17 03:47:55 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): feature a new commandline option
        --gtk-with-module=<module> that allows additional loading and
        initialization of modules (e.g. GLE).
1998-08-17 02:41:42 +00:00
Tim Janik
7b9b0ab0fa version bump to 1.1.1, binary age 0, interface age 0. pass "gmodule" to
Mon Aug 17 01:40:00 1998  Tim Janik  <timj@gtk.org>

        * configure.in: version bump to 1.1.1, binary age 0, interface age 0.
        pass "gmodule" to AM_PATH_GLIB, with that we require libgmodule.so now.

        * gtk/gtkmain.c (gtk_init): since glib's g_return*_if_fail macros log
        with G_LOG_LEVEL_CRITICAL now, i added "--g-fatal-checks",
        "--gdk-fatal-checks" and "--gtk-fatal-checks". that makes up six
        different *-fatal-* arguments now. this needs to be revised and
        compressed to a reasonable amount of arguments.
1998-08-17 00:40:55 +00:00
Tim Janik
31de6ff4e0 fatal warning option is split up now, "--g-fatal-warnings" causes fatal
Sun Aug 16 20:51:59 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): fatal warning option is split up now,
        "--g-fatal-warnings" causes fatal warnings in GLib,
        "--gdk-fatal-warnings" causes fatal warnings in Gdk,
        "--gtk-fatal-warnings" causes fatal warnings in Gtk.

        * gtk/Makefile.am: define G_LOG_DOMAIN for gtk.
        * gdk/Makefile.am: define G_LOG_DOMAIN for gdk.

        * gtk/testgtk.c:
        * gdk/gxid.c:
        we need ugly #undef G_LOG_DOMAIN at the start of these files currently,
        since automake doesn't support per target _CFLAGS yet.

        * configure.in: require GLib 1.1.3.
1998-08-16 21:15:11 +00:00
Tim Janik
c1c8caa28c export gtk_binary_age and gtk_interface_age.
Sat Jul 18 22:59:04 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.h:
        * gtk/gtkmain.c: export gtk_binary_age and gtk_interface_age.

        * gtk/gtktypeutils.h:
        * gtk/gtkitemfactory.h: remove "void" from prototypes again.

Sat Jul 18 00:54:01 1998  Lars Hamann  <lars@gtk.org>

        * gtk/gtknotebook.c (gtk_notebook_set_child_arg): added support for
        CHILD_ARG_MENU_LABEL, CHILD_ARG_TAB_LABEL
        (gtk_notebook_get_child_arg): added support for CHILD_ARG_MENU_LABEL,
        CHILD_ARG_POSITION
        (gtk_notebook_reorder_child): new funktion to change position of a
        notebook page
        (gtk_notebook_draw_arrow): draw left/right arrow with
        GTK_SHADOW_ETCHED_IN if focus_tab is first/last tab.

        * gtk/gtkstyle.c (gtk_default_draw_arrow):
        added GTK_SHADOW_ETCHED_IN/OUT
1998-07-19 19:09:27 +00:00
Owen Taylor
913831b26f Remove --g-fatal-warnings flag from argv.
Thu Jun 18 21:13:54 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkmain.c (gtk_init): Remove --g-fatal-warnings flag
	  from argv.

Thu Jun 18 20:22:28 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/genmarshal.pl: Modified to be more idiomatic Perl,
	  to be more readable perl, to spit out stuff that looks
	  more like readable C, and to pipe output through indent
	  so output looks a lot like readable C. No functional
	  changes.

Thu Jun 18 17:43:31 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkpixmap.[ch] (gtk_pixmap_set): Clear the background if
	  necessary when switching to a masked pixmap. (Based on a patch
	  from Ullrich Hafner <hafner@informatik.uni-wuerzburg.de>)

Thu Jun 18 16:18:10 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkeditable.[ch]: Added action signals for keyboard
   	  bindings. (move_cursor, kill_word, etc, etc, etc).

          removed the time argument from
	  gtk_editable_cut/copy/paste_clipboard (source but not
          binary incompatible...) Instead get time from
	  gtk_get_current_event ().

	* gtk/gtktext.c gtk/gtkentry.c: Support the new editable
	  signals.

Thu Jun 18 02:52:09 1998  Owen Taylor  <otaylor@gtk.org>

	Patches from Damon Chaplin <DAChaplin@email.msn.com>:

        gtk/gtkfontsel.h: Fixed GtkFontSelectionClass - I forgot to change
	     parent class to GtkNotebookClass when splitting the widget in
	     two.  Also updated some comments.

        gtk/gtkfontsel.c: Fixed bug when toggling 'Allow scaled bitmaps'
               button without a font selected.

             Fixed bug in set_font_name - I hadn't updated the code to
               search for the style in the font_style clist - it was
               still assuming the style row was equal to its index,
               but it isn't any more.

             Changed 'Reset' button on filter page to 'Clear Filter'.
             Deleted old code relating to the old 'Filter Fonts' toggle
             Updated some comments.
             Cleared 'Actual Fontname' if no font is set.

        gtk/testgtk.c: Fixed problem when 'OK' button is pressed - it was
	     destroying the GtkFontSelection instead of the
             GtkFontSelectionDialog.

Thu Jun 18 02:15:31 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkmain.c (gtk_init): Added --g-fatal-warnings
	  flag to make all warnings fatal errors.

	* gtk/testthreads.c: moved <pthreads.h> include inside
	  #ifdef USE_PTHREADS

Thu Jun 18 01:37:31 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkenums.h gtk/gtkcontainer.[ch] gtk/gtkwidget.c
	  gtk/gtkmenu.c gtk/gtkviewport.c gtk/gtkwindow.c:

	- Added new function gtk_container_set_resize_mode() for
	  fine-grained control of where resize-queueing is done.

	- Removed GtkContainer::need_resize and GtkWindow::move_resize
	- Added GtkContainer::check_resize to replace need_resize.

	- Added function gtk_container_check_resize() to trigger
	  queued resizes, and gtk_container_resize_children() to
	  Figure which children need to be size-allocated. (logic
	  moved from gtkwindow.c)

	- Reorganized code in gtkwindow.c

	- Set the resize-mode for viewports so that resizes within
	  a viewport don't propagate out of it.
1998-06-19 01:26:24 +00:00
Owen Taylor
344572dc71 Renamed g_const_pointer => gconstpointer. 1998-06-10 16:59:28 +00:00
Tim Janik
b70abe38c1 prevent gdk_init() from segfaulting when invoked with (NULL, NULL); (this
Wed Jun 10 06:25:17 1998  Tim Janik  <timj@gtk.org>

        * gdk/gdk.c (gdk_init): prevent gdk_init() from segfaulting when
        invoked with (NULL, NULL); (this worked sometime ago).

        * gtk/gtktypeutils.h:
        * gtk/gtktypeutils.c: enum and flags type creation can now be done
        through gtk_type_register_enum() and gtk_type_register_flags(),
        which allow to specify the enum value arrays directly.
        the NULL terminated value arrays can be retrived through
        gtk_type_enum_get_values() and gtk_type_flags_get_values();
        (gtk_type_children_types): new function to query derived types.
1998-06-10 07:32:52 +00:00
Owen Taylor
2cabeeb1c3 Removed g_object_pointer_hash, which was just g_direct_hash.
Tue Jun  9 18:44:57 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkobject.c: Removed g_object_pointer_hash, which
	was just g_direct_hash.

Mon May 25 19:54:20 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in: x_libs=, not $x_libs=. Enough said.
          (Case only hit for --disable-xshm)

Mon May 25 12:08:14 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in (LDFLAGS): Add to $CFLAGS and $LDFLAGS
	  when testing for X libraries, don't replace them. Because
	  the user might have specified the path to the X libraries
	  themself before running configure.

	* examples/**.c: Changed all gpointer * to gpointer

Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in (LDFLAGS): Bomb out with a moderately
	  helpful message if detection of X libraries fails.

Sat May 23 18:57:06 1998  Owen Taylor  <otaylor@gtk.org>

  [ Combination of:
     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]

	* gdk/gdk.h gdk/gdkcc.c gdk/gdkfont.c gtk/gtkmain.c
	  gtk/gtksignal.c gtk/gtktext.c:

	  Fixups for warnings from adding const to type of GHashFunc,
	  GCompareFunc

	* gtk/gtkcombo.c (gtk_combo_entry_key_press): Minor style/
	  ansi-warnings fixups.

Tue Jun  9 17:47:33 1998  Owen Taylor  <otaylor@gtk.org>

	* glib.h: Remove #error - HP/UX.

Sat May 23 19:00:01 1998  Owen Taylor  <otaylor@gtk.org>
  [ Combination of:
     gtk-rrh-980412-0.patch (Raja R Harinath <harinath@cs.umn.edu>)
     gtk-jbuhler-980516-0 (Jeremy Buhler <jbuhler@cs.washington.edu>) ]

	* glib.h ghash.c gstring.c gdataset.c gutils.c:
	- Added new typedef g_const_pointer; expunged all incorrect
	  uses of 'const gpointer'.
	- Fixed up warnings that that created,
	- Changed GHashFunc and GCompareFunc to take g_const_pointer
	  arguments. (Necessary, but will cause warnings in existing
	  code until fixed)
	- Added other new const in harmless positions.
1998-06-09 23:18:11 +00:00
Tim Janik
a391196ba5 fixed an assertment.
Sat Jun  6 06:01:24 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.

        * gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
        this should eventually be done by gentypeinfo.el somewhen.
        * gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.

        * gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
        enum values of an enum type.

        * gtk/gtk.defs:
        * gtk/gtkcurve.h:
        * gtk/gtkobject.h:
        * gtk/gtkprivate.h:
        * gtk/gtkwidget.h:
        * gtk/gtkenums.h:
        brought enum/flags definitions in sync, added a few more enum
        definitions for bindings and pattern matching.

        * some more macro and GtkType fixups in various places.

        * gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
        as a key-release modifier for the binding system.

Fri Jun  5 06:06:06 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
        was a stale list pointer that is already present in GtkMenuShell.

        * gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
        GtkMenuShell::selection_done which is emitted after the menu shell
        poped down again and all possible menu items have been activated.

Thu Jun  4 02:20:42 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
        before activation of the menuitem, so the menu is actually taken off the
        screen prior to any menu item activation.

        * gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
        for NULL nodes.

        * gtk/gtkwidget.h:
        * gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
        the emission of the "add-accelerator" signal on a widget. this is
        usefull to prevent accelerator installation on certain widgets.

        * gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
        labels left justified, by setting their alignment. stop accelerator
        installation for the menu items, since we use dynamic menus.

Wed Jun  3 06:41:22 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
        should *really* use GtkItemFactory. this is only for preserving source
        compatibility where possible, use of GtkMenuFactory is deprecated as of
        now.

        * gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
        to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
        missed this possibility when i added gtk_object_class_add_user_signal
        in late january.

        * gtk/gtkmain.c (gtk_init): ignore subsequent function calls.

Sun May 31 07:31:09 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkaccelgroup.h:
        * gtk/gtkaccelgroup.c: new implementation of the accelerator concept.

        * gtk/gtkaccellabel.h:
        * gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
        display of the accelerators associated with a certain widget.

        * gtk/gtkitemfactory.h:
        * gtk/gtkitemfactory.c: new widget, item factory with automatic rc
        parsing and accelerator handling.

        * gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
        positioning a menu.
        (gtk_menu_map): removed the allocation code.
        (gtk_menu_size_allocate): care for redrawing of children and resize
        our widget->window correctly.
        (gtk_menu_key_press): feature the new accelerator groups.

        * gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
        submenu if neccessary.

        * gtk/gtkmenuitem.c:
        * gtk/gtkcheckmenuitem.c:
        * gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
        function variants.

        * gdk/gdk.c:
        (gdk_keyval_from_name):
        (gdk_keyval_name): new functions for keyval<->key-name associations.
        (gdk_keyval_to_upper):
        (gdk_keyval_to_lower):
        (gdk_keyval_is_upper):
        (gdk_keyval_is_lower): new functions to check/translate keyvalues with
        regards to their cases.

Wed May 27 00:48:10 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
        widget's class path.
        (gtk_widget_path): new function to calculate a widget's name path.

        * gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
        pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
Elliot Lee
67baa4b4a6 Allow GTK_DEBUG=signals - VERY useful ;-)
Allow GTK_DEBUG=signals - VERY useful ;-)
1998-05-18 22:34:43 +00:00
Owen Taylor
457148333e Basic thread-awareness:
Fri May 15 21:16:54 1998  Owen Taylor  <otaylor@gtk.org>

	Basic thread-awareness:

	* acconfig.h configure.in: New option --with-threads=[yes/posix/no]

	* gdk/Makefile.am gdk/gdkthreads.c: Added new functions
	gdk_threads_[init/enter/leave] for applications, plus
	gdk_threads_wake to wake the mainloop thread out of
	the select().

	* gtk/Makefile.am: gtk/testthreads.c: Test program for threads

Fri May 15 12:08:48 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/testgtk.c (list_clear): Account for the fact
	that gtk_list_clear_items is not inclusive. (Clears
	[start, end))
1998-05-16 02:13:12 +00:00
Tim Janik
9775962a96 new file used as template for new file to define macros indicating newly
Sat May  9 02:34:41 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkfeatures.h.in: new file used as template for
        * gtk/gtkfeatures.h: new file to define macros indicating newly
        introduced features, such as GTK_HAVE_SIGNAL_INIT.

        * gtk/gtksignal.c:
        (gtk_signal_emitv_by_name):
        (gtk_signal_emitv):
        new functions to emit signals with an already provided parameter set.
        (provided by Kenneth Albanowski <kjahds@kjahds.com>).
        (gtk_signal_real_emit): prototype changes, so this functions always
        gets its parameters and signal structure as arguments.
        (gtk_signal_emit): provide the signal structure and parameter list for
        gtk_signal_real_emit.
        (gtk_signal_emit_by_name): likewise.
1998-05-09 01:17:03 +00:00
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
Tim Janik
f83adda582 ts ts ts, GList structures have a ->prev field as well!!! 1998-04-22 12:11:26 +00:00
Tim Janik
0dc21c5690 prepend the running_timeouts list with the tmp_list link itself, not with
Wed Apr 22 04:15:26 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_handle_current_timeouts): prepend the
                running_timeouts list with the tmp_list link itself, not with a new
                        GList structure pointing to our link. that would fill up memory and
                                causes the GList.data fields of the running_timeouts list to point to
                                        GList structures and not GtkTimeoutFunction structures which is a
                                                *really* bad thing.
                                                        (gtk_handle_current_idles): likewise (exchange "timout" with "idle" in
                                                                the above entry ;).
1998-04-22 02:20:50 +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
Elliot Lee
2a2323d64e Combobulator fixes..... ....
Combobulator fixes.....
....

.....


......



.......



........

April fools! ;-)
1998-04-09 02:55:46 +00:00
Tim Janik
13de9dc34f don't take '\n' into account for size computation (Damon Chaplin).
Wed Apr  8 00:00:48 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtklabel.c (gtk_label_expose): don't take '\n' into account for
                size computation (Damon Chaplin).

                        * gtk/gtkvscale.c (gtk_vscale_draw_value): adjusted static snprintf()
                                buffer size to 32 characters (Damon Chaplin).
                                        * gtk/gtkhscale.c (gtk_hscale_draw_value): likewise.

                                                * gtk/gtkmain.c (gtk_main_iteration_do): gdk_flush() the X-queue if
                                                        iteration_done==TRUE since we will most likely not get invoked again
                                                                (Marius Vollmer).
1998-04-07 23:29:04 +00:00
Owen Taylor
1a099c2ced Reverted broken implementation of removing the current timeout/idle.
Sun Apr  5 15:08:25 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c: Reverted broken implementation of removing
	the current timeout/idle. Substituted a (hopefully) functional one.
1998-04-05 19:23:38 +00:00
Tim Janik
ab7989217a take expired timeouts into account, otherwise things like e.g.
Sun Apr  5 09:35:55 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_events_pending): take expired timeouts into
                account, otherwise things like e.g. spin-buttons don't work.
                        also, count gtk_main_quit() as an event.
1998-04-05 09:18:08 +00:00
Owen Taylor
e2ae4aec47 Make debug string parsine case-insensitive
Fri Apr  3 20:36:35 1998  Owen Taylor  <owt1@cornell.edu>

	* gutils.c (g_parse_debug_string): Make debug string
	parsine case-insensitive

Fri Apr  3 20:36:52 1998  Owen Taylor  <owt1@cornell.edu>

	* gdk/gdk.c gtk/gtkmain.c: Accept debug options
	in the form --g[td]k[-no]-debug=xxx as well
1998-04-04 01:56:54 +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
Owen Taylor
4bf5d761bc Improved main loop test. (Quits main loop properly, makes it more obvious
Mon Mar 30 16:35:57 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/testgtk.c: Improved main loop test. (Quits main
	loop properly, makes it more obvious to the user
	what is going on)

	* gtk/gtkwidget.c (gtk_widget_unparent): Reset the
	allocation _after_ clearing the window.

	* configure.in: If can't find XShmAttach in Xext, check
	in XextSam (for AIX).

	* gtk/gtkmain.c (gtk_events_pending): Remember, small
	numbers are _high_ priority for idle queues.

	* gtk/gtkmain.c (gtk_handle_current_timeouts): Allow
	removing the currently running timeout.

	* gtk/testgtk.c (timeout_test): Use the right prototype
	for callback.
1998-03-30 23:04:51 +00:00
Owen Taylor
e0ea1f0c14 If the widget is _not_ a descendant of a Window widget, propagate key
Fri Mar 27 00:13:18 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c (gtk_propagate_event): If the widget is _not_
	a descendant of a Window widget, propagate key presses like
	other events.

	* gtk/gtkentry.c gtk/gtktext.c: Ignore multiple simultaneous
	button presses instead of treating subsequent presses as
	release/press pairs for tablet compatibility.

	* configure.in config.h.in: Removed inline checks, because they
	are duplicated in glib.

	* gtk/gtkwidget.c (gtk_widget_draw): When gtk_widget_draw ()
	occurs with queued draw already in place, redraw _entire_
	widget. (Pointed out by Tim Janik)
1998-03-27 05:17:11 +00:00
Tim Janik
11f79ebe18 make a clear distinction between key press/release events, which will be
Thu Mar 26 23:12:54 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_propagate_event): make a clear distinction between
                key press/release events, which will be sent to a widgets toplevel
                        ancestor and be forwarded from there, and all other events that need to
                                get propagated up the widget tree (pointed out by Owen Taylor).
1998-03-26 22:18:56 +00:00
Tim Janik
d38e339ebb do not propagate unhandled key events on widgets with parent==NULL twice.
Thu Mar 26 08:31:58 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_propagate_event): do not propagate unhandled key
                events on widgets with parent==NULL twice.
1998-03-26 07:47:04 +00:00
Owen Taylor
16aa9c1964 fixes to locale checks
Sun Mar 22 16:25:46 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c (gtk_init): fixes to locale checks

	* gtk/testgtk.c (create_dnd): Create the dnd icons separately
	  to avoid strange interactions with shapes demo.

	* gtk/gtkentry.[ch]:
	  - Limit the length of the text to 2048 to prevent long delays
	  - Fix problems with buffer overruns
	  - Draw only the onscreen portion of the text to prevent wrapping
	    of shorts in the X drawing code.
	  - Keep track of character positions and x-offsets to speed
	    up algorithms.
1998-03-22 21:31:10 +00:00
Owen Taylor
8cff9d3307 Don't respond to drops when grab is in effect. (workaround)
Sat Mar 21 19:07:01 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/testgtk.c (dnd_drop): Don't respond to drops when
	  grab is in effect. (workaround)

	* gdk/gdkfont.c (gdk_fontset_load): More details on
	  error messages.

	* gdk/gdk.c: Translate va_list to XVaNestedList instead
	  of just casting it.

	* gtk/gtkmain.c: Make temporary copy of string returned by
	  setlocale, since it may be changed by subsequent calls.
1998-03-22 00:07:53 +00:00
Elliot Lee
df0b05ef2b Make Gtk compile: Fix GTK_NOTE definition for no debugging, and make gtk_use_mb defined whether or not debugging is enabled 1998-03-17 19:55:33 +00:00
Owen Taylor
70b3b3e6e1 Try to guess if we can use the mb* functions safely. (For glibc, they do
Tue Mar 17 01:55:00 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c gtk/gtkentry.c: Try to guess if we can
	  use the mb* functions safely. (For glibc, they do
	  UTF-8). Heuristic is (X_LOCALE && locale != C/POSIX)
	  || (mblen("\xc0", MB_CUR_MAX) == 1).

	(From: "Richard Lloyd" <rkl@csc.liv.ac.uk>)

	* gdk/gdk.c (gdk_ic_get_attr): Use an intermediate
	  variable to avoid taking the address of the result
	  of va_arg.

	* gtk/gtkentry.c gtk/gtkeditable.c gtkobject.c
	  gtk/testselection.c: signedness fixups

	* gtk/gtkcontainer.c: Fixed implicit cast between
	  gpointer and func pointer by changing.

	* gtk/gtkcombo.c, gtk/gtkentry.c, gtk/gtktext.c:
	  static void forward declaration vs. void actual fixed

	* gtk/testgtk.c: Limit total number of tree items to 10,000
1998-03-17 19:03:52 +00:00
Tim Janik
c91f2c0cfa removed GRAB_EXCLUSIVE again, just disable modal event delivery for
Sun Mar 15 23:44:10 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkwidget.h:
                * gtk/gtkmenushell.c:
                        * gtk/gtkmenu.c:
                                * gtk/gtkmain.c: removed GRAB_EXCLUSIVE again, just disable modal
                                        event delivery for insensitive children.
1998-03-15 22:49:50 +00:00
Tim Janik
16c6ee03ae removed the ugly check whether we need gtk_widget_destroy or
Sun Mar 15 20:13:42 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkmain.c (gtk_quit_destructor): removed the ugly check whether
                we need gtk_widget_destroy or gtk_object_destroy. these functions are
                        by no means allowed to act differently!

                                * gtk/gtkmisc.c (gtk_misc_set_alignment): check for _DRAWABLE instead
                                        of _VISIBLE to operate on widget->window.
                                                (gtk_misc_set_padding): likewise.

                                                        * gtk/gtkwidget.c: slightly reordered object arguments.

                                                                * gtk/gtkobject.c (gtk_object_setv):
                                                                        * gtk/gtkobject.c (gtk_object_getv):
                                                                                operator `!' has precedence over `&'.
1998-03-15 21:14:28 +00:00
Tim Janik
f87ee7e51a added new flag GTK_EXCLUSIVE_GRAB. allow exclusive grabs.
Sun Mar 15 13:25:28 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkwidget.h: added new flag GTK_EXCLUSIVE_GRAB.
                * gtk/gtkmain.c: allow exclusive grabs.

                        * gtk/gtkmenu.c: grab exclusively.
                                * gtk/gtkmenushell.c: grab exclusively.

                                        * gtk/gtkmenushell.c: don't activate insensitive menu items when
                                                in click-selects mode.

                                                        * gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): activate submenus
                                                                on popup.

                                                                        * gtk/gtkmenushell.c (gtk_menu_shell_button_release): don't take
                                                                                *additional* button presses into account.

                                                                                        * gtk/gtkmenushell.c (gtk_menu_shell_button_press): don't take
                                                                                                foreign button releases into account.


oh boy, please check this out people, hope i covered all cases.
1998-03-15 13:33:54 +00:00
Tim Janik
bc8e40387b fixed a bug with invoking the quit handlers that could cause them to be
Sat Mar 14 10:10:46 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkmain.c (gtk_main): fixed a bug with invoking the quit handlers
                that could cause them to be removed wihout being invoked.
1998-03-14 23:47:48 +00:00
Owen Taylor
54a9eb416d Don't leave NULL's in argv.
Sat Mar 14 02:12:44 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkmain.c gdk/gdk.c: Don't leave NULL's in argv.
1998-03-14 07:16:36 +00:00
Tim Janik
cc4dc8339d fix popup calculations (removal of FIXMEs), changes from Lars Hamann.
Fri Mar 13 18:25:07 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkcombo.c: fix popup calculations (removal
        of FIXMEs), changes from Lars Hamann.

Fri Mar 13 10:25:16 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkwidget.h:
        * gtk/gtkwidget.c: renamed gtk_widget_delete_hides to
        gtk_widget_hide_on_delete at owens request, and because the
        new name is much more descriptive.
1998-03-13 17:45:16 +00:00
Tim Janik
96a7435911 return TRUE for GtkWidget::delete_event to avoid destruction of our float
Thu Mar 12 20:17:47 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkhandlebox.c (gtk_handle_box_delete_float): return TRUE for
        GtkWidget::delete_event to avoid destruction of our float window.

        * gtk/gtkmain.c (gtk_main_iteration_do): GDK_DELETE will destroy a
        widget if the last handler returned FALSE or there was none connected.

        * gtk/testgtk.c: adapted all delete_event/destroy case that were affected.

        * gtk/gtkwidget.c (gtk_widget_delete_hides): new function that will hide
        a widget and return TRUE to avoid window deletion if
        connected to GtkWIdget::delete_event.
1998-03-12 21:54:39 +00:00
Tim Janik
4f3495f955 changed handler tags to be of type guint, reflecting the internal tag
Thu Mar 12 10:49:38 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkmain.h:
        * gtk/gtkmain.c: changed handler tags to be of type guint, reflecting
        the internal tag handling.

        * gtk/gtkcurve.h: macro fixups.
1998-03-12 18:00:45 +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
76d01a826c define the version variables in config.h.
Sun Mar  8 03:00:17 1998  Tim Janik  <timj@gimp.org>

        * configure.in: define the version variables in config.h.

        * gtk/gtkmain.h:
        * gtk/gtkmain.c: added static version variables.

        * gdk/gdkpixmap.c: fixed memory leaks (gtk-gronlund-980307-1.patch.gz)
1998-03-08 02:04:26 +00:00
Owen Taylor
395ccd366a Miscellaneous minor fixes to remove ANSI C incompatibilities
Mon Mar  2 17:48:38 1998  Owen Taylor  <owt1@cornell.edu>

	Miscellaneous minor fixes to remove ANSI C incompatibilities

	* gdk/gdkregion.c gtk/gtkclist.c: fix // comments

	* gdk/gdkdnd.c gdk/gdkinputcommon.h: change types of
	some arguments to ANSI functions

	* gtk/gtkcombo.c gtk/gtktree.c: fix casts of function pointers
	  to void *

	* gtk/gtkmain.c: An actual bug! (in deprecated gtk_input_add_interp)

	* gtk/gtknotebook.h: Bitfields must be gint or guint. (and should
	  be guint)

	* gtk/gtkstatusbar.c: trailing ';'

	* gtk/testgtk.c: GList where there should have been GSList

	* glib.h gutils.c : changed g_strcasecmp
	  to take gchar* not guchar*

	* testglib.c: Remove trailing ; after functions
1998-03-02 23:16:39 +00:00
Tim Janik
d491547e86 quit handlers and idle_remove_by_data fixups
-timj
1998-03-01 04:53:56 +00:00