Commit Graph

193 Commits

Author SHA1 Message Date
Owen Taylor
53171867b5 Patch from Matthias Clasen (#54488)
Fri Feb 22 19:17:46 2002  Owen Taylor  <otaylor@redhat.com>

        Patch from Matthias Clasen (#54488)

        * gtk/gtkwindow.c: Set/unset HAS_FOCUS flags here,
        and do ::has-focus notifications.

        * gtk/gtkclist.c gtk/gtkentry.c gtk/gtksocket.c
        gtk/gtktext.c gtk/gtktextview.c gtk/gtkwidget.c:
        Remove unecessary focus_in/out handles and unecessary
        flag setting.

        * gtk/gtkwidget.c: Adda missing notification on ::parent.
2002-02-23 00:36:49 +00:00
Owen Taylor
e5e5a52112 Add GDK_ISO_Next_Group/Prev_Group/Level3_Shift/ First_Group/Last_Group to
Thu Feb 21 16:51:17 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
        GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
        First_Group/Last_Group to list of invalid accelerators.
        (A lot more that should be added, but probably would
        want a range mechanism. These are the ones found in
        the standard XFree86 config files.)

        * gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
        that broke bindings for menus.

        * gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
        privately.

        * gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
        _gtk_window_activate_key(), gtk_bindings_activate_event().
2002-02-21 22:03:09 +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
Havoc Pennington
e672dd6112 take GDK_HINT_RESIZE_INC into account, and handle negative coordinates
2002-02-16  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkwindow.c (gtk_window_parse_geometry): take
	GDK_HINT_RESIZE_INC into account, and handle negative coordinates
	correctly. (Can't email Owen - hope this is OK.)
2002-02-16 14:41:15 +00:00
Owen Taylor
aa88182321 Convert to using binding set for doing key bindings. (#62622, Requested by
Thu Feb  7 19:00:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
        to using  binding set for doing key bindings. (#62622,
        Requested by Skip Montaro)

        * gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
        bindings as overrides along with control-tab bindings.

        * gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
        type for ::focus_tab signal.
2002-02-08 00:02:52 +00:00
Manish Singh
2cfa52b1ee remove unused variable.
2002-01-30  Manish Singh  <yosh@gimp.org>

        * gtk/gtkhandlebox.c (gtk_handle_box_destroy): remove unused
        variable.

        * gtk/gtkwindow.c (gtk_window_get_icon): function returns a value,
        so return NULL with g_return_val_if_fail instead of g_return_if_fail.
2002-01-30 23:35:08 +00:00
Matthias Clasen
4dddfb2dc6 Remove excess calls to g_return_if_fail from static and virtual functions. 2002-01-30 22:29:03 +00:00
Owen Taylor
2a9af2ff42 Try to make sure that we have some focused widget on map. (#50339)
Wed Jan 30 13:55:59 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_show): Try to make
	sure that we have some focused widget on map. (#50339)

	* gtk/gtkdialog.c (gtk_dialog_map): Handling picking
	a focus widget here differently so that if a
	response button gets picked, it's the default one.

	* tests/testgtk.c (make_message_dialog): Set the
	default response for the dialogs.
2002-01-30 18:58:31 +00:00
Owen Taylor
854372b9be Add <Control>Tab bindings for "move-focus" so that Control-Tab to escape
Tue Jan 29 14:24:49 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_class_init): Add <Control>Tab
        bindings for "move-focus" so that Control-Tab to escape from
        something that eats Tab just works if not otherwise overriden.

        * gtk/gtkspinbutton.c (gtk_spin_button_new_with_range)
        * gtk/gtkvscale.c (gtk_vscale_new_with_range)
        * gtk/gtkhscale.c (gtk_hscale_new_with_range): Use a page_size
        of zero for the adjustment, since at times we think that the range
        is lower to upper - page_size. A page size equally to the
        step_increment is, in any case, not meaningful.
2002-01-29 19:44:49 +00:00
Matthias Clasen
e2b730ac43 General property notification cleanup. 2002-01-28 18:52:49 +00:00
Sven Neumann
54b6e6f76b changed the comment so that gtk-doc doesn't get confused.
2002-01-25  Sven Neumann  <sven@gimp.org>

	* gtk/gtkwindow.c (gtk_window_get_size): changed the comment so
	that gtk-doc doesn't get confused.
2002-01-25 14:34:20 +00:00
Havoc Pennington
31283d57ca link to new X11 section in a lot of places when mentioning the window
2002-01-19  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkwindow.c: link to new X11 section in a lot of places when
	mentioning the window manager.

	* gtk/gtkwidget.c (gtk_widget_hide_on_delete): don't mention
	window manager since we're portable.

2002-01-19  Havoc Pennington  <hp@pobox.com>

	* gtk/x11.sgml: add a mostly-empty X11 section

	* gtk/framebuffer.sgml: make title consistent with windows section

	* gtk/tmpl/gtkdrawingarea.sgml: couple of fixes
2002-01-19 18:51:48 +00:00
Owen Taylor
6dc3eb34c2 Unset initial_pos_set after the first configure request.
Mon Jan 14 16:35:58 2002  Owen Taylor  <otaylor@redhat.com>
        * gtk/gtkwindow.c (gtk_window_move_resize): Unset
        initial_pos_set after the first configure request.
2002-01-14 21:52:15 +00:00
Owen Taylor
a4d411eeeb Fix problem where widget->requisition was being used instead of
Sun Jan 13 23:23:22 2002  Owen Taylor  <otaylor@redhat.com>
	* gtk/gtkwindow.c (gtk_window_compute_hints): Fix problem where
	widget->requisition was being used instead of
	gtk_widget_get_child_requisition (), causing geometry widgets
	with usizes to misbehave.
2002-01-14 08:20:22 +00:00
Vitaly Tishkov
f74dd2386a gtk/gtkimage.c gtk/gtkimcontext.c gtk/gtktreemodel.c
2002-01-10            Vitaly Tishkov       <tvv@sparc.spb.su>
        * gtk/gtkimage.c
	* gtk/gtkimcontext.c
	* gtk/gtktreemodel.c
	* gtk/gtktreemodelsort.c
	* gtk/gtkwindow.c
	* docs/reference/gtk/tmpl/gtkselection.sgml
	fix docs
2002-01-10 16:36:25 +00:00
Matthias Clasen
c1808baa01 Doc typo fix. (#68172)
* gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)

        * gtk/gtktreemodel.c (gtk_tree_path_is_descendant): Fix docs.

        * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Document.

        * gtk/gtkwindow.c (gtk_window_remove_accel_group): Fix docs.

        * gtk/gtkrc.c (gtk_rc_get_style_by_paths),
        gtk/gtkwidget.c (gtk_widget_get_toplevel,
        gtk_widget_push_composite_child), gtk/gtkdialog.c
        (gtk_dialog_new_with_buttons, gtk_dialog_run): Keep gtk-doc
        from messing up the indentation of inline examples.

        * gtk/gtkmain.c, gtk/gtkrc.c: Consistently call g_getenv()
        instead of getenv().

        * gtk/gtktreemodel.c, gtk/gtkaccelgroup.c, gtk/gtkclipboard.c,
        gtk/gtkdnd.c, gtk/gtkiconfactory.c, gtk/gtkrc.c,
        gtk/gtkstyle.c, gtk/gtkselection.c: Doc fixes.

        * gtk/gtkaccelmap.c (gtk_accel_map_add_filter,
        gtk_accel_map_foreach_unfiltered, gtk_accel_map_load_scanner):
        Document.

        * gtk/tmpl/gtksocket.sgml: Mention gtk_socket_get_id()
        instead of GTK_WINDOW_XWINDOW().  (#68172)

        * gtk/gtk-sections.txt: Move functions which are documented
        as "private" or "internal" into Private subsections.

        * gtk/tmpl/gtkdnd.sgml, gtk/tmpl/gtkobject.sgml,
        gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtktooltips.sgml,
        gtk/tmpl/gtkwidget.sgml, gtk/tmpl/gtkclipboard.sgml,
        gtk/tmpl/gtkstyle.sgml, gtk/tmpl/gtkselection.sgml,
        gtk/tmpl/gtkfeatures.sgml: Minor markup fixes.

        * gtk/tmpl/gtksignal.sgml: Add link to GLib signal docs.

        * gtk/tmpl/gtkpreview.sgml, gtk/tmpl/gtktext.sgml,
        gtk/tmpl/gtktree.sgml: Remove "deprecated" from short desc.

        * gtk/tmpl/gtkrc.sgml: Correct names of default RC files.
2002-01-08 00:04:57 +00:00
Matthias Clasen
d925a72d34 Additions.
* gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkscale.sgml,
        gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkimcontextsimple.sgml: Additions.

        * gtk/gtkwindow.c, gtk/gtkimcontextsimple.c: Minor documentation tweaks.
2001-12-30 22:56:05 +00:00
Owen Taylor
cd6070461e 1.3.12, interface, binary age 0.
Sat Dec 22 12:38:03 2001  Owen Taylor  <otaylor@redhat.com>

        * configure.in: 1.3.12, interface, binary age 0.

        * configure.in: Require new versions of Glib, Pango, ATK.

        * NEWS: Updated.

        * configure.in: Make explicit what libtool we are executing.
        (Tomas Ogren)

        * gdk/gdkcolor.c gdk/gdkgc.c gdk/gdkwindow.c: Doc fixes.

        * gtk/gtkwidget.c (gtk_widget_[class]path) gtkrc.h : Fix
        parameter names for docs.

Sat Dec 22 22:35:29 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_realize)
          gtk/gtkplug.c (gtk_plug_realize): Include GDK_KEY_RELEASE_MASK.

        * gtk/gtkentry.c (gtk_entry_key_release)
          gtk/gtktextview.c (gtk_text_view_key_release_event): Pass
        key release events to the input method.

        * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress):
        Handle release of Control/Shift to end hex sequence.

        * modules/input/gtkimcontextxim.c (gtk_im_context_xim_filter_keypress):         Handle key releases as well as presses.
2001-12-23 22:59:30 +00:00
Matthias Clasen
43851fe034 Typo fixes Typo fix. (#66746)
* gtk/gtktextlayout.c: Typo fixes
        * gtk/gtkwindow.c (gtk_window_set_position): Typo fix. (#66746)

        * gtk/gtkwidget.c (gtk_widget_send_expose, gtk_widget_get_toplevel,
        gtk_widget_get_default_direction): Doc fixes. (#66727, #66737, #66744)

        * gtk/gtkstyle.h (GTK_STYLE_NUM_STYLECOLORS): Remove. (#66467)

        * gtk/tmpl/gtklist.sgml: Markup fixes.

        * gdk/tmpl/selections.sgml, gtk/tmpl/gtksocket.sgml: s/succesful/successful/g.

        * gtk/gtk-sections.txt, gtk/tmpl/gtkstyle.sgml: Remove
        GTK_STYLE_NUM_STYLECOLORS. (#66467)
2001-12-12 22:29:53 +00:00
Matthias Clasen
a7bab735ad Deprecate. (#65851)
* gdk/gdkcolor.h (gdk_colormap_change): Deprecate. (#65851)

        * gdk/gdktypes.h (GdkKeyInfo): Remove. (#66025)

        * gtk/gtkwindow.c, gtk/gtkwidget.c: Add docs, markup fixes.

        * gtk/tmpl/gtkwidget.sgml: Updates.
        * gtk/Makefile.am (IGNORE_HFILES): Remove gtktextchild.h.
2001-12-05 00:06:40 +00:00
Alex Larsson
c7cd3421f7 Return FALSE from expose handlers.
2001-12-03  Alex Larsson  <alexl@redhat.com>

	* gtk/gtkaccellabel.c:
	* gtk/gtkarrow.c:
	* gtk/gtkcolorsel.c:
	* gtk/gtkcontainer.c:
	* gtk/gtklabel.c:
	* gtk/gtktextview.c:
	* gtk/gtktogglebutton.c:
	* gtk/gtktreeview.c:
	* gtk/gtkwindow.c:
	Return FALSE from expose handlers.
2001-12-03 22:11:40 +00:00
Matthias Clasen
a381648faa Typo fixes. (#65607)
* gtk/gtkaccelmap.c: Typo fixes. (#65607)

        * gtk/gtkfixed.c (gtk_fixed_set_has_window, gtk_fixed_get_has_window):
        Fix docs. (#65505)

        * gtk/gtkwindow.c (gtk_window_set_mnemnonic_modifier): Document.

        * gtk/tmpl/gtkwindow.sgml: Document gtk_window_position.

        * gdk/tmpl/dnd.sgml: Document GdkDragProtocol and GdkDragContext.

        * gdk/tmpl/events.sgml: Document gdk_setting_get.

        * gdk/tmpl/fonts.sgml: Document gdk_font_full_name_get and
        gdk_font_full_name_free.

        * gdk/tmpl/windows.sgml: Document gdk_window_register_dnd.
2001-11-28 23:41:12 +00:00
Matthias Clasen
fa7f30239b Add markup to docs.
* gtk/gtkwindow.c (gtk_window_move): Add markup to docs.
2001-11-28 19:08:36 +00:00
Tim Janik
9800f731e0 applied patch from owen to get rid of accel map notifiers. changed things
Tue Nov 20 21:25:08 2001  Tim Janik  <timj@gtk.org>

	* applied patch from owen to get rid of accel map notifiers.
	changed things to fix reentrancy and API as discussed on gtk-devel.

	* gtk/gtkaccelgroup.[hc]:
	(gtk_accel_group_finalize): unregister this accel group from all
	accel map paths.
	(accel_closure_invalidate): handle invalidation of closures by
	disconnecting their accelerators.
	(quick_accel_add): move closure connection and changed notification
	into this function to reduce code duplication. don't emit change
	notification on closurers without accelerators.
	(quick_accel_remove): rewrite, do the exact opposite of quick_accel_add
	for a GtkAccelGroupEntry.
	(gtk_accel_group_connect): get rid of the accel_path_quark argument.
	(gtk_accel_group_connect_by_path): new function to add accelerators
	with an accel path.
	(gtk_accel_group_disconnect_closure): new function, disconnect a
	closure from of an accel group.
	(gtk_accel_group_disconnect): loop over all closure for a accel_ley,
	accel_mods pair and remove them.
	(_gtk_accel_group_reconnect): new function that basically does
	gtk_accel_group_disconnect_closure() and
	gtk_accel_group_connect_by_path() once an accel path changed.
	(gtk_accel_groups_disconnect_closure): remove this, there's
	gtk_accel_group_disconnect_closure().

	* gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now,
	nuke notifiers.
	(_gtk_accel_path_is_valid): make this non-static for
	gtkwidget.c and gtkaccelgroup.c assertions.
	(gtk_accel_map_add_notifer): removed this function.
	(gtk_accel_map_remove_notifer): same.
	(_gtk_accel_map_add_group):
	(_gtk_accel_map_remove_group): (un-)register accel groups, with
	accel paths for correct propagation.
	(gtk_accel_map_add_entry): return void.
	(gtk_accel_map_lookup): return gboolean instead of GQuark.

	* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always
	set accel_path on widgets.

	* gtk/gtkwidget.[hc]:
	(accel_path_changed): got rid of this, changes are handled by
	accel maps internally now.
	(_gtk_widget_set_accel_path): get things to work without notifiers.
	(gtk_widget_list_accel_closures): list accel closures of a widget.

	* gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
Owen Taylor
adca28f8c2 Reprioritize key bindings in order of visibility - mnemonics, then
Sat Nov 17 19:26:20 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
	key bindings in order of visibility - mnemonics, then
	accelerators, then send key to the focus widget, then
	bindings on the GtkWindow.

	* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
	Removed the xoffset, yoffset fields of GtkLayout which were
	identically zero for compat with 1.2, but were no longer
	compatible with	all uses of these fields in 1.2.

	* gtk/gtkwindow.c (gtk_window_set_default): Remove
	unused variable.
2001-11-18 00:34:23 +00:00
Owen Taylor
a036c6e59f Make gtkmarshal.list/gtkmarshal.h only for compatibility with GTK+-1.2;
Sat Nov 17 18:26:45 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
	gtk/*.c gtk/gtksignal.h: Make gtkmarshal.list/gtkmarshal.h
	only for compatibility with GTK+-1.2; and deprecate it;
	put all marshalers we actually use into gtkmarshalers.list
	and use the _gtk_marshal_ prefix for these marshalers.
2001-11-17 23:28:51 +00:00
Owen Taylor
61b2f259e5 Move notification of "has_default" to here, so it is safe to call
Fri Nov 16 19:44:35 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_set_default): Move
	notification of "has_default" to here, so it
	is safe to call gtk_window_set_default() instead
	of gtk_widget_grab_default().

	* gtk/gtkwindow.c (gtk_window_set_focus): Make it call
	gtk_widget_grab_focus(), which then calls
	_gtk_widget_internal_set_focus(). This makes
	gtk_window_set_focus() a safe way of both setting
	and unsetting the focus widget.

	* gtk/gtkwidget.c (gtk_widget_propagate_state): Use
	gtk_widget_get_toplevel(), instead of gtk_widget_ancestor
	to find the toplevel.

	* gtk/gtkwindow.h: Move gtk_window_set_focus/default
	from the "internal functions" section.
2001-11-17 01:18:49 +00:00
Owen Taylor
c344b3f905 Propagate key press events not just to focus/window but also to
Thu Nov 15 12:54:36 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c (gtk_window_key_press_event): Propagate
        key press events not just to focus/window but also to
        intermediate widgets.

        * gtk/gtknotebook.c: Handle Ctrl-PageUp/Ctrl-PageDown
        to switch pages. (Needs some work on handling focus
        when switching pages.)
2001-11-16 22:20:00 +00:00
Matthias Clasen
cea7df47d7 Move '.' out of quote. (#64407)
* gtk/gtkwindow.c (gtk_window_new): Move '.' out of quote. (#64407)
2001-11-15 23:18:15 +00:00
Tim Janik
a272e83339 protect idle handle with gdk threads macro.
Tue Nov 13 19:51:43 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwindow.c (handle_accels_changed): protect idle handle
        with gdk threads macro.
2001-11-13 18:52:25 +00:00
Tim Janik
d07573c090 added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001  Tim Janik  <timj@gtk.org>

        * added gtkaccelmap.sgml. other updates.

Mon Nov 12 23:08:37 2001  Tim Janik  <timj@gtk.org>

	* gtk/maketypes.awk: fix type utils generation on unix.

	* gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator
	registry.

	* gtk/gtkaccelgroup.[hc]: major API/implementation revamp:
	removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default,
	gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry,
	gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove,
	gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object.
	introduced ::accel_changed signal for change notification, and
	gtk_accel_group_connect/disconnect to connect closures to accel groups.
	made gtk_accel_group_attach/detach and gtk_accel_group_activate private
	functions.
	deprecated gtk_accel_group_ref/unref.

	* gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention
	to accel group changed notification and basically operate on closures.
	removed gtk_accel_label_get_accel_object and
	gtk_accel_label_set_accel_object.
	introduced gtk_accel_label_set_accel_closure, and for convenience,
	gtk_accel_label_set_accel_widget.

	* gtk/gtkitemfactory.[hc]: removed accelerator propagation code
	which mostly moved into gtkaccelmap.[hc].
	removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_*
	and gtk_item_factory_print_func.

	* gtk/gtkmain.c: call _gtk_accel_map_init().

	* gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(),
	that associates an accelerator path with menu items, through which
	persistent accelerator settings on menu items are enabled.

	* gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator
	paths of menu item can be default constructed to allow installation
	of accelerators on menu items that don't come with an accelerator
	binding by default.

	* gtk/gtksettings.c: fix STRING type rc settings by special casing
	them appropriately in the parser.

	* gtk/gtksignal.[hc]: allow a class function offset of 0 for
	gtk_signal_newv().

	* gtk/gtkwidget.[hc]: accelerator API revamp.
	removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal,
	gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and
	gtk_widget_(un)lock_accelerators.
	accelerators maintained through gtk_widget_add/remove_accelerator()
	are not runtime changable now, the correct sequence to setup a
	widget for runtime changable accelerators is now:
	  gtk_accel_map_add_entry(accel_path, key, mods);
	  _gtk_widget_set_accel_path(widget, accel_path, accel_group);

	* gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel
	group changes (as well as mnemonic changes) through the new signal
	::accels_changed.

Sat Nov 10 12:08:56 2001  Tim Janik  <timj@gtk.org>

	* gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle
	GString->string conversions.
2001-11-13 00:53:47 +00:00
Matthias Clasen
79e4b185f6 Mass fixing of trivial doc bugs. (#63544, #57007, #64141, #63472, #57108,
* gtk/gtkiconfactory.c, gtk/gtktextbuffer.c, gtk/gtktreemodel.c,
        gtk/gtkwindow.c, gtk/gtknotebook.c, gtk/gtkradiobutton.c,
        gtk/gtktextiter.c, gtk/gtkdialog.c: Mass fixing of trivial doc bugs.
        (#63544, #57007, #64141, #63472, #57108, #60818, #61562)

        * gtk/tmpl/gtkaccellabel.sgml, gtk/tmpl/gtkcombo.sgml,
        gtk/tmpl/gtkentry.sgml, gtk/tmpl/gtkhscrollbar.sgml,
        gtk/tmpl/gtkvscrollbar.sgml, gtk/tmpl/gtktoolbar.sgml,
        gtk/tmpl/gtkdialog.sgml, gtk/tmpl/gtkstatusbar.sgml:
        Mass fixing of trivial doc bugs. (#55579, #56760, #58769, #55918,
        #64154, #60422, #54697)
2001-11-10 22:06:44 +00:00
Owen Taylor
21457ced17 Add a function gdk_window_invalidate_maybe_recurse() for use in "shallow
Sun Nov  4 16:02:08 2001  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkwindow.[ch]: Add a function gdk_window_invalidate_maybe_recurse()
        for use in "shallow invalidation" of a widget. (Windows belonging
        to the widget, but not to the widget's children)

        * gtk/gtkprivate.h gtk/gtkwidget.c gtk/gtksizegroup.c: Add private
        flags GTK_ALLOC_NEEDED, GTK_REQUEST_NEEDED.  These flags are set
        up on ancestors up to the resize container on queue_resize. Size
        requests only actually take place if GTK_REQUEST_NEEDED, size
        allocations only take place if GTK_ALLOC_NEEDED or the size
        changed.

        * gtk/gtkcontainer.c gtk/gtkwidget.c: Remove
        container->resize_widgets and the RESIZE_NEEDED flag since the
        above flags are sufficient to figure out what needs to be
        resized/reallocated. Remove code manipulating
        container->resize_widget.

        * gtk/gtkwidget.[ch]: Add gtk_widget_set_redraw_on_alloc(); this
        allows widgets to turn off being automatically invalidated is when
        they are resized.

        * gtk/gtkwidget.[ch] (gtk_widget_size_allocate): Invalidation when
        a widget is resized or moved is "shallow" as described above -
        only the windows that need to be invalidated are invalidated.

        * gtk/gtkbox.c gtk/gtktable.c gtk/gtkalignment.c docs/Changes-2.0.txt:
        Make these widget's init functions call
        gtk_widget_set_redraw_on_allocate(widget,FALSE).

        * gtk/gtkwindow.c (gtk_window_configure_event): Call
        _gtk_container_queue_resize(), since we don't want
        redrawing. (Probably could be done for other
        calls to gtk_widget_queue_resize() in gtkwindow.c,
        but this is the most important one.)

        * gtk/gtkwindow.c (gtk_window_move_resize): Don't call
        gtk_widget_queue_draw() - size_allocate() handles
        that as appropriate.

        * gtk/gtkframe.c (gtk_frame_size_allocate): Invalidate instead
        of queue_clear() to avoid invalidating children.
2001-11-04 22:57:03 +00:00
Daniel Elstner
ac81252161 Use GtkWindow* as first signal argument (was GtkWidget*).
2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>

	* gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
	signal argument (was GtkWidget*).

	* gtk/gtkwindow.c (gtk_window_frame_event),
	  gtk/gtkwindow-decorate.c (gtk_decorated_window_frame_event):
	Fixed argument types as above, removed GTK_WINDOW casts and
	added some GTK_WIDGET casts instead.
2001-11-03 23:02:40 +00:00
Owen Taylor
328d834e6d Add a gtk_window_get_focus() getter to determine the currently focused
Wed Oct 31 15:38:14 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a
	gtk_window_get_focus() getter to determine the currently
	focused widget within the window. (#63145, request
	from Damian Ivereigh)
2001-10-31 20:41:02 +00:00
Matthias Clasen
c27900c3f6 Documentation updates.
* gtk/gtkcellrenderertoggle.c, gtk/gtkimcontextsimple.c,
        gtk/gtkimmulticontext.c, gtk/gtkimagemenuitem.c,
        gtk/gtkiconfactory.c, gtk/gtkwindow.c: Documentation updates.

        * docs/reference/gtk/tmpl/gtkmenuitem.sgml,
        docs/reference/gtk/tmpl/gtkmenu.sgml,
        docs/reference/gtk/tmpl/gtkmenushell.sgml,
        docs/reference/gtk/tmpl/gtkcontainer.sgml,
        docs/reference/gtk/gtk-sections.txt: Updates.
2001-10-28 21:15:36 +00:00
Havoc Pennington
b3b97e8b08 Put notes in gtk_window_set_has_frame(), etc. docs about how these are not
2001-09-25  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkwindow.c: Put notes in gtk_window_set_has_frame(),
	etc. docs about how these are not going to do what you want for
	the X/win32 ports. Futile attempt to avoid a FAQ...
2001-09-25 06:16:55 +00:00
Owen Taylor
7837ddcde4 Don't wait for a response back from the window manager if our size hasn't
Mon Sep 24 15:09:08 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_move_resize): Don't wait for a
	response back from the window manager if our size hasn't changed
	since we won't get a response back from the window manager;
	there was code in there to do this, but it was in the wrong
	place so if the hints change and the size didn't we'd expect
	a response.

	Also, optimize the position-only-changed case by running
	the resize queue immediately, and clean up some comments
	for the changes.
2001-09-24 20:41:05 +00:00
Owen Taylor
540f15dcce Add a compat macro that got lost.
Mon Sep 24 12:48:25 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtknotebook.h: Add a compat macro that got lost.

        * gtk/gtktreestore.c: Doc fixes.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix reference
        leak for windows that receive events after being destroyed.
        (#60863, Joshua N. Pritikin)

        * gtk/gtktable.c (gtk_table_remove): Use gtk_widget_queue_resize
        rather than gtk_container_queue_resize().

        * gtk/{gtkcontainer.c,gtkwidget.c,gtkwindow.c}: _gtk prefix
        gtk_container_queue_resize, gtk_container_queue_resize_widgets,
        gtk_container_child_composite_name. (#60217.)
2001-09-24 16:54:41 +00:00
Sven Neumann
b728e2eaba configure.in gdk/Makefile.am gtk/Makefile.am gtk/gtkselection.c
2001-09-20  Sven Neumann  <sven@gimp.org>

	* configure.in
	* gdk/Makefile.am
	* gtk/Makefile.am
	* gtk/gtkselection.c
	* gtk/gtktreeview.c
	* gtk/gtkwindow.c: removed remaining traces of nanox GDK backend.
2001-09-20 16:31:21 +00:00
Kristian Rietveld
1e99d62d55 returned incorrect values for top, right and bottom due to cut-and-paste
Thu Sep 20 16:51:02 2001  Kristian Rietveld  <kristian@planet.nl>

        * gtk/gtkwindow.c (gtk_window_get_frame_dimensions): returned
        incorrect values for top, right and bottom due to cut-and-paste
        bug. Pointed out by Vitaly Tishkov, fixes bug #59008
2001-09-20 14:53:04 +00:00
Owen Taylor
2893ea15a0 Add xgettext:no-c-format comment to to handle '99% of the time. (#60473,
Wed Sep 19 15:46:29 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c: Add xgettext:no-c-format comment to
	to handle '99% of the time. (#60473, reported by Christian Rose)

	* gtk/gtkwidget.h: Remove prototype for gtk_widget_get_usize()
	which no longer exists. (#60379, reported by Vitaly Tishkov)
2001-09-19 19:51:54 +00:00
Tim Janik
e083ca9e45 fix xscale and yscale behaviour which havoc broke. they have to default to
Mon Sep 10 16:55:49 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkalignment.c (gtk_alignment_init): fix xscale and yscale
        behaviour which havoc broke. they have to default to 1.0 for
        expand behaviour.

        * gtk/gtkwindow.c (gtk_window_get_property): don't cast NULL objects.
2001-09-10 14:59:49 +00:00
Havoc Pennington
372853b107 put GtkPacker back in here so it won't be in gtk-unused.txt, but don't put
2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/gtk-sections.txt: put GtkPacker back in here so it won't be
	in gtk-unused.txt, but don't put it back in gtk-docs.sgml.

	Tons of other additions from gtk-unused.txt, but mostly skipping
	all the tree stuff for now.

2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_add_attribute):
	docs fixes

	* gtk/gtktable.c (gtk_table_get_col_spacing): docs fixes

	* gtk/gtkspinbutton.c (gtk_spin_button_get_increments): docs fixes

	* gtk/gtksocket.c (gtk_socket_steal): docs fixes

	* gtk/gtkscrolledwindow.h: docs fixes

	* gtk/gtkimage.c (gtk_image_new): docs fixes
2001-09-08 06:24:46 +00:00
Alex Larsson
27401e1e46 Removed unused function.
2001-09-07  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkcolor-fb.c:
	Removed unused function.

	* gdk/linux-fb/gdkdrawable-fb2.c
	* gdk/linux-fb/gdkfont-fb.c:
	Use PangoLanguage functions.

	* gdk/linux-fb/gdkinput.c:
	* gdk/linux-fb/gdkselection-fb.c:
	Fix const warnings.

	* gdk/linux-fb/gdkwindow-fb.c:
	Fix warning. Implement gdk_window_set_icon_list() and
	gdk_window_get_frame_extents(). (No icon support yet though.)

	* gtk/gtkwindow.c (gtk_window_get_position):
	If window->frame is set get the extents of it instead.
2001-09-08 00:30:13 +00:00
Owen Taylor
6341c2f9a2 Make the default default colormap the GdkRGB colormap, not the system
Fri Sep  7 18:50:59 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_get_default_colormap):
	Make the default default colormap the GdkRGB colormap,
	not the system colormap.

	* gtk/gtkinvisible.c (gtk_invisible_init)
	  gtk/gtkwindow.c (gtk_window_init): Set the current
	colormap, as returned by _gtk_widget_peek_colormap()
	on the widget.

	* gtk/gtkwidget.[ch]: Export _gtk_widget_peek_colormap
	to GTK+. Make it return %NULL instead of the default
	colormap if no colormap has explicitely been pushed.

	* gtk/gtkwidget.c (gtk_widget_get_colormap): Check for
	colormaps on ancestral widgets before defaulting the
	the system default colormap.

	* docs/Changes-2.0.txt: explain colormap changes.
2001-09-07 23:11:17 +00:00
Owen Taylor
a3914aaf10 Deprecate gdk_set/get_use_xshm, make gdk_set_use_xshm a noop. Remove
Fri Sep  7 18:17:47 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdk.h gdk/x11/gdkmain-x11.c: Deprecate gdk_set/get_use_xshm,
	make gdk_set_use_xshm a noop. Remove --no-xshm command line
	option. If we aren't autodetecting properly, we need
	to fix the problem, or at least make it an environment
	variable setting, to avoid problems with propagating
	to embedded children, plugins, etc.

	* gdk/gdkcolor.h: Deprecate gdk_colormap_get_system_size().

	* gdk/gdkpixbuf-render.c gdk/gdkpixbuf.h
	(gdk_pixbuf_render_pixmap_and_mask_for_colormap):
	New function to render a pixmap and mask for a particular colormap.

	* gtk/gtkwindow.c (get_pixmap_and_mask): Change to use
	gdk_pixbuf_render_pixmap_and_mask_for_colormap () instead
	of internal implementation of the same.
2001-09-07 22:33:09 +00:00
Owen Taylor
1bbf2ac7ee Make gdkx.h the only installed header from gdk/x11. All structures in
Fri Sep  7 11:51:44 2001  Owen Taylor  <otaylor@redhat.com>

      Make gdkx.h the only installed header from gdk/x11.
      All structures in gdk/x11 are opaque.

	* gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h:
	Don't install gdk{drawable,pixmap,window}-x11.h.

	* gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c:
	Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11,
	GdkVisualClass into C files.

	* gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static.

	* gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c,
	gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c}
	Add public functions to replace previously exported direct
	structure access.
	gdk_x11_colormap_get_{xdisplay,xcolormap}
	gdk_x11_cursor_get_{xdisplay,xcursor},
	gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual,
	gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage},
	gdk_x11_gc_get_{xdisplay,ximage}

	* gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo,
	GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals.

      Fix a number of variables and functions that were exported
      "accidentally" from GDK.

	* gdk/**.[ch]: gdk => _gdk for gdk_visual_init,
	gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit,
	gdk_input_exit,	gdk_windowing_exit, gdk_event_func, gdk_event_data,
	gdk_event_notify, gdk_queued_events, gdk_queued_tail,
	gdk_event_new, gdk_events_queue, gdk_events_unqueue,
	gdk_event_queue_find_first, gdk_event_queue_remove_link,
	gdk_event_queue_append, gdk_event_button_generate,
	gdk_debug_flags, gdk_default_filters, gdk_parent_root.

	* gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c,
	   gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}:
	gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks,
	gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window,
	gdk_use_xshm, gdk_input_ignore_core.

	* gdk/x11/xsettings-common.h (xsettings_list_insert): Add
	#defines to namespace functions into the private _gdk_
	namespace.

	* gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window ()
	to replace gdk_parent_root exported variable. Adjust and
	deprecate GDK_ROOT_PARENT().

	* demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix
	GDK_ROOT_PARENT usage, remove includes of port-specific
	headers.

	* gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for
	_gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core,
	gdk_input_devices, _gdk_input_windows, gdk_init_input_core.

	* gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c}
	docs/Changes-2.0.txt: Remove gdk_wm_protocols,
	gdk_wm_delete_window functions, gdk_wm_take_focus,
	use gdk_atom_intern() instead.

	* gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h}
	  gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h}
	  gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h}
	  gtk/gtkselection.c
        Unexport gdk_selection_property, just use
	gdk_atom_intern ("GDK_SELECTION").

	* gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}:
	Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type,
	GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate,
	GdkVisualprivate, gdk_x11_gc_flush.

      Make a number of public exports of variables into functions
      to increase encapsulation.

	* gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h
	gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer,
	move to gdkinternals.h. Add gdk_device_get_core_pointer ().

	* gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h
	docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code,
	gdk_error_warnings.

	* gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h}
	  docs/Changes-2.0.txt:
	s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen()
	s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow()
	Add gdk_x11_get_default_xdisplay().

	* gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c
	win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c
	gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class,
	Don't export gdk_progclass, move --class command line
	option and handling to common portion of GDK.

      Miscellaneous fixes:

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix
	g_return_val_if_fail that should have been g_return_if_fail.

	* gdk/gdkinternals.h gdk/gdkprivate.h: Move
	gdk_synthesize_window_state() to the semi-public gdkprivate.h.

	* gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded
	X11 dependency.

	* gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO:
	Remove unused gdk_key_repeat_disable/restore.

	* linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c
	x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def:
	Remove unused gdk_null_window_warnings variable.

	* gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox;
	it can be retrieved from the repository; it is too far
	from functional to be worth having people check out;
	it would be easier to start from scratch, I suspect.

	* gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID().

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

      Add some space for future expansion to multihead.

	* gdk/gdkdrawable.h: Add four reserved function pointers
	for future expansion of GdkDrawableClass.

	* gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer
	where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
Havoc Pennington
aa4298ee70 fix g_object_notify
2001-08-28  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkwindow.c (gtk_window_set_icon_list): fix g_object_notify
2001-08-29 02:45:24 +00:00
Havoc Pennington
9df0074685 add default icon
2001-08-28  Havoc Pennington  <hp@pobox.com>

	* demos/gtk-demo/main.c (setup_default_icon): add default icon

	* gtk/gtkradiobutton.c (gtk_radio_button_new_with_mnemonic):
	warning fix
	(gtk_radio_button_new_with_label): warning fix

	* gtk/gtkdnd.c: used some random GtkImage private structs,
	update to reflect GtkImage changes

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): don't check
	whether the hint is supported, just always set the icon. A task
	list might want to use it even if the WM doesn't, and the WM may
	change over time. Also, XDeleteProperty() if list == NULL.

	* gtk/gtkwindow.c (gtk_window_set_icon_list)
	(gtk_window_get_icon_list)
	(gtk_window_set_icon)
	(gtk_window_get_icon)
	(gtk_window_set_default_icon_list)
	(gtk_window_get_default_icon_list):
	new functions

	* gtk/gtk-boxed.defs (GtkIconSet): add GtkIconSet

	* gtk/gtkimage.c: Implement property support, bug #59408

	* gtk/gtkcontainer.c (gtk_container_add): make the warning message
	on reparent-without-removing-first a bit more helpful.
	Let's just destroy this FAQ.
2001-08-29 02:20:02 +00:00