×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    6

    Controlling "menu" and "exit" labels in the UI

    I'm trying to record audio with the left soft key, and play it back with the right soft key, and I would like when I set the appiufw.app.screen to 'normal' or 'large' for it to display "record" as the label for the left key and "play" for the right key. Currently it is set to "menu" and "exit", respectively. Does anyone know how to edit these labels?

    I realize I could draw my own and set the screen size to 'full', but if there is a built-in way to it, it would probably be faster, and less code.

    Thanks.

  2. #2
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Controlling "menu" and "exit" labels in the UI

    Quote Originally Posted by bps4484
    I'm trying to record audio with the left soft key, and play it back with the right soft key, and I would like when I set the appiufw.app.screen to 'normal' or 'large' for it to display "record" as the label for the left key and "play" for the right key. Currently it is set to "menu" and "exit", respectively. Does anyone know how to edit these labels?

    I realize I could draw my own and set the screen size to 'full', but if there is a built-in way to it, it would probably be faster, and less code.

    Thanks.
    hello ,

    There's no built-in way but you can use my extension module http://cyke64.googlepages.com/UITRICKS.PYD and missing values for these labels http://cyke64.googlepages.com/key_tricks.py (because standard py_s60 don't have this function.

    Now send the both modules to phones and install them as lib modules.
    Here are the code you can write for having this behaviour
    (I suppose that you are meaning 'options' and not 'menu' ?
    Code:
    from key_tricks import *
    import uitricks
    
    # changes label smartly
    uitricks.set_text('Record',EAknSoftkeyOptions)
    uitricks.set_text('Play',EAknSoftkeyExit)
    
    # return to normal
    uitricks.set_text('Options',EAknSoftkeyOptions)
    uitricks.set_text('Exit',EAknSoftkeyExit)
    I hope that you have a 1st or 2nd phone edition (like 6600 Nokia phone) because this extension module only works with them

    I hope this can help you
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    6

    Re: Controlling "menu" and "exit" labels in the UI

    Unfortunately I'm using 3rd edition on and N80 phone.

    Darn.

  4. #4
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Controlling "menu" and "exit" labels in the UI

    Quote Originally Posted by bps4484
    Unfortunately I'm using 3rd edition on and N80 phone.

    Darn.
    You have another possibility : try to convert source code to 3rd edition !

    All source code is available !

    Look at the official wiki to this part : developping extension module for ALL platform ed
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    7

    Re: Controlling "menu" and "exit" labels in the UI

    This module doesn't work on nokia 6600 with pys60 1.3.1 !!

  6. #6
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Controlling "menu" and "exit" labels in the UI

    Quote Originally Posted by l1q1d
    This module doesn't work on nokia 6600 with pys60 1.3.1 !!
    NO !
    It works perfectly on my Nokia 6600 with pys60 1.3.1 so only my example is wrong (forgot unicode string u ) try this one :

    Code:
    from key_tricks import *
    import uitricks
    import e32
    
    e32.ao_sleep(5)
    
    # changes label smartly
    uitricks.set_text(u'Record',EAknSoftkeyOptions)
    uitricks.set_text(u'Play',EAknSoftkeyExit)
    
    e32.ao_sleep(5)
    
    # return to normal
    uitricks.set_text(u'Options',EAknSoftkeyOptions)
    uitricks.set_text(u'Exit',EAknSoftkeyExit)
    
    e32.ao_sleep(5)
    So what ?
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  7. #7
    Registered User
    Join Date
    Sep 2006
    Posts
    7

    Re: Controlling "menu" and "exit" labels in the UI

    Now it works thank you!!

  8. #8
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Controlling "menu" and "exit" labels in the UI

    Hi guys,

    Has anybody ever succeeded to build that extention for the emulator? I followed all the instructions at developping extension module for ALL platform ed, it works well when building for armi urel. But try to do the same with (I'm using VS):
    Code:
    abld build wins udeb
    Of course I cleaned everything before with:
    Code:
    C:\work\uikludges>abld clean
    C:\work\uikludges>abld reallyclean
    C:\work\uikludges>bldmake bldfiles
    TUT TUT . I get:
    Code:
    C:\work\uikludges>abld build wins udeb
      make -r  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\EXPORT.make" EXPORT VERBOSE=-s
    Nothing to do
      make -r  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\WINS.make" MAKEFILE VERBOSE=-s
    perl -S makmake.pl  -D \WORK\UIKLUDGES\UIKLUDGES   WINS
    WARNING: Frozen .DEF file \WORK\BWINS\UIKLUDGES.DEF not found - project not frozen
    'LINK.EXE' is not recognized as an internal or external command,
    operable program or batch file.
    ERROR: failed to find version information for LINK.EXE
    make: *** [MAKEFILEUIKLUDGES] Error 1
      make -r  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\WINS.make" LIBRARY VERBOSE=-s
    nmake -nologo -x - -s  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\UIKLUDGES\WINS\UIKLUDGES.WINS" LIBRARY
    process_begin: CreateProcess((null), nmake -nologo -x - -s -f \Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\UIKLUDGES\WINS\UIKLUDGES.WINS LIBRARY, ...) failed.
    make (e=2): The system cannot find the file specified.
    make: *** [LIBRARYUIKLUDGES] Error 2
      make -r  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\WINS.make" RESOURCE CFG=UDEB VERBOSE=-s
    nmake -nologo -x - -s  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\UIKLUDGES\WINS\UIKLUDGES.WINS" RESOURCEUDEB
    process_begin: CreateProcess((null), nmake -nologo -x - -s -f \Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\UIKLUDGES\WINS\UIKLUDGES.WINS RESOURCEUDEB, ...) failed.
    make (e=2): The system cannot find the file specified.
    make: *** [RESOURCEUIKLUDGES] Error 2
      make -r  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\WINS.make" TARGET CFG=UDEB VERBOSE=-s
    nmake -nologo -x - -s  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\UIKLUDGES\WINS\UIKLUDGES.WINS" UDEB
    process_begin: CreateProcess((null), nmake -nologo -x - -s -f \Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\UIKLUDGES\WINS\UIKLUDGES.WINS UDEB, ...) failed.
    make (e=2): The system cannot find the file specified.
    make: *** [TARGETUIKLUDGES] Error 2
      make -r  -f "\Symbian\8.0a\S60_2nd_FP2\EPOC32\BUILD\WORK\UIKLUDGES\WINS.make" FINAL CFG=UDEB VERBOSE=-s
    
    C:\work\uikludges>
    Is there any kind of modification to make to the source when building extention on the emulator?

  9. #9
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Finland
    Posts
    209

    Re: Controlling "menu" and "exit" labels in the UI

    Quote Originally Posted by lfd
    Has anybody ever succeeded to build that extention for the emulator?
    Checking your path might help? See:

    http://discussion.forum.nokia.com/fo...ation+link.exe

    What VS version are you using?

  10. #10
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Controlling "menu" and "exit" labels in the UI

    Oki,

    SO I got it I'm using VS .net 2003. I just had to use the Visual Studio .NET 2003 Command Prompt which has the right path...

    BTW where can I find the source for uitricks? I checked on the page but I didn't find it. It would be nice to port it also for 3rd edition.

    LFD

  11. #11
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Controlling "menu" and "exit" labels in the UI

    Quote Originally Posted by lfd
    Oki,

    SO I got it I'm using VS .net 2003. I just had to use the Visual Studio .NET 2003 Command Prompt which has the right path...

    BTW where can I find the source for uitricks? I checked on the page but I didn't find it. It would be nice to port it also for 3rd edition.

    LFD
    You can find the source because I didn't put on
    Now you can found the source on the same page

    If you succeed to make a 3rd pyd please warn me and I put the new pyd on my page !
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  12. #12
    Registered User
    Join Date
    Oct 2006
    Posts
    1

    Re: Controlling "menu" and "exit" labels in the UI

    Hello everybody.

    I have problems with uitricks and the label text Options and Back from a Form.

    My source is:

    Code:
    # -*- coding: UTF-8 -*-
    import appuifw
    from key_tricks import *
    import uitricks
    
    
    def form_inicial():
    	data = [(u'Jug.1','text', u''),(u'Jug.2','text', u''),(u'Jug.3','text', u''),(u'Jug.4','text', u'')]
    	flags = appuifw.FFormEditModeOnly
    	form = appuifw.Form(data, flags)
    	uitricks.set_text(u'hello',EAknSoftkeyOptions)
    	form.execute()
    
    form_inicial()
    But when the form appears, the key Options' text is "Options", it must be "hello", mustn't it? Then, when you save the form, the Options text is "hello", but I want to show "hello" when the form is displaying

    Anyone can give me an example how to use uitricks better?

    I'm using PyS60 1.3.1 on a Nokia 6630
    Thanks!
    Last edited by rugoli; 2006-10-06 at 12:16.

  13. #13
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Controlling "menu" and "exit" labels in the UI

    Hei rugoli,

    I'm not sure that you can take the control of the buttons label when using a form, because it has its own menu. and you have to exit to get back to your app...

    LFD
    Last edited by lfd; 2006-10-06 at 16:34.

  14. #14
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Controlling "menu" and "exit" labels in the UI

    Hei,

    I just compiled uitricks for 3rd edition phone. (download)

    It works fine on the emulator but I don't have a 3rd edition phone. So please try it and tell us if it works

    LFD

  15. #15
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Controlling "menu" and "exit" labels in the UI

    Thanks !

    But it doesn't work on my N93 (3rd ed)
    First you must remove uikludges.sisx before installing the uitricks because they used all the same UID !
    Secondly after installing uitricks.sisx the test program show following error:
    SymbianError:[Errno:-46]
    KErrPermissionDenied


    And I know why
    If you compare uikludges.sisx and uitricks.sisx with the sisinfo tool they are differences in the allowed capabilities !
    _uikludges.pyd has 5 capabilities :
    [NetworksServices LocalServices ReadUserData WriteUserData UserEnvironment]
    _uitricks.pyd has ZERO capabilities !

    So recompiled with the 5 capabilities above please

    Could you recompile keypress for 3rd also ?
    It's a more useful module
    Thanks to you
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×