2006-06-20 Matthias Clasen <mclasen@redhat.com>
Fix handling of stock items without icons in action-based
ui. (#342458, Callum McKenzie)
* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full): Set
the stock id even if there is no icon for it.
* gtk/gtkaction.c (connect_proxy):
* gtk/gtktoolbutton.c (gtk_tool_button_construct_contents): Only
construct a stock icon if the stock item has an icon.
2006-03-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full)
(gtk_action_group_add_toggle_actions_full)
(gtk_action_group_add_radio_actions_full): Check for a stock
icon, not a stock item, when deciding whether to use stock-id
or icon-name. (#334760, Jody Goldberg)
2006-03-13 Matthias Clasen <mclasen@redhat.com>
Make actions work with named icons. (#323484, Jorn Baayen)
* gtk/gtkactiongroup.c: If the stock-id field of a GtkActionEntry
does not contain a registered stock id, interpret it as an
icon name.
* gtk/gtkaction.c: Add an icon-name property to actions and
use it for icons if a stock-id is not specified.
2006-01-07 Matthias Clasen <mclasen@redhat.com>
Fix actiongroup-action interaction that relied on
actions connecting to notify on themselves:
* gtk/gtkaction.[hc]: Factor out the code updating the
visibility/sensitivity of proxies into _gtk_action_sync_visible()
and _gtk_action_sync_sensible().
* gtk/gtkactiongroup.c: Call the new functions when the
group visibility/sensitivity changes.
2005-09-01 Matthias Clasen <mclasen@redhat.com>
* gdk/*.c: Intern some more strings.
* gtk/gtkintl.h:
* gtk/*.c: Define an I_() macro and use it instead of the
bulky g_intern_static_string().
2005-08-31 Matthias Clasen <mclasen@redhat.com>
* gdk/Makefile.am:
* gtk/Makefile.am: Intern type names in code generated by
glib-mkenums, too.
* gtk/*.c:
* gdk/x11/*.c:
* gdk/*.c: Intern type names before registering the type to avoid
unnecessary copies.
2005-04-04 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Use gtk_accel_map_change_entry(), so that reusing the same
action name works. (#170727, Paolo Borelli)
2005-03-21 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
their G_ counterparts, but also mark the name, nick
and blurb as static.
* gtk/*.c: Mark param spec strings as static, using
the new macros.
2005-03-20 Matthias Clasen <mclasen@redhat.com>
Make PLT-reduction work with gcc4, and don't include
everything in gdkalias.h:
* gtk/grk.symbols: Group symbols by header and source file.
* gtk/makegtkalias.pl: Protect definitions by the same
preprocessor symbols used to guard the headers. Move
the alias declarations to a separate file which is
produced when calling makegtkalias.pl -def
* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
this file.
* gtk/*.c: Include gtkalias.h after the other headers,
include gtkaliasdef.c at the bottom.
* gtk/*.h: Small cleanups.
2004-11-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.[hc]:
* gtk/gtkactiongroup.[hc]: Make return types G_CONST_RETURN
instead of const.
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_action_get_accel_path): Add
a function to obtain the accel path of an action. (#148106,
Michael Natterer)
2004-10-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c: Reinstate the accidentally lost addition
of gtk_action_group_translate_string().
Mon Aug 9 12:48:04 2004 Matthias Clasen <maclas@gmx.de>
Add hidden aliases for exported symbols which are
used internally in order to get rid of many PLT
entries. (#145519, Arjan van de Ven)
* gtk/Makefile.am: Add rules to generate gtk.def and
from gtk.symbols, and make make check check the abi
with abicheck.sh.
(gtk_private_h_sources): Add gtkinternals.h
(gtk_built_private_headers): Add gtkalias.h
(gtk_extra_sources): Add gtk.symbols
(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh
* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
The file can be processed by cpp to filter out certain
subsets of symbols.
* gtk/abicheck.sh: New file. Script to check the actually
symbols exported from libgtk-x11.2.0.so against the symbols
found in gtk.symbols.
* gtk/makegtkalias.pl: New file. Perl script to generate the
header containing the alias definitions for internally used
exported symbols from a list of symbols.
* gtk/gtkinternals.h: New file. An uninstalled header listing
symbols which must be exported for some reason and do not appear
in any other header.
* gtk/*.c: Include gtkalias.h
Tue Aug 3 20:16:26 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.[hc]: Make the the GtkAction{Toggle,Radio,}Entry*
arguments to the gtk_action_group_add_..._actions() functions const,
since the most common use case is to use a static array. (142334,
Mariano Suarez-Alvarez)
Mon Aug 2 00:12:16 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.c (gtk_entry_class_init):
(gtk_entry_get_alignment):
(gtk_entry_set_alignment): Document the xalign property
and its getter and setter as 2.4 additions. (#148978,
Axel Simon)
Mon Aug 2 00:11:31 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.c (gtk_ui_manager_class_init):
* gtk/gtkactiongroup.c (gtk_action_group_class_init): Use
canonical signal names in doc comments, since gtk-doc won't
pick up signal docs with underscores.
2004-05-08 Hans Breuer <hans@breuer.org>
* gtk/gtkfilesystemwin32.c (extract_icon) : finally also
create the correct mask for 'pseudo mime' icons
* gdk/win32/gdkwindow-win32.c(show_window_internal) : also
take focus_on_map into account
* gtk/gtkselection.c : g_message() only with DEBUG_SELECTION
* gtk/gtkactiongroup.c gtk/gtkcombobox.c :
... must return a value
* gdk/gdk.def gtk/gtk.def demos/gtk-demo/makefile.msc.in : updated
Thu May 6 00:24:11 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_translate_string):
New function to translate a string with translate_func.
(#135740)
2004-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaction.c (closure_accel_activate): Use
_gtk_action_emit_activate() instead of directly
emitting the activate signal. (#141429, Jody Goldberg)
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Warn people when the accelerator can not be
parsed. (#141429, Jody Goldberg)
2004-04-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkactiongroup.c (gtk_action_group_add_action): Document
possible accelerator gotcha when using this function. (#139641,
Christian Persch)
Thu Feb 19 21:26:10 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Give each radio action its own value. (#134889, Paolo Borelli)
Thu Jan 29 00:48:47 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_toggle_actions_full):
* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full): Do reference
counting on the user_data that is shared between multiple signal handlers,
to avoid calling the destroy notify multiple times. (#132447, Adam Hooper)
Wed Jan 21 23:27:14 2004 Matthias Clasen <maclas@gmx.de>
Fix#131869:
* gtk/gtkaction.c (_gtk_action_emit_activate): Hold
a reference to the group while emitting the signals.
* gtk/gtkactiongroup.c (gtk_action_group_init): Use a
destroy notify which does not only unref, but also resets
the action_group property of the action.
Fri Jan 16 23:59:01 2004 Matthias Clasen <maclas@gmx.de>
The first part of the fix for #114351 (see also
gdk-pixbuf/ChangeLog and po/ChangeLog):
* gtk/gtkintl.h:
* gdk-pixbuf/gdk-pixbuf-i18n.h:
* gdk/gdkintl.h: Define P_() for property blurbs and nicks.
* gdk/gdkdisplaymanager.c:
* gdk-pixbuf/gdk-pixbuf.c:
* modules/input/gtkimcontextxim.c:
* gtk/*.c: Mark property blurbs and nicks with P_().
* po/Makefile.in.in: Add --keyword=P_ to the xgettext
invocation, since property blurbs and nicks are
now marked with P_().
Mon Jan 12 23:40:34 2004 Matthias Clasen <maclas@gmx.de>
* tests/testmerge.c: Adjust to the new connect_proxy signals.
* gtk/gtkuimanager.c
* gtk/gtkactiongroup.c
* gtk/gtkaction.c: Move the connect_proxy and disconnect_proxy signals
from GtkAction to GtkActionGroup and proxy it on GtkUIManager. This
removes the confusion between the disconnect_/connect_proxy signals
and the (unrelated) virtual functions of the same name and aligns
the setup with the pre_/post_activate signals.
2004-01-12 Jody Goldberg <jody@gnome.org>
* gtk/gtkaction.c (connect_proxy) : only connect activate for menus
with no submenus otherwise it looks like we activate every time a
submenu opens.
2004-01-10 Jody Goldberg <jody@gnome.org>
* gtk/gtkuimanager.c (d) : Add a debug macro to quiet the spew.
s/merge_signals/ui_manager_signals/ for readability.
(gtk_ui_manager_class_init) : add pre_activate and post_activate
signals.
(cb_proxy_pre_activate) : new.
(cb_proxy_post_activate) : new.
(gtk_ui_manager_insert_action_group) : connect the proxies for
GtkActionGroup::pre/post_activate
(gtk_ui_manager_remove_action_group) : disconnect them.
* gtk/gtkactiongroup.c (gtk_action_group_class_init) : add
'sensitive', and 'visible' properties. Also add pre_activate and
post_activate signals to help deal with activations at a higher
level (eg GtkUIManager)
(gtk_action_group_init) : init sensitive and visible
(gtk_action_group_set_property) : add sensitive and visible
(gtk_action_group_get_property) : add sensitive and visible
(gtk_action_group_get_sensitive) : new.
(gtk_action_group_get_visible) : new.
(cb_set_action_sensitivity) : new with minor optimization that only
signals sensitivity changes if the action could possibly change.
(cb_set_action_visiblility) : ditto.
(gtk_action_group_set_sensitive) : new. walk the actions directly
rather than using notify::sensitive because that is simpler, easier
to read, and more efficient.
(gtk_action_group_set_visible) : ditto.
(gtk_action_group_add_action) : Each action can only be in 1 group,
set GtkAction::action_group.
(gtk_action_group_remove_action) : clear it.
(gtk_action_group_add_toggle_actions_full) : warning suppression.
(gtk_action_group_add_radio_actions_full) : warning suppression.
(_gtk_action_group_emit_pre_activate) : new protected routine for use
by GtkAction.
(_gtk_action_group_emit_post_activate) : ditto.
* gtk/gtkaction.c (gtk_action_class_init) : add 'action_group' property.
(gtk_action_init) : initialize it.
(gtk_action_get_property) : get.
(gtk_action_set_property) : set it via
(gtk_action_set_action_group) : new function.
(gtk_action_sync_sensitivity) : new routine to sync proxy sensitivity
with the logical sensitivity (action & group) rather than the simple
action::sensitivity.
(gtk_action_sync_visible) : use gtk_action_is_visible to handle
logical visibility (action & group) rather than the simple
action::visible. Use widget show/hide directly.
(connect_proxy) : handle the custom sensitivity handler.
Make the TOOL_BUTTON signals more general and support TOOL_ITEM
directly, with special cases for TOOL_BUTTON. Still not especially
good it might be useful to handle label/use_underline by parmspec
lookup. Those are likely to be implemented by custom types, and are
assumed to exist in GtkToolItem.
(disconnect_proxy) : disconnect the new sensitivity handler.
(_gtk_action_emit_activate) : add pre/post signals.
(gtk_action_activate) : use logical sensitivity.
(gtk_action_is_sensitive) : logical sensitivity.
(gtk_action_get_sensitive) : actual sensitivity.
(closure_accel_activate) : use logical sensitivity.
Wed Jan 7 23:03:32 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.h:
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel):
Remove the redundant name and stock_id parameters, adjust all callers.
2004-01-01 Jody Goldberg <jody@gnome.org>
* gtk/gtkaction.c (_GtkActionPrivate) : add visible_horizontal,
visible_vertical.
(gtk_action_class_init) : here.
(gtk_action_init) : here.
(gtk_action_set_property) : here.
(gtk_action_get_property) : here.
(connect_proxy) : and here.
2003-12-30 Jody Goldberg <jody@gnome.org>
* gtk/gtkactiongroup.c (gtk_action_group_add_action_with_accel) : new
utility routine for use in derived GtkActions with the replicated code
from.
(gtk_action_group_add_actions_full) : here.
(gtk_action_group_add_toggle_actions_full) : here.
(gtk_action_group_add_radio_actions_full) : and here.
2003-12-24 Jody Goldberg <jody@gnome.org>
* gtk/gtkactiongroup.h : Add some const to the char * in
GtkActionEntry*. We're reccomending people pass static strings to
them, and not freeing them. This stems to flood of warnings that
result.
* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full) : change
temp vars to const to match above.
(gtk_action_group_add_toggle_actions_full) : ditto.
(gtk_action_group_add_radio_actions_full) : ditto.
Wed Dec 31 02:05:39 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_actions_full):
(gtk_action_group_add_toggle_actions_full):
(gtk_action_group_add_radio_actions_full): Pull accelerator key
from the stock item if stock_id is given, but accelerator
not. (Noticed by Jeff Franks and Jody Goldberg)
* tests/testmerge.c: Remove the accelerator from the "Open" entry
to test the above change.
Fri Dec 26 23:24:35 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Don't use first_action without initializing it if n_entries is 0.
Sat Oct 25 23:30:13 2003 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.c (gtk_action_group_class_init): Add "name"
as a construct-only property. (#125475, Murray Cumming)
2003-09-22 Matthias Clasen <maclas@gmx.de>
* tests/testmerge.c (main): Initially activate the JUSTIFY_RIGHT
group member to test the fix for #122904.
* gtk/gtkactiongroup.c (gtk_action_group_add_radio_actions_full):
Add the action to the group before activating it, otherwise we
may end up with multiple active group members. (#122904, Marco
Pesenti Gritti)
2003-09-15 Matthias Clasen <maclas@gmx.de>
* gtk/gtkactiongroup.[hc]: (gtk_action_group_add_radio_actions):
(gtk_action_group_add_radio_actions_full): Add value parameter to allow
setting the currently selected group member before connecting signals.
(GtkToggleActionEntry): Separate struct for constructing toggle actions,
including a boolean to initialize the action state before connecting
signals.
(gtk_action_group_add_toggle_actions):
(gtk_action_group_add_toggle_actions_full): New functions to construct
toggle actions from an array of GtkToggleActionEntries.
* demos/gtk-demo/appwindow.c:
* tests/testactions.c:
* tests/testmerge.c: Adjust to new action group API.
* gtk/gtk-sections.txt: Add gtk_action_group_add_toggle_actions[_full].