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

woody14619 2010-05-05 18:45

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
First, MANY thanks to the OP and all those working on this project. I've been wanting something like this for a while but haven't had time to work on it. I may have time soon, and if so will jump in and try to get T9 working. :) But by all means if someone else has time before I do, please do add it!

Quote:

Originally Posted by troff76 (Post 644457)
Messages sent via VertSMS do not appear in Conversations.
Could that be fixed?

While Nokia's source is closed, there is an API for the database they used to store SMS, IM and the like. Check out the project GlogArchive for some code on how to access it. I'm pretty sure it's an SQL-Lite database, so doing a quick connect/insert/close would probably be all it takes.

stew-b 2010-05-05 19:17

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
this is a great start,been using it today a few times.it has the potential to be as essential as fmms for all owners if we can get it to do what everyone works :) great work guys!!

ossipena 2010-05-05 19:26

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

Originally Posted by woody14619 (Post 644974)
First, MANY thanks to the OP and all those working on this project. I've been wanting something like this for a while but haven't had time to work on it. I may have time soon, and if so will jump in and try to get T9 working. :) But by all means if someone else has time before I do, please do add it!



While Nokia's source is closed, there is an API for the database they used to store SMS, IM and the like. Check out the project GlogArchive for some code on how to access it. I'm pretty sure it's an SQL-Lite database, so doing a quick connect/insert/close would probably be all it takes.

thanks for the link. I've only lurked for existing table entries from the db, haven't written anything there yet.

I'll see the link through and try to decipher the table entries. it probably isn't a hard trick at all codewise but finding out the command is a challenge.

Laughingstok 2010-05-05 19:45

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
How about doing the numbers on long press?

ossipena 2010-05-05 21:07

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
almost there with conversations db. but I must go to sleep now.

only thing missing is proper formatting of time

ossipena 2010-05-05 21:09

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

Originally Posted by Laughingstok (Post 645080)
How about doing the numbers on long press?

yes this would be logical. I'll see about it as soon as I get backspace working well enough (the functionality is almost similar with those 2)

deganegane 2010-05-05 23:55

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
cheers... tried your app today, very nice work. only one question/suggestion... when virtual keyboard is on, taping on text box automatically runs full keyboard in landscape... can't that be blocked in the app, or the only solution is disabling entirely virtual keyboard? thanks!

ossipena 2010-05-06 05:33

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

Originally Posted by qwerty12 (Post 643976)

^ simple patch to stop the OSK from popping up. Oh, I tested that under the PR 1.2 leak; I hear HILDON_GTK_INPUT_MODE_NO_SCREEN_PLUGINS may not do anything in PR 1.1.

so this should work in PR1.2? doesn't work in PR1.1.1. the most important part: can I just wait and it starts working eventually? ;)

e: and status report to here too: after I get one string manipulated a bit, it should be writable to conversations database. if my tests today go well, storing sent messages to conversations should be available in git source today.

CepiPerez 2010-05-06 13:44

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
1 Attachment(s)
@Ossipena:
I've made some tweaks, cause this app rocks and tweaking your code helps me to learn a little more python
Check this sh*t

EDIT: another tweak:

Added before:
- Buttons type selection (lowercase, uppercase, numbers)
- You can add receivers with buttons

Added now:
- Multiple receivers using space between numbers

qwerty12 2010-05-06 16:03

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

Originally Posted by ossipena (Post 645775)
so this should work in PR1.2? doesn't work in PR1.1.1. the most important part: can I just wait and it starts working eventually? ;)

Yes. A crude trick that worked in Diablo was to connect to the "focus-in-event" signal for a widget and return TRUE. Not the best of ways and it might break some things, so I'd just wait for Nokia to actually get off their asses and release PR 1.2.

BTW, I got a crude form of repeatedly deleting characters when the back button is held by connecting the backspace button to the "button-press-event" and "button-release-event" signals instead of connecting to the "pressed" signal and using that tap-and-hold stuff.
The button-press-event handler will add a timeout function that calls the backspace function repeatedly after 150ms and the button-release-event handler will remove the timeout source from the main loop. Because my implementation of the idea is pretty **** (multiple characters deleted when only one should be if the button is not released quickly enough and it tends to delete an extra character), I won't insult you by uploading a patch but maybe a better idea could be developed from that.

casper27 2010-05-06 16:29

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

Originally Posted by CepiPerez (Post 646407)
@Ossipena:
I've made some tweaks, cause this app rocks and tweaking your code helps me to learn a little more python
Check this sh*t

EDIT: another tweak:

Added before:
- Buttons type selection (lowercase, uppercase, numbers)
- You can add receivers with buttons

Added now:
- Multiple receivers using space between numbers

This app just keeps getting better :)

daperl 2010-05-06 19:15

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

Originally Posted by qwerty12 (Post 646627)
Yes. A crude trick that worked in Diablo was to connect to the "focus-in-event" signal for a widget and return TRUE. Not the best of ways and it might break some things, so I'd just wait for Nokia to actually get off their asses and release PR 1.2.

BTW, I got a crude form of repeatedly deleting characters when the back button is held by connecting the backspace button to the "button-press-event" and "button-release-event" signals instead of connecting to the "pressed" signal and using that tap-and-hold stuff.
The button-press-event handler will add a timeout function that calls the backspace function repeatedly after 150ms and the button-release-event handler will remove the timeout source from the main loop. Because my implementation of the idea is pretty **** (multiple characters deleted when only one should be if the button is not released quickly enough and it tends to delete an extra character), I won't insult you by uploading a patch but maybe a better idea could be developed from that.

I would suggest just using a variable. Make that four variables. The main loop is a single thread so all is good.

Code:

__init__ (self, ...):
    ...
    self.buttonReleased = True
    self.minimumRepeatTime = 500
    self.buttonDownTime = tomorrow
    self.repeatButtonEvent = False
    self.buttonPressID = 0
    ...

timer_cb (self, buttonPressID):
    if self.buttonReleased or buttonPressID != self.buttonPressID:
        # stop timer forever
        return False
    if not self.repeatButtonEvent:
        now = getTheTime()
        self.repeatButtonEvent = now - self.buttonDownTime >=\
            self.minimumRepeatTime
    if not self.repeatButtonEvent:
        return True
    ...
    print a character
    ...
    return True

on_button_press_event_cb (self, button, event, ...):
    ...
    self.buttonReleased = False
    self.buttonDownTime = event.time
    self.repeatButtonEvent = False
    self.buttonPressID = (self.buttonPressID + 1) % 0x7fffffff
    # I'm pretty sure this is call-by-value
    gobject.timeout_add(150, self.timer_cb, self.buttonPressID)
    ...

on_button_release_event_cb (self, ...):
    ...
    self.buttonReleased = True
    ...


daperl 2010-05-06 19:31

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Bump. Sorry, a slight oversight. Tried to fix above.

daperl 2010-05-06 22:32

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
One more fix, just to be sure. An old timer could hang around longer than it should (like me!) without a button press ID comparison, or I'm just out smarting myself.

ossipena 2010-05-07 04:42

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
please could you put all the code things to
http://talk.maemo.org/showthread.php?t=51635 ?

and lets keep this thread for feedback, feature requests etc.

e: but thanks for those, I will integrate at least something to my code.

aspidites 2010-05-07 05:27

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
Perhaps bugzilla.com would be a better place for bug/feature requests? Then at least, they could be voted on.

ossipena 2010-05-07 05:34

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

Originally Posted by aspidites (Post 647462)
Perhaps bugzilla.com would be a better place for bug/feature requests? Then at least, they could be voted on.

You are right. It probably is the best solution and clears things up at least a bit. I'll paste the link here as soon as I've created it.

ossipena 2010-05-07 13:38

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
ok now we have bugzilla
https://bugs.maemo.org/buglist.cgi?q...rtSMS&content=

and link to add a new bug:
https://bugs.maemo.org/enter_bug.cgi?product=VertSMS

ossipena 2010-05-08 15:15

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
new version should be available either now or soon. please read warning from first post

vigilius 2010-05-08 15:28

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
I don't have a user at bugzilla, but may I suggest T9 as a feature request? Just so it's visible if anyone turns up who is up for the challenge of coding it.

saxen 2010-05-08 17:08

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
i've just tried version 0.3!

it seems to work! i mean it did not screw up my phone, and after sending an sms it appeared in the conversations thread.
but it didn't show conversations thread updated, i mean the thread didn't appear in the top of the list!

i think the reason is that the thread was already there(old sms)!
btw great work, i hope to see more update soon ;)

saxen 2010-05-08 17:25

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
mmm for some strange reason thread appear on top list after few minutes! :O

mornage 2010-05-08 17:46

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
I don't have a bugzilla account so thought I'd write here instead.

I have just installed the latest version, picked a number from contacts that started 07, wrote a message and sent it. I then got a warning telling me that numbers starting 07 need to be at least 11 digits. The number definately was 11 digits because I got it from my address book (I counted the digits too).

I then went back to try and delete some numbers from the "to" field but pressing backspace deletes from the message window. To was definately selected because the onscreen keyboard popped up displaying the number.

Is it possible to add ' to the 1 key too? I like to use correct punctuation where possible :)

Edit: It's not possible to type a number in manually or edit it at all!

Edit 2: All added to bugzilla

aspidites 2010-05-08 17:54

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
**sigh** I wish people would read the feature request page... Could you add a link to the first post ossipena?

BTW, T9 is proprietary, so it will most likely never be added. On the other hand, predictive text algorithms are a different story. In fact... one user has already written a crude implementation.

ToJa92 2010-05-08 18:04

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

Originally Posted by saxen (Post 649561)
mmm for some strange reason thread appear on top list after few minutes! :O

Probably because Conversations re-read the database including time, and re-ordered all conversations.

mornage 2010-05-08 18:20

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

Originally Posted by aspidites (Post 649613)
**sigh** I wish people would read the feature request page... Could you add a link to the first post ossipena?

The first post does say this is for feature requests....

tangs 2010-05-08 19:28

Re: [ANNOUNCE] VertSMS - portrait sms'ing in extras-dev
 
What the 0.3 is bringing ? there is nothing about it in the first post

ossipena 2010-05-08 21:36

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

Originally Posted by mornage (Post 649646)
The first post does say this is for feature requests....

I'll update the first post.

I got recently a bugzilla section for this and it makes things easier: you don't have to read the entire thread through etc..

so please use bugzilla.

list from everything submitted:
https://bugs.maemo.org/buglist.cgi?q...rtSMS&content=

I add this and direct link for reporting form to the first post now

e: and there shouldn't be too much of a risk with the db, but it is not 100% proof so if rtcom-eventlogger writes stuff at the same time, db might get corrupted. I am thinking about doing the hard way and use the api meant for that. but it might take a LOT time... so if someone knows how to do it (know all the necessary info obivously because db write works but lack info how to do it via api. I am getting segmentation fault with my tries currently) please pm or post to vertsms thread in development -section.
and api sends some dbus signals too what my sqlite function lacks so that probably is the reason why things don't get updated right away.

aspidites 2010-05-08 22:32

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

Originally Posted by mornage (Post 649646)
The first post does say this is for feature requests....

But actually reading the thread would prevent duplicate requests...

mornage 2010-05-09 02:22

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

Originally Posted by aspidites (Post 649846)
But actually reading the thread would prevent duplicate requests...

OK, I see what you mean. I thought you were referring to my post, but I had read all of the thread and my feedback was not duplicated which is where my confusion came from. I see now that you were referring to the T9 post(s).


All times are GMT. The time now is 07:25.

vBulletin® Version 3.8.8