Commit Graph

77 Commits

Author SHA1 Message Date
Owen Taylor
b295f552ee Add back the monitoring of the selection when the combo isn't popped down;
Wed Dec  4 12:44:50 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcombo.c (gtk_combo_selection_changed): Add
        back the monitoring of the selection when the combo
        isn't popped down; apparently people depended upon
        the side-effect where gtk_combo_set_popdown_strings()
        would wipe out the contents of the list when browse-mode
        autoselected the first item in the list. (#100347)
2002-12-04 18:07:08 +00:00
Manish Singh
bc035915e9 add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh  <yosh@gimp.org>

	* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
	top of gtktypebuiltins.c.

	* gtk/gtkclist.c
	* gtk/gtkcombo.c
	* gtk/gtkctree.c
	* gtk/gtklist.c
	* gtk/gtklistitem.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpixmap.c
	* gtk/gtkpreview.c
	* gtk/gtksignal.c
	* gtk/gtktext.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c
	* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
	and compat code.

	* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
	to set_color_internal, and use that. The deprecated function now
	merely wraps it.

	* gtk/gtkfontsel.c: same as above, except with
	gtk_font_selection_get_font.

	* gtk/gtknotebook.c: same as above, except with
	gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
	hborder,vborder}.

	* gtk/gtkprogressbar.c: same as above, except with
	gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
	activity_blocks}.

	* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.

	* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.

	* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
	GtkMenuFactory stuff if GTK_COMPILATION, since they are used
	internally by the compat code.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
	use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
	now).

	* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.

	* gtk/gtkobject.c: replaced various deprecated functions. In set and
	get_property, use g_object_{set,get}_data with "user_data" instead
	of gtk_object_{set,get}_user_data.

	* gtk/gtkprogress.h: API declared if GTK_COMPILATION

	* gtk/gtkprogress.c: port get_type to GObject API.

	* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
	if GTK_COMPILATION.

	* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
	gtk_widget_queue_draw instead of the other way around.

	* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED

	* tests/testgtk.c
	* tests/testselection.c
	* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
	deprecated stuff.
2002-11-20 01:07:33 +00:00
Owen Taylor
a03f567e2f Change so that updates of selection don't take effect immediately, but
Wed Nov 13 17:03:19 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcombo.c: Change so that updates of selection
        don't take effect immediately, but only when popdown
        is closed with a button release within the combo
        or Return/Enter.

        * gtk/gtkcombo.c: Support Alt-Down to pop down the
        combo, Alt-Up to pop it back up, Space to immediately
        select current item.

        * gtk/gtkcombo.c (gtk_combo_entry_key_press): Don't
        move the focus when we get to the ends of the list
        entries.

        * gtk/gtkcombo.c: Fix handling of state in ad-hoc
        keybinding handling to be a bit more reasonable.

        * gtk/gtkcombo.c (gtk_combo_popup_list): Clear
        last_focus_child when no item is selected so we
        don't start focusing from some random place.

        * gtk/gtkcombo.c (gtk_combo_init): Make
        gtk_combo_set_use_arrows_always, enable_arrows_always
        properties have no effect, they were an awful idea.
        Always behave as if enable_arrows_always is true.

        * gtk/gtknotebook.c: Fix a warning.
2002-11-14 04:46:20 +00:00
Owen Taylor
712644fefb Fix warning.
Wed Nov 13 15:52:53 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcombo.c (gtk_combo_activate): Fix warning.

        * gtk/gtkcombo.c: Fix code that was meant to delay
        grabbing events on the list until we had an enter-notify.
        (#54353, reported by Mike Fulbright, others)
2002-11-13 21:47:11 +00:00
Owen Taylor
e76d752e9a ue Nov 12 17:10:10 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcombo.c: Fix up grabs to be robust; grab
        the keyboard as well as the pointer so we won't
        leave the window behind if the user switches desktops
        with a keyboard combination. (Based on a patch
        from Matthias Clasen, #82525)
2002-11-13 16:25:58 +00:00
Owen Taylor
accc3a3365 Add startup notification hooks - mostly based on patch by Havoc Pennington
Sat Nov  2 00:22:33 2002  Owen Taylor  <otaylor@redhat.com>

        Add startup notification hooks - mostly based on patch
        by Havoc Pennington in #96772.

        * gdk/gdk.h gdk/x11/gdkdisplay-x11.c
        gdk/{win32,linux-fb}/gdkmain-*.c: (gdk_notify_startup_complete):
        new function that indicates an application has finished starting
        up.

        * gdk/x11/gdkmain-x11.c gdk/x11/gdkdisplay-x11.c
        (_gdk_windowing_set_default_display): store value of
        DESKTOP_STARTUP_ID on the default screen, and clear it from the
        environment.

        * gdk/x11/gdkdisplay-x11.c:
        Set _NET_STARTUP_ID hint on display's group leader window.

        * gtk/gtkwindow.c (gtk_window_set_auto_startup_notification):
        function to toggle whether we automatically broadcast that we've
        started up, after mapping the first toplevel window.
        (gtk_window_map): call gdk_screen_notify_startup_complete() by
        default, unless enabled by above.

        * gtk/gtkmain.c gtk/gtkcombo.c gtk/gtktoolbar.c:
        Couple of warning fixes.
2002-11-02 05:37:04 +00:00
Owen Taylor
3d4c27d06a When popping up the list without any selected items, hack the focus on the
Tue Oct 22 20:02:22 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcombo.c: When popping up the list without
        any selected items, hack the focus on the list to
        avoid triggering a bug in GtkList when clicking
        on focused-but-not-selected items (#86700,
        Zimler Attila, Matthias Clasen) and to keep
        GtkWindow from selecting the first item.

        * tests/testgtk.c (create_list): Make the initial
        setting of the selection mode correspond to the option
        menu.
2002-10-23 00:45:18 +00:00
Manish Singh
c77265d3a7 Deprecation cleanup
Sun Oct 13 12:29:15 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
        gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
        Deprecation cleanup

        * gtk/gtkcolorseldialog.c: make window not resizable (lost
        accidently in the previous cleanup)
2002-10-13 19:34:42 +00:00
Owen Taylor
4dad7105e6 Privately export _gtk_scrolled_window_get_scrollbar_spacing().
Thu Oct 10 14:35:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkscrolledwindow.[ch]: Privately export
        _gtk_scrolled_window_get_scrollbar_spacing().

        * gtk/gtkcombo.c: Properly account from scrollbar
        spacing when computing the size of the popup window.
        (#84955, Marco Pesenti Gritti)
2002-10-10 18:46:10 +00:00
Owen Taylor
ef33adff83 Add a 'type' parameter, make public.
Thu Oct  3 14:13:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkevents.c (gdk_event_new): Add a 'type'
        parameter, make public.

        * gdk/gdkevents.c (gdk_event_copy): Copy the screen.

        * gdk/gdkevents.c gdk/linux-fb/gdkmain-fb.c
        gdk/x11/gdkevents-x11.c gdk/win32/gdkevents-win32.c:
        _gdk_event_new() => gdk_event_new().

        * gdk/win32/gdkevents-win32.c (real_window_procedure):
        Fix event_private->screen breakage that results from evil
        encapsulation breakage here.

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcontainer.c
        gtk/gtkdialog.c gtk/gtkdnd.c gtk/gtkdrawingarea.c
        gtk/gtkimcontextsimple.c gtk/gtklist.c gtk/gtkmenu.c
        gtk/gtknotebook.c gtk/gtkplug.c gtk/gtkselection.c
        gtk/gtktext.c gtk/gtktreeitem.c gtk/gtktreeview.c
        gtk/gtkviewport.c gtk/gtkwindow-decorate.c gtk/gtkwindow.c
        tests/testgtk.c: Remove most usage of stack-allocated
        GdkEvent structures.

        * gtk/gtktreeview.c: Use a cut-and-paste of the full
        send_focus_event() from gtkwindow.c that does the necessary
        notification of the ::has-focus property and setting of
        the HAS_FOCUS flag.x

        * gtk/gtkdnd.c: Clean up some mess/duplicated code; removing
        an extraneous use of a GdkEvent.
2002-10-03 20:53:30 +00:00
Owen Taylor
621fb7466a Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
Tue Jun 18 14:41:48 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
        gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
        gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
        (#85671)

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
        gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
        gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
        gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
        Adapt to above change.
2002-06-18 20:59:44 +00:00
Owen Taylor
44859f939c Try adding a #ifndef/#define for XkbKeySymEntry to make up for OSF broken
Tue May 14 15:09:33 2002  Owen Taylor  <otaylor@redhat.com>

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

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

        * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
        combo being destroyed before idle fires.
        (#81396, Timo Sirainen)
2002-05-14 19:15:46 +00:00
Alex Larsson
4632fb81c7 Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002  Owen Taylor  <otaylor@redhat.com>

	Integrate Erwann Chenede's multihead changes for the gtk/ directory.

	* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
	make internals multihead aware.

	* gtk/gtkcolorsel.[ch]: Add
	gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
	make up for non-multihead safety of
	gtk_color_selection_set_change_palette_hook()

	* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
	gtk_{invisible,menu,window}_set_screen(); add "screen" properties
	for GtkWindow and GtkMenu.

	* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
	gtk_plug_new_for_display(). Multihead fixes.

	* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
	make internals multihead aware.

	* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
	rid of now-useless gtk_settings_constructor().

	* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
	check/radio button indicators bitmap handling to be multihead
	safe.

	* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
	gtk_widget_get_display(), gtk_widget_get_clipboard(),
	gtk_widget_get_root_window().

	* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
	gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
	gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
	gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
	gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
	gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
	gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
	gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
	misc mechanical multihead-safety fixes.

	* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
	the dropper, look up the color palette only at realization time,
	other multihead fixes.

	* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
	unrealizing.

	* gtk/gtkentry.c: Only claim ownership of the primary selection
	when realized, misc multihead fixes.

	* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
	fix gtk_font_selection_get_font() for multihead.

	* gtk/gtkgc.c: make the depth => drawable hash per-screen.

	* gtk/gtkinvisible.c: Add a constructor that realizes the
	widget, so we get a realized widget with g_object_new() as
	well gtk_invisible_new() as before.

	* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
	variables.

	* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
	are used on the wrong screen.

	* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
	read properties and connect to settings when the screen is changed,
	rather than on init/finalize.

	* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
	default icon pixmaps/mask are only shared between windows on the
	same screen. Misc multihead fixes.

Sat Apr 27 13:49:53 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
	Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.

2002-04-29  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
	Fix silly bug, noticed by Sven Neumann.

Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
jacob berkman
fbd96f31d4 fix infinite loop when gtk_combo_func() returns NULL (bug #75464)
2002-03-19  jacob berkman  <jacob@ximian.com>

	* gtk/gtkcombo.c (gtk_combo_find): fix infinite loop when
	gtk_combo_func() returns NULL (bug #75464)
2002-03-19 17:59:13 +00:00
Owen Taylor
e6f466c12e Register all stock icons "unscaled" so that we don't have icons only
Wed Feb 27 12:34:21 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkiconfactory.c: Register all stock icons
	"unscaled" so that we don't have icons only available
	at some sizes. (#68896)

Wed Feb 27 11:59:05 2002  Owen Taylor  <otaylor@redhat.com>

	Some ASCII vs. locale fixes from Darin Adler (#55837)

	* gtk/gtkcombo.c (gtk_combo_find): Implement real
	case-insensitive comparison using g_utf8_casefold().

	* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
	assignment of gunichar to char by replacing g_unichar_totitle
	with g_ascii_toupper ... the contents would only be ascii
	here anyways.

	* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale)
	* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts):
	Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
2002-02-27 17:35:58 +00:00
Owen Taylor
a90baa8332 Call gtk_combo_set_popdown_strings() in case the combo is up currently.
Tue Feb 26 19:45:29 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_set_popdown_strings):
	Call gtk_combo_set_popdown_strings() in case
	the combo is up currently. (#63535, Skip Montaro)
2002-02-27 00:47:11 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Owen Taylor
211c469646 Fix problems with stuck grab (#60132, reported by Nicolas Setton) and
Mon Feb 18 14:40:22 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_popdown_list): Fix problems
	with stuck grab (#60132, reported by Nicolas Setton) and
	stuck prelighting. Combine duplicated code in three
	places for popping down the list.
2002-02-18 20:03:34 +00:00
Matthias Clasen
e2b730ac43 General property notification cleanup. 2002-01-28 18:52:49 +00:00
Owen Taylor
d2b64a0b83 Sanitize move/resize code, removing various bad, non-functional hacks.
Fri Nov 30 16:37:01 2001  Owen Taylor  <otaylor@redhat.com>
	* gtk/gtkcombo.c (gtk_combo_popup_list): Sanitize
	move/resize code, removing various bad, non-functional
	hacks. (Fixes #65048, reported by Damon Chaplin.)
2001-11-30 21:51:46 +00:00
Owen Taylor
1123956779 Offset invalidated range correctly. Fix scrolling of title window.
Fri Nov 23 18:36:42 2001  Owen Taylor  <otaylor@redhat.com>
	* gtk/gtkrange.c (gtk_range_button_press): Offset
	invalidated range correctly.
	* gtk/gtkclist.c (hadjustment_value_changed): Fix scrolling
	of title window. (#65001, reported by Damon Chaplin)
	* gtk/gtkcombo.c (gtk_combo_button_event_after): Replace
	horrible hack with use of ::event_after.
2001-11-23 23:42:30 +00:00
Owen Taylor
4e32ede287 Remove G_DISABLE_CONST_RETURNS.
Tue Oct 23 11:53:00 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am (INCLUDES): Remove G_DISABLE_CONST_RETURNS.

	* gtk/gtkfontsel.[ch]: Make gtk_font_selection_get_font()
	G_CONST_RETURN. (Murray Cumming)

	* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_preview_text):
	Make G_CONST_RETURN.

	* gtk/gtkfilesel.c (open_user_dir): Fix bug with freeing
	results of g_get_home_dir().

	* gtk/gtkfilesel.c: Make filesel->fileop_file a duplicated
	copy. Storing the return from gtk_entry_get_text() is evil.

	* gtk/gtkcombo.c gtk/gtkcellrenderertext.c gtk/gtkbindings.c
	gtk/gtkfilesel.c gtk/gtkfontsel.c gtk/gtkimmodule.c
	gtk/gtkobject.c gtk/gtkoldeditable.c gtk/gtktreedatalist.c
	gtk/gtksignal.c: Add const.

	* gdk/x11/gdkkeys-x11.c (get_direction): Add missing const.

	* gtk/gtktreeview.c: Namespace object data keys to be safe, even
	if we are setting them on private widgets.

	* gtk/gtktreeview.c (gtk_tree_view_real_start_interactive_search):
	Duplicate entry->text before setting it as object data.
2001-10-23 16:02:23 +00:00
Michael Meeks
0093f90c65 add enable_empty and value_in_list properties.
2001-10-10  Michael Meeks  <michael@ximian.com>

	* gtk/gtkcombo.c (gtk_combo_class_init): add enable_empty
	and value_in_list properties.
	(gtk_combo_set_value_in_list): notify change.
	(gtk_combo_set_property, gtk_combo_get_property): impl. prop.
2001-10-11 06:14:46 +00:00
Hans Breuer
0b5db507da coalescing property notifies
2001-08-11  Hans Breuer  <hans@breuer.org>

	* gtk/gtkalignment.c, gtk/gtkarrow.c, gtk/gtkaspectframe.c,
	  gtk/gtkcellrenderer.c, gtk/gtkcellrenderertext.c,
	  gtk/gtkcombo.c, gtk/gtkcurve.c, gtk/gtkfontsel.c,
	  gtk/gtklayout.c, gtk/gtkmisc.c, gtk/gtkpacker.c,
	  gtk/gtkprogress.c, gtk/gtkruler.c,, gtk/gtksettings.c,
	  gtk/gtkspinbutton.c, gtk/gtktexttag.c : coalescing property notifies

	* gtk/gtkclist.c, gtk/gtktipsquery.c, gtk/gtktexttag.c,
	  gtk/gtkwidget.c : added G_SIGNAL_TYPE_STATIC_SCOPE to all
	GDK_TYPE_EVENT signals

	* gtk/gtkalignment.c : removed 'direct allocation bug',
	which Tim discovered while reading the patch
2001-08-11 20:27:36 +00:00
Owen Taylor
4e2b60ac4d Patch from Matthias Clasen to remove remove all instances of
Wed Jul 18 19:28:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/*.c: Patch from Matthias Clasen to remove remove
	all instances of g_return_if_fail (foo != NULL); that are
	immediately before a g_return_if_fail (GTK_IS_FOO (foo));
	since the second check catches the NULL anyways.
2001-07-18 23:39:26 +00:00
Owen Taylor
79d45ab85d Formatting fixes from multihead brnach. [ mostly foo(bar) => foo (bar) ]
Thu Jul 12 13:43:27 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclist.c gtk/gtkcolorsel.c gtk/gtkcombo.c
	  gtk/gtkctree.c gtk/gtkcurve.c gtk/gtkentry.c
	  gtk/gtkfontsel.c gtk/gtkhandlebox.c
	  gtk/gtkimcontextsimple.c gtk/gtkmain.c gtk/gtkmenu.c
	  gtk/gtkmenuitem.c gtk/gtkoptionmenu.c gtk/gtkpixmap.c
	  gtk/gtkselection.c gtk/gtktextdisplay.c gtk/gtktextview.c
	  gtk/gtktooltips.c gtk/gtkwidget.c gtk/gtkwindow.c:
	Formatting fixes from multihead brnach. [ mostly foo(bar) => foo (bar) ]
2001-07-12 17:50:14 +00:00
Havoc Pennington
0bee26c7ba Clip the retrieved image data to the screen, using a server grab to avoid
2001-06-28  Havoc Pennington  <hp@pobox.com>

	* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): Clip the retrieved
	image data to the screen, using a server grab to avoid race
	conditions.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
	check for NULL return from gtk_image_new_from_stock(), it never
	returns NULL.
	(gtk_item_factory_create_item): fix bug where we parsed the stock
	ID as an inline pixbuf

	* gtk/gtktext.c (gtk_text_key_press): numeric keypad support

	* gtk/gtkspinbutton.c (gtk_spin_button_key_press): numeric keypad
	support (should be using binding set here)

	* gtk/gtkoptionmenu.c (gtk_option_menu_key_press): numeric keypad
	support (should be using binding set here)

	* gtk/gtkmenushell.c (gtk_menu_shell_class_init): numeric keypad
	support

	* gtk/gtkmenu.c (gtk_menu_class_init): numeric keypad support

	* gtk/gtkmenubar.c (gtk_menu_bar_class_init): numeric keypad

	* gtk/gtklistitem.c (gtk_list_item_class_init): numeric keypad

	* gtk/gtkimcontextsimple.c
	(gtk_im_context_simple_filter_keypress): keypad

	* gtk/gtkfilesel.c (gtk_file_selection_key_press): keypad

	* gtk/gtkentry.c (gtk_entry_class_init): numeric keypad fixes

	* gtk/gtkctree.c (gtk_ctree_class_init): numeric keypad support

	* gtk/gtkcolorsel.c (palette_activate): keypad support (of course,
	should be binding-setted)

	* gtk/gtkwindow.c (gtk_window_class_init): numeric keypad fixes

	* gtk/gtkclist.c (gtk_clist_class_init): numeric keypad fixes

	* gtk/gtkcalendar.c: numeric keypad fixes

	* gtk/gtktextview.c (gtk_text_view_class_init): numeric keypad
	support

	* gdk/gdkwindow.c (gdk_window_get_clip_region): fix infinite loop
	screwup

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
	clip the render area to the drawable's clip region in advance,
	so we don't get data from the server that we don't need.

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
	check return value of gdk_pixbuf_get_from_drawable(), fall back
	to bilevel alpha if we can't get the pixbuf to composite against.

	* gdk/gdkdraw.c (gdk_drawable_get_image): set the image colormap

	* gdk/gdkimage.c (gdk_image_get_colormap): add
	gdk_image_set_colormap, gdk_image_get_colormap

	* gdk/gdkpixbuf-drawable.c (rgbconvert): Change all converters to
	take a region of the image, instead of converting the entire
	image.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): add show_help
	keybinding signal. Add default bindings for it. Add default
	handler for show_help that shows the tooltip for the widget.

	* gtk/gtkdialog.c (gtk_dialog_class_init): add binding set and
	"close" keybinding signal, remove key press handler.

	* gtk/gtktooltips.c (gtk_tooltips_set_colors): Just remove this,
	it's not our usual practice to leave a deprecated function around
	with a runtime warning, plus we don't want it to appear in docs,
	plus if we make them yellow no one will want to change them
	anyhow.
2001-06-29 01:59:02 +00:00
Owen Taylor
ad88113f34 Fix notifications on non-existant "enable_arrow_keys". (#53753, Skip
Fri Jun  1 11:47:11 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_set_use_arrows_always): Fix
	notifications on non-existant "enable_arrow_keys".
	(#53753, Skip Montanaro)
2001-06-01 17:46:45 +00:00
Havoc Pennington
7e9b154f0c fix warning
2001-04-27  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): fix warning

	* gtk/gtkmessagedialog.c (gtk_message_dialog_init): make messages selectable

	* gtk/gtkentry.c (gtk_entry_real_insert_text): don't strip
	line/para separators
	(gtk_entry_create_layout): set single paragraph mode on the layout

	* gtk/gtkbutton.c (gtk_button_new_from_stock): don't put much
	spacing between the image and label; instead, inside a button box
	the button will get extra space that will go there, but if people
	configure button box for 0 chubbiness, then there's no spacing.

	* gtk/gtkbbox.c (gtk_button_box_class_init): Make child ipadding
	and min/max size style properties, so people can tune their
	chubbiness.

	* tests/testgtk.c (make_toolbar): remove calls to removed toolbar
	functions

	* gtk/gtktoolbar.c (gtk_toolbar_class_init): Make space_size,
	space_style, and button_relief into style properties, remove
	functions for setting them

	* gtk/gtkmenu.c (gtk_menu_key_press): handle menu bar accel to pop
	it back down

	* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): free boxed
	types from gtk_widget_style_get

	* gtk/gtkmenubar.c (gtk_menu_bar_set_shadow_type): Remove, replace
	with a style property.

	* gdk/x11/gdkevents-x11.c: namespace the settings

	* gtk/gtkmenubar.c: Add F10 accelerator to move between menubars.

	* gtk/gtksettings.c (gtk_settings_class_init): remove code with
	side effects from inside g_assert(), so that G_DISABLE_ASSERT can
	be used. Also, translate doc strings for settings. Also, namespace
	the double-click-time property. Also, remove bell properties crap.
2001-04-28 00:12:47 +00:00
Owen Taylor
12aa8608ed Remove explicit pointer grabs, since they are no longer necessary.
Mon Apr 16 14:38:41 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklist.c gtk/gtklistitem.c: Remove explicit pointer
	grabs, since they are no longer necessary.

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): Fix #52926
	by signal_connect() and call gtk_button_pressed() rather
	than signal_connect_after().

	* tests/testgtk.c: Restore radio menu items to combos
	since they'll look OK with Raleigh, and it is easier
	than finishing the process of removing them that was
	started earlier.
2001-04-16 20:33:03 +00:00
Havoc Pennington
207e3bb977 make this somewhat key-navigable
2001-03-23  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkhsv.c: make this somewhat key-navigable

	* gtk/gtkfontsel.c: mnemonics

	* gtk/gtkgamma.c: mnemonics

	* gtk/gtkcolorsel.c: add mnemonics to labels

2001-03-22  Havoc Pennington  <hp@pobox.com>

	Applied big patch from Seth Lytle to fix event handler return
	values, slightly modified.

	* gtk/gtkcalendar.c (gtk_calendar_button_press): return TRUE if
	handled.
	(gtk_calendar_key_press): return TRUE for GDK_space triggers
	select_day

	* gtk/gtkclist.c (gtk_clist_button_press): return TRUE if handled
	(gtk_clist_button_release): return TRUE if handled

	* gtk/gtkcolorsel.c (mouse_release):
	(palette_activate):
	(palette_press):
	(palette_new):
	(mouse_press):
	(get_screen_color):
	fixed return type (void to gboolean), return TRUE,
	added GTK_SIGNAL_FUNC cast

	* gtk/gtkcombo.c (gtk_combo_popup_button_press): fixed return type
	(void to gboolean), and return TRUE
	(gtk_combo_button_release): changed return value to TRUE after
	gtk_grab_add on combo->popwin

	* gtk/gtkctree.c (gtk_ctree_button_press): return TRUE if triggers a
	collapse or expand

	* gtk/gtkcurve.c (gtk_curve_graph_events): return TRUE for
	button/motion

	* gtk/gtkdnd.c (gtk_drag_source_event_cb): return TRUE for button
	press/release and motion that trigger act

	* gtk/gtkentry.c (gtk_entry_button_release): return TRUE

	* gtk/gtkfontsel.c (gtk_font_selection_size_key_press): return TRUE
	for GDK_Return

	* gtk/gtklist.c (gtk_list_button_press): return TRUE mostly
	(gtk_list_button_release): return TRUE if selection

	* gtk/gtklistitem.c (gtk_list_item_button_press): return TRUE on
	press

	* gtk/gtkmenushell.c (gtk_menu_shell_button_press):
	(gtk_menu_shell_button_release): chain parent_menu_shell retval

	* gtk/gtknotebook.c (gtk_notebook_button_press): return FALSE if
	nothing triggered
	(gtk_notebook_button_release): return TRUE if we do anything

	* gtk/gtkspinbutton.c (gtk_spin_button_button_press):
	(gtk_spin_button_button_release): return TRUE or chained retval

	* gtk/gtktext.c (gtk_text_button_press):
	(gtk_text_button_release): return TRUE
	(gtk_text_key_press): remove redundant retval code

	* gtk/gtktreeitem.c (gtk_tree_item_button_press): return TRUE if button
	and sensitive
	(gtk_tree_item_subtree_button_click): changed type to gint, and return
	TRUE if sensitive

	* gtk/gtktooltips.c (gtk_tooltips_event_handler): deactivate implies
	return TRUE
2001-03-24 06:10:40 +00:00
Tim Janik
ac68581f96 added rc-style argument GtkSpinButton::shadow_type. removed
Sun Mar 18 01:15:30 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkspinbutton.[hc]: added rc-style argument
        GtkSpinButton::shadow_type.
        removed spin_button->shadow_type, gtk_spin_button_set_shadow_type()
        and ARG_SHADOW_TYPE as it doesn' make much sense to try to override
        rc-style settings.

        * gtk/gtkfixed.c: removed gtk_fixed_paint() (was unused).

        * gtk/gtkwidget.c: quark cleanups.

        * gtk/gtkrc.[hc]: added gtk_rc_scanner_new() to create an rc-file
        scanner with appropriate configuration, renamed GtkRcStyleClass.clone
        to create_rc_style() (we don't do cloning in standard OO sense).
        added per rc style properties.

        * gtk/gtkstyle.[hc]: added code to retrive pspec conformant rc-style
        property values and for caching those. some cleanups.

        * gtk/Makefile.am: -DG_DISABLE_CONST_RETURNS.

        * gtk/gtksettings.[hc]: new file for global rc-file properties
        (at least currently, should get extended to support X properties
        and other communication mechanisms).

        * gtk/gtkwidget.[hc]: added style property support:
        (gtk_widget_class_install_style_property_parser): install style
        property pspec with parser function for rc-file values other
        than LONG, DOUBLE or STRING.
        (gtk_widget_class_install_style_property): same as above without
        parser (parsers are going to be needed quite infrequently).
        (gtk_widget_style_get_property): retrive style property value.
        (gtk_widget_style_get_valist): same as above with varargs support,
        has NOCOPY semantics.
        (gtk_widget_style_get): wrapper around gtk_widget_style_get_valist().
2001-03-18 04:50:34 +00:00
Havoc Pennington
52658cd3dc Applied patch from Nils Barth (bug # 51041) to replace "gint" with
2001-03-16  Havoc Pennington  <hp@redhat.com>

	* Applied patch from Nils Barth (bug # 51041) to
	replace "gint" with "gboolean" and 0/1 with TRUE/FALSE
	in various places.
2001-03-16 20:12:40 +00:00
Tim Janik
35af5c4eba marshaller fixes.
Wed Mar  7 13:24:57 2001  Tim Janik  <timj@gtk.org>

        * gtk/*.c: marshaller fixes.

        * gtk/gtkmarshal.list: extreme cleanup.

        * gtk/gtktreeview.c (gtk_tree_view_class_init): disable interface
        param spec for now.

        * gtk/gtktexttag.c (gtk_text_tag_set_property): use g_value_get_boxed()
        where appliable.

        * gtk/gtktypeutils.[hc]: updates to GLib API changes.
        special cased autogenerated boxed types from gtktypebuiltins_ids.c
        which are not reference counted:
        GtkSelectionData, GdkEvent, GdkColor, GtkTextIter, PangoTabArray,
        PangoFontDescription, GtkTreeIter and GtkTreePath.

Thu Mar  1 03:58:56 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtktreeselection.h:
        * gtk/gtktreemodel.c:
        * gtk/gtktreedatalist.[hc]: fixed includes. no gobject/*
        file should be included directly, and gobject/gmarshal.h
        as well as gtk/gtkmarshal.h even can't be included directly.

        * Makefile.am: grr, install gtk-config-2.0.

        * gtk/testgtk.c:
        * gtk/simple.c:
        * gtk/gtkmenu.c:
        * gtk/gtkitemfactory.c: use g_object_connect() instead of
        passing "*signal*::*" args to gtk_widget_set().

        * gtk/gtktypeutils.[hc]: got rid of GTK_TYPE_SIGNAL.

        * gtk/*.c: removed trailer arg from property setters and getters.
        macro fixups.

Thu Mar  1 04:01:57 2001  Tim Janik  <timj@gtk.org>

        * test-gdk-pixbuf.c: fixed includes.
2001-03-07 14:49:21 +00:00
Havoc Pennington
0ebf76901c unbreak this function
2001-02-21  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_insert_child_anchor):
	unbreak this function

	* gtk/gtkentry.c: apply patch from Lee Mallabone to add object
	properties

	* gtk/gtkcurve.c: apply patch from Lee Mallabone to add object
	properties

	* gtk/gtkcombo.c: apply patch from Lee Mallabone to add object
	properties

	* gtk/gtkentry.c (gtk_entry_set_max_length): have this take -1 to
	mean unset the max length
2001-02-21 20:22:25 +00:00
Owen Taylor
a1a252ce46 Get rid of a bunch of g_strdup_printf("%s%s") in favor of g_strconcat().
Fri Feb  2 12:26:50 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrc.c (gtk_rc_add_initial_default_files): Get rid of
	a bunch of g_strdup_printf("%s%s") in favor of g_strconcat().

	* gtk/gtkrc.c Makefile.am: Use $(libdir), not $(exe_prefix),
	since some people set $(libdir) separately. (#1290, David Kaelbling)

Thu Feb  1 18:25:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkfilesel.c: If PATH_MAX and MAXPATHLEN are not
	defined, define MAXPATHLEN to 2048. (The Hurd doesn't have
	MAXPATHLEN, but the code here depends on a fixed value.)
	(#4524)

Wed Jan 31 22:01:04 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkhandlebox.c (gtk_handle_box_button_changed): Handle the case
	where child == NULL and handle_position == RIGHT or BOTTOM. (#8041g)

Wed Jan 31 21:20:39 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkctree.c (real_tree_move): If the node being moved isn't
	viewable there is no way that moving the node will cause the
	focus row to become not viewable, so omit check on the visibility
	of new_sibling, which is irrelevant. (Fixes #8002, David Helder)

Wed Jan 31 20:38:17 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c (gtk_entry_commit_cb): Delete the current
	selection before inserting new text.

Wed Jan 31 18:49:33 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_item_state_changed_cb):
	Make the sensitivity of the reparented child track that of
	the original parent menu item. (#34218, David Hodson)

	* gtk/gtkoptionmenu.c (gtk_option_menu_item_destroy_cb): Handle
	the case where the current item is destroyed properly.

	* gtk/gtkoptionmenu.c: Some additional code cleanups and fix
	some edge cases with child-less menuitems.

Wed Jan 31 17:16:13 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcombo.c (gtk_combo_window_key_press): Make Return
	key pop down window. (#12074, Jon K Hellan)

Wed Jan 31 16:21:42 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklist.c (gtk_list_signal_item_toggle): Don't allow
	toggling of rows off in BROWSE or EXTENDED mode. (#12072, Jon K Hellan)
	The solution here isn't perfect - you get an extraneous
	emission of "toggle", which could conceivably confuse an app,
	but better than the current situation. LXR search seems to
	indicate that no apps in GNOME CVS connect to "toggle".

Wed Jan 31 15:46:13 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/Makefile.am (libgtkinclude_HEADERS): Move gtkcompat.h from
        gtk_public_h_sources to directly here to avoid warning when
        building srcdir != builddir. (#9656)

Tue Jan 30 19:49:02 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrange.c: Patch from Kipp Hickman to make the event
	handlers in gtkrange.c return the proper values (TRUE == handled)
	(#10316).

	This is just the tip of the iceberg, but gtkrange.c is the
	most common place where the propagation is problematical,
	and also a place where it is almost certainly safe to change
	this in the stable branch.

	(You don't want right click popups on a range control or anything...)

Tue Jan 30 18:57:59 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktext.c (clear_focus_area): We need to clear the focus
	area on focus out, even if a background pixmap isn't set.
	(#13941)

Tue Jan 30 18:24:10 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_shape): Fix from Sean Cunningham
	to deal with setting the shape properly when scrolling arrows are
	turned on, but not visible because there is sufficient space.
	(#13432)

Tue Jan 30 16:39:25 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkitemfactory.c (gtk_item_factory_delete_item): For menu
	items with submenus, destroy the item along with the submenu.
	(#7841, Brian Masney(?)) Also, handle paths of the form '<foo>/abcd...'
	properly.

	* gtk/testgtk.c (menu_items): Add a dummy branch that we delete
	later.

Tue Jan 30 15:51:25 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_real_set_focus): Fix a problem where
	the focus widget sometimes wasn't drawn with the default if there
	was no default widget.

	* gtk/gtkstyle.c (gtk_style_real_unrealize): free colors,
	unreference pixmaps.

	* gtk/gtkstyle.c (gtk_style_realize): Reference colormap
	for some extra safety.

Mon Jan 29 19:00:01 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtk{ctree.c,clist.c} (set_cell_contents): Handle setting
	the text of a cell to the old pointer value better, by
	copying the new text before freeing the old text. Some code
	cleanup. (#8079, Karl Nelson)

Mon Jan 29 16:50:19 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklabel.[ch] gtk/gtkframe.[ch]: Make gtk_label_get_text()
	gtk_frame_get_label() non strdup'ing, and G_CONST_RETURN.

Mon Jan 29 15:22:51 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_remove): When removing an
	item from a menu, check to see if it matches
	menu->old_active_menu_item, and if so, unref and clear
	old_active_menu_item (Patch from Pavel Cisler)

	* gtk/gtkmenushell.c (gtk_menu_shell_remove): Unset
	menu_shell->active_menu_item, if it is the child being
	removed. (Patch based on that of Gene Ragan, #50337)
2001-02-02 17:53:29 +00:00
Owen Taylor
dfba226908 Make parent_class static.
Sun Nov  5 04:24:53 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcellrenderertextpixbuf.c: Make parent_class
	static.

Tue Sep 19 10:54:22 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontext*.[ch] gtk/gtkimmulticontext.[ch]
	gtk/gtktextlayout.[ch] gtk/gtktextview.c gtk/gtkentry.c:
	Add support for positioning the cursor within the preedit string.

Mon Sep 18 23:56:32 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextview.c: Check for bindings after passing
	events to im context filter.

Mon Sep 18 11:50:51 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.c (add_preedit_attrs): Handle
	empty attribute lists properly.

Sun Sep 17 10:08:16 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/queryimmodules.c (main): Return non-zero exit
	status if errors were encountered querying any
	modules.

Sat Sep 16 14:01:52 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtk.h: include gtkmodule.h gtkoldeditable.h,
	don't include gtkthemes.h.

	* gtk/testgtk.c gtk/testtext.c: Set environment variables
	to point

	* gtk/Makefile.am: Add new .c and .h files, build
	gtk-query-immodules and use it to create a gtk.immodules
	file for use of test programs.

	* gtk/gtkpreview.c: remove extra blank line.

Sat Sep 16 13:21:04 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimcontextsimple.c (gtk_im_context_simple_add_table):
	Add the ability to add extra tables beyond the default
	one, and also the ability to have compose sequences
	that are prefixes of other compose sequences.

	* gtk/gtkimcontextsimple.c: Export a preedit string which
	consists of possible candidates for keystrokes that have
	been entered but not yet committed.

	* gtk/gtkimcontext.[ch] gtk/immulticontext.[ch]
	gtk/gtkimcontextsimple.[ch]: add gtk_im_context_reset()

	* gtk/gtkmulticontext.[ch] (gtk_im_multicontext_append_menuitems):
	Add a function to add input-method switching menu items
	to a menu.

	* gtk/gtkimmulticontext.[ch]: Properly handly set_client_window
	when switching input methods.

	* gtk/gtkimcontextsimple.[ch]: Change the format of
	the compose table to allow compose tables of different
	lengths / sequence.

Sat Sep 16 13:05:48 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimmodule.[ch]: Support routines for loading
	GtkIMContext implementations dynamically at runtime.

	* gtk/queryimmodules.c: Program to query the available
	input modules and write the results into a file.

	* gtk/gtkrc.[ch] (gtk_rc_get_im_module_file): Add
	extra config options "im_module_file" (cache file for
	input method modules), and "im_module_path" - path
	to look for modules when generating cache file.

	This doesn't scale.

Sat Sep 16 13:09:06 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkthemes.[ch] gtk/gtkmodule.[ch]: Move most of the
	generic	code from gtkthemes into a new abstraction
	GtkModule which has the logic for implementing
	a loadable module which implements a number of
	GObject types.

Sat Sep 16 13:07:13 2000  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkeditable.[ch]: Convert GtkEditable from
	a class into an interface

	* gtk/gtkoldeditable.[ch]: Move the old editable
	implementation into here, so legacy widgets can
	still rely on the implemenation. GtkOldEditable
	exports GtkEditable. Make selection handling
	code use new text conversion functions (and
	handle UTF-8 as a side-effect). Use GtkClipboard
	for CLIPBOARD.

	* gtk/gtktext.[ch] gtk/gtkcombo.c gtk/gtkspinbutton.c:
	Adopt to match above changes.

	* gtk/gtkentry.[ch]: Implement GtkEditable directly,
	avoid GtkOldEditable implementation. Restructure
        to reduce number of places that modify state directly.
	Move to GtkBindingSet. Display the preedit string.
	Queue recomputation of PangoLayout and scroll position
	to improve effiency of doing complex changes naively.
	Add a menu with cut/copy/paste and input method selection.

Thu Sep 14 22:11:05 2000  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtktextlayout.[ch]: Add gtk_text_layout_set_preedit_string()
	to set preedit string and attributes; display preedit string by
	inserting string and attributes at cursor when creating the
	GtkTextLineDisplay.

	* gtk/gtktextlayout.c: Move all conversions between byte
	positions in PangoLayout and GtkTextIter into new functions
	line_display_iter_to_index/index_to_iter that properly
	handle the preedit string.

	* gtk/gtktextmark.[ch]: Restore gtk_text_mark_get_name, modify
	it to return const char * (eventually will end up
	as GCONST char *, most likely.)

	* gtk/gtktextview.[ch]: Handle the preedit string, call
	gtk_im_context_reset() as necessary, add a menu to switch
	input methods.

	* gtk/gtktextlayout.[ch]: Remove useless
	gtk_text_layout_get_log_attrs() function.
2000-11-12 03:43:24 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Havoc Pennington
df4fc36721 Make this compile without framebuffer enabled
2000-06-20  Havoc Pennington  <hp@redhat.com>

* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled

* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure

* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height

* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.

2000-06-19  Havoc Pennington  <hp@redhat.com>

* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.

2000-06-14  Havoc Pennington  <hp@redhat.com>

        * gdk/Makefile.am: add gdkpixmap.c

	* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
	s/gdk_image_init/_gdk_windowing_image_init

	* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
	ref/unref

	* gdk/gdkcolor.h: make GdkColormap a GObject subclass

	* gdk/gdkcompat.h: remove GdkWindowType compat, since
	GdkWindowType is now non-deprecated;
	change gdk_window_get_type() compat to be
	gdk_window_get_window_type().

	* gdk/gdkdnd.h: make GdkDragContext a GObject.

	* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
	virtual GObject. Make all functions call into the vtable.
	Move gdk_image_put() guts in here. Remove GdkDrawableType
	and gdk_drawable_get_type(), these are now GdkWindow-specific.
	draw_image, get_depth, get_size, set_colormap, get_colormap,
	get_visual added to the vtable.

	* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
	GObject. Virtualize everything.
	(gdk_gc_new_with_values): remove check for destroyed window,
	because now GdkWindow::create_gc will check this.
	(gdk_gc_set_values): New function to set GC values, this
	was already implemented but wasn't in the header

	* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.

	* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
	_gdk_window_draw_image(), remove _gdk_windowing_window_class,
	remove _gdk_window_class; add _gdk_window_impl_get_type() and
	_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
	_gdk_windowing_window_init, rename gdk_image_init to
	_gdk_windowing_image_init.

	* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
	(gdk_draw_layout): Remove check for destroyed window,
	because all the drawable methods already check it.

	* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
	Add gdkpixmap.c which contains implementation of GdkDrawable
	virtual table (by chaining to a platform-specific implementation
	object).

	* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
	GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
	GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
	GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
	GdkColormapPrivate.

	* gdk/gdktypes.h: #include <glib-object.h>

	* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
	Move most functionality to platform-specific implementation
	object. GdkWindow itself now handles the backing store, then
	chains to the platform-specific implementation.
	(gdk_window_get_window_type): return GdkWindowType of the window.
	(gdk_window_peek_children): New routine, returns the children of
	a GdkWindow
	(gdk_window_get_children): Was in X11-specific code and did
	XQueryTree. Changed to simply return a copy of window->children;
	so it can go in cross-platform code.

	* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path

	* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
	GdkColormap; just changed to use the new private data instead
	of casting to GdkColormapPrivate.

	* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
	gdk_cursor_new().

	* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
	(private data member in the GObject).
	(xdnd_manager_source_filter): Function had broken
	error handling, fix it (use gdk_error_trap_push).

	* gdk/x11/gdkdrawable-x11.c: This file now implements
	a base class for GdkWindowImplX11/GdkPixmapImplX11. This
	base class is purely for the convenience of the X port,
	and not part of the interface to cross-platform GDK.

	* gdk/x11/gdkevents-x11.c: Reflect various renamings.

	* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
	specific to X, and returned by the create_gc virtual method
	of GdkDrawableImplX11.
	(gdk_x11_gc_set_dashes): Change this to take an array of gint8
	rather than gchar, this was also changed in the GdkGC vtable.
	(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
	mask is 0, return immediately, instead of checking every flag.
	This is faster, and keeps us from segfaulting if values is NULL
	and the mask contains some nonzero flags.

	* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
	GdkWindow.

	* gdk/x11/gdkglobals-x11.c: change type of grab window, since
	GdkWindowPrivate is gone.

	* gdk/x11/gdkim-x11.c: rename things that got renamed.

	* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
	remove the image_put stuff that got transferred to GdkDrawable.

	* gdk/x11/gdkinput.c: renamings

	* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>

	* gdk/x11/gdkpixmap-x11.c: GObject conversion

	* gdk/x11/gdkprivate-x11.h: indentation fixes

	* gdk/x11/gdkproperty-x11.c: renamings

	* gdk/x11/gdkselection-x11.c: renamings

	* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
	implements the platform-specific "impl" object.
	Moved gdk_window_get_children to gdk/gdkwindow.c

	* gdk/x11/gdkx.h: Remove all the private structs and private datas
	that no longer exist. Add declaration of GdkGCX11 object here.
	Fix all the macros to still work.

	* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
	GdkDragContext from the boxed types since they are now GObjects.

	* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
	moved xthickness/ythickness into the instance. GtkStyleClass
	functions are now in the standard vtable for GtkStyle, so you have
	to create a GObject subclass to write a theme engine.
	(gtk_style_copy): fixed a leaked PangoFontDescription
	(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
	can be the standard GObject function.

	* Throughout GTK:
	s/style->klass->[xy]thickness/style->[xy]thickness
	s/pango_layout_unref/g_object_unref/

	* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.

	* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
	accessing GDK internals.

	* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
	accessing GDK internals.
2000-06-20 21:04:44 +00:00
Tim Janik
9595c55184 documented necessary changes for 1.4 transition.
Fri May 12 17:13:32 2000  Tim Janik  <timj@gtk.org>

	* docs/Changes-1.4.txt: documented necessary changes for 1.4 transition.

	* gtk/gtktext.c: made the adjustments no-construct args, simply
	provide default adjustments.
	(gtk_text_destroy): release adjustments.

	* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): made the
	adjustment argument non-construct.

	* gtk/gtkprogress.c (gtk_progress_destroy): release adjustment here,
	instead of in finalize.
	(gtk_progress_get_text_from_value):
	(gtk_progress_get_current_text):
	(gtk_progress_set_value):
	(gtk_progress_get_percentage_from_value):
	(gtk_progress_get_current_percentage):
	(gtk_progress_set_percentage):
	(gtk_progress_configure): ensure an adjustment is present.

Thu May 11 01:24:08 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtkcolorsel.[hc]:
	* gtk/gtkcolorseldialog.[hc]:
	* gtk/gtkhsv.[hc]: major code cleanups, destroy handlers need to chain
	their parent implementation, use bit fields for boolean values, don't
	create unused widgets, usage of glib types, braces go on their own
	lines, function argument alignment, #include directives etc. etc. etc..

	* gtk/Makefile.am (gtk_public_h_sources): install gtkhsv.h.

Wed May 10 23:29:52 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtktoolbar.c (gtk_toolbar_destroy): don't unref a NULL tooltips.

	* gtk/gtkfilesel.c (gtk_file_selection_destroy): don't free a cmpl_state
	of NULL.

	* gtk/gtkcombo.c (gtk_combo_item_destroy): don#t keep references
	to freed data.
	(gtk_combo_destroy): don't keep a pointer to a destroyed window.

	* gtk/gtkmenu.c (gtk_menu_init): reset the menu's toplevel pointer
	to NULL when the toplevel is getting destroyed.
	(gtk_menu_set_tearoff_state): same here for the tearoff_window.
	(gtk_menu_destroy):
	(gtk_menu_init): store the information of whether we have to
	readd the initial child ref_count during destruction in a new
	GtkMenu field needs_destruction_ref_count.

	* gtk/gtkviewport.c: SHAME! ok this one is tricky, so i note it
	here, those reading: learn from my mistake! ;)
	in order for set_?adjustment to support a default adjustemnt if
	invoked with an adjustment pointer of NULL, the code read (pseudo):
	if (v->adjustment) unref (v->adjustment);
	if (!adjustment) adjustment = adjustment_new ();
	if (v->adjustment != adjustment) v->adjustment = ref (adjustment);
	now imagine the first unref to actually free the old adjustment and
	adjustment_new() creating a new adjustment from the very same memory
	portion. here, the latter comparision will unintendedly fail, and
	all hell breaks loose.
	(gtk_viewport_set_hadjustment):
	(gtk_viewport_set_vadjustment): reset viewport->?adjustment to NULL
	after unreferencing it.

	* gtk/gtkcontainer.[hc]: removed toplevel registration
	functions: gtk_container_register_toplevel(),
	gtk_container_unregister_toplevel() and
	gtk_container_get_toplevels() which had wrong semantics
	anyways: it didn't reference and copy the list.

	* gtk/gtkwindow.c: we take over the container toplevel registration
	bussiness now. windows are registered across multiple destructions,
	untill they are finalized. the initial implicit reference count
	users are holding on windows is removed with the first destruction
	though.
	(gtk_window_init): ref & sink and set has_user_ref_count, got
	rid of gtk_container_register_toplevel() call. add window to
	toplevel_list.
	(gtk_window_destroy): unref the window if has_user_ref_count
	is still set, got rid of call to
	gtk_container_unregister_toplevel().
	(gtk_window_finalize): remove window from toplevel list.
	(gtk_window_list_toplevels): new function to return a newly
	created list with referenced toplevels.
	(gtk_window_read_rcfiles): use gtk_window_list_toplevels().

	* gtk/gtkhscale.c (gtk_hscale_class_init): made the GtkRange
	adjustment a non-construct arg.
	* gtk/gtkvscale.c (gtk_vscale_class_init): likewise.
	* gtk/gtkhscrollbar.c (gtk_vscrollbar_class_init): likewise.
	* gtk/gtkvscrollbar.c (gtk_vscrollbar_class_init): likewise.

	* gtk/gtkrange.c: added some realized checks.
	(gtk_range_destroy): get rid of the h/v adjustments in the
	destroy handler instead of finalize. remove timer.
	(gtk_range_get_adjustment): demand create adjustment.

	* gtk/gtkviewport.c: made h/v adjustment non-construct args.
	we simply create them on demand now and get rid of them in
	the destroy handler.
	(gtk_viewport_destroy): get rid of the h/v adjustments in the
	destroy handler instead of finalize.
	(gtk_viewport_get_hadjustment):
	(gtk_viewport_get_vadjustment):
	(gtk_viewport_size_allocate): demand create h/v adjustment
	if required.

	* gtk/gtkwidget.c (gtk_widget_finalize): duplicate part of the
	gtk_widget_real_destroy () functionality.
	(gtk_widget_real_destroy): reinitialize with a new style, instead
	of setting widget->style to NULL.

Fri May  5 13:02:09 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtkcalendar.c:
	* gtk/gtkbutton.c: ported _get_type() implementation over to
	GType, either to preserve memchunks allocation facilities,
	or because Gtk+ 1.0 GtkTypeInfo was still being used.

	* gtk/gtkobject.[hc]: derive from GObject. ported various functions
	over. prepare for ::destroy to be emitted multiple times.
	removed reference tracer magic. chain into GObjectClass.shutdown()
	to emit ::destroy signal.

	* gtk/gtksignal.c: removed assumptions about GTK_TYPE_OBJECT being
	fundamental.

	* gtk/gtkmain.c: removed gtk_object_post_arg_parsing_init()
	cludge.

	* gtk/gtksocket.c:
	* gtk/gtkplug.c:
	* gtk/gtklayout.c:
	* gtk/gtklabel.c:
	* gtk/gtkargcollector.c:
	* gtk/gtkarg.c: various fixups to work with GTK_TYPE_OBJECT
	not being a fundamental anymore, and to work with the new
	type system (nuked fundamental type varargs clutter).

	* gtk/*.c: install finalize handlers in the GObjectClass
	part of the class structure.
	changed direct GTK_OBJECT()->klass accesses to
	GTK_*_GET_CLASS().
	changed direct object_class->type accesses to GTK_CLASS_TYPE().

	* gtktypeutils.[hc]: use the reserved fundamental ids provided by
	GType. made most of the GTK_*() type macros and Gtk* typedefs
	simple wrappers around macros and types provided by GType.
	most notably, a significant portion of the old API vanished:
	GTK_TYPE_MAKE(),
	GTK_TYPE_SEQNO(),
	GTK_TYPE_FLAT_FIRST, GTK_TYPE_FLAT_LAST,
	GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST,
	GTK_TYPE_ARGS,
	GTK_TYPE_CALLBACK,
	GTK_TYPE_C_CALLBACK,
	GTK_TYPE_FOREIGN,
	GtkTypeQuery,
	gtk_type_query(),
	gtk_type_set_varargs_type(),
	gtk_type_get_varargs_type(),
	gtk_type_check_object_cast(),
	gtk_type_check_class_cast(),
	gtk_type_describe_tree(),
	gtk_type_describe_heritage(),
	gtk_type_free(),
	gtk_type_children_types(),
	gtk_type_set_chunk_alloc(),
	gtk_type_register_enum(),
	gtk_type_register_flags(),
	gtk_type_parent_class().
	replacements, where available are described in ../docs/Changes-1.4.txt.
	implemented compatibility functions for the remaining API.

	* configure.in: depend on glib 1.3.1, use gobject module.
2000-05-12 15:25:50 +00:00
Tim Janik
ef03cb5287 s/refcount/ref_count/.
Sun Feb 13 08:54:45 2000  Tim Janik  <timj@gtk.org>

        * gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
        * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
        * gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
        * gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
        parameters given and cursor->ref_count. coding style fixups.

        * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
        not GtkWidget.

        * gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
        fix up widget macros and add _GET_CLASS() variant.

        * gtk/*.c: some GtkType fixups.
2000-02-13 08:16:48 +00:00
Tor Lillqvist
4850edb29b Add gdk_threads_mutex.
1999-09-17  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdk.def: Add gdk_threads_mutex.

* gtk/makefile.msc: Correct path to libintl.

Thanks to Tomi Ollila and Bernd Herd: Fix some inconsistencies in
use of gint vs. int, and gint vs. gboolean in headers and
definitions. Use GtkType for the *_get_type functions. Note that
these changes preserve binary compatibility.

* gdk/gdk.c
* gdk/win32/gdk.c
* gdk/gdk.h: Fix inconsistencies: gint vs int.

* gtk/gtkmain.c
* gtk/gtkclist.c
* gtk/gtkmenufactory.c
* gtk/gtknotebook.c
* gtk/gtkwidget.c: Fix inconsistencies, also gint
vs. gboolean.

* gtk/gtkcolorsel.[ch]
* gtk/gtkcombo.[ch]
* gtk/gtkdrawingarea.[ch]
* gtk/gtkgamma.[ch]
* gtk/gtkhandlebox.[ch]
* gtk/gtkhpaned.[ch]
* gtk/gtkhruler.[ch]
* gtk/gtkplug.[ch]
* gtk/gtkpreview.[ch]
* gtk/gtkruler.[ch]
* gtk/gtksocket.[ch]
* gtk/gtkstatusbar.[ch]
* gtk/gtktoolbar.[ch]
* gtk/gtkvbbox.[ch]
* gtk/gtkvpaned.[ch]
* gtk/gtkvruler.[ch]: Always use type GtkType for the *_get_type
functions.

* gtk/gtkgamma.h: Fix bug, missing () in call of
gtk_gamma_curve_get_type() in GTK_GAMMA_CURVE_CLASS.
1999-09-17 18:17:20 +00:00
CST 1999 Shawn T. Amundson
279e878bdd Added notice to look in AUTHORS and ChangeLog files for a list of changes.
Wed Feb 24 01:22:39 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * *.[ch]: Added notice to look in AUTHORS and ChangeLog files
	  for a list of changes.
1999-02-24 07:37:18 +00:00
Jeff Garzik
6e3e247b9a . Free 'nprefix', closing a memory leak. Spaced out the code a bit to make
.
        * gtk/gtkcombo.c (gtk_combo_entry_key_press):
        Free 'nprefix', closing a memory leak.
        Spaced out the code a bit to make it more readable.

        * gtk/gtkhbox.[ch] (gtk_hbox_new),
          gtk/gtkvbox.[ch] (gtk_vbox_new):
        Change 'homogenous' arg from gint to gboolean.

        * gtk/gtktogglebutton.[ch]:
        New function gtk_toggle_button_get_active().
1999-01-21 00:37:48 +00:00
Owen Taylor
fcfe7370d8 Move main thread lock back to GDK - we need it there for locking when
Wed Dec 16 13:06:17 1998  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.[ch] gtk/gtkmain.[ch] gtk/gtkprivate.h: Move main
	thread lock back to GDK - we need it there for locking
	when translating events. Rename things appropriately.

Wed Dec 16 11:44:21 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkrange.c (gtk_range_expose): Fix a x/y typo.

CVS:
1998-12-16 20:09:30 +00:00
Tim Janik
017dfc9e4e version bump to 1.1.8, binary age 0, interface age 0, depend on GLib
Wed Dec 16 05:26:32 1998  Tim Janik  <timj@gtk.org>

        * configure.in: version bump to 1.1.8, binary age 0, interface age 0,
        depend on GLib 1.1.8.

        * gdk/gdkprivate.h:
        * gdk/gdkglobals.c: removed last Gdk threads specific bits.

        * gtk/gtkmain.c (gtk_init): s/g_thread_supported/g_thread_supported()/.

        * gtk/gtkprivate.h: changed GTK_THREADS_ENTER and GTK_THREADS_LEAVE
        to function macros GTK_THREADS_ENTER() and GTK_THREADS_LEAVE().
        honour G_THREADS_ENABLED in the definition of GTK_THREADS_ENTER()
        and GTK_THREADS_LEAVE(). changed callers accordingly.
1998-12-16 06:03:14 +00:00
Owen Taylor
a0c84d6818 Commented out testthreads from the build process, since we won't have any
Tue Dec 15 01:38:53 1998  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am: Commented out testthreads from
	the build process, since we won't have any idea
	how to create a thread.

	* configure.in (LIBS): use glib-config ... gthread
	so we always build a thread-compatible library.

        * gtk/gtkaccellabel.c gtk/gtkclist.c gtk/gtkcolorsel.c
	  gtk/gtkcombo.c gtk/gtkcontainer.c gtk/gtkentry.c
	  gtk/gtklist.c gtk/gtkmenuitem.c gtk/gtknotebook.c
	  gtk/gtkrange.c gtk/gtkselection.c gtk/gtkspinbutton.c
	  gtk/gtktext.c gtk/gtktooltips.c gtk/gtkwidget.c:

	Add GTK_THREADS_ENTER/LEAVE pairs around timeouts
	and idles to account for the fact that they are no
	longer called within the GTK+ lock.

	* gtk/gtkprivate.h: Added definitions for locking
	the main GTK+ mutex.

	* gtk/gtkmain.c: Re-implement the main loop
	in terms of the GLib main loop.

	* gdk/gdk.h gdk/gdkthreads.c gdk/Makefile.am: Removed threading
	functionality, as it seems better to subsume GDK within the
	GTK+ lock than vice-versa.

        * gdk/gdkevents.c: New file, containing event handling bits
	from gdk.c.

	* gdk/gdkevents.c: Implement event source for GDK
	events.

	* configure.in gdk/gdkevents.c: Removed attempts to
	subtract base_id, which were already non-functional.
1998-12-15 07:32:11 +00:00
Elliot Lee
060978e069 I submitted this patch twice to gtk-devel-list, and received no comments,
I submitted this patch twice to gtk-devel-list, and received no comments, so
am committing it.  Although not exhaustively tested, I have been using this
gtk+ for a week w/o problems, and I did read the code to ensure that nothing
ever writes to these data structures. If by chance people encounter SEGV's in
gtk+ code that is setting values in global data structures, this patch could
be a possible culprit.

1998-11-30  Elliot Lee  <sopwith@cuc.ml.org>

	* {gdk,gtk}/*.c: Make read-only data structures "static const" to
	allow them to be shared, mainly including (but not limited to) the
	GtkTypeInfo structures for each class.

	* gtk/gtkfilesel.c: Add /net to the "leave me alone" directory listing.
1998-11-30 19:07:15 +00:00
Tim Janik
238ede333f changed scrolled window inheritance, it inherits from GtkBin now.
Sat Nov 28 03:13:42 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkscrolledwindow.h:
        * gtk/gtkscrolledwindow.c: changed scrolled window inheritance,
        it inherits from GtkBin now.

        * gtk/gtkbin.c (gtk_bin_unmap): removed superfluous check for
        visibility of child.
        (gtk_bin_draw): removed superfluous check for GTK_WIDGET_DRAWABLE().
        added check so a child gets only drawn if it's visible.

        * gtk/gtkwidget.h:
        * gtk/gtkwidget.c: removed gtk_widget_draw_children().

        * gtk/gtkstyle.h:
        * gtk/gtkstyle.c: rmoved gtk_reset_widget_shapes.

        * gtk/gtkwidget.h:
        * gtk/gtkwidget.c: removed crufty relict: gtk_widget_is_child().
        added internal function gtk_widget_reset_shapes() from gtkstyle.c.

        * gtk/gtkrc.h:
        * gtk/gtkrc.c: (gtk_rc_find_pixmap_in_path): removed bogus gscanner
        argument, changed callers.

        * gtk/gtkmenufactory.c: GtkMenuFactory is deprecated for a long time,
        it will issue a warning now.

        * gtk/gtkcompat.h: new file to #define aliases for historic
        function names.

        * changed 8 function names for consistency and provided aliases to keep
        source compatibility in gtkcompat.h:
        (gtk_accel_label_get_accel_width): renamed from gtk_accel_label_accelerator_width
        (gtk_container_set_border_width): renamed from gtk_container_border_width
        (gtk_notebook_get_current_page): renamed from gtk_notebook_current_page
        (gtk_packer_configure): renamed from gtk_packer_set_child_packing
        (gtk_paned_set_gutter_size): renamed from gtk_paned_gutter_size
        (gtk_paned_set_handle_size): renamed from gtk_paned_handle_size
        (gtk_scale_get_value_width): renamed from gtk_scale_value_width
        (gtk_window_set_position): renamed from gtk_window_position

        * renamed a few recently added funtions for consistency:
        (gtk_notebook_get_tab_label): renamed from gtk_notebook_query_tab_label.
        (gtk_notebook_get_menu_label): renamed from gtk_notebook_query_menu_label.
        (gtk_progress_configure): renamed from gtk_progress_reconfigure.
1998-11-28 07:42:37 +00:00
Tim Janik
98e22a43ab added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode.
Sun Nov 22 16:21:28 1998  Tim Janik  <timj@gtk.org>

	* gtk/gtkprogress.c: added args ::show_text, ::text_xalign,
 	::text_yalign, ::activity_mode.

	* gtk/gtkprogressbar.c: added construct arg ::adjustment. added args
 	::bar_style, ::orientation, ::discrete_blocks, ::activity_step,
 	::activity_blocks.
	(gtk_progress_bar_new):
	(gtk_progress_bar_new_with_adjustment): use gtk_widget_new().
	(gtk_progress_bar_construct): deprecated.

	* gtk/gtkvscrollbar.c:
	(gtk_vscrollbar_draw_step_back):
	(gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for
 	gtk_paint_arrow, to be consistent with hscrollbar.

	* gtk/gtktext.c
	added construct args ::hadjustment, ::vadjustment.
	added args ::line_wrap, ::word_wrap.
	(gtk_text_class_init): added scroll_adjustments signal.
	(gtk_text_new): use gtk_widget_new.
	(gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments,
	so we don't screw the reference counts and don't leave signals connected.
 	(gtk_text_destroy): disconnect adjustments signals.
 	(gtk_text_finalize): unref adjustments.

	* gtk/gtkctree.c: added construct args ::n_columns and ::tree_column.
	added args ::indent, ::spacing, ::show_stub, ::reorderable,
 	::use_drag_icons, ::line_style and ::expander_style.
	(gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is
	deprecated now.

	* gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag.
	* gtk/gtkclist.c:
 	removed ::vadjustment and ::hadjustment args, introduced
 	::scroll_adjustments signal.
	added ::shadow_type, ::selection_mode and ::row_height args.
	added n_columns construct arg.
	(gtk_clist_construct): call gtk_object_constructed().
 	(gtk_clist_set_row_height): if height is passed as 0,
	revert to automatic height calculation.
	(gtk_clist_destroy): before unrefing the adjustments, disconnect our
	signal handlers.

Fri Nov 21 22:34:58 1998  Tim Janik  <timj@gtk.org>

	* gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct
	like gtk_object_new.
	(gtk_widget_destroy): assert that we only destroy constructed widgets.

	* gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY
	to identify args that may only be used for construction.
	GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction
	time.
	* gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct
	at the end if the object is not fully constructed.
	(gtk_object_newv): likewise.
	(gtk_object_destroy): assert that we only destroy constructed objects.
 	(gtk_object_init): setup GTK_CONSTRUCTED from the
	objects real klass.
	(gtk_object_default_construct): new function to complete default
	construction of an object by applying missing construtor args with
	default values of 0, 0.0 or NULL.
	(gtk_object_constructed): new function to mark an object as being
	constructed (used from within constructors).

	* gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer
	so it is immediatedly available for the caller.

	* gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to
	the object initilizer (GtkObjectInitFunc takes a second arg now, the
 	real klass), and asure that object initializers may temporarily alter
	the class pointer.

Fri Nov 20 08:00:30 1998  Tim Janik  <timj@gtk.org>

	* gtk/testgtk.c: change all occourances of gtk_container_add (
	scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...)
	for widget!=(clist, ctree, text, viewport).

	* gtk/gtkcombo.c:
 	(gtk_combo_init): use gtk_scrolled_window_add_with_viewport()
	to add children to the scrolled window.

	* gtk/gtkscrolledwindow.h:
	* gtk/gtkscrolledwindow.c:
	changed scrolled_window->viewport to scrolled_window->child, and use
	gtk_widget_scroll_adjustements() to set the scroll adjustments for the
	widget, we do not create an additional viewport anymore.
	added ::hadjustment and ::vadjustment constructor args.
 	(gtk_scrolled_window_new): use gtk_widget_new() to create the widget.
	(gtk_scrolled_window_set_hadjustment):
	(gtk_scrolled_window_set_vadjustment): new functions that superceed
	gtk_scrolled_window_construct.
	(gtk_scrolled_window_construct): deprecated this function.

	* gtk/gtkhscrollbar.c:
	* gtk/gtkvscrollbar.c:
	* gtk/gtkhscale.c:
	* gtk/gtkvscale.c:
	support a constructor arg "::adjustment", and use gtk_widget_new() for
	the widget creation.

	* gtk/gtkrange.c: added ::update_policy arg.
 	(gtk_range_set_adjustment): if adjustment is passed in as NULL, create
 	a default adjustment so this function can be used for derived widgets
 	that depend on the adjustment's existance.
	(gtk_range_destroy): disconnect the adjustment signal, so we don't
	get called after we got destroyed, we don't destroy the adjustment
	in here, because it might have been provided from another widget.

	* gtk/gtkviewport.c: introduced ::scroll_adjustments signal.
	(gtk_viewport_destroy): same as gtk_range_destroy.

	* gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy.

	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c: changed gtk_widget_activate() to return a
	gboolean, indicating whether this widget supports activation.
	added gtk_widget_scroll_adjustements() to set the scrolling
	adjustments of a widget.

Wed Nov 19 01:22:42 1998  Tim Janik  <timj@gtk.org>

	* gtk/gtkoptionmenu.c:
 	(gtk_option_menu_remove_contents):
	(gtk_option_menu_update_contents): removed
 	gtk_container_[un]block_resize() pairs.

	* gtk/gtknotebook.h:
	* gtk/gtknotebook.c: removed the tab_border field, since it shouldn't
	be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a
	wrtie-only argument.

	* *.c: made deprecated functions issue a message:
	gtk_clist_set_border, gtk_container_block_resize,
 	gtk_container_unblock_resize, gtk_container_need_resize,
 	gtk_object_class_add_user_signal, gtk_spin_button_construct,
	gtk_scrolled_window_construct.
	removed non-functional functions:
	gtk_container_disable_resize, gtk_container_enable_resize,
	gtk_clist_set_policy.

Wed Nov 18 22:54:36 1998  Tim Janik  <timj@gtk.org>

	* gtk/gtkbox.c (gtk_box_init):
	* gtk/gtkdrawingarea.c (gtk_drawing_area_init):
	* gtk/gtkeventbox.c (gtk_event_box_init):
	* gtk/gtkfixed.c (gtk_fixed_init):
	* gtk/gtkframe.c (gtk_frame_init):
	* gtk/gtkhandlebox.c (gtk_handle_box_init):
	* gtk/gtkpacker.c (gtk_packer_init):
	* gtk/gtkmisc.c (gtk_misc_init):
	* gtk/gtkpreview.c (gtk_preview_init):
	* gtk/gtkprogress.c (gtk_progress_init):
	* gtk/gtkprogressbar.c (gtk_progress_bar_init):
	* gtk/gtkseparator.c (gtk_separator_init):
	* gtk/gtktable.c (gtk_table_init):
	* gtk/gtkviewport.c (gtk_viewport_init):
	* gtk/gtkalignment.c (gtk_alignment_init):
	removed setting of the GTK_BASIC flag.

	* gtk/gtkwidget.h:
	* gtk/gtkwidget.c:
	removed GTK_BASIC, GTK_WIDGET_BASIC and	gtk_widget_basic.

	* miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00