mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
Add missing property change notification.
2006-01-06 Matthias Clasen <mclasen@redhat.com> * gtk/gtkactiongroup.c (gtk_action_group_set_sensitive) (gtk_action_group_set_visible): Add missing property change notification.
This commit is contained in:
parent
82b5d16dd6
commit
91cde9cedf
@ -1,3 +1,9 @@
|
|||||||
|
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkactiongroup.c (gtk_action_group_set_sensitive)
|
||||||
|
(gtk_action_group_set_visible): Add missing property change
|
||||||
|
notification.
|
||||||
|
|
||||||
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserbutton.c (model_add_special): Just use the
|
* gtk/gtkfilechooserbutton.c (model_add_special): Just use the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* gtk/gtkactiongroup.c (gtk_action_group_set_sensitive)
|
||||||
|
(gtk_action_group_set_visible): Add missing property change
|
||||||
|
notification.
|
||||||
|
|
||||||
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
2006-01-06 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserbutton.c (model_add_special): Just use the
|
* gtk/gtkfilechooserbutton.c (model_add_special): Just use the
|
||||||
|
@ -251,7 +251,7 @@ gtk_action_group_class_init (GtkActionGroupClass *klass)
|
|||||||
static void
|
static void
|
||||||
remove_action (GtkAction *action)
|
remove_action (GtkAction *action)
|
||||||
{
|
{
|
||||||
g_object_set (action, "action-group", NULL, NULL);
|
g_object_set (action, I_("action-group"), NULL, NULL);
|
||||||
g_object_unref (action);
|
g_object_unref (action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +417,8 @@ gtk_action_group_get_sensitive (GtkActionGroup *action_group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cb_set_action_sensitivity (const gchar *name, GtkAction *action)
|
cb_set_action_sensitivity (const gchar *name,
|
||||||
|
GtkAction *action)
|
||||||
{
|
{
|
||||||
/* Minor optimization, the action_groups state only affects actions that are
|
/* Minor optimization, the action_groups state only affects actions that are
|
||||||
* themselves sensitive */
|
* themselves sensitive */
|
||||||
@ -435,15 +436,20 @@ cb_set_action_sensitivity (const gchar *name, GtkAction *action)
|
|||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_action_group_set_sensitive (GtkActionGroup *action_group, gboolean sensitive)
|
gtk_action_group_set_sensitive (GtkActionGroup *action_group,
|
||||||
|
gboolean sensitive)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
||||||
|
|
||||||
if (action_group->private_data->sensitive ^ sensitive)
|
sensitive = sensitive != FALSE;
|
||||||
|
|
||||||
|
if (action_group->private_data->sensitive != sensitive)
|
||||||
{
|
{
|
||||||
action_group->private_data->sensitive = sensitive;
|
action_group->private_data->sensitive = sensitive;
|
||||||
g_hash_table_foreach (action_group->private_data->actions,
|
g_hash_table_foreach (action_group->private_data->actions,
|
||||||
(GHFunc) cb_set_action_sensitivity, NULL);
|
(GHFunc) cb_set_action_sensitivity, NULL);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (action_group), "sensitive");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,7 +475,8 @@ gtk_action_group_get_visible (GtkActionGroup *action_group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cb_set_action_visiblity (const gchar *name, GtkAction *action)
|
cb_set_action_visiblity (const gchar *name,
|
||||||
|
GtkAction *action)
|
||||||
{
|
{
|
||||||
/* Minor optimization, the action_groups state only affects actions that are
|
/* Minor optimization, the action_groups state only affects actions that are
|
||||||
* themselves sensitive */
|
* themselves sensitive */
|
||||||
@ -487,15 +494,20 @@ cb_set_action_visiblity (const gchar *name, GtkAction *action)
|
|||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_action_group_set_visible (GtkActionGroup *action_group, gboolean visible)
|
gtk_action_group_set_visible (GtkActionGroup *action_group,
|
||||||
|
gboolean visible)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
||||||
|
|
||||||
if (action_group->private_data->visible ^ visible)
|
visible = visible != FALSE;
|
||||||
|
|
||||||
|
if (action_group->private_data->visible != visible)
|
||||||
{
|
{
|
||||||
action_group->private_data->visible = visible;
|
action_group->private_data->visible = visible;
|
||||||
g_hash_table_foreach (action_group->private_data->actions,
|
g_hash_table_foreach (action_group->private_data->actions,
|
||||||
(GHFunc) cb_set_action_visiblity, NULL);
|
(GHFunc) cb_set_action_visiblity, NULL);
|
||||||
|
|
||||||
|
g_object_notify (G_OBJECT (action_group), "visible");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,7 +558,7 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
|
|||||||
g_hash_table_insert (action_group->private_data->actions,
|
g_hash_table_insert (action_group->private_data->actions,
|
||||||
g_strdup (gtk_action_get_name (action)),
|
g_strdup (gtk_action_get_name (action)),
|
||||||
g_object_ref (action));
|
g_object_ref (action));
|
||||||
g_object_set (action, "action-group", action_group, NULL);
|
g_object_set (action, I_("action-group"), action_group, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -569,8 +581,8 @@ gtk_action_group_add_action (GtkActionGroup *action_group,
|
|||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
|
gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
|
||||||
GtkAction *action,
|
GtkAction *action,
|
||||||
const gchar *accelerator)
|
const gchar *accelerator)
|
||||||
{
|
{
|
||||||
gchar *accel_path;
|
gchar *accel_path;
|
||||||
guint accel_key = 0;
|
guint accel_key = 0;
|
||||||
@ -1006,10 +1018,10 @@ gtk_action_group_add_radio_actions_full (GtkActionGroup *action_group
|
|||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
**/
|
**/
|
||||||
void
|
void
|
||||||
gtk_action_group_set_translate_func (GtkActionGroup *action_group,
|
gtk_action_group_set_translate_func (GtkActionGroup *action_group,
|
||||||
GtkTranslateFunc func,
|
GtkTranslateFunc func,
|
||||||
gpointer data,
|
gpointer data,
|
||||||
GtkDestroyNotify notify)
|
GtkDestroyNotify notify)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));
|
||||||
|
|
||||||
@ -1116,7 +1128,7 @@ _gtk_action_group_emit_pre_activate (GtkActionGroup *action_group,
|
|||||||
|
|
||||||
void
|
void
|
||||||
_gtk_action_group_emit_post_activate (GtkActionGroup *action_group,
|
_gtk_action_group_emit_post_activate (GtkActionGroup *action_group,
|
||||||
GtkAction *action)
|
GtkAction *action)
|
||||||
{
|
{
|
||||||
g_signal_emit (action_group, action_group_signals[POST_ACTIVATE], 0, action);
|
g_signal_emit (action_group, action_group_signals[POST_ACTIVATE], 0, action);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user