Author: abrander
Date: 2010-05-28 16:18:07 +0200 (Fri, 28 May 2010)
New Revision: 3397

Modified:
   trunk/src/rs-actions.c
   trunk/src/rs-actions.h
Log:
Added rs_core_action_group_get_action().

Modified: trunk/src/rs-actions.c
===================================================================
--- trunk/src/rs-actions.c      2010-05-28 13:58:56 UTC (rev 3396)
+++ trunk/src/rs-actions.c      2010-05-28 14:18:07 UTC (rev 3397)
@@ -1239,4 +1239,26 @@
        else
                g_warning("core_action_group is NULL");
        g_static_mutex_unlock(&rs_actions_spinlock);
+}
+
+/**
+ * Get a GtkAction by name
+ * @param name The name of the action
+ * @return A GtkAction or NULL (should not be unreffed)
+ */
+extern GtkAction *
+rs_core_action_group_get_action(const gchar *name)
+{
+       GtkAction *action = NULL;
+
+       g_static_mutex_lock(&rs_actions_spinlock);
+
+       if (core_action_group)
+               action = gtk_action_group_get_action(core_action_group, name);
+       else
+               g_warning("core_action_group is NULL");
+
+       g_static_mutex_unlock(&rs_actions_spinlock);
+
+       return action;
 }
\ No newline at end of file

Modified: trunk/src/rs-actions.h
===================================================================
--- trunk/src/rs-actions.h      2010-05-28 13:58:56 UTC (rev 3396)
+++ trunk/src/rs-actions.h      2010-05-28 14:18:07 UTC (rev 3397)
@@ -56,4 +56,11 @@
  */
 extern void rs_core_action_group_add_radio_actions(const GtkRadioActionEntry 
*entries, guint n_entries, gint value, GCallback on_change, gpointer user_data);
 
+/**
+ * Get a GtkAction by name
+ * @param name The name of the action
+ * @return A GtkAction or NULL (should not be unreffed)
+ */
+extern GtkAction *rs_core_action_group_get_action(const gchar *name);
+
 #endif /* RS_ACTIONS_H */


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to