summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagappan <nagappan>2005-06-15 11:48:36 +0000
committernagappan <nagappan>2005-06-15 11:48:36 +0000
commit001c1217b6961539936a65166601258650680178 (patch)
treedb2f8b7939846cbcf9d2e746b809c7670285af1f
parentb694219148361e33877bf90a98324bef73aa300d (diff)
Check duplicate entries
-rw-r--r--appmap-gen.c22
-rw-r--r--parser.c525
2 files changed, 297 insertions, 250 deletions
diff --git a/appmap-gen.c b/appmap-gen.c
index 0a3236d..7b0b8be 100644
--- a/appmap-gen.c
+++ b/appmap-gen.c
@@ -30,7 +30,7 @@
typedef GHashTable Appmap;
char *application_name;
-char *appln_name;
+char *map_filename;
/*
Get accessible handle of the given application
@@ -144,9 +144,10 @@ void print_entries (char *key, char *value, char *userdata)
{
printf ("%s = %s\n", key, value);
}
+
int check_duplicate_entries (char *gui_map_filename)
{
- int fd,line_no=0;
+ int fd, line_no = 0;
FILE *fp;
GHashTable *appmap;
appmap = g_hash_table_new (&g_str_hash, &g_str_equal);
@@ -210,14 +211,14 @@ int main (int argc, char *argv[])
int leaked;
int init_error;
- if (argc != 2)
- {
- printf("Syntax: ldtp <application name>\n");
- exit(0);
- }
+ if (argc < 2)
+ {
+ printf("Syntax: appmap <application name>\n");
+ exit(0);
+ }
application_name = strdup (argv[1]);
- appln_name = strdup (argv[1]);
+ asprintf (&map_filename, "%s.map", argv[1]);
init_error = SPI_init ();
if (init_error)
@@ -230,8 +231,11 @@ int main (int argc, char *argv[])
putenv ("GNOME_ACCESSIBILITY=1");
appmap_main (application_name);
- check_duplicate_entries(appln_name);
+
+ check_duplicate_entries (map_filename);
+
free (application_name);
+ free (map_filename);
leaked = SPI_exit ();
diff --git a/parser.c b/parser.c
index 62773da..86b7219 100644
--- a/parser.c
+++ b/parser.c
@@ -32,70 +32,70 @@ static char *application_name = NULL;
static char *dialog_name = NULL;
int table =-1,
- combo_box =-1,
- page_tab_list=-1,
- page_tab = -1,
- spin_button = -1,
- push_button =-1,
- radio_button =-1,
- tree_table = -1,
- layered_pane =-1,
- text = -1,
- toggle_button =-1,
- cal_view = -1,
- panel = -1,
- label = -1;
+ combo_box = -1,
+ page_tab_list = -1,
+ page_tab = -1,
+ spin_button = -1,
+ push_button = -1,
+ radio_button = -1,
+ tree_table = -1,
+ layered_pane = -1,
+ text = -1,
+ toggle_button = -1,
+ cal_view = -1,
+ panel = -1,
+ label = -1;
void reset_count()
{
- table =-1;
- combo_box =-1;
- page_tab_list=-1;
- page_tab =-1;
- spin_button = -1,
- push_button =-1;
- radio_button =-1;
- tree_table = -1;
- layered_pane =-1;
- text = -1;
- toggle_button =-1;
- cal_view = -1;
- panel =-1;
- label = -1;
+ table = -1;
+ combo_box = -1;
+ page_tab_list = -1;
+ page_tab = -1;
+ spin_button = -1;
+ push_button = -1;
+ radio_button = -1;
+ tree_table = -1;
+ layered_pane = -1;
+ text = -1;
+ toggle_button = -1;
+ cal_view = -1;
+ panel = -1;
+ label = -1;
}
char *get_prefix(char *role)
{
- char *prefix = NULL;
- if (strcasecmp(role, "page tab" ) == 0)
- asprintf(&prefix, "%s","ptab");
- if (strcasecmp(role, "page tab list" ) == 0)
- asprintf(&prefix, "%s","ptl");
- if (strcasecmp(role, "table" ) == 0)
- asprintf(&prefix, "%s","tbl");
- if (strcasecmp(role, "combo box" ) == 0)
- asprintf(&prefix, "%s","cbo");
- if (strcasecmp(role, "spin button" ) == 0)
- asprintf(&prefix, "%s","sbtn");
- if (strcasecmp(role, "font chooser" ) == 0)
- asprintf(&prefix, "%s","dlg");
- if (strcasecmp(role, "radio button" ) == 0)
- asprintf(&prefix, "%s","rbtn");
- if (strcasecmp(role, "tree table" ) == 0)
- asprintf(&prefix, "%s","ttbl");
- if (strcasecmp(role, "layered pane" ) == 0)
- asprintf(&prefix, "%s","pane");
- if (strcasecmp(role, "frame" ) == 0)
- asprintf(&prefix, "%s","");
- if (strcasecmp(role, "dialog" ) == 0)
- asprintf(&prefix, "%s","dlg");
- if (strcasecmp(role, "Calendar view" ) == 0)
- asprintf(&prefix, "%s","calview");
- if (strcasecmp(role, "panel" ) == 0)
- asprintf(&prefix, "%s","pnl");
- if (strcasecmp(role, "label" ) == 0)
- asprintf(&prefix, "%s","lbl");
- return prefix;
+ char *prefix = NULL;
+ if (strcasecmp(role, "page tab" ) == 0)
+ asprintf(&prefix, "%s","ptab");
+ if (strcasecmp(role, "page tab list" ) == 0)
+ asprintf(&prefix, "%s","ptl");
+ if (strcasecmp(role, "table" ) == 0)
+ asprintf(&prefix, "%s","tbl");
+ if (strcasecmp(role, "combo box" ) == 0)
+ asprintf(&prefix, "%s","cbo");
+ if (strcasecmp(role, "spin button" ) == 0)
+ asprintf(&prefix, "%s","sbtn");
+ if (strcasecmp(role, "font chooser" ) == 0)
+ asprintf(&prefix, "%s","dlg");
+ if (strcasecmp(role, "radio button" ) == 0)
+ asprintf(&prefix, "%s","rbtn");
+ if (strcasecmp(role, "tree table" ) == 0)
+ asprintf(&prefix, "%s","ttbl");
+ if (strcasecmp(role, "layered pane" ) == 0)
+ asprintf(&prefix, "%s","pane");
+ if (strcasecmp(role, "frame" ) == 0)
+ asprintf(&prefix, "%s","");
+ if (strcasecmp(role, "dialog" ) == 0)
+ asprintf(&prefix, "%s","dlg");
+ if (strcasecmp(role, "Calendar view" ) == 0)
+ asprintf(&prefix, "%s","calview");
+ if (strcasecmp(role, "panel" ) == 0)
+ asprintf(&prefix, "%s","pnl");
+ if (strcasecmp(role, "label" ) == 0)
+ asprintf(&prefix, "%s","lbl");
+ return prefix;
}
char *get_parent_role (Accessible *child)
@@ -374,14 +374,14 @@ static int add_object_menu_type (FILE *fp, char *name, char *object_type, Access
Accessible *parent ;
while (temp == NULL || (strlen(temp) == 0))
- {
- parent = Accessible_getParent (object);
- temp = Accessible_getName (parent);
- Accessible_unref(parent);
- object = parent;
- }
- parent_name = strdup(temp);
- if (strchr (temp, ' '))
+ {
+ parent = Accessible_getParent (object);
+ temp = Accessible_getName (parent);
+ object = parent;
+ Accessible_unref(parent);
+ }
+ parent_name = strdup(temp);
+ if (strchr (temp, ' '))
{
char *data = NULL;
@@ -448,14 +448,14 @@ static int add_object_menu_type (FILE *fp, char *name, char *object_type, Access
Accessible *parent ;
while (temp == NULL || (strlen(temp) == 0))
- {
- parent = Accessible_getParent (object);
- temp = Accessible_getName (parent);
- Accessible_unref(parent);
- object = parent;
- }
- parent_name = strdup(temp);
- if (strchr (temp, ' '))
+ {
+ parent = Accessible_getParent (object);
+ temp = Accessible_getName (parent);
+ Accessible_unref(parent);
+ object = parent;
+ }
+ parent_name = strdup(temp);
+ if (strchr (temp, ' '))
{
char *data = NULL;
@@ -510,14 +510,14 @@ static int add_object_menu_type (FILE *fp, char *name, char *object_type, Access
Accessible *parent ;
while (temp == NULL || (strlen(temp) == 0))
- {
- parent = Accessible_getParent (object);
- temp = Accessible_getName (parent);
- Accessible_unref(parent);
- object = parent;
- }
- parent_name = strdup(temp);
- if (strchr (temp, ' '))
+ {
+ parent = Accessible_getParent (object);
+ temp = Accessible_getName (parent);
+ Accessible_unref(parent);
+ object = parent;
+ }
+ parent_name = strdup(temp);
+ if (strchr (temp, ' '))
{
char *data = NULL;
@@ -610,16 +610,16 @@ int generate_obj_info (FILE *fp, Accessible *object, char *obj_str,
}
stripped_data = data;
if (strchr (stripped_data, '{'))
- {
+ {
data = strip_delim (stripped_data, '{');
free (stripped_data);
- }
+ }
if (strcasecmp (obj_type, "push_button") == 0 &&
strchr (stripped_data, ':'))
- {
+ {
data = strip_delim (stripped_data, ':');
free (stripped_data);
- }
+ }
size = asprintf (&str_format,
"%s%s={class=%s, label=%s}\n",
obj_str,
@@ -717,7 +717,7 @@ int generate_obj_info (FILE *fp, Accessible *object, char *obj_str,
}
AccessibleRelation_unref (relation[i]);
}
- Accessible_unref (*relation);
+ Accessible_unref (*relation);
return 0;
}
else
@@ -737,16 +737,16 @@ int generate_obj_info (FILE *fp, Accessible *object, char *obj_str,
}
stripped_data = data;
if (strchr (stripped_data, '{'))
- {
+ {
data = strip_delim (stripped_data, '{');
free (stripped_data);
- }
+ }
if (strcasecmp (obj_type, "push_button") == 0 &&
strchr (stripped_data, ':'))
- {
+ {
data = strip_delim (stripped_data, ':');
free (stripped_data);
- }
+ }
size = asprintf (&str_format,
"%s%s={class=%s, label=%s}\n",
obj_str,
@@ -765,20 +765,21 @@ int generate_obj_info (FILE *fp, Accessible *object, char *obj_str,
int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
- char *obj_type, char *obj_name, char delim , int index)
+ char *obj_type, char *obj_name, char delim , int index)
{
- int size = 0;
+ int size = 0,i=0;
char *str_format = NULL , *parent_name = NULL , *prefix = NULL ,*role = NULL, *temp = NULL; ;
while (temp == NULL || (strlen (temp) == 0) )
- {
- Accessible *parent;
- parent = Accessible_getParent (object);
- temp = Accessible_getName (parent);
- role = Accessible_getRoleName(parent);
- object = parent;
- Accessible_unref(parent);
- }
+ {
+ Accessible *parent;
+ parent = Accessible_getParent (object);
+ temp = Accessible_getName (parent);
+ role = Accessible_getRoleName(parent);
+ object = parent;
+ //Accessible_unref(parent);
+ /* FIX ME : Seg faults due to this line */
+ }
prefix = get_prefix(role);
parent_name = strdup(temp);
if (strchr (temp, ' '))
@@ -800,20 +801,18 @@ int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
}
stripped_data = data;
if (strchr (stripped_data, '{'))
- {
+ {
data = strip_delim (stripped_data, '{');
free (stripped_data);
- }
- parent_name = strdup(data);
+ }
+ parent_name = strdup(data);
free (data);
}
-
- if (strchr (obj_name, ' ') &&
+ if (strchr (obj_name, ' ') &&
strcasecmp (obj_type, "spinstrip_button") != 0)
{
char *data = NULL;
char *stripped_data = NULL;
-
stripped_data = data = strip_white_space (obj_name);
if (strchr (stripped_data, delim))
{
@@ -828,17 +827,17 @@ int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
}
stripped_data = data;
if (strchr (stripped_data, '{'))
- {
+ {
data = strip_delim (stripped_data, '{');
free (stripped_data);
- }
+ }
if (strcasecmp (obj_type, "push_button") == 0 &&
strchr (stripped_data, ':'))
- {
+ {
data = strip_delim (stripped_data, ':');
free (stripped_data);
- }
+ }
size = asprintf (&str_format,
"%s%s={class=%s, label=%s}\n",
obj_str,
@@ -852,18 +851,17 @@ int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
{
int i = 0;
AccessibleRelation **relation;
-
relation = Accessible_getRelationSet (object);
if (AccessibleRelation_getNTargets (*relation) == -1)
{
- AccessibleRelation_unref (*relation);
+ AccessibleRelation_unref (*relation);
size = asprintf (&str_format,
- "%s%d={class=%s, instance_index=%d,parent=%s%s}\n",
- obj_str,
- index,
- obj_type,
- index,prefix,parent_name);
- fwrite (str_format, sizeof (char), size, fp);
+ "%s%d={class=%s, instance_index=%d,parent=%s%s}\n",
+ obj_str,
+ index,
+ obj_type,
+ index,prefix,parent_name);
+ fwrite (str_format, sizeof (char), size, fp);
free (str_format);
return 0;
}
@@ -945,14 +943,13 @@ int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
}
AccessibleRelation_unref (relation[i]);
}
- Accessible_unref (*relation);
+ Accessible_unref (*relation);
return 0;
}
else
{
char *data = NULL;
char *stripped_data = NULL;
-
if (strchr (obj_name, delim))
data = strip_delim (obj_name, delim);
else
@@ -965,16 +962,16 @@ int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
}
stripped_data = data;
if (strchr (stripped_data, '{'))
- {
+ {
data = strip_delim (stripped_data, '{');
free (stripped_data);
- }
+ }
if (strcasecmp (obj_type, "push_button") == 0 &&
strchr (stripped_data, ':'))
- {
+ {
data = strip_delim (stripped_data, ':');
free (stripped_data);
- }
+ }
size = asprintf (&str_format,
"%s%s={class=%s, label=%s}\n",
obj_str,
@@ -982,29 +979,28 @@ int generate_obj_info_index (FILE *fp, Accessible *object, char *obj_str,
obj_type,
obj_name);
free (data);
+
}
-#ifdef DEBUG
- printf ("%s", str_format);
-#endif
+
fwrite (str_format, sizeof (char), size, fp);
free (str_format);
- return 0;
+ return 0;
}
static int add_object_button_type (FILE *fp, char *name, char *object_type, Accessible *object)
{
if (strcasecmp (object_type, "push button") == 0)
{
- push_button++;
+ push_button++;
generate_obj_info_index (fp, object, "btn", "push_button", name, '.', push_button);
-// if (strcasecmp (name, "close") == 0 ||
-// strcasecmp (name, "cancel") == 0)
-// do_action (name, object, 2);
- return 0;
+ // if (strcasecmp (name, "close") == 0 ||
+ // strcasecmp (name, "cancel") == 0)
+ // do_action (name, object, 2);
+ return 0;
}
if (strcasecmp (object_type, "spin button") == 0)
{
- spin_button++;
+ spin_button++;
generate_obj_info_index (fp, object, "sbtn", "spin_button", name, ':',spin_button);
return 0;
}
@@ -1015,7 +1011,7 @@ static int add_object_button_type (FILE *fp, char *name, char *object_type, Acce
}
if (strcasecmp (object_type, "radio button") == 0)
{
- radio_button++;
+ radio_button++;
generate_obj_info_index (fp, object, "rdo", "radio_button", name, ':', radio_button);
return 0;
}
@@ -1027,7 +1023,7 @@ static int add_object_button_type (FILE *fp, char *name, char *object_type, Acce
static int is_object_page_tab_type (char *object_type)
{
- if (strcasecmp (object_type, "page tab list") == 0 ||
+ if (strcasecmp (object_type, "page tab list") == 0 ||
strcasecmp (object_type, "page tab") == 0)
{
#ifdef DEBUG
@@ -1040,120 +1036,166 @@ static int is_object_page_tab_type (char *object_type)
static int add_object_page_tab_type (FILE *fp, char *name, char *object_type, Accessible *object)
{
- if (strcasecmp (object_type, "page tab list") == 0)
+ if (strcasecmp (object_type, "page tab list") == 0)
{
- page_tab_list++;
+
+ page_tab_list++;
int size = 0;
char *str_format = NULL;
char *stripped_data = NULL;
-
- if (!dialog_name)
- {
- return -1;
+ char *parent_name = NULL,*temp=NULL;
+ Accessible *parent ;
+ /* if (!dialog_name)
+ {
+ printf("****page\n");
+ return -1;
+ }*/
+ while (temp == NULL || (strlen(temp) == 0))
+ {
+ parent = Accessible_getParent (object);
+ temp = Accessible_getName (parent);
+ object = parent;
+ Accessible_unref(parent);
}
- if (strlen(name) !=0)
- {
- if (strchr (dialog_name, ' '))
- {
- char *data = NULL;
+ parent_name=strip_white_space (temp);
+ //parent_name = strdup(temp);
+
- data = strip_white_space (dialog_name);
- stripped_data = data;
- if (strchr (stripped_data, '('))
+ if (strlen(name) !=0)
+ {
+ if (strchr (dialog_name, ' '))
{
- data = strip_delim (stripped_data, '(');
- free (stripped_data);
+ char *data = NULL;
+ data = strip_white_space (dialog_name);
+ stripped_data = data;
+ if (strchr (stripped_data, '('))
+ {
+ data = strip_delim (stripped_data, '(');
+ free (stripped_data);
+ }
+ size = asprintf (&str_format,
+ "ptl%s={class=page_tab_list}\n",
+ dialog_name);
+ free (data);
}
- size = asprintf (&str_format,
- "ptl%s={class=page_tab_list}\n",
- dialog_name);
- free (data);
+ else
+ {
+ size = asprintf (&str_format,
+ "ptl%s={class=page_tab_list}\n",
+ dialog_name);
+ }
+#ifdef DEBUG
+ printf ("%s", str_format);
+#endif
+ fwrite (str_format, sizeof (char), size, fp);
+ free (str_format);
+ return 0;
}
else
{
- size = asprintf (&str_format,
- "ptl%s={class=page_tab_list}\n",
- dialog_name);
- }
-#ifdef DEBUG
- printf ("%s", str_format);
-#endif
- fwrite (str_format, sizeof (char), size, fp);
- free (str_format);
- return 0;
- }
- else
- {
- size = asprintf (&str_format,
- "ptl%d={class=%s, instance_index=%d}\n",
- page_tab_list,
- object_type,
- page_tab_list);
- fwrite (str_format, sizeof (char), size, fp);
+ if(dialog_name)
+ {
+ size = asprintf (&str_format,
+ "ptl%s%d={class=%s, instance_index=%d, parent=%s}\n",
+ parent_name,
+ page_tab_list,
+ "page_tab_list",
+ page_tab_list,parent_name);
+ }
+ else
+ {
+ size = asprintf (&str_format,
+ "ptl%d={class=%s, instance_index=%d}\n",
+ page_tab_list,
+ "page_tab_list",
+ page_tab_list);
+ }
+ fwrite (str_format, sizeof (char), size, fp);
free (str_format);
return 0;
-
+
+ }
}
-}
if (strcasecmp (object_type, "page tab") == 0)
{
- page_tab++;
+ page_tab++;
int size = 0;
char *str_format = NULL;
char *stripped_data = NULL;
-
- if (!dialog_name)
- {
- return -1;
+ char *parent_name = NULL,*temp=NULL;
+ Accessible *parent ;
+
+ /* if (!dialog_name)
+ {
+ printf("****page\n");
+ return -1;
+ }*/
+ while (temp == NULL || (strlen(temp) == 0))
+ {
+ parent = Accessible_getParent (object);
+ temp = Accessible_getName (parent);
+ object = parent;
+ Accessible_unref(parent);
}
- if (strlen(name) !=0)
- {
- if (strchr (name, ' '))
+ parent_name=strip_white_space (temp);
+ if (strlen(name) !=0)
{
- char *data = NULL;
+ if (strchr (name, ' '))
+ {
+ char *data = NULL;
- data = strip_white_space (name);
- stripped_data = data;
- if (strchr (stripped_data, '('))
+ data = strip_white_space (name);
+ stripped_data = data;
+ if (strchr (stripped_data, '('))
+ {
+ data = strip_delim (stripped_data, '(');
+ free (stripped_data);
+ }
+ size = asprintf (&str_format,
+ "ptab%s={class=page_tab, label=%s}\n",
+ data,
+ name);
+ free (data);
+ }
+ else
{
- data = strip_delim (stripped_data, '(');
- free (stripped_data);
+ size = asprintf (&str_format,
+ "ptab%s={class=page_tab, label=%s}\n",
+ name,
+ name);
}
- size = asprintf (&str_format,
- "ptab%s={class=page_tab, label=%s}\n",
- data,
- name);
- free (data);
- }
- else
- {
- size = asprintf (&str_format,
- "ptab%s={class=page_tab, label=%s}\n",
- name,
- name);
- }
#ifdef DEBUG
- printf ("%s", str_format);
+ printf ("%s", str_format);
#endif
- fwrite (str_format, sizeof (char), size, fp);
- free (str_format);
- return 0;
- }
+ fwrite (str_format, sizeof (char), size, fp);
+ free (str_format);
+ return 0;
+ }
- else
- {
- size = asprintf (&str_format,
- "ptl%d={class=%s, instance_index=%d}\n",
- page_tab_list,
- object_type,
- page_tab_list);
- fwrite (str_format, sizeof (char), size, fp);
+ else
+ {
+ if(dialog_name)
+ {
+ size = asprintf (&str_format,
+ "ptb%d={class=%s, instance_index=%d, parent=%s }\n",
+ page_tab,
+ "page_tab",
+ page_tab,
+ parent_name);
+ }
+ else
+ size = asprintf (&str_format,
+ "ptb%d={class=%s, instance_index=%d}\n",
+ page_tab,
+ "page_tab",
+ page_tab);
+ fwrite (str_format, sizeof (char), size, fp);
free (str_format);
return 0;
- }
+ }
- }
+ }
#ifdef DEBUG
printf ("Page tab type not implemented\n");
#endif
@@ -1178,7 +1220,7 @@ static int add_object_table_type (FILE *fp, char *name, char *object_type, Acces
{
table++;
generate_obj_info_index (fp, object, "tbl", "table", name, ':', table);
- //generate_obj_info (fp, object, "tbl", "table", name, ':');
+ //generate_obj_info (fp, object, "tbl", "table", name, ':');
return 0;
}
#ifdef DEBUG
@@ -1203,7 +1245,7 @@ static int add_object_tree_table_type (FILE *fp, char *name, char *object_type,
{
if (strcasecmp (object_type, "tree table") == 0)
{
- tree_table++;
+ tree_table++;
generate_obj_info_index (fp, object, "ttbl", "tree_table", name, ':',tree_table);
return 0;
}
@@ -1230,7 +1272,7 @@ static int add_object_layered_pane_type (FILE *fp, char *name, char *object_type
{
if (strcasecmp (object_type, "layered pane") == 0)
{
- layered_pane++;
+ layered_pane++;
generate_obj_info_index (fp, object, "pane", "layered_pane", name, ':',layered_pane);
return 0;
}
@@ -1256,7 +1298,7 @@ static int add_object_text_type (FILE *fp, char *name, char *object_type, Access
{
if (strcasecmp (object_type, "text") == 0)
{
- text++;
+ text++;
generate_obj_info_index (fp, object, "txt", "text", name, ':',text);
return 0;
}
@@ -1283,7 +1325,7 @@ static int add_object_toggle_button_type (FILE *fp, char *name,
{
if (strcasecmp (object_type, "toggle button") == 0)
{
- toggle_button++;
+ toggle_button++;
generate_obj_info_index (fp, object, "tbtn", "toggle_button", name, ':',toggle_button);
return 0;
}
@@ -1310,7 +1352,7 @@ static int add_object_calendar_view_type (FILE *fp, char *name,
{
if (strcasecmp (object_type, "Calendar View") == 0)
{
- cal_view++;
+ cal_view++;
generate_obj_info_index (fp, object, "calView", "calendar_view", name, ':',cal_view);
return 0;
}
@@ -1333,11 +1375,11 @@ static int is_object_combo_box_type (char *object_type)
}
static int add_object_combo_box_type (FILE *fp, char *name,
- char *object_type, Accessible *object)
+ char *object_type, Accessible *object)
{
if (strcasecmp (object_type, "combo box") == 0)
{
- combo_box++;
+ combo_box++;
generate_obj_info_index (fp, object, "cbo", "combo_box", name, ':',combo_box);
return 0;
}
@@ -1360,11 +1402,11 @@ static int is_object_panel_type (char *object_type)
}
static int add_object_panel_type (FILE *fp, char *name,
- char *object_type, Accessible *object)
+ char *object_type, Accessible *object)
{
if (strcasecmp (object_type, "panel") == 0)
{
- panel++;
+ panel++;
generate_obj_info_index (fp, object, "pnl", "panel", name, ':',panel);
return 0;
}
@@ -1387,11 +1429,11 @@ static int is_object_label_type (char *object_type)
}
static int add_object_label_type (FILE *fp, char *name,
- char *object_type, Accessible *object)
+ char *object_type, Accessible *object)
{
if (strcasecmp (object_type, "label") == 0)
{
- label++;
+ label++;
generate_obj_info_index (fp, object, "lbl", "label", name, ':',label);
return 0;
}
@@ -1410,9 +1452,9 @@ int add_appmap_data (FILE *fp, Accessible *object)
name = Accessible_getName (object);
object_type = Accessible_getRoleName (object);
-
if (is_object_model_type (object_type))
{
+
if (window_model_count)
{
window_model_count++;
@@ -1427,6 +1469,7 @@ int add_appmap_data (FILE *fp, Accessible *object)
}
if (is_object_menu_type (object_type))
{
+
add_object_menu_type (fp, name, object_type, object);
if ( strcasecmp (object_type, "menu item") == 0 )
{
@@ -1474,8 +1517,8 @@ int add_appmap_data (FILE *fp, Accessible *object)
}
parent = child;
}
-// if (combo_box == 0)
-// do_action (name, object, 1);
+ // if (combo_box == 0)
+ // do_action (name, object, 1);
}
}
SPI_freeString (name);
@@ -1485,12 +1528,12 @@ int add_appmap_data (FILE *fp, Accessible *object)
if (is_object_button_type (object_type))
{
add_object_button_type (fp, name, object_type, object);
-
+
SPI_freeString (name);
SPI_freeString (object_type);
return 0;
}
- if (is_object_page_tab_type (object_type))
+ if (is_object_page_tab_type (object_type))
{
add_object_page_tab_type (fp, name, object_type, object);
SPI_freeString (name);
@@ -1525,35 +1568,35 @@ int add_appmap_data (FILE *fp, Accessible *object)
SPI_freeString (object_type);
return 0;
}
- if (is_object_calendar_view_type (object_type))
+ if (is_object_calendar_view_type (object_type))
{
add_object_calendar_view_type (fp, name, object_type, object);
SPI_freeString (name);
SPI_freeString (object_type);
return 0;
}
- if (is_object_combo_box_type (object_type))
+ if (is_object_combo_box_type (object_type))
{
add_object_combo_box_type (fp, name, object_type, object);
SPI_freeString (name);
SPI_freeString (object_type);
return 0;
}
- if (is_object_tree_table_type (object_type))
+ if (is_object_tree_table_type (object_type))
{
add_object_tree_table_type (fp, name, object_type, object);
SPI_freeString (name);
SPI_freeString (object_type);
return 0;
}
- if (is_object_panel_type (object_type))
+ if (is_object_panel_type (object_type))
{
add_object_panel_type (fp, name, object_type, object);
SPI_freeString (name);
SPI_freeString (object_type);
return 0;
}
- if (is_object_label_type (object_type))
+ if (is_object_label_type (object_type))
{
add_object_label_type (fp, name, object_type, object);
SPI_freeString (name);