 |
ldtp.myfastforum.org Linux Desktop Testing Project - http://ldtp.freedesktop.org
|
| View previous topic :: View next topic |
| Author |
Message |
kaprasad
Joined: 02 Jan 2008 Posts: 2
|
Posted: Mon Jan 07, 2008 10:47 pm Post subject: selectevent( ) not able to select calendar events |
|
|
In Evolution, created some appointments and tried to select them with selectevent( ) command but in vain.
for ex.
selectevent ("frm*-Evolution", "calDayViewTuesday08Jan2008.Ithas3events.", "summary")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/ldtp.py", line 553, in selectevent
raise LdtpExecutionError (str (msg))
ldtp.LdtpExecutionError: "u'selectevent failed: Unable to get object handle'"
_________________ Thanks & Regards,
Prasad |
|
| Back to top |
|
 |
nagappan
Joined: 01 Jan 2008 Posts: 8 Location: Mountain View
|
Posted: Sun Jan 13, 2008 9:26 am Post subject: |
|
|
Index: calendar-view.c
===================================================================
RCS file: /cvs/ldtp/ldtp/src/calendar-view.c,v
retrieving revision 1.15
diff -u -p -r1.15 calendar-view.c
--- calendar-view.c 3 Sep 2007 09:30:55 -0000 1.15
+++ calendar-view.c 13 Jan 2008 16:38:48 -0000
@@ -31,6 +31,8 @@
#include "ldtp-command.h"
#include "ldtp-gui-comp.h"
+extern gboolean ldtp_debug;
+
static LDTPErrorCode
select_event_index (Accessible *object, long event_index, FILE *log_fp)
{
@@ -92,9 +94,10 @@ select_event (Accessible *object, char *
if (get_object_type (event) == CALENDAR_EVENT) {
char *name;
name = Accessible_getName (event);
- if (name)
- g_print ("Name: %s - Event Name: %s\n", name, event_name);
- if (event_name && (g_utf8_collate (name,app_name) > 0) && Accessible_isComponent (event)) {
+ if (ldtp_debug && name && event_name && app_name)
+ g_print ("Name: %s - Event Name: %s - app_name - %s\n", name, event_name, app_name);
+
+ if (event_name && (g_utf8_collate (name, app_name) > 0) && Accessible_isComponent (event)) {
SPIBoolean flag = FALSE;
AccessibleComponent *accessible_component;
Index: ldtp-gui.c
===================================================================
RCS file: /cvs/ldtp/ldtp/src/ldtp-gui.c,v
retrieving revision 1.36
diff -u -p -r1.36 ldtp-gui.c
--- ldtp-gui.c 3 Sep 2007 09:30:59 -0000 1.36
+++ ldtp-gui.c 13 Jan 2008 16:38:49 -0000
@@ -1529,9 +1529,25 @@ ldtp_gui_get_gui_handle (LDTPClientConte
if (ldtp_debug)
g_print ("str1: %s - str2: %s\n", str1, str2);
if (g_utf8_collate (str1, str2) != 0) {
- // Role types are not same, so we need to rescan
- Accessible_unref (component_handle);
- component_handle = NULL;
+ char *tmp_str1 = g_utf8_casefold (str1, -1);
+ char *tmp_str2 = g_utf8_casefold (str2, -1);
+ if (tmp_str1 && tmp_str2) {
+ if (ldtp_debug)
+ g_print ("tmp_str1: %s - tmp_str2: %s\n", tmp_str1, tmp_str2);
+ if (g_utf8_collate (tmp_str1, tmp_str2) != 0) {
+ // Role types are not same, so we need to rescan
+ Accessible_unref (component_handle);
+ component_handle = NULL;
+ }
+ } else {
+ // Role types are not same, so we need to rescan
+ Accessible_unref (component_handle);
+ component_handle = NULL;
+ }
+ if (tmp_str1)
+ g_free (tmp_str1);
+ if (tmp_str2)
+ g_free (tmp_str2);
}
}
if (str1)
@@ -1604,9 +1620,25 @@ ldtp_gui_get_gui_handle (LDTPClientConte
if (ldtp_debug)
g_print ("str1: %s - str2: %s\n", str1, str2);
if (g_utf8_collate (str1, str2) != 0) {
- // Role types are not same, so we need to rescan
- Accessible_unref (component_handle);
- component_handle = NULL;
+ char *tmp_str1 = g_utf8_casefold (str1, -1);
+ char *tmp_str2 = g_utf8_casefold (str2, -1);
+ if (tmp_str1 && tmp_str2) {
+ if (ldtp_debug)
+ g_print ("tmp_str1: %s - tmp_str2: %s\n", tmp_str1, tmp_str2);
+ if (g_utf8_collate (tmp_str1, tmp_str2) != 0) {
+ // Role types are not same, so we need to rescan
+ Accessible_unref (component_handle);
+ component_handle = NULL;
+ }
+ } else {
+ // Role types are not same, so we need to rescan
+ Accessible_unref (component_handle);
+ component_handle = NULL;
+ }
+ if (tmp_str1)
+ g_free (tmp_str1);
+ if (tmp_str2)
+ g_free (tmp_str2);
}
}
if (str1)
Even after the above changes, things are not working. Reason is, Accessible component grab focus doesn't work. Verified with at-poke too. You may need to file under Evolution / Gnome Calendar. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|