Compare commits

...

115 Commits

Author SHA1 Message Date
PDT 1998 Shawn T. Amundson
fafa639f7b Released GTK+ 1.0.6
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.0.6
1998-09-21 05:27:08 +00:00
Tim Janik
0bbd333f29 NEWS updates 1998-09-21 02:37:53 +00:00
Owen Taylor
f04ccd3146 Update for 1.0.6 release.
Sun Sep 20 18:57:57 1998  Owen Taylor  <otaylor@gtk.org>

	* NEWS: Update for 1.0.6 release.

: ----------------------------------------------------------------------
1998-09-20 22:55:55 +00:00
Owen Taylor
0a1be824fd Queue a redraw in gtk_entry_adjust_scroll. call gtk_entry_adjust_scroll()
Sun Sep 20 11:15:44 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
	call gtk_entry_adjust_scroll() from gtk_entry_set_position()

Sat Jun 13 19:14:39 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkinputcommon.h (gdk_input_device_new): Change
	3.3.1 bug workaround to number keys starting at 1.

Sat Jun 13 11:48:26 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
	Patch from Tom Bech <tomb@ii.uib.no>, to handle color
	specs of the form c #abcdef [ more keys ] properly.

: ----------------------------------------------------------------------
1998-09-20 15:21:47 +00:00
Owen Taylor
41e220c75d Fixed up shldeps for Linux ltconfig patch, added file libtool-1.2.patch
Fri Sep 18 11:56:19 1998  Owen Taylor  <otaylor@redhat.com>

	* Fixed up shldeps for Linux ltconfig patch, added
	file libtool-1.2.patch which is the patch between
	libtool 1.2 and what was used to generate the ltconfig
	in this directory.

	* gtk+.spec: Build with --xinput=xfree.
1998-09-20 14:54:22 +00:00
Manish Singh
a48ad6be3e updated to latest automake version
-Yosh
1998-09-18 02:15:12 +00:00
Owen Taylor
56ce3d070b Change the way we set the adjustments on resize so that it tries to keep
Mon Sep 14 14:28:24 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c (adjust_adj): Change the way we
	set the adjustments on resize so that it tries to
	keep the beginning of the text in approximately
	the same place.

	Removed assertion that the above change made invalid.
1998-09-14 18:20:52 +00:00
Owen Taylor
358d0c4e13 - Save first_cut_pixels when switching sizes, so that if we switch to the
Thu Sep 10 22:19:35 1998  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktext.c: - Save first_cut_pixels when switching
        sizes, so that if we switch to the _same_ size,
        we don't move lines around.

        - Make sure that the text area always has a size of at
        least 1x1, then do all computations when realized.

        - When fetching lines in recompute_geometry, make
        sure we fetch enough lines to cover the screen.

Thu Aug 20 20:08:15 1998  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktext.c ([un]draw_cursor): Check to see if we've
        computed our geometry yet, and if not, ignore the request.

        * gtk/gtktext.c (correct_cache_insert): Fiddled around
        some more. All the bug-test codes seem to work at once
        now. (fingers crossed...)

Tue Aug 25 16:52:47 1998  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktext.c (recompute_geometry): Make sure the
        mark we pass to line start is the beginning of a
        real line, not a wrapped one.

Fri Sep 11 15:36:33 1998  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
        now at least compiles again.

        * gdk/gdk.c (gdk_event_translate): Don't pass events
        on destroyed widgets to the gdk_input layer.

Sat Sep  5 16:01:19 1998  Owen Taylor  <otaylor@gtk.org>

        * gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
        When the pointer is grabbed on an input window,
        either explicitely, or through press-grab, and
        then grabbed on a non-input window, ungrab the
        devices.

Fri Sep 11 15:26:06 1998  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk.c (gdk_event_translate): Don't pass events
        for destroyed windows onto gdk_input layer.

Tue Sep  8 12:41:20 1998  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
        because we can't assume white pixel has any particular value.

Tue Sep  8 12:38:43 1998  Owen Taylor  <otaylor@redhat.com>

        * Call XFilterEvent() on events we get for unknown
        windows, since it may be the window Xlib uses to
        communicate with the IM.
        (From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
1998-09-13 03:10:13 +00:00
Manish Singh
be7ac5fc4a Added -posix and -std1 check here too
-Yosh
1998-09-09 09:40:50 +00:00
Manish Singh
397a0daaaa Make -posix check nonfatal
-Yosh
1998-09-09 07:27:29 +00:00
Manish Singh
b840c209fe added -posix check for NeXTStep
-Yosh
1998-09-08 09:10:58 +00:00
Manish Singh
488cb58d8d added -std1 check for ANSI compliance (from gtk)
-Yosh
1998-09-08 05:28:14 +00:00
Manish Singh
bbaadfc586 provide proper ATEXIT behavior on NeXTStep by !atexit
-Yosh
1998-09-06 19:35:39 +00:00
Tony Gale
38c3cf2961 Cleaner menufactory example code - tony [gale@gtk.org]
Cleaner menufactory example code - tony [gale@gtk.org]
1998-08-13 13:39:39 +00:00
BST 1998 Tony Gale
7977bf7bc4 - Tidy up of the menufactory example from Andy Kahn <kahn@zk3.dec.com> -
Thu Aug 13 09:11:11 BST 1998  Tony Gale  <gale@gtk.org>

        * docs/gtk_tut.sgml:
          - Tidy up of the menufactory example from
            Andy Kahn <kahn@zk3.dec.com>
          - New section on Range Widgets from
            David Huggins-Daines <bn711@freenet.carleton.ca>
          - Started a new section on 'Advanced Event and Signal
            Handling' - used an email from Owen.
          - New appendix on Gdk Event Types
          - Added the tictactoe full example code to the
            'Code Examples' appendix
        * Add the range widgets example. Re-add the text and tree
          examples, as cvs has lost them.
1998-08-13 13:33:00 +00:00
Tim Janik
52a9e5cae8 relookup nodes after external functions have been called. also relookup
Tue Aug 11 20:52:58 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
        external functions have been called. also relookup nodes after
        this function has been invoked.
1998-08-11 19:27:15 +00:00
CDT 1998 Shawn T. Amundson
92b28247ed new directory for v1.0 man pages Beginning of man pages
Thu Aug  6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * docs/man: new directory for v1.0 man pages
        * docs/man/gtk.pod
          docs/man/gtk_button.pod
          docs/man/gtk_hbox.pod
          docs/man/gtk_vbox.pod: Beginning of man pages
1998-08-07 03:12:10 +00:00
Owen Taylor
ea15a83623 Empty rows/columns of the table should not have been marked as being able
Tue Aug  4 10:59:19 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktable.[ch]: Empty rows/columns of the table
        should not have been marked as being able to shrink.
	(Fixes problem with shrinking scrollbarless GIMP canvases)

Mon Aug  3 19:24:48 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
	  cursor before (possibly) deleting the cursor's text
	  property.

	* gtk/gtktext.c (correct_cache_delete): More attempts
	  to clean the line-start cache up after inserting
	  a property. Among other things, make sure to
	  fix up text->current_line, since it is used to
	  refetch the changed lines.
1998-08-04 15:06:44 +00:00
George Lebl
0b345bfa9c my ignorance strikes yet again so here's the fix
-George
1998-08-03 06:26:37 +00:00
George Lebl
2ca0b3898b draw the buttons during a "draw" as well, this fixes a bug when the whole
Sun Aug 02 23:09:56 1998  George Lebl  <jirka@5z.com>

        * gtk/gtkclist.c: draw the buttons during a "draw" as well,
          this fixes a bug when the whole widget is made non-sesitive
          the buttons weren't redrawn
1998-08-03 06:10:29 +00:00
Shawn Amundson
403212acab Add examples/README.1ST to EXTRA_DIST.
-Shawn
1998-07-27 02:52:22 +00:00
CDT 1998 Shawn T. Amundson
1a236b3c44 Released GTK+ 1.0.5
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.0.5
1998-07-27 02:35:48 +00:00
Tim Janik
2bc0f1c83d news update 1998-07-27 01:33:21 +00:00
Tim Janik
780f6c48f5 collect floats as doubles. (gtk_signal_real_emit): pass the signal by id,
Sat Jul 25 05:16:04 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
        (gtk_signal_real_emit): pass the signal by id, and keep it on
        the stack after the lookup, so to get around the reallocation
        problem.
1998-07-25 04:06:23 +00:00
Owen Taylor
0a4017b054 We free things from the text property MemChunk, so it needs to be
Wed Jul 15 17:44:47 1998  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktext.c (new_text_property): We free things from
        the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.

        * Fix up line start cache when splitting a property
        during an insert.
1998-07-16 01:13:08 +00:00
Manish Singh
39a1087c7c Cleaned up a warning.. otherwise someone is going to upload a patch
for 1.0.5. :P

-Yosh
1998-07-15 04:43:22 +00:00
Tim Janik
7f8bb36f06 call the base classes' object_init_func for derived objects with the
Sun Jul 12 06:18:10 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.c (gtk_type_new): call the base classes'
        object_init_func for derived objects with the object's ->klass field
        still pointing to the corresponding base class, otherwise overridden
        class functions could get called with partly-initialized objects.
        (change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
1998-07-12 04:21:14 +00:00
Manish Singh
7e893194cd fix for building shared libs with SunPro cc (fscking glib not separated out
forgot it !@$%#%)

-Yosh
1998-07-02 03:15:23 +00:00
Manish Singh
3b4e7ea423 fix for properly detecting shared lib support on SunPro cc (taken from
libtool 1.2.a)

-Yosh
1998-07-01 16:59:40 +00:00
Tony Gale
7c1e35b4c6 Mon Jun 29 14:19:30 BST 1998
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
          by Stefan Mars <mars@lysator.liu.se>
        * examples/clist/clist.c examples/clist/Makefile: example code
          for GtkCList widget from the Tutorial
1998-06-29 13:20:58 +00:00
Stefan Jeske
559a3b4435 *** empty log message *** 1998-06-26 07:09:44 +00:00
Stefan Jeske
d367a71915 added check for step >= 0 1998-06-26 07:00:17 +00:00
BST 1998 Tony Gale
e43a752e2b new file to explain how the code examples should be extracted from the
Tue Jun 23 12:12:19 BST 1998  Tony Gale  <gale@gtk.org>

        * examples/README.1ST: new file to explain how the
          code examples should be extracted from the tutorial.
1998-06-23 11:17:24 +00:00
Stefan Jeske
4ae5397e86 - Bug fix for precision problem causing occasional double emission of
* gtk/gtkspinbutton.c:
  - Bug fix for precision problem causing occasional double emission
    of "value_changed" signal (hopefully works now).
  - Fixed casting of GtkAdjustment* to GtkWidget* in
    gtk_spin_button_value_changed.
1998-06-22 16:06:22 +00:00
Owen Taylor
fcf1813ac6 Removed code for drawing the child in two places at once. Unfortunately,
Fri Jun 12 21:20:42 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
	code for drawing the child in two places at once. Unfortunately,
	not only does it not work anymore (because reparenting has
	been fixed), but it also triggers reparent/expose loops
	in some cases.

	* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
	an unecessary unrealize.
1998-06-13 01:38:01 +00:00
Owen Taylor
320c0f5b4a Fixed broken list-removal code.
Thu Jun 11 13:09:00 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtktext.c (remove_cache_line): Fixed broken
	list-removal code.
1998-06-11 17:49:31 +00:00
Lars Hamann
4992f18f25 Added missing argument. 1998-06-09 22:57:24 +00:00
BST 1998 Tony Gale
7f44192c6f New files to automagically extract code examples from the tutorial.
Thu Jun  4 12:12:11 BST 1998  Tony Gale  <gale@gtk.org>

        * examples/extract.sh, examples/extract.awk:
          New files to automagically extract code examples from the
          tutorial.
1998-06-04 11:19:37 +00:00
BST 1998 Tony Gale
15e5518841 minor changes to support auto extraction of example code
Tue Jun  2 13:04:06 BST 1998  Tony Gale  <gale@gtk.org>

        * docs/gtk_tut.sgml: minor changes to support auto
          extraction of example code
1998-06-02 12:11:20 +00:00
CDT 1998 Shawn T. Amundson
e8358c9845 Released GTK+ 1.0.4
Mon Jun  1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.0.4
1998-06-02 05:01:09 +00:00
Jay Painter
b975c992ba fixed pixmap clipping in gtkclist 1998-06-02 03:22:28 +00:00
BST 1998 Tony Gale
a66b9ecba3 [1-1-0-Merge]
Mon Jun  1 12:47:56 BST 1998  Tony Gale  <gale@gtk.org>
        [1-1-0-Merge]

        * docs/gtk_tut_it.sgml: Update of Italian Tutorial
          to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
1998-06-01 11:55:37 +00:00
BST 1998 Tony Gale
fe487d27d3 [1-1-0-Merge]
Fri May 29 13:53:57 BST 1998  Tony Gale  <gale@gtk.org>
        [1-1-0-Merge]

        * docs/gtk_tut.sgml:
          - new section on Events
          - change all delete_event callbacks to include
            a GdkEvent parameter
          - clean up the formatting

        * examples - helloworld.c, helloworld2.c, notebook.c,
          packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
          rulers.c, table.c, wheelbarrow.c: change all delete_event
           callbacks to include a GdkEvent parameter.
1998-06-01 11:46:58 +00:00
Owen Taylor
ffefc931cb x_libs=, not $x_libs=. Enough said. (Case only hit for --disable-xshm)
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)
1998-05-25 23:53:51 +00:00
Owen Taylor
936a9bb82f Add to $CFLAGS and $LDFLAGS when testing for X libraries, don't replace
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
1998-05-25 17:01:39 +00:00
PDT 1998 Shawn T. Amundson
2cf9cfc70e Released GTK+ 1.0.3
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.0.3
1998-05-24 20:35:19 +00:00
BST 1998 Tony Gale
8e1f6f269d [1-1-0-Merge]
Sun May 24 12:11:38 BST 1998  Tony Gale  <gale@gtk.org>
        [1-1-0-Merge]

        * docs/gtk_tut.sgml:
           - GtkTooltips, update to current API
           - change all 'gpointer *data' to 'gpointer data'
           - other minor changes
1998-05-24 11:27:33 +00:00
Owen Taylor
4a666956be Bombo out with a moderately helpful message if detection of X libraries
Sat May 23 21:54:05 1998  Owen Taylor  <otaylor@gtk.org>

	* configure.in (LDFLAGS): Bombo out with a moderately
	  helpful message if detection of X libraries fails.
1998-05-24 02:02:20 +00:00
BST 1998 Tony Gale
ed9c2e8b44 [1-1-0-Merge]
Thu May 21 12:33:15 BST 1998 Tony Gale  <gale@gtk.org>
        [1-1-0-Merge]

        * gtkfaq.sgml: add question on multi-threading,
          minor URL cleanups.
1998-05-21 11:36:57 +00:00
Owen Taylor
d5e1327f9e Fill lookup arrays _after_ possibly changing the selected visuals. (Fixes
Tue May 19 23:38:36 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
	arrays _after_ possibly changing the selected visuals.
	(Fixes problem with reversed red and blue on SGI's)
1998-05-20 03:45:53 +00:00
Tim Janik
f25b333e33 conditionally define NULL, FALSE and TRUE. added G_GNUC_FORMAT(),
Wed May 20 05:02:26 1998  Tim Janik  <timj@gtk.org>

        * glib.h: conditionally define NULL, FALSE and TRUE.
        added G_GNUC_FORMAT(), G_GNUC_NORETURN and G_GNUC_CONST macros to
        feature more function arguments.
        (g_mem_chunk_create): new convenience macro as a short hand for
        g_mem_chunk_new().
        (g_chunk_free): new convenience macro to be consistent with g_chunk_new.

        * glist.c: backmerged g_list_nth_data().
        * gslist.c: backmerged g_slist_nth_data().
1998-05-20 03:30:23 +00:00
Owen Taylor
510541dd5b Added a cast (in code scheduled for removal ;-) to suppress a warning on
Mon May 18 22:26:33 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
	cast (in code scheduled for removal ;-) to suppress a
	warning on 64 bit machines.
1998-05-19 02:29:38 +00:00
Owen Taylor
7c9cc2cf39 (Yasuhiro SHIRASAKI <joke@awa.tohoku.ac.jp> : gtk-joke-980517-0.patch)
Mon May 18 22:14:39 1998  Owen Taylor  <otaylor@gtk.org>
(Yasuhiro SHIRASAKI <joke@awa.tohoku.ac.jp> : gtk-joke-980517-0.patch)

	* gutils.c: Restored a missing prototype for g_vsprintf.
1998-05-19 02:27:46 +00:00
Manish Singh
b252a7fffd sigh... this keeps coming back....
-Yosh
1998-05-18 20:35:40 +00:00
Tim Janik
b26728291a changed "proximity-in-event", "drop-data-available-event",
Mon May 18 04:01:41 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
        "drop-data-available-event", "drop-enter-event" and "drop-leave-event"
        to be of runtype GTK_RUN_LAST.

        * gtk/gtkcontainer.c (gtk_container_class_init): likewise for
        "need-resize".

        * gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
        "widget-selected".
1998-05-18 04:23:06 +00:00
PDT 1998 Shawn T. Amundson
b62fc60de7 Released GTK+ 1.0.2
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK+ 1.0.2

	* Fixed an error in configure.in introduced since 1.0.1
1998-05-16 15:48:38 +00:00
Manish Singh
7defce053a ignore autogened file
-Yosh
1998-05-16 01:19:05 +00:00
Manish Singh
f322097971 bye bye autogenerated file
-Yosh
1998-05-15 22:35:27 +00:00
rodo
8d312b1d4f (Merged from HEAD)
Fri May 15 12:31:27 1998  rodo  <doulik@karlin.mff.cuni.cz>

	* gdk/gdk.c: include gdkkeysyms.h always

NEWS wording changes. Updated gtk+.spec to 1.0.2 version no.
1998-05-15 16:24:36 +00:00
Owen Taylor
3b0e9baee5 A few more GPOINTER_TO_UINT fixes.
Wed May 13 00:53:52 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
	  GPOINTER_TO_UINT fixes.

	* gtk/gtksignal.c: Include <string.h> for memset.

Tue May 12 19:19:29 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
	  gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
	GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.

	* gdk/gdk.c: Print sizeof() results
	as g_print("%ld", (glong)sizeof(foo)), to deal with
	sizeof() being long on Alpha's.

	* gtk/testgtk.c: include <string.h> for strlen

Tue May 12 19:22:58 1998  Owen Taylor  <otaylor@gtk.org>

 	* glib/glib.h: Added macros G[U]INT_TO_POINTER() and
	GPOINTER_TO_[U]INT for storing small integers integers
	inside pointers.

	* glib/testglib.c: Print sizeof() results
	as g_print("%ld", (glong)sizeof(foo)), to deal with
	size_t being long on Alpha's.

Tue May 12 16:54:15 1998  Owen Taylor  <otaylor@gtk.org>
	(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)

	* glib.h gstring.c gmessages.c: Added some missing
	const to arguments.

	* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-13 06:17:47 +00:00
Owen Taylor
0b1b179e45 Fixed a couple of warnings. 1998-05-13 03:28:04 +00:00
Owen Taylor
6c6b244015 Initialize a variable so that invalid inputs don't pass garbage to X.
Tue May 12 12:35:34 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkregion.c: Initialize a variable so that invalid
	inputs don't pass garbage to X.

Tue May 12 16:56:35 1998  Owen Taylor  <otaylor@gtk.org>
	(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)

	* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
	Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>

	* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass

Tue May 12 16:54:15 1998  Owen Taylor  <otaylor@gtk.org>
	(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)

	* glib.h gstring.c gmessages.c: Added some missing
	const to arguments.

	* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-13 00:32:41 +00:00
Owen Taylor
725300f5f2 Rewritten and hopefully improved.
Tue May 12 00:24:59 1998  Owen Taylor  <otaylor@gtk.org>

	* docs/gtk-config.1: Rewritten and hopefully improved.
1998-05-12 04:23:33 +00:00
Manish Singh
7d56ba7b0c Added man page for gtk-config from Ben Gertzfield
-Yosh
1998-05-12 03:30:35 +00:00
Federico Mena Quintero
832e096207 Create the window using GtkPreview's visual and colormap, otherwise things
1998-05-11  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
	GtkPreview's visual and colormap, otherwise things can BadMatch.

	* gtk/testgtk.c (create_color_preview):
	(create_gray_preview): Removed pushing/popping of visual/colormap
	now that GtkPreview does things correctly.

	* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
	(gtk_color_selection_draw_wheel): Pick the style from the correct
	place (the colorsel->wheel_area widget) so that the GCs will match
	with where we are going to paint to.

	* gtk/testgtk.c (create_color_selection): Removed pushing/popping
	of visual/colormap now that GtkColorSelection does things the
	right way.
1998-05-12 03:27:54 +00:00
Owen Taylor
063c490570 Moved g_error, g_warning, g_message and g_print from gutils.c to new file
Mon May 11 21:11:54 1998  Owen Taylor  <otaylor@gtk.org>

	* gutils.c gmessages.c: Moved g_error, g_warning, g_message and
	g_print from gutils.c to new file gmessages.c, to avoid having to
	include <unistd.h> in gutils.c which was causing problems for the
	g_strsignal implementation on FreeBSD boxes.

Mon May 11 21:04:51 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
	previously unused window->need_resize flag to mark if a window's
	descendents changed size while the window was not visible. In this
	case, when the window becomes visible, we reallocate everything,
	since we didn't keep track of what actually changed.

	(Fixes bug where changing the popdown strings of a
	combo to something of the same length caused them to
	blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
1998-05-12 02:05:39 +00:00
Tim Janik
8d55a9d665 [security audit by Alan Cox]
Tue May 12 02:17:19 1998  Tim Janik  <timj@gtk.org>

        [security audit by Alan Cox]

        * gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
        exceed maximum assumed size.

        * gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
        not exceed maximum assumed size.
        (gtk_menu_factory_remove): likewise.
        (gtk_menu_factory_find_recurse): likewise.
1998-05-12 00:24:35 +00:00
Tim Janik
6c21fc646d queue the idle_sizer with GTK_PRIORITY_INTERNAL - 1, so widgets get first
Tue May 12 00:21:33 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
        GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
        redrawn if that is still neccessary. don't allow queueing of already
        destructed objects.
        (gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
        widgets which are in the queue can be destroyed savely, handle
        requeueing properly.
        (gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
        widgets which are in the queue can be destroyed/unrealized savely.
1998-05-11 22:33:00 +00:00
Tim Janik
0847bed69f compilation fixups 1998-05-11 15:29:00 +00:00
Tim Janik
f3f8304436 preserve automake CFLAGS setup.
Mon May 11 07:20:39 1998  Tim Janik  <timj@gtk.org>

        * configure.in: preserve automake CFLAGS setup.

        * gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
        of the first argument to be of type GtkObject. unconditionally compile
        this function. removed __GNUC__ dependancy of the gtk_object_ref and
        gtk_object_unref macro wrappers for this function.

Mon May 11 07:22:36 1998  Tim Janik  <timj@gtk.org>

        * glib.h: provide G_GNUC_FUNCTION and G_GNUC_PRETTY_FUNCTION to
        avoid conditionals. unconditionally define NULL, TRUE, FALSE, MAX,
        MIN, ABS and CLAMP, these macros might be screwed from other headers.
1998-05-11 08:33:25 +00:00
Tim Janik
7e6c3c0df7 merging hassle. most is caused by func() -> func(void) converions. else
merging hassle.
most is caused by func() -> func(void) converions.
else than that, you don't want me to put the ChangeLog entries in here ;)
1998-05-10 07:37:50 +00:00
Tim Janik
25f9fd2958 hmmmm 1998-05-10 06:03:15 +00:00
Tim Janik
b3e0707899 shit, those are added locally to their branch ;( 1998-05-10 05:46:10 +00:00
Tim Janik
aa505f0ff4 creation 1998-05-10 05:44:41 +00:00
Owen Taylor
66dd08d2e8 Work around inability of HP/UX to sscanf from a readonly string.
Sun May 10 00:16:44 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk.m4: Work around inability of HP/UX to
	sscanf from a readonly string.

Sat May  9 23:14:39 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)

Fri May  8 21:31:50 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
	draw-queue when we are done.

	(gtk_widget_queue_draw/_queu_resize): Always return
	FALSE and avoid having two idles at the same time.

Fri May  8 21:04:00 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtktext.c: Various fixes to make sure cache
	lines are freed if line_start_cache doesn't point to the
	beginning of the cache.
1998-05-10 04:17:28 +00:00
Tim Janik
8555c23889 GtkTooltips is a GtkData 1998-05-07 08:03:28 +00:00
Federico Mena Quintero
98d997b105 Fixed incorrect painting of row background (fg_set -> bg_set confusion).
1998-05-06  Federico Mena Quintero  <federico@nuclecu.unam.mx>

	* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
	background (fg_set -> bg_set confusion).
1998-05-06 23:50:09 +00:00
Owen Taylor
5cb538d805 A guint * was being passed where X expected a Keysym *, and keysyms are
Tue May  5 17:04:14 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdk.c (gdk_event_translate): A guint * was
	being passed where X expected a Keysym *, and
	keysyms are long's on Alpha Linux. This was causing
	segfaults in Xlib, apparently because of alignment.
1998-05-05 21:22:35 +00:00
Owen Taylor
7d6aff77e5 Fixed reversed conditionals that caused segfault on some platforms.
Tue May  5 11:03:00 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkselection.c (gtk_selection_clear): Fixed
	reversed conditionals that caused segfault on some
	platforms.

Tue May  5 00:44:47 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
	cast to GTK_OBJECT for gtk_object_ref.
1998-05-05 15:38:02 +00:00
PDT 1998 Shawn T. Amundson
668c7604a9 Released GTK 1.0.1
Mon May  4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Released GTK 1.0.1
1998-05-05 04:10:51 +00:00
rhlabs
e8cf1d552b autoconf test for shape extension should really find it, now 1998-05-04 22:12:44 +00:00
Owen Taylor
5266d6322a GtkTooltips is an object, not a Boxed now.
Mon May  4 00:32:20 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtk.defs (GtkContainer): GtkTooltips is an
	object, not a Boxed now.
1998-05-04 05:14:20 +00:00
PDT 1998 Shawn T. Amundson
52d2e1b6a1 Version number changed to 1.0.1, along with a more automatic changing of
Sun May  3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Version number changed to 1.0.1, along with a more automatic
	  changing of version numbers in the Makefile.am files
1998-05-04 03:46:38 +00:00
Owen Taylor
4aa965149c Draw the areas between the default and the button always in
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.

Sun May  3 16:55:43 1998  Tim Janik  <timj@gtk.org>

	* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
	set the current focus_child of a container, does proper referencing and
	adjusts the vadjustment/hadjustment associated with the focus widget.

	* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
	containers via gtk_container_set_focus_child.

	* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
 	where appropriate.

	* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
 	child since not every child removal goes through this function (this
	showed up after gtk_container_set_focus_child() started to reference the
 	focus_child of a container).

	* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
	of a container from gtk_container_remove into this place.
1998-05-04 02:54:17 +00:00
Owen Taylor
ab40e71ec9 Don't force a clear until the widget is actually on screen.
Sun May  3 19:04:46 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtklabel.c (gtk_label_state_changed): Don't
	force a clear until the widget is actually on
	screen.
1998-05-03 23:38:58 +00:00
Owen Taylor
d8e88af7d0 configure.in acheader.h gdk/gdkwindow.c Check for Shape extension both on
Sun May  3 17:20:50 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)

	* 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 16:40:57 1998  Owen Taylor  <otaylor@gtk.org>
	[ security-audit changes from Alan Cox ]

	* 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.

	* 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.

Sat May  2 23:14:34 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
	Configure events that would result in a negative
	size.

Sat May  2 00:14:05 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
	parameters to log are doubles. Digital Unix apparently
	is missing the argument in its prototype.
1998-05-03 22:17:05 +00:00
Owen Taylor
1a7acfef50 Added a FAQ entry about "glibconfig.h" and another about writing another
Sun May  3 14:55:34 1998  Owen Taylor  <otaylor@gtk.org>

	* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
	"glibconfig.h" and another about writing another IRC
	client.
1998-05-03 18:55:03 +00:00
Owen Taylor
f8116014c1 Always show the scrollbars when the policy is GTK_POLICY_ALWAYS...
Fri May  1 22:45:55 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
	Always show the scrollbars when the policy is
	GTK_POLICY_ALWAYS...
1998-05-02 02:55:02 +00:00
Tim Janik
eedaab9236 ok this will fix the gimp's channel & layers refcounting wiredness,
but the gimp really ougtha fixed in dealing with gtklists.
BTW: i *hate* backporting bugfixes!

Fri May  1 10:05:44 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
                for us.
                        (gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
                                children.
                                        (gtk_list_shutdown): remove all children from the list.
                                                (gtk_real_list_unselect_child):
                                                        (gtk_real_list_select_child): *always* put our internal structures into
                                                                sane state *before* signal emisions (i.e. list->selection updates prior
                                                                        to gtk_list_item_[de]select() calls).
1998-05-01 17:28:55 +00:00
Owen Taylor
2117f4ac7e Fix up getting colormap for FOREIGN windows to go along with Raster's fix
Fri May  1 00:42:25 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkwindow.c (gdk_window_get_colormap): Fix up
	getting colormap for FOREIGN windows to go along with
	Raster's fix for visuals.
1998-05-01 04:53:18 +00:00
Owen Taylor
6349f7cb2c Check to catch the case when the viewport fits in either direction or
Thu Apr 30 23:32:51 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
	Check to catch the case when the viewport fits in either
 	direction or both, instead of flip-flopping infinitely.

	Only show/hide the scrollbars once at the end.

Thu Apr 30 21:56:07 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
	Include the scrollbars in the foreach call.
	(gtk-fortier-980405-0.patch;
 	 Patrice Fortier <Patrice.Fortier@aquarel.fr>).

	The notebook widget
	really should also include its tabs, but that might cause
	problems for programs if they
1998-05-01 03:37:01 +00:00
Owen Taylor
8435d34838 Check arguments more carefully, (gtk-draco-980423-1.patch;
Thu Apr 30 21:41:30 1998  Owen Taylor  <otaylor@gtk.org>

	* gstring.c : Check arguments more carefully,
	(gtk-draco-980423-1.patch; ramsey@rhrk.uni-kl.de)
1998-05-01 01:41:06 +00:00
rhlabs
0f0ede22ad <raster@redhat.com> fixed gdk_window_get_visual() to check for a foreign
<raster@redhat.com>
fixed gdk_window_get_visual() to check for a foreign window and if so return
the visual the old-way (which worked) the new way only works for gdk created
windows. Now wfixed - keeping owen's optimisations and allowing backwards
compatability.
1998-04-30 23:52:57 +00:00
Owen Taylor
43ef2e2394 Changed Log 1998-04-30 20:46:28 +00:00
Owen Taylor
b94559a288 ltmain.sh ltconfig config.sub config.guess:
Thu Apr 30 10:22:59 1998  Owen Taylor  <otaylor@gtk.org>

	* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
	  ltmain.sh ltconfig config.sub config.guess:

	Reverted back to libtool-1.2 (plus minor patches) so as not to
	force the issue for everyone else.
1998-04-30 20:45:30 +00:00
Owen Taylor
a3cfbc84cf Update log. Mention new libtool version. 1998-04-30 15:08:58 +00:00
Owen Taylor
4143e106cc Updated to libtool 1.2a.
Thu Apr 30 10:22:59 1998  Owen Taylor  <otaylor@gtk.org>

	* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
	Updated to libtool 1.2a.

	* gtk/gtkclist.c: Draw the in-between lines with style->base
	instead of style->white.
1998-04-30 14:53:02 +00:00
Manish Singh
d0a29b40d6 don't die when naughty people remove parts of the filesystem under you (fix
from Josh)

-Yosh
1998-04-30 09:44:07 +00:00
Tim Janik
1b7fc490af check if the viewport already exists before iterating over it, maybe we
Thu Apr 30 09:49:14 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
                if the viewport already exists before iterating over it, maybe we
                        haven't been constructed yet.
1998-04-30 08:08:02 +00:00
Owen Taylor
8c66060a8e Cache the colormap and children of a window locally instead of fetching
Wed Apr 29 15:46:13 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
	Cache the colormap and children of a window locally
	instead of fetching them from the server when needed.
	Huge performance difference for creating/destroying
	windows.

	* gtk/gtkstyle.c: Find the depth from the cached
	visual, instead of asking the server.

	* gtk.m4: Distribute the new version which tries to
	figure out what went wrong and give helpful error
	messages.

	* ltmain.sh ltconfig config.sub config.sh:
	Updated to libtool 1.2a

	* gtk/gtktext.c: Fixed a bug where the drawn level
	was being messed up when the text was scrolled
	during a deletion.
1998-04-30 05:26:57 +00:00
Tim Janik
e94d12f926 made this function issue a warning if the GtkBin widget already has a
Thu Apr 30 01:51:00 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
                the GtkBin widget already has a child.

                        * gtk/gtkbox.c (gtk_box_pack_{start|end}):
                                check that child->parent == NULL;
1998-04-30 04:03:06 +00:00
Arturo Espinosa
cde57dc1d2 Apply the drag and drop fix to the 1.0 branch as well -mig 1998-04-29 03:08:13 +00:00
Owen Taylor
42a7da51fc Only return FALSE when the clear event is been rejected, not when widget
Tue Apr 28 22:13:54 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkselection.c (gtk_selection_clear): Only return
	FALSE when the clear event is been rejected, not when
	widget has already lost the selection. (Which should
	only happen when we are setting the selection to another
	widget ourself.)
1998-04-29 02:50:40 +00:00
Tim Janik
2bec3fad18 allow the inclusion of other rc-files.
Tue Apr 28 15:46:41 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
                rc-files.
1998-04-28 13:49:05 +00:00
Tim Janik
2f6ee99191 only allow grabbing of focus for CAN_FOCUS widgets.
Mon Apr 27 15:11:52 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
                for CAN_FOCUS widgets.

                        * gtk/testgtk.c (create_scrolled_windows): feature h/v focus
                                adjustments for the table.
                                        (create_list): feature automatic adjustment of the scrolled window to
                                                always contain the focused child.
                                                        (create_main_window): keep the focussed button always inside of the
                                                                scrolled windoww.

                                                                        * gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
                                                                                adjustments, to contain the allocation of the currently focused child.
                                                                                        (gtk_container_set_focus_hadjustment): new functin to set the
                                                                                                horizontal focus adjustment.
                                                                                                        (gtk_container_set_focus_vadjustment): new functin to set the vertical
                                                                                                                focus adjustment.

                                                                                                                        * gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
                                                                                                                                clamp the currents adjustment page into a specific range.

                                                                                                                                        * random GtkType fixups for gtk_*_get_type() functions.



this bug-fix (feature? ;) is fully binary compatible, so just invoke
touch *.h -r gtkbutton.h; make; make install-exec
and you are all set ;)
(devoted to yosh ;)))
1998-04-27 13:46:54 +00:00
Owen Taylor
9a1db40746 Removed the "check visibility after gtk_widget_unparent" bug in hopefully
Fri Apr 24 19:07:32 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:

	Removed the "check visibility after gtk_widget_unparent" bug
	in hopefully the last three places.
1998-04-24 23:13:43 +00:00
Owen Taylor
37bedcc07a Account for the fact that gtk_tree_item_remove_subtree will be called
Fri Apr 24 18:37:16 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
	Account for the fact that gtk_tree_item_remove_subtree
	will be called recursively.

	Handle removing a collapsed subtree.

	(From Andy Dustman <adustman@comstar.net>)

	* gtk/gtktree.c (gtk_tree_remove_items): Look for the
	root tree when removing items from a non-previously
	mapped tree.

	* gtk/testgtk.c: Added a remove_subtree button.
1998-04-24 22:52:15 +00:00
Owen Taylor
302aaa2802 Notify all weak references before object removing data. This change fixes
Thu Apr 23 23:44:17 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
	before object removing data. This change fixes a bug where
	removing the last weak references would cause it to be
	triggered.
1998-04-24 17:14:45 +00:00
Tim Janik
9829d1ee03 merging changes from me and quartic back into the old tree. 1998-04-24 00:57:36 +00:00
Tim Janik
aa6097e255 haha! got it merged!
/me wins over cvs (this time...)
1998-04-24 00:46:27 +00:00
Tim Janik
1d8aed6816 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 03:33:50 +00:00
Tim Janik
49680fed32 corrected a brace position (Damon Chaplin), which i got wrong when
Wed Apr 15 05:13:09 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
                (Damon Chaplin), which i got wrong when applying Damon's patch the last
                        time.

hm, first -j use...
1998-04-17 01:18:30 +00:00
Owen Taylor
4a7d355898 Make sure that when we are running with a non-installed colormap, in 8-bit
Wed Apr 15 20:42:46 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
	that when we are running with a non-installed colormap,
        in 8-bit pseudo-color, we actually are using the system
	visual. (Fixes *Bad Match* errors on Digital Unix machines
	with multiple 8-bit pseudo-color visuals)

	* gdk/Makefile.am: Removed mostly useless dependency that
	was causing problems for SGI's make, when used with
	the 'make dist' form of GTK+. (Dependency caused dependencies
        to be redone when BUILT_SOURCES changed)
1998-04-16 01:01:04 +00:00
Arturo Espinosa
0982f71b98 Put the gdkwindow.c fix here too 1998-04-15 03:40:58 +00:00
Shawn Amundson
7363897409 Makefile.am: add gtk+.spec, removed gtk+.prj
Makefile.am: add gtk+.spec, removed gtk+.prj
1998-04-14 03:08:50 +00:00
232 changed files with 31016 additions and 9036 deletions

View File

@@ -10,9 +10,9 @@ The GTK+ Team (in alphabetical order)
Shawn T. Amundson <amundson@gtk.org>
Jerome Bolliet <bolliet@in2p3.fr>
Tony Gale <gale@gtk.org>
Lars Hamann <hamann@braunschweig.netsurf.de>
Lars Hamann <lars@gtk.org>
Tim Janik <timj@gtk.org>
Stefan Jeske <jeske@braunschweig.netsurf.de>
Stefan Jeske <stefan@gtk.org>
Elliot Lee <sopwith@gtk.org>
Ian Main <imain@gtk.org>
Fedrerico Mena <quartic@gtk.org>

995
ChangeLog
View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,3 +1,998 @@
Sun Sep 20 22:17:03 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.6
Sun Sep 20 18:57:57 1998 Owen Taylor <otaylor@gtk.org>
* NEWS: Update for 1.0.6 release.
Sun Sep 20 11:15:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c: Queue a redraw in gtk_entry_adjust_scroll.
call gtk_entry_adjust_scroll() from gtk_entry_set_position()
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
Patch from Tom Bech <tomb@ii.uib.no>, to handle color
specs of the form c #abcdef [ more keys ] properly.
Fri Sep 18 11:56:19 1998 Owen Taylor <otaylor@redhat.com>
* Fixed up shldeps for Linux ltconfig patch, added
file libtool-1.2.patch which is the patch between
libtool 1.2 and what was used to generate the ltconfig
in this directory.
* gtk+.spec: Build with --xinput=xfree.
Thu Sep 17 19:10:49 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Tue Sep 15 11:30:03 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c: Keep a list of directories in which we never
want to stat the entries (like /afs), and assume everything in
those directories is a subdirectory.
- When following a path, try to open components even when
we don't find them in their parent's directory to
support automounters.
Mon Sep 14 14:28:24 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (adjust_adj): Change the way we
set the adjustments on resize so that it tries to
keep the beginning of the text in approximately
the same place.
Removed assertion that the above change made invalid.
Thu Sep 10 22:19:35 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c: - Save first_cut_pixels when switching
sizes, so that if we switch to the _same_ size,
we don't move lines around.
- Make sure that the text area always has a size of at
least 1x1, then do all computations when realized.
- When fetching lines in recompute_geometry, make
sure we fetch enough lines to cover the screen.
Thu Aug 20 20:08:15 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c ([un]draw_cursor): Check to see if we've
computed our geometry yet, and if not, ignore the request.
* gtk/gtktext.c (correct_cache_insert): Fiddled around
some more. All the bug-test codes seem to work at once
now. (fingers crossed...)
Tue Aug 25 16:52:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (recompute_geometry): Make sure the
mark we pass to line start is the beginning of a
real line, not a wrapped one.
Fri Sep 11 15:36:33 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkinputgxi.h (gdk_input_gxi_grab_pointer): Hopefully
now at least compiles again.
* gdk/gdk.c (gdk_event_translate): Don't pass events
on destroyed widgets to the gdk_input layer.
Sat Sep 5 16:01:19 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputxfree.h gdk/gdk.c gdk/gdkinputgxi.h:
When the pointer is grabbed on an input window,
either explicitely, or through press-grab, and
then grabbed on a non-input window, ungrab the
devices.
Tue Sep 8 12:41:20 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtk[hv]paned.c: Use GDK_INVERT instead of GDK_XOR
because we can't assume white pixel has any particular value.
Tue Sep 8 12:38:43 1998 Owen Taylor <otaylor@redhat.com>
* Call XFilterEvent() on events we get for unknown
windows, since it may be the window Xlib uses to
communicate with the IM.
(From Yung-Ching Hsiao <yhsiao@cae.wisc.edu>)
Tue Sep 8 02:09:33 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Mon Sep 7 22:20:40 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -std1 check for ANSI compliance
Thu Aug 13 09:11:11 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml:
- Tidy up of the menufactory example from
Andy Kahn <kahn@zk3.dec.com>
- New section on Range Widgets from
David Huggins-Daines <bn711@freenet.carleton.ca>
- Started a new section on 'Advanced Event and Signal
Handling' - used an email from Owen.
- New appendix on Gdk Event Types
- Added the tictactoe full example code to the
'Code Examples' appendix
* Add the range widgets example. Re-add the text and tree
examples, as cvs has lost them.
Tue Aug 11 20:52:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_class_init): relookup nodes after
external functions have been called. also relookup nodes after
this function has been invoked.
Thu Aug 6 22:09:06 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* docs/man: new directory for v1.0 man pages
* docs/man/gtk.pod
docs/man/gtk_button.pod
docs/man/gtk_hbox.pod
docs/man/gtk_vbox.pod: Beginning of man pages
Tue Aug 4 10:59:19 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktable.[ch]: Empty rows/columns of the table
should not have been marked as being able to shrink.
(Fixes problem with shrinking scrollbarless GIMP canvases)
Mon Aug 3 19:24:48 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (gtk_text_forward_delete): Undraw the
cursor before (possibly) deleting the cursor's text
property.
* gtk/gtktext.c (correct_cache_delete): More attempts
to clean the line-start cache up after inserting
a property. Among other things, make sure to
fix up text->current_line, since it is used to
refetch the changed lines.
Sun Aug 02 23:09:56 1998 George Lebl <jirka@5z.com>
* gtk/gtkclist.c: draw the buttons during a "draw" as well,
this fixes a bug when the whole widget is made non-sesitive
the buttons weren't redrawn
Sun Jul 26 21:03:54 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.5
Sat Jul 25 05:16:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_params_get): collect floats as doubles.
(gtk_signal_real_emit): pass the signal by id, and keep it on
the stack after the lookup, so to get around the reallocation
problem.
Wed Jul 15 17:44:47 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtktext.c (new_text_property): We free things from
the text property MemChunk, so it needs to be G_ALLOC_AND_FREE.
* Fix up line start cache when splitting a property
during an insert.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sun Jul 12 06:18:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtktypeutils.c (gtk_type_new): call the base classes'
object_init_func for derived objects with the object's ->klass field
still pointing to the corresponding base class, otherwise overridden
class functions could get called with partly-initialized objects.
(change from Tero Pulkkinen <terop@modeemi.cs.tut.fi>).
Wed Jul 1 09:56:25 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Mon Jun 29 14:19:30 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: add section on GtkCList widget, contributed
by Stefan Mars <mars@lysator.liu.se>
* examples/clist/clist.c examples/clist/Makefile: example code
for GtkCList widget from the Tutorial
Fri Jun 26 09:00:33 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c (gtk_spin_button_spin):
Added sanity check for step >= 0.
Tue Jun 23 12:12:19 BST 1998 Tony Gale <gale@gtk.org>
* examples/README.1ST: new file to explain how the
code examples should be extracted from the tutorial.
Fri Jun 19 18:47:05 1998 Stefan Jeske <stefan@gtk.org>
* gtk/gtkspinbutton.c:
- Bug fix for precision problem causing occasional double emission
of "value_changed" signal (hopefully works now).
- Fixed casting of GtkAdjustment* to GtkWidget* in
gtk_spin_button_value_changed.
>>>>>>> 1.353.2.68
Fri Jun 12 21:20:42 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkoptionmenu.c (gtk_option_menu_expose): Removed
code for drawing the child in two places at once. Unfortunately,
not only does it not work anymore (because reparenting has
been fixed), but it also triggers reparent/expose loops
in some cases.
* gtk/gtkoptionmenu.c (gtk_option_menu_remove_contents): Removed
an unecessary unrealize.
Thu Jun 11 13:09:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (remove_cache_line): Fixed broken
list-removal code.
Wed Jun 10 00:15:58 1998 Lars Hamann <lars@gtk.org>
* gtk/gtknotebook.h (struct _GtkNotebookClass):
* gtk/gtknotebook.c (gtk_real_notebook_switch_page):
Added missing argument (according to Joseph Coleman's bug report)
Thu Jun 4 12:12:11 BST 1998 Tony Gale <gale@gtk.org>
* examples/extract.sh, examples/extract.awk:
New files to automagically extract code examples from the
tutorial.
Tue Jun 2 13:04:06 BST 1998 Tony Gale <gale@gtk.org>
* docs/gtk_tut.sgml: minor changes to support auto
extraction of example code
Mon Jun 1 22:14:33 CDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.4
Mon Jun 1 20:24:42 PDT 1998 Jay Painter <jpaint@serv.net>
* gtk/gtkclist.c: fixed clipping for pixmaps within rows...
finally.
Mon Jun 1 12:47:56 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: Update of Italian Tutorial
to Tutorial of 24th May, from Daniele Canazza <dcanazz@tin.it>
Fri May 29 13:53:57 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- new section on Events
- change all delete_event callbacks to include
a GdkEvent parameter
- clean up the formatting
* examples - helloworld.c, helloworld2.c, notebook.c,
packbox.c, pixmap.c, progressbar.c, radiobuttons.c,
rulers.c, table.c, wheelbarrow.c: change all delete_event
callbacks to include a GdkEvent parameter.
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
Sun May 24 12:07:55 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.3
Sun May 24 12:11:38 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut.sgml:
- GtkTooltips, update to current API
- change all 'gpointer *data' to 'gpointer data'
- other minor changes
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.
Thu May 21 12:33:15 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* gtkfaq.sgml: add question on multi-threading,
minor URL cleanups.
Tue May 19 23:38:36 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Fill lookup
arrays _after_ possibly changing the selected visuals.
(Fixes problem with reversed red and blue on SGI's)
Mon May 18 22:26:33 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_window_style_set_event): Added a
cast (in code scheduled for removal ;-) to suppress a
warning on 64 bit machines.
Mon May 18 04:01:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_init): changed "proximity-in-event",
"drop-data-available-event", "drop-enter-event" and "drop-leave-event"
to be of runtype GTK_RUN_LAST.
* gtk/gtkcontainer.c (gtk_container_class_init): likewise for
"need-resize".
* gtk/gtktipsquery.c (gtk_tips_query_class_init): likewise for
"widget-selected".
Fri May 15 21:20:40 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.2
Fri May 15 12:31:27 1998 rodo <doulik@karlin.mff.cuni.cz>
* gdk/gdk.c: include gdkkeysyms.h always
Wed May 13 00:53:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktypeutils.c gtk/gtksignal.c gdk/gdkdnd.c: A few more
GPOINTER_TO_UINT fixes.
* gtk/gtksignal.c: Include <string.h> for memset.
Tue May 12 19:19:29 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkinputdialog.c gtk/gtkgamma.c gtk/gtkrc.c
gtk/gtkcolorsel.c gtk/gtkclist.c gtk/testgtk.c: Use
GPOINTER_TO_INT/GINT_TO_POINTER macros where appropriate.
* gdk/gdk.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
sizeof() being long on Alpha's.
* gtk/testgtk.c: include <string.h> for strlen
Tue May 12 12:35:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkregion.c: Initialize a variable so that invalid
inputs don't pass garbage to X.
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
1998-05-11 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkpreview.c (gtk_preview_realize): Create the window using
GtkPreview's visual and colormap, otherwise things can BadMatch.
* gtk/testgtk.c (create_color_preview):
(create_gray_preview): Removed pushing/popping of visual/colormap
now that GtkPreview does things correctly.
* gtk/gtkcolorsel.c (gtk_color_selection_draw_wheel_frame):
(gtk_color_selection_draw_wheel): Pick the style from the correct
place (the colorsel->wheel_area widget) so that the GCs will match
with where we are going to paint to.
* gtk/testgtk.c (create_color_selection): Removed pushing/popping
of visual/colormap now that GtkColorSelection does things the
right way.
Mon May 11 21:04:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwindow.c (gtk_real_window_move_resize): Use the
previously unused window->need_resize flag to mark if a window's
descendents changed size while the window was not visible. In this
case, when the window becomes visible, we reallocate everything,
since we didn't keep track of what actually changed.
(Fixes bug where changing the popdown strings of a
combo to something of the same length caused them to
blank out, as reported by Todd Dukes <tdukes@ibmoto.com>)
Tue May 12 02:17:19 1998 Tim Janik <timj@gtk.org>
[security audit by Alan Cox]
* gtk/gtkobject.c (gtk_object_get_arg_type): check for arg_name to not
exceed maximum assumed size.
* gtk/gtkmenufactory.c (gtk_menu_factory_create): check that `path' does
not exceed maximum assumed size.
(gtk_menu_factory_remove): likewise.
(gtk_menu_factory_find_recurse): likewise.
Tue May 12 00:21:33 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_resize): queue the idle_sizer with
GTK_PRIORITY_INTERNAL - 1, so widgets get first resized and then
redrawn if that is still neccessary. don't allow queueing of already
destructed objects.
(gtk_widget_idle_sizer): proccess the resize queue in a save manner, so
widgets which are in the queue can be destroyed savely, handle
requeueing properly.
(gtk_widget_idle_draw): proccess the redraw queue in a save manner, so
widgets which are in the queue can be destroyed/unrealized savely.
Mon May 11 07:20:39 1998 Tim Janik <timj@gtk.org>
* configure.in: preserve automake CFLAGS setup.
* gtk/gtkobject.h (gtk_trace_referencing): compile time check the type
of the first argument to be of type GtkObject. unconditionally compile
this function. removed __GNUC__ dependancy of the gtk_object_ref and
gtk_object_unref macro wrappers for this function.
Sat May 9 16:30:33 BST 1998 Tony Gale <gale@gtk.org>
[1-1-0-Merge]
* docs/gtk_tut_it.sgml: update of Italian tutorial
translation from Daniele Canazza <dcanazz@tin.it>
Sat May 9 02:34:41 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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.
Sat May 9 00:03:12 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c (gtk_signal_handler_unref): reflect the presence of
signal connections through unsetting GTK_CONNECTED.
(gtk_signal_handler_insert): reflect the presence of signal connections
through setting GTK_CONNECTED.
(gtk_signal_real_emit): only check for handler emissions if the object
has the GTK_CONNECTED flag set.
(gtk_signal_handler_pending): don't check for pending handlers if the
GTK_CONNECTED flag is not set for this object.
* gtk/gtkobject.h (enum): new flag GTK_CONNECTED to indicate whether
a GtkObject has signal handler connections.
* gtk/gtkobject.c (gtk_object_real_destroy): only if GTK_CONNECTED is
set for this object call gtk_signal_handlers_destroy().
* gtk/gtktypeutils.c (gtk_type_unique): asure that the type system has
been initialized.
Thu May 7 12:52:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtkobject.c (gtk_object_set_data_by_id_full): allocate object
data chunks through a global object data structure list. unlink
object data before invoking its destroy function.
(gtk_object_finalize): slight modification to allow usage of object
data during object finalization.
* gtk/gtksignal.c (gtk_signal_newv): suport middle dashes ('-') in
signal names, e.g. "signal-name" is now an alias for "signal_name".
(gtk_signal_handler_new): allocate handlers through a global handler
structure list, that's faster than memchunks.
(gtk_emission_new): allocate emissions through a global emission
structure list, that's faster than memchunks.
Wed May 6 02:16:34 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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>
[1-1-0-Merge]
* 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.
Sat May 2 22:33:45 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* gtk/gtksignal.c: added new functions to operate on intermediate
function pointers. implemented incremental blocking.
(gtk_signal_disconnect_by_func): new function.
(gtk_signal_handler_block_by_func): new function.
(gtk_signal_handler_unblock_by_func): new function
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[1-1-0-Merge]
* */* (almost):
Style: All
int foo () { ... }
changed to
int foo (void) { ... }
Even where there were proper prototypes elsewhere.
Sun May 10 00:16:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk.m4: Work around inability of HP/UX to
sscanf from a readonly string.
Sat May 9 23:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c: Fixed one more XLookupString location. (For KeyRelease)
Fri May 8 21:31:50 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkwidget.c (gtk_widget_queue_draw): Free the
draw-queue when we are done.
(gtk_widget_queue_draw/_queu_resize): Always return
FALSE and avoid having two idles at the same time.
Fri May 8 21:04:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c: Various fixes to make sure cache
lines are freed if line_start_cache doesn't point to the
beginning of the cache.
1998-05-06 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkclist.c (draw_row): Fixed incorrect painting of row
background (fg_set -> bg_set confusion).
1998-05-04 Federico Mena Quintero <federico@nuclecu.unam.mx>
* configure.in: Added $x_libs in the other_libraries field in the
check for XShapeCombineMask.
Tue May 5 17:04:14 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c (gdk_event_translate): A guint * was
being passed where X expected a Keysym *, and
keysyms are long's on Alpha Linux. This was causing
segfaults in Xlib, apparently because of alignment.
Tue May 5 11:03:00 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Fixed
reversed conditionals that caused segfault on some
platforms.
Tue May 5 00:44:47 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_[hv]adjustment):
cast to GTK_OBJECT for gtk_object_ref.
Mon May 4 21:07:36 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK 1.0.1
Mon May 4 00:32:20 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.defs (GtkContainer): GtkTooltips is an
object, not a Boxed, now.
Sun May 3 20:43:27 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Version number changed to 1.0.1, along with a more automatic
changing of version numbers in the Makefile.am files
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.
Sun May 3 16:55:43 1998 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c (gtk_container_set_focus_child): new function to
set the current focus_child of a container, does proper referencing and
adjusts the vadjustment/hadjustment associated with the focus widget.
* gtk/gtkwidget.c (gtk_widget_grab_focus): set the focused child on
containers via gtk_container_set_focus_child.
* gtk/gtknotebook.c: modifications to use gtk_container_set_focus_child
where appropriate.
* gtk/gtkcontainer.c (gtk_container_remove): removed unsetting of focus
child since not every child removal goes through this function (this
showed up after gtk_container_set_focus_child() started to reference the
focus_child of a container).
* gtk/gtkwidget.c (gtk_widget_unparent): moved unsetting the focus_child
of a container from gtk_container_remove into this place.
Sun May 3 19:04:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtklabel.c (gtk_label_state_changed): Don't
force a clear until the widget is actually on
screen.
Sun May 3 17:20:50 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)
* 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.
Sun May 3 14:55:34 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtkfaq.sgml (CPPFLAGS): Added a FAQ entry about
"glibconfig.h" and another about writing another IRC
client.
Fri May 1 16:40:57 1998 Owen Taylor <otaylor@gtk.org>
[ security-audit changes from Alan Cox ]
* 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.
* 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.
Sat May 2 23:14:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkcurve.c (gtk_curve_graph_events): Ignore
Configure events that would result in a negative
size.
Sat May 2 00:14:05 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_trim_cmap): Make sure the
parameters to log are doubles. Digital Unix apparently
is missing the argument in its prototype.
Fri May 1 22:45:55 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Always show the scrollbars when the policy is
GTK_POLICY_ALWAYS...
Fri May 1 10:05:44 1998 Tim Janik <timj@gtk.org>
* gtk/gtklist.c (gtk_list_add): let gtk_list_append_items do the work
for us.
(gtk_list_clear_items): use gtk_list_unselect_child() for unselection of
children.
(gtk_list_shutdown): remove all children from the list.
(gtk_real_list_unselect_child):
(gtk_real_list_select_child): *always* put our internal structures into
sane state *before* signal emisions (i.e. list->selection updates prior
to gtk_list_item_[de]select() calls).
Thu Apr 30 23:32:51 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_size_allocate):
Check to catch the case when the viewport fits in either
direction or both, instead of flip-flopping infinitely.
Only show/hide the scrollbars once at the end.
Thu Apr 30 21:56:07 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach):
Include the scrollbars in the foreach call.
(gtk-fortier-980405-0.patch;
Patrice Fortier <Patrice.Fortier@aquarel.fr>).
The notebook widget
really should also include its tabs, but that might cause
problems for programs if they
Thu Apr 30 21:51:52 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpixmap.c (gtk_pixmap_set): Only request a
resize if the size actually changed.
(gtk-johannes-980414-0.patch ;
johannes@nada.kth.se (Johannes Keukelaar) )
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
ltmain.sh ltconfig config.sub config.guess:
Reverted back to libtool-1.2 (plus minor patches) so as not to
force the issue for everyone else.
Thu Apr 30 10:22:59 1998 Owen Taylor <otaylor@gtk.org>
* glib/ltmain.sh glib/ltconfig glib/config.sub glib/config.guess:
Updated to libtool 1.2a.
* gtk/gtkclist.c: Draw the in-between lines with style->base
instead of style->white.
Wed Apr 29 15:46:13 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkprivate.h gdk/gdkwindow.c gdk/gdkpixmap.c:
Cache the colormap and children of a window locally
instead of fetching them from the server when needed.
Huge performance difference for creating/destroying
windows.
* gtk/gtkstyle.c: Find the depth from the cached
visual, instead of asking the server.
* gtk.m4: Distribute the new version which tries to
figure out what went wrong and give helpful error
messages.
* ltmain.sh ltconfig config.sub config.sh:
Updated to libtool 1.2a
* gtk/gtktext.c: Fixed a bug where the drawn level
was being messed up when the text was scrolled
during a deletion.
Thu Apr 30 02:42:11 PDT 1998 Manish Singh <yosh@gimp.org>
* gtk/gtkfilesel.c: don't die when naughty people remove parts of
the filesystem under you (fix from Josh)
Thu Apr 30 09:49:14 1998 Tim Janik <timj@gtk.org>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_foreach): check
if the viewport already exists before iterating over it, maybe we
haven't been constructed yet.
Thu Apr 30 01:51:00 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbin.c (gtk_bin_add): made this function issue a warning if
the GtkBin widget already has a child.
* gtk/gtkbox.c (gtk_box_pack_{start|end}):
check that child->parent == NULL;
Tue Apr 28 22:13:54 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkselection.c (gtk_selection_clear): Only return
FALSE when the clear event is been rejected, not when
widget has already lost the selection. (Which should
only happen when we are setting the selection to another
widget ourself.)
Fri Apr 24 19:07:32 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkfixed.c gtk/gtkpaned.c gtk/gtktable.c:
Removed the "check visibility after gtk_widget_unparent" bug
in hopefully the last three places.
Tue Apr 28 15:46:41 1998 Tim Janik <timj@gtk.org>
* gtk/gtkrc.c (gtk_rc_parse_statement): allow the inclusion of other
rc-files.
Mon Apr 27 15:11:52 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_grab_focus): only allow grabbing of focus
for CAN_FOCUS widgets.
* gtk/testgtk.c (create_scrolled_windows): feature h/v focus
adjustments for the table.
(create_list): feature automatic adjustment of the scrolled window to
always contain the focused child.
(create_main_window): keep the focussed button always inside of the
scrolled windoww.
* gtk/gtkcontainer.c (gtk_real_container_focus): set the h/v focus
adjustments, to contain the allocation of the currently focused child.
(gtk_container_set_focus_hadjustment): new functin to set the
horizontal focus adjustment.
(gtk_container_set_focus_vadjustment): new functin to set the vertical
focus adjustment.
* gtk/gtkadjustment.c (gtk_adjustment_clamp_page): new fucntion to
clamp the currents adjustment page into a specific range.
* random GtkType fixups for gtk_*_get_type() functions.
Fri Apr 24 18:37:16 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktreeitem.c (gtk_tree_item_remove_subtree):
Account for the fact that gtk_tree_item_remove_subtree
will be called recursively.
Handle removing a collapsed subtree.
(From Andy Dustman <adustman@comstar.net>)
* gtk/gtktree.c (gtk_tree_remove_items): Look for the
root tree when removing items from a non-previously
mapped tree.
* gtk/testgtk.c: Added a remove_subtree button.
Thu Apr 23 23:44:17 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkobject.c (gtk_object_finalize): Notify all weak references
before object removing data. This change fixes a bug where
removing the last weak references would cause it to be
triggered.
Fri Apr 24 01:29:04 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelerator.h (struct _GtkAcceleratorTable): changed ref_count
field to be of type guint.
* gtk/gtkaccelerator.c (gtk_accelerator_table_unref): added check for
ref_count>0;
(gtk_accelerator_table_install): keep a per object list of accelerator
tables that refer to this object.
(gtk_accelerator_table_remove): remove the accelerator table from the
per object list.
(gtk_accelerator_table_clean): warn if there are any object references
left in an accelerator table upon destruction.
(gtk_accelerator_tables_delete): new function to delete object
references from the accelerator tables associated with this object.
* gtk/gtkwidget.c (gtk_widget_class_init): changed emission of
GtkWidget::install_accelerator to GTK_RUN_LAST so the installation
of an accelerator can be prevented by gtk_signal_emit_stop().
(gtk_widget_real_destroy): call gtk_accelerator_tables_delete (),
so there are no stale pointers in accelerator tables left.
1998-04-22 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gtk/gtkbin.c (gtk_bin_remove): Remember whether the widget was
visible before we unparent it.
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 ;).
Sat Apr 18 22:18:12 1998 Tim Janik <timj@gtk.org>
* gtk/gtkradiomenuitem.h:
* gtk/gtkradiomenuitem.c (gtk_radio_menu_item_set_group): new function
ala gtk_radio_button_set_group.
(gtk_radio_menu_item_init): assure that we always have at least a group
that points to self.
* gtk/gtkradiobutton.c (gtk_radio_button_set_group): few cleanups and
added g_return_if_fail() statements.
(gtk_radio_button_init): assure that we always have at least a group
that points to self.
Wed Apr 15 05:13:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtklabel.c (gtk_label_size_request): corrected a brace position
(Damon Chaplin), which i got wrong when applying Damon's patch the last
time.
Wed Apr 15 20:42:46 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkpreview.c (gtk_preview_get_visuals): Make sure
that when we are running with a non-installed colormap,
in 8-bit pseudo-color, we actually are using the system
visual. (Fixes *Bad Match* errors on Digital Unix machines
with multiple 8-bit pseudo-color visuals)
* gdk/Makefile.am: Removed mostly useless dependency that
was causing problems for SGI's make, when used with
the 'make dist' form of GTK+. (Dependency caused dependencies
to be redone when BUILT_SOURCES changed)
1998-04-14 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gdk/gdkwindow.c (gdk_window_xid_at): Fix the problem introduced
by whoever thought that randomly changing ints to unsigned int
without reviewing the code was a good idea. It is, btw not
mentioned in the ChangeLog as usual, but I know it was not Elliot
the culprit this time.
Mon Apr 13 19:16:22 PDT 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.0.0

View File

@@ -1,8 +1,8 @@
Simple install procedure
========================
% gzip -cd gtk+-1.0.0.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.0.0 # change to the toplevel directory
% gzip -cd gtk+-1.0.6.tar.gz | tar xvf - # unpack the sources
% cd gtk+-1.0.6 # change to the toplevel directory
% ./configure # run the `configure' script
% make # build GTK
[ Become root if necessary ]

View File

@@ -6,10 +6,11 @@ SUBDIRS = $(SRC_SUBDIRS) docs
bin_SCRIPTS = gtk-config
EXTRA_DIST = \
gtk+.prj \
gtk+.spec \
gtk.m4 \
makecopyright \
TODO \
examples/README.1ST \
examples/aspectframe/Makefile \
examples/aspectframe/aspectframe.c \
examples/buttons/Makefile \

View File

@@ -1,353 +0,0 @@
# Makefile.in generated automatically by automake 1.2c from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
CC = @CC@
CPP = @CPP@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
NM = @NM@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
x_cflags = @x_cflags@
x_includes = @x_includes@
x_ldflags = @x_ldflags@
x_libs = @x_libs@
xinput_progs = @xinput_progs@
SRC_SUBDIRS = glib gdk gtk
SUBDIRS = $(SRC_SUBDIRS) docs
EXTRA_DIST = gtk+.prj makecopyright TODO REFCOUNTING BUGS
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = gtk+.xconfig
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS TODO acconfig.h aclocal.m4 config.guess config.h.in \
config.sub configure configure.in gtk+.xconfig.in install-sh ltconfig \
ltmain.sh missing mkinstalldirs stamp-h.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
default: all
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): @MAINT@ configure.in
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
$(srcdir)/configure: @MAINT@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
@:
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h
$(srcdir)/config.h.in: @MAINT@$(srcdir)/stamp-h.in
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
gtk+.xconfig: $(top_builddir)/config.status gtk+.xconfig.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
for subdir in $(SUBDIRS); do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
rev=''; for subdir in $(SUBDIRS); do rev="$$subdir $$rev"; done; \
for subdir in $$rev; do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
(cd $$subdir && $(MAKE) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES)
here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
done; \
test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
-rm -rf $(distdir)
GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) \
&& $(MAKE) dvi \
&& $(MAKE) check \
&& $(MAKE) install \
&& $(MAKE) installcheck \
&& $(MAKE) dist
-rm -rf $(distdir)
@echo "========================"; \
echo "$(distdir).tar.gz is ready for distribution"; \
echo "========================"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
for subdir in $(SUBDIRS); do \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
done
info: info-recursive
dvi: dvi-recursive
check: all-am
$(MAKE) check-recursive
installcheck: installcheck-recursive
all-recursive-am: config.h
$(MAKE) all-recursive
all-am: Makefile config.h
install-exec: install-exec-recursive
@$(NORMAL_INSTALL)
install-data: install-data-recursive
@$(NORMAL_INSTALL)
install: install-recursive
@:
uninstall: uninstall-recursive
all: all-recursive-am all-am
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs: installdirs-recursive
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(DISTCLEANFILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
maintainer-clean-generic distclean-am
mostlyclean: mostlyclean-recursive mostlyclean-am
clean: clean-recursive clean-am
distclean: distclean-recursive distclean-am
-rm -f config.status
-rm -f libtool
maintainer-clean: maintainer-clean-recursive maintainer-clean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-rm -f config.status
.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \
maintainer-clean-hdr install-data-recursive uninstall-data-recursive \
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstalldirs-recursive all-recursive check-recursive \
installcheck-recursive info-recursive dvi-recursive \
mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
installcheck all-recursive-am all-am install-exec install-data install \
uninstall all installdirs mostlyclean-generic distclean-generic \
clean-generic maintainer-clean-generic clean mostlyclean distclean \
maintainer-clean
.PHONY: files populate checkin release
files:
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
echo $$p; \
done
@for subdir in $(SUBDIRS); do \
files=`cd $$subdir; $(MAKE) files | grep -v "make\[[1-9]\]"`; \
for file in $$files; do \
echo $$subdir/$$file; \
done; \
done
populate:
@echo "populating project"
@files=`$(MAKE) files | grep -v "make\[[1-9]\]"`; prcs populate -d gtk+.prj $$files
checkin: populate
@echo "checking in project"
@prcs checkin
release:
$(MAKE) dist distdir=$(PACKAGE)`date +"%y%m%d"`
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

54
NEWS
View File

@@ -1,3 +1,57 @@
Overview of Changes in GTK+ 1.0.6:
* Minor documentation fixups.
* Miscellaneous fixes for Entry, Paned, Table and CList widgets.
* More fixes for GtkText, should behave much more stable now.
* GtkFileSelection should behave much more nicely in combination with AFS now.
* Configuration fixes on various platforms.
* Miscellaneous fixes to XInput support.
* Build with shared library dependencies on Linux
* Fix for a major bug in the type systems memory allocation code that could
cause random crashes.
Overview of Changes in GTK+ 1.0.5:
* Minor documentation fixups.
* Fixes for clist (pixmap clipping), notebook, optionmenu, spinbutton
and text widgets.
* Minor ficup about base class initializations in the type system.
* Fix for a major bug in the signal code that would cause random crashes.
Overview of Changes in GTK+ 1.0.4:
* Documentation changes (Thanks to Tony Gale!)
* autoconf fix for x_lib variable
* fixed pixmap clipping in gtkclist
Overview of Changes in GTK+ 1.0.3:
* Bug fixes, including fix for visuals on SGI machines
Overview of Changes in GTK+ 1.0.2:
* Speedups for type creation and especially gtk_type_is_a() checks.
* Speedups in signal lookup, creation and emissions and connection handling.
* Additions to the signal handling API (e.g. *_emitv).
* Minor speedups with object data allocation and destruction.
* Newly included file gtkfeatures.h which defines compatibility macros to
test for certain API features upon program compilation.
* Cleanups to give less warnings on 64-bit platforms.
* Many bugs fixed, including:
- A segfault with selections on Solaris and IRIX.
- A segfault that occured for all keypresses on Linux/Alpha.
Overview of Changes in GTK+ 1.0.1:
* Significant speedups to widget creation and destruction
* Upgrade to libtool-1.2
* Lots of bug fixes, including one that fixed a major memory leak
in 1.0.0.
Overview of Changes in GTK+ 1.0.0:

2
README
View File

@@ -1,7 +1,7 @@
General Information
===================
This is GTK+ version 1.0.0. GTK+, which stands for the Gimp ToolKit,
This is GTK+ version 1.0.6. 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.

View File

@@ -17,10 +17,14 @@
/* Other stuff */
#undef HAVE_IPC_H
#undef HAVE_SHM_H
#undef HAVE_XPM
#undef HAVE_XSHM_H
#undef HAVE_SHAPE_EXT
#undef HAVE_SYS_SELECT_H
/* some systems do not allow to ipcrm pages prior to
* actual usage, namely: OSF1 V3.2, SunOS 4.1.1, 5.5, 5.5.1, 5.6,
* IRIX 5.2 and 6.2.
*/
#undef IPC_RMID_DEFERRED_RELEASE
#undef NO_FD_SET
@@ -31,11 +35,6 @@
#undef XINPUT_GXI
#undef XINPUT_XFREE
#undef GTK_MAJOR_VERSION
#undef GTK_MINOR_VERSION
#undef GTK_MICRO_VERSION
#undef GTK_VERSION
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE

View File

@@ -18,10 +18,14 @@
/* Other stuff */
#undef HAVE_IPC_H
#undef HAVE_SHM_H
#undef HAVE_XPM
#undef HAVE_XSHM_H
#undef HAVE_SHAPE_EXT
#undef HAVE_SYS_SELECT_H
/* some systems do not allow to ipcrm pages prior to
* actual usage, namely: OSF1 V3.2, SunOS 4.1.1, 5.5, 5.5.1, 5.6,
* IRIX 5.2 and 6.2.
*/
#undef IPC_RMID_DEFERRED_RELEASE
#undef NO_FD_SET
@@ -32,11 +36,6 @@
#undef XINPUT_GXI
#undef XINPUT_XFREE
#undef GTK_MAJOR_VERSION
#undef GTK_MINOR_VERSION
#undef GTK_MICRO_VERSION
#undef GTK_VERSION
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE

View File

@@ -6,7 +6,7 @@ cflags_set=${CFLAGS+set}
GTK_MAJOR_VERSION=1
GTK_MINOR_VERSION=0
GTK_MICRO_VERSION=0
GTK_MICRO_VERSION=6
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
# For automake.
@@ -16,12 +16,17 @@ PACKAGE=gtk+
# Configure glib
AC_CONFIG_SUBDIRS(glib)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AC_SUBST(GTK_MAJOR_VERSION)
AC_SUBST(GTK_MINOR_VERSION)
AC_SUBST(GTK_MICRO_VERSION)
AC_SUBST(GTK_VERSION)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
# Specify a configuration file
AM_CONFIG_HEADER(config.h)
@@ -45,7 +50,7 @@ AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="-g"
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
CFLAGS="$CFLAGS -DG_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
@@ -80,19 +85,52 @@ if test "x$GCC" = "xyes"; then
fi
fi
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
gtk_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(none needed),
gtk_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -std1"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(-std1),
AC_MSG_RESULT()
CFLAGS=$gtk_save_CFLAGS
AC_MSG_WARN(
[No ANSI prototypes found in library. (-std1 didn't work.)])
)
)
LIBS=$gtk_save_LIBS
dnl NeXTStep cc seems to need this
AC_MSG_CHECKING([for extra flags for POSIX compliance])
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
AC_MSG_RESULT(none needed),
gtk_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -posix"
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
AC_MSG_RESULT(-posix),
AC_MSG_RESULT()
CFLAGS=$gtk_save_CFLAGS
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
if test "x$enable_xim" = "xyes"; then
CFLAGS="$CFLAGS -DUSE_XIM"
fi
AC_DEFINE_UNQUOTED(GTK_MAJOR_VERSION, $GTK_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(GTK_MINOR_VERSION, $GTK_MINOR_VERSION)
AC_DEFINE_UNQUOTED(GTK_MICRO_VERSION, $GTK_MICRO_VERSION)
AC_DEFINE_UNQUOTED(GTK_VERSION, "$GTK_VERSION")
# Find the X11 include and library directories
AC_PATH_X
AC_PATH_XTRA
if test "x$no_x" = "xyes"; then
AC_MSG_ERROR([
*** X libraries or include files not found. Check 'config.log' for
*** more details.])
fi
if test "x$x_includes" = "x"; then
x_includes="/usr/include"
fi
@@ -100,12 +138,14 @@ fi
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
CFLAGS="$X_CFLAGS"
LDFLAGS="$X_LDFLAGS $X_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
# Checks for libraries.
# Check for the X11 library
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", no_x11_lib=yes, $X_EXTRA_LIBS)
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
$X_EXTRA_LIBS)
if test "x$enable_shm" = "xyes"; then
# Check for the Xext library (needed for XShm extention)
@@ -118,6 +158,14 @@ if test "x$enable_shm" = "xyes"; then
$x_libs)
fi
# Check for shaped window extension
AC_CHECK_LIB(Xext, XShapeCombineMask,
if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
x_libs="-lXext $x_libs"
fi
AC_DEFINE(HAVE_SHAPE_EXT),, $x_libs)
x_cflags="$X_CFLAGS"
x_ldflags="$X_LDFLAGS $X_LIBS"
@@ -139,7 +187,6 @@ AC_SUBST(x_includes)
AC_SUBST(x_ldflags)
AC_SUBST(x_libs)
AC_SUBST(xinput_progs)
AC_SUBST(GTK_VERSION)
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
@@ -265,5 +312,12 @@ if test $gtk_ok = no; then
AC_DEFINE(NO_FD_SET)
fi
AC_OUTPUT([Makefile gtk-config docs/Makefile gdk/Makefile gtk/Makefile],
[chmod +x gtk-config])
AC_OUTPUT([
Makefile
gtk-config
docs/Makefile
gdk/Makefile
gtk/Makefile
gtk/gtkfeatures.h
],
[chmod +x gtk-config])

View File

@@ -2,6 +2,8 @@
info_TEXINFOS = gdk.texi gtk.texi glib.texi
man_MANS = gtk-config.1
EXTRA_DIST = \
texinfo.tex \
macros.texi \
@@ -19,7 +21,8 @@ EXTRA_DIST = \
widget_system.txt \
gtk_tut_packbox1.gif \
gtk_tut_packbox2.gif \
gtk_tut_table.gif
gtk_tut_table.gif \
gtk-config.1

View File

@@ -1,294 +0,0 @@
# Makefile.in generated automatically by automake 1.2c from Makefile.am
# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = true
PRE_INSTALL = true
POST_INSTALL = true
NORMAL_UNINSTALL = true
PRE_UNINSTALL = true
POST_UNINSTALL = true
host_alias = @host_alias@
host_triplet = @host@
CC = @CC@
CPP = @CPP@
LD = @LD@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
NM = @NM@
PACKAGE = @PACKAGE@
RANLIB = @RANLIB@
VERSION = @VERSION@
x_cflags = @x_cflags@
x_includes = @x_includes@
x_ldflags = @x_ldflags@
x_libs = @x_libs@
xinput_progs = @xinput_progs@
info_TEXINFOS = gdk.texi gtk.texi
EXTRA_DIST = texinfo.tex macros.texi Makefile.gtkfaq gtkfaq.sgml gtkfaq_fix
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
TEXI2DVI = texi2dvi
TEXINFO_TEX = $(srcdir)/texinfo.tex
INFO_DEPS = gdk.info gtk.info
DVIS = gdk.dvi gtk.dvi
TEXINFOS = gdk.texi gtk.texi
DIST_COMMON = Makefile.am Makefile.in texinfo.tex
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP = --best
default: all
.SUFFIXES:
.SUFFIXES: .dvi .info .ps .texi .texinfo
$(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
gdk.info: gdk.texi
gdk.dvi: gdk.texi
gtk.info: gtk.texi
gtk.dvi: gtk.texi
DVIPS = dvips
.texi.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texi.dvi:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.texi:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo.info:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo:
@cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
cd $(srcdir) \
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
.texinfo.dvi:
TEXINPUTS=$(srcdir):$$TEXINPUTS \
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
.dvi.ps:
$(DVIPS) $< -o $@
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(infodir)
@for file in $(INFO_DEPS); do \
d=$(srcdir); \
for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
if test -f $$d/$$ifile; then \
echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
$(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
else : ; fi; \
done; \
done
@$(POST_INSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
for file in $(INFO_DEPS); do \
echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
done; \
else : ; fi
uninstall-info:
$(PRE_UNINSTALL)
@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
ii=yes; \
else ii=; fi; \
for file in $(INFO_DEPS); do \
test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \
done
$(NORMAL_UNINSTALL)
for file in $(INFO_DEPS); do \
(cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
done
dist-info: $(INFO_DEPS)
for base in $(INFO_DEPS); do \
d=$(srcdir); \
for file in `cd $$d && eval echo $$base*`; do \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done; \
done
mostlyclean-aminfo:
-rm -f gdk.aux gdk.cp gdk.cps gdk.dvi gdk.fn gdk.fns gdk.ky gdk.kys \
gdk.ps gdk.log gdk.pg gdk.toc gdk.tp gdk.tps gdk.vr gdk.vrs \
gdk.op gdk.tr gdk.cv gdk.cn gtk.aux gtk.cp gtk.cps gtk.dvi \
gtk.fn gtk.fns gtk.ky gtk.kys gtk.ps gtk.log gtk.pg gtk.toc \
gtk.tp gtk.tps gtk.vr gtk.vrs gtk.op gtk.tr gtk.cv gtk.cn
clean-aminfo:
distclean-aminfo:
maintainer-clean-aminfo:
for i in $(INFO_DEPS); do \
rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \
fi; \
done
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = docs
distdir: $(DISTFILES)
here=`cd $(top_builddir) && pwd`; \
top_distdir=`cd $(top_distdir) && pwd`; \
distdir=`cd $(distdir) && pwd`; \
cd $(top_srcdir) \
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu docs/Makefile
@for file in $(DISTFILES); do \
d=$(srcdir); \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file; \
done
$(MAKE) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
info: $(INFO_DEPS)
dvi: $(DVIS)
check: all
$(MAKE)
installcheck:
install-exec:
@$(NORMAL_INSTALL)
install-data: install-info-am
@$(NORMAL_INSTALL)
install: install-exec install-data all
@:
uninstall: uninstall-info
all: Makefile $(INFO_DEPS)
install-strip:
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
installdirs:
$(mkinstalldirs) $(infodir)
mostlyclean-generic:
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(DISTCLEANFILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
mostlyclean: mostlyclean-aminfo mostlyclean-generic
clean: clean-aminfo clean-generic mostlyclean
distclean: distclean-aminfo distclean-generic clean
-rm -f config.status
-rm -f libtool
maintainer-clean: maintainer-clean-aminfo maintainer-clean-generic \
distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
.PHONY: default install-info-am uninstall-info mostlyclean-aminfo \
distclean-aminfo clean-aminfo maintainer-clean-aminfo tags distdir info \
dvi installcheck install-exec install-data install uninstall all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
files:
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
echo $$p; \
done
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -8,7 +8,7 @@
<!-- NOTE: Use only one author tag, otherwise sgml2txt barfs - TRG -->
<author>Nathan Froyd, Tony Gale, Shawn T. Amundson.
<date>April 6nd 1998
<date>May 11th 1998
<abstract>
This document is intended to answer questions that are likely to be
frequently asked by programmers using GTK+ or people who are just
@@ -163,6 +163,23 @@ name="http://www.gnome.org">)
is using GTK+ to build a free desktop for Linux. Many more programs can be found
there.
<!-- ----------------------------------------------------------------- -->
<sect1>I'm looking for an application to write in GTK+. How about an IRC client?
<p>
Ask on gtk-list for suggestions. There are at least four IRC
clients already under development.
<itemize>
<item>girc. (Included with GNOME)
<item>Bezerk (<htmlurl url="http://www.gtk.org/~trog/"
name="http://www.gtk.org/~trog/">)
<item>gsirc. (Location?)
<item>Gnirc. (<htmlurl url="http://www.imaginet.fr/~dramboz/gnirc"
name="http://www.imaginet.fr/~dramboz/gnirc">)
</itemize>
<!-- ***************************************************************** -->
<sect>How to find, configure, install, and troubleshoot GTK+
@@ -202,8 +219,7 @@ handle the automatically generated Makefiles.
<!-- ----------------------------------------------------------------- -->
<sect1>I've compiled and installed GTK+, but I can't get any programs to link
with it!
<sect1>I've compiled and installed GTK+, but I can't get any programs to link with it!
<p>
This problem is most often encountered when the GTK+ libraries can't be
found or are the wrong version. Generally, the compiler will complain about an
@@ -249,6 +265,45 @@ the libraries libgtk, libgdk, libglib, or libgck. If they do exist, remove them
and reinstall gtk+.
</itemize>
<!-- ----------------------------------------------------------------- -->
<sect1>When compiling programs with GTK+, I get compiler error messages about not being able to find <tt/"glibconfig.h"/.
<p> The header file "glibconfig.h" was moved to the directory
$exec_prefix/lib/glib/include/. $exec_prefix is the
directory that was specified by giving the --exec-prefix
flags to ./configure when compiling GTK+. It defaults to
$prefix, (specified with --prefix), which in turn defaults
to /usr/local/.
This was done because "glibconfig.h" includes architecture
dependent information, and the rest of the include files
are put in $prefix/include, which can be shared between different
architectures.
GTK+ includes a shell script, <tt/gtk-config/, that
makes it easy to find out the correct include paths.
The GTK+ tutorial includes an example of using <tt/gtk-config/
for simple compilation from the command line. For information
about more complicated configuration, see the file
docs/gtk-config.txt in the GTK+ distribution.
If you are trying to compile an old program, you may
be able to work around the problem by configuring it
with a command line like:
<tscreen><verb>
CPPFLAGS="-I/usr/local/include/glib/include" ./configure
</verb></tscreen>
for Bourne-compatible shells like bash, or for csh variants:
<tscreen><verb>
setenv CPPFLAGS "-I/usr/local/include/glib/include"
./configure
</verb></tscreen>
(Substitute the appropriate value of $exec_prefix for /usr/local.)
<!-- ----------------------------------------------------------------- -->
<sect1>When installing The GIMP, configure reports that it can't find GTK.
<p>
@@ -379,13 +434,11 @@ gladly be included.
Yes. There is
<itemize>
<item>a C++ wrapper for GTK+ called gtk--. You can find the home page at:
<verb>
http://www.cs.tut.fi/~p150650/gtk/gtk--.html
</verb>
The FTP site is:
<verb>
ftp://ftp.gtk.org/pub/gtk/gtk--/
</verb>
<htmlurl url="http://www.cs.tut.fi/~p150650/gtk/gtk--.html"
name="http://www.cs.tut.fi/~p150650/gtk/gtk--.html">.
The FTP site is
<htmlurl url="ftp://ftp.gtk.org/pub/gtk/gtk--"
name="ftp://ftp.gtk.org/pub/gtk/gtk--">.
<p>
<item>There are two Objective-c bindings currently in development:
@@ -408,14 +461,12 @@ ftp://ftp.gtk.org/pub/gtk/gtk--/
</itemize>
<p>
<item>Perl bindings
<verb>
ftp://ftp.gtk.org/pub/gtk/perl
</verb>
<item>Guile bindings. The home page is at:
<verb>
http://www.ping.de/sites/zagadka/guile-gtk/
</verb>
<htmlurl url="ftp://ftp.gtk.org/pub/gtk/perl"
name="ftp://ftp.gtk.org/pub/gtk/perl">
<P>
<item>Guile bindings. The home page is at
<htmlurl url="http://www.ping.de/sites/zagadka/guile-gtk"
name="http://www.ping.de/sites/zagadka/guile-gtk">.
By the way, Guile is the GNU Project's implemention of R4RS Scheme (the
standard). If you like Scheme, you may want to take a look at this.
<p>
@@ -425,24 +476,28 @@ standard). If you like Scheme, you may want to take a look at this.
The basics of the system, including callbacks, work fine.
The current development is in
http://www.ens-lyon.fr/~dmonniau/arcs/
<htmlurl url="http://www.ens-lyon.fr/~dmonniau/arcs"
name="http://www.ens-lyon.fr/~dmonniau/arcs">
</quote>
<item>
Several python-gtk interfaces have been done. python-gtk is at:
<verb>
http://www.acs.ucalgary.cs/~nashceme/python-gtk/
</verb>
If you try python-gtk and don't like it, there's also pygtk located at:
<verb>
ftp://ftp.gtk.org/pub/gtk/python/
</verb>
Several python bindings have been done:
<p>
<itemize>
<item>pygtk is at
<htmlurl url="http://www.daa.com.au/~james/pygtk"
name="http://www.daa.com.au/~james/pygtk"> and
<htmlurl url="ftp://ftp.gtk.org/pub/gtk/python"
name="ftp://ftp.gtk.org/pub/gtk/python">
<item>python-gtk is at
<htmlurl url="http://www.ucalgary.ca/~nascheme/python-gtk"
name="http://www.ucalgary.ca/~nascheme/python-gtk">
</itemize>
<p>
<item>
There's a OpenGL/Mesa widget available for GTK+. Grab it at:
<verb>
http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html
</verb>
There's a OpenGL/Mesa widget available for GTK+. Grab it at
<htmlurl url="http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html"
name="http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html">
</itemize>
@@ -508,6 +563,7 @@ The GTK+ Tutorial lists the following widgets:
| | `GtkCheckButton
| | `GtkRadioButton
| +GtkCList
| `GtkCTree
| +GtkFixed
| +GtkList
| +GtkMenuShell
@@ -550,6 +606,58 @@ The GTK+ Tutorial lists the following widgets:
`GtkVSeparator
</verb>
<!-- ----------------------------------------------------------------- -->
<sect1>Is GTK+ thread safe? How do I write multi-threaded GTK+ applications?
<p>
Although GTK+, like many X toolkits, isn't thread safe, this does
not prohibit the development of multi-threaded applications with
GTK+.
Rob Browning (rlb@cs.utexas.edu) describes threading techniques for
use with GTK+ (slightly edited):
There are basically two main approaches, the first is simple, and the
second complicated. In the first, you just make sure that all GTK+ (or
X) interactions are handled by one, and
only one, thread. Any other thread that wants to draw something has
to somehow notify the "GTK+" thread, and let it handle the
actual work.
The second approach allows you to call GTK+ (or X) functions from any
thread, but it requires some careful synchronization. The
basic idea is that you create an X protection mutex, and no one may
make any X calls without first acquiring this mutex.
Note that this is a little effort, but it allows you to be
potentially more efficient than a completely thread safe GTK+. You
get to decide the granularity of the thread locking. You also have to
make sure that the thread that calls gtk_main is holding the lock when
it calls gtk_main.
The next thing to worry about is that since you were holding the
global mutex when you entered gtk_main, all callbacks will also be
holding it. This means that the callback must release it if it's
going to call any other code that might reacquire it. Otherwise
you'll get deadlock. Also, you must be holding the mutex when you
finally return from the callback.
In order to allow threads other than the one calling gtk_main to
get access to the mutex, we also need to register a work function
with GTK that allows us to release the mutex periodically.
Why can't GTK+ be thread safe by default?
Complexity, overhead, and manpower. The proportion of threaded
programs is still reasonably small, and getting thread safety right is
both quite difficult and takes valuable time away from the main work
of getting a good graphics library finished. It would be nice to have
GTK+ thread safe "out of the box", but that's not practical right now,
and it also might make GTK+ substantially less efficient if not handled
carefully.
Regardless, it's especially not a priority since relatively good
workarounds exist.
<!-- ----------------------------------------------------------------- -->
<sect1>How can I prevent redrawing and resizing while I change multiple widgets?
<p>
@@ -558,7 +666,7 @@ code where you are changing a lot of stuff. This will result in much faster
speed since it will prevent resizing of the entire widget hierarchy.
<!-- ----------------------------------------------------------------- -->
<sect1>How do I catch a double click event in a list widget?
<sect1>How do I catch a double click event (in a list widget, for example)?
<p>
Tim Janik wrote to gtk-list (slightly modified):
@@ -601,7 +709,15 @@ And connect the handler to your object:
/* something else */
}
</verb></tscreen>
and, Owen Taylor wrote:
Note that a single button press will be received beforehand, and
if you are doing this for a button, you will therefore also get a
"clicked" signal for the button. (This is going to be true for
any toolkit, since computers aren't good at reading one's
mind.)
<!-- ----------------------------------------------------------------- -->
<sect1>How do I find out about the selection of a GtkList?
<p>

49
docs/gtk-config.1 Normal file
View File

@@ -0,0 +1,49 @@
.TH GTK+ 1 "11 May 1998" Version 1.0.2
.SH NAME
gtk-config - script to get information about the installed version of GTK+
.SH SYNOPSIS
.B gtk-config
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-version] [\-\-libs] [\-\-cflags]
.SH DESCRIPTION
.PP
\fIgtk-config\fP is a tool that is used to configure to determine
the compiler and linker flags that should be used to compile
and link programs that use \fIGTK+\fP. It is also used internally
to the .m4 macros for GNU autoconf that are included with \fIGTK+\fP.
.
.SH OPTIONS
.l
\fIgtk-config\fP accepts the following options:
.TP 8
.B \-\-version
Print the currently installed version of \fIGTK+\fP on the standard output.
.TP 8
.B \-\-libs
Print the linker flags that are necessary to link a \fIGTK+\fP program.
.TP 8
.B \-\-cflags
Print the compiler flags that are necessary to compile a \fIGTK+\fP program.
.TP 8
.B \-\-prefix=PREFIX
If specified, use PREFIX instead of the installation prefix that \fIGTK+\fP
was built with when computing the output for the \-\-cflags and
\-\-libs options. This option is also used for the exec prefix
if \-\-exec\-prefix was not specified. This option must be specified
before any \-\-libs or \-\-cflags options.
.TP 8
.B \-\-exec\-prefix=PREFIX
If specified, use PREFIX instead of the installation exec prefix that
\fIGTK+\fP was built with when computing the output for the \-\-cflags
and \-\-libs options. This option must be specified before any
\-\-libs or \-\-cflags options.
.SH SEE ALSO
.BR gimp (1),
.BR gimptool (1)
.SH COPYRIGHT
Copyright \(co 1995 Spencer Kimball and Peter Mattis
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
<!-- NOTE: Use only one author tag, otherwise sgml2txt barfs - TRG -->
<author>Nathan Froyd, Tony Gale, Shawn T. Amundson.
<date>April 6nd 1998
<date>May 11th 1998
<abstract>
This document is intended to answer questions that are likely to be
frequently asked by programmers using GTK+ or people who are just
@@ -163,6 +163,23 @@ name="http://www.gnome.org">)
is using GTK+ to build a free desktop for Linux. Many more programs can be found
there.
<!-- ----------------------------------------------------------------- -->
<sect1>I'm looking for an application to write in GTK+. How about an IRC client?
<p>
Ask on gtk-list for suggestions. There are at least four IRC
clients already under development.
<itemize>
<item>girc. (Included with GNOME)
<item>Bezerk (<htmlurl url="http://www.gtk.org/~trog/"
name="http://www.gtk.org/~trog/">)
<item>gsirc. (Location?)
<item>Gnirc. (<htmlurl url="http://www.imaginet.fr/~dramboz/gnirc"
name="http://www.imaginet.fr/~dramboz/gnirc">)
</itemize>
<!-- ***************************************************************** -->
<sect>How to find, configure, install, and troubleshoot GTK+
@@ -202,8 +219,7 @@ handle the automatically generated Makefiles.
<!-- ----------------------------------------------------------------- -->
<sect1>I've compiled and installed GTK+, but I can't get any programs to link
with it!
<sect1>I've compiled and installed GTK+, but I can't get any programs to link with it!
<p>
This problem is most often encountered when the GTK+ libraries can't be
found or are the wrong version. Generally, the compiler will complain about an
@@ -249,6 +265,45 @@ the libraries libgtk, libgdk, libglib, or libgck. If they do exist, remove them
and reinstall gtk+.
</itemize>
<!-- ----------------------------------------------------------------- -->
<sect1>When compiling programs with GTK+, I get compiler error messages about not being able to find <tt/"glibconfig.h"/.
<p> The header file "glibconfig.h" was moved to the directory
$exec_prefix/lib/glib/include/. $exec_prefix is the
directory that was specified by giving the --exec-prefix
flags to ./configure when compiling GTK+. It defaults to
$prefix, (specified with --prefix), which in turn defaults
to /usr/local/.
This was done because "glibconfig.h" includes architecture
dependent information, and the rest of the include files
are put in $prefix/include, which can be shared between different
architectures.
GTK+ includes a shell script, <tt/gtk-config/, that
makes it easy to find out the correct include paths.
The GTK+ tutorial includes an example of using <tt/gtk-config/
for simple compilation from the command line. For information
about more complicated configuration, see the file
docs/gtk-config.txt in the GTK+ distribution.
If you are trying to compile an old program, you may
be able to work around the problem by configuring it
with a command line like:
<tscreen><verb>
CPPFLAGS="-I/usr/local/include/glib/include" ./configure
</verb></tscreen>
for Bourne-compatible shells like bash, or for csh variants:
<tscreen><verb>
setenv CPPFLAGS "-I/usr/local/include/glib/include"
./configure
</verb></tscreen>
(Substitute the appropriate value of $exec_prefix for /usr/local.)
<!-- ----------------------------------------------------------------- -->
<sect1>When installing The GIMP, configure reports that it can't find GTK.
<p>
@@ -379,13 +434,11 @@ gladly be included.
Yes. There is
<itemize>
<item>a C++ wrapper for GTK+ called gtk--. You can find the home page at:
<verb>
http://www.cs.tut.fi/~p150650/gtk/gtk--.html
</verb>
The FTP site is:
<verb>
ftp://ftp.gtk.org/pub/gtk/gtk--/
</verb>
<htmlurl url="http://www.cs.tut.fi/~p150650/gtk/gtk--.html"
name="http://www.cs.tut.fi/~p150650/gtk/gtk--.html">.
The FTP site is
<htmlurl url="ftp://ftp.gtk.org/pub/gtk/gtk--"
name="ftp://ftp.gtk.org/pub/gtk/gtk--">.
<p>
<item>There are two Objective-c bindings currently in development:
@@ -408,14 +461,12 @@ ftp://ftp.gtk.org/pub/gtk/gtk--/
</itemize>
<p>
<item>Perl bindings
<verb>
ftp://ftp.gtk.org/pub/gtk/perl
</verb>
<item>Guile bindings. The home page is at:
<verb>
http://www.ping.de/sites/zagadka/guile-gtk/
</verb>
<htmlurl url="ftp://ftp.gtk.org/pub/gtk/perl"
name="ftp://ftp.gtk.org/pub/gtk/perl">
<P>
<item>Guile bindings. The home page is at
<htmlurl url="http://www.ping.de/sites/zagadka/guile-gtk"
name="http://www.ping.de/sites/zagadka/guile-gtk">.
By the way, Guile is the GNU Project's implemention of R4RS Scheme (the
standard). If you like Scheme, you may want to take a look at this.
<p>
@@ -425,24 +476,28 @@ standard). If you like Scheme, you may want to take a look at this.
The basics of the system, including callbacks, work fine.
The current development is in
http://www.ens-lyon.fr/~dmonniau/arcs/
<htmlurl url="http://www.ens-lyon.fr/~dmonniau/arcs"
name="http://www.ens-lyon.fr/~dmonniau/arcs">
</quote>
<item>
Several python-gtk interfaces have been done. python-gtk is at:
<verb>
http://www.acs.ucalgary.cs/~nashceme/python-gtk/
</verb>
If you try python-gtk and don't like it, there's also pygtk located at:
<verb>
ftp://ftp.gtk.org/pub/gtk/python/
</verb>
Several python bindings have been done:
<p>
<itemize>
<item>pygtk is at
<htmlurl url="http://www.daa.com.au/~james/pygtk"
name="http://www.daa.com.au/~james/pygtk"> and
<htmlurl url="ftp://ftp.gtk.org/pub/gtk/python"
name="ftp://ftp.gtk.org/pub/gtk/python">
<item>python-gtk is at
<htmlurl url="http://www.ucalgary.ca/~nascheme/python-gtk"
name="http://www.ucalgary.ca/~nascheme/python-gtk">
</itemize>
<p>
<item>
There's a OpenGL/Mesa widget available for GTK+. Grab it at:
<verb>
http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html
</verb>
There's a OpenGL/Mesa widget available for GTK+. Grab it at
<htmlurl url="http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html"
name="http://www.sakuranet.or.jp/~aozasa/shige/doc/comp/gtk/gtkGL/files-en.html">
</itemize>
@@ -508,6 +563,7 @@ The GTK+ Tutorial lists the following widgets:
| | `GtkCheckButton
| | `GtkRadioButton
| +GtkCList
| `GtkCTree
| +GtkFixed
| +GtkList
| +GtkMenuShell
@@ -550,6 +606,58 @@ The GTK+ Tutorial lists the following widgets:
`GtkVSeparator
</verb>
<!-- ----------------------------------------------------------------- -->
<sect1>Is GTK+ thread safe? How do I write multi-threaded GTK+ applications?
<p>
Although GTK+, like many X toolkits, isn't thread safe, this does
not prohibit the development of multi-threaded applications with
GTK+.
Rob Browning (rlb@cs.utexas.edu) describes threading techniques for
use with GTK+ (slightly edited):
There are basically two main approaches, the first is simple, and the
second complicated. In the first, you just make sure that all GTK+ (or
X) interactions are handled by one, and
only one, thread. Any other thread that wants to draw something has
to somehow notify the "GTK+" thread, and let it handle the
actual work.
The second approach allows you to call GTK+ (or X) functions from any
thread, but it requires some careful synchronization. The
basic idea is that you create an X protection mutex, and no one may
make any X calls without first acquiring this mutex.
Note that this is a little effort, but it allows you to be
potentially more efficient than a completely thread safe GTK+. You
get to decide the granularity of the thread locking. You also have to
make sure that the thread that calls gtk_main is holding the lock when
it calls gtk_main.
The next thing to worry about is that since you were holding the
global mutex when you entered gtk_main, all callbacks will also be
holding it. This means that the callback must release it if it's
going to call any other code that might reacquire it. Otherwise
you'll get deadlock. Also, you must be holding the mutex when you
finally return from the callback.
In order to allow threads other than the one calling gtk_main to
get access to the mutex, we also need to register a work function
with GTK that allows us to release the mutex periodically.
Why can't GTK+ be thread safe by default?
Complexity, overhead, and manpower. The proportion of threaded
programs is still reasonably small, and getting thread safety right is
both quite difficult and takes valuable time away from the main work
of getting a good graphics library finished. It would be nice to have
GTK+ thread safe "out of the box", but that's not practical right now,
and it also might make GTK+ substantially less efficient if not handled
carefully.
Regardless, it's especially not a priority since relatively good
workarounds exist.
<!-- ----------------------------------------------------------------- -->
<sect1>How can I prevent redrawing and resizing while I change multiple widgets?
<p>
@@ -558,7 +666,7 @@ code where you are changing a lot of stuff. This will result in much faster
speed since it will prevent resizing of the entire widget hierarchy.
<!-- ----------------------------------------------------------------- -->
<sect1>How do I catch a double click event in a list widget?
<sect1>How do I catch a double click event (in a list widget, for example)?
<p>
Tim Janik wrote to gtk-list (slightly modified):
@@ -601,7 +709,15 @@ And connect the handler to your object:
/* something else */
}
</verb></tscreen>
and, Owen Taylor wrote:
Note that a single button press will be received beforehand, and
if you are doing this for a button, you will therefore also get a
"clicked" signal for the button. (This is going to be true for
any toolkit, since computers aren't good at reading one's
mind.)
<!-- ----------------------------------------------------------------- -->
<sect1>How do I find out about the selection of a GtkList?
<p>

26
docs/man/gtk.pod Normal file
View File

@@ -0,0 +1,26 @@
=head1 NAME
GTK+ - The GIMP Toolkit
=head1 SYNOPSIS
For information on GTK+, see the man pages below.
=head1 COMMANDS
=head1 CONTAINER WIDGETS
gtk_box(3)
gtk_vbox(3)
gtk_hbox(3)
=head1 WIDGETS
gtk_button(3)
=head1 AUTHORS
The author of this man page is Shawn T. Amundson E<lt>amundson@gtk.orgE<gt>.
For the authors of GTK+, see the AUTHORS file in the GTK+ distribution.

206
docs/man/gtk_button.pod Normal file
View File

@@ -0,0 +1,206 @@
=head1 NAME
gtk_button - GTK+ push button widget
=head1 SYNOPSIS
#include <gtk/gtkbutton.h>
GtkType gtk_button_get_type (void);
GtkWidget* gtk_button_new (void);
GtkWidget* gtk_button_new_with_label (const gchar *label);
void gtk_button_pressed (GtkButton *button);
void gtk_button_released (GtkButton *button);
void gtk_button_clicked (GtkButton *button);
void gtk_button_enter (GtkButton *button);
void gtk_button_leave (GtkButton *button);
=head1 DESCRIPTION
This widget is a standard push button widget. Push button widgets
are generally used for allowing the user to click on them to initiate
a command.
This widget is a container widget which contains one child.
=head1 OBJECT HIERARCHY
gtk_object
gtk_widget
gtk_container
gtk_button
=head1 SIGNAL PROTOTYPES
"clicked" void user_function (GtkWidget *widget, gpointer data);
"pressed" void user_function (GtkWidget *widget, gpointer data);
"released" void user_function (GtkWidget *widget, gpointer data);
"enter" void user_function (GtkWidget *widget, gpointer data);
"leave" void user_function (GtkWidget *widget, gpointer data);
=head1 USAGE
=head2 Creation
The most common way to create a button is with a label in it, which
contains text for the user to read. The child of the button will then
be a L<gtk_label(3)> widget with the text you passwd in. You can
do this in one command:
GtkWidget *button;
button = gtk_button_new_with_label ("This is a button");
To create a gtk_button widget which does not already have a child,
use gtk_button_new():
GtkWidget *button;
button = gtk_button_new ();
After you have created a button you can then add a widget to the
button (such as a label or pixmap) using gtk_container_add(). See
L<gtk_container(3)> for more information on adding widgets to
containers.
=head2 Creating a pixmap in a button in a window
After we have an empty gtk_button, such as above, and we have a gtk_pixmap,
we can simply add the gtk_pixmap to the gtk_button with gtk_container_add().
The following code will open the file "gimp.xpm" and place it in a
button.
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *button;
GtkWidget *pixmap;
GtkStyle *style;
GdkPixmap *gdkpixmap;
GdkBitmap *mask;
char *filename = "gimp.xpm";
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (window), button);
/* The button is realized now, which creates button->window
used below to create the pixmap. */
gtk_widget_realize (button);
style = gtk_widget_get_style (button);
gdkpixmap = gdk_pixmap_create_from_xpm (button->window, &mask,
&style->bg[GTK_STATE_NORMAL],
filename);
pixmap = gtk_pixmap_new (gdkpixmap, mask);
gtk_container_add (GTK_CONTAINER (button), pixmap);
gtk_widget_show (pixmap);
gtk_widget_show (button);
gtk_widget_show (window);
gtk_main ();
return 0;
}
=head2 Executing a command when the button is pressed
To execute a function when a button is pressed, use
gtk_signal_connect() to connect to the "clicked" signal.
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (user_function),
NULL);
user_function is a user defined function, like the following:
void user_function (GtkWidget *button, gpointer data)
{
printf("clicked\n");
}
=head1 FUNCTIONS
GtkType gtk_button_get_type (void);
This function returns the GtkType which is assigned to the
object class for gtk_button.
GtkWidget* gtk_button_new (void);
This functions returns a new button widget which can then be
used as a container for another widget.
GtkWidget* gtk_button_new_with_label (const gchar *label);
This function returns a new button widget with a label widget
as a child. The label widget will have the text passed into
the commant.
void gtk_button_pressed (GtkButton *button);
This function sends a "pressed" signal to the button.
void gtk_button_released (GtkButton *button);
This function sends a "released" signal to the button.
void gtk_button_clicked (GtkButton *button);
This function sends a "clicked" signal to the button.
void gtk_button_enter (GtkButton *button);
This function sends a "enter" signal to the button.
void gtk_button_leave (GtkButton *button);
This function sends a "leave" signal to the button.
=head1 SIGNALS
"clicked"
void user_function (GtkWidget *widget, gpointer data);
Gets emitted when the button is clicked. A click is
a press and release of the button when the cursor is
inside the button on release.
"pressed"
void user_function (GtkWidget *widget, gpointer data);
Gets emitted when the left mouse button is pressed.
"released"
void user_function (GtkWidget *widget, gpointer data);
Gets emitted when the left mouse button is released and
the widget was previously pressed.
"enter"
void user_function (GtkWidget *widget, gpointer data);
Emitted when the mouse cursor enters the button.
"leave"
void user_function (GtkWidget *widget, gpointer data);
Emitted when the mouse cursor leaves the button.
=head1 AUTHORS
The author of this man page is Shawn T. Amundson E<lt>amundson@gtk.orgE<gt>.
For the authors of GTK+, see the AUTHORS file in the GTK+ distribution.

73
docs/man/gtk_hbox.pod Normal file
View File

@@ -0,0 +1,73 @@
=head1 NAME
gtk_hbox - GTK+ horizontal box widget
=head1 SYNOPSIS
#include <gtk/gtkhbox.h>
guint gtk_hbox_get_type (void);
GtkWidget* gtk_hbox_new (gint homogeneous,
gint spacing);
=head1 DESCRIPTION
This widget is a container used to place widgets horizontally in relation
to each other. This is done by "packing" them into the box with
the functions gtk_box_pack_start and gtk_box_pack_end.
General box functions can be found in gtk_box(1).
=head1 OBJECT HIERARCHY
gtk_object
gtk_widget
gtk_container
gtk_box
gtk_hbox
=head1 USAGE
=head2 Creation
To create a hbox, use the function gtk_hbox_new(). The arguments
you pass to gtk_hbox_new indicate if the hbox should be homogeneous
(that is, if the children should all be given the same amount of
space all the time), and the amount of space inbetween the children.
The following creates a hbox which is non-homogeneous and will have
4 spacing pixels between the children:
GtkWidget *hbox;
hbox = gtk_hbox_new (FALSE, 4);
For instructions on adding children to this newly created hbox,
consult gtk_box(3).
=head1 FUNCTIONS
guint gtk_hbox_get_type (void);
This function returns the GtkType which is assigned to the
object class for gtk_hbox.
GtkWidget* gtk_hbox_new (gint homogeneous, gint spacing);
This functions returns a new hbox widget which can then be
used as a container for other widgets. Homogeneous can be
either TRUE or FALSE and indicates if the children widgets
will be always be allocated equal area. Spacing is the
number of pixels to put inbetween the children of the box.
=head1 SEE ALSO
gtk_box(3), gtk_vbox(3), gtk_container(3), gtk_widget(3)
=head1 AUTHORS
The author of this man page is Shawn T. Amundson E<lt>amundson@gtk.orgE<gt>.
For the authors of GTK+, see the AUTHORS file in the GTK+ distribution.

73
docs/man/gtk_vbox.pod Normal file
View File

@@ -0,0 +1,73 @@
=head1 NAME
gtk_vbox - GTK+ vertical box widget
=head1 SYNOPSIS
#include <gtk/gtkvbox.h>
guint gtk_vbox_get_type (void);
GtkWidget* gtk_vbox_new (gint homogeneous,
gint spacing);
=head1 DESCRIPTION
This widget is a container used to place widgets vertically in relation
to each other. This is done by "packing" them into the boxes with
the functions gtk_box_pack_start and gtk_box_pack_end.
General box functions can be found in gtk_box(1).
=head1 OBJECT HIERARCHY
gtk_object
gtk_widget
gtk_container
gtk_box
gtk_vbox
=head1 USAGE
=head2 Creation
To create a vbox, use the function gtk_vbox_new(). The arguments
you pass to gtk_vbox_new indicate if the vbox should be homogeneous
(that is, if the children should all be given the same amount of
space all the time), and the amount of space inbetween the children.
The following creates a vbox which is non-homogeneous and will have
4 spacing pixels between the children:
GtkWidget *vbox;
vbox = gtk_vbox_new (FALSE, 4);
For instructions on adding children to this newly created vbox,
consult gtk_box(3).
=head1 FUNCTIONS
guint gtk_vbox_get_type (void);
This function returns the GtkType which is assigned to the
object class for gtk_vbox.
GtkWidget* gtk_vbox_new (gint homogeneous, gint spacing);
This functions returns a new vbox widget which can then be
used as a container for other widgets. Homogeneous can be
either TRUE or FALSE and indicates if the children widgets
will be always be allocated equal area. Spacing is the
number of pixels to put inbetween the children of the box.
=head1 SEE ALSO
gtk_box(3), gtk_hbox(3), gtk_container(3), gtk_widget(3)
=head1 AUTHORS
The author of this man page is Shawn T. Amundson E<lt>amundson@gtk.orgE<gt>.
For the authors of GTK+, see the AUTHORS file in the GTK+ distribution.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

41
examples/README.1ST Normal file
View File

@@ -0,0 +1,41 @@
GTK Example Code - Tony Gale <gale@gtk.org> 980623
--------------------------------------------------
I have written an awk script to automatically extract the code
examples from the GTK Tutorial (in sgml), so they only have to be
changed in one place.
It's called 'extract.awk', and there is a shell wrapper to invoke
it called 'extract.sh'
It takes the following switches:
-c : Just do checking rather than output files
-f <filename> : Extract a specific file
-d : Extract file(s) to current directory
Without the -d switch, the code will be placed in the appropriate
sub-directory. Those sub-directories will be created if they do not
exist.
Without the -f switch, all code examples will be extracted.
The shell wrapper assumes that the GTK Tutorial is in the
file "../docs/gtk_tut.sgml"
It works by looking for sections of text in the tutorial surrounded
by, for example:
/* example-start helloworld helloworld.c */
and
/* example-end */
Where "helloworld" is the directory into which the file will be
placed (which can also be a directory spec like hello/hello1), and
"helloworld.c" is the file name for the code.
So, the code between these lines would be extracted to the file
helloworld/helloworld.c
It also handles replacing the sgml tag '&amp;' with '&'

View File

@@ -46,7 +46,7 @@ GtkWidget *xpm_label_box (GtkWidget *parent, gchar *xpm_filename, gchar *label_t
}
/* our usual callback function */
void callback (GtkWidget *widget, gpointer *data)
void callback (GtkWidget *widget, gpointer data)
{
g_print ("Hello again - %s was pressed\n", (char *) data);
}

8
examples/clist/Makefile Normal file
View File

@@ -0,0 +1,8 @@
CC = gcc
clist: clist.c
$(CC) `gtk-config --cflags` `gtk-config --libs` clist.c -o clist
clean:
rm -f *.o clist

173
examples/clist/clist.c Normal file
View File

@@ -0,0 +1,173 @@
/* example-start clist clist.c */
#include <gtk/gtk.h>
#include <glib.h>
/* These are just the prototypes of the various callbacks */
void button_add_clicked( GtkWidget *button, gpointer data);
void button_clear_clicked( GtkWidget *button, gpointer data);
void button_hide_show_clicked( GtkWidget *button, gpointer data);
void selection_made( GtkWidget *clist, gint row, gint column,
GdkEventButton *event, gpointer data);
gint main (int argc, gchar *argv[])
{
GtkWidget *window;
GtkWidget *vbox, *hbox;
GtkWidget *clist;
GtkWidget *button_add, *button_clear, *button_hide_show;
gchar *titles[2] = {"Ingredients","Amount"};
gtk_init(&argc, &argv);
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(GTK_WIDGET(window), 300, 150);
gtk_window_set_title(GTK_WINDOW(window), "GtkCList Example");
gtk_signal_connect(GTK_OBJECT(window),
"destroy",
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
vbox=gtk_vbox_new(FALSE, 5);
gtk_container_border_width(GTK_CONTAINER(vbox), 5);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show(vbox);
/* Create the GtkCList. For this example we use 2 columns */
clist = gtk_clist_new_with_titles( 2, titles);
/* When a selection is made, we want to know about it. The callback
* used is selection_made, and it's code can be found further down */
gtk_signal_connect(GTK_OBJECT(clist), "select_row",
GTK_SIGNAL_FUNC(selection_made),
NULL);
/* It isn't necessary to shadow the border, but it looks nice :) */
gtk_clist_set_border(GTK_CLIST(clist), GTK_SHADOW_OUT);
/* What however is important, is that we set the column widths as
* they will never be right otherwise. Note that the columns are
* numbered from 0 and up (to 1 in this case).
*/
gtk_clist_set_column_width (GTK_CLIST(clist), 0, 150);
/* Scollbars _only when needed_ */
gtk_clist_set_policy(GTK_CLIST(clist), GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
/* Add the GtkCList widget to the vertical box and show it. */
gtk_box_pack_start(GTK_BOX(vbox), clist, TRUE, TRUE, 0);
gtk_widget_show(clist);
/* Create the buttons and add them to the window. See the button
* tutorial for more examples and comments on this.
*/
hbox = gtk_hbox_new(FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
gtk_widget_show(hbox);
button_add = gtk_button_new_with_label("Add List");
button_clear = gtk_button_new_with_label("Clear List");
button_hide_show = gtk_button_new_with_label("Hide/Show titles");
gtk_box_pack_start(GTK_BOX(hbox), button_add, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button_clear, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox), button_hide_show, TRUE, TRUE, 0);
/* Connect our callbacks to the three buttons */
gtk_signal_connect_object(GTK_OBJECT(button_add), "clicked",
GTK_SIGNAL_FUNC(button_add_clicked),
(gpointer) clist);
gtk_signal_connect_object(GTK_OBJECT(button_clear), "clicked",
GTK_SIGNAL_FUNC(button_clear_clicked),
(gpointer) clist);
gtk_signal_connect_object(GTK_OBJECT(button_hide_show), "clicked",
GTK_SIGNAL_FUNC(button_hide_show_clicked),
(gpointer) clist);
gtk_widget_show(button_add);
gtk_widget_show(button_clear);
gtk_widget_show(button_hide_show);
/* The interface is completely set up so we show the window and
* enter the gtk_main loop.
*/
gtk_widget_show(window);
gtk_main();
return 0;
}
/* User clicked the "Add List" button. */
void button_add_clicked( GtkWidget *button, gpointer data)
{
int indx;
/* Something silly to add to the list. 4 rows of 2 columns each */
gchar *drink[4][2] = {{"Milk", "3 Oz"},
{"Water", "6 l"},
{"Carrots", "2"},
{"Snakes", "55"}};
/* Here we do the actual adding of the text. It's done once for
* each row.
*/
for( indx=0; indx < 4; indx++)
gtk_clist_append( (GtkCList*) data, drink[indx]);
return;
}
/* User clicked the "Clear List" button. */
void button_clear_clicked( GtkWidget *button, gpointer data)
{
/* Clear the list using gtk_clist_clear. This is much faster than
* calling gtk_clist_remove once for each row.
*/
gtk_clist_clear((GtkCList*) data);
return;
}
/* The user clicked the "Hide/Show titles" button. */
void button_hide_show_clicked( GtkWidget *button, gpointer data)
{
/* Just a flag to remember the status. 0 = currently visible */
static short int flag = 0;
if (flag == 0)
{
/* Hide the titles and set the flag to 1 */
gtk_clist_column_titles_hide((GtkCList*) data);
flag++;
}
else
{
/* Show the titles and reset flag to 0 */
gtk_clist_column_titles_show((GtkCList*) data);
flag--;
}
return;
}
/* If we come here, then the user has selected a row in the list. */
void selection_made( GtkWidget *clist, gint row, gint column,
GdkEventButton *event, gpointer data)
{
gchar *text;
/* Get the text that is stored in the selected row and column
* which was clicked in. We will receive it as a pointer in the
* argument text.
*/
gtk_clist_get_text(GTK_CLIST(clist), row, column, &text);
/* Just prints some information about the selected row */
g_print("You selected row %d. More specifically you clicked in column %d, and the text in this cell is %s\n\n", row, column, text);
return;
}
/* example-end */

57
examples/extract.awk Normal file
View File

@@ -0,0 +1,57 @@
# extract - extract C source files from GTK Tutorial
# Copyright (C) Tony Gale 1998
# Contact: gale@gtk.org
#
# Command Switches:
# -c : Just do checking rather than output files
# -f <filename> : Extract a specific file
# -d : Extract files to current directory
BEGIN {in_example=0; check=0; spec_example=""; do_output=0; flatten=0
for (i=0 ; i < ARGC ; i++) {
if ( ARGV[i] == "-c" ) {
check = 1;
ARGV[i]="";
} else if ( ARGV[i] == "-f" ) {
spec_example=ARGV[i+1];
ARGV[i]="";
ARGV[i+1]="";
if ( length(spec_example) == 0 ) {
print "usage: -f <filename>";
exit;
}
} else if ( ARGV[i] == "-d" ) {
flatten = 1;
ARGV[i]="";
}
}
}
$2 == "example-start" && in_example == 1 { printf("\nERROR: nested example at line %d\n", NR) > "/dev/stderr";
exit}
$2 == "example-start" { in_example=1 }
$2 == "example-start" && check == 0 \
{ if ( (spec_example == "") || (spec_example == $4) ) {
if ( flatten == 0 ) {
file_name = sprintf("%s/%s",$3, $4);
command = sprintf("mkdir -p %s", $3);
system(command);
} else {
file_name = $4;
}
do_output=1;
}
}
in_example==1 && check==0 && do_output==1 { gsub(/&amp;/, "\\&", $0);
print $0 >file_name }
$2 == "example-end" && in_example == 0 { printf("\nERROR: multiple ends at line %d\n", NR) > "/dev/stderr";
exit}
$2 == "example-end" { in_example=0; do_output=0 }
END {}

2
examples/extract.sh Executable file
View File

@@ -0,0 +1,2 @@
#! /bin/sh
awk -f extract.awk ../docs/gtk_tut.sgml $1 $2 $3 $4 $5

View File

@@ -10,7 +10,7 @@ void file_ok_sel (GtkWidget *w, GtkFileSelection *fs)
g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)));
}
void destroy (GtkWidget *widget, gpointer *data)
void destroy (GtkWidget *widget, gpointer data)
{
gtk_main_quit ();
}

View File

@@ -12,7 +12,7 @@ void hello (GtkWidget *widget, gpointer data)
}
gint delete_event(GtkWidget *widget, gpointer data)
gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
{
g_print ("delete event occured\n");
/* if you return FALSE in the "delete_event" signal handler,

View File

@@ -12,7 +12,7 @@ void callback (GtkWidget *widget, gpointer *data)
}
/* another callback */
void delete_event (GtkWidget *widget, gpointer *data)
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
{
gtk_main_quit ();
}

View File

@@ -1,17 +1,11 @@
/* This file extracted from the GTK tutorial. */
/* menufactory.c */
/* example-start menu menufactory.c */
#include <gtk/gtk.h>
#include <strings.h>
#include "mfmain.h"
static void menus_remove_accel(GtkWidget * widget, gchar * signal_name, gchar * path);
static gint menus_install_accel(GtkWidget * widget, gchar * signal_name, gchar key, gchar modifiers, gchar * path);
void menus_init(void);
void menus_create(GtkMenuEntry * entries, int nmenu_entries);
static void print_hello(GtkWidget *widget, gpointer data);
/* this is the GtkMenuEntry structure used to create new menus. The
@@ -24,128 +18,37 @@ void menus_create(GtkMenuEntry * entries, int nmenu_entries);
static GtkMenuEntry menu_items[] =
{
{"<Main>/File/New", "<control>N", NULL, NULL},
{"<Main>/File/Open", "<control>O", NULL, NULL},
{"<Main>/File/Save", "<control>S", NULL, NULL},
{"<Main>/File/Save as", NULL, NULL, NULL},
{"<Main>/File/<separator>", NULL, NULL, NULL},
{"<Main>/File/Quit", "<control>Q", file_quit_cmd_callback, "OK, I'll quit"},
{"<Main>/Options/Test", NULL, NULL, NULL}
{"<Main>/File/New", "<control>N", print_hello, NULL},
{"<Main>/File/Open", "<control>O", print_hello, NULL},
{"<Main>/File/Save", "<control>S", print_hello, NULL},
{"<Main>/File/Save as", NULL, NULL, NULL},
{"<Main>/File/<separator>", NULL, NULL, NULL},
{"<Main>/File/Quit", "<control>Q", file_quit_cmd_callback, "OK, I'll quit"},
{"<Main>/Options/Test", NULL, NULL, NULL}
};
/* calculate the number of menu_item's */
static int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
static int initialize = TRUE;
static GtkMenuFactory *factory = NULL;
static GtkMenuFactory *subfactory[1];
static GHashTable *entry_ht = NULL;
void get_main_menu(GtkWidget ** menubar, GtkAcceleratorTable ** table)
static void
print_hello(GtkWidget *widget, gpointer data)
{
if (initialize)
menus_init();
printf("hello!\n");
}
void get_main_menu(GtkWidget *window, GtkWidget ** menubar)
{
int nmenu_items = sizeof(menu_items) / sizeof(menu_items[0]);
GtkMenuFactory *factory;
GtkMenuFactory *subfactory;
factory = gtk_menu_factory_new(GTK_MENU_FACTORY_MENU_BAR);
subfactory = gtk_menu_factory_new(GTK_MENU_FACTORY_MENU_BAR);
gtk_menu_factory_add_subfactory(factory, subfactory, "<Main>");
gtk_menu_factory_add_entries(factory, menu_items, nmenu_items);
gtk_window_add_accelerator_table(GTK_WINDOW(window), subfactory->table);
if (menubar)
*menubar = subfactory[0]->widget;
if (table)
*table = subfactory[0]->table;
*menubar = subfactory->widget;
}
void menus_init(void)
{
if (initialize) {
initialize = FALSE;
factory = gtk_menu_factory_new(GTK_MENU_FACTORY_MENU_BAR);
subfactory[0] = gtk_menu_factory_new(GTK_MENU_FACTORY_MENU_BAR);
gtk_menu_factory_add_subfactory(factory, subfactory[0], "<Main>");
menus_create(menu_items, nmenu_items);
}
}
void menus_create(GtkMenuEntry * entries, int nmenu_entries)
{
char *accelerator;
int i;
if (initialize)
menus_init();
if (entry_ht)
for (i = 0; i < nmenu_entries; i++) {
accelerator = g_hash_table_lookup(entry_ht, entries[i].path);
if (accelerator) {
if (accelerator[0] == '\0')
entries[i].accelerator = NULL;
else
entries[i].accelerator = accelerator;
}
}
gtk_menu_factory_add_entries(factory, entries, nmenu_entries);
for (i = 0; i < nmenu_entries; i++)
if (entries[i].widget) {
gtk_signal_connect(GTK_OBJECT(entries[i].widget), "install_accelerator",
(GtkSignalFunc) menus_install_accel,
entries[i].path);
gtk_signal_connect(GTK_OBJECT(entries[i].widget), "remove_accelerator",
(GtkSignalFunc) menus_remove_accel,
entries[i].path);
}
}
static gint menus_install_accel(GtkWidget * widget, gchar * signal_name, gchar key, gchar modifiers, gchar * path)
{
char accel[64];
char *t1, t2[2];
accel[0] = '\0';
if (modifiers & GDK_CONTROL_MASK)
strcat(accel, "<control>");
if (modifiers & GDK_SHIFT_MASK)
strcat(accel, "<shift>");
if (modifiers & GDK_MOD1_MASK)
strcat(accel, "<alt>");
t2[0] = key;
t2[1] = '\0';
strcat(accel, t2);
if (entry_ht) {
t1 = g_hash_table_lookup(entry_ht, path);
g_free(t1);
} else
entry_ht = g_hash_table_new(g_str_hash, g_str_equal);
g_hash_table_insert(entry_ht, path, g_strdup(accel));
return TRUE;
}
static void menus_remove_accel(GtkWidget * widget, gchar * signal_name, gchar * path)
{
char *t;
if (entry_ht) {
t = g_hash_table_lookup(entry_ht, path);
g_free(t);
g_hash_table_insert(entry_ht, path, g_strdup(""));
}
}
void menus_set_sensitive(char *path, int sensitive)
{
GtkMenuPath *menu_path;
if (initialize)
menus_init();
menu_path = gtk_menu_factory_find(factory, path);
if (menu_path)
gtk_widget_set_sensitive(menu_path->widget, sensitive);
else
g_warning("Unable to set sensitivity for menu which doesn't exist: %s", path);
}
/* example-end */

View File

@@ -1,6 +1,4 @@
/* This file extracted from the GTK tutorial. */
/* menufactory.h */
/* example-start menu menufactory.h */
#ifndef __MENUFACTORY_H__
#define __MENUFACTORY_H__
@@ -9,11 +7,12 @@
extern "C" {
#endif /* __cplusplus */
void get_main_menu (GtkWidget **menubar, GtkAcceleratorTable **table);
void menus_create(GtkMenuEntry *entries, int nmenu_entries);
void get_main_menu (GtkWidget *, GtkWidget **menubar);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __MENUFACTORY_H__ */
/* example-end */

View File

@@ -1,21 +1,16 @@
/* This file extracted from the GTK tutorial. */
/* mfmain.c */
/* example-start menu mfmain.c */
#include <gtk/gtk.h>
#include "mfmain.h"
#include "menufactory.h"
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *main_vbox;
GtkWidget *menubar;
GtkAcceleratorTable *accel;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -30,8 +25,7 @@ int main(int argc, char *argv[])
gtk_container_add(GTK_CONTAINER(window), main_vbox);
gtk_widget_show(main_vbox);
get_main_menu(&menubar, &accel);
gtk_window_add_accelerator_table(GTK_WINDOW(window), accel);
get_main_menu(window, &menubar);
gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0);
gtk_widget_show(menubar);
@@ -50,3 +44,5 @@ void file_quit_cmd_callback (GtkWidget *widget, gpointer data)
g_print ("%s\n", (char *) data);
gtk_exit(0);
}
/* example-end */

View File

@@ -1,6 +1,4 @@
/* This file extracted from the GTK tutorial. */
/* mfmain.h */
/* example-start menu mfmain.h */
#ifndef __MFMAIN_H__
#define __MFMAIN_H__
@@ -17,3 +15,5 @@ void file_quit_cmd_callback(GtkWidget *widget, gpointer data);
#endif /* __cplusplus */
#endif /* __MFMAIN_H__ */
/* example-end */

View File

@@ -36,7 +36,7 @@ void remove_book (GtkButton *button, GtkNotebook *notebook)
gtk_widget_draw(GTK_WIDGET(notebook), NULL);
}
void delete (GtkWidget *widget, gpointer *data)
void delete (GtkWidget *widget, GdkEvent *event, gpointer *data)
{
gtk_main_quit ();
}

View File

@@ -5,7 +5,7 @@
#include "gtk/gtk.h"
void
delete_event (GtkWidget *widget, gpointer *data)
delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
{
gtk_main_quit ();
}

View File

@@ -31,7 +31,7 @@ static const char * xpm_data[] = {
/* when invoked (via signal delete_event), terminates the application.
*/
void close_application( GtkWidget *widget, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
gtk_main_quit();
}

View File

@@ -33,7 +33,7 @@ void progress_r (void)
pstat = FALSE;
}
void destroy (GtkWidget *widget, gpointer *data)
void destroy (GtkWidget *widget, GdkEvent *event, gpointer *data)
{
gtk_main_quit ();
}

View File

@@ -5,7 +5,7 @@
#include <gtk/gtk.h>
#include <glib.h>
void close_application( GtkWidget *widget, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
gtk_main_quit();
}

View File

@@ -0,0 +1,8 @@
CC = gcc
rangewidgets: rangewidgets.c
$(CC) `gtk-config --cflags` `gtk-config --libs` rangewidgets.c -o rangewidgets
clean:
rm -f *.o rangewidgets

View File

@@ -0,0 +1,287 @@
/* example-start rangewidgets rangewidgets.c */
#include <gtk/gtk.h>
GtkWidget *hscale, *vscale;
void cb_pos_menu_select (GtkWidget *item, GtkPositionType pos)
{
/* set the value position on both scale widgets */
gtk_scale_set_value_pos (GTK_SCALE (hscale), pos);
gtk_scale_set_value_pos (GTK_SCALE (vscale), pos);
}
void cb_update_menu_select (GtkWidget *item, GtkUpdateType policy)
{
/* set the update policy for both scale widgets */
gtk_range_set_update_policy (GTK_RANGE (hscale), policy);
gtk_range_set_update_policy (GTK_RANGE (vscale), policy);
}
void cb_digits_scale (GtkAdjustment *adj)
{
/* set the number of decimal places to which adj->vaule is rounded
*/
gtk_scale_set_digits (GTK_SCALE (hscale), (gint) adj->value);
gtk_scale_set_digits (GTK_SCALE (vscale), (gint) adj->value);
}
void cb_page_size (GtkAdjustment *get, GtkAdjustment *set)
{
/* set the page size and page increment size of the sample
adjustment to the value specified by the "Page Size" scale */
set->page_size = get->value;
set->page_increment = get->value;
/* now emit the "changed" signal to reconfigure all the widgets that
are attached to this adjustment */
gtk_signal_emit_by_name (GTK_OBJECT (set), "changed");
}
void cb_draw_value (GtkToggleButton *button)
{
/* turn the value display on the scale widgets off or on depending
on the state of the checkbutton */
gtk_scale_set_draw_value (GTK_SCALE (hscale), button->active);
gtk_scale_set_draw_value (GTK_SCALE (vscale), button->active);
}
/* convenience functions */
GtkWidget *make_menu_item (gchar *name, GtkSignalFunc callback,
gpointer data)
{
GtkWidget *item;
item = gtk_menu_item_new_with_label (name);
gtk_signal_connect (GTK_OBJECT (item), "activate",
callback, data);
gtk_widget_show (item);
return item;
}
void scale_set_default_values (GtkScale *scale)
{
gtk_range_set_update_policy (GTK_RANGE (scale),
GTK_UPDATE_CONTINUOUS);
gtk_scale_set_digits (scale, 1);
gtk_scale_set_value_pos (scale, GTK_POS_TOP);
gtk_scale_set_draw_value (scale, TRUE);
}
/* makes the sample window */
void create_range_controls (void)
{
GtkWidget *window;
GtkWidget *box1, *box2, *box3;
GtkWidget *button;
GtkWidget *scrollbar;
GtkWidget *separator;
GtkWidget *opt, *menu, *item;
GtkWidget *label;
GtkWidget *scale;
GtkObject *adj1, *adj2;
/* standard window-creating stuff */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
gtk_window_set_title (GTK_WINDOW (window), "range controls");
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_widget_show (box1);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
/* value, lower, upper, step_increment, page_increment, page_size */
/* note that the page_size value only makes a difference for
scrollbar widgets, and the highest value you'll get is actually
(upper - page_size). */
adj1 = gtk_adjustment_new (0.0, 0.0, 101.0, 0.1, 1.0, 1.0);
vscale = gtk_vscale_new (GTK_ADJUSTMENT (adj1));
scale_set_default_values (GTK_SCALE (vscale));
gtk_box_pack_start (GTK_BOX (box2), vscale, TRUE, TRUE, 0);
gtk_widget_show (vscale);
box3 = gtk_vbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (box2), box3, TRUE, TRUE, 0);
gtk_widget_show (box3);
/* reuse the same adjustment */
hscale = gtk_hscale_new (GTK_ADJUSTMENT (adj1));
gtk_widget_set_usize (GTK_WIDGET (hscale), 200, 30);
scale_set_default_values (GTK_SCALE (hscale));
gtk_box_pack_start (GTK_BOX (box3), hscale, TRUE, TRUE, 0);
gtk_widget_show (hscale);
/* reuse the same adjustment again */
scrollbar = gtk_hscrollbar_new (GTK_ADJUSTMENT (adj1));
/* notice how this causes the scales to always be updated
continuously when the scrollbar is moved */
gtk_range_set_update_policy (GTK_RANGE (scrollbar),
GTK_UPDATE_CONTINUOUS);
gtk_box_pack_start (GTK_BOX (box3), scrollbar, TRUE, TRUE, 0);
gtk_widget_show (scrollbar);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
/* a checkbutton to control whether the value is displayed or not */
button = gtk_check_button_new_with_label
("Display value on scale widgets");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button), TRUE);
gtk_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC
(cb_draw_value), NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
gtk_widget_show (button);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
/* an option menu to change the position of the value */
label = gtk_label_new ("Scale Value Position:");
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
gtk_widget_show (label);
opt = gtk_option_menu_new();
menu = gtk_menu_new();
item = make_menu_item ("Top", GTK_SIGNAL_FUNC (cb_pos_menu_select),
GINT_TO_POINTER (GTK_POS_TOP));
gtk_menu_append (GTK_MENU (menu), item);
item = make_menu_item ("Bottom", GTK_SIGNAL_FUNC (cb_pos_menu_select),
GINT_TO_POINTER (GTK_POS_BOTTOM));
gtk_menu_append (GTK_MENU (menu), item);
item = make_menu_item ("Left", GTK_SIGNAL_FUNC (cb_pos_menu_select),
GINT_TO_POINTER (GTK_POS_LEFT));
gtk_menu_append (GTK_MENU (menu), item);
item = make_menu_item ("Right", GTK_SIGNAL_FUNC (cb_pos_menu_select),
GINT_TO_POINTER (GTK_POS_RIGHT));
gtk_menu_append (GTK_MENU (menu), item);
gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu);
gtk_box_pack_start (GTK_BOX (box2), opt, TRUE, TRUE, 0);
gtk_widget_show (opt);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
/* yet another option menu, this time for the update policy of the
scale widgets */
label = gtk_label_new ("Scale Update Policy:");
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
gtk_widget_show (label);
opt = gtk_option_menu_new();
menu = gtk_menu_new();
item = make_menu_item ("Continuous",
GTK_SIGNAL_FUNC (cb_update_menu_select),
GINT_TO_POINTER (GTK_UPDATE_CONTINUOUS));
gtk_menu_append (GTK_MENU (menu), item);
item = make_menu_item ("Discontinuous",
GTK_SIGNAL_FUNC (cb_update_menu_select),
GINT_TO_POINTER (GTK_UPDATE_DISCONTINUOUS));
gtk_menu_append (GTK_MENU (menu), item);
item = make_menu_item ("Delayed",
GTK_SIGNAL_FUNC (cb_update_menu_select),
GINT_TO_POINTER (GTK_UPDATE_DELAYED));
gtk_menu_append (GTK_MENU (menu), item);
gtk_option_menu_set_menu (GTK_OPTION_MENU (opt), menu);
gtk_box_pack_start (GTK_BOX (box2), opt, TRUE, TRUE, 0);
gtk_widget_show (opt);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
/* a GtkHScale widget for adjusting the number of digits on the
sample scales. */
label = gtk_label_new ("Scale Digits:");
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj2 = gtk_adjustment_new (1.0, 0.0, 5.0, 1.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adj2), "value_changed",
GTK_SIGNAL_FUNC (cb_digits_scale), NULL);
scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2));
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
box2 = gtk_hbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
/* And, one last GtkHScale widget for adjusting the page size of the
scrollbar. */
label = gtk_label_new ("Scrollbar Page Size:");
gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
gtk_widget_show (label);
adj2 = gtk_adjustment_new (1.0, 1.0, 101.0, 1.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adj2), "value_changed",
GTK_SIGNAL_FUNC (cb_page_size), adj1);
scale = gtk_hscale_new (GTK_ADJUSTMENT (adj2));
gtk_scale_set_digits (GTK_SCALE (scale), 0);
gtk_box_pack_start (GTK_BOX (box2), scale, TRUE, TRUE, 0);
gtk_widget_show (scale);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
gtk_widget_show (separator);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
gtk_widget_show (box2);
button = gtk_button_new_with_label ("Quit");
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_widget_show (window);
}
int main (int argc, char *argv[])
{
gtk_init(&argc, &argv);
create_range_controls();
gtk_main();
return 0;
}
/* example-end */

View File

@@ -11,7 +11,7 @@
/* this routine gets control when the close button is clicked
*/
void close_application( GtkWidget *widget, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
gtk_main_quit();
}

View File

@@ -4,7 +4,7 @@
#include <gtk/gtk.h>
void destroy(GtkWidget *widget, gpointer *data)
void destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}

View File

@@ -7,7 +7,7 @@
GtkWidget *status_bar;
void push_item (GtkWidget *widget, gpointer *data)
void push_item (GtkWidget *widget, gpointer data)
{
static int count = 1;
char buff[20];
@@ -18,7 +18,7 @@ void push_item (GtkWidget *widget, gpointer *data)
return;
}
void pop_item (GtkWidget *widget, gpointer *data)
void pop_item (GtkWidget *widget, gpointer data)
{
gtk_statusbar_pop( GTK_STATUSBAR(status_bar), (guint) &data );
return;

View File

@@ -11,7 +11,7 @@ void callback (GtkWidget *widget, gpointer *data)
}
/* this callback quits the program */
void delete_event (GtkWidget *widget, gpointer *data)
void delete_event (GtkWidget *widget, GdkEvent *event, gpointer *data)
{
gtk_main_quit ();
}

8
examples/text/Makefile Normal file
View File

@@ -0,0 +1,8 @@
CC = gcc
text: text.c
$(CC) `gtk-config --cflags` `gtk-config --libs` text.c -o text
clean:
rm -f *.o text

181
examples/text/text.c Normal file
View File

@@ -0,0 +1,181 @@
/* example-start text text.c */
/* text.c */
#include <stdio.h>
#include <gtk/gtk.h>
void text_toggle_editable (GtkWidget *checkbutton,
GtkWidget *text)
{
gtk_text_set_editable(GTK_TEXT(text),
GTK_TOGGLE_BUTTON(checkbutton)->active);
}
void text_toggle_word_wrap (GtkWidget *checkbutton,
GtkWidget *text)
{
gtk_text_set_word_wrap(GTK_TEXT(text),
GTK_TOGGLE_BUTTON(checkbutton)->active);
}
void close_application( GtkWidget *widget, gpointer data )
{
gtk_main_quit();
}
int main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *box1;
GtkWidget *box2;
GtkWidget *hbox;
GtkWidget *button;
GtkWidget *check;
GtkWidget *separator;
GtkWidget *table;
GtkWidget *vscrollbar;
GtkWidget *text;
GdkColormap *cmap;
GdkColor colour;
GdkFont *fixed_font;
FILE *infile;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize (window, 600, 500);
gtk_window_set_policy (GTK_WINDOW(window), TRUE, TRUE, FALSE);
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC(close_application),
NULL);
gtk_window_set_title (GTK_WINDOW (window), "Text Widget Example");
gtk_container_border_width (GTK_CONTAINER (window), 0);
box1 = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), box1);
gtk_widget_show (box1);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
gtk_widget_show (box2);
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
gtk_box_pack_start (GTK_BOX (box2), table, TRUE, TRUE, 0);
gtk_widget_show (table);
/* Create the GtkText widget */
text = gtk_text_new (NULL, NULL);
gtk_text_set_editable (GTK_TEXT (text), TRUE);
gtk_table_attach (GTK_TABLE (table), text, 0, 1, 0, 1,
GTK_EXPAND | GTK_SHRINK | GTK_FILL,
GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (text);
/* Add a vertical scrollbar to the GtkText widget */
vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);
gtk_table_attach (GTK_TABLE (table), vscrollbar, 1, 2, 0, 1,
GTK_FILL, GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
gtk_widget_show (vscrollbar);
/* Get the system colour map and allocate the colour red */
cmap = gdk_colormap_get_system();
colour.red = 0xffff;
colour.green = 0;
colour.blue = 0;
if (!gdk_color_alloc(cmap, &colour)) {
g_error("couldn't allocate colour");
}
/* Load a fixed font */
fixed_font = gdk_font_load ("-misc-fixed-medium-r-*-*-*-140-*-*-*-*-*-*");
/* Realizing a widget creates a window for it, ready for us to insert some text */
gtk_widget_realize (text);
/* Freeze the text widget, ready for multiple updates */
gtk_text_freeze (GTK_TEXT (text));
/* Insert some coloured text */
gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL,
"Supports ", -1);
gtk_text_insert (GTK_TEXT (text), NULL, &colour, NULL,
"colored ", -1);
gtk_text_insert (GTK_TEXT (text), NULL, &text->style->black, NULL,
"text and different ", -1);
gtk_text_insert (GTK_TEXT (text), fixed_font, &text->style->black, NULL,
"fonts\n\n", -1);
/* Load the file text.c into the text window */
infile = fopen("text.c", "r");
if (infile) {
char buffer[1024];
int nchars;
while (1)
{
nchars = fread(buffer, 1, 1024, infile);
gtk_text_insert (GTK_TEXT (text), fixed_font, NULL,
NULL, buffer, nchars);
if (nchars < 1024)
break;
}
fclose (infile);
}
/* Thaw the text widget, allowing the updates to become visible */
gtk_text_thaw (GTK_TEXT (text));
hbox = gtk_hbutton_box_new ();
gtk_box_pack_start (GTK_BOX (box2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
check = gtk_check_button_new_with_label("Editable");
gtk_box_pack_start (GTK_BOX (hbox), check, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT(check), "toggled",
GTK_SIGNAL_FUNC(text_toggle_editable), text);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(check), TRUE);
gtk_widget_show (check);
check = gtk_check_button_new_with_label("Wrap Words");
gtk_box_pack_start (GTK_BOX (hbox), check, FALSE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT(check), "toggled",
GTK_SIGNAL_FUNC(text_toggle_word_wrap), text);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(check), FALSE);
gtk_widget_show (check);
separator = gtk_hseparator_new ();
gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
gtk_widget_show (separator);
box2 = gtk_vbox_new (FALSE, 10);
gtk_container_border_width (GTK_CONTAINER (box2), 10);
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
gtk_widget_show (box2);
button = gtk_button_new_with_label ("close");
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC(close_application),
NULL);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
gtk_widget_show (button);
gtk_widget_show (window);
gtk_main ();
return 0;
}
/* example-end */

8
examples/tree/Makefile Normal file
View File

@@ -0,0 +1,8 @@
CC = gcc
tree: tree.c
$(CC) `gtk-config --cflags` `gtk-config --libs` tree.c -o tree
clean:
rm -f *.o tree

178
examples/tree/tree.c Normal file
View File

@@ -0,0 +1,178 @@
/* example-start tree tree.c */
#include <gtk/gtk.h>
/* for all the GtkItem:: and GtkTreeItem:: signals */
static void cb_itemsignal (GtkWidget *item, gchar *signame)
{
gchar *name;
GtkLabel *label;
/* It's a GtkBin, so it has one child, which we know to be a
label, so get that */
label = GTK_LABEL (GTK_BIN (item)->child);
/* Get the text of the label */
gtk_label_get (label, &name);
/* Get the level of the tree which the item is in */
g_print ("%s called for item %s->%p, level %d\n", signame, name,
item, GTK_TREE (item->parent)->level);
}
/* Note that this is never called */
static void cb_unselect_child (GtkWidget *root_tree, GtkWidget *child,
GtkWidget *subtree)
{
g_print ("unselect_child called for root tree %p, subtree %p, child %p\n",
root_tree, subtree, child);
}
/* Note that this is called every time the user clicks on an item,
whether it is already selected or not. */
static void cb_select_child (GtkWidget *root_tree, GtkWidget *child,
GtkWidget *subtree)
{
g_print ("select_child called for root tree %p, subtree %p, child %p\n",
root_tree, subtree, child);
}
static void cb_selection_changed (GtkWidget *tree)
{
GList *i;
g_print ("selection_change called for tree %p\n", tree);
g_print ("selected objects are:\n");
i = GTK_TREE_SELECTION(tree);
while (i){
gchar *name;
GtkLabel *label;
GtkWidget *item;
/* Get a GtkWidget pointer from the list node */
item = GTK_WIDGET (i->data);
label = GTK_LABEL (GTK_BIN (item)->child);
gtk_label_get (label, &name);
g_print ("\t%s on level %d\n", name, GTK_TREE
(item->parent)->level);
i = i->next;
}
}
int main (int argc, char *argv[])
{
GtkWidget *window, *scrolled_win, *tree;
static gchar *itemnames[] = {"Foo", "Bar", "Baz", "Quux",
"Maurice"};
gint i;
gtk_init (&argc, &argv);
/* a generic toplevel window */
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC (gtk_main_quit), NULL);
gtk_container_border_width (GTK_CONTAINER(window), 5);
/* A generic scrolled window */
scrolled_win = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_widget_set_usize (scrolled_win, 150, 200);
gtk_container_add (GTK_CONTAINER(window), scrolled_win);
gtk_widget_show (scrolled_win);
/* Create the root tree */
tree = gtk_tree_new();
g_print ("root tree is %p\n", tree);
/* connect all GtkTree:: signals */
gtk_signal_connect (GTK_OBJECT(tree), "select_child",
GTK_SIGNAL_FUNC(cb_select_child), tree);
gtk_signal_connect (GTK_OBJECT(tree), "unselect_child",
GTK_SIGNAL_FUNC(cb_unselect_child), tree);
gtk_signal_connect (GTK_OBJECT(tree), "selection_changed",
GTK_SIGNAL_FUNC(cb_selection_changed), tree);
/* Add it to the scrolled window */
gtk_container_add (GTK_CONTAINER(scrolled_win), tree);
/* Set the selection mode */
gtk_tree_set_selection_mode (GTK_TREE(tree),
GTK_SELECTION_MULTIPLE);
/* Show it */
gtk_widget_show (tree);
for (i = 0; i < 5; i++){
GtkWidget *subtree, *item;
gint j;
/* Create a tree item */
item = gtk_tree_item_new_with_label (itemnames[i]);
/* Connect all GtkItem:: and GtkTreeItem:: signals */
gtk_signal_connect (GTK_OBJECT(item), "select",
GTK_SIGNAL_FUNC(cb_itemsignal), "select");
gtk_signal_connect (GTK_OBJECT(item), "deselect",
GTK_SIGNAL_FUNC(cb_itemsignal), "deselect");
gtk_signal_connect (GTK_OBJECT(item), "toggle",
GTK_SIGNAL_FUNC(cb_itemsignal), "toggle");
gtk_signal_connect (GTK_OBJECT(item), "expand",
GTK_SIGNAL_FUNC(cb_itemsignal), "expand");
gtk_signal_connect (GTK_OBJECT(item), "collapse",
GTK_SIGNAL_FUNC(cb_itemsignal), "collapse");
/* Add it to the parent tree */
gtk_tree_append (GTK_TREE(tree), item);
/* Show it - this can be done at any time */
gtk_widget_show (item);
/* Create this item's subtree */
subtree = gtk_tree_new();
g_print ("-> item %s->%p, subtree %p\n", itemnames[i], item,
subtree);
/* This is still necesary if you want these signals to be called
for the subtree's children. Note that selection_change will be
signalled for the root tree regardless. */
gtk_signal_connect (GTK_OBJECT(subtree), "select_child",
GTK_SIGNAL_FUNC(cb_select_child), subtree);
gtk_signal_connect (GTK_OBJECT(subtree), "unselect_child",
GTK_SIGNAL_FUNC(cb_unselect_child), subtree);
/* This has absolutely no effect, because it is completely ignored
in subtrees */
gtk_tree_set_selection_mode (GTK_TREE(subtree),
GTK_SELECTION_SINGLE);
/* Neither does this, but for a rather different reason - the
view_mode and view_line values of a tree are propagated to
subtrees when they are mapped. So, setting it later on would
actually have a (somewhat unpredictable) effect */
gtk_tree_set_view_mode (GTK_TREE(subtree), GTK_TREE_VIEW_ITEM);
/* Set this item's subtree - note that you cannot do this until
AFTER the item has been added to its parent tree! */
gtk_tree_item_set_subtree (GTK_TREE_ITEM(item), subtree);
for (j = 0; j < 5; j++){
GtkWidget *subitem;
/* Create a subtree item, in much the same way */
subitem = gtk_tree_item_new_with_label (itemnames[j]);
/* Connect all GtkItem:: and GtkTreeItem:: signals */
gtk_signal_connect (GTK_OBJECT(subitem), "select",
GTK_SIGNAL_FUNC(cb_itemsignal), "select");
gtk_signal_connect (GTK_OBJECT(subitem), "deselect",
GTK_SIGNAL_FUNC(cb_itemsignal), "deselect");
gtk_signal_connect (GTK_OBJECT(subitem), "toggle",
GTK_SIGNAL_FUNC(cb_itemsignal), "toggle");
gtk_signal_connect (GTK_OBJECT(subitem), "expand",
GTK_SIGNAL_FUNC(cb_itemsignal), "expand");
gtk_signal_connect (GTK_OBJECT(subitem), "collapse",
GTK_SIGNAL_FUNC(cb_itemsignal), "collapse");
g_print ("-> -> item %s->%p\n", itemnames[j], subitem);
/* Add it to its parent tree */
gtk_tree_append (GTK_TREE(subtree), subitem);
/* Show it */
gtk_widget_show (subitem);
}
}
/* Show the window and loop endlessly */
gtk_widget_show (window);
gtk_main();
return 0;
}
/* example-end */

View File

@@ -123,7 +123,7 @@ static char * WheelbarrowFull_xpm[] = {
/* when invoked (via signal delete_event), terminates the application.
*/
void close_application( GtkWidget *widget, gpointer *data ) {
void close_application( GtkWidget *widget, GdkEvent *event, gpointer *data ) {
gtk_main_quit();
}

View File

@@ -46,7 +46,7 @@ gdkinclude_HEADERS = \
gdktypes.h \
gdkx.h
libgdk_la_LDFLAGS = -version-info 1:0:0 \
libgdk_la_LDFLAGS = -version-info $(GTK_MAJOR_VERSION):$(GTK_MICRO_VERSION):0 \
@x_ldflags@ @x_libs@
INCLUDES = -I$(top_srcdir) -I../glib -I$(top_srcdir)/glib @x_cflags@
@@ -78,5 +78,3 @@ files:
@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
echo $$p; \
done
$(DEP_FILES) : $(BUILT_SOURCES)

View File

@@ -51,8 +51,8 @@
#include "gdkinput.h"
#ifdef USE_XIM
#include "gdkx.h"
#include "gdkkeysyms.h"
#endif
#include "gdkkeysyms.h"
#include "gdki18n.h"
#ifndef X_GETTIMEOFDAY
@@ -625,7 +625,7 @@ gdk_exit (int errorcode)
*/
gchar*
gdk_set_locale ()
gdk_set_locale (void)
{
if (!setlocale (LC_ALL,""))
g_print ("locale not supported by C library\n");
@@ -663,7 +663,7 @@ gdk_set_locale ()
*/
gint
gdk_events_pending ()
gdk_events_pending (void)
{
gint result;
GList *tmp_list;
@@ -827,6 +827,7 @@ gdk_event_get (void)
#else
XNextEvent (gdk_display, &xevent);
#endif
event = gdk_event_new ();
event->any.type = GDK_NOTHING;
@@ -1023,13 +1024,13 @@ gdk_set_use_xshm (gint use_xshm)
}
gint
gdk_get_show_events ()
gdk_get_show_events (void)
{
return gdk_debug_flags & GDK_DEBUG_EVENTS;
}
gint
gdk_get_use_xshm ()
gdk_get_use_xshm (void)
{
return gdk_use_xshm;
}
@@ -1055,7 +1056,7 @@ gdk_get_use_xshm ()
*/
guint32
gdk_time_get ()
gdk_time_get (void)
{
struct timeval end;
struct timeval elapsed;
@@ -1094,7 +1095,7 @@ gdk_time_get ()
*/
guint32
gdk_timer_get ()
gdk_timer_get (void)
{
return timer_val;
}
@@ -1129,13 +1130,13 @@ gdk_timer_set (guint32 milliseconds)
}
void
gdk_timer_enable ()
gdk_timer_enable (void)
{
timerp = &timer;
}
void
gdk_timer_disable ()
gdk_timer_disable (void)
{
timerp = NULL;
}
@@ -1306,8 +1307,7 @@ gdk_pointer_grab (GdkWindow * window,
xevent_mask |= event_mask_table[i];
}
if (((GdkWindowPrivate *)window)->extension_events &&
gdk_input_vtable.grab_pointer)
if (gdk_input_vtable.grab_pointer)
return_val = gdk_input_vtable.grab_pointer (window,
owner_events,
event_mask,
@@ -1463,7 +1463,7 @@ gdk_keyboard_ungrab (guint32 time)
*/
gint
gdk_screen_width ()
gdk_screen_width (void)
{
gint return_val;
@@ -1488,7 +1488,7 @@ gdk_screen_width ()
*/
gint
gdk_screen_height ()
gdk_screen_height (void)
{
gint return_val;
@@ -1498,13 +1498,13 @@ gdk_screen_height ()
}
void
gdk_key_repeat_disable ()
gdk_key_repeat_disable (void)
{
XAutoRepeatOff (gdk_display);
}
void
gdk_key_repeat_restore ()
gdk_key_repeat_restore (void)
{
if (autorepeat)
XAutoRepeatOn (gdk_display);
@@ -1531,14 +1531,14 @@ gdk_key_repeat_restore ()
*--------------------------------------------------------------
*/
void gdk_flush ()
void gdk_flush (void)
{
XSync (gdk_display, False);
}
void
gdk_beep ()
gdk_beep (void)
{
XBell(gdk_display, 100);
}
@@ -1562,7 +1562,7 @@ gdk_beep ()
*/
static gint
gdk_event_wait ()
gdk_event_wait (void)
{
GList *list;
GdkInput *input;
@@ -1685,7 +1685,8 @@ gdk_event_translate (GdkEvent *event,
GdkWindow *window;
GdkWindowPrivate *window_private;
XComposeStatus compose;
static XComposeStatus compose;
KeySym keysym;
int charcount;
#ifdef USE_XIM
static gchar* buf = NULL;
@@ -1726,6 +1727,10 @@ gdk_event_translate (GdkEvent *event,
if (window != NULL)
gdk_window_ref (window);
#ifdef USE_XIM
else if (XFilterEvent(xevent, None)) /* for xlib XIM handling */
return FALSE;
#endif
else if(gdk_null_window_warnings) /* Special purpose programs that
get events for other windows may
want to disable this */
@@ -1767,16 +1772,16 @@ gdk_event_translate (GdkEvent *event,
buf_len = 128;
buf = g_new (gchar, buf_len);
}
keysym = GDK_VoidSymbol;
if (xim_using == TRUE && xim_ic)
{
Status status;
/* Clear keyval. Depending on status, may not be set */
event->key.keyval = GDK_VoidSymbol;
charcount = XmbLookupString(xim_ic->xic,
&xevent->xkey, buf, buf_len-1,
(KeySym*) &event->key.keyval,
&status);
&keysym, &status);
if (status == XBufferOverflow)
{ /* retry */
/* alloc adequate size of buffer */
@@ -1789,8 +1794,7 @@ gdk_event_translate (GdkEvent *event,
charcount = XmbLookupString (xim_ic->xic,
&xevent->xkey, buf, buf_len-1,
(KeySym*) &event->key.keyval,
&status);
&keysym, &status);
}
if (status == XLookupNone)
{
@@ -1800,13 +1804,13 @@ gdk_event_translate (GdkEvent *event,
}
else
charcount = XLookupString (&xevent->xkey, buf, buf_len,
(KeySym*) &event->key.keyval,
&compose);
&keysym, &compose);
#else
charcount = XLookupString (&xevent->xkey, buf, 16,
(KeySym*) &event->key.keyval,
&compose);
&keysym, &compose);
#endif
event->key.keyval = keysym;
if (charcount > 0 && buf[charcount-1] == '\0')
charcount --;
else
@@ -1844,9 +1848,10 @@ gdk_event_translate (GdkEvent *event,
case KeyRelease:
/* Lookup the string corresponding to the given keysym.
*/
keysym = GDK_VoidSymbol;
charcount = XLookupString (&xevent->xkey, buf, 16,
(KeySym*) &event->key.keyval,
&compose);
&keysym, &compose);
event->key.keyval = keysym;
/* Print debugging info.
*/
@@ -1964,7 +1969,7 @@ gdk_event_translate (GdkEvent *event,
window_private->dnd_drag_savedeventmask = dnd_winattr.your_event_mask;
dnd_setwinattr.event_mask =
window_private->dnd_drag_eventmask = ButtonMotionMask | ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask;
EnterWindowMask | LeaveWindowMask | ExposureMask;
XChangeWindowAttributes(gdk_display, window_private->xwindow,
CWEventMask, &dnd_setwinattr);
}
@@ -2204,6 +2209,7 @@ gdk_event_translate (GdkEvent *event,
/* Tell XInput stuff about it if appropriate */
if (window_private &&
!window_private->destroyed &&
(window_private->extension_events != 0) &&
gdk_input_vtable.enter_event)
gdk_input_vtable.enter_event (&xevent->xcrossing, window);
@@ -2333,7 +2339,7 @@ gdk_event_translate (GdkEvent *event,
ButtonMotionMask | PointerMotionMask |
/* PointerMotionHintMask | */ /* HINTME */
ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
GrabModeAsync, GrabModeAsync, None,
None, CurrentTime);
#ifdef G_ENABLE_DEBUG
GDK_NOTE(DND, g_print("xgpret = %d\n", xgpret));
@@ -2581,7 +2587,8 @@ gdk_event_translate (GdkEvent *event,
if (window_private)
{
if ((window_private->extension_events != 0) &&
if (!window_private->destroyed &&
(window_private->extension_events != 0) &&
gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window);
@@ -2944,6 +2951,7 @@ gdk_event_translate (GdkEvent *event,
/* something else - (e.g., a Xinput event) */
if (window_private &&
!window_private->destroyed &&
(window_private->extension_events != 0) &&
gdk_input_vtable.other_event)
return_val = gdk_input_vtable.other_event(event, xevent, window);
@@ -3028,7 +3036,7 @@ gdk_synthesize_click (GdkEvent *event,
*/
static void
gdk_exit_func ()
gdk_exit_func (void)
{
static gboolean in_gdk_exit_func = FALSE;
@@ -4004,8 +4012,8 @@ gdk_dnd_check_types (GdkWindow *window,
if (realfmt != (sizeof(Atom) * 8))
{
g_warning("XdeTypelist property had format of %d instead of the expected %d, on window %#lx\n",
realfmt, sizeof(Atom) * 8, xevent->xclient.data.l[0]);
g_warning("XdeTypelist property had format of %d instead of the expected %ld, on window %#lx\n",
realfmt, (glong)sizeof(Atom) * 8, xevent->xclient.data.l[0]);
return 0;
}

View File

@@ -60,11 +60,11 @@ gdk_dnd_set_drag_shape(GdkWindow *default_pixmapwin,
gdk_window_ref(default_pixmapwin);
gdk_dnd.c->drag_pm_default = default_pixmapwin;
gdk_dnd.c->default_hotspot = *default_hotspot;
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, (gpointer)(glong)((GdkWindowPrivate *)default_pixmapwin)->xwindow);
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, GUINT_TO_POINTER (((GdkWindowPrivate *)default_pixmapwin)->xwindow));
if(goahead_pixmapwin)
{
gdk_window_ref(goahead_pixmapwin);
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, (gpointer)(glong)((GdkWindowPrivate *)goahead_pixmapwin)->xwindow);
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, GUINT_TO_POINTER (((GdkWindowPrivate *)goahead_pixmapwin)->xwindow));
gdk_dnd.c->drag_pm_ok = goahead_pixmapwin;
gdk_dnd.c->ok_hotspot = *goahead_hotspot;
}

View File

@@ -64,7 +64,7 @@ static GList *image_list = NULL;
void
gdk_image_exit ()
gdk_image_exit (void)
{
GdkImage *image;
@@ -131,7 +131,7 @@ gdk_image_check_xshm(Display *display)
}
void
gdk_image_init ()
gdk_image_init (void)
{
if (gdk_use_xshm)
{

View File

@@ -70,7 +70,7 @@ static GList *gdk_input_windows;
#include "gdkinputgxi.h"
GList *
gdk_input_list_devices ()
gdk_input_list_devices (void)
{
return gdk_input_devices;
}

View File

@@ -186,7 +186,7 @@ gdk_input_device_new(XDeviceInfo *device, gint include_core)
if ((xki->min_keycode == 8) && (xki->max_keycode == 32))
{
gdkdev->info.num_keys = 32;
gdkdev->min_keycode = 0;
gdkdev->min_keycode = 1;
}
else
{

View File

@@ -591,23 +591,35 @@ gdk_input_gxi_grab_pointer (GdkWindow * window,
GdkWindow * confine_to,
guint32 time)
{
GdkInputWindow *input_window, *new_window;
GList *tmp_list;
GdkInputWindow *input_window;
GdkDevicePrivate *gdkdev;
tmp_list = gdk_input_windows;
while (tmp_list)
{
input_window = (GdkInputWindow *)tmp_list->data;
if (input_window->grabbed)
return AlreadyGrabbed;
if (input_window->window == window)
new_window = input_window;
input_window->grabbed = TRUE;
else if (input_window->grabbed)
input_window->grabbed = FALSE;
tmp_list = tmp_list->next;
}
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
gdkdev->xdevice &&
(gdkdev->button_state != 0))
gdkdev->button_state = 0;
tmp_list = tmp_list->next;
}
new_window->grabbed = TRUE;
return Success;
}

View File

@@ -29,7 +29,7 @@ static void gdk_input_none_get_pointer (GdkWindow *window,
GdkModifierType *mask);
void
gdk_input_init ()
gdk_input_init (void)
{
gdk_input_vtable.set_mode = NULL;
gdk_input_vtable.set_axes = NULL;

View File

@@ -22,7 +22,7 @@
/* forward declarations */
static gint gdk_input_xfree_set_mode (guint32 deviceid, GdkInputMode mode);
static void gdk_input_check_proximity();
static void gdk_input_check_proximity (void);
static void gdk_input_xfree_configure_event (XConfigureEvent *xevent,
GdkWindow *window);
static void gdk_input_xfree_enter_event (XCrossingEvent *xevent,
@@ -115,7 +115,7 @@ gdk_input_xfree_set_mode (guint32 deviceid, GdkInputMode mode)
}
static void
gdk_input_check_proximity()
gdk_input_check_proximity (void)
{
gint new_proximity = 0;
GList *tmp_list = gdk_input_devices;
@@ -173,7 +173,7 @@ gdk_input_xfree_configure_event (XConfigureEvent *xevent, GdkWindow *window)
static void
gdk_input_xfree_enter_event (XCrossingEvent *xevent,
GdkWindow *window)
GdkWindow *window)
{
GdkInputWindow *input_window;
gint root_x, root_y;
@@ -257,6 +257,7 @@ gdk_input_xfree_grab_pointer (GdkWindow * window,
guint32 time)
{
GdkInputWindow *input_window, *new_window;
gboolean need_ungrab;
GdkDevicePrivate *gdkdev;
GList *tmp_list;
XEventClass event_classes[GDK_MAX_DEVICE_CLASSES];
@@ -265,47 +266,70 @@ gdk_input_xfree_grab_pointer (GdkWindow * window,
tmp_list = gdk_input_windows;
new_window = NULL;
need_ungrab = FALSE;
while (tmp_list)
{
input_window = (GdkInputWindow *)tmp_list->data;
if (input_window->grabbed)
return AlreadyGrabbed;
if (input_window->window == window)
new_window = input_window;
tmp_list = tmp_list->next;
}
g_return_val_if_fail (new_window != NULL, Success); /* shouldn't happen */
new_window->grabbed = TRUE;
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
gdkdev->xdevice)
else if (input_window->grabbed)
{
gdk_input_common_find_events (window, gdkdev,
event_mask,
event_classes, &num_classes);
result = XGrabDevice( GDK_DISPLAY(), gdkdev->xdevice,
GDK_WINDOW_XWINDOW (window),
owner_events, num_classes, event_classes,
GrabModeAsync, GrabModeAsync, time);
/* FIXME: if failure occurs on something other than the first
device, things will be badly inconsistent */
if (result != Success)
return result;
input_window->grabbed = FALSE;
need_ungrab = TRUE;
}
tmp_list = tmp_list->next;
}
if (new_window)
{
new_window->grabbed = TRUE;
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
gdkdev->xdevice)
{
gdk_input_common_find_events (window, gdkdev,
event_mask,
event_classes, &num_classes);
result = XGrabDevice( GDK_DISPLAY(), gdkdev->xdevice,
GDK_WINDOW_XWINDOW (window),
owner_events, num_classes, event_classes,
GrabModeAsync, GrabModeAsync, time);
/* FIXME: if failure occurs on something other than the first
device, things will be badly inconsistent */
if (result != Success)
return result;
}
tmp_list = tmp_list->next;
}
}
else
{
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER && gdkdev->xdevice &&
((gdkdev->button_state != 0) || need_ungrab))
{
XUngrabDevice( gdk_display, gdkdev->xdevice, time);
gdkdev->button_state = 0;
}
tmp_list = tmp_list->next;
}
}
return Success;
}
static void

View File

@@ -55,7 +55,7 @@ gdk_pixmap_new (GdkWindow *window,
return NULL;
if (depth == -1)
gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
@@ -64,6 +64,7 @@ gdk_pixmap_new (GdkWindow *window,
private->window_type = GDK_WINDOW_PIXMAP;
private->xwindow = XCreatePixmap (private->xdisplay, window_private->xwindow,
width, height, depth);
private->colormap = NULL;
private->parent = NULL;
private->x = 0;
private->y = 0;
@@ -148,7 +149,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
return NULL;
if (depth == -1)
gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
@@ -255,8 +256,14 @@ gdk_pixmap_read_string (FILE *infile,
{
if (cnt == (*buffer_size))
{
(*buffer_size) *= 2;
(*buffer) = (gchar *) g_realloc ((*buffer), *buffer_size); }
guint new_size = (*buffer_size) * 2;
if (new_size > (*buffer_size))
*buffer_size = new_size;
else
return FALSE;
(*buffer) = (gchar *) g_realloc ((*buffer), *buffer_size);
}
if (c != '"')
(*buffer)[cnt++] = c;
@@ -292,12 +299,16 @@ gdk_pixmap_skip_string (gchar *buffer)
return &buffer[index];
}
/* Xlib crashed ince at a color name lengths around 125 */
#define MAX_COLOR_LEN 120
gchar*
gdk_pixmap_extract_color (gchar *buffer)
{
gint counter, finished = FALSE, numnames;
gint counter, numnames;
gchar *ptr = NULL, ch, temp[128];
gchar color[128], *retcol;
gchar color[MAX_COLOR_LEN], *retcol;
gint space;
counter = 0;
while (ptr == NULL)
@@ -314,34 +325,53 @@ gdk_pixmap_extract_color (gchar *buffer)
counter++;
}
if (ptr == NULL)
return NULL;
ptr = gdk_pixmap_skip_whitespaces (ptr);
if (ptr[0] == 0)
return NULL;
else if (ptr[0] == '#')
{
retcol = g_strdup (ptr);
counter = 1;
while (ptr[counter] != 0 &&
((ptr[counter] >= '0' && ptr[counter] <= '9') ||
(ptr[counter] >= 'a' && ptr[counter] <= 'f') ||
(ptr[counter] >= 'A' && ptr[counter] <= 'F')))
counter++;
retcol = g_new (gchar, counter+1);
strncpy (retcol, ptr, counter);
retcol[counter] = 0;
return retcol;
}
color[0] = 0;
numnames = 0;
while (finished == FALSE)
space = MAX_COLOR_LEN - 1;
while (space > 0)
{
sscanf (ptr, "%127s", temp);
if ((gint)ptr[0] == 0 || strcmp ("s", temp) == 0 || strcmp ("m", temp) == 0 ||
strcmp ("g", temp) == 0 || strcmp ("g4", temp) == 0)
finished = TRUE;
if (((gint)ptr[0] == 0) ||
(strcmp ("s", temp) == 0) || (strcmp ("m", temp) == 0) ||
(strcmp ("g", temp) == 0) || (strcmp ("g4", temp) == 0))
{
break;
}
else
{
if (numnames > 0)
strcat (color, " ");
strcat (color, temp);
{
space -= 1;
strcat (color, " ");
}
if (space > 0)
{
strncat (color, temp, space);
space -= MIN (space, strlen (temp));
}
ptr = gdk_pixmap_skip_string (ptr);
ptr = gdk_pixmap_skip_whitespaces (ptr);
numnames++;
@@ -352,7 +382,6 @@ gdk_pixmap_extract_color (gchar *buffer)
return retcol;
}
GdkPixmap*
gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
GdkColormap *colormap,
@@ -398,6 +427,11 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
gdk_pixmap_read_string (infile, &buffer, &buffer_size);
sscanf (buffer,"%d %d %d %d", &width, &height, &num_cols, &cpp);
if (cpp >= 32)
{
g_warning ("Pixmap has more than 31 characters per color\n");
return NULL;
}
colors = g_new(_GdkPixmapColor, num_cols);
@@ -573,6 +607,11 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
i = 0;
buffer = data[i++];
sscanf (buffer,"%d %d %d %d", &width, &height, &num_cols, &cpp);
if (cpp >= 32)
{
g_warning ("Pixmap has more than 31 characters per color\n");
return NULL;
}
colors = g_new(_GdkPixmapColor, num_cols);

View File

@@ -81,6 +81,8 @@ struct _GdkWindowPrivate
gint extension_events;
GList *filters;
GdkColormap *colormap;
GList *children;
};
struct _GdkImagePrivate

View File

@@ -127,7 +127,7 @@ gdk_region_polygon (GdkPoint *points,
GdkRegionPrivate *private;
GdkRegion *region;
Region xregion;
int xfill_rule;
gint xfill_rule = EvenOddRule;
g_return_val_if_fail (points != NULL, NULL);
g_return_val_if_fail (npoints != 0, NULL); /* maybe we should check for at least three points */

View File

@@ -58,7 +58,7 @@ static gchar* visual_names[] =
static GHashTable *visual_hash = NULL;
void
gdk_visual_init ()
gdk_visual_init (void)
{
static gint possible_depths[6] = { 32, 24, 16, 15, 8, 1 };
static GdkVisualType possible_types[6] =
@@ -263,25 +263,25 @@ gdk_visual_unref (GdkVisual *visual)
}
gint
gdk_visual_get_best_depth ()
gdk_visual_get_best_depth (void)
{
return available_depths[0];
}
GdkVisualType
gdk_visual_get_best_type ()
gdk_visual_get_best_type (void)
{
return available_types[0];
}
GdkVisual*
gdk_visual_get_system ()
gdk_visual_get_system (void)
{
return ((GdkVisual*) system_visual);
}
GdkVisual*
gdk_visual_get_best ()
gdk_visual_get_best (void)
{
return ((GdkVisual*) &(visuals[0]));
}

View File

@@ -20,7 +20,6 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include <netinet/in.h>
#include "gdk.h"
#include "../config.h"
@@ -30,6 +29,10 @@
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_SHAPE_EXT
#include <X11/extensions/shape.h>
#endif
int nevent_masks = 17;
int event_mask_table[19] =
{
@@ -65,18 +68,18 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
Display *disp;
Window *list=NULL;
Window child=0,parent_win=0,root_win=0;
int i;
guint num;
int wx,wy;
guint ww,wh,wb,wd;
int i;
unsigned int ww, wh, wb, wd, num;
int wx,wy;
window=(GdkWindow*)&gdk_root_parent;
private=(GdkWindowPrivate*)window;
disp=private->xdisplay;
if (!XGetGeometry(disp,base,&root_win,&wx,&wy,&ww,&wh,&wb,&wd))
return 0;
wx+=bx;wy+=by;
if (!((x>=wx)&&(y>=wy)&&(x<(wx+ww))&&(y<(wy+wh))))
if (!((x>=wx)&&(y>=wy)&&(x<(int)(wx+ww))&&(y<(int)(wy+wh))))
return 0;
if (!XQueryTree(disp,base,&root_win,&parent_win,&list,&num))
return base;
@@ -172,7 +175,7 @@ gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child)
}
void
gdk_window_init ()
gdk_window_init (void)
{
XWindowAttributes xattributes;
unsigned int width;
@@ -191,6 +194,8 @@ gdk_window_init ()
gdk_root_parent.window.user_data = NULL;
gdk_root_parent.width = width;
gdk_root_parent.height = height;
gdk_root_parent.children = NULL;
gdk_root_parent.colormap = NULL;
}
GdkWindow*
@@ -202,7 +207,6 @@ gdk_window_new (GdkWindow *parent,
GdkWindowPrivate *private;
GdkWindowPrivate *parent_private;
GdkVisual *visual;
GdkColormap *colormap;
Display *parent_display;
Window xparent;
Visual *xvisual;
@@ -232,6 +236,10 @@ gdk_window_new (GdkWindow *parent,
window = (GdkWindow*) private;
private->parent = parent;
if (parent_private != &gdk_root_parent)
parent_private->children = g_list_prepend (parent_private->children, window);
private->xdisplay = parent_display;
private->destroyed = FALSE;
private->resize_count = 0;
@@ -264,6 +272,7 @@ gdk_window_new (GdkWindow *parent,
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
private->children = NULL;
window->user_data = NULL;
@@ -296,9 +305,9 @@ gdk_window_new (GdkWindow *parent,
depth = visual->depth;
if (attributes_mask & GDK_WA_COLORMAP)
colormap = attributes->colormap;
private->colormap = attributes->colormap;
else
colormap = gdk_colormap_get_system ();
private->colormap = gdk_colormap_get_system ();
xattributes.background_pixel = BlackPixel (gdk_display, gdk_screen);
xattributes.border_pixel = BlackPixel (gdk_display, gdk_screen);
@@ -307,26 +316,26 @@ gdk_window_new (GdkWindow *parent,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_CHILD:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
break;
case GDK_WINDOW_DIALOG:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_TEMP:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
@@ -348,7 +357,7 @@ gdk_window_new (GdkWindow *parent,
{
depth = 0;
class = InputOnly;
colormap = NULL;
private->colormap = NULL;
}
private->xwindow = XCreateWindow (private->xdisplay, xparent,
@@ -358,6 +367,9 @@ gdk_window_new (GdkWindow *parent,
gdk_window_ref (window);
gdk_xid_table_insert (&private->xwindow, window);
if (private->colormap)
gdk_colormap_ref (private->colormap);
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
@@ -372,8 +384,8 @@ gdk_window_new (GdkWindow *parent,
break;
case GDK_WINDOW_CHILD:
if ((attributes->wclass == GDK_INPUT_OUTPUT) &&
(colormap != gdk_colormap_get_system ()) &&
(colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
(private->colormap != gdk_colormap_get_system ()) &&
(private->colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
{
GDK_NOTE (MISC, g_print ("adding colormap window\n"));
gdk_window_add_colormap_windows (window);
@@ -430,6 +442,7 @@ gdk_window_foreign_new (guint32 anid)
{
GdkWindow *window;
GdkWindowPrivate *private;
GdkWindowPrivate *parent_private;
XWindowAttributes attrs;
Window root, parent;
Window *children;
@@ -446,6 +459,11 @@ gdk_window_foreign_new (guint32 anid)
XFree (children);
private->parent = gdk_xid_table_lookup (parent);
parent_private = (GdkWindowPrivate *)private->parent;
if (parent_private)
parent_private->children = g_list_prepend (parent_private->children, window);
private->xwindow = anid;
private->xdisplay = gdk_display;
private->x = attrs.x;
@@ -458,6 +476,7 @@ gdk_window_foreign_new (guint32 anid)
private->destroyed = FALSE;
private->extension_events = 0;
private->colormap = NULL;
private->dnd_drag_data_type = None;
private->dnd_drag_data_typesavail =
@@ -469,6 +488,7 @@ gdk_window_foreign_new (guint32 anid)
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
private->children = NULL;
window->user_data = NULL;
@@ -507,10 +527,17 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
case GDK_WINDOW_FOREIGN:
if (!private->destroyed)
{
if (private->parent)
{
GdkWindowPrivate *parent_private = (GdkWindowPrivate *)private->parent;
if (parent_private->children)
parent_private->children = g_list_remove (parent_private->children, window);
}
if (private->window_type != GDK_WINDOW_FOREIGN)
{
children = gdk_window_get_children (window);
tmp = children;
children = tmp = private->children;
private->children = NULL;
while (tmp)
{
@@ -522,7 +549,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
gdk_window_internal_destroy (temp_window, FALSE,
our_destroy);
}
g_list_free (children);
}
@@ -581,6 +608,9 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
else if (xdestroy)
XDestroyWindow (private->xdisplay, private->xwindow);
if (private->colormap)
gdk_colormap_unref (private->colormap);
private->destroyed = TRUE;
}
break;
@@ -785,6 +815,7 @@ gdk_window_reparent (GdkWindow *window,
{
GdkWindowPrivate *window_private;
GdkWindowPrivate *parent_private;
GdkWindowPrivate *old_parent_private;
g_return_if_fail (window != NULL);
@@ -792,6 +823,7 @@ gdk_window_reparent (GdkWindow *window,
new_parent = (GdkWindow*) &gdk_root_parent;
window_private = (GdkWindowPrivate*) window;
old_parent_private = (GdkWindowPrivate*)window_private->parent;
parent_private = (GdkWindowPrivate*) new_parent;
if (!window_private->destroyed && !parent_private->destroyed)
@@ -799,6 +831,10 @@ gdk_window_reparent (GdkWindow *window,
window_private->xwindow,
parent_private->xwindow,
x, y);
old_parent_private->children = g_list_remove (old_parent_private->children, window);
parent_private->children = g_list_prepend (parent_private->children, window);
}
void
@@ -1059,6 +1095,11 @@ gdk_window_set_colormap (GdkWindow *window,
XSetWindowColormap (window_private->xdisplay,
window_private->xwindow,
colormap_private->xcolormap);
if (window_private->colormap)
gdk_colormap_unref (window_private->colormap);
window_private->colormap = colormap;
gdk_colormap_ref (window_private->colormap);
if (window_private->window_type != GDK_WINDOW_TOPLEVEL)
gdk_window_add_colormap_windows (window);
@@ -1153,20 +1194,27 @@ gdk_window_get_visual (GdkWindow *window)
{
GdkWindowPrivate *window_private;
XWindowAttributes window_attributes;
g_return_val_if_fail (window != NULL, NULL);
window_private = (GdkWindowPrivate*) window;
/* Huh? ->parent is never set for a pixmap. We should just return
* null immeditately
*/
while (window_private && (window_private->window_type == GDK_WINDOW_PIXMAP))
window_private = (GdkWindowPrivate*) window_private->parent;
if (window_private && !window_private->destroyed)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_visual_lookup (window_attributes.visual);
if (window_private->colormap == NULL)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_visual_lookup (window_attributes.visual);
}
else
return ((GdkColormapPrivate *)window_private->colormap)->visual;
}
return NULL;
@@ -1179,16 +1227,20 @@ gdk_window_get_colormap (GdkWindow *window)
XWindowAttributes window_attributes;
g_return_val_if_fail (window != NULL, NULL);
window_private = (GdkWindowPrivate*) window;
g_return_val_if_fail (window_private->window_type != GDK_WINDOW_PIXMAP, NULL);
if (!window_private->destroyed)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_colormap_lookup (window_attributes.colormap);
if (window_private->colormap == NULL)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_colormap_lookup (window_attributes.colormap);
}
else
return window_private->colormap;
}
return NULL;
@@ -1436,8 +1488,7 @@ gdk_window_add_colormap_windows (GdkWindow *window)
/*
* This needs the X11 shape extension.
* If not available, simply remove the call to
* XShapeCombineMask. Shaped windows will look
* If not available, shaped windows will look
* ugly, but programs still work. Stefan Wille
*/
void
@@ -1445,38 +1496,53 @@ gdk_window_shape_combine_mask (GdkWindow *window,
GdkBitmap *mask,
gint x, gint y)
{
enum { UNKNOWN, NO, YES };
static gint have_shape = UNKNOWN;
GdkWindowPrivate *window_private;
Pixmap pixmap;
g_return_if_fail (window != NULL);
/* This is needed, according to raster */
gdk_window_set_override_redirect(window, TRUE);
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (mask)
#ifdef HAVE_SHAPE_EXT
if (have_shape == UNKNOWN)
{
GdkWindowPrivate *pixmap_private;
pixmap_private = (GdkWindowPrivate*) mask;
pixmap = (Pixmap) pixmap_private->xwindow;
int ignore;
if (XQueryExtension(gdk_display, "SHAPE", &ignore, &ignore, &ignore))
have_shape = YES;
else
have_shape = NO;
}
else
if (have_shape == YES)
{
x = 0;
y = 0;
pixmap = None;
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (mask)
{
GdkWindowPrivate *pixmap_private;
pixmap_private = (GdkWindowPrivate*) mask;
pixmap = (Pixmap) pixmap_private->xwindow;
}
else
{
x = 0;
y = 0;
pixmap = None;
}
XShapeCombineMask (window_private->xdisplay,
window_private->xwindow,
ShapeBounding,
x, y,
pixmap,
ShapeSet);
}
XShapeCombineMask (window_private->xdisplay,
window_private->xwindow,
ShapeBounding,
x, y,
pixmap,
ShapeSet);
#endif /* HAVE_SHAPE_EXT */
}
void

View File

@@ -61,7 +61,7 @@ handler(int signal)
}
void
init_socket()
init_socket(void)
{
struct sockaddr_in sin;
@@ -130,7 +130,7 @@ enable_device(GxidDevice *dev)
/* switch the core pointer from whatever it is now to something else,
return true on success, false otherwise */
static int
switch_core_pointer()
switch_core_pointer(void)
{
GxidDevice *old_pointer = 0;
GxidDevice *new_pointer = 0;
@@ -222,7 +222,7 @@ init_device(XDeviceInfo *xdevice)
}
void
init_xinput()
init_xinput(void)
{
char **extensions;
XDeviceInfo *xdevices;
@@ -279,12 +279,22 @@ int
handle_claim_device(GxidClaimDevice *msg)
{
int i,j;
XID devid = ntohl(msg->device);
XID winid = ntohl(msg->window);
int exclusive = ntohl(msg->exclusive);
XID devid;
XID winid;
int exclusive;
GxidDevice *device = NULL;
GxidWindow *window = NULL;
if (msg->length != sizeof(GxidClaimDevice))
{
fprintf(stderr,"Bad length for ClaimDevice message\n");
return GXID_RETURN_ERROR;
}
devid = ntohl(msg->device);
winid = ntohl(msg->window);
exclusive = ntohl(msg->exclusive);
#ifdef DEBUG_CLIENTS
fprintf(stderr,"device %ld claimed (window 0x%lx)\n",devid,winid);
#endif
@@ -397,11 +407,20 @@ int
handle_release_device(GxidReleaseDevice *msg)
{
int i,j;
XID devid = ntohl(msg->device);
XID winid = ntohl(msg->window);
XID devid;
XID winid;
GxidDevice *device = NULL;
if (msg->length != sizeof(GxidReleaseDevice))
{
fprintf(stderr,"Bad length for ReleaseDevice message\n");
return GXID_RETURN_ERROR;
}
devid = ntohl(msg->device);
winid = ntohl(msg->window);
#ifdef DEBUG_CLIENTS
fprintf(stderr,"device %ld released (window 0x%lx)\n",devid,winid);
#endif
@@ -460,11 +479,11 @@ handle_release_device(GxidReleaseDevice *msg)
}
void
handle_connection()
handle_connection (void)
{
GxidMessage msg;
GxidU32 type;
int length;
GxidU32 length;
GxidI32 retval;
int conn_fd;
@@ -496,7 +515,7 @@ handle_connection()
/* read rest of message */
if (length > sizeof(GxidMessage))
if ((length > sizeof(GxidMessage)) || (length < 2*sizeof(GxidU32)))
{
fprintf(stderr,"%s: Bad message length\n",
program_name);
@@ -689,7 +708,7 @@ handle_destroy_notify(XDestroyWindowEvent *event)
}
void
handle_xevent()
handle_xevent(void)
{
int i;
XEvent event;
@@ -743,7 +762,7 @@ handle_xevent()
}
void
usage()
usage(void)
{
fprintf(stderr,"Usage: %s [-d display] [-p --gxid-port port]\n",
program_name);
@@ -833,7 +852,7 @@ main(int argc, char **argv)
}
if (FD_ISSET(socket_fd,&readfds))
handle_connection(socket_fd);
handle_connection();
while (XPending(dpy))
handle_xevent();

View File

@@ -60,11 +60,11 @@ gdk_dnd_set_drag_shape(GdkWindow *default_pixmapwin,
gdk_window_ref(default_pixmapwin);
gdk_dnd.c->drag_pm_default = default_pixmapwin;
gdk_dnd.c->default_hotspot = *default_hotspot;
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, (gpointer)(glong)((GdkWindowPrivate *)default_pixmapwin)->xwindow);
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, GUINT_TO_POINTER (((GdkWindowPrivate *)default_pixmapwin)->xwindow));
if(goahead_pixmapwin)
{
gdk_window_ref(goahead_pixmapwin);
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, (gpointer)(glong)((GdkWindowPrivate *)goahead_pixmapwin)->xwindow);
gdk_dnd.c->xids = g_list_append(gdk_dnd.c->xids, GUINT_TO_POINTER (((GdkWindowPrivate *)goahead_pixmapwin)->xwindow));
gdk_dnd.c->drag_pm_ok = goahead_pixmapwin;
gdk_dnd.c->ok_hotspot = *goahead_hotspot;
}

View File

@@ -64,7 +64,7 @@ static GList *image_list = NULL;
void
gdk_image_exit ()
gdk_image_exit (void)
{
GdkImage *image;
@@ -131,7 +131,7 @@ gdk_image_check_xshm(Display *display)
}
void
gdk_image_init ()
gdk_image_init (void)
{
if (gdk_use_xshm)
{

View File

@@ -591,23 +591,35 @@ gdk_input_gxi_grab_pointer (GdkWindow * window,
GdkWindow * confine_to,
guint32 time)
{
GdkInputWindow *input_window, *new_window;
GList *tmp_list;
GdkInputWindow *input_window;
GdkDevicePrivate *gdkdev;
tmp_list = gdk_input_windows;
while (tmp_list)
{
input_window = (GdkInputWindow *)tmp_list->data;
if (input_window->grabbed)
return AlreadyGrabbed;
if (input_window->window == window)
new_window = input_window;
input_window->grabbed = TRUE;
else if (input_window->grabbed)
input_window->grabbed = FALSE;
tmp_list = tmp_list->next;
}
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
gdkdev->xdevice &&
(gdkdev->button_state != 0))
gdkdev->button_state = 0;
tmp_list = tmp_list->next;
}
new_window->grabbed = TRUE;
return Success;
}

View File

@@ -29,7 +29,7 @@ static void gdk_input_none_get_pointer (GdkWindow *window,
GdkModifierType *mask);
void
gdk_input_init ()
gdk_input_init (void)
{
gdk_input_vtable.set_mode = NULL;
gdk_input_vtable.set_axes = NULL;

View File

@@ -186,7 +186,7 @@ gdk_input_device_new(XDeviceInfo *device, gint include_core)
if ((xki->min_keycode == 8) && (xki->max_keycode == 32))
{
gdkdev->info.num_keys = 32;
gdkdev->min_keycode = 0;
gdkdev->min_keycode = 1;
}
else
{

View File

@@ -22,7 +22,7 @@
/* forward declarations */
static gint gdk_input_xfree_set_mode (guint32 deviceid, GdkInputMode mode);
static void gdk_input_check_proximity();
static void gdk_input_check_proximity (void);
static void gdk_input_xfree_configure_event (XConfigureEvent *xevent,
GdkWindow *window);
static void gdk_input_xfree_enter_event (XCrossingEvent *xevent,
@@ -115,7 +115,7 @@ gdk_input_xfree_set_mode (guint32 deviceid, GdkInputMode mode)
}
static void
gdk_input_check_proximity()
gdk_input_check_proximity (void)
{
gint new_proximity = 0;
GList *tmp_list = gdk_input_devices;
@@ -173,7 +173,7 @@ gdk_input_xfree_configure_event (XConfigureEvent *xevent, GdkWindow *window)
static void
gdk_input_xfree_enter_event (XCrossingEvent *xevent,
GdkWindow *window)
GdkWindow *window)
{
GdkInputWindow *input_window;
gint root_x, root_y;
@@ -257,6 +257,7 @@ gdk_input_xfree_grab_pointer (GdkWindow * window,
guint32 time)
{
GdkInputWindow *input_window, *new_window;
gboolean need_ungrab;
GdkDevicePrivate *gdkdev;
GList *tmp_list;
XEventClass event_classes[GDK_MAX_DEVICE_CLASSES];
@@ -265,47 +266,70 @@ gdk_input_xfree_grab_pointer (GdkWindow * window,
tmp_list = gdk_input_windows;
new_window = NULL;
need_ungrab = FALSE;
while (tmp_list)
{
input_window = (GdkInputWindow *)tmp_list->data;
if (input_window->grabbed)
return AlreadyGrabbed;
if (input_window->window == window)
new_window = input_window;
tmp_list = tmp_list->next;
}
g_return_val_if_fail (new_window != NULL, Success); /* shouldn't happen */
new_window->grabbed = TRUE;
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
gdkdev->xdevice)
else if (input_window->grabbed)
{
gdk_input_common_find_events (window, gdkdev,
event_mask,
event_classes, &num_classes);
result = XGrabDevice( GDK_DISPLAY(), gdkdev->xdevice,
GDK_WINDOW_XWINDOW (window),
owner_events, num_classes, event_classes,
GrabModeAsync, GrabModeAsync, time);
/* FIXME: if failure occurs on something other than the first
device, things will be badly inconsistent */
if (result != Success)
return result;
input_window->grabbed = FALSE;
need_ungrab = TRUE;
}
tmp_list = tmp_list->next;
}
if (new_window)
{
new_window->grabbed = TRUE;
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER &&
gdkdev->xdevice)
{
gdk_input_common_find_events (window, gdkdev,
event_mask,
event_classes, &num_classes);
result = XGrabDevice( GDK_DISPLAY(), gdkdev->xdevice,
GDK_WINDOW_XWINDOW (window),
owner_events, num_classes, event_classes,
GrabModeAsync, GrabModeAsync, time);
/* FIXME: if failure occurs on something other than the first
device, things will be badly inconsistent */
if (result != Success)
return result;
}
tmp_list = tmp_list->next;
}
}
else
{
tmp_list = gdk_input_devices;
while (tmp_list)
{
gdkdev = (GdkDevicePrivate *)tmp_list->data;
if (gdkdev->info.deviceid != GDK_CORE_POINTER && gdkdev->xdevice &&
((gdkdev->button_state != 0) || need_ungrab))
{
XUngrabDevice( gdk_display, gdkdev->xdevice, time);
gdkdev->button_state = 0;
}
tmp_list = tmp_list->next;
}
}
return Success;
}
static void

View File

@@ -70,7 +70,7 @@ static GList *gdk_input_windows;
#include "gdkinputgxi.h"
GList *
gdk_input_list_devices ()
gdk_input_list_devices (void)
{
return gdk_input_devices;
}

View File

@@ -51,8 +51,8 @@
#include "gdkinput.h"
#ifdef USE_XIM
#include "gdkx.h"
#include "gdkkeysyms.h"
#endif
#include "gdkkeysyms.h"
#include "gdki18n.h"
#ifndef X_GETTIMEOFDAY
@@ -625,7 +625,7 @@ gdk_exit (int errorcode)
*/
gchar*
gdk_set_locale ()
gdk_set_locale (void)
{
if (!setlocale (LC_ALL,""))
g_print ("locale not supported by C library\n");
@@ -663,7 +663,7 @@ gdk_set_locale ()
*/
gint
gdk_events_pending ()
gdk_events_pending (void)
{
gint result;
GList *tmp_list;
@@ -827,6 +827,7 @@ gdk_event_get (void)
#else
XNextEvent (gdk_display, &xevent);
#endif
event = gdk_event_new ();
event->any.type = GDK_NOTHING;
@@ -1023,13 +1024,13 @@ gdk_set_use_xshm (gint use_xshm)
}
gint
gdk_get_show_events ()
gdk_get_show_events (void)
{
return gdk_debug_flags & GDK_DEBUG_EVENTS;
}
gint
gdk_get_use_xshm ()
gdk_get_use_xshm (void)
{
return gdk_use_xshm;
}
@@ -1055,7 +1056,7 @@ gdk_get_use_xshm ()
*/
guint32
gdk_time_get ()
gdk_time_get (void)
{
struct timeval end;
struct timeval elapsed;
@@ -1094,7 +1095,7 @@ gdk_time_get ()
*/
guint32
gdk_timer_get ()
gdk_timer_get (void)
{
return timer_val;
}
@@ -1129,13 +1130,13 @@ gdk_timer_set (guint32 milliseconds)
}
void
gdk_timer_enable ()
gdk_timer_enable (void)
{
timerp = &timer;
}
void
gdk_timer_disable ()
gdk_timer_disable (void)
{
timerp = NULL;
}
@@ -1306,8 +1307,7 @@ gdk_pointer_grab (GdkWindow * window,
xevent_mask |= event_mask_table[i];
}
if (((GdkWindowPrivate *)window)->extension_events &&
gdk_input_vtable.grab_pointer)
if (gdk_input_vtable.grab_pointer)
return_val = gdk_input_vtable.grab_pointer (window,
owner_events,
event_mask,
@@ -1463,7 +1463,7 @@ gdk_keyboard_ungrab (guint32 time)
*/
gint
gdk_screen_width ()
gdk_screen_width (void)
{
gint return_val;
@@ -1488,7 +1488,7 @@ gdk_screen_width ()
*/
gint
gdk_screen_height ()
gdk_screen_height (void)
{
gint return_val;
@@ -1498,13 +1498,13 @@ gdk_screen_height ()
}
void
gdk_key_repeat_disable ()
gdk_key_repeat_disable (void)
{
XAutoRepeatOff (gdk_display);
}
void
gdk_key_repeat_restore ()
gdk_key_repeat_restore (void)
{
if (autorepeat)
XAutoRepeatOn (gdk_display);
@@ -1531,14 +1531,14 @@ gdk_key_repeat_restore ()
*--------------------------------------------------------------
*/
void gdk_flush ()
void gdk_flush (void)
{
XSync (gdk_display, False);
}
void
gdk_beep ()
gdk_beep (void)
{
XBell(gdk_display, 100);
}
@@ -1562,7 +1562,7 @@ gdk_beep ()
*/
static gint
gdk_event_wait ()
gdk_event_wait (void)
{
GList *list;
GdkInput *input;
@@ -1685,7 +1685,8 @@ gdk_event_translate (GdkEvent *event,
GdkWindow *window;
GdkWindowPrivate *window_private;
XComposeStatus compose;
static XComposeStatus compose;
KeySym keysym;
int charcount;
#ifdef USE_XIM
static gchar* buf = NULL;
@@ -1726,6 +1727,10 @@ gdk_event_translate (GdkEvent *event,
if (window != NULL)
gdk_window_ref (window);
#ifdef USE_XIM
else if (XFilterEvent(xevent, None)) /* for xlib XIM handling */
return FALSE;
#endif
else if(gdk_null_window_warnings) /* Special purpose programs that
get events for other windows may
want to disable this */
@@ -1767,16 +1772,16 @@ gdk_event_translate (GdkEvent *event,
buf_len = 128;
buf = g_new (gchar, buf_len);
}
keysym = GDK_VoidSymbol;
if (xim_using == TRUE && xim_ic)
{
Status status;
/* Clear keyval. Depending on status, may not be set */
event->key.keyval = GDK_VoidSymbol;
charcount = XmbLookupString(xim_ic->xic,
&xevent->xkey, buf, buf_len-1,
(KeySym*) &event->key.keyval,
&status);
&keysym, &status);
if (status == XBufferOverflow)
{ /* retry */
/* alloc adequate size of buffer */
@@ -1789,8 +1794,7 @@ gdk_event_translate (GdkEvent *event,
charcount = XmbLookupString (xim_ic->xic,
&xevent->xkey, buf, buf_len-1,
(KeySym*) &event->key.keyval,
&status);
&keysym, &status);
}
if (status == XLookupNone)
{
@@ -1800,13 +1804,13 @@ gdk_event_translate (GdkEvent *event,
}
else
charcount = XLookupString (&xevent->xkey, buf, buf_len,
(KeySym*) &event->key.keyval,
&compose);
&keysym, &compose);
#else
charcount = XLookupString (&xevent->xkey, buf, 16,
(KeySym*) &event->key.keyval,
&compose);
&keysym, &compose);
#endif
event->key.keyval = keysym;
if (charcount > 0 && buf[charcount-1] == '\0')
charcount --;
else
@@ -1844,9 +1848,10 @@ gdk_event_translate (GdkEvent *event,
case KeyRelease:
/* Lookup the string corresponding to the given keysym.
*/
keysym = GDK_VoidSymbol;
charcount = XLookupString (&xevent->xkey, buf, 16,
(KeySym*) &event->key.keyval,
&compose);
&keysym, &compose);
event->key.keyval = keysym;
/* Print debugging info.
*/
@@ -1964,7 +1969,7 @@ gdk_event_translate (GdkEvent *event,
window_private->dnd_drag_savedeventmask = dnd_winattr.your_event_mask;
dnd_setwinattr.event_mask =
window_private->dnd_drag_eventmask = ButtonMotionMask | ButtonPressMask | ButtonReleaseMask |
EnterWindowMask | LeaveWindowMask;
EnterWindowMask | LeaveWindowMask | ExposureMask;
XChangeWindowAttributes(gdk_display, window_private->xwindow,
CWEventMask, &dnd_setwinattr);
}
@@ -2204,6 +2209,7 @@ gdk_event_translate (GdkEvent *event,
/* Tell XInput stuff about it if appropriate */
if (window_private &&
!window_private->destroyed &&
(window_private->extension_events != 0) &&
gdk_input_vtable.enter_event)
gdk_input_vtable.enter_event (&xevent->xcrossing, window);
@@ -2333,7 +2339,7 @@ gdk_event_translate (GdkEvent *event,
ButtonMotionMask | PointerMotionMask |
/* PointerMotionHintMask | */ /* HINTME */
ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, gdk_root_window,
GrabModeAsync, GrabModeAsync, None,
None, CurrentTime);
#ifdef G_ENABLE_DEBUG
GDK_NOTE(DND, g_print("xgpret = %d\n", xgpret));
@@ -2581,7 +2587,8 @@ gdk_event_translate (GdkEvent *event,
if (window_private)
{
if ((window_private->extension_events != 0) &&
if (!window_private->destroyed &&
(window_private->extension_events != 0) &&
gdk_input_vtable.configure_event)
gdk_input_vtable.configure_event (&xevent->xconfigure, window);
@@ -2944,6 +2951,7 @@ gdk_event_translate (GdkEvent *event,
/* something else - (e.g., a Xinput event) */
if (window_private &&
!window_private->destroyed &&
(window_private->extension_events != 0) &&
gdk_input_vtable.other_event)
return_val = gdk_input_vtable.other_event(event, xevent, window);
@@ -3028,7 +3036,7 @@ gdk_synthesize_click (GdkEvent *event,
*/
static void
gdk_exit_func ()
gdk_exit_func (void)
{
static gboolean in_gdk_exit_func = FALSE;
@@ -4004,8 +4012,8 @@ gdk_dnd_check_types (GdkWindow *window,
if (realfmt != (sizeof(Atom) * 8))
{
g_warning("XdeTypelist property had format of %d instead of the expected %d, on window %#lx\n",
realfmt, sizeof(Atom) * 8, xevent->xclient.data.l[0]);
g_warning("XdeTypelist property had format of %d instead of the expected %ld, on window %#lx\n",
realfmt, (glong)sizeof(Atom) * 8, xevent->xclient.data.l[0]);
return 0;
}

View File

@@ -55,7 +55,7 @@ gdk_pixmap_new (GdkWindow *window,
return NULL;
if (depth == -1)
gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
@@ -64,6 +64,7 @@ gdk_pixmap_new (GdkWindow *window,
private->window_type = GDK_WINDOW_PIXMAP;
private->xwindow = XCreatePixmap (private->xdisplay, window_private->xwindow,
width, height, depth);
private->colormap = NULL;
private->parent = NULL;
private->x = 0;
private->y = 0;
@@ -148,7 +149,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
return NULL;
if (depth == -1)
gdk_window_get_geometry (window, NULL, NULL, NULL, NULL, &depth);
depth = gdk_window_get_visual (window)->depth;
private = g_new (GdkWindowPrivate, 1);
pixmap = (GdkPixmap*) private;
@@ -255,8 +256,14 @@ gdk_pixmap_read_string (FILE *infile,
{
if (cnt == (*buffer_size))
{
(*buffer_size) *= 2;
(*buffer) = (gchar *) g_realloc ((*buffer), *buffer_size); }
guint new_size = (*buffer_size) * 2;
if (new_size > (*buffer_size))
*buffer_size = new_size;
else
return FALSE;
(*buffer) = (gchar *) g_realloc ((*buffer), *buffer_size);
}
if (c != '"')
(*buffer)[cnt++] = c;
@@ -292,12 +299,16 @@ gdk_pixmap_skip_string (gchar *buffer)
return &buffer[index];
}
/* Xlib crashed ince at a color name lengths around 125 */
#define MAX_COLOR_LEN 120
gchar*
gdk_pixmap_extract_color (gchar *buffer)
{
gint counter, finished = FALSE, numnames;
gint counter, numnames;
gchar *ptr = NULL, ch, temp[128];
gchar color[128], *retcol;
gchar color[MAX_COLOR_LEN], *retcol;
gint space;
counter = 0;
while (ptr == NULL)
@@ -314,34 +325,53 @@ gdk_pixmap_extract_color (gchar *buffer)
counter++;
}
if (ptr == NULL)
return NULL;
ptr = gdk_pixmap_skip_whitespaces (ptr);
if (ptr[0] == 0)
return NULL;
else if (ptr[0] == '#')
{
retcol = g_strdup (ptr);
counter = 1;
while (ptr[counter] != 0 &&
((ptr[counter] >= '0' && ptr[counter] <= '9') ||
(ptr[counter] >= 'a' && ptr[counter] <= 'f') ||
(ptr[counter] >= 'A' && ptr[counter] <= 'F')))
counter++;
retcol = g_new (gchar, counter+1);
strncpy (retcol, ptr, counter);
retcol[counter] = 0;
return retcol;
}
color[0] = 0;
numnames = 0;
while (finished == FALSE)
space = MAX_COLOR_LEN - 1;
while (space > 0)
{
sscanf (ptr, "%127s", temp);
if ((gint)ptr[0] == 0 || strcmp ("s", temp) == 0 || strcmp ("m", temp) == 0 ||
strcmp ("g", temp) == 0 || strcmp ("g4", temp) == 0)
finished = TRUE;
if (((gint)ptr[0] == 0) ||
(strcmp ("s", temp) == 0) || (strcmp ("m", temp) == 0) ||
(strcmp ("g", temp) == 0) || (strcmp ("g4", temp) == 0))
{
break;
}
else
{
if (numnames > 0)
strcat (color, " ");
strcat (color, temp);
{
space -= 1;
strcat (color, " ");
}
if (space > 0)
{
strncat (color, temp, space);
space -= MIN (space, strlen (temp));
}
ptr = gdk_pixmap_skip_string (ptr);
ptr = gdk_pixmap_skip_whitespaces (ptr);
numnames++;
@@ -352,7 +382,6 @@ gdk_pixmap_extract_color (gchar *buffer)
return retcol;
}
GdkPixmap*
gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
GdkColormap *colormap,
@@ -398,6 +427,11 @@ gdk_pixmap_colormap_create_from_xpm (GdkWindow *window,
gdk_pixmap_read_string (infile, &buffer, &buffer_size);
sscanf (buffer,"%d %d %d %d", &width, &height, &num_cols, &cpp);
if (cpp >= 32)
{
g_warning ("Pixmap has more than 31 characters per color\n");
return NULL;
}
colors = g_new(_GdkPixmapColor, num_cols);
@@ -573,6 +607,11 @@ gdk_pixmap_colormap_create_from_xpm_d (GdkWindow *window,
i = 0;
buffer = data[i++];
sscanf (buffer,"%d %d %d %d", &width, &height, &num_cols, &cpp);
if (cpp >= 32)
{
g_warning ("Pixmap has more than 31 characters per color\n");
return NULL;
}
colors = g_new(_GdkPixmapColor, num_cols);

View File

@@ -127,7 +127,7 @@ gdk_region_polygon (GdkPoint *points,
GdkRegionPrivate *private;
GdkRegion *region;
Region xregion;
int xfill_rule;
gint xfill_rule = EvenOddRule;
g_return_val_if_fail (points != NULL, NULL);
g_return_val_if_fail (npoints != 0, NULL); /* maybe we should check for at least three points */

View File

@@ -58,7 +58,7 @@ static gchar* visual_names[] =
static GHashTable *visual_hash = NULL;
void
gdk_visual_init ()
gdk_visual_init (void)
{
static gint possible_depths[6] = { 32, 24, 16, 15, 8, 1 };
static GdkVisualType possible_types[6] =
@@ -263,25 +263,25 @@ gdk_visual_unref (GdkVisual *visual)
}
gint
gdk_visual_get_best_depth ()
gdk_visual_get_best_depth (void)
{
return available_depths[0];
}
GdkVisualType
gdk_visual_get_best_type ()
gdk_visual_get_best_type (void)
{
return available_types[0];
}
GdkVisual*
gdk_visual_get_system ()
gdk_visual_get_system (void)
{
return ((GdkVisual*) system_visual);
}
GdkVisual*
gdk_visual_get_best ()
gdk_visual_get_best (void)
{
return ((GdkVisual*) &(visuals[0]));
}

View File

@@ -20,7 +20,6 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
#include <netinet/in.h>
#include "gdk.h"
#include "../config.h"
@@ -30,6 +29,10 @@
#include <stdlib.h>
#include <stdio.h>
#ifdef HAVE_SHAPE_EXT
#include <X11/extensions/shape.h>
#endif
int nevent_masks = 17;
int event_mask_table[19] =
{
@@ -65,18 +68,18 @@ gdk_window_xid_at(Window base, gint bx, gint by, gint x, gint y,
Display *disp;
Window *list=NULL;
Window child=0,parent_win=0,root_win=0;
int i;
guint num;
int wx,wy;
guint ww,wh,wb,wd;
int i;
unsigned int ww, wh, wb, wd, num;
int wx,wy;
window=(GdkWindow*)&gdk_root_parent;
private=(GdkWindowPrivate*)window;
disp=private->xdisplay;
if (!XGetGeometry(disp,base,&root_win,&wx,&wy,&ww,&wh,&wb,&wd))
return 0;
wx+=bx;wy+=by;
if (!((x>=wx)&&(y>=wy)&&(x<(wx+ww))&&(y<(wy+wh))))
if (!((x>=wx)&&(y>=wy)&&(x<(int)(wx+ww))&&(y<(int)(wy+wh))))
return 0;
if (!XQueryTree(disp,base,&root_win,&parent_win,&list,&num))
return base;
@@ -172,7 +175,7 @@ gdk_window_xid_at_coords(gint x, gint y, GList *excludes, gboolean excl_child)
}
void
gdk_window_init ()
gdk_window_init (void)
{
XWindowAttributes xattributes;
unsigned int width;
@@ -191,6 +194,8 @@ gdk_window_init ()
gdk_root_parent.window.user_data = NULL;
gdk_root_parent.width = width;
gdk_root_parent.height = height;
gdk_root_parent.children = NULL;
gdk_root_parent.colormap = NULL;
}
GdkWindow*
@@ -202,7 +207,6 @@ gdk_window_new (GdkWindow *parent,
GdkWindowPrivate *private;
GdkWindowPrivate *parent_private;
GdkVisual *visual;
GdkColormap *colormap;
Display *parent_display;
Window xparent;
Visual *xvisual;
@@ -232,6 +236,10 @@ gdk_window_new (GdkWindow *parent,
window = (GdkWindow*) private;
private->parent = parent;
if (parent_private != &gdk_root_parent)
parent_private->children = g_list_prepend (parent_private->children, window);
private->xdisplay = parent_display;
private->destroyed = FALSE;
private->resize_count = 0;
@@ -264,6 +272,7 @@ gdk_window_new (GdkWindow *parent,
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
private->children = NULL;
window->user_data = NULL;
@@ -296,9 +305,9 @@ gdk_window_new (GdkWindow *parent,
depth = visual->depth;
if (attributes_mask & GDK_WA_COLORMAP)
colormap = attributes->colormap;
private->colormap = attributes->colormap;
else
colormap = gdk_colormap_get_system ();
private->colormap = gdk_colormap_get_system ();
xattributes.background_pixel = BlackPixel (gdk_display, gdk_screen);
xattributes.border_pixel = BlackPixel (gdk_display, gdk_screen);
@@ -307,26 +316,26 @@ gdk_window_new (GdkWindow *parent,
switch (private->window_type)
{
case GDK_WINDOW_TOPLEVEL:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_CHILD:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
break;
case GDK_WINDOW_DIALOG:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
break;
case GDK_WINDOW_TEMP:
xattributes.colormap = ((GdkColormapPrivate*) colormap)->xcolormap;
xattributes.colormap = ((GdkColormapPrivate*) private->colormap)->xcolormap;
xattributes_mask |= CWColormap;
xparent = gdk_root_window;
@@ -348,7 +357,7 @@ gdk_window_new (GdkWindow *parent,
{
depth = 0;
class = InputOnly;
colormap = NULL;
private->colormap = NULL;
}
private->xwindow = XCreateWindow (private->xdisplay, xparent,
@@ -358,6 +367,9 @@ gdk_window_new (GdkWindow *parent,
gdk_window_ref (window);
gdk_xid_table_insert (&private->xwindow, window);
if (private->colormap)
gdk_colormap_ref (private->colormap);
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
(attributes->cursor) :
NULL));
@@ -372,8 +384,8 @@ gdk_window_new (GdkWindow *parent,
break;
case GDK_WINDOW_CHILD:
if ((attributes->wclass == GDK_INPUT_OUTPUT) &&
(colormap != gdk_colormap_get_system ()) &&
(colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
(private->colormap != gdk_colormap_get_system ()) &&
(private->colormap != gdk_window_get_colormap (gdk_window_get_toplevel (window))))
{
GDK_NOTE (MISC, g_print ("adding colormap window\n"));
gdk_window_add_colormap_windows (window);
@@ -430,6 +442,7 @@ gdk_window_foreign_new (guint32 anid)
{
GdkWindow *window;
GdkWindowPrivate *private;
GdkWindowPrivate *parent_private;
XWindowAttributes attrs;
Window root, parent;
Window *children;
@@ -446,6 +459,11 @@ gdk_window_foreign_new (guint32 anid)
XFree (children);
private->parent = gdk_xid_table_lookup (parent);
parent_private = (GdkWindowPrivate *)private->parent;
if (parent_private)
parent_private->children = g_list_prepend (parent_private->children, window);
private->xwindow = anid;
private->xdisplay = gdk_display;
private->x = attrs.x;
@@ -458,6 +476,7 @@ gdk_window_foreign_new (guint32 anid)
private->destroyed = FALSE;
private->extension_events = 0;
private->colormap = NULL;
private->dnd_drag_data_type = None;
private->dnd_drag_data_typesavail =
@@ -469,6 +488,7 @@ gdk_window_foreign_new (guint32 anid)
private->dnd_drag_eventmask = private->dnd_drag_savedeventmask = 0;
private->filters = NULL;
private->children = NULL;
window->user_data = NULL;
@@ -507,10 +527,17 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
case GDK_WINDOW_FOREIGN:
if (!private->destroyed)
{
if (private->parent)
{
GdkWindowPrivate *parent_private = (GdkWindowPrivate *)private->parent;
if (parent_private->children)
parent_private->children = g_list_remove (parent_private->children, window);
}
if (private->window_type != GDK_WINDOW_FOREIGN)
{
children = gdk_window_get_children (window);
tmp = children;
children = tmp = private->children;
private->children = NULL;
while (tmp)
{
@@ -522,7 +549,7 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
gdk_window_internal_destroy (temp_window, FALSE,
our_destroy);
}
g_list_free (children);
}
@@ -581,6 +608,9 @@ gdk_window_internal_destroy (GdkWindow *window, gboolean xdestroy,
else if (xdestroy)
XDestroyWindow (private->xdisplay, private->xwindow);
if (private->colormap)
gdk_colormap_unref (private->colormap);
private->destroyed = TRUE;
}
break;
@@ -785,6 +815,7 @@ gdk_window_reparent (GdkWindow *window,
{
GdkWindowPrivate *window_private;
GdkWindowPrivate *parent_private;
GdkWindowPrivate *old_parent_private;
g_return_if_fail (window != NULL);
@@ -792,6 +823,7 @@ gdk_window_reparent (GdkWindow *window,
new_parent = (GdkWindow*) &gdk_root_parent;
window_private = (GdkWindowPrivate*) window;
old_parent_private = (GdkWindowPrivate*)window_private->parent;
parent_private = (GdkWindowPrivate*) new_parent;
if (!window_private->destroyed && !parent_private->destroyed)
@@ -799,6 +831,10 @@ gdk_window_reparent (GdkWindow *window,
window_private->xwindow,
parent_private->xwindow,
x, y);
old_parent_private->children = g_list_remove (old_parent_private->children, window);
parent_private->children = g_list_prepend (parent_private->children, window);
}
void
@@ -1059,6 +1095,11 @@ gdk_window_set_colormap (GdkWindow *window,
XSetWindowColormap (window_private->xdisplay,
window_private->xwindow,
colormap_private->xcolormap);
if (window_private->colormap)
gdk_colormap_unref (window_private->colormap);
window_private->colormap = colormap;
gdk_colormap_ref (window_private->colormap);
if (window_private->window_type != GDK_WINDOW_TOPLEVEL)
gdk_window_add_colormap_windows (window);
@@ -1153,20 +1194,27 @@ gdk_window_get_visual (GdkWindow *window)
{
GdkWindowPrivate *window_private;
XWindowAttributes window_attributes;
g_return_val_if_fail (window != NULL, NULL);
window_private = (GdkWindowPrivate*) window;
/* Huh? ->parent is never set for a pixmap. We should just return
* null immeditately
*/
while (window_private && (window_private->window_type == GDK_WINDOW_PIXMAP))
window_private = (GdkWindowPrivate*) window_private->parent;
if (window_private && !window_private->destroyed)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_visual_lookup (window_attributes.visual);
if (window_private->colormap == NULL)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_visual_lookup (window_attributes.visual);
}
else
return ((GdkColormapPrivate *)window_private->colormap)->visual;
}
return NULL;
@@ -1179,16 +1227,20 @@ gdk_window_get_colormap (GdkWindow *window)
XWindowAttributes window_attributes;
g_return_val_if_fail (window != NULL, NULL);
window_private = (GdkWindowPrivate*) window;
g_return_val_if_fail (window_private->window_type != GDK_WINDOW_PIXMAP, NULL);
if (!window_private->destroyed)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_colormap_lookup (window_attributes.colormap);
if (window_private->colormap == NULL)
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
&window_attributes);
return gdk_colormap_lookup (window_attributes.colormap);
}
else
return window_private->colormap;
}
return NULL;
@@ -1436,8 +1488,7 @@ gdk_window_add_colormap_windows (GdkWindow *window)
/*
* This needs the X11 shape extension.
* If not available, simply remove the call to
* XShapeCombineMask. Shaped windows will look
* If not available, shaped windows will look
* ugly, but programs still work. Stefan Wille
*/
void
@@ -1445,38 +1496,53 @@ gdk_window_shape_combine_mask (GdkWindow *window,
GdkBitmap *mask,
gint x, gint y)
{
enum { UNKNOWN, NO, YES };
static gint have_shape = UNKNOWN;
GdkWindowPrivate *window_private;
Pixmap pixmap;
g_return_if_fail (window != NULL);
/* This is needed, according to raster */
gdk_window_set_override_redirect(window, TRUE);
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (mask)
#ifdef HAVE_SHAPE_EXT
if (have_shape == UNKNOWN)
{
GdkWindowPrivate *pixmap_private;
pixmap_private = (GdkWindowPrivate*) mask;
pixmap = (Pixmap) pixmap_private->xwindow;
int ignore;
if (XQueryExtension(gdk_display, "SHAPE", &ignore, &ignore, &ignore))
have_shape = YES;
else
have_shape = NO;
}
else
if (have_shape == YES)
{
x = 0;
y = 0;
pixmap = None;
window_private = (GdkWindowPrivate*) window;
if (window_private->destroyed)
return;
if (mask)
{
GdkWindowPrivate *pixmap_private;
pixmap_private = (GdkWindowPrivate*) mask;
pixmap = (Pixmap) pixmap_private->xwindow;
}
else
{
x = 0;
y = 0;
pixmap = None;
}
XShapeCombineMask (window_private->xdisplay,
window_private->xwindow,
ShapeBounding,
x, y,
pixmap,
ShapeSet);
}
XShapeCombineMask (window_private->xdisplay,
window_private->xwindow,
ShapeBounding,
x, y,
pixmap,
ShapeSet);
#endif /* HAVE_SHAPE_EXT */
}
void

View File

@@ -61,7 +61,7 @@ handler(int signal)
}
void
init_socket()
init_socket(void)
{
struct sockaddr_in sin;
@@ -130,7 +130,7 @@ enable_device(GxidDevice *dev)
/* switch the core pointer from whatever it is now to something else,
return true on success, false otherwise */
static int
switch_core_pointer()
switch_core_pointer(void)
{
GxidDevice *old_pointer = 0;
GxidDevice *new_pointer = 0;
@@ -222,7 +222,7 @@ init_device(XDeviceInfo *xdevice)
}
void
init_xinput()
init_xinput(void)
{
char **extensions;
XDeviceInfo *xdevices;
@@ -279,12 +279,22 @@ int
handle_claim_device(GxidClaimDevice *msg)
{
int i,j;
XID devid = ntohl(msg->device);
XID winid = ntohl(msg->window);
int exclusive = ntohl(msg->exclusive);
XID devid;
XID winid;
int exclusive;
GxidDevice *device = NULL;
GxidWindow *window = NULL;
if (msg->length != sizeof(GxidClaimDevice))
{
fprintf(stderr,"Bad length for ClaimDevice message\n");
return GXID_RETURN_ERROR;
}
devid = ntohl(msg->device);
winid = ntohl(msg->window);
exclusive = ntohl(msg->exclusive);
#ifdef DEBUG_CLIENTS
fprintf(stderr,"device %ld claimed (window 0x%lx)\n",devid,winid);
#endif
@@ -397,11 +407,20 @@ int
handle_release_device(GxidReleaseDevice *msg)
{
int i,j;
XID devid = ntohl(msg->device);
XID winid = ntohl(msg->window);
XID devid;
XID winid;
GxidDevice *device = NULL;
if (msg->length != sizeof(GxidReleaseDevice))
{
fprintf(stderr,"Bad length for ReleaseDevice message\n");
return GXID_RETURN_ERROR;
}
devid = ntohl(msg->device);
winid = ntohl(msg->window);
#ifdef DEBUG_CLIENTS
fprintf(stderr,"device %ld released (window 0x%lx)\n",devid,winid);
#endif
@@ -460,11 +479,11 @@ handle_release_device(GxidReleaseDevice *msg)
}
void
handle_connection()
handle_connection (void)
{
GxidMessage msg;
GxidU32 type;
int length;
GxidU32 length;
GxidI32 retval;
int conn_fd;
@@ -496,7 +515,7 @@ handle_connection()
/* read rest of message */
if (length > sizeof(GxidMessage))
if ((length > sizeof(GxidMessage)) || (length < 2*sizeof(GxidU32)))
{
fprintf(stderr,"%s: Bad message length\n",
program_name);
@@ -689,7 +708,7 @@ handle_destroy_notify(XDestroyWindowEvent *event)
}
void
handle_xevent()
handle_xevent(void)
{
int i;
XEvent event;
@@ -743,7 +762,7 @@ handle_xevent()
}
void
usage()
usage(void)
{
fprintf(stderr,"Usage: %s [-d display] [-p --gxid-port port]\n",
program_name);
@@ -833,7 +852,7 @@ main(int argc, char **argv)
}
if (FD_ISSET(socket_fd,&readfds))
handle_connection(socket_fd);
handle_connection();
while (XPending(dpy))
handle_xevent();

View File

@@ -1,3 +1,109 @@
Thu Sep 17 19:13:26 PDT 1998 Manish Singh <yosh@gimp.org>
* install-sh
* missing
* mkinstalldirs: updated to latest automake version
Wed Sep 9 02:28:49 PDT 1998 Manish Singh <yosh@gimp.org>
* configure.in: added -posix check for NeXTStep
Sun Sep 6 12:35:13 PDT 1998 Manish Singh <yosh@gimp.org>
* glib.h: provide proper ATEXIT behavior on NeXTStep by !atexit
Wed Jul 1 20:14:03 PDT 1998 Manish Singh <yosh@gimp.org>
* ltconfig: fix for properly detecting shared lib support on
SunPro cc (taken from libtool 1.2.a)
Wed May 20 05:02:26 1998 Tim Janik <timj@gtk.org>
* glib.h: conditionally define NULL, FALSE and TRUE.
added G_GNUC_FORMAT(), G_GNUC_NORETURN and G_GNUC_CONST macros to
feature more function arguments.
(g_mem_chunk_create): new convenience macro as a short hand for
g_mem_chunk_new().
(g_chunk_free): new convenience macro to be consistent with g_chunk_new.
* glist.c: backmerged g_list_nth_data().
* gslist.c: backmerged g_slist_nth_data().
Mon May 18 22:14:39 1998 Owen Taylor <otaylor@gtk.org>
(Yasuhiro SHIRASAKI <joke@awa.tohoku.ac.jp> : gtk-joke-980517-0.patch)
* gutils.c: Restored a missing prototype for g_vsprintf.
Tue May 12 19:22:58 1998 Owen Taylor <otaylor@gtk.org>
* glib/glib.h: Added macros G[U]INT_TO_POINTER() and
GPOINTER_TO_[U]INT for storing small integers integers
inside pointers.
* glib/testglib.c: Print sizeof() results
as g_print("%ld", (glong)sizeof(foo)), to deal with
size_t being long on Alpha's.
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
Mon May 11 21:11:54 1998 Owen Taylor <otaylor@gtk.org>
* gutils.c gmessages.c: Moved g_error, g_warning, g_message and
g_print from gutils.c to new file gmessages.c, to avoid having to
include <unistd.h> in gutils.c which was causing problems for the
g_strsignal implementation on FreeBSD boxes.
Mon May 11 07:22:36 1998 Tim Janik <timj@gtk.org>
* glib.h: provide G_GNUC_FUNCTION and G_GNUC_PRETTY_FUNCTION to
avoid conditionals. unconditionally define NULL, TRUE, FALSE, MAX,
MIN, ABS and CLAMP, these macros might be screwed from other headers.
Thu May 7 08:17:28 1998 Tim Janik <timj@gtk.org>
[1-1-0-Merge]
* glib.h (G_GNUC_PRINTF):
(G_GNUC_SCANF): macros to facilitate the printf/scanf format argument
checking of gcc.
* gstring.c: const corrections, string!=NULL checks at function entry.
(g_string_down): new function for tolower(3) conversion.
(g_string_up): new function for toupper(3) conversion.
* gutils.c: const corrections.
(g_strdown): g_string_down() counterpart.
(g_strup): g_string_up() counterpart.
* gslist.c:
(g_slist_index): find out about about the position of a
certain data pointer.
(g_slist_position): find out about about the position of a
certain node.
* glist.c:
(g_list_index): find out about about the position of a
certain data pointer.
(g_list_position): find out about about the position of a
certain data pointer.
Fri May 1 16:36:08 1998 Owen Taylor <otaylor@gtk.org>
* gutils.c: (g_strcasecmp). Check for isupper before
taking tolower, and account for macroized tolower.
* gutils.c (g_error): Check for recursion.
Thu Apr 30 21:41:30 1998 Owen Taylor <otaylor@gtk.org>
* gstring.c : Check arguments more carefully,
(gtk-draco-980423-1.patch; ramsey@rhrk.uni-kl.de)
Tue Apr 7 19:36:48 1998 Owen Taylor <owt1@cornell.edu>
* gutils.c (g_direct_compare): Removed, because that's what

View File

@@ -11,6 +11,7 @@ libglib_la_SOURCES = \
ghash.c \
glist.c \
gmem.c \
gmessages.c \
gprimes.c \
gslist.c \
gtimer.c \
@@ -25,7 +26,7 @@ include_HEADERS = \
configinclude_DATA = \
glibconfig.h
libglib_la_LDFLAGS = -version-info 1:0:0
libglib_la_LDFLAGS = -version-info $(GLIB_MAJOR_VERSION):$(GLIB_MICRO_VERSION):0
INCLUDES = -I$(top_srcdir)

View File

@@ -4,8 +4,15 @@ AC_INIT(glist.c)
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
dnl Initialize automake stuff
AM_INIT_AUTOMAKE(glib, 1.0.0)
GLIB_MAJOR_VERSION=1
GLIB_MINOR_VERSION=0
GLIB_MICRO_VERSION=6
GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
VERSION=$GLIB_VERSION
PACKAGE=glib
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
# Specify a configuration file
AM_CONFIG_HEADER(glibconfig.h)
@@ -24,7 +31,7 @@ AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]]
, enable_ansi=no)
if test "x$enable_debug" = "xyes"; then
test "$cflags_set" = set || CFLAGS="-g"
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
CFLAGS="$CFLAGS -DG_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
@@ -38,6 +45,7 @@ AC_DEFINE_UNQUOTED(G_COMPILED_WITH_DEBUGGING, "${enable_debug}")
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
if eval "test x$GCC = xyes"; then
if eval test -z \"`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`\" ; then
@@ -55,6 +63,38 @@ if eval "test x$GCC = xyes"; then
fi
fi
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
glib_save_LIBS=$LIBS
LIBS="$LIBS -lm"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(none needed),
glib_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -std1"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(-std1),
AC_MSG_RESULT()
CFLAGS=$glib_save_CFLAGS
AC_MSG_WARN(
[No ANSI prototypes found in library. (-std1 didn't work.)])
)
)
LIBS=$glib_save_LIBS
dnl NeXTStep cc seems to need this
AC_MSG_CHECKING([for extra flags for POSIX compliance])
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
AC_MSG_RESULT(none needed),
glib_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -posix"
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
AC_MSG_RESULT(-posix),
AC_MSG_RESULT()
CFLAGS=$glib_save_CFLAGS
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
# Checks for header files.
AC_HEADER_STDC
@@ -166,4 +206,9 @@ if test $gtk_ok = no; then
fi
AC_MSG_RESULT($gtk_ok)
AC_SUBST(GLIB_MAJOR_VERSION)
AC_SUBST(GLIB_MINOR_VERSION)
AC_SUBST(GLIB_MICRO_VERSION)
AC_SUBST(GLIB_VERSION)
AC_OUTPUT(Makefile)

View File

@@ -55,7 +55,7 @@
static int do_query (char *prompt);
static void debug (char *progname, int method);
static void debug (const gchar *progname, int method);
static void stack_trace (char **);
static void stack_trace_sigchld (int);
@@ -63,7 +63,7 @@ static void stack_trace_sigchld (int);
static int stack_trace_done;
void
g_debug (char *progname)
g_debug (const gchar *progname)
{
char buf[32];
@@ -82,14 +82,16 @@ g_debug (char *progname)
}
void
g_attach_process (char *progname, int query)
g_attach_process (const gchar *progname,
int query)
{
if (!query || do_query ("attach to process"))
debug (progname, INTERACTIVE);
}
void
g_stack_trace (char *progname, int query)
g_stack_trace (const gchar *progname,
int query)
{
if (!query || do_query ("print stack trace"))
debug (progname, STACK_TRACE);
@@ -114,7 +116,7 @@ do_query (char *prompt)
}
static void
debug (char *progname,
debug (const char *progname,
int method)
{
pid_t pid;
@@ -124,7 +126,7 @@ debug (char *progname,
sprintf (buf, "%d", (int) getpid ());
args[1] = progname;
args[1] = (gchar*) progname;
args[2] = buf;
switch (method)
@@ -256,3 +258,4 @@ stack_trace_sigchld (int signum)
{
stack_trace_done = 1;
}

View File

@@ -89,42 +89,98 @@
/* Provide definitions for some commonly used macros.
* These are only provided if they haven't already
* Some of them are only provided if they haven't already
* been defined. It is assumed that if they are already
* defined then the current definition is correct.
*/
#ifndef NULL
#define NULL ((void*) 0)
#endif
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
#ifndef TRUE
#define TRUE (!FALSE)
#endif
#ifndef NULL
#define NULL ((void*) 0)
#endif /* NULL */
#ifndef MAX
#undef MAX
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif /* MAX */
#ifndef MIN
#undef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif /* MIN */
#ifndef ABS
#undef ABS
#define ABS(a) (((a) < 0) ? -(a) : (a))
#endif /* ABS */
#ifndef CLAMP
#undef CLAMP
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
#endif /* CLAMP */
/* Provide simple macro statement wrappers (adapted from Pearl):
* G_STMT_START { statements; } G_STMT_END;
* can be used as a single statement, as in
* if (x) G_STMT_START { ... } G_STMT_END; else ...
*
* For gcc we will wrap the statements within `({' and `})' braces.
* For SunOS they will be wrapped within `if (1)' and `else (void) 0',
* and otherwise within `do' and `while (0)'.
*/
#if !(defined (G_STMT_START) && defined (G_STMT_END))
# if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
# define G_STMT_START (void)(
# define G_STMT_END )
# else
# if (defined (sun) || defined (__sun__))
# define G_STMT_START if (1)
# define G_STMT_END else (void)0
# else
# define G_STMT_START do
# define G_STMT_END while (0)
# endif
# endif
#endif
/* Provide macros to feature the GCC function attribute.
*/
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
__attribute__((format (printf, format_idx, arg_idx)))
#define G_GNUC_SCANF( format_idx, arg_idx ) \
__attribute__((format (scanf, format_idx, arg_idx)))
#define G_GNUC_FORMAT( arg_idx ) \
__attribute__((format_arg (arg_idx)))
#define G_GNUC_NORETURN \
__attribute__((noreturn))
#define G_GNUC_CONST \
__attribute__((const))
#else /* !__GNUC__ */
#define G_GNUC_PRINTF( format_idx, arg_idx )
#define G_GNUC_SCANF( format_idx, arg_idx )
#define G_GNUC_FORMAT( arg_idx )
#define G_GNUC_NORETURN
#define G_GNUC_CONST
#endif /* !__GNUC__ */
/* Wrap the __PRETTY_FUNCTION__ and __FUNCTION__ variables with macros,
* so we can refer to them as strings unconditionally.
*/
#ifdef __GNUC__
#define G_GNUC_FUNCTION (__FUNCTION__)
#define G_GNUC_PRETTY_FUNCTION (__PRETTY_FUNCTION__)
#else /* !__GNUC__ */
#define G_GNUC_FUNCTION ("")
#define G_GNUC_PRETTY_FUNCTION ("")
#endif /* !__GNUC__ */
#ifndef ATEXIT
# ifdef HAVE_ATEXIT
# define ATEXIT(proc) (atexit (proc))
# ifdef NeXT /* @#%@! NeXTStep */
# define ATEXIT(proc) (!atexit (proc))
# else
# define ATEXIT(proc) (atexit (proc))
# endif /* NeXT */
# elif defined (HAVE_ON_EXIT)
# define ATEXIT(proc) (on_exit ((void (*)(int, void *))(proc), NULL))
# endif
@@ -149,38 +205,22 @@
((type *) g_malloc0 ((unsigned) sizeof (type) * (count)))
#endif /* __DMALLOC_H__ */
#define g_chunk_new(type, chunk) \
((type *) g_mem_chunk_alloc (chunk))
#define g_mem_chunk_create(type, pre_alloc, alloc_type) ( \
g_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \
sizeof (type), \
sizeof (type) * (pre_alloc), \
(alloc_type)) \
)
#define g_chunk_new(type, chunk) ( \
(type *) g_mem_chunk_alloc (chunk) \
)
#define g_chunk_free(mem, mem_chunk) G_STMT_START { \
g_mem_chunk_free ((mem_chunk), (mem)); \
} G_STMT_END
#define g_string(x) #x
/* Provide simple macro statement wrappers (adapted from Pearl):
* G_STMT_START { statements; } G_STMT_END;
* can be used as a single statement, as in
* if (x) G_STMT_START { ... } G_STMT_END; else ...
*
* For gcc we will wrap the statements within `({' and `})' braces.
* For SunOS they will be wrapped within `if (1)' and `else (void)0',
* and otherwise within `do' and `while (0)'.
*/
#if !(defined (G_STMT_START) && defined (G_STMT_END))
# if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
# define G_STMT_START (void)(
# define G_STMT_END )
# else
# if (defined (sun) || defined (__sun__))
# define G_STMT_START if (1)
# define G_STMT_END else (void)0
# else
# define G_STMT_START do
# define G_STMT_END while (0)
# endif
# endif
#endif
/* Provide macros for error handling. The "assert" macros will
* exit on failure. The "return" macros will exit the current
* function. Two different definitions are given for the macros
@@ -285,8 +325,10 @@
#endif /* G_DISABLE_CHECKS */
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
/* Provide type definitions for commonly used types.
@@ -343,36 +385,66 @@ typedef signed long gint32;
typedef unsigned long guint32;
#endif /* SIZEOF_INT */
/* Define macros for storing integers inside pointers */
typedef struct _GList GList;
typedef struct _GSList GSList;
typedef struct _GHashTable GHashTable;
typedef struct _GCache GCache;
typedef struct _GTree GTree;
typedef struct _GTimer GTimer;
typedef struct _GMemChunk GMemChunk;
typedef struct _GListAllocator GListAllocator;
typedef struct _GStringChunk GStringChunk;
typedef struct _GString GString;
typedef struct _GArray GArray;
typedef struct _GDebugKey GDebugKey;
#if (SIZEOF_INT == SIZEOF_VOID_P)
typedef void (*GFunc) (gpointer data, gpointer user_data);
typedef void (*GHFunc) (gpointer key, gpointer value, gpointer user_data);
typedef guint (*GHashFunc) (gpointer key);
typedef gint (*GCompareFunc) (gpointer a, gpointer b);
typedef gpointer (*GCacheNewFunc) (gpointer key);
typedef gpointer (*GCacheDupFunc) (gpointer value);
typedef void (*GCacheDestroyFunc) (gpointer value);
typedef gint (*GTraverseFunc) (gpointer key,
gpointer value,
gpointer data);
typedef gint (*GSearchFunc) (gpointer key,
gpointer data);
typedef void (*GErrorFunc) (gchar *str);
typedef void (*GWarningFunc) (gchar *str);
typedef void (*GPrintFunc) (gchar *str);
#define GPOINTER_TO_INT(p) ((gint)(p))
#define GPOINTER_TO_UINT(p) ((guint)(p))
#define GINT_TO_POINTER(i) ((gpointer)(i))
#define GUINT_TO_POINTER(u) ((gpointer)(u))
#elif (SIZEOF_LONG == SIZEOF_VOID_P)
#define GPOINTER_TO_INT(p) ((gint)(glong)(p))
#define GPOINTER_TO_UINT(p) ((guint)(gulong)(p))
#define GINT_TO_POINTER(i) ((gpointer)(glong)(i))
#define GUINT_TO_POINTER(u) ((gpointer)(gulong)(u))
#else
#error "No integer type of the same size as a pointer"
#endif
typedef struct _GList GList;
typedef struct _GSList GSList;
typedef struct _GHashTable GHashTable;
typedef struct _GCache GCache;
typedef struct _GTree GTree;
typedef struct _GTimer GTimer;
typedef struct _GMemChunk GMemChunk;
typedef struct _GListAllocator GListAllocator;
typedef struct _GStringChunk GStringChunk;
typedef struct _GString GString;
typedef struct _GArray GArray;
typedef struct _GDebugKey GDebugKey;
typedef struct _GScannerConfig GScannerConfig;
typedef struct _GScanner GScanner;
typedef union _GValue GValue;
typedef void (*GFunc) (gpointer data,
gpointer user_data);
typedef void (*GHFunc) (gpointer key,
gpointer value,
gpointer user_data);
typedef guint (*GHashFunc) (gpointer key);
typedef gint (*GCompareFunc) (gpointer a,
gpointer b);
typedef gpointer (*GCacheNewFunc) (gpointer key);
typedef gpointer (*GCacheDupFunc) (gpointer value);
typedef void (*GCacheDestroyFunc) (gpointer value);
typedef gint (*GTraverseFunc) (gpointer key,
gpointer value,
gpointer data);
typedef gint (*GSearchFunc) (gpointer key,
gpointer data);
typedef void (*GErrorFunc) (gchar *str);
typedef void (*GWarningFunc) (gchar *str);
typedef void (*GPrintFunc) (gchar *str);
struct _GList
{
@@ -447,12 +519,18 @@ GList* g_list_nth (GList *list,
guint n);
GList* g_list_find (GList *list,
gpointer data);
gint g_list_position (GList *list,
GList *link);
gint g_list_index (GList *list,
gpointer data);
GList* g_list_last (GList *list);
GList* g_list_first (GList *list);
guint g_list_length (GList *list);
void g_list_foreach (GList *list,
GFunc func,
gpointer user_data);
gpointer g_list_nth_data (GList *list,
guint n);
#define g_list_previous(list) ((list) ? (((GList *)list)->prev) : NULL)
#define g_list_next(list) ((list) ? (((GList *)list)->next) : NULL)
@@ -484,11 +562,17 @@ GSList* g_slist_nth (GSList *list,
guint n);
GSList* g_slist_find (GSList *list,
gpointer data);
gint g_slist_position (GSList *list,
GSList *link);
gint g_slist_index (GSList *list,
gpointer data);
GSList* g_slist_last (GSList *list);
guint g_slist_length (GSList *list);
void g_slist_foreach (GSList *list,
GFunc func,
gpointer user_data);
gpointer g_slist_nth_data (GSList *list,
guint n);
#define g_slist_next(list) ((list) ? (((GSList *)list)->next) : NULL)
@@ -646,31 +730,35 @@ gdouble g_timer_elapsed (GTimer *timer,
/* Output
*/
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
void g_error (gchar *format, ...) __attribute__ ((format (printf, 1, 2)));
void g_warning (gchar *format, ...) __attribute__ ((format (printf, 1, 2)));
void g_message (gchar *format, ...) __attribute__ ((format (printf, 1, 2)));
void g_print (gchar *format, ...) __attribute__ ((format (printf, 1, 2)));
#else
void g_error (gchar *format, ...);
void g_warning (gchar *format, ...);
void g_message (gchar *format, ...);
void g_print (gchar *format, ...);
#endif
void g_error (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void g_warning (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void g_message (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void g_print (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
/* Utility functions
*/
gchar* g_strdup (const gchar *str);
gchar* g_strconcat (const gchar *string1, ...); /* NULL terminated */
gdouble g_strtod (const gchar *nptr, gchar **endptr);
gchar* g_strerror (gint errnum);
gchar* g_strsignal (gint signum);
gint g_strcasecmp (const gchar *s1, const gchar *s2);
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
gint g_snprintf (gchar *str, gulong n, gchar const *fmt, ...) __attribute__ ((format (printf, 3, 4)));
#else
gint g_snprintf (gchar *str, gulong n, gchar const *fmt, ...);
#endif
#define G_STR_DELIMITERS "_-|> <."
void g_strdelimit (gchar *string,
const gchar *delimiters,
gchar new_delimiter);
gchar* g_strdup (const gchar *str);
gchar* g_strconcat (const gchar *string1,
...); /* NULL terminated */
gdouble g_strtod (const gchar *nptr,
gchar **endptr);
gchar* g_strerror (gint errnum);
gchar* g_strsignal (gint signum);
gint g_strcasecmp (const gchar *s1,
const gchar *s2);
void g_strdown (gchar *string);
void g_strup (gchar *string);
guint g_parse_debug_string (const gchar *string,
GDebugKey *keys,
guint nkeys);
gint g_snprintf (gchar *string,
gulong n,
gchar const *format,
...) G_GNUC_PRINTF (3, 4);
/* We make the assumption that if memmove isn't available, then
* bcopy will do the job. This isn't safe everywhere. (bcopy can't
@@ -688,13 +776,11 @@ GWarningFunc g_set_warning_handler (GWarningFunc func);
GPrintFunc g_set_message_handler (GPrintFunc func);
GPrintFunc g_set_print_handler (GPrintFunc func);
guint g_parse_debug_string (const gchar *string,
GDebugKey *keys,
guint nkeys);
void g_debug (char *progname);
void g_attach_process (char *progname, int query);
void g_stack_trace (char *progname, int query);
void g_debug (const gchar *progname);
void g_attach_process (const gchar *progname,
gint query);
void g_stack_trace (const gchar *progname,
gint query);
/* String Chunks
@@ -702,53 +788,44 @@ void g_stack_trace (char *progname, int query);
GStringChunk* g_string_chunk_new (gint size);
void g_string_chunk_free (GStringChunk *chunk);
gchar* g_string_chunk_insert (GStringChunk *chunk,
gchar* string);
const gchar *string);
gchar* g_string_chunk_insert_const (GStringChunk *chunk,
gchar* string);
const gchar *string);
/* Strings
*/
GString* g_string_new (gchar *init);
void g_string_free (GString *string,
gint free_segment);
GString* g_string_assign (GString *lval,
gchar *rval);
GString* g_string_truncate (GString *string,
gint len);
GString* g_string_append (GString *string,
gchar *val);
GString* g_string_append_c (GString *string,
gchar c);
GString* g_string_prepend (GString *string,
gchar *val);
GString* g_string_prepend_c (GString *string,
gchar c);
GString* g_string_insert (GString *fstring,
gint pos,
gchar *val);
GString* g_string_insert_c (GString *fstring,
gint pos,
gchar c);
GString* g_string_erase (GString *fstring,
gint pos,
gint len);
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
void g_string_sprintf (GString *string,
gchar *fmt,
...) __attribute__ ((format (printf, 2, 3)));
void g_string_sprintfa (GString *string,
gchar *fmt,
...) __attribute__ ((format (printf, 2, 3)));
#else
void g_string_sprintf (GString *string,
gchar *fmt,
...);
void g_string_sprintfa (GString *string,
gchar *fmt,
...);
#endif
GString* g_string_new (const gchar *init);
void g_string_free (GString *string,
gint free_segment);
GString* g_string_assign (GString *lval,
const gchar *rval);
GString* g_string_truncate (GString *string,
gint len);
GString* g_string_append (GString *string,
const gchar *val);
GString* g_string_append_c (GString *string,
gchar c);
GString* g_string_prepend (GString *string,
const gchar *val);
GString* g_string_prepend_c (GString *string,
gchar c);
GString* g_string_insert (GString *string,
gint pos,
const gchar *val);
GString* g_string_insert_c (GString *string,
gint pos,
gchar c);
GString* g_string_erase (GString *string,
gint pos,
gint len);
GString* g_string_down (GString *string);
GString* g_string_up (GString *string);
void g_string_sprintf (GString *string,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
void g_string_sprintfa (GString *string,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
/* Resizable arrays
*/
@@ -792,7 +869,6 @@ guint g_direct_hash (gpointer key);
/* GScanner: Flexible lexical scanner for general purpose.
* Copyright (C) 1997 Tim Janik
*/
/* Character sets */
@@ -807,10 +883,6 @@ guint g_direct_hash (gpointer key);
"\361\362\363\364\365\366"\
"\370\371\372\373\374\375\376\377"
typedef union _GValue GValue;
typedef struct _GScannerConfig GScannerConfig;
typedef struct _GScanner GScanner;
/* Error types */
typedef enum
{

View File

@@ -35,9 +35,6 @@
#undef NO_SYS_ERRLIST
#undef NO_SYS_SIGLIST
/* #undef PACKAGE */
/* #undef VERSION */
/* The number of bytes in a char. */
#undef SIZEOF_CHAR

View File

@@ -33,7 +33,7 @@ static GRealListAllocator *current_allocator = NULL;
GListAllocator*
g_list_allocator_new ()
g_list_allocator_new (void)
{
GRealListAllocator* allocator = g_new (GRealListAllocator, 1);
@@ -80,7 +80,7 @@ g_list_set_allocator (GListAllocator* fallocator)
GList*
g_list_alloc ()
g_list_alloc (void)
{
GList *new_list;
@@ -300,6 +300,16 @@ g_list_nth (GList *list,
return list;
}
gpointer
g_list_nth_data (GList *list,
guint n)
{
while ((n-- > 0) && list)
list = list->next;
return list ? list->data : NULL;
}
GList*
g_list_find (GList *list,
gpointer data)
@@ -314,6 +324,42 @@ g_list_find (GList *list,
return list;
}
gint
g_list_position (GList *list,
GList *link)
{
gint i;
i = 0;
while (list)
{
if (list == link)
return i;
i++;
list = list->next;
}
return -1;
}
gint
g_list_index (GList *list,
gpointer data)
{
gint i;
i = 0;
while (list)
{
if (list->data == data)
return i;
i++;
list = list->next;
}
return -1;
}
GList*
g_list_last (GList *list)
{

180
glib/gmessages.c Normal file
View File

@@ -0,0 +1,180 @@
/* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "glib.h"
static GErrorFunc glib_error_func = NULL;
static GWarningFunc glib_warning_func = NULL;
static GPrintFunc glib_message_func = NULL;
static GPrintFunc glib_print_func = NULL;
extern char* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
void
g_error (const gchar *format, ...)
{
va_list args, args2;
char *buf;
static gboolean errored = 0;
if (errored++)
{
write (2, "g_error: recursed!\n", 19);
return;
}
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_error_func)
{
(* glib_error_func) (buf);
}
else
{
/* Use write() here because we might be out of memory */
write (2, "\n** ERROR **: ", 14);
write (2, buf, strlen(buf));
write (2, "\n", 1);
}
abort ();
}
void
g_warning (const gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_warning_func)
{
(* glib_warning_func) (buf);
}
else
{
fputs ("\n** WARNING **: ", stderr);
fputs (buf, stderr);
fputc ('\n', stderr);
}
}
void
g_message (const gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_message_func)
{
(* glib_message_func) (buf);
}
else
{
fputs ("message: ", stdout);
fputs (buf, stdout);
fputc ('\n', stdout);
}
}
void
g_print (const gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_print_func)
{
(* glib_print_func) (buf);
}
else
{
fputs (buf, stdout);
}
}
GErrorFunc
g_set_error_handler (GErrorFunc func)
{
GErrorFunc old_error_func;
old_error_func = glib_error_func;
glib_error_func = func;
return old_error_func;
}
GWarningFunc
g_set_warning_handler (GWarningFunc func)
{
GWarningFunc old_warning_func;
old_warning_func = glib_warning_func;
glib_warning_func = func;
return old_warning_func;
}
GPrintFunc
g_set_message_handler (GPrintFunc func)
{
GPrintFunc old_message_func;
old_message_func = glib_message_func;
glib_message_func = func;
return old_message_func;
}
GPrintFunc
g_set_print_handler (GPrintFunc func)
{
GPrintFunc old_print_func;
old_print_func = glib_print_func;
glib_print_func = func;
return old_print_func;
}

View File

@@ -57,7 +57,7 @@ g_slist_set_allocator (GListAllocator* fallocator)
GSList*
g_slist_alloc ()
g_slist_alloc (void)
{
GSList *new_list;
@@ -289,6 +289,16 @@ g_slist_nth (GSList *list,
return list;
}
gpointer
g_slist_nth_data (GSList *list,
guint n)
{
while ((n-- > 0) && list)
list = list->next;
return list ? list->data : NULL;
}
GSList*
g_slist_find (GSList *list,
gpointer data)
@@ -303,6 +313,42 @@ g_slist_find (GSList *list,
return list;
}
gint
g_slist_position (GSList *list,
GSList *link)
{
gint i;
i = 0;
while (list)
{
if (list == link)
return i;
i++;
list = list->next;
}
return -1;
}
gint
g_slist_index (GSList *list,
gpointer data)
{
gint i;
i = 0;
while (list)
{
if (list->data == data)
return i;
i++;
list = list->next;
}
return -1;
}
GSList*
g_slist_last (GSList *list)
{

View File

@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
typedef struct _GRealStringChunk GRealStringChunk;
@@ -101,6 +102,8 @@ g_string_chunk_free (GStringChunk *fchunk)
GRealStringChunk *chunk = (GRealStringChunk*) fchunk;
GSList *tmp_list;
g_return_if_fail (chunk != NULL);
if (chunk->storage_list)
{
GListAllocator *tmp_allocator = g_slist_set_allocator (NULL);
@@ -121,12 +124,14 @@ g_string_chunk_free (GStringChunk *fchunk)
gchar*
g_string_chunk_insert (GStringChunk *fchunk,
gchar* string)
const gchar *string)
{
GRealStringChunk *chunk = (GRealStringChunk*) fchunk;
gint len = strlen (string);
char* pos;
g_return_val_if_fail (chunk != NULL, NULL);
if ((chunk->storage_next + len + 1) > chunk->this_size)
{
GListAllocator *tmp_allocator = g_slist_set_allocator (NULL);
@@ -155,15 +160,17 @@ g_string_chunk_insert (GStringChunk *fchunk,
gchar*
g_string_chunk_insert_const (GStringChunk *fchunk,
gchar* string)
const gchar *string)
{
GRealStringChunk *chunk = (GRealStringChunk*) fchunk;
char* lookup;
gchar* lookup;
g_return_val_if_fail (chunk != NULL, NULL);
if (!chunk->const_table)
chunk->const_table = g_hash_table_new (g_str_hash, g_str_equal);
lookup = (char*) g_hash_table_lookup (chunk->const_table, string);
lookup = (gchar*) g_hash_table_lookup (chunk->const_table, (gchar*) string);
if (!lookup)
{
@@ -198,7 +205,7 @@ g_string_maybe_expand (GRealString* string, gint len)
}
GString*
g_string_new (gchar *init)
g_string_new (const gchar *init)
{
GRealString *string;
@@ -220,8 +227,11 @@ g_string_new (gchar *init)
}
void
g_string_free (GString *string, gint free_segment)
g_string_free (GString *string,
gint free_segment)
{
g_return_if_fail (string != NULL);
if (free_segment)
g_free (string->str);
@@ -230,7 +240,7 @@ g_string_free (GString *string, gint free_segment)
GString*
g_string_assign (GString *lval,
char *rval)
const gchar *rval)
{
g_string_truncate (lval, 0);
g_string_append (lval, rval);
@@ -239,10 +249,13 @@ g_string_assign (GString *lval,
}
GString*
g_string_truncate (GString* fstring, gint len)
g_string_truncate (GString* fstring,
gint len)
{
GRealString *string = (GRealString*)fstring;
g_return_val_if_fail (string != NULL, NULL);
string->len = len;
string->str[len] = 0;
@@ -251,11 +264,16 @@ g_string_truncate (GString* fstring, gint len)
}
GString*
g_string_append (GString *fstring, gchar *val)
g_string_append (GString *fstring,
const gchar *val)
{
GRealString *string = (GRealString*)fstring;
int len = strlen (val);
int len;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (val != NULL, fstring);
len = strlen (val);
g_string_maybe_expand (string, len);
strcpy (string->str + string->len, val);
@@ -266,10 +284,12 @@ g_string_append (GString *fstring, gchar *val)
}
GString*
g_string_append_c (GString *fstring, char c)
g_string_append_c (GString *fstring,
gchar c)
{
GRealString *string = (GRealString*)fstring;
g_return_val_if_fail (string != NULL, NULL);
g_string_maybe_expand (string, 1);
string->str[string->len++] = c;
@@ -279,11 +299,16 @@ g_string_append_c (GString *fstring, char c)
}
GString*
g_string_prepend (GString *fstring, gchar *val)
g_string_prepend (GString *fstring,
const gchar *val)
{
GRealString *string = (GRealString*)fstring;
gint len = strlen (val);
gint len;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (val != NULL, fstring);
len = strlen (val);
g_string_maybe_expand (string, len);
g_memmove (string->str + len, string->str, string->len);
@@ -298,10 +323,12 @@ g_string_prepend (GString *fstring, gchar *val)
}
GString*
g_string_prepend_c (GString *fstring, char c)
g_string_prepend_c (GString *fstring,
gchar c)
{
GRealString *string = (GRealString*)fstring;
g_return_val_if_fail (string != NULL, NULL);
g_string_maybe_expand (string, 1);
g_memmove (string->str + 1, string->str, string->len);
@@ -315,14 +342,20 @@ g_string_prepend_c (GString *fstring, char c)
return fstring;
}
GString *
g_string_insert (GString *fstring, gint pos, gchar *val)
GString*
g_string_insert (GString *fstring,
gint pos,
const gchar *val)
{
GRealString *string = (GRealString*)fstring;
gint len = strlen (val);
gint len;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (val != NULL, fstring);
g_return_val_if_fail (pos >= 0, fstring);
g_return_val_if_fail (pos <= string->len, fstring);
len = strlen (val);
g_string_maybe_expand (string, len);
g_memmove (string->str + pos + len, string->str + pos, string->len - pos);
@@ -337,10 +370,13 @@ g_string_insert (GString *fstring, gint pos, gchar *val)
}
GString *
g_string_insert_c (GString *fstring, gint pos, gchar c)
g_string_insert_c (GString *fstring,
gint pos,
gchar c)
{
GRealString *string = (GRealString*)fstring;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (pos <= string->len, fstring);
g_string_maybe_expand (string, 1);
@@ -356,15 +392,21 @@ g_string_insert_c (GString *fstring, gint pos, gchar c)
return fstring;
}
GString *
g_string_erase (GString *fstring, gint pos, gint len)
GString*
g_string_erase (GString *fstring,
gint pos,
gint len)
{
GRealString *string = (GRealString*)fstring;
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (len >= 0, fstring);
g_return_val_if_fail (pos >= 0, fstring);
g_return_val_if_fail (pos <= string->len, fstring);
g_return_val_if_fail (pos + len <= string->len, fstring);
g_memmove (string->str + pos, string->str + pos + len, string->len - (pos + len));
if (pos + len < string->len)
g_memmove (string->str + pos, string->str + pos + len, string->len - (pos + len));
string->len -= len;
@@ -373,6 +415,44 @@ g_string_erase (GString *fstring, gint pos, gint len)
return fstring;
}
GString*
g_string_down (GString *fstring)
{
GRealString *string = (GRealString*)fstring;
gchar *s;
g_return_val_if_fail (string != NULL, NULL);
s = string->str;
while (*s)
{
*s = tolower (*s);
s++;
}
return fstring;
}
GString*
g_string_up (GString *fstring)
{
GRealString *string = (GRealString*)fstring;
gchar *s;
g_return_val_if_fail (string != NULL, NULL);
s = string->str;
while (*s)
{
*s = toupper (*s);
s++;
}
return fstring;
}
static int
get_length_upper_bound (const gchar* fmt, va_list *args)
{
@@ -512,7 +592,7 @@ g_vsprintf (const gchar *fmt,
static void
g_string_sprintfa_int (GString *string,
gchar *fmt,
const gchar *fmt,
va_list *args,
va_list *args2)
{
@@ -520,7 +600,9 @@ g_string_sprintfa_int (GString *string,
}
void
g_string_sprintf (GString *string, gchar *fmt, ...)
g_string_sprintf (GString *string,
const gchar *fmt,
...)
{
va_list args, args2;
@@ -536,7 +618,9 @@ g_string_sprintf (GString *string, gchar *fmt, ...)
}
void
g_string_sprintfa (GString *string, gchar *fmt, ...)
g_string_sprintfa (GString *string,
const gchar *fmt,
...)
{
va_list args, args2;

View File

@@ -32,7 +32,7 @@ struct _GRealTimer
GTimer*
g_timer_new ()
g_timer_new (void)
{
GRealTimer *timer;

View File

@@ -24,12 +24,6 @@
#include <ctype.h> /* For tolower() */
#include "glib.h"
static GErrorFunc glib_error_func = NULL;
static GWarningFunc glib_warning_func = NULL;
static GPrintFunc glib_message_func = NULL;
static GPrintFunc glib_print_func = NULL;
extern char* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
gchar*
@@ -577,85 +571,85 @@ g_strsignal (gint signum)
case SIGQUIT: return "Quit";
#endif
#ifdef SIGILL
case SIGILL: "Illegal instruction";
case SIGILL: return "Illegal instruction";
#endif
#ifdef SIGTRAP
case SIGTRAP: "Trace/breakpoint trap";
case SIGTRAP: return "Trace/breakpoint trap";
#endif
#ifdef SIGABRT
case SIGABRT: "IOT trap/Abort";
case SIGABRT: return "IOT trap/Abort";
#endif
#ifdef SIGBUS
case SIGBUS: "Bus error";
case SIGBUS: return "Bus error";
#endif
#ifdef SIGFPE
case SIGFPE: "Floating point exception";
case SIGFPE: return "Floating point exception";
#endif
#ifdef SIGKILL
case SIGKILL: "Killed";
case SIGKILL: return "Killed";
#endif
#ifdef SIGUSR1
case SIGUSR1: "User defined signal 1";
case SIGUSR1: return "User defined signal 1";
#endif
#ifdef SIGSEGV
case SIGSEGV: "Segmentation fault";
case SIGSEGV: return "Segmentation fault";
#endif
#ifdef SIGUSR2
case SIGUSR2: "User defined signal 2";
case SIGUSR2: return "User defined signal 2";
#endif
#ifdef SIGPIPE
case SIGPIPE: "Broken pipe";
case SIGPIPE: return "Broken pipe";
#endif
#ifdef SIGALRM
case SIGALRM: "Alarm clock";
case SIGALRM: return "Alarm clock";
#endif
#ifdef SIGTERM
case SIGTERM: "Terminated";
case SIGTERM: return "Terminated";
#endif
#ifdef SIGSTKFLT
case SIGSTKFLT: "Stack fault";
case SIGSTKFLT: return "Stack fault";
#endif
#ifdef SIGCHLD
case SIGCHLD: "Child exited";
case SIGCHLD: return "Child exited";
#endif
#ifdef SIGCONT
case SIGCONT: "Continued";
case SIGCONT: return "Continued";
#endif
#ifdef SIGSTOP
case SIGSTOP: "Stopped (signal)";
case SIGSTOP: return "Stopped (signal)";
#endif
#ifdef SIGTSTP
case SIGTSTP: "Stopped";
case SIGTSTP: return "Stopped";
#endif
#ifdef SIGTTIN
case SIGTTIN: "Stopped (tty input)";
case SIGTTIN: return "Stopped (tty input)";
#endif
#ifdef SIGTTOU
case SIGTTOU: "Stopped (tty output)";
case SIGTTOU: return "Stopped (tty output)";
#endif
#ifdef SIGURG
case SIGURG: "Urgent condition";
case SIGURG: return "Urgent condition";
#endif
#ifdef SIGXCPU
case SIGXCPU: "CPU time limit exceeded";
case SIGXCPU: return "CPU time limit exceeded";
#endif
#ifdef SIGXFSZ
case SIGXFSZ: "File size limit exceeded";
case SIGXFSZ: return "File size limit exceeded";
#endif
#ifdef SIGVTALRM
case SIGVTALRM: "Virtual time alarm";
case SIGVTALRM: return "Virtual time alarm";
#endif
#ifdef SIGPROF
case SIGPROF: "Profile signal";
case SIGPROF: return "Profile signal";
#endif
#ifdef SIGWINCH
case SIGWINCH: "Window size changed";
case SIGWINCH: return "Window size changed";
#endif
#ifdef SIGIO
case SIGIO: "Possible I/O";
case SIGIO: return "Possible I/O";
#endif
#ifdef SIGPWR
case SIGPWR: "Power failure";
case SIGPWR: return "Power failure";
#endif
#ifdef SIGUNUSED
case SIGUNUSED: return "Unused signal";
@@ -670,146 +664,6 @@ g_strsignal (gint signum)
return msg;
}
void
g_error (gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_error_func)
{
(* glib_error_func) (buf);
}
else
{
fputs ("\n** ERROR **: ", stderr);
fputs (buf, stderr);
fputc ('\n', stderr);
}
abort ();
}
void
g_warning (gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_warning_func)
{
(* glib_warning_func) (buf);
}
else
{
fputs ("\n** WARNING **: ", stderr);
fputs (buf, stderr);
fputc ('\n', stderr);
}
}
void
g_message (gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_message_func)
{
(* glib_message_func) (buf);
}
else
{
fputs ("message: ", stdout);
fputs (buf, stdout);
fputc ('\n', stdout);
}
}
void
g_print (gchar *format, ...)
{
va_list args, args2;
char *buf;
va_start (args, format);
va_start (args2, format);
buf = g_vsprintf (format, &args, &args2);
va_end (args);
va_end (args2);
if (glib_print_func)
{
(* glib_print_func) (buf);
}
else
{
fputs (buf, stdout);
}
}
GErrorFunc
g_set_error_handler (GErrorFunc func)
{
GErrorFunc old_error_func;
old_error_func = glib_error_func;
glib_error_func = func;
return old_error_func;
}
GWarningFunc
g_set_warning_handler (GWarningFunc func)
{
GWarningFunc old_warning_func;
old_warning_func = glib_warning_func;
glib_warning_func = func;
return old_warning_func;
}
GPrintFunc
g_set_message_handler (GPrintFunc func)
{
GPrintFunc old_message_func;
old_message_func = glib_message_func;
glib_message_func = func;
return old_message_func;
}
GPrintFunc
g_set_print_handler (GPrintFunc func)
{
GPrintFunc old_print_func;
old_print_func = glib_print_func;
glib_print_func = func;
return old_print_func;
}
gint
g_snprintf (gchar *str,
gulong n,
@@ -845,25 +699,82 @@ g_snprintf (gchar *str,
#endif
}
void
g_strdown (gchar *string)
{
register gchar *s;
g_return_if_fail (string != NULL);
s = string;
while (*s)
{
*s = tolower (*s);
s++;
}
}
void
g_strup (gchar *string)
{
register gchar *s;
g_return_if_fail (string != NULL);
s = string;
while (*s)
{
*s = toupper (*s);
s++;
}
}
gint
g_strcasecmp (const gchar *s1, const gchar *s2)
g_strcasecmp (const gchar *s1,
const gchar *s2)
{
#ifdef HAVE_STRCASECMP
return strcasecmp(s1, s2);
return strcasecmp (s1, s2);
#else
gint c1, c2;
while (*s1 && *s2)
{
c1 = tolower((guchar)(*s1++)); c2 = tolower((guchar)(*s2++));
/* According to A. Cox, some platforms have islower's that
* don't work right on non-uppercase
*/
c1 = isupper ((guchar)*s1) ? tolower ((guchar)*s1) : *s1;
c2 = isupper ((guchar)*s2) ? tolower ((guchar)*s2) : *s2;
if (c1 != c2)
return (c1 - c2);
s1++; s2++;
}
return (((gint)(guchar) *s1) - ((gint)(guchar) *s2));
#endif
}
void
g_strdelimit (gchar *string,
const gchar *delimiters,
gchar new_delim)
{
register gchar *c;
g_return_if_fail (string != NULL);
if (!delimiters)
delimiters = G_STR_DELIMITERS;
for (c = string; *c; c++)
{
if (strchr (delimiters, *c))
*c = new_delim;
}
}
guint
g_parse_debug_string (const gchar *string,
GDebugKey *keys,

View File

@@ -1,15 +1,27 @@
#! /bin/sh
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
@@ -29,7 +41,7 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"

View File

@@ -32,23 +32,43 @@ if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
echo=echo
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
# The Solaris and AIX default echo program unquotes backslashes.
# This makes it impossible to quote backslashes using
# The Solaris, AIX, and Digital Unix default echo programs unquote
# backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
# So, we emulate echo with printf '%s\n'
echo="printf %s\\n"
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
# Oops. We have no working printf. Try to find a not-so-buggy echo.
echo=echo
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH /usr/ucb; do
if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
echo="$dir/echo"
break
#
# So, first we look for a working echo in the user's PATH.
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH /usr/ucb; do
if test -f $dir/echo && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t'; then
echo="$dir/echo"
break
fi
done
IFS="$save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
# This shell has a builtin print -r that does the trick.
echo='print -r'
#
# The following is from libtool-1.2a, won't work with this patched
# libtool-1.2
#
# elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
# # If we have ksh, try running ltconfig again with it.
# CONFIG_SHELL=/bin/ksh
# export CONFIG_SHELL
# exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
else
# Try using printf.
echo='printf %s\n'
if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
else
# Oops. We lost completely, so just stick with echo.
echo=echo
fi
done
IFS="$save_ifs"
fi
fi
fi
@@ -66,7 +86,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
VERSION=1.1
VERSION=1.2
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
rm="rm -f"
@@ -421,7 +441,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
# Now see if the compiler is really GCC.
with_gcc=no
echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
echo "$progname:424: checking whether we are using GNU C" >&5
echo "$progname:444: checking whether we are using GNU C" >&5
$rm conftest.c
cat > conftest.c <<EOF
@@ -429,7 +449,7 @@ if test "$with_gcc" != yes || test -z "$CC"; then
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
with_gcc=yes
fi
$rm conftest.c
@@ -541,17 +561,18 @@ if test -n "$pic_flag"; then
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
$rm conftest*
echo > conftest.c
echo "int some_variable = 0;" > conftest.c
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pic_flag -DPIC"
echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
# Append any errors to the config.log.
echo "$progname:567: checking if $compiler PIC flag $pic_flag works" >&5
if { (eval echo $progname:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
# Append any warnings to the config.log.
cat conftest.err 1>&5
# On HP-UX, the stripped-down bundled CC does not accept +Z, but also
# reports no error. So, we need to grep stderr for (Bundled).
if grep '(Bundled)' conftest.err >/dev/null; then
# On HP-UX, both CC and GCC only warn that PIC is supported... then they
# create non-PIC objects. So, if there were any warnings, we assume that
# PIC is not supported.
if test -s conftest.err; then
echo "$ac_t"no 1>&6
can_build_shared=no
pic_flag=
@@ -587,8 +608,8 @@ $rm conftest*
echo 'main(){return(0);}' > conftest.c
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $link_static_flag"
echo "$progname:590: checking if $compiler static flag $link_static_flag works" >&5
if { (eval echo $progname:591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$progname:611: checking if $compiler static flag $link_static_flag works" >&5
if { (eval echo $progname:612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
echo "$ac_t$link_static_flag" 1>&6
else
echo "$ac_t"none 1>&6
@@ -620,7 +641,7 @@ if test -z "$LD"; then
if test "$with_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
echo "$progname:623: checking for ld used by GCC" >&5
echo "$progname:644: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -638,10 +659,10 @@ if test -z "$LD"; then
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld... $ac_c" 1>&6
echo "$progname:641: checking for GNU ld" >&5
echo "$progname:662: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
echo "$progname:644: checking for non-GNU ld" >&5
echo "$progname:665: checking for non-GNU ld" >&5
fi
if test -z "$LD"; then
@@ -715,7 +736,14 @@ if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
# See if GNU ld supports shared libraries.
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
case "$host_os" in
linux-gnu*)
archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs $deplibs'
;;
*)
archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
;;
esac
runpath_var=LD_RUN_PATH
ld_shlibs=yes
else
@@ -967,11 +995,11 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
echo "$progname:970: checking if global_symbol_pipe works" >&5
if { (eval echo $progname:971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
echo "$progname:998: checking if global_symbol_pipe works" >&5
if { (eval echo $progname:999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
# Now try to grab the symbols.
nlist=conftest.nm
if { echo "$progname:974: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
if { echo "$progname:1002: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -1029,7 +1057,7 @@ EOF
save_CFLAGS="$CFLAGS"
LIBS='conftestm.o'
CFLAGS="$CFLAGS$no_builtin_flag"
if { (eval echo $progname:1032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo $progname:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5

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