Re: Patch for libphone-ui [was: fails to call from contacts if phone # contains any non-number?]

2010-07-03 Thread Yaroslav Halchenko
>Hey, I added the filtering to libphone-utils, and called the functions
>in libphone-ui until mickey
>>...<
Thank you Tom!!! That works great (although upgrade entirely ruined my
SHR primarily since I've not done preventive measures against running
out of space) and I had to reflash (and now getting alignment traps for
every binary I think [1]).

>  Just a note: another location for such filtering would be before
>  matching phone #s from the book with those in call log.  This
>  feature already existed for a long time, it should work I checked
>  it to work and it did, if it doesn't let me know and I'll give it
>  some more testing.
probably it does but it seems not to take into account country code...
i.e. if in phone book I have a number without country (area is
always there) code -- it doesn't get name assigned in the Phone Log


[1] http://www.onerussian.com//Linux/bugs/om/dmesg-alignment-traps
-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Patch for libphone-ui [was: fails to call from contacts if phone # contains any non-number?]

2010-06-29 Thread Yaroslav Halchenko
Hi Fox -- Thank you very much for forwarding and thank you Tom for
reply!  Indeed location felt suboptimal even for me (as I wrote "Also I
am not sure if location of phone # filtering is the best"), but I am
quite ignorant in SHR internal structure, so please take it as my
'excuse' ;)

Just a note: another location for such filtering would be before
matching phone #s from the book with those in call log.

Please let me know if I could be of any help, Tom.  Thanks in advance
for pushing this feature through.

Cheers,
Yarik

On Tue, 29 Jun 2010, Fox Mulder wrote:
> Am 22.06.2010 20:57, schrieb Yaroslav Halchenko:
> > Hi Everyone,

> > Could you please overview and accept following patches (1 is non
> > functional which I've sent to Klaus yesterday).  patch should remove any
> > symbol from the number before sending the query to initiate the call...

> > I don't have chain ready to build it for phone, but built fine on
> > desktop so should be fine? ;)  Also I am not sure if location of
> > phone # filtering is the best , and it would be great if similar would
> > be adopted for matching numbers in the phone calls log book.

> I sent your patches to Tom Hacohen who seems to be responsible for this
> area. He hasn't subscribed this list so i will forward his answer here:

> Am 29.06.2010 20:23, schrieb Tom Hacohen:
> > Mind doing me a favor? Please tell him thanks, but I have two
> > comments:
> > 1. He should send his shr patches to shr-devel.
> > 2. His patch for filtering bad input is bad, as it should be done in
> > libphone-utis and not in libphone-ui*

> > We don't want UI filtering, but we want backend system filtering. The
> > correct thing will be fixing libphone-utils,
> > adding "filter before sms, filter before call, etc" functions and
> > using them in FSO, not in the UI.

> > Thanks in advance, will hopefully do it in the weekend.

> I added Tom in CC so maybe you want to contact him yourself. :)

> ___
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community


-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Patch for libphone-ui [was: fails to call from contacts if phone # contains any non-number?]

2010-06-29 Thread Fox Mulder
Am 22.06.2010 20:57, schrieb Yaroslav Halchenko:
> Hi Everyone,
> 
> Could you please overview and accept following patches (1 is non
> functional which I've sent to Klaus yesterday).  patch should remove any
> symbol from the number before sending the query to initiate the call...
> 
> I don't have chain ready to build it for phone, but built fine on
> desktop so should be fine? ;)  Also I am not sure if location of
> phone # filtering is the best , and it would be great if similar would
> be adopted for matching numbers in the phone calls log book.

I sent your patches to Tom Hacohen who seems to be responsible for this
area. He hasn't subscribed this list so i will forward his answer here:

Am 29.06.2010 20:23, schrieb Tom Hacohen:
> Mind doing me a favor? Please tell him thanks, but I have two
> comments:
> 1. He should send his shr patches to shr-devel.
> 2. His patch for filtering bad input is bad, as it should be done in
> libphone-utis and not in libphone-ui*
>
> We don't want UI filtering, but we want backend system filtering. The
> correct thing will be fixing libphone-utils,
> adding "filter before sms, filter before call, etc" functions and
> using them in FSO, not in the UI.
>
> Thanks in advance, will hopefully do it in the weekend.

I added Tom in CC so maybe you want to contact him yourself. :)

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Patch for libphone-ui [was: fails to call from contacts if phone# contains any non-number?]

2010-06-22 Thread Yaroslav Halchenko
Hi Everyone,

Could you please overview and accept following patches (1 is non
functional which I've sent to Klaus yesterday).  patch should remove any
symbol from the number before sending the query to initiate the call...

I don't have chain ready to build it for phone, but built fine on
desktop so should be fine? ;)  Also I am not sure if location of
phone # filtering is the best , and it would be great if similar would
be adopted for matching numbers in the phone calls log book.

Thanks in advance

On Mon, 21 Jun 2010, Yaroslav Halchenko wrote:

> Hi guys,

> It has been a while since I've been observing this but finally decided
> to email after the last upgrade today.

> I have my contacts synced from gmail using PISI (Thank you Michael), I
> am using SHR, and I have somewhat a variety of formats for numbers
> specifications, e.g.

> 2345678900
> (234) 567-8900
> +1 (234) 567-8900

> etc

> the problem is, that it seems that  if there is any non-digit in the
> phone #, it fails to actually initiate the call. e.g. here is example --
> I've called contact with only numbers in phone #, then added a space
> after 1 - and it failed to call:
-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]


From 2aeea757dc8ac787cee4f50f9c753bb7815b1d37 Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko 
Date: Mon, 21 Jun 2010 16:02:23 -0400
Subject: [PATCH 1/2] ENH: non-functional -- tabs, "Initi[t]ating" spelling

---
 src/phoneui-utils-calls.c|6 +++---
 src/phoneui-utils-contacts.c |2 +-
 src/phoneui-utils-sound.c|   42 +-
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/src/phoneui-utils-calls.c b/src/phoneui-utils-calls.c
index 12833fd..12e8a5a 100644
--- a/src/phoneui-utils-calls.c
+++ b/src/phoneui-utils-calls.c
@@ -35,7 +35,7 @@ _call_initiate_callback(GObject *source, GAsyncResult *res, gpointer data)
 	int callid;
 	struct _call_pack *pack = data;
 
-callid = free_smartphone_gsm_call_initiate_finish
+	callid = free_smartphone_gsm_call_initiate_finish
 	(pack->call, res, &error);
 	if (pack->callback) {
 		pack->callback(error, callid, pack->data);
@@ -54,7 +54,7 @@ phoneui_utils_call_initiate(const char *number,
 {
 	struct _call_pack *pack;
 
-	g_message("Inititating a call to %s\n", number);
+	g_message("Initiating a call to %s\n", number);
 	pack = malloc(sizeof(*pack));
 	pack->callback = callback;
 	pack->data = userdata;
@@ -251,7 +251,7 @@ phoneui_utils_ussd_initiate(const char *request,
 {
 	struct _network_pack *pack;
 
-	g_message("Inititating a USSD request %s\n", request);
+	g_message("Initiating a USSD request %s\n", request);
 	pack = malloc(sizeof(*pack));
 	pack->callback = callback;
 	pack->data = data;
diff --git a/src/phoneui-utils-contacts.c b/src/phoneui-utils-contacts.c
index e4563e8..fe6a5f5 100644
--- a/src/phoneui-utils-contacts.c
+++ b/src/phoneui-utils-contacts.c
@@ -346,7 +346,7 @@ _contact_lookup_callback(GObject *source, GAsyncResult *res, gpointer data)
 	g_debug("_contact_lookup_callback");
 	path = free_smartphone_pim_contacts_get_single_entry_single_field_finish
 	(pack->contacts, res, &error);
-g_debug("got path %s", path);
+	g_debug("got path %s", path);
 	if (error || !path || !*path) {
 		pack->callback(error, NULL, pack->data);
 		if (error) {
diff --git a/src/phoneui-utils-sound.c b/src/phoneui-utils-sound.c
index 3c34794..4b08c60 100644
--- a/src/phoneui-utils-sound.c
+++ b/src/phoneui-utils-sound.c
@@ -556,13 +556,13 @@ phoneui_utils_sound_init(GKeyFile *keyfile)
 	int err, f;
 	char *device_name;
 	static GSourceFuncs funcs = {
-_sourcefunc_prepare,
-_sourcefunc_check,
-_sourcefunc_dispatch,
-0,
+		_sourcefunc_prepare,
+		_sourcefunc_check,
+		_sourcefunc_dispatch,
+		0,
 		0,
 		0
-};
+	};
 
 
 	sound_state = SOUND_STATE_IDLE;
@@ -714,13 +714,13 @@ _phoneui_utils_sound_volume_changed_cb(snd_hctl_elem_t *elem, unsigned int mask)
 	int volume;
 
 
-if (mask == SND_CTL_EVENT_MASK_REMOVE)
-return 0;
-if (mask & SND_CTL_EVENT_MASK_VALUE) {
-snd_ctl_elem_value_alloca(&control);
-snd_hctl_elem_read(elem, control);
-type = _phoneui_utils_sound_volume_element_to_type(elem);
-if (type != CONTROL_END) {
+	if (mask == SND_CTL_EVENT_MASK_REMOVE)
+		return 0;
+	if (mask & SND_CTL_EVENT_MASK_VALUE) {
+		snd_ctl_elem_value_alloca(&control);
+		snd_hctl_elem_read(elem, control);
+		type = _phoneui_utils_sound_volume_element_to_type(elem);
+		if (type != CONTROL_END) {
 			volume = phoneui_utils_sound_volume_get(type);
 			g_debug("Got alsa volume change for control '%s', new value: 

fails to call from contacts if phone# contains any non-number?

2010-06-21 Thread Yaroslav Halchenko
Hi guys,

It has been a while since I've been observing this but finally decided
to email after the last upgrade today.

I have my contacts synced from gmail using PISI (Thank you Michael), I
am using SHR, and I have somewhat a variety of formats for numbers
specifications, e.g.

2345678900
(234) 567-8900
+1 (234) 567-8900

etc

the problem is, that it seems that  if there is any non-digit in the
phone #, it fails to actually initiate the call. e.g. here is example --
I've called contact with only numbers in phone #, then added a space
after 1 - and it failed to call:

Successful:

==> phoneuid.log <==
2010.06.21 15:28:07.720893 [libphone-ui-shr]DEBUG: Calling callback with 
number 12345678900
2010.06.21 15:28:07.721323 [libphone-ui-shr]DEBUG: 
_list_call_number_callback: 12345678900
2010.06.21 15:28:07.721673 [libphone-ui]MESSAGE: Inititating a call to 
12345678900

2010.06.21 15:28:07.735265 [libphone-ui-shr]DEBUG: callback done
2010.06.21 15:28:07.735662 [libphone-ui-shr]DEBUG: Scheduling inwin 
destruction
2010.06.21 15:28:07.775475 [libphone-ui-shr]DEBUG: Destructing number 
selection inwin

==> fsogsmd.log <==
2010-06-21T19:28:08.160951Z [INFO]  libfsotransport <0710:2>: SRC: "%N0187" -> 
[ "EXT: I", "Both AEC and Noise reduction are active", "OK" ]
2010-06-21T19:28:08.847051Z [INFO]  libfsotransport <0710:3>: URC: [ "%CPRI: 
1,2" ]

==> phoneuid.log <==
2010.06.21 15:28:08.116505 [libphone-ui]DEBUG: _call_status_handler: 
call 1: 1
2010.06.21 15:28:08.141531 [phoneuid]   DEBUG: 
org.shr.phoneuid.CallManagement.DisplayOutgoing
2010.06.21 15:28:08.142640 [libphone-ui-shr]DEBUG: window_new
2010.06.21 15:28:08.143073 [libphone-ui-shr]DEBUG: malloc'ed
2010.06.21 15:28:08.143531 [libphone-ui-shr]DEBUG: done
2010.06.21 15:28:08.505643 [libphone-ui-shr]DEBUG: window_view_show()

and everything works as it should


Failing (just nothing happens):

==> phoneuid.log <==
2010.06.21 15:27:37.475525 [libphone-ui-shr]DEBUG: Calling callback with 
number 1 2345678900
2010.06.21 15:27:37.475961 [libphone-ui-shr]DEBUG: 
_list_call_number_callback: 1 2345678900
2010.06.21 15:27:37.476320 [libphone-ui]MESSAGE: Inititating a call to 
1 2345678900

2010.06.21 15:27:37.491266 [libphone-ui-shr]DEBUG: callback done
2010.06.21 15:27:37.491672 [libphone-ui-shr]DEBUG: Scheduling inwin 
destruction
2010.06.21 15:27:37.532375 [libphone-ui-shr]DEBUG: Destructing number 
selection inwin

==> phoneuid.log <==
2010.06.21 15:27:45.041779 [libphone-ui-shr]DEBUG: showing contact 
/org/freesmartphone/PIM/Contacts/188


I am not sure which part of the tandem here should take care about filtering
out the phone number?

Another issue that if I click 'Release' while successful call happening, I 
would get a message about:

==> phoneuid.log <==
2010.06.21 15:28:15.352924 [libphone-ui-shr]WARNING: Failed adding a 
contact: (0) Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 649, in 
_message_cb
(candidate_method, parent_method) = _method_lookup(self, method_name, 
interface_name)
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 244, in 
_method_lookup
raise UnknownMethodException('%s is not a valid method of interface %s' % 
(method_name, dbus_interface))
UnknownMethodException: org.freedesktop.DBus.Error.UnknownMethod: Unknown 
method: GetContent is not a valid method of interface 
org.freesmartphone.PIM.Contact


-- 
  .-.
=--   /v\  =
Keep in touch// \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko  /(   )\   ICQ#: 60653192
   Linux User^^-^^[17]



___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community