Re: PyGTK upgrade

2008-10-01 Thread Lauro Moura
On Wed, Oct 1, 2008 at 1:36 AM, Jeffrey Barish
[EMAIL PROTECTED] wrote:
 When is PyGTK going to be upgraded to 2.12?  gtk.CellLayout has 7 methods
 that all require the cellrenderer.  gtk.ComboBoxEntry creates and packs the
 cellrenderer automatically, so without the get_cells method there doesn't
 appear to be a way to use any of those methods nor to change attributes of
 the cellrenderer.  get_cells is available only in PyGTK version = 2.12.
 I've been waiting since April for the upgrade.

Jeffrey, PyGtk 2.12 is available in Diablo extras since early July[1]
and in chinook since last october[2], but maybe these functions aren't
exported. Could you provide a more detailed list of these functions?


[1] http://repository.maemo.org/extras/pool/diablo/free/p/python-gtk2/
[2] http://repository.maemo.org/extras/pool/chinook/free/p/python-gtk2/


-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PyGTK upgrade

2008-10-01 Thread Lauro Moura
On Wed, Oct 1, 2008 at 6:19 PM, Jeffrey Barish
[EMAIL PROTECTED] wrote:
 Lauro Moura wrote:

 On Wed, Oct 1, 2008 at 1:36 AM, Jeffrey Barish
 [EMAIL PROTECTED] wrote:
 When is PyGTK going to be upgraded to 2.12?  gtk.CellLayout has 7 methods
 that all require the cellrenderer.  gtk.ComboBoxEntry creates and packs
 the cellrenderer automatically, so without the get_cells method there
 doesn't appear to be a way to use any of those methods nor to change
 attributes of
 the cellrenderer.  get_cells is available only in PyGTK version = 2.12.
 I've been waiting since April for the upgrade.

 Jeffrey, PyGtk 2.12 is available in Diablo extras since early July[1]
 and in chinook since last october[2], but maybe these functions aren't
 exported. Could you provide a more detailed list of these functions?


 [1] http://repository.maemo.org/extras/pool/diablo/free/p/python-gtk2/
 [2] http://repository.maemo.org/extras/pool/chinook/free/p/python-gtk2/

 First, I learned a better way to get version information.  Here's what I
 have:

 gtk.gtk_version = 2.10.12
 gtk.pygtk_version = 2.12.1

 It appears that the implementation of gtk.CellLayout is incomplete:

 import gtk
 c = gtk.CellLayout()
 Traceback (most recent call last):
  File stdin, line 1, in module
 NotImplementedError: gtk.CellLayout can not be constructed

 According to the documentation, CellLayout has been available since version
 2.4 of PyGTK.

 I am actually using a ComboBoxEntry, but it inherits from CellLayout.  The 7
 methods that I mentioned are pack_start, pack_end, set_attributes,
 add_attributes, clear_attributes, set_cell_data_func, and reorder.  They
 all appear as methods of ComboBoxEntry, although they are actually supposed
 to be methods of CellLayout.  The one method of CellLayout that is missing
 from ComboBoxEntry is get_cells.  My point in the previous message was that
 the 7 extant methods of CellLayout all require a cell as an argument.
 Normally, one would get the cell by calling get_cells, but get_cells is not
 extant.  Although CellLayout has supposedly been available since version
 2.4, get_cells has been available only since 2.12.  I mistakenly believed
 that I had version 2.10 of PyGTK, hence my eagerness for version 2.12.
 However, assuming that gtk.pygtk_version is the reliable way to get the
 version of PyGTK, it seems that I do, in fact, have version 2.12 already.
 Accordingly, it seems that get_cells should be available.

After looking the gtk headers and GTK docs, get_cells is available
only in GTK 2.12 and upper, while the GTK+ provided in maemo is 2.10.
So, pygtk checks for it but as it can't be found, bypasses it.


-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python compiler package missing

2008-09-22 Thread Lauro Moura
On Sun, Sep 21, 2008 at 2:02 AM, Jeffrey Barish
[EMAIL PROTECTED] wrote:
 I am using configobj.py with my Python application.  configobj.py uses the
 compiler package, which seems to be missing in maemo.  Is there a way to
 install it?


Jeff, did you install the python2.5-dev package?

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Help with hildon.NumberEditor: IN PYTHON

2008-04-02 Thread Lauro Moura
On Wed, Apr 2, 2008 at 4:28 PM, Darren Enns [EMAIL PROTECTED] wrote:

  Help please!

  I am slowly learning OOP-style PyGTK code, and have recently discovered how
 'nasty' gtk.Spinbutton looks on Maemo :(

  OK, so I was just going to make some quick changed to my Python code to use
 'hildon.NumberEditor' instead, but it is not as much a 'drop-in-replacement'
 as a newbie like me requires...

   subclass the gtk.Digalog() class to create a new dialog window 
  class spin_window(gtk.Dialog) :
  value = [0] * SPIN_BUTTON_COUNT

  def hildon_set_value(self,widget,index):
 self.value[index] = widget.get_value()
 return

  # a callback to remember the values of the spin buttons.
  # the 'index' is setup when connecting the callback
  def set_value(self,widget,index):
 self.value[index] = widget.get_value_as_int()
 return

  def __init__(self,window):
  # init the parent class to create the dialog
  super(spin_window, self).__init__(set spin values,
 window,
  gtk.DIALOG_DESTROY_WITH_PARENT |
 gtk.DIALOG_MODAL,
  (gtk.STOCK_OK, gtk.RESPONSE_OK))

  number_editor = hildon.NumberEditor(-90,90)
  #number_editor.connect(changed,self.set_value, 0)
  #number_editor.connect(notify::value,self.set_value, 0)

 number_editor.connect(notify::value,self.hildon_set_value,0)
  number_editor.set_value(0)
  self.vbox.pack_start(number_editor)
  self.value[0] = 0
  number_editor.show()

  label = gtk.Label('Latitude Degrees:')
  self.vbox.pack_start(label)
  #label.modify_font(pango.FontDescription(sans 30))
  label.show()

  adjustment = gtk.Adjustment(0, -90, 90, 1, 1, 1)
  spinbutton = gtk.SpinButton(adjustment,0,0)
  spinbutton.connect(changed,self.set_value, 1)
  self.vbox.pack_start(spinbutton)
  self.value[1] = 0
  spinbutton.show()
  ...

  Notice my feeble attempts to add 'special' code for the numbereditor -- but
 the code above does not work:

  TypeError: hildon_set_value() takes exactly 3 arguments (4 given)

  So I am getting all confused!  It *looks* like I am using the correct
 signal value, and passing three parameters...

  There are very few Python examples out on Google for me to learn the
 solution with.


Try replacing the argument list on the callback to

def set_value(self, widget, index, data=None)

Now data will take the extra data passed when the signal is received.



-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


fakeroot and popen under ARMEL target - error loading library

2008-03-25 Thread Lauro Moura
I'm having some problems with fakeroot and popen calls inside
scratchbox under the ARMEL target. At [1] there's a small example C
file and at [2] the bug report I filed yesterday.

Program output:
uname: error while loading shared libraries:
/usr/lib/libfakeroot/libfakeroot-tcp.so.0: cannot open shared object
file: No such file or directory
exiting

PS: When changing SBOX_PRELOAD to LD_PRELOAD makes it work but
dh_testroot fails.

[1] http://pastebin.com/m5cda6dd7
[2] http://bugzilla.scratchbox.org/bugzilla/show_bug.cgi?id=322
-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python and Hildon: Toolbar and window title remain hidden

2008-03-22 Thread Lauro Moura
On Sat, Mar 22, 2008 at 2:38 PM, Matti Räty [EMAIL PROTECTED] wrote:
 Hi all,

 My question is about Python and Hildon UI. It might be pretty basic one but
 I haven't been able to find a solution.

 So, my problem is this. I am creating application with Python for Maemo but
 for some reason window title and toolbar remain hidden. I can add widgets to
 window and they work fine. So most likely I am missing just some minor
 thing. I am hoping someone could push me to the right direction :)

 Here is code snipset that I have :

 class MyApp(hildon.Program):

def __init__(self):
 hildon.Program.__init__(self)

 self.window = hildon.Window()

 self.window.set_title(Title, not seen.)
  self.window.connect(destroy, gtk.main_quit)

 label = gtk.Label(Hello)
 self.window.add(label)

 self._create_toolbar()

 self.add_window(self.window)

def _create_toolbar(self):
 toolbar = gtk.Toolbar()
 toolbar.set_border_width (3)
 toolbar.set_orientation ('horizontal')
 toolbar.set_style ('both-horiz')
  button = gtk.ToolButton (None, TB Button)
 toolbar.insert (button, -1)

 button.show()
 toolbar.show()

 self.window.add_toolbar(toolbar)

   def run(self):
 self.window.show_all()
 gtk.main()

 run() is called when program is launched.

 So there it is. All pointers are very much welcome.


About the toolbar, that probably is a bug when using the set_style
with both_horizontal. At [1] there's a C code example.

[1] http://pastebin.com/m3a52df8b


-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Python and Hildon: Toolbar and window title remain hidden

2008-03-22 Thread Lauro Moura
On Sat, Mar 22, 2008 at 7:00 PM, Matti Räty [EMAIL PROTECTED] wrote:
 Hi,

 Thanks, now it works :) Actually all the settings of style and orientation
 were not needed.

 Now I am only left with app title not working..


Here in scratchbox it shows the title after the script name (test.py -
Title not seen). This test.py text can be retrieved/changed with
get/set_application_name functions in the gtk module.

Setting it to '' made only the window title appear.


-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [pymaemo] OssoRPCException running a python osso example

2008-03-03 Thread Lauro Moura
On 3/1/08, Andrea Grandi [EMAIL PROTECTED] wrote:
 Hi,

  I was trying to run this example from pymaemo website:

  import osso

  def main():
 osso_c = osso.Context(osso_test_statusbar, 0.0.1, False)
 statusbar = osso.Statusbar(osso_c)
 statusbar.statusbar_send_event(display, 1, 1, )

  if __name__ == __main__:
 main()

  but I get this exception:

  Traceback (most recent call last):
   File /root/.pluthon/PluThonTest1/src/hello_world.py, line 27, in module
 main()
   File /root/.pluthon/PluThonTest1/src/hello_world.py, line 24, in main
 statusbar.statusbar_send_event(display, 1, 1, )
  osso.OssoRPCException: The name com.nokia.statusbar was not provided
  by any .service files

  how can I fix it? Thanks for your help!


This is probably an issue with osso_statusbar_send_event. The
following C code also shows the same error:

http://pastebin.com/f4db8f5eb


-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: undefined symbol: _Py_TrueStruct

2008-02-18 Thread Lauro Moura
On 2/14/08, Sergio Galán [EMAIL PROTECTED] wrote:
 Thanks, The code works, but only inside scratchbox, not in the N800.
 In Scratchbox I see all the error messages so I can try to solve the
 problems,  but, ¿Does someone know how to see error messages from graphical
 applications which are running on the N800? It's a home desktop plugin, so I
 can't run it from commandline...



Probably it's a typo in my patch: It should be libpython2.5.so.1.0,
not only .so (which is inside -dev package).


-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: undefined symbol: _Py_TrueStruct

2008-02-12 Thread Lauro Moura
On 2/12/08, Sergio Galán [EMAIL PROTECTED] wrote:
 Hi,
 After some busy weeks, I've back to maemo plugin programming with python.
 I used these packages (Thanks Benoit !)  but doesn't work for me in my N800.
 Nothing happens and I don't know how to see error messages.
  In scratchbox, I compiled the python desktop plugin loader following this
 tutorial
 http://ianlawrence.info/random-stuff/hildon-python-plug-in-ide,
 and I get this error when I try to load a home desktop plugin:


 Traceback (most recent call last):
   File /usr/lib/hildon-desktop/homeip.py, line 1, in
 module
 import gtk
   File
 /home/luwolf/release-jan/chinook/python-gtk2-2.12.1/debian/python2.5-gtk2/usr/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py,
 line 38, in module
File
 /home/luwolf/release-jan/chinook/python-gobject-2.14.1/debian/python2.5-gobject/usr/lib/python2.5/site-packages/gtk-2.0/gobject/__init__.py,
 line 30, in module
   File
 /home/luwolf/release-jan/chinook/python-gobject-2.14.1/debian/python2.5-gobject/usr/lib/python2.5/site-packages/gtk-2.0/gobject/constants.py,
 line 22, in module
  ImportError:
 /usr/lib/python2.5/site-packages/gtk-2.0/gobject/_gobject.so:
 undefined symbol: _Py_TrueStruct


 Does anyone know what's happening. I'm going mad...

 Thanks.


I had to apply this patch [1] to the loader to make it work. It uses
g_module_open to load libpyhton2.5.so during the loader
initialization.

http://pastebin.com/f21f6605c

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Recommendations for a Python Active Records framework

2008-01-30 Thread Lauro Moura
On 1/28/08, Devraj Mukherjee [EMAIL PROTECTED] wrote:

 Are there any suggestions on a Python ActiveRecord framework that I
 should use under Maemo? If there aren't any available will anyone else
 be interested in Exilir to be available under Maemo? I will be willing
 to invest time to port/package it for Maemo.


Currently pymaemo only provides the Storm[1] ORM, but contributions are welcome.

[1] https://storm.canonical.com

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Problems with enviroment development

2008-01-22 Thread Lauro Moura
On 1/22/08, Oscar A. Mata T. [EMAIL PROTECTED] wrote:
 Hello,

 Recently I'm experiencing some problems with my development environment. I
 just use the run-standalone.sh script for run compiled applications or
 python scripts into hildon interface. I did run the sample python files, but
 when I try to run it only shows the small windows with button at the top
 right corner. The Main Windows Program don't is showed.

 I'm getting the following errors:

 Unsupported setsockopt level=1 optname=9
 /home/maemo/.osso/current-gtk-key-theme:1: Unable to find
 include file: keybindings.rc
 python2.5[6352]: GLIB WARNING ** sapwood - sapwood-theme: Failed to load
 pixmap file
 /targets/CHINOOK_ARMEL/usr/share/themes/plankton/images/qgn_plat_application_frame_left.png:
 Failed to connect to sapwood server using `/var/tmp/sapwood-127.0.0.1:2.0':
 Connection refused

 `/usr/lib/sapwood/sapwood-server' MUST be started
 before applications
 python2.5[6352]: GLIB WARNING ** sapwood - sapwood-theme: Failed to load
 pixmap file
 /targets/CHINOOK_ARMEL/usr/share/themes/plankton/images/qgn_plat_application_frame_right.png:
 Failed to connect to sapwood server using `/var/tmp/sapwood-127.0.0.1:2.0':
 Connection refused

 `/usr/lib/sapwood/sapwood-server' MUST be started
 before applications
 python2.5[6352]: GLIB WARNING ** sapwood - sapwood-theme: Failed to load
 pixmap file
 /targets/CHINOOK_ARMEL/usr/share/themes/plankton/images/qgn_plat_application_frame_bottom.png:
 Failed to connect to sapwood server using `/var/tmp/sapwood-127.0.0.1:2.0':
 Connection refused

 `/usr/lib/sapwood/sapwood-server' MUST be started
 before applications
 python2.5[6352]: GLIB WARNING ** sapwood - sapwood-theme: Failed to load
 pixmap file
 /targets/CHINOOK_ARMEL/usr/share/themes/plankton/images/qgn_plat_view_button.png:
 Failed to connect to sapwood server using `/var/tmp/sapwood-127.0.0.1:2.0':
 Connection refused

 `/usr/lib/sapwood/sapwood-server' MUST be started
 before applications

 I didn't do anything that I can remember for screw up this thing, I just did
 run some apps, then stop the virtual machine, then at the next day I'm
 getting this issue.


Is your DISPLAY variable correctly set?
Did you run af-sb-init.sh start?

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: python2.5 - unnecessary multiple processes forked

2007-12-31 Thread Lauro Moura
On 12/30/07, Jayesh Salvi [EMAIL PROTECTED] wrote:
 Hi,

 I am porting a pygtk application to maemo. It works alright, but I noticed
 that it was consuming lot of memory, preventing me from opening other
 applications.

 When I investigated, I found that my python application was forking 4 more
 instances of itself, each one identical in memory footprint. Thus they
 consumed nearly 60-70% of my memory.

 So I ran my application using pdb and narrowed down to a code segment that
 was leading to multiple instances of the process. It turned out that when I
 call run() on hildon.fileChooserDialog object, the dialog opens and at that
 moment in the top I see 4 more instances being forked.

 I fail to understand this behavior. I replaced the hildon widgets by pure
 gtk widgets and I see similar behavior, except that 2 more instances get
 forked. Also when using gtk.FileChooserDialog, these new instances get
 created in the instantiation of the dialog object, rather than call to
 run(). (code included below)

 So to further explore the problem, I ran same application on my desktop with
 gtk widgets. But I verified that when fileChooserDialog's run is called,
 there are no additional instances of python.

 I am running this code on n770, with 2007 HE and python2.5 runtime. My
 application code is pure python and not using any additional libraries. In
 fact following would be a simpler version of it to reproduce the problem:

 ...
 Do you have any tips, as to what might be going wrong?


With the following C code[1] the same problem happens.

[1] http://pastebin.com/m2d7c9783

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Fwd: Network library on Maemo 4

2007-11-19 Thread Lauro Moura
On 11/19/07, Pierre Lamain [EMAIL PROTECTED] wrote:
 There is something I don't understand.
 Does the libconic library handle TCP sockets ?
 Terje, I really need your documents and examples ;)


A diff from 3.2 and 4.0 libconic's headers show that the only changes
are in the comments (Renaming type from OssoIc* to ConIc*). The same
applies to this [1] version of libconic.

So, looks like that the bora/3.2 guide and examples can work without
further modifications in chinook/4.0, unless there are other changes
not documented (yet).

[1] https://stage.maemo.org/svn/maemo/projects/haf/tags/libconic/0.13.mvo0/

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Status of libglade in chinook

2007-10-29 Thread Lauro Moura
Is (or will be) libglade available for Chinook? The comparison tables
from 3.2 to 4.0beta [1]and 4.0alpha to 4.0beta[2] both show that it
was removed in beta.

There's that GtkBuilder, new in 2.12 that replaces libglade but AFAIK
it isn't available in maemo-gtk.

Any clues?

[1] 
http://tablets-dev.nokia.com/unstable/4.0beta/content-comparison-3.2-to-4.0beta.html
[2] 
http://tablets-dev.nokia.com/unstable/4.0beta/content-comparison-4.0alpha-to-4.0beta.html
-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Status of libglade in chinook

2007-10-29 Thread Lauro Moura
On 10/29/07, Xan [EMAIL PROTECTED] wrote:
 On 10/29/07, Lauro Moura [EMAIL PROTECTED] wrote:
  Is (or will be) libglade available for Chinook? The comparison tables
  from 3.2 to 4.0beta [1]and 4.0alpha to 4.0beta[2] both show that it
  was removed in beta.
 
  There's that GtkBuilder, new in 2.12 that replaces libglade but AFAIK
  it isn't available in maemo-gtk.

 GtkBuilder is actually backported to maemo-gtk 2.10.

 Cheers, Xan


But is it available in beta? A patch we tried with pygtk failed
because it couldn't find GtkBuilder.

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Status of libglade in chinook

2007-10-29 Thread Lauro Moura
On 10/29/07, Xan [EMAIL PROTECTED] wrote:
 On 10/29/07, Lauro Moura [EMAIL PROTECTED] wrote:
 
  But is it available in beta? A patch we tried with pygtk failed
  because it couldn't find GtkBuilder.

 Probably the version in the beta is too old, it will be there in the
 final release for sure.


Maybe it would be good to release a version before the launch, to give
developers some time to port their applications.

PS: For those interested, Migrating page from libglade to GtkBuilder at l.g.o.:
http://library.gnome.org/devel/gtk/2.12/gtk-migrating-GtkBuilder.html

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Tap and hold in PyGTK

2007-10-18 Thread Lauro Moura
On 10/16/07, Lauro Moura [EMAIL PROTECTED] wrote:
 On 10/11/07, Jeffrey Barish [EMAIL PROTECTED] wrote:
  I am not finding information about how to use tap-and-hold in PyGTK.  I
  found gtk_widget_tap_and_hold_setup in the GTK+ Reference Manual, but
  tap_and_hold_setup is not in gtk.Widget.  Am I barking up the wrong tree?

 Hi Jeffrey, sorry for the delay.

 I've just implemented basic support for tap and hold (the _setup
 function). It's not yet in svn but will be released soon.

 Currently it's missing support for the positioning function.

 Bug url: 
 https://garage.maemo.org/tracker/index.php?func=detailaid=1520group_id=40atid=229

Hi there,

Tap-and-hold is now supported in trunk and there's a small wiki page
[1] about using it, along with an example at [2].

[1] https://garage.maemo.org/plugins/wiki/index.php?TapAndHoldid=40type=g
[2] 
https://garage.maemo.org/svn/pymaemo/packages/pygtk/trunk/examples/tap/tap_example.py

-- 
Lauro Moura
INdT - Instituto Nokia de Tecnologia
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Tap and hold in PyGTK

2007-10-16 Thread Lauro Moura
On 10/11/07, Jeffrey Barish [EMAIL PROTECTED] wrote:
 I am not finding information about how to use tap-and-hold in PyGTK.  I
 found gtk_widget_tap_and_hold_setup in the GTK+ Reference Manual, but
 tap_and_hold_setup is not in gtk.Widget.  Am I barking up the wrong tree?

Hi Jeffrey, sorry for the delay.

I've just implemented basic support for tap and hold (the _setup
function). It's not yet in svn but will be released soon.

Currently it's missing support for the positioning function.

Bug url: 
https://garage.maemo.org/tracker/index.php?func=detailaid=1520group_id=40atid=229
-- 
Lauro Moura
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Can't find py-gpsbt for Gregale

2007-10-13 Thread Lauro Moura
On 10/13/07, Darius Jack [EMAIL PROTECTED] wrote:
 Hi,

 Thanks for your kind explanations.
 What is a source/repository of missing libraries and how can I install them
 if not availiable as .deb packages ?

 (for Nokia 770 OS2006)


I searched without success for some debs. So, the obvious way would be
to generate packages from source code, but AFAIK they're proprietary.

One of the few references about GPS + 770 that I found was this post
on Karoliina's blog:

http://www.karoliinasalminen.com/blog/?page_id=99

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


Re: send data to bluetooth printer via SPP

2007-07-12 Thread Lauro Moura
On 7/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I try to use blueZ- components installed on an N800 device
 to send data (escape-sequences) to my bluetooth-enabled
 inkjet printer (it also supports PCL).

 First of all, I assured that the printer is visible from
 N800:
 I perform 'hcitool scan --scan' under root console and see
 this printer with its BD address, name, and class.

 I found a code example (in Python, here:
 http://wiki.bluez.org/wiki/HOWTO/SerialConnections) that
 allows communicate to the printer using SPP. I have Python
 installed, so I run the example script (I called file
 dbus.py) and receive error:

 File ./dbus.py, line 3, in module
 import dbus
 File /media/mmc1/dbus.py, line 7, in module
 bus= dbus.SystemBus()
 AttributeError: 'module' has no attribute 'SYstem.Bus'


If the error message is correct, looks like you have a typo on
dbus.SystemBus (Check the case of y...).

-- 
Lauro Moura (lmoura on Freenode)
INdT / Recife
http://lauro.wordpress.com
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: GtkTreeView issue

2007-06-11 Thread Lauro Moura

ext Matt Clark wrote:
I thought before I submit a bug I'd see if anyone can point out where  
I'm going wrong.  My problem is that in an app I'm developing I'm not  
getting row-activated signals from a GtkTreeView under pygtk on an  
N800, but they work fine under pygtk elsewhere (e.g. Ubuntu Feisty  
(python 2.5.1), or OS X/Fink (python 2.4.2)).  The N800 is latest  
firmware with no changes except the addition of the latest osso- 
xterm, python2.5-runtime and dropbear.




Hi Matt, I tried your code and a version in C (attached), which has the 
same problem.


Looking into the Maemo Gtk2.6 Contributions page at lgo[1], there's the 
following comments about the GtkTreeView:


gtktreeview.c - (!) - M58 - Tap on row activates, for multiple selection 
all selected rows all activated (can be done outside of tree view).
gtktreeview.c - (!) - M58 - Double click handling code (in button_press) 
commented out, should be uncommented.


By the legend, the (!) symbol indicates change needed on maemo-gtk/glib.

The M58 is one of the changes from MaemoGtk to the api provided by Gtk+ 
2.10 [2]. It's about changes on the GtkTreeView that could be 
implemented outside Gtk+, including row-activation.


So, according to those items, the double-click code (which triggers the 
row-activated on desktop) is commented out and to activate the row would 
be necessary just a tap, but it isn't working.


[1] http://live.gnome.org/Maemo/Gtk26Contributions
[2] http://live.gnome.org/Maemo/Gtk210Migration#M58

--
Lauro Moura
INdT - Recife
#include hildon-widgets/hildon-program.h
#include gtk/gtk.h

void activation_callback(GtkTreeView *treeview,
 GtkTreePath *path,
 GtkTreeViewColumn *col,
 gpointer user_data)
{
g_debug(row-activated callback);
return;
}

enum {
TEXT_COL
};

int main(int argc, char *argv[])
{
int i;

HildonWindow *window;
HildonProgram *program;
GtkWidget *treeview;
GtkTreeStore *store;
GtkTreeIter parentIter;
GtkTreeIter childIter;
GtkCellRenderer *cellrenderer;
GtkTreeViewColumn *col;


gtk_init(argc, argv);

program = HILDON_PROGRAM(hildon_program_get_instance());
g_set_application_name(row-activation test);

window = HILDON_WINDOW(hildon_window_new());

hildon_program_add_window(program, window);
g_signal_connect(G_OBJECT(window), delete-event,
 G_CALLBACK(gtk_main_quit), NULL);

/* TreeView creation */
store = gtk_tree_store_new(1, G_TYPE_STRING);

gtk_tree_store_append(store, parentIter, NULL);
gtk_tree_store_set(store, parentIter, 0, Parent item 0,-1);

gtk_tree_store_append(store, childIter, parentIter);
gtk_tree_store_set(store, childIter, 0, Child item 0,-1);

treeview = gtk_tree_view_new();

gtk_tree_view_set_model(GTK_TREE_VIEW(treeview),
GTK_TREE_MODEL(store));

cellrenderer = gtk_cell_renderer_text_new();

col = gtk_tree_view_column_new_with_attributes(Title,
cellrenderer,
text, TEXT_COL,
NULL);

gtk_tree_view_append_column(GTK_TREE_VIEW(treeview),
col);

g_signal_connect(G_OBJECT(treeview), row-activated, 
 G_CALLBACK(activation_callback), NULL);
/* Done with treeview */

gtk_container_add(GTK_CONTAINER(window), treeview);
gtk_widget_show_all(GTK_WIDGET(window));

gtk_main();
return 0;
}
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: [maemo-developers] how to save???

2005-07-04 Thread Lauro Moura
On 7/4/05, Joaquim Azevedo [EMAIL PROTECTED] wrote:
 I start to develop to maemo, and I install first the Maemopad, but in
 the moment to save, the save fail...
 
 How to permit save in sputnik?? is a permission to change, where??
 
 P.S: sorry, my english is very bad
 

I just created the following folders in my scratchbox home:

~/MyDocs
~/MyDocs/.documents
~/MyDocs/.images
~/MyDocs/.sounds
~/MyDocs/.videos

-- 
Lauro Moura lauromoura[at]gmail[dot]com
blog: http:/lauromoura.blogspot.com
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers