Add setters for the ::sensitive and ::visible properties of GtkAction.

Wed Aug 11 23:14:25 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtk.symbols:
	* gtk/gtkaction.h:
	* gtk/gtkaction.c (gtk_action_set_sensitive):
	(gtk_action_set_visible): Add setters for the ::sensitive
	and ::visible properties of GtkAction.  (#149622, David Malcolm)
This commit is contained in:
Matthias Clasen 2004-08-12 03:25:49 +00:00 committed by Matthias Clasen
parent c710d479f1
commit e6fdcff1fb
8 changed files with 114 additions and 8 deletions

View File

@ -1,3 +1,11 @@
Wed Aug 11 23:14:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_action_set_sensitive):
(gtk_action_set_visible): Add setters for the ::sensitive
and ::visible properties of GtkAction. (#149622, David Malcolm)
2004-08-11 Federico Mena Quintero <federico@ximian.com>
Fix #149422, #143457:
@ -26,11 +34,13 @@ Wed Aug 11 19:20:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreedatalist.[hc]:
* gtk/gtkliststore.c:
* gtk/gtktreestore.c: Underscore-prefix gtk_tree_data_list_compare_func.
* gtk/gtktreestore.c: Underscore-prefix
gtk_tree_data_list_compare_func.
* gtk/gtk.symbols: Remove gtk_tree_data_list_compare_func.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h any more.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h
any more.
2004-08-10 Matthias Clasen <mclasen@redhat.com>

View File

@ -1,3 +1,11 @@
Wed Aug 11 23:14:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_action_set_sensitive):
(gtk_action_set_visible): Add setters for the ::sensitive
and ::visible properties of GtkAction. (#149622, David Malcolm)
2004-08-11 Federico Mena Quintero <federico@ximian.com>
Fix #149422, #143457:
@ -26,11 +34,13 @@ Wed Aug 11 19:20:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreedatalist.[hc]:
* gtk/gtkliststore.c:
* gtk/gtktreestore.c: Underscore-prefix gtk_tree_data_list_compare_func.
* gtk/gtktreestore.c: Underscore-prefix
gtk_tree_data_list_compare_func.
* gtk/gtk.symbols: Remove gtk_tree_data_list_compare_func.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h any more.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h
any more.
2004-08-10 Matthias Clasen <mclasen@redhat.com>

View File

@ -1,3 +1,11 @@
Wed Aug 11 23:14:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_action_set_sensitive):
(gtk_action_set_visible): Add setters for the ::sensitive
and ::visible properties of GtkAction. (#149622, David Malcolm)
2004-08-11 Federico Mena Quintero <federico@ximian.com>
Fix #149422, #143457:
@ -26,11 +34,13 @@ Wed Aug 11 19:20:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreedatalist.[hc]:
* gtk/gtkliststore.c:
* gtk/gtktreestore.c: Underscore-prefix gtk_tree_data_list_compare_func.
* gtk/gtktreestore.c: Underscore-prefix
gtk_tree_data_list_compare_func.
* gtk/gtk.symbols: Remove gtk_tree_data_list_compare_func.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h any more.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h
any more.
2004-08-10 Matthias Clasen <mclasen@redhat.com>

View File

@ -1,3 +1,11 @@
Wed Aug 11 23:14:25 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk.symbols:
* gtk/gtkaction.h:
* gtk/gtkaction.c (gtk_action_set_sensitive):
(gtk_action_set_visible): Add setters for the ::sensitive
and ::visible properties of GtkAction. (#149622, David Malcolm)
2004-08-11 Federico Mena Quintero <federico@ximian.com>
Fix #149422, #143457:
@ -26,11 +34,13 @@ Wed Aug 11 19:20:34 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreedatalist.[hc]:
* gtk/gtkliststore.c:
* gtk/gtktreestore.c: Underscore-prefix gtk_tree_data_list_compare_func.
* gtk/gtktreestore.c: Underscore-prefix
gtk_tree_data_list_compare_func.
* gtk/gtk.symbols: Remove gtk_tree_data_list_compare_func.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h any more.
* gtk/makegtkalias.pl: No need to include gtktreedatalist.h
any more.
2004-08-10 Matthias Clasen <mclasen@redhat.com>

View File

@ -1,3 +1,7 @@
Wed Aug 11 23:13:02 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add new GtkAction setters.
2004-08-11 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf/Makefile.am (IGNORE_HFILES): Add gdk-pixbuf-alias.h

View File

@ -165,8 +165,10 @@ gtk_action_new
gtk_action_get_name
gtk_action_is_sensitive
gtk_action_get_sensitive
gtk_action_set_sensitive
gtk_action_is_visible
gtk_action_get_visible
gtk_action_set_visible
gtk_action_activate
gtk_action_create_icon
gtk_action_create_menu_item

View File

@ -1241,6 +1241,34 @@ gtk_action_get_sensitive (GtkAction *action)
return action->private_data->sensitive;
}
/**
* gtk_action_set_sensitive:
* @action: the action object
* @sensitive: %TRUE to make the action sensitive
*
* Sets the ::sensitive property of the action to @sensitive. Note that
* this doesn't necessarily mean effective sensitivity. See
* gtk_action_is_sensitive()
* for that.
*
* Since: 2.6
**/
void
gtk_action_set_sensitive (GtkAction *action,
gboolean sensitive)
{
g_return_if_fail (GTK_IS_ACTION (action));
sensitive = sensitive != FALSE;
if (action->private_data->sensitive != sensitive)
{
action->private_data->sensitive = sensitive;
g_object_notify (G_OBJECT (action), "sensitive");
}
}
/**
* gtk_action_is_visible:
* @action: the action object
@ -1284,6 +1312,34 @@ gtk_action_get_visible (GtkAction *action)
return action->private_data->visible;
}
/**
* gtk_action_set_visible:
* @action: the action object
* @visible: %TRUE to make the action visible
*
* Sets the ::visible property of the action to @visible. Note that
* this doesn't necessarily mean effective visibility. See
* gtk_action_is_visible()
* for that.
*
* Since: 2.6
**/
void
gtk_action_set_visible (GtkAction *action,
gboolean visible)
{
g_return_if_fail (GTK_IS_ACTION (action));
visible = visible != FALSE;
if (action->private_data->visible != visible)
{
action->private_data->visible = visible;
g_object_notify (G_OBJECT (action), "visible");
}
}
/**
* gtk_action_block_activate_from:
* @action: the action object

View File

@ -88,8 +88,12 @@ GtkAction *gtk_action_new (const gchar *name,
const gchar* gtk_action_get_name (GtkAction *action);
gboolean gtk_action_is_sensitive (GtkAction *action);
gboolean gtk_action_get_sensitive (GtkAction *action);
void gtk_action_set_sensitive (GtkAction *action,
gboolean sensitive);
gboolean gtk_action_is_visible (GtkAction *action);
gboolean gtk_action_get_visible (GtkAction *action);
void gtk_action_set_visible (GtkAction *action,
gboolean visible);
void gtk_action_activate (GtkAction *action);
GtkWidget* gtk_action_create_icon (GtkAction *action,
GtkIconSize icon_size);