qt-components-blanco-theme in Extras-Devel is empty/missing files?

2012-01-21 Thread Thomas Perl
Hi,

I'm currently looking into how well Qt Quick Components are supported
on Fremantle. The package qt-quick-components installs fine and
works, but without having a theme, the UI elements are not visible and
do not work. Installing qt-components-blanco-theme should apparently
fix this issue, but it doesn't contain many files:

~ $ dpkg -L qt-components-blanco-theme
/.
/opt
/opt/share
/opt/share/themes
/opt/share/themes/blanco
/opt/share/themes/blanco/meegotouch
/opt/share/themes/blanco/meegotouch/constants.ini
/opt/share/themes/blanco/index.theme
/usr
/usr/share
/usr/share/themes
/usr/share/doc
/usr/share/doc/qt-components-blanco-theme
/usr/share/doc/qt-components-blanco-theme/changelog.Debian.gz
/usr/share/themes/blanco

Taking the /usr/share/themes/blanco/meegotouch folder from a Harmattan
device or from a Platform SDK (Scratchbox) install makes my Qt
Components-based application work (apart from some rotation/landscape
issues, but this is not a theme problem AIUI). Is this just a
packaging error or are there some licensing problems with the blanco
theme? Having a look at the source package of qt-components-themes
(from Extras-Devel), I can't find a debian/copyright file, but the
package contains a LICENSE.LGPL file, talking about the DirectUI
Framework being available under the terms of the LGPL v 2.1, but
nothing about the theme itself.

What is the license of the blanco theme, and (if it's closed), is
there an easy way to provide Fremantle users with the theme (apart
from telling them to download the Harmattan SDK and extract the theme
files themselves)?

The packages mentioned can be found here, btw:
http://maemo.org/packages/view/qt-components/
http://maemo.org/packages/view/qt-components-blanco-theme/

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: gpg-agent in scratchbox?

2011-10-03 Thread Thomas Perl
Hi,

2011/10/2 Rainer Dorsch rdor...@web.de:
 when building my packages (navit), dpkg-buildpackage asks for my gpg
 passphrase. Outstide of scratchbox this is handled through gpg-agent, but
 inside scratchbox that does not seem to work.

 Do all package builders enter manually their passphrases, or does sombody have
 a working gpg-agent setup? If yes, can you please provide details?

As Neal said, for most packages it's okay to not sign them (-us -uc)
if you don't publish them. To get your outer instance of gpg-agent
registered/visible inside scratchbox, you have to make sure to pass
the environment variable $GPG_AGENT_INFO into the scratchbox
environment. The way you could accomplish this is to do something like
this in your outer .bashrc:

echo GPG_AGENT_INFO=$GPG_AGENT_INFO
/scratchbox/users/yourusername/home/yourusername/.gpg_agent_info

Then, in your inner (inside Scratchbox) .bashrc, you can simply add:

source ~/.gpg_agent_info

After this (and opening a new terminal or entering source .bashrc in
your outer shell) you should get this variable set when you enter
scratchbox, and gpg should try to ask your GPG Agent for data. The
same works for ssh-agent as well (actually, I have only set it up for
ssh-agent, but given that they follow the same principle with
environment variables, I'm pretty sure that this approach works for
gpg-agent as well). If it doesn't work, echo $GPG_AGENT_INFO inside
scratchbox and make sure that it is set.

If you don't use bash, use .profile instead or refer to your shell's
manpage about environment variables there. Also, if you are on a
multi-user system, make sure that the file .gpg_agent_info is only
writable by your user, otherwise a malicious user could write shell
script code there that gets executed as your user whenever you open
Scratchbox.

HTH :)
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: False missing dependencies in package view

2011-08-25 Thread Thomas Perl
Hi,

2011/8/25 Oliver ohook...@gmail.com:
 I'm trying to promote one of my recently built packages:
 http://maemo.org/packages/package_instance/view/fremantle_extras-devel_free_armel/libhighgui-dev/2.0.0-5/
 [...]
 Unfortunately this page lists missing dependencies. From what I can
 tell though, the dependencies are in fact present:
 [...]
 The only possible problems I can see are that one package is in the
 non-free repository and one dependent package itself is missing
 dependencies, but this does not explain the broken links to the other
 dependent packages. Is this a bug in the build system?

I've had a similar problem. Ask Niels (X-Fade on irc.freenode.net,
#maemo) - he will be able to fix this issue for you :)

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


gPodder 2.18 in Extras-Testing needs your votes + dependency problems

2011-08-20 Thread Thomas Perl
Hi,

gPodder 2.18 has been in Extras-Testing for some days now[1]. It would
be good to get some votes for it to get it into Extras, because it
includes a bugfix that fixes YouTube downloads (users can't download
videos from YouTube with the current version in Extras - this has been
fixed in the version in Extras-Testing).

Moreover, in the Extras-Testing page for the new package[2], it says
Warning: This package has missing dependencies! for the dependency
on python-gtk2 (= 2.12.1-6maemo10). Looking at the Extras page for
the old package[3] (which has the exact same dependency), the
dependency is satisfied (in Extras) without problems. Why is that, and
will that prevent me from promoting the new package to Extras once the
vote limit is reached?

Thanks!
Thomas

[1] http://maemo.org/packages/view/gpodder/
[2] 
http://maemo.org/packages/package_instance/view/fremantle_extras-testing_free_armel/gpodder/2.18-1/
[3] 
http://maemo.org/packages/package_instance/view/fremantle_extras_free_armel/gpodder/2.15-1/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: QtComponents and qmlviewer on N900

2011-08-18 Thread Thomas Perl
Hi,

2011/8/18 mece mec...@gmail.com:
 I'm trying to get a QtQuick app I made for Harmattan to work on N900 with
 qmlviewer, and ran into some trouble.
 [...]
 Here's the error message:
 file:///home/user/tmp/qml/main.qml:1:1: plugin cannot be loaded for module
 QtQuick: Cannot load library
 /usr/lib/qt4/imports/QtQuick/libQtQuickCompat.so:
 (/usr/lib/qt4/imports/QtQuick/libQtQuickCompat.so: undefined symbol:
 _ZNK21QDeclarativeListModel4dataEiRK5QListIiE)

You have the Qt Quick Compatibility module installed (the one that
allows you to import QtQuick 1.0 even on 4.7.0). It's part of the
mcsp package:

http://maemo.org/packages/view/mcsp/

The problem is that your libQtQuickCompat.so is compiled against a
different version of Qt (that's why you get the undefined symbol
error). Try removing this package (and qtquickcompat if it's
installed) and it should work again - or at least not fail with that
error :)

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


[Harmattan] Exclude directories from tracker / media player

2011-08-04 Thread Thomas Perl
Hi,

For gPodder on Harmattan, I'd like to tell Tracker and/or the built-in
Media Player to not index files below ~/MyDocs/gPodder/Downloads. Is
there an easy way to achieve this (ideally by just installing some
file somewhere)? In fear of Aegis bricking the device and forcing a
reflash, I'd rather have some definitive answer for this that works
without bricking before starting to experiment around ;)

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Stopping QML update when not visible

2011-05-30 Thread Thomas Perl
Hi Andrew,

2011/5/30 Andrew Flegg and...@bleb.org:
 Qt Quick 1.1 apparently features a Qt.application.active read-only
 property[1] which can be connected (somehow) to stopping animations,
 reading sensors and so on.
 [...]
 Thoughts welcome. To be honest, it's amazing (and disappointing) that
 there isn't a way of doing this in Qt Quick 1.0. Can anyone confirm
 whether or not it's at least not updating the screen when hidden (it
 does in the task manager), and it's only the accelerometer signalling
 I need to switch off?

As mentioned by someone else, try using QGLWidget as viewport or
simply use -graphicssystem opengl as command line arguments. As for
disabling something when the application is in the background, that
can be done by watching event() on the QDeclarativeView. As discussed
on IRC, I've sent a patch that implements that idea.

For anyone that's interested in how it's done (feedback and
improvement suggestions welcome!), you can find the patch against
Attitude here:

http://thp.io/2011/maemo/attitude_activemonitor.patch

HTH :)
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Canonical list of fremantle sections

2011-05-16 Thread Thomas Perl
Hi,

2011/5/16 David Talmage talm...@acm.org:
 Is this still the canonical list of sections for debian/control in fremantle:
 http://wiki.maemo.org/Packaging#Sections

 There used to be a section named user/communication.  Is that now obsolete?

The list where I always look is on this Wiki page (that's the same as
the one linked by you, and it seems as if your link is even more
recent/general):

http://wiki.maemo.org/Task:Package_categories#New_list_for_Diablo

So, even in Diablo times (that's Maemo 4.1, or the one before
Fremantle), there hasn't been a user/communication section, as far as
I know.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Qt application crashes after 2 minutes if started from app grid

2011-05-10 Thread Thomas Perl
Hi,

2011/5/10 Cornelius Hald h...@icandy.de:
 On Tue, 2011-05-10 at 18:24 +0300, Eero Tamminen wrote:
 On 05/09/2011 08:44 PM, ext Timur Kristóf wrote:
  On 05/09/2011 04:43 PM, Kimmo Hämäläinen wrote:
  If you don't use D-Bus at all, you need to implement this
  single-instance and window raising yourself.
  
   This can be easily done with the QtSingleApplication class.

 If that works by starting a new instance of the application
 which them notices that it's already running and exits,
 that makes window topping a really heavy operation...

 Actually for me the single-instance thing works even with a normal
 QApplication. I've removed the .service file and the service line in
 the .desktop file. Still I can have only one instance.

I think on Maemo 5, hildon-desktop is keeping track of which window
belongs to which .desktop file (or: launcher icon) and if the
application is already running, hildon-desktop simply switches to the
application instead of instantiating a new one. That doesn't mean that
it will work the same on any other environment (e.g. N900 MeeGo DE,
etc..). It's a good idea though if most applications are
single-instance, because it makes switching instantaneous, because
hildon-desktop simply has to present the window without creating
another process.

The code is in src/launcher/hd-app-mgr.c in hildon-desktop's source -
it should be in the function hd_app_mgr_launch() and
hd_app_mgr_activate() if I'm not mistaken.

The user could still start two instances if (s)he would start your
application from X Terminal. If you want to prevent that, I'd suggest
using D-Bus.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: QtMobility app shows, hides, shows again at startup

2011-04-09 Thread Thomas Perl
Hi David,

2011/4/8 David Talmage talm...@acm.org:
 My newly released PanicButton application [1] behaves strangely at startup.
 When I start the application, it displays its window, then immediately hides
 the window.  In a few but significant number of seconds, it displays its 
 window
 again.  It should display its window only once. Perhaps one of you can help me
 make it behave the right way. I can't be the only one who has ever encountered
 this application behavior.

Is the first window that you see a black one that animates from the
application icon to fill the screen and has the sound effect of an
opening window attached to it? If so, it's just a fake window
displayed by the window manager (hildon-desktop) that will stay there
for some seconds (the idea being that your application is fast enough
to open a window, which will then replace that fake window). The fake
window makes the user feel that the application startup is instant
(via the animation) while giving the application a second or two to
really start up and show a window.

You can fix this by doing all the time-consuming operations *after*
you have created and shown your window. You can usually populate your
window with contents even after it has been shown, so that would be a
good idea to do in that case. You can do this using single-shot
QTimer, so that the main loop gets enough time to really show and draw
the initial window.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Kill connection dialog

2011-03-06 Thread Thomas Perl
Hi Dominik,

2011/3/6 Dominik Bartenstein d...@wahuu.at:
 I finally found a solution I wanted to share with you:

 killall -9 osso-connectivity-ui-conndlgs

 All modal dialogs associated with connectivity (i.e. connection could not be
 established etc.) disappear. The watchdog automatically recreates the
 connectivity-ui-conndlgs processes.

Good if this fulfills your use case. Be aware that the watchdog might
reboot your device if you kill a system-critical process (such as this
one, I assume) too many times in a given time frame. Just in case this
happens to you during testing (random reboots) and you wonder why :)

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Kill connection dialog

2011-03-06 Thread Thomas Perl
Hi Dominik,

2011/3/6 Dominik Bartenstein d...@wahuu.at:
 The strategy I have implemented is as follows:
 When QNetworkSession's open()-method is called a QTimer with 2 minutes is
 started. When QNetworkSessions's opened-SIGNAL is emitted (i.e. connection
 was successfully established) the timer is stopped. In the
 worst-case-scenario the 'connectivity-ui-conndlgs'-processes are killed
 every 2 minutes. Would be nice if there was a possibilty to communicate with
 the 'connectivity-ui-conndlgs' via dbus. That's not possible, is it?

I'm not sure if there is a D-Bus API, but you could use a tool like
d-feet[1] to examine the processes and objects connected to D-Bus and
what functions/properties they provide.

HTH.
Thomas

[1] http://live.gnome.org/DFeet
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: hildon.StackableWindow and blocking windows

2011-02-16 Thread Thomas Perl
Hi Max,

2011/2/16 Max Usachev maxusac...@gmail.com:
 2011/2/16 Alberto Garcia agar...@igalia.com
 On Wed, Feb 16, 2011 at 11:01:04AM +0200, Max Usachev wrote:
  I want to use StackableWindow in my program like dialogs

 That's not the way to do it in GTK: you have to show the new window
 and connect to its 'destroyed' signal to do what you want to do after
 the window is destroyed.

 Agree, that is a right way to. But what do you propose, if I have the
 following situation:
 There is some framework, there is a controller, I call controller method,
 for example - foo:

 def foo:
     # some actions1
     calling CustomDialog
     # some actions2

 My code implementing CustomDialog. In desktop environment gtk.Dialog().run()
 blocks code execution, and when dialog destroys, 'some actions2' executed.
 In Maemo using hildon.StackableWindows as replacement for gtk.Dialog, 'some
 actions2' executes immediately after window creation. I can't modify
 controller code, I can only implement CustomDialog.

You can create a new GLib mainloop that runs while the window is open.
In the destroy signal handler, you can then call the quit() method on
the mainloop. Check out this example:

-
import gtk
import glib

def CustomDialog():
l = glib.MainLoop()
w = gtk.Window()
w.set_title('subwindow')
w.connect('destroy', lambda w: l.quit())
w.show_all()
l.run()

def callback(*args):
print 'before'
CustomDialog()
print 'after'

w = gtk.Window()
w.set_title('main window')
b = gtk.Button('click me')
b.connect('clicked', callback)
w.add(b)
w.connect('destroy', gtk.main_quit)
w.show_all()

gtk.main()
-

Obviously, this also works with Hildon windows instead of GTK windows.

HTH :)
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: some more dev questions related to my libicd_policy_home_network.so project

2011-02-09 Thread Thomas Perl
Hi Jonathan,

2011/2/9 Jonathan Wilson jfwf...@tpgi.com.au:
 1.What is the best place to store configuration information on the N900? And
 where can I find documentation and examples of storing such configuration
 information for my plugin? (in this case I will have a control panel plugin
 which sets a value and the ICD policy plugin retrieves it)

I think GConf is a good place for that:

http://maemo.org/api_refs/5.0/5.0-final/gconf2/

 2.Is there an example of how to produce a control panel plugin?

Yes, in the Developing control panel applets section:

http://maemo.org/development/sdks/maemo_5_examples/

 and 3.Is there an example of how to produce a dialog box and drop-down list
 similar to the dialog box that lists all the different available internet
 connections?

I believe this is a HildonTouchSelector widget:

http://maemo.org/api_refs/5.0/5.0-final/hildon/HildonTouchSelector.html

 I need to know how to create the dialog, how to set its title, how to create
 the dropdown list, how to add buttons to the dropdown list and how to
 respond to button presses/item selections (and then how to close the dialog
 after doing what I need with the button press)

Check out one of the Hildon 2.x tutorials. You might also want to go
the Qt route. I don't know if you can write a control panel applet
without any GTK+/Hildon code, though. I'm sure there are some
community control panel applets in the Extras-Devel repository. If you
want to go the Qt route, you can just make it a normal application
that appears in the application list, and not in the control panel. Or
you write a thin wrapper for the control panel that simply starts
your Qt application when activated.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


libdeclarative-multimedia on Maemo 5: Video component not working?

2011-02-06 Thread Thomas Perl
Hi,

(CC'ing Xizhi as the maintainer of libdeclarative-multimedia)

I plan to use the QML Video element from libdeclarative-multimedia
(Qt Mobility QML Multimedia Components), and it already works great on
Linux on my laptop, but it does not work right now on Maemo 5. The
element exists, and I can create instances of it, but videos don't
load. I can provide an example if necessary. It does not work for both
local files and remote files (source set to a URL).

Is this a known problem? Where should I report a bug against this (Qt
Quick, Qt Mobility, bugs.maemo.org, bugreports.qt.nokia.com, ..?) and
have a realistic chance of getting it fixed? My application really
depends on proper functionality of this feature, and I want to avoid
working around this by opening videos in the built-in Media Player, as
this is not cross-platform and a Maemo-specific workaround :/

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Allowing rotation of closed-source apps

2011-02-06 Thread Thomas Perl
Hi Alberto,

2011/2/6 Alberto Mardegan ma...@users.sourceforge.net:
 What do you think about all this? I didn't check hildon-desktop and mb2
 source code yet, so if you also happen to have some hints on the
 implementation, they are very welcome. :-)

Sounds good. Hildon-Desktop already sets the auto-rotation flag on a
window if Ctrl+Shift+R is pressed. There is a central place in H-D
where these keyboard shortcuts are handled. Going from there, you can
see how the setting of a flag is done (for the current window). It
shouldn't be too hard to add support for doing this by window title or
window class. I wonder what would happen if we would simply try to
patch H-D to auto-rotate every window and then blacklist the
closed-source apps that don't work?

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: libdeclarative-multimedia on Maemo 5: Video component not working?

2011-02-06 Thread Thomas Perl
Hi Ville,

2011/2/6 Ville M. Vainio vivai...@gmail.com:
 On Sun, Feb 6, 2011 at 2:01 PM, Thomas Perl th.p...@gmail.com wrote:

 ~ $ dpkg -l | grep -i mobility
 ii  libdeclarative-multimedia
 1.0.2-maemo1+0m5                  Qt Mobility Multimedia QML plugin

 Hmm, I wonder whether pyside builds in extras-devel should be switched
 over to using the unofficial 1.1 / 1.2 qtm packages on maemo5
 eventually...

I don't think PySide has anything to do with this, as all this happens
inside the QML Declarative Engine. This is easily reproducable using
qmlviewer :)

Some things to mention: I'm using a QGLWidget as viewport of my
QDeclarativeView, and I get the following output in the X Terminal:

CLEAR
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint
QGraphicsVideoItem::paint

I don't hear any audio, so AFAICT the video output doesn't even start
(I can hear audio just fine using the QML Audio element).

I've now installed Qt Mobility 1.2 from Extras-Devel, and still
experience the same issue.

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: adaptation of Extras QA hurdles

2011-01-27 Thread Thomas Perl
Hi!

2011/1/27 Riku Voipio riku.voi...@nokia.com:
 On 01/25/2011 05:24 PM, ext Andrew Flegg wrote:
 On Tue, Jan 25, 2011 at 15:03, Felipe Crochik fel...@crochik.com wrote:
 A new version of an existing application should have a lower barrier to
 promotion than a new application.

 It's obvious; but even a minor change can have an enormous impact.
 However, it's unlikely that the package (once optified) will become
 non-optified and numerous other things (descriptions will only bitrot
 when major new features are introduced; icons won't disappear; bug
 trackers are fairly persistent etc.)

 For new versions, the set of checks should still be shorter and less
 votes needed. Basically the only check to be done is has the new
 version any regressions compared to the version already in extras.

So a rouge developer could just upload a well-behaving tool at the
first time (where a more thorough check takes place and more votes are
needed), and then upload another release later on with some dangerous
code which sets the device on fire, and this update does not need so
any votes? It does not even have to be a rouge developer - just think
about the Debian SSL vulnerability.

I'd consider a normal update as important as a new release. If we were
doing some kind of fast-tracking for minor updates, we should at least
show a debdiff of both source packages somewhere in the web UI, so
that a fellow developer can check what source code changes are in
there, and have a better understanding of the changes (it should be
obvious from the source diff what changes there are, and if they are
minor and really just aim to fix a bug).

My suggestion would be to add a more formal definition of the
testing criteria + some web UI for entering the test results (which
are then saved) - with easy-to-understand instructions that even a
non-developer can follow (so we hopefully gain some manpower in the
testing team from non-developers who also want to contribute, but not
via code). Everything that can be checked reliably by scripts (i.e.
optification) should be checked by scripts, and should not be included
in the what a tester has to look at list.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: adaptation of Extras QA hurdles

2011-01-27 Thread Thomas Perl
Hi Attila and all,

2011/1/27 Attila Csipa ma...@csipa.in.rs:
 On Thursday 27 January 2011 18:07:32 Andrew Flegg wrote:
 Unless we take extraordinary (and almost certainly self-defeating)
 actions like requiring KISStester to be installed to use any software
 from Extras-(devel|testing).

 In fact, I would very specifically argue against such an approach. The
 experience from various appstores tells us that forced/induced feedback is
 basically rubbish. Without wishing to insult anyone, most of the feedback
 gathered that way goes the lines of 'ooh, shiny' vs 'sucks'. We need more
 focused feedback than that - and IMHO having people opt in instead of out is
 IMHO the only way to do it (I would rather have 0.1% of good feedback than 10%
 of noise).

Maybe we could make it easy to leave a numeric rating + let the user
pick one of a pre-defined set of labels (that's how it is done in
Little Big Planet - it's mandatory to give a numeric rating after
playing a community-created level, the label or tagging part can be
skipped). So for example, after using an application, you can rate it
from 1 star to 5 stars (which will be automatically synced with the
website, ideally) and you can also pick one label that describes the
application (i.e. cool, useful, rubbish, accelerometers,
audio, video, crashing, funny, boring, online, contacts,
productive, needs work, ... - you can see a list of labels on
the LBP website: http://lbp.me/search?labels=) that doesn't really
categorize the application, but gives a different kind of feedback
without the useless short comments. Of course, this rate after usage
feature could be turned off by default or made easy to deactivate
globally.

Adding an application as a favourite (that might then be displayed on
the website profile or something) might also be a nice idea, and then
we could have things like customized per-user RSS feeds that will
contain news items for all their favourite applications, so the user
always knows how to stay up to date.

Long comments can then be entered on the website or some other
proactive mechanism where the user has to find the comment entry box.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [ANNOUNCE] TV out control home plugin

2011-01-13 Thread Thomas Perl
Hi!

2011/1/13 Ville Syrjälä syrj...@sci.fi:
 I was bored one Saturday night last year, and wrote this little HD home
 plugin to control the TV out on the N900.

 Finally got around to putting it online:
 http://gitorious.org/maemo-tvout-control

Nice utility! The scale and aspect ratio options are especially
helpful and let me finally watch videos full-screen on my widescreen
VGA monitor (using a Composite-to-VGA converter box). Would you care
about packaging it up and uploading it to Extras? If you need help,
just tell me, and I can assist with packaging and uploading.

Thanks,
Thomas

PS: Is the TV-out control panel applet that's included in Maemo open
source? If so, we should probably add the scale and aspect ratio
options there as well (now that there's some working and tested code
that does just that) and distribute it through the Community SSU.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [ANNOUNCE] TV out control home plugin

2011-01-13 Thread Thomas Perl
Hi again,

2011/1/13 Thomas Perl th.p...@gmail.com:
 PS: Is the TV-out control panel applet that's included in Maemo open
 source? If so, we should probably add the scale and aspect ratio
 options there as well (now that there's some working and tested code
 that does just that) and distribute it through the Community SSU.

To answer my own question: It turns out it is not
(maemo-applet-tvout). I've filed a license change request:

https://bugs.maemo.org/show_bug.cgi?id=11772

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [ANNOUNCE] TV out control home plugin

2011-01-13 Thread Thomas Perl
Hi again,

2011/1/13 Ville Syrjälä syrj...@sci.fi:
 The only unfortunate issue is that some combinations of settings simply
 don't work. Usually it just leads to a black TV out signal. That's
 caused by the display driver disabling the overlay used for TV out,
 when some hardware limitations would be exceeded.

Yes, I've noticed that. Is this a limitation of the N900's hardware,
and independent of the connected device? If so, we can probably get
the parameters via trial-and-error and disable non-working
combinations in the UI. But right now, it's not that big of a problem,
as one can just pull back the scale value until the picture comes
back.

 On Thu, Jan 13, 2011 at 11:36:54AM +0100, Thomas Perl wrote:
 Would you care
 about packaging it up and uploading it to Extras? If you need help,
 just tell me, and I can assist with packaging and uploading.

 I'm too lazy to bother with packaging and whatever else is needed to
 upload it somewhere. I would prefer if someone else could take care
 of such things.

Done. Uploaded to Extras-Devel. I'm unable to create a Merge Request,
so you can just grab the latest commit from this repo if you want to
merge it:

http://gitorious.org/maemo-tvout-control/thps-maemo-tvout-control


Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: connecting to network in background

2010-12-06 Thread Thomas Perl
Hi Dominik,

2010/12/6 Dominik Bartenstein d...@wahuu.at:
 I try to open a QNetworkSession via session.open(). That works like a charm
 but if the connection cannot be established a connection pop up appears by
 default.
 [...]
 Is the ConnectInBackground sessionProperty implemented/available for
 Maemo5 PR1.3/N900?

Depending on what you want to achieve, you might be able to use the
native (platform-specific) APIs on Maemo 5 to request internet
connectivity. They work and are fully implemented:

http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Using_Connectivity_Components/Maemo_Connectivity#Requesting_for_Connection

It might also depend on the settings of your device. Go to Settings -
Internet connections and check the Connect automatically setting. If
you want to be able to connect in the background, it has to be set to
something else than Always ask. If it still does not work with
QNetworkSession after checking this, it might be worth reporting this
as a bug on http://bugs.maemo.org/, even if you end up using libconic
for requesting the connection, so it can be fixed for future uses :)

HTH.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Starting a 3G traffic monitoring application for N900: some questions

2010-11-29 Thread Thomas Perl
Hi Andrea,

2010/11/29 a.gra...@gmail.com a.gra...@gmail.com:
 It's not easy to keep track of transfered data, so I'd like to write a
 desktop applet that monitor traffic and keep the amount updated.
 I'm going to write this in Qt/C++.

 I've some question before starting:

 1) How can I detect, from a Qt/C++ application, if a 3G connection is
 estabilished and when it disconnects?

libconic can do that:

http://maemo.org/api_refs/5.0/5.0-final/libconic/

 2) Is it ok if I monitor the trasmitted/received data using ifconfig?
 If yes, how can I execute ifconfig from an application running as
 user? (Usually you can only execute ifconfig if you sudo gainroot
 before).

There already exists a Personal Dataplan Monitor applet that might
already fulfill your use case :) And even if not, its source might be
a good starting point for your app (or simply add changes that you
need and submit a patch to Andrew):

http://maemo.org/downloads/product/Maemo5/personal-gprs-mon/

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Discontinue distributing Maemo Bug Jars via email?

2010-11-22 Thread Thomas Perl
Hi!

2010/11/22 Stephen Gadsby stephen.gad...@gmail.com:
 During the MeeGo conference, I had one person request I stop sending
 out Bug Jars via email. Does anyone find receiving them via email
 useful? Shall I continue to send them via email or not?

I don't like the fact that bug jars are sent several at once, but I
can just select all these mails and archive them at once - no big
problem. Maybe you can merge them into one single mail per week? On
the other hand, if people are really bugged about this, I can see two
options:

* Have a separate announcement type mailing list (where only you can
post), i.e. maemo-bugjars / meego-bugjars
* Have an RSS feed that is not aggregated by planets

We should then make sure that these resources are prominently linked
(e.g. from the Bugzilla start page, the QA wiki page, etc..).

And another consideration: Create a Twitter/Identi.ca account
(maemobugs/meegobugs?) and feed them with your RSS content using a
service like Twitterfeed, so people can also follow it via
microblogging clients. If you have more time, script it so that the
Twitter account spits out one or two facts (a different one) every day
(i.e. Feature request with most votes this week (+4): Portrait mode -
http://bugs.maemo.org/1234;). This might make more people click on a
single bug report and check it out / vote for it / comment on it than
if you just link to the general bug jar page where people have to skim
through the whole document to read something.

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Documentation of Maemo extensions for .desktop files?

2010-10-15 Thread Thomas Perl
Hi!

2010/10/15 Dave Neary dne...@maemo.org:
 Does anyone know of any document which contains a complete list of
 custom fields  an explanation of their purpose, please? Or, if not, a
 pointer to the source code of whatever app/library parses these files on
 Maemo?

I think it's in Hildon-Desktop, although you have to look through the
source to extract the meaning of each field:

$ git grep 'X-Maemo'
[...]
src/launcher/hd-launcher-app.c:#define HD_DESKTOP_ENTRY_PRESTART_MODE
X-Maemo-Prestarted
src/launcher/hd-launcher-app.c:#define HD_DESKTOP_ENTRY_WM_CLASS
X-Maemo-Wm-Class
src/launcher/hd-launcher-app.c:#define HD_DESKTOP_ENTRY_PRIORITY
X-Maemo-Prestarted-Priority
src/launcher/hd-launcher-app.c:#define HD_DESKTOP_ENTRY_SWITCHER_ICON
X-Maemo-Switcher-Icon
src/launcher/hd-launcher-app.c:#define HD_DESKTOP_ENTRY_IGNORE_LOWMEM
X-Maemo-Ignore-Lowmem
src/launcher/hd-launcher-app.c:#define HD_DESKTOP_ENTRY_IGNORE_LOAD
X-Maemo-Prestarted-Ignore-Load

See http://maemo.gitorious.org/fremantle-hildon-desktop/hildon-desktop

HTH.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Multiple packages for Git in Maemo Extras (git and git-core)

2010-10-13 Thread Thomas Perl
Hey ho!

(CC'ing Jeremiah: Can you provide your insight on how to do this
transition right?)

2010/10/11 Wes Hardaker w...@hardakers.net:
 On Mon, 11 Oct 2010 11:13:24 +0200, Thomas Perl th.p...@gmail.com said:
 TP I've just noticed that there are different packages of Git in the
 TP Extras repository: One is called git[1] and the other
 TP git-core[2]

 I suspect we started packaging about the same time and it's one of
 those duplicate problems.  I believe mine, git, is less complete than
 the git-core version so I suspect we should adopt that one instead of
 mine.  I'd be happy to do whatever is necessary to remove mine, but I
 don't think it's possible to remove it.  Packing it as a wrapper would
 be fine too (and if you could tell me the best way to do that, I'd
 appreciate it.  The git package was actually my first debian-based
 package ever!)

For the wrapper package, you could simply let it depend on git-core
and make its contents empty, I guess. The other way would be for
Khertan to make sure that his git-core source package creates the
dummy git package that depends on git-core. This might create a
conflict in the repos, though (two different source packages creating
the same binary package). Niels could probably just remove your
package from the repos with the reasoning from above and then have
Khertan upload a new version of the git-core package that also creates
the transitional git wrapper package.

Here are the instructions for Debian, but the changes to
debian/control should be working on Maemo, too:

http://wiki.debian.org/Renaming_a_Package

HTH.

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Multiple packages for Git in Maemo Extras (git and git-core)

2010-10-11 Thread Thomas Perl
Hi!

I've just noticed that there are different packages of Git in the
Extras repository: One is called git[1] and the other git-core[2]
- with different maintainers and different versions. It would be nice
if we could find a way to resolve this issue and get one of the
packages removed (or at least replaced with an empty dummy package
that simply depends on the other package). I'll leave it up to you
(Khertan and Wes, the maintainers of these packages) to decide which
one we should be moving forward with. git-core has a newer version,
but is not optified AFAICT. I have not tried git yet. In Debian,
git is the current package name, while git-core is now just a
transitional package depending on git, so maybe we should do the
same in Maemo Extras (just from a naming perspective, I don't care who
maintains it, as long as someone does).

Thanks,
Thomas

[1] http://maemo.org/packages/view/git-core/
[2] http://maemo.org/packages/view/git/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: problem with python, gtk and utf8

2010-10-04 Thread Thomas Perl
Hi!

2010/10/3  pelt...@gmail.com:
 and the dict(?!?) is like this:
 letters = {}
            letters['1'] = ['', '.', ',', '?', '!', '1', '@', '-', '_', '(', 
 ')', ':', ';', '', '%', '*', '#', '+', '', '=', '', '$', '£', '§', '¥']
            letters['2'] = ['', 'a', 'b', 'c', '2', 'å', u'ä']
 [...]
 and the appropriate char from that is written with:
 self.message_buffer.set_text(updatedtext)

Can you construct a minimal example that demonstrates the bug? Maybe
you're mixing str objects with unicode objects? What happens if you
use 'ä' (a str with utf-8 as encoding) instead of u'ä' (a unicode
object representing 'ä') in that code? What is the class of
self.message_object, and how do you compose updatedtext? What does
repr(updatedtext) give when printed before the affected line? If it's
a gtk.TextBuffer, maybe you want to use
self.message_buffer.insert(self.message_buffer.get_end_iter(),
new_char) or self.message_buffer.insert_at_cursor(new_char) instead?

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Handling files in root privileged directory from an application

2010-10-04 Thread Thomas Perl
Hi!

2010/10/3 Chris Saturn chris_sat...@hotmail.com:
 I would like to ask your insight a way to handle securely files that need to
 arrive in root privileged directory from a user application written in
 python.

 In my specific case, the user application will create a file and copy it to
 /etc/events.d which will be executed on the next boot.

 At the moment, I'm making use of the rootsh package feature and the (very
 ugly but functional) call to copy the user created/modified file back like
 this:
 os.system('echo cp %s %s|root' % (Path + ConfigFile, MainPath + MainFile))

Shell command injection, anyone? This snippet looks very dangerous to
me :/ Just imagine ConfigFile being equal to ; rm -rf / # (but don't
try it out :p).

I propose creating a root-helper-scripts (or similarly-named)
package that would provide a command like root-copy-file (with
parameters from and to) that will display a nice dialog box to the
user (An application tries to copy the file [...] to [...]. This
requires root privileges and could harm your system. Do you want to
allow this? with Allow and Deny as buttons). You could then use
the much more sensible subprocess package to carry out the
operation:

from_file = Path + ConfigFile
to_file = MainPath + MainFile
p = subprocess.Popen(['root-copy-file', from_file, to_file])
if p.wait() != 0:
# ...show error message here...

The root-copy-file script could be setuid root and carry out the
operation only if the user acceps the GUI prompt and have all the
necessary security checks built-in. No need to set write permissions
for the user on the file in /etc. This way, you don't need to depend
on rootsh (but only on the not yet existing root-helper-scripts
package), and the user will always know when a potentially harmful
operation is carried out. Other packages could also depend on that
package (and possibly other scripts yet to be created if they are
required).

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: MADDE 'developer' account - good or bad?

2010-09-27 Thread Thomas Perl
2010/9/26 Ville M. Vainio vivai...@gmail.com:
 Being able to set a breakpoint and actually hitting that breakpoint on
 device without batting an eyelid is what IMO rocks most about the
 whole Nokia Qt SDK scheme.

Oh yeah - I forgot about that. The whole debugging integration is
pretty helpful, that's true. In this case, it would be good to debug
the application with the user user's data, as some bugs might only
appear with specially-crafted user data that's read by the application
(say, a specific calendar entry or contact).

 BTW, in new versions you can disable that packaging step (from build
 settings, by expanding the Create Package build step). This makes
 the deployment ~1 sec experience, which is pretty nice.

Thanks for the hint! Will this be set as default at some point, or
will it always be an opt-in feature?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Package promoting

2010-09-22 Thread Thomas Perl
2010/9/22 Andrew Flegg and...@bleb.org:
 No matter the QA process, some developers will always feel that their
 code is perfect and doesn't need to be tested - but developers make
 rubbish testers of their own code. The challenge is to get the balance
 right, and I'm fairly convinced that we're very close to the right
 balance now.

Yes. One good thing that's also tested (or at least commented one) is
that things like the application icon, application description and bug
tracker link do get added eventually before the package lands in
Extras. It's those marketing tasks (adding a nice icon and
description - something that's not functional, but still essential)
that most developers won't do if the QA process gets shortened or
simplified.

We developers just have to get used to not being able to do zero-day
releases into Extras. Most power users will use Extras-Testing,
anyway, and the time from upload to -Testing is just a few hours if
you promote right after upload. The testing QA process also allows to
just sit back and relax after a release has been published while
waiting for the package to enter Extras. It's still better than for
example Ubuntu, where my package usually has a lag of ~ 6 months to 1
year in the official repositories (from release to upload to Debian
and then merge into Ubuntu, taking into account all freeze periods,
etc..).

For lesser-used apps, there's no problem with them staying in -Testing
for about month (this should provide enough time for a casual user to
detect weird bugs or PM issues). The few users that want to use the
app will happily enable -Testing or wait until it's available in
Extras. Use talk.m.o or planet.m.o to let users know about your app
and provide testing instructions and a link to the testing page. If
you provide a nice screenshot of your app with an announcement,
chances are more people will look at it (and try it out) than when you
just fire-and-forget the source package into the repositories :)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: MADDE 'developer' account - good or bad?

2010-09-22 Thread Thomas Perl
2010/9/22 Christian Kandeler christian.kande...@nokia.com:
 From Qt Creator's side, nothing prevents you from just giving the user name
 user instead of developer in the Maemo device configuration. The only
 problem is then accessing that account; if I'm not much mistaken, login is
 disabled for it.

I always SSH into the user account - you just have to set a
password. If that's possible from Qt Creator, this could be a
solution. The user would still have to manually set up a password for
the user account, though (or the MAD Developer app should have an
advanced option of setting the user password).

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: MADDE 'developer' account - good or bad?

2010-09-22 Thread Thomas Perl
2010/9/22 Ville M. Vainio vivai...@gmail.com:
 Considering all of this, I'm inclined to wish we had a  I know what
 I'm using, please run this app as 'user'| checkbox in Nokia Qt SDK.

The current version of Qt SDK automatically creates and deploys a .deb
on the device, so once the package has been deployed, if I want to
test the app with the user account, I just run it from X Terminal
(/usr/local/bin/appname with a standard project). Don't know if that
is a solution for IDE-loving developers, but it's not that hard, and
you can always have a xterm (or PuTTY for Windows users) running on
your development machine and start the app from there.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: suspendprocess - poor man's power save

2010-09-21 Thread Thomas Perl
2010/9/20 Ville M. Vainio vivai...@gmail.com:
 I don't think real applications out there have a habit of
 unsubscribing from dbus signals when they don't need them either.

Yes, that's what listening for D-Bus signals is all about most of the
time (getting notified when something of interest happens, which can
happen at any time, hence there's no real possibility to unsubscribe).

IIRC D-Bus signal filter/receiver rules are checked in the D-Bus
daemon, so moving most of the checks into the rule instead of checking
for simple things in the callback reduces the wake-ups, right? It's
not something that we can do automated, but it would be nice to add
some info on how to write good, powerful match rules to the relevant
power saving Wiki pages. For example, is it possible to compare
parameters of D-Bus signals in the rule (say, the second parameter is
equal to disconnected), so we don't need to receive signals that we
won't process/need anyway?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Qt with OpenGL ES 1.1 on Maemo / N900

2010-09-03 Thread Thomas Perl
Hi!

2010/9/3  kate.alh...@nokia.com:
 By default in device there is only OpenGL2 libraries, there are extra
 packages libgles1-sgx-img and libgles-sgx-dev containing OpenGL-ES1 .
 The implementation is based emulating OpenGL-ES1 fixed function pipeline
 by special shader code loaded. That may cause problems, because
 Qt uses by default GLES2. It may happen that if you try run GLES1
 functions under QGlwidget, ir tuns happily but does not draw anything if
 GLES1 emulation is not initialized and shader codes loaded. I don't
 know is it possible to load emulation ( initialize GLES1) without doing
 some harm for other Qt GL stuff.

Thanks for the clarification. I'm going to port my code to
QGraphicsView then and use that to gain accelerated GLES2 graphics
(with QGLWidget), so I don't have to deal with shader programs
directly :)

Greetings,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Qt with OpenGL ES 1.1 on Maemo / N900

2010-09-02 Thread Thomas Perl
Hello!

According to the OpenGL ES Wiki page[1], Qt on Maemo only supports
OpenGL ES 2.x. Is this really true? I've added the following two lines
to my .pro file, and my application compiles, links and runs happily.
However, the window (a QGLWidget) will stay black - nothing is drawn
on the screen.

DEFINES += QT_NO_OPENGL_ES_2 QT_OPENGL_ES_1
LIBS += -lGLES_CM

Now my questions:

1.) Is it possible to use QGLWidget with OpenGL ES 1.1 on the N900?
2.) Is there a minimal example using QGLWidget + OpenGL ES 1.1?

The same code works fine when compiled with Qt under Ubuntu on a
laptop, so the code works and does draw something ;) I'm using the
experimental Qt 4.7.x packages from Extras-Devel in Scratchbox and on
the device.

Any help appreciated :)

Thanks!
Thomas

[1] http://wiki.maemo.org/OpenGL-ES
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Extras QA checklist

2010-07-23 Thread Thomas Perl
2010/7/22 Eero Tamminen eero.tammi...@nokia.com:
 [1] For example popular gPodder application is buggy because it
 apparently listens to orientation changes when it's not visible and
 does e.g. lots of operations when user tries to answer a call.

If you reported a bug against said app, the developer would know about it ;)

Thanks!
Thomas
(who just accidentally stepped over this thread..)
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Maemo QA process

2010-07-22 Thread Thomas Perl
Servus!

2010/7/21 Roman Morawek li...@morawek.at:
 [...] Actually, I think in the early lifetime of a SW project there
 will probably be a release every few months, which could permanently
 block the tool's promotion to extras.

If there are enough users / testers, releasing every month is no
problem. I have the same situation with my app (a new release nearly
every month), and with enough testers, I usually get enough votes in
the first ten days (quarantine time), so even if you have, say, a
bi-weekly release cycle, it would still be enough to get new upgrades
into Extras before the next version is released.

If you have a blog, create a maemo category/tag and let it be
syndicated on the Planet (planet.maemo.org) and announce your releases
there - it helps getting attention, and with some screenshots will
also describe the app to potential new users/testers (you already have
a very informative web page, which is very good - some apps don't even
have something like that).

I've reviewed your app and posted a comment on the testing page -
please have a look :)

Greetings,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Maemo QA process

2010-07-22 Thread Thomas Perl
2010/7/22 Ville M. Vainio vivai...@gmail.com:
 How about a system where developers could convince other developers to
 test drive their application by voting on theirs? I.e. being able to
 give a conditional vote that is realized only after the receiver
 votes up/down on your application?

Wouldn't this slow down the whole process even more? Instead of
getting one vote right away, you have to wait for the return vote to
be completed, and only then the vote gets counted. A download
assistant app (as discussed earlier in this thread) sounds more
useful to me than complicating the QA process. Add some incentive
(i.e. a monthly posting of the Top 10 Testers to maemo-community, so
testers get a feeling of their importance) and make the UI of the
testing app really easy to use (What's new section, single sign on,
Latest votes, Newest uploads, filter out already-tested apps, show
new versions of apps for which the user has voted on at least one
older version before, ...), and I think more users will test apps on
their devices. Right now, it's very diffcult to browse around and
find apps to test (well, http://maemo.org/packages/ works kind-of, but
screenshots and better descriptions would help the tester decide
whether or not to spend time downloading and testing the app).

Another idea would be to add a new section to MWKN (mwkn.net) called
Testing Spotlight where three apps in Testing are described and
promoted, and readers are asked to at least test these three apps
during the week - this should make it possible to have three apps get
enough votes during one week. Visibility and promotion of the apps are
the problems, I think (searching for apps is tedious, so nobody does
it) - the conditional vote idea sounds like a technical solution
(enforced policy, added restrictions) to a social problem (non-popular
apps don't get enough exposure and consequently testers).

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Getting the siz of the Memory Card

2010-05-18 Thread Thomas Perl
2010/5/18 sandeep kodimela sandeep.kodim...@votarytech.com:
 I'm just trying to find out the size of the memory card,and the amount used 
 and the amount free.Can anyone suggest me with the API for the same.
 Thanks in advance

Check the output of the df command. You can also use GIO:

http://library.gnome.org/devel/gio/unstable/GFile.html#g-file-query-filesystem-info

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


N900 Linux console output for debugging

2010-05-06 Thread Thomas Perl
Hello!

I'm currently playing with booting images on the N900 using a loopback
device and bootmenu. The problem is that booting sometimes hangs, and
I want to debug this. I've enabled the framebuffer console on the
device, so I can see the early boot messages, but the five dots keep
appearing and looping forever. Is there a way to disable the five dots
so that the console output is always visible, or is there a way to
redirect console output to the USB connection?

Also, is there a way to delay rebooting, so that I have a chance to
see any messages that appear quickly on the screen before the device
reboots itself?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Proposal for new hildon-extras widget

2010-04-16 Thread Thomas Perl
2010/4/16 Cornelius Hald h...@icandy.de:
 If it's up to me, I would say we should include it in hildon-extras.
 What are the other contributors saying? Thomas? Faheem? Andrew?

Yes, including it in Hildon-Extras is fine with me too. We can obviously
note that this should be used in cases where migrating to HildonAppMenu
is not feasible or difficult due to the amount of menu items, and that the
developer should think twice if using a HildonAppMenu is not the better
solution in their case.

For things like the Pidgin port, it's perfectly fine (and it would allow other
ports to be finished earlier, because we could use it as a drop-in replacement
for GtkMenuBar most of the time, I guess).

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Donate $x button on Packages and/or Downloads

2010-04-15 Thread Thomas Perl
2010/4/15 Aniello Del Sorbo ani...@gmail.com:
 I am now using HeAboutDialog as well... only issue is that it doesn't
 properly render in portrait mode :)

Patches are welcome :p I've also ported the HeAboutDialog to Python for
use in Panucci, so if anybody wants to use HeAboutDialog from Panucci
without having to wait for the bindings, you can grab the code from Panucci.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PR1.2 SDK for Extras-devel: how to solve?

2010-04-07 Thread Thomas Perl
2010/4/7 Ram Kurvakat rkma...@gmx.com:
 The idea is to give a choice to the developer to choose which SDK the 
 autobuilder needs to use and to which repo the app needs to go to.
 Providing an option in the debian control file to build against the user 
 specified SDK since the developer knows what SDK he/she uses.

 e.g:
 Xsbc-sdk : PR1.2

Another Maemo-specific control field? No thanks :) Just create two repositories.

It worked fine for Chinook and Diablo, and developers uploaded the same source
package to Chinook and Diablo without problems until the Chinook autobuilder
was closed down.

The situation with pre-PR1.2 and PR1.2 is similar to Chinook and Diablo. We can
think of PR1.2 as Maemo 5.1 the same way Diablo has been Maemo 4.1.

As for testing/QA: Testers will simply use the repository for which
they have got
firmware on their devices. Which is why I support the idea of community firmware
testing (which would allow both testers and developers to test apps on the real
devices with the real firmware). Do you really want people to test apps in the
SDK and pretend that they will work the same way on a real device?

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Hildon-Extras] Proposing two new helper functions (logical font desc + color)

2010-03-29 Thread Thomas Perl
2010/3/24 Cornelius Hald h...@icandy.de:
 Thomas Perl wrote:
 Is this something that we want to have in Hildon-Extras? If so, I'm
 going to prepare a patch. The best place for this code is in
 he-helper.{c,h}, right? The logical color and font names can be found
 in the Fremantle Master Layout Guide (page 9 for fonts, page 17 for
 colors), but of course I'd be including #defines for these names in
 the HE implementation.

 For me it would be perfectly ok to add it to he-helper. If no one else
 objects, please add it!

Added:

https://garage.maemo.org/plugins/scmsvn/viewcvs.php?view=revisionroot=hildon-extrasrevision=23

Feel free to use them in your code (especially tree views and stuff) to get
the correct styling. See the MæPad code for example code usage.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Ask for removal of some packages from Extras Fremantle repository

2010-03-23 Thread Thomas Perl
2010/3/23 Andrew Flegg and...@bleb.org:
 On Tue, Mar 23, 2010 at 00:20, Attila Csipa ma...@csipa.in.rs wrote:
 On Tuesday 23 March 2010 00:39:09 Darren Long wrote:
 However, in the general case where the source and the executable are not
 the same, I believe that maemo.org would be obliged to continue to make
 the source available, for at least 3 years.
 [...]
 If the source code doesn't accompany every download, then 3a doesn't
 apply so one of 3b or 3c must.

 If 3b applies, maemo.org has to continue to host the source.

Why not pull the binaries and source packages from the *repositories*
at the author's request and put them up in a archival directory that is
not exposed via a Debian repository (and therefore not interfering with
the HAM policy, etc..)?

Think of snapshot.debian.net - keeping sources and binaries of packages
that have since been removed from the official archives does not mean
that one has to keep the sources and binaries in the repositories.

What about a new subdirectory on the maemo.org server that contains
source and binary packages for removed-from-Extras packages? Maybe
http://repository.maemo.org/archive/ can be a good place for this.

Either manage this manually (by moving stuff to archive when pulling
packages from the repos) or use pdumpfs, as snapshot.debian.net does.

This would make the GPL discussion irrelevant (because maemo.org can
keep providing the source code, accessible via plain HTTP) and would
make Khertan happy (because he can provide his packages from his own
repository without HAM complaining) and everyone could get back to
being productive :)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


[Hildon-Extras] Proposing two new helper functions (logical font desc + color)

2010-03-23 Thread Thomas Perl
Hello!

I've ported my logical font style retrieval code from gPodder to C
for use in MæPad, as I have not found similar functionality in the
Hildon libraries:

+gchar *
+he_get_logical_font_desc(const gchar *name)
+{
+GtkSettings *settings = gtk_settings_get_default();
+GtkStyle *style = gtk_rc_get_style_by_paths(settings,
+name, NULL, G_TYPE_NONE);
+
+return pango_font_description_to_string(style-font_desc);
+}
+
+gchar *
+he_get_logical_font_color(const gchar *name)
+{
+GdkColor color;
+GtkSettings *settings = gtk_settings_get_default();
+GtkStyle *style = gtk_rc_get_style_by_paths(settings,
+GtkButton, osso-logical-colors, GTK_TYPE_BUTTON);
+
+if (gtk_style_lookup_color(style, name, color)) {
+return gdk_color_to_string(color);
+} else {
+return NULL;
+}
+}

These functions are best used in combination with Pango Markup to
style text (e.g. in treeview models).

Is this something that we want to have in Hildon-Extras? If so, I'm
going to prepare a patch. The best place for this code is in
he-helper.{c,h}, right? The logical color and font names can be found
in the Fremantle Master Layout Guide (page 9 for fonts, page 17 for
colors), but of course I'd be including #defines for these names in
the HE implementation.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: GSoC project - aGLESory

2010-03-19 Thread Thomas Perl
Hello!

2010/3/19 Carolina Simões Gomes carolina.sgo...@gmail.com:
 If possible, I'd like to know more about the aGLESory project, in order to
 begin forming my ideas about the project proposal.

(I'm not the one who proposed the project, so I might be wrong about
the motivations and ideas behind aGLESory.)

I *think* the idea behind aGLESory is to make it easier to start
creating projects utilizing OpenGL ES for Maemo/MeeGo. Right now, if
one was to use Xlib to create a Hello World-ish GL ES app, it would
look like this:

http://wiki.maemo.org/SimpleGL_example

There's too much boilerplate code (setting up the X window, etc..)
which makes it hard (or a copy'n'paste job) to start a new project
utilitzing OpenGL ES. I guess most of this is covered by using Qt and
its QGLWidget, which can be subclassed to implement the
rendering/setup: http://doc.trolltech.com/4.6/qglwidget.html - This
also provides texture loading using QImage. Still, maybe a more
lightweight solution with Xlib and DevIL, packed into a nice, little
C++ framework is what aGLESory is about (maybe with some additional
helper classes to make it easier to get started).

It would be nice if Flandry (the reporter on the GSoC ideas page)
could elaborate a bit on what the idea is exactly. I've added myself
as a possible mentor for this project, as it does interest me
personally :)

HTH.
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: External Repository and HAM

2010-03-08 Thread Thomas Perl
2010/3/8 Marius Vollmer marius.voll...@nokia.com:
 ext Benoît HERVIER kher...@khertan.net writes:
 The purpose is to migrate my softwares from extras to my own
 repository as i ll not push anymore my applications to extras, but
 only on my own repository.

 Ahh, ok.  This is not something that is well supported (as you have
 found out), and I believe the Maemo community discourages this.  Maybe
 there is a possibilty for you to keep your package in Extras?

I have a similar problem. If the Maemo community wants developers
to publish their packages in Maemo Extras, please make sure that
problems with the autobuilder are dealt with in a reasonable time frame.

I haven't published a new version of MaePad in Extras for nearly a
month now, because of autobuilder issues (with sharing-dialog-dev):

https://bugs.maemo.org/show_bug.cgi?id=9070

In the mean time, several new versions have been published, and I'm
distributing binary .debs on the MaePad homepage, which is not an
optimal solution.

I don't know if Khertan's problem is technical or political, but please try
to fix the technical problems with the Extras repository, or even more
developers will create their own repos again (think gronmayer.com), and
because of the trust domain issue, this might result in several people
requesting to have their packages pulled from Extras in order to be
able to distribute their packages from another repo (it also means that
less packages go through Extras-Testing / the Extras QA Queue).

I guess this is not what the community wants, right?

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Hildon-Extras] New widgets: about dialog, simple color dialog

2010-03-08 Thread Thomas Perl
2010/3/5 Cornelius Hald h...@icandy.de:
 Before doing the release, maybe we should try to collect a list of
 project currently using widgets from hildon-extras. We could then
 directly contact the authors to notify them of the change.

I've created a Wiki page where developers can add their apps that
are using Hildon-Extras:

  http://wiki.maemo.org/Hildon-Extras

Do you think we can come up with a widget gallery on the wiki
page that describes each widget and shows a screenshot? This
can really help developers to decide if they want to use HE and
which widgets from it they might find useful.

 Also we should think about further additions, that should go into the
 first release. For example, I would really like to have a nice
 HeColorButton, that contains a colored square and a label. The
 integration of HeColorDialog and HeSimpleColorDialog would also be nice.

I'm using HeSimpleColorDialog myself in MaePad, and Graham said
that he would use it too (don't know if he does already). If you do a
HeColorButton, please also do a variant that can be used as a toolbar
button (I'd use that in MaePad, too).

 I could go for the color button. Would there be someone interested in
 bringing together the color dialogs?

Do you mean merging both color dialogs into one configurable dialog?


Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Hildon-Extras] New widgets: about dialog, simple color dialog

2010-02-16 Thread Thomas Perl
2010/2/15 Cornelius Hald h...@icandy.de:
 The question is, whether or not we want that. If we release a library, we
 will have to deal with API compatibility in successive versions, etc.

I think it would be helpful to create/ship a library. If we don't want
to create a shared library just yet, we can always create a static
library + some compatibility level C macros to issue compiler errors
when the API changes (HE_ASSUME_API_LEVEL(1)?) against which packages
link against (and depend on the -dev package). Any API changes could
then be documented on the webpage or the wiki, with help and code
examples on how to upgrade to a newer API version to make it easier
for developers to upgrade to a new hildon-extras API version. Of
course, this means that application packages that are not updated
might not build from source in the future (source packages can be
easily changed to the new API version; due to the static library,
binary packages will not break).

Even a static library seems to be a better solution than copy'n'paste.
I believe that if users of hildon-extras (developers using HE in their
projects) start to copy'n'paste stuff, they might add new features and
fixes only in their local version, making it a nightmare for the HE
maintainers to go and collect all fixes from different projects and
merge them into the hildon-extras repository (it's also tedious
merging changes from HE to the local copy). A compiler error pointing
to a Wiki page that describes how to upgrade to a newer API version
seems much more developer-friendly and allows us to improve things
without requiring to commit to a fixed API too early.

After some months when the bugs and API annoyance are ironed out, we
can create a shared library and provide API/ABI compatibility.

Please point out any thought errors that I might have had here ;)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Why touch event go through my window

2010-02-12 Thread Thomas Perl
2010/2/6 Evan JIANG first...@gmail.com:
 I may not explained it clearly. Let me give an easier understanding
 example. If the window is in the top of screen, covered the title bar,
 then when I press the button on the left-top
 corner, it will show the application switch window. That means, the
 press event go through my window, and handled by the app swithcer
 button.

Maybe calling XSetInputFocus helps here? See this thread:

http://sourceforge.net/mailarchive/forum.php?thread_name=c4cd0cc80911291029l282b140fob3288389beabfa39%40mail.gmail.comforum_name=enlightenment-devel

Also:

http://forums.internettablettalk.com/showthread.php?t=36952
https://bugs.maemo.org/show_bug.cgi?id=6511

HTH.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


[Hildon-Extras] New widgets: about dialog, simple color dialog

2010-02-01 Thread Thomas Perl
Hello!

I'm happy to announce that two new widgets are now available in the
Hildon-Extras SVN repository. Hildon-Extras is a collection of
additional widgets and dialogs that are designed to work on Maemo
devices and make development of commonly-used UI elements easier by
providing a set of ready-made widgets (and dialogs) that you can use
in your applications.

The HeAboutDialog widget is an alternative to GtkAboutDialog, and uses
fonts and colors from the Fremantle Style Guide to provide an
informative about dialog for an application. In addition to the static
info, a developer can optionally provide up to three URLs that will be
accessible using buttons: Website, bug tracker and donations. You are
free to skip any of these, and the corresponding button will not be
shown.

The HeSimpleColorDialog works as a very simplified and finger-friendly
color chooser dialog that has a pre-defined palette of colors. It's
most useful for applications where the user does not need to select
that specific shade of green, but just needs to choose colors to
differentiate between different objects (e.g. calendar categories,
TODO items, etc..).

Grab it from the project website (you'll find the link to the SVN repo there):

https://garage.maemo.org/projects/hildon-extras/

Enjoy!
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

2010-01-07 Thread Thomas Perl
Hello Alan, b0nc3 and Tuomas!

2010/1/5 Qole qole.tab...@gmail.com:
 On Sat, Jan 2, 2010 at 7:53 AM, Thomas Perl th.p...@gmail.com wrote:
 I've been thinking of creating a SCP sharing plugin for uploading
 photos to a web server, but then thought that a generic command-line
 sharing plugin would be even more universal and useful. [...]

 What a MARVELOUS idea!

I have created a project on garage:

https://garage.maemo.org/projects/sharing-cli/

Would be nice if all of you who are interested can join this group so
we can collaboratively implement this plugin. I've set up the git
repository (although no commits yet) and am waiting for the mailing
list to be activated.

 If you coupled this with an Advanced Mode in the File manager that let you
 show all files and browse all directories, it would be The Best Idea Evar!

This should probably go into Petrovich - we have control over it (it's
open source), and it integrates the Sharing functionality already.

Greetings,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Proposal: Sharing plugin to call command-line apps (e.g. photo sharing via SCP)

2010-01-02 Thread Thomas Perl
Hello!

I've been thinking of creating a SCP sharing plugin for uploading
photos to a web server, but then thought that a generic command-line
sharing plugin would be even more universal and useful. I'm thinking
of a plugin that has a single-line configuration entry that contains
the command line will be called by the shell and the filename of the
to-be-shared file passed in as parameter (%s), so if I want to publish
photos on a server via SCP, I set up SSH public key authentication the
normal way and then create a new account with the following command
line:

scp %s u...@server.example.org:~/photo-uploads/

The command will be called for each file that is to be shared, and the
success or failure of the operation is determined by the return value
of the application. The sharing framework support multiple acounts
per service, so our service (Command line) can then have multiple
accounts (e.g. one for copying files via SCP to server A, one for
copying files via FTP to server B, ...) for different purposes.

Writing a shell script or utility that takes one media file to upload
as argument is much easier than writing a sharing plugin for every
service. Of course, it's not as user-friendly, but power users can do
lots of interesting things without much effort, and we can provide
template command lines for use by normal users (e.g. SCP, FTP, woof,
copy to manual upload queue folder in MyDocs, ...).

Is anyone interested in collaborating on such a plugin, or does such a
thing already exist?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to play music in silent mode?

2009-12-21 Thread Thomas Perl
2009/12/20 Alberto Garcia agar...@igalia.com:
 I want to make Vagalume play music even if the N900 is in silent mode.
 I also don't want it to be interrupted when I receive a new IM.

 Summarizing: I want the same behavior as the N900 media player.

 How do I do that? I'm using GStreamer's pulsesink.

Welcome to the club! Please vote for:

https://bugs.maemo.org/show_bug.cgi?id=6694

Stefan there suggests using libplayback, but it's {un,under}documented
- or at least I wasn't able to figure out how to get the desired
behaviour.

Please also share your findings if you figure out how to make it work
(at least FM Radio and Panucci also want to achieve the same thing you
want with Vagalume, but we have not figured it out yet).

HTH.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: docs and optification

2009-12-18 Thread Thomas Perl
2009/12/13 Attila Csipa ma...@csipa.in.rs:
 On Sunday 13 December 2009 15:13:54 Mustali Dalal wrote:
 Purging copyright files does not seem right; they are tiny and have legal
 bearing.

 Since a lot, if not all, apps currently in testing use GPL or other FOSS
 license, I would guess there be good reasons to keep the copyright file
 installed with the package. Would there be license violation if a copyright
 file is not installed with the package?

 or is this a non-issue for developers?

 I'm wondering maybe we could have a license package we could depend on and
 then just use a softlink or something similar ? A Depends: license-gpl (=3.0)
 sounds simple enough to me and then the license is crystal clear and we don't
 have to duplicate the license for each package and the license package can
 provide all the legalese. It would also simplify checking/verifying proper
 licensing in the autobuilder. Just a thought.

License != Names of copyright holders. Also, some packages include
files with different licenses, and the debian/copyright should contain
information about them. For different files, there might be different
copyright holders and parts of the code could come from different
sources. The debian/copyright file can sum up all these facts. For
example, have a look at the copyright file for mplayer in Debian:

http://packages.debian.org/changelogs/pool/main/m/mplayer/mplayer_1.0~rc3+svn20090405-1/mplayer.copyright

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: QA Process for non user/* packages and how Application Manager handles upgrades (was: Re: extras-devel - extras-testing auto-promotion not working?)

2009-12-03 Thread Thomas Perl
2009/12/2 Anderson Lizardo anderson.liza...@openbossa.org:
 2009/12/2 Benoît HERVIER kher...@khertan.net:
 What happen if i push something for testing like PyGTKEditor for example ...
 but once this one has been push, a new version of a python binding used by
 PyGTKEditor exist in the extras-devel, we cannot push it to extras-testing
 manually  ? But as there isn't any new version of PyGTKEditor, i ll recreate
 one package in extras-devel with a greater number just to push the python
 binding.

 What happen now if this binding is a important update ?

 That's what is happening at the moment with python-osso.

 The version in extras  extras-testing (0.4.0-0maemo1) has a bug where
 the __init__.py file is not generated (because it lacked the
 python-central dependency). The issue has been fixed in 0.4.0-0maemo2
 some time ago, but it does not go to extras-testing because there is
 no package depending _explicitely_ on that new version.

 So unless someone promotes a user/* package to extras-testing that has
 Depends: python-osso (= 0.4.0-0maemo2) , python-osso will remain
 broken on extras  extras-testing.

Maybe a meta-package that depends on all new PyMaemo packages
would do the trick? AFAIK there is a user/hidden section that lets the
package appear in upgrade and uninstall views, but not in the normal
install view. So users won't see it in the normal application list, but
would have the option to remove or upgrade the package:

http://maemo.gitorious.org/hildon-application-manager/mainline/commit/f7b4542b3c77114a95e2803708cec8eeff3409f7

(I don't know if this commit has made it into a release version yet, though)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: coding in python using os.system , (works on scratchbox but not on N900), Urgent pls help

2009-11-30 Thread Thomas Perl
2009/11/29 Anderson Lizardo anderson.liza...@openbossa.org:
 On Sun, Nov 29, 2009 at 11:36 AM, shampavman shampavma...@gmail.com wrote:
 if anyone can confirm that something like this..
 os.system(ls  process_output.log)
 would work , it would be of really great help..

 Also if there are any alternatives to using os.system. I would like to
 know..

 If all you want is to get a list of files of a directory, try os.listdir():

In case you want to do more complicated things, please think about
using the subprocess module and its Popen object. It's really easy
and more reliable (e.g. you can read stdout/sterr directly instead of
having to use pipes and output redirection to files):

http://docs.python.org/library/subprocess.html

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Marking audio files as don't play in shuffle mode (Fremantle)

2009-11-24 Thread Thomas Perl
Hello!

For gPodder it would be nice if it could mark all files that it
downloads so that MP3 files downloaded with it are not taken
into account when the user chooses the shuffle all songs
feature in the Media Player (because one wants to listen to
short music clips in shuffle mode, shuffling music mixed with
45-minute-long talk shows isn't really useful IMHO).

Is it possible to do that, and if so, how? (I guess Tracker will
be involved in the solution, but I don't know if my use case is
supported with the current metadata / Media Player).

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


GStreamer playbin2 and Silent mode on the N900

2009-11-24 Thread Thomas Perl
Hello!

When the N900 is in silent mode, music played through playbin2
using GStreamer is also muted, so one has to switch to the
General profile in order to listen to music. The built-in media
player is not affected by this, so is there a way to set my playbin2
to not be muted when the phone has the silent profile activated?

In my case, it's a third-party media player, so the user pretty likely
wants to listen to music when using it, independent of the selected
profile (Silent, General).

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fwd: Re: Maemo Barcelona Weekend: best way to ask for help for a UI?]

2009-11-22 Thread Thomas Perl
2009/11/19 Andrea Grandi a.gra...@gmail.com:
 2009/11/17 Quim Gil quim@nokia.com:
 Don't expect them to know the insights of Python/Hildon, though. They
 obviously know the Maemo 5 UI but how you get things done with code is a
 different matter. Anyway, there will be other colleagues attending and
 some GTK+/Hildon  Qt specialists in the other activities.

 this was a dart directed to Thomas :)
 I hope we can find some minutes to sit down, drink a beer and talk
 about how to organize the UI of my app :P

Of course, will try my best to help with technical questions about
PyMaemo/Hildon/GTK+ there :)

Maybe we should have a map of people and technologies on the Wiki
so that when one needs (technical) help with a specific technology, he/she
can look up the name of persons that have worked with that technology
before? Ideally, everyone can then add technologies they are working with
(Qt, GStreamer, GTK+, Hildon, Python, ...), so everyone can make the
best use of the time at the event..

Would such a wiki page make sense? Would attending developers be
interested in adding their fields of work/interest to such a page?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fwd: Re: Maemo Barcelona Weekend: best way to ask for help for a UI?]

2009-11-22 Thread Thomas Perl
2009/11/22 Andrea Grandi a.gra...@gmail.com:
 2009/11/22 Thomas Perl th.p...@gmail.com:
 Maybe we should have a map of people and technologies on the Wiki
 so that when one needs (technical) help with a specific technology, he/she
 can look up the name of persons that have worked with that technology
 before? Ideally, everyone can then add technologies they are working with
 (Qt, GStreamer, GTK+, Hildon, Python, ...), so everyone can make the
 best use of the time at the event..

 Would such a wiki page make sense? Would attending developers be
 interested in adding their fields of work/interest to such a page?

 +1 for me!
 I think it would be very useful!

I have added the section Help with specific technologies to
http://wiki.maemo.org/Maemo-Barcelona_Long_Weekend/UX_meets_Code

Please add yourself, too :)

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Geocoding library for Fremantle?

2009-11-11 Thread Thomas Perl
Hello, Simon!

2009/11/10 Simon Pickering s.g.picker...@bath.ac.uk:
 I'm looking for a geocoding library to run on the N900. I want to take
 the location string attached to those N900 using online contacts who
 provide it, and plot that on a map (Emerillon).

 Of course having to parse the message string and then do the geocoding
 is rather wasteful (of CPU, network traffic and accuracy) and it would
 be vastly more efficient and useful to just have a contact contain the
 raw lat/lon/accuracy data, but we've got to work with what we've got.

 GeoClue offers a geocoding api, but as we use liblocation rather than
 GeoClue, and as I remember someone saying at the summit (in the
 presentation on location stuff) that there would be an api to do
 (reverse)geocoding, I was just wondering if this is indeed the case and
 when we might see such a thing? Named libaddress perhaps?

Maybe this is what you want:

http://maemo.org/api_refs/5.0/5.0-final/cityinfo/

HTH.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: debhelper-maemo-package-icons

2009-11-11 Thread Thomas Perl
2009/11/10 Andrew Flegg and...@bleb.org:
 On Tue, Nov 10, 2009 at 13:50, Gabriel Schulhof n...@go-nix.ca wrote:
 I, for one, will stick to 26x26, because older version of Hildon
 Application Manager do not work with higher rez icons, and I don't want
 yet another reason to split my source package along distro lines.

 AIUI, Diablo and Chinook HAM's both work fine with 48x48 icons (they
 scale down); whereas none of them will scale up. If you want a single
 icon size, make it 48px square as this won't look silly in Fremantle
 and will look acceptable on earlier releases.

It might be possible that Gabriel's scripts can be extended so that they
will pick the icon file with the right size (or do anti-aliased scaling in case
the right icon size is not available as file) depending on which target
(fremantle, diablo, chinook, etc..) the package is being built for...

This would make it possible to have proper icons for every distro version
while still not having to have different debian/control files for each one.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: QA process = bug fixing disincentive?

2009-11-11 Thread Thomas Perl
2009/11/4 Graham Cobb g+...@cobb.uk.net:
 Attila said...
 On Wednesday 04 November 2009 10:28:58 Andrew Flegg wrote:
  On Wed, Nov 4, 2009 at 09:03,  tero.k...@nokia.com wrote:
   Two days later I notice a blinking orange light in my status bar. I see
   a new version of the application. I install, I check what has changed
   (minor or major?), I run my tests and thumb it up again.
 
  Aside: how do you check what has changed?

 This is one of the things I miss sorely from the Application Manager. Sure,
 you can see the description and version, but not things like free/non-free,
 the repo and last, but not least, the changelog (maybe based on the
 debian/changelog most packages have, anyway).

 For users AppMgr has a user-friendly alternative: you specify an update 
 description in the control file.  Now that I think of it this needs to go 
 into the extras testing rules: any package which is already in Extras must 
 specify an update description to give people information on why they should 
 upgrade.

 But the update description does not help with testing: (a) it is user 
 friendly text, not a developer changelog and (b) the description is vs. the 
 version already in Extras not vs. the last extras-testing version.

The following is a rant about XB-Maemo-Upgrade-Description
with some suggestions for improvement...

I personally used this field in my packages, but the problem is that
the developer might forget to update the description, as normal
changes are logged in debian/changelog.

Also, imagine this row of releases (with the update text in brackets):

1.0-0 (Initial release)
1.0-1 (Fixed bug 1234)
1.0-2 (Added a new icon)
2.0-0 (Complete rewrite, everything changed)
2.0-1 (Increased the contrast of the application icon)

Now, when a user has e.g. version 1.0-1 installed, and the
repository already contains version 2.0-1, the user is offered
to upgrade it with the description Increased the contrast of the
application icon, when in reality, the upgrade from 1.0-1 to 2.0-1
does a lot more in reality (after all, 2.0 was a complete rewrite).

Not every user upgrades from every point release to another,
especially since the new Extras-Testing process. This field
(XB-Maemo-Upgrade-Description) is bad for these reasons,
as the upgrade description really depends on which version you
upgrade from.

My suggestion is to either use the Debian changelog, or if this
sounds too technical for the end user, agree on some way to
mark user-relevant changes in the Debian changelog (by using
USER: as a prefix for a one-line summary or by having a
convention of having the first entry in the Debian changelog be
a user-friendly summary of all changes) and then parse the
changelog and display all user-relevant changes in the AppMgr.

The one-line summary in the AppManager UI (that is now taken
from XB-Maemo-Upgrade-Description) can then be taken from
these user-friendly changelog entries, and a upgrade that jumps
multiple versions can then display like this:

Increased the contrast of the application icon (+ 2 more changes)

Clicking on the details should then reveal all changes from the
installed version to the version that the package is being upgraded
to.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Looking for a tag cloud widget (like the one in Edit tags)

2009-11-09 Thread Thomas Perl
Hello!

I need a widget that can display a tag cloud out of a list of items
that I provide (with different font sizes depending on a weight
associated with each item). In Fremantle, the Images and Camera apps
have such a tag cloud (the dialog is called Edit tags), but I don't
think that the widget itself is open (if it is, please kindly point me
to its source ;).

If there's no such thing, maybe I'll do one for Hildon Extras; just
don't want to duplicate work that someone else might have done already
:)

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Screenshot as loading screen on Maemo 5

2009-10-23 Thread Thomas Perl
2009/10/23 Luca Donaggio donag...@gmail.com:
 I was thinking that there should be a way to remove the existing screenshot
 from a postinst script when upgrading to a new version of the app.
 I mean, some way more reliable than `rm /home/user/.cache/launch/service
 name.pvr`.
 This could be useful if the new version has a substantially different UI
 than before to not confuse previous users.

Yes, that would be nice. A small utility that gets the file name of
the .desktop file as parameter should be enough I believe? We could
then add something like the following to postinst:

maemo-remove-screenshot /usr/share/applications/hildon/appname.desktop

I believe that maemo-remove-screenshot would then just use the
same logic as hildon-desktop(?) to get the file name of the screenshot
and remove it. When the location changes (in the hildon-desktop source)
this utility would also know about the location change, then..

(The alternative of detecting an upgrade in the application code and
doing the removal by hand using take=FALSE is cumbersome)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


GStreamer playbin + MP3 playback on the N900

2009-10-21 Thread Thomas Perl
Hello!

As mentioned in https://bugs.maemo.org/show_bug.cgi?id=5629, I cannot
get MP3 files to play with GStreamer on the N900 using the playbin
element. I have tested it with both Python code and the gst-launch utility.

$ gst-launch playbin uri=file:///path/to/a/mp3file.mp3

The error I am getting is this one:

ERROR: from element /GstPlayBin:playbin0/GstFileSrc:source: Internal
data flow error.
Additional debug info:
gstbasesrc.c(2345): gst_base_src_loop ():
/GstPlayBin:playbin0/GstFileSrc:source:
streaming task paused, reason not-negotiated (-4)

Is there any way how I can make this work on the N900? (works in Diablo)
Is there something special I need to do to playback this file?

For now, I don't want to use MAFW, as this would require rewriting big
parts of my code, and playback isn't supported by python-mafw, anyway.

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: GStreamer playbin + MP3 playback on the N900

2009-10-21 Thread Thomas Perl
2009/10/21 Claudio Saavedra csaave...@igalia.com:
 El mié, 21-10-2009 a las 16:17 +0200, Thomas Perl escribió:
 As mentioned in https://bugs.maemo.org/show_bug.cgi?id=5629, I cannot
 get MP3 files to play with GStreamer on the N900 using the playbin
 element. I have tested it with both Python code and the gst-launch utility.

 $ gst-launch playbin uri=file:///path/to/a/mp3file.mp3

 The error I am getting is this one:

 ERROR: from element /GstPlayBin:playbin0/GstFileSrc:source: Internal
 data flow error.
 Additional debug info:
 gstbasesrc.c(2345): gst_base_src_loop ():
 /GstPlayBin:playbin0/GstFileSrc:source:
 streaming task paused, reason not-negotiated (-4)

 Is there any way how I can make this work on the N900? (works in Diablo)
 Is there something special I need to do to playback this file?

 playbin2?

Oh, yes. That works perfect :) Thanks! Can I also play audio while the
N900 is in the Silent profile with GStreamer? (Playback is muted with
the Silent profile)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Considering /opt and MyDocs in your packages

2009-10-21 Thread Thomas Perl
2009/10/21 Martin Grimme martin.gri...@gmail.com:
 Please don't get me wrong. optify is still useful and good to have,
 but everybody should bear in mind that it's only a workaround, and
 that relocating the software to /opt would be a much safer and more
 elegant solution.

It would be helpful if you could provide instructions on how to install
apps directly into /opt without changing too much of the packaging
stuff (remember, some package maintainers have to keep the Diablo
version and maybe even a Linux Desktop version up to date as well,
so anything that avoids big differences in packaging/code helps here).

I think a subsection on this wiki page would be ideal:

http://wiki.maemo.org/Opt_Problem

 IMHO optify is OK for porting software from upstream, but if you write
 specifically for the N900, you should rather consider making your
 software easily relocatable eventually.

Adding maemo-optify as build-depends and to debian/rules is just
simpler and more straightforward than doing more intrusive changes.

I still hope that we get rid of maemo-optify at some point in the
future, as it's a dirty dirty hack. In the mean time, Marius is doing a
great job of fixing remaining bugs in the optify tool, even if it means
adding even more dirty hacks (symlink/directory fixing in postinst ;).

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Optification breaks package on upgrade from non-optified older version

2009-10-16 Thread Thomas Perl
2009/10/15 Quim Gil quim@nokia.com:
 ext Thomas Perl wrote:
 In the latest version of gPodder (written in Python), I have started
 using maemo-optify. It saves around 1 MB according to maemo-optify's
 output. The problem is that now when a user upgrades from an older
 version to this version, it breaks (the user cannot start the
 application from the icon, and starting it from the command line tells
 me that Python can't find the gpodder module).

 Uninstalling and re-installing the package fixes this problem, but I
 assume there will be lots of users upgrading from the current version
 in Extras (non-optified) to some optified version in the future, and
 they won't just try to uninstall and re-install it and assume that the
 application is at fault :/

 lots of users before sales start = actually not that many and all of
 them quite savvy and even probably reflashing at this point.

 Thanks for you report though. It's clearer that unless we find several
 solutions the time for optification is NOW, or whenever a developer is
 pushing a first release to Extras.

Feel free to test the newer version and rate/comment on the package here:

http://maemo.org/packages/package_instance/view/fremantle_extras-testing_free_armel/gpodder/2.0+git20091013-thp1/

The non-optified version from September is already in Extras, and it
would be nice to get this updated, optified package into Extras before
sales start to avoid having clueless users think that the app is broken :)

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Optification breaks package on upgrade from non-optified older version

2009-10-16 Thread Thomas Perl
2009/10/16 Mikko Vartiainen mvartiai...@gmail.com:
 On Fri, Oct 16, 2009 at 2:05 PM, Andrew Flegg and...@bleb.org wrote:
 On Fri, Oct 16, 2009 at 11:49, Mikko Vartiainen mvartiai...@gmail.com 
 wrote:
 This would certainly work. maemo-optify should have option which prevents
 it from creating directory links.

 Why would/should it be an option? From the sounds of it, it shouldn't
 create directory symlinks; why would a package ever want them given
 the problems it can cause?

 Other way around then. Option to create directory symlinks. They are
 useful for large data directories with hundreds or maybe thousands of
 files. Currently maemo-optify doesn't create links for files which are
 smaller than 2KB, but there could be hundreds (or thousands) of small
 files. Of course it's possible to install to /opt without using
 maemo-optify but I find it very easy use.

(Is there a bug tracker for maemo-optify? Couldn't find it on bugs.m.o :/)

Being able (as a packager) to tell maemo-optify would be very helpful
when installing packages with lots of small data files (icon themes, ...).

That said, the current problem (and the one I ran into, apparently) is the
fact that existing directories in packages will not be replaced with symbolic
links when upgrading packages.

I don't really know much about dpkg internals, but maybe it would be
possible for maemo-optify to add a small script to postinst that will do
something like this (in pseudocode):

for each (symlinkname in the package) do
if (symlinkname points to /opt) and (symlinkname is a directory) then
if (symlinkname is an empty directory) then
remove directory, recreate correct symlink
else
create symlinks inside the directory
endif
endif
endfor

In the case where the directory is empty, this works as expected and
should leave the same structure as a non-upgrade installation (essentially
fixing the bug I was experiencing). In cases where there directory is
non-empty, it will at least re-create a working symlink structure, but the
on-disk structure will not match the package contents, which could possibly
lead to problems with future upgrades.

At least the small code above without the last else code path should be
sane to add to maemo-optify to fix the upgrade directory/symlink bug?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Optification breaks package on upgrade from non-optified older version

2009-10-15 Thread Thomas Perl
Hello!

In the latest version of gPodder (written in Python), I have started
using maemo-optify. It saves around 1 MB according to maemo-optify's
output. The problem is that now when a user upgrades from an older
version to this version, it breaks (the user cannot start the
application from the icon, and starting it from the command line tells
me that Python can't find the gpodder module).

Uninstalling and re-installing the package fixes this problem, but I
assume there will be lots of users upgrading from the current version
in Extras (non-optified) to some optified version in the future, and
they won't just try to uninstall and re-install it and assume that the
application is at fault :/

Is it possible to fix that problem somehow? Or should I just disable
optification?

Another problem is the slower startup speed, which is really
noticeable now. That's another reason why I would like to go without
optification.

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Screenshot as loading screen on Maemo 5

2009-10-13 Thread Thomas Perl
Hello!

With the latest firmware, the Settings window and the Application
Manager both show a fake screenshot when clicking the icon in the menu
and then fade to the real window contents after the application has
really started up (look closely at the Language  region icon in the
settings dialog when starting it to see what I mean, as the screenshot
contains a different icon than the real application).

For applications that start up longer (e.g. Python applications) this
can be really helpful, and I'd like to do the same for gPodder if
possible.

Is there an official way to do this for third party applications (or
how is it done at all)?

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Color wheel mockup

2009-10-05 Thread Thomas Perl
2009/10/5 Cornelius Hald h...@icandy.de:
 How about this:
 We put the labels for R,G,B and hex color directly into the color
 preview. This saves some space and I think white text with black outline
 should be readable on every color background. Then we join the palette
 selection from Thomas with the selector ideas from you. So we have only
 one button which lets us choose between different selectors or different
 pallets (which are just a different form of selectors anyways).
 Now we have a common frame on the right side and can display the specif
 selectors/palettes on the right side.

Looks good to me. The only problem I see is that we might not be able
to get the style we want using a normal GtkDialog with buttons, but
have to somehow re-create the dialog layout from scratch (or can we
simply pack the color preview + a HildonPickerButton inside the action
area of the dialog?).

That doesn't seem like a real problem, as long as we make sure that we
get the dialog button style (the one with the blue outline) for our
buttons on the right.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Color wheel mockup

2009-10-05 Thread Thomas Perl
2009/10/5 Cornelius Hald h...@icandy.de:
 On Mon, 2009-10-05 at 14:38 +0200, Thomas Perl wrote:
 That doesn't seem like a real problem, as long as we make sure that we
 get the dialog button style (the one with the blue outline) for our
 buttons on the right.

 Exactly. If we can't use the action area, then we'll find another way. I
 don't see a big problem there.

 Is someone actually interested in implementing this? Or parts of it?

I'd be in for implementing the Tango color chooser part of it at least.
Should we define a interface for every view before proceeding or
is the final chooser going to have a pre-defined set of views (e.g.
some color palettes like Tango and the GIMP chooser).

Also, I have been thinking of implementing relevant parts of the code
in Vala (and then either compiling the vala code to C source code for
the library or build-depending on Vala, if this is okay with you) - makes
it easier to write code more quickly and avoids some mistakes when
trying to write GObject code directly in C (at least that's my opinion ;).

This does not mean that we should the whole code in Vala, but as
Vala can compile directly into C code with support for proper GObjects,
it seems to be a nice way to do at least some parts of the library, right?

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Community widgets for Fremantle

2009-09-30 Thread Thomas Perl
2009/9/30 Marius Vollmer marius.voll...@nokia.com:
 Hamalainen Kimmo (Nokia-D/Helsinki) kimmo.hamalai...@nokia.com
 writes:

 On Tue, 2009-09-29 at 16:44 +0200, Vollmer Marius (Nokia-D/Helsinki)
 wrote:
 Hamalainen Kimmo (Nokia-D/Helsinki) kimmo.hamalai...@nokia.com
 writes:

  What prevents the community from releasing this unstable libhildon
  before Nokia does the stable release?

 The unstable release would not be of much use since people can not
 easily install it on their devices.

 I don't understand, wouldn't the forked/new widget library also have
 this same problem?

 No, since it would have a different name.

 Anyway, I realize I have been too negative about all this.  With some
 care, 'forking' libhildon and distributing it via Maemo Extras should be
 perfectly doable.

 'Forking' means using a different package name for everything (source,
 binary, -dev, etc), and I put it in quotes since it would be done by the
 original libhildon maintainers.

Why don't we simply create a new library and be done with it? That
library can be published to Extras through the usual means, and apps
that depend on it will automatically install it when needed.

This thread has gone for two days back and forth with no real progress
in terms of UI mock-ups and code :/

Here's my proposed 10-step-guide to achieving our goal:

  1. Pick a name (hildon-extras or hexy; suggested by Cornelius)
  2. Register a project at garage.maemo.org
  3. Set up the initial project structure
  4. Implement the color chooser as discussed
  5. Publish the library to Extras-Devel
  6. Use the library in GPE, Conboy, etc..
  7. Publish new versions of GPE, Conboy, etc.. to Extras-Devel
  8. Do the promotion / testing stuff until everything is in Extras
  9. Be happy to have a shared library in Extras :)
 10. There is no step 10

I'll be happy to jump in at step 4 :p

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Community widgets for Fremantle

2009-09-28 Thread Thomas Perl
2009/9/28 Piñeiro apinhe...@igalia.com:
 From: Thomas Perl th.p...@gmail.com
 I'd rather do without the scrolling if possible. Here's my mock-up and the
 accompanying Python script that you can use to try it out:

 http://thpinfo.com/2009/maemo/colorchooser.png

 http://thpinfo.com/2009/maemo/colorchooser.py

 It looks very fine. Anyway, you can still use the three column color
 selector and blabla, in order to allow the user to define a custom
 extra color.

 I suppose that you have the same idea, as you have the button
 Advanced. I suppose that when you press this button, a color dialog
 could appear in order to select a color in detail. Or do you have
 another idea for this button?

Yes, we can probably add whatever we want in the Advanced color
dialog. One thing that I would find nice (and that I have not found on
any platform yet) is that customized colors are saved per-user and not
per-application (so that when I for example have a great green color
that I want to use for my Uni stuff in GPE, I can have the same color
as background color of Uni-specific notes in Conboy and as background
color for Uni events in the countdown widget, etc..).

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Asking for developers and user support for a N900 application

2009-09-28 Thread Thomas Perl
2009/9/28 Joaquim Rocha jro...@igalia.com:
 Andrea Grandi wrote:
 from HTMLParser import HTMLParser --- package name in upper case...
 urllib2.Request(url, data)  method name in upper case...

 first they suggest name convention and then they're the first one not
 following them? This really sucks :)

 Request is an object (a class), it is not a method :)

They can't just change the naming for the standard library, as this
would (obviously) break old code. Most likely these libraries have been
around longer than PEP-8 has ;) I feel a bit bad about this, too, but
at least it has been fixed in Python 3000 (as the API break allows for
such changes):

http://docs.python.org/dev/3.0/whatsnew/3.0.html#library-changes

In Python 3.x, the HTMLParser module has been renamed to html.parser:

http://docs.python.org/dev/py3k/library/html.parser.html

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Community widgets for Fremantle

2009-09-28 Thread Thomas Perl
2009/9/28 Cornelius Hald h...@icandy.de:
 On Mon, 2009-09-28 at 13:00 +0200, Thomas Perl wrote:
  * Added pure black and white as suggested by Graham
  * One slot is free (when the current setting is a custom color that is
    not in the palette, the slot will be taken by that color and pre-selected)

 Do you think that one custom color is enough? How about having a
 complete column or row for custom colors? I didn't try it, but it looks
 like there could be enough room for a fourth row of colors.

With the one custom color I mean a situation like this:

1.) The default color set by the application is #ff (which is not in
 the Tango palette) - default for some setting, not application wide
2.) User clicks on the button that brings up the color selector dialog
3.) The resulting dialog should show a current state, and without the
 single button for #ff added, none of the color buttons could
 be selected.

For the custom colors, I think we can add a whole palette (named
User defined?) to the selection, and let the user customize it. This
User defined palette (again, 18 colors) can then be shared among
applications. It should probably be editable from within the dialog.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Community widgets for Fremantle

2009-09-27 Thread Thomas Perl
2009/9/26 Graham Cobb g+...@cobb.uk.net:
 On Saturday 26 September 2009 15:00:33 Thomas Perl wrote:
 I'd rather do without the scrolling if possible. Here's my mock-up and the
 accompanying Python script that you can use to try it out:

 I like the approach.  Good demo!

 I am not sure about the particular colours: it seems to be missing a pure
 white, pure black and a good strong yellow (and a turquiose and a pink would
 be useful).  On the other hand some of the colours look almost identical on
 the screen (particularly 2 of the 3 greens and 2 of the 3 reds -- and who
 needs 6 orangey-browns?).

You can easily replace a column by commenting out (using #) a row of colors
and add something like this (white, black, yellow):

'#ff', '#00', '#00',

 If you are going to have a limited selection, I think they need to be strongly
 contrasting, not shades of similar colours.  My use case is to associate the
 colours with different PIM categories (used for contacts, events, tasks,
 etc.) so people want to have a lot of contrast.

Feel free to search for another color palette, e.g. see this:

http://images.google.at/images?q=color+palette

Maybe something like this would be more suitable?

http://www.newenglandconservatory.edu/styleguide/images/ColorPalette.jpg

You can then edit the file colorchooser.py that I linked above and edit
the HTML hex values and then start the script using python colorchooser.py
to see the results.

We might also go and have some pre-defined palettes that the developer can
choose when using the dialog (say, one wants to use the Tango colors, one
wants to use more strongly constrasting colors and another one might just
want to use different shades of grey for some reason).

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Community widgets for Fremantle

2009-09-25 Thread Thomas Perl
2009/9/25 gary liquid liq...@gmail.com:
 incidentally, there is a colorwheel in standard GTK

 http://commons.wikimedia.org/wiki/File:GTK_color_chooser.png

 whilst the number boxes themselves are not finger friendly (they could be
 replaced with popouts of some kind)
 the dialog itself certainly fits within the dimensions.
 perhaps taking a look at how that works and whether its usable in Fremantle
 would be beneficial.

Depending on the use case, having a nice finger-friendly color palette
could be *much* better than letting the user fine-tune the colors. I think
most color-choosing tasks (e.g. in Conboy) are not about getting some
really specific shade of green, but just getting a cute color that happens
to be green. A nice palette with beautiful colors can help here.

I propose a dialog with finger-usable buttons that just has the colors of the
Tango Color Palette in it:

http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines

Give the users less choice and more sane defaults ;) You can always add
that Advanced button with a hex entry field for the nerds later on.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Fremantle: Opening URLs and local files

2009-09-17 Thread Thomas Perl
Hello!

What is the canonical way of opening a browser and the media player
(or more general: opening a URL and opening a local file) from code
on Fremantle?

Is there a command-line utility that can be used or a D-Bus call? If so,
where is the D-Bus call documented (sample code would be enough ;).

Thanks,
Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Proper Way To Call Browser (Fremantle)

2009-09-07 Thread Thomas Perl
2009/9/7 Brent Chiodo bchi...@gmail.com:
 I look forward to the one in Python (I program in Python, don't know much C)!

It's not the perfect solution, but it works both on Maemo and on the Desktop:

import webbrowser
webbrowser.open_new('http://www.maemo.org/')

See http://docs.python.org/library/webbrowser.html for more information.

HTH

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: App menu not popping up any more after upgrading to Fremantle Beta2

2009-07-27 Thread Thomas Perl
2009/7/27 Alberto Garcia agar...@igalia.com:
 On Mon, Jul 27, 2009 at 05:27:31PM +0200, Luca Donaggio wrote:

 Thanks Alberto, now it works!
 I'm wondering why was it working before (Beta1) when I was doing
 a gtk_widget_show_all() on the main window only?

 It was a bug in the menu; it was showing the widgets for you.

Ah good, I think gPodder was affected by that bug as well (i.e.
working in the old SDK, but not on the devices). Thanks for the hint
:)

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Optimal battery life considerations in apps

2009-07-11 Thread Thomas Perl
2009/7/10 Andrew Flegg and...@bleb.org:
 Have you got any sample code which uses window-state-event I could use
 as a basis for comparison?

See the function window_state_event at:

http://repo.or.cz/w/gpodder.git?a=blob;f=src/gpodder/gui.py;h=9b0d0bef53;hb=HEAD#l3323

In a more isolated and to-the-point way, you could write that code
like this (in Python):

fullscreen = bool(event.new_window_state  gtk.gdk.WINDOW_STATE_FULLSCREEN)
if RUNNING_ON_MAEMO:
minimized = bool(event.new_window_state  gtk.gdk.WINDOW_STATE_WITHDRAWN)
else:
minimized = bool(event.new_window_state  gtk.gdk.WINDOW_STATE_ICONIFIED)

The last time I checked, this worked, except that on Maemo 4 you get
the withdrawn state and on the Desktop the iconified state (which
the code above accounts for).


HTH.
thp
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Optimal battery life considerations in apps

2009-07-09 Thread Thomas Perl
2009/7/8 Andrew Flegg and...@bleb.org:
    2) Stop updating the screen when your app isn't in the
       foreground.
- 8 ---
 I'm willing to put together this wiki page but have two questions:

    1) What is the best way of implementing (2) in C/Python/whatever?

For GTK+ (all languages), you probably want the window-state-event signal:

http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#GtkWidget-window-state-event

This signal makes use of the following structure:

http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventWindowState

which in turn uses the following enum:

http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkWindowState

You would probably have to write a sample app and check which window
events are received and then document which ones the developer has to
consume and process. One thing I noted with the GTK+ flavour on Diablo
is that iconify events are not sent/received correctly - at least in a
way different than on stock Desktop GTK+.

    2) In Fremantle, there's a compositing window manager. On a
       desktop this means you never receive an expose event
       since your window is always exposed on an off-screen
       buffer. What is the best way of implementing (2) in
       Maemo 5?

The same window-state-event signal should still be relevant on Maemo 5.

HTH.
thp
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Projects Nokia should support (yours?)

2008-10-27 Thread Thomas Perl
Ryan Abel wrote:
 What about something like powerlaunch? Music playback is a pretty  
 common use case, and having to take the tablet out of your pocket to  
 change the volume or the song is a pain. Some hooks into dsme/mce so  
 you can issue commands with the screen turned off would be a nice  
 feature.

It would be even more helpful if these things can be used by apps 
directly, i.e. send D-BUS messages which hardware keys are pressed when 
the screen is locked, just like what we can already do with the headset 
button. This way, we can implement hardware key handing in every app 
with the locked screen, too.


Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PIM stuff (was Re: Projects Nokia should support (yours?))

2008-10-24 Thread Thomas Perl
Graham Cobb wrote:
 o Extending Opensync to non-PIM objects such as photos.

No, that's probably solved by http://www.conduit-project.org/ already. 
Which would be nice to have on Maemo - and (using the search function 
there) seems to be kind of available for Maemo already:

http://www.conduit-project.org/wiki/0.3.5 (search for Maemo there)

I don't know how far support goes, but Conduit sounds like an 
interesting project.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Maemo Linux mainstream

2008-10-24 Thread Thomas Perl
Karl Eichwalder wrote:
 The reader application must not blank the screen while reading; I've the
 feeling fbreader lacks the feature maemo-mapper already knows about: if
 in full-screen mode, keep screen contents visible.

If you have not done so already, it might be good to file a bug at the 
fbreader bug tracker or at least contact the package maintainer - it's 
probably trivial to implement, but they have not thought about this 
useful feature yet.

If they get told this is an useful feature, they would be happy to add 
it or at least tell you the reasons why they won't.

Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: programmatically saving new access points, source code for icd ui? dbus? or icd in general?

2008-10-21 Thread Thomas Perl
On Oct 21, 2008, at 8:36 AM, Patrik Flykt wrote:
 On Mon, 2008-10-20 at 18:14 -0400, ext Kwan Hong Lee wrote:
 However, we are unable to programmatically associate to newly found
 access points that we have never saved.

 ICd2 needs the network connection to be saved beforehand to gconf in
 order to find the relevant network parameters.

 Save a similar type of WLAN to gconf and check what attributes it sets
 in gconf. Then create a program to add WLANs using those attributes.

Wouldn't it be better for the library to provide an API for such  
things, so that in case of a change in the internal data structures / 
gconf schema (with the API being the same or at least being backwards- 
compatible) you don't have to change every single program that tries  
to mess with the direct gconf settings for WLAN access points? And  
hunt hard-to-find bugs? Hmm..


Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: .install files

2008-10-07 Thread Thomas Perl
On Mon, 6 Oct 2008 21:48:34 -0500
Frank Banul [EMAIL PROTECTED] wrote:
 So I thought I would put a .install on the garage page but it seems
 that the garage web server is not configured to serve the .install
 files in a format that would allow for single click installs. I tried
 several different formats but couldn't get one to trigger an install.

From:
https://stage.maemo.org/svn/maemo/projects/haf/trunk/osso-application-installer/doc/repository.txt

  This manual task can be automated by providing a file of MIME type
  application/x-install-instructions and have the user open it with
  the Application installer.  Files with the extension .install are
  recognized to have the mime type application/x-install-instructions.

I think the last sentence only applies to files stored locally. So, if
you're using Apache2, you might want to add something like this to your
configuration files (or .htaccess, if the web server config allows it):

AddType application/x-install-instructions .install


thp
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: download and display image, please help.

2008-10-06 Thread Thomas Perl
On Mon, 6 Oct 2008 01:50:52 +0200
koos vriezen [EMAIL PROTECTED] wrote:
 2008/10/2 maemo developer [EMAIL PROTECTED]:
  I am new to maemo/gtk/gnome etc. I try to build an application that
  can run on nokia 770. One simple thing this application needs to do
  is to download graphic from internet and display the graphic on the
  device. I got the image by using curl library, now how to display
  the image? Tried to save the image to a file than display it using
  set_image_from_file, it worked but very slow. how to display the
  graphic from image stream in memory directly? gtkhtml can't help
  right? It doesn't seem able to display image. Thanks.  
 
 For a start, you can use GdkPixbufLoader to write the data from your
 network stream directly.

In addition, you might decide to use libsoup instead of libcurl, as the
former is GLib-based and might be easier to integrate in your
GTK-based app (i.e. GObject signals to connect to when parts have
finished downloading).


Thomas
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers