]> Pileus Git - ~andy/gtk/commitdiff
Use _gtk_action_emit_activate() instead of directly emitting the activate
authorMatthias Clasen <mclasen@redhat.com>
Thu, 29 Apr 2004 21:36:30 +0000 (21:36 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 29 Apr 2004 21:36:30 +0000 (21:36 +0000)
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)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkaction.c
gtk/gtkactiongroup.c

index c2f0d1179825c6e405cd1189b7a78653b35b794e..54efeb14e982f54fb59f701ee2d293f1c12c3c7a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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-29  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/testentrycompletion.c (main): Add a missing 
index c2f0d1179825c6e405cd1189b7a78653b35b794e..54efeb14e982f54fb59f701ee2d293f1c12c3c7a 100644 (file)
@@ -1,3 +1,13 @@
+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-29  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/testentrycompletion.c (main): Add a missing 
index c2f0d1179825c6e405cd1189b7a78653b35b794e..54efeb14e982f54fb59f701ee2d293f1c12c3c7a 100644 (file)
@@ -1,3 +1,13 @@
+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-29  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/testentrycompletion.c (main): Add a missing 
index c2f0d1179825c6e405cd1189b7a78653b35b794e..54efeb14e982f54fb59f701ee2d293f1c12c3c7a 100644 (file)
@@ -1,3 +1,13 @@
+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-29  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/testentrycompletion.c (main): Add a missing 
index c2f0d1179825c6e405cd1189b7a78653b35b794e..54efeb14e982f54fb59f701ee2d293f1c12c3c7a 100644 (file)
@@ -1,3 +1,13 @@
+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-29  Matthias Clasen  <mclasen@redhat.com>
 
        * tests/testentrycompletion.c (main): Add a missing 
index 089b2a27ed29d388d3b0345dee2edfdebbf33df3..5ab6e5789022394e93bcba064627de7bfc7ceb62 100644 (file)
@@ -315,6 +315,8 @@ gtk_action_init (GtkAction *action)
   action->private_data->short_label_set = FALSE;
 
   action->private_data->accel_count = 0;
+  action->private_data->accel_group = NULL;
+  action->private_data->accel_quark = 0;
   action->private_data->accel_closure = 
     g_closure_new_object (sizeof (GClosure), G_OBJECT (action));
   g_closure_set_marshal (action->private_data->accel_closure, 
@@ -322,10 +324,6 @@ gtk_action_init (GtkAction *action)
   g_closure_ref (action->private_data->accel_closure);
   g_closure_sink (action->private_data->accel_closure);
 
-  action->private_data->accel_quark = 0;
-  action->private_data->accel_count = 0;
-  action->private_data->accel_group = NULL;
-
   action->private_data->action_group = NULL;
 
   action->private_data->proxies = NULL;
@@ -1300,7 +1298,7 @@ closure_accel_activate (GClosure     *closure,
                         gpointer      marshal_data)
 {
   if (gtk_action_is_sensitive (GTK_ACTION (closure->data)))
-    g_signal_emit (closure->data, action_signals[ACTIVATE], 0);
+    _gtk_action_emit_activate (GTK_ACTION (closure->data));
 
   /* we handled the accelerator */
   g_value_set_boolean (return_value, TRUE);
index a9318b0dbaebfb76504e6d67ffded06b8549d661..f265bd2c298a2007ca3a2e4efaa65426519914cb 100644 (file)
@@ -584,7 +584,12 @@ gtk_action_group_add_action_with_accel (GtkActionGroup *action_group,
                            action_group->private_data->name, "/", name, NULL);
 
   if (accelerator)
+    {
     gtk_accelerator_parse (accelerator, &accel_key, &accel_mods);
+      if (accel_key == 0)
+       g_warning ("Unable to parse accelerator '%s' for action '%s'",
+                  accelerator, name);
+    }
   else if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
     {
       accel_key = stock_item.keyval;