maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev (https://talk.maemo.org/showthread.php?t=51907)

CepiPerez 2010-05-05 13:15

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Uppercase first letters at firts word, and after . ! ?

I've changed this function:

Code:

def input(feed):
    text = update_text(0)

    if text == "":
        buffer.set_text(text + feed.swapcase())
    elif text[-2:] == ". ":
        buffer.set_text(text + feed.swapcase())
    elif text[-2:] == "? ":
        buffer.set_text(text + feed.swapcase())
    elif text[-2:] == "! ":
        buffer.set_text(text + feed.swapcase())
    else:
        buffer.set_text(text + feed)


tangs 2010-05-05 14:29

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
would it be possible that the keyb will appear when the device is vertical ? i mean that it will show with the accelerometer

ppriyank 2010-05-05 15:09

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Quote:

Originally Posted by ossipena (Post 644040)
improving backspace is in todo-list. now it only deletes the last character at textbox

arrows will be added as soon as I improve the text input part and backspace improvements.

I'll have to look into higlighting words etc.

thank u for the info. lovin the app. I must say.
great work

Dr. P!

aspidites 2010-05-05 15:20

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Quote:

Originally Posted by CepiPerez (Post 644510)
Uppercase first letters at firts word, and after . ! ?

I've changed this function:

Code:

def input(feed):
    text = update_text(0)

    if text == "":
        buffer.set_text(text + feed.swapcase())
    elif text[-2:] == ". ":
        buffer.set_text(text + feed.swapcase())
    elif text[-2:] == "? ":
        buffer.set_text(text + feed.swapcase())
    elif text[-2:] == "! ":
        buffer.set_text(text + feed.swapcase())
    else:
        buffer.set_text(text + feed)


Or more concisely:
Code:

def input(feed):
    text = update_text(0)
    if text == "" or text[-2:] in [". ", "? ", "! "]:
        buffer.set_text(text + feed.upper())
    else:
        buffer.set_text(text + feed)

Good Idea though.

* just making the comparison more 1:1
** new snippet more future proof, assuming user already pressed shift or caps lock.

casper27 2010-05-05 15:38

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Quote:

Originally Posted by ossipena (Post 644439)
try

Code:

apt-get install python-dbus
as root.

note to self: add that to dependencies

Worked a treat thanks again for the brilliant app.

aspidites 2010-05-05 15:42

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Quote:

Originally Posted by ossipena (Post 644040)

and I have a vision that there should be multiple layouts for the keypad. and if that is doable, qwerty keys will be there too as an option.

It's doable. I'd suggests a seperate module for it though. Some pseudo code:


vertsms.py
Code:

import keypad
...
# uncomment which ever layout you would like to use
window.add(keypad.standard)
#window.add(keypad.qwerty)
#window.add(keypad.bb) # mimicks blackberry pearl
...

keypad.py
Code:

import gtk
import hildon
...
def standard():
    table = gtk.Table(9, 3, True)
    # code defining the layout would go here
    return table

def qwerty(): pass

def bbpearl(): pass

If you glance at my repository, you'll see that I make use of SafeConfigParser, which would allow the user to change this option by changing a config file or eventually a preferences ui.

BTW, any way you can package the raw .py file instead of the binary pyc? It's probably easier for people to help contribute without having to go to the gitorious page just to have a peak at the code. Plus, using a binary file prevents the above snippet from being practical :-P

casper27 2010-05-05 18:07

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Im on UK Vodafone and have noticed that it will only send Txt to numbers that start with international code aswell ie
0044 then mobile number without the first 0 infront. Not a problem though as I will go through my entire address book and add them all if it means I can use this. Brilliant..

x61 2010-05-05 18:18

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Wonderful. You should be employed by Nokia...

ToJa92 2010-05-05 18:29

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Suggestions
  • To-button + number field should be smaller, or it should be on a different screen once you press send(AKA more space for content)
  • Send+backspace should move to the bottom, IMO
  • Display name instead of number
  • Tap and hold backspace button -> clear the whole text area
  • Tap and hold a number button -> Jump straight to the number(AKA insert the number in the SMS)

That's all I can think of now. Oh and either use a database you create or use the existing Conversations database(that would be more desirable). If you use the Conversations database, maybe you could make it more like the Conversations app, so you can read SMS'es as well.

benh_n900 2010-05-05 18:39

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Quote:

Originally Posted by ossipena (Post 644453)
it probably is. I've had reports that non-international numbers only work and international numbers only work from two different providers. shame that those can conflict, it would have been easier to fix if one case works for everyone.

hey nokia, could someone spare a tip with this issue? how is it implemented in os?

with saunalahti finland both ways work.

I am not part of Nokia, but I have worked with SMS and telecomms a lot, there are a couple of possibilities, but I haven't time right now to download and analyse your code.

When you send a text message, you may need to set the Destination and Source Type of Number and/or Numbering Plan Indicator in the SMS PDU. See https://www.watchguard.com/help/docs..._smpp_faq.html. Look for smpp-submit-dest-addr-ton and smpp-submit-dest-addr-npi

It's possible that right now that the Destination (and maybe Source) TON is not being set and picking up the default for the various providers, some of whom default to 1 (international) and some whom default to 4 (Subscriber Number).
Alternatively, you may already be setting the TON and some operators are recognising and overriding the setting, some are not.

My guess is that it's just the TON that might need changing and the NPI is fine.

Another possibility is that when you send the message you send 00nnnnnnn instead of +nnnnnnnnn. IIRC, the + is the correct thing to send as it translates to "use international routing" in the switches. The 00 prefix does the same in most countries, but I don't think it's guaranteed, whereas + is. I am not 100% sure on the accuracy of this statement though :D.

Cheers,

Ben


All times are GMT. The time now is 08:10.

vBulletin® Version 3.8.8