fixed sms detail view, read/unread

git-svn-id: http://www.neo1973-germany.de/svn@225 46df4e5c-bc4e-4628-a0fc-830ba316316d
main
fgau 16 years ago
parent 520c7230d4
commit 7938503330

@ -174,8 +174,8 @@ class PyneoController(object):
class_.hon_hotornot.HotOrNot(vote, dbus_interface=DIN_HOTORNOT) class_.hon_hotornot.HotOrNot(vote, dbus_interface=DIN_HOTORNOT)
@classmethod @classmethod
def show_sms_detail(class_, number): def show_sms_detail(class_, number, status):
class_.notify_callbacks("show_sms_detail", number) class_.notify_callbacks("show_sms_detail", number, status)
@classmethod @classmethod
def power_up_gsm(class_): def power_up_gsm(class_):

@ -21,10 +21,10 @@ class SmsDetail(EdjeGroup):
cursor.execute("UPDATE sms SET status='REC READ' WHERE time='%s'" %(sms_time)) cursor.execute("UPDATE sms SET status='REC READ' WHERE time='%s'" %(sms_time))
connection.commit() connection.commit()
def on_show_sms_detail(self, sms_number): def on_show_sms_detail(self, sms_number, sms_status):
connection = connect(DB_FILE_PATH) connection = connect(DB_FILE_PATH)
cursor = connection.cursor() cursor = connection.cursor()
cursor.execute("SELECT * FROM sms WHERE status='%s' ORDER BY time DESC LIMIT 1 OFFSET %s" %('REC UNREAD', sms_number)) cursor.execute("SELECT * FROM sms WHERE status='%s' ORDER BY time DESC LIMIT 1 OFFSET %s" %(sms_status, sms_number))
for row in cursor: for row in cursor:
self.part_text_set("sms_text_1", row[2] + '<br>' + row[1] + '<br>' + row[3]) self.part_text_set("sms_text_1", row[2] + '<br>' + row[1] + '<br>' + row[3])

@ -59,19 +59,19 @@ class SmsScreen(EdjeGroup):
if self.detail == False: if self.detail == False:
if source == "1": if source == "1":
PyneoController.show_sms_screen_detail() PyneoController.show_sms_screen_detail()
PyneoController.show_sms_detail(self.sms_offset) PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "2": if source == "2":
self.sms_offset += 1 self.sms_offset += 1
PyneoController.show_sms_screen_detail() PyneoController.show_sms_screen_detail()
PyneoController.show_sms_detail(self.sms_offset) PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "3": if source == "3":
self.sms_offset += 2 self.sms_offset += 2
PyneoController.show_sms_screen_detail() PyneoController.show_sms_screen_detail()
PyneoController.show_sms_detail(self.sms_offset) PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "4": if source == "4":
self.sms_offset += 3 self.sms_offset += 3
PyneoController.show_sms_screen_detail() PyneoController.show_sms_screen_detail()
PyneoController.show_sms_detail(self.sms_offset) PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "button_10": if source == "button_10":
PyneoController.show_dialer_screen() PyneoController.show_dialer_screen()
if source == "button_12": if source == "button_12":

Loading…
Cancel
Save