Added method for getting an AtkRelationType from a string.
authorBill Haneman <billh@src.gnome.org>
Sat, 29 Sep 2001 18:52:37 +0000 (18:52 +0000)
committerBill Haneman <billh@src.gnome.org>
Sat, 29 Sep 2001 18:52:37 +0000 (18:52 +0000)
Rev'ed package as a result.

ChangeLog
atk/atkrelation.c
atk/atkrelation.h
atk/atkutil.c
configure.in

index 33d2359..0f01afe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sat Sep 29 19:45:00 2001  Bill Haneman <bill.haneman@sun.com>
+       
+       * configure.in (ATK_MICRO_VERSION): Version 0.6
+       (because libglade will depend on a the small api addition below)
+
+       * atk/makefile.msc (PKG_VER): Version 0.6
+
+       * atk/atkrelation.h:
+       * atk/atkrelation.c: (AtkRelationType 
+       atk_relation_type_from_string (const gchar *name)): Added method.
+
+       
 Tue Sep 25 12:08:52 2001  Owen Taylor  <otaylor@redhat.com>
 
        * configure.in (ATK_MICRO_VERSION): Version 0.5
index e248190..0511efb 100755 (executable)
@@ -72,6 +72,22 @@ atk_relation_type_register (const gchar *name)
   return (++type);
 }
 
+AtkRelationType
+atk_relation_type_from_string (const gchar *name)
+{
+  /*
+   * TODO: implement properly,
+   *  checking type namelist in conjunction with above function.
+   */
+       if ( !strcmp (name, "controlled_by") ) return ATK_RELATION_CONTROLLED_BY;
+       else if (!strcmp (name, "controller_for")) return ATK_RELATION_CONTROLLER_FOR;
+       else if (!strcmp (name, "label_for")) return ATK_RELATION_LABEL_FOR;
+       else if (!strcmp (name, "labelled_by")) return ATK_RELATION_LABELLED_BY;
+       else if (!strcmp (name, "member_of")) return ATK_RELATION_MEMBER_OF;
+       else return ATK_RELATION_NULL;
+}
+
+
 /**
  * atk_relation_new:
  * @targets: an array of pointers to #AtkObjects  
index 0d7f473..eb4cebe 100755 (executable)
@@ -76,6 +76,8 @@ GType atk_relation_get_type (void);
 
 AtkRelationType atk_relation_type_register            (const gchar *name);
 
+AtkRelationType atk_relation_type_from_string         (const gchar *name);
+
 /*
  * Create a new relation for the specified key and the specified list
  * of targets.
index c1d01a8..d02a3c6 100755 (executable)
@@ -20,6 +20,7 @@
 #include "atkutil.h"
 #include "atkmarshal.c"
 
+
 static void atk_util_class_init (AtkUtilClass *klass);
 
 GType
@@ -290,3 +291,4 @@ atk_get_toolkit_version(void)
       return NULL;
     }
 }
+
index c70fd1e..743170a 100644 (file)
@@ -26,7 +26,7 @@ dnl ==========================================================================
 
 ATK_MAJOR_VERSION=0
 ATK_MINOR_VERSION=0
-ATK_MICRO_VERSION=5
+ATK_MICRO_VERSION=6
 ATK_INTERFACE_AGE=0
 ATK_BINARY_AGE=0
 ## with 1.0 you'd insert MINOR_VERSION in here, i.e. 0.3->1.0.0->1.0.1->1.0.2