Re: Maemo UI Development for N800/N810

2008-03-07 Thread Eero Tamminen
Hi,

ext kumar lomash wrote:
 I have been developing GUI using GTK +2.0 and now I am facing some
 performance issues. Let me first describe
 
 The implementation: -
 The UI consists of layouts (GtkContainers) which have event box and image
 widgets. At any given time only one of the four layouts is visible and the
 user can select a layout at any given time. On an average each layout has 25
 buttons (internally event boxes and image widgets). Every button has 3
 states so there are 6 (3 event + 3 image) widgets for every button. A total
 of 4 layouts make 600 widgets roughly at any given time.
 
 The Problem: -
 Whenever user switches between layouts, I hide other layouts (hide the
 containers) and show the selected layout. The problem is that it takes very
 long to do these operations.

You need to profile your application to see what is the bottleneck.
I think you could do it even on x86 (e.g. using Valgrind/callgrind
+ Kcachegrind).

If you have deep widget hierarchy, you could try reducing levels in it
(deep widget hierarchies can greatly increase the number of signals
needed to propagate changes).


 Is there a better way of doing this? I used event boxes and image widgets in
 place of gtkbuttons because I needed custom shaped buttons with custom
 bitmaps over them.


- Eero

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


GtkWindow GtkFixed Offset

2008-03-07 Thread kumar lomash
Hi,

I have a normal Hildon window, on which I put a GtkFixed container. The
problem is that the container seems to have a 10 pixel offset from the
top-left corner of the parent (hildon) window.

I tried using container border width, alignment etc but could not resolve
this issue. I also found the same problem being described here
http://www.mail-archive.com/[EMAIL PROTECTED]/msg18690.html but could find
solutions given to it if any.

Please help!

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


Re: Maemo UI Development for N800/N810

2008-03-07 Thread kumar lomash
Hi Eero,

I tried reducing the hierarchy and it helped, but I am still trying to
reduce it further. Currently I am using 24 bit png (24 bit bmp converted to
png) images for all image widgets. Will it help if I use 8-bit bitmaps
(converted to png) to lighten the UI? Is there any other image format
supported by Maemo/GTK which would make it lighter?

Thanks for the help,
Lomash

On Fri, Mar 7, 2008 at 1:58 PM, Eero Tamminen [EMAIL PROTECTED]
wrote:

 Hi,

 ext kumar lomash wrote:
  I have been developing GUI using GTK +2.0 and now I am facing some
  performance issues. Let me first describe
 
  The implementation: -
  The UI consists of layouts (GtkContainers) which have event box and
 image
  widgets. At any given time only one of the four layouts is visible and
 the
  user can select a layout at any given time. On an average each layout
 has 25
  buttons (internally event boxes and image widgets). Every button has 3
  states so there are 6 (3 event + 3 image) widgets for every button. A
 total
  of 4 layouts make 600 widgets roughly at any given time.
 
  The Problem: -
  Whenever user switches between layouts, I hide other layouts (hide the
  containers) and show the selected layout. The problem is that it takes
 very
  long to do these operations.

 You need to profile your application to see what is the bottleneck.
 I think you could do it even on x86 (e.g. using Valgrind/callgrind
 + Kcachegrind).

 If you have deep widget hierarchy, you could try reducing levels in it
 (deep widget hierarchies can greatly increase the number of signals
 needed to propagate changes).


  Is there a better way of doing this? I used event boxes and image
 widgets in
  place of gtkbuttons because I needed custom shaped buttons with custom
  bitmaps over them.


 - Eero


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


Re: GUI Flasher

2008-03-07 Thread pHilipp Zabel
On Fri, Mar 7, 2008 at 9:24 AM, Eero Tamminen [EMAIL PROTECTED] wrote:
 Hi,


  ext pancake wrote:
   I'm pleased to announce the first version of the GUI for the Free Nokia 
 Internet Flasher
   (the 0x). I named it 'goxf' (yeah looks as weird as the other) ;)
  
   I just spend two funny nights playing with Gtkaml, Vala, Unix IPC and the 
 flasher
   internals to get an initial working version:
  
 http://news.nopcode.org/goxf.gif
 http://news.nopcode.org/goxf2.gif
  
   My main idea is to keep the frontend independent to the flasher, so, being 
 able to
   use the same frontend for flashing a Neo1973 or an HTC phone (both flasher 
 sources
   are available).

  But I guess flashers programs would be different (0x-n800 vs.
  ox-neo1973)?   I.e. UI needs configuration for which flasher
  to use?

Or the device could be autodetected via USB?
The neo1973 uses DFU (http://wiki.openmoko.org/wiki/USB_DFU)
The HTC phones have to be flashed differently depending on CPU and
bootloader version, I know flashers for some PXA and S3C HTCs exist.
Is there anything out there for the OMAP models?

   Do you think D-Bus is better solution for async communication between 
 process of
   different user levels? I'm not very familiar to dbus yet. But I can change 
 the IPC
   interface easily.

  Why not just popen() flasher and do communication using O_NONBLOCK
  on the UI side?



   I understand that a GUI for flashing should be as cleaner and simpler as 
 possible, trying
   to avoid stupid confusions to the user and avoiding errors, so, I'm opened 
 to
   proposals, ideas, etc..
  
   Feel free to subscribe to the mailing list for further discussion :)
  
   I plan to add support to pack/unpack fiasco images from the same gui. 
 (next week?)
  
   I get so much fun coding it with GTKAML. I encourage you to test it :)
  
   Here's the source of the gui:
  
 http://news.nopcode.org/miau/pvc.cgi?prj=0xleaf=2b622cf2/[EMAIL 
 PROTECTED]
  
   To run the gui just fetch the latest snapshot tarball:
  
 http://news.nopcode.org/miau/pvc.cgi?dist=0x
  
   and type:
  
$ make  cd src/gui  make
$ make install  cp src/gui/goxf /usr/bin
  
   (i have to check for gtkamlc compiler in build/configure stage) O:)
  
   The flasher is executed with sudo by the frontend in background when you 
 press connect,
   so, keep in mind that you will have to setup your /etc/sudoers file.
  
   $ sudo su
   # echo $SUDO_USER ALL=(ALL) NOPASSWD:ALL  /etc/sudoers
  
   PD: Before the 0.4 release I would like to port a similar gui with some 
 more buttons for
   dumping the firmware pieces from the nand and flashing from inside the 
 device, or using
   a n810 to flash a 770 via usb just clicking some buttons.
  
   Network flashing is also in todo :)
  
   Have fun!


 - Eero


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


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


Re: Maemo UI Development for N800/N810

2008-03-07 Thread Ross Burton
On Fri, 2008-03-07 at 11:53 +0530, kumar lomash wrote:
 The Problem: -
 Whenever user switches between layouts, I hide other layouts (hide the
 containers) and show the selected layout. The problem is that it takes
 very long to do these operations. 

Use a GtkNotebook with hidden tabs to switch between the layouts.

Ross
-- 
Ross Burton mail: [EMAIL PROTECTED]
  jabber: [EMAIL PROTECTED]
 www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF



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


Fwd: Control panel applet in maemo with python

2008-03-07 Thread Sergio Galán
I was reading the tutorial for writing Control panel desktop in maemo
 ( 
http://maemo.org/development/documentation/tutorials/maemo_4-0_tutorial.html#cpa
 ) But only mentions c, and looking for python bindings in google
couldn't find anything.
 ¿Does Someone know if its possible to program these applets in python?
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Recording audio in python

2008-03-07 Thread Mark Chang
Sorry for the ignorance -- I just got this thing :).

We are trying to do recording from the microphone input and playback
using Python. The archives tell me that I can do playback through
osso-media-server or through gstreamer, and that the osso thing is the
native playback mechanism. I saw some demo playback code in Kagu here:

http://kagumedia.com/projects/kagu/browser/trunk/src/kagu/ossoplayer.py

and some gstreamer code there as well. The archives also tell me that
I should record using gstreamer.

Questions:
 1) is there a canonical tutorial/example for using osso-media-server,
or shall I learn from Kagu?
 2) is there the same for audio recording using gstreamer?

I am new to the gstreamer thing, so be gentle ;)

-- 
Mark L. Chang
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Recording audio in python

2008-03-07 Thread Fred
Mark Chang a écrit :
 Sorry for the ignorance -- I just got this thing :).
 
 We are trying to do recording from the microphone input and playback
 using Python. The archives tell me that I can do playback through
 osso-media-server or through gstreamer, and that the osso thing is the
 native playback mechanism. I saw some demo playback code in Kagu here:
 
 http://kagumedia.com/projects/kagu/browser/trunk/src/kagu/ossoplayer.py
 
 and some gstreamer code there as well. The archives also tell me that
 I should record using gstreamer.
 
 Questions:
  1) is there a canonical tutorial/example for using osso-media-server,
 or shall I learn from Kagu?
  2) is there the same for audio recording using gstreamer?
 
 I am new to the gstreamer thing, so be gentle ;)
 
I suppose you could get recording example from Maemo Recorder ...

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


Re: GtkWindow GtkFixed Offset

2008-03-07 Thread Florian Boor
Hi,

kumar lomash schrieb:
 I have a normal Hildon window, on which I put a GtkFixed container. The
 problem is that the container seems to have a 10 pixel offset from the
 top-left corner of the parent (hildon) window.

this sounds a little bit like screen size vs. window client size. The decoration
the window manager adds eats up some pixels. Does this offset change if you
switch the window to fullscreen? If not do other container widgets suffer from
the same effect?

Greetings

Florian

-- 
The dream of yesterday  Florian Boor
is the hope of todayTel: +49 271-771091-15
and the reality of tomorrow.Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904][EMAIL PROTECTED]

1D78 2D4D 6C53 1CA4 5588  D07B A8E7 940C 25B7 9A76
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: GUI Flasher

2008-03-07 Thread Florian Boor
Hi,

pancake schrieb:
 I'm pleased to announce the first version of the GUI for the Free Nokia 
 Internet Flasher
 (the 0x). I named it 'goxf' (yeah looks as weird as the other) ;)
 
 I just spend two funny nights playing with Gtkaml, Vala, Unix IPC and the 
 flasher
 internals to get an initial working version:
 
   http://news.nopcode.org/goxf.gif
   http://news.nopcode.org/goxf2.gif

Looks really good apart from the misuse of some stock icons :)

  My main idea is to keep the frontend independent to the flasher, so, being
able to
 use the same frontend for flashing a Neo1973 or an HTC phone (both flasher 
 sources
 are available).

That's a very good idea - the best would be to have a kind of plugin API that
makes is easier to add support for additional custom flashers.

 Do you think D-Bus is better solution for async communication between process 
 of
 different user levels? I'm not very familiar to dbus yet. But I can change 
 the IPC
 interface easily. 

Yes I think so. It should be quite easy to use with Vala and would be a good
choice to do the communication between GUI and a privileged background process.
This is a short example how to use DBus with Vala here:
http://live.gnome.org/Vala/DBusSample

 I understand that a GUI for flashing should be as cleaner and simpler as 
 possible, trying
 to avoid stupid confusions to the user and avoiding errors, so, I'm opened to
 proposals, ideas, etc..

Yes I share this opinion: The GUI should stay as simple as possible. Dealing
with multiple different devices/flashers makes things more complicated but you
can hide a lot of this with a clever application. Automatic detection of
available target devices would be one thing, another might be to save the
configuration/file selection for a specific device type automatically. Some
simple checks if the selected files are valid for the assigned device and
partition would rock. Another nice improvement would be adding support for
automatic backups before writing to a device.

Greetings

Florian

-- 
The dream of yesterday  Florian Boor
is the hope of todayTel: +49 271-771091-15
and the reality of tomorrow.Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904][EMAIL PROTECTED]

1D78 2D4D 6C53 1CA4 5588  D07B A8E7 940C 25B7 9A76
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Launch image to increase feeling of responsiveness (a la iPhone)

2008-03-07 Thread Andrew Flegg
Hi,

Reading the recently released iPhone SDK's Human Interface Guidelines
document[1], I came across an interesting idea: every application has
a launch image configured which is immediately displayed on launch to
improve the user experience.

The theory goes that because the user sees something which looks like
the shell of the application whilst it loads, they feel the
application is loading faster:

   To enhance the user's experience at application launch, you
   should provide a launch image. A launch image looks very similar
   to the first window your application displays. iPhone OS displays
   this image instantly when the user taps your application icon on the
   Home screen. As soon as it's ready for use, your application
   displays its first screen, replacing the launch image.

I think this is a concept which would work well in Hildon: a PNG image
the size of an unmaximised window could be specified in the .desktop
file, on selection of an application the Task Navigator would load and
show that image immediately in a window titled the name of the
application, and the application loading infoprint would also be
shown. As soon as the app loads and opens its first window, the other
window is closed.

For example, a mockup showing a suggested launch image for the File
Manager can be seen at:

   http://www.bleb.org/software/maemo/file-manager-launch.png

As the Apple guidelines point out, the real window which is shown may
have localised labels etc., so there's no text shown. I've also greyed
out the button bar to show the user that it's inactive.

At the moment, starting apps like File Manager, Calculator, Connection
Manager etc. take on the order of 4-5 seconds, if the user was shown
something within 1 second, there are then two separate waits:

 1) 1s to display the launch image
 2) 3-4s for the real window to open and the app to become usable

Usability studies have shown that two short waits are preferable to
one long one, as long as there is a seeming progression from one state
to the other. That's why we've got the  launching infoprints
already - but this simple idea might improve the feel of
responsiveness that bit more.

Thoughts welcome.

Cheers,

Andrew

[1] Linked from:

   
http://www.techcrunch.com/2008/03/07/iphone-sdk-some-of-the-details-arent-great/

More directly, it's on page 94 at:

   http://www.docstoc.com/docs/418559/iPhones-Human-Interface-Guidelines

-- 
Andrew Flegg -- mailto:[EMAIL PROTECTED]  |  http://www.bleb.org/
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Recording audio in python

2008-03-07 Thread Mark Chang
On Fri, Mar 7, 2008 at 10:13 AM, Fred [EMAIL PROTECTED] wrote:
  I suppose you could get recording example from Maemo Recorder ...

I thought that was C? I'll take a peek and see if I can glean something.


-- 
Mark L. Chang
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers