Hi Prashanth,<br>
Patch looks good. Add ChangeLog. After that, Please commit.<br>
<br>
Thanks<br>
Nagappan<br><br><div><span class="gmail_quote">On 12/13/05, <b class="gmail_sendername">Prashanth Mohan</b> <<a href="mailto:prashmohan@gmail.com">prashmohan@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
i have added an API for getting the state of a textbox (editable/uneditable)<br><br>the patch is attached<br><br>Index: ldtp.c<br>===================================================================<br>RCS file: /cvs/pyldtp.old/ldtp.c,v
<br>retrieving revision 1.149<br>retrieving revision 1.151<br>diff -u -p -r1.149 -r1.151<br>--- ldtp.c 5 Dec 2005 10:19:14 -0000 1.149<br>+++ ldtp.c 13 Dec 2005 05:45:51 -0000 1.151<br>@@ -659,7 +659,7 @@ static PyObject *ldtp_main (int command)
<br> command == VERIFYSELECT || command == COMPARETEXTPROPERTY ||<br> command == CONTAINSTEXTPROPERTY || command == VERIFYCHECKROW ||<br> command == DOESROWEXIST || command == GETSTATUSBARTEXT ||<br>- command == VERIFYUNCHECKROW || command == GETSLIDERVALUE)
<br>+ command == VERIFYUNCHECKROW || command == GETSLIDERVALUE ||<br>command == GETTEXTENABLE)<br> {<br> Accessible_unref (accessible);<br> return Py_BuildValue ("i", status);<br>@@ -963,7 +963,7 @@ static PyObject *insert_text (PyObject *
<br><br> if (!PyArg_ParseTuple (args, "ssis", &window_name, &component_name,<br>&pos, text))<br> return PyErr_Format (ldtp_error, "%s %s %d", "Argument missing /<br>invalid", __FILE__, __LINE__);
<br>-<br>+<br> params = malloc (sizeof (char ) * 2);<br> params[0] = g_strdup_printf ("%s", text);<br> params[1] = g_strdup_printf ("%d", pos);<br>@@ -1018,6 +1018,18 @@ static PyObject *delete_text (PyObject *
<br> return status;<br> }<br><br>+static PyObject *get_text_state (PyObject *self, PyObject *args)<br>+{<br>+ PyObject *status;<br>+<br>+ if (!PyArg_ParseTuple (args, "ss", &window_name, &component_name))
<br>+ return PyErr_Format (ldtp_error, "%s %s %d", "Argument missing /<br>invalid", __FILE__, __LINE__);<br>+<br>+ status = ldtp_main (GETTEXTENABLE);<br>+<br>+ return status;<br>+}<br>+<br> static PyObject *show_list (PyObject *self, PyObject *args)
<br> {<br> PyObject *status;<br>@@ -2662,6 +2674,8 @@ static PyMethodDef ldtp_methods[] = {<br> "paste text"},<br> {"deletetext", (PyCFunction) delete_text, METH_VARARGS,<br> "delete text"},
<br>+ {"gettextstate", (PyCFunction) get_text_state, METH_VARARGS,<br>+ "Gets the present state of the textbox"},<br> {"showlist", (PyCFunction) show_list, METH_VARARGS,<br> "Show list"},
<br> {"verifydropdown", (PyCFunction) verify_drop_down, METH_VARARGS,<br><br>Index: text.c<br>===================================================================<br>RCS file: /cvs/pyldtp.old/text.c,v<br>retrieving revision
1.49<br>retrieving revision 1.50<br>diff -r1.49 -r1.50<br>28a29,46<br>><br>> static int get_text_state (Accessible *object)<br>> {<br>> AccessibleStateSet *state;<br>> state = Accessible_getStateSet (object);
<br>><br>> if (AccessibleStateSet_contains (state, SPI_STATE_EDITABLE))<br>> {<br>> log_msg (LOG_INFO,"TEXT: TextBox is editable");<br>> return 1; /*text box is editable*/<br>
> }<br>> else<br>> {<br>> log_msg (LOG_INFO,"TEXT: TextBox is not editable");<br>> return 0; /*text box is not editable*/<br>> }<br>> }<br>><br>617c635,637
<br>< return contains_text_property (object, params);<br>---<br>> return contains_text_property (object, params);<br>> case GETTEXTENABLE:<br>> return get_text_state (object);<br><br>Index:
gui.h<br>===================================================================<br>RCS file: /cvs/pyldtp.old/gui.h,v<br>retrieving revision 1.33<br>retrieving revision 1.34<br>diff -r1.33 -r1.34<br>228a229<br>> #define GETTEXTENABLE 312
<br><br>--<br>Prashanth Mohan<br><a href="http://prash.be">http://prash.be</a><br>---<br><br>_______________________________________________<br>LDTP-dev mailing list<br><a href="mailto:LDTP-dev@lists.freedesktop.org">LDTP-dev@lists.freedesktop.org
</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/ldtp-dev">http://lists.freedesktop.org/mailman/listinfo/ldtp-dev</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Linux Desktop Testing Project -
<a href="http://gnomebangalore.org/ldtp/index.php/Main_Page">http://gnomebangalore.org/ldtp/index.php/Main_Page</a><br>