Reply
Thread Tools
Posts: 5 | Thanked: 0 times | Joined on Dec 2009 @ Saint-Petersburg, Russia
#81
New widget with regexp works fine, but dimensions of the window still remain too big (seems corresponding to reply string length before regexp-ing)
Code:
width, height = self.allocation[2], self.allocation[3]
I explicitly set width=180, height=50 and decrease radius to make the window better fit to my "reply".
Though I think it's not a "kocher" way.
 
Posts: 9 | Thanked: 6 times | Joined on Dec 2009
#82
Originally Posted by KiberGus View Post
Thank you very much. I've compiled deb with your patches and it is in garage now.
I have added gobject non-blocking i/o and started to wrap widget methods into class. If you as main author like it - then you can continue such refactoring. If not - it is possible to rewrite it without class though it adds ugly global variables (the main reason I decided to implement extra class for callback processing).

Also config file now is being read during.startup only.

Attached are diff file against version 0.0.2(sorry that not against latest one) and complete widget file.
Attached Files
File Type: gz ussd-widget.py.gz (3.5 KB, 195 views)
File Type: gz ussd-widget.regexp+nonblockingio.diff.gz (2.9 KB, 171 views)
 

The Following 3 Users Say Thank You to irmin For This Useful Post:
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#83
Originally Posted by irmin View Post
P.S. Discussing with Andre Klapper is almost always useless so don't ever spend your time trying to explain him anything. Seems that he lives in parallel universe so trying to communicate with people in this reality is a hard task for him
Andre is doing a great job but he is not the person for in-depth technical discussions. He cannot keep up with all stuff that's going on with Maemo (nobody can). He's transferring bug reports to Nokia and back, and he helps keeping the bugzilla clean and running, and sometimes takes work off us app developers by making remarks where he knows the stuff (e.g. experiences from earlier bug reports).
Yes, he sometimes asks weird questions, or doesn't get what you mean, but that's because it's impossible to keep up with all Maemo stuff.
__________________
Tidings - RSS and Podcast aggregator for Jolla - https://github.com/pycage/tidings
Cargo Dock - file/cloud manager for Jolla - https://github.com/pycage/cargodock
 

The Following 4 Users Say Thank You to pycage For This Useful Post:
Posts: 133 | Thanked: 50 times | Joined on Jan 2010 @ Dubai, UAE
#84
OK I tried installing the deb file from the garage page. I installed all dependencies..I get this error

"File "/usr/bin/ussdquery.py", Line 42, in <module>
reply = gsmdecode.decode(reply, int(encoding))
ValueError: invalid literal for int () with base 10: "

what is the matter how can I fix this

thanks in adv.
Cheers
Jackie
 
Posts: 5 | Thanked: 0 times | Joined on Dec 2009 @ Saint-Petersburg, Russia
#85
2 irmin.
Now the widget works and looks great without manually settings of the window dimensions

Thank you very much.
 
Posts: 9 | Thanked: 6 times | Joined on Dec 2009
#86
Originally Posted by 2l00Z View Post
2 irmin.
Now the widget works and looks great without manually settings of the window dimensions

Thank you very much.
Actually, as I understand, current widget box expands automatically but cannot shrink yet. When you restarted widget it began from small box with "update", and later expanded a bit to fit regexp match. There's absolutely nothing in my patch that could fix it.
So it'll keep a small size until you start experiment with regexp again.

I may be wrong as I never worked with GTK (for this patch I just copypasted existing GUI code. I hope KiberGus will find some time to add autoshrinking for widget.
 
Posts: 5 | Thanked: 0 times | Joined on Dec 2009 @ Saint-Petersburg, Russia
#87
Originally Posted by irmin View Post
So it'll keep a small size until you start experiment with regexp again.
Yes I can confirm it. I removed regexp and then I had a headache to get small box back.
 
Posts: 254 | Thanked: 122 times | Joined on Nov 2009
#88
Right now I'm making further refactoring of code. I think, I'lladd autoresize.
Erros, I've seen above means ussdquery.py didn't succeed in making query. Ussd-widgets ignores them and shows "ERROR", so they are not critical.
 

The Following User Says Thank You to KiberGus For This Useful Post:
Posts: 133 | Thanked: 50 times | Joined on Jan 2010 @ Dubai, UAE
#89
Originally Posted by KiberGus View Post
Right now I'm making further refactoring of code. I think, I'lladd autoresize.
Erros, I've seen above means ussdquery.py didn't succeed in making query. Ussd-widgets ignores them and shows "ERROR", so they are not critical.
hey there,

yes it suddenly worked after 20 mins of cont. retrying and have never gotten that error again.

Thank you
 
Andre Klapper's Avatar
Posts: 1,665 | Thanked: 1,649 times | Joined on Jun 2008 @ Praha, Czech Republic
#90
Originally Posted by irmin View Post
P.S. Discussing with Andre Klapper is almost always useless so don't ever spend your time trying to explain him anything. Seems that he lives in parallel universe so trying to communicate with people in this reality is a hard task for him
Irmin, feel free to drop me an email if you see issues with my behaviour / attitude / statements / etc.
Sometimes I'm quite direct (which might be interpreted as unfriendly by some folks), often due to lack of time, but I don't think that I've been rude so far. If you have some examples, please tell me - I'm more than willing to learn and improve.
__________________
maemo.org Bugmaster
 

The Following 2 Users Say Thank You to Andre Klapper For This Useful Post:
Reply

Tags
dial, dialing, lack of phone features, lack of quality control, sms, telephony, ussd


 
Forum Jump


All times are GMT. The time now is 22:32.