OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Application Icon On Qtopia Taskbar, Icons for applications in Qtopia
misha
post Jan 29 2008, 04:50 AM
Post #1





Group: Members
Posts: 7
Joined: 9-October 07
Member No.: 20,805



Hello,

I'm trying to get my application's icon to get onto the Qtopia taskbar. I have the following appname.desktop file:

[Desktop Entry]
Comment=Spaced Repetition Software
Exec=anki.sh
Categories=
Icon=anki.png
Type=Application
Name=Anki
Display=640x480/144dpi,480x640/144dpi

anki.sh lives in /home/QtPalmtop/bin and contains:

/usr/bin/env PYTHONPATH=/home/QtPalmtop/lib/python2.4 /home/zaurus/Documents/python/main.py

The application icon appears in the main launcher. If I click it, the application launches, but I don't see the application icon on the task bar (the place where currently open applications are listed). So if I move away to another application, there is no way to get back to Anki because there is no task bar icon.

Can someone suggest what might be the problem here?

Thanks in advance!
Misha
Go to the top of the page
 
+Quote Post
misha
post Jan 30 2008, 06:13 AM
Post #2





Group: Members
Posts: 7
Joined: 9-October 07
Member No.: 20,805



I've been able to solve my problem. Unfortunately, the solution required writing more code, so I don't see it as the best option. For now, though, it will more than suffice.

It seems like a Bash script doesn't quite cut it (no icon gets drawn). A symlink doesn't work, either (presumably, it's because it doesn't find the required imports, cause they aren't in any of the locations Python searches).

CODE
#!/usr/bin/env python
"""
This launch script should be placed in /opt/QtPalmtop/bin.  

Chown it to root:qpe and chmod it to 755.

It's required for the application to correctly start up in Qtopia.  Without it,
it doesn't seem possible to launch the app from the main application launcher,
have the application icon appear on the task bar, and keep the entire app
source tree away from /opt/QtPalmtop/bin.

It should be possible to avoid using this script if the application we're
trying to launch is installed into somewhere where Python can find it.  
"""

import traceback
import sys

"""
The location of the log file the launcher will write to.
"""
LOG_FILE = '/home/zaurus/anki_qpe_launcher.txt'

"""
The location of where the source files for AnkiQT Lite reside.
"""
SOURCE_DIR = '/home/zaurus/Documents/python/ankiqpe'

try:
    f = open(LOG_FILE, 'w')
    try:
        for i in range(0, len(sys.argv)):
            f.write('sys.argv[%d]: %s\n' % (i, sys.argv[i]))

        sys.path.append(SOURCE_DIR)

        import ankiqt_lite_main
        ankiqt_lite_main.main()
    except Exception, e:
        f.write(str(traceback.format_exc()))
finally:
    f.close()
Go to the top of the page
 
+Quote Post
Stubear
post Jan 30 2008, 03:20 PM
Post #3





Group: Members
Posts: 1,164
Joined: 17-December 03
From: Melbourne, AUSTRALIA
Member No.: 1,219



Have you seen these previous posts?

http://www.oesf.org/forum/index.php?showto...hl=taskbar+icon
http://www.oesf.org/forum/index.php?showto...hl=taskbar+icon

Possibly these will help?

Cheers

Stu
Go to the top of the page
 
+Quote Post
misha
post Feb 1 2008, 03:48 AM
Post #4





Group: Members
Posts: 7
Joined: 9-October 07
Member No.: 20,805



QUOTE(Stubear @ Jan 31 2008, 10:20 AM) *


Thanks... I'm surprised my initial search of the forums didn't return those. They are a great help!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st December 2014 - 10:20 PM