Commit Graph

19 Commits

Author SHA1 Message Date
Matthias Clasen
cf4eb7e1ad Accept "<WINDOWTYPE>" as a valid accel path. (#144427, Philip Kendall)
* gtk/gtkaccelmap.c (_gtk_accel_path_is_valid): Accept
	"<WINDOWTYPE>" as a valid accel path.  (#144427, Philip
	Kendall)
2004-06-22 15:56:24 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Matthias Clasen
c03700734e Add change notification for GtkAccelMap, by on-demand instantiating a
Sat Feb  7 00:06:44 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaccelmap.[hc]: Add change notification for GtkAccelMap,
	by on-demand instantiating a singleton object with a "changed"
	signal.

	* gtk/gtkmarshalers.list (VOID:STRING,UINT,FLAGS): Add marshaller
	for GtkAccelMap::changed.
2004-02-06 23:37:00 +00:00
Matthias Clasen
130c18a1ea Remove accidentally committed notification stuff.
Sun Jan 11 01:55:07 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaccelmap.c: Remove accidentally committed notification stuff.
	(gtk_accel_map_lock_path):
	(gtk_accel_map_unlock_path): Path locking can now be nested, a missing
	entry is silently created during lock_path(), and treated as an error
	during unlock_path(). These changes have been requested by Tim Janik.
2004-01-11 01:05:42 +00:00
Matthias Clasen
c22143c9e0 Fix grammar of docs.
Wed Jan  7 21:42:49 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaccelmap.c (gtk_accel_map_lock_path): Fix grammar of
	docs.
2004-01-07 20:44:07 +00:00
Matthias Clasen
a5c30a3aca Add a way to lock individual accelerator paths. (#73207, reported by Havoc
Mon Dec 29 01:36:22 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaccelmap.[hc]: (gtk_accel_map_lock_path,
	gtk_accel_map_unlock_path): Add a way to lock individual accelerator
	paths.  (#73207, reported by Havoc Pennington)
2003-12-29 00:38:50 +00:00
Manish Singh
28bc53032b Deprecation cleanup
Wed Oct  9 17:40:13 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkaccelmap.c gtk/gtkfixed.[ch] gtk/gtkkeyhash.c gtk/gtkmenu.c
        gtk/gtkobject.c gtk/gtkoldeditable.c gtk/gtkrc.c gtk/gtkspinbutton.[ch]
        gtk/gtktable.[ch] gtk/gtkthemes.c: Deprecation cleanup
2002-10-10 01:02:25 +00:00
Owen Taylor
e8468d5e6d Fix problem with wrong depth being used. (#89941, Jacob Berkman.) Remove
Mon Aug  5 15:25:40 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_pixmap_and_mask_for_colormap):
        Fix problem with wrong depth being used. (#89941, Jacob
        Berkman.) Remove an unneeded 'screen' variable.

Mon Aug  5 15:04:59 2002  Owen Taylor  <otaylor@redhat.com>

        More fixes for warnings reported by David L. Cooper II

        * gtk/gtkaccelmap.c (accel_map_parse_accel_path): Use
        GdkModifierType for accel_mods. (#85856)

        * gdk/gdkdisplay.h (struct _GdkDisplay): Make button_number
        signed, since we use -1 as an 'unset' value. (#85854)

        * gdk/x11/xsettings-client.c (parse_settings): Suppress
        a warning (#85853)

        * gdk/x11/gdkfont-x11.c (gdk_font_charset_for_locale): Fix
        accidental trailing ';'. (#85846)
2002-08-05 19:28:56 +00:00
Owen Taylor
abfed60cab Fix memory leak. (#74400, Morten Welinder.)
Fri Mar 22 10:56:19 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelmap.c (gtk_accel_map_save_fd): Fix memory
        leak. (#74400, Morten Welinder.)

        * gtk/gtkaccelmap.c: Properly handle short returns from
        write() calls. (Handling EINTR isn't enough... that only
        handles the case where you were interrupted before you
        wrote a single byte.)

        * gdk/linux-fb/gdkmouse-fb.c gdk/linux-fb/gdkkeyboard-fb.c:
        Robustify against short returns from write() calls.
2002-03-22 16:06:06 +00:00
Owen Taylor
8acfd1e9de Patch from Erwann Chenede, #73900 fixing a lot of warnings with Forte CC,
Wed Mar 20 16:36:08 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/*.c: Patch from Erwann Chenede, #73900 fixing
        a lot of warnings with Forte CC, mostly implicit
        casts between void * and function pointers.

        * gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
        state field is not a GdkModifierType. (Also #73900)
2002-03-20 21:47:01 +00:00
Owen Taylor
a75a0d494b Consistently use GdkModifierType. (#66950, Mark Patton)
Tue Jan 29 21:50:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelmap.[ch] gtk/gtkbindings.[ch] gtk/gtkwidget.[ch]:
        Consistently use GdkModifierType. (#66950, Mark Patton)

        * gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
        For consistency with gtk_button_new_from_stock(), fall back
        to gtk_image_menu_item_new_with_mnemnonic(). (#65944,
        Havoc Pennington)

        * gtk/gtkitemfactory.[ch] (gtk_item_factory_path_from_widget):
        Make G_CONST_RETURN. (#68527, Matt Wilson)
2002-01-30 03:07:14 +00:00
Matthias Clasen
5c886d0b6c Documentation additions.
* gtk/gtkoldeditable.c, gtk/gtkrc.c,
        gtk/gtkstyle.c: Documentation additions.

        * gtk/gtkmenu.c (gtk_menu_set_accel_path),
        gtk/gtkmenuitem.c (gtk_menu_item_set_accel_path),
        gtk/gtkwidget.c (gtk_widget_add_accelerator): Typo and markup fixes.

        * gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Document.

        * gtk/gtkaccelmap.c (gtk_accel_map_add_filter): Explain intended use.

        * gtk/running.sgml: Add ids to some elements to make them
        addressable as link targets.
2002-01-14 23:24:02 +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
Tim Janik
1901d4ebd7 don't forget to offset the pointer by x/y_offset into the new window when
Mon Jan  7 08:48:23 2002  Tim Janik  <timj@gtk.org>

        * gtk/gtkdnd.c (gtk_drag_find_widget): don't forget to offset
        the pointer by x/y_offset into the new window when we found
        the drag destination.

        * gtk/gtkaccelmap.c (internal_change_entry): fix return code
        for simulation when the entry already contains the required
        accel key and mod.
2002-01-07 07:59:08 +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
Owen Taylor
c860866dd7 Ref-sink the tooltips object. Ref-sink the tooltips object. Fix some
Wed Nov 21 11:41:29 2001  Owen Taylor  <otaylor@redhat.com>
	* tests/testgtk.c (create_tooltips): Ref-sink the tooltips object.
	* gtk/gtktoolbar.c (gtk_toolbar_init): Ref-sink the tooltips object.
	* gtk/gtkfilesel.c (open_new_dir): Fix some constness warnings.
	* gtk/gtkaccelgroup.c: Rename gtk_accel_groups_from_acceleratable()
	back to gtk_accel_groups_from_object(), change @acceleratable
	parameter to gtk_accel_groups_activate() accordingly.
	* gtk/gtkaccelmap.c (gtk_accel_map_lookup_entry): Remove
	left-over comment about quark return.
	* gtk/gtkaccelmap.h: Fix spelling of gtk_accel_map_foreach_unfiltered().
 	* gtk/gtk-boxed.defs (GtkIconSource): added as a boxed type.
        (Patch from Matt Wilson)
	* gtk/gtkobject.c (gtk_object_finalize): Warn if a floating
	object is finalized.
2001-11-21 17:04:35 +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
Hans Breuer
d9eb9ba9d6 make it compile with msvc: !HAVE_UNISTD_H; no label without op, even if
2001-11-18  Hans Breuer  <hans@breuer.org>

	* gtk/gdkaccelmap.c : make it compile with msvc: !HAVE_UNISTD_H;
	no label without op, even if it's a no-op.

	* gtk/gtk.def :
	* gtk/makefile.msc.in : reflect marshaler split, some clean-up

	* config.h.win32.in : remove definition of HAVE_DIRENT_H
	* gtk/gtkfilesel.c : due to GDir (new in glib) DIR isn't
	required anymore, replace it.
	* gtk/queryimmodules.c : DIR -> GDir replacement, also
	getcwd() -> g_get_current_dir()

	* gdk/win32/gdkgeometry-win32.c : adapt to refactored gdkgeometry-x11.c
	Even 'noisy laugh' scolling appears to work, though I still can't
	claim to have fully understood what it is supposed to do ...
2001-11-18 15:37:13 +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