From: kibergus Date: Sun, 31 Oct 2010 16:50:07 +0000 (+0000) Subject: Untested fixes for PR 1.3 X-Git-Url: https://vcs.maemo.org/git/?p=ussd-widget;a=commitdiff_plain;h=3cec11fe2aa817d26f46bbc135be2ed710c24909 Untested fixes for PR 1.3 git-svn-id: file:///svnroot/ussd-widget/trunk@41 d197f4d6-dc93-42ad-8354-0da1f58e353f --- diff --git a/ussd4all/debian/changelog b/ussd4all/debian/changelog index 9454445..7820e77 100644 --- a/ussd4all/debian/changelog +++ b/ussd4all/debian/changelog @@ -1,5 +1,6 @@ -ussd4all (0.0.1-1) unstable; urgency=low +ussd4all (0.0.3-1) unstable; urgency=low - * librtcom patcher from Dani Church and fixed event.d script - -- Alexey Guseynov Tue, 23 Jun 2010 11:21:05 +0003 + * Fixed PR 1.3 issue. postinst does not break phone if library is not + recognized. Multiple * can be entered. + -- Alexey Guseynov Tue, 03 July 2010 16:21:05 +0003 diff --git a/ussd4all/debian/control b/ussd4all/debian/control index dd4ccc0..f3e3ceb 100644 --- a/ussd4all/debian/control +++ b/ussd4all/debian/control @@ -12,7 +12,7 @@ XB-Maemo-Display-Name: USSD for all Description: Command line and GUI utility for making USSD queries This package fixes https://bugs.maemo.org/show_bug.cgi?id=10353 which nokia is unable to fix. This allows other applications to make USSD queries. XSBC-Bugtracker: https://garage.maemo.org/tracker/?group_id=1219 -Maemo-Icon-26: +XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A /wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBBRQWL9mpz0kAAAAZdEVYdENv bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAACUUlEQVRIx8WVPWgVQRSFvxtiUBD/EAkERKuJ diff --git a/ussd4all/debian/postinst b/ussd4all/debian/postinst index 280d3fd..ba7ac52 100644 --- a/ussd4all/debian/postinst +++ b/ussd4all/debian/postinst @@ -1,7 +1,10 @@ #!/bin/sh rtcompatcher.py -pkill rtcom-call-ui +if [ -f /usr/lib/librtcom-call-ui.so.0.0.0-p1 ] ; then + ln -fs /usr/lib/librtcom-call-ui.so.0.0.0-p1 /usr/lib/librtcom-call-ui.so.0 + pkill rtcom-call-ui +fi chmod +s /usr/bin/pnatd diff --git a/ussd4all/debian/postrm b/ussd4all/debian/postrm index b92c88c..e87e83f 100644 --- a/ussd4all/debian/postrm +++ b/ussd4all/debian/postrm @@ -1,5 +1,7 @@ #!/bin/sh -if [ -f /usr/lib/librtcom-call-ui.so.0.0.0.orig ] ; then - mv /usr/lib/librtcom-call-ui.so.0.0.0.orig /usr/lib/librtcom-call-ui.so.0.0.0 +if [ -f /usr/lib/librtcom-call-ui.so.0.0.0-p1 ] ; then + ln -fs /usr/lib/librtcom-call-ui.so.0.0.0 /usr/lib/librtcom-call-ui.so.0 + rm /usr/lib/librtcom-call-ui.so.0.0.0-p1 + pkill rtcom-call-ui fi return 0 diff --git a/ussd4all/rtcom/rtcompatcher.py b/ussd4all/rtcom/rtcompatcher.py index 9da9731..7d7cceb 100644 --- a/ussd4all/rtcom/rtcompatcher.py +++ b/ussd4all/rtcom/rtcompatcher.py @@ -77,7 +77,7 @@ if __name__ == '__main__': library = '/usr/lib/librtcom-call-ui.so.0.0.0' - if os.access(library+'.orig', os.F_OK): + if os.access(library+'-p1', os.F_OK): print "It looks like %s has already been patched. Aborting." % (library,) sys.exit(1) @@ -85,12 +85,12 @@ if __name__ == '__main__': if not patcher.check_md5sum(library): if not patcher.check_data(library): - message = "Your %s is not recognized. So I won't patch it." % (library,) + message = "Your %s is not recognized. So I won't patch it." % (library) subprocess.call(["dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:\""+message+"\" uint32:0 string:\"OK\""],shell=True) print message sys.exit(1) if len(sys.argv) > 1 and sys.argv[1] == '--force': - message = "Patching an unrecognized %s. Please test your system before rebooting." % (library,) + message = "Patching an unrecognized %s. Please test your system before rebooting." % (library) print message else: message = "Your %s is not recognized, but it seems to match the patterns.\nRun '%s --force' to try patching anyway, but understand that\nTHIS MAY BREAK YOUR SYSTEM. If you do, test your system thoroughly before rebooting." % (library,library,sys.argv[0]) @@ -98,5 +98,5 @@ if __name__ == '__main__': print message sys.exit(1) - shutil.copy2(library, library+'.orig') - patcher.patch_file(library) + shutil.copy2(library, library+'-p1') + patcher.patch_file(library+'-p1') diff --git a/ussd4all/src/qussd.cpp b/ussd4all/src/qussd.cpp index 9bac0eb..adaf7a1 100644 --- a/ussd4all/src/qussd.cpp +++ b/ussd4all/src/qussd.cpp @@ -294,10 +294,14 @@ class QUssd : public QMainWindow { void addStar () { if (number != tr(PROCESSING)) { - if (number[number.length()-1] == '*') { + // Do not change star if it was created more than 3 seconds before. + if (number[number.length()-1] == '*' && lastStar.elapsed() < 3*1000) { number[number.length()-1] = '+'; - } else + } else { number += "*"; + lastStar = QTime(); + lastStar.start(); + } setNumber(); } } @@ -362,6 +366,8 @@ class QUssd : public QMainWindow { QString number; QByteArray reply; + + QTime lastStar; }; int main(int argc, char *argv[]) {